Snap for 8730993 from dabd31087b9eac958f8983fdfa80eea6de3bc79a to mainline-tzdata3-release

Change-Id: I17f4fc028da5c4e1983801b33b9dc4f78d88cf50
diff --git a/OsuLogin/AndroidManifest.xml b/OsuLogin/AndroidManifest.xml
index c4db0c4..730cd87 100644
--- a/OsuLogin/AndroidManifest.xml
+++ b/OsuLogin/AndroidManifest.xml
@@ -32,7 +32,7 @@
                   android:label="@string/action_bar_label"
                   android:theme="@style/AppTheme"
                   android:configChanges="keyboardHidden|orientation|screenSize"
-                  android:exported="false">
+                  android:exported="true">
             <intent-filter>
                 <action android:name="android.net.wifi.action.PASSPOINT_LAUNCH_OSU_VIEW"/>
                 <category android:name="android.intent.category.DEFAULT"/>
diff --git a/WifiDialog/Android.bp b/WifiDialog/Android.bp
deleted file mode 100644
index e9264ac..0000000
--- a/WifiDialog/Android.bp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (C) 2022 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 {
-    default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
-android_app {
-    name: "WifiDialog",
-    defaults: ["wifi-module-sdk-version-defaults"],
-    certificate: ":com.android.wifi.dialog.certificate",
-
-    libs: [
-        "framework-wifi.impl",
-    ],
-    static_libs: [
-        "androidx.appcompat_appcompat",
-    ],
-    resource_dirs: [],
-    srcs: ["src/**/*.java"],
-    sdk_version: "module_current",
-
-    apex_available: [
-        "com.android.wifi",
-        "test_com.android.wifi",
-    ]
-}
-
-android_app_certificate {
-    name: "com.android.wifi.dialog.certificate",
-    certificate: "certs/com.android.wifi.dialog"
-}
diff --git a/WifiDialog/AndroidManifest.xml b/WifiDialog/AndroidManifest.xml
deleted file mode 100644
index 379bd24..0000000
--- a/WifiDialog/AndroidManifest.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2022 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.
- */
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.android.wifi.dialog">
-    <uses-permission android:name="android.permission.VIBRATE"/>
-    <queries>
-        <intent>
-            <action android:name="com.android.server.wifi.intent.action.SERVICE_WIFI_RESOURCES_APK" />
-        </intent>
-    </queries>
-
-    <application
-        android:enabled="true"
-        android:configChanges="keyboardHidden|orientation|screenSize"
-        android:supportsRtl="true">
-
-        <!-- This is only used to identify this app by resolving the action.
-             The activity is never actually triggered. -->
-        <activity android:name="android.app.Activity" android:exported="true" android:enabled="true">
-            <intent-filter>
-                <action android:name="com.android.server.wifi.intent.action.WIFI_DIALOG_APK" />
-            </intent-filter>
-        </activity>>
-
-        <activity android:name=".WifiDialogActivity"
-                  android:configChanges="keyboardHidden|orientation|screenSize"
-                  android:hardwareAccelerated="true"
-                  android:launchMode="singleInstance"
-                  android:theme="@*android:style/Theme.DeviceDefault.Dialog.Alert.DayNight" />
-    </application>
-</manifest>
diff --git a/WifiDialog/certs/com.android.wifi.dialog.pk8 b/WifiDialog/certs/com.android.wifi.dialog.pk8
deleted file mode 100644
index c66cb29..0000000
--- a/WifiDialog/certs/com.android.wifi.dialog.pk8
+++ /dev/null
Binary files differ
diff --git a/WifiDialog/certs/com.android.wifi.dialog.x509.pem b/WifiDialog/certs/com.android.wifi.dialog.x509.pem
deleted file mode 100644
index 01aa647..0000000
--- a/WifiDialog/certs/com.android.wifi.dialog.x509.pem
+++ /dev/null
@@ -1,36 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIGLTCCBBWgAwIBAgIUILJh9k1oya1dbS8FI8l9irhgP1owDQYJKoZIhvcNAQEL
-BQAwgaQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQH
-DA1Nb3VudGFpbiBWaWV3MRAwDgYDVQQKDAdBbmRyb2lkMRAwDgYDVQQLDAdBbmRy
-b2lkMSAwHgYDVQQDDBdjb20uYW5kcm9pZC53aWZpLmRpYWxvZzEiMCAGCSqGSIb3
-DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAgFw0yMjAxMTgyMjAxMzZaGA80NzU5
-MTIxNTIyMDEzNlowgaQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlh
-MRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRAwDgYDVQQKDAdBbmRyb2lkMRAwDgYD
-VQQLDAdBbmRyb2lkMSAwHgYDVQQDDBdjb20uYW5kcm9pZC53aWZpLmRpYWxvZzEi
-MCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCAiIwDQYJKoZIhvcN
-AQEBBQADggIPADCCAgoCggIBALucvwQpHKejalU766tEA8cnNvkkOt421u5DI/c/
-4p4YVsIYFLxQ3UgiKTIXBiuC9HueuFTlfS4BG5uMBRZjjjQPgzWm0DIiKDsy2o+b
-THWaI/cYWWOsGQi71TpBNpLxiDy5o+TMKdX9hH4skDdVzNU0EZRYikRaEs6jNAZj
-Pjr0vwi/rD2MxhAVB+pd0LF5YKUGIw0zOZ49WUZc/By02wRX94e2EK0cElZhLZ3p
-LAGdS0id++oAdG3Ygc5vY+xdxufCB+3d0Ph0q5BIqzeC1r5LYpwuw60zkfXebN5W
-8y6wrGysYDyjRqlUbirYTU5wFI2qxjlFnANJ955a3B3Rg8LzY4GLuGFxNMtVn7jX
-HgFq+bee2G90Tq15VyV2s1fX1M6+GVLkXgKEUG9RQQOEo5AeaK1XEQO3GRGcIhb3
-WBQqkZ7MTHwfZgKjsGUl/K0n+Tph4fv8vk2uirP8ia4xt45g80ltaFaTrLnYMEHH
-aP4/eb+PFl86a//GZB2iz2YWxHYGXVeSubPZWIdw3QGWmmm2tAtR2vYYnGEGIKxG
-Odb4l+wzwtnnbqB86vimGiSsY00c2ue2DwnzpTX/Ytm9+XQGtWwKsCRpMwnPXbqc
-S1WbxnKXX8yB4TgIWtA5nYdreRBX8bZ8li7Y/Deq4x94OS2sYt37+33Cylpaj3re
-Y5htAgMBAAGjUzBRMB0GA1UdDgQWBBQn6tC5Vb3mFD4wAS+DMAAYjpgy+zAfBgNV
-HSMEGDAWgBQn6tC5Vb3mFD4wAS+DMAAYjpgy+zAPBgNVHRMBAf8EBTADAQH/MA0G
-CSqGSIb3DQEBCwUAA4ICAQADXWiLKzioNHlKxU3g0TSCkRe8FtmmtleXS3pXouPw
-u1uEBZL0aM7pTyzgAdNJ8/IkyEA4orqlCJs+M262JloKh2ezY4l4u8QY9Wgr32IB
-U8cHztcs2hKlVRxH2aQi9P2ro2XVTh6/eYZN3X+B0+DS1rG6M4hJqQ+y3+hF8pop
-E92hQ8TKodsWKORMMeAjeBNQF+P/doOAWP1BkteDYheQH4iZ2GbABG8mOzLYbtYO
-F3lN4uOd9gN2pjkV/4mtJHamufep2sFuF/06W5G352qLWagBbZ4oo3CRYNkanqft
-tDY3rt2o0jOEWb7wYqdhgItq6sgFAFa9tC3/TuLhYvPeo6bQMOqbbWZmEGiCUgW6
-eOmBw/A7Pnes/5lWh4QXTFOcTxW9EBwfhJ1HcEp1JeTRWadtvi8iUzRD953t1dKw
-8u4hy9VsH+JuyEqsC85uWVPj4TNTAfY5TDK8I797NQFtPlsrTrHo46zEANjzNGvj
-GfzSMqxH0t+OD2gmMKML5mAsORBIhLfmn3kTXxgCW4aaOE+hQZ6vyiteD9LmrL0F
-yfvF5XNqJtzc4MbvRh9FvJejj5o9v1xO0/qyahDt7n3Mp/Ogsz2pdXdNBIWSnx6P
-FozaJjwSXUNI3Z8T8VAGWVpOabWExgWFClj9kOUI3iXk48aYHRBr53ZdoyPXZrf8
-og==
------END CERTIFICATE-----
diff --git a/WifiDialog/certs/key.pem b/WifiDialog/certs/key.pem
deleted file mode 100644
index 4cbc2d6..0000000
--- a/WifiDialog/certs/key.pem
+++ /dev/null
@@ -1,52 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQC7nL8EKRyno2pV
-O+urRAPHJzb5JDreNtbuQyP3P+KeGFbCGBS8UN1IIikyFwYrgvR7nrhU5X0uARub
-jAUWY440D4M1ptAyIig7MtqPm0x1miP3GFljrBkIu9U6QTaS8Yg8uaPkzCnV/YR+
-LJA3VczVNBGUWIpEWhLOozQGYz469L8Iv6w9jMYQFQfqXdCxeWClBiMNMzmePVlG
-XPwctNsEV/eHthCtHBJWYS2d6SwBnUtInfvqAHRt2IHOb2PsXcbnwgft3dD4dKuQ
-SKs3gta+S2KcLsOtM5H13mzeVvMusKxsrGA8o0apVG4q2E1OcBSNqsY5RZwDSfee
-Wtwd0YPC82OBi7hhcTTLVZ+41x4Bavm3nthvdE6teVcldrNX19TOvhlS5F4ChFBv
-UUEDhKOQHmitVxEDtxkRnCIW91gUKpGezEx8H2YCo7BlJfytJ/k6YeH7/L5Nroqz
-/ImuMbeOYPNJbWhWk6y52DBBx2j+P3m/jxZfOmv/xmQdos9mFsR2Bl1Xkrmz2ViH
-cN0BlppptrQLUdr2GJxhBiCsRjnW+JfsM8LZ526gfOr4phokrGNNHNrntg8J86U1
-/2LZvfl0BrVsCrAkaTMJz126nEtVm8Zyl1/MgeE4CFrQOZ2Ha3kQV/G2fJYu2Pw3
-quMfeDktrGLd+/t9wspaWo963mOYbQIDAQABAoICAQCY/91vQS/TLpua4wDwbMk/
-8qUMTRWM/uAM8sgz7O+cynCGXSkb4j5zgxhhdxFbDrLe1bOx2G1bxR+EnI3RkmL3
-5ea1LFMBb4WrsW84SgfyqD/IVR0hAcpwqu3bUi91anAWRbZ48l7z2ongc+swlVI0
-VQA5IHOyBlrsFYBp7Slk3w+jzNxkXZdwqhYIdXWqJjhAnF6ddzb360QQ8+fOaVdr
-lWmSTVIQOqJhu2J+MxfmQSaSE/TLAo/wvO4vMfwlWNzLSBs7SvgOhucbBYhL/vGt
-wsCqaiC98R6JiljygapUW1RiU7kv+l+329j0K+3vl8vLNIfvUOtIa1v60lJMJv7x
-6ZElkSIBexhbEMXOKFcbCKRKzW3y9yw7dqkXMB+TCZSeyJeHuYftjvZSTpawFVTy
-dmTg7RMPm8r0ghHIghk84RoxwECsHmIT8MTMDsKYrGzlOOEOnI0O+N1ggmxb7/cI
-g591b0JQaoVk6k3gVQBn6HHpYeDZRzQvUpq8leC6XE5zxpXQ6AUhcXaaguKnYfYj
-kw6ONEMK7xul8BN22RxDpZAsF6Ov8XTBTbNKFDMvQbkFQUZf21Bidc0qMC+LhmeL
-egxCIrnwbwybQQCkeqbbESCAkXt4Bk7hilfbRCwfdtb17c26LqJr9lOciQc+rH6h
-6hkJ6w8IoeUx4dR9303E6QKCAQEA5+u7mX02LQznNh+Sk6BuCVSz3IQOaefhtOoi
-vZckzA1GNufhGaoc/xT+C6yQrAGvDtYD0ETq6RZnHNuXpICE31sPBteCEtlMDJFV
-3vyNrniudbXYn5YreEOJy1GCGd3HGodoT+/jUnW2+9CR6JhKnlMxD/Dz9bktnxIf
-Vowi6i9fy05ZZsIWRTFqTBo824AhN9sJ//WQEpS/9raKsprqBYiY90KhJ8XL0pQs
-86pGj6V7wwspd4J5bVNfNV/cfnLTnQLNDWCGSld7k0hobXgECeoBJ8J4CNjEYArL
-t0YuXt0omrrqbjzqUMz+F6BcWQeZG+fThqdFTfwPFOXLK5LkCwKCAQEAzxdUDRNf
-KgNweIL2IluPm7OAf59DHh7bxVLbzeUDsA4J4y0wh4WBkgztOFEUnCjx+OaYAWFF
-CjxVsTQmO3zffnM8WT3t/hytJnNAk7FjvDBdmwBygRKoeQcxtCk54HwOq39jZX4L
-3a6bjdqwJ0+0sFNo73fAZNTkw2cwCuwnCI7+ZCrTErvl2u2Hrr38pR6RS8SL28f+
-FRiSG4a46jxWLKUKESdLc9UTdWOMI0Lpkyy8tvAqS8SbdE1MWuW0jqFknjI0FY6Z
-WssRP9k/soWKuQQCTR4fZuddL+NlAYZqOxGeH+MjGJYp1F/Wi9GAiL8vuWuDESsC
-hv+maLkVGeyIZwKCAQEAsbI27SW46s+mIBwUzLPxW4jgvqcX/CFFGL8Em0tBUG8j
-S1JjcKycxv0ooX044/HuVWm5RkxnyOv3WW8PQ2WNaS112AIrkZGY6VA6AT50uCeT
-VHFeZvhCmkT1QSlUi8kXksYJMKZXAIldCJgIE7UMBz8qqlIuOioGQIk8Ja392n0t
-4rJHYap4Mc/o6CJ6WpxT114mzU0zdGkwpDG9F5gGkvLUcS9GFxlAUDpkLtZadhmP
-OCRHQ2Be9VsZ6eVnJiOI7BaHUiaQ/kkFUBX8nVOFlKsM84/XNMARxpy+9c/6G4lM
-YTGyCYD2764BScz+tOBTecQomFV1jokAbTycbOiBfQKCAQBSoOc7dGBDHi4xF2fn
-24qYQG3j/gLEsOFVgTMMmvT2uRM+3pf/asiBIsE/+DH2AOxTOIar/kiSxfIXC0y5
-7aArDwWkQe6EtqJrtg6tH1lBDDc9EledonkwGSu+y7g5FqavzNs28qz/XZzZY8ln
-VgktVYqICcrtMHi6cqCbqxAD/TIJe4DOd8RFrwK1OT7mDyVACwMWxVxexHf/naiI
-ZVyo4Yz7vScA56Kk8vxGUXtq6q29fGQT6TVxmSn/FqoNQt4ntLZNZ6FOtbmDNUaS
-D3CDU9MrO/qhj20CH4P8sMoQGX5zEKi/NaMpBrhO/19+sHH1VK1uGzAd90FJhZei
-yVq/AoIBAFja4UgSCVb7SrR8/XX8ZyJgGu2pZVqf7ZmxcZEO+++CtxAXmsaWxD/o
-6OsJm4SWgTPCkm2COGyaphOpynSXD4BTtTLAcQBwXQ/q5bgShELrg+vkHZytgW+g
-QaucCwhIHSzDUjCxXnwOibIPbGuEYrND4KG1gcnwDJPnhl7rFduhJ9FOIjYxvITd
-SOewljRHJSzYC5Dh1GSZPsLKj+cBE60O1SmFtUG1tzbmNXIYXeClHjlvVEVuM2Iq
-hKQf1rDurSxVlW54sH28THcyG3o3wUTyxizEYGoVUkYa9X/WAKkocDVNTh72OW1v
-9yJMYim6jtFirfpa+8u1vxc9INTOaP0=
------END PRIVATE KEY-----
diff --git a/WifiDialog/src/com/android/wifi/dialog/WifiDialogActivity.java b/WifiDialog/src/com/android/wifi/dialog/WifiDialogActivity.java
deleted file mode 100644
index 5fa0177..0000000
--- a/WifiDialog/src/com/android/wifi/dialog/WifiDialogActivity.java
+++ /dev/null
@@ -1,626 +0,0 @@
-/*
- * Copyright (C) 2022 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.wifi.dialog;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.media.AudioManager;
-import android.media.Ringtone;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.net.wifi.WifiContext;
-import android.net.wifi.WifiManager;
-import android.os.Bundle;
-import android.os.Process;
-import android.os.Vibrator;
-import android.text.Editable;
-import android.text.SpannableString;
-import android.text.Spanned;
-import android.text.TextUtils;
-import android.text.TextWatcher;
-import android.text.method.LinkMovementMethod;
-import android.text.style.URLSpan;
-import android.util.ArraySet;
-import android.util.Log;
-import android.util.SparseArray;
-import android.view.Gravity;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.Window;
-import android.widget.EditText;
-import android.widget.TextView;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Main Activity of the WifiDialog application. All dialogs should be created and managed from here.
- */
-public class WifiDialogActivity extends Activity  {
-    private static final String TAG = "WifiDialog";
-    private static final String KEY_DIALOG_INTENTS = "KEY_DIALOG_INTENTS";
-
-    private @Nullable WifiContext mWifiContext;
-    private @Nullable WifiManager mWifiManager;
-    private boolean mIsVerboseLoggingEnabled;
-    private int mGravity = Gravity.NO_GRAVITY;
-
-    private @NonNull Set<Intent> mSavedStateIntents = new ArraySet<>();
-    private @NonNull SparseArray<Intent> mLaunchIntentsPerId = new SparseArray<>();
-    private @NonNull SparseArray<Dialog> mActiveDialogsPerId = new SparseArray<>();
-
-    // Broadcast receiver for listening to ACTION_CLOSE_SYSTEM_DIALOGS
-    private BroadcastReceiver mCloseSystemDialogsReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            if (mIsVerboseLoggingEnabled) {
-                Log.v(TAG, "ACTION_CLOSE_SYSTEM_DIALOGS received, cancelling all dialogs.");
-            }
-            for (int i = 0; i < mActiveDialogsPerId.size(); i++) {
-                Dialog dialog = mActiveDialogsPerId.valueAt(i);
-                if (dialog.isShowing()) {
-                    dialog.cancel();
-                }
-            }
-        }
-    };
-
-    private WifiContext getWifiContext() {
-        if (mWifiContext == null) {
-            mWifiContext = new WifiContext(this);
-        }
-        return mWifiContext;
-    }
-
-    /**
-     * Override the default Resources with the Resources from the active ServiceWifiResources APK.
-     */
-    @Override
-    public Resources getResources() {
-        return getWifiContext().getResources();
-    }
-
-    // TODO(b/215605937): Remove these getXxxId() methods with the actual resource ID references
-    //                    once the build system is fixed to allow importing ServiceWifiResources.
-    private int getStringId(@NonNull String name) {
-        Resources res = getResources();
-        return res.getIdentifier(
-                name, "string", getWifiContext().getWifiOverlayApkPkgName());
-    }
-
-    private int getIntegerId(@NonNull String name) {
-        Resources res = getResources();
-        return res.getIdentifier(
-                name, "integer", getWifiContext().getWifiOverlayApkPkgName());
-    }
-
-    private int getBooleanId(@NonNull String name) {
-        Resources res = getResources();
-        return res.getIdentifier(
-                name, "bool", getWifiContext().getWifiOverlayApkPkgName());
-    }
-
-    private int getLayoutId(@NonNull String name) {
-        Resources res = getResources();
-        return res.getIdentifier(
-                name, "layout", getWifiContext().getWifiOverlayApkPkgName());
-    }
-
-    private int getViewId(@NonNull String name) {
-        Resources res = getResources();
-        return res.getIdentifier(
-                name, "id", getWifiContext().getWifiOverlayApkPkgName());
-    }
-
-    private int getStyleId(@NonNull String name) {
-        Resources res = getResources();
-        return res.getIdentifier(
-                name, "style", getWifiContext().getWifiOverlayApkPkgName());
-    }
-
-    private WifiManager getWifiManager() {
-        if (mWifiManager == null) {
-            mWifiManager = getSystemService(WifiManager.class);
-        }
-        return mWifiManager;
-    }
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-
-        mIsVerboseLoggingEnabled = getWifiManager().isVerboseLoggingEnabled();
-        if (mIsVerboseLoggingEnabled) {
-            Log.v(TAG, "Creating WifiDialogActivity.");
-        }
-        mGravity = getResources().getInteger(getIntegerId("config_wifiDialogGravity"));
-        List<Intent> receivedIntents = new ArrayList<>();
-        if (savedInstanceState != null) {
-            if (mIsVerboseLoggingEnabled) {
-                Log.v(TAG, "Restoring WifiDialog saved state.");
-            }
-            List<Intent> savedStateIntents =
-                    savedInstanceState.getParcelableArrayList(KEY_DIALOG_INTENTS);
-            mSavedStateIntents.addAll(savedStateIntents);
-            receivedIntents.addAll(savedStateIntents);
-        } else {
-            receivedIntents.add(getIntent());
-        }
-        for (Intent intent : receivedIntents) {
-            int dialogId = intent.getIntExtra(WifiManager.EXTRA_DIALOG_ID,
-                    WifiManager.INVALID_DIALOG_ID);
-            if (dialogId == WifiManager.INVALID_DIALOG_ID) {
-                if (mIsVerboseLoggingEnabled) {
-                    Log.v(TAG, "Received Intent with invalid dialogId!");
-                }
-                continue;
-            }
-            mLaunchIntentsPerId.put(dialogId, intent);
-        }
-    }
-
-    /**
-     * Create and display a dialog for the currently held Intents.
-     */
-    @Override
-    protected void onStart() {
-        super.onStart();
-        registerReceiver(
-                mCloseSystemDialogsReceiver, new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
-        ArraySet<Integer> invalidDialogIds = new ArraySet<>();
-        for (int i = 0; i < mLaunchIntentsPerId.size(); i++) {
-            int dialogId = mLaunchIntentsPerId.keyAt(i);
-            if (!createAndShowDialogForIntent(dialogId, mLaunchIntentsPerId.get(dialogId))) {
-                invalidDialogIds.add(dialogId);
-            }
-        }
-        invalidDialogIds.forEach(this::removeIntentAndPossiblyFinish);
-    }
-
-    /**
-     * Create and display a dialog for a new Intent received by a pre-existing WifiDialogActivity.
-     */
-    @Override
-    protected void onNewIntent(Intent intent) {
-        super.onNewIntent(intent);
-        if (intent == null) {
-            return;
-        }
-        int dialogId = intent.getIntExtra(WifiManager.EXTRA_DIALOG_ID,
-                WifiManager.INVALID_DIALOG_ID);
-        if (dialogId == WifiManager.INVALID_DIALOG_ID) {
-            if (mIsVerboseLoggingEnabled) {
-                Log.v(TAG, "Received Intent with invalid dialogId!");
-            }
-            return;
-        }
-        String action = intent.getAction();
-        if (WifiManager.ACTION_DISMISS_DIALOG.equals(action)) {
-            removeIntentAndPossiblyFinish(dialogId);
-            return;
-        }
-        mLaunchIntentsPerId.put(dialogId, intent);
-        if (!createAndShowDialogForIntent(dialogId, intent)) {
-            removeIntentAndPossiblyFinish(dialogId);
-        }
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-        unregisterReceiver(mCloseSystemDialogsReceiver);
-        // Dismiss and remove any active Dialogs to prevent window leaking.
-        for (int i = 0; i < mActiveDialogsPerId.size(); i++) {
-            Dialog dialog = mActiveDialogsPerId.valueAt(i);
-            dialog.setOnDismissListener(null);
-            dialog.dismiss();
-        }
-        mActiveDialogsPerId.clear();
-    }
-
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        ArrayList<Intent> intentList = new ArrayList<>();
-        for (int i = 0; i < mLaunchIntentsPerId.size(); i++) {
-            intentList.add(mLaunchIntentsPerId.valueAt(i));
-        }
-        outState.putParcelableArrayList(KEY_DIALOG_INTENTS, intentList);
-        super.onSaveInstanceState(outState);
-    }
-
-    /**
-     * Remove the Intent and corresponding dialog of the given dialogId (dismissing it if it is
-     * showing) and finish the Activity if there are no dialogs left to show.
-     */
-    private void removeIntentAndPossiblyFinish(int dialogId) {
-        mLaunchIntentsPerId.remove(dialogId);
-        Dialog dialog = mActiveDialogsPerId.get(dialogId);
-        mActiveDialogsPerId.remove(dialogId);
-        if (dialog != null && dialog.isShowing()) {
-            dialog.dismiss();
-        }
-        if (mIsVerboseLoggingEnabled) {
-            Log.v(TAG, "Dialog id " + dialogId + " removed.");
-        }
-        if (mLaunchIntentsPerId.size() == 0) {
-            if (mIsVerboseLoggingEnabled) {
-                Log.v(TAG, "No dialogs left to show, finishing.");
-            }
-            finishAndRemoveTask();
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        if (isFinishing()) {
-            // Kill the process now instead of waiting indefinitely for ActivityManager to kill it.
-            Process.killProcess(android.os.Process.myPid());
-        }
-    }
-
-    /**
-     * Creates and shows a dialog for the given dialogId and Intent.
-     * Returns {@code true} if the dialog was successfully created, {@code false} otherwise.
-     */
-    private @Nullable boolean createAndShowDialogForIntent(int dialogId, @NonNull Intent intent) {
-        String action = intent.getAction();
-        if (!WifiManager.ACTION_LAUNCH_DIALOG.equals(action)) {
-            return false;
-        }
-        Dialog dialog = null;
-        int dialogType = intent.getIntExtra(
-                WifiManager.EXTRA_DIALOG_TYPE, WifiManager.DIALOG_TYPE_UNKNOWN);
-        switch (dialogType) {
-            case WifiManager.DIALOG_TYPE_SIMPLE:
-                dialog = createSimpleDialog(dialogId,
-                        intent.getStringExtra(WifiManager.EXTRA_DIALOG_TITLE),
-                        intent.getStringExtra(WifiManager.EXTRA_DIALOG_MESSAGE),
-                        intent.getStringExtra(WifiManager.EXTRA_DIALOG_MESSAGE_URL),
-                        intent.getIntExtra(WifiManager.EXTRA_DIALOG_MESSAGE_URL_START, 0),
-                        intent.getIntExtra(WifiManager.EXTRA_DIALOG_MESSAGE_URL_END, 0),
-                        intent.getStringExtra(WifiManager.EXTRA_DIALOG_POSITIVE_BUTTON_TEXT),
-                        intent.getStringExtra(WifiManager.EXTRA_DIALOG_NEGATIVE_BUTTON_TEXT),
-                        intent.getStringExtra(WifiManager.EXTRA_DIALOG_NEUTRAL_BUTTON_TEXT));
-                break;
-            case WifiManager.DIALOG_TYPE_P2P_INVITATION_SENT:
-                dialog = createP2pInvitationSentDialog(
-                        dialogId,
-                        intent.getStringExtra(WifiManager.EXTRA_P2P_DEVICE_NAME),
-                        intent.getStringExtra(WifiManager.EXTRA_P2P_DISPLAY_PIN));
-                break;
-            case WifiManager.DIALOG_TYPE_P2P_INVITATION_RECEIVED:
-                dialog = createP2pInvitationReceivedDialog(
-                        dialogId,
-                        intent.getStringExtra(WifiManager.EXTRA_P2P_DEVICE_NAME),
-                        intent.getBooleanExtra(WifiManager.EXTRA_P2P_PIN_REQUESTED, false),
-                        intent.getStringExtra(WifiManager.EXTRA_P2P_DISPLAY_PIN));
-                break;
-            default:
-                if (mIsVerboseLoggingEnabled) {
-                    Log.v(TAG, "Could not create dialog with id= " + dialogId
-                            + " for unknown type: " + dialogType);
-                }
-                break;
-        }
-        if (dialog == null) {
-            return false;
-        }
-        dialog.setOnDismissListener((dialogDismiss) -> {
-            if (mIsVerboseLoggingEnabled) {
-                Log.v(TAG, "Dialog id=" + dialogId
-                        + " dismissed.");
-            }
-            removeIntentAndPossiblyFinish(dialogId);
-        });
-        dialog.setCanceledOnTouchOutside(false);
-        if (mGravity != Gravity.NO_GRAVITY) {
-            dialog.getWindow().setGravity(mGravity);
-        }
-        mActiveDialogsPerId.put(dialogId, dialog);
-        dialog.show();
-        if (mIsVerboseLoggingEnabled) {
-            Log.v(TAG, "Showing dialog " + dialogId);
-        }
-        // Allow message URLs to be clickable.
-        TextView messageView = dialog.findViewById(android.R.id.message);
-        if (messageView != null) {
-            messageView.setMovementMethod(LinkMovementMethod.getInstance());
-        }
-        // Play a notification sound/vibration if the dialog just came in (i.e. not read from the
-        // saved instance state after a configuration change), and the overlays specify a
-        // sound/vibration for the specific dialog type.
-        if (!mSavedStateIntents.contains(intent)
-                && dialogType == WifiManager.DIALOG_TYPE_P2P_INVITATION_RECEIVED
-                && getResources().getBoolean(
-                        getBooleanId("config_p2pInvitationReceivedDialogNotificationSound"))) {
-            Uri notification = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
-            Ringtone r = RingtoneManager.getRingtone(this, notification);
-            r.play();
-            if (mIsVerboseLoggingEnabled) {
-                Log.v(TAG, "Played notification sound for " + " dialogId=" + dialogId);
-            }
-            if (getSystemService(AudioManager.class).getRingerMode()
-                    == AudioManager.RINGER_MODE_VIBRATE) {
-                getSystemService(Vibrator.class).vibrate(1_000);
-                if (mIsVerboseLoggingEnabled) {
-                    Log.v(TAG, "Vibrated for " + " dialogId=" + dialogId);
-                }
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Returns a simple dialog for the given Intent, or {@code null} if no dialog could be created.
-     */
-    private @Nullable Dialog createSimpleDialog(
-            int dialogId,
-            @Nullable String title,
-            @Nullable String message,
-            @Nullable String messageUrl,
-            int messageUrlStart,
-            int messageUrlEnd,
-            @Nullable String positiveButtonText,
-            @Nullable String negativeButtonText,
-            @Nullable String neutralButtonText) {
-        SpannableString spannableMessage = null;
-        if (message != null) {
-            spannableMessage = new SpannableString(message);
-            if (messageUrlStart >= 0 && messageUrlEnd <= message.length()
-                    && messageUrlStart < messageUrlEnd) {
-                spannableMessage.setSpan(new URLSpan(messageUrl), messageUrlStart, messageUrlEnd,
-                        Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
-            }
-        }
-        AlertDialog dialog = new AlertDialog.Builder(this)
-                .setTitle(title)
-                .setMessage(spannableMessage)
-                .setPositiveButton(positiveButtonText, (dialogPositive, which) -> {
-                    if (mIsVerboseLoggingEnabled) {
-                        Log.v(TAG, "Positive button pressed for simple dialog id="
-                                + dialogId);
-                    }
-                    getWifiManager().replyToSimpleDialog(dialogId,
-                            WifiManager.DIALOG_REPLY_POSITIVE);
-                })
-                .setNegativeButton(negativeButtonText, (dialogNegative, which) -> {
-                    if (mIsVerboseLoggingEnabled) {
-                        Log.v(TAG, "Negative button pressed for simple dialog id="
-                                + dialogId);
-                    }
-                    getWifiManager().replyToSimpleDialog(dialogId,
-                            WifiManager.DIALOG_REPLY_NEGATIVE);
-                })
-                .setNeutralButton(neutralButtonText, (dialogNeutral, which) -> {
-                    if (mIsVerboseLoggingEnabled) {
-                        Log.v(TAG, "Neutral button pressed for simple dialog id="
-                                + dialogId);
-                    }
-                    getWifiManager().replyToSimpleDialog(dialogId,
-                            WifiManager.DIALOG_REPLY_NEUTRAL);
-                })
-                .setOnCancelListener((dialogCancel) -> {
-                    if (mIsVerboseLoggingEnabled) {
-                        Log.v(TAG, "Simple dialog id=" + dialogId
-                                + " cancelled.");
-                    }
-                    getWifiManager().replyToSimpleDialog(dialogId,
-                            WifiManager.DIALOG_REPLY_CANCELLED);
-                })
-                .create();
-        if (mIsVerboseLoggingEnabled) {
-            Log.v(TAG, "Created a simple dialog."
-                    + " id=" + dialogId
-                    + " title=" + title
-                    + " message=" + message
-                    + " url=[" + messageUrl + "," + messageUrlStart + "," + messageUrlEnd + "]"
-                    + " positiveButtonText=" + positiveButtonText
-                    + " negativeButtonText=" + negativeButtonText
-                    + " neutralButtonText=" + neutralButtonText);
-        }
-        return dialog;
-    }
-
-    /**
-     * Returns a P2P Invitation Sent Dialog for the given Intent, or {@code null} if no Dialog
-     * could be created.
-     */
-    private @Nullable Dialog createP2pInvitationSentDialog(
-            final int dialogId,
-            final @NonNull String deviceName,
-            @Nullable String displayPin) {
-        if (TextUtils.isEmpty(deviceName)) {
-            if (mIsVerboseLoggingEnabled) {
-                Log.v(TAG, "Could not create P2P Invitation Sent dialog with null or empty"
-                        + " device name."
-                        + " id=" + dialogId
-                        + " deviceName=" + deviceName
-                        + " displayPin=" + displayPin);
-            }
-            return null;
-        }
-
-        final View textEntryView = LayoutInflater.from(this)
-                .inflate(getLayoutId("wifi_p2p_dialog"), null);
-        ViewGroup group = textEntryView.findViewById(getViewId("info"));
-        addRowToP2pDialog(group, getStringId("wifi_p2p_to_message"), deviceName);
-
-        if (displayPin != null) {
-            addRowToP2pDialog(group, getStringId("wifi_p2p_show_pin_message"), displayPin);
-        }
-
-        AlertDialog dialog = new AlertDialog.Builder(this)
-                .setTitle(getString(getStringId("wifi_p2p_invitation_sent_title")))
-                .setView(textEntryView)
-                .setPositiveButton(getStringId("ok"), (dialogPositive, which) -> {
-                    // No-op
-                    if (mIsVerboseLoggingEnabled) {
-                        Log.v(TAG, "P2P Invitation Sent Dialog id=" + dialogId
-                                + " accepted.");
-                    }
-                })
-                .create();
-        if (mIsVerboseLoggingEnabled) {
-            Log.v(TAG, "Created P2P Invitation Sent dialog."
-                    + " id=" + dialogId
-                    + " deviceName=" + deviceName
-                    + " displayPin=" + displayPin);
-        }
-        return dialog;
-    }
-
-    /**
-     * Returns a P2P Invitation Received Dialog for the given Intent, or {@code null} if no Dialog
-     * could be created.
-     */
-    private @Nullable Dialog createP2pInvitationReceivedDialog(
-            final int dialogId,
-            final @NonNull String deviceName,
-            final boolean isPinRequested,
-            @Nullable String displayPin) {
-        if (TextUtils.isEmpty(deviceName)) {
-            if (mIsVerboseLoggingEnabled) {
-                Log.v(TAG, "Could not create P2P Invitation Received dialog with null or empty"
-                        + " device name."
-                        + " id=" + dialogId
-                        + " deviceName=" + deviceName
-                        + " isPinRequested=" + isPinRequested
-                        + " displayPin=" + displayPin);
-            }
-            return null;
-        }
-
-        final View textEntryView = LayoutInflater.from(this)
-                .inflate(getLayoutId("wifi_p2p_dialog"), null);
-        ViewGroup group = textEntryView.findViewById(getViewId("info"));
-        addRowToP2pDialog(group, getStringId("wifi_p2p_from_message"), deviceName);
-
-        final EditText pinEditText;
-        if (isPinRequested) {
-            textEntryView.findViewById(getViewId("enter_pin_section")).setVisibility(View.VISIBLE);
-            pinEditText = textEntryView.findViewById(getViewId("wifi_p2p_wps_pin"));
-            pinEditText.setVisibility(View.VISIBLE);
-        } else {
-            pinEditText = null;
-        }
-        if (displayPin != null) {
-            addRowToP2pDialog(group, getStringId("wifi_p2p_show_pin_message"), displayPin);
-        }
-
-        AlertDialog dialog = new AlertDialog.Builder(this,
-                getStyleId("wifi_p2p_invitation_received_dialog"))
-                .setTitle(getString(getStringId("wifi_p2p_invitation_to_connect_title")))
-                .setView(textEntryView)
-                .setPositiveButton(getStringId("accept"), (dialogPositive, which) -> {
-                    String pin = null;
-                    if (pinEditText != null) {
-                        pin = pinEditText.getText().toString();
-                    }
-                    if (mIsVerboseLoggingEnabled) {
-                        Log.v(TAG, "P2P Invitation Received Dialog id=" + dialogId
-                                + " accepted with pin=" + pin);
-                    }
-                    getWifiManager().replyToP2pInvitationReceivedDialog(dialogId, true, pin);
-                })
-                .setNegativeButton(getStringId("decline"), (dialogNegative, which) -> {
-                    if (mIsVerboseLoggingEnabled) {
-                        Log.v(TAG, "P2P Invitation Received dialog id=" + dialogId
-                                + " declined.");
-                    }
-                    getWifiManager().replyToP2pInvitationReceivedDialog(dialogId, false, null);
-                })
-                .setOnCancelListener((dialogCancel) -> {
-                    if (mIsVerboseLoggingEnabled) {
-                        Log.v(TAG, "P2P Invitation Received dialog id=" + dialogId
-                                + " cancelled.");
-                    }
-                    getWifiManager().replyToP2pInvitationReceivedDialog(dialogId, false, null);
-                })
-                .create();
-        if (pinEditText != null) {
-            dialog.setOnShowListener(dialogShow -> {
-                dialog.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);
-            });
-            pinEditText.addTextChangedListener(new TextWatcher() {
-                @Override
-                public void onTextChanged(CharSequence s, int start, int before, int count) {
-                    // No-op.
-                }
-
-                @Override
-                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-                    // No-op.
-                }
-
-                @Override
-                public void afterTextChanged(Editable s) {
-                    if (s.length() == 4 || s.length() == 8) {
-                        dialog.getButton(Dialog.BUTTON_POSITIVE).setEnabled(true);
-                    } else {
-                        dialog.getButton(Dialog.BUTTON_POSITIVE).setEnabled(false);
-                    }
-                }
-            });
-        }
-        if ((getResources().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_APPLIANCE)
-                == Configuration.UI_MODE_TYPE_APPLIANCE) {
-            // For appliance devices, add a key listener which accepts.
-            dialog.setOnKeyListener((dialogKey, keyCode, event) -> {
-                if (keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) {
-                    // TODO: Plumb this response to framework.
-                    dialog.dismiss();
-                    return true;
-                }
-                return true;
-            });
-        }
-        if (mIsVerboseLoggingEnabled) {
-            Log.v(TAG, "Created P2P Invitation Received dialog."
-                    + " id=" + dialogId
-                    + " deviceName=" + deviceName
-                    + " isPinRequested=" + isPinRequested
-                    + " displayPin=" + displayPin);
-        }
-        return dialog;
-    }
-
-    /**
-     * Helper method to add a row to a ViewGroup for a P2P Invitation Received/Sent Dialog.
-     */
-    private void addRowToP2pDialog(ViewGroup group, int stringId, String value) {
-        View row = LayoutInflater.from(this)
-                .inflate(getLayoutId("wifi_p2p_dialog_row"), group, false);
-        ((TextView) row.findViewById(getViewId("name"))).setText(getString(stringId));
-        ((TextView) row.findViewById(getViewId("value"))).setText(value);
-        group.addView(row);
-    }
-}
diff --git a/apex/Android.bp b/apex/Android.bp
index 8e42372..be0767b 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -22,8 +22,9 @@
     name: "com.android.wifi-defaults",
     androidManifest: ":com.android.wifi-androidManifest",
     bootclasspath_fragments: ["com.android.wifi-bootclasspath-fragment"],
-    systemserverclasspath_fragments: ["com.android.wifi-systemserverclasspath-fragment"],
-    compat_configs: ["wifi-compat-config"],
+    java_libs: [
+        "service-wifi",
+    ],
     // from build rule `cacerts_wfa`
     prebuilts: [
         "target-cacert-wifi-674b5f5b.0",
@@ -35,9 +36,9 @@
     apps: [
         "OsuLogin",
         "ServiceWifiResources",
-        "WifiDialog",
     ],
-    defaults: ["r-launched-apex-module"],
+    min_sdk_version: "30",
+    updatable: true,
     // Indicates that pre-installed version of this apex can be compressed.
     // Whether it actually will be compressed is controlled on per-device basis.
     compressible: true,
@@ -69,7 +70,6 @@
 sdk {
     name: "wifi-module-sdk",
     bootclasspath_fragments: ["com.android.wifi-bootclasspath-fragment"],
-    systemserverclasspath_fragments: ["com.android.wifi-systemserverclasspath-fragment"],
 }
 
 // Encapsulate the contributions made by the com.android.wifi to the bootclasspath.
@@ -98,36 +98,5 @@
         max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"],
         max_target_r_low_priority: ["hiddenapi/hiddenapi-max-target-r-low-priority.txt"],
         unsupported: ["hiddenapi/hiddenapi-unsupported.txt"],
-
-        // The following packages contain classes from other modules on the
-        // bootclasspath. That means that the hidden API flags for this module
-        // has to explicitly list every single class this module provides in
-        // that package to differentiate them from the classes provided by other
-        // modules. That can include private classes that are not part of the
-        // API.
-        split_packages: [
-            "android.net.wifi",
-        ],
-
-        // The following packages and all their subpackages currently only
-        // contain classes from this bootclasspath_fragment. Listing a package
-        // here won't prevent other bootclasspath modules from adding classes in
-        // any of those packages but it will prevent them from adding those
-        // classes into an API surface, e.g. public, system, etc.. Doing so will
-        // result in a build failure due to inconsistent flags.
-        package_prefixes: [
-            "android.net.wifi.aware",
-            "android.net.wifi.hotspot2",
-            "android.net.wifi.p2p",
-            "android.net.wifi.rtt",
-            "android.net.wifi.util",
-            "com.android.wifi",
-        ],
     },
 }
-
-systemserverclasspath_fragment {
-    name: "com.android.wifi-systemserverclasspath-fragment",
-    standalone_contents: ["service-wifi"],
-    apex_available: ["com.android.wifi"],
-}
diff --git a/apex/apex_manifest.json b/apex/apex_manifest.json
index 1708bbe..fd0de11 100644
--- a/apex/apex_manifest.json
+++ b/apex/apex_manifest.json
@@ -1,5 +1,5 @@
 {
   "name": "com.android.wifi",
-  "version": 339990000
+  "version": 319999900
 }
 
diff --git a/framework/Android.bp b/framework/Android.bp
index 3c1d0a0..5ca6c1a 100644
--- a/framework/Android.bp
+++ b/framework/Android.bp
@@ -19,7 +19,7 @@
 java_defaults {
     name: "wifi-module-sdk-version-defaults",
     min_sdk_version: "30",
-    target_sdk_version: "33",
+    target_sdk_version: "31",
 }
 
 filegroup {
@@ -67,24 +67,6 @@
     "//external/sl4a:__subpackages__",
 ]
 
-java_library {
-    name: "wifi-modules-utils",
-    sdk_version: "module_current",
-    min_sdk_version: "30",
-    static_libs: [
-        "modules-utils-build",
-        "modules-utils-handlerexecutor",
-        "modules-utils-list-slice",
-        "modules-utils-preconditions",
-        "modules-utils-shell-command-handler",
-        "modules-utils-statemachine",
-    ],
-    apex_available: [
-        "com.android.wifi",
-        "test_com.android.wifi",
-    ],
-}
-
 // defaults shared between `framework-wifi` & `framework-wifi-pre-jarjar`
 // java_sdk_library `framework-wifi` needs sources to generate stubs, so it cannot reuse
 // `framework-wifi-pre-jarjar`
@@ -94,14 +76,13 @@
     static_libs: [
         "framework-wifi-util-lib",
         "android.hardware.wifi-V1.0-java-constants",
-        "wifi-modules-utils",
-        "PlatformProperties",
+        "modules-utils-build",
+        "modules-utils-os",
+        "androidx.annotation_annotation",
     ],
     libs: [
-        "androidx.annotation_annotation",
         "unsupportedappusage", // for android.compat.annotation.UnsupportedAppUsage
         "framework-connectivity.stubs.module_lib",
-        "app-compat-annotations",
     ],
     aidl: {
         include_dirs: [
@@ -154,7 +135,6 @@
     impl_library_visibility: [
         "//frameworks/opt/net/wifi/service:__subpackages__",
         "//packages/modules/Wifi/service:__subpackages__",
-        "//packages/modules/Wifi/WifiDialog:__subpackages__",
     ] + test_access_hidden_api_whitelist,
 
     apex_available: [
@@ -192,9 +172,3 @@
     name: "wifi-jarjar-rules",
     srcs: ["jarjar-rules.txt"],
 }
-
-platform_compat_config
-{
-    name: "wifi-compat-config",
-    src: ":framework-wifi-pre-jarjar",
-}
diff --git a/framework/aidl-export/android/net/wifi/WifiSsid.aidl b/framework/aidl-export/android/net/wifi/WifiSsid.aidl
deleted file mode 100644
index 13d3998..0000000
--- a/framework/aidl-export/android/net/wifi/WifiSsid.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2022, 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 android.net.wifi;
-
-parcelable WifiSsid;
diff --git a/framework/aidl-export/android/net/wifi/aware/AwareParams.aidl b/framework/aidl-export/android/net/wifi/aware/AwareParams.aidl
deleted file mode 100644
index 2911996..0000000
--- a/framework/aidl-export/android/net/wifi/aware/AwareParams.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi.aware;
-
-parcelable AwareParams;
\ No newline at end of file
diff --git a/framework/api/current.txt b/framework/api/current.txt
index f78a462..e8db727 100644
--- a/framework/api/current.txt
+++ b/framework/api/current.txt
@@ -18,36 +18,13 @@
     field public static final int EASY_CONNECT_EVENT_FAILURE_URI_GENERATION = -13; // 0xfffffff3
   }
 
-  public final class MloLink implements android.os.Parcelable {
-    ctor public MloLink();
-    method public int describeContents();
-    method @Nullable public android.net.MacAddress getApMacAddress();
-    method public int getBand();
-    method @IntRange(from=1) public int getChannel();
-    method @IntRange(from=android.net.wifi.MloLink.INVALID_MLO_LINK_ID, to=0xf) public int getLinkId();
-    method @Nullable public android.net.MacAddress getStaMacAddress();
-    method public int getState();
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.MloLink> CREATOR;
-    field public static final int INVALID_MLO_LINK_ID = -1; // 0xffffffff
-    field public static final int MLO_LINK_STATE_ACTIVE = 3; // 0x3
-    field public static final int MLO_LINK_STATE_IDLE = 2; // 0x2
-    field public static final int MLO_LINK_STATE_INVALID = 0; // 0x0
-    field public static final int MLO_LINK_STATE_UNASSOCIATED = 1; // 0x1
-  }
-
   public final class ScanResult implements android.os.Parcelable {
     ctor public ScanResult(@NonNull android.net.wifi.ScanResult);
     ctor public ScanResult();
     method public static int convertChannelToFrequencyMhzIfSupported(int, int);
     method public static int convertFrequencyMhzToChannelIfSupported(int);
     method public int describeContents();
-    method @NonNull public java.util.List<android.net.wifi.MloLink> getAffiliatedMloLinks();
-    method @Nullable public android.net.MacAddress getApMldMacAddress();
-    method @IntRange(from=android.net.wifi.MloLink.INVALID_MLO_LINK_ID, to=0xf) public int getApMloLinkId();
     method @NonNull public java.util.List<android.net.wifi.ScanResult.InformationElement> getInformationElements();
-    method @NonNull public int[] getSecurityTypes();
-    method @Nullable public android.net.wifi.WifiSsid getWifiSsid();
     method public int getWifiStandard();
     method public boolean is80211mcResponder();
     method public boolean isPasspointNetwork();
@@ -55,17 +32,11 @@
     field public String BSSID;
     field public static final int CHANNEL_WIDTH_160MHZ = 3; // 0x3
     field public static final int CHANNEL_WIDTH_20MHZ = 0; // 0x0
-    field public static final int CHANNEL_WIDTH_320MHZ = 5; // 0x5
     field public static final int CHANNEL_WIDTH_40MHZ = 1; // 0x1
     field public static final int CHANNEL_WIDTH_80MHZ = 2; // 0x2
     field public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4; // 0x4
     field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.ScanResult> CREATOR;
-    field public static final int PREAMBLE_EHT = 4; // 0x4
-    field public static final int PREAMBLE_HE = 3; // 0x3
-    field public static final int PREAMBLE_HT = 1; // 0x1
-    field public static final int PREAMBLE_LEGACY = 0; // 0x0
-    field public static final int PREAMBLE_VHT = 2; // 0x2
-    field @Deprecated public String SSID;
+    field public String SSID;
     field public static final int UNSPECIFIED = -1; // 0xffffffff
     field public static final int WIFI_BAND_24_GHZ = 1; // 0x1
     field public static final int WIFI_BAND_5_GHZ = 2; // 0x2
@@ -74,7 +45,6 @@
     field public static final int WIFI_STANDARD_11AC = 5; // 0x5
     field public static final int WIFI_STANDARD_11AD = 7; // 0x7
     field public static final int WIFI_STANDARD_11AX = 6; // 0x6
-    field public static final int WIFI_STANDARD_11BE = 8; // 0x8
     field public static final int WIFI_STANDARD_11N = 4; // 0x4
     field public static final int WIFI_STANDARD_LEGACY = 1; // 0x1
     field public static final int WIFI_STANDARD_UNKNOWN = 0; // 0x0
@@ -90,7 +60,6 @@
   }
 
   public static class ScanResult.InformationElement implements android.os.Parcelable {
-    ctor public ScanResult.InformationElement(int, int, @NonNull byte[]);
     ctor public ScanResult.InformationElement(@NonNull android.net.wifi.ScanResult.InformationElement);
     method public int describeContents();
     method @NonNull public java.nio.ByteBuffer getBytes();
@@ -105,15 +74,12 @@
     method @Nullable public android.net.MacAddress getBssid();
     method @Nullable public String getPassphrase();
     method public int getSecurityType();
-    method @Deprecated @Nullable public String getSsid();
-    method @Nullable public android.net.wifi.WifiSsid getWifiSsid();
+    method @Nullable public String getSsid();
     method public boolean isHiddenSsid();
     method public void writeToParcel(@NonNull android.os.Parcel, int);
     field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.SoftApConfiguration> CREATOR;
     field public static final int SECURITY_TYPE_OPEN = 0; // 0x0
     field public static final int SECURITY_TYPE_WPA2_PSK = 1; // 0x1
-    field public static final int SECURITY_TYPE_WPA3_OWE = 5; // 0x5
-    field public static final int SECURITY_TYPE_WPA3_OWE_TRANSITION = 4; // 0x4
     field public static final int SECURITY_TYPE_WPA3_SAE = 3; // 0x3
     field public static final int SECURITY_TYPE_WPA3_SAE_TRANSITION = 2; // 0x2
   }
@@ -143,22 +109,13 @@
     method public int describeContents();
     method @Deprecated public android.net.ProxyInfo getHttpProxy();
     method @Deprecated @NonNull public String getKey();
-    method @Deprecated public int getMacRandomizationSetting();
     method @Deprecated @NonNull public android.net.MacAddress getRandomizedMacAddress();
-    method @Deprecated public boolean isDppConfigurator();
     method @Deprecated public boolean isPasspoint();
     method @Deprecated public void setHttpProxy(android.net.ProxyInfo);
-    method @Deprecated public void setIpConfiguration(@Nullable android.net.IpConfiguration);
-    method @Deprecated public void setMacRandomizationSetting(int);
     method @Deprecated public void setSecurityParams(int);
     method public void writeToParcel(android.os.Parcel, int);
     field @Deprecated public String BSSID;
     field @Deprecated public String FQDN;
-    field @Deprecated public static final int RANDOMIZATION_AUTO = 3; // 0x3
-    field @Deprecated public static final int RANDOMIZATION_NONE = 0; // 0x0
-    field @Deprecated public static final int RANDOMIZATION_NON_PERSISTENT = 2; // 0x2
-    field @Deprecated public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1
-    field @Deprecated public static final int SECURITY_TYPE_DPP = 13; // 0xd
     field @Deprecated public static final int SECURITY_TYPE_EAP = 3; // 0x3
     field @Deprecated public static final int SECURITY_TYPE_EAP_SUITE_B = 5; // 0x5
     field @Deprecated public static final int SECURITY_TYPE_EAP_WPA3_ENTERPRISE = 9; // 0x9
@@ -260,7 +217,6 @@
     ctor public WifiEnterpriseConfig();
     ctor public WifiEnterpriseConfig(android.net.wifi.WifiEnterpriseConfig);
     method public int describeContents();
-    method public void enableTrustOnFirstUse(boolean);
     method public String getAltSubjectMatch();
     method public String getAnonymousIdentity();
     method @Nullable public java.security.cert.X509Certificate getCaCertificate();
@@ -278,11 +234,9 @@
     method public String getPlmn();
     method public String getRealm();
     method @Deprecated public String getSubjectMatch();
-    method public boolean hasCaCertificate();
     method public boolean isAuthenticationSimBased();
     method public boolean isEapMethodServerCertUsed();
     method public boolean isServerCertValidationEnabled();
-    method public boolean isTrustOnFirstUseEnabled();
     method public void setAltSubjectMatch(String);
     method public void setAnonymousIdentity(String);
     method public void setCaCertificate(@Nullable java.security.cert.X509Certificate);
@@ -335,9 +289,6 @@
 
   public class WifiInfo implements android.os.Parcelable android.net.TransportInfo {
     method public int describeContents();
-    method @NonNull public java.util.List<android.net.wifi.MloLink> getAffiliatedMloLinks();
-    method @Nullable public android.net.MacAddress getApMldMacAddress();
-    method @IntRange(from=android.net.wifi.MloLink.INVALID_MLO_LINK_ID, to=0xf) public int getApMloLinkId();
     method public String getBSSID();
     method public int getCurrentSecurityType();
     method public static android.net.NetworkInfo.DetailedState getDetailedStateOf(android.net.wifi.SupplicantState);
@@ -359,13 +310,11 @@
     method public android.net.wifi.SupplicantState getSupplicantState();
     method @IntRange(from=0xffffffff) public int getTxLinkSpeedMbps();
     method public int getWifiStandard();
-    method public boolean isRestricted();
     method @NonNull public android.net.wifi.WifiInfo makeCopy(long);
     method public void writeToParcel(android.os.Parcel, int);
     field public static final String FREQUENCY_UNITS = "MHz";
     field public static final String LINK_SPEED_UNITS = "Mbps";
     field public static final int LINK_SPEED_UNKNOWN = -1; // 0xffffffff
-    field public static final int SECURITY_TYPE_DPP = 13; // 0xd
     field public static final int SECURITY_TYPE_EAP = 3; // 0x3
     field public static final int SECURITY_TYPE_EAP_WPA3_ENTERPRISE = 9; // 0x9
     field public static final int SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT = 5; // 0x5
@@ -399,7 +348,6 @@
     method public void addOrUpdatePasspointConfiguration(android.net.wifi.hotspot2.PasspointConfiguration);
     method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE}) public void addSuggestionConnectionStatusListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.SuggestionConnectionStatusListener);
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void addSuggestionUserApprovalStatusListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.SuggestionUserApprovalStatusListener);
-    method public void allowAutojoinGlobal(boolean);
     method @Deprecated public static int calculateSignalLevel(int, int);
     method @IntRange(from=0) public int calculateSignalLevel(int);
     method @Deprecated public void cancelWps(android.net.wifi.WifiManager.WpsCallback);
@@ -413,14 +361,13 @@
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_MANAGED_PROVISIONING, android.Manifest.permission.NETWORK_CARRIER_PROVISIONING}, conditional=true) public void flushPasspointAnqpCache();
     method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public java.util.List<android.net.wifi.WifiConfiguration> getCallerConfiguredNetworks();
     method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE}) public java.util.List<android.net.wifi.WifiConfiguration> getConfiguredNetworks();
-    method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public android.net.wifi.WifiInfo getConnectionInfo();
+    method @Deprecated public android.net.wifi.WifiInfo getConnectionInfo();
     method @Deprecated public android.net.DhcpInfo getDhcpInfo();
     method public int getMaxNumberOfNetworkSuggestionsPerApp();
     method @IntRange(from=0) public int getMaxSignalLevel();
     method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public java.util.List<android.net.wifi.WifiNetworkSuggestion> getNetworkSuggestions();
     method @Deprecated public java.util.List<android.net.wifi.hotspot2.PasspointConfiguration> getPasspointConfigurations();
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public java.util.List<android.net.wifi.ScanResult> getScanResults();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public int getStaConcurrencyForMultiInternetMode();
+    method public java.util.List<android.net.wifi.ScanResult> getScanResults();
     method public int getWifiState();
     method public boolean is24GHzBandSupported();
     method public boolean is5GHzBandSupported();
@@ -431,7 +378,6 @@
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isCarrierNetworkOffloadEnabled(int, boolean);
     method public boolean isDecoratedIdentitySupported();
     method @Deprecated public boolean isDeviceToApRttSupported();
-    method public boolean isEasyConnectDppAkmSupported();
     method public boolean isEasyConnectEnrolleeResponderModeSupported();
     method public boolean isEasyConnectSupported();
     method public boolean isEnhancedOpenSupported();
@@ -445,45 +391,37 @@
     method public boolean isStaApConcurrencySupported();
     method public boolean isStaBridgedApConcurrencySupported();
     method public boolean isStaConcurrencyForLocalOnlyConnectionsSupported();
-    method public boolean isStaConcurrencyForMultiInternetSupported();
     method public boolean isTdlsSupported();
-    method public boolean isTrustOnFirstUseSupported();
     method public boolean isWapiSupported();
     method public boolean isWifiDisplayR2Supported();
     method public boolean isWifiEnabled();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isWifiPasspointEnabled();
     method public boolean isWifiStandardSupported(int);
     method public boolean isWpa3SaeH2eSupported();
     method public boolean isWpa3SaePublicKeySupported();
     method public boolean isWpa3SaeSupported();
     method public boolean isWpa3SuiteBSupported();
     method @Deprecated public boolean pingSupplicant();
-    method public void queryAutojoinGlobal(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>);
     method @Deprecated public boolean reassociate();
     method @Deprecated public boolean reconnect();
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void registerScanResultsCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.ScanResultsCallback);
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void registerSubsystemRestartTrackingCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.SubsystemRestartTrackingCallback);
     method @Deprecated public boolean removeNetwork(int);
     method @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public int removeNetworkSuggestions(@NonNull java.util.List<android.net.wifi.WifiNetworkSuggestion>);
-    method @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public int removeNetworkSuggestions(@NonNull java.util.List<android.net.wifi.WifiNetworkSuggestion>, int);
     method @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public boolean removeNonCallerConfiguredNetworks();
     method @Deprecated public void removePasspointConfiguration(String);
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void removeSuggestionConnectionStatusListener(@NonNull android.net.wifi.WifiManager.SuggestionConnectionStatusListener);
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void removeSuggestionUserApprovalStatusListener(@NonNull android.net.wifi.WifiManager.SuggestionUserApprovalStatusListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.MANAGE_WIFI_INTERFACES, android.Manifest.permission.ACCESS_WIFI_STATE}) public void reportCreateInterfaceImpact(int, boolean, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.BiConsumer<java.lang.Boolean,java.util.Set<android.net.wifi.WifiManager.InterfaceCreationImpact>>);
     method @Deprecated public boolean saveConfiguration();
     method public void setTdlsEnabled(java.net.InetAddress, boolean);
     method public void setTdlsEnabledWithMacAddress(String, boolean);
     method @Deprecated public boolean setWifiEnabled(boolean);
-    method @RequiresPermission(allOf={android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.NEARBY_WIFI_DEVICES}, conditional=true) public void startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback, @Nullable android.os.Handler);
+    method @RequiresPermission(allOf={android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback, @Nullable android.os.Handler);
     method @Deprecated public boolean startScan();
     method @Deprecated public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback);
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void unregisterScanResultsCallback(@NonNull android.net.wifi.WifiManager.ScanResultsCallback);
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void unregisterSubsystemRestartTrackingCallback(@NonNull android.net.wifi.WifiManager.SubsystemRestartTrackingCallback);
     method @Deprecated public int updateNetwork(android.net.wifi.WifiConfiguration);
     field public static final String ACTION_PICK_WIFI_NETWORK = "android.net.wifi.PICK_WIFI_NETWORK";
-    field public static final int ACTION_REMOVE_SUGGESTION_DISCONNECT = 2; // 0x2
-    field public static final int ACTION_REMOVE_SUGGESTION_LINGER = 1; // 0x1
     field public static final String ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE = "android.net.wifi.action.REQUEST_SCAN_ALWAYS_AVAILABLE";
     field public static final String ACTION_WIFI_NETWORK_SUGGESTION_POST_CONNECTION = "android.net.wifi.action.WIFI_NETWORK_SUGGESTION_POST_CONNECTION";
     field public static final String ACTION_WIFI_SCAN_AVAILABILITY_CHANGED = "android.net.wifi.action.WIFI_SCAN_AVAILABILITY_CHANGED";
@@ -511,7 +449,6 @@
     field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_APP_DISALLOWED = 2; // 0x2
     field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL = 1; // 0x1
     field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID = 5; // 0x5
-    field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_RESTRICTED_BY_ADMIN = 8; // 0x8
     field public static final int STATUS_NETWORK_SUGGESTIONS_SUCCESS = 0; // 0x0
     field public static final int STATUS_SUGGESTION_APPROVAL_APPROVED_BY_CARRIER_PRIVILEGE = 4; // 0x4
     field public static final int STATUS_SUGGESTION_APPROVAL_APPROVED_BY_USER = 2; // 0x2
@@ -525,17 +462,10 @@
     field @Deprecated public static final String SUPPLICANT_CONNECTION_CHANGE_ACTION = "android.net.wifi.supplicant.CONNECTION_CHANGE";
     field @Deprecated public static final String SUPPLICANT_STATE_CHANGED_ACTION = "android.net.wifi.supplicant.STATE_CHANGE";
     field public static final String UNKNOWN_SSID = "<unknown ssid>";
-    field public static final int WIFI_INTERFACE_TYPE_AP = 1; // 0x1
-    field public static final int WIFI_INTERFACE_TYPE_AWARE = 2; // 0x2
-    field public static final int WIFI_INTERFACE_TYPE_DIRECT = 3; // 0x3
-    field public static final int WIFI_INTERFACE_TYPE_STA = 0; // 0x0
     field @Deprecated public static final int WIFI_MODE_FULL = 1; // 0x1
     field public static final int WIFI_MODE_FULL_HIGH_PERF = 3; // 0x3
     field public static final int WIFI_MODE_FULL_LOW_LATENCY = 4; // 0x4
     field @Deprecated public static final int WIFI_MODE_SCAN_ONLY = 2; // 0x2
-    field public static final int WIFI_MULTI_INTERNET_MODE_DBS_AP = 1; // 0x1
-    field public static final int WIFI_MULTI_INTERNET_MODE_DISABLED = 0; // 0x0
-    field public static final int WIFI_MULTI_INTERNET_MODE_MULTI_AP = 2; // 0x2
     field public static final String WIFI_STATE_CHANGED_ACTION = "android.net.wifi.WIFI_STATE_CHANGED";
     field public static final int WIFI_STATE_DISABLED = 1; // 0x1
     field public static final int WIFI_STATE_DISABLING = 0; // 0x0
@@ -569,12 +499,6 @@
     field public final int statusCode;
   }
 
-  public static class WifiManager.InterfaceCreationImpact {
-    ctor public WifiManager.InterfaceCreationImpact(int, @NonNull java.util.Set<java.lang.String>);
-    method public int getInterfaceType();
-    method @NonNull public java.util.Set<java.lang.String> getPackages();
-  }
-
   public static class WifiManager.LocalOnlyHotspotCallback {
     ctor public WifiManager.LocalOnlyHotspotCallback();
     method public void onFailed(int);
@@ -662,15 +586,12 @@
     method public int describeContents();
     method @Nullable public android.net.MacAddress getBssid();
     method @Nullable public android.net.wifi.WifiEnterpriseConfig getEnterpriseConfig();
-    method public int getMacRandomizationSetting();
     method @Nullable public String getPassphrase();
     method @Nullable public android.net.wifi.hotspot2.PasspointConfiguration getPasspointConfig();
     method @IntRange(from=0) public int getPriority();
     method @IntRange(from=0) public int getPriorityGroup();
     method @Nullable public String getSsid();
-    method @Nullable public android.os.ParcelUuid getSubscriptionGroup();
     method public int getSubscriptionId();
-    method @Nullable public android.net.wifi.WifiSsid getWifiSsid();
     method public boolean isAppInteractionRequired();
     method public boolean isCarrierMerged();
     method public boolean isCredentialSharedWithUser();
@@ -678,7 +599,6 @@
     method public boolean isHiddenSsid();
     method public boolean isInitialAutojoinEnabled();
     method public boolean isMetered();
-    method public boolean isRestricted();
     method public boolean isUntrusted();
     method public boolean isUserInteractionRequired();
     method public void writeToParcel(android.os.Parcel, int);
@@ -704,14 +624,11 @@
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setPasspointConfig(@NonNull android.net.wifi.hotspot2.PasspointConfiguration);
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setPriority(@IntRange(from=0) int);
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setPriorityGroup(@IntRange(from=0) int);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setRestricted(boolean);
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setSsid(@NonNull String);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setSubscriptionGroup(@NonNull android.os.ParcelUuid);
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setSubscriptionId(int);
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setUntrusted(boolean);
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWapiEnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWapiPassphrase(@NonNull String);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWifiSsid(@NonNull android.net.wifi.WifiSsid);
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWpa2EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWpa2Passphrase(@NonNull String);
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWpa3Enterprise192BitModeConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
@@ -720,14 +637,6 @@
     method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWpa3Passphrase(@NonNull String);
   }
 
-  public final class WifiSsid implements android.os.Parcelable {
-    method public int describeContents();
-    method @NonNull public static android.net.wifi.WifiSsid fromBytes(@Nullable byte[]);
-    method @NonNull public byte[] getBytes();
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiSsid> CREATOR;
-  }
-
   public class WpsInfo implements android.os.Parcelable {
     ctor public WpsInfo();
     ctor public WpsInfo(android.net.wifi.WpsInfo);
@@ -752,7 +661,6 @@
     ctor public AttachCallback();
     method public void onAttachFailed();
     method public void onAttached(android.net.wifi.aware.WifiAwareSession);
-    method public void onAwareSessionTerminated();
   }
 
   public final class AwareResources implements android.os.Parcelable {
@@ -770,19 +678,12 @@
     method public int getMaxMatchFilterLength();
     method public int getMaxServiceNameLength();
     method public int getMaxServiceSpecificInfoLength();
-    method @IntRange(from=1) public int getNumberOfSupportedDataInterfaces();
-    method @IntRange(from=1) public int getNumberOfSupportedDataPaths();
-    method @IntRange(from=1) public int getNumberOfSupportedPublishSessions();
-    method @IntRange(from=1) public int getNumberOfSupportedSubscribeSessions();
     method public int getSupportedCipherSuites();
     method public boolean isInstantCommunicationModeSupported();
     method public void writeToParcel(android.os.Parcel, int);
     field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.Characteristics> CREATOR;
-    field public static final int WIFI_AWARE_CIPHER_SUITE_NCS_PK_128 = 4; // 0x4
-    field public static final int WIFI_AWARE_CIPHER_SUITE_NCS_PK_256 = 8; // 0x8
     field public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128 = 1; // 0x1
     field public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256 = 2; // 0x2
-    field public static final int WIFI_AWARE_CIPHER_SUITE_NONE = 0; // 0x0
   }
 
   public class DiscoverySession implements java.lang.AutoCloseable {
@@ -799,9 +700,7 @@
     method public void onMessageSendSucceeded(int);
     method public void onPublishStarted(@NonNull android.net.wifi.aware.PublishDiscoverySession);
     method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>);
-    method public void onServiceDiscovered(@NonNull android.net.wifi.aware.ServiceDiscoveryInfo);
     method public void onServiceDiscoveredWithinRange(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>, int);
-    method public void onServiceDiscoveredWithinRange(@NonNull android.net.wifi.aware.ServiceDiscoveryInfo, int);
     method public void onServiceLost(@NonNull android.net.wifi.aware.PeerHandle, int);
     method public void onSessionConfigFailed();
     method public void onSessionConfigUpdated();
@@ -826,9 +725,6 @@
 
   public final class PublishConfig implements android.os.Parcelable {
     method public int describeContents();
-    method public int getInstantCommunicationBand();
-    method @Nullable public android.net.wifi.aware.WifiAwareDataPathSecurityConfig getSecurityConfig();
-    method public boolean isInstantCommunicationModeEnabled();
     method public void writeToParcel(android.os.Parcel, int);
     field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.PublishConfig> CREATOR;
     field public static final int PUBLISH_TYPE_SOLICITED = 1; // 0x1
@@ -838,8 +734,6 @@
   public static final class PublishConfig.Builder {
     ctor public PublishConfig.Builder();
     method public android.net.wifi.aware.PublishConfig build();
-    method @NonNull public android.net.wifi.aware.PublishConfig.Builder setDataPathSecurityConfig(@NonNull android.net.wifi.aware.WifiAwareDataPathSecurityConfig);
-    method @NonNull public android.net.wifi.aware.PublishConfig.Builder setInstantCommunicationModeEnabled(boolean, int);
     method public android.net.wifi.aware.PublishConfig.Builder setMatchFilter(@Nullable java.util.List<byte[]>);
     method public android.net.wifi.aware.PublishConfig.Builder setPublishType(int);
     method public android.net.wifi.aware.PublishConfig.Builder setRangingEnabled(boolean);
@@ -853,18 +747,8 @@
     method public void updatePublish(@NonNull android.net.wifi.aware.PublishConfig);
   }
 
-  public final class ServiceDiscoveryInfo {
-    method @NonNull public java.util.List<byte[]> getMatchFilters();
-    method public int getPeerCipherSuite();
-    method @NonNull public android.net.wifi.aware.PeerHandle getPeerHandle();
-    method @Nullable public byte[] getScid();
-    method @Nullable public byte[] getServiceSpecificInfo();
-  }
-
   public final class SubscribeConfig implements android.os.Parcelable {
     method public int describeContents();
-    method public int getInstantCommunicationBand();
-    method public boolean isInstantCommunicationModeEnabled();
     method public void writeToParcel(android.os.Parcel, int);
     field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.SubscribeConfig> CREATOR;
     field public static final int SUBSCRIBE_TYPE_ACTIVE = 1; // 0x1
@@ -874,7 +758,6 @@
   public static final class SubscribeConfig.Builder {
     ctor public SubscribeConfig.Builder();
     method public android.net.wifi.aware.SubscribeConfig build();
-    method @NonNull public android.net.wifi.aware.SubscribeConfig.Builder setInstantCommunicationModeEnabled(boolean, int);
     method public android.net.wifi.aware.SubscribeConfig.Builder setMatchFilter(@Nullable java.util.List<byte[]>);
     method public android.net.wifi.aware.SubscribeConfig.Builder setMaxDistanceMm(int);
     method public android.net.wifi.aware.SubscribeConfig.Builder setMinDistanceMm(int);
@@ -889,45 +772,15 @@
     method public void updateSubscribe(@NonNull android.net.wifi.aware.SubscribeConfig);
   }
 
-  public final class WifiAwareChannelInfo implements android.os.Parcelable {
-    method public int describeContents();
-    method @IntRange(from=0) public int getChannelBandwidth();
-    method @IntRange(from=0) public int getChannelFrequencyMhz();
-    method @IntRange(from=0) public int getSpatialStreamCount();
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.WifiAwareChannelInfo> CREATOR;
-  }
-
-  public final class WifiAwareDataPathSecurityConfig implements android.os.Parcelable {
-    method public int describeContents();
-    method public int getCipherSuite();
-    method @Nullable public byte[] getPmk();
-    method @Nullable public byte[] getPmkId();
-    method @Nullable public String getPskPassphrase();
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.WifiAwareDataPathSecurityConfig> CREATOR;
-  }
-
-  public static final class WifiAwareDataPathSecurityConfig.Builder {
-    ctor public WifiAwareDataPathSecurityConfig.Builder(int);
-    method @NonNull public android.net.wifi.aware.WifiAwareDataPathSecurityConfig build();
-    method @NonNull public android.net.wifi.aware.WifiAwareDataPathSecurityConfig.Builder setPmk(@NonNull byte[]);
-    method @NonNull public android.net.wifi.aware.WifiAwareDataPathSecurityConfig.Builder setPmkId(@NonNull byte[]);
-    method @NonNull public android.net.wifi.aware.WifiAwareDataPathSecurityConfig.Builder setPskPassphrase(@NonNull String);
-  }
-
   public class WifiAwareManager {
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.CHANGE_WIFI_STATE}) public void attach(@NonNull android.net.wifi.aware.AttachCallback, @Nullable android.os.Handler);
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.NEARBY_WIFI_DEVICES}, conditional=true) public void attach(@NonNull android.net.wifi.aware.AttachCallback, @NonNull android.net.wifi.aware.IdentityChangedListener, @Nullable android.os.Handler);
-    method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public android.net.wifi.aware.AwareResources getAvailableAwareResources();
-    method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public android.net.wifi.aware.Characteristics getCharacteristics();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isAvailable();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isDeviceAttached();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isInstantCommunicationModeEnabled();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isSetChannelOnDataPathSupported();
-    field @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public static final String ACTION_WIFI_AWARE_RESOURCE_CHANGED = "android.net.wifi.aware.action.WIFI_AWARE_RESOURCE_CHANGED";
+    method public void attach(@NonNull android.net.wifi.aware.AttachCallback, @Nullable android.os.Handler);
+    method public void attach(@NonNull android.net.wifi.aware.AttachCallback, @NonNull android.net.wifi.aware.IdentityChangedListener, @Nullable android.os.Handler);
+    method @Nullable public android.net.wifi.aware.AwareResources getAvailableAwareResources();
+    method @Nullable public android.net.wifi.aware.Characteristics getCharacteristics();
+    method public boolean isAvailable();
+    method public boolean isDeviceAttached();
+    method public boolean isInstantCommunicationModeEnabled();
     field public static final String ACTION_WIFI_AWARE_STATE_CHANGED = "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED";
-    field public static final String EXTRA_AWARE_RESOURCES = "android.net.wifi.aware.extra.AWARE_RESOURCES";
     field public static final int WIFI_AWARE_DATA_PATH_ROLE_INITIATOR = 0; // 0x0
     field public static final int WIFI_AWARE_DATA_PATH_ROLE_RESPONDER = 1; // 0x1
     field public static final int WIFI_AWARE_DISCOVERY_LOST_REASON_PEER_NOT_VISIBLE = 1; // 0x1
@@ -936,7 +789,6 @@
 
   public final class WifiAwareNetworkInfo implements android.os.Parcelable android.net.TransportInfo {
     method public int describeContents();
-    method @NonNull public java.util.List<android.net.wifi.aware.WifiAwareChannelInfo> getChannelInfoList();
     method @Nullable public java.net.Inet6Address getPeerIpv6Addr();
     method public int getPort();
     method public int getTransportProtocol();
@@ -946,9 +798,6 @@
 
   public final class WifiAwareNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable {
     method public int describeContents();
-    method @IntRange(from=0) public int getChannelFrequencyMhz();
-    method @Nullable public android.net.wifi.aware.WifiAwareDataPathSecurityConfig getWifiAwareDataPathSecurityConfig();
-    method public boolean isChannelRequired();
     method public void writeToParcel(android.os.Parcel, int);
     field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.WifiAwareNetworkSpecifier> CREATOR;
   }
@@ -957,8 +806,6 @@
     ctor public WifiAwareNetworkSpecifier.Builder(@NonNull android.net.wifi.aware.DiscoverySession, @NonNull android.net.wifi.aware.PeerHandle);
     ctor public WifiAwareNetworkSpecifier.Builder(@NonNull android.net.wifi.aware.PublishDiscoverySession);
     method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier build();
-    method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder setChannelFrequencyMhz(@IntRange(from=0) int, boolean);
-    method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder setDataPathSecurityConfig(@NonNull android.net.wifi.aware.WifiAwareDataPathSecurityConfig);
     method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder setPmk(@NonNull byte[]);
     method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder setPort(@IntRange(from=0, to=65535) int);
     method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder setPskPassphrase(@NonNull String);
@@ -969,8 +816,8 @@
     method public void close();
     method @Deprecated public android.net.NetworkSpecifier createNetworkSpecifierOpen(int, @NonNull byte[]);
     method @Deprecated public android.net.NetworkSpecifier createNetworkSpecifierPassphrase(int, @NonNull byte[], @NonNull String);
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.NEARBY_WIFI_DEVICES}, conditional=true) public void publish(@NonNull android.net.wifi.aware.PublishConfig, @NonNull android.net.wifi.aware.DiscoverySessionCallback, @Nullable android.os.Handler);
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.NEARBY_WIFI_DEVICES}, conditional=true) public void subscribe(@NonNull android.net.wifi.aware.SubscribeConfig, @NonNull android.net.wifi.aware.DiscoverySessionCallback, @Nullable android.os.Handler);
+    method public void publish(@NonNull android.net.wifi.aware.PublishConfig, @NonNull android.net.wifi.aware.DiscoverySessionCallback, @Nullable android.os.Handler);
+    method public void subscribe(@NonNull android.net.wifi.aware.SubscribeConfig, @NonNull android.net.wifi.aware.DiscoverySessionCallback, @Nullable android.os.Handler);
   }
 
 }
@@ -994,7 +841,6 @@
     method public void setCredential(android.net.wifi.hotspot2.pps.Credential);
     method public void setDecoratedIdentityPrefix(@Nullable String);
     method public void setHomeSp(android.net.wifi.hotspot2.pps.HomeSp);
-    method public void setSubscriptionExpirationTimeInMillis(long);
     method public void writeToParcel(android.os.Parcel, int);
     field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.PasspointConfiguration> CREATOR;
   }
@@ -1133,7 +979,6 @@
     ctor public WifiP2pDevice();
     ctor public WifiP2pDevice(android.net.wifi.p2p.WifiP2pDevice);
     method public int describeContents();
-    method @NonNull public java.util.List<android.net.wifi.ScanResult.InformationElement> getVendorElements();
     method @Nullable public android.net.wifi.p2p.WifiP2pWfdInfo getWfdInfo();
     method public boolean isGroupOwner();
     method public boolean isServiceDiscoveryCapable();
@@ -1195,57 +1040,36 @@
   }
 
   public class WifiP2pManager {
-    method @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION) public void addExternalApprover(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.MacAddress, @NonNull android.net.wifi.p2p.WifiP2pManager.ExternalApproverRequestListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void addLocalService(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceInfo, android.net.wifi.p2p.WifiP2pManager.ActionListener);
+    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void addLocalService(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceInfo, android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method public void addServiceRequest(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceRequest, android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method public void cancelConnect(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method public void clearLocalServices(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method public void clearServiceRequests(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void connect(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pConfig, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void createGroup(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void createGroup(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pConfig, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void discoverPeers(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void discoverPeersOnSocialChannels(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void discoverPeersOnSpecificFrequency(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, int, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void discoverServices(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method public static int getP2pMaxAllowedVendorElementsLengthBytes();
+    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void connect(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pConfig, android.net.wifi.p2p.WifiP2pManager.ActionListener);
+    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void createGroup(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
+    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void createGroup(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pConfig, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
+    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void discoverPeers(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
+    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void discoverServices(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method public android.net.wifi.p2p.WifiP2pManager.Channel initialize(android.content.Context, android.os.Looper, android.net.wifi.p2p.WifiP2pManager.ChannelListener);
-    method public boolean isChannelConstrainedDiscoverySupported();
-    method public boolean isGroupClientRemovalSupported();
-    method public boolean isSetVendorElementsSupported();
-    method public void removeClient(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.MacAddress, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION) public void removeExternalApprover(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.MacAddress, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method public void removeGroup(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method public void removeLocalService(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceInfo, android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method public void removeServiceRequest(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceRequest, android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method public void requestConnectionInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void requestDeviceInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pManager.DeviceInfoListener);
+    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void requestDeviceInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pManager.DeviceInfoListener);
     method public void requestDiscoveryState(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pManager.DiscoveryStateListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void requestGroupInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.GroupInfoListener);
+    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void requestGroupInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.GroupInfoListener);
     method public void requestNetworkInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pManager.NetworkInfoListener);
     method public void requestP2pState(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pManager.P2pStateListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void requestPeers(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.PeerListListener);
-    method @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION) public void setConnectionRequestResult(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.MacAddress, int, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION) public void setConnectionRequestResult(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.MacAddress, int, @Nullable String, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
+    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void requestPeers(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.PeerListListener);
     method public void setDnsSdResponseListeners(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.DnsSdServiceResponseListener, android.net.wifi.p2p.WifiP2pManager.DnsSdTxtRecordListener);
     method public void setServiceResponseListener(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ServiceResponseListener);
     method public void setUpnpServiceResponseListener(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.UpnpServiceResponseListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void setVendorElements(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull java.util.List<android.net.wifi.ScanResult.InformationElement>, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void startListening(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method public void stopListening(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method public void stopPeerDiscovery(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    field public static final String ACTION_WIFI_P2P_REQUEST_RESPONSE_CHANGED = "android.net.wifi.p2p.action.WIFI_P2P_REQUEST_RESPONSE_CHANGED";
     field public static final int BUSY = 2; // 0x2
-    field public static final int CONNECTION_REQUEST_ACCEPT = 0; // 0x0
-    field public static final int CONNECTION_REQUEST_DEFER_SHOW_PIN_TO_SERVICE = 3; // 0x3
-    field public static final int CONNECTION_REQUEST_DEFER_TO_SERVICE = 2; // 0x2
-    field public static final int CONNECTION_REQUEST_REJECT = 1; // 0x1
     field public static final int ERROR = 0; // 0x0
     field public static final String EXTRA_DISCOVERY_STATE = "discoveryState";
     field public static final String EXTRA_NETWORK_INFO = "networkInfo";
     field public static final String EXTRA_P2P_DEVICE_LIST = "wifiP2pDeviceList";
-    field public static final String EXTRA_REQUEST_CONFIG = "android.net.wifi.p2p.extra.REQUEST_CONFIG";
-    field public static final String EXTRA_REQUEST_RESPONSE = "android.net.wifi.p2p.extra.REQUEST_RESPONSE";
     field public static final String EXTRA_WIFI_P2P_DEVICE = "wifiP2pDevice";
     field public static final String EXTRA_WIFI_P2P_GROUP = "p2pGroupInfo";
     field public static final String EXTRA_WIFI_P2P_INFO = "wifiP2pInfo";
@@ -1296,20 +1120,6 @@
     method public void onDnsSdTxtRecordAvailable(String, java.util.Map<java.lang.String,java.lang.String>, android.net.wifi.p2p.WifiP2pDevice);
   }
 
-  public static interface WifiP2pManager.ExternalApproverRequestListener {
-    method public void onAttached(@NonNull android.net.MacAddress);
-    method public void onConnectionRequested(int, @NonNull android.net.wifi.p2p.WifiP2pConfig, @NonNull android.net.wifi.p2p.WifiP2pDevice);
-    method public void onDetached(@NonNull android.net.MacAddress, int);
-    method public void onPinGenerated(@NonNull android.net.MacAddress, @NonNull String);
-    field public static final int APPROVER_DETACH_REASON_CLOSE = 3; // 0x3
-    field public static final int APPROVER_DETACH_REASON_FAILURE = 1; // 0x1
-    field public static final int APPROVER_DETACH_REASON_REMOVE = 0; // 0x0
-    field public static final int APPROVER_DETACH_REASON_REPLACE = 2; // 0x2
-    field public static final int REQUEST_TYPE_INVITATION = 1; // 0x1
-    field public static final int REQUEST_TYPE_JOIN = 2; // 0x2
-    field public static final int REQUEST_TYPE_NEGOTIATION = 0; // 0x0
-  }
-
   public static interface WifiP2pManager.GroupInfoListener {
     method public void onGroupInfoAvailable(android.net.wifi.p2p.WifiP2pGroup);
   }
@@ -1472,12 +1282,10 @@
 
   public static final class RangingRequest.Builder {
     ctor public RangingRequest.Builder();
-    method @NonNull public android.net.wifi.rtt.RangingRequest.Builder addAccessPoint(@NonNull android.net.wifi.ScanResult);
-    method @NonNull public android.net.wifi.rtt.RangingRequest.Builder addAccessPoints(@NonNull java.util.List<android.net.wifi.ScanResult>);
+    method public android.net.wifi.rtt.RangingRequest.Builder addAccessPoint(@NonNull android.net.wifi.ScanResult);
+    method public android.net.wifi.rtt.RangingRequest.Builder addAccessPoints(@NonNull java.util.List<android.net.wifi.ScanResult>);
     method @NonNull public android.net.wifi.rtt.RangingRequest.Builder addNon80211mcCapableAccessPoint(@NonNull android.net.wifi.ScanResult);
     method @NonNull public android.net.wifi.rtt.RangingRequest.Builder addNon80211mcCapableAccessPoints(@NonNull java.util.List<android.net.wifi.ScanResult>);
-    method @NonNull public android.net.wifi.rtt.RangingRequest.Builder addResponder(@NonNull android.net.wifi.rtt.ResponderConfig);
-    method @NonNull public android.net.wifi.rtt.RangingRequest.Builder addResponders(@NonNull java.util.List<android.net.wifi.rtt.ResponderConfig>);
     method public android.net.wifi.rtt.RangingRequest.Builder addWifiAwarePeer(@NonNull android.net.MacAddress);
     method public android.net.wifi.rtt.RangingRequest.Builder addWifiAwarePeer(@NonNull android.net.wifi.aware.PeerHandle);
     method public android.net.wifi.rtt.RangingRequest build();
@@ -1512,32 +1320,6 @@
     field public static final int STATUS_CODE_FAIL_RTT_NOT_AVAILABLE = 2; // 0x2
   }
 
-  public final class ResponderConfig implements android.os.Parcelable {
-    method public int describeContents();
-    method @NonNull public static android.net.wifi.rtt.ResponderConfig fromScanResult(@NonNull android.net.wifi.ScanResult);
-    method @IntRange(from=0) public int getCenterFreq0Mhz();
-    method @IntRange(from=0) public int getCenterFreq1Mhz();
-    method public int getChannelWidth();
-    method @IntRange(from=0) public int getFrequencyMhz();
-    method @Nullable public android.net.MacAddress getMacAddress();
-    method public int getPreamble();
-    method public boolean is80211mcSupported();
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.rtt.ResponderConfig> CREATOR;
-  }
-
-  public static final class ResponderConfig.Builder {
-    ctor public ResponderConfig.Builder();
-    method @NonNull public android.net.wifi.rtt.ResponderConfig build();
-    method @NonNull public android.net.wifi.rtt.ResponderConfig.Builder set80211mcSupported(boolean);
-    method @NonNull public android.net.wifi.rtt.ResponderConfig.Builder setCenterFreq0Mhz(@IntRange(from=0) int);
-    method @NonNull public android.net.wifi.rtt.ResponderConfig.Builder setCenterFreq1Mhz(@IntRange(from=0) int);
-    method @NonNull public android.net.wifi.rtt.ResponderConfig.Builder setChannelWidth(int);
-    method @NonNull public android.net.wifi.rtt.ResponderConfig.Builder setFrequencyMhz(@IntRange(from=0) int);
-    method @NonNull public android.net.wifi.rtt.ResponderConfig.Builder setMacAddress(@NonNull android.net.MacAddress);
-    method @NonNull public android.net.wifi.rtt.ResponderConfig.Builder setPreamble(int);
-  }
-
   public final class ResponderLocation implements android.os.Parcelable {
     method public int describeContents();
     method public double getAltitude();
@@ -1580,7 +1362,7 @@
 
   public class WifiRttManager {
     method public boolean isAvailable();
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.NEARBY_WIFI_DEVICES}) public void startRanging(@NonNull android.net.wifi.rtt.RangingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.rtt.RangingResultCallback);
+    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_WIFI_STATE}) public void startRanging(@NonNull android.net.wifi.rtt.RangingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.rtt.RangingResultCallback);
     field public static final String ACTION_WIFI_RTT_STATE_CHANGED = "android.net.wifi.rtt.action.WIFI_RTT_STATE_CHANGED";
   }
 
diff --git a/framework/api/module-lib-current.txt b/framework/api/module-lib-current.txt
index 7027f25..d802177 100644
--- a/framework/api/module-lib-current.txt
+++ b/framework/api/module-lib-current.txt
@@ -1,10 +1 @@
 // Signature format: 2.0
-package android.net.wifi {
-
-  public class WifiManager {
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void addCustomDhcpOptions(@NonNull android.net.wifi.WifiSsid, @NonNull byte[], @NonNull java.util.List<android.net.DhcpOption>);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void removeCustomDhcpOptions(@NonNull android.net.wifi.WifiSsid, @NonNull byte[]);
-  }
-
-}
-
diff --git a/framework/api/system-current.txt b/framework/api/system-current.txt
index 2249e02..dda7481 100644
--- a/framework/api/system-current.txt
+++ b/framework/api/system-current.txt
@@ -220,8 +220,6 @@
   }
 
   public final class ScanResult implements android.os.Parcelable {
-    method public int getBand();
-    method public void setWifiSsid(@NonNull android.net.wifi.WifiSsid);
     field public static final int CIPHER_BIP_CMAC_256 = 9; // 0x9
     field public static final int CIPHER_BIP_GMAC_128 = 7; // 0x7
     field public static final int CIPHER_BIP_GMAC_256 = 8; // 0x8
@@ -268,32 +266,23 @@
     field public static final long SOFTAP_FEATURE_BAND_6G_SUPPORTED = 128L; // 0x80L
     field public static final long SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT = 2L; // 0x2L
     field public static final long SOFTAP_FEATURE_IEEE80211_AX = 16L; // 0x10L
-    field public static final long SOFTAP_FEATURE_IEEE80211_BE = 512L; // 0x200L
     field public static final long SOFTAP_FEATURE_MAC_ADDRESS_CUSTOMIZATION = 8L; // 0x8L
-    field public static final long SOFTAP_FEATURE_WPA3_OWE = 2048L; // 0x800L
-    field public static final long SOFTAP_FEATURE_WPA3_OWE_TRANSITION = 1024L; // 0x400L
     field public static final long SOFTAP_FEATURE_WPA3_SAE = 4L; // 0x4L
   }
 
   public final class SoftApConfiguration implements android.os.Parcelable {
-    method @NonNull public int[] getAllowedAcsChannels(int);
     method @NonNull public java.util.List<android.net.MacAddress> getAllowedClientList();
     method @Deprecated public int getBand();
     method @NonNull public java.util.List<android.net.MacAddress> getBlockedClientList();
-    method public long getBridgedModeOpportunisticShutdownTimeoutMillis();
     method @Deprecated public int getChannel();
     method @NonNull public android.util.SparseIntArray getChannels();
     method public int getMacRandomizationSetting();
-    method public int getMaxChannelBandwidth();
     method public int getMaxNumberOfClients();
-    method @NonNull public android.net.MacAddress getPersistentRandomizedMacAddress();
     method public long getShutdownTimeoutMillis();
-    method @NonNull public java.util.List<android.net.wifi.ScanResult.InformationElement> getVendorElements();
     method public boolean isAutoShutdownEnabled();
     method public boolean isBridgedModeOpportunisticShutdownEnabled();
     method public boolean isClientControlByUserEnabled();
     method public boolean isIeee80211axEnabled();
-    method public boolean isIeee80211beEnabled();
     method public boolean isUserConfiguration();
     method @Nullable public android.net.wifi.WifiConfiguration toWifiConfiguration();
     field public static final int BAND_2GHZ = 1; // 0x1
@@ -301,9 +290,7 @@
     field public static final int BAND_60GHZ = 8; // 0x8
     field public static final int BAND_6GHZ = 4; // 0x4
     field @Deprecated public static final int BAND_ANY = 7; // 0x7
-    field public static final long DEFAULT_TIMEOUT = -1L; // 0xffffffffffffffffL
     field public static final int RANDOMIZATION_NONE = 0; // 0x0
-    field public static final int RANDOMIZATION_NON_PERSISTENT = 2; // 0x2
     field public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1
   }
 
@@ -311,29 +298,23 @@
     ctor public SoftApConfiguration.Builder();
     ctor public SoftApConfiguration.Builder(@NonNull android.net.wifi.SoftApConfiguration);
     method @NonNull public android.net.wifi.SoftApConfiguration build();
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setAllowedAcsChannels(int, @NonNull int[]);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setAllowedClientList(@NonNull java.util.List<android.net.MacAddress>);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setAutoShutdownEnabled(boolean);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBand(int);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBands(@NonNull int[]);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBlockedClientList(@NonNull java.util.List<android.net.MacAddress>);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBridgedModeOpportunisticShutdownEnabled(boolean);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBridgedModeOpportunisticShutdownTimeoutMillis(@IntRange(from=0xffffffff) long);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBssid(@Nullable android.net.MacAddress);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setChannel(int, int);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setChannels(@NonNull android.util.SparseIntArray);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setClientControlByUserEnabled(boolean);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setHiddenSsid(boolean);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setIeee80211axEnabled(boolean);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setIeee80211beEnabled(boolean);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setMacRandomizationSetting(int);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setMaxChannelBandwidth(int);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setMaxNumberOfClients(@IntRange(from=0) int);
     method @NonNull public android.net.wifi.SoftApConfiguration.Builder setPassphrase(@Nullable String, int);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setShutdownTimeoutMillis(@IntRange(from=0xffffffff) long);
-    method @Deprecated @NonNull public android.net.wifi.SoftApConfiguration.Builder setSsid(@Nullable String);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setVendorElements(@NonNull java.util.List<android.net.wifi.ScanResult.InformationElement>);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setWifiSsid(@Nullable android.net.wifi.WifiSsid);
+    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setShutdownTimeoutMillis(@IntRange(from=0) long);
+    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setSsid(@Nullable String);
   }
 
   public final class SoftApInfo implements android.os.Parcelable {
@@ -348,14 +329,12 @@
     field public static final int CHANNEL_WIDTH_20MHZ = 2; // 0x2
     field public static final int CHANNEL_WIDTH_20MHZ_NOHT = 1; // 0x1
     field public static final int CHANNEL_WIDTH_2160MHZ = 7; // 0x7
-    field public static final int CHANNEL_WIDTH_320MHZ = 11; // 0xb
     field public static final int CHANNEL_WIDTH_40MHZ = 3; // 0x3
     field public static final int CHANNEL_WIDTH_4320MHZ = 8; // 0x8
     field public static final int CHANNEL_WIDTH_6480MHZ = 9; // 0x9
     field public static final int CHANNEL_WIDTH_80MHZ = 4; // 0x4
     field public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 5; // 0x5
     field public static final int CHANNEL_WIDTH_8640MHZ = 10; // 0xa
-    field public static final int CHANNEL_WIDTH_AUTO = -1; // 0xffffffff
     field public static final int CHANNEL_WIDTH_INVALID = 0; // 0x0
     field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.SoftApInfo> CREATOR;
   }
@@ -383,14 +362,8 @@
   }
 
   @Deprecated public class WifiConfiguration implements android.os.Parcelable {
-    method @Deprecated @NonNull public java.util.Set<java.lang.String> getAllNetworkKeys();
     method @Deprecated public int getAuthType();
-    method @Deprecated @Nullable public java.util.List<android.net.MacAddress> getBssidAllowlist();
     method @Deprecated public int getDeletionPriority();
-    method @Deprecated @NonNull public byte[] getDppCSignKey();
-    method @Deprecated @NonNull public byte[] getDppConnector();
-    method @Deprecated @NonNull public byte[] getDppNetAccessKey();
-    method @Deprecated @NonNull public byte[] getDppPrivateEcKey();
     method @Deprecated @NonNull public android.net.IpConfiguration getIpConfiguration();
     method @Deprecated @NonNull public android.net.wifi.WifiConfiguration.NetworkSelectionStatus getNetworkSelectionStatus();
     method @Deprecated @NonNull public String getPrintableSsid();
@@ -400,15 +373,17 @@
     method @Deprecated public boolean isEphemeral();
     method @Deprecated public static boolean isMetered(@Nullable android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiInfo);
     method @Deprecated public boolean isNoInternetAccessExpected();
-    method @Deprecated public boolean isRepeaterEnabled();
-    method @Deprecated public void setBssidAllowlist(@Nullable java.util.List<android.net.MacAddress>);
     method @Deprecated public void setDeletionPriority(int) throws java.lang.IllegalArgumentException;
+    method @Deprecated public void setIpConfiguration(@Nullable android.net.IpConfiguration);
     method @Deprecated public void setNetworkSelectionStatus(@NonNull android.net.wifi.WifiConfiguration.NetworkSelectionStatus);
-    method @Deprecated @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setRepeaterEnabled(boolean);
     field @Deprecated public static final int INVALID_NETWORK_ID = -1; // 0xffffffff
     field @Deprecated public static final int METERED_OVERRIDE_METERED = 1; // 0x1
     field @Deprecated public static final int METERED_OVERRIDE_NONE = 0; // 0x0
     field @Deprecated public static final int METERED_OVERRIDE_NOT_METERED = 2; // 0x2
+    field @Deprecated public static final int RANDOMIZATION_AUTO = 3; // 0x3
+    field @Deprecated public static final int RANDOMIZATION_NONE = 0; // 0x0
+    field @Deprecated public static final int RANDOMIZATION_NON_PERSISTENT = 2; // 0x2
+    field @Deprecated public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1
     field @Deprecated public static final int RECENT_FAILURE_AP_UNABLE_TO_HANDLE_NEW_STA = 17; // 0x11
     field @Deprecated public static final int RECENT_FAILURE_DISCONNECTION_AP_BUSY = 1004; // 0x3ec
     field @Deprecated public static final int RECENT_FAILURE_MBO_ASSOC_DISALLOWED_AIR_INTERFACE_OVERLOADED = 1007; // 0x3ef
@@ -520,7 +495,6 @@
 
   public class WifiInfo implements android.os.Parcelable android.net.TransportInfo {
     method public double getLostTxPacketsPerSecond();
-    method @Nullable public String getNetworkKey();
     method @Nullable public String getRequestingPackageName();
     method public double getRetriedTxPacketsPerSecond();
     method public int getScore();
@@ -543,8 +517,8 @@
     method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void addOnWifiUsabilityStatsListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.OnWifiUsabilityStatsListener);
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void addWifiVerboseLoggingStatusChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.WifiVerboseLoggingStatusChangedListener);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoin(int, boolean);
+    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoinGlobal(boolean);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoinPasspoint(@NonNull String, boolean);
-    method public void clearExternalPnoScanRequest();
     method @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_COUNTRY_CODE) public void clearOverrideCountryCode();
     method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void clearWifiConnectedNetworkScorer();
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void connect(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener);
@@ -555,19 +529,15 @@
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void forget(int, @Nullable android.net.wifi.WifiManager.ActionListener);
     method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.List<android.util.Pair<android.net.wifi.WifiConfiguration,java.util.Map<java.lang.Integer,java.util.List<android.net.wifi.ScanResult>>>> getAllMatchingWifiConfigs(@NonNull java.util.List<android.net.wifi.ScanResult>);
     method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public java.util.List<android.net.wifi.WifiAvailableChannel> getAllowedChannels(int, int);
-    method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.ACCESS_COARSE_LOCATION}) public String getCountryCode();
+    method @Nullable @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String getCountryCode();
     method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public android.net.Network getCurrentNetwork();
     method public static int getEasyConnectMaxAllowedResponderDeviceInfoLength();
     method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String[] getFactoryMacAddresses();
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void getLastCallerInfoForApi(int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.BiConsumer<java.lang.String,java.lang.Boolean>);
     method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.Map<android.net.wifi.hotspot2.OsuProvider,java.util.List<android.net.wifi.ScanResult>> getMatchingOsuProviders(@Nullable java.util.List<android.net.wifi.ScanResult>);
     method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.Map<android.net.wifi.hotspot2.OsuProvider,android.net.wifi.hotspot2.PasspointConfiguration> getMatchingPasspointConfigsForOsuProviders(@NonNull java.util.Set<android.net.wifi.hotspot2.OsuProvider>);
     method @NonNull @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE}) public java.util.Map<android.net.wifi.WifiNetworkSuggestion,java.util.List<android.net.wifi.ScanResult>> getMatchingScanResults(@NonNull java.util.List<android.net.wifi.WifiNetworkSuggestion>, @Nullable java.util.List<android.net.wifi.ScanResult>);
-    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public java.util.Set<java.lang.String> getOemPrivilegedWifiAdminPackages();
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.READ_WIFI_CREDENTIAL}, conditional=true) public java.util.List<android.net.wifi.WifiConfiguration> getPrivilegedConfiguredNetworks();
-    method @Nullable @RequiresPermission(allOf={android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.READ_WIFI_CREDENTIAL}, conditional=true) public android.net.wifi.WifiConfiguration getPrivilegedConnectedNetwork();
+    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.READ_WIFI_CREDENTIAL}) public java.util.List<android.net.wifi.WifiConfiguration> getPrivilegedConfiguredNetworks();
     method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public android.net.wifi.SoftApConfiguration getSoftApConfiguration();
-    method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION}, conditional=true) public java.util.Set<android.net.wifi.WifiSsid> getSsidsAllowlist();
     method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public java.util.List<android.net.wifi.WifiAvailableChannel> getUsableChannels(int, int);
     method public int getVerboseLoggingLevel();
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void getWifiActivityEnergyInfoAsync(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.OnWifiActivityEnergyInfoListener);
@@ -582,11 +552,7 @@
     method public boolean isVerboseLoggingEnabled();
     method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isWifiApEnabled();
     method public boolean isWifiScannerSupported();
-    method @RequiresPermission(android.Manifest.permission.MANAGE_DEVICE_ADMINS) public void notifyMinimumRequiredWifiSecurityLevelChanged(int);
-    method @RequiresPermission(android.Manifest.permission.MANAGE_DEVICE_ADMINS) public void notifyWifiSsidPolicyChanged(@NonNull android.app.admin.WifiSsidPolicy);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION) public void registerActiveCountryCodeChangedCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.ActiveCountryCodeChangedCallback);
     method @RequiresPermission(android.Manifest.permission.WIFI_ACCESS_COEX_UNSAFE_CHANNELS) public void registerCoexCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.CoexCallback);
-    method @RequiresPermission(android.Manifest.permission.NEARBY_WIFI_DEVICES) public void registerLocalOnlyHotspotSoftApCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.SoftApCallback);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void registerNetworkRequestMatchCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.NetworkRequestMatchCallback);
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void registerSoftApCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.SoftApCallback);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void registerTrafficStateCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.TrafficStateCallback);
@@ -605,26 +571,21 @@
     method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_COEX_UNSAFE_CHANNELS) public void setCoexUnsafeChannels(@NonNull java.util.List<android.net.wifi.CoexUnsafeChannel>, int);
     method @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_COUNTRY_CODE) public void setDefaultCountryCode(@NonNull String);
     method @RequiresPermission(android.Manifest.permission.WIFI_SET_DEVICE_MOBILITY_STATE) public void setDeviceMobilityState(int);
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION}) public void setExternalPnoScanRequest(@NonNull java.util.List<android.net.wifi.WifiSsid>, @Nullable int[], @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.PnoScanResultsCallback);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setMacRandomizationSettingPasspointEnabled(@NonNull String, boolean);
     method @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_COUNTRY_CODE) public void setOverrideCountryCode(@NonNull String);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setPasspointMeteredOverride(@NonNull String, int);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setScanAlwaysAvailable(boolean);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setScanThrottleEnabled(boolean);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION}) public void setScreenOnScanSchedule(@Nullable java.util.List<android.net.wifi.WifiManager.ScreenOnScanSchedule>);
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public boolean setSoftApConfiguration(@NonNull android.net.wifi.SoftApConfiguration);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION}, conditional=true) public void setSsidsAllowlist(@NonNull java.util.Set<android.net.wifi.WifiSsid>);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public boolean setStaConcurrencyForMultiInternetMode(int);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setVerboseLoggingEnabled(boolean);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setVerboseLoggingLevel(int);
     method @Deprecated @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration);
     method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public boolean setWifiConnectedNetworkScorer(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.WifiConnectedNetworkScorer);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void setWifiPasspointEnabled(boolean);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public boolean setWifiScoringEnabled(boolean);
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startEasyConnectAsConfiguratorInitiator(@NonNull String, int, int, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.EasyConnectStatusCallback);
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startEasyConnectAsEnrolleeInitiator(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.EasyConnectStatusCallback);
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startEasyConnectAsEnrolleeResponder(@Nullable String, int, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.EasyConnectStatusCallback);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NEARBY_WIFI_DEVICES}) public void startLocalOnlyHotspot(@NonNull android.net.wifi.SoftApConfiguration, @Nullable java.util.concurrent.Executor, @Nullable android.net.wifi.WifiManager.LocalOnlyHotspotCallback);
+    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startLocalOnlyHotspot(@NonNull android.net.wifi.SoftApConfiguration, @Nullable java.util.concurrent.Executor, @Nullable android.net.wifi.WifiManager.LocalOnlyHotspotCallback);
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startRestrictingAutoJoinToSubscriptionId(int);
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public boolean startScan(android.os.WorkSource);
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startSubscriptionProvisioning(@NonNull android.net.wifi.hotspot2.OsuProvider, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.hotspot2.ProvisioningCallback);
@@ -632,9 +593,7 @@
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void stopEasyConnectSession();
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void stopRestrictingAutoJoinToSubscriptionId();
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public boolean stopSoftAp();
-    method public void unregisterActiveCountryCodeChangedCallback(@NonNull android.net.wifi.WifiManager.ActiveCountryCodeChangedCallback);
     method @RequiresPermission(android.Manifest.permission.WIFI_ACCESS_COEX_UNSAFE_CHANNELS) public void unregisterCoexCallback(@NonNull android.net.wifi.WifiManager.CoexCallback);
-    method @RequiresPermission(android.Manifest.permission.NEARBY_WIFI_DEVICES) public void unregisterLocalOnlyHotspotSoftApCallback(@NonNull android.net.wifi.WifiManager.SoftApCallback);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void unregisterNetworkRequestMatchCallback(@NonNull android.net.wifi.WifiManager.NetworkRequestMatchCallback);
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void unregisterSoftApCallback(@NonNull android.net.wifi.WifiManager.SoftApCallback);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void unregisterTrafficStateCallback(@NonNull android.net.wifi.WifiManager.TrafficStateCallback);
@@ -646,12 +605,6 @@
     field @RequiresPermission(android.Manifest.permission.NETWORK_CARRIER_PROVISIONING) public static final String ACTION_REFRESH_USER_PROVISIONING = "android.net.wifi.action.REFRESH_USER_PROVISIONING";
     field public static final String ACTION_REQUEST_DISABLE = "android.net.wifi.action.REQUEST_DISABLE";
     field public static final String ACTION_REQUEST_ENABLE = "android.net.wifi.action.REQUEST_ENABLE";
-    field public static final int API_AUTOJOIN_GLOBAL = 5; // 0x5
-    field public static final int API_SCANNING_ENABLED = 1; // 0x1
-    field public static final int API_SET_SCAN_SCHEDULE = 6; // 0x6
-    field public static final int API_SOFT_AP = 3; // 0x3
-    field public static final int API_TETHERED_HOTSPOT = 4; // 0x4
-    field public static final int API_WIFI_ENABLED = 2; // 0x2
     field public static final int CHANGE_REASON_ADDED = 0; // 0x0
     field public static final int CHANGE_REASON_CONFIG_CHANGE = 2; // 0x2
     field public static final int CHANGE_REASON_REMOVED = 1; // 0x1
@@ -698,7 +651,7 @@
     field public static final int VERBOSE_LOGGING_LEVEL_DISABLED = 0; // 0x0
     field public static final int VERBOSE_LOGGING_LEVEL_ENABLED = 1; // 0x1
     field public static final int VERBOSE_LOGGING_LEVEL_ENABLED_SHOW_KEY = 2; // 0x2
-    field @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public static final String WIFI_AP_STATE_CHANGED_ACTION = "android.net.wifi.WIFI_AP_STATE_CHANGED";
+    field public static final String WIFI_AP_STATE_CHANGED_ACTION = "android.net.wifi.WIFI_AP_STATE_CHANGED";
     field public static final int WIFI_AP_STATE_DISABLED = 11; // 0xb
     field public static final int WIFI_AP_STATE_DISABLING = 10; // 0xa
     field public static final int WIFI_AP_STATE_ENABLED = 13; // 0xd
@@ -712,16 +665,6 @@
   public static interface WifiManager.ActionListener {
     method public void onFailure(int);
     method public void onSuccess();
-    field public static final int FAILURE_BUSY = 2; // 0x2
-    field public static final int FAILURE_INTERNAL_ERROR = 0; // 0x0
-    field public static final int FAILURE_INVALID_ARGS = 3; // 0x3
-    field public static final int FAILURE_IN_PROGRESS = 1; // 0x1
-    field public static final int FAILURE_NOT_AUTHORIZED = 4; // 0x4
-  }
-
-  public static interface WifiManager.ActiveCountryCodeChangedCallback {
-    method public void onActiveCountryCodeChanged(@NonNull String);
-    method public void onCountryCodeInactive();
   }
 
   public abstract static class WifiManager.CoexCallback {
@@ -750,20 +693,6 @@
     method public void onWifiUsabilityStats(int, boolean, @NonNull android.net.wifi.WifiUsabilityStatsEntry);
   }
 
-  public static interface WifiManager.PnoScanResultsCallback {
-    method public void onRegisterFailed(int);
-    method public void onRegisterSuccess();
-    method public void onRemoved(int);
-    method public void onScanResultsAvailable(@NonNull java.util.List<android.net.wifi.ScanResult>);
-    field public static final int REGISTER_PNO_CALLBACK_ALREADY_REGISTERED = 1; // 0x1
-    field public static final int REGISTER_PNO_CALLBACK_PNO_NOT_SUPPORTED = 3; // 0x3
-    field public static final int REGISTER_PNO_CALLBACK_RESOURCE_BUSY = 2; // 0x2
-    field public static final int REGISTER_PNO_CALLBACK_UNKNOWN = 0; // 0x0
-    field public static final int REMOVE_PNO_CALLBACK_RESULTS_DELIVERED = 1; // 0x1
-    field public static final int REMOVE_PNO_CALLBACK_UNKNOWN = 0; // 0x0
-    field public static final int REMOVE_PNO_CALLBACK_UNREGISTERED = 2; // 0x2
-  }
-
   public static interface WifiManager.ScoreUpdateObserver {
     method public default void blocklistCurrentBssid(int);
     method public void notifyScoreUpdate(int, int);
@@ -772,12 +701,6 @@
     method public void triggerUpdateOfWifiUsabilityStats(int);
   }
 
-  public static class WifiManager.ScreenOnScanSchedule {
-    ctor public WifiManager.ScreenOnScanSchedule(@NonNull java.time.Duration, int);
-    method @NonNull public java.time.Duration getScanInterval();
-    method public int getScanType();
-  }
-
   public static interface WifiManager.SoftApCallback {
     method public default void onBlockedClientConnecting(@NonNull android.net.wifi.WifiClient, int);
     method public default void onCapabilityChanged(@NonNull android.net.wifi.SoftApCapability);
@@ -837,8 +760,7 @@
     method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public java.util.List<java.lang.Integer> getAvailableChannels(int);
     method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public boolean getScanResults();
     method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public java.util.List<android.net.wifi.ScanResult> getSingleScanResults();
-    method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public boolean isScanning();
-    method @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.NETWORK_STACK}) public void registerScanListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiScanner.ScanListener);
+    method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void registerScanListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiScanner.ScanListener);
     method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setScanningEnabled(boolean);
     method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startBackgroundScan(android.net.wifi.WifiScanner.ScanSettings, android.net.wifi.WifiScanner.ScanListener);
     method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startBackgroundScan(android.net.wifi.WifiScanner.ScanSettings, android.net.wifi.WifiScanner.ScanListener, android.os.WorkSource);
@@ -983,7 +905,7 @@
     method public int getCellularDataNetworkType();
     method public int getCellularSignalStrengthDb();
     method public int getCellularSignalStrengthDbm();
-    method @IntRange(from=0xffffffff, to=255) public int getChannelUtilizationRatio();
+    method @IntRange(from=0, to=255) public int getChannelUtilizationRatio();
     method @NonNull public android.net.wifi.WifiUsabilityStatsEntry.ContentionTimeStats getContentionTimeStats(int);
     method public int getLinkSpeedMbps();
     method public int getProbeElapsedTimeSinceLastUpdateMillis();
@@ -1025,14 +947,12 @@
     field public static final int WIFI_BANDWIDTH_10_MHZ = 6; // 0x6
     field public static final int WIFI_BANDWIDTH_160_MHZ = 3; // 0x3
     field public static final int WIFI_BANDWIDTH_20_MHZ = 0; // 0x0
-    field public static final int WIFI_BANDWIDTH_320_MHZ = 7; // 0x7
     field public static final int WIFI_BANDWIDTH_40_MHZ = 1; // 0x1
     field public static final int WIFI_BANDWIDTH_5_MHZ = 5; // 0x5
     field public static final int WIFI_BANDWIDTH_80P80_MHZ = 4; // 0x4
     field public static final int WIFI_BANDWIDTH_80_MHZ = 2; // 0x2
     field public static final int WIFI_BANDWIDTH_INVALID = -1; // 0xffffffff
     field public static final int WIFI_PREAMBLE_CCK = 1; // 0x1
-    field public static final int WIFI_PREAMBLE_EHT = 6; // 0x6
     field public static final int WIFI_PREAMBLE_HE = 5; // 0x5
     field public static final int WIFI_PREAMBLE_HT = 2; // 0x2
     field public static final int WIFI_PREAMBLE_INVALID = -1; // 0xffffffff
@@ -1097,33 +1017,12 @@
 
 package android.net.wifi.aware {
 
-  public final class AwareParams implements android.os.Parcelable {
-    ctor public AwareParams();
-    method public int describeContents();
-    method public int getDiscoveryBeaconIntervalMillis();
-    method public int getDiscoveryWindowWakeInterval24Ghz();
-    method public int getDiscoveryWindowWakeInterval5Ghz();
-    method public int getMacRandomizationIntervalSeconds();
-    method public int getNumSpatialStreamsInDiscovery();
-    method public boolean isDwEarlyTerminationEnabled();
-    method public void setDiscoveryBeaconIntervalMillis(@IntRange(from=1) int);
-    method public void setDiscoveryWindowWakeInterval24Ghz(@IntRange(from=1, to=5) int);
-    method public void setDiscoveryWindowWakeInterval5Ghz(@IntRange(from=0, to=5) int);
-    method public void setDwEarlyTerminationEnabled(boolean);
-    method public void setMacRandomizationIntervalSeconds(@IntRange(from=1, to=1800) int);
-    method public void setNumSpatialStreamsInDiscovery(@IntRange(from=1) int);
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.AwareParams> CREATOR;
-    field public static final int UNSET_PARAMETER = -1; // 0xffffffff
-  }
-
   public class DiscoverySession implements java.lang.AutoCloseable {
     method @Deprecated public android.net.NetworkSpecifier createNetworkSpecifierPmk(@NonNull android.net.wifi.aware.PeerHandle, @NonNull byte[]);
   }
 
   public class WifiAwareManager {
-    method @RequiresPermission(allOf={android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void enableInstantCommunicationMode(boolean);
-    method @RequiresPermission(allOf={android.Manifest.permission.OVERRIDE_WIFI_CONFIG, android.Manifest.permission.CHANGE_WIFI_STATE}) public void setAwareParams(@Nullable android.net.wifi.aware.AwareParams);
+    method public void enableInstantCommunicationMode(boolean);
   }
 
   public class WifiAwareSession implements java.lang.AutoCloseable {
@@ -1203,11 +1102,13 @@
   public class WifiP2pManager {
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void deletePersistentGroup(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, int, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void factoryReset(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(allOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.READ_WIFI_CREDENTIAL, android.Manifest.permission.NEARBY_WIFI_DEVICES, android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional=true) public void requestPersistentGroupInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.PersistentGroupInfoListener);
+    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.READ_WIFI_CREDENTIAL}) public void requestPersistentGroupInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.PersistentGroupInfoListener);
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void setDeviceName(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull String, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY) public void setMiracastMode(int);
     method @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY) public void setWfdInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pWfdInfo, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
     method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void setWifiP2pChannels(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, int, int, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
+    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void startListening(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
+    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void stopListening(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
     field public static final String ACTION_WIFI_P2P_PERSISTENT_GROUPS_CHANGED = "android.net.wifi.p2p.action.WIFI_P2P_PERSISTENT_GROUPS_CHANGED";
     field public static final int MIRACAST_DISABLED = 0; // 0x0
     field public static final int MIRACAST_SINK = 2; // 0x2
@@ -1226,6 +1127,10 @@
     method @NonNull public java.util.List<android.net.wifi.rtt.ResponderConfig> getRttResponders();
   }
 
+  public static final class RangingRequest.Builder {
+    method public android.net.wifi.rtt.RangingRequest.Builder addResponder(@NonNull android.net.wifi.rtt.ResponderConfig);
+  }
+
   public final class RangingResult implements android.os.Parcelable {
     method @NonNull public byte[] getLci();
     method @NonNull public byte[] getLcr();
@@ -1234,15 +1139,17 @@
   public final class ResponderConfig implements android.os.Parcelable {
     ctor public ResponderConfig(@NonNull android.net.MacAddress, int, boolean, int, int, int, int, int);
     ctor public ResponderConfig(@NonNull android.net.wifi.aware.PeerHandle, int, boolean, int, int, int, int, int);
-    method @NonNull public static android.net.wifi.rtt.ResponderConfig fromWifiAwarePeerHandleWithDefaults(@NonNull android.net.wifi.aware.PeerHandle);
-    method @NonNull public static android.net.wifi.rtt.ResponderConfig fromWifiAwarePeerMacAddressWithDefaults(@NonNull android.net.MacAddress);
+    method public int describeContents();
+    method public static android.net.wifi.rtt.ResponderConfig fromScanResult(android.net.wifi.ScanResult);
+    method public static android.net.wifi.rtt.ResponderConfig fromWifiAwarePeerHandleWithDefaults(android.net.wifi.aware.PeerHandle);
+    method public static android.net.wifi.rtt.ResponderConfig fromWifiAwarePeerMacAddressWithDefaults(android.net.MacAddress);
+    method public void writeToParcel(android.os.Parcel, int);
     field public static final int CHANNEL_WIDTH_160MHZ = 3; // 0x3
     field public static final int CHANNEL_WIDTH_20MHZ = 0; // 0x0
-    field public static final int CHANNEL_WIDTH_320MHZ = 5; // 0x5
     field public static final int CHANNEL_WIDTH_40MHZ = 1; // 0x1
     field public static final int CHANNEL_WIDTH_80MHZ = 2; // 0x2
     field public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4; // 0x4
-    field public static final int PREAMBLE_EHT = 4; // 0x4
+    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.rtt.ResponderConfig> CREATOR;
     field public static final int PREAMBLE_HE = 3; // 0x3
     field public static final int PREAMBLE_HT = 1; // 0x1
     field public static final int PREAMBLE_LEGACY = 0; // 0x0
@@ -1256,8 +1163,8 @@
     field public final int centerFreq1;
     field public final int channelWidth;
     field public final int frequency;
-    field @Nullable public final android.net.MacAddress macAddress;
-    field @Nullable public final android.net.wifi.aware.PeerHandle peerHandle;
+    field public final android.net.MacAddress macAddress;
+    field public final android.net.wifi.aware.PeerHandle peerHandle;
     field public final int preamble;
     field public final int responderType;
     field public final boolean supports80211mc;
@@ -1269,7 +1176,7 @@
 
   public class WifiRttManager {
     method @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE}) public void cancelRanging(@Nullable android.os.WorkSource);
-    method @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.NEARBY_WIFI_DEVICES}, conditional=true) public void startRanging(@Nullable android.os.WorkSource, @NonNull android.net.wifi.rtt.RangingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.rtt.RangingResultCallback);
+    method @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_WIFI_STATE}) public void startRanging(@Nullable android.os.WorkSource, @NonNull android.net.wifi.rtt.RangingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.rtt.RangingResultCallback);
   }
 
 }
diff --git a/framework/jarjar-rules.txt b/framework/jarjar-rules.txt
index 9d84c09..2331c2f 100644
--- a/framework/jarjar-rules.txt
+++ b/framework/jarjar-rules.txt
@@ -72,6 +72,8 @@
 rule android.net.util.SharedLog* com.android.wifi.x.@0
 rule android.net.util.NetUtils* com.android.wifi.x.@0
 
+rule androidx.annotation.** com.android.wifi.x.@0
+
 # We don't jar-jar the entire package because, we still use some classes (like
 # AsyncChannel in com.android.internal.util) from these packages which are not
 # inside our jar (currently in framework.jar, but will be in wifisdk.jar in the future).
@@ -108,6 +110,7 @@
 rule fi.iki.elonen.** com.android.wifi.x.@0
 
 ## used by both framework-wifi and service-wifi ##
+rule android.os.HandlerExecutor* com.android.wifi.x.@0
 rule android.telephony.Annotation* com.android.wifi.x.@0
 rule com.android.internal.util.AsyncChannel* com.android.wifi.x.@0
 rule com.android.internal.util.AsyncService* com.android.wifi.x.@0
diff --git a/framework/java/android/net/wifi/IBooleanListener.aidl b/framework/java/android/net/wifi/IBooleanListener.aidl
deleted file mode 100644
index c1f83fc..0000000
--- a/framework/java/android/net/wifi/IBooleanListener.aidl
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi;
-
-/**
- * Interface for IBooleanListener.
- *
- * @hide
- */
-oneway interface IBooleanListener
-{
-    void onResult(boolean value);
-}
\ No newline at end of file
diff --git a/framework/java/android/net/wifi/IInterfaceCreationInfoCallback.aidl b/framework/java/android/net/wifi/IInterfaceCreationInfoCallback.aidl
deleted file mode 100644
index b084c12..0000000
--- a/framework/java/android/net/wifi/IInterfaceCreationInfoCallback.aidl
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi;
-
-import android.os.WorkSource;
-
-/**
- * Interface for WiFi interface creation information results.
- *
- * @hide
- */
-oneway interface IInterfaceCreationInfoCallback
-{
-   void onResults(in boolean canCreate, in int[] interfacesToDelete, in String[] packagesForInterfaces);
-}
diff --git a/framework/java/android/net/wifi/ILastCallerListener.aidl b/framework/java/android/net/wifi/ILastCallerListener.aidl
deleted file mode 100644
index aed4d6e..0000000
--- a/framework/java/android/net/wifi/ILastCallerListener.aidl
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi;
-
-/**
- * Interface for LastCallerListener.
- *
- * @hide
- */
-oneway interface ILastCallerListener
-{
-    void onResult(String packageName, boolean enabled);
-}
\ No newline at end of file
diff --git a/framework/java/android/net/wifi/IOnWifiDriverCountryCodeChangedListener.aidl b/framework/java/android/net/wifi/IOnWifiDriverCountryCodeChangedListener.aidl
deleted file mode 100644
index 6b9ae56..0000000
--- a/framework/java/android/net/wifi/IOnWifiDriverCountryCodeChangedListener.aidl
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2021 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 android.net.wifi;
-
-/**
- * Interface for Wi-Fi driver country code changed listener.
- * @hide
- */
-oneway interface IOnWifiDriverCountryCodeChangedListener
-{
-    void onDriverCountryCodeChanged(String countryCode);
-}
diff --git a/framework/java/android/net/wifi/IPnoScanResultsCallback.aidl b/framework/java/android/net/wifi/IPnoScanResultsCallback.aidl
deleted file mode 100644
index 900fb03..0000000
--- a/framework/java/android/net/wifi/IPnoScanResultsCallback.aidl
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi;
-
-import android.net.wifi.ScanResult;
-
-/**
- * Interface for Wi-Fi PNO scan result available callback.
- *
- * @hide
- */
-oneway interface IPnoScanResultsCallback
-{
-    void onScanResultsAvailable(in List<ScanResult> scanResults);
-
-    void onRegisterSuccess();
-
-    void onRegisterFailed(int reason);
-
-    void onRemoved(int reason);
-}
diff --git a/framework/java/android/net/wifi/IWifiManager.aidl b/framework/java/android/net/wifi/IWifiManager.aidl
index 71cbe25..b5048db 100644
--- a/framework/java/android/net/wifi/IWifiManager.aidl
+++ b/framework/java/android/net/wifi/IWifiManager.aidl
@@ -21,21 +21,15 @@
 import android.net.wifi.hotspot2.IProvisioningCallback;
 
 import android.net.DhcpInfo;
-import android.net.DhcpOption;
 import android.net.Network;
 import android.net.wifi.CoexUnsafeChannel;
 import android.net.wifi.IActionListener;
-import android.net.wifi.IBooleanListener;
 import android.net.wifi.ICoexCallback;
 import android.net.wifi.IDppCallback;
-import android.net.wifi.IInterfaceCreationInfoCallback;
-import android.net.wifi.ILastCallerListener;
 import android.net.wifi.ILocalOnlyHotspotCallback;
 import android.net.wifi.INetworkRequestMatchCallback;
 import android.net.wifi.IOnWifiActivityEnergyInfoListener;
-import android.net.wifi.IOnWifiDriverCountryCodeChangedListener;
 import android.net.wifi.IOnWifiUsabilityStatsListener;
-import android.net.wifi.IPnoScanResultsCallback;
 import android.net.wifi.IScanResultsCallback;
 import android.net.wifi.ISoftApCallback;
 import android.net.wifi.ISubsystemRestartCallback;
@@ -51,9 +45,7 @@
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiNetworkSuggestion;
-import android.net.wifi.WifiSsid;
 
-import android.os.Bundle;
 import android.os.Messenger;
 import android.os.ResultReceiver;
 import android.os.WorkSource;
@@ -71,27 +63,17 @@
 
     oneway void getWifiActivityEnergyInfoAsync(in IOnWifiActivityEnergyInfoListener listener);
 
-    void setScreenOnScanSchedule(in int[] scanScheduleSeconds, in int[] scanType);
-
-    void setOneShotScreenOnConnectivityScanDelayMillis(int delayMs);
-
     ParceledListSlice getConfiguredNetworks(String packageName, String featureId, boolean callerNetworksOnly);
 
-    ParceledListSlice getPrivilegedConfiguredNetworks(String packageName, String featureId, in Bundle extras);
-
-    WifiConfiguration getPrivilegedConnectedNetwork(String packageName, String featureId, in Bundle extras);
+    ParceledListSlice getPrivilegedConfiguredNetworks(String packageName, String featureId);
 
     Map getAllMatchingFqdnsForScanResults(in List<ScanResult> scanResult);
 
-    void setSsidsAllowlist(String packageName, in List<WifiSsid> ssids);
-
-    List getSsidsAllowlist(String packageName);
-
     Map getMatchingOsuProviders(in List<ScanResult> scanResult);
 
     Map getMatchingPasspointConfigsForOsuProviders(in List<OsuProvider> osuProviders);
 
-    int addOrUpdateNetwork(in WifiConfiguration config, String packageName, in Bundle extras);
+    int addOrUpdateNetwork(in WifiConfiguration config, String packageName);
 
     WifiManager.AddNetworkResult addOrUpdateNetworkPrivileged(in WifiConfiguration config, String packageName);
 
@@ -117,8 +99,6 @@
 
     void allowAutojoinGlobal(boolean choice);
 
-    void queryAutojoinGlobal(in IBooleanListener listener);
-
     void allowAutojoin(int netId, boolean choice);
 
     void allowAutojoinPasspoint(String fqdn, boolean enableAutoJoin);
@@ -143,14 +123,7 @@
 
     int getWifiEnabledState();
 
-    void registerDriverCountryCodeChangedListener(
-            in IOnWifiDriverCountryCodeChangedListener listener, String packageName,
-            String featureId);
-
-    void unregisterDriverCountryCodeChangedListener(
-            in IOnWifiDriverCountryCodeChangedListener listener);
-
-    String getCountryCode(in String packageName, in String featureId);
+    String getCountryCode();
 
     void setOverrideCountryCode(String country);
 
@@ -205,14 +178,10 @@
     boolean stopSoftAp();
 
     int startLocalOnlyHotspot(in ILocalOnlyHotspotCallback callback, String packageName,
-                              String featureId, in SoftApConfiguration customConfig, in Bundle extras);
+                              String featureId, in SoftApConfiguration customConfig);
 
     void stopLocalOnlyHotspot();
 
-    void registerLocalOnlyHotspotSoftApCallback(in ISoftApCallback callback, in Bundle extras);
-
-    void unregisterLocalOnlyHotspotSoftApCallback(in ISoftApCallback callback, in Bundle extras);
-
     void startWatchLocalOnlyHotspot(in ILocalOnlyHotspotCallback callback);
 
     void stopWatchLocalOnlyHotspot();
@@ -283,7 +252,7 @@
     int addNetworkSuggestions(in List<WifiNetworkSuggestion> networkSuggestions, in String packageName,
         in String featureId);
 
-    int removeNetworkSuggestions(in List<WifiNetworkSuggestion> networkSuggestions, in String packageName, int action);
+    int removeNetworkSuggestions(in List<WifiNetworkSuggestion> networkSuggestions, in String packageName);
 
     List<WifiNetworkSuggestion> getNetworkSuggestions(in String packageName);
 
@@ -304,9 +273,9 @@
 
     void updateWifiUsabilityScore(int seqNum, int score, int predictionHorizonSec);
 
-    oneway void connect(in WifiConfiguration config, int netId, in IActionListener listener, in String packageName);
+    oneway void connect(in WifiConfiguration config, int netId, in IActionListener listener);
 
-    oneway void save(in WifiConfiguration config, in IActionListener listener, in String packageName);
+    oneway void save(in WifiConfiguration config, in IActionListener listener);
 
     oneway void forget(int netId, in IActionListener listener);
 
@@ -326,12 +295,6 @@
 
     void clearWifiConnectedNetworkScorer();
 
-    void setExternalPnoScanRequest(in IBinder binder, in IPnoScanResultsCallback callback, in List<WifiSsid> ssids, in int[] frequencies, String packageName, String featureId);
-
-    void clearExternalPnoScanRequest();
-
-    void getLastCallerInfoForApi(int api, in ILastCallerListener listener);
-
     /**
      * Return the Map of {@link WifiNetworkSuggestion} and the list of <ScanResult>
      */
@@ -374,28 +337,4 @@
     void flushPasspointAnqpCache(String packageName);
 
     List<WifiAvailableChannel> getUsableChannels(int band, int mode, int filter);
-
-    boolean isWifiPasspointEnabled();
-
-    void setWifiPasspointEnabled(boolean enabled);
-
-    int getStaConcurrencyForMultiInternetMode();
-
-    boolean setStaConcurrencyForMultiInternetMode(int mode);
-
-    void notifyMinimumRequiredWifiSecurityLevelChanged(int level);
-
-    void notifyWifiSsidPolicyChanged(int policyType, in List<WifiSsid> ssids);
-
-    String[] getOemPrivilegedWifiAdminPackages();
-
-    void replyToP2pInvitationReceivedDialog(int dialogId, boolean accepted, String optionalPin);
-
-    void replyToSimpleDialog(int dialogId, int reply);
-
-    void addCustomDhcpOptions(in WifiSsid ssid, in byte[] oui, in List<DhcpOption> options);
-
-    void removeCustomDhcpOptions(in WifiSsid ssid, in byte[] oui);
-
-    void reportCreateInterfaceImpact(String packageName, int interfaceType, boolean requireNewInterface, in IInterfaceCreationInfoCallback callback);
 }
diff --git a/framework/java/android/net/wifi/IWifiScanner.aidl b/framework/java/android/net/wifi/IWifiScanner.aidl
index e1919b7..485f5ce 100644
--- a/framework/java/android/net/wifi/IWifiScanner.aidl
+++ b/framework/java/android/net/wifi/IWifiScanner.aidl
@@ -27,6 +27,4 @@
     Messenger getMessenger();
 
     Bundle getAvailableChannels(int band, String packageName, String featureId);
-
-    boolean isScanning();
 }
diff --git a/framework/java/android/net/wifi/MloLink.java b/framework/java/android/net/wifi/MloLink.java
deleted file mode 100644
index def26a4..0000000
--- a/framework/java/android/net/wifi/MloLink.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi;
-
-import static android.net.wifi.WifiScanner.WIFI_BAND_24_GHZ;
-import static android.net.wifi.WifiScanner.WIFI_BAND_5_GHZ;
-import static android.net.wifi.WifiScanner.WIFI_BAND_6_GHZ;
-
-import android.annotation.IntDef;
-import android.annotation.IntRange;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.net.MacAddress;
-import android.net.NetworkCapabilities;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.Objects;
-
-/**
- * Data structure class representing a Wi-Fi Multi-Link Operation (MLO) link
- * This is only used by 802.11be capable devices
- */
-public final class MloLink implements Parcelable {
-
-    /**
-     * Invalid link id. Used in {link #getLinkId()}
-     */
-    public static final int INVALID_MLO_LINK_ID = -1;
-
-    /**
-     * Lower limit for MLO link id
-     * As described in IEEE 802.11be Specification, section 9.4.2.295b.2.
-     *
-     * @hide
-     */
-    public static final int MIN_MLO_LINK_ID = 0;
-
-    /**
-     * Upper limit for MLO link id
-     * As described in IEEE 802.11be Specification, section 9.4.2.295b.2.
-     *
-     * @hide
-     */
-    public static final int MAX_MLO_LINK_ID = 15;
-
-    /**
-     * MLO link state: Invalid link state. Used in {link #getState()}
-     */
-    public static final int MLO_LINK_STATE_INVALID = 0;
-    /**
-     * MLO link state: Link is not associated with the access point. Used in {link #getState()}
-     */
-    public static final int MLO_LINK_STATE_UNASSOCIATED = 1;
-    /**
-     * MLO link state: Link is associated to the access point but not mapped to any traffic stream.
-     * Used in {link #getState()}
-     */
-    public static final int MLO_LINK_STATE_IDLE = 2;
-    /**
-     * MLO link state: Link is associated to the access point and mapped to at least one traffic
-     * stream. {link #getState()}
-     * Note that an MLO link could be in that state but in power save mode.
-     */
-    public static final int MLO_LINK_STATE_ACTIVE = 3;
-
-    /**
-     * @hide
-     */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"MLO_LINK_STATE_"}, value = {
-            MLO_LINK_STATE_INVALID,
-            MLO_LINK_STATE_UNASSOCIATED,
-            MLO_LINK_STATE_IDLE,
-            MLO_LINK_STATE_ACTIVE})
-    public @interface MloLinkState {};
-
-    private int mLinkId;
-    private MacAddress mApMacAddress;
-    private MacAddress mStaMacAddress;
-    private @MloLinkState int mState;
-    private @WifiAnnotations.WifiBandBasic int mBand;
-    private int mChannel;
-
-    /**
-     * Constructor for a MloLInk.
-     */
-    public MloLink() {
-        mBand = WifiScanner.WIFI_BAND_UNSPECIFIED;
-        mChannel = 0;
-        mState = MLO_LINK_STATE_UNASSOCIATED;
-        mApMacAddress = null;
-        mStaMacAddress = null;
-        mLinkId = INVALID_MLO_LINK_ID;
-    }
-
-    /**
-     * Copy Constructor
-     *
-     * @hide
-     */
-    public MloLink(MloLink source, long redactions) {
-        mBand = source.mBand;
-        mChannel = source.mChannel;
-        mLinkId = source.mLinkId;
-        mState = source.mState;
-
-        mStaMacAddress = ((redactions & NetworkCapabilities.REDACT_FOR_LOCAL_MAC_ADDRESS) != 0)
-                || source.mStaMacAddress == null
-                ? null :  MacAddress.fromString(source.mStaMacAddress.toString());
-
-        mApMacAddress = ((redactions & NetworkCapabilities.REDACT_FOR_ACCESS_FINE_LOCATION) != 0)
-                || source.mApMacAddress == null
-                ? null : MacAddress.fromString(source.mApMacAddress.toString());
-    }
-
-    /** Returns the Wi-Fi band of this link as one of:
-     *      {@link WifiScanner#WIFI_BAND_UNSPECIFIED},
-     *      {@link WifiScanner#WIFI_BAND_24_GHZ},
-     *      {@link WifiScanner#WIFI_BAND_5_GHZ},
-     *      {@link WifiScanner#WIFI_BAND_6_GHZ}
-     */
-    public @WifiAnnotations.WifiBandBasic int getBand() {
-        return mBand;
-    }
-
-    /**
-     * Returns the channel number of this link.
-     * A valid value is based on the 802.11 specification in sections 19.3.15 and 27.3.23
-     */
-    @IntRange(from = 1)
-    public int getChannel() {
-        return mChannel;
-    }
-
-    /**
-     * Returns the link id of this link.
-     * Valid values are 0-15, as described in IEEE 802.11be Specification, section 9.4.2.295b.2.
-     *
-     * @return {@link #INVALID_MLO_LINK_ID} or a valid value (0-15).
-     */
-    @IntRange(from = INVALID_MLO_LINK_ID, to = MAX_MLO_LINK_ID)
-    public int getLinkId() {
-        return mLinkId;
-    }
-
-    /** Returns the state of this link as one of:
-     *     {@link #MLO_LINK_STATE_INVALID}
-     *     {@link #MLO_LINK_STATE_UNASSOCIATED}
-     *     {@link #MLO_LINK_STATE_IDLE}
-     *     {@link #MLO_LINK_STATE_ACTIVE}
-     */
-    public @MloLinkState int getState() {
-        return mState;
-    }
-
-    /**
-     * Returns the AP MAC address of this link.
-     *
-     * @return AP MAC address for this link or null when the caller has insufficient
-     * permissions to access the access point MAC Address.
-     */
-    public @Nullable MacAddress getApMacAddress() {
-        return mApMacAddress;
-    }
-
-    /**
-     * Returns the STA MAC address of this link.
-     *
-     * @return STA MAC address assigned for this link, or null in the following cases:
-     * <ul>
-     *     <li> The caller has insufficient permissions to access the STA MAC Address </li>
-     *     <li> Link is not associated, hence no MAC address is assigned to it by STA </li>
-     * </ul>
-     */
-    public @Nullable MacAddress getStaMacAddress() {
-        return mStaMacAddress;
-    }
-
-    /**
-     * Sets the channel number of this link.
-     *
-     * @hide
-     */
-    public void setChannel(int channel) {
-        mChannel = channel;
-    }
-
-    /**
-     * Sets the band for this link
-     *
-     * @hide
-     */
-    public void setBand(@WifiAnnotations.WifiBandBasic int band) {
-        mBand = band;
-    }
-
-    /**
-     * Sets the linkId of this link
-     *
-     * @hide
-     */
-    public void setLinkId(int linkId) {
-        mLinkId = linkId;
-    }
-
-    /**
-     * Sets the state of this link
-     *
-     * @hide
-     */
-    public void setState(@MloLinkState int state) {
-        mState = state;
-    }
-
-    /**
-     * set the AP MAC Address for this link
-     *
-     * @hide
-     */
-    public void setApMacAddress(MacAddress address) {
-        mApMacAddress = address;
-    }
-
-    /**
-     * set the STA MAC Address for this link
-     *
-     * @hide
-     */
-    public void setStaMacAddress(MacAddress address) {
-        mStaMacAddress = address;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        MloLink that = (MloLink) o;
-        return mBand == that.mBand
-                && mChannel == that.mChannel
-                && mLinkId == that.mLinkId
-                && Objects.equals(mApMacAddress, that.mApMacAddress)
-                && Objects.equals(mStaMacAddress, that.mStaMacAddress)
-                && mState == that.mState;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mBand, mChannel, mLinkId, mApMacAddress, mStaMacAddress, mState);
-    }
-
-    private String getStateString(@MloLinkState int state) {
-        switch(state) {
-            case MLO_LINK_STATE_INVALID:
-                return "MLO_LINK_STATE_INVALID";
-            case MLO_LINK_STATE_UNASSOCIATED:
-                return "MLO_LINK_STATE_UNASSOCIATED";
-            case MLO_LINK_STATE_IDLE:
-                return "MLO_LINK_STATE_IDLE";
-            case MLO_LINK_STATE_ACTIVE:
-                return "MLO_LINK_STATE_ACTIVE";
-            default:
-                return "Unknown MLO link state";
-        }
-    }
-
-    /**
-     * @hide
-     */
-    public static boolean isValidState(@MloLinkState int state) {
-        switch(state) {
-            case MLO_LINK_STATE_INVALID:
-            case MLO_LINK_STATE_UNASSOCIATED:
-            case MLO_LINK_STATE_IDLE:
-            case MLO_LINK_STATE_ACTIVE:
-                return true;
-        }
-        return false;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder("MloLink{");
-        if (mBand == WIFI_BAND_24_GHZ) {
-            sb.append("2.4GHz");
-        } else if (mBand == WIFI_BAND_5_GHZ) {
-            sb.append("5GHz");
-        } else if (mBand == WIFI_BAND_6_GHZ) {
-            sb.append("6GHz");
-        } else {
-            sb.append("UNKNOWN BAND");
-        }
-        sb.append(", channel: ").append(mChannel);
-        sb.append(", id: ").append(mLinkId);
-        sb.append(", state: ").append(getStateString(mState));
-        if (mApMacAddress != null) {
-            sb.append(", AP MAC Address: ").append(mApMacAddress.toString());
-        }
-        if (mStaMacAddress != null) {
-            sb.append(", STA MAC Address: ").append(mStaMacAddress.toString());
-        }
-        sb.append('}');
-        return sb.toString();
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeInt(mBand);
-        dest.writeInt(mChannel);
-        dest.writeInt(mLinkId);
-        dest.writeInt(mState);
-        dest.writeParcelable(mApMacAddress, flags);
-        dest.writeParcelable(mStaMacAddress, flags);
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @NonNull Creator<MloLink> CREATOR =
-            new Creator<MloLink>() {
-                public MloLink createFromParcel(Parcel in) {
-                    MloLink link = new MloLink();
-                    link.mBand = in.readInt();
-                    link.mChannel = in.readInt();
-                    link.mLinkId = in.readInt();
-                    link.mState = in.readInt();
-                    link.mApMacAddress = in.readParcelable(MacAddress.class.getClassLoader());
-                    link.mStaMacAddress = in.readParcelable(MacAddress.class.getClassLoader());
-                    return link;
-                }
-
-                public MloLink[] newArray(int size) {
-                    return new MloLink[size];
-                }
-            };
-}
diff --git a/framework/java/android/net/wifi/ScanResult.java b/framework/java/android/net/wifi/ScanResult.java
index f50eab4..fb831d9 100644
--- a/framework/java/android/net/wifi/ScanResult.java
+++ b/framework/java/android/net/wifi/ScanResult.java
@@ -17,15 +17,12 @@
 package android.net.wifi;
 
 import android.annotation.IntDef;
-import android.annotation.IntRange;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
 import android.compat.annotation.UnsupportedAppUsage;
-import android.net.MacAddress;
 import android.net.wifi.WifiAnnotations.ChannelWidth;
 import android.net.wifi.WifiAnnotations.WifiStandard;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -50,128 +47,21 @@
 public final class ScanResult implements Parcelable {
     /**
      * The network name.
-     *
-     * @deprecated Use {@link #getWifiSsid()} instead.
      */
-    @Deprecated
     public String SSID;
 
     /**
      * Ascii encoded SSID. This will replace SSID when we deprecate it. @hide
-     *
-     * @deprecated Use {@link #getWifiSsid()} instead.
      */
-    @Deprecated
-    // TODO(b/231433398): add maxTargetSdk = Build.VERSION_CODES.S
-    @UnsupportedAppUsage(publicAlternatives = "{@link #getWifiSsid()}")
+    @UnsupportedAppUsage
     public WifiSsid wifiSsid;
 
     /**
-     * Set the SSID of the access point.
-     * @hide
-     */
-    @SystemApi
-    public void setWifiSsid(@NonNull WifiSsid ssid) {
-        wifiSsid = ssid;
-        CharSequence utf8Text = wifiSsid.getUtf8Text();
-        SSID = utf8Text != null ? utf8Text.toString() : WifiManager.UNKNOWN_SSID;
-    }
-
-    /**
-     * The SSID of the access point.
-     */
-    @Nullable
-    public WifiSsid getWifiSsid() {
-        return wifiSsid;
-    }
-
-    /**
      * The address of the access point.
      */
     public String BSSID;
 
     /**
-     * The Multi-Link Device (MLD) address of the access point.
-     * Only applicable for Wi-Fi 7 access points, null otherwise.
-     */
-    private MacAddress mApMldMacAddress;
-
-    /**
-     * Return the access point Multi-Link Device (MLD) MAC Address for Wi-Fi 7 access points.
-     * i.e. {@link #getWifiStandard()} returns {@link #WIFI_STANDARD_11BE}.
-     *
-     * @return MLD MAC Address for access point if exists (Wi-Fi 7 access points), null otherwise.
-     */
-    @Nullable
-    public MacAddress getApMldMacAddress() {
-        return mApMldMacAddress;
-    }
-
-    /**
-     * Set the access point Multi-Link Device (MLD) MAC Address.
-     * @hide
-     */
-    public void setApMldMacAddress(@Nullable MacAddress address) {
-        mApMldMacAddress = address;
-    }
-
-    /**
-     * The Multi-Link Operation (MLO) link id for the access point.
-     * Only applicable for Wi-Fi 7 access points.
-     */
-    private int mApMloLinkId = MloLink.INVALID_MLO_LINK_ID;
-
-    /**
-     * Return the access point Multi-Link Operation (MLO) link-id for Wi-Fi 7 access points.
-     * i.e. when {@link #getWifiStandard()} returns {@link #WIFI_STANDARD_11BE}, otherwise return
-     * {@link MloLink#INVALID_MLO_LINK_ID}.
-     *
-     * Valid values are 0-15 as described in IEEE 802.11be Specification, section 9.4.2.295b.2.
-     *
-     * @return {@link MloLink#INVALID_MLO_LINK_ID} or a valid value (0-15).
-     */
-    @IntRange(from = MloLink.INVALID_MLO_LINK_ID, to = MloLink.MAX_MLO_LINK_ID)
-    public int getApMloLinkId() {
-        return mApMloLinkId;
-    }
-
-    /**
-     * Sets the access point Multi-Link Operation (MLO) link-id
-     * @hide
-     */
-    public void setApMloLinkId(int linkId) {
-        mApMloLinkId = linkId;
-    }
-
-    /**
-     * The Multi-Link Operation (MLO) affiliated Links.
-     * Only applicable for Wi-Fi 7 access points.
-     * Note: the list of links includes the access point for this ScanResult.
-     */
-    private List<MloLink> mAffiliatedMloLinks = Collections.emptyList();
-
-    /**
-     * Return the Multi-Link Operation (MLO) affiliated Links for Wi-Fi 7 access points.
-     * i.e. when {@link #getWifiStandard()} returns {@link #WIFI_STANDARD_11BE}.
-     *
-     * @return List of affiliated MLO links, or an empty list if access point is not Wi-Fi 7
-     */
-    @NonNull
-    public List<MloLink> getAffiliatedMloLinks() {
-        return new ArrayList<MloLink>(mAffiliatedMloLinks);
-    }
-
-    /**
-     * Set the Multi-Link Operation (MLO) affiliated Links.
-     * Only applicable for Wi-Fi 7 access points.
-     *
-     * @hide
-     */
-    public void setAffiliatedMloLinks(@NonNull List<MloLink> links) {
-        mAffiliatedMloLinks = new ArrayList<MloLink>(links);
-    }
-
-    /**
      * The HESSID from the beacon.
      * @hide
      */
@@ -340,14 +230,9 @@
     public static final int KEY_MGMT_FILS_SHA384 = 16;
     /**
      * @hide
-     * Security key management scheme: DPP.
-     */
-    public static final int KEY_MGMT_DPP = 17;
-    /**
-     * @hide
      * Security key management scheme: any unknown AKM.
      */
-    public static final int KEY_MGMT_UNKNOWN = 18;
+    public static final int KEY_MGMT_UNKNOWN = 17;
     /**
      * @hide
      * No cipher suite.
@@ -416,10 +301,9 @@
      * an absolute signal level which can be displayed to a user.
      */
     public int level;
-
     /**
-     * The center frequency of the primary 20 MHz frequency (in MHz) of the channel over which the
-     * client is communicating with the access point.
+     * The primary 20 MHz frequency (in MHz) of the channel over which the client is communicating
+     * with the access point.
      */
     public int frequency;
 
@@ -443,32 +327,6 @@
     * AP Channel bandwidth is 160 MHZ, but 80MHZ + 80MHZ
     */
     public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4;
-   /**
-    * AP Channel bandwidth is 320 MHZ
-    */
-    public static final int CHANNEL_WIDTH_320MHZ = 5;
-
-    /**
-     * Preamble type: Legacy.
-     */
-    public static final int PREAMBLE_LEGACY = 0;
-    /**
-     * Preamble type: HT.
-     */
-    public static final int PREAMBLE_HT = 1;
-    /**
-     * Preamble type: VHT.
-     */
-    public static final int PREAMBLE_VHT = 2;
-    /**
-     * Preamble type: HE.
-     */
-    public static final int PREAMBLE_HE = 3;
-
-    /**
-     * Preamble type: EHT.
-     */
-    public static final int PREAMBLE_EHT = 4;
 
     /**
      * Wi-Fi unknown standard
@@ -501,11 +359,6 @@
     public static final int WIFI_STANDARD_11AD = 7;
 
     /**
-     * Wi-Fi 802.11be
-     */
-    public static final int WIFI_STANDARD_11BE = 8;
-
-    /**
      * Wi-Fi 2.4 GHz band.
      */
     public static final int WIFI_BAND_24_GHZ = WifiScanner.WIFI_BAND_24_GHZ;
@@ -540,7 +393,7 @@
     /**
      * AP wifi standard.
      */
-    private @WifiStandard int mWifiStandard = WIFI_STANDARD_UNKNOWN;
+    private @WifiStandard int mWifiStandard;
 
     /**
      * return the AP wifi standard.
@@ -572,8 +425,6 @@
                 return "11ax";
             case WIFI_STANDARD_11AD:
                 return "11ad";
-            case WIFI_STANDARD_11BE:
-                return "11be";
             case WIFI_STANDARD_UNKNOWN:
                 return "unknown";
         }
@@ -582,14 +433,14 @@
 
     /**
      * AP Channel bandwidth; one of {@link #CHANNEL_WIDTH_20MHZ}, {@link #CHANNEL_WIDTH_40MHZ},
-     * {@link #CHANNEL_WIDTH_80MHZ}, {@link #CHANNEL_WIDTH_160MHZ}, {@link #CHANNEL_WIDTH_320MHZ},
-     * or {@link #CHANNEL_WIDTH_80MHZ_PLUS_MHZ}, or {@link #CHANNEL_WIDTH_320MHZ}
+     * {@link #CHANNEL_WIDTH_80MHZ}, {@link #CHANNEL_WIDTH_160MHZ}
+     * or {@link #CHANNEL_WIDTH_80MHZ_PLUS_MHZ}.
      */
     public @ChannelWidth int channelWidth;
 
     /**
      * Not used if the AP bandwidth is 20 MHz
-     * If the AP use 40, 80, 160 or 320MHz, this is the center frequency (in MHz)
+     * If the AP use 40, 80 or 160 MHz, this is the center frequency (in MHz)
      * if the AP use 80 + 80 MHz, this is the center frequency of the first segment (in MHz)
      */
     public int centerFreq0;
@@ -974,39 +825,6 @@
     }
 
     /**
-     * Utility function to convert Operating Class into a band
-     *
-     * Use 802.11 Specification Table E-4: Global Operating Classes for decoding
-     *
-     * @param opClass operating class
-     * @param channel number
-     *
-     * @return one of {@link WifiScanner.WIFI_BAND_24_GHZ}, {@link WifiScanner.WIFI_BAND_5_GHZ}, or
-     *         {@link WifiScanner.WIFI_BAND_6_GHZ} for a valid opClass, channel pair, otherwise
-     *         {@link WifiScanner.WIFI_BAND_UNSPECIFIED} is returned.
-     *
-     * @hide
-     */
-    public static int getBandFromOpClass(int opClass, int channel) {
-        if (opClass >= 81 && opClass <= 84) {
-            if (channel >= BAND_24_GHZ_FIRST_CH_NUM && channel <= BAND_24_GHZ_LAST_CH_NUM) {
-                return WifiScanner.WIFI_BAND_24_GHZ;
-            }
-        } else if (opClass >= 115 && opClass <= 130) {
-            if (channel >= BAND_5_GHZ_FIRST_CH_NUM && channel <= BAND_5_GHZ_LAST_CH_NUM) {
-                return WifiScanner.WIFI_BAND_5_GHZ;
-            }
-        } else if (opClass >= 131 && opClass <= 137) {
-            if (channel >= BAND_6_GHZ_FIRST_CH_NUM && channel <= BAND_6_GHZ_LAST_CH_NUM) {
-                return WifiScanner.WIFI_BAND_6_GHZ;
-            }
-        }
-
-        // If none of the above combinations, then return as invalid band
-        return WifiScanner.WIFI_BAND_UNSPECIFIED;
-    }
-
-    /**
      * Utility function to convert frequency in MHz to channel number.
      *
      * See also {@link #convertChannelToFrequencyMhzIfSupported(int, int)}.
@@ -1035,32 +853,6 @@
     }
 
     /**
-     * Returns the band for the ScanResult according to its frequency.
-     * @hide
-     */
-    @WifiBand public static int toBand(int frequency) {
-        if (ScanResult.is24GHz(frequency)) {
-            return ScanResult.WIFI_BAND_24_GHZ;
-        } else if (ScanResult.is5GHz(frequency)) {
-            return ScanResult.WIFI_BAND_5_GHZ;
-        } else if (ScanResult.is6GHz(frequency)) {
-            return ScanResult.WIFI_BAND_6_GHZ;
-        } else if (ScanResult.is60GHz(frequency)) {
-            return ScanResult.WIFI_BAND_60_GHZ;
-        }
-        return ScanResult.UNSPECIFIED;
-    }
-
-    /**
-     * Returns the band for the ScanResult according to its frequency.
-     * @hide
-     */
-    @SystemApi
-    @WifiBand public int getBand() {
-        return ScanResult.toBand(this.frequency);
-    }
-
-    /**
      * @hide
      */
     public boolean is24GHz() {
@@ -1149,8 +941,6 @@
         @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
         public static final int EID_VHT_OPERATION = 192;
         /** @hide */
-        public static final int EID_RNR = 201;
-        /** @hide */
         @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
         public static final int EID_VSA = 221;
         /** @hide */
@@ -1161,24 +951,6 @@
         public static final int EID_EXT_HE_CAPABILITIES = 35;
         /** @hide */
         public static final int EID_EXT_HE_OPERATION = 36;
-        /**
-         * EHT Operation IE extension id: see IEEE 802.11be Specification section 9.4.2.1
-         *
-         * @hide
-         */
-        public static final int EID_EXT_EHT_OPERATION = 106;
-        /**
-         * Multi-Link IE extension id: see IEEE 802.11be Specification section 9.4.2.1
-         *
-         * @hide
-         */
-        public static final int EID_EXT_MULTI_LINK = 107;
-        /**
-         * EHT Capabilities IE extension id: see IEEE 802.11be Specification section 9.4.2.1
-         *
-         * @hide
-         */
-        public static final int EID_EXT_EHT_CAPABILITIES = 108;
 
         /** @hide */
         @UnsupportedAppUsage
@@ -1194,14 +966,8 @@
         public InformationElement() {
         }
 
-        /**
-         * Constructs InformationElements from beacon.
-         *
-         * @param id element id
-         * @param idExt element id extension
-         * @param bytes the body of the information element, may contain multiple elements
-         */
-        public InformationElement(int id, int idExt, @NonNull byte[] bytes) {
+        /** @hide */
+        public InformationElement(int id, int idExt, byte[] bytes) {
             this.id = id;
             this.idExt = idExt;
             this.bytes = bytes.clone();
@@ -1303,49 +1069,16 @@
         return Collections.unmodifiableList(Arrays.asList(informationElements));
     }
 
-    /**
-     * Get all the security types supported by this ScanResult.
-     * @return array of {@code WifiInfo#SECURITY_TYPE_*}.
-     */
-    @NonNull
-    public @WifiInfo.SecurityType int[] getSecurityTypes() {
-        List<SecurityParams> params = ScanResultUtil.generateSecurityParamsListFromScanResult(this);
-        int[] securityTypes = new int[params.size()];
-        for (int i = 0; i < securityTypes.length; i++) {
-            securityTypes[i] = WifiInfo.convertWifiConfigurationSecurityType(
-                    params.get(i).getSecurityType());
-        }
-        return securityTypes;
-    }
-
     /** ANQP response elements.
      * @hide
      */
     public AnqpInformationElement[] anqpElements;
 
-    /**
-     * Returns whether a WifiSsid represents a "hidden" SSID of all zero values.
-     */
-    private boolean isHiddenSsid(@NonNull WifiSsid wifiSsid) {
-        for (byte b : wifiSsid.getBytes()) {
-            if (b != 0) {
-                return false;
-            }
-        }
-        return true;
-    }
-
     /** {@hide} */
     public ScanResult(WifiSsid wifiSsid, String BSSID, long hessid, int anqpDomainId,
             byte[] osuProviders, String caps, int level, int frequency, long tsf) {
         this.wifiSsid = wifiSsid;
-        if (wifiSsid != null && isHiddenSsid(wifiSsid)) {
-            // Retain the legacy behavior of setting SSID to "" if the SSID is all zero values.
-            this.SSID = "";
-        } else {
-            final CharSequence utf8Ssid = (wifiSsid != null) ? wifiSsid.getUtf8Text() : null;
-            this.SSID = (utf8Ssid != null) ? utf8Ssid.toString() : WifiManager.UNKNOWN_SSID;
-        }
+        this.SSID = (wifiSsid != null) ? wifiSsid.toString() : WifiManager.UNKNOWN_SSID;
         this.BSSID = BSSID;
         this.hessid = hessid;
         this.anqpDomainId = anqpDomainId;
@@ -1366,20 +1099,14 @@
         this.centerFreq1 = UNSPECIFIED;
         this.flags = 0;
         this.radioChainInfos = null;
-        this.mApMldMacAddress = null;
+        this.mWifiStandard = WIFI_STANDARD_UNKNOWN;
     }
 
     /** {@hide} */
     public ScanResult(WifiSsid wifiSsid, String BSSID, String caps, int level, int frequency,
             long tsf, int distCm, int distSdCm) {
         this.wifiSsid = wifiSsid;
-        if (wifiSsid != null && isHiddenSsid(wifiSsid)) {
-            // Retain the legacy behavior of setting SSID to "" if the SSID is all zero values.
-            this.SSID = "";
-        } else {
-            final CharSequence utf8Ssid = (wifiSsid != null) ? wifiSsid.getUtf8Text() : null;
-            this.SSID = (utf8Ssid != null) ? utf8Ssid.toString() : WifiManager.UNKNOWN_SSID;
-        }
+        this.SSID = (wifiSsid != null) ? wifiSsid.toString() : WifiManager.UNKNOWN_SSID;
         this.BSSID = BSSID;
         this.capabilities = caps;
         this.level = level;
@@ -1392,7 +1119,7 @@
         this.centerFreq1 = UNSPECIFIED;
         this.flags = 0;
         this.radioChainInfos = null;
-        this.mApMldMacAddress = null;
+        this.mWifiStandard = WIFI_STANDARD_UNKNOWN;
     }
 
     /** {@hide} */
@@ -1419,7 +1146,7 @@
             this.flags = 0;
         }
         this.radioChainInfos = null;
-        this.mApMldMacAddress = null;
+        this.mWifiStandard = WIFI_STANDARD_UNKNOWN;
     }
 
     /** {@hide} */
@@ -1460,10 +1187,6 @@
             radioChainInfos = source.radioChainInfos;
             this.mWifiStandard = source.mWifiStandard;
             this.ifaceName = source.ifaceName;
-            this.mApMldMacAddress = source.mApMldMacAddress;
-            this.mApMloLinkId = source.mApMloLinkId;
-            this.mAffiliatedMloLinks = source.mAffiliatedMloLinks != null
-                    ? new ArrayList<>(source.mAffiliatedMloLinks) : Collections.emptyList();
         }
     }
 
@@ -1503,17 +1226,6 @@
         sb.append(((flags & FLAG_80211mc_RESPONDER) != 0) ? "is supported" : "is not supported");
         sb.append(", Radio Chain Infos: ").append(Arrays.toString(radioChainInfos));
         sb.append(", interface name: ").append(ifaceName);
-
-        if (mApMldMacAddress != null) {
-            sb.append(", MLO Info: ")
-                    .append(" AP MLD MAC Address: ")
-                    .append(mApMldMacAddress.toString())
-                    .append(", AP MLO Link-Id: ")
-                    .append((mApMloLinkId == MloLink.INVALID_MLO_LINK_ID)
-                            ? "Unspecified" : mApMloLinkId)
-                    .append(", AP MLO Affiliated Links: ").append(mAffiliatedMloLinks);
-        }
-
         return sb.toString();
     }
 
@@ -1583,12 +1295,6 @@
             dest.writeInt(0);
         }
         dest.writeString((ifaceName != null) ? ifaceName.toString() : "");
-
-
-        // Add MLO related attributes
-        dest.writeParcelable(mApMldMacAddress, flags);
-        dest.writeInt(mApMloLinkId);
-        dest.writeTypedList(mAffiliatedMloLinks);
     }
 
     /** Implement the Parcelable interface */
@@ -1657,13 +1363,6 @@
                     }
                 }
                 sr.ifaceName = in.readString();
-
-
-                // Read MLO related attributes
-                sr.mApMldMacAddress = in.readParcelable(MacAddress.class.getClassLoader());
-                sr.mApMloLinkId = in.readInt();
-                sr.mAffiliatedMloLinks = in.createTypedArrayList(MloLink.CREATOR);
-
                 return sr;
             }
 
diff --git a/framework/java/android/net/wifi/SecurityParams.java b/framework/java/android/net/wifi/SecurityParams.java
index 11811fc..0e9f091 100644
--- a/framework/java/android/net/wifi/SecurityParams.java
+++ b/framework/java/android/net/wifi/SecurityParams.java
@@ -27,7 +27,6 @@
 import android.net.wifi.WifiConfiguration.SecurityType;
 import android.net.wifi.WifiConfiguration.SuiteBCipher;
 import android.os.Parcel;
-import android.os.Parcelable;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
@@ -38,7 +37,7 @@
  * A class representing a security configuration.
  * @hide
  */
-public final class SecurityParams implements Parcelable {
+public class SecurityParams {
     private static final String TAG = "SecurityParams";
 
     /** Passpoint Release 1 */
@@ -544,14 +543,7 @@
         }
     }
 
-    /** Implement the Parcelable interface */
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
+    /** Write this object to the parcel. */
     public void writeToParcel(Parcel dest, int flags) {
         dest.writeInt(mSecurityType);
         dest.writeBoolean(mEnabled);
@@ -569,31 +561,24 @@
 
     }
 
-    /** Implement the Parcelable interface */
-    public static final @NonNull Parcelable.Creator<SecurityParams> CREATOR =
-            new Creator<SecurityParams>() {
-                public SecurityParams createFromParcel(Parcel in) {
-                    SecurityParams params = new SecurityParams();
-                    params.mSecurityType = in.readInt();
-                    params.mEnabled = in.readBoolean();
-                    params.mAllowedKeyManagement = readBitSet(in);
-                    params.mAllowedProtocols = readBitSet(in);
-                    params.mAllowedAuthAlgorithms = readBitSet(in);
-                    params.mAllowedPairwiseCiphers = readBitSet(in);
-                    params.mAllowedGroupCiphers = readBitSet(in);
-                    params.mAllowedGroupManagementCiphers = readBitSet(in);
-                    params.mAllowedSuiteBCiphers = readBitSet(in);
-                    params.mRequirePmf = in.readBoolean();
-                    params.mIsAddedByAutoUpgrade = in.readBoolean();
-                    params.mIsSaeH2eOnlyMode = in.readBoolean();
-                    params.mIsSaePkOnlyMode = in.readBoolean();
-                    return params;
-                }
-
-                public SecurityParams[] newArray(int size) {
-                    return new SecurityParams[size];
-                }
-            };
+    /** Create a SecurityParams object from the parcel. */
+    public static final @NonNull SecurityParams createFromParcel(Parcel in) {
+        SecurityParams params = new SecurityParams();
+        params.mSecurityType = in.readInt();
+        params.mEnabled = in.readBoolean();
+        params.mAllowedKeyManagement = readBitSet(in);
+        params.mAllowedProtocols = readBitSet(in);
+        params.mAllowedAuthAlgorithms = readBitSet(in);
+        params.mAllowedPairwiseCiphers = readBitSet(in);
+        params.mAllowedGroupCiphers = readBitSet(in);
+        params.mAllowedGroupManagementCiphers = readBitSet(in);
+        params.mAllowedSuiteBCiphers = readBitSet(in);
+        params.mRequirePmf = in.readBoolean();
+        params.mIsAddedByAutoUpgrade = in.readBoolean();
+        params.mIsSaeH2eOnlyMode = in.readBoolean();
+        params.mIsSaePkOnlyMode = in.readBoolean();
+        return params;
+    }
 
     /**
      * Create a params according to the security type.
@@ -609,10 +594,6 @@
      * {@link WifiConfiguration#SECURITY_TYPE_WAPI_CERT},
      * {@link WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE},
      * {@link WifiConfiguration#SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT},
-     * {@link WifiConfiguration#SECURITY_TYPE_OSEN},
-     * {@link WifiConfiguration#SECURITY_TYPE_PASSPOINT_R1_R2},
-     * {@link WifiConfiguration#SECURITY_TYPE_PASSPOINT_R3},
-     * {@link WifiConfiguration#SECURITY_TYPE_DPP}
      *
      * @return the corresponding security params if the security type is valid;
      *         otherwise, throw IllegalArgumentException.
@@ -649,8 +630,6 @@
                 return SecurityParams.createPasspointParams(PASSPOINT_R2);
             case WifiConfiguration.SECURITY_TYPE_PASSPOINT_R3:
                 return SecurityParams.createPasspointParams(PASSPOINT_R3);
-            case WifiConfiguration.SECURITY_TYPE_DPP:
-                return SecurityParams.createDppParams();
             default:
                 throw new IllegalArgumentException("unknown security type " + securityType);
         }
@@ -915,27 +894,4 @@
         params.mAllowedGroupCiphers.set(GroupCipher.WEP104);
         return params;
     }
-
-    /**
-     * Create Easy Connect (DPP) params.
-     */
-    private static @NonNull SecurityParams createDppParams() {
-        SecurityParams params = new SecurityParams();
-        params.mSecurityType = WifiConfiguration.SECURITY_TYPE_DPP;
-
-        params.mAllowedKeyManagement.set(KeyMgmt.DPP);
-
-        params.mAllowedProtocols.set(Protocol.RSN);
-
-        params.mAllowedPairwiseCiphers.set(PairwiseCipher.CCMP);
-        params.mAllowedPairwiseCiphers.set(PairwiseCipher.GCMP_128);
-        params.mAllowedPairwiseCiphers.set(PairwiseCipher.GCMP_256);
-
-        params.mAllowedGroupCiphers.set(GroupCipher.CCMP);
-        params.mAllowedGroupCiphers.set(GroupCipher.GCMP_128);
-        params.mAllowedGroupCiphers.set(GroupCipher.GCMP_256);
-
-        params.mRequirePmf = true;
-        return params;
-    }
 }
diff --git a/framework/java/android/net/wifi/SoftApCapability.java b/framework/java/android/net/wifi/SoftApCapability.java
index 58a760c..de85da6 100644
--- a/framework/java/android/net/wifi/SoftApCapability.java
+++ b/framework/java/android/net/wifi/SoftApCapability.java
@@ -119,29 +119,6 @@
      */
     public static final long SOFTAP_FEATURE_BAND_60G_SUPPORTED = 1 << 8;
 
-    /**
-     * Support for 802.11be SAP.
-     * flag when {@code R.bool.config_wifiSoftapIeee80211beSupported} is true
-     *
-     * <p>
-     * Use this flag with {@link #areFeaturesSupported(long)}
-     * to verify that 802.11be is supported before enabling it using
-     * {@link SoftApConfiguration.Builder#setIeee80211beEnabled(boolean)}
-     */
-    public static final long SOFTAP_FEATURE_IEEE80211_BE = 1 << 9;
-
-    /*
-     * Support for WPA3-Opportunistic Wireless Encryption (OWE) transition.
-     * flag when {@code R.bool.config_wifiSoftapOweTransitionSupported} is true.
-     */
-    public static final long SOFTAP_FEATURE_WPA3_OWE_TRANSITION = 1 << 10;
-
-    /*
-     * Support for WPA3-Opportunistic Wireless Encryption (OWE).
-     * flag when {@code R.bool.config_wifiSoftapOweSupported} is true.
-     */
-    public static final long SOFTAP_FEATURE_WPA3_OWE = 1 << 11;
-
     /** @hide */
     @Retention(RetentionPolicy.SOURCE)
     @LongDef(flag = true, prefix = { "SOFTAP_FEATURE_" }, value = {
@@ -150,13 +127,10 @@
             SOFTAP_FEATURE_WPA3_SAE,
             SOFTAP_FEATURE_MAC_ADDRESS_CUSTOMIZATION,
             SOFTAP_FEATURE_IEEE80211_AX,
-            SOFTAP_FEATURE_IEEE80211_BE,
             SOFTAP_FEATURE_BAND_24G_SUPPORTED,
             SOFTAP_FEATURE_BAND_5G_SUPPORTED,
             SOFTAP_FEATURE_BAND_6G_SUPPORTED,
-            SOFTAP_FEATURE_BAND_60G_SUPPORTED,
-            SOFTAP_FEATURE_WPA3_OWE_TRANSITION,
-            SOFTAP_FEATURE_WPA3_OWE,
+            SOFTAP_FEATURE_BAND_60G_SUPPORTED
     })
     public @interface HotspotFeatures {}
 
@@ -185,27 +159,6 @@
     private int[] mSupportedChannelListIn60g = EMPTY_INT_ARRAY;
 
     /**
-     * A base country code which is used when querying the supported channel list.
-     */
-    private String mCountryCodeFromDriver;
-
-    /**
-     * Set the country code which is used when querying the supported channel list.
-     * @hide
-     */
-    public void setCountryCode(String countryCode) {
-        mCountryCodeFromDriver = countryCode;
-    }
-
-    /**
-     * Get the country code which is used when querying the supported channel list.
-     * @hide
-     */
-    public String getCountryCode() {
-        return mCountryCodeFromDriver;
-    }
-
-    /**
      * Get the maximum supported client numbers which AP resides on.
      */
     public int getMaxSupportedClients() {
@@ -276,9 +229,7 @@
      * @param band One of the following band types:
      * {@link SoftApConfiguration#BAND_2GHZ}, {@link SoftApConfiguration#BAND_5GHZ},
      * {@link SoftApConfiguration#BAND_6GHZ}, {@link SoftApConfiguration#BAND_60GHZ}.
-     * @return List of supported channels for the band. An empty list will be returned if the
-     * channels are obsolete. This happens when country code has changed but the channels
-     * are not updated from HAL when Wifi is disabled.
+     * @return List of supported channels for the band.
      *
      * @throws IllegalArgumentException when band type is invalid.
      */
@@ -309,7 +260,6 @@
             mSupportedChannelListIn5g = source.mSupportedChannelListIn5g;
             mSupportedChannelListIn6g = source.mSupportedChannelListIn6g;
             mSupportedChannelListIn60g = source.mSupportedChannelListIn60g;
-            mCountryCodeFromDriver = source.mCountryCodeFromDriver;
         }
     }
 
@@ -341,7 +291,6 @@
         dest.writeIntArray(mSupportedChannelListIn5g);
         dest.writeIntArray(mSupportedChannelListIn6g);
         dest.writeIntArray(mSupportedChannelListIn60g);
-        dest.writeString(mCountryCodeFromDriver);
     }
 
     @NonNull
@@ -354,7 +303,6 @@
             capability.setSupportedChannelList(SoftApConfiguration.BAND_5GHZ, in.createIntArray());
             capability.setSupportedChannelList(SoftApConfiguration.BAND_6GHZ, in.createIntArray());
             capability.setSupportedChannelList(SoftApConfiguration.BAND_60GHZ, in.createIntArray());
-            capability.setCountryCode(in.readString());
             return capability;
         }
 
@@ -368,14 +316,13 @@
     public String toString() {
         StringBuilder sbuf = new StringBuilder();
         sbuf.append("SupportedFeatures=").append(mSupportedFeatures);
-        sbuf.append(" MaximumSupportedClientNumber=").append(mMaximumSupportedClientNumber);
-        sbuf.append(" SupportedChannelListIn24g")
+        sbuf.append("MaximumSupportedClientNumber=").append(mMaximumSupportedClientNumber);
+        sbuf.append("SupportedChannelListIn24g")
                 .append(Arrays.toString(mSupportedChannelListIn24g));
-        sbuf.append(" SupportedChannelListIn5g").append(Arrays.toString(mSupportedChannelListIn5g));
-        sbuf.append(" SupportedChannelListIn6g").append(Arrays.toString(mSupportedChannelListIn6g));
-        sbuf.append(" SupportedChannelListIn60g")
+        sbuf.append("SupportedChannelListIn5g").append(Arrays.toString(mSupportedChannelListIn5g));
+        sbuf.append("SupportedChannelListIn6g").append(Arrays.toString(mSupportedChannelListIn6g));
+        sbuf.append("SupportedChannelListIn60g")
                 .append(Arrays.toString(mSupportedChannelListIn60g));
-        sbuf.append(" mCountryCodeFromDriver").append(mCountryCodeFromDriver);
         return sbuf.toString();
     }
 
@@ -389,8 +336,7 @@
                 && Arrays.equals(mSupportedChannelListIn24g, capability.mSupportedChannelListIn24g)
                 && Arrays.equals(mSupportedChannelListIn5g, capability.mSupportedChannelListIn5g)
                 && Arrays.equals(mSupportedChannelListIn6g, capability.mSupportedChannelListIn6g)
-                && Arrays.equals(mSupportedChannelListIn60g, capability.mSupportedChannelListIn60g)
-                && Objects.equals(mCountryCodeFromDriver, capability.mCountryCodeFromDriver);
+                && Arrays.equals(mSupportedChannelListIn60g, capability.mSupportedChannelListIn60g);
     }
 
     @Override
@@ -399,7 +345,6 @@
                 Arrays.hashCode(mSupportedChannelListIn24g),
                 Arrays.hashCode(mSupportedChannelListIn5g),
                 Arrays.hashCode(mSupportedChannelListIn6g),
-                Arrays.hashCode(mSupportedChannelListIn60g),
-                mCountryCodeFromDriver);
+                Arrays.hashCode(mSupportedChannelListIn60g));
     }
 }
diff --git a/framework/java/android/net/wifi/SoftApConfiguration.java b/framework/java/android/net/wifi/SoftApConfiguration.java
index 251e7da..b1aa97b 100644
--- a/framework/java/android/net/wifi/SoftApConfiguration.java
+++ b/framework/java/android/net/wifi/SoftApConfiguration.java
@@ -21,11 +21,7 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
-import android.compat.Compatibility;
-import android.compat.annotation.ChangeId;
-import android.compat.annotation.EnabledAfter;
 import android.net.MacAddress;
-import android.net.wifi.util.HexEncoding;
 import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -35,6 +31,7 @@
 
 import androidx.annotation.RequiresApi;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.Preconditions;
 import com.android.modules.utils.build.SdkLevel;
 
@@ -42,12 +39,8 @@
 import java.lang.annotation.RetentionPolicy;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Objects;
-import java.util.Set;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
 
 /**
  * Configuration for a soft access point (a.k.a. Soft AP, SAP, Hotspot).
@@ -70,6 +63,12 @@
 
     private static final String TAG = "SoftApConfiguration";
 
+    @VisibleForTesting
+    static final int PSK_MIN_LEN = 8;
+
+    @VisibleForTesting
+    static final int PSK_MAX_LEN = 63;
+
     /**
      * 2GHz band.
      * @hide
@@ -111,16 +110,6 @@
     @SystemApi
     public static final int BAND_ANY = BAND_2GHZ | BAND_5GHZ | BAND_6GHZ;
 
-    /**
-     * A default value used to configure shut down timeout setting to default value.
-     * See {@link Builder#setShutdownTimeoutMillis(long)} or
-     * {@link Builder#setBridgedModeOpportunisticShutdownTimeoutMillis(long)} for details.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final long DEFAULT_TIMEOUT = -1;
-
     /** @hide */
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(flag = true, prefix = { "BAND_TYPE_" }, value = {
@@ -151,22 +140,7 @@
     private static final int MIN_CH_60G_BAND = 1;
     private static final int MAX_CH_60G_BAND = 6;
 
-    /**
-     * Requires to configure MAC randomization setting to None when configuring BSSID.
-     */
-    @ChangeId
-    @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.S)
-    private static final long FORCE_MUTUAL_EXCLUSIVE_BSSID_MAC_RAMDONIZATION_SETTING = 215656264L;
 
-    /**
-     * Removes zero support on
-     * {@link android.net.wifi.SoftApConfiguration.Builder#setShutdownTimeoutMillis(long)}.
-     *
-     * @hide
-     */
-    @ChangeId
-    @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.S)
-    public static final long REMOVE_ZERO_FOR_TIMEOUT_SETTING = 213289672L;
 
     private static boolean isChannelBandPairValid(int channel, @BandType int band) {
         switch (band) {
@@ -203,7 +177,7 @@
     /**
      * SSID for the AP, or null for a framework-determined SSID.
      */
-    private final @Nullable WifiSsid mWifiSsid;
+    private final @Nullable String mSsid;
 
     /**
      * BSSID for the AP, or null to use a framework-determined BSSID.
@@ -211,11 +185,6 @@
     private final @Nullable MacAddress mBssid;
 
     /**
-     * Vendor elements for the AP, structured as dd+len+elements
-     */
-    private final @NonNull List<ScanResult.InformationElement> mVendorElements;
-
-    /**
      * Pre-shared key for WPA2-PSK or WPA3-SAE-Transition or WPA3-SAE encryption which depends on
      * the security type.
      */
@@ -236,54 +205,6 @@
     private final SparseIntArray mChannels;
 
     /**
-     * The set of allowed channels in 2.4GHz band to select from using ACS (Automatic Channel
-     * Selection) algorithm.
-     *
-     * Requires the driver to support {@link SoftApCapability#SOFTAP_FEATURE_ACS_OFFLOAD}.
-     * Otherwise, this set will be ignored.
-     *
-     * If the set is empty, then all channels in 2.4GHz band are allowed.
-     */
-    private final @NonNull Set<Integer> mAllowedAcsChannels2g;
-
-    /**
-     * The set of allowed channels in 5GHz band to select from using ACS (Automatic Channel
-     * Selection) algorithm.
-     *
-     * Requires the driver to support {@link SoftApCapability#SOFTAP_FEATURE_ACS_OFFLOAD}.
-     * Otherwise, this set will be ignored.
-     *
-     * If the set is empty, then all channels in 5GHz are allowed.
-     */
-    private final @NonNull Set<Integer> mAllowedAcsChannels5g;
-
-    /**
-     * The set of allowed channels in 6GHz band to select from using ACS (Automatic Channel
-     * Selection) algorithm.
-     *
-     * Requires the driver to support {@link SoftApCapability#SOFTAP_FEATURE_ACS_OFFLOAD}.
-     * Otherwise, this set will be ignored.
-     *
-     * If the set is empty, then all channels in 6GHz are allowed.
-     */
-    private final @NonNull Set<Integer> mAllowedAcsChannels6g;
-
-    /**
-     * The maximum channel bandwidth for SoftAp operation
-     *
-     * Default value is SoftApInfo#CHANNEL_WIDTH_AUTO which means the channel bandwidth
-     * is to be selected by the chip based on device capabilities.
-     * <p>
-     *
-     * Valid values: {@link SoftApInfo#CHANNEL_WIDTH_AUTO},
-     * {@link SoftApInfo#CHANNEL_WIDTH_20MHZ}, {@link SoftApInfo#CHANNEL_WIDTH_40MHZ},
-     * {@link SoftApInfo#CHANNEL_WIDTH_80MHZ}, {@link SoftApInfo#CHANNEL_WIDTH_160MHZ},
-     * {@link SoftApInfo#CHANNEL_WIDTH_320MHZ}
-     *
-     */
-    private final @WifiAnnotations.Bandwidth int mMaxChannelBandwidth;
-
-    /**
      * The maximim allowed number of clients that can associate to the AP.
      */
     private final int mMaxNumberOfClients;
@@ -294,9 +215,7 @@
      * {@link #SECURITY_TYPE_OPEN},
      * {@link #SECURITY_TYPE_WPA2_PSK},
      * {@link #SECURITY_TYPE_WPA3_SAE_TRANSITION},
-     * {@link #SECURITY_TYPE_WPA3_SAE},
-     * {@link #SECURITY_TYPE_WPA3_OWE_TRANSITION},
-     * {@link #SECURITY_TYPE_WPA3_OWE}
+     * {@link #SECURITY_TYPE_WPA3_SAE}
      */
     private final @SecurityType int mSecurityType;
 
@@ -331,38 +250,23 @@
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(prefix = {"RANDOMIZATION_"}, value = {
             RANDOMIZATION_NONE,
-            RANDOMIZATION_PERSISTENT,
-            RANDOMIZATION_NON_PERSISTENT})
+            RANDOMIZATION_PERSISTENT})
     public @interface MacRandomizationSetting {}
 
     /**
-     * Use the factory MAC address as the BSSID of the AP.
-     *
+     * Use factory MAC as BSSID for the AP
      * @hide
      */
     @SystemApi
     public static final int RANDOMIZATION_NONE = 0;
-
     /**
-     * Generate a persistent randomized MAC address as the BSSID of the AP.
-     * The MAC address is persisted per SSID - i.e. as long as the SSID of the AP doesn't change
-     * then it will have a persistent MAC address (which is initially random and is not the factory
-     * MAC address).
-     *
+     * Generate a randomized MAC as BSSID for the AP
      * @hide
      */
     @SystemApi
     public static final int RANDOMIZATION_PERSISTENT = 1;
 
     /**
-     * Generate a randomized MAC address as the BSSID of the AP. The MAC address is not persisted
-     * - it is re-generated every time the AP is re-enabled.
-     * @hide
-     */
-    @SystemApi
-    public static final int RANDOMIZATION_NON_PERSISTENT = 2;
-
-    /**
      * Level of MAC randomization for the AP BSSID.
      */
     @MacRandomizationSetting
@@ -380,25 +284,10 @@
     private boolean mIeee80211axEnabled;
 
     /**
-     * Whether 802.11be AP is enabled or not.
-     */
-    private boolean mIeee80211beEnabled;
-
-    /**
      * Whether the current configuration is configured by user or not.
      */
     private boolean mIsUserConfiguration;
 
-    /**
-     * Randomized MAC address to use with this configuration when MAC randomization setting
-     * is {@link #RANDOMIZATION_PERSISTENT}.
-     */
-    private final @Nullable MacAddress mPersistentRandomizedMacAddress;
-
-    /**
-     * Delay in milliseconds before shutting down an instance in bridged AP.
-     */
-    private final long mBridgedModeOpportunisticShutdownTimeoutMillis;
 
     /**
      * THe definition of security type OPEN.
@@ -420,16 +309,6 @@
      */
     public static final int SECURITY_TYPE_WPA3_SAE = 3;
 
-    /**
-     * The definition of security type WPA3-OWE Transition.
-     */
-    public static final int SECURITY_TYPE_WPA3_OWE_TRANSITION = 4;
-
-    /**
-     * The definition of security type WPA3-OWE.
-     */
-    public static final int SECURITY_TYPE_WPA3_OWE = 5;
-
     /** @hide */
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(prefix = { "SECURITY_TYPE_" }, value = {
@@ -437,26 +316,18 @@
         SECURITY_TYPE_WPA2_PSK,
         SECURITY_TYPE_WPA3_SAE_TRANSITION,
         SECURITY_TYPE_WPA3_SAE,
-        SECURITY_TYPE_WPA3_OWE_TRANSITION,
-        SECURITY_TYPE_WPA3_OWE,
     })
     public @interface SecurityType {}
 
     /** Private constructor for Builder and Parcelable implementation. */
-    private SoftApConfiguration(@Nullable WifiSsid ssid, @Nullable MacAddress bssid,
+    private SoftApConfiguration(@Nullable String ssid, @Nullable MacAddress bssid,
             @Nullable String passphrase, boolean hiddenSsid, @NonNull SparseIntArray channels,
             @SecurityType int securityType, int maxNumberOfClients, boolean shutdownTimeoutEnabled,
             long shutdownTimeoutMillis, boolean clientControlByUser,
             @NonNull List<MacAddress> blockedList, @NonNull List<MacAddress> allowedList,
             int macRandomizationSetting, boolean bridgedModeOpportunisticShutdownEnabled,
-            boolean ieee80211axEnabled, boolean ieee80211beEnabled, boolean isUserConfiguration,
-            long bridgedModeOpportunisticShutdownTimeoutMillis,
-            @NonNull List<ScanResult.InformationElement> vendorElements,
-            @Nullable MacAddress persistentRandomizedMacAddress,
-            @NonNull Set<Integer> allowedAcsChannels24g, @NonNull Set<Integer> allowedAcsChannels5g,
-            @NonNull Set<Integer> allowedAcsChannels6g,
-            @WifiAnnotations.Bandwidth int maxChannelBandwidth) {
-        mWifiSsid = ssid;
+            boolean ieee80211axEnabled, boolean isUserConfiguration) {
+        mSsid = ssid;
         mBssid = bssid;
         mPassphrase = passphrase;
         mHiddenSsid = hiddenSsid;
@@ -476,16 +347,7 @@
         mMacRandomizationSetting = macRandomizationSetting;
         mBridgedModeOpportunisticShutdownEnabled = bridgedModeOpportunisticShutdownEnabled;
         mIeee80211axEnabled = ieee80211axEnabled;
-        mIeee80211beEnabled = ieee80211beEnabled;
         mIsUserConfiguration = isUserConfiguration;
-        mBridgedModeOpportunisticShutdownTimeoutMillis =
-                bridgedModeOpportunisticShutdownTimeoutMillis;
-        mVendorElements = new ArrayList<>(vendorElements);
-        mPersistentRandomizedMacAddress = persistentRandomizedMacAddress;
-        mAllowedAcsChannels2g = new HashSet<>(allowedAcsChannels24g);
-        mAllowedAcsChannels5g = new HashSet<>(allowedAcsChannels5g);
-        mAllowedAcsChannels6g = new HashSet<>(allowedAcsChannels6g);
-        mMaxChannelBandwidth = maxChannelBandwidth;
     }
 
     @Override
@@ -497,7 +359,7 @@
             return false;
         }
         SoftApConfiguration other = (SoftApConfiguration) otherObj;
-        return Objects.equals(mWifiSsid, other.mWifiSsid)
+        return Objects.equals(mSsid, other.mSsid)
                 && Objects.equals(mBssid, other.mBssid)
                 && Objects.equals(mPassphrase, other.mPassphrase)
                 && mHiddenSsid == other.mHiddenSsid
@@ -511,37 +373,25 @@
                 && Objects.equals(mAllowedClientList, other.mAllowedClientList)
                 && mMacRandomizationSetting == other.mMacRandomizationSetting
                 && mBridgedModeOpportunisticShutdownEnabled
-                        == other.mBridgedModeOpportunisticShutdownEnabled
+                == other.mBridgedModeOpportunisticShutdownEnabled
                 && mIeee80211axEnabled == other.mIeee80211axEnabled
-                && mIeee80211beEnabled == other.mIeee80211beEnabled
-                && mIsUserConfiguration == other.mIsUserConfiguration
-                && mBridgedModeOpportunisticShutdownTimeoutMillis
-                        == other.mBridgedModeOpportunisticShutdownTimeoutMillis
-                && Objects.equals(mVendorElements, other.mVendorElements)
-                && Objects.equals(mPersistentRandomizedMacAddress,
-                        other.mPersistentRandomizedMacAddress)
-                && Objects.equals(mAllowedAcsChannels2g, other.mAllowedAcsChannels2g)
-                && Objects.equals(mAllowedAcsChannels5g, other.mAllowedAcsChannels5g)
-                && Objects.equals(mAllowedAcsChannels6g, other.mAllowedAcsChannels6g)
-                && mMaxChannelBandwidth == other.mMaxChannelBandwidth;
+                && mIsUserConfiguration == other.mIsUserConfiguration;
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(mWifiSsid, mBssid, mPassphrase, mHiddenSsid,
+        return Objects.hash(mSsid, mBssid, mPassphrase, mHiddenSsid,
                 mChannels.toString(), mSecurityType, mMaxNumberOfClients, mAutoShutdownEnabled,
                 mShutdownTimeoutMillis, mClientControlByUser, mBlockedClientList,
                 mAllowedClientList, mMacRandomizationSetting,
-                mBridgedModeOpportunisticShutdownEnabled, mIeee80211axEnabled, mIeee80211beEnabled,
-                mIsUserConfiguration, mBridgedModeOpportunisticShutdownTimeoutMillis,
-                mVendorElements, mPersistentRandomizedMacAddress, mAllowedAcsChannels2g,
-                mAllowedAcsChannels5g, mAllowedAcsChannels6g, mMaxChannelBandwidth);
+                mBridgedModeOpportunisticShutdownEnabled, mIeee80211axEnabled,
+                mIsUserConfiguration);
     }
 
     @Override
     public String toString() {
         StringBuilder sbuf = new StringBuilder();
-        sbuf.append("ssid = ").append(mWifiSsid == null ? null : mWifiSsid.toString());
+        sbuf.append("ssid = ").append(mSsid);
         if (mBssid != null) sbuf.append(" \n bssid = ").append(mBssid.toString());
         sbuf.append(" \n Passphrase = ").append(
                 TextUtils.isEmpty(mPassphrase) ? "<empty>" : "<non-empty>");
@@ -557,24 +407,14 @@
         sbuf.append(" \n MacRandomizationSetting = ").append(mMacRandomizationSetting);
         sbuf.append(" \n BridgedModeInstanceOpportunisticEnabled = ")
                 .append(mBridgedModeOpportunisticShutdownEnabled);
-        sbuf.append(" \n BridgedModeOpportunisticShutdownTimeoutMillis = ")
-                .append(mBridgedModeOpportunisticShutdownTimeoutMillis);
         sbuf.append(" \n Ieee80211axEnabled = ").append(mIeee80211axEnabled);
-        sbuf.append(" \n Ieee80211beEnabled = ").append(mIeee80211beEnabled);
         sbuf.append(" \n isUserConfiguration = ").append(mIsUserConfiguration);
-        sbuf.append(" \n vendorElements = ").append(mVendorElements);
-        sbuf.append(" \n mPersistentRandomizedMacAddress = ")
-                .append(mPersistentRandomizedMacAddress);
-        sbuf.append(" \n mAllowedAcsChannels2g = ").append(mAllowedAcsChannels2g);
-        sbuf.append(" \n mAllowedAcsChannels5g = ").append(mAllowedAcsChannels5g);
-        sbuf.append(" \n mAllowedAcsChannels6g = ").append(mAllowedAcsChannels6g);
-        sbuf.append(" \n mMaxChannelBandwidth = ").append(mMaxChannelBandwidth);
         return sbuf.toString();
     }
 
     @Override
     public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeParcelable(mWifiSsid, 0);
+        dest.writeString(mSsid);
         dest.writeParcelable(mBssid, flags);
         dest.writeString(mPassphrase);
         dest.writeBoolean(mHiddenSsid);
@@ -589,15 +429,7 @@
         dest.writeInt(mMacRandomizationSetting);
         dest.writeBoolean(mBridgedModeOpportunisticShutdownEnabled);
         dest.writeBoolean(mIeee80211axEnabled);
-        dest.writeBoolean(mIeee80211beEnabled);
         dest.writeBoolean(mIsUserConfiguration);
-        dest.writeLong(mBridgedModeOpportunisticShutdownTimeoutMillis);
-        dest.writeTypedList(mVendorElements);
-        dest.writeParcelable(mPersistentRandomizedMacAddress, flags);
-        writeHashSetInt(dest, mAllowedAcsChannels2g);
-        writeHashSetInt(dest, mAllowedAcsChannels5g);
-        writeHashSetInt(dest, mAllowedAcsChannels6g);
-        dest.writeInt(mMaxChannelBandwidth);
     }
 
     /* Reference from frameworks/base/core/java/android/os/Parcel.java */
@@ -617,6 +449,7 @@
         }
     }
 
+
     /* Reference from frameworks/base/core/java/android/os/Parcel.java */
     @NonNull
     private static SparseIntArray readSparseIntArray(@NonNull Parcel in) {
@@ -634,33 +467,6 @@
         return sa;
     }
 
-    /* Write HashSet<Integer> into Parcel */
-    private static void writeHashSetInt(@NonNull Parcel dest, @NonNull Set<Integer> set) {
-        if (set.isEmpty()) {
-            dest.writeInt(-1);
-            return;
-        }
-
-        dest.writeInt(set.size());
-        for (int val : set) {
-            dest.writeInt(val);
-        }
-    }
-
-    /* Read HashSet<Integer> from Parcel */
-    @NonNull
-    private static Set<Integer> readHashSetInt(@NonNull Parcel in) {
-        Set<Integer> set = new HashSet<>();
-        int len = in.readInt();
-        if (len < 0) {
-            return set;
-        }
-
-        for (int i = 0; i < len; i++) {
-            set.add(in.readInt());
-        }
-        return set;
-    }
 
     @Override
     public int describeContents() {
@@ -672,19 +478,13 @@
         @Override
         public SoftApConfiguration createFromParcel(Parcel in) {
             return new SoftApConfiguration(
-                    in.readParcelable(WifiSsid.class.getClassLoader()),
+                    in.readString(),
                     in.readParcelable(MacAddress.class.getClassLoader()),
                     in.readString(), in.readBoolean(), readSparseIntArray(in), in.readInt(),
                     in.readInt(), in.readBoolean(), in.readLong(), in.readBoolean(),
                     in.createTypedArrayList(MacAddress.CREATOR),
                     in.createTypedArrayList(MacAddress.CREATOR), in.readInt(), in.readBoolean(),
-                    in.readBoolean(), in.readBoolean(), in.readBoolean(), in.readLong(),
-                    in.createTypedArrayList(ScanResult.InformationElement.CREATOR),
-                    in.readParcelable(MacAddress.class.getClassLoader()),
-                    readHashSetInt(in),
-                    readHashSetInt(in),
-                    readHashSetInt(in),
-                    in.readInt());
+                    in.readBoolean(), in.readBoolean());
         }
 
         @Override
@@ -694,51 +494,12 @@
     };
 
     /**
-     * Return the UTF-8 String set to be the SSID for the AP. If the SSID cannot be decoded as
-     * UTF-8, then this will return {@link WifiManager#UNKNOWN_SSID}
+     * Return String set to be the SSID for the AP.
      * See also {@link Builder#setSsid(String)}.
-     *
-     * @deprecated Use {@link #getWifiSsid()} instead.
      */
     @Nullable
-    @Deprecated
     public String getSsid() {
-        if (mWifiSsid == null) {
-            return null;
-        }
-        CharSequence utf8Text = mWifiSsid.getUtf8Text();
-        return utf8Text != null ? utf8Text.toString() : WifiManager.UNKNOWN_SSID;
-    }
-
-    /**
-     * Return WifiSsid set to be the SSID for the AP.
-     * See also {@link Builder#setWifiSsid(WifiSsid)}.
-     */
-    @Nullable
-    public WifiSsid getWifiSsid() {
-        return mWifiSsid;
-    }
-
-    /**
-     * Return VendorElements for the AP.
-     * @hide
-     */
-    @NonNull
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @SystemApi
-    public List<ScanResult.InformationElement> getVendorElements() {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        return getVendorElementsInternal();
-    }
-
-    /**
-     * @see #getVendorElements()
-     * @hide
-     */
-    public List<ScanResult.InformationElement> getVendorElementsInternal() {
-        return new ArrayList<>(mVendorElements);
+        return mSsid;
     }
 
     /**
@@ -854,9 +615,7 @@
      * {@link #SECURITY_TYPE_OPEN},
      * {@link #SECURITY_TYPE_WPA2_PSK},
      * {@link #SECURITY_TYPE_WPA3_SAE_TRANSITION},
-     * {@link #SECURITY_TYPE_WPA3_SAE},
-     * {@link #SECURITY_TYPE_WPA3_OWE_TRANSITION},
-     * {@link #SECURITY_TYPE_WPA3_OWE}
+     * {@link #SECURITY_TYPE_WPA3_SAE}
      */
     public @SecurityType int getSecurityType() {
         return mSecurityType;
@@ -894,11 +653,6 @@
      */
     @SystemApi
     public long getShutdownTimeoutMillis() {
-        if (!Compatibility.isChangeEnabled(
-                REMOVE_ZERO_FOR_TIMEOUT_SETTING) && mShutdownTimeoutMillis == DEFAULT_TIMEOUT) {
-            // For legacy application, return 0 when setting is DEFAULT_TIMEOUT.
-            return 0;
-        }
         return mShutdownTimeoutMillis;
     }
 
@@ -1011,78 +765,6 @@
     }
 
     /**
-     * @see #isIeee80211beEnabled()
-     * @hide
-     */
-    public boolean isIeee80211beEnabledInternal() {
-        return mIeee80211beEnabled;
-    }
-
-    /**
-     * Returns whether or not the Soft AP is configured to enable 802.11be.
-     * This is an indication that if the device support 802.11be AP then to enable or disable
-     * that feature. If the device does not support 802.11be AP then this flag is ignored.
-     * See also {@link Builder#setIeee80211beEnabled(boolean}}
-     * @hide
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @SystemApi
-    public boolean isIeee80211beEnabled() {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        return isIeee80211beEnabledInternal();
-    }
-
-    /**
-     * Returns the allowed channels for ACS in a selected band.
-     *
-     * If an empty array is returned, then all channels in that band are allowed
-     * The channels are configured using {@link Builder#setAllowedAcsChannels(int, int[])}
-     *
-     * @param band one of the following band types:
-     * {@link #BAND_2GHZ}, {@link #BAND_5GHZ}, {@link #BAND_6GHZ}.
-     *
-     * @return array of the allowed channels for ACS in that band
-     *
-     * @hide
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @NonNull
-    @SystemApi
-    public int[] getAllowedAcsChannels(@BandType int band) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        switch(band) {
-            case BAND_2GHZ:
-                return mAllowedAcsChannels2g.stream().mapToInt(Integer::intValue).toArray();
-            case BAND_5GHZ:
-                return mAllowedAcsChannels5g.stream().mapToInt(Integer::intValue).toArray();
-            case BAND_6GHZ:
-                return mAllowedAcsChannels6g.stream().mapToInt(Integer::intValue).toArray();
-            default:
-                throw new IllegalArgumentException("getAllowedAcsChannels: Invalid band: " + band);
-        }
-    }
-
-    /**
-     * Returns configured maximum channel bandwidth for the SoftAp connection.
-     *
-     * If not configured, it will return {@link SoftApInfo#CHANNEL_WIDTH_AUTO}
-     *
-     * @hide
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @SystemApi
-    public @WifiAnnotations.Bandwidth int getMaxChannelBandwidth() {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        return mMaxChannelBandwidth;
-    }
-
-    /**
      * Returns whether or not the {@link SoftApConfiguration} was configured by the user
      * (as opposed to the default system configuration).
      * <p>
@@ -1102,20 +784,6 @@
     }
 
     /**
-     * Returns the randomized MAC address to be used by this configuration.
-     *
-     * The Soft AP may be configured to use a persistent randomized MAC address with
-     * {@link Builder#setMacRandomizationSetting(int)}. This method returns the persistent
-     * randomized MAC address which will be used for the Soft AP controlled by this configuration.
-     *
-     * @hide
-     */
-    @SystemApi
-    public @NonNull MacAddress getPersistentRandomizedMacAddress() {
-        return mPersistentRandomizedMacAddress;
-    }
-
-    /**
      * @hide
      */
     public boolean isUserConfigurationInternal() {
@@ -1123,40 +791,10 @@
     }
 
     /**
-     * Returns the bridged mode opportunistic shutdown timeout in milliseconds.
-     * An instance in bridged AP will shutdown when there is no device associated to it for
-     * the timeout duration. See also
-     * {@link Builder#setBridgedModeOpportunisticShutdownTimeoutMillis(long)}.
-     *
-     * @hide
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @SystemApi
-    public long getBridgedModeOpportunisticShutdownTimeoutMillis() {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        return mBridgedModeOpportunisticShutdownTimeoutMillis;
-    }
-
-
-    /**
-     * @hide
-     */
-    public long getBridgedModeOpportunisticShutdownTimeoutMillisInternal() {
-        return mBridgedModeOpportunisticShutdownTimeoutMillis;
-    }
-
-    /**
      * Returns a {@link WifiConfiguration} representation of this {@link SoftApConfiguration}.
      * Note that SoftApConfiguration may contain configuration which is cannot be represented
      * by the legacy WifiConfiguration, in such cases a null will be returned.
      *
-     * To maintain legacy behavior, the SSID of the WifiConfiguration will be the UTF-8
-     * representation of the SSID without double quotes, as opposed to the double-quoted UTF-8
-     * format documented in {@link WifiConfiguration#SSID}. If the SSID cannot be decoded as UTF-8,
-     * then the SSID of the WifiConfiguration will be {@link WifiManager#UNKNOWN_SSID}.
-     *
      * <li> SoftAp band in {@link WifiConfiguration.apBand} only supports
      * 2GHz, 5GHz, 2GHz+5GHz bands, so conversion is limited to these bands. </li>
      *
@@ -1168,8 +806,7 @@
     @SystemApi
     public WifiConfiguration toWifiConfiguration() {
         WifiConfiguration wifiConfig = new WifiConfiguration();
-        CharSequence utf8Text = mWifiSsid != null ? mWifiSsid.getUtf8Text() : null;
-        wifiConfig.SSID = utf8Text != null ? utf8Text.toString() : WifiManager.UNKNOWN_SSID;
+        wifiConfig.SSID = mSsid;
         wifiConfig.preSharedKey = mPassphrase;
         wifiConfig.hiddenSSID = mHiddenSsid;
         wifiConfig.apChannel = getChannel();
@@ -1217,7 +854,7 @@
      */
     @SystemApi
     public static final class Builder {
-        private WifiSsid mWifiSsid;
+        private String mSsid;
         private MacAddress mBssid;
         private String mPassphrase;
         private boolean mHiddenSsid;
@@ -1232,21 +869,13 @@
         private int mMacRandomizationSetting;
         private boolean mBridgedModeOpportunisticShutdownEnabled;
         private boolean mIeee80211axEnabled;
-        private boolean mIeee80211beEnabled;
         private boolean mIsUserConfiguration;
-        private long mBridgedModeOpportunisticShutdownTimeoutMillis;
-        private List<ScanResult.InformationElement> mVendorElements;
-        private MacAddress mPersistentRandomizedMacAddress;
-        private Set<Integer> mAllowedAcsChannels2g;
-        private Set<Integer> mAllowedAcsChannels5g;
-        private Set<Integer> mAllowedAcsChannels6g;
-        private @WifiAnnotations.Bandwidth int mMaxChannelBandwidth;
 
         /**
          * Constructs a Builder with default values (see {@link Builder}).
          */
         public Builder() {
-            mWifiSsid = null;
+            mSsid = null;
             mBssid = null;
             mPassphrase = null;
             mHiddenSsid = false;
@@ -1255,26 +884,14 @@
             mMaxNumberOfClients = 0;
             mSecurityType = SECURITY_TYPE_OPEN;
             mAutoShutdownEnabled = true; // enabled by default.
-            mShutdownTimeoutMillis = DEFAULT_TIMEOUT;
+            mShutdownTimeoutMillis = 0;
             mClientControlByUser = false;
             mBlockedClientList = new ArrayList<>();
             mAllowedClientList = new ArrayList<>();
-            if (SdkLevel.isAtLeastT()) {
-                mMacRandomizationSetting = RANDOMIZATION_NON_PERSISTENT;
-            } else {
-                mMacRandomizationSetting = RANDOMIZATION_PERSISTENT;
-            }
+            mMacRandomizationSetting = RANDOMIZATION_PERSISTENT;
             mBridgedModeOpportunisticShutdownEnabled = true;
             mIeee80211axEnabled = true;
-            mIeee80211beEnabled = true;
             mIsUserConfiguration = true;
-            mBridgedModeOpportunisticShutdownTimeoutMillis = DEFAULT_TIMEOUT;
-            mVendorElements = new ArrayList<>();
-            mPersistentRandomizedMacAddress = null;
-            mAllowedAcsChannels2g = new HashSet<>();
-            mAllowedAcsChannels5g = new HashSet<>();
-            mAllowedAcsChannels6g = new HashSet<>();
-            mMaxChannelBandwidth = SoftApInfo.CHANNEL_WIDTH_AUTO;
         }
 
         /**
@@ -1283,7 +900,7 @@
         public Builder(@NonNull SoftApConfiguration other) {
             Objects.requireNonNull(other);
 
-            mWifiSsid = other.mWifiSsid;
+            mSsid = other.mSsid;
             mBssid = other.mBssid;
             mPassphrase = other.mPassphrase;
             mHiddenSsid = other.mHiddenSsid;
@@ -1299,22 +916,7 @@
             mBridgedModeOpportunisticShutdownEnabled =
                     other.mBridgedModeOpportunisticShutdownEnabled;
             mIeee80211axEnabled = other.mIeee80211axEnabled;
-            mIeee80211beEnabled = other.mIeee80211beEnabled;
             mIsUserConfiguration = other.mIsUserConfiguration;
-            mBridgedModeOpportunisticShutdownTimeoutMillis =
-                    other.mBridgedModeOpportunisticShutdownTimeoutMillis;
-            mVendorElements = new ArrayList<>(other.mVendorElements);
-            mPersistentRandomizedMacAddress = other.mPersistentRandomizedMacAddress;
-            mAllowedAcsChannels2g = new HashSet<>(other.mAllowedAcsChannels2g);
-            mAllowedAcsChannels5g = new HashSet<>(other.mAllowedAcsChannels5g);
-            mAllowedAcsChannels6g = new HashSet<>(other.mAllowedAcsChannels6g);
-            mMaxChannelBandwidth = other.mMaxChannelBandwidth;
-            if (SdkLevel.isAtLeastS() && mBssid != null) {
-                // Auto set correct MAC randomization setting for the legacy SoftApConfiguration
-                // to avoid the exception happen when framework (system server) copy
-                // SoftApConfiguration.
-                mMacRandomizationSetting = RANDOMIZATION_NONE;
-            }
         }
 
         /**
@@ -1329,32 +931,16 @@
                     throw new IllegalArgumentException("A MacAddress exist in both client list");
                 }
             }
-
-            // mMacRandomizationSetting supported from S.
-            if (SdkLevel.isAtLeastS() && Compatibility.isChangeEnabled(
-                    FORCE_MUTUAL_EXCLUSIVE_BSSID_MAC_RAMDONIZATION_SETTING)
-                    && mBssid != null && mMacRandomizationSetting != RANDOMIZATION_NONE) {
-                throw new IllegalArgumentException("A BSSID had configured but MAC randomization"
-                        + " setting is not NONE");
-            }
-
-            if (!Compatibility.isChangeEnabled(
-                    REMOVE_ZERO_FOR_TIMEOUT_SETTING) && mShutdownTimeoutMillis == DEFAULT_TIMEOUT) {
-                mShutdownTimeoutMillis = 0; // Use 0 for legacy app.
-            }
-            return new SoftApConfiguration(mWifiSsid, mBssid, mPassphrase,
+            return new SoftApConfiguration(mSsid, mBssid, mPassphrase,
                     mHiddenSsid, mChannels, mSecurityType, mMaxNumberOfClients,
                     mAutoShutdownEnabled, mShutdownTimeoutMillis, mClientControlByUser,
                     mBlockedClientList, mAllowedClientList, mMacRandomizationSetting,
                     mBridgedModeOpportunisticShutdownEnabled, mIeee80211axEnabled,
-                    mIeee80211beEnabled, mIsUserConfiguration,
-                    mBridgedModeOpportunisticShutdownTimeoutMillis, mVendorElements,
-                    mPersistentRandomizedMacAddress, mAllowedAcsChannels2g, mAllowedAcsChannels5g,
-                    mAllowedAcsChannels6g, mMaxChannelBandwidth);
+                    mIsUserConfiguration);
         }
 
         /**
-         * Specifies a UTF-8 SSID for the AP.
+         * Specifies an SSID for the AP.
          * <p>
          * Null SSID only support when configure a local-only hotspot.
          * <p>
@@ -1363,75 +949,15 @@
          * @param ssid SSID of valid Unicode characters, or null to have the SSID automatically
          *             chosen by the framework.
          * @return Builder for chaining.
-         * @throws IllegalArgumentException when the SSID is empty, not unicode, or if the byte
-         *                                  representation is longer than 32 bytes.
-         *
-         * @deprecated Use {@link #setWifiSsid(WifiSsid)} instead.
+         * @throws IllegalArgumentException when the SSID is empty or not valid Unicode.
          */
         @NonNull
-        @Deprecated
         public Builder setSsid(@Nullable String ssid) {
-            if (ssid == null) {
-                mWifiSsid = null;
-                return this;
+            if (ssid != null) {
+                Preconditions.checkStringNotEmpty(ssid);
+                Preconditions.checkArgument(StandardCharsets.UTF_8.newEncoder().canEncode(ssid));
             }
-
-            Preconditions.checkStringNotEmpty(ssid);
-            Preconditions.checkArgument(StandardCharsets.UTF_8.newEncoder().canEncode(ssid));
-            mWifiSsid = WifiSsid.fromUtf8Text(ssid);
-            return this;
-        }
-
-        /**
-         * Specifies an SSID for the AP in the form of WifiSsid.
-         * <p>
-         * Null SSID only support when configure a local-only hotspot.
-         * <p>
-         * <li>If not set, defaults to null.</li>
-         *
-         * @param wifiSsid SSID, or null ot have the SSID automatically chosen by the framework.
-         * @return Builder for chaining.
-         */
-        @NonNull
-        @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-        public Builder setWifiSsid(@Nullable WifiSsid wifiSsid) {
-            if (!SdkLevel.isAtLeastT()) {
-                throw new UnsupportedOperationException();
-            }
-            mWifiSsid = wifiSsid;
-            return this;
-        }
-
-        /**
-         * Specify vendor-specific information elements for the (Soft) AP to transmit in its beacons
-         * and probe responses. Method also validates the structure and throws
-         * IllegalArgumentException in cases when ID of IE is not 0xDD (221) or incoming list
-         * contain duplicate elements.
-         *
-         * @param vendorElements VendorElements
-         * @return Builder for chaining.
-         */
-        @NonNull
-        @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-        public Builder setVendorElements(
-                @NonNull List<ScanResult.InformationElement> vendorElements) {
-            if (!SdkLevel.isAtLeastT()) {
-                throw new UnsupportedOperationException();
-            }
-            for (ScanResult.InformationElement e : vendorElements) {
-                if (e.id != ScanResult.InformationElement.EID_VSA) {
-                    throw new IllegalArgumentException("received InformationElement which is not "
-                            + "related to VendorElements. VendorElement block should start with "
-                            + HexEncoding.encodeToString(
-                                    new byte[]{ (byte) ScanResult.InformationElement.EID_VSA }));
-                }
-            }
-            final HashSet<ScanResult.InformationElement> set = new HashSet<>(vendorElements);
-            if (set.size() < vendorElements.size()) {
-                throw new IllegalArgumentException("vendor elements array contain duplicates. "
-                        + "Please avoid passing duplicated and keep structure clean.");
-            }
-            mVendorElements = new ArrayList<>(vendorElements);
+            mSsid = ssid;
             return this;
         }
 
@@ -1440,9 +966,6 @@
          * <p>
          * <li>If not set, defaults to null.</li>
          *
-         * When this method is called, the caller needs to configure MAC randomization settings to
-         * {@link #RANDOMIZATION_NONE}. See {@link #setMacRandomizationSetting(int)} for details.
-         *
          * If multiple bands are requested via {@link #setBands(int[])} or
          * {@link #setChannels(SparseIntArray)}, HAL will derive 2 MAC addresses since framework
          * only sends down 1 MAC address.
@@ -1489,38 +1012,34 @@
          * {@link #SECURITY_TYPE_OPEN},
          * {@link #SECURITY_TYPE_WPA2_PSK},
          * {@link #SECURITY_TYPE_WPA3_SAE_TRANSITION},
-         * {@link #SECURITY_TYPE_WPA3_SAE},
-         * {@link #SECURITY_TYPE_WPA3_OWE_TRANSITION},
-         * {@link #SECURITY_TYPE_WPA3_OWE}.
+         * {@link #SECURITY_TYPE_WPA3_SAE}.
          * @param passphrase The passphrase to use for sepcific {@code securityType} configuration
-         * or null with {@link #SECURITY_TYPE_OPEN}, {@link #SECURITY_TYPE_WPA3_OWE_TRANSITION},
-         * and {@link #SECURITY_TYPE_WPA3_OWE}.
+         * or null with {@link #SECURITY_TYPE_OPEN}.
          *
          * @return Builder for chaining.
-         * @throws IllegalArgumentException when the passphrase length is empty and
-         *         {@code securityType} is any of the following:
-         *         {@link #SECURITY_TYPE_WPA2_PSK} or {@link #SECURITY_TYPE_WPA3_SAE_TRANSITION}
-         *         or {@link #SECURITY_TYPE_WPA3_SAE},
+         * @throws IllegalArgumentException when the passphrase length is invalid and
+         *         {@code securityType} is not {@link #SECURITY_TYPE_OPEN}
          *         or non-null passphrase and {@code securityType} is
-         *         {@link #SECURITY_TYPE_OPEN} or {@link #SECURITY_TYPE_WPA3_OWE_TRANSITION} or
-         *         {@link #SECURITY_TYPE_WPA3_OWE}.
+         *         {@link #SECURITY_TYPE_OPEN}.
          */
         @NonNull
         public Builder setPassphrase(@Nullable String passphrase, @SecurityType int securityType) {
-            if (!SdkLevel.isAtLeastT()
-                    && (securityType == SECURITY_TYPE_WPA3_OWE_TRANSITION
-                            || securityType == SECURITY_TYPE_WPA3_OWE)) {
-                throw new UnsupportedOperationException();
-            }
-            if (securityType == SECURITY_TYPE_OPEN
-                    || securityType == SECURITY_TYPE_WPA3_OWE_TRANSITION
-                    || securityType == SECURITY_TYPE_WPA3_OWE) {
+            if (securityType == SECURITY_TYPE_OPEN) {
                 if (passphrase != null) {
                     throw new IllegalArgumentException(
                             "passphrase should be null when security type is open");
                 }
             } else {
                 Preconditions.checkStringNotEmpty(passphrase);
+                if (securityType == SECURITY_TYPE_WPA2_PSK
+                        || securityType == SECURITY_TYPE_WPA3_SAE_TRANSITION) {
+                    if (passphrase.length() < PSK_MIN_LEN || passphrase.length() > PSK_MAX_LEN) {
+                        throw new IllegalArgumentException(
+                                "Password size must be at least " + PSK_MIN_LEN
+                                + " and no more than " + PSK_MAX_LEN
+                                + " for WPA2_PSK and WPA3_SAE_TRANSITION Mode");
+                    }
+                }
             }
             mSecurityType = securityType;
             mPassphrase = passphrase;
@@ -1782,31 +1301,23 @@
          * The Soft AP will shut down when there are no devices connected to it for
          * the timeout duration.
          *
-         * Specify a value of {@link #DEFAULT_TIMEOUT} to have the framework automatically use
-         * default timeout setting which defined in
-         * {@link R.integer.config_wifi_framework_soft_ap_timeout_delay}
+         * Specify a value of 0 to have the framework automatically use default timeout
+         * setting which defined in {@link R.integer.config_wifi_framework_soft_ap_timeout_delay}
          *
          * <p>
-         * <li>If not set, defaults to {@link #DEFAULT_TIMEOUT}</li>
+         * <li>If not set, defaults to 0</li>
          * <li>The shut down timeout will apply when {@link #setAutoShutdownEnabled(boolean)} is
          * set to true</li>
          *
-         * @param timeoutMillis milliseconds of the timeout delay. Any value less than 1 is invalid
-         *                      except {@link #DEFAULT_TIMEOUT}.
+         * @param timeoutMillis milliseconds of the timeout delay.
          * @return Builder for chaining.
          *
          * @see #setAutoShutdownEnabled(boolean)
          */
         @NonNull
-        public Builder setShutdownTimeoutMillis(@IntRange(from = -1) long timeoutMillis) {
-            if (Compatibility.isChangeEnabled(
-                    REMOVE_ZERO_FOR_TIMEOUT_SETTING) && timeoutMillis < 1) {
-                if (timeoutMillis != DEFAULT_TIMEOUT) {
-                    throw new IllegalArgumentException("Invalid timeout value: " + timeoutMillis);
-                }
-            } else if (timeoutMillis < 0) {
-                throw new IllegalArgumentException("Invalid timeout value from legacy app: "
-                        + timeoutMillis);
+        public Builder setShutdownTimeoutMillis(@IntRange(from = 0) long timeoutMillis) {
+            if (timeoutMillis < 0) {
+                throw new IllegalArgumentException("Invalid timeout value");
             }
             mShutdownTimeoutMillis = timeoutMillis;
             return this;
@@ -1846,104 +1357,6 @@
             return this;
         }
 
-        /**
-         * Configures the set of channel numbers in the specified band that are allowed
-         * to be selected by the Automatic Channel Selection (ACS) algorithm.
-         * <p>
-         *
-         * Requires the driver to support {@link SoftApCapability#SOFTAP_FEATURE_ACS_OFFLOAD}.
-         * Otherwise, these sets will be ignored.
-         * <p>
-         *
-         * @param band one of the following band types:
-         * {@link #BAND_2GHZ}, {@link #BAND_5GHZ}, {@link #BAND_6GHZ}.
-         *
-         * @param channels that are allowed to be used by ACS algorithm in this band. If it is
-         * configured to an empty array or not configured, then all channels within that band
-         * will be allowed.
-         * <p>
-         *
-         * @return Builder for chaining.
-         */
-        @NonNull
-        @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-        public Builder setAllowedAcsChannels(@BandType int band, @NonNull int[] channels) {
-            if (!SdkLevel.isAtLeastT()) {
-                throw new UnsupportedOperationException();
-            }
-
-            if (channels == null) {
-                throw new IllegalArgumentException(
-                        "Passing a null object to setAllowedAcsChannels");
-            }
-
-            if ((band != BAND_2GHZ) && (band != BAND_5GHZ) && (band != BAND_6GHZ)) {
-                throw new IllegalArgumentException(
-                        "Passing an invalid band to setAllowedAcsChannels");
-            }
-
-            for (int channel : channels) {
-                if (!isChannelBandPairValid(channel, band)) {
-                    throw new IllegalArgumentException(
-                            "Invalid channel to setAllowedAcsChannels: band: " + band
-                            + "channel: " + channel);
-                }
-            }
-
-            HashSet<Integer> set = IntStream.of(channels).boxed()
-                    .collect(Collectors.toCollection(HashSet::new));
-            switch(band) {
-                case BAND_2GHZ:
-                    mAllowedAcsChannels2g = set;
-                    break;
-                case BAND_5GHZ:
-                    mAllowedAcsChannels5g = set;
-                    break;
-                case BAND_6GHZ:
-                    mAllowedAcsChannels6g = set;
-                    break;
-            }
-
-            return this;
-        }
-
-        /**
-         * Sets maximum channel bandwidth for the SoftAp Connection
-         *
-         * If not set, the SoftAp connection will seek the maximum channel bandwidth achievable on
-         * the device. However, in some cases the caller will need to put a cap on the channel
-         * bandwidth through this API.
-         *
-         * @param maxChannelBandwidth one of {@link SoftApInfo#CHANNEL_WIDTH_AUTO},
-         * {@link SoftApInfo#CHANNEL_WIDTH_20MHZ}, {@link SoftApInfo#CHANNEL_WIDTH_40MHZ},
-         * {@link SoftApInfo#CHANNEL_WIDTH_80MHZ}, {@link SoftApInfo#CHANNEL_WIDTH_160MHZ},
-         * or {@link SoftApInfo#CHANNEL_WIDTH_320MHZ}
-         *
-         * @return builder for chaining
-         */
-        @NonNull
-        @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-        public Builder setMaxChannelBandwidth(@WifiAnnotations.Bandwidth int maxChannelBandwidth) {
-            if (!SdkLevel.isAtLeastT()) {
-                throw new UnsupportedOperationException();
-            }
-
-            switch (maxChannelBandwidth) {
-                case SoftApInfo.CHANNEL_WIDTH_AUTO:
-                case SoftApInfo.CHANNEL_WIDTH_20MHZ:
-                case SoftApInfo.CHANNEL_WIDTH_40MHZ:
-                case SoftApInfo.CHANNEL_WIDTH_80MHZ:
-                case SoftApInfo.CHANNEL_WIDTH_160MHZ:
-                case SoftApInfo.CHANNEL_WIDTH_320MHZ:
-                    mMaxChannelBandwidth = maxChannelBandwidth;
-                    break;
-                default:
-                    throw new IllegalArgumentException(
-                            "Invalid channel bandwidth value("
-                            + maxChannelBandwidth + ")  configured");
-            }
-            return this;
-        }
 
         /**
          * This method together with {@link setClientControlByUserEnabled(boolean)} control client
@@ -2000,25 +1413,20 @@
          * Specifies the level of MAC randomization for the AP BSSID.
          * The Soft AP BSSID will be randomized only if the BSSID isn't set
          * {@link #setBssid(MacAddress)} and this method is either uncalled
-         * or called with {@link #RANDOMIZATION_PERSISTENT} or
-         * {@link #RANDOMIZATION_NON_PERSISTENT}. When this method is called with
-         * {@link #RANDOMIZATION_PERSISTENT} or {@link #RANDOMIZATION_NON_PERSISTENT}, the caller
-         * the caller must not call {@link #setBssid(MacAddress)}.
+         * or called with {@link #RANDOMIZATION_PERSISTENT}.
          *
          * <p>
-         * <li>If not set, defaults to {@link #RANDOMIZATION_NON_PERSISTENT}</li>
+         * <li>If not set, defaults to {@link #RANDOMIZATION_PERSISTENT}</li>
          *
          * <p>
-         * Requires HAL support when set to {@link #RANDOMIZATION_PERSISTENT} or
-         * {@link #RANDOMIZATION_NON_PERSISTENT}.
+         * Requires HAL support when set to {@link #RANDOMIZATION_PERSISTENT}.
          * Use {@link WifiManager.SoftApCallback#onCapabilityChanged(SoftApCapability)} and
          * {@link SoftApCapability#areFeaturesSupported(long)}
          * with {@link SoftApCapability.SOFTAP_FEATURE_MAC_ADDRESS_CUSTOMIZATION} to determine
          * whether or not this feature is supported.
          *
          * @param macRandomizationSetting One of the following setting:
-         * {@link #RANDOMIZATION_NONE}, {@link #RANDOMIZATION_PERSISTENT} or
-         * {@link #RANDOMIZATION_NON_PERSISTENT}.
+         * {@link #RANDOMIZATION_NONE} or {@link #RANDOMIZATION_PERSISTENT}.
          * @return Builder for chaining.
          *
          * @see #setBssid(MacAddress)
@@ -2104,34 +1512,6 @@
         }
 
         /**
-         * Specifies whether or not to enable 802.11be on the Soft AP.
-         *
-         * <p>
-         * Note: Only relevant when the device supports 802.11be on the Soft AP.
-         * If enabled on devices that do not support 802.11be then ignored.
-         * Use {@link WifiManager.SoftApCallback#onCapabilityChanged(SoftApCapability)} and
-         * {@link SoftApCapability#areFeaturesSupported(long)}
-         * with {@link SoftApCapability.SOFTAP_FEATURE_IEEE80211_BE} to determine
-         * whether or not 802.11be is supported on the Soft AP.
-         * <p>
-         * <li>If not set, defaults to true - which will be ignored on devices
-         * which do not support 802.11be</li>
-         *
-         * @param enable true to enable, false to disable.
-         * @return Builder for chaining.
-         *
-         */
-        @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-        @NonNull
-        public Builder setIeee80211beEnabled(boolean enable) {
-            if (!SdkLevel.isAtLeastT()) {
-                throw new UnsupportedOperationException();
-            }
-            mIeee80211beEnabled = enable;
-            return this;
-        }
-
-        /**
          * Specifies whether or not the configuration is configured by user.
          *
          * @param isUserConfigured true to user configuration, false otherwise.
@@ -2144,54 +1524,5 @@
             mIsUserConfiguration = isUserConfigured;
             return this;
         }
-
-        /**
-         * Specifies bridged mode opportunistic shutdown timeout in milliseconds.
-         * An instance of bridged Soft AP will shut down when there is no device connected to it
-         * for this timeout duration.
-         *
-         * Specify a value of {@link DEFAULT_TIMEOUT} to have the framework automatically use
-         * default timeout setting defined by
-         * {@link
-         * R.integer.config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond}
-         *
-         * <p>
-         * <li>If not set, defaults to {@link #DEFAULT_TIMEOUT}</li>
-         * <li>The shut down timeout will apply when
-         * {@link #setBridgedModeOpportunisticShutdownEnabled(boolean)} is set to true</li>
-         *
-         * @param timeoutMillis milliseconds of the timeout delay. Any value less than 1 is invalid
-         *                      except {@link #DEFAULT_TIMEOUT}.
-         * @return Builder for chaining.
-         *
-         * @see #setBridgedModeOpportunisticShutdownEnabled(boolean)
-         */
-        @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-        @NonNull
-        public Builder setBridgedModeOpportunisticShutdownTimeoutMillis(
-                @IntRange(from = -1) long timeoutMillis) {
-            if (!SdkLevel.isAtLeastT()) {
-                throw new UnsupportedOperationException();
-            }
-            if (timeoutMillis < 1 && timeoutMillis != DEFAULT_TIMEOUT) {
-                throw new IllegalArgumentException("Invalid timeout value: " + timeoutMillis);
-            }
-            mBridgedModeOpportunisticShutdownTimeoutMillis = timeoutMillis;
-            return this;
-        }
-
-        /**
-         * @param mac persistent randomized MacAddress generated by the frameworks.
-         * @hide
-         */
-        @NonNull
-        public Builder setRandomizedMacAddress(@NonNull MacAddress mac) {
-            if (mac == null) {
-                throw new IllegalArgumentException("setRandomizedMacAddress received"
-                        + " null MacAddress.");
-            }
-            mPersistentRandomizedMacAddress = mac;
-            return this;
-        }
     }
 }
diff --git a/framework/java/android/net/wifi/SoftApInfo.java b/framework/java/android/net/wifi/SoftApInfo.java
index faf064a..b1b1fe0 100644
--- a/framework/java/android/net/wifi/SoftApInfo.java
+++ b/framework/java/android/net/wifi/SoftApInfo.java
@@ -41,13 +41,6 @@
 public final class SoftApInfo implements Parcelable {
 
     /**
-     * AP Channel bandwidth is automatically selected by the chip.
-     *
-     * @see #getBandwidth()
-     */
-    public static final int CHANNEL_WIDTH_AUTO = -1;
-
-   /**
      * AP Channel bandwidth is invalid.
      *
      * @see #getBandwidth()
@@ -124,14 +117,6 @@
      */
     public static final int CHANNEL_WIDTH_8640MHZ = 10;
 
-    /**
-     * AP Channel bandwidth is 320 MHZ.
-     *
-     * @see #getBandwidth()
-     */
-    public static final int CHANNEL_WIDTH_320MHZ = 11;
-
-
     /** The frequency which AP resides on.  */
     private int mFrequency = 0;
 
@@ -176,10 +161,9 @@
      *
      * @return One of {@link #CHANNEL_WIDTH_20MHZ}, {@link #CHANNEL_WIDTH_40MHZ},
      * {@link #CHANNEL_WIDTH_80MHZ}, {@link #CHANNEL_WIDTH_160MHZ},
-     * {@link #CHANNEL_WIDTH_80MHZ_PLUS_MHZ}, {@link #CHANNEL_WIDTH_320MHZ},
-     * {@link #CHANNEL_WIDTH_2160MHZ}, {@link #CHANNEL_WIDTH_4320MHZ},
-     * {@link #CHANNEL_WIDTH_6480MHZ}, {@link #CHANNEL_WIDTH_8640MHZ},
-     * {@link #CHANNEL_WIDTH_AUTO} ,or {@link #CHANNEL_WIDTH_INVALID}.
+     * {@link #CHANNEL_WIDTH_80MHZ_PLUS_MHZ}, {@link #CHANNEL_WIDTH_2160MHZ},
+     * {@link #CHANNEL_WIDTH_4320MHZ}, {@link #CHANNEL_WIDTH_6480MHZ},
+     * {@link #CHANNEL_WIDTH_8640MHZ}, or {@link #CHANNEL_WIDTH_INVALID}.
      */
     @WifiAnnotations.Bandwidth
     public int getBandwidth() {
diff --git a/framework/java/android/net/wifi/WifiAnnotations.java b/framework/java/android/net/wifi/WifiAnnotations.java
index 91a1973..580a638 100644
--- a/framework/java/android/net/wifi/WifiAnnotations.java
+++ b/framework/java/android/net/wifi/WifiAnnotations.java
@@ -57,7 +57,6 @@
             SoftApInfo.CHANNEL_WIDTH_80MHZ,
             SoftApInfo.CHANNEL_WIDTH_80MHZ_PLUS_MHZ,
             SoftApInfo.CHANNEL_WIDTH_160MHZ,
-            SoftApInfo.CHANNEL_WIDTH_320MHZ,
             SoftApInfo.CHANNEL_WIDTH_2160MHZ,
             SoftApInfo.CHANNEL_WIDTH_4320MHZ,
             SoftApInfo.CHANNEL_WIDTH_6480MHZ,
@@ -72,21 +71,10 @@
             ScanResult.CHANNEL_WIDTH_80MHZ,
             ScanResult.CHANNEL_WIDTH_160MHZ,
             ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ,
-            ScanResult.CHANNEL_WIDTH_320MHZ,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface ChannelWidth{}
 
-    @IntDef(prefix = { "PREAMBLE_" }, value = {
-            ScanResult.PREAMBLE_LEGACY,
-            ScanResult.PREAMBLE_HT,
-            ScanResult.PREAMBLE_VHT,
-            ScanResult.PREAMBLE_HE,
-            ScanResult.PREAMBLE_EHT,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface PreambleType {}
-
     @IntDef(prefix = { "WIFI_STANDARD_" }, value = {
             ScanResult.WIFI_STANDARD_UNKNOWN,
             ScanResult.WIFI_STANDARD_LEGACY,
@@ -94,7 +82,6 @@
             ScanResult.WIFI_STANDARD_11AC,
             ScanResult.WIFI_STANDARD_11AX,
             ScanResult.WIFI_STANDARD_11AD,
-            ScanResult.WIFI_STANDARD_11BE,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface WifiStandard{}
diff --git a/framework/java/android/net/wifi/WifiAvailableChannel.java b/framework/java/android/net/wifi/WifiAvailableChannel.java
index 6e56214..06de4ab 100644
--- a/framework/java/android/net/wifi/WifiAvailableChannel.java
+++ b/framework/java/android/net/wifi/WifiAvailableChannel.java
@@ -101,12 +101,6 @@
     public static final int FILTER_CONCURRENCY = 1 << 1;
 
     /**
-     * Filter channel for the Wi-Fi Aware instant communication mode.
-     * @hide
-     */
-    public static final int FILTER_NAN_INSTANT_MODE = 1 << 2;
-
-    /**
      * @hide
      */
     @Retention(RetentionPolicy.SOURCE)
@@ -114,7 +108,6 @@
             FILTER_REGULATORY,
             FILTER_CELLULAR_COEXISTENCE,
             FILTER_CONCURRENCY,
-            FILTER_NAN_INSTANT_MODE,
     })
     public @interface Filter {}
 
diff --git a/framework/java/android/net/wifi/WifiConfiguration.java b/framework/java/android/net/wifi/WifiConfiguration.java
index 73761cf..326fa0f 100644
--- a/framework/java/android/net/wifi/WifiConfiguration.java
+++ b/framework/java/android/net/wifi/WifiConfiguration.java
@@ -19,7 +19,6 @@
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.annotation.RequiresPermission;
 import android.annotation.SuppressLint;
 import android.annotation.SystemApi;
 import android.compat.annotation.UnsupportedAppUsage;
@@ -33,7 +32,6 @@
 import android.net.Uri;
 import android.os.Build;
 import android.os.Parcel;
-import android.os.ParcelUuid;
 import android.os.Parcelable;
 import android.os.SystemClock;
 import android.os.UserHandle;
@@ -56,9 +54,7 @@
 import java.util.Calendar;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -138,8 +134,7 @@
                 WAPI_PSK,
                 WAPI_CERT,
                 FILS_SHA256,
-                FILS_SHA384,
-                DPP})
+                FILS_SHA384})
         public @interface KeyMgmtScheme {}
 
         /** WPA is not used; plaintext or static WEP could be used. */
@@ -231,20 +226,12 @@
          */
         public static final int FILS_SHA384 = 16;
 
-        /**
-         * Easy Connect - AKA Device Provisioning Protocol (DPP)
-         * For more details, visit <a href="https://www.wi-fi.org/">https://www.wi-fi.org/</a> and
-         * search for "Easy Connect" or "Device Provisioning Protocol specification".
-         * @hide
-         */
-        public static final int DPP = 17;
-
         public static final String varName = "key_mgmt";
 
         public static final String[] strings = { "NONE", "WPA_PSK", "WPA_EAP",
                 "IEEE8021X", "WPA2_PSK", "OSEN", "FT_PSK", "FT_EAP",
                 "SAE", "OWE", "SUITE_B_192", "WPA_PSK_SHA256", "WPA_EAP_SHA256",
-                "WAPI_PSK", "WAPI_CERT", "FILS_SHA256", "FILS_SHA384", "DPP" };
+                "WAPI_PSK", "WAPI_CERT", "FILS_SHA256", "FILS_SHA384" };
     }
 
     /**
@@ -533,14 +520,11 @@
      */
     public static final int SECURITY_TYPE_PASSPOINT_R3 = 12;
 
-    /** Security type for Easy Connect (DPP) network */
-    public static final int SECURITY_TYPE_DPP = 13;
-
     /**
      * This is used for the boundary check and should be the same as the last type.
      * @hide
      */
-    public static final int SECURITY_TYPE_NUM = SECURITY_TYPE_DPP;
+    public static final int SECURITY_TYPE_NUM = SECURITY_TYPE_PASSPOINT_R3;
 
     /**
      * Security types we support.
@@ -561,7 +545,6 @@
             SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT,
             SECURITY_TYPE_PASSPOINT_R1_R2,
             SECURITY_TYPE_PASSPOINT_R3,
-            SECURITY_TYPE_DPP,
     })
     public @interface SecurityType {}
 
@@ -570,7 +553,7 @@
         "wpa3-sae", "wpa3 enterprise 192-bit", "owe",
         "wapi-psk", "wapi-cert", "wpa3 enterprise",
         "wpa3 enterprise 192-bit", "passpoint r1/r2",
-        "passpoint r3", "dpp"};
+        "passpoint r3"};
 
     private List<SecurityParams> mSecurityParamsList = new ArrayList<>();
 
@@ -585,10 +568,6 @@
      * <br>
      * This API would clear existing security types and add a default one.
      *
-     * Before calling this API with {@link #SECURITY_TYPE_DPP} as securityType,
-     * call {@link WifiManager#isEasyConnectDppAkmSupported() to know whether this security type is
-     * supported or not.
-     *
      * @param securityType One of the following security types:
      * {@link #SECURITY_TYPE_OPEN},
      * {@link #SECURITY_TYPE_WEP},
@@ -600,7 +579,6 @@
      * {@link #SECURITY_TYPE_WAPI_CERT},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT},
-     * {@link #SECURITY_TYPE_DPP},
      */
     public void setSecurityParams(@SecurityType int securityType) {
         // Clear existing data.
@@ -669,7 +647,6 @@
      * {@link #SECURITY_TYPE_WAPI_CERT},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT},
-     * {@link #SECURITY_TYPE_DPP},
      *
      * @hide
      */
@@ -740,8 +717,6 @@
             setSecurityParams(SECURITY_TYPE_WAPI_PSK);
         } else if (allowedKeyManagement.get(KeyMgmt.SUITE_B_192)) {
             setSecurityParams(SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT);
-        } else if (allowedKeyManagement.get(KeyMgmt.DPP)) {
-            setSecurityParams(SECURITY_TYPE_DPP);
         } else if (allowedKeyManagement.get(KeyMgmt.OWE)) {
             setSecurityParams(SECURITY_TYPE_OWE);
         } else if (allowedKeyManagement.get(KeyMgmt.SAE)) {
@@ -784,7 +759,6 @@
      * {@link #SECURITY_TYPE_WAPI_CERT},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT},
-     * {@link #SECURITY_TYPE_DPP},
      *
      * @hide
      */
@@ -834,7 +808,6 @@
      * {@link #SECURITY_TYPE_WAPI_CERT},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT},
-     * {@link #SECURITY_TYPE_DPP},
      *
      * @return the copy of specific security params if found; otherwise null.
      * @hide
@@ -861,7 +834,6 @@
      * {@link #SECURITY_TYPE_WAPI_CERT},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT},
-     * {@link #SECURITY_TYPE_DPP},
      *
      * @return true if there is a security params matches the type.
      * @hide
@@ -1006,7 +978,7 @@
      */
     public int networkId;
 
-    // TODO (b/235236813): Remove this field and use quality network selection status instead.
+    // Fixme We need remove this field to use only Quality network selection status only
     /**
      * The current status of this network configuration entry.
      * @see Status
@@ -1030,55 +1002,6 @@
      */
     public String BSSID;
 
-    private List<MacAddress> mBssidAllowlist;
-
-    /**
-     * Set a list of BSSIDs to control if this network configuration entry should be used to
-     * associate an AP.
-     * <ul>
-     * <li>If set with {@code null}, then there are no restrictions on the connection. The
-     * configuration will associate to any AP.</li>
-     * <li>If set to an empty list then the configuration will not associate to any AP.</li>
-     * <li>If set to a non-empty list then the configuration will only associate to APs whose BSSID
-     * is on the list.</li>
-     * </ul>
-     * @param bssidAllowlist A list of {@link MacAddress} representing the BSSID of APs,
-     * {@code null} to allow all BSSIDs (no restriction).
-     * @hide
-     */
-    @SystemApi
-    public void setBssidAllowlist(@Nullable List<MacAddress> bssidAllowlist) {
-        if (bssidAllowlist == null) {
-            mBssidAllowlist = null;
-            return;
-        }
-        mBssidAllowlist = new ArrayList<>(bssidAllowlist);
-    }
-
-    /**
-     * Get a list of BSSIDs specified on this network configuration entry, set by
-     * {@link #setBssidAllowlist(List)}.
-     * @return A list of {@link MacAddress} representing BSSID to allow associate, {@code null} for
-     * allowing all BSSIDs (no restriction).
-     * @hide
-     */
-    @SuppressLint("NullableCollection")
-    @SystemApi
-    @Nullable
-    public List<MacAddress> getBssidAllowlist() {
-        if (mBssidAllowlist == null) {
-            return null;
-        }
-        return new ArrayList<>(mBssidAllowlist);
-    }
-
-    /**
-     * @hide
-     */
-    public List<MacAddress> getBssidAllowlistInternal() {
-        return mBssidAllowlist;
-    }
-
     /** @hide */
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(prefix = {"AP_BAND_"}, value = {
@@ -1416,9 +1339,6 @@
     @SystemApi
     public int subscriptionId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
 
-    @Nullable
-    private ParcelUuid mSubscriptionGroup = null;
-
     /**
      * Auto-join is allowed by user for this network.
      * Default true.
@@ -1566,14 +1486,6 @@
     public boolean oemPrivate;
 
     /**
-     * Indicate whether or not the network is a secondary network with internet, associated with
-     * a DBS AP same as the primary network on a different band.
-     * This bit is set when this Wifi configuration is created from {@link WifiConnectivityManager}.
-     * @hide
-     */
-    public boolean dbsSecondaryInternet;
-
-    /**
      * Indicate whether or not the network is a carrier merged network.
      * This bit can only be used by suggestion network, see
      * {@link WifiNetworkSuggestion.Builder#setCarrierMerged(boolean)}
@@ -1611,49 +1523,6 @@
     @SystemApi
     public boolean meteredHint;
 
-    /**
-     * True if this configuration is intended to be repeater enabled to expand coverage.
-     */
-    private boolean mIsRepeaterEnabled;
-
-    /**
-     * Sets if this configuration is intended to be repeater enabled for expanded coverage.
-     *
-     * @param isRepeaterEnabled true if this network is intended to be repeater enabled,
-     *        false otherwise.
-     *
-     * This request is only accepted if the caller is holding
-     * {@link android.Manifest.permission#NETWORK_SETTINGS}.
-     *
-     * @hide
-     */
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    @SystemApi
-    public void setRepeaterEnabled(boolean isRepeaterEnabled) {
-        mIsRepeaterEnabled = isRepeaterEnabled;
-    }
-
-    /**
-     * Returns if this configuration is intended to be repeater enabled for expanded coverage.
-     *
-     * @return true if this network is intended to be repeater enabled, false otherwise.
-     *
-     * @hide
-     */
-    @SystemApi
-    public boolean isRepeaterEnabled() {
-        return mIsRepeaterEnabled;
-    }
-
-    /**
-     * Indicate whether the network is restricted or not.
-     *
-     * This bit can only be used by suggestion network, see
-     * {@link WifiNetworkSuggestion.Builder#setRestricted(boolean)}
-     * @hide
-     */
-    public boolean restricted;
-
     /** @hide */
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(prefix = {"METERED_OVERRIDE_"}, value = {
@@ -1792,23 +1661,30 @@
 
     /**
      * Use factory MAC when connecting to this network
+     * @hide
      */
+    @SystemApi
     public static final int RANDOMIZATION_NONE = 0;
-
     /**
      * Generate a randomized MAC once and reuse it for all connections to this network
+     * @hide
      */
+    @SystemApi
     public static final int RANDOMIZATION_PERSISTENT = 1;
 
     /**
      * Use a randomly generated MAC address for connections to this network.
      * This option does not persist the randomized MAC address.
+     * @hide
      */
+    @SystemApi
     public static final int RANDOMIZATION_NON_PERSISTENT = 2;
 
     /**
      * Let the wifi framework automatically decide the MAC randomization strategy.
+     * @hide
      */
+    @SystemApi
     public static final int RANDOMIZATION_AUTO = 3;
 
     /**
@@ -1823,30 +1699,6 @@
     public int macRandomizationSetting = RANDOMIZATION_AUTO;
 
     /**
-     * Set the MAC randomization setting for this network.
-     * <p>
-     * Caller must satify one of the following conditions:
-     * </p>
-     * <ul>
-     * <li>Have {@code android.Manifest.permission#NETWORK_SETTINGS} permission.</li>
-     * <li>Have {@code android.Manifest.permission#NETWORK_SETUP_WIZARD} permission.</li>
-     * <li>Be in Demo Mode.</li>
-     * <li>Be the creator adding or updating a passpoint network.</li>
-     * <li>Be an admin updating their own network.</li>
-     * </ul>
-     */
-    public void setMacRandomizationSetting(@MacRandomizationSetting int macRandomizationSetting) {
-        this.macRandomizationSetting = macRandomizationSetting;
-    }
-
-    /**
-     * Get the MAC randomization setting for this network.
-     */
-    public @MacRandomizationSetting int getMacRandomizationSetting() {
-        return this.macRandomizationSetting;
-    }
-
-    /**
      * Randomized MAC address to use with this particular network
      * @hide
      */
@@ -1854,7 +1706,7 @@
     private MacAddress mRandomizedMacAddress;
 
     /**
-     * The wall clock time of when |mRandomizedMacAddress| should be re-randomized in non-persistent
+     * The wall clock time of when |mRandomizedMacAddress| should be re-randomized in enhanced
      * MAC randomization mode.
      * @hide
      */
@@ -1903,116 +1755,6 @@
         mRandomizedMacAddress = mac;
     }
 
-    /**
-     * This network supports DPP AKM and the device is configured to
-     * onboard peer enrollee devices with {@link #SECURITY_TYPE_DPP}
-     * @hide
-     */
-    private boolean mIsDppConfigurator;
-
-    /**
-     * Private elliptic curve key used by DPP Configurator to generate other DPP Keys
-     * for DPP-AKM based network configuration.
-     * @hide
-     */
-    private byte[] mDppPrivateEcKey;
-
-    /**
-     * Signed DPP connector. The connector is used by a pair of Enrollee devices to establish
-     * a security association using the DPP Introduction Protocol.
-     * @hide
-     */
-    private byte[] mDppConnector;
-
-    /**
-     * The public signing key of the DPP configurator.
-     * @hide
-     */
-    private byte[] mDppCSignKey;
-
-    /**
-     * DPP network access key (own private key)
-     * @hide
-     */
-    private byte[] mDppNetAccessKey;
-
-    /**
-     * Set DPP Connection keys which are used for network access.
-     * This is required for SECURITY_TYPE_DPP network connection.
-     * @hide
-     */
-    public void setDppConnectionKeys(byte[] connector, byte[] cSignKey, byte[] netAccessKey) {
-        if (connector == null || cSignKey == null || netAccessKey == null) {
-            Log.e(TAG, "One of DPP key is null");
-            return;
-        }
-        mDppConnector = connector.clone();
-        mDppCSignKey = cSignKey.clone();
-        mDppNetAccessKey = netAccessKey.clone();
-    }
-
-    /**
-     * Allow this profile as configurable DPP profile.
-     * This is required to allow SECURITY_TYPE_DPP profile to be eligible for Configuration
-     * of DPP-Enrollees.
-     * @hide
-     */
-    public void setDppConfigurator(byte[] ecKey) {
-        if (ecKey != null) {
-            mDppPrivateEcKey = ecKey.clone();
-            mIsDppConfigurator = true;
-        }
-    }
-
-    /**
-     * To check if this WifiConfiguration supports configuring a peer Enrollee device with
-     * SECURITY_TYPE_DPP
-     */
-    public boolean isDppConfigurator() {
-        return mIsDppConfigurator;
-    }
-
-    /**
-     * Get private elliptic curve key used by DPP Configurator to generate other DPP Keys
-     * for DPP-AKM based network configuration.
-     * @hide
-     */
-    @SystemApi
-    @NonNull public byte[] getDppPrivateEcKey() {
-        return mDppPrivateEcKey.clone();
-    }
-
-    /**
-     * Get DPP signed connector. The connector is used by a pair of Enrollee devices to establish
-     * a security association using the DPP Introduction Protocol.
-     * @hide
-     */
-    @SystemApi
-    @NonNull public byte[] getDppConnector() {
-        return mDppConnector.clone();
-    }
-
-    /**
-     * Get public signing key of the DPP configurator. This key is used by provisioned devices
-     * to verify Connectors of other devices are signed by the same Configurator. The configurator
-     * derives and sets the C-sign-key in each DPP Configuration object.
-     *
-     * @hide
-     */
-    @SystemApi
-    @NonNull public byte[] getDppCSignKey() {
-        return mDppCSignKey.clone();
-    }
-
-    /**
-     * Get DPP network access key. Own private key used to generate common secret, PMK.
-     * @hide
-     */
-    @SystemApi
-    @NonNull public byte[] getDppNetAccessKey() {
-        return mDppNetAccessKey.clone();
-    }
-
     /** @hide
      * Boost given to RSSI on a home network for the purpose of calculating the score
      * This adds stickiness to home networks, as defined by:
@@ -2394,11 +2136,6 @@
         private SecurityParams mCandidateSecurityParams;
 
         /**
-         * Used to cache the last used security params for the candidate.
-         */
-        private SecurityParams mLastUsedSecurityParams;
-
-        /**
          * Indicate whether this network is visible in latest Qualified Network Selection. This
          * means there is scan result found related to this Configuration and meet the minimum
          * requirement. The saved network need not join latest Qualified Network Selection. For
@@ -2498,24 +2235,6 @@
         }
 
         /**
-         * set the last used security type of the network
-         * @param params value to set to mLastUsedSecurityParams
-         * @hide
-         */
-        public void setLastUsedSecurityParams(SecurityParams params) {
-            mLastUsedSecurityParams = params;
-        }
-
-        /**
-         * get the last used security type of the network
-         * @return return the security params
-         * @hide
-         */
-        public SecurityParams getLastUsedSecurityParams() {
-            return mLastUsedSecurityParams;
-        }
-
-        /**
          * get user preferred choice over this configuration
          * @return returns configKey of user preferred choice over this configuration
          * @hide
@@ -2853,7 +2572,6 @@
             setCandidate(source.getCandidate());
             setCandidateScore(source.getCandidateScore());
             setCandidateSecurityParams(source.getCandidateSecurityParams());
-            setLastUsedSecurityParams(source.getLastUsedSecurityParams());
             setConnectChoice(source.getConnectChoice());
             setConnectChoiceRssi(source.getConnectChoiceRssi());
             setHasEverConnected(source.hasEverConnected());
@@ -2861,7 +2579,7 @@
         }
 
         /** @hide */
-        public void writeToParcel(Parcel dest, int flags) {
+        public void writeToParcel(Parcel dest) {
             dest.writeInt(getNetworkSelectionStatus());
             dest.writeInt(getNetworkSelectionDisableReason());
             for (int index = DISABLED_NONE; index < NETWORK_SELECTION_DISABLED_MAX;
@@ -2879,8 +2597,6 @@
             }
             dest.writeInt(hasEverConnected() ? 1 : 0);
             dest.writeInt(hasNeverDetectedCaptivePortal() ? 1 : 0);
-            dest.writeParcelable(getCandidateSecurityParams(), flags);
-            dest.writeParcelable(getLastUsedSecurityParams(), flags);
         }
 
         /** @hide */
@@ -2901,8 +2617,6 @@
             }
             setHasEverConnected(in.readInt() != 0);
             setHasNeverDetectedCaptivePortal(in.readInt() != 0);
-            setCandidateSecurityParams((SecurityParams) in.readParcelable(null));
-            setLastUsedSecurityParams((SecurityParams) in.readParcelable(null));
         }
     }
 
@@ -3174,9 +2888,7 @@
         carrierMerged = false;
         fromWifiNetworkSuggestion = false;
         fromWifiNetworkSpecifier = false;
-        dbsSecondaryInternet = false;
         meteredHint = false;
-        mIsRepeaterEnabled = false;
         meteredOverride = METERED_OVERRIDE_NONE;
         useExternalScores = false;
         validatedInternetAccess = false;
@@ -3187,13 +2899,6 @@
         dtimInterval = 0;
         mRandomizedMacAddress = MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS);
         numRebootsSinceLastUse = 0;
-        restricted = false;
-        mBssidAllowlist = null;
-        mIsDppConfigurator = false;
-        mDppPrivateEcKey = new byte[0];
-        mDppConnector = new byte[0];
-        mDppCSignKey = new byte[0];
-        mDppNetAccessKey = new byte[0];
     }
 
     /**
@@ -3261,10 +2966,8 @@
                 .append(" PRIO: ").append(this.priority)
                 .append(" HIDDEN: ").append(this.hiddenSSID)
                 .append(" PMF: ").append(this.requirePmf)
-                .append(" CarrierId: ").append(this.carrierId)
-                .append(" SubscriptionId: ").append(this.subscriptionId)
-                .append(" SubscriptionGroup: ").append(this.mSubscriptionGroup)
-                .append(" Currently Connected: ").append(this.isCurrentlyConnected)
+                .append("CarrierId: ").append(this.carrierId)
+                .append("SubscriptionId").append(this.subscriptionId)
                 .append('\n');
 
 
@@ -3296,10 +2999,6 @@
                 .append(mNetworkSelectionStatus.hasEverConnected()).append("\n");
         sbuf.append(" hasNeverDetectedCaptivePortal: ")
                 .append(mNetworkSelectionStatus.hasNeverDetectedCaptivePortal()).append("\n");
-        sbuf.append(" mCandidateSecurityParams: ")
-                .append(mNetworkSelectionStatus.getCandidateSecurityParams());
-        sbuf.append(" mLastUsedSecurityParams: ")
-                .append(mNetworkSelectionStatus.getLastUsedSecurityParams());
 
         if (this.numAssociation > 0) {
             sbuf.append(" numAssociation ").append(this.numAssociation).append("\n");
@@ -3317,20 +3016,16 @@
         if (this.ephemeral) sbuf.append(" ephemeral");
         if (this.osu) sbuf.append(" osu");
         if (this.trusted) sbuf.append(" trusted");
-        if (this.restricted) sbuf.append(" restricted");
         if (this.oemPaid) sbuf.append(" oemPaid");
         if (this.oemPrivate) sbuf.append(" oemPrivate");
         if (this.carrierMerged) sbuf.append(" carrierMerged");
         if (this.fromWifiNetworkSuggestion) sbuf.append(" fromWifiNetworkSuggestion");
         if (this.fromWifiNetworkSpecifier) sbuf.append(" fromWifiNetworkSpecifier");
-        if (this.dbsSecondaryInternet) sbuf.append(" dbsSecondaryInternet");
         if (this.meteredHint) sbuf.append(" meteredHint");
-        if (this.mIsRepeaterEnabled) sbuf.append(" repeaterEnabled");
         if (this.useExternalScores) sbuf.append(" useExternalScores");
         if (this.validatedInternetAccess || this.ephemeral || this.trusted || this.oemPaid
                 || this.oemPrivate || this.carrierMerged || this.fromWifiNetworkSuggestion
-                || this.fromWifiNetworkSpecifier || this.meteredHint || this.useExternalScores
-                || this.restricted || this.dbsSecondaryInternet) {
+                || this.fromWifiNetworkSpecifier || this.meteredHint || this.useExternalScores) {
             sbuf.append("\n");
         }
         if (this.meteredOverride != METERED_OVERRIDE_NONE) {
@@ -3491,17 +3186,6 @@
         sbuf.append("recentFailure: ").append("Association Rejection code: ")
                 .append(recentFailure.getAssociationStatus()).append(", last update time: ")
                 .append(recentFailure.getLastUpdateTimeSinceBootMillis()).append("\n");
-        if (mBssidAllowlist != null) {
-            sbuf.append("bssidAllowList: [");
-            for (MacAddress bssid : mBssidAllowlist) {
-                sbuf.append(bssid + ", ");
-            }
-            sbuf.append("]");
-        } else {
-            sbuf.append("bssidAllowlist unset");
-        }
-        sbuf.append("\n");
-        sbuf.append("IsDppConfigurator: ").append(this.mIsDppConfigurator).append("\n");
         return sbuf.toString();
     }
 
@@ -3513,8 +3197,23 @@
     @NonNull
     @SystemApi
     public String getPrintableSsid() {
-        // TODO(b/136480579): Handle SSIDs with non-UTF-8 encodings.
-        return WifiInfo.removeDoubleQuotes(SSID);
+        if (SSID == null) return "";
+        final int length = SSID.length();
+        if (length > 2 && (SSID.charAt(0) == '"') && SSID.charAt(length - 1) == '"') {
+            return SSID.substring(1, length - 1);
+        }
+
+        /* The ascii-encoded string format is P"<ascii-encoded-string>"
+         * The decoding is implemented in the supplicant for a newly configured
+         * network.
+         */
+        if (length > 3 && (SSID.charAt(0) == 'P') && (SSID.charAt(1) == '"') &&
+                (SSID.charAt(length-1) == '"')) {
+            WifiSsid wifiSsid = WifiSsid.createFromAsciiEncoded(
+                    SSID.substring(2, length - 1));
+            return wifiSsid.toString();
+        }
+        return SSID;
     }
 
     /**
@@ -3635,8 +3334,6 @@
             return KeyMgmt.WAPI_PSK;
         } else if (allowedKeyManagement.get(KeyMgmt.WAPI_CERT)) {
             return KeyMgmt.WAPI_CERT;
-        } else if (allowedKeyManagement.get(KeyMgmt.DPP)) {
-            return KeyMgmt.DPP;
         }
         return KeyMgmt.NONE;
     }
@@ -3701,10 +3398,11 @@
 
     /**
      * Set the {@link IpConfiguration} for this network.
-     *
-     * @param ipConfiguration a {@link IpConfiguration} to use for this Wi-Fi configuration, or
-     *                        {@code null} to use the default configuration.
+     * @param ipConfiguration the {@link IpConfiguration} to set, or null to use the default
+     *                        constructor {@link IpConfiguration#IpConfiguration()}.
+     * @hide
      */
+    @SystemApi
     public void setIpConfiguration(@Nullable IpConfiguration ipConfiguration) {
         if (ipConfiguration == null) ipConfiguration = new IpConfiguration();
         mIpConfiguration = ipConfiguration;
@@ -3797,12 +3495,8 @@
         } else {
             proxySettingCopy = IpConfiguration.ProxySettings.STATIC;
             // Construct a new HTTP Proxy
-            String[] exclusionList = httpProxy.getExclusionList();
-            if (exclusionList == null) {
-                exclusionList = new String[0];
-            }
             httpProxyCopy = ProxyInfo.buildDirectProxy(httpProxy.getHost(), httpProxy.getPort(),
-                    Arrays.asList(exclusionList));
+                    Arrays.asList(httpProxy.getExclusionList()));
         }
         if (!httpProxyCopy.isValid()) {
             throw new IllegalArgumentException("Invalid ProxyInfo: " + httpProxyCopy.toString());
@@ -3887,15 +3581,12 @@
             ephemeral = source.ephemeral;
             osu = source.osu;
             trusted = source.trusted;
-            restricted = source.restricted;
             oemPaid = source.oemPaid;
             oemPrivate = source.oemPrivate;
             carrierMerged = source.carrierMerged;
             fromWifiNetworkSuggestion = source.fromWifiNetworkSuggestion;
             fromWifiNetworkSpecifier = source.fromWifiNetworkSpecifier;
-            dbsSecondaryInternet = source.dbsSecondaryInternet;
             meteredHint = source.meteredHint;
-            mIsRepeaterEnabled = source.mIsRepeaterEnabled;
             meteredOverride = source.meteredOverride;
             useExternalScores = source.useExternalScores;
 
@@ -3928,18 +3619,6 @@
             carrierId = source.carrierId;
             subscriptionId = source.subscriptionId;
             mPasspointUniqueId = source.mPasspointUniqueId;
-            mSubscriptionGroup = source.mSubscriptionGroup;
-            if (source.mBssidAllowlist != null) {
-                mBssidAllowlist = new ArrayList<>(source.mBssidAllowlist);
-            } else {
-                mBssidAllowlist = null;
-            }
-            mIsDppConfigurator = source.mIsDppConfigurator;
-            mDppPrivateEcKey = source.mDppPrivateEcKey.clone();
-            mDppConnector = source.mDppConnector.clone();
-            mDppCSignKey = source.mDppCSignKey.clone();
-            mDppNetAccessKey = source.mDppNetAccessKey.clone();
-            isCurrentlyConnected = source.isCurrentlyConnected;
         }
     }
 
@@ -3948,7 +3627,7 @@
     public void writeToParcel(Parcel dest, int flags) {
         dest.writeInt(networkId);
         dest.writeInt(status);
-        mNetworkSelectionStatus.writeToParcel(dest, flags);
+        mNetworkSelectionStatus.writeToParcel(dest);
         dest.writeString(SSID);
         dest.writeString(BSSID);
         dest.writeInt(apBand);
@@ -3981,7 +3660,7 @@
 
         dest.writeInt(mSecurityParamsList.size());
         mSecurityParamsList.stream()
-                .forEach(params -> dest.writeParcelable(params, flags));
+                .forEach(params -> params.writeToParcel(dest, flags));
 
         dest.writeParcelable(enterpriseConfig, flags);
 
@@ -3997,9 +3676,7 @@
         dest.writeInt(carrierMerged ? 1 : 0);
         dest.writeInt(fromWifiNetworkSuggestion ? 1 : 0);
         dest.writeInt(fromWifiNetworkSpecifier ? 1 : 0);
-        dest.writeInt(dbsSecondaryInternet ? 1 : 0);
         dest.writeInt(meteredHint ? 1 : 0);
-        dest.writeBoolean(mIsRepeaterEnabled);
         dest.writeInt(meteredOverride);
         dest.writeInt(useExternalScores ? 1 : 0);
         dest.writeInt(creatorUid);
@@ -4025,15 +3702,6 @@
         dest.writeInt(carrierId);
         dest.writeString(mPasspointUniqueId);
         dest.writeInt(subscriptionId);
-        dest.writeBoolean(restricted);
-        dest.writeParcelable(mSubscriptionGroup, flags);
-        dest.writeList(mBssidAllowlist);
-        dest.writeBoolean(mIsDppConfigurator);
-        dest.writeByteArray(mDppPrivateEcKey);
-        dest.writeByteArray(mDppConnector);
-        dest.writeByteArray(mDppCSignKey);
-        dest.writeByteArray(mDppNetAccessKey);
-        dest.writeBoolean(isCurrentlyConnected);
     }
 
     /** Implement the Parcelable interface {@hide} */
@@ -4078,7 +3746,7 @@
 
                 int numSecurityParams = in.readInt();
                 for (int i = 0; i < numSecurityParams; i++) {
-                    config.mSecurityParamsList.add(in.readParcelable(null));
+                    config.mSecurityParamsList.add(SecurityParams.createFromParcel(in));
                 }
 
                 config.enterpriseConfig = in.readParcelable(null);
@@ -4092,11 +3760,9 @@
                 config.oemPaid = in.readInt() != 0;
                 config.oemPrivate = in.readInt() != 0;
                 config.carrierMerged = in.readInt() != 0;
-                config.fromWifiNetworkSuggestion = in.readInt() != 0;
-                config.fromWifiNetworkSpecifier = in.readInt() != 0;
-                config.dbsSecondaryInternet = in.readInt() != 0;
+                config.fromWifiNetworkSuggestion =  in.readInt() != 0;
+                config.fromWifiNetworkSpecifier =  in.readInt() != 0;
                 config.meteredHint = in.readInt() != 0;
-                config.mIsRepeaterEnabled = in.readBoolean();
                 config.meteredOverride = in.readInt();
                 config.useExternalScores = in.readInt() != 0;
                 config.creatorUid = in.readInt();
@@ -4121,15 +3787,6 @@
                 config.carrierId = in.readInt();
                 config.mPasspointUniqueId = in.readString();
                 config.subscriptionId = in.readInt();
-                config.restricted = in.readBoolean();
-                config.mSubscriptionGroup = in.readParcelable(null);
-                config.mBssidAllowlist = in.readArrayList(MacAddress.class.getClassLoader());
-                config.mIsDppConfigurator = in.readBoolean();
-                config.mDppPrivateEcKey = in.createByteArray();
-                config.mDppConnector = in.createByteArray();
-                config.mDppCSignKey = in.createByteArray();
-                config.mDppNetAccessKey = in.createByteArray();
-                config.isCurrentlyConnected = in.readBoolean();
                 return config;
             }
 
@@ -4169,17 +3826,6 @@
     public boolean isMostRecentlyConnected = false;
 
     /**
-     * Whether the network is currently connected or not.
-     * Note: May be true even if {@link #status} is not CURRENT, since a config
-     *       can be connected, but disabled for network selection.
-     * TODO (b/235236813): This field may be redundant, since we have information
-     *       like {@link #status} and quality network selection status. May need
-     *       to clean up the fields used for network selection.
-     * @hide
-     */
-    public boolean isCurrentlyConnected = false;
-
-    /**
      * Whether the key mgmt indicates if the WifiConfiguration needs a preSharedKey or not.
      * @return true if preSharedKey is needed, false otherwise.
      * @hide
@@ -4248,8 +3894,6 @@
             key = KeyMgmt.strings[KeyMgmt.WAPI_CERT];
         } else if (allowedKeyManagement.get(KeyMgmt.OSEN)) {
             key = KeyMgmt.strings[KeyMgmt.OSEN];
-        } else if (allowedKeyManagement.get(KeyMgmt.DPP)) {
-            key = KeyMgmt.strings[KeyMgmt.DPP];
         } else {
             key = KeyMgmt.strings[KeyMgmt.NONE];
         }
@@ -4271,8 +3915,7 @@
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE},
      * {@link #SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT},
      * {@link #SECURITY_TYPE_PASSPOINT_R1_R2},
-     * {@link #SECURITY_TYPE_PASSPOINT_R3},
-     * or {@link #SECURITY_TYPE_DPP}.
+     * or {@link #SECURITY_TYPE_PASSPOINT_R3}.
      * @return the name of the given type.
      * @hide
      */
@@ -4283,71 +3926,4 @@
         return SECURITY_TYPE_NAMES[securityType];
     }
 
-    /**
-     * Returns the key for storing the data usage bucket.
-     *
-     * Note: DO NOT change this function. It is used to be a key to store Wi-Fi data usage data.
-     * Create a new function if we plan to change the key for Wi-Fi data usage and add the new key
-     * to {@link #getAllNetworkKeys()}.
-     *
-     * @param securityType the security type corresponding to the target network.
-     * @hide
-     */
-    public String getNetworkKeyFromSecurityType(@SecurityType int securityType) {
-        if (mPasspointUniqueId != null) {
-            // It might happen that there are two connections which use the same passpoint
-            // coniguration but different sim card (maybe same carriers?). Add subscriptionId to be
-            // the part of key to separate data in usage bucket.
-            // But now we only show one WifiConfiguration entry in Wifi picker for this case.
-            // It means that user only have a way to query usage with configuration on default SIM.
-            // (We always connect to network with default SIM). So returns the key with associated
-            // subscriptionId (the default one) first.
-            return subscriptionId + "-" + mPasspointUniqueId;
-        } else {
-            String key = SSID + getSecurityTypeName(securityType);
-            if (!shared) {
-                key += "-" + UserHandle.getUserHandleForUid(creatorUid).getIdentifier();
-            }
-            if (fromWifiNetworkSuggestion) {
-                key += "_" + creatorName + "-" + carrierId + "-" + subscriptionId;
-            }
-            return key;
-        }
-    }
-
-    /**
-     * Returns a list of all persistable network keys corresponding to this configuration.
-     * There may be multiple keys since they are security-type specific and a configuration may
-     * support multiple security types. The persistable key of a specific network connection may
-     * be obtained from {@link WifiInfo#getNetworkKey()}.
-     * An example of usage of such persistable network keys is to query the Wi-Fi data usage
-     * corresponding to this configuration. See {@code NetworkTemplate} to know the detail.
-     *
-     * @hide
-     */
-    @SystemApi
-    @NonNull
-    public Set<String> getAllNetworkKeys() {
-        Set<String> keys = new HashSet<>();
-        for (SecurityParams securityParam : mSecurityParamsList) {
-            keys.add(getNetworkKeyFromSecurityType(securityParam.getSecurityType()));
-        }
-        return keys;
-    }
-
-    /**
-     * Set the subscription group uuid associated with current configuration.
-     * @hide
-     */
-    public void setSubscriptionGroup(@Nullable ParcelUuid subscriptionGroup) {
-        this.mSubscriptionGroup = subscriptionGroup;
-    }
-
-    /**
-     * Get the subscription group uuid associated with current configuration.
-     * @hide
-     */
-    public @Nullable ParcelUuid getSubscriptionGroup() {
-        return this.mSubscriptionGroup;
-    }
 }
diff --git a/framework/java/android/net/wifi/WifiEnterpriseConfig.java b/framework/java/android/net/wifi/WifiEnterpriseConfig.java
index 2a53e35..49831bc 100644
--- a/framework/java/android/net/wifi/WifiEnterpriseConfig.java
+++ b/framework/java/android/net/wifi/WifiEnterpriseConfig.java
@@ -257,13 +257,6 @@
     private boolean mIsAppInstalledDeviceKeyAndCert = false;
     private boolean mIsAppInstalledCaCert = false;
     private String mKeyChainAlias;
-    private boolean mIsTrustOnFirstUseEnabled = false;
-    private boolean mUserApproveNoCaCert = false;
-
-    // Not included in parceling, hashing, or equality because it is an internal, temporary value
-    // which is valid only during an actual connection to a Passpoint network with an RCOI-based
-    // subscription.
-    private long mSelectedRcoi = 0;
 
     private static final String TAG = "WifiEnterpriseConfig";
 
@@ -310,9 +303,6 @@
         mIsAppInstalledDeviceKeyAndCert = source.mIsAppInstalledDeviceKeyAndCert;
         mIsAppInstalledCaCert = source.mIsAppInstalledCaCert;
         mOcsp = source.mOcsp;
-        mIsTrustOnFirstUseEnabled = source.mIsTrustOnFirstUseEnabled;
-        mUserApproveNoCaCert = source.mUserApproveNoCaCert;
-        mSelectedRcoi = source.mSelectedRcoi;
     }
 
     /**
@@ -360,8 +350,6 @@
         dest.writeBoolean(mIsAppInstalledDeviceKeyAndCert);
         dest.writeBoolean(mIsAppInstalledCaCert);
         dest.writeInt(mOcsp);
-        dest.writeBoolean(mIsTrustOnFirstUseEnabled);
-        dest.writeBoolean(mUserApproveNoCaCert);
     }
 
     public static final @android.annotation.NonNull Creator<WifiEnterpriseConfig> CREATOR =
@@ -385,8 +373,6 @@
                     enterpriseConfig.mIsAppInstalledDeviceKeyAndCert = in.readBoolean();
                     enterpriseConfig.mIsAppInstalledCaCert = in.readBoolean();
                     enterpriseConfig.mOcsp = in.readInt();
-                    enterpriseConfig.mIsTrustOnFirstUseEnabled = in.readBoolean();
-                    enterpriseConfig.mUserApproveNoCaCert = in.readBoolean();
                     return enterpriseConfig;
                 }
 
@@ -752,16 +738,6 @@
     }
 
     /**
-     * Indicates whether or not this enterprise config has a CA certificate configured.
-     */
-    public boolean hasCaCertificate() {
-        if (getCaCertificateAliases() != null) return true;
-        if (getCaCertificates() != null) return true;
-        if (!TextUtils.isEmpty(getCaPath())) return true;
-        return false;
-    }
-
-    /**
      * Get CA certificate alias
      * @return alias to the CA certificate
      * @hide
@@ -829,29 +805,6 @@
     }
 
     /**
-     * Specify a X.509 certificate that identifies the server.
-     *
-     * This hidden API allows setting self-signed certificate for Trust on First Use.
-     *
-     * @param cert X.509 CA certificate
-     * @throws IllegalArgumentException if Trust on First Use is not enabled.
-     * @hide
-     */
-    public void setCaCertificateForTrustOnFirstUse(@Nullable X509Certificate cert) {
-        if (cert != null) {
-            if (isTrustOnFirstUseEnabled()) {
-                mIsAppInstalledCaCert = true;
-                mCaCerts = new X509Certificate[] {cert};
-            } else {
-                mCaCerts = null;
-                throw new IllegalArgumentException("Trust on First Use is not enabled.");
-            }
-        } else {
-            mCaCerts = null;
-        }
-    }
-
-    /**
      * Get CA certificate. If multiple CA certificates are configured previously,
      * return the first one.
      * @return X.509 CA certificate
@@ -1251,24 +1204,6 @@
     }
 
     /**
-     * Set selected RCOI for Passpoint: Indicates which RCOI was selected on a particular network
-     * @param selectedRcoi the selected RCOI on a particular network
-     * @hide
-     */
-    public void setSelectedRcoi(long selectedRcoi) {
-        mSelectedRcoi = selectedRcoi;
-    }
-
-    /**
-     * Get the selected RCOI matched for a Passpoint connection
-     * @return the selected RCOI
-     * @hide
-     */
-    public long getSelectedRcoi() {
-        return mSelectedRcoi;
-    }
-
-    /**
      * Set plmn (Public Land Mobile Network) of the provider of Passpoint credential
      * @param plmn the plmn value derived from mcc (mobile country code) & mnc (mobile network code)
      */
@@ -1406,9 +1341,6 @@
             sb.append("phase2_method: ").append(Phase2.strings[mPhase2Method]).append("\n");
         }
         sb.append(" ocsp: ").append(mOcsp).append("\n");
-        sb.append(" trust_on_first_use: ").append(mIsTrustOnFirstUseEnabled).append("\n");
-        sb.append(" user_approve_no_ca_cert: ").append(mUserApproveNoCaCert).append("\n");
-        sb.append(" selected_rcoi: ").append(mSelectedRcoi).append("\n");
         return sb.toString();
     }
 
@@ -1549,12 +1481,11 @@
 
     /**
      * Determines whether an Enterprise configuration's EAP method requires a Root CA certification
-     * to validate the authentication server i.e. PEAP, TLS, UNAUTH_TLS, or TTLS.
+     * to validate the authentication server i.e. PEAP, TLS, or TTLS.
      * @return True if configuration requires a CA certification, false otherwise.
      */
     public boolean isEapMethodServerCertUsed() {
-        return mEapMethod == Eap.PEAP || mEapMethod == Eap.TLS || mEapMethod == Eap.TTLS
-                || mEapMethod == Eap.UNAUTH_TLS;
+        return mEapMethod == Eap.PEAP || mEapMethod == Eap.TLS || mEapMethod == Eap.TTLS;
     }
     /**
      * Determines whether an Enterprise configuration enables server certificate validation.
@@ -1684,56 +1615,4 @@
         final String decoratedId = getFieldValue(DECORATED_IDENTITY_PREFIX_KEY);
         return decoratedId.isEmpty() ? null : decoratedId;
     }
-
-    /**
-     * Enable Trust On First Use.
-     *
-     * Trust On First Use (TOFU) simplifies manual or partial configurations
-     * of TLS-based EAP networks. TOFU operates by installing the Root CA cert
-     * which is received from the server during an initial connection to a new network.
-     * Such installation is gated by user approval.
-     * Use only when it is not possible to configure the Root CA cert for the server.
-     * <br>
-     * Note: If a Root CA cert is already configured, this option is ignored,
-     * e.g. if {@link #setCaCertificate(X509Certificate)}, or
-     * {@link #setCaCertificates(X509Certificate[])} is called.
-     *
-     * @param enable true to enable; false otherwise (the default if the method is not called).
-     */
-    public void enableTrustOnFirstUse(boolean enable) {
-        mIsTrustOnFirstUseEnabled = enable;
-    }
-
-    /**
-     * Indicates whether or not Trust On First Use (TOFU) is enabled.
-     *
-     * @return Trust On First Use is enabled or not.
-     */
-    public boolean isTrustOnFirstUseEnabled() {
-        return mIsTrustOnFirstUseEnabled;
-    }
-
-    /**
-     * For devices with no TOFU support, indicate that the user approved that a
-     * legacy TLS-based EAP configuration from a previous release can be used
-     * without a Root CA certificate.
-     *
-     * @hide
-     */
-    public void setUserApproveNoCaCert(boolean approved) {
-        mUserApproveNoCaCert = approved;
-    }
-
-    /**
-     * For devices with no TOFU support, indicates if the user approved that a
-     * legacy TLS-based EAP configuration from a previous release can be used
-     * without a Root CA certificate.
-     *
-     * @return indicate whether a user approves this no CA cert config.
-     * @hide
-     */
-    public boolean isUserApproveNoCaCert() {
-        return mUserApproveNoCaCert;
-    }
-
 }
diff --git a/framework/java/android/net/wifi/WifiFrameworkInitializer.java b/framework/java/android/net/wifi/WifiFrameworkInitializer.java
index 8b59393..527aaf4 100644
--- a/framework/java/android/net/wifi/WifiFrameworkInitializer.java
+++ b/framework/java/android/net/wifi/WifiFrameworkInitializer.java
@@ -18,7 +18,6 @@
 import android.annotation.SystemApi;
 import android.app.SystemServiceRegistry;
 import android.content.Context;
-import android.content.pm.PackageManager;
 import android.net.wifi.aware.IWifiAwareManager;
 import android.net.wifi.aware.WifiAwareManager;
 import android.net.wifi.p2p.IWifiP2pManager;
@@ -77,22 +76,14 @@
                 Context.WIFI_SERVICE,
                 WifiManager.class,
                 (context, serviceBinder) -> {
-                    if (!context.getPackageManager().hasSystemFeature(
-                            PackageManager.FEATURE_WIFI)) {
-                        return null;
-                    }
                     IWifiManager service = IWifiManager.Stub.asInterface(serviceBinder);
                     return new WifiManager(context, service, getInstanceLooper());
                 }
         );
-        SystemServiceRegistry.registerContextAwareService(
+        SystemServiceRegistry.registerStaticService(
                 Context.WIFI_P2P_SERVICE,
                 WifiP2pManager.class,
-                (context, serviceBinder) -> {
-                    if (!context.getPackageManager().hasSystemFeature(
-                            PackageManager.FEATURE_WIFI_DIRECT)) {
-                        return null;
-                    }
+                serviceBinder -> {
                     IWifiP2pManager service = IWifiP2pManager.Stub.asInterface(serviceBinder);
                     return new WifiP2pManager(service);
                 }
@@ -101,10 +92,6 @@
                 Context.WIFI_AWARE_SERVICE,
                 WifiAwareManager.class,
                 (context, serviceBinder) -> {
-                    if (!context.getPackageManager().hasSystemFeature(
-                            PackageManager.FEATURE_WIFI_AWARE)) {
-                        return null;
-                    }
                     IWifiAwareManager service = IWifiAwareManager.Stub.asInterface(serviceBinder);
                     return new WifiAwareManager(context, service);
                 }
@@ -113,10 +100,6 @@
                 Context.WIFI_SCANNING_SERVICE,
                 WifiScanner.class,
                 (context, serviceBinder) -> {
-                    if (!context.getPackageManager().hasSystemFeature(
-                            PackageManager.FEATURE_WIFI)) {
-                        return null;
-                    }
                     IWifiScanner service = IWifiScanner.Stub.asInterface(serviceBinder);
                     return new WifiScanner(context, service, getInstanceLooper());
                 }
@@ -125,10 +108,6 @@
                 Context.WIFI_RTT_RANGING_SERVICE,
                 WifiRttManager.class,
                 (context, serviceBinder) -> {
-                    if (!context.getPackageManager().hasSystemFeature(
-                            PackageManager.FEATURE_WIFI_RTT)) {
-                        return null;
-                    }
                     IWifiRttManager service = IWifiRttManager.Stub.asInterface(serviceBinder);
                     return new WifiRttManager(context, service);
                 }
@@ -137,10 +116,6 @@
                 Context.WIFI_RTT_SERVICE,
                 RttManager.class,
                 context -> {
-                    if (!context.getPackageManager().hasSystemFeature(
-                            PackageManager.FEATURE_WIFI_RTT)) {
-                        return null;
-                    }
                     WifiRttManager wifiRttManager = context.getSystemService(WifiRttManager.class);
                     return new RttManager(context, wifiRttManager);
                 }
diff --git a/framework/java/android/net/wifi/WifiInfo.java b/framework/java/android/net/wifi/WifiInfo.java
index 30b326c..ee864d8 100644
--- a/framework/java/android/net/wifi/WifiInfo.java
+++ b/framework/java/android/net/wifi/WifiInfo.java
@@ -25,12 +25,10 @@
 import android.annotation.Nullable;
 import android.annotation.RequiresPermission;
 import android.annotation.SystemApi;
-import android.app.admin.DevicePolicyManager;
 import android.compat.annotation.UnsupportedAppUsage;
 import android.net.ConnectivityManager;
 import android.net.ConnectivityManager.NetworkCallback;
 import android.net.LinkProperties;
-import android.net.MacAddress;
 import android.net.Network;
 import android.net.NetworkCapabilities;
 import android.net.NetworkInfo.DetailedState;
@@ -52,8 +50,6 @@
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.EnumMap;
 import java.util.List;
 import java.util.Locale;
@@ -67,7 +63,6 @@
  * the same permissions as {@link WifiManager#getScanResults}. If such access is not allowed,
  * {@link #getSSID} will return {@link WifiManager#UNKNOWN_SSID} and
  * {@link #getBSSID} will return {@code "02:00:00:00:00:00"}.
- * {@link #getApMldMacAddress()} will return null.
  * {@link #getNetworkId()} will return {@code -1}.
  * {@link #getPasspointFqdn()} will return null.
  * {@link #getPasspointProviderFriendlyName()} will return null.
@@ -114,30 +109,10 @@
     private String mBSSID;
     @UnsupportedAppUsage
     private WifiSsid mWifiSsid;
-    private boolean mIsHiddenSsid = false;
     private int mNetworkId;
     private int mSecurityType;
 
     /**
-     * The Multi-Link Device (MLD) MAC Address for the connected access point.
-     * Only applicable for Wi-Fi 7 access points, null otherwise.
-     * This will be set even if the STA is non-MLD
-     */
-    private MacAddress mApMldMacAddress;
-
-    /**
-     * The Multi-Link Operation (MLO) link-id for the access point.
-     * Only applicable for Wi-Fi 7 access points.
-     */
-    private int mApMloLinkId;
-
-    /**
-     * The Multi-Link Operation (MLO) affiliated Links.
-     * Only applicable for Wi-Fi 7 access points.
-     */
-    private List<MloLink> mAffiliatedMloLinks;
-
-    /**
      * Used to indicate that the RSSI is invalid, for example if no RSSI measurements are available
      * yet.
      * @hide
@@ -182,15 +157,6 @@
      * and PMF must be set to Required.
      */
     public static final int SECURITY_TYPE_PASSPOINT_R3 = 12;
-    /** Security type for Easy Connect (DPP) network */
-    public static final int SECURITY_TYPE_DPP = 13;
-
-    /**
-     * Unknown security type that cannot be converted to
-     * DevicePolicyManager.WifiSecurity security type.
-     * @hide
-     */
-    public static final int DPM_SECURITY_TYPE_UNKNOWN = -1;
 
     /**
      * Security type of current connection.
@@ -211,7 +177,6 @@
             SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT,
             SECURITY_TYPE_PASSPOINT_R1_R2,
             SECURITY_TYPE_PASSPOINT_R3,
-            SECURITY_TYPE_DPP,
     })
     public @interface SecurityType {}
 
@@ -292,11 +257,6 @@
     private boolean mTrusted;
 
     /**
-     * Whether the network is restricted or not.
-     */
-    private boolean mRestricted;
-
-    /**
      * Whether the network is oem paid or not.
      */
     private boolean mOemPaid;
@@ -482,19 +442,11 @@
      */
     private @IsPrimaryValues int mIsPrimary;
 
-    /**
-     * Key of the current network.
-     */
-    private String mNetworkKey;
-
     /** @hide */
     @UnsupportedAppUsage
     public WifiInfo() {
         mWifiSsid = null;
         mBSSID = null;
-        mApMldMacAddress = null;
-        mApMloLinkId = 0;
-        mAffiliatedMloLinks = Collections.emptyList();
         mNetworkId = -1;
         mSupplicantState = SupplicantState.UNINITIALIZED;
         mRssi = INVALID_RSSI;
@@ -503,8 +455,6 @@
         mSubscriptionId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
         mSecurityType = -1;
         mIsPrimary = IS_PRIMARY_FALSE;
-        mNetworkKey = null;
-        mApMloLinkId = MloLink.INVALID_MLO_LINK_ID;
     }
 
     /** @hide */
@@ -512,7 +462,6 @@
         setInetAddress(null);
         setBSSID(null);
         setSSID(null);
-        setHiddenSSID(false);
         setNetworkId(-1);
         setRssi(INVALID_RSSI);
         setLinkSpeed(LINK_SPEED_UNKNOWN);
@@ -535,7 +484,6 @@
         setSubscriptionId(SubscriptionManager.INVALID_SUBSCRIPTION_ID);
         setInformationElements(null);
         setIsPrimary(false);
-        setRestricted(false);
         txBad = 0;
         txSuccess = 0;
         rxSuccess = 0;
@@ -547,15 +495,6 @@
         score = 0;
         mIsUsable = true;
         mSecurityType = -1;
-        mNetworkKey = null;
-        resetMultiLinkInfo();
-    }
-
-    /** @hide */
-    public void resetMultiLinkInfo() {
-        setApMldMacAddress(null);
-        mApMloLinkId = MloLink.INVALID_MLO_LINK_ID;
-        mAffiliatedMloLinks = Collections.emptyList();
     }
 
     /**
@@ -575,19 +514,8 @@
             mSupplicantState = source.mSupplicantState;
             mBSSID = shouldRedactLocationSensitiveFields(redactions)
                     ? DEFAULT_MAC_ADDRESS : source.mBSSID;
-            mApMldMacAddress = shouldRedactLocationSensitiveFields(redactions)
-                    ? null : source.mApMldMacAddress;
-            mApMloLinkId = source.mApMloLinkId;
-            if (source.mApMldMacAddress != null) {
-                mAffiliatedMloLinks = new ArrayList<MloLink>();
-                for (MloLink link : source.mAffiliatedMloLinks) {
-                    mAffiliatedMloLinks.add(new MloLink(link, redactions));
-                }
-            } else {
-                mAffiliatedMloLinks = Collections.emptyList();
-            }
             mWifiSsid = shouldRedactLocationSensitiveFields(redactions)
-                    ? null : source.mWifiSsid;
+                    ? WifiSsid.createFromHex(null) : source.mWifiSsid;
             mNetworkId = shouldRedactLocationSensitiveFields(redactions)
                     ? INVALID_NETWORK_ID : source.mNetworkId;
             mRssi = source.mRssi;
@@ -602,7 +530,6 @@
             mMeteredHint = source.mMeteredHint;
             mEphemeral = source.mEphemeral;
             mTrusted = source.mTrusted;
-            mRestricted = source.mRestricted;
             mOemPaid = source.mOemPaid;
             mOemPrivate = source.mOemPrivate;
             mCarrierMerged = source.mCarrierMerged;
@@ -636,8 +563,6 @@
             mIsPrimary = shouldRedactNetworkSettingsFields(redactions)
                     ? IS_PRIMARY_NO_PERMISSION : source.mIsPrimary;
             mSecurityType = source.mSecurityType;
-            mNetworkKey = shouldRedactLocationSensitiveFields(redactions)
-                    ? null : source.mNetworkKey;
         }
     }
 
@@ -651,7 +576,7 @@
          */
         @NonNull
         public Builder setSsid(@NonNull byte[] ssid) {
-            mWifiInfo.setSSID(WifiSsid.fromBytes(ssid));
+            mWifiInfo.setSSID(WifiSsid.createFromByteArray(ssid));
             return this;
         }
 
@@ -666,38 +591,6 @@
         }
 
         /**
-         * Set the AP MLD (Multi-Link Device) MAC Address.
-         * @see WifiInfo#getApMldMacAddress()
-         * @hide
-         */
-        @Nullable
-        public Builder setApMldMacAddress(@Nullable MacAddress address) {
-            mWifiInfo.setApMldMacAddress(address);
-            return this;
-        }
-
-        /**
-         * Set the access point Multi-Link Operation (MLO) link-id.
-         * @see WifiInfo#getApMloLinkId()
-         * @hide
-         */
-        public Builder setApMloLinkId(int linkId) {
-            mWifiInfo.setApMloLinkId(linkId);
-            return this;
-        }
-
-        /**
-         * Set the Multi-Link Operation (MLO) affiliated Links.
-         * Only applicable for Wi-Fi 7 access points.
-         * @see WifiInfo#getAffiliatedMloLinks()
-         * @hide
-         */
-        public Builder setAffiliatedMloLinks(@NonNull List<MloLink> links) {
-            mWifiInfo.setAffiliatedMloLinks(links);
-            return this;
-        }
-
-        /**
          * Set the RSSI, in dBm.
          * @see WifiInfo#getRssi()
          */
@@ -758,9 +651,12 @@
      */
     public String getSSID() {
         if (mWifiSsid != null) {
-            String ssidString = mWifiSsid.toString();
-            if (!TextUtils.isEmpty(ssidString)) {
-                return ssidString;
+            String unicode = mWifiSsid.toString();
+            if (!TextUtils.isEmpty(unicode)) {
+                return "\"" + unicode + "\"";
+            } else {
+                String hex = mWifiSsid.getHexString();
+                return (hex != null) ? hex : WifiManager.UNKNOWN_SSID;
             }
         }
         return WifiManager.UNKNOWN_SSID;
@@ -779,76 +675,6 @@
     }
 
     /**
-     * Set the access point Multi-Link Device (MLD) MAC Address.
-     * @hide
-     */
-    public void setApMldMacAddress(@Nullable MacAddress address) {
-        mApMldMacAddress = address;
-    }
-
-    /**
-     * Set the access point Multi-Link Operation (MLO) link-id
-     * @hide
-     */
-    public void setApMloLinkId(int linkId) {
-        mApMloLinkId = linkId;
-    }
-
-    /**
-     * Set the Multi-Link Operation (MLO) affiliated Links.
-     * Only applicable for Wi-Fi 7 access points.
-     *
-     * @hide
-     */
-    public void setAffiliatedMloLinks(@NonNull List<MloLink> links) {
-        mAffiliatedMloLinks = new ArrayList<MloLink>(links);
-    }
-
-    /**
-     * Update the MLO link STA MAC Address
-     *
-     * @param linkId for the link to be updated.
-     * @param macAddress value to be set in the link.
-     *
-     * @return true on success, false on failure
-     *
-     * @hide
-     */
-    public boolean updateMloLinkStaAddress(int linkId, MacAddress macAddress) {
-        for (MloLink link : mAffiliatedMloLinks) {
-            if (link.getLinkId() == linkId) {
-                link.setStaMacAddress(macAddress);
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Update the MLO link State
-     *
-     * @param linkId for the link to be updated.
-     * @param state value to be set in the link as one of {@link MloLink.MloLinkState}
-     *
-     * @return true on success, false on failure
-     *
-     * @hide
-     */
-    public boolean updateMloLinkState(int linkId, @MloLink.MloLinkState int state) {
-        if (!MloLink.isValidState(state)) {
-            return false;
-        }
-
-        for (MloLink link : mAffiliatedMloLinks) {
-            if (link.getLinkId() == linkId) {
-                link.setState(state);
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
      * Return the basic service set identifier (BSSID) of the current access point.
      * <p>
      * The BSSID may be
@@ -864,48 +690,6 @@
     }
 
     /**
-     * Return the Multi-Link Device (MLD) MAC Address for the connected access point.
-     * <p>
-     * The returned MLD MAC Address will be {@code null} in the following cases:
-     * <lt>There is no network currently connected</lt>
-     * <lt>The connected access point is not an MLD access point,
-     * i.e. {@link #getWifiStandard()} returns {@link ScanResult#WIFI_STANDARD_11BE}.</lt>
-     * <lt>The caller has insufficient permissions to access the access point MLD MAC Address.<lt>
-     * </p>
-     *
-     * @return the MLD Mac address
-     */
-    @Nullable
-    public MacAddress getApMldMacAddress() {
-        return mApMldMacAddress;
-    }
-
-    /**
-     * Return the access point Multi-Link Operation (MLO) link-id for Wi-Fi 7 access points.
-     * i.e. {@link #getWifiStandard()} returns {@link ScanResult#WIFI_STANDARD_11BE},
-     * otherwise return {@link MloLink#INVALID_MLO_LINK_ID}.
-     *
-     * Valid values are 0-15 as described in IEEE 802.11be Specification, section 9.4.2.295b.2.
-     *
-     * @return {@link MloLink#INVALID_MLO_LINK_ID} or a valid value (0-15).
-     */
-    @IntRange(from = MloLink.INVALID_MLO_LINK_ID, to = MloLink.MAX_MLO_LINK_ID)
-    public int getApMloLinkId() {
-        return mApMloLinkId;
-    }
-
-    /**
-     * Return the Multi-Link Operation (MLO) affiliated Links for Wi-Fi 7 access points.
-     * i.e. when {@link #getWifiStandard()} returns {@link ScanResult#WIFI_STANDARD_11BE}.
-     *
-     * @return List of affiliated MLO links, or an empty list if access point is not Wi-Fi 7
-     */
-    @NonNull
-    public List<MloLink> getAffiliatedMloLinks() {
-        return new ArrayList<MloLink>(mAffiliatedMloLinks);
-    }
-
-    /**
      * Returns the received signal strength indicator of the current 802.11
      * network, in dBm.
      *
@@ -1108,13 +892,13 @@
         mMeteredHint = meteredHint;
     }
 
-    /** @hide */
+    /** {@hide} */
     @UnsupportedAppUsage
     public boolean getMeteredHint() {
         return mMeteredHint;
     }
 
-    /** @hide */
+    /** {@hide} */
     public void setEphemeral(boolean ephemeral) {
         mEphemeral = ephemeral;
     }
@@ -1132,7 +916,7 @@
         return mEphemeral;
     }
 
-    /** @hide */
+    /** {@hide} */
     public void setTrusted(boolean trusted) {
         mTrusted = trusted;
     }
@@ -1140,29 +924,14 @@
     /**
      * Returns true if the current Wifi network is a trusted network, false otherwise.
      * @see WifiNetworkSuggestion.Builder#setUntrusted(boolean).
-     * @hide
+     * {@hide}
      */
     @SystemApi
     public boolean isTrusted() {
         return mTrusted;
     }
 
-    /** @hide */
-    public void setRestricted(boolean restricted) {
-        mRestricted = restricted;
-    }
-
-    /**
-     * Returns true if the current Wifi network is a restricted network, false otherwise.
-     * A restricted network has its {@link NetworkCapabilities#NET_CAPABILITY_NOT_RESTRICTED}
-     * capability removed.
-     * @see WifiNetworkSuggestion.Builder#setRestricted(boolean).
-     */
-    public boolean isRestricted() {
-        return mRestricted;
-    }
-
-    /** @hide */
+    /** {@hide} */
     public void setOemPaid(boolean oemPaid) {
         mOemPaid = oemPaid;
     }
@@ -1170,7 +939,7 @@
     /**
      * Returns true if the current Wifi network is an oem paid network, false otherwise.
      * @see WifiNetworkSuggestion.Builder#setOemPaid(boolean).
-     * @hide
+     * {@hide}
      */
     @RequiresApi(Build.VERSION_CODES.S)
     @SystemApi
@@ -1181,7 +950,7 @@
         return mOemPaid;
     }
 
-    /** @hide */
+    /** {@hide} */
     public void setOemPrivate(boolean oemPrivate) {
         mOemPrivate = oemPrivate;
     }
@@ -1189,7 +958,7 @@
     /**
      * Returns true if the current Wifi network is an oem private network, false otherwise.
      * @see WifiNetworkSuggestion.Builder#setOemPrivate(boolean).
-     * @hide
+     * {@hide}
      */
     @RequiresApi(Build.VERSION_CODES.S)
     @SystemApi
@@ -1201,7 +970,7 @@
     }
 
     /**
-     * @hide
+     * {@hide}
      */
     public void setCarrierMerged(boolean carrierMerged) {
         mCarrierMerged = carrierMerged;
@@ -1210,7 +979,7 @@
     /**
      * Returns true if the current Wifi network is a carrier merged network, false otherwise.
      * @see WifiNetworkSuggestion.Builder#setCarrierMerged(boolean).
-     * @hide
+     * {@hide}
      */
     @SystemApi
     @RequiresApi(Build.VERSION_CODES.S)
@@ -1222,24 +991,24 @@
     }
 
 
-    /** @hide */
+    /** {@hide} */
     public void setOsuAp(boolean osuAp) {
         mOsuAp = osuAp;
     }
 
-    /** @hide */
+    /** {@hide} */
     @SystemApi
     public boolean isOsuAp() {
         return mOsuAp;
     }
 
-    /** @hide */
+    /** {@hide} */
     @SystemApi
     public boolean isPasspointAp() {
         return mFqdn != null && mProviderFriendlyName != null;
     }
 
-    /** @hide */
+    /** {@hide} */
     public void setFQDN(@Nullable String fqdn) {
         mFqdn = fqdn;
     }
@@ -1256,7 +1025,7 @@
         return mFqdn;
     }
 
-    /** @hide */
+    /** {@hide} */
     public void setProviderFriendlyName(@Nullable String providerFriendlyName) {
         mProviderFriendlyName = providerFriendlyName;
     }
@@ -1274,7 +1043,7 @@
         return mProviderFriendlyName;
     }
 
-    /** @hide */
+    /** {@hide} */
     public void setRequestingPackageName(@Nullable String packageName) {
         mRequestingPackageName = packageName;
     }
@@ -1290,7 +1059,7 @@
         return mRequestingPackageName;
     }
 
-    /** @hide */
+    /** {@hide} */
     public void setSubscriptionId(int subId) {
         mSubscriptionId = subId;
     }
@@ -1371,16 +1140,8 @@
      * SSID-specific probe request must be used for scans.
      */
     public boolean getHiddenSSID() {
-        return mIsHiddenSsid;
-    }
-
-    /**
-     * Sets whether or not this network is using a hidden SSID. This value should be set from the
-     * corresponding {@link WifiConfiguration} of the network.
-     * @hide
-     */
-    public void setHiddenSSID(boolean isHiddenSsid) {
-        mIsHiddenSsid = isHiddenSsid;
+        if (mWifiSsid == null) return false;
+        return mWifiSsid.isHidden();
     }
 
     /**
@@ -1446,7 +1207,6 @@
         sb.append("SSID: ").append(getSSID())
                 .append(", BSSID: ").append(mBSSID == null ? none : mBSSID)
                 .append(", MAC: ").append(mMacAddress == null ? none : mMacAddress)
-                .append(", IP: ").append(mIpAddress)
                 .append(", Security type: ").append(mSecurityType)
                 .append(", Supplicant state: ")
                 .append(mSupplicantState == null ? none : mSupplicantState)
@@ -1466,27 +1226,7 @@
                 .append(", isUsable: ").append(mIsUsable)
                 .append(", CarrierMerged: ").append(mCarrierMerged)
                 .append(", SubscriptionId: ").append(mSubscriptionId)
-                .append(", IsPrimary: ").append(mIsPrimary)
-                .append(", Trusted: ").append(mTrusted)
-                .append(", Restricted: ").append(mRestricted)
-                .append(", Ephemeral: ").append(mEphemeral)
-                .append(", OEM paid: ").append(mOemPaid)
-                .append(", OEM private: ").append(mOemPrivate)
-                .append(", OSU AP: ").append(mOsuAp)
-                .append(", FQDN: ").append(mFqdn == null ? none : mFqdn)
-                .append(", Provider friendly name: ")
-                .append(mProviderFriendlyName == null ? none : mProviderFriendlyName)
-                .append(", Requesting package name: ")
-                .append(mRequestingPackageName == null ? none : mRequestingPackageName)
-                .append(mNetworkKey == null ? none : mNetworkKey)
-                .append("MLO Information: ")
-                .append(", AP MLD Address: ").append(
-                        mApMldMacAddress == null ? none : mApMldMacAddress.toString())
-                .append(", AP MLO Link Id: ").append(
-                        mApMldMacAddress == null ? none : mApMloLinkId)
-                .append(", AP MLO Affiliated links: ").append(
-                        mApMldMacAddress == null ? none : mAffiliatedMloLinks);
-
+                .append(", IsPrimary: ").append(mIsPrimary);
         return sb.toString();
     }
 
@@ -1560,11 +1300,6 @@
             dest.writeInt(mIsPrimary);
         }
         dest.writeInt(mSecurityType);
-        dest.writeInt(mRestricted ? 1 : 0);
-        dest.writeString(mNetworkKey);
-        dest.writeParcelable(mApMldMacAddress, flags);
-        dest.writeInt(mApMloLinkId);
-        dest.writeTypedList(mAffiliatedMloLinks);
     }
 
     /** Implement the Parcelable interface {@hide} */
@@ -1621,12 +1356,6 @@
                     info.mIsPrimary = in.readInt();
                 }
                 info.mSecurityType = in.readInt();
-                info.mRestricted = in.readInt() != 0;
-                info.mNetworkKey = in.readString();
-
-                info.mApMldMacAddress = in.readParcelable(MacAddress.class.getClassLoader());
-                info.mApMloLinkId = in.readInt();
-                info.mAffiliatedMloLinks = in.createTypedArrayList(MloLink.CREATOR);
                 return info;
             }
 
@@ -1720,18 +1449,6 @@
         return mIsPrimary == IS_PRIMARY_TRUE;
     }
 
-    private List<MloLink> getSortedMloLinkList(List<MloLink> list) {
-        List<MloLink> newList = new ArrayList<MloLink>(list);
-        Collections.sort(newList, new Comparator<MloLink>() {
-            @Override
-            public int compare(MloLink lhs, MloLink rhs) {
-                return lhs.getLinkId() -  rhs.getLinkId();
-            }
-        });
-
-        return newList;
-    }
-
     @Override
     public boolean equals(Object that) {
         if (this == that) return true;
@@ -1742,17 +1459,8 @@
         if (!(that instanceof WifiInfo)) return false;
 
         WifiInfo thatWifiInfo = (WifiInfo) that;
-
-        // compare the MLO affiliated links irrespective of the order
-        if (!Objects.equals(getSortedMloLinkList(mAffiliatedMloLinks),
-                  getSortedMloLinkList(thatWifiInfo.mAffiliatedMloLinks))) {
-            return false;
-        }
-
         return Objects.equals(mWifiSsid, thatWifiInfo.mWifiSsid)
                 && Objects.equals(mBSSID, thatWifiInfo.mBSSID)
-                && Objects.equals(mApMldMacAddress, thatWifiInfo.mApMldMacAddress)
-                && mApMloLinkId == thatWifiInfo.mApMloLinkId
                 && Objects.equals(mNetworkId, thatWifiInfo.mNetworkId)
                 && Objects.equals(mRssi, thatWifiInfo.mRssi)
                 && Objects.equals(mSupplicantState, thatWifiInfo.mSupplicantState)
@@ -1791,10 +1499,8 @@
                 && Objects.equals(mMaxSupportedRxLinkSpeed, thatWifiInfo.mMaxSupportedRxLinkSpeed)
                 && Objects.equals(mPasspointUniqueId, thatWifiInfo.mPasspointUniqueId)
                 && Objects.equals(mInformationElements, thatWifiInfo.mInformationElements)
-                && mIsPrimary ==  thatWifiInfo.mIsPrimary
-                && mSecurityType == thatWifiInfo.mSecurityType
-                && mRestricted == thatWifiInfo.mRestricted
-                && Objects.equals(mNetworkKey, thatWifiInfo.mNetworkKey);
+                && Objects.equals(mIsPrimary, thatWifiInfo.mIsPrimary)
+                && Objects.equals(mSecurityType, thatWifiInfo.mSecurityType);
     }
 
     @Override
@@ -1804,9 +1510,6 @@
 
         return Objects.hash(mWifiSsid,
                 mBSSID,
-                mApMldMacAddress,
-                mApMloLinkId,
-                mAffiliatedMloLinks,
                 mNetworkId,
                 mRssi,
                 mSupplicantState,
@@ -1843,9 +1546,7 @@
                 mPasspointUniqueId,
                 mInformationElements,
                 mIsPrimary,
-                mSecurityType,
-                mRestricted,
-                mNetworkKey);
+                mSecurityType);
     }
 
     /**
@@ -1879,7 +1580,7 @@
      * @hide
      */
     public void setCurrentSecurityType(@WifiConfiguration.SecurityType int securityType) {
-        mSecurityType = convertWifiConfigurationSecurityType(securityType);
+        mSecurityType = convertSecurityTypeToWifiInfo(securityType);
     }
 
     /**
@@ -1899,15 +1600,9 @@
         return mSecurityType;
     }
 
-    /**
-     * Converts the WifiConfiguration.SecurityType to a WifiInfo.SecurityType
-     * @param wifiConfigSecurity WifiConfiguration.SecurityType to convert
-     * @return security type as a WifiInfo.SecurityType
-     * @hide
-     */
-    public static @SecurityType int convertWifiConfigurationSecurityType(
-            @WifiConfiguration.SecurityType int wifiConfigSecurity) {
-        switch (wifiConfigSecurity) {
+    private @SecurityType int convertSecurityTypeToWifiInfo(
+            @WifiConfiguration.SecurityType int securityType) {
+        switch (securityType) {
             case WifiConfiguration.SECURITY_TYPE_OPEN:
                 return SECURITY_TYPE_OPEN;
             case WifiConfiguration.SECURITY_TYPE_WEP:
@@ -1932,68 +1627,8 @@
                 return SECURITY_TYPE_PASSPOINT_R1_R2;
             case WifiConfiguration.SECURITY_TYPE_PASSPOINT_R3:
                 return SECURITY_TYPE_PASSPOINT_R3;
-            case WifiConfiguration.SECURITY_TYPE_DPP:
-                return SECURITY_TYPE_DPP;
             default:
                 return SECURITY_TYPE_UNKNOWN;
         }
     }
-
-    /**
-     * Utility method to convert WifiInfo.SecurityType to DevicePolicyManager.WifiSecurity
-     * @param securityType WifiInfo.SecurityType to convert
-     * @return DevicePolicyManager.WifiSecurity security level, or
-     * {@link #DPM_SECURITY_TYPE_UNKNOWN} for unknown security types
-     * @hide
-     */
-    public static int convertSecurityTypeToDpmWifiSecurity(
-            @WifiInfo.SecurityType int securityType) {
-        switch (securityType) {
-            case SECURITY_TYPE_OPEN:
-            case SECURITY_TYPE_OWE:
-                return DevicePolicyManager.WIFI_SECURITY_OPEN;
-            case SECURITY_TYPE_WEP:
-            case SECURITY_TYPE_PSK:
-            case SECURITY_TYPE_SAE:
-            case SECURITY_TYPE_WAPI_PSK:
-                return DevicePolicyManager.WIFI_SECURITY_PERSONAL;
-            case SECURITY_TYPE_EAP:
-            case SECURITY_TYPE_EAP_WPA3_ENTERPRISE:
-            case SECURITY_TYPE_PASSPOINT_R1_R2:
-            case SECURITY_TYPE_PASSPOINT_R3:
-            case SECURITY_TYPE_WAPI_CERT:
-                return DevicePolicyManager.WIFI_SECURITY_ENTERPRISE_EAP;
-            case SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT:
-                return DevicePolicyManager.WIFI_SECURITY_ENTERPRISE_192;
-            default:
-                return DPM_SECURITY_TYPE_UNKNOWN;
-        }
-    }
-
-    /**
-     * Set the network key for the current Wi-Fi network.
-     *
-     * Now we are using this identity to be a key when storing Wi-Fi data usage data.
-     * See: {@link WifiConfiguration#getNetworkKeyFromSecurityType(int)}.
-     *
-     * @param currentNetworkKey the network key of the current Wi-Fi network.
-     * @hide
-     */
-    public void setNetworkKey(@NonNull String currentNetworkKey) {
-        mNetworkKey = currentNetworkKey;
-    }
-
-    /**
-     * Returns the network key of the current Wi-Fi network.
-     *
-     * The network key may be {@code null}, if there is no network currently connected
-     * or if the caller has insufficient permissions to access the network key.
-     *
-     * @hide
-     */
-    @SystemApi
-    @Nullable
-    public String getNetworkKey() {
-        return mNetworkKey;
-    }
 }
diff --git a/framework/java/android/net/wifi/WifiManager.java b/framework/java/android/net/wifi/WifiManager.java
index 95a01a5..0a31915 100644
--- a/framework/java/android/net/wifi/WifiManager.java
+++ b/framework/java/android/net/wifi/WifiManager.java
@@ -18,11 +18,7 @@
 
 import static android.Manifest.permission.ACCESS_FINE_LOCATION;
 import static android.Manifest.permission.ACCESS_WIFI_STATE;
-import static android.Manifest.permission.CHANGE_WIFI_STATE;
-import static android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION;
-import static android.Manifest.permission.NEARBY_WIFI_DEVICES;
 import static android.Manifest.permission.READ_WIFI_CREDENTIAL;
-import static android.Manifest.permission.REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION;
 
 import android.annotation.CallbackExecutor;
 import android.annotation.IntDef;
@@ -36,18 +32,15 @@
 import android.annotation.SystemApi;
 import android.annotation.SystemService;
 import android.app.ActivityManager;
-import android.app.admin.WifiSsidPolicy;
 import android.compat.annotation.UnsupportedAppUsage;
 import android.content.Context;
 import android.net.ConnectivityManager;
 import android.net.ConnectivityManager.NetworkCallback;
 import android.net.DhcpInfo;
-import android.net.DhcpOption;
 import android.net.LinkProperties;
 import android.net.MacAddress;
 import android.net.Network;
 import android.net.NetworkCapabilities;
-import android.net.NetworkRequest;
 import android.net.NetworkStack;
 import android.net.Uri;
 import android.net.wifi.hotspot2.IProvisioningCallback;
@@ -56,8 +49,8 @@
 import android.net.wifi.hotspot2.ProvisioningCallback;
 import android.os.Binder;
 import android.os.Build;
-import android.os.Bundle;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.os.IBinder;
 import android.os.Looper;
 import android.os.Parcel;
@@ -68,7 +61,6 @@
 import android.telephony.SubscriptionInfo;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
-import android.util.ArraySet;
 import android.util.CloseGuard;
 import android.util.Log;
 import android.util.Pair;
@@ -78,7 +70,6 @@
 
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.HandlerExecutor;
 import com.android.modules.utils.ParceledListSlice;
 import com.android.modules.utils.build.SdkLevel;
 
@@ -87,9 +78,7 @@
 import java.lang.ref.Reference;
 import java.lang.ref.WeakReference;
 import java.net.InetAddress;
-import java.time.Duration;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -98,8 +87,6 @@
 import java.util.Set;
 import java.util.StringTokenizer;
 import java.util.concurrent.Executor;
-import java.util.function.BiConsumer;
-import java.util.function.Consumer;
 
 /**
  * This class provides the primary API for managing all aspects of Wi-Fi
@@ -245,12 +232,6 @@
      */
     public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_INVALID = 7;
 
-    /**
-     * Reason code if {@link android.os.UserManager#DISALLOW_ADD_WIFI_CONFIG} user restriction
-     * is set and calling app is restricted by device admin.
-     */
-    public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_RESTRICTED_BY_ADMIN = 8;
-
     /** @hide */
     @IntDef(prefix = { "STATUS_NETWORK_SUGGESTIONS_" }, value = {
             STATUS_NETWORK_SUGGESTIONS_SUCCESS,
@@ -261,7 +242,6 @@
             STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID,
             STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_NOT_ALLOWED,
             STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_INVALID,
-            STATUS_NETWORK_SUGGESTIONS_ERROR_RESTRICTED_BY_ADMIN,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface NetworkSuggestionsStatusCode {}
@@ -332,35 +312,6 @@
     public @interface SuggestionUserApprovalStatus {}
 
     /**
-     * If one of the removed suggestions is currently connected, that network will be disconnected
-     * after a short delay as opposed to immediately (which will be done by
-     * {@link #ACTION_REMOVE_SUGGESTION_DISCONNECT}). The {@link ConnectivityManager} may call the
-     * {@link NetworkCallback#onLosing(Network, int)} on such networks.
-     */
-    public static final int ACTION_REMOVE_SUGGESTION_LINGER = 1;
-
-    /**
-     * If one of the removed suggestions is currently connected, trigger an immediate disconnect
-     * after suggestions removal
-     */
-    public static final int ACTION_REMOVE_SUGGESTION_DISCONNECT = 2;
-
-    /** @hide */
-    @IntDef(prefix = {"ACTION_REMOVE_SUGGESTION_"},
-            value = {ACTION_REMOVE_SUGGESTION_LINGER,
-                    ACTION_REMOVE_SUGGESTION_DISCONNECT
-            })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface ActionAfterRemovingSuggestion {}
-
-    /**
-     * Only available on Android S or later.
-     * @hide
-     **/
-    public static final String EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE =
-            "EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE";
-
-    /**
      * Broadcast intent action indicating whether Wi-Fi scanning is currently available.
      * Available extras:
      * - {@link #EXTRA_SCAN_AVAILABLE}
@@ -406,82 +357,6 @@
     @SystemApi
     public static final int PASSPOINT_ROAMING_NETWORK = 1;
 
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(value = {
-            API_SCANNING_ENABLED,
-            API_WIFI_ENABLED,
-            API_SOFT_AP,
-            API_TETHERED_HOTSPOT,
-            API_AUTOJOIN_GLOBAL,
-            API_SET_SCAN_SCHEDULE,
-            API_SET_ONE_SHOT_SCREEN_ON_CONNECTIVITY_SCAN_DELAY})
-    public @interface ApiType {}
-
-    /**
-     * A constant used in
-     * {@link WifiManager#getLastCallerInfoForApi(int, Executor, BiConsumer)}
-     * Tracks usage of {@link WifiScanner#setScanningEnabled(boolean)}
-     * @hide
-     */
-    @SystemApi
-    public static final int API_SCANNING_ENABLED = 1;
-    /**
-     * A constant used in
-     * {@link WifiManager#getLastCallerInfoForApi(int, Executor, BiConsumer)}
-     * Tracks usage of {@link WifiManager#setWifiEnabled(boolean)} .
-     * @hide
-     */
-    @SystemApi
-    public static final int API_WIFI_ENABLED = 2;
-    /**
-     * A constant used in
-     * {@link WifiManager#getLastCallerInfoForApi(int, Executor, BiConsumer)}
-     * Tracks usage of {@link WifiManager#startSoftAp(WifiConfiguration)} and
-     * {@link WifiManager#stopSoftAp()}.
-     * @hide
-     */
-    @SystemApi
-    public static final int API_SOFT_AP = 3;
-    /**
-     * A constant used in
-     * {@link WifiManager#getLastCallerInfoForApi(int, Executor, BiConsumer)}
-     * Tracks usage of {@link WifiManager#startTetheredHotspot(SoftApConfiguration)}.
-     * @hide
-     */
-    @SystemApi
-    public static final int API_TETHERED_HOTSPOT = 4;
-    /**
-     * A constant used in
-     * {@link WifiManager#getLastCallerInfoForApi(int, Executor, BiConsumer)}
-     * Tracks usage of {@link WifiManager#allowAutojoinGlobal(boolean)}.
-     * @hide
-     */
-    @SystemApi
-    public static final int API_AUTOJOIN_GLOBAL = 5;
-    /**
-     * A constant used in
-     * {@link WifiManager#getLastCallerInfoForApi(int, Executor, BiConsumer)}
-     * Tracks usage of {@link WifiManager#setScreenOnScanSchedule(List)}.
-     * @hide
-     */
-    @SystemApi
-    public static final int API_SET_SCAN_SCHEDULE = 6;
-
-    /**
-     * A constant used in
-     * {@link WifiManager#getLastCallerInfoForApi(int, Executor, BiConsumer)}
-     * Tracks usage of {@link WifiManager#setOneShotScreenOnConnectivityScanDelayMillis(int)}.
-     * @hide
-     */
-    public static final int API_SET_ONE_SHOT_SCREEN_ON_CONNECTIVITY_SCAN_DELAY = 7;
-
-    /**
-     * Used internally to keep track of boundary.
-     * @hide
-     */
-    public static final int API_MAX = 7;
-
     /**
      * Broadcast intent action indicating that a Passpoint provider icon has been received.
      *
@@ -733,7 +608,6 @@
      * @hide
      */
     @SystemApi
-    @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE)
     public static final String WIFI_AP_STATE_CHANGED_ACTION =
         "android.net.wifi.WIFI_AP_STATE_CHANGED";
 
@@ -1496,41 +1370,6 @@
     public static final MacAddress ALL_ZEROS_MAC_ADDRESS =
             MacAddress.fromString("00:00:00:00:00:00");
 
-    /** @hide */
-    @IntDef(flag = false, prefix = { "WIFI_MULTI_INTERNET_MODE_" }, value = {
-        WIFI_MULTI_INTERNET_MODE_DISABLED,
-        WIFI_MULTI_INTERNET_MODE_DBS_AP,
-        WIFI_MULTI_INTERNET_MODE_MULTI_AP,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface WifiMultiInternetMode {}
-
-    /**
-     * Wi-Fi simultaneous connection to multiple internet-providing Wi-Fi networks (APs) is
-     * disabled.
-     *
-     * @see #getStaConcurrencyForMultiInternetMode()
-     *
-     */
-    public static final int WIFI_MULTI_INTERNET_MODE_DISABLED = 0;
-    /**
-     * Wi-Fi simultaneous connection to multiple internet-providing Wi-FI networks (APs) is enabled
-     * and restricted to a single network on different bands (e.g. a DBS AP).
-     *
-     * @see #getStaConcurrencyForMultiInternetMode()
-     *
-     */
-    public static final int WIFI_MULTI_INTERNET_MODE_DBS_AP = 1;
-    /**
-     * Wi-Fi simultaneous connection to multiple internet-providing Wi-Fi networks (APs) is enabled.
-     * The device can connect to any networks/APs - it is just restricted to using different bands
-     * for individual connections.
-     *
-     * @see #getStaConcurrencyForMultiInternetMode()
-     *
-     */
-    public static final int WIFI_MULTI_INTERNET_MODE_MULTI_AP = 2;
-
     /* Number of currently active WifiLocks and MulticastLocks */
     @UnsupportedAppUsage
     private int mActiveLockCount;
@@ -1562,10 +1401,6 @@
     private static final SparseArray<ITrafficStateCallback>
             sTrafficStateCallbackMap = new SparseArray();
     private static final SparseArray<ISoftApCallback> sSoftApCallbackMap = new SparseArray();
-    private static final SparseArray<IOnWifiDriverCountryCodeChangedListener>
-            sActiveCountryCodeChangedCallbackMap = new SparseArray();
-    private static final SparseArray<ISoftApCallback>
-            sLocalOnlyHotspotSoftApCallbackMap = new SparseArray();
 
     /**
      * Create a new WifiManager instance.
@@ -1649,7 +1484,7 @@
      *
      * @return a list of network configurations in the form of a list
      * of {@link WifiConfiguration} objects.
-     * @throws {@link java.lang.SecurityException} if the caller is not allowed to call this API
+     * @throws {@link java.lang.SecurityException} if the caller is allowed to call this API
      */
     @RequiresPermission(ACCESS_WIFI_STATE)
     @NonNull
@@ -1668,34 +1503,14 @@
     }
 
 
-    /**
-     * Applications targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later need to have
-     * the following permissions: {@link android.Manifest.permission#NEARBY_WIFI_DEVICES},
-     * {@link android.Manifest.permission#ACCESS_WIFI_STATE} and
-     * {@link android.Manifest.permission#READ_WIFI_CREDENTIAL}.
-     * Applications targeting {@link Build.VERSION_CODES#S} or prior SDK levels need to have the
-     * following permissions: {@link android.Manifest.permission#ACCESS_FINE_LOCATION},
-     * {@link android.Manifest.permission#CHANGE_WIFI_STATE} and
-     * {@link android.Manifest.permission#READ_WIFI_CREDENTIAL}.
-     * <p> See {@link #getPrivilegedConnectedNetwork()} to get the WifiConfiguration for only the
-     * connected network that's providing internet by default.
-     *
-     * @hide
-     **/
+    /** @hide */
     @SystemApi
-    @RequiresPermission(allOf = {ACCESS_FINE_LOCATION, NEARBY_WIFI_DEVICES, ACCESS_WIFI_STATE,
-            READ_WIFI_CREDENTIAL},
-            conditional = true)
+    @RequiresPermission(allOf = {ACCESS_FINE_LOCATION, ACCESS_WIFI_STATE, READ_WIFI_CREDENTIAL})
     public List<WifiConfiguration> getPrivilegedConfiguredNetworks() {
         try {
-            Bundle extras = new Bundle();
-            if (SdkLevel.isAtLeastS()) {
-                extras.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                        mContext.getAttributionSource());
-            }
             ParceledListSlice<WifiConfiguration> parceledList =
                     mService.getPrivilegedConfiguredNetworks(mContext.getOpPackageName(),
-                            mContext.getAttributionTag(), extras);
+                            mContext.getAttributionTag());
             if (parceledList == null) {
                 return Collections.emptyList();
             }
@@ -1706,47 +1521,6 @@
     }
 
     /**
-     * Gets the {@link WifiConfiguration} with credentials of the connected wifi network
-     * that's providing internet by default.
-     * <p>
-     * On {@link android.os.Build.VERSION_CODES#TIRAMISU} or later SDKs, the caller need to have
-     * the following permissions: {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation",
-     * {@link android.Manifest.permission#ACCESS_WIFI_STATE} and
-     * {@link android.Manifest.permission#READ_WIFI_CREDENTIAL}. If the app does not have
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     * <p>
-     * On {@link Build.VERSION_CODES#S} or prior SDKs, the caller need to have the
-     * following permissions: {@link android.Manifest.permission#ACCESS_FINE_LOCATION},
-     * {@link android.Manifest.permission#CHANGE_WIFI_STATE} and
-     * {@link android.Manifest.permission#READ_WIFI_CREDENTIAL}.
-     *
-     * @return The WifiConfiguration representation of the connected wifi network providing
-     * internet, or null if wifi is not connected.
-     *
-     * @throws {@link SecurityException} if caller does not have the required permissions
-     * @hide
-     **/
-    @SystemApi
-    @RequiresPermission(allOf = {NEARBY_WIFI_DEVICES, ACCESS_WIFI_STATE, READ_WIFI_CREDENTIAL},
-            conditional = true)
-    @Nullable
-    public WifiConfiguration getPrivilegedConnectedNetwork() {
-        try {
-            Bundle extras = new Bundle();
-            if (SdkLevel.isAtLeastS()) {
-                extras.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                        mContext.getAttributionSource());
-            }
-            return mService.getPrivilegedConnectedNetwork(mContext.getOpPackageName(),
-                    mContext.getAttributionTag(), extras);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
      * Returns a list of all matching WifiConfigurations of PasspointConfiguration for a given list
      * of ScanResult.
      *
@@ -1791,132 +1565,6 @@
     }
 
     /**
-     * To be used with setScreenOnScanSchedule.
-     * @hide
-     */
-    @SystemApi
-    public static class ScreenOnScanSchedule {
-        private final Duration mScanInterval;
-        private final int mScanType;
-
-        /**
-         * Creates a ScreenOnScanSchedule.
-         * @param scanInterval Interval between framework-initiated connectivity scans.
-         * @param scanType One of the {@code WifiScanner.SCAN_TYPE_} values.
-         */
-        public ScreenOnScanSchedule(@NonNull Duration scanInterval,
-                @WifiAnnotations.ScanType int scanType) {
-            if (scanInterval == null) {
-                throw new IllegalArgumentException("scanInterval can't be null");
-            }
-            mScanInterval = scanInterval;
-            mScanType = scanType;
-        }
-
-        /**
-         * Gets the interval between framework-initiated connectivity scans.
-         */
-        public @NonNull Duration getScanInterval() {
-            return mScanInterval;
-        }
-
-        /**
-         * Gets the type of scan to be used. One of the {@code WifiScanner.SCAN_TYPE_} values.
-         */
-        public @WifiAnnotations.ScanType int getScanType() {
-            return mScanType;
-        }
-    }
-
-    /**
-     * Allows a privileged app to customize the screen-on scan behavior. When a non-null schedule
-     * is set via this API, it will always get used instead of the scan schedules defined in the
-     * overlay. When a null schedule is set via this API, the wifi subsystem will go back to using
-     * the scan schedules defined in the overlay. Also note, the scan schedule will be truncated
-     * (rounded down) to the nearest whole second.
-     * <p>
-     * Example usage:
-     * The following call specifies that first scheduled scan should be in 20 seconds using
-     * {@link WifiScanner#SCAN_TYPE_HIGH_ACCURACY}, and all
-     * scheduled scans later should happen every 40 seconds using
-     * {@link WifiScanner#SCAN_TYPE_LOW_POWER}.
-     * <pre>
-     * List<ScreenOnScanSchedule> schedule = new ArrayList<>();
-     * schedule.add(new ScreenOnScanSchedule(Duration.ofSeconds(20),
-     *         WifiScanner.SCAN_TYPE_HIGH_ACCURACY));
-     * schedule.add(new ScreenOnScanSchedule(Duration.ofSeconds(40),
-     *         WifiScanner.SCAN_TYPE_LOW_POWER));
-     * wifiManager.setScreenOnScanSchedule(schedule);
-     * </pre>
-     * @param screenOnScanSchedule defines the screen-on scan schedule and the corresponding
-     *                             scan type. Set to null to clear any previously set value.
-     *
-     * @throws IllegalStateException if input is invalid
-     * @throws UnsupportedOperationException if the API is not supported on this SDK version.
-     * @throws SecurityException if the caller does not have permission.
-     * @hide
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            MANAGE_WIFI_NETWORK_SELECTION
-    })
-    @SystemApi
-    public void setScreenOnScanSchedule(@Nullable List<ScreenOnScanSchedule> screenOnScanSchedule) {
-        try {
-            if (screenOnScanSchedule == null) {
-                mService.setScreenOnScanSchedule(null, null);
-                return;
-            }
-            if (screenOnScanSchedule.isEmpty()) {
-                throw new IllegalArgumentException("The input should either be null or a non-empty"
-                        + " list");
-            }
-            int[] scanSchedule = new int[screenOnScanSchedule.size()];
-            int[] scanType = new int[screenOnScanSchedule.size()];
-            for (int i = 0; i < screenOnScanSchedule.size(); i++) {
-                scanSchedule[i] = (int) screenOnScanSchedule.get(i).getScanInterval().toSeconds();
-                scanType[i] = screenOnScanSchedule.get(i).getScanType();
-            }
-            mService.setScreenOnScanSchedule(scanSchedule, scanType);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * The Wi-Fi framework may trigger connectivity scans in response to the screen turning on for
-     * network selection purposes. This API allows a privileged app to set a delay to the next
-     * connectivity scan triggered by the Wi-Fi framework in response to the next screen-on event.
-     * This gives a window for the privileged app to issue their own custom scans to influence Wi-Fi
-     * network selection. The expected usage is the privileged app monitor for the screen turning
-     * off, and then call this API if it believes delaying the next screen-on connectivity scan is
-     * needed.
-     * <p>
-     * Note that this API will only delay screen-on connectivity scans once. This API will need to
-     * be called again if further screen-on scan delays are needed after it resolves.
-     * @param delayMs defines the time in milliseconds to delay the next screen-on connectivity
-     *                scan. Setting this to 0 will remove the delay.
-     *
-     * @throws IllegalStateException if input is invalid
-     * @throws UnsupportedOperationException if the API is not supported on this SDK version.
-     * @throws SecurityException if the caller does not have permission.
-     * @hide
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            MANAGE_WIFI_NETWORK_SELECTION
-    })
-    public void setOneShotScreenOnConnectivityScanDelayMillis(@IntRange(from = 0) int delayMs) {
-        try {
-            mService.setOneShotScreenOnConnectivityScanDelayMillis(delayMs);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
      * Retrieve a list of {@link WifiConfiguration} for available {@link WifiNetworkSuggestion}
      * matching the given list of {@link ScanResult}.
      *
@@ -1947,54 +1595,6 @@
     }
 
     /**
-     * Specify a set of SSIDs that will not get disabled internally by the Wi-Fi subsystem when
-     * connection issues occur. To clear the list, call this API with an empty Set.
-     * <p>
-     * {@link #getSsidsAllowlist()} can be used to check the SSIDs that have been set.
-     * @param ssids - list of WifiSsid that will not get disabled internally
-     * @throws SecurityException if the calling app is not a Device Owner (DO), Profile Owner (PO),
-     *                           or a privileged app that has one of the permissions required by
-     *                           this API.
-     * @throws IllegalArgumentException if the input is null.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION}, conditional = true)
-    public void setSsidsAllowlist(@NonNull Set<WifiSsid> ssids) {
-        if (ssids == null) {
-            throw new IllegalArgumentException(TAG + ": ssids can not be null");
-        }
-        try {
-            mService.setSsidsAllowlist(mContext.getOpPackageName(), new ArrayList<>(ssids));
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Get the Set of SSIDs that will not get disabled internally by the Wi-Fi subsystem when
-     * connection issues occur.
-     * @throws SecurityException if the calling app is not a Device Owner (DO), Profile Owner (PO),
-     *                           or a privileged app that has one of the permissions required by
-     *                           this API.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION}, conditional = true)
-    public @NonNull Set<WifiSsid> getSsidsAllowlist() {
-        try {
-            return new ArraySet<WifiSsid>(
-                    mService.getSsidsAllowlist(mContext.getOpPackageName()));
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
      * Returns a list of unique Hotspot 2.0 OSU (Online Sign-Up) providers associated with a given
      * list of ScanResult.
      *
@@ -2107,8 +1707,7 @@
      * @throws {@link SecurityException} if the calling app is not a Device Owner (DO),
      *                           Profile Owner (PO), system app, or a privileged app that has one of
      *                           the permissions required by this API.
-     * @throws {@link IllegalArgumentException} if the input configuration is null or if the
-     *            security type in input configuration is not supported.
+     * @throws {@link IllegalArgumentException} if the input configuration is null.
      */
     @RequiresPermission(anyOf = {
             android.Manifest.permission.NETWORK_SETTINGS,
@@ -2119,10 +1718,6 @@
     @NonNull
     public AddNetworkResult addNetworkPrivileged(@NonNull WifiConfiguration config) {
         if (config == null) throw new IllegalArgumentException("config cannot be null");
-        if (config.isSecurityType(WifiInfo.SECURITY_TYPE_DPP)
-                && !isFeatureSupported(WIFI_FEATURE_DPP_AKM)) {
-            throw new IllegalArgumentException("dpp akm is not supported");
-        }
         config.networkId = -1;
         try {
             return mService.addOrUpdateNetworkPrivileged(config, mContext.getOpPackageName());
@@ -2286,14 +1881,8 @@
      * @return the ID of the network on success, {@code -1} on failure.
      */
     private int addOrUpdateNetwork(WifiConfiguration config) {
-        Bundle extras = new Bundle();
-        if (SdkLevel.isAtLeastS()) {
-            extras.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                    mContext.getAttributionSource());
-        }
-
         try {
-            return mService.addOrUpdateNetwork(config, mContext.getOpPackageName(), extras);
+            return mService.addOrUpdateNetwork(config, mContext.getOpPackageName());
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
@@ -2609,7 +2198,6 @@
      * permission.
      *<p>
      * NOTE:
-     * <ul>
      * <li> These networks are just a suggestion to the platform. The platform will ultimately
      * decide on which network the device connects to. </li>
      * <li> When an app is uninstalled or disabled, all its suggested networks are discarded.
@@ -2617,8 +2205,7 @@
      * device will disconnect from that network.</li>
      * <li> If user reset network settings, all added suggestions will be discarded. Apps can use
      * {@link #getNetworkSuggestions()} to check if their suggestions are in the device.</li>
-     * <li> In-place modification of existing suggestions are allowed.</li>
-     * <ul>
+     * <li> In-place modification of existing suggestions are allowed.
      * <li> If the provided suggestions include any previously provided suggestions by the app,
      * previous suggestions will be updated.</li>
      * <li>If one of the provided suggestions marks a previously unmetered suggestion as metered and
@@ -2627,23 +2214,14 @@
      * and possibly reconnect back to the same suggestion. This disconnect is to make sure that any
      * traffic flowing over unmetered networks isn't accidentally continued over a metered network.
      * </li>
-     * <li>
-     * On {@link android.os.Build.VERSION_CODES#TIRAMISU} or above If one of the provided
-     * suggestions marks a previously trusted suggestion as untrusted and the device is currently
-     * connected to that suggested network, then the device will disconnect from that network. The
-     * system will immediately re-evaluate all the network candidates. This disconnect is to make
-     * sure device will not remain connected to an untrusted network without a related
-     * {@link android.net.NetworkRequest}.
      * </li>
-     * </ul>
-     * </ul>
      *
      * @param networkSuggestions List of network suggestions provided by the app.
      * @return Status code for the operation. One of the STATUS_NETWORK_SUGGESTIONS_ values.
      * @throws {@link SecurityException} if the caller is missing required permissions.
      * @see WifiNetworkSuggestion#equals(Object)
      */
-    @RequiresPermission(CHANGE_WIFI_STATE)
+    @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE)
     public @NetworkSuggestionsStatusCode int addNetworkSuggestions(
             @NonNull List<WifiNetworkSuggestion> networkSuggestions) {
         try {
@@ -2657,51 +2235,23 @@
     /**
      * Remove some or all of the network suggestions that were previously provided by the app.
      * If one of the suggestions being removed was used to establish connection to the current
-     * network, then the device will immediately disconnect from that network. This method is same
-     * as {@link #removeNetworkSuggestions(List, int)} with
-     * {@link #ACTION_REMOVE_SUGGESTION_DISCONNECT}
-     *
-     * See {@link WifiNetworkSuggestion} for a detailed explanation of the parameters.
-     * See {@link WifiNetworkSuggestion#equals(Object)} for the equivalence evaluation used.
-     * <p></
-     * Note: Use {@link #removeNetworkSuggestions(List, int)}. An {@code action} of
-     * {@link #ACTION_REMOVE_SUGGESTION_DISCONNECT} is equivalent to the current behavior.
-     *
-     * @param networkSuggestions List of network suggestions to be removed. Pass an empty list
-     *                           to remove all the previous suggestions provided by the app.
-     * @return Status code for the operation. One of the {@code STATUS_NETWORK_SUGGESTIONS_*}
-     * values. Any matching suggestions are removed from the device and will not be considered for
-     * any further connection attempts.
-     */
-    @RequiresPermission(CHANGE_WIFI_STATE)
-    public @NetworkSuggestionsStatusCode int removeNetworkSuggestions(
-            @NonNull List<WifiNetworkSuggestion> networkSuggestions) {
-        return removeNetworkSuggestions(networkSuggestions, ACTION_REMOVE_SUGGESTION_DISCONNECT);
-    }
-
-    /**
-     * Remove some or all of the network suggestions that were previously provided by the app.
-     * If one of the suggestions being removed was used to establish connection to the current
-     * network, then the specified action will be executed.
+     * network, then the device will immediately disconnect from that network.
      *
      * See {@link WifiNetworkSuggestion} for a detailed explanation of the parameters.
      * See {@link WifiNetworkSuggestion#equals(Object)} for the equivalence evaluation used.
      *
      * @param networkSuggestions List of network suggestions to be removed. Pass an empty list
      *                           to remove all the previous suggestions provided by the app.
-     * @param action Desired action to execute after removing the suggestion. One of
-     *               {@code ACTION_REMOVE_SUGGESTION_*}
-     * @return Status code for the operation. One of the {@code STATUS_NETWORK_SUGGESTIONS_*}
-     * values. Any matching suggestions are removed from the device and will not be considered for
+     * @return Status code for the operation. One of the STATUS_NETWORK_SUGGESTIONS_ values.
+     * Any matching suggestions are removed from the device and will not be considered for any
      * further connection attempts.
      */
-    @RequiresPermission(CHANGE_WIFI_STATE)
+    @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE)
     public @NetworkSuggestionsStatusCode int removeNetworkSuggestions(
-            @NonNull List<WifiNetworkSuggestion> networkSuggestions,
-            @ActionAfterRemovingSuggestion int action) {
+            @NonNull List<WifiNetworkSuggestion> networkSuggestions) {
         try {
-            return mService.removeNetworkSuggestions(networkSuggestions,
-                    mContext.getOpPackageName(), action);
+            return mService.removeNetworkSuggestions(
+                    networkSuggestions, mContext.getOpPackageName());
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
@@ -2898,7 +2448,7 @@
      * @return {@code true} if at least one network is removed, {@code false} otherwise
      * @throws {@link java.lang.SecurityException} if the caller is not a Device Owner app
      */
-    @RequiresPermission(CHANGE_WIFI_STATE)
+    @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE)
     public boolean removeNonCallerConfiguredNetworks() {
         try {
             return mService.removeNonCallerConfiguredNetworks(mContext.getOpPackageName());
@@ -3221,24 +2771,6 @@
      * @hide */
     public static final long WIFI_FEATURE_DECORATED_IDENTITY = 0x8000000000000L;
 
-    /**
-     * Trust On First Use support for WPA Enterprise network
-     * @hide
-     */
-    public static final long WIFI_FEATURE_TRUST_ON_FIRST_USE = 0x10000000000000L;
-
-    /**
-     * Support for 2 STA's multi internet concurrency.
-     * @hide
-     */
-    public static final long WIFI_FEATURE_ADDITIONAL_STA_MULTI_INTERNET = 0x20000000000000L;
-
-    /**
-     * Support for DPP (Easy-Connect) AKM.
-     * @hide
-     */
-    public static final long WIFI_FEATURE_DPP_AKM = 0x40000000000000L;
-
     private long getSupportedFeatures() {
         try {
             return mService.getSupportedFeatures();
@@ -3326,18 +2858,6 @@
     }
 
     /**
-     * Query whether or not the device supports concurrent station (STA) connections for multi
-     * internet connections.
-     *
-     * @return true if this device supports multiple STA concurrency for this use-case, false
-     * otherwise.
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public boolean isStaConcurrencyForMultiInternetSupported() {
-        return isFeatureSupported(WIFI_FEATURE_ADDITIONAL_STA_MULTI_INTERNET);
-    }
-
-    /**
      * Query whether or not the device supports concurrent station (STA) connections for restricted
      * connections using {@link WifiNetworkSuggestion.Builder#setOemPaid(boolean)} /
      * {@link WifiNetworkSuggestion.Builder#setOemPrivate(boolean)}.
@@ -3658,7 +3178,7 @@
      *
      *</p>
      * Usage example:
-     * <pre>
+     * <pre>{@code
      * final NetworkRequest request =
      *      new NetworkRequest.Builder()
      *      .addTransportType(NetworkCapabilities.TRANSPORT_WIFI)
@@ -3667,10 +3187,10 @@
      *      context.getSystemService(ConnectivityManager.class);
      * final NetworkCallback networkCallback = new NetworkCallback() {
      *      ...
-     *      &#64;Override
+     *      {@literal @}Override
      *      void onAvailable(Network network) {}
      *
-     *      &#64;Override
+     *      {@literal @}Override
      *      void onCapabilitiesChanged(Network network, NetworkCapabilities networkCapabilities) {
      *          WifiInfo wifiInfo = (WifiInfo) networkCapabilities.getTransportInfo();
      *      }
@@ -3678,7 +3198,7 @@
      * };
      * connectivityManager.requestNetwork(request, networkCallback); // For request
      * connectivityManager.registerNetworkCallback(request, networkCallback); // For listen
-     * </pre>
+     * }</pre>
      * <p>
      * <b>Compatibility Notes:</b>
      * <li>Apps can continue using this API, however newer features
@@ -3695,7 +3215,6 @@
      * </p>
      */
     @Deprecated
-    @RequiresPermission(allOf = {ACCESS_WIFI_STATE, ACCESS_FINE_LOCATION}, conditional = true)
     public WifiInfo getConnectionInfo() {
         try {
             return mService.getConnectionInfo(mContext.getOpPackageName(),
@@ -3709,10 +3228,8 @@
      * Return the results of the latest access point scan.
      * @return the list of access points found in the most recent scan. An app must hold
      * {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION} permission
-     * and {@link android.Manifest.permission#ACCESS_WIFI_STATE} permission
      * in order to get valid results.
      */
-    @RequiresPermission(allOf = {ACCESS_WIFI_STATE, ACCESS_FINE_LOCATION})
     public List<ScanResult> getScanResults() {
         try {
             return mService.getScanResults(mContext.getOpPackageName(),
@@ -3810,147 +3327,6 @@
     }
 
     /**
-     * Helper class to support driver country code changed listener.
-     */
-    private static class OnDriverCountryCodeChangedProxy
-            extends IOnWifiDriverCountryCodeChangedListener.Stub {
-
-        @NonNull private Executor mExecutor;
-        @NonNull private ActiveCountryCodeChangedCallback mCallback;
-
-        OnDriverCountryCodeChangedProxy(@NonNull Executor executor,
-                @NonNull ActiveCountryCodeChangedCallback callback) {
-            Objects.requireNonNull(executor);
-            Objects.requireNonNull(callback);
-            mExecutor = executor;
-            mCallback = callback;
-        }
-
-        @Override
-        public void onDriverCountryCodeChanged(String countryCode) {
-            Log.i(TAG, "OnDriverCountryCodeChangedProxy: receive onDriverCountryCodeChanged: "
-                    + countryCode);
-            Binder.clearCallingIdentity();
-            if (countryCode != null) {
-                mExecutor.execute(() -> mCallback.onActiveCountryCodeChanged(countryCode));
-            } else {
-                mExecutor.execute(() -> mCallback.onCountryCodeInactive());
-            }
-        }
-    }
-
-    /**
-     * Interface used to listen the active country code changed event.
-     * @hide
-     */
-    @SystemApi
-    public interface ActiveCountryCodeChangedCallback {
-        /**
-         * Called when the country code used by the Wi-Fi subsystem has changed.
-         *
-         * @param countryCode An ISO-3166-alpha2 country code which is 2-Character alphanumeric.
-         */
-        void onActiveCountryCodeChanged(@NonNull String countryCode);
-
-        /**
-         * Called when the Wi-Fi subsystem does not have an active country code.
-         * This can happen when Wi-Fi is disabled.
-         */
-        void onCountryCodeInactive();
-    }
-
-    /**
-     * Add the provided callback for the active country code changed event.
-     * Caller will receive either
-     * {@link WifiManager.ActiveCountryCodeChangedCallback#onActiveCountryCodeChanged(String)}
-     * or {@link WifiManager.ActiveCountryCodeChangedCallback#onCountryCodeInactive()}
-     * on registration.
-     *
-     * Caller can remove a previously registered callback using
-     * {@link WifiManager#unregisterActiveCountryCodeChangedCallback(
-     * ActiveCountryCodeChangedCallback)}.
-     *
-     * <p>
-     * Note:
-     * The value provided by
-     * {@link WifiManager.ActiveCountryCodeChangedCallback#onActiveCountryCodeChanged(String)}
-     * may be different from the returned value from {@link WifiManager#getCountryCode()} even if
-     * the Wi-Fi subsystem is active. See: {@link WifiManager#getCountryCode()} for details.
-     * </p>
-     *
-     * @param executor The Executor on which to execute the callbacks.
-     * @param callback callback for the driver country code changed events.
-     * @hide
-     */
-    @SystemApi
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION)
-    public void registerActiveCountryCodeChangedCallback(
-            @NonNull @CallbackExecutor Executor executor,
-            @NonNull ActiveCountryCodeChangedCallback callback) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        if (executor == null) throw new IllegalArgumentException("executor cannot be null");
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "registerActiveCountryCodeChangedCallback: callback=" + callback
-                    + ", executor=" + executor);
-        }
-        final int callbackIdentifier = System.identityHashCode(callback);
-        synchronized (sActiveCountryCodeChangedCallbackMap) {
-            try {
-                IOnWifiDriverCountryCodeChangedListener.Stub binderListener =
-                        new OnDriverCountryCodeChangedProxy(executor, callback);
-                sActiveCountryCodeChangedCallbackMap.put(callbackIdentifier,
-                        binderListener);
-                mService.registerDriverCountryCodeChangedListener(binderListener,
-                        mContext.getOpPackageName(), mContext.getAttributionTag());
-            } catch (RemoteException e) {
-                sActiveCountryCodeChangedCallbackMap.remove(callbackIdentifier);
-                throw e.rethrowFromSystemServer();
-            }
-        }
-    }
-
-    /**
-     * Allow callers to remove a previously registered listener. After calling this method,
-     * applications will no longer receive the active country code changed events through that
-     * callback.
-     *
-     * @param callback Callback to remove the active country code changed events.
-     *
-     * @hide
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @SystemApi
-    public void unregisterActiveCountryCodeChangedCallback(
-            @NonNull ActiveCountryCodeChangedCallback callback) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        if (callback == null) throw new IllegalArgumentException("Callback cannot be null");
-        if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "unregisterActiveCountryCodeChangedCallback: callback=" + callback);
-        }
-        final int callbackIdentifier = System.identityHashCode(callback);
-        synchronized (sActiveCountryCodeChangedCallbackMap) {
-            try {
-                if (!sActiveCountryCodeChangedCallbackMap.contains(callbackIdentifier)) {
-                    Log.w(TAG, "Unknown external listener " + callbackIdentifier);
-                    return;
-                }
-                mService.unregisterDriverCountryCodeChangedListener(
-                        sActiveCountryCodeChangedCallbackMap.get(callbackIdentifier));
-            } catch (RemoteException e) {
-                throw e.rethrowFromSystemServer();
-            } finally {
-                sActiveCountryCodeChangedCallbackMap.remove(callbackIdentifier);
-            }
-        }
-    }
-
-    /**
      * Get the country code as resolved by the Wi-Fi framework.
      * The Wi-Fi framework uses multiple sources to resolve a country code
      * - in order of priority (high to low):
@@ -3959,20 +3335,9 @@
      * for testing.
      * 2. Country code supplied by the telephony module. Typically provided from the
      * current network or from emergency cell information.
-     * 3. Country code supplied by the wifi driver module. (802.11d)
-     * 4. Default country code set either via {@code ro.boot.wificountrycode}
+     * 3. Default country code set either via {@code ro.boot.wificountrycode}
      * or the {@link WifiManager#setDefaultCountryCode(String)}.
      *
-     * <p>
-     * Note:
-     * This method returns the Country Code value used by the framework - even if not currently
-     * used by the Wi-Fi subsystem. I.e. the returned value from this API may be different from the
-     * value provided by
-     * {@link WifiManager.ActiveCountryCodeChangedCallback#onActiveCountryCodeChanged(String)}.
-     * Such a difference may happen when there is an ongoing network connection (STA, AP, Direct,
-     * or Aware) and the Wi-Fi subsystem does not support dynamic updates - at that point the
-     * framework may defer setting the Country Code to the Wi-Fi subsystem.
-     * </p>
      * @return the country code in ISO 3166 alpha-2 (2-letter) upper format,
      * or null if there is no country code configured.
      *
@@ -3980,14 +3345,10 @@
      */
     @Nullable
     @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.ACCESS_COARSE_LOCATION
-    })
+    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
     public String getCountryCode() {
         try {
-            return mService.getCountryCode(mContext.getOpPackageName(),
-                    mContext.getAttributionTag());
+            return mService.getCountryCode();
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
@@ -4101,9 +3462,6 @@
      * <ul>
      * <li>Device Owner (DO), Profile Owner (PO) and system apps.
      * </ul>
-     *
-     * Starting with Build.VERSION_CODES#T, DO/COPE may set a user restriction
-     * (DISALLOW_CHANGE_WIFI_STATE) to only allow DO/PO to use this API.
      */
     @Deprecated
     public boolean setWifiEnabled(boolean enabled) {
@@ -4723,13 +4081,9 @@
      * Applications should also be aware that this network will be shared with other applications.
      * Applications are responsible for protecting their data on this network (e.g. TLS).
      * <p>
-     * Applications targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later need to have
-     * the following permissions: {@link android.Manifest.permission#CHANGE_WIFI_STATE} and
-     * {@link android.Manifest.permission#NEARBY_WIFI_DEVICES}.
-     * Applications targeting {@link Build.VERSION_CODES#S} or prior SDK levels need to have the
-     * following permissions: {@link android.Manifest.permission#CHANGE_WIFI_STATE} and
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
-     * Callers without
+     * Applications need to have the following permissions to start LocalOnlyHotspot: {@link
+     * android.Manifest.permission#CHANGE_WIFI_STATE} and {@link
+     * android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION}.  Callers without
      * the permissions will trigger a {@link java.lang.SecurityException}.
      * <p>
      * @param callback LocalOnlyHotspotCallback for the application to receive updates about
@@ -4737,8 +4091,9 @@
      * @param handler Handler to be used for callbacks.  If the caller passes a null Handler, the
      * main thread will be used.
      */
-    @RequiresPermission(allOf = {CHANGE_WIFI_STATE, ACCESS_FINE_LOCATION, NEARBY_WIFI_DEVICES},
-            conditional = true)
+    @RequiresPermission(allOf = {
+            android.Manifest.permission.CHANGE_WIFI_STATE,
+            android.Manifest.permission.ACCESS_FINE_LOCATION})
     public void startLocalOnlyHotspot(LocalOnlyHotspotCallback callback,
             @Nullable Handler handler) {
         Executor executor = handler == null ? null : new HandlerExecutor(handler);
@@ -4749,9 +4104,8 @@
      * Starts a local-only hotspot with a specific configuration applied. See
      * {@link #startLocalOnlyHotspot(LocalOnlyHotspotCallback, Handler)}.
      *
-     * Applications need either {@link android.Manifest.permission#NETWORK_SETUP_WIZARD},
-     * {@link android.Manifest.permission#NETWORK_SETTINGS} or
-     * {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} to call this method.
+     * Applications need either {@link android.Manifest.permission#NETWORK_SETUP_WIZARD} or
+     * {@link android.Manifest.permission#NETWORK_SETTINGS} to call this method.
      *
      * Since custom configuration settings may be incompatible with each other, the hotspot started
      * through this method cannot coexist with another hotspot created through
@@ -4767,8 +4121,7 @@
     @SystemApi
     @RequiresPermission(anyOf = {
             android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD,
-            NEARBY_WIFI_DEVICES})
+            android.Manifest.permission.NETWORK_SETUP_WIZARD})
     public void startLocalOnlyHotspot(@NonNull SoftApConfiguration config,
             @Nullable Executor executor,
             @Nullable LocalOnlyHotspotCallback callback) {
@@ -4797,13 +4150,8 @@
             try {
                 String packageName = mContext.getOpPackageName();
                 String featureId = mContext.getAttributionTag();
-                Bundle extras = new Bundle();
-                if (SdkLevel.isAtLeastS()) {
-                    extras.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                            mContext.getAttributionSource());
-                }
                 int returnCode = mService.startLocalOnlyHotspot(proxy, packageName, featureId,
-                        config, extras);
+                        config);
                 if (returnCode != LocalOnlyHotspotCallback.REQUEST_REGISTERED) {
                     // Send message to the proxy to make sure we call back on the correct thread
                     proxy.onHotspotFailed(returnCode);
@@ -4862,103 +4210,6 @@
     }
 
     /**
-     * Registers a callback for local only hotspot. See {@link SoftApCallback}. Caller will receive
-     * the following callbacks on registration:
-     * <ul>
-     * <li> {@link SoftApCallback#onStateChanged(int, int)}</li>
-     * <li> {@link SoftApCallback#onConnectedClientsChanged(List<WifiClient>)}</li>
-     * <li> {@link SoftApCallback#onInfoChanged(List<SoftApInfo>)}</li>
-     * <li> {@link SoftApCallback#onCapabilityChanged(SoftApCapability)}</li>
-     * </ul>
-     *
-     * Use {@link SoftApCallback#onConnectedClientsChanged(SoftApInfo, List<WifiClient>)} to know
-     * if there are any clients connected to a specific bridged instance of this AP
-     * (if bridged AP is enabled).
-     *
-     * Note: Caller will receive the callback
-     * {@link SoftApCallback#onConnectedClientsChanged(SoftApInfo, List<WifiClient>)}
-     * on registration when there are clients connected to AP.
-     *
-     * These will be dispatched on registration to provide the caller with the current state
-     * (and are not an indication of any current change). Note that receiving an immediate
-     * WIFI_AP_STATE_FAILED value for soft AP state indicates that the latest attempt to start
-     * soft AP has failed. Caller can unregister a previously registered callback using
-     * {@link #unregisterLocalOnlyHotspotSoftApCallback}
-     * <p>
-     *
-     * @param executor The Executor on whose thread to execute the callbacks of the {@code callback}
-     *                 object.
-     * @param callback Callback for local only hotspot events
-     * @hide
-     */
-    @SystemApi
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(NEARBY_WIFI_DEVICES)
-    public void registerLocalOnlyHotspotSoftApCallback(@NonNull @CallbackExecutor Executor executor,
-            @NonNull SoftApCallback callback) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        if (executor == null) throw new IllegalArgumentException("executor cannot be null");
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        Log.v(TAG, "registerLocalOnlyHotspotSoftApCallback: callback=" + callback + ", executor="
-                + executor);
-        try {
-            synchronized (sLocalOnlyHotspotSoftApCallbackMap) {
-                ISoftApCallback.Stub binderCallback = new SoftApCallbackProxy(executor, callback,
-                        IFACE_IP_MODE_LOCAL_ONLY);
-                sLocalOnlyHotspotSoftApCallbackMap.put(System.identityHashCode(callback),
-                        binderCallback);
-                Bundle extras = new Bundle();
-                extras.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                        mContext.getAttributionSource());
-                mService.registerLocalOnlyHotspotSoftApCallback(binderCallback, extras);
-            }
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Allow callers to unregister a previously registered callback. After calling this method,
-     * applications will no longer receive local only hotspot events.
-     *
-     * <p>
-     *
-     * @param callback Callback to unregister for soft AP events
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(NEARBY_WIFI_DEVICES)
-    public void unregisterLocalOnlyHotspotSoftApCallback(@NonNull SoftApCallback callback) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        Log.v(TAG, "unregisterLocalOnlyHotspotSoftApCallback: callback=" + callback);
-
-        try {
-            synchronized (sLocalOnlyHotspotSoftApCallbackMap) {
-                int callbackIdentifier = System.identityHashCode(callback);
-                if (!sLocalOnlyHotspotSoftApCallbackMap.contains(callbackIdentifier)) {
-                    Log.w(TAG, "Unknown external callback " + callbackIdentifier);
-                    return;
-                }
-                Bundle extras = new Bundle();
-                extras.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                        mContext.getAttributionSource());
-                mService.unregisterLocalOnlyHotspotSoftApCallback(
-                        sLocalOnlyHotspotSoftApCallbackMap.get(callbackIdentifier), extras);
-                sLocalOnlyHotspotSoftApCallbackMap.remove(callbackIdentifier);
-            }
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
      * Allow callers (Settings UI) to watch LocalOnlyHotspot state changes.  Callers will
      * receive a {@link LocalOnlyHotspotSubscription} object as a parameter of the
      * {@link LocalOnlyHotspotObserver#onRegistered(LocalOnlyHotspotSubscription)}. The registered
@@ -5096,7 +4347,7 @@
      * @hide
      */
     @SystemApi
-    @RequiresPermission(CHANGE_WIFI_STATE)
+    @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE)
     @Deprecated
     public boolean setWifiApConfiguration(WifiConfiguration wifiConfig) {
         try {
@@ -5183,13 +4434,31 @@
         }
     }
 
+    /**
+     * Passed with {@link ActionListener#onFailure}.
+     * Indicates that the operation failed due to an internal error.
+     * @hide
+     */
+    public static final int ERROR                       = 0;
+
+    /**
+     * Passed with {@link ActionListener#onFailure}.
+     * Indicates that the operation is already in progress
+     * @hide
+     */
+    public static final int IN_PROGRESS                 = 1;
+
+    /**
+     * Passed with {@link ActionListener#onFailure}.
+     * Indicates that the operation failed because the framework is busy and
+     * unable to service the request
+     * @hide
+     */
+    public static final int BUSY                        = 2;
+
     /** @hide */
     @Retention(RetentionPolicy.SOURCE)
-    @IntDef({ActionListener.FAILURE_INTERNAL_ERROR,
-            ActionListener.FAILURE_IN_PROGRESS,
-            ActionListener.FAILURE_BUSY,
-            ActionListener.FAILURE_INVALID_ARGS,
-            ActionListener.FAILURE_NOT_AUTHORIZED})
+    @IntDef({ERROR, IN_PROGRESS, BUSY})
     public @interface ActionListenerFailureReason {}
 
     /* WPS specific errors */
@@ -5215,43 +4484,26 @@
     public static final int WPS_TIMED_OUT               = 7;
 
     /**
-     * Interface for callback invocation on an application action.
+     * Passed with {@link ActionListener#onFailure}.
+     * Indicates that the operation failed due to invalid inputs
+     * @hide
+     */
+    public static final int INVALID_ARGS                = 8;
+
+    /**
+     * Passed with {@link ActionListener#onFailure}.
+     * Indicates that the operation failed due to user permissions.
+     * @hide
+     */
+    public static final int NOT_AUTHORIZED              = 9;
+
+    /**
+     * Interface for callback invocation on an application action
      * @hide
      */
     @SystemApi
     public interface ActionListener {
         /**
-         * Passed with {@link #onFailure}.
-         * Indicates that the operation failed due to an internal error.
-         */
-        int FAILURE_INTERNAL_ERROR = 0;
-
-        /**
-         * Passed with {@link #onFailure}.
-         * Indicates that the operation is already in progress.
-         */
-        int FAILURE_IN_PROGRESS = 1;
-
-        /**
-         * Passed with {@link #onFailure}.
-         * Indicates that the operation failed because the framework is busy and is unable to
-         * service the request.
-         */
-        int FAILURE_BUSY = 2;
-
-        /**
-         * Passed with {@link #onFailure}.
-         * Indicates that the operation failed due to invalid inputs.
-         */
-        int FAILURE_INVALID_ARGS = 3;
-
-        /**
-         * Passed with {@link #onFailure}.
-         * Indicates that the operation failed due to insufficient user permissions.
-         */
-        int FAILURE_NOT_AUTHORIZED = 4;
-
-        /**
          * The operation succeeded.
          */
         void onSuccess();
@@ -5423,8 +4675,6 @@
     private class SoftApCallbackProxy extends ISoftApCallback.Stub {
         private final Executor mExecutor;
         private final SoftApCallback mCallback;
-        // Either {@link #IFACE_IP_MODE_TETHERED} or {@link #IFACE_IP_MODE_LOCAL_ONLY}.
-        private final int mIpMode;
         private Map<String, List<WifiClient>> mCurrentClients = new HashMap<>();
         private Map<String, SoftApInfo> mCurrentInfos = new HashMap<>();
 
@@ -5436,17 +4686,16 @@
             return connectedClientList;
         }
 
-        SoftApCallbackProxy(Executor executor, SoftApCallback callback, int mode) {
+        SoftApCallbackProxy(Executor executor, SoftApCallback callback) {
             mExecutor = executor;
             mCallback = callback;
-            mIpMode = mode;
         }
 
         @Override
         public void onStateChanged(int state, int failureReason) {
             if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "SoftApCallbackProxy on mode " + mIpMode + ", onStateChanged: state="
-                        + state + ", failureReason=" + failureReason);
+                Log.v(TAG, "SoftApCallbackProxy: onStateChanged: state=" + state
+                        + ", failureReason=" + failureReason);
             }
 
             Binder.clearCallingIdentity();
@@ -5459,8 +4708,7 @@
         public void onConnectedClientsOrInfoChanged(Map<String, SoftApInfo> infos,
                 Map<String, List<WifiClient>> clients, boolean isBridged, boolean isRegistration) {
             if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "SoftApCallbackProxy on mode " + mIpMode
-                        + ", onConnectedClientsOrInfoChanged: clients: "
+                Log.v(TAG, "SoftApCallbackProxy: onConnectedClientsOrInfoChanged: clients: "
                         + clients + ", infos: " + infos + ", isBridged is " + isBridged
                         + ", isRegistration is " + isRegistration);
             }
@@ -5487,26 +4735,19 @@
             // Check if old info removed or not (client changed case)
             for (SoftApInfo info : mCurrentInfos.values()) {
                 String changedInstance = info.getApInstanceIdentifier();
-                List<WifiClient> changedClientList = clients.getOrDefault(
-                        changedInstance, Collections.emptyList());
                 if (!changedInfoList.contains(info)) {
                     isInfoChanged = true;
                     if (mCurrentClients.getOrDefault(changedInstance,
                               Collections.emptyList()).size() > 0) {
-                        SoftApInfo changedInfo = infos.get(changedInstance);
-                        if (changedInfo == null || changedInfo.getFrequency() == 0) {
-                            Log.d(TAG, "SoftApCallbackProxy on mode " + mIpMode
-                                    + ", info changed on client connected instance(AP disabled)");
-                            // Send old info with empty client list for shutdown case
-                            changedInfoClients.put(info, Collections.emptyList());
-                        } else {
-                            Log.d(TAG, "SoftApCallbackProxy on mode " + mIpMode
-                                    + ", info changed on client connected instance");
-                            changedInfoClients.put(changedInfo, changedClientList);
-                        }
+                        Log.d(TAG, "SoftApCallbackProxy: info changed on client connected"
+                                + " instance(Shut Down case)");
+                        //Here should notify client changed on old info
+                        changedInfoClients.put(info, Collections.emptyList());
                     }
                 } else {
                     // info doesn't change, check client list
+                    List<WifiClient> changedClientList = clients.getOrDefault(
+                            changedInstance, Collections.emptyList());
                     if (changedClientList.size()
                             != mCurrentClients
                             .getOrDefault(changedInstance, Collections.emptyList()).size()) {
@@ -5520,15 +4761,14 @@
             mCurrentInfos = infos;
             if (!isInfoChanged && changedInfoClients.isEmpty()
                     && !isRegistration && !areClientsChangedWithoutInfosChanged) {
-                Log.v(TAG, "SoftApCallbackProxy on mode " + mIpMode
-                        + ", No changed & Not Registration don't need to notify the client");
+                Log.v(TAG, "SoftApCallbackProxy: No changed & Not Registration,"
+                        + " don't need to notify the client");
                 return;
             }
             Binder.clearCallingIdentity();
             // Notify the clients changed first for old info shutdown case
             for (SoftApInfo changedInfo : changedInfoClients.keySet()) {
-                Log.v(TAG, "SoftApCallbackProxy on mode " + mIpMode
-                        + ", send onConnectedClientsChanged, changedInfo is "
+                Log.v(TAG, "SoftApCallbackProxy: send onConnectedClientsChanged, changedInfo is "
                         + changedInfo + " and clients are " + changedInfoClients.get(changedInfo));
                 mExecutor.execute(() -> {
                     mCallback.onConnectedClientsChanged(
@@ -5540,14 +4780,13 @@
                 if (!isBridged) {
                     SoftApInfo newInfo = changedInfoList.isEmpty()
                             ? new SoftApInfo() : changedInfoList.get(0);
-                    Log.v(TAG, "SoftApCallbackProxy on mode " + mIpMode
-                            + ", send InfoChanged, newInfo: " + newInfo);
+                    Log.v(TAG, "SoftApCallbackProxy: send InfoChanged, newInfo: " + newInfo);
                     mExecutor.execute(() -> {
                         mCallback.onInfoChanged(newInfo);
                     });
                 }
-                Log.v(TAG, "SoftApCallbackProxy on mode " + mIpMode
-                        + ", send InfoChanged, changedInfoList: " + changedInfoList);
+                Log.v(TAG, "SoftApCallbackProxy: send InfoChanged, changedInfoList: "
+                        + changedInfoList);
                 mExecutor.execute(() -> {
                     mCallback.onInfoChanged(changedInfoList);
                 });
@@ -5555,8 +4794,7 @@
 
             if (isRegistration || !changedInfoClients.isEmpty()
                     || areClientsChangedWithoutInfosChanged) {
-                Log.v(TAG, "SoftApCallbackProxy on mode " + mIpMode
-                        + ", send onConnectedClientsChanged(clients): "
+                Log.v(TAG, "SoftApCallbackProxy: send onConnectedClientsChanged(clients): "
                         + getConnectedClientList(clients));
                 mExecutor.execute(() -> {
                     mCallback.onConnectedClientsChanged(getConnectedClientList(clients));
@@ -5567,8 +4805,8 @@
         @Override
         public void onCapabilityChanged(SoftApCapability capability) {
             if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "SoftApCallbackProxy on mode " + mIpMode
-                        + ",  onCapabilityChanged: SoftApCapability = " + capability);
+                Log.v(TAG, "SoftApCallbackProxy: onCapabilityChanged: SoftApCapability="
+                        + capability);
             }
 
             Binder.clearCallingIdentity();
@@ -5580,8 +4818,7 @@
         @Override
         public void onBlockedClientConnecting(@NonNull WifiClient client, int blockedReason) {
             if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "SoftApCallbackProxy on mode " + mIpMode
-                        + ", onBlockedClientConnecting: client =" + client
+                Log.v(TAG, "SoftApCallbackProxy: onBlockedClientConnecting: client=" + client
                         + " with reason = " + blockedReason);
             }
 
@@ -5641,8 +4878,7 @@
 
         try {
             synchronized (sSoftApCallbackMap) {
-                ISoftApCallback.Stub binderCallback = new SoftApCallbackProxy(executor, callback,
-                        IFACE_IP_MODE_TETHERED);
+                ISoftApCallback.Stub binderCallback = new SoftApCallbackProxy(executor, callback);
                 sSoftApCallbackMap.put(System.identityHashCode(callback), binderCallback);
                 mService.registerSoftApCallback(binderCallback);
             }
@@ -6028,15 +5264,11 @@
             listenerProxy = new ActionListenerProxy("connect", mLooper, listener);
         }
         try {
-            mService.connect(config, networkId, listenerProxy, mContext.getOpPackageName());
+            mService.connect(config, networkId, listenerProxy);
         } catch (RemoteException e) {
-            if (listenerProxy != null) {
-                listenerProxy.onFailure(ActionListener.FAILURE_INTERNAL_ERROR);
-            }
+            if (listenerProxy != null) listenerProxy.onFailure(ERROR);
         } catch (SecurityException e) {
-            if (listenerProxy != null) {
-                listenerProxy.onFailure(ActionListener.FAILURE_NOT_AUTHORIZED);
-            }
+            if (listenerProxy != null) listenerProxy.onFailure(NOT_AUTHORIZED);
         }
     }
 
@@ -6172,15 +5404,11 @@
             listenerProxy = new ActionListenerProxy("save", mLooper, listener);
         }
         try {
-            mService.save(config, listenerProxy, mContext.getOpPackageName());
+            mService.save(config, listenerProxy);
         } catch (RemoteException e) {
-            if (listenerProxy != null) {
-                listenerProxy.onFailure(ActionListener.FAILURE_INTERNAL_ERROR);
-            }
+            if (listenerProxy != null) listenerProxy.onFailure(ERROR);
         } catch (SecurityException e) {
-            if (listenerProxy != null) {
-                listenerProxy.onFailure(ActionListener.FAILURE_NOT_AUTHORIZED);
-            }
+            if (listenerProxy != null) listenerProxy.onFailure(NOT_AUTHORIZED);
         }
     }
 
@@ -6212,13 +5440,9 @@
         try {
             mService.forget(netId, listenerProxy);
         } catch (RemoteException e) {
-            if (listenerProxy != null) {
-                listenerProxy.onFailure(ActionListener.FAILURE_INTERNAL_ERROR);
-            }
+            if (listenerProxy != null) listenerProxy.onFailure(ERROR);
         } catch (SecurityException e) {
-            if (listenerProxy != null) {
-                listenerProxy.onFailure(ActionListener.FAILURE_NOT_AUTHORIZED);
-            }
+            if (listenerProxy != null) listenerProxy.onFailure(NOT_AUTHORIZED);
         }
     }
 
@@ -6248,22 +5472,19 @@
             if (status) {
                 listener.onSuccess();
             } else {
-                listener.onFailure(ActionListener.FAILURE_INTERNAL_ERROR);
+                listener.onFailure(ERROR);
             }
         }
     }
 
     /**
      * Enable/disable auto-join globally.
-     * When auto-join is disabled globally via this API, the user toggling wifi will re-enable
-     * auto-join.
      *
      * @param allowAutojoin true to allow auto-join, false to disallow auto-join
-     *
-     * Available for DO/PO apps.
-     * Other apps require {@code android.Manifest.permission#NETWORK_SETTINGS} or
-     * {@code android.Manifest.permission#MANAGE_WIFI_NETWORK_SELECTION} permission.
+     * @hide
      */
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
     public void allowAutojoinGlobal(boolean allowAutojoin) {
         try {
             mService.allowAutojoinGlobal(allowAutojoin);
@@ -6272,40 +5493,6 @@
         }
     }
 
-    /**
-     * Query whether or not auto-join global is enabled/disabled
-     * @see #allowAutojoinGlobal(boolean)
-     *
-     * Available for DO/PO apps.
-     * Other apps require {@code android.Manifest.permission#NETWORK_SETTINGS} or
-     * {@code android.Manifest.permission#MANAGE_WIFI_NETWORK_SELECTION} permission.
-     *
-     * @param executor The executor on which callback will be invoked.
-     * @param resultsCallback An asynchronous callback that will return {@code Boolean} indicating
-     *                        whether auto-join global is enabled/disabled.
-     *
-     * @throws SecurityException if the caller does not have permission.
-     * @throws NullPointerException if the caller provided invalid inputs.
-     */
-    public void queryAutojoinGlobal(@NonNull Executor executor,
-            @NonNull Consumer<Boolean> resultsCallback) {
-        Objects.requireNonNull(executor, "executor cannot be null");
-        Objects.requireNonNull(resultsCallback, "resultsCallback cannot be null");
-        try {
-            mService.queryAutojoinGlobal(
-                    new IBooleanListener.Stub() {
-                        @Override
-                        public void onResult(boolean value) {
-                            Binder.clearCallingIdentity();
-                            executor.execute(() -> {
-                                resultsCallback.accept(value);
-                            });
-                        }
-                    });
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
 
     /**
      * Sets the user choice for allowing auto-join to a network.
@@ -6416,7 +5603,7 @@
      */
     public void startWps(WpsInfo config, WpsCallback listener) {
         if (listener != null ) {
-            listener.onFailed(ActionListener.FAILURE_INTERNAL_ERROR);
+            listener.onFailed(ERROR);
         }
     }
 
@@ -6430,7 +5617,7 @@
      */
     public void cancelWps(WpsCallback listener) {
         if (listener != null) {
-            listener.onFailed(ActionListener.FAILURE_INTERNAL_ERROR);
+            listener.onFailed(ERROR);
         }
     }
 
@@ -7362,26 +6549,6 @@
     }
 
     /**
-     * @return true if this device supports Trust On First Use (TOFU).
-     */
-    public boolean isTrustOnFirstUseSupported() {
-        return isFeatureSupported(WIFI_FEATURE_TRUST_ON_FIRST_USE);
-    }
-
-    /**
-     * Wi-Fi Easy Connect DPP AKM enables provisioning and configuration of Wi-Fi devices without
-     * the need of using the device PSK passphrase.
-     * For more details, visit <a href="https://www.wi-fi.org/">https://www.wi-fi.org/</a> and
-     * search for "Easy Connect" or "Device Provisioning Protocol specification".
-     *
-     * @return true if this device supports Wi-Fi Easy-connect DPP (Device Provisioning Protocol)
-     * AKM, false otherwise.
-     */
-    public boolean isEasyConnectDppAkmSupported() {
-        return isFeatureSupported(WIFI_FEATURE_DPP_AKM);
-    }
-
-    /**
      * Gets the factory Wi-Fi MAC addresses.
      * @return Array of String representing Wi-Fi MAC addresses sorted lexically or an empty Array
      * if failed.
@@ -8507,149 +7674,6 @@
         void onSetScoreUpdateObserver(@NonNull ScoreUpdateObserver observerImpl);
     }
 
-
-    /**
-     * Callback registered with {@link WifiManager#setExternalPnoScanRequest(List, int[], Executor,
-     * PnoScanResultsCallback)}. Returns status and result information on offloaded external PNO
-     * requests.
-     * @hide
-     */
-    @SystemApi
-    public interface PnoScanResultsCallback {
-        /**
-         * A status code returned by {@link #onRegisterFailed(int)}.
-         * Unknown failure.
-         */
-        int REGISTER_PNO_CALLBACK_UNKNOWN = 0;
-
-        /**
-         * A status code returned by {@link #onRegisterFailed(int)}.
-         * A callback has already been registered by the caller.
-         */
-        int REGISTER_PNO_CALLBACK_ALREADY_REGISTERED = 1;
-
-        /**
-         * A status code returned by {@link #onRegisterFailed(int)}.
-         * The platform is unable to serve this request because another app has a PNO scan request
-         * active.
-         */
-        int REGISTER_PNO_CALLBACK_RESOURCE_BUSY = 2;
-
-        /**
-         * A status code returned by {@link #onRegisterFailed(int)}.
-         * PNO scans are not supported on this device.
-         */
-        int REGISTER_PNO_CALLBACK_PNO_NOT_SUPPORTED = 3;
-
-        /** @hide */
-        @IntDef(prefix = { "REGISTER_PNO_CALLBACK_" }, value = {
-                REGISTER_PNO_CALLBACK_UNKNOWN,
-                REGISTER_PNO_CALLBACK_ALREADY_REGISTERED,
-                REGISTER_PNO_CALLBACK_RESOURCE_BUSY,
-                REGISTER_PNO_CALLBACK_PNO_NOT_SUPPORTED
-        })
-        @Retention(RetentionPolicy.SOURCE)
-        public @interface RegisterFailureReason {}
-
-        /**
-         * A status code returned by {@link #onRemoved(int)}.
-         * Unknown reason.
-         */
-        int REMOVE_PNO_CALLBACK_UNKNOWN = 0;
-
-        /**
-         * A status code returned by {@link #onRemoved(int)}.
-         * This Callback is automatically removed after results ScanResults are delivered.
-         */
-        int REMOVE_PNO_CALLBACK_RESULTS_DELIVERED = 1;
-
-        /**
-         * A status code returned by {@link #onRemoved(int)}.
-         * This callback has been unregistered via {@link WifiManager#clearExternalPnoScanRequest()}
-         */
-        int REMOVE_PNO_CALLBACK_UNREGISTERED = 2;
-
-        /** @hide */
-        @IntDef(prefix = { "REMOVE_PNO_CALLBACK_" }, value = {
-                REMOVE_PNO_CALLBACK_UNKNOWN,
-                REMOVE_PNO_CALLBACK_RESULTS_DELIVERED,
-                REMOVE_PNO_CALLBACK_UNREGISTERED
-        })
-        @Retention(RetentionPolicy.SOURCE)
-        public @interface RemovalReason {}
-
-        /**
-         * Called when PNO scan finds one of the requested SSIDs. This is a one time callback.
-         * After results are reported the callback will be automatically unregistered.
-         */
-        void onScanResultsAvailable(@NonNull List<ScanResult> scanResults);
-
-        /**
-         * Called when this callback has been successfully registered.
-         */
-        void onRegisterSuccess();
-
-        /**
-         * Called when this callback failed to register with the failure reason.
-         * See {@link RegisterFailureReason} for details.
-         */
-        void onRegisterFailed(@RegisterFailureReason int reason);
-
-        /**
-         * Called when this callback has been unregistered from the Wi-Fi subsystem.
-         * See {@link RemovalReason} for details.
-         */
-        void onRemoved(@RemovalReason int reason);
-    }
-
-
-    private class PnoScanResultsCallbackProxy extends IPnoScanResultsCallback.Stub {
-        private Executor mExecutor;
-        private PnoScanResultsCallback mCallback;
-
-        PnoScanResultsCallbackProxy(@NonNull Executor executor,
-                @NonNull PnoScanResultsCallback callback) {
-            mExecutor = executor;
-            mCallback = callback;
-        }
-
-        @Override
-        public void onScanResultsAvailable(List<ScanResult> scanResults) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "PnoScanResultsCallback: " + "onScanResultsAvailable");
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> mCallback.onScanResultsAvailable(scanResults));
-        }
-
-        @Override
-        public void onRegisterSuccess() {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "PnoScanResultsCallback: " + "onRegisterSuccess");
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> mCallback.onRegisterSuccess());
-        }
-
-        @Override
-        public void onRegisterFailed(int reason) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "PnoScanResultsCallback: " + "onRegisterFailed " + reason);
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> mCallback.onRegisterFailed(reason));
-        }
-
-        @Override
-        public void onRemoved(int reason) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "PnoScanResultsCallback: " + "onRemoved");
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> mCallback.onRemoved(reason));
-        }
-    }
-
     /**
      * Callback proxy for {@link WifiConnectedNetworkScorer} objects.
      *
@@ -8695,126 +7719,6 @@
     }
 
     /**
-     * This API allows the caller to program up to 2 SSIDs for PNO scans. PNO scans are offloaded
-     * to the Wi-Fi chip when the device is inactive (typically screen-off).
-     * If the screen is currently off when this API is called, then a PNO scan including the
-     * requested SSIDs will immediately get started. If the screen is on when this API is called,
-     * the requested SSIDs will get included for PNO scans the next time the screen turns off.
-     * <p>
-     * Note, due to PNO being a limited resource, only one external PNO request is supported, and
-     * calling this API will fail if an external PNO scan request is already registered by another
-     * caller. If the caller that has already registered a callback calls this API again, the new
-     * callback will override the previous one.
-     * <p>
-     * After this API is called, {@link PnoScanResultsCallback#onRegisterSuccess()} will be invoked
-     * if the operation is successful, or {@link PnoScanResultsCallback#onRegisterFailed(int)} will
-     * be invoked if the operation failed.
-     * <p>
-     * {@link PnoScanResultsCallback#onRemoved(int)} will be invoked to notify the caller when the
-     * external PNO scan request is removed, which will happen when one of the following events
-     * happen:
-     * </p>
-     * <ul>
-     * <li>Upon finding any of the requested SSIDs, the matching ScanResults will be returned
-     * via {@link PnoScanResultsCallback#onScanResultsAvailable(List)}, and the registered PNO
-     * scan request will get automatically removed.</li>
-     * <li>The external PNO scan request is removed by a call to
-     * {@link #clearExternalPnoScanRequest()}</li>
-     * </ul>
-     *
-     * @param ssids The list of SSIDs to request for PNO scan.
-     * @param frequencies Provide as hint a list of up to 10 frequencies to be used for PNO scan.
-     *                    Each frequency should be in MHz. For example 2412 and 5180 are valid
-     *                    frequencies. {@link WifiInfo#getFrequency()} is a location where this
-     *                    information could be obtained. If a null or empty array is provided, the
-     *                    Wi-Fi framework will automatically decide the list of frequencies to scan.
-     * @param executor The executor on which callback will be invoked.
-     * @param callback For the calling application to receive results and status updates.
-     *
-     * @throws SecurityException if the caller does not have permission.
-     * @throws IllegalArgumentException if the caller provided invalid inputs.
-     * @throws UnsupportedOperationException if this API is not supported on this SDK version.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(allOf = {ACCESS_FINE_LOCATION,
-            REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION})
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void setExternalPnoScanRequest(@NonNull List<WifiSsid> ssids,
-            @Nullable int[] frequencies, @NonNull @CallbackExecutor Executor executor,
-            @NonNull PnoScanResultsCallback callback) {
-        if (executor == null) throw new IllegalArgumentException("executor cannot be null");
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        try {
-            mService.setExternalPnoScanRequest(new Binder(),
-                    new PnoScanResultsCallbackProxy(executor, callback),
-                    ssids, frequencies == null ? new int[0] : frequencies,
-                    mContext.getOpPackageName(), mContext.getAttributionTag());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Clear the current PNO scan request that's been set by the calling UID. Note, the call will
-     * be no-op if the current PNO scan request is set by a different UID.
-     *
-     * @throws UnsupportedOperationException if the API is not supported on this SDK version.
-     * @hide
-     */
-    @SystemApi
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void clearExternalPnoScanRequest() {
-        try {
-            mService.clearExternalPnoScanRequest();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Returns information about the last caller of an API.
-     *
-     * @param apiType The type of API to request information for the last caller.
-     * @param executor The executor on which callback will be invoked.
-     * @param resultsCallback An asynchronous callback that will return 2 arguments.
-     *                        {@code String} the name of the package that performed the last API
-     *                        call. {@code Boolean} the value associated with the last API call.
-     *
-     * @throws SecurityException if the caller does not have permission.
-     * @throws IllegalArgumentException if the caller provided invalid inputs.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_STACK,
-            NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK})
-    public void getLastCallerInfoForApi(@ApiType int apiType, @NonNull Executor executor,
-            @NonNull BiConsumer<String, Boolean> resultsCallback) {
-        if (executor == null) {
-            throw new IllegalArgumentException("executor can't be null");
-        }
-        if (resultsCallback == null) {
-            throw new IllegalArgumentException("resultsCallback can't be null");
-        }
-        try {
-            mService.getLastCallerInfoForApi(apiType,
-                    new ILastCallerListener.Stub() {
-                        @Override
-                        public void onResult(String packageName, boolean enabled) {
-                            Binder.clearCallingIdentity();
-                            executor.execute(() -> {
-                                resultsCallback.accept(packageName, enabled);
-                            });
-                        }
-                    });
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
      * Set a callback for Wi-Fi connected network scorer.  See {@link WifiConnectedNetworkScorer}.
      * Only a single scorer can be set. Caller will be invoked periodically by framework to inform
      * client about start and stop of Wi-Fi connection. Caller can clear a previously set scorer
@@ -9251,609 +8155,4 @@
             throw e.rethrowFromSystemServer();
         }
     }
-
-    /**
-     * If the device supports Wi-Fi Passpoint, the user can explicitly enable or disable it.
-     * That status can be queried using this method.
-     * @return {@code true} if Wi-Fi Passpoint is enabled
-     *
-     */
-    @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE)
-    public boolean isWifiPasspointEnabled() {
-        try {
-            return mService.isWifiPasspointEnabled();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Explicitly enable or disable Wi-Fi Passpoint as a global switch.
-     * The global Passpoint enabling/disabling overrides individual configuration
-     * enabling/disabling.
-     * Passpoint global status can be queried by {@link WifiManager#isWifiPasspointEnabled }.
-     *
-     * @param enabled {@code true} to enable, {@code false} to disable.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD
-    })
-    public void setWifiPasspointEnabled(boolean enabled) {
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "setWifiPasspointEnabled: " + enabled);
-        }
-        try {
-            mService.setWifiPasspointEnabled(enabled);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * The device may support concurrent connections to multiple internet-providing Wi-Fi
-     * networks (APs) - that is indicated by
-     * {@link WifiManager#isStaConcurrencyForMultiInternetSupported()}.
-     * This method indicates whether or not the feature is currently enabled.
-     * A value of {@link WifiManager#WIFI_MULTI_INTERNET_MODE_DISABLED} indicates that the feature
-     * is disabled, a value of {@link WifiManager#WIFI_MULTI_INTERNET_MODE_DBS_AP} or
-     * {@link WifiManager#WIFI_MULTI_INTERNET_MODE_MULTI_AP} indicates that the feature is enabled.
-     *
-     * The app can register to receive the corresponding Wi-Fi networks using the
-     * {@link ConnectivityManager#registerNetworkCallback(NetworkRequest, NetworkCallback)} API with
-     * a {@link WifiNetworkSpecifier} configured using the
-     * {@link WifiNetworkSpecifier.Builder#setBand(int)} method.
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE)
-    public @WifiMultiInternetMode int getStaConcurrencyForMultiInternetMode() {
-        try {
-            return mService.getStaConcurrencyForMultiInternetMode();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Check if the currently connected network meets the minimum required Wi-Fi security level set.
-     * If not, the current network will be disconnected.
-     *
-     * @throws SecurityException if the caller does not have permission.
-     * @hide
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.MANAGE_DEVICE_ADMINS)
-    public void notifyMinimumRequiredWifiSecurityLevelChanged(int level) {
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "notifyMinimumRequiredWifiSecurityLevelChanged");
-        }
-        try {
-            mService.notifyMinimumRequiredWifiSecurityLevelChanged(level);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Check if the currently connected network meets the Wi-Fi SSID policy set.
-     * If not, the current network will be disconnected.
-     *
-     * @throws SecurityException if the caller does not have permission.
-     * @hide
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.MANAGE_DEVICE_ADMINS)
-    public void notifyWifiSsidPolicyChanged(@NonNull WifiSsidPolicy policy) {
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "notifyWifiSsidPolicyChanged");
-        }
-        try {
-            if (policy != null) {
-                mService.notifyWifiSsidPolicyChanged(
-                        policy.getPolicyType(), new ArrayList<>(policy.getSsids()));
-            }
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Configure whether or not concurrent multiple connections to internet-providing Wi-Fi
-     * networks (AP) is enabled.
-     * Use {@link WifiManager#WIFI_MULTI_INTERNET_MODE_DISABLED} to disable, and either
-     * {@link WifiManager#WIFI_MULTI_INTERNET_MODE_DBS_AP} or
-     * {@link WifiManager#WIFI_MULTI_INTERNET_MODE_MULTI_AP} to enable in different modes.
-     * The {@link WifiManager#getStaConcurrencyForMultiInternetMode() } can be used to retrieve
-     * the current mode.
-     *
-     * @param mode Multi internet mode.
-     * @return true when the mode is set successfully, false when failed.
-     * @hide
-     */
-    @SystemApi
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD
-    })
-    public boolean setStaConcurrencyForMultiInternetMode(@WifiMultiInternetMode int mode) {
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "setStaConcurrencyForMultiInternetMode: " + mode);
-        }
-        try {
-            return mService.setStaConcurrencyForMultiInternetMode(mode);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Intent action to launch a dialog from the WifiDialog app.
-     * Must include EXTRA_DIALOG_ID, EXTRA_DIALOG_TYPE, and appropriate extras for the dialog type.
-     * @hide
-     */
-    public static final String ACTION_LAUNCH_DIALOG =
-            "android.net.wifi.action.LAUNCH_DIALOG";
-
-    /**
-     * Intent action to dismiss an existing dialog from the WifiDialog app.
-     * Must include EXTRA_DIALOG_ID.
-     * @hide
-     */
-    public static final String ACTION_DISMISS_DIALOG =
-            "android.net.wifi.action.DISMISS_DIALOG";
-
-    /**
-     * Unknown DialogType.
-     * @hide
-     */
-    public static final int DIALOG_TYPE_UNKNOWN = 0;
-
-    /**
-     * DialogType for a simple dialog.
-     * @see {@link com.android.server.wifi.WifiDialogManager#createSimpleDialog}
-     * @hide
-     */
-    public static final int DIALOG_TYPE_SIMPLE = 1;
-
-    /**
-     * DialogType for a P2P Invitation Sent dialog.
-     * @see {@link com.android.server.wifi.WifiDialogManager#createP2pInvitationSentDialog}
-     * @hide
-     */
-    public static final int DIALOG_TYPE_P2P_INVITATION_SENT = 2;
-
-    /**
-     * DialogType for a P2P Invitation Received dialog.
-     * @see {@link com.android.server.wifi.WifiDialogManager#createP2pInvitationReceivedDialog}
-     * @hide
-     */
-    public static final int DIALOG_TYPE_P2P_INVITATION_RECEIVED = 3;
-
-    /** @hide */
-    @IntDef(prefix = { "DIALOG_TYPE_" }, value = {
-            DIALOG_TYPE_UNKNOWN,
-            DIALOG_TYPE_SIMPLE,
-            DIALOG_TYPE_P2P_INVITATION_SENT,
-            DIALOG_TYPE_P2P_INVITATION_RECEIVED,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface DialogType {}
-
-    /**
-     * Dialog positive button was clicked.
-     * @hide
-     */
-    public static final int DIALOG_REPLY_POSITIVE = 0;
-
-    /**
-     * Dialog negative button was clicked.
-     * @hide
-     */
-    public static final int DIALOG_REPLY_NEGATIVE = 1;
-
-    /**
-     * Dialog neutral button was clicked.
-     * @hide
-     */
-    public static final int DIALOG_REPLY_NEUTRAL = 2;
-
-    /**
-     * Dialog was cancelled.
-     * @hide
-     */
-    public static final int DIALOG_REPLY_CANCELLED = 3;
-
-    /**
-     * Indication of a reply to a dialog.
-     * See {@link WifiManager#replyToSimpleDialog(int, int)}
-     * @hide
-     */
-    @IntDef(prefix = { "DIALOG_TYPE_" }, value = {
-            DIALOG_REPLY_POSITIVE,
-            DIALOG_REPLY_NEGATIVE,
-            DIALOG_REPLY_NEUTRAL,
-            DIALOG_REPLY_CANCELLED,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface DialogReply {}
-
-    /**
-     * Invalid dialog id for dialogs that are not currently active.
-     * @hide
-     */
-    public static final int INVALID_DIALOG_ID = -1;
-
-    /**
-     * Extra int indicating the type of dialog to display.
-     * @hide
-     */
-    public static final String EXTRA_DIALOG_TYPE = "android.net.wifi.extra.DIALOG_TYPE";
-
-    /**
-     * Extra int indicating the ID of a dialog. The value must not be {@link #INVALID_DIALOG_ID}.
-     * @hide
-     */
-    public static final String EXTRA_DIALOG_ID = "android.net.wifi.extra.DIALOG_ID";
-
-    /**
-     * Extra String indicating the title of a simple dialog.
-     * @hide
-     */
-    public static final String EXTRA_DIALOG_TITLE = "android.net.wifi.extra.DIALOG_TITLE";
-
-    /**
-     * Extra String indicating the message of a simple dialog.
-     * @hide
-     */
-    public static final String EXTRA_DIALOG_MESSAGE = "android.net.wifi.extra.DIALOG_MESSAGE";
-
-    /**
-     * Extra String indicating the message URL of a simple dialog.
-     * @hide
-     */
-    public static final String EXTRA_DIALOG_MESSAGE_URL =
-            "android.net.wifi.extra.DIALOG_MESSAGE_URL";
-
-    /**
-     * Extra String indicating the start index of a message URL span of a simple dialog.
-     * @hide
-     */
-    public static final String EXTRA_DIALOG_MESSAGE_URL_START =
-            "android.net.wifi.extra.DIALOG_MESSAGE_URL_START";
-
-    /**
-     * Extra String indicating the end index of a message URL span of a simple dialog.
-     * @hide
-     */
-    public static final String EXTRA_DIALOG_MESSAGE_URL_END =
-            "android.net.wifi.extra.DIALOG_MESSAGE_URL_END";
-
-    /**
-     * Extra String indicating the positive button text of a simple dialog.
-     * @hide
-     */
-    public static final String EXTRA_DIALOG_POSITIVE_BUTTON_TEXT =
-            "android.net.wifi.extra.DIALOG_POSITIVE_BUTTON_TEXT";
-
-    /**
-     * Extra String indicating the negative button text of a simple dialog.
-     * @hide
-     */
-    public static final String EXTRA_DIALOG_NEGATIVE_BUTTON_TEXT =
-            "android.net.wifi.extra.DIALOG_NEGATIVE_BUTTON_TEXT";
-
-    /**
-     * Extra String indicating the neutral button text of a simple dialog.
-     * @hide
-     */
-    public static final String EXTRA_DIALOG_NEUTRAL_BUTTON_TEXT =
-            "android.net.wifi.extra.DIALOG_NEUTRAL_BUTTON_TEXT";
-
-    /**
-     * Extra String indicating a P2P device name for a P2P Invitation Sent/Received dialog.
-     * @hide
-     */
-    public static final String EXTRA_P2P_DEVICE_NAME = "android.net.wifi.extra.P2P_DEVICE_NAME";
-
-    /**
-     * Extra boolean indicating that a PIN is requested for a P2P Invitation Received dialog.
-     * @hide
-     */
-    public static final String EXTRA_P2P_PIN_REQUESTED = "android.net.wifi.extra.P2P_PIN_REQUESTED";
-
-    /**
-     * Extra String indicating the PIN to be displayed for a P2P Invitation Sent/Received dialog.
-     * @hide
-     */
-    public static final String EXTRA_P2P_DISPLAY_PIN = "android.net.wifi.extra.P2P_DISPLAY_PIN";
-
-    /**
-     * Returns a set of packages that aren't DO or PO but should be able to manage WiFi networks.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    @NonNull
-    public Set<String> getOemPrivilegedWifiAdminPackages() {
-        try {
-            return new ArraySet<>(mService.getOemPrivilegedWifiAdminPackages());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Method for WifiDialog to notify the framework of a reply to a simple dialog.
-     * @param dialogId id of the replying dialog.
-     * @param reply reply of the dialog.
-     * @hide
-     */
-    public void replyToSimpleDialog(int dialogId, @DialogReply int reply) {
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "replyToWifiEnableRequestDialog: dialogId=" + dialogId
-                    + " reply=" + reply);
-        }
-        try {
-            mService.replyToSimpleDialog(dialogId, reply);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Method for WifiDialog to notify the framework of a reply to a P2P Invitation Received dialog.
-     * @param dialogId id of the replying dialog.
-     * @param accepted Whether the invitation was accepted.
-     * @param optionalPin PIN of the reply, or {@code null} if none was supplied.
-     * @hide
-     */
-    public void replyToP2pInvitationReceivedDialog(
-            int dialogId, boolean accepted, @Nullable String optionalPin) {
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "replyToP2pInvitationReceivedDialog: "
-                    + "dialogId=" + dialogId
-                    + ", accepted=" + accepted
-                    + ", pin=" + optionalPin);
-        }
-        try {
-            mService.replyToP2pInvitationReceivedDialog(dialogId, accepted, optionalPin);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Specify a list of DHCP options to use for any network whose SSID is specified and which
-     * transmits vendor-specific information elements (VSIEs) using the specified Organizationally
-     * Unique Identifier (OUI). If the AP transmits VSIEs for multiple specified OUIs then all
-     * matching DHCP options will be used. The allowlist for DHCP options in
-     * {@link android.net.ip.IpClient} gates whether the DHCP options will actually be used.
-     * When DHCP options are used: if the option value {@link android.net.DhcpOption#getValue()}
-     * is null, the option type {@link android.net.DhcpOption#getType()} will be put in the
-     * Parameter Request List in the DHCP packets; otherwise, the option will be included in the
-     * options section in the DHCP packets. Use {@link #removeCustomDhcpOptions(Object, Object)}
-     * to remove the specified DHCP options.
-     *
-     * @param ssid the network SSID.
-     * @param oui the 3-byte OUI.
-     * @param options the list of {@link android.net.DhcpOption}.
-     *
-     * @hide
-     */
-    @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.OVERRIDE_WIFI_CONFIG
-    })
-    public void addCustomDhcpOptions(@NonNull WifiSsid ssid, @NonNull byte[] oui,
-            @NonNull List<DhcpOption> options) {
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "addCustomDhcpOptions: ssid="
-                    + ssid + ", oui=" + Arrays.toString(oui) + ", options=" + options);
-        }
-        try {
-            mService.addCustomDhcpOptions(ssid, oui, options);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Remove custom DHCP options specified by {@link #addCustomDhcpOptions(Object, Object, List)}.
-     *
-     * @param ssid the network SSID.
-     * @param oui the 3-byte OUI.
-     *
-     * @hide
-     */
-    @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.OVERRIDE_WIFI_CONFIG
-    })
-    public void removeCustomDhcpOptions(@NonNull WifiSsid ssid, @NonNull byte[] oui) {
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "removeCustomDhcpOptions: ssid=" + ssid + ", oui=" + Arrays.toString(oui));
-        }
-        try {
-            mService.removeCustomDhcpOptions(ssid, oui);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Wi-Fi interface of type STA (station/client Wi-Fi infrastructure device).
-     */
-    public static final int WIFI_INTERFACE_TYPE_STA = 0;
-
-    /**
-     * Wi-Fi interface of type AP (access point Wi-Fi infrastructure device).
-     */
-    public static final int WIFI_INTERFACE_TYPE_AP = 1;
-
-    /**
-     * Wi-Fi interface of type Wi-Fi Aware (aka NAN).
-     */
-    public static final int WIFI_INTERFACE_TYPE_AWARE = 2;
-
-    /**
-     * Wi-Fi interface of type Wi-Fi Direct (aka P2P).
-     */
-    public static final int WIFI_INTERFACE_TYPE_DIRECT = 3;
-
-    /** @hide */
-    @IntDef(prefix = { "WIFI_INTERFACE_TYPE_" }, value = {
-            WIFI_INTERFACE_TYPE_STA,
-            WIFI_INTERFACE_TYPE_AP,
-            WIFI_INTERFACE_TYPE_AWARE,
-            WIFI_INTERFACE_TYPE_DIRECT,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface WifiInterfaceType {}
-
-    /**
-     * Class describing an impact of interface creation - returned by
-     * {@link #reportCreateInterfaceImpact(int, boolean, Executor, BiConsumer)}. Due to Wi-Fi
-     * concurrency limitations certain interfaces may have to be torn down. Each of these
-     * interfaces was requested by a set of applications who could potentially be impacted.
-     *
-     * This class contain the information for a single interface: the interface type with
-     * {@link InterfaceCreationImpact#getInterfaceType()} and the set of impacted packages
-     * with {@link InterfaceCreationImpact#getPackages()}.
-     */
-    public static class InterfaceCreationImpact {
-        private final int mInterfaceType;
-        private final Set<String> mPackages;
-
-        public InterfaceCreationImpact(@WifiInterfaceType int interfaceType,
-                @NonNull Set<String> packages) {
-            mInterfaceType = interfaceType;
-            mPackages = packages;
-        }
-
-        /**
-         * @return The interface type which will be torn down to make room for the interface
-         * requested in {@link #reportCreateInterfaceImpact(int, boolean, Executor, BiConsumer)}.
-         */
-        public @WifiInterfaceType int getInterfaceType() {
-            return mInterfaceType;
-        }
-
-        /**
-         * @return The list of potentially impacted packages due to tearing down the interface
-         * specified in {@link #getInterfaceType()}.
-         */
-        public @NonNull Set<String> getPackages() {
-            return mPackages;
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(mInterfaceType, mPackages);
-        }
-
-        @Override
-        public boolean equals(Object that) {
-            if (this == that) return true;
-            if (!(that instanceof InterfaceCreationImpact)) return false;
-            InterfaceCreationImpact thatInterfaceCreationImpact = (InterfaceCreationImpact) that;
-
-            return this.mInterfaceType == thatInterfaceCreationImpact.mInterfaceType
-                    && Objects.equals(this.mPackages, thatInterfaceCreationImpact.mPackages);
-        }
-    }
-
-    /**
-     * Queries the framework to determine whether the specified interface can be created, and if
-     * so - what other interfaces would be torn down by the framework to allow this creation if
-     * it were requested. The result is returned via the specified {@link BiConsumer} callback
-     * which returns two arguments:
-     * <li>First argument: a {@code boolean} - indicating whether or not the interface can be
-     * created.</li>
-     * <li>Second argument: a {@code Set<InterfaceCreationImpact>} - if the interface can be
-     * created (first argument is {@code true} then this is the set of interface types which
-     * will be removed and the packages which requested them. Possibly an empty set. If the
-     * first argument is {@code false}, then an empty set will be returned here.</li>
-     * <p>
-     * Interfaces, input and output, are specified using the {@code WIFI_INTERFACE_*} constants:
-     * {@link #WIFI_INTERFACE_TYPE_STA}, {@link #WIFI_INTERFACE_TYPE_AP},
-     * {@link #WIFI_INTERFACE_TYPE_AWARE}, or {@link #WIFI_INTERFACE_TYPE_DIRECT}.
-     * <p>
-     * This method does not actually create the interface. That operation is handled by the
-     * framework when a particular service method is called. E.g. a Wi-Fi Direct interface may be
-     * created when various methods of {@link android.net.wifi.p2p.WifiP2pManager} are called,
-     * similarly for Wi-Fi Aware and {@link android.net.wifi.aware.WifiAwareManager}.
-     * <p>
-     * Note: the information returned via this method is the current snapshot of the system. It may
-     * change due to actions of the framework or other apps.
-     *
-     * @param interfaceType The interface type whose possible creation is being queried.
-     * @param requireNewInterface Indicates that the query is for a new interface of the specified
-     *                             type - an existing interface won't meet the query. Some
-     *                             operations (such as Wi-Fi Direct and Wi-Fi Aware are a shared
-     *                             resource and so may not need a new interface).
-     * @param executor An {@link Executor} on which to return the result.
-     * @param resultCallback The asynchronous callback which will return two argument: a
-     * {@code boolean} (whether the interface can be created), and a
-     * {@code Set<InterfaceCreationImpact>} (a set of {@link InterfaceCreationImpact}:
-     *                       interfaces which will be destroyed when the interface is created
-     *                       and the packages which requested them and thus may be impacted).
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(allOf = {android.Manifest.permission.MANAGE_WIFI_INTERFACES,
-            ACCESS_WIFI_STATE})
-    public void reportCreateInterfaceImpact(@WifiInterfaceType int interfaceType,
-            boolean requireNewInterface,
-            @NonNull @CallbackExecutor Executor executor,
-            @NonNull BiConsumer<Boolean, Set<InterfaceCreationImpact>> resultCallback) {
-        Objects.requireNonNull(executor, "Non-null executor required");
-        Objects.requireNonNull(resultCallback, "Non-null resultCallback required");
-        try {
-            mService.reportCreateInterfaceImpact(mContext.getOpPackageName(), interfaceType,
-                    requireNewInterface, new IInterfaceCreationInfoCallback.Stub() {
-                        @Override
-                        public void onResults(boolean canCreate, int[] interfacesToDelete,
-                                String[] packagesForInterfaces) {
-                            Binder.clearCallingIdentity();
-                            if ((interfacesToDelete == null && packagesForInterfaces != null)
-                                    || (interfacesToDelete != null
-                                    && packagesForInterfaces == null) || (canCreate && (
-                                    interfacesToDelete == null || interfacesToDelete.length
-                                            != packagesForInterfaces.length))) {
-                                Log.e(TAG,
-                                        "reportImpactToCreateIfaceRequest: Invalid callback "
-                                                + "parameters - canCreate="
-                                                + canCreate + ", interfacesToDelete="
-                                                + Arrays.toString(interfacesToDelete)
-                                                + ", worksourcesForInterfaces="
-                                                + Arrays.toString(packagesForInterfaces));
-                                return;
-                            }
-
-                            final Set<InterfaceCreationImpact> finalSet =
-                                    (canCreate && interfacesToDelete.length > 0) ? new ArraySet<>()
-                                            : Collections.emptySet();
-                            if (canCreate) {
-                                for (int i = 0; i < interfacesToDelete.length; ++i) {
-                                    finalSet.add(
-                                            new InterfaceCreationImpact(interfacesToDelete[i],
-                                                    new ArraySet<>(
-                                                            packagesForInterfaces[i].split(","))));
-                                }
-                            }
-                            executor.execute(() -> resultCallback.accept(canCreate, finalSet));
-                        }
-                    });
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
 }
diff --git a/framework/java/android/net/wifi/WifiNetworkSuggestion.java b/framework/java/android/net/wifi/WifiNetworkSuggestion.java
index be66681..fa288a03 100644
--- a/framework/java/android/net/wifi/WifiNetworkSuggestion.java
+++ b/framework/java/android/net/wifi/WifiNetworkSuggestion.java
@@ -30,7 +30,6 @@
 import android.net.wifi.hotspot2.PasspointConfiguration;
 import android.os.Build;
 import android.os.Parcel;
-import android.os.ParcelUuid;
 import android.os.Parcelable;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
@@ -94,7 +93,7 @@
         /**
          * SSID of the network.
          */
-        private WifiSsid mWifiSsid;
+        private String mSsid;
         /**
          * Optional BSSID within the network.
          */
@@ -227,19 +226,8 @@
          */
         private boolean mSaeH2eOnlyMode;
 
-        /**
-         * Whether this network will be brought up as restricted
-         */
-        private boolean mIsNetworkRestricted;
-
-
-        /**
-         * The Subscription group UUID identifies the SIM cards for which this network configuration
-         * is valid.
-         */
-        private ParcelUuid mSubscriptionGroup;
-
         public Builder() {
+            mSsid = null;
             mBssid =  null;
             mIsEnhancedOpen = false;
             mWpa2PskPassphrase = null;
@@ -266,9 +254,6 @@
             mMacRandomizationSetting = RANDOMIZATION_PERSISTENT;
             mSubscriptionId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
             mSaeH2eOnlyMode = false;
-            mIsNetworkRestricted = false;
-            mSubscriptionGroup = null;
-            mWifiSsid = null;
         }
 
         /**
@@ -276,10 +261,6 @@
          * <p>
          * <li>Overrides any previous value set using {@link #setSsid(String)}.</li>
          *
-         * <p>
-         * Note: use {@link #setWifiSsid(WifiSsid)} which supports both unicode and non-unicode
-         * SSID.
-         *
          * @param ssid The SSID of the network. It must be valid Unicode.
          * @return Instance of {@link Builder} to enable chaining of the builder method.
          * @throws IllegalArgumentException if the SSID is not valid unicode.
@@ -290,28 +271,7 @@
             if (!unicodeEncoder.canEncode(ssid)) {
                 throw new IllegalArgumentException("SSID is not a valid unicode string");
             }
-            mWifiSsid = WifiSsid.fromUtf8Text(ssid);
-            return this;
-        }
-
-        /**
-         * Set the SSID for the network. {@link WifiSsid} support both unicode and non-unicode SSID.
-         * <p>
-         * <li>Overrides any previous value set using {@link #setWifiSsid(WifiSsid)}
-         * or {@link #setSsid(String)}.</li>
-         * <p>
-         * Note: this method is the superset of the {@link #setSsid(String)}
-         *
-         * @param wifiSsid The SSID of the network, in {@link WifiSsid} format.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if the wifiSsid is invalid.
-         */
-        public @NonNull Builder setWifiSsid(@NonNull WifiSsid wifiSsid) {
-            checkNotNull(wifiSsid);
-            if (wifiSsid.getBytes().length == 0) {
-                throw new IllegalArgumentException("Empty WifiSsid is invalid");
-            }
-            mWifiSsid = WifiSsid.fromBytes(wifiSsid.getBytes());
+            mSsid = new String(ssid);
             return this;
         }
 
@@ -545,9 +505,6 @@
          * suggestion to be rejected with the error code
          * {@link WifiManager#STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_NOT_ALLOWED}.
          *
-         * Only one of the {@link #setSubscriptionGroup(ParcelUuid)} and
-         * {@link #setSubscriptionId(int)} should be called for a suggestion.
-         *
          * @param subscriptionId subscription ID see {@link SubscriptionInfo#getSubscriptionId()}
          * @return Instance of {@link Builder} to enable chaining of the builder method.
          * @throws IllegalArgumentException if subscriptionId equals to {@link SubscriptionManager#INVALID_SUBSCRIPTION_ID}
@@ -565,41 +522,6 @@
         }
 
         /**
-         * Configure the suggestion to only be used with the SIMs that belong to the Subscription
-         * Group specified in this method. The suggested network will only be used by the SIM in
-         * this Subscription Group and no other SIMs - even from the same carrier.
-         * <p>
-         * The caller is restricted to be either of:
-         * <li>A carrier provisioning app.
-         * <li>A carrier-privileged app - which is restricted to only specify a subscription ID
-         * which belong to the same carrier which signed the app, see
-         * {@link TelephonyManager#hasCarrierPrivileges()}.
-         * <p>
-         * Specifying a subscription group which doesn't match these restriction will cause the
-         * suggestion to be rejected with the error code
-         * {@link WifiManager#STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_NOT_ALLOWED}.
-         *
-         * Only one of the {@link #setSubscriptionGroup(ParcelUuid)} and
-         * {@link #setSubscriptionId(int)} should be called for a suggestion.
-         *
-         * @param groupUuid Subscription group UUID see
-         * {@link SubscriptionManager#createSubscriptionGroup(List)}
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if group UUID is {@code null}.
-         */
-        @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-        public @NonNull Builder setSubscriptionGroup(@NonNull ParcelUuid groupUuid) {
-            if (!SdkLevel.isAtLeastT()) {
-                throw new UnsupportedOperationException();
-            }
-            if (groupUuid == null) {
-                throw new IllegalArgumentException("SubscriptionGroup is invalid");
-            }
-            mSubscriptionGroup = groupUuid;
-            return this;
-        }
-
-        /**
          * Suggested networks are considered as part of a pool of all suggested networks and other
          * networks (e.g. saved networks) - one of which will be selected.
          * <ul>
@@ -838,30 +760,6 @@
         }
 
         /**
-         * Specifies whether the system will bring up the network (if selected) as restricted. A
-         * restricted network has its {@link NetworkCapabilities#NET_CAPABILITY_NOT_RESTRICTED}
-         * capability removed. The Wi-Fi network selection process may use this information to
-         * influence priority of the suggested network for Wi-Fi network selection (most likely to
-         * reduce it). The connectivity service may use this information to influence the overall
-         * network configuration of the device.
-         * <p>
-         * <li> These suggestions are only considered for network selection if a
-         * {@link NetworkRequest} without {@link NetworkCapabilities#NET_CAPABILITY_NOT_RESTRICTED}
-         * capability is filed.
-         * <li> A restricted network's credentials may not be shared with the user using
-         * {@link #setCredentialSharedWithUser(boolean)}.</li>
-         * <li> If not set, defaults to false (i.e. network is unrestricted).</li>
-         *
-         * @param isRestricted Boolean indicating whether the network should be brought up
-         *                     restricted (if true) or unrestricted (if false).
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setRestricted(boolean isRestricted) {
-            mIsNetworkRestricted = isRestricted;
-            return this;
-        }
-
-        /**
          * Specifies whether the system will bring up the network (if selected) as OEM paid. An
          * OEM paid network has {@link NetworkCapabilities#NET_CAPABILITY_OEM_PAID} capability
          * added.
@@ -1058,7 +956,7 @@
         private WifiConfiguration buildWifiConfiguration() {
             final WifiConfiguration wifiConfiguration = new WifiConfiguration();
             // WifiConfiguration.SSID needs quotes around unicode SSID.
-            wifiConfiguration.SSID = mWifiSsid.toString();
+            wifiConfiguration.SSID = "\"" + mSsid + "\"";
             if (mBssid != null) {
                 wifiConfiguration.BSSID = mBssid.toString();
             }
@@ -1078,8 +976,6 @@
                     ? WifiConfiguration.RANDOMIZATION_NON_PERSISTENT
                     : WifiConfiguration.RANDOMIZATION_PERSISTENT;
             wifiConfiguration.subscriptionId = mSubscriptionId;
-            wifiConfiguration.restricted = mIsNetworkRestricted;
-            wifiConfiguration.setSubscriptionGroup(mSubscriptionGroup);
             return wifiConfiguration;
         }
 
@@ -1111,26 +1007,17 @@
             wifiConfiguration.oemPaid = mIsNetworkOemPaid;
             wifiConfiguration.oemPrivate = mIsNetworkOemPrivate;
             wifiConfiguration.carrierMerged = mIsCarrierMerged;
-            wifiConfiguration.carrierId = mCarrierId;
             wifiConfiguration.subscriptionId = mSubscriptionId;
-            wifiConfiguration.macRandomizationSetting =
-                    mMacRandomizationSetting == RANDOMIZATION_NON_PERSISTENT
-                            ? WifiConfiguration.RANDOMIZATION_NON_PERSISTENT
-                            : WifiConfiguration.RANDOMIZATION_PERSISTENT;
-            wifiConfiguration.restricted = mIsNetworkRestricted;
-            wifiConfiguration.setSubscriptionGroup(mSubscriptionGroup);
             mPasspointConfiguration.setCarrierId(mCarrierId);
             mPasspointConfiguration.setSubscriptionId(mSubscriptionId);
-            mPasspointConfiguration.setSubscriptionGroup(mSubscriptionGroup);
             mPasspointConfiguration.setMeteredOverride(wifiConfiguration.meteredOverride);
             mPasspointConfiguration.setOemPrivate(mIsNetworkOemPrivate);
             mPasspointConfiguration.setOemPaid(mIsNetworkOemPaid);
             mPasspointConfiguration.setCarrierMerged(mIsCarrierMerged);
-            // MAC randomization should always be enabled for passpoint suggestions regardless of
-            // the PasspointConfiguration's original setting.
-            mPasspointConfiguration.setMacRandomizationEnabled(true);
-            mPasspointConfiguration.setNonPersistentMacRandomizationEnabled(
-                    mMacRandomizationSetting == RANDOMIZATION_NON_PERSISTENT);
+            wifiConfiguration.macRandomizationSetting =
+                    mMacRandomizationSetting == RANDOMIZATION_NON_PERSISTENT
+                    ? WifiConfiguration.RANDOMIZATION_NON_PERSISTENT
+                    : WifiConfiguration.RANDOMIZATION_PERSISTENT;
             return wifiConfiguration;
         }
 
@@ -1190,7 +1077,7 @@
             validateSecurityParams();
             WifiConfiguration wifiConfiguration;
             if (mPasspointConfiguration != null) {
-                if (mWifiSsid != null) {
+                if (mSsid != null) {
                     throw new IllegalStateException("setSsid should not be invoked for suggestion "
                             + "with Passpoint configuration");
                 }
@@ -1199,11 +1086,13 @@
                             + "suggestion with Passpoint configuration");
                 }
                 wifiConfiguration = buildWifiConfigurationForPasspoint();
+                mPasspointConfiguration.setEnhancedMacRandomizationEnabled(
+                        mMacRandomizationSetting == RANDOMIZATION_NON_PERSISTENT);
             } else {
-                if (mWifiSsid == null) {
+                if (mSsid == null) {
                     throw new IllegalStateException("setSsid should be invoked for suggestion");
                 }
-                if (mWifiSsid.getBytes().length == 0) {
+                if (TextUtils.isEmpty(mSsid)) {
                     throw new IllegalStateException("invalid ssid for suggestion");
                 }
                 if (mBssid != null
@@ -1230,11 +1119,11 @@
                         + "setCredentialSharedWithUser and "
                         + "setIsAutojoinEnabled set to false");
             }
-            if (mIsNetworkUntrusted || mIsNetworkRestricted) {
+            if (mIsNetworkUntrusted) {
                 if (mIsSharedWithUserSet && mIsSharedWithUser) {
                     throw new IllegalStateException("Should not be both"
                             + "setCredentialSharedWithUser and +"
-                            + "setUntrusted or setRestricted to true");
+                            + "setUntrusted to true");
                 }
                 mIsSharedWithUser = false;
             }
@@ -1255,19 +1144,13 @@
                 mIsSharedWithUser = false;
             }
             if (mIsCarrierMerged) {
-                if ((mSubscriptionId == SubscriptionManager.INVALID_SUBSCRIPTION_ID
-                        && mSubscriptionGroup == null)
+                if (mSubscriptionId == SubscriptionManager.INVALID_SUBSCRIPTION_ID
                         || mMeteredOverride != WifiConfiguration.METERED_OVERRIDE_METERED
                         || !isEnterpriseSuggestion()) {
                     throw new IllegalStateException("A carrier merged network must be a metered, "
                             + "enterprise network with valid subscription Id");
                 }
             }
-            if (mSubscriptionGroup != null
-                    && mSubscriptionId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
-                throw new IllegalStateException("Should not be set both SubscriptionGroup and "
-                        + "SubscriptionId");
-            }
             return new WifiNetworkSuggestion(
                     wifiConfiguration,
                     mPasspointConfiguration,
@@ -1402,8 +1285,7 @@
         return Objects.hash(wifiConfiguration.SSID, wifiConfiguration.BSSID,
                 wifiConfiguration.getDefaultSecurityType(),
                 wifiConfiguration.getPasspointUniqueId(),
-                wifiConfiguration.subscriptionId, wifiConfiguration.carrierId,
-                wifiConfiguration.getSubscriptionGroup());
+                wifiConfiguration.subscriptionId, wifiConfiguration.carrierId);
     }
 
     @Override
@@ -1426,9 +1308,7 @@
                 && TextUtils.equals(this.wifiConfiguration.getPasspointUniqueId(),
                 lhs.wifiConfiguration.getPasspointUniqueId())
                 && this.wifiConfiguration.carrierId == lhs.wifiConfiguration.carrierId
-                && this.wifiConfiguration.subscriptionId == lhs.wifiConfiguration.subscriptionId
-                && Objects.equals(this.wifiConfiguration.getSubscriptionGroup(),
-                lhs.wifiConfiguration.getSubscriptionGroup());
+                && this.wifiConfiguration.subscriptionId == lhs.wifiConfiguration.subscriptionId;
     }
 
     @Override
@@ -1455,11 +1335,9 @@
                 .append(", isHiddenSsid=").append(wifiConfiguration.hiddenSSID)
                 .append(", priorityGroup=").append(priorityGroup)
                 .append(", subscriptionId=").append(wifiConfiguration.subscriptionId)
-                .append(", subscriptionGroup=").append(wifiConfiguration.getSubscriptionGroup())
                 .append(", carrierId=").append(wifiConfiguration.carrierId)
                 .append(", priority=").append(wifiConfiguration.priority)
                 .append(", meteredness=").append(wifiConfiguration.meteredOverride)
-                .append(", restricted=").append(wifiConfiguration.restricted)
                 .append(" ]");
         return sb.toString();
     }
@@ -1537,10 +1415,7 @@
     }
 
     /**
-     * Return the unicode SSID of the network, or null if this is a Passpoint network or the SSID is
-     * non-unicode.
-     * <p>
-     * Note: use {@link #getWifiSsid()} which supports both unicode and non-unicode SSID.
+     * Return the SSID of the network, or null if this is a Passpoint network.
      * @see Builder#setSsid(String)
      */
     @Nullable
@@ -1548,35 +1423,7 @@
         if (wifiConfiguration.SSID == null) {
             return null;
         }
-        WifiSsid wifiSsid;
-        try {
-            wifiSsid = WifiSsid.fromString(wifiConfiguration.SSID);
-        } catch (IllegalArgumentException e) {
-            return null;
-        }
-        if (wifiSsid.getUtf8Text() == null) {
-            return null;
-        }
-        return wifiSsid.getUtf8Text().toString();
-    }
-
-    /**
-     * Return the {@link WifiSsid} of the network, or null if this is a Passpoint network.
-     * @see Builder#setWifiSsid(WifiSsid)
-     * @return An object representing the SSID the network. {@code null} for passpoint network.
-     */
-    @Nullable
-    public WifiSsid getWifiSsid() {
-        if (wifiConfiguration.SSID == null) {
-            return null;
-        }
-        WifiSsid wifiSsid;
-        try {
-            wifiSsid = WifiSsid.fromString(wifiConfiguration.SSID);
-        } catch (IllegalArgumentException e) {
-            throw new IllegalStateException("Invalid SSID in the network suggestion");
-        }
-        return wifiSsid;
+        return WifiInfo.sanitizeSsid(wifiConfiguration.SSID);
     }
 
     /** @see Builder#setUntrusted(boolean)  */
@@ -1585,15 +1432,6 @@
     }
 
     /**
-     * Return if a suggestion is for a restricted network
-     * @see Builder#setRestricted(boolean)
-     * @return true if the suggestion is restricted, false otherwise
-     */
-    public boolean isRestricted() {
-        return wifiConfiguration.restricted;
-    }
-
-    /**
      * @see Builder#setOemPaid(boolean)
      * @hide
      */
@@ -1685,28 +1523,4 @@
     public int getCarrierId() {
         return wifiConfiguration.carrierId;
     }
-
-    /**
-     * Get the MAC randomization method.
-     * @return one of {@code RANDOMIZATION_*} values
-     * @see Builder#setMacRandomizationSetting(int)
-     */
-    public @MacRandomizationSetting int getMacRandomizationSetting() {
-        return wifiConfiguration.macRandomizationSetting
-                == WifiConfiguration.RANDOMIZATION_NON_PERSISTENT
-                ? RANDOMIZATION_NON_PERSISTENT : RANDOMIZATION_PERSISTENT;
-    }
-
-    /**
-     * Get the subscription Group UUID of the suggestion
-     * @see Builder#setSubscriptionGroup(ParcelUuid)
-     * @return Uuid represent a Subscription Group
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public @Nullable ParcelUuid getSubscriptionGroup() {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        return wifiConfiguration.getSubscriptionGroup();
-    }
 }
diff --git a/framework/java/android/net/wifi/WifiScanner.java b/framework/java/android/net/wifi/WifiScanner.java
index 39fd9bd..c06c3f2 100644
--- a/framework/java/android/net/wifi/WifiScanner.java
+++ b/framework/java/android/net/wifi/WifiScanner.java
@@ -181,8 +181,7 @@
      * This constant is used for {@link ScanSettings#setRnrSetting(int)}.
      * <p>
      * Scan 6Ghz APs co-located with 2.4/5Ghz APs using Reduced Neighbor Report (RNR) if the 6Ghz
-     * band is explicitly requested to be scanned and the current country code supports scanning
-     * of at least one 6Ghz channel. The 6Ghz band is explicitly requested if the
+     * band is explicitly requested to be scanned. The 6Ghz band is explicitly requested if the
      * ScanSetting.band parameter is set to one of:
      * <li> {@link #WIFI_BAND_6_GHZ} </li>
      * <li> {@link #WIFI_BAND_24_5_6_GHZ} </li>
@@ -195,8 +194,7 @@
     /**
      * This constant is used for {@link ScanSettings#setRnrSetting(int)}.
      * <p>
-     * Request to scan 6Ghz APs co-located with 2.4/5Ghz APs using Reduced Neighbor Report (RNR)
-     * when the current country code supports scanning of at least one 6Ghz channel.
+     * Request to scan 6Ghz APs co-located with 2.4/5Ghz APs using Reduced Neighbor Report (RNR).
      **/
     public static final int WIFI_RNR_ENABLED = 1;
     /**
@@ -330,11 +328,6 @@
      * @see ScanSettings#type
      */
     public static final int SCAN_TYPE_HIGH_ACCURACY = 2;
-    /**
-     * Max valid value of SCAN_TYPE_
-     * @hide
-     */
-    public static final int SCAN_TYPE_MAX = 2;
 
     /** {@hide} */
     public static final String SCAN_PARAMS_SCAN_SETTINGS_KEY = "ScanSettings";
@@ -1087,22 +1080,13 @@
      * Afterwards (assuming onSuccess was called), all subsequent single scan results will be
      * delivered to the listener. It is possible that onFullResult will not be called for all
      * results of the first scan if the listener was registered during the scan.
-     * <p>
-     * On {@link android.os.Build.VERSION_CODES#TIRAMISU} or above this API can be called by
-     * an app with either {@link android.Manifest.permission#LOCATION_HARDWARE} or
-     * {@link android.Manifest.permission#NETWORK_STACK}. On platform versions prior to
-     * {@link android.os.Build.VERSION_CODES#TIRAMISU}, the caller must have
-     * {@link android.Manifest.permission#NETWORK_STACK}.
      *
      * @param executor the Executor on which to run the callback.
      * @param listener specifies the object to report events to. This object is also treated as a
      *                 key for this request, and must also be specified to cancel the request.
      *                 Multiple requests should also not share this object.
-     * @throws SecurityException if the caller does not have permission.
      */
-    @RequiresPermission(anyOf = {
-            Manifest.permission.LOCATION_HARDWARE,
-            Manifest.permission.NETWORK_STACK})
+    @RequiresPermission(Manifest.permission.NETWORK_STACK)
     public void registerScanListener(@NonNull @CallbackExecutor Executor executor,
             @NonNull ScanListener listener) {
         Objects.requireNonNull(executor, "executor cannot be null");
@@ -1136,26 +1120,6 @@
         mAsyncChannel.sendMessage(CMD_DEREGISTER_SCAN_LISTENER, 0, key);
     }
 
-    /**
-     * Check whether the Wi-Fi subsystem has started a scan and is waiting for scan results.
-     * @return true if a scan initiated via
-     *         {@link WifiScanner#startScan(ScanSettings, ScanListener)} or
-     *         {@link WifiManager#startScan()} is in progress.
-     *         false if there is currently no scanning initiated by {@link WifiScanner} or
-     *         {@link WifiManager}, but it's still possible the wifi radio is scanning for
-     *         another reason.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public boolean isScanning() {
-        try {
-            return mService.isScanning();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
     /** start wifi scan in background
      * @param settings specifies various parameters for the scan; for more information look at
      * {@link ScanSettings}
@@ -1317,20 +1281,12 @@
         scanParams.putString(REQUEST_FEATURE_ID_KEY, mContext.getAttributionTag());
         Message reply = mAsyncChannel.sendMessageSynchronously(CMD_GET_SINGLE_SCAN_RESULTS, 0, 0,
                 scanParams);
-        if (reply.what == WifiScanner.CMD_OP_SUCCEEDED
-                && reply.obj instanceof ParcelableScanResults) {
-            ScanResult[] results = ((ParcelableScanResults) reply.obj).getResults();
-            if (results != null) {
-                return Arrays.asList(results);
-            }
+        if (reply.what == WifiScanner.CMD_OP_SUCCEEDED) {
+            return Arrays.asList(((ParcelableScanResults) reply.obj).getResults());
         }
-        if (reply.obj instanceof OperationResult) {
-            OperationResult result = (OperationResult) reply.obj;
-            Log.e(TAG, "Error retrieving SingleScan results reason: " + result.reason
-                    + " description: " + result.description);
-        } else {
-            Log.e(TAG, "Error retrieving SingleScan results - invalid object: " + reply.obj);
-        }
+        OperationResult result = (OperationResult) reply.obj;
+        Log.e(TAG, "Error retrieving SingleScan results reason: " + result.reason
+                + " description: " + result.description);
         return new ArrayList<>();
     }
 
diff --git a/framework/java/android/net/wifi/WifiSsid.java b/framework/java/android/net/wifi/WifiSsid.java
index 31ec386..704ae81 100644
--- a/framework/java/android/net/wifi/WifiSsid.java
+++ b/framework/java/android/net/wifi/WifiSsid.java
@@ -19,10 +19,8 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.compat.annotation.UnsupportedAppUsage;
-import android.net.wifi.util.HexEncoding;
 import android.os.Parcel;
 import android.os.Parcelable;
-import android.text.TextUtils;
 
 import java.io.ByteArrayOutputStream;
 import java.nio.ByteBuffer;
@@ -31,134 +29,181 @@
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.CoderResult;
 import java.nio.charset.CodingErrorAction;
-import java.nio.charset.StandardCharsets;
 import java.util.Arrays;
+import java.util.Locale;
 
 /**
- * Representation of a Wi-Fi Service Set Identifier (SSID).
+ * Stores SSID octets and handles conversion.
+ *
+ * For Ascii encoded string, any octet < 32 or > 127 is encoded as
+ * a "\x" followed by the hex representation of the octet.
+ * Exception chars are ", \, \e, \n, \r, \t which are escaped by a \
+ * See src/utils/common.c for the implementation in the supplicant.
+ *
+ * @hide
  */
 public final class WifiSsid implements Parcelable {
-    private final byte[] mBytes;
+    private static final String TAG = "WifiSsid";
 
-    /**
-     * Creates a WifiSsid from the raw bytes. If the byte array is null, creates an empty WifiSsid
-     * object which will return an empty byte array and empty text.
-     * @param bytes the SSID
-     * @throws IllegalArgumentException if the raw byte array is longer than 32 bytes.
-     */
-    private WifiSsid(@Nullable byte[] bytes) {
-        if (bytes == null) {
-            bytes = new byte[0];
-        }
-        if (bytes.length > 32) {
-            throw new IllegalArgumentException(
-                    "Max SSID length is 32 bytes, but received " + bytes.length + " bytes!");
-        }
-        mBytes = bytes;
-        // Duplicate the bytes to #octets for legacy apps.
-        octets.write(bytes, 0, bytes.length);
+    @UnsupportedAppUsage
+    public final ByteArrayOutputStream octets = new ByteArrayOutputStream(32);
+
+    private static final int HEX_RADIX = 16;
+
+    @UnsupportedAppUsage
+    public static final String NONE = WifiManager.UNKNOWN_SSID;
+
+    private WifiSsid() {
     }
 
     /**
-     * Create a WifiSsid from the raw bytes. If the byte array is null, return an empty WifiSsid
-     * object which will return an empty byte array and empty text.
-     * @throws IllegalArgumentException if the raw byte array is longer than 32 bytes.
+     * Create a WifiSsid from a raw byte array. If the byte array is null, return an empty WifiSsid
+     * object.
      */
     @NonNull
-    public static WifiSsid fromBytes(@Nullable byte[] bytes) {
-        return new WifiSsid(bytes);
-    }
-
-    /**
-     * Returns the raw byte array representing this SSID.
-     * @return the SSID
-     */
-    @NonNull
-    public byte[] getBytes() {
-        return mBytes;
-    }
-
-    /**
-     * Create a UTF-8 WifiSsid from unquoted plaintext. If the text is null, return an
-     * empty WifiSsid object which will return an empty byte array and empty text.
-     * @throws IllegalArgumentException if the encoded UTF-8 byte array is longer than 32 bytes.
-     * @hide
-     */
-    @NonNull
-    public static WifiSsid fromUtf8Text(@Nullable CharSequence utf8Text) {
-        if (utf8Text == null) {
-            return new WifiSsid(null);
+    public static WifiSsid createFromByteArray(@Nullable byte[] ssid) {
+        WifiSsid wifiSsid = new WifiSsid();
+        if (ssid != null) {
+            wifiSsid.octets.write(ssid, 0 /* the start offset */, ssid.length);
         }
-        return new WifiSsid(utf8Text.toString().getBytes(StandardCharsets.UTF_8));
+        return wifiSsid;
     }
 
-    /**
-     * If the SSID is encoded with UTF-8, this method returns the decoded SSID as plaintext.
-     * Otherwise, it returns {@code null}.
-     * @return the SSID
-     * @hide
-     */
-    @Nullable
-    public CharSequence getUtf8Text() {
-        return decodeSsid(mBytes, StandardCharsets.UTF_8);
+    @UnsupportedAppUsage
+    public static WifiSsid createFromAsciiEncoded(String asciiEncoded) {
+        WifiSsid a = new WifiSsid();
+        a.convertToBytes(asciiEncoded);
+        return a;
     }
 
-    /**
-     * Create a WifiSsid from a string matching the format of {@link WifiSsid#toString()}.
-     * If the string is null, return an empty WifiSsid object which will return an empty byte array
-     * and empty text.
-     * @throws IllegalArgumentException if the string is unquoted but not hexadecimal,
-     *                                  if the hexadecimal string is odd-length,
-     *                                  or if the encoded byte array is longer than 32 bytes.
-     * @hide
-     */
-    @NonNull
-    public static WifiSsid fromString(@Nullable String string) {
-        if (string == null) {
-            return new WifiSsid(null);
+    public static WifiSsid createFromHex(String hexStr) {
+        WifiSsid a = new WifiSsid();
+        if (hexStr == null) return a;
+
+        if (hexStr.startsWith("0x") || hexStr.startsWith("0X")) {
+            hexStr = hexStr.substring(2);
         }
-        final int length = string.length();
-        if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {
-            return new WifiSsid(string.substring(1, length - 1).getBytes(StandardCharsets.UTF_8));
+
+        for (int i = 0; i < hexStr.length()-1; i += 2) {
+            int val;
+            try {
+                val = Integer.parseInt(hexStr.substring(i, i + 2), HEX_RADIX);
+            } catch(NumberFormatException e) {
+                val = 0;
+            }
+            a.octets.write(val);
         }
-        return new WifiSsid(HexEncoding.decode(string));
+        return a;
+    }
+
+    /* This function is equivalent to printf_decode() at src/utils/common.c in
+     * the supplicant */
+    private void convertToBytes(String asciiEncoded) {
+        int i = 0;
+        int val = 0;
+        while (i< asciiEncoded.length()) {
+            char c = asciiEncoded.charAt(i);
+            switch (c) {
+                case '\\':
+                    i++;
+                    switch(asciiEncoded.charAt(i)) {
+                        case '\\':
+                            octets.write('\\');
+                            i++;
+                            break;
+                        case '"':
+                            octets.write('"');
+                            i++;
+                            break;
+                        case 'n':
+                            octets.write('\n');
+                            i++;
+                            break;
+                        case 'r':
+                            octets.write('\r');
+                            i++;
+                            break;
+                        case 't':
+                            octets.write('\t');
+                            i++;
+                            break;
+                        case 'e':
+                            octets.write(27); //escape char
+                            i++;
+                            break;
+                        case 'x':
+                            i++;
+                            try {
+                                val = Integer.parseInt(asciiEncoded.substring(i, i + 2), HEX_RADIX);
+                            } catch (NumberFormatException e) {
+                                val = -1;
+                            } catch (StringIndexOutOfBoundsException e) {
+                                val = -1;
+                            }
+                            if (val < 0) {
+                                val = Character.digit(asciiEncoded.charAt(i), HEX_RADIX);
+                                if (val < 0) break;
+                                octets.write(val);
+                                i++;
+                            } else {
+                                octets.write(val);
+                                i += 2;
+                            }
+                            break;
+                        case '0':
+                        case '1':
+                        case '2':
+                        case '3':
+                        case '4':
+                        case '5':
+                        case '6':
+                        case '7':
+                            val = asciiEncoded.charAt(i) - '0';
+                            i++;
+                            if (asciiEncoded.charAt(i) >= '0' && asciiEncoded.charAt(i) <= '7') {
+                                val = val * 8 + asciiEncoded.charAt(i) - '0';
+                                i++;
+                            }
+                            if (asciiEncoded.charAt(i) >= '0' && asciiEncoded.charAt(i) <= '7') {
+                                val = val * 8 + asciiEncoded.charAt(i) - '0';
+                                i++;
+                            }
+                            octets.write(val);
+                            break;
+                        default:
+                            break;
+                    }
+                    break;
+                default:
+                    octets.write(c);
+                    i++;
+                    break;
+            }
+        }
     }
 
     /**
-     * Returns the string representation of the WifiSsid. If the SSID can be decoded as UTF-8, it
-     * will be returned in plain text surrounded by double quotation marks. Otherwise, it is
-     * returned as an unquoted string of hex digits. This format is consistent with
-     * {@link WifiInfo#getSSID()} and {@link WifiConfiguration#SSID}.
-     *
-     * @return SSID as double-quoted plain text from UTF-8 or unquoted hex digits
+     * Converts this SSID to an unquoted UTF-8 String representation.
+     * @return the SSID string, or {@link WifiManager#UNKNOWN_SSID} if there was an error.
      */
     @Override
-    @NonNull
     public String toString() {
-        String utf8String = decodeSsid(mBytes, StandardCharsets.UTF_8);
-        if (TextUtils.isEmpty(utf8String)) {
-            return HexEncoding.encodeToString(mBytes);
-        }
-        return "\"" + utf8String + "\"";
-    }
-
-    /**
-     * Returns the given SSID bytes as a String decoded using the given Charset. If the bytes cannot
-     * be decoded, then this returns {@code null}.
-     * @param ssidBytes SSID as bytes
-     * @param charset Charset to decode with
-     * @return SSID as string, or {@code null}.
-     */
-    @Nullable
-    private static String decodeSsid(@NonNull byte[] ssidBytes, @NonNull Charset charset) {
+        byte[] ssidBytes = octets.toByteArray();
+        // Supplicant returns \x00\x00\x00\x00\x00\x00\x00\x00 hex string
+        // for a hidden access point. Make sure we maintain the previous
+        // behavior of returning empty string for this case.
+        if (octets.size() <= 0 || isArrayAllZeroes(ssidBytes)) return "";
+        // TODO: Handle conversion to other charsets upon failure
+        Charset charset = Charset.forName("UTF-8");
         CharsetDecoder decoder = charset.newDecoder()
-                .onMalformedInput(CodingErrorAction.REPORT)
-                .onUnmappableCharacter(CodingErrorAction.REPORT);
+                .onMalformedInput(CodingErrorAction.REPLACE)
+                .onUnmappableCharacter(CodingErrorAction.REPLACE);
         CharBuffer out = CharBuffer.allocate(32);
+
         CoderResult result = decoder.decode(ByteBuffer.wrap(ssidBytes), out, true);
         out.flip();
         if (result.isError()) {
-            return null;
+            return WifiManager.UNKNOWN_SSID;
         }
         return out.toString();
     }
@@ -172,12 +217,40 @@
             return false;
         }
         WifiSsid that = (WifiSsid) thatObject;
-        return Arrays.equals(mBytes, that.mBytes);
+        return Arrays.equals(octets.toByteArray(), that.octets.toByteArray());
     }
 
     @Override
     public int hashCode() {
-        return Arrays.hashCode(mBytes);
+        return Arrays.hashCode(octets.toByteArray());
+    }
+
+    private boolean isArrayAllZeroes(byte[] ssidBytes) {
+        for (int i = 0; i< ssidBytes.length; i++) {
+            if (ssidBytes[i] != 0) return false;
+        }
+        return true;
+    }
+
+    /** @hide */
+    public boolean isHidden() {
+        return isArrayAllZeroes(octets.toByteArray());
+    }
+
+    /** @hide */
+    @UnsupportedAppUsage
+    public byte[] getOctets() {
+        return octets.toByteArray();
+    }
+
+    /** @hide */
+    public String getHexString() {
+        String out = "0x";
+        byte[] ssidbytes = getOctets();
+        for (int i = 0; i < octets.size(); i++) {
+            out += String.format(Locale.US, "%02x", ssidbytes[i]);
+        }
+        return (octets.size() > 0) ? out : null;
     }
 
     /** Implement the Parcelable interface */
@@ -189,15 +262,22 @@
     /** Implement the Parcelable interface */
     @Override
     public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeByteArray(mBytes);
+        dest.writeInt(octets.size());
+        dest.writeByteArray(octets.toByteArray());
     }
 
     /** Implement the Parcelable interface */
+    @UnsupportedAppUsage
     public static final @NonNull Creator<WifiSsid> CREATOR =
             new Creator<WifiSsid>() {
                 @Override
                 public WifiSsid createFromParcel(Parcel in) {
-                    return new WifiSsid(in.createByteArray());
+                    WifiSsid ssid = new WifiSsid();
+                    int length = in.readInt();
+                    byte[] b = new byte[length];
+                    in.readByteArray(b);
+                    ssid.octets.write(b, 0, length);
+                    return ssid;
                 }
 
                 @Override
@@ -205,40 +285,4 @@
                     return new WifiSsid[size];
                 }
             };
-
-    /**
-     * Use {@link #getBytes()} instead.
-     * @hide
-     */
-    // TODO(b/231433398): add maxTargetSdk = Build.VERSION_CODES.S
-    @UnsupportedAppUsage(publicAlternatives = "{@link #getBytes()}")
-    public final ByteArrayOutputStream octets = new ByteArrayOutputStream(32);
-
-    /**
-     * Use {@link android.net.wifi.WifiManager#UNKNOWN_SSID} instead.
-     * @hide
-     */
-    // TODO(b/231433398): add maxTargetSdk = Build.VERSION_CODES.S
-    @UnsupportedAppUsage(publicAlternatives = "{@link android.net.wifi.WifiManager#UNKNOWN_SSID}")
-    public static final String NONE = WifiManager.UNKNOWN_SSID;
-
-    /**
-     * Use {@link #fromBytes(byte[])} instead.
-     * @hide
-     */
-    // TODO(b/231433398): add maxTargetSdk = Build.VERSION_CODES.S
-    @UnsupportedAppUsage(publicAlternatives = "{@link #fromBytes(byte[])}")
-    public static WifiSsid createFromAsciiEncoded(String asciiEncoded) {
-        return fromUtf8Text(asciiEncoded);
-    }
-
-    /**
-     * Use {@link #getBytes()} instead.
-     * @hide
-     */
-    // TODO(b/231433398): add maxTargetSdk = Build.VERSION_CODES.S
-    @UnsupportedAppUsage(publicAlternatives = "{@link #getBytes()}")
-    public byte[] getOctets() {
-        return getBytes();
-    }
 }
diff --git a/framework/java/android/net/wifi/WifiStringResourceWrapper.java b/framework/java/android/net/wifi/WifiStringResourceWrapper.java
deleted file mode 100644
index b0a59a5..0000000
--- a/framework/java/android/net/wifi/WifiStringResourceWrapper.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi;
-
-import android.content.Context;
-import android.content.pm.PackageManager;
-import android.content.res.Resources;
-import android.telephony.SubscriptionManager;
-import android.telephony.TelephonyManager;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-
-/**
- * Provide a wrapper to reading string overlay resources for WiFi.
- *
- * Specifically intended to provide a mechanism to store and read carrier-specific translatable
- * string overlays. Carrier-specific (MVNO) overlays are not supported - but Carrier Configurations
- * which do support MVNOs do not support translatable strings.
- *
- * Structure:
- * <string name="wifi_eap_error_message_code_32760">EAP authentication error 32760</string>
- * <string-array name=”wifi_eap_error_message_code_32760_carrier_overrides”>
- * <item><xliff:g id="carrier_id_prefix">:::1234:::</xliff:g>EAP error 32760 for carrier 1234</item>
- * <item><xliff:g id="carrier_id_prefix">:::5678:::</xliff:g>EAP error 32760 for carrier 5678</item>
- * …
- * </string-array>
- *
- * The WiFi-stack specific solution is to store the strings in the general name-space with a known
- * prefix.
- *
- * @hide
- */
-public class WifiStringResourceWrapper {
-    private static final String TAG = "WifiStringResourceWrapper";
-
-    private final WifiContext mContext;
-    private final int mSubId;
-    private final int mCarrierId;
-
-    private final Resources mResources;
-    private final String mCarrierIdPrefix;
-
-    @VisibleForTesting
-    static final String CARRIER_ID_RESOURCE_NAME_SUFFIX = "_carrier_overrides";
-
-    @VisibleForTesting
-    static final String CARRIER_ID_RESOURCE_SEPARATOR = ":::";
-
-    /**
-     * @param context a WifiContext
-     * @param subId   the sub ID to use for all the resources (overlays or carrier ID)
-     */
-    public WifiStringResourceWrapper(WifiContext context, int subId, int carrierId) {
-        mContext = context;
-        mSubId = subId;
-        mCarrierId = carrierId;
-
-        mResources = getResourcesForSubId();
-        mCarrierIdPrefix =
-                CARRIER_ID_RESOURCE_SEPARATOR + mCarrierId + CARRIER_ID_RESOURCE_SEPARATOR;
-    }
-
-    /**
-     * Returns the string corresponding to the resource ID - or null if no resources exist.
-     */
-    public String getString(String name, Object... args) {
-        if (mResources == null) return null;
-        int resourceId = mResources.getIdentifier(name, "string",
-                mContext.getWifiOverlayApkPkgName());
-        if (resourceId == 0) return null;
-
-        // check if there's a carrier-specific override array
-        if (mCarrierId != TelephonyManager.UNKNOWN_CARRIER_ID) {
-            int arrayResourceId = mResources.getIdentifier(name + CARRIER_ID_RESOURCE_NAME_SUFFIX,
-                    "array", mContext.getWifiOverlayApkPkgName());
-            if (arrayResourceId != 0) {
-                String[] carrierIdOverlays = mResources.getStringArray(arrayResourceId);
-                // check for the :::carrier-id::: prefix and if exists format and return it
-                for (String carrierIdOverlay : carrierIdOverlays) {
-                    if (carrierIdOverlay.indexOf(mCarrierIdPrefix) != 0) continue;
-                    try {
-                        return String.format(carrierIdOverlay.substring(mCarrierIdPrefix.length()),
-                                args);
-                    } catch (java.util.IllegalFormatException e) {
-                        Log.e(TAG, "Resource formatting error - '" + name + "' - " + e);
-                        return null;
-                    }
-                }
-            }
-        }
-
-        try {
-            return mResources.getString(resourceId, args);
-        } catch (java.util.IllegalFormatException e) {
-            Log.e(TAG, "Resource formatting error - '" + name + "' - " + e);
-            return null;
-        }
-    }
-
-    /**
-     * Returns the resources from the given context for the MCC/MNC
-     * associated with the subscription.
-     */
-    private Resources getResourcesForSubId() {
-        try {
-            Context resourceContext = mContext.createPackageContext(
-                    mContext.getWifiOverlayApkPkgName(), 0);
-            return SubscriptionManager.getResourcesForSubId(resourceContext, mSubId);
-        } catch (PackageManager.NameNotFoundException ex) {
-            return null;
-        }
-    }
-}
diff --git a/framework/java/android/net/wifi/WifiUsabilityStatsEntry.java b/framework/java/android/net/wifi/WifiUsabilityStatsEntry.java
index 5c1f4b2..c33faa2 100644
--- a/framework/java/android/net/wifi/WifiUsabilityStatsEntry.java
+++ b/framework/java/android/net/wifi/WifiUsabilityStatsEntry.java
@@ -232,7 +232,6 @@
         WIFI_PREAMBLE_HT,
         WIFI_PREAMBLE_VHT,
         WIFI_PREAMBLE_HE,
-        WIFI_PREAMBLE_EHT,
         WIFI_PREAMBLE_INVALID})
     public @interface WifiPreambleType {}
 
@@ -244,10 +243,8 @@
     public static final int WIFI_PREAMBLE_HT = 2;
     /** Preamble type for 802.11ac, IEEE Std 802.11-2020, Section 21 */
     public static final int WIFI_PREAMBLE_VHT = 3;
-    /** Preamble type for 802.11ax, IEEE Std 802.11ax-2021, Section 27 */
+    /** Preamble type for 802.11ax, IEEE Std 802.11-2020, Section 27 */
     public static final int WIFI_PREAMBLE_HE = 5;
-    /** Preamble type for 802.11be, IEEE Std 802.11be-2021, Section 36 */
-    public static final int WIFI_PREAMBLE_EHT = 6;
     /** Invalid */
     public static final int WIFI_PREAMBLE_INVALID = -1;
 
@@ -279,7 +276,6 @@
         WIFI_BANDWIDTH_40_MHZ,
         WIFI_BANDWIDTH_80_MHZ,
         WIFI_BANDWIDTH_160_MHZ,
-        WIFI_BANDWIDTH_320_MHZ,
         WIFI_BANDWIDTH_80P80_MHZ,
         WIFI_BANDWIDTH_5_MHZ,
         WIFI_BANDWIDTH_10_MHZ,
@@ -300,8 +296,6 @@
     public static final int WIFI_BANDWIDTH_5_MHZ = 5;
     /** Channel bandwidth: 10MHz */
     public static final int WIFI_BANDWIDTH_10_MHZ = 6;
-    /** Channel bandwidth: 320MHz */
-    public static final int WIFI_BANDWIDTH_320_MHZ = 7;
     /** Invalid */
     public static final int WIFI_BANDWIDTH_INVALID = -1;
 
@@ -330,7 +324,7 @@
          * @param nss Number of spatial streams.
          * @param bw Bandwidth information.
          * @param rateMcsIdx MCS index. OFDM/CCK rate code would be as per IEEE std in the units of
-         *                   0.5Mbps. HT/VHT/HE/EHT: it would be MCS index.
+         *                   0.5Mbps. HT/VHT/HE: it would be MCS index.
          * @param bitRateInKbps Bitrate in units of 100 Kbps.
          * @param txMpdu Number of successfully transmitted data packets (ACK received).
          * @param rxMpdu Number of received data packets.
@@ -406,7 +400,7 @@
 
         /**
          * MCS index. OFDM/CCK rate code would be as per IEEE std in the units of 0.5Mbps.
-         * HT/VHT/HE/EHT: it would be MCS index
+         * HT/VHT/HE: it would be MCS index
          */
         public int getRateMcsIdx() {
             return mRateMcsIdx;
@@ -892,10 +886,8 @@
      *           HT MCS0, ..., MCS15;
      *         - VHT (IEEE Std 802.11-2020, Section 21): LEGACY rates (1Mbps, ..., 54Mbps),
      *           VHT MCS0/NSS1, ..., VHT MCS11/NSS1, VHT MCSO/NSS2, ..., VHT MCS11/NSS2;
-     *         - HE (IEEE Std 802.11ax-2020, Section 27): LEGACY rates (1Mbps, ..., 54Mbps),
+     *         - HE (IEEE Std 802.11-2020, Section 27): LEGACY rates (1Mbps, ..., 54Mbps),
      *           HE MCS0/NSS1, ..., HE MCS11/NSS1, HE MCSO/NSS2, ..., HE MCS11/NSS2.
-     *         - EHT (IEEE std 802.11be-2021, Section 36): Legacy rates (1Mbps, ..., 54Mbps),
-     *           EHT MSC0/NSS1, ..., EHT MCS14/NSS1, EHT MCS0/NSS2, ..., EHT MCS14/NSS2.
      */
     @NonNull
     public List<RateStats> getRateStats() {
@@ -920,10 +912,10 @@
     /**
      * Channel utilization ratio on the current channel.
      *
-     * @return The channel utilization ratio (value) in the range of [0, 255], where x corresponds
-     *         to (x * 100 / 255)%, or -1 indicating that there is no valid value to return.
+     * @return The channel utilization ratio (value) in the range of [0, 255], where
+     *         x corresponds to (x * 100 / 255)%.
      */
-    public @IntRange(from = -1, to = 255) int getChannelUtilizationRatio() {
+    public @IntRange(from = 0, to = 255) int getChannelUtilizationRatio() {
         return mChannelUtilizationRatio;
     }
 
diff --git a/framework/java/android/net/wifi/aware/AttachCallback.java b/framework/java/android/net/wifi/aware/AttachCallback.java
index 8f2f542..c368b46 100644
--- a/framework/java/android/net/wifi/aware/AttachCallback.java
+++ b/framework/java/android/net/wifi/aware/AttachCallback.java
@@ -16,8 +16,6 @@
 
 package android.net.wifi.aware;
 
-import android.os.Handler;
-
 /**
  * Base class for Aware attach callbacks. Should be extended by applications and set when calling
  * {@link WifiAwareManager#attach(AttachCallback, android.os.Handler)}. These are callbacks
@@ -44,14 +42,4 @@
     public void onAttachFailed() {
         /* empty */
     }
-
-    /**
-     * Called when Aware attach session get from {@link #onAttached(WifiAwareSession)} is
-     * terminated. Use {@link WifiAwareManager#attach(AttachCallback, Handler)} or
-     * {@link WifiAwareManager#attach(AttachCallback, IdentityChangedListener, Handler)} to get a
-     * new active session.
-     */
-    public void onAwareSessionTerminated() {
-        /* empty */
-    }
 }
diff --git a/framework/java/android/net/wifi/aware/AwareParams.java b/framework/java/android/net/wifi/aware/AwareParams.java
deleted file mode 100644
index a786406..0000000
--- a/framework/java/android/net/wifi/aware/AwareParams.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi.aware;
-
-import android.annotation.IntRange;
-import android.annotation.NonNull;
-import android.annotation.SystemApi;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-/**
- * An object to use with {@link WifiAwareManager#setAwareParams(AwareParams)} specifying
- * configuration of the Wi-Fi Aware protocol implementation.
- * @hide
- */
-@SystemApi
-public final class AwareParams implements Parcelable {
-
-    /**
-     *  An integer representing the parameter is never set.
-     */
-    public static final int UNSET_PARAMETER = -1;
-
-    private int mDw24Ghz = UNSET_PARAMETER;
-    private int mDw5Ghz = UNSET_PARAMETER;
-    private int mDw6Ghz = UNSET_PARAMETER;
-    private int mDiscoveryBeaconIntervalMs = UNSET_PARAMETER;
-    private int mNumSpatialStreamsInDiscovery = UNSET_PARAMETER;
-    private boolean mIsDwEarlyTerminationEnabled = false;
-    private int mMacRandomIntervalSec = UNSET_PARAMETER;
-
-    /**
-     * Construct an empty {@link AwareParams}.
-     */
-    public AwareParams() {
-    }
-
-    private AwareParams(Parcel in) {
-        mDw24Ghz = in.readInt();
-        mDw5Ghz = in.readInt();
-        mDw6Ghz = in.readInt();
-        mDiscoveryBeaconIntervalMs = in.readInt();
-        mNumSpatialStreamsInDiscovery = in.readInt();
-        mIsDwEarlyTerminationEnabled = in.readBoolean();
-        mMacRandomIntervalSec = in.readInt();
-    }
-
-    public static final @NonNull Creator<AwareParams> CREATOR = new Creator<AwareParams>() {
-        @Override
-        public AwareParams createFromParcel(Parcel in) {
-            return new AwareParams(in);
-        }
-
-        @Override
-        public AwareParams[] newArray(int size) {
-            return new AwareParams[size];
-        }
-    };
-
-    /**
-     * Specifies the discovery window (DW) interval for Sync beacons and SDF frames for 2.4Ghz.
-     * Defined as per Wi-Fi Alliance (WFA) Wi-Fi Aware specifications version 3.1 Section 4.1.1.1
-     * Valid values of DW Interval are: 1, 2, 3, 4 and 5 corresponding to waking up every  1, 2, 4,
-     * 8, and 16 DWs.
-     * @param dw A positive number specifying the discovery window (DW) interval
-     */
-    public void setDiscoveryWindowWakeInterval24Ghz(@IntRange(from = 1, to = 5) int dw) {
-        if (dw > 5 || dw < 1) {
-            throw new IllegalArgumentException("DW value for 2.4Ghz must be 1 to 5");
-        }
-        mDw24Ghz = dw;
-    }
-
-    /**
-     * Specifies the discovery window (DW) interval for Sync beacons and SDF frames for 5Ghz.
-     * Defined as per Wi-Fi Alliance (WFA) Wi-Fi Aware specifications version 3.1 Section 4.1.1.1
-     * <ul>
-     *     <li>0: indicating no discovery in the 5GHz band</li>
-     * <li>1, 2, 3, 4, or 5: corresponding to waking up every 1, 2, 4, 8, and 16 DWs.</li>
-     * </ul>
-     * @param dw An integer specifying the discovery window (DW) interval
-     */
-    public void setDiscoveryWindowWakeInterval5Ghz(@IntRange(from = 0, to = 5) int dw) {
-        if (dw > 5 || dw < 0) {
-            throw new IllegalArgumentException("DW value for 5Ghz must be 0 to 5");
-        }
-        mDw5Ghz = dw;
-    }
-
-    /**
-     * Set the discovery windows (DW) for 6Ghz reserved.
-     * @param dw An integer specifying the discovery window (DW) interval
-     * @hide
-     */
-    public void setDiscoveryWindow6Ghz(@IntRange(from = 0) int dw) {
-        mDw6Ghz = dw;
-    }
-
-    /**
-     * Specify the Discovery Beacon interval in ms. Specification only applicable if the device
-     * transmits Discovery Beacons (based on the Wi-Fi Aware protocol selection criteria). The value
-     * can be increased to reduce power consumption (on devices which would transmit Discovery
-     * Beacons), however - cluster synchronization time will likely increase.
-     * @param intervalInMs An integer specifying the interval in millisecond
-     */
-    public void setDiscoveryBeaconIntervalMillis(@IntRange(from = 1) int intervalInMs) {
-        if (intervalInMs < 1) {
-            throw new IllegalArgumentException("Discovery Beacon interval must >= 1");
-        }
-        mDiscoveryBeaconIntervalMs = intervalInMs;
-    }
-
-    /**
-     * The number of spatial streams to be used for transmitting Wi-Fi Aware management frames (does
-     * NOT apply to data-path packets). A small value may reduce power consumption for small
-     * discovery packets.
-     * @param spatialStreamsNum A positive number specifying the number of spatial streams
-     */
-    public void setNumSpatialStreamsInDiscovery(@IntRange(from = 1) int spatialStreamsNum) {
-        if (spatialStreamsNum < 1) {
-            throw new IllegalArgumentException("Number Spatial streams must >= 1");
-        }
-        mNumSpatialStreamsInDiscovery = spatialStreamsNum;
-    }
-
-    /**
-     * Specifies the interval in seconds that the Wi-Fi Aware management interface MAC address is
-     * re-randomized.
-     * @param intervalSec A positive number indicating the interval for the MAC address to
-     *                    re-randomize, must not exceed 1800 second (30 mins).
-     */
-    public void setMacRandomizationIntervalSeconds(@IntRange(from = 1, to = 1800) int intervalSec) {
-        if (intervalSec > 1800 || intervalSec < 1) {
-            throw new IllegalArgumentException("Mac Randomization Interval must be between 1 to "
-                    + "1800 seconds");
-        }
-        mMacRandomIntervalSec = intervalSec;
-    }
-
-    /**
-     * Controls whether the device may terminate listening on a Discovery Window (DW) earlier than
-     * the DW termination (16ms) if no information is received. Enabling the feature will result in
-     * lower power consumption, but may result in some missed messages and hence increased latency.
-     *
-     * @param enable true to enable, false otherwise
-     */
-    public void setDwEarlyTerminationEnabled(boolean enable) {
-        mIsDwEarlyTerminationEnabled = enable;
-    }
-
-    /**
-     * Get the discovery window (DW) interval for 2.4Ghz.
-     * @see #setDiscoveryWindowWakeInterval24Ghz(int)
-     * @return an integer represents discovery window interval, {@link #UNSET_PARAMETER} represent
-     * this parameter is not set
-     */
-    public int getDiscoveryWindowWakeInterval24Ghz() {
-        return mDw24Ghz;
-    }
-
-    /**
-     * Get the discovery window (DW) interval for 5Ghz.
-     * @see #setDiscoveryWindowWakeInterval5Ghz(int)
-     * @return an integer represents discovery window interval, {@link #UNSET_PARAMETER} represent
-     * this parameter is not set
-     */
-    public int getDiscoveryWindowWakeInterval5Ghz() {
-        return mDw5Ghz;
-    }
-
-    /**
-     * Get the discovery window (DW) interval for 6ghz.
-     * @see #setDiscoveryWindowWakeInterval5Ghz(int)
-     * @return an integer represents discovery window interval, {@link #UNSET_PARAMETER} represent
-     * this parameter is not
-     * set
-     * @hide
-     */
-    public int getDiscoveryWindowWakeInterval6Ghz() {
-        return mDw24Ghz;
-    }
-
-    /**
-     * Get the discovery beacon interval in milliseconds
-     * @see #setDiscoveryBeaconIntervalMillis(int)
-     * @return an integer represents discovery beacon interval in milliseconds,
-     * {@link #UNSET_PARAMETER} represent this parameter is not set
-     */
-    public int getDiscoveryBeaconIntervalMillis() {
-        return mDiscoveryBeaconIntervalMs;
-    }
-
-    /**
-     * Get the number of the spatial streams used in discovery
-     * @see #setNumSpatialStreamsInDiscovery(int)
-     * @return an integer represents number of the spatial streams, {@link #UNSET_PARAMETER}
-     * represent this parameter is not set
-     */
-    public int getNumSpatialStreamsInDiscovery() {
-        return mNumSpatialStreamsInDiscovery;
-    }
-
-    /**
-     * Check if discovery window early termination is enabled.
-     * @see #setDwEarlyTerminationEnabled(boolean)
-     * @return true if enabled, false otherwise.
-     */
-    public boolean isDwEarlyTerminationEnabled() {
-        return mIsDwEarlyTerminationEnabled;
-    }
-
-    /**
-     * Get the interval of the MAC address randomization.
-     * @return An integer represents the interval in seconds, {@link #UNSET_PARAMETER} represent
-     * this parameter is not set
-     */
-    public int getMacRandomizationIntervalSeconds() {
-        return mMacRandomIntervalSec;
-    }
-
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeInt(mDw24Ghz);
-        dest.writeInt(mDw5Ghz);
-        dest.writeInt(mDw6Ghz);
-        dest.writeInt(mDiscoveryBeaconIntervalMs);
-        dest.writeInt(mNumSpatialStreamsInDiscovery);
-        dest.writeBoolean((mIsDwEarlyTerminationEnabled));
-        dest.writeInt(mMacRandomIntervalSec);
-    }
-
-    /** @hide */
-    @Override
-    public String toString() {
-        StringBuffer sbf = new StringBuffer();
-        sbf.append("AwareParams [")
-                .append("mDw24Ghz=").append(mDw24Ghz)
-                .append(", mDw5Ghz=").append(mDw5Ghz)
-                .append(", mDw6Ghz=").append(mDw6Ghz)
-                .append(", mDiscoveryBeaconIntervalMs=").append(mDiscoveryBeaconIntervalMs)
-                .append(", mNumSpatialStreamsInDiscovery=").append(mNumSpatialStreamsInDiscovery)
-                .append(", mIsDwEarlyTerminationEnabled=").append(mIsDwEarlyTerminationEnabled)
-                .append(", mMacRandomIntervalSec=").append(mMacRandomIntervalSec)
-                .append("]");
-        return sbf.toString();
-    }
-}
diff --git a/framework/java/android/net/wifi/aware/Characteristics.java b/framework/java/android/net/wifi/aware/Characteristics.java
index e3dd919..42aac20 100644
--- a/framework/java/android/net/wifi/aware/Characteristics.java
+++ b/framework/java/android/net/wifi/aware/Characteristics.java
@@ -17,7 +17,6 @@
 package android.net.wifi.aware;
 
 import android.annotation.IntDef;
-import android.annotation.IntRange;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.Parcel;
@@ -46,16 +45,8 @@
     /** @hide */
     public static final String KEY_IS_INSTANT_COMMUNICATION_MODE_SUPPORTED =
             "key_is_instant_communication_mode_supported";
-    /** @hide */
-    public static final String KEY_MAX_NDP_NUMBER = "key_max_ndp_number";
-    /** @hide */
-    public static final String KEY_MAX_PUBLISH_NUMBER = "key_max_publish_number";
-    /** @hide */
-    public static final String KEY_MAX_SUBSCRIBE_NUMBER = "key_max_subscribe_number";
-    /** @hide */
-    public static final String KEY_MAX_NDI_NUMBER = "key_max_ndi_number";
 
-    private final Bundle mCharacteristics;
+    private Bundle mCharacteristics = new Bundle();
 
     /** @hide : should not be created by apps */
     public Characteristics(Bundle characteristics) {
@@ -101,53 +92,6 @@
     }
 
     /**
-     * Returns the maximum number of Aware data interfaces supported by the device.
-     *
-     * @return A positive integer, maximum number of Aware data interfaces supported by the device.
-     */
-    @IntRange(from = 1)
-    public int getNumberOfSupportedDataInterfaces() {
-        return mCharacteristics.getInt(KEY_MAX_NDI_NUMBER);
-    }
-
-    /**
-     * Returns the maximum number of Aware publish sessions supported by the device.
-     * Use {@link AwareResources#getAvailablePublishSessionsCount()} to get the number of available
-     * publish sessions which are not currently used by any app.
-     *
-     * @return A positive integer, maximum number of publish sessions supported by the device.
-     */
-    @IntRange(from = 1)
-    public int getNumberOfSupportedPublishSessions() {
-        return mCharacteristics.getInt(KEY_MAX_PUBLISH_NUMBER);
-    }
-
-    /**
-     * Returns the maximum number of Aware subscribe session supported by the device.
-     * Use {@link AwareResources#getAvailableSubscribeSessionsCount()} to get the number of
-     * available subscribe sessions which are not currently used by any app.
-     *
-     * @return A positive integer, maximum number of subscribe sessions supported by the device.
-     */
-    @IntRange(from = 1)
-    public int getNumberOfSupportedSubscribeSessions() {
-        return mCharacteristics.getInt(KEY_MAX_SUBSCRIBE_NUMBER);
-    }
-
-    /**
-     * Returns the maximum number of Aware data paths(also known as NDPs - NAN Data Paths) supported
-     * by the device.
-     * Use {@link AwareResources#getAvailableDataPathsCount()} to get the number of available Aware
-     * data paths which are not currently used by any app.
-     *
-     * @return A positive integer, maximum number of Aware data paths supported by the device.
-     */
-    @IntRange(from = 1)
-    public int getNumberOfSupportedDataPaths() {
-        return mCharacteristics.getInt(KEY_MAX_NDP_NUMBER);
-    }
-
-    /**
      * Check if instant communication mode is supported by device. The instant communication mode is
      * defined as per Wi-Fi Alliance (WFA) Wi-Fi Aware specifications version 3.1 Section 12.3.
      * @return True if supported, false otherwise.
@@ -162,46 +106,28 @@
 
     /** @hide */
     @IntDef(flag = true, prefix = { "WIFI_AWARE_CIPHER_SUITE_" }, value = {
-            WIFI_AWARE_CIPHER_SUITE_NONE,
             WIFI_AWARE_CIPHER_SUITE_NCS_SK_128,
             WIFI_AWARE_CIPHER_SUITE_NCS_SK_256,
-            WIFI_AWARE_CIPHER_SUITE_NCS_PK_128,
-            WIFI_AWARE_CIPHER_SUITE_NCS_PK_256,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface WifiAwareCipherSuites {}
 
     /**
-     * Wi-Fi Aware supported open (unencrypted) data-path.
-     */
-    public static final int WIFI_AWARE_CIPHER_SUITE_NONE = 0;
-    /**
-     * Wi-Fi Aware supported cipher suite representing NCS SK 128: 128 bit shared-key.
+     * Wi-Fi Aware supported ciphier suite representing NCS SK 128: 128 bit shared-key.
      */
     public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128 = 1 << 0;
 
     /**
-     * Wi-Fi Aware supported cipher suite representing NCS SK 256: 256 bit shared-key.
+     * Wi-Fi Aware supported ciphier suite representing NCS SK 256: 256 bit shared-key.
      */
     public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256 = 1 << 1;
 
     /**
-     * Wi-Fi Aware supported cipher suite representing NCS PK 128: 128 bit public-key.
-     */
-    public static final int WIFI_AWARE_CIPHER_SUITE_NCS_PK_128 = 1 << 2;
-
-    /**
-     * Wi-Fi Aware supported cipher suite representing NCS PK 256: 256 bit public-key.
-     */
-    public static final int WIFI_AWARE_CIPHER_SUITE_NCS_PK_256 = 1 << 3;
-
-    /**
      * Returns the set of cipher suites supported by the device for use in Wi-Fi Aware data-paths.
      * The device automatically picks the strongest cipher suite when initiating a data-path setup.
      *
-     * @return A set of flags from {@link #WIFI_AWARE_CIPHER_SUITE_NCS_SK_128},
-     * {@link #WIFI_AWARE_CIPHER_SUITE_NCS_SK_256}, {@link #WIFI_AWARE_CIPHER_SUITE_NCS_PK_128},
-     * or {@link #WIFI_AWARE_CIPHER_SUITE_NCS_PK_256}
+     * @return A set of flags from {@link #WIFI_AWARE_CIPHER_SUITE_NCS_SK_128}, or
+     * {@link #WIFI_AWARE_CIPHER_SUITE_NCS_SK_256}.
      */
     public @WifiAwareCipherSuites int getSupportedCipherSuites() {
         return mCharacteristics.getInt(KEY_SUPPORTED_CIPHER_SUITES);
diff --git a/framework/java/android/net/wifi/aware/DiscoverySessionCallback.java b/framework/java/android/net/wifi/aware/DiscoverySessionCallback.java
index f5e355d..da8e17e 100644
--- a/framework/java/android/net/wifi/aware/DiscoverySessionCallback.java
+++ b/framework/java/android/net/wifi/aware/DiscoverySessionCallback.java
@@ -93,15 +93,12 @@
     }
 
     /**
-     * Called when a subscribe operation results in a service discovery.
+     * Called when a discovery (publish or subscribe) operation results in a
+     * service discovery.
      * <p>
      * Note that this method and
      * {@link #onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)} may be called
      * multiple times per service discovery.
-     * <p>
-     * Note: This method is superseded by {@link #onServiceDiscovered(ServiceDiscoveryInfo)} which
-     * returns more information. Note that both legacy and new callback will be triggered on
-     * discovery.
      *
      * @param peerHandle An opaque handle to the peer matching our discovery operation.
      * @param serviceSpecificInfo The service specific information (arbitrary
@@ -120,21 +117,7 @@
     }
 
     /**
-     * Called when a subscribe operation results in a service discovery.
-     * <p>
-     * Note: This method supersedes {@link #onServiceDiscovered(PeerHandle, byte[], List)} and
-     * provides additional information - including cipher suite type and security context of the
-     * peer. Both the legacy and the new callback will be triggered on discovery.
-     *
-     * @param info A {@link ServiceDiscoveryInfo} structure containing information on the discovery
-     *             session and the discovered peer.
-     */
-    public void onServiceDiscovered(@NonNull ServiceDiscoveryInfo info) {
-        /* empty */
-    }
-
-    /**
-     * Called when a subscribe operation results in a
+     * Called when a discovery (publish or subscribe) operation results in a
      * service discovery. Called when a Subscribe service was configured with a range requirement
      * {@link SubscribeConfig.Builder#setMinDistanceMm(int)} and/or
      * {@link SubscribeConfig.Builder#setMaxDistanceMm(int)} and the Publish service was configured
@@ -146,10 +129,6 @@
      * <p>
      * Note that this method and {@link #onServiceDiscovered(PeerHandle, byte[], List)} may be
      * called multiple times per service discovery.
-     * <p>
-     * Note: This method is superseded by
-     * {@link #onServiceDiscoveredWithinRange(ServiceDiscoveryInfo, int)} which returns more
-     * information. Note that both legacy and new callback will be triggered on discovery.
      *
      * @param peerHandle An opaque handle to the peer matching our discovery operation.
      * @param serviceSpecificInfo The service specific information (arbitrary
@@ -170,31 +149,6 @@
     }
 
     /**
-     * Called when a subscribe operation results in a
-     * service discovery. Called when a Subscribe service was configured with a range requirement
-     * {@link SubscribeConfig.Builder#setMinDistanceMm(int)} and/or
-     * {@link SubscribeConfig.Builder#setMaxDistanceMm(int)} and the Publish service was configured
-     * with {@link PublishConfig.Builder#setRangingEnabled(boolean)}.
-     * <p>
-     * If either Publisher or Subscriber does not enable Ranging, or if Ranging is temporarily
-     * disabled by the underlying device, service discovery proceeds without ranging and the
-     * {@link #onServiceDiscovered(PeerHandle, byte[], List)} is called.
-     * <p>
-     * Note: This method supersedes
-     * {@link #onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)} and provides
-     * additional information - including cipher suite type and security context of the peer. Both
-     * the legacy and the new callback will be triggered on discovery.
-     *
-     * @param info A {@link ServiceDiscoveryInfo} which indicate service config of the descovery
-     *             sessions.
-     * @param distanceMm The measured distance to the Publisher in mm. Note: the measured distance
- *                   may be negative for very close devices.
-     */
-    public void onServiceDiscoveredWithinRange(@NonNull ServiceDiscoveryInfo info, int distanceMm) {
-        /* empty */
-    }
-
-    /**
      * Called in response to
      * {@link DiscoverySession#sendMessage(PeerHandle, int, byte[])}
      * when a message is transmitted successfully - i.e. when it was received successfully by the
diff --git a/framework/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl b/framework/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl
index 3c2c2fe..e3e7c8e 100644
--- a/framework/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl
+++ b/framework/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl
@@ -28,10 +28,9 @@
     void onSessionConfigFail(int reason);
     void onSessionTerminated(int reason);
 
-    void onMatch(int peerId, in byte[] serviceSpecificInfo, in byte[] matchFilter,
-            int peerCipherSuite, in byte[] scid);
+    void onMatch(int peerId, in byte[] serviceSpecificInfo, in byte[] matchFilter);
     void onMatchWithDistance(int peerId, in byte[] serviceSpecificInfo, in byte[] matchFilter,
-            int distanceMm, int peerCipherSuite, in byte[] scid);
+            int distanceMm);
 
     void onMessageSendSuccess(int messageId);
     void onMessageSendFail(int messageId, int reason);
diff --git a/framework/java/android/net/wifi/aware/IWifiAwareEventCallback.aidl b/framework/java/android/net/wifi/aware/IWifiAwareEventCallback.aidl
index 212d6de..b646567 100644
--- a/framework/java/android/net/wifi/aware/IWifiAwareEventCallback.aidl
+++ b/framework/java/android/net/wifi/aware/IWifiAwareEventCallback.aidl
@@ -28,5 +28,4 @@
     void onConnectSuccess(int clientId);
     void onConnectFail(int reason);
     void onIdentityChanged(in byte[] mac);
-    void onAttachTerminate();
 }
diff --git a/framework/java/android/net/wifi/aware/IWifiAwareMacAddressProvider.aidl b/framework/java/android/net/wifi/aware/IWifiAwareMacAddressProvider.aidl
index 57adaa1..0e7289c 100644
--- a/framework/java/android/net/wifi/aware/IWifiAwareMacAddressProvider.aidl
+++ b/framework/java/android/net/wifi/aware/IWifiAwareMacAddressProvider.aidl
@@ -16,8 +16,6 @@
 
 package android.net.wifi.aware;
 
-import android.net.wifi.aware.MacAddrMapping;
-
 /**
  * Callback for IWifiAwareManager.getMacAddressFromPeerHandle
  *
@@ -25,5 +23,5 @@
  */
 oneway interface IWifiAwareMacAddressProvider
 {
-    void macAddress(in MacAddrMapping[] peerIdToMacList);
+    void macAddress(in Map peerIdToMacMap);
 }
diff --git a/framework/java/android/net/wifi/aware/IWifiAwareManager.aidl b/framework/java/android/net/wifi/aware/IWifiAwareManager.aidl
index 3b22489..c90c4d8 100644
--- a/framework/java/android/net/wifi/aware/IWifiAwareManager.aidl
+++ b/framework/java/android/net/wifi/aware/IWifiAwareManager.aidl
@@ -26,9 +26,6 @@
 import android.net.wifi.aware.SubscribeConfig;
 import android.net.wifi.aware.Characteristics;
 import android.net.wifi.aware.AwareResources;
-import android.net.wifi.aware.AwareParams;
-
-import android.os.Bundle;
 
 /**
  * Interface that WifiAwareService implements
@@ -44,21 +41,17 @@
     boolean isDeviceAttached();
     void enableInstantCommunicationMode(in String callingPackage, boolean enable);
     boolean isInstantCommunicationModeEnabled();
-    boolean isSetChannelOnDataPathSupported();
-    void setAwareParams(in AwareParams parameters);
 
     // client API
     void connect(in IBinder binder, in String callingPackage, in String callingFeatureId,
             in IWifiAwareEventCallback callback, in ConfigRequest configRequest,
-            boolean notifyOnIdentityChanged, in Bundle extras);
+            boolean notifyOnIdentityChanged);
     void disconnect(int clientId, in IBinder binder);
 
     void publish(in String callingPackage, in String callingFeatureId, int clientId,
-            in PublishConfig publishConfig, in IWifiAwareDiscoverySessionCallback callback,
-            in Bundle extras);
+            in PublishConfig publishConfig, in IWifiAwareDiscoverySessionCallback callback);
     void subscribe(in String callingPackage, in String callingFeatureId, int clientId,
-            in SubscribeConfig subscribeConfig, in IWifiAwareDiscoverySessionCallback callback,
-            in Bundle extras);
+            in SubscribeConfig subscribeConfig, in IWifiAwareDiscoverySessionCallback callback);
 
     // session API
     void updatePublish(int clientId, int discoverySessionId, in PublishConfig publishConfig);
@@ -68,5 +61,5 @@
     void terminateSession(int clientId, int discoverySessionId);
 
     // internal APIs: intended to be used between System Services (restricted permissions)
-    void requestMacAddresses(int uid, in int[] peerIds, in IWifiAwareMacAddressProvider callback);
+    void requestMacAddresses(int uid, in List peerIds, in IWifiAwareMacAddressProvider callback);
 }
diff --git a/framework/java/android/net/wifi/aware/MacAddrMapping.aidl b/framework/java/android/net/wifi/aware/MacAddrMapping.aidl
deleted file mode 100644
index 7a30859..0000000
--- a/framework/java/android/net/wifi/aware/MacAddrMapping.aidl
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi.aware;
-
- /**
-  * Mapping from a peer id to its MAC address.
-  *
-  * {@hide}
-  */
- parcelable MacAddrMapping {
-     int peerId;
-     byte[] macAddress;
- }
diff --git a/framework/java/android/net/wifi/aware/PublishConfig.java b/framework/java/android/net/wifi/aware/PublishConfig.java
index 059a122..c795a65 100644
--- a/framework/java/android/net/wifi/aware/PublishConfig.java
+++ b/framework/java/android/net/wifi/aware/PublishConfig.java
@@ -19,16 +19,10 @@
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.net.wifi.WifiScanner;
 import android.net.wifi.util.HexEncoding;
-import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
 
-import androidx.annotation.RequiresApi;
-
-import com.android.modules.utils.build.SdkLevel;
-
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.nio.charset.StandardCharsets;
@@ -89,17 +83,10 @@
     /** @hide */
     public final boolean mEnableRanging;
 
-    private final boolean mEnableInstantMode;
-
-    private final int mBand;
-
-    private final WifiAwareDataPathSecurityConfig mSecurityConfig;
-
     /** @hide */
     public PublishConfig(byte[] serviceName, byte[] serviceSpecificInfo, byte[] matchFilter,
             int publishType, int ttlSec, boolean enableTerminateNotification,
-            boolean enableRanging, boolean enableInstantMode, @WifiScanner.WifiBand int
-            band, WifiAwareDataPathSecurityConfig securityConfig) {
+            boolean enableRanging) {
         mServiceName = serviceName;
         mServiceSpecificInfo = serviceSpecificInfo;
         mMatchFilter = matchFilter;
@@ -107,9 +94,6 @@
         mTtlSec = ttlSec;
         mEnableTerminateNotification = enableTerminateNotification;
         mEnableRanging = enableRanging;
-        mEnableInstantMode = enableInstantMode;
-        mBand = band;
-        mSecurityConfig = securityConfig;
     }
 
     @Override
@@ -125,10 +109,7 @@
                 + ", mMatchFilter.length=" + (mMatchFilter == null ? 0 : mMatchFilter.length)
                 + ", mPublishType=" + mPublishType + ", mTtlSec=" + mTtlSec
                 + ", mEnableTerminateNotification=" + mEnableTerminateNotification
-                + ", mEnableRanging=" + mEnableRanging + "]"
-                + ", mEnableInstantMode=" + mEnableInstantMode
-                + ", mBand=" + mBand
-                + ", mSecurityConfig" + mSecurityConfig;
+                + ", mEnableRanging=" + mEnableRanging + "]";
     }
 
     @Override
@@ -145,9 +126,6 @@
         dest.writeInt(mTtlSec);
         dest.writeInt(mEnableTerminateNotification ? 1 : 0);
         dest.writeInt(mEnableRanging ? 1 : 0);
-        dest.writeBoolean(mEnableInstantMode);
-        dest.writeInt(mBand);
-        dest.writeParcelable(mSecurityConfig, flags);
     }
 
     public static final @android.annotation.NonNull Creator<PublishConfig> CREATOR = new Creator<PublishConfig>() {
@@ -165,14 +143,9 @@
             int ttlSec = in.readInt();
             boolean enableTerminateNotification = in.readInt() != 0;
             boolean enableRanging = in.readInt() != 0;
-            boolean enableInstantMode = in.readBoolean();
-            int band = in.readInt();
-            WifiAwareDataPathSecurityConfig securityConfig = in
-                    .readParcelable(WifiAwareDataPathSecurityConfig.class.getClassLoader());
 
-            return new PublishConfig(serviceName, ssi, matchFilter, publishType, ttlSec,
-                    enableTerminateNotification, enableRanging, enableInstantMode,
-                    band, securityConfig);
+            return new PublishConfig(serviceName, ssi, matchFilter, publishType,
+                    ttlSec, enableTerminateNotification, enableRanging);
         }
     };
 
@@ -193,17 +166,14 @@
                 && mPublishType == lhs.mPublishType
                 && mTtlSec == lhs.mTtlSec
                 && mEnableTerminateNotification == lhs.mEnableTerminateNotification
-                && mEnableRanging == lhs.mEnableRanging
-                && mEnableInstantMode == lhs.mEnableInstantMode
-                && mBand == lhs.mBand
-                && Objects.equals(mSecurityConfig, lhs.mSecurityConfig);
+                && mEnableRanging == lhs.mEnableRanging;
     }
 
     @Override
     public int hashCode() {
         return Objects.hash(Arrays.hashCode(mServiceName), Arrays.hashCode(mServiceSpecificInfo),
                 Arrays.hashCode(mMatchFilter), mPublishType, mTtlSec, mEnableTerminateNotification,
-                mEnableRanging, mEnableInstantMode, mBand, mSecurityConfig);
+                mEnableRanging);
     }
 
     /**
@@ -226,9 +196,6 @@
         if (mTtlSec < 0) {
             throw new IllegalArgumentException("Invalid ttlSec - must be non-negative");
         }
-        if (mSecurityConfig != null && !mSecurityConfig.isValid()) {
-            throw new IllegalArgumentException("WifiAwareDataPathSecurityConfig is invalid");
-        }
 
         if (characteristics != null) {
             int maxServiceNameLength = characteristics.getMaxServiceNameLength();
@@ -248,18 +215,6 @@
                 throw new IllegalArgumentException(
                         "Match filter longer than supported by device characteristics");
             }
-            if (mEnableInstantMode) {
-                if (SdkLevel.isAtLeastT()
-                        && characteristics.isInstantCommunicationModeSupported()) {
-                    // Valid to use instant communication mode
-                } else {
-                    throw new IllegalArgumentException("instant mode is not supported");
-                }
-            }
-            if (mSecurityConfig != null && (characteristics.getSupportedCipherSuites()
-                    & mSecurityConfig.getCipherSuite()) == 0) {
-                throw new IllegalArgumentException("Unsupported cipher suite");
-            }
         }
 
         if (!rttSupported && mEnableRanging) {
@@ -268,36 +223,6 @@
     }
 
     /**
-     * Check if instant communication mode is enabled for this publish session.
-     * @see Builder#setInstantCommunicationModeEnabled(boolean, int)
-     * @return true for enabled, false otherwise.
-     */
-    public boolean isInstantCommunicationModeEnabled() {
-        return mEnableInstantMode;
-    }
-
-    /**
-     * Get the Wi-FI band for instant communication mode for this publish session
-     * @see Builder#setInstantCommunicationModeEnabled(boolean, int)
-     * @return The Wi-Fi band, one of the {@link WifiScanner#WIFI_BAND_24_GHZ}
-     * or {@link WifiScanner#WIFI_BAND_5_GHZ}. If instant communication mode is not enabled will
-     * return {@link WifiScanner#WIFI_BAND_24_GHZ} as default.
-     */
-    public @WifiScanner.WifiBand int getInstantCommunicationBand() {
-        return mBand;
-    }
-
-    /**
-     * Get the data-path security config for this publish session
-     * @see Builder#setDataPathSecurityConfig(WifiAwareDataPathSecurityConfig)
-     * @return A {@link WifiAwareDataPathSecurityConfig} specified in this config.
-     */
-    @Nullable
-    public WifiAwareDataPathSecurityConfig getSecurityConfig() {
-        return mSecurityConfig;
-    }
-
-    /**
      * Builder used to build {@link PublishConfig} objects.
      */
     public static final class Builder {
@@ -308,9 +233,6 @@
         private int mTtlSec = 0;
         private boolean mEnableTerminateNotification = true;
         private boolean mEnableRanging = false;
-        private boolean mEnableInstantMode = false;
-        private int mBand = WifiScanner.WIFI_BAND_24_GHZ;
-        private WifiAwareDataPathSecurityConfig mSecurityConfig = null;
 
         /**
          * Specify the service name of the publish session. The actual on-air
@@ -463,74 +385,12 @@
         }
 
         /**
-         * Configure whether to enable and use instant communication for this publish session.
-         * Instant communication will speed up service discovery and any data-path set up as part of
-         * this session. Use {@link Characteristics#isInstantCommunicationModeSupported()} to check
-         * if the device supports this feature.
-         *
-         * Note: due to increased power requirements of this mode - it will only remain enabled for
-         * 30 seconds from the time the discovery session is started.
-         *
-         * @param enabled true for enable instant communication mode, default is false.
-         * @param band Either {@link WifiScanner#WIFI_BAND_24_GHZ}
-         *             or {@link WifiScanner#WIFI_BAND_5_GHZ}. When setting to
-         *             {@link WifiScanner#WIFI_BAND_5_GHZ}, device will try to enable instant
-         *             communication mode on 5Ghz, but may fall back to 2.4Ghz due to regulatory
-         *             requirements.
-         * @return the current {@link Builder} builder, enabling chaining of builder methods.
-         */
-        @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-        public @NonNull Builder setInstantCommunicationModeEnabled(boolean enabled,
-                @WifiScanner.WifiBand int band) {
-            if (!SdkLevel.isAtLeastT()) {
-                throw new UnsupportedOperationException();
-            }
-            if (band != WifiScanner.WIFI_BAND_24_GHZ && band != WifiScanner.WIFI_BAND_5_GHZ) {
-                throw new IllegalArgumentException();
-            }
-            mBand = band;
-            mEnableInstantMode = enabled;
-            return this;
-        }
-
-        /**
-         * Configure security config for the Wi-Fi Aware publish session. The security config set
-         * here must be the same as the one used to request Wi-Fi Aware data-path connection using
-         * {@link WifiAwareNetworkSpecifier.Builder#setDataPathSecurityConfig(WifiAwareDataPathSecurityConfig)}.
-         * This security config will create a security identifier (SCID) which contains a PMKID and
-         * transmitted in the publish message. The device which subscribe this session can get this
-         * info by {@link ServiceDiscoveryInfo#getScid()}
-         * This method is optional - if not called, then no security context identifier will be
-         * passed in the publish message, then no security context identifier will be provided in
-         * the {@link ServiceDiscoveryInfo} on the subscriber. Security can still be negotiated
-         * using out-of-band (OOB) mechanisms.
-         *
-         * @param securityConfig The (optional) security config to be used to create security
-         *                       context Identifier
-         * @return the current {@link Builder} builder, enabling chaining of builder methods.
-         */
-        public @NonNull Builder setDataPathSecurityConfig(
-                @NonNull WifiAwareDataPathSecurityConfig securityConfig) {
-            if (securityConfig == null) {
-                throw new IllegalArgumentException("The WifiAwareDataPathSecurityConfig "
-                        + "should be non-null");
-            }
-            if (!securityConfig.isValid()) {
-                throw new IllegalArgumentException("The WifiAwareDataPathSecurityConfig "
-                        + "is invalid");
-            }
-            mSecurityConfig = securityConfig;
-            return this;
-        }
-
-        /**
          * Build {@link PublishConfig} given the current requests made on the
          * builder.
          */
         public PublishConfig build() {
             return new PublishConfig(mServiceName, mServiceSpecificInfo, mMatchFilter, mPublishType,
-                    mTtlSec, mEnableTerminateNotification, mEnableRanging, mEnableInstantMode,
-                    mBand, mSecurityConfig);
+                    mTtlSec, mEnableTerminateNotification, mEnableRanging);
         }
     }
 }
diff --git a/framework/java/android/net/wifi/aware/ServiceDiscoveryInfo.java b/framework/java/android/net/wifi/aware/ServiceDiscoveryInfo.java
deleted file mode 100644
index 3ce1bbf..0000000
--- a/framework/java/android/net/wifi/aware/ServiceDiscoveryInfo.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi.aware;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-
-import java.util.List;
-
-/**
- * An object providing information about a Wi-Fi Aware discovery session with a specific peer.
- * @see DiscoverySessionCallback#onServiceDiscovered(ServiceDiscoveryInfo)
- * @see DiscoverySessionCallback#onServiceDiscoveredWithinRange(ServiceDiscoveryInfo, int)
- */
-public final class ServiceDiscoveryInfo {
-    private final byte[] mServiceSpecificInfo;
-    private final List<byte[]> mMatchFilters;
-    private final int mPeerCipherSuite;
-    private final byte[] mScid;
-    private final PeerHandle mPeerHandle;
-
-    /**
-     * @hide
-     */
-    public ServiceDiscoveryInfo(PeerHandle peerHandle, int peerCipherSuite,
-            @Nullable byte[] serviceSpecificInfo,
-            @NonNull List<byte[]> matchFilter, @Nullable byte[] scid) {
-        mServiceSpecificInfo = serviceSpecificInfo;
-        mMatchFilters = matchFilter;
-        mPeerCipherSuite = peerCipherSuite;
-        mScid = scid;
-        mPeerHandle = peerHandle;
-    }
-
-    /**
-     * Get the peer handle for the peer matching our discovery operation
-     * @return An opaque handle representing the discovered peer.
-     */
-    @NonNull
-    public PeerHandle getPeerHandle() {
-        return mPeerHandle;
-    }
-
-    /**
-     * Get the filter which resulted in this service discovery. For
-     * {@link PublishConfig#PUBLISH_TYPE_UNSOLICITED},
-     * {@link SubscribeConfig#SUBSCRIBE_TYPE_PASSIVE} discovery sessions this is the publisher's
-     * match filter. For {@link PublishConfig#PUBLISH_TYPE_SOLICITED},
-     * {@link SubscribeConfig#SUBSCRIBE_TYPE_ACTIVE} discovery sessions this is the subscriber's
-     * match filter.
-     * @return A list of byte arrays representing the match filter. An empty list if match filter
-     * is not set.
-     */
-    @NonNull
-    public List<byte[]> getMatchFilters() {
-        return mMatchFilters;
-    }
-
-    /**
-     * The service specific information (arbitrary byte array) provided by the peer as part of its
-     * discovery configuration.
-     * @see PublishConfig.Builder#setServiceSpecificInfo(byte[])
-     * @see SubscribeConfig.Builder#setServiceSpecificInfo(byte[])
-     * @return An arbitrary byte array represent the service specific information. {@code null} if
-     * service specific information is not set.
-     */
-    @Nullable
-    public byte[] getServiceSpecificInfo() {
-        return mServiceSpecificInfo;
-    }
-
-    /**
-     * Get the Security context identifier is associate with PMK for data path security config. Only
-     * use for {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_128} and
-     * {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_256} to get the PMKID set by
-     * {@link WifiAwareDataPathSecurityConfig.Builder#setPmkId(byte[])} from publish session.
-     * This can help the Wi-Fi Aware data-path setup to select the correct PMK/PMKID
-     * @return An arbitrary byte array represent the security context identifier. {@code null} if
-     * Security context identifier is not set.
-     */
-    @Nullable
-    public byte[] getScid() {
-        return mScid;
-    }
-
-    /**
-     * Get the cipher suite type specified by the publish session to be used for data-path setup.
-     * @return peerCipherSuite An integer represent the cipher suite used to encrypt the data-path.
-     */
-    public @Characteristics.WifiAwareCipherSuites int getPeerCipherSuite() {
-        return mPeerCipherSuite;
-    }
-}
diff --git a/framework/java/android/net/wifi/aware/SubscribeConfig.java b/framework/java/android/net/wifi/aware/SubscribeConfig.java
index 04a099a..51c6e25 100644
--- a/framework/java/android/net/wifi/aware/SubscribeConfig.java
+++ b/framework/java/android/net/wifi/aware/SubscribeConfig.java
@@ -19,16 +19,10 @@
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.net.wifi.WifiScanner;
 import android.net.wifi.util.HexEncoding;
-import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
 
-import androidx.annotation.RequiresApi;
-
-import com.android.modules.utils.build.SdkLevel;
-
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.nio.charset.StandardCharsets;
@@ -96,15 +90,11 @@
     /** @hide */
     public final int mMaxDistanceMm;
 
-    private final boolean mEnableInstantMode;
-
-    private final int mBand;
-
     /** @hide */
     public SubscribeConfig(byte[] serviceName, byte[] serviceSpecificInfo, byte[] matchFilter,
             int subscribeType, int ttlSec, boolean enableTerminateNotification,
             boolean minDistanceMmSet, int minDistanceMm, boolean maxDistanceMmSet,
-            int maxDistanceMm, boolean enableInstantMode, @WifiScanner.WifiBand int band) {
+            int maxDistanceMm) {
         mServiceName = serviceName;
         mServiceSpecificInfo = serviceSpecificInfo;
         mMatchFilter = matchFilter;
@@ -115,8 +105,6 @@
         mMinDistanceMmSet = minDistanceMmSet;
         mMaxDistanceMm = maxDistanceMm;
         mMaxDistanceMmSet = maxDistanceMmSet;
-        mEnableInstantMode = enableInstantMode;
-        mBand = band;
     }
 
     @Override
@@ -135,9 +123,7 @@
                 + ", mMinDistanceMm=" + mMinDistanceMm
                 + ", mMinDistanceMmSet=" + mMinDistanceMmSet
                 + ", mMaxDistanceMm=" + mMaxDistanceMm
-                + ", mMaxDistanceMmSet=" + mMaxDistanceMmSet + "]"
-                + ", mEnableInstantMode=" + mEnableInstantMode
-                + ", mBand=" + mBand;
+                + ", mMaxDistanceMmSet=" + mMaxDistanceMmSet + "]";
     }
 
     @Override
@@ -157,8 +143,6 @@
         dest.writeInt(mMinDistanceMmSet ? 1 : 0);
         dest.writeInt(mMaxDistanceMm);
         dest.writeInt(mMaxDistanceMmSet ? 1 : 0);
-        dest.writeBoolean(mEnableInstantMode);
-        dest.writeInt(mBand);
     }
 
     public static final @android.annotation.NonNull Creator<SubscribeConfig> CREATOR = new Creator<SubscribeConfig>() {
@@ -179,12 +163,10 @@
             boolean minDistanceMmSet = in.readInt() != 0;
             int maxDistanceMm = in.readInt();
             boolean maxDistanceMmSet = in.readInt() != 0;
-            boolean enableInstantMode = in.readBoolean();
-            int band = in.readInt();
 
             return new SubscribeConfig(serviceName, ssi, matchFilter, subscribeType, ttlSec,
                     enableTerminateNotification, minDistanceMmSet, minDistanceMm, maxDistanceMmSet,
-                    maxDistanceMm, enableInstantMode, band);
+                    maxDistanceMm);
         }
     };
 
@@ -205,9 +187,7 @@
                 lhs.mMatchFilter) && mSubscribeType == lhs.mSubscribeType && mTtlSec == lhs.mTtlSec
                 && mEnableTerminateNotification == lhs.mEnableTerminateNotification
                 && mMinDistanceMmSet == lhs.mMinDistanceMmSet
-                && mMaxDistanceMmSet == lhs.mMaxDistanceMmSet
-                && mEnableInstantMode == lhs.mEnableInstantMode
-                && mBand == lhs.mBand)) {
+                && mMaxDistanceMmSet == lhs.mMaxDistanceMmSet)) {
             return false;
         }
 
@@ -227,7 +207,7 @@
         int result = Objects.hash(Arrays.hashCode(mServiceName),
                 Arrays.hashCode(mServiceSpecificInfo), Arrays.hashCode(mMatchFilter),
                 mSubscribeType, mTtlSec, mEnableTerminateNotification, mMinDistanceMmSet,
-                mMaxDistanceMmSet, mEnableInstantMode, mBand);
+                mMaxDistanceMmSet);
 
         if (mMinDistanceMmSet) {
             result = Objects.hash(result, mMinDistanceMm);
@@ -278,14 +258,6 @@
                 throw new IllegalArgumentException(
                         "Match filter longer than supported by device characteristics");
             }
-            if (mEnableInstantMode) {
-                if (SdkLevel.isAtLeastT()
-                        && characteristics.isInstantCommunicationModeSupported()) {
-                    // Valid to use instant communication mode
-                } else {
-                    throw new IllegalArgumentException("instant mode is not supported");
-                }
-            }
         }
 
         if (mMinDistanceMmSet && mMinDistanceMm < 0) {
@@ -305,26 +277,6 @@
     }
 
     /**
-     * Check if instant mode is enabled for this subscribe session.
-     * @see Builder#setInstantCommunicationModeEnabled(boolean, int)
-     * @return true for enabled, false otherwise.
-     */
-    public boolean isInstantCommunicationModeEnabled() {
-        return mEnableInstantMode;
-    }
-
-    /**
-     * Check if enable instant mode on 5G for this subscribe session
-     * @see Builder#setInstantCommunicationModeEnabled(boolean, int)
-     * @return The Wi-Fi band, one of the {@link WifiScanner#WIFI_BAND_24_GHZ}
-     * or {@link WifiScanner#WIFI_BAND_5_GHZ}. If instant communication mode is not enabled will
-     * return {@link WifiScanner#WIFI_BAND_24_GHZ} as default.
-     */
-    public @WifiScanner.WifiBand int getInstantCommunicationBand() {
-        return mBand;
-    }
-
-    /**
      * Builder used to build {@link SubscribeConfig} objects.
      */
     public static final class Builder {
@@ -338,8 +290,6 @@
         private int mMinDistanceMm;
         private boolean mMaxDistanceMmSet = false;
         private int mMaxDistanceMm;
-        private boolean mEnableInstantMode;
-        private int mBand = WifiScanner.WIFI_BAND_24_GHZ;
 
         /**
          * Specify the service name of the subscribe session. The actual on-air
@@ -535,45 +485,13 @@
         }
 
         /**
-         * Configure whether to enable and use instant communication for this subscribe session.
-         * Instant communication will speed up service discovery and any data-path set up as part of
-         * this session. Use {@link Characteristics#isInstantCommunicationModeSupported()} to check
-         * if the device supports this feature.
-         *
-         * Note: due to increased power requirements of this mode - it will only remain enabled for
-         * 30 seconds from the time the discovery session is started.
-         *
-         * @param enabled true for enable instant communication mode, default is false.
-         * @param band Either {@link WifiScanner#WIFI_BAND_24_GHZ}
-         *             or {@link WifiScanner#WIFI_BAND_5_GHZ}. When setting to
-         *             {@link WifiScanner#WIFI_BAND_5_GHZ}, device will try to enable instant
-         *             communication mode on 5Ghz, but may fall back to 2.4Ghz due to regulatory
-         *             requirements.
-         * @return the current {@link Builder} builder, enabling chaining of builder methods.
-         */
-        @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-        public @NonNull Builder setInstantCommunicationModeEnabled(boolean enabled,
-                @WifiScanner.WifiBand int band) {
-            if (!SdkLevel.isAtLeastT()) {
-                throw new UnsupportedOperationException();
-            }
-            if (band != WifiScanner.WIFI_BAND_24_GHZ && band != WifiScanner.WIFI_BAND_5_GHZ) {
-                throw new IllegalArgumentException();
-            }
-            mBand = band;
-            mEnableInstantMode = enabled;
-            return this;
-        }
-
-        /**
          * Build {@link SubscribeConfig} given the current requests made on the
          * builder.
          */
         public SubscribeConfig build() {
             return new SubscribeConfig(mServiceName, mServiceSpecificInfo, mMatchFilter,
                     mSubscribeType, mTtlSec, mEnableTerminateNotification,
-                    mMinDistanceMmSet, mMinDistanceMm, mMaxDistanceMmSet, mMaxDistanceMm,
-                    mEnableInstantMode, mBand);
+                    mMinDistanceMmSet, mMinDistanceMm, mMaxDistanceMmSet, mMaxDistanceMm);
         }
     }
 }
diff --git a/framework/java/android/net/wifi/aware/WifiAwareChannelInfo.java b/framework/java/android/net/wifi/aware/WifiAwareChannelInfo.java
deleted file mode 100644
index 000830c..0000000
--- a/framework/java/android/net/wifi/aware/WifiAwareChannelInfo.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi.aware;
-
-import android.annotation.IntRange;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiAnnotations;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import androidx.annotation.NonNull;
-
-import java.util.Objects;
-
-/**
- * Wi-Fi Aware data-path channel information. The information can be extracted from the
- * {@link WifiAwareNetworkInfo} using {@link WifiAwareNetworkInfo#getChannelInfoList()} ()}.
- * Wi-Fi Aware data-path channel information includes the channel frequency, bandwidth and num of
- * the spatial streams.
- */
-public final class WifiAwareChannelInfo implements Parcelable {
-    private final int mChannelFreq;
-    private final int mChannelBandwidth;
-    private final int mNumSpatialStreams;
-
-    /** @hide **/
-    public WifiAwareChannelInfo(int channelFreq, int channelBandwidth, int numSpatialStreams) {
-        mChannelFreq = channelFreq;
-        mChannelBandwidth = channelBandwidth;
-        mNumSpatialStreams = numSpatialStreams;
-    }
-
-    /**
-     * Get the channel frequency in MHZ used by the Aware data path
-     * @return An integer represent the frequency of the channel in MHZ.
-     */
-    @IntRange(from = 0)
-    public int getChannelFrequencyMhz() {
-        return mChannelFreq;
-    }
-
-    /**
-     * Get the channel bandwidth used by the Aware data path
-     * @return one of {@link ScanResult#CHANNEL_WIDTH_20MHZ},
-     * {@link ScanResult#CHANNEL_WIDTH_40MHZ},
-     * {@link ScanResult#CHANNEL_WIDTH_80MHZ}, {@link ScanResult#CHANNEL_WIDTH_160MHZ}
-     * or {@link ScanResult #CHANNEL_WIDTH_80MHZ_PLUS_MHZ}.
-     */
-    @IntRange(from = 0)
-    public @WifiAnnotations.ChannelWidth int getChannelBandwidth() {
-        return mChannelBandwidth;
-    }
-
-    /**
-     * Get the number of the spatial streams used by the Aware data path
-     * @return An integer represent number of the spatial streams are using in this channel.
-     */
-    @IntRange(from = 0)
-    public int getSpatialStreamCount() {
-        return mNumSpatialStreams;
-    }
-
-    private WifiAwareChannelInfo(Parcel in) {
-        mChannelFreq = in.readInt();
-        mChannelBandwidth = in.readInt();
-        mNumSpatialStreams = in.readInt();
-    }
-
-    public static final @NonNull Creator<WifiAwareChannelInfo> CREATOR =
-            new Creator<WifiAwareChannelInfo>() {
-                @Override
-                public WifiAwareChannelInfo createFromParcel(Parcel in) {
-                    return new WifiAwareChannelInfo(in);
-                }
-
-                @Override
-                public WifiAwareChannelInfo[] newArray(int size) {
-                    return new WifiAwareChannelInfo[size];
-                }
-            };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeInt(mChannelFreq);
-        dest.writeInt(mChannelBandwidth);
-        dest.writeInt(mNumSpatialStreams);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder builder = new StringBuilder().append("{")
-                .append(".channelFreq = ").append(mChannelFreq)
-                .append(", .channelBandwidth = ").append(mChannelBandwidth)
-                .append(", .numSpatialStreams = ").append(mNumSpatialStreams)
-                .append("}");
-        return builder.toString();
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-
-        if (!(obj instanceof WifiAwareChannelInfo)) {
-            return false;
-        }
-
-        WifiAwareChannelInfo lhs = (WifiAwareChannelInfo) obj;
-        return  mChannelFreq == lhs.mChannelFreq
-                && mChannelBandwidth == lhs.mChannelBandwidth
-                && mNumSpatialStreams == lhs.mNumSpatialStreams;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mChannelFreq, mChannelBandwidth, mNumSpatialStreams);
-    }
-}
diff --git a/framework/java/android/net/wifi/aware/WifiAwareDataPathSecurityConfig.java b/framework/java/android/net/wifi/aware/WifiAwareDataPathSecurityConfig.java
deleted file mode 100644
index 5b0e8a9..0000000
--- a/framework/java/android/net/wifi/aware/WifiAwareDataPathSecurityConfig.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi.aware;
-
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_128;
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_256;
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128;
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256;
-
-import android.annotation.Nullable;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-
-import androidx.annotation.NonNull;
-
-import java.util.Arrays;
-import java.util.Objects;
-
-/**
- * Wi-Fi Aware data-path security config. The config is used with
- * {@link WifiAwareNetworkSpecifier.Builder#setDataPathSecurityConfig(WifiAwareDataPathSecurityConfig)}
- * to request a secure data-path.
- */
-public final class WifiAwareDataPathSecurityConfig implements Parcelable {
-    private final byte[] mPmk;
-    private final String mPassphrase;
-    private final byte[] mPmkId;
-    private final int mCipherSuite;
-
-    /**
-     * Generate a security config with necessary parameters. Use {@link #isValid()} to check before
-     * calling
-     * {@link WifiAwareNetworkSpecifier.Builder#setDataPathSecurityConfig(WifiAwareDataPathSecurityConfig)}
-     * @param passphrase The passphrase to be used to encrypt the link.
-     *                      See {@link Builder#setPskPassphrase(String)}
-     * @param cipherSuite The cipher suite to be used to encrypt the link.
-     *                    See {@link Builder#setCipherSuite(int)}
-     * @param pmk A PMK (pairwise master key, see IEEE 802.11i) specifying the key to use for
-     *            encrypting the data-path. See {@link Builder#setPmk(byte[])}
-     * @param pmkId A PMKID (pairwise master key associated identifier, see IEEE 802.11) is
-     *              generated by Diffie-Hellman key exchange together with a Pairwise Master Key
-     *              (PMK), specifying the identifier associated to the key to use for encrypting
-     *              the data-path. See {@link Builder#setPmkId(byte[])}
-     * @hide
-     */
-    public WifiAwareDataPathSecurityConfig(@Characteristics.WifiAwareCipherSuites int cipherSuite,
-            @Nullable byte[] pmk, @Nullable byte[] pmkId, @Nullable String passphrase) {
-        mCipherSuite = cipherSuite;
-        mPassphrase = passphrase;
-        mPmk = pmk;
-        mPmkId = pmkId;
-    }
-
-    private WifiAwareDataPathSecurityConfig(Parcel in) {
-        mPmk = in.createByteArray();
-        mPassphrase = in.readString();
-        mPmkId = in.createByteArray();
-        mCipherSuite = in.readInt();
-    }
-
-    public static final @NonNull Creator<WifiAwareDataPathSecurityConfig> CREATOR =
-            new Creator<WifiAwareDataPathSecurityConfig>() {
-                @Override
-                public WifiAwareDataPathSecurityConfig createFromParcel(Parcel in) {
-                    return new WifiAwareDataPathSecurityConfig(in);
-                }
-
-                @Override
-                public WifiAwareDataPathSecurityConfig[] newArray(int size) {
-                    return new WifiAwareDataPathSecurityConfig[size];
-                }
-            };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeByteArray(mPmk);
-        dest.writeString(mPassphrase);
-        dest.writeByteArray(mPmkId);
-        dest.writeInt(mCipherSuite);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof WifiAwareDataPathSecurityConfig)) {
-            return false;
-        }
-
-        WifiAwareDataPathSecurityConfig lhs = (WifiAwareDataPathSecurityConfig) obj;
-        return mCipherSuite == lhs.mCipherSuite
-                && Arrays.equals(mPmk, lhs.mPmk)
-                && Objects.equals(mPassphrase, lhs.mPassphrase)
-                && Arrays.equals(mPmkId, lhs.mPmkId);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(Arrays.hashCode(mPmk), mPassphrase, Arrays.hashCode(mPmkId),
-                mCipherSuite);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder("WifiAwareDataPathSecurityConfig [");
-        sb.append("cipherSuite=").append(mCipherSuite)
-                .append(", passphrase=")
-                .append((TextUtils.isEmpty(mPassphrase)) ? "<null>" : "<non-null>")
-                .append(", PMK=")
-                .append((mPmk == null) ? "<null>" : "<non-null>")
-                .append(", PMKID=")
-                .append((mPmkId == null) ? "<null>" : "<non-null>")
-                .append("]");
-        return sb.toString();
-    }
-
-    /**
-     * Check if the security config is valid.
-     * @see Builder#Builder(int)
-     * @return True if it is valid, false otherwise.
-     * @hide
-     */
-    public boolean isValid() {
-        if (mCipherSuite == WIFI_AWARE_CIPHER_SUITE_NCS_SK_128
-                || mCipherSuite == WIFI_AWARE_CIPHER_SUITE_NCS_SK_256) {
-            if (TextUtils.isEmpty(mPassphrase) && mPmk == null) {
-                return false;
-            }
-            if (!TextUtils.isEmpty(mPassphrase) && mPmk != null) {
-                return false;
-            }
-            if (mPmkId != null) {
-                return false;
-            }
-            if (WifiAwareUtils.validatePassphrase(mPassphrase) && mPmk == null) {
-                return true;
-            }
-            return TextUtils.isEmpty(mPassphrase) && WifiAwareUtils.validatePmk(mPmk);
-        } else if (mCipherSuite == WIFI_AWARE_CIPHER_SUITE_NCS_PK_128
-                || mCipherSuite == WIFI_AWARE_CIPHER_SUITE_NCS_PK_256) {
-            if (!WifiAwareUtils.validatePmk(mPmk) || !WifiAwareUtils.validatePmkId(mPmkId)) {
-                return false;
-            }
-            return TextUtils.isEmpty(mPassphrase);
-        }
-        return false;
-    }
-
-    /**
-     * Get the cipher suite specified in this config
-     * @return one of {@code Characteristics#WIFI_AWARE_CIPHER_SUITE_*"}
-     */
-    @Characteristics.WifiAwareCipherSuites
-    public int getCipherSuite() {
-        return mCipherSuite;
-    }
-
-    /**
-     * Get the specified PMK in this config.
-     * @see Builder#setPmk(byte[])
-     * @return A PMK (pairwise master key, see IEEE 802.11i) specifying the key to use for
-     * encrypting the data-path.
-     */
-    public @Nullable byte[] getPmk() {
-        return mPmk;
-    }
-
-    /**
-     * Get the specified PMKID in this config.
-     * @return A PMKID (pairwise master key associated identifier, see IEEE 802.11) is generated
-     * by Diffie-Hellman key exchange together with a Pairwise Master Key.
-     */
-    public @Nullable byte[] getPmkId() {
-        return mPmkId;
-    }
-
-    /**
-     * Get the specified passphrase in this config.
-     * @return The passphrase to be used to encrypt the link.
-     */
-    public @Nullable String getPskPassphrase() {
-        return mPassphrase;
-    }
-
-    /**
-     * A builder class for a Wi-Fi Aware data-path security config to encrypt an Aware connection.
-     */
-    public static final class Builder {
-        private  byte[] mPmk;
-        private  String mPassphrase;
-        private  byte[] mPmkId;
-        private  int mCipherSuite;
-
-        /**
-         * Create a builder for a Wi-Fi Aware data-path security config to encrypt the link with
-         * specified cipher suite. Use {@link Characteristics#getSupportedCipherSuites()} to get the
-         * supported capabilities of the device.
-         * <ul>
-         * <li>For shared key cipher suite
-         * {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_128} and
-         * {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_256}, either passphrase or PMK must
-         * be set.</li>
-         * <li>For public key cipher suite
-         * {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_128} and
-         * {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_256}. Both PMK and PMKID must be
-         * set.</li>
-         * </ul>
-         * @see WifiAwareNetworkSpecifier.Builder#setDataPathSecurityConfig(WifiAwareDataPathSecurityConfig)
-         * @param cipherSuite The cipher suite to be used to encrypt the link. One of the
-         *                    {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_128},
-         *                    {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_256},
-         *                    {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_128} and
-         *                    {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_256}.
-         */
-        public Builder(@Characteristics.WifiAwareCipherSuites int cipherSuite) {
-            if (cipherSuite != WIFI_AWARE_CIPHER_SUITE_NCS_SK_128
-                    && cipherSuite != WIFI_AWARE_CIPHER_SUITE_NCS_SK_256
-                    && cipherSuite != WIFI_AWARE_CIPHER_SUITE_NCS_PK_128
-                    && cipherSuite != WIFI_AWARE_CIPHER_SUITE_NCS_PK_256) {
-                throw new IllegalArgumentException("Invalid cipher suite");
-            }
-            mCipherSuite = cipherSuite;
-        }
-
-        /**
-         * Configure the PSK Passphrase for the Wi-Fi Aware connection being requested. For shared
-         * key cipher suite {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_128} and
-         * {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_256}, either passphrase or PMK must
-         * be set.
-         *
-         * @param pskPassphrase The passphrase to be used to encrypt the link. Alternatively, use
-         *                      the {@link #setPmk(byte[])} to specify a PMK for shared key cipher
-         *                      suite.
-         * @return the current {@link Builder} builder, enabling chaining of builder methods.
-         */
-        public @NonNull Builder setPskPassphrase(@NonNull String pskPassphrase) {
-            if (!WifiAwareUtils.validatePassphrase(pskPassphrase)) {
-                throw new IllegalArgumentException("Passphrase must meet length requirements");
-            }
-            mPassphrase = pskPassphrase;
-            return this;
-        }
-
-        /**
-         * Configure the PMK for the Wi-Fi Aware connection being requested. For shared key cipher
-         * suite {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_128} and
-         * {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_SK_256}, either passphrase or PMK must
-         * be set.
-         * For public key cipher suite {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_128}
-         * and {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_256}. Both PMK and PMKID must
-         * be set.
-         *
-         * @param pmk A PMK (pairwise master key, see IEEE 802.11i) specifying the key to use for
-         *            encrypting the data-path. Alternatively, use the
-         *            {@link #setPskPassphrase(String)} to specify a Passphrase instead for shared
-         *            key cipher suite. Use the {@link #setPmkId(byte[])} together for public key
-         *            cipher suite.
-         * @return the current {@link Builder} builder, enabling chaining of builder
-         *         methods.
-         */
-        public @NonNull Builder setPmk(@NonNull byte[] pmk) {
-            if (!WifiAwareUtils.validatePmk(pmk)) {
-                throw new IllegalArgumentException("PMK must 32 bytes");
-            }
-            mPmk = pmk;
-            return this;
-        }
-
-        /**
-         * Configure the PMKID for the Wi-Fi Aware connection being requested. For public key cipher
-         * suite {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_128} and
-         * {@link Characteristics#WIFI_AWARE_CIPHER_SUITE_NCS_PK_256}. both PMK and PMKID must set
-         * {@link #setPmk(byte[])}
-         *
-         * @param pmkId A PMKID (pairwise master key associated identifier, see IEEE 802.11) is
-         *              generated by Diffie-Hellman key exchange together with a Pairwise Master Key
-         *              (PMK), specifying the identifier associated to the key to use for encrypting
-         *              the data-path. Use the  {@link #setPmk(byte[])} together for public key
-         *              cipher suite.
-         * @return the current {@link Builder} builder, enabling chaining of builder
-         *         methods.
-         */
-        public @NonNull Builder setPmkId(@NonNull byte[] pmkId) {
-            if (!WifiAwareUtils.validatePmkId(pmkId)) {
-                throw new IllegalArgumentException("PMKID must 16 bytes");
-            }
-            mPmkId = pmkId;
-            return this;
-        }
-
-        /**
-         * Create a {@link WifiAwareDataPathSecurityConfig} to set in
-         * {@link WifiAwareNetworkSpecifier.Builder#setDataPathSecurityConfig(WifiAwareDataPathSecurityConfig)} to encrypt the link.
-         * @return A {@link WifiAwareDataPathSecurityConfig} to be used for encrypting the Wi-Fi
-         * Aware data-path.
-         */
-        public @NonNull WifiAwareDataPathSecurityConfig build() {
-            if (mPassphrase != null && mPmk != null) {
-                throw new IllegalStateException(
-                        "Can only specify a Passphrase or a PMK - not both!");
-            }
-            if (mCipherSuite == WIFI_AWARE_CIPHER_SUITE_NCS_SK_128
-                    || mCipherSuite == WIFI_AWARE_CIPHER_SUITE_NCS_SK_256) {
-                if (TextUtils.isEmpty(mPassphrase) && mPmk == null) {
-                    throw new IllegalStateException("Must set either PMK or Passphrase for "
-                            + "shared key cipher suite");
-                }
-                if (mPmkId != null) {
-                    throw new IllegalStateException("PMKID should not set for "
-                            + "shared key cipher suite");
-                }
-            } else {
-                if (mPmk == null || mPmkId == null) {
-                    throw new IllegalStateException("Must set both PMK and PMKID for "
-                            + "public key cipher suite");
-                }
-                if (!TextUtils.isEmpty(mPassphrase)) {
-                    throw new IllegalStateException("Passphrase is not support for public "
-                            + "key cipher suite");
-                }
-            }
-
-            return new WifiAwareDataPathSecurityConfig(mCipherSuite, mPmk, mPmkId, mPassphrase);
-        }
-    }
-}
diff --git a/framework/java/android/net/wifi/aware/WifiAwareManager.java b/framework/java/android/net/wifi/aware/WifiAwareManager.java
index 46dee8e..d25036d 100644
--- a/framework/java/android/net/wifi/aware/WifiAwareManager.java
+++ b/framework/java/android/net/wifi/aware/WifiAwareManager.java
@@ -16,12 +16,6 @@
 
 package android.net.wifi.aware;
 
-import static android.Manifest.permission.ACCESS_FINE_LOCATION;
-import static android.Manifest.permission.ACCESS_WIFI_STATE;
-import static android.Manifest.permission.CHANGE_WIFI_STATE;
-import static android.Manifest.permission.NEARBY_WIFI_DEVICES;
-import static android.Manifest.permission.OVERRIDE_WIFI_CONFIG;
-
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -34,7 +28,6 @@
 import android.net.ConnectivityManager;
 import android.net.NetworkRequest;
 import android.net.NetworkSpecifier;
-import android.net.wifi.WifiManager;
 import android.net.wifi.util.HexEncoding;
 import android.os.Binder;
 import android.os.Build;
@@ -53,7 +46,6 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.ref.WeakReference;
 import java.nio.BufferOverflowException;
-import java.util.Collections;
 import java.util.List;
 
 /**
@@ -139,26 +131,6 @@
     @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
     public static final String ACTION_WIFI_AWARE_STATE_CHANGED =
             "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED";
-    /**
-     * Intent broadcast sent whenever Wi-Fi Aware resource availability has changed. The resources
-     * are attached with the {@link #EXTRA_AWARE_RESOURCES} extra. The resources can also be
-     * obtained using the {@link #getAvailableAwareResources()} method. To receive this broadcast,
-     * apps must hold {@link android.Manifest.permission#ACCESS_WIFI_STATE}.
-     * <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
-     * components will be launched.
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    @RequiresPermission(ACCESS_WIFI_STATE)
-    public static final String ACTION_WIFI_AWARE_RESOURCE_CHANGED =
-            "android.net.wifi.aware.action.WIFI_AWARE_RESOURCE_CHANGED";
-
-    /**
-     * Sent as a part of {@link #ACTION_WIFI_AWARE_RESOURCE_CHANGED} that contains an instance of
-     * {@link AwareResources} representing the current Wi-Fi Aware resources.
-     */
-    public static final String EXTRA_AWARE_RESOURCES =
-            "android.net.wifi.aware.extra.AWARE_RESOURCES";
 
     /** @hide */
     @IntDef({
@@ -225,7 +197,6 @@
      * @return A boolean indicating whether the app can use the Aware API at this time (true) or
      * not (false).
      */
-    @RequiresPermission(ACCESS_WIFI_STATE)
     public boolean isAvailable() {
         try {
             return mService.isUsageEnabled();
@@ -242,7 +213,6 @@
      * @return A boolean indicating whether the device is attached to a cluster at this time (true)
      *         or not (false).
      */
-    @RequiresPermission(ACCESS_WIFI_STATE)
     public boolean isDeviceAttached() {
         try {
             return mService.isDeviceAttached();
@@ -252,36 +222,14 @@
     }
 
     /**
-     * Return the device support for setting a channel requirement in a data-path request. If true
-     * the channel set by
-     * {@link WifiAwareNetworkSpecifier.Builder#setChannelFrequencyMhz(int, boolean)} will be
-     * honored, otherwise it will be ignored.
-     * @return True is the device support set channel on data-path request, false otherwise.
-     */
-    @RequiresPermission(ACCESS_WIFI_STATE)
-    public boolean isSetChannelOnDataPathSupported() {
-        try {
-            return mService.isSetChannelOnDataPathSupported();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
      * Enable the Wifi Aware Instant communication mode. If the device doesn't support this feature
      * calling this API will result no action.
-     * <p>
-     * Note: before {@link android.os.Build.VERSION_CODES#TIRAMISU}, only system app can use this
-     * API. Start with {@link android.os.Build.VERSION_CODES#TIRAMISU} apps hold
-     * {@link android.Manifest.permission#OVERRIDE_WIFI_CONFIG} are allowed to use it.
-     *
      * @see Characteristics#isInstantCommunicationModeSupported()
      * @param enable true for enable, false otherwise.
      * @hide
      */
     @SystemApi
     @RequiresApi(Build.VERSION_CODES.S)
-    @RequiresPermission(allOf = {CHANGE_WIFI_STATE, OVERRIDE_WIFI_CONFIG})
     public void enableInstantCommunicationMode(boolean enable) {
         if (!SdkLevel.isAtLeastS()) {
             throw new UnsupportedOperationException();
@@ -300,7 +248,6 @@
      * @return true if it is enabled, false otherwise.
      */
     @RequiresApi(Build.VERSION_CODES.S)
-    @RequiresPermission(ACCESS_WIFI_STATE)
     public boolean isInstantCommunicationModeEnabled() {
         if (!SdkLevel.isAtLeastS()) {
             throw new UnsupportedOperationException();
@@ -323,7 +270,6 @@
      *
      * @return An object specifying configuration limitations of Aware.
      */
-    @RequiresPermission(ACCESS_WIFI_STATE)
     public @Nullable Characteristics getCharacteristics() {
         try {
             return mService.getCharacteristics();
@@ -343,7 +289,6 @@
      *
      * @return An object specifying the currently available resource of the Wi-Fi Aware service.
      */
-    @RequiresPermission(ACCESS_WIFI_STATE)
     public @Nullable AwareResources getAvailableAwareResources() {
         try {
             return mService.getAvailableAwareResources();
@@ -370,10 +315,6 @@
      * attachCallback} object. If a null is provided then the application's main thread will be
      *                used.
      */
-    @RequiresPermission(allOf = {
-            ACCESS_WIFI_STATE,
-            CHANGE_WIFI_STATE
-    })
     public void attach(@NonNull AttachCallback attachCallback, @Nullable Handler handler) {
         attach(handler, null, attachCallback, null);
     }
@@ -392,22 +333,11 @@
      * <p>
      * This version of the API attaches a listener to receive the MAC address of the Aware interface
      * on startup and whenever it is updated (it is randomized at regular intervals for privacy).
-     *
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * Apps without {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} or
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} can use the
-     * {@link #attach(AttachCallback, Handler)} version.
-     * Note that aside from permission requirements the {@link IdentityChangedListener} will wake up
-     * the host at regular intervals causing higher power consumption, do not use it unless the
-     * information is necessary (e.g. for out-of-band discovery).
+     * The application must have the {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
+     * permission to execute this attach request. Otherwise, use the
+     * {@link #attach(AttachCallback, Handler)} version. Note that aside from permission
+     * requirements this listener will wake up the host at regular intervals causing higher power
+     * consumption, do not use it unless the information is necessary (e.g. for OOB discovery).
      *
      * @param attachCallback A callback for attach events, extended from
      * {@link AttachCallback}.
@@ -417,11 +347,6 @@
      * attachCallback} and {@code identityChangedListener} objects. If a null is provided then the
      *                application's main thread will be used.
      */
-    @RequiresPermission(allOf = {
-            ACCESS_WIFI_STATE,
-            CHANGE_WIFI_STATE,
-            ACCESS_FINE_LOCATION,
-            NEARBY_WIFI_DEVICES}, conditional = true)
     public void attach(@NonNull AttachCallback attachCallback,
             @NonNull IdentityChangedListener identityChangedListener,
             @Nullable Handler handler) {
@@ -447,15 +372,10 @@
 
             try {
                 Binder binder = new Binder();
-                Bundle extras = new Bundle();
-                if (SdkLevel.isAtLeastS()) {
-                    extras.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                            mContext.getAttributionSource());
-                }
                 mService.connect(binder, mContext.getOpPackageName(), mContext.getAttributionTag(),
                         new WifiAwareEventCallbackProxy(this, looper, binder, attachCallback,
                                 identityChangedListener), configRequest,
-                        identityChangedListener != null, extras);
+                        identityChangedListener != null);
             } catch (RemoteException e) {
                 throw e.rethrowFromSystemServer();
             }
@@ -483,15 +403,10 @@
         }
 
         try {
-            Bundle extras = new Bundle();
-            if (SdkLevel.isAtLeastS()) {
-                extras.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                        mContext.getAttributionSource());
-            }
             mService.publish(mContext.getOpPackageName(), mContext.getAttributionTag(), clientId,
                     publishConfig,
                     new WifiAwareDiscoverySessionCallbackProxy(this, looper, true, callback,
-                            clientId), extras);
+                            clientId));
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
@@ -526,15 +441,10 @@
         }
 
         try {
-            Bundle extras = new Bundle();
-            if (SdkLevel.isAtLeastS()) {
-                extras.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                        mContext.getAttributionSource());
-            }
             mService.subscribe(mContext.getOpPackageName(), mContext.getAttributionTag(), clientId,
                     subscribeConfig,
                     new WifiAwareDiscoverySessionCallbackProxy(this, looper, false, callback,
-                            clientId), extras);
+                            clientId));
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
@@ -592,7 +502,7 @@
 
     /** @hide */
     @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
-    public void requestMacAddresses(int uid, int[] peerIds,
+    public void requestMacAddresses(int uid, List<Integer> peerIds,
             IWifiAwareMacAddressProvider callback) {
         try {
             mService.requestMacAddresses(uid, peerIds, callback);
@@ -688,7 +598,6 @@
         private static final int CALLBACK_CONNECT_SUCCESS = 0;
         private static final int CALLBACK_CONNECT_FAIL = 1;
         private static final int CALLBACK_IDENTITY_CHANGED = 2;
-        private static final int CALLBACK_ATTACH_TERMINATE = 3;
 
         private final Handler mHandler;
         private final WeakReference<WifiAwareManager> mAwareManager;
@@ -739,9 +648,6 @@
                                 identityChangedListener.onIdentityChanged((byte[]) msg.obj);
                             }
                             break;
-                        case CALLBACK_ATTACH_TERMINATE:
-                            mAwareManager.clear();
-                            attachCallback.onAwareSessionTerminated();
                     }
                 }
             };
@@ -773,14 +679,6 @@
             msg.obj = mac;
             mHandler.sendMessage(msg);
         }
-
-        @Override
-        public void onAttachTerminate() {
-            if (VDBG) Log.v(TAG, "onAwareSessionTerminated");
-
-            Message msg = mHandler.obtainMessage(CALLBACK_ATTACH_TERMINATE);
-            mHandler.sendMessage(msg);
-        }
     }
 
     private static class WifiAwareDiscoverySessionCallbackProxy extends
@@ -798,8 +696,6 @@
 
         private static final String MESSAGE_BUNDLE_KEY_MESSAGE = "message";
         private static final String MESSAGE_BUNDLE_KEY_MESSAGE2 = "message2";
-        private static final String MESSAGE_BUNDLE_KEY_CIPHER_SUITE = "key_cipher_suite";
-        private static final String MESSAGE_BUNDLE_KEY_SCID = "key_scid";
 
         private final WeakReference<WifiAwareManager> mAwareManager;
         private final boolean mIsPublish;
@@ -853,44 +749,29 @@
                             break;
                         case CALLBACK_MATCH:
                         case CALLBACK_MATCH_WITH_DISTANCE:
+                            {
                             List<byte[]> matchFilter = null;
-                            Bundle data = msg.getData();
-                            byte[] arg = data.getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE2);
+                            byte[] arg = msg.getData().getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE2);
                             try {
                                 matchFilter = new TlvBufferUtils.TlvIterable(0, 1, arg).toList();
                             } catch (BufferOverflowException e) {
-                                matchFilter = Collections.emptyList();
+                                matchFilter = null;
                                 Log.e(TAG, "onServiceDiscovered: invalid match filter byte array '"
                                         + new String(HexEncoding.encode(arg))
                                         + "' - cannot be parsed: e=" + e);
                             }
                             if (msg.what == CALLBACK_MATCH) {
                                 mOriginalCallback.onServiceDiscovered(new PeerHandle(msg.arg1),
-                                        data.getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE),
+                                        msg.getData().getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE),
                                         matchFilter);
-                                mOriginalCallback.onServiceDiscovered(
-                                        new ServiceDiscoveryInfo(
-                                                new PeerHandle(msg.arg1),
-                                                data.getInt(MESSAGE_BUNDLE_KEY_CIPHER_SUITE),
-                                                data.getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE),
-                                                matchFilter,
-                                                data.getByteArray(MESSAGE_BUNDLE_KEY_SCID)));
-
                             } else {
                                 mOriginalCallback.onServiceDiscoveredWithinRange(
                                         new PeerHandle(msg.arg1),
                                         msg.getData().getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE),
                                         matchFilter, msg.arg2);
-                                mOriginalCallback.onServiceDiscoveredWithinRange(
-                                        new ServiceDiscoveryInfo(
-                                                new PeerHandle(msg.arg1),
-                                                data.getInt(MESSAGE_BUNDLE_KEY_CIPHER_SUITE),
-                                                data.getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE),
-                                                matchFilter,
-                                                data.getByteArray(MESSAGE_BUNDLE_KEY_SCID)),
-                                        msg.arg2);
                             }
                             break;
+                        }
                         case CALLBACK_MESSAGE_SEND_SUCCESS:
                             mOriginalCallback.onMessageSendSucceeded(msg.arg1);
                             break;
@@ -947,12 +828,10 @@
         }
 
         private void onMatchCommon(int messageType, int peerId, byte[] serviceSpecificInfo,
-                byte[] matchFilter, int distanceMm, int peerCipherSuite, byte[] scid) {
+                byte[] matchFilter, int distanceMm) {
             Bundle data = new Bundle();
             data.putByteArray(MESSAGE_BUNDLE_KEY_MESSAGE, serviceSpecificInfo);
             data.putByteArray(MESSAGE_BUNDLE_KEY_MESSAGE2, matchFilter);
-            data.putInt(MESSAGE_BUNDLE_KEY_CIPHER_SUITE, peerCipherSuite);
-            data.putByteArray(MESSAGE_BUNDLE_KEY_SCID, scid);
 
             Message msg = mHandler.obtainMessage(messageType);
             msg.arg1 = peerId;
@@ -962,23 +841,21 @@
         }
 
         @Override
-        public void onMatch(int peerId, byte[] serviceSpecificInfo, byte[] matchFilter,
-                int peerCipherSuite, byte[] scid) {
+        public void onMatch(int peerId, byte[] serviceSpecificInfo, byte[] matchFilter) {
             if (VDBG) Log.v(TAG, "onMatch: peerId=" + peerId);
 
-            onMatchCommon(CALLBACK_MATCH, peerId, serviceSpecificInfo, matchFilter, 0,
-                    peerCipherSuite, scid);
+            onMatchCommon(CALLBACK_MATCH, peerId, serviceSpecificInfo, matchFilter, 0);
         }
 
         @Override
         public void onMatchWithDistance(int peerId, byte[] serviceSpecificInfo, byte[] matchFilter,
-                int distanceMm, int peerCipherSuite, byte[] scid) {
+                int distanceMm) {
             if (VDBG) {
                 Log.v(TAG, "onMatchWithDistance: peerId=" + peerId + ", distanceMm=" + distanceMm);
             }
 
             onMatchCommon(CALLBACK_MATCH_WITH_DISTANCE, peerId, serviceSpecificInfo, matchFilter,
-                    distanceMm, peerCipherSuite, scid);
+                    distanceMm);
         }
         @Override
         public void onMatchExpired(int peerId) {
@@ -1064,21 +941,4 @@
             mOriginalCallback.onSessionTerminated();
         }
     }
-
-    /**
-     * Set Wi-Fi Aware protocol parameters.
-     * @hide
-     * @param params An object contain specified parameters. Use {@code null} to remove previously
-     *               set configuration and restore default behavior.
-     */
-    @SystemApi
-    @RequiresPermission(allOf = {OVERRIDE_WIFI_CONFIG,
-            CHANGE_WIFI_STATE})
-    public void setAwareParams(@Nullable AwareParams params) {
-        try {
-            mService.setAwareParams(params);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
 }
diff --git a/framework/java/android/net/wifi/aware/WifiAwareNetworkInfo.java b/framework/java/android/net/wifi/aware/WifiAwareNetworkInfo.java
index d17fe80..c9a1114 100644
--- a/framework/java/android/net/wifi/aware/WifiAwareNetworkInfo.java
+++ b/framework/java/android/net/wifi/aware/WifiAwareNetworkInfo.java
@@ -27,9 +27,6 @@
 import java.net.NetworkInterface;
 import java.net.SocketException;
 import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
 import java.util.Objects;
 
 /**
@@ -53,14 +50,12 @@
     private final Inet6Address mIpv6Addr;
     private final int mPort;
     private final int mTransportProtocol;
-    private final List<WifiAwareChannelInfo> mChannelInfos;
 
     /** @hide */
     public WifiAwareNetworkInfo() {
         mIpv6Addr = null;
         mPort = 0; // a value of 0 is considered invalid
         mTransportProtocol = -1;  // a value of -1 is considered invalid
-        mChannelInfos = Collections.emptyList();
     }
 
     /** @hide */
@@ -68,23 +63,19 @@
         mIpv6Addr = ipv6Addr;
         mPort = 0; // a value of 0 is considered invalid
         mTransportProtocol = -1;  // a value of -1 is considered invalid
-        mChannelInfos = Collections.emptyList();
     }
 
     /** @hide */
-    public WifiAwareNetworkInfo(Inet6Address ipv6Addr, int port, int transportProtocol,
-            List<WifiAwareChannelInfo> channelInfos) {
+    public WifiAwareNetworkInfo(Inet6Address ipv6Addr, int port, int transportProtocol) {
         mIpv6Addr = ipv6Addr;
         mPort = port;
         mTransportProtocol = transportProtocol;
-        mChannelInfos = channelInfos;
     }
 
     private WifiAwareNetworkInfo(@Nullable WifiAwareNetworkInfo source) {
         mIpv6Addr = source != null ? source.mIpv6Addr : null;
         mPort = source != null ? source.mPort : 0;
         mTransportProtocol = source != null ? source.mTransportProtocol : -1;
-        mChannelInfos = source != null ? source.mChannelInfos : Collections.emptyList();
     }
 
     /**
@@ -125,16 +116,6 @@
         return mTransportProtocol;
     }
 
-    /**
-     * Get a list {@link WifiAwareChannelInfo} which is used by this Aware data-path
-     *
-     * @return A list of {@link WifiAwareChannelInfo}
-     */
-    @NonNull
-    public List<WifiAwareChannelInfo> getChannelInfoList() {
-        return mChannelInfos;
-    }
-
     // parcelable methods
 
     @Override
@@ -149,7 +130,6 @@
         dest.writeString(ni == null ? null : ni.getName());
         dest.writeInt(mPort);
         dest.writeInt(mTransportProtocol);
-        dest.writeTypedList(mChannelInfos);
     }
 
     public static final @NonNull Creator<WifiAwareNetworkInfo> CREATOR =
@@ -161,8 +141,6 @@
                     int port = in.readInt();
                     int transportProtocol = in.readInt();
                     Inet6Address ipv6Addr;
-                    List<WifiAwareChannelInfo> channelInfos = new ArrayList<>();
-                    in.readTypedList(channelInfos, WifiAwareChannelInfo.CREATOR);
                     try {
                         NetworkInterface ni = null;
                         if (interfaceName != null) {
@@ -177,8 +155,7 @@
                         e.printStackTrace();
                         return new WifiAwareNetworkInfo();
                     }
-                    return new WifiAwareNetworkInfo(ipv6Addr, port, transportProtocol,
-                            channelInfos);
+                    return new WifiAwareNetworkInfo(ipv6Addr, port, transportProtocol);
                 }
 
                 @Override
@@ -192,11 +169,9 @@
 
     @Override
     public String toString() {
-        return new StringBuilder("AwareNetworkInfo: IPv6=").append(mIpv6Addr)
-                .append(", port=").append(mPort)
-                .append(", transportProtocol=").append(mTransportProtocol)
-                .append(", channelInfos=").append(mChannelInfos)
-                .toString();
+        return new StringBuilder("AwareNetworkInfo: IPv6=").append(mIpv6Addr).append(
+                ", port=").append(mPort).append(", transportProtocol=").append(
+                mTransportProtocol).toString();
     }
 
     /** @hide */
@@ -212,13 +187,12 @@
 
         WifiAwareNetworkInfo lhs = (WifiAwareNetworkInfo) obj;
         return Objects.equals(mIpv6Addr, lhs.mIpv6Addr) && mPort == lhs.mPort
-                && mTransportProtocol == lhs.mTransportProtocol
-                && mChannelInfos.equals(lhs.mChannelInfos);
+                && mTransportProtocol == lhs.mTransportProtocol;
     }
 
     /** @hide */
     @Override
     public int hashCode() {
-        return Objects.hash(mIpv6Addr, mPort, mTransportProtocol, mChannelInfos);
+        return Objects.hash(mIpv6Addr, mPort, mTransportProtocol);
     }
 }
diff --git a/framework/java/android/net/wifi/aware/WifiAwareNetworkSpecifier.java b/framework/java/android/net/wifi/aware/WifiAwareNetworkSpecifier.java
index a1a9b11..423af72 100644
--- a/framework/java/android/net/wifi/aware/WifiAwareNetworkSpecifier.java
+++ b/framework/java/android/net/wifi/aware/WifiAwareNetworkSpecifier.java
@@ -16,12 +16,10 @@
 
 package android.net.wifi.aware;
 
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128;
 import static android.net.wifi.aware.WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR;
 
 import android.annotation.IntRange;
 import android.annotation.NonNull;
-import android.annotation.Nullable;
 import android.net.ConnectivityManager;
 import android.net.Network;
 import android.net.NetworkRequest;
@@ -29,6 +27,7 @@
 import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
+import android.text.TextUtils;
 
 import androidx.annotation.RequiresApi;
 
@@ -152,71 +151,8 @@
      */
     public final int transportProtocol;
 
-    /**
-     * Channel frequency in MHz for setup data-path on.
-     */
-    private final int mChannelInMhz;
-
-    /**
-     * Force to use the specified channel or not. If true, Channel request is specified and must be
-     * respected. If the firmware cannot honor the request then the data-path request is rejected.
-     * Otherwise, requested channel can be overridden by firmware.
-     */
-    private final boolean mForcedChannel;
-
-    private final WifiAwareDataPathSecurityConfig mSecurityConfig;
-
-    /**
-     * Get the specified channel in MHZ for this Wi-Fi Aware network specifier.
-     * @see Builder#setChannelFrequencyMhz(int, boolean)
-     * @return Channel frequency in Mhz. A value of 0 indicates that no channel was specified.
-     */
-    @IntRange(from = 0)
-    public int getChannelFrequencyMhz() {
-        return mChannelInMhz;
-    }
-
-    /**
-     * Check if the specified channel is required to honor or not.
-     * @see Builder#setChannelFrequencyMhz(int, boolean)
-     * @return true if forced to honer, false for recommend to use.
-     */
-    public boolean isChannelRequired() {
-        return mForcedChannel;
-    }
-
-    /**
-     * Get the security config specified in this Network Specifier to encrypt Wi-Fi Aware data-path
-     * @return {@link WifiAwareDataPathSecurityConfig} used to encrypt the data-path
-     */
-    public @Nullable WifiAwareDataPathSecurityConfig getWifiAwareDataPathSecurityConfig() {
-        return mSecurityConfig;
-    }
-
     /** @hide */
     public WifiAwareNetworkSpecifier(int type, int role, int clientId, int sessionId, int peerId,
-            byte[] peerMac, int port, int transportProtocol,
-            int channel, boolean forcedChannel, WifiAwareDataPathSecurityConfig securityConfig) {
-        this.type = type;
-        this.role = role;
-        this.clientId = clientId;
-        this.sessionId = sessionId;
-        this.peerId = peerId;
-        this.peerMac = peerMac;
-        this.port = port;
-        this.transportProtocol = transportProtocol;
-        this.mChannelInMhz = channel;
-        this.mForcedChannel = forcedChannel;
-        this.mSecurityConfig = securityConfig;
-        this.passphrase = securityConfig == null ? null : securityConfig.getPskPassphrase();
-        this.pmk = securityConfig == null ? null : securityConfig.getPmk();
-    }
-
-    /**
-     * TODO(b/214311843): remove this when make SL4A using the public APIs
-     * @hide
-     */
-    public WifiAwareNetworkSpecifier(int type, int role, int clientId, int sessionId, int peerId,
             byte[] peerMac, byte[] pmk, String passphrase, int port, int transportProtocol) {
         this.type = type;
         this.role = role;
@@ -224,19 +160,10 @@
         this.sessionId = sessionId;
         this.peerId = peerId;
         this.peerMac = peerMac;
-        this.port = port;
-        this.transportProtocol = transportProtocol;
-        this.mChannelInMhz = 0;
-        this.mForcedChannel = false;
         this.pmk = pmk;
         this.passphrase = passphrase;
-        if (pmk != null || passphrase != null) {
-            this.mSecurityConfig = new WifiAwareDataPathSecurityConfig(
-                    WIFI_AWARE_CIPHER_SUITE_NCS_SK_128, pmk, null, passphrase
-            );
-        } else {
-            mSecurityConfig = null;
-        }
+        this.port = port;
+        this.transportProtocol = transportProtocol;
     }
 
     public static final @android.annotation.NonNull Creator<WifiAwareNetworkSpecifier> CREATOR =
@@ -244,18 +171,16 @@
                 @Override
                 public WifiAwareNetworkSpecifier createFromParcel(Parcel in) {
                     return new WifiAwareNetworkSpecifier(
-                            in.readInt(), // type
-                            in.readInt(), // role
-                            in.readInt(), // clientId
-                            in.readInt(), // sessionId
-                            in.readInt(), // peerId
-                            in.createByteArray(), // peerMac
-                            in.readInt(), // port
-                            in.readInt(), // transportProtocol
-                            in.readInt(), // channel
-                            in.readBoolean(), // forceChannel
-                            in.readParcelable(WifiAwareDataPathSecurityConfig
-                                    .class.getClassLoader())); // securityConfig
+                        in.readInt(), // type
+                        in.readInt(), // role
+                        in.readInt(), // clientId
+                        in.readInt(), // sessionId
+                        in.readInt(), // peerId
+                        in.createByteArray(), // peerMac
+                        in.createByteArray(), // pmk
+                        in.readString(), // passphrase
+                        in.readInt(), // port
+                        in.readInt()); // transportProtocol
                 }
 
                 @Override
@@ -287,11 +212,10 @@
         dest.writeInt(sessionId);
         dest.writeInt(peerId);
         dest.writeByteArray(peerMac);
+        dest.writeByteArray(pmk);
+        dest.writeString(passphrase);
         dest.writeInt(port);
         dest.writeInt(transportProtocol);
-        dest.writeInt(mChannelInMhz);
-        dest.writeBoolean(mForcedChannel);
-        dest.writeParcelable(mSecurityConfig, flags);
     }
 
     /** @hide */
@@ -308,7 +232,7 @@
     @Override
     public int hashCode() {
         return Objects.hash(type, role, clientId, sessionId, peerId, Arrays.hashCode(peerMac),
-                port, transportProtocol, mChannelInMhz, mForcedChannel, mSecurityConfig);
+                Arrays.hashCode(pmk), passphrase, port, transportProtocol);
     }
 
     /** @hide */
@@ -330,11 +254,10 @@
                 && sessionId == lhs.sessionId
                 && peerId == lhs.peerId
                 && Arrays.equals(peerMac, lhs.peerMac)
+                && Arrays.equals(pmk, lhs.pmk)
+                && Objects.equals(passphrase, lhs.passphrase)
                 && port == lhs.port
-                && transportProtocol == lhs.transportProtocol
-                && mChannelInMhz == lhs.mChannelInMhz
-                && mForcedChannel == lhs.mForcedChannel
-                && Objects.equals(mSecurityConfig, lhs.mSecurityConfig);
+                && transportProtocol == lhs.transportProtocol;
     }
 
     /** @hide */
@@ -349,11 +272,11 @@
                 // masking potential PII (although low impact information)
                 .append(", peerMac=").append((peerMac == null) ? "<null>" : "<non-null>")
                 // masking PII
-                .append(", securityConfig=").append(mSecurityConfig)
-                .append(", port=").append(port)
-                .append(", transportProtocol=").append(transportProtocol)
-                .append(", channel=").append(mChannelInMhz)
-                .append(", forceChannel=").append(mForcedChannel)
+                .append(", pmk=").append((pmk == null) ? "<null>" : "<non-null>")
+                // masking PII
+                .append(", passphrase=").append((passphrase == null) ? "<null>" : "<non-null>")
+                .append(", port=").append(port).append(", transportProtocol=")
+                .append(transportProtocol)
                 .append("]");
         return sb.toString();
     }
@@ -369,9 +292,6 @@
         private byte[] mPmk;
         private int mPort = 0; // invalid value
         private int mTransportProtocol = -1; // invalid value
-        private int mChannel = 0;
-        private boolean mIsRequired = false;
-        private WifiAwareDataPathSecurityConfig mSecurityConfig;
 
         /**
          * Create a builder for {@link WifiAwareNetworkSpecifier} used in requests to set up a
@@ -429,11 +349,6 @@
         /**
          * Configure the PSK Passphrase for the Wi-Fi Aware connection being requested. This method
          * is optional - if not called, then an Open (unencrypted) connection will be created.
-         * Note: Use
-         * {@link #setDataPathSecurityConfig(WifiAwareDataPathSecurityConfig)} to avoid
-         * interoperability issues when devices support different cipher suites by explicitly
-         * specifying a cipher suite as opposed to relying on a default cipher suite.
-         * {@link WifiAwareDataPathSecurityConfig.Builder#Builder(int)}
          *
          * @param pskPassphrase The (optional) passphrase to be used to encrypt the link. Use the
          *                      {@link #setPmk(byte[])} to specify a PMK.
@@ -451,10 +366,6 @@
         /**
          * Configure the PMK for the Wi-Fi Aware connection being requested. This method
          * is optional - if not called, then an Open (unencrypted) connection will be created.
-         * Note: Use
-         * {@link #setDataPathSecurityConfig(WifiAwareDataPathSecurityConfig)} to avoid
-         * interoperability issues when devices support different cipher suites by explicitly
-         * specifying a cipher suite as opposed to relying on a default cipher suite.
          *
          * @param pmk A PMK (pairwise master key, see IEEE 802.11i) specifying the key to use for
          *            encrypting the data-path. Use the {@link #setPskPassphrase(String)} to
@@ -478,7 +389,7 @@
          * <ul>
          *     <li>The server device must be the Publisher device!
          *     <li>The port information can only be specified on secure links, specified using
-         *     {@link #setDataPathSecurityConfig(WifiAwareDataPathSecurityConfig)}
+         *     {@link #setPskPassphrase(String)} or {@link #setPmk(byte[])}.
          * </ul>
          *
          * @param port A positive integer indicating the port to be used for communication.
@@ -501,8 +412,7 @@
          * <ul>
          *     <li>The server device must be the Publisher device!
          *     <li>The transport protocol information can only be specified on secure links,
-         *     specified using
-         *     {@link #setDataPathSecurityConfig(WifiAwareDataPathSecurityConfig)}.
+         *     specified using {@link #setPskPassphrase(String)} or {@link #setPmk(byte[])}.
          * </ul>
          * The transport protocol number is assigned by the Internet Assigned Numbers Authority
          * (IANA) https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml.
@@ -522,50 +432,6 @@
         }
 
         /**
-         * Configure the Channel frequency for the Wi-Fi Aware connection being requested. This
-         * method is optional - if not called, then channelInMhz to use will be decided by firmware.
-         * Only use this when {@link WifiAwareManager#isSetChannelOnDataPathSupported()} is true,
-         * otherwise the set channelInMhz will be ignored.
-         * @param channelInMhz Channel frequency in Mhz.
-         * @param required If set to true, Channel request is specified and must be respected.
-         *               If the firmware cannot honor the request then the data-path request
-         *               is rejected. Otherwise, requested channelInMhz is a recommendation and
-         *               may be overridden by the firmware.
-         * @return the current {@link Builder} builder, enabling chaining of builder methods.
-         */
-        public @NonNull Builder setChannelFrequencyMhz(@IntRange(from = 0) int channelInMhz,
-                boolean required) {
-            mChannel = channelInMhz;
-            mIsRequired = required;
-            return this;
-        }
-
-        /**
-         * Configure security config for the Wi-Fi Aware connection being requested. This method
-         * is optional - if not called, then an Open (unencrypted) connection will be created.
-         * Note: this method is the superset of the {@link #setPmk(byte[])} and
-         * {@link #setPskPassphrase(String)}.
-         *
-         * @param securityConfig The (optional) security config to be used to encrypt the link.
-         * @return the current {@link Builder} builder, enabling chaining of builder
-         *         methods.
-         */
-        public @NonNull Builder setDataPathSecurityConfig(
-                @NonNull WifiAwareDataPathSecurityConfig securityConfig) {
-            if (securityConfig == null) {
-                throw new IllegalArgumentException("The WifiAwareDataPathSecurityConfig "
-                        + "should be non-null");
-            }
-
-            if (!securityConfig.isValid()) {
-                throw new IllegalArgumentException("The WifiAwareDataPathSecurityConfig "
-                        + "is invalid");
-            }
-            mSecurityConfig = securityConfig;
-            return this;
-        }
-
-        /**
          * Create a {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)}
          * for a WiFi Aware connection (link) to the specified peer. The
          * {@link android.net.NetworkRequest.Builder#addTransportType(int)} should be set to
@@ -584,20 +450,10 @@
             if (mDiscoverySession == null) {
                 throw new IllegalStateException("Null discovery session!?");
             }
-            if (mPskPassphrase != null && mPmk != null) {
+            if (mPskPassphrase != null & mPmk != null) {
                 throw new IllegalStateException(
                         "Can only specify a Passphrase or a PMK - not both!");
             }
-            WifiAwareDataPathSecurityConfig securityConfig = mSecurityConfig;
-            if (mPskPassphrase != null || mPmk != null) {
-                if (securityConfig != null) {
-                    throw new IllegalStateException(
-                            "Can only specify a SecurityConfig or a PMK(Passphrase) - not both!");
-                }
-                securityConfig = new WifiAwareDataPathSecurityConfig(
-                        WIFI_AWARE_CIPHER_SUITE_NCS_SK_128, mPmk, null,
-                        mPskPassphrase);
-            }
 
             int role = mDiscoverySession instanceof SubscribeDiscoverySession
                     ? WIFI_AWARE_DATA_PATH_ROLE_INITIATOR
@@ -609,7 +465,7 @@
                             "Port and transport protocol information can only "
                                     + "be specified on the Publisher device (which is the server");
                 }
-                if (securityConfig == null) {
+                if (TextUtils.isEmpty(mPskPassphrase) && mPmk == null) {
                     throw new IllegalStateException("Port and transport protocol information can "
                             + "only be specified on a secure link");
                 }
@@ -620,7 +476,7 @@
 
             return new WifiAwareNetworkSpecifier(type, role, mDiscoverySession.mClientId,
                     mDiscoverySession.mSessionId, mPeerHandle != null ? mPeerHandle.peerId : 0,
-                    null, mPort, mTransportProtocol, mChannel, mIsRequired, securityConfig);
+                    null, mPmk, mPskPassphrase, mPort, mTransportProtocol);
         }
     }
 }
diff --git a/framework/java/android/net/wifi/aware/WifiAwareSession.java b/framework/java/android/net/wifi/aware/WifiAwareSession.java
index fea3084..d31baa9 100644
--- a/framework/java/android/net/wifi/aware/WifiAwareSession.java
+++ b/framework/java/android/net/wifi/aware/WifiAwareSession.java
@@ -16,14 +16,8 @@
 
 package android.net.wifi.aware;
 
-import static android.Manifest.permission.ACCESS_FINE_LOCATION;
-import static android.Manifest.permission.ACCESS_WIFI_STATE;
-import static android.Manifest.permission.CHANGE_WIFI_STATE;
-import static android.Manifest.permission.NEARBY_WIFI_DEVICES;
-
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.annotation.RequiresPermission;
 import android.annotation.SystemApi;
 import android.net.NetworkSpecifier;
 import android.os.Binder;
@@ -142,15 +136,8 @@
      *      An application must use the {@link DiscoverySession#close()} to
      *      terminate the publish discovery session once it isn't needed. This will free
      *      resources as well terminate any on-air transmissions.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
+     * <p>The application must have the {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
+     * permission to start a publish discovery session.
      *
      * @param publishConfig The {@link PublishConfig} specifying the
      *            configuration of the requested publish session.
@@ -159,11 +146,6 @@
      * @param handler The Handler on whose thread to execute the callbacks of the {@code
      * callback} object. If a null is provided then the application's main thread will be used.
      */
-    @RequiresPermission(allOf = {
-            ACCESS_WIFI_STATE,
-            CHANGE_WIFI_STATE,
-            ACCESS_FINE_LOCATION,
-            NEARBY_WIFI_DEVICES}, conditional = true)
     public void publish(@NonNull PublishConfig publishConfig,
             @NonNull DiscoverySessionCallback callback, @Nullable Handler handler) {
         WifiAwareManager mgr = mMgr.get();
@@ -202,15 +184,8 @@
      *      An application must use the {@link DiscoverySession#close()} to
      *      terminate the subscribe discovery session once it isn't needed. This will free
      *      resources as well terminate any on-air transmissions.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
+     * <p>The application must have the {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
+     * permission to start a subscribe discovery session.
      *
      * @param subscribeConfig The {@link SubscribeConfig} specifying the
      *            configuration of the requested subscribe session.
@@ -219,11 +194,6 @@
      * @param handler The Handler on whose thread to execute the callbacks of the {@code
      * callback} object. If a null is provided then the application's main thread will be used.
      */
-    @RequiresPermission(allOf = {
-            ACCESS_WIFI_STATE,
-            CHANGE_WIFI_STATE,
-            ACCESS_FINE_LOCATION,
-            NEARBY_WIFI_DEVICES}, conditional = true)
     public void subscribe(@NonNull SubscribeConfig subscribeConfig,
             @NonNull DiscoverySessionCallback callback, @Nullable Handler handler) {
         WifiAwareManager mgr = mMgr.get();
diff --git a/framework/java/android/net/wifi/aware/WifiAwareUtils.java b/framework/java/android/net/wifi/aware/WifiAwareUtils.java
index 5593a2d..f1db6ed 100644
--- a/framework/java/android/net/wifi/aware/WifiAwareUtils.java
+++ b/framework/java/android/net/wifi/aware/WifiAwareUtils.java
@@ -103,18 +103,4 @@
         }
         return false;
     }
-
-    /**
-     * Validates that the PMKID is a non-null byte array of the right size (16 bytes per spec).
-     *
-     * @param pmkId PMK to test
-     * @return true if PMK is valid, false if not
-     */
-    public static boolean validatePmkId(byte[] pmkId) {
-        if (pmkId == null || pmkId.length != 16) {
-            return false;
-        }
-
-        return true;
-    }
 }
diff --git a/framework/java/android/net/wifi/hotspot2/OsuProvider.java b/framework/java/android/net/wifi/hotspot2/OsuProvider.java
index f0fda13..f0a0607 100644
--- a/framework/java/android/net/wifi/hotspot2/OsuProvider.java
+++ b/framework/java/android/net/wifi/hotspot2/OsuProvider.java
@@ -88,7 +88,7 @@
     /** @hide */
     public OsuProvider(String osuSsid, Map<String, String> friendlyNames,
             String serviceDescription, Uri serverUri, String nai, List<Integer> methodList) {
-        this(WifiSsid.fromBytes(osuSsid.getBytes(StandardCharsets.UTF_8)),
+        this(WifiSsid.createFromByteArray(osuSsid.getBytes(StandardCharsets.UTF_8)),
                 friendlyNames, serviceDescription, serverUri, nai, methodList);
     }
 
diff --git a/framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java b/framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
index 375c9fb..bafa049 100644
--- a/framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
+++ b/framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
@@ -31,7 +31,6 @@
 import android.os.Build;
 import android.os.Bundle;
 import android.os.Parcel;
-import android.os.ParcelUuid;
 import android.os.Parcelable;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
@@ -258,19 +257,12 @@
      * Use Long.MIN_VALUE to indicate unset value.
      */
     private long mSubscriptionExpirationTimeMillis = Long.MIN_VALUE;
-
     /**
-     * Utility method to set the time this subscription will expire. The framework will not attempt
-     * to auto-connect to networks using expired subscriptions.
-     * @param subscriptionExpirationTimeInMillis The expiration time in the format of number of
-     *                                           milliseconds since January 1, 1970, 00:00:00 GMT,
-     *                                           or {@link Long#MIN_VALUE} to unset.
+     * @hide
      */
-    public void setSubscriptionExpirationTimeInMillis(@CurrentTimeMillisLong
-            long subscriptionExpirationTimeInMillis) {
+    public void setSubscriptionExpirationTimeInMillis(long subscriptionExpirationTimeInMillis) {
         mSubscriptionExpirationTimeMillis = subscriptionExpirationTimeInMillis;
     }
-
     /**
      *  Utility method to get the time this subscription will expire. It is in the format of number
      *  of milliseconds since January 1, 1970, 00:00:00 GMT.
@@ -433,8 +425,6 @@
      */
     private int mSubscriptionId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
 
-    private ParcelUuid mSubscriptionGroup = null;
-
     /**
      * Set the carrier ID associated with current configuration.
      * @param carrierId {@code mCarrierId}
@@ -472,22 +462,6 @@
     }
 
     /**
-     * Set the subscription group uuid associated with current configuration.
-     * @hide
-     */
-    public void setSubscriptionGroup(ParcelUuid subscriptionGroup) {
-        this.mSubscriptionGroup = subscriptionGroup;
-    }
-
-    /**
-     * Get the subscription group uuid associated with current configuration.
-     * @hide
-     */
-    public ParcelUuid getSubscriptionGroup() {
-        return this.mSubscriptionGroup;
-    }
-
-    /**
      * The auto-join configuration specifies whether or not the Passpoint Configuration is
      * considered for auto-connection. If true then yes, if false then it isn't considered as part
      * of auto-connection - but can still be manually connected to.
@@ -502,9 +476,9 @@
     private boolean mIsMacRandomizationEnabled = true;
 
     /**
-     * Whether this passpoint configuration should use non-persistent MAC randomization.
+     * Whether this passpoint configuration should use enhanced MAC randomization.
      */
-    private boolean mIsNonPersistentMacRandomizationEnabled = false;
+    private boolean mIsEnhancedMacRandomizationEnabled = false;
 
 
     /**
@@ -572,12 +546,12 @@
      * connections.
      * If set to false (the default), the framework will use the same locally generated MAC address
      * for connections to this passpoint configuration.
-     * @param enabled true to use non-persistent MAC randomization, false to use persistent MAC
+     * @param enabled true to use enhanced MAC randomization, false to use persistent MAC
      *                randomization.
      * @hide
      */
-    public void setNonPersistentMacRandomizationEnabled(boolean enabled) {
-        mIsNonPersistentMacRandomizationEnabled = enabled;
+    public void setEnhancedMacRandomizationEnabled(boolean enabled) {
+        mIsEnhancedMacRandomizationEnabled = enabled;
     }
 
     /**
@@ -631,7 +605,7 @@
     }
 
     /**
-     * When MAC randomization is enabled, this indicates whether non-persistent MAC randomization or
+     * When MAC randomization is enabled, this indicates whether enhanced MAC randomization or
      * persistent MAC randomization will be used for connections to this Passpoint network.
      * If true, the MAC address used for connections will periodically change. Otherwise, the same
      * locally generated MAC will be used for all connections to this passpoint configuration.
@@ -639,8 +613,8 @@
      * @return true for enhanced MAC randomization enabled. False for disabled.
      * @hide
      */
-    public boolean isNonPersistentMacRandomizationEnabled() {
-        return mIsNonPersistentMacRandomizationEnabled;
+    public boolean isEnhancedMacRandomizationEnabled() {
+        return mIsEnhancedMacRandomizationEnabled;
     }
 
     /**
@@ -736,13 +710,12 @@
         mSubscriptionId = source.mSubscriptionId;
         mIsAutojoinEnabled = source.mIsAutojoinEnabled;
         mIsMacRandomizationEnabled = source.mIsMacRandomizationEnabled;
-        mIsNonPersistentMacRandomizationEnabled = source.mIsNonPersistentMacRandomizationEnabled;
+        mIsEnhancedMacRandomizationEnabled = source.mIsEnhancedMacRandomizationEnabled;
         mMeteredOverride = source.mMeteredOverride;
         mIsCarrierMerged = source.mIsCarrierMerged;
         mIsOemPaid = source.mIsOemPaid;
         mIsOemPrivate = source.mIsOemPrivate;
         mDecoratedIdentityPrefix = source.mDecoratedIdentityPrefix;
-        mSubscriptionGroup = source.mSubscriptionGroup;
     }
 
     @Override
@@ -774,14 +747,13 @@
         dest.writeInt(mCarrierId);
         dest.writeBoolean(mIsAutojoinEnabled);
         dest.writeBoolean(mIsMacRandomizationEnabled);
-        dest.writeBoolean(mIsNonPersistentMacRandomizationEnabled);
+        dest.writeBoolean(mIsEnhancedMacRandomizationEnabled);
         dest.writeInt(mMeteredOverride);
         dest.writeInt(mSubscriptionId);
         dest.writeBoolean(mIsCarrierMerged);
         dest.writeBoolean(mIsOemPaid);
         dest.writeBoolean(mIsOemPrivate);
         dest.writeString(mDecoratedIdentityPrefix);
-        dest.writeParcelable(mSubscriptionGroup, flags);
     }
 
     @Override
@@ -818,13 +790,11 @@
                 && mIsCarrierMerged == that.mIsCarrierMerged
                 && mIsAutojoinEnabled == that.mIsAutojoinEnabled
                 && mIsMacRandomizationEnabled == that.mIsMacRandomizationEnabled
-                && mIsNonPersistentMacRandomizationEnabled
-                == that.mIsNonPersistentMacRandomizationEnabled
+                && mIsEnhancedMacRandomizationEnabled == that.mIsEnhancedMacRandomizationEnabled
                 && mMeteredOverride == that.mMeteredOverride
                 && (mServiceFriendlyNames == null ? that.mServiceFriendlyNames == null
                 : mServiceFriendlyNames.equals(that.mServiceFriendlyNames))
-                && Objects.equals(mDecoratedIdentityPrefix, that.mDecoratedIdentityPrefix)
-                && Objects.equals(mSubscriptionGroup, that.mSubscriptionGroup);
+                && Objects.equals(mDecoratedIdentityPrefix, that.mDecoratedIdentityPrefix);
     }
 
     @Override
@@ -834,9 +804,8 @@
                 mSubscriptionExpirationTimeMillis, mUsageLimitUsageTimePeriodInMinutes,
                 mUsageLimitStartTimeInMillis, mUsageLimitDataLimit, mUsageLimitTimeLimitInMinutes,
                 mServiceFriendlyNames, mCarrierId, mIsAutojoinEnabled, mIsMacRandomizationEnabled,
-                mIsNonPersistentMacRandomizationEnabled, mMeteredOverride, mSubscriptionId,
-                mIsCarrierMerged, mIsOemPaid, mIsOemPrivate, mDecoratedIdentityPrefix,
-                mSubscriptionGroup);
+                mIsEnhancedMacRandomizationEnabled, mMeteredOverride, mSubscriptionId,
+                mIsCarrierMerged, mIsOemPaid, mIsOemPrivate, mDecoratedIdentityPrefix);
     }
 
     @Override
@@ -893,14 +862,12 @@
         builder.append("SubscriptionId:" + mSubscriptionId);
         builder.append("IsAutojoinEnabled:" + mIsAutojoinEnabled);
         builder.append("mIsMacRandomizationEnabled:" + mIsMacRandomizationEnabled);
-        builder.append("mIsNonPersistentMacRandomizationEnabled:"
-                + mIsNonPersistentMacRandomizationEnabled);
+        builder.append("mIsEnhancedMacRandomizationEnabled:" + mIsEnhancedMacRandomizationEnabled);
         builder.append("mMeteredOverride:" + mMeteredOverride);
         builder.append("mIsCarrierMerged:" + mIsCarrierMerged);
         builder.append("mIsOemPaid:" + mIsOemPaid);
         builder.append("mIsOemPrivate:" + mIsOemPrivate);
         builder.append("mDecoratedUsernamePrefix:" + mDecoratedIdentityPrefix);
-        builder.append("mSubscriptionGroup:" + mSubscriptionGroup);
         return builder.toString();
     }
 
@@ -1008,14 +975,13 @@
                 config.mCarrierId = in.readInt();
                 config.mIsAutojoinEnabled = in.readBoolean();
                 config.mIsMacRandomizationEnabled = in.readBoolean();
-                config.mIsNonPersistentMacRandomizationEnabled = in.readBoolean();
+                config.mIsEnhancedMacRandomizationEnabled = in.readBoolean();
                 config.mMeteredOverride = in.readInt();
                 config.mSubscriptionId = in.readInt();
                 config.mIsCarrierMerged = in.readBoolean();
                 config.mIsOemPaid = in.readBoolean();
                 config.mIsOemPrivate = in.readBoolean();
                 config.mDecoratedIdentityPrefix = in.readString();
-                config.mSubscriptionGroup = in.readParcelable(null);
 
                 return config;
             }
diff --git a/framework/java/android/net/wifi/p2p/IWifiP2pManager.aidl b/framework/java/android/net/wifi/p2p/IWifiP2pManager.aidl
index f29a9b3..fd89d3b 100644
--- a/framework/java/android/net/wifi/p2p/IWifiP2pManager.aidl
+++ b/framework/java/android/net/wifi/p2p/IWifiP2pManager.aidl
@@ -16,7 +16,6 @@
 
 package android.net.wifi.p2p;
 
-import android.os.Bundle;
 import android.os.Messenger;
 
 /**
@@ -26,11 +25,10 @@
  */
 interface IWifiP2pManager
 {
-    Messenger getMessenger(in IBinder binder, in String packageName, in Bundle extras);
+    Messenger getMessenger(in IBinder binder, in String packageName);
     Messenger getP2pStateMachineMessenger();
     oneway void close(in IBinder binder);
     void setMiracastMode(int mode);
     void checkConfigureWifiDisplayPermission();
-    long getSupportedFeatures();
 }
 
diff --git a/framework/java/android/net/wifi/p2p/WifiP2pConfig.java b/framework/java/android/net/wifi/p2p/WifiP2pConfig.java
index d8658cc..d3a6bac 100644
--- a/framework/java/android/net/wifi/p2p/WifiP2pConfig.java
+++ b/framework/java/android/net/wifi/p2p/WifiP2pConfig.java
@@ -268,14 +268,6 @@
     /**
      * Builder used to build {@link WifiP2pConfig} objects for
      * creating or joining a group.
-     *
-     * The WifiP2pConfig can be constructed for two use-cases:
-     * <ul>
-     * <li>SSID + Passphrase are known: use {@link #setNetworkName(String)} and
-     *   {@link #setPassphrase(String)}.</li>
-     * <li>SSID or Passphrase is unknown, in such a case the MAC address must be known and
-     *   specified using {@link #setDeviceAddress(MacAddress)}.</li>
-     * </ul>
      */
     public static final class Builder {
 
@@ -301,8 +293,6 @@
          * <p>
          *     Optional. "02:00:00:00:00:00" by default.
          *
-         * <p> If the network name is not set, the peer's MAC address is mandatory.
-         *
          * @param deviceAddress the peer's MAC address.
          * @return The builder to facilitate chaining
          *         {@code builder.setXXX(..).setXXX(..)}.
@@ -485,15 +475,13 @@
          * @return {@link WifiP2pConfig} constructed based on builder method calls.
          */
         public @NonNull WifiP2pConfig build() {
-            if ((TextUtils.isEmpty(mNetworkName) && !TextUtils.isEmpty(mPassphrase))
-                    || (!TextUtils.isEmpty(mNetworkName) && TextUtils.isEmpty(mPassphrase))) {
+            if (TextUtils.isEmpty(mNetworkName)) {
                 throw new IllegalStateException(
-                        "network name and passphrase must be non-empty or empty both.");
+                        "network name must be non-empty.");
             }
-            if (TextUtils.isEmpty(mNetworkName)
-                    && mDeviceAddress.equals(MAC_ANY_ADDRESS)) {
+            if (TextUtils.isEmpty(mPassphrase)) {
                 throw new IllegalStateException(
-                        "peer address must be set if network name and pasphrase are not set.");
+                        "passphrase must be non-empty.");
             }
 
             if (mGroupOperatingFrequency > 0 && mGroupOperatingBand > 0) {
diff --git a/framework/java/android/net/wifi/p2p/WifiP2pDevice.java b/framework/java/android/net/wifi/p2p/WifiP2pDevice.java
index 214eb35..ee5b7ff 100644
--- a/framework/java/android/net/wifi/p2p/WifiP2pDevice.java
+++ b/framework/java/android/net/wifi/p2p/WifiP2pDevice.java
@@ -19,7 +19,6 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.compat.annotation.UnsupportedAppUsage;
-import android.net.wifi.ScanResult;
 import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -27,9 +26,6 @@
 
 import com.android.modules.utils.build.SdkLevel;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
 import java.util.Objects;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -135,9 +131,6 @@
     @UnsupportedAppUsage
     public WifiP2pWfdInfo wfdInfo;
 
-    /** This stores vendor-specific information element from the native side. */
-    private List<ScanResult.InformationElement> mVendorElements;
-
     /** Detailed device string pattern with WFD info
      * Example:
      *  P2P-DEVICE-FOUND 00:18:6b:de:a3:6e p2p_dev_addr=00:18:6b:de:a3:6e
@@ -334,32 +327,6 @@
         wfdInfo = device.wfdInfo;
     }
 
-    /**
-     * Set vendor-specific information elements.
-     * @hide
-     */
-    public void setVendorElements(
-            List<ScanResult.InformationElement> vendorElements) {
-        if (vendorElements == null) {
-            mVendorElements = null;
-            return;
-        }
-        mVendorElements = new ArrayList<>(vendorElements);
-    }
-
-    /**
-     * Get the vendor-specific information elements received as part of the discovery
-     * of the peer device.
-     *
-     * @return the list of vendor-specific information elements
-     *         The information element format is defined in the IEEE 802.11-2016 spec
-     *         Table 9-77.
-     */
-    @NonNull public List<ScanResult.InformationElement> getVendorElements() {
-        if (mVendorElements == null) return Collections.emptyList();
-        return new ArrayList<>(mVendorElements);
-    }
-
     @Override
     public boolean equals(Object obj) {
         if (this == obj) return true;
@@ -389,7 +356,6 @@
         sbuf.append("\n devcapab: ").append(deviceCapability);
         sbuf.append("\n status: ").append(status);
         sbuf.append("\n wfdInfo: ").append(wfdInfo);
-        sbuf.append("\n vendorElements: ").append(mVendorElements);
         return sbuf.toString();
     }
 
@@ -413,9 +379,6 @@
             if (source.wfdInfo != null) {
                 wfdInfo = new WifiP2pWfdInfo(source.wfdInfo);
             }
-            if (null != source.mVendorElements) {
-                mVendorElements = new ArrayList<>(source.mVendorElements);
-            }
         }
     }
 
@@ -436,7 +399,6 @@
         } else {
             dest.writeInt(0);
         }
-        dest.writeTypedList(mVendorElements);
     }
 
     /** Implement the Parcelable interface */
@@ -456,8 +418,6 @@
                 if (in.readInt() == 1) {
                     device.wfdInfo = WifiP2pWfdInfo.CREATOR.createFromParcel(in);
                 }
-                device.mVendorElements = in.createTypedArrayList(
-                        ScanResult.InformationElement.CREATOR);
                 return device;
             }
 
diff --git a/framework/java/android/net/wifi/p2p/WifiP2pManager.java b/framework/java/android/net/wifi/p2p/WifiP2pManager.java
index 939495a..cca280d 100644
--- a/framework/java/android/net/wifi/p2p/WifiP2pManager.java
+++ b/framework/java/android/net/wifi/p2p/WifiP2pManager.java
@@ -26,10 +26,7 @@
 import android.annotation.SystemService;
 import android.compat.annotation.UnsupportedAppUsage;
 import android.content.Context;
-import android.net.MacAddress;
 import android.net.NetworkInfo;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiManager;
 import android.net.wifi.WpsInfo;
 import android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceInfo;
 import android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceResponse;
@@ -49,18 +46,13 @@
 import android.text.TextUtils;
 import android.util.CloseGuard;
 import android.util.Log;
-import android.view.Display;
-
-import androidx.annotation.RequiresApi;
 
 import com.android.internal.util.AsyncChannel;
 import com.android.internal.util.Protocol;
-import com.android.modules.utils.build.SdkLevel;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.ref.Reference;
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -153,72 +145,6 @@
 @SystemService(Context.WIFI_P2P_SERVICE)
 public class WifiP2pManager {
     private static final String TAG = "WifiP2pManager";
-
-    /** @hide */
-    public static final long FEATURE_SET_VENDOR_ELEMENTS        = 1L << 0;
-    /** @hide */
-    public static final long FEATURE_FLEXIBLE_DISCOVERY         = 1L << 1;
-    /** @hide */
-    public static final long FEATURE_GROUP_CLIENT_REMOVAL       = 1L << 2;
-
-    /**
-     * Extra for transporting a WifiP2pConfig
-     * @hide
-     */
-    public static final String EXTRA_PARAM_KEY_CONFIG =
-            "android.net.wifi.p2p.EXTRA_PARAM_KEY_CONFIG";
-    /**
-     * Extra for transporting a WifiP2pServiceInfo
-     * @hide
-     */
-    public static final String EXTRA_PARAM_KEY_SERVICE_INFO =
-            "android.net.wifi.p2p.EXTRA_PARAM_KEY_SERVICE_INFO";
-    /**
-     * Extra for transporting a peer discovery frequency.
-     * @hide
-     */
-    public static final String EXTRA_PARAM_KEY_PEER_DISCOVERY_FREQ =
-            "android.net.wifi.p2p.EXTRA_PARAM_KEY_PEER_DISCOVERY_FREQ";
-    /**
-     * Extra for transporting a peer MAC address.
-     * @hide
-     */
-    public static final String EXTRA_PARAM_KEY_PEER_ADDRESS =
-            "android.net.wifi.p2p.EXTRA_PARAM_KEY_PEER_ADDRESS";
-    /**
-     * Extra used to indicate that a message is sent from Wifi internally
-     * @hide
-     */
-    public static final String EXTRA_PARAM_KEY_INTERNAL_MESSAGE =
-            "android.net.wifi.p2p.EXTRA_PARAM_KEY_INTERNAL_MESSAGE";
-
-    /**
-     * Used to communicate the Display ID for multi display devices.
-     * @hide
-     **/
-    public static final String EXTRA_PARAM_KEY_DISPLAY_ID =
-            "android.net.wifi.p2p.EXTRA_PARAM_KEY_DISPLAY_ID";
-
-    /**
-     * Extra for transporting a WifiP2pDevice.
-     * @hide
-     */
-    public static final String EXTRA_PARAM_KEY_DEVICE =
-            "android.net.wifi.p2p.EXTRA_PARAM_KEY_DEVICE";
-    /**
-     * Extra for transporting a WPS PIN.
-     * @hide
-     */
-    public static final String EXTRA_PARAM_KEY_WPS_PIN =
-            "android.net.wifi.p2p.EXTRA_PARAM_KEY_WPS_PIN";
-
-    /**
-     * Extra for transporting vendor-specific information element list
-     * @hide
-     */
-    public static final String EXTRA_PARAM_KEY_INFORMATION_ELEMENT_LIST =
-            "android.net.wifi.p2p.EXTRA_PARAM_KEY_INFORMATION_ELEMENT_LIST";
-
     /**
      * Broadcast intent action to indicate whether Wi-Fi p2p is enabled or disabled. An
      * extra {@link #EXTRA_WIFI_STATE} provides the state information as int.
@@ -268,9 +194,8 @@
      * the details of the group and may contain a {@code null}.
      *
      * All of these permissions are required to receive this broadcast:
-     * {@link android.Manifest.permission#ACCESS_WIFI_STATE} and either
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or
-     * {@link android.Manifest.permission#NEARBY_WIFI_DEVICES}
+     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} and
+     * {@link android.Manifest.permission#ACCESS_WIFI_STATE}
      *
      * @see #EXTRA_WIFI_P2P_INFO
      * @see #EXTRA_NETWORK_INFO
@@ -305,9 +230,8 @@
      * can be sent as a result of peers being found, lost or updated.
      *
      * All of these permissions are required to receive this broadcast:
-     * {@link android.Manifest.permission#ACCESS_WIFI_STATE} and either
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or
-     * {@link android.Manifest.permission#NEARBY_WIFI_DEVICES}
+     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} and
+     * {@link android.Manifest.permission#ACCESS_WIFI_STATE}
      *
      * <p> An extra {@link #EXTRA_P2P_DEVICE_LIST} provides the full list of
      * current peers. The full list of peers can also be obtained any time with
@@ -385,9 +309,8 @@
      * device.
      *
      * All of these permissions are required to receive this broadcast:
-     * {@link android.Manifest.permission#ACCESS_WIFI_STATE} and either
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or
-     * {@link android.Manifest.permission#NEARBY_WIFI_DEVICES}
+     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} and
+     * {@link android.Manifest.permission#ACCESS_WIFI_STATE}
      *
      * @see #EXTRA_WIFI_P2P_DEVICE
      */
@@ -416,31 +339,6 @@
             "android.net.wifi.p2p.action.WIFI_P2P_PERSISTENT_GROUPS_CHANGED";
 
     /**
-     * Broadcast intent action indicating whether or not current connecting
-     * request is accepted.
-     *
-     * The connecting request is initiated by
-     * {@link #connect(Channel, WifiP2pConfig, ActionListener)}.
-     * <p>The {@link #EXTRA_REQUEST_RESPONSE} extra indicates whether or not current
-     * request is accepted or rejected.
-     * <p>The {@link #EXTRA_REQUEST_CONFIG} extra indicates the responsed configuration.
-     */
-    public static final String ACTION_WIFI_P2P_REQUEST_RESPONSE_CHANGED =
-            "android.net.wifi.p2p.action.WIFI_P2P_REQUEST_RESPONSE_CHANGED";
-
-    /**
-     * The lookup key for the result of a request, true if accepted, false otherwise.
-     */
-    public static final String EXTRA_REQUEST_RESPONSE =
-            "android.net.wifi.p2p.extra.REQUEST_RESPONSE";
-
-    /**
-     * The lookup key for the {@link WifiP2pConfig} object of a request.
-     */
-    public static final String EXTRA_REQUEST_CONFIG =
-            "android.net.wifi.p2p.extra.REQUEST_CONFIG";
-
-    /**
      * The lookup key for a handover message returned by the WifiP2pService.
      * @hide
      */
@@ -468,46 +366,6 @@
     public static final String CALLING_BINDER =
             "android.net.wifi.p2p.CALLING_BINDER";
 
-    /**
-     * Run P2P scan on all channels.
-     * @hide
-     */
-    public static final int WIFI_P2P_SCAN_FULL = 0;
-
-    /**
-     * Run P2P scan only on social channels.
-     * @hide
-     */
-    public static final int WIFI_P2P_SCAN_SOCIAL = 1;
-
-    /**
-     * Run P2P scan only on a specific channel.
-     * @hide
-     */
-    public static final int WIFI_P2P_SCAN_SINGLE_FREQ = 2;
-
-    /** @hide */
-    @IntDef(prefix = {"WIFI_P2P_SCAN_"}, value = {
-            WIFI_P2P_SCAN_FULL,
-            WIFI_P2P_SCAN_SOCIAL,
-            WIFI_P2P_SCAN_SINGLE_FREQ})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface WifiP2pScanType {
-    }
-
-    /**
-     * No channel specified for discover Peers APIs. Let lower layer decide the frequencies to scan
-     * based on the WifiP2pScanType.
-     * @hide
-     */
-    public static final int WIFI_P2P_SCAN_FREQ_UNSPECIFIED = 0;
-
-    /**
-     * Maximum length in bytes of all vendor specific information elements (IEs) allowed to
-     * set during Wi-Fi Direct (P2P) discovery.
-     */
-    private static final int WIFI_P2P_VENDOR_ELEMENTS_MAXIMUM_LENGTH = 512;
-
     IWifiP2pManager mService;
 
     private static final int BASE = Protocol.BASE_WIFI_P2P_MANAGER;
@@ -735,45 +593,6 @@
     /** @hide */
     public static final int RESPONSE_DEVICE_INFO                    = BASE + 98;
 
-    /** @hide */
-    public static final int REMOVE_CLIENT                           = BASE + 99;
-    /** @hide */
-    public static final int REMOVE_CLIENT_FAILED                    = BASE + 100;
-    /** @hide */
-    public static final int REMOVE_CLIENT_SUCCEEDED                 = BASE + 101;
-
-    /** @hide */
-    public static final int ADD_EXTERNAL_APPROVER                   = BASE + 102;
-    /** @hide */
-    public static final int EXTERNAL_APPROVER_ATTACH                = BASE + 103;
-    /** @hide */
-    public static final int EXTERNAL_APPROVER_DETACH                = BASE + 104;
-    /** @hide */
-    public static final int EXTERNAL_APPROVER_CONNECTION_REQUESTED  = BASE + 105;
-    /** @hide */
-    public static final int EXTERNAL_APPROVER_PIN_GENERATED         = BASE + 106;
-
-    /** @hide */
-    public static final int REMOVE_EXTERNAL_APPROVER                = BASE + 107;
-    /** @hide */
-    public static final int REMOVE_EXTERNAL_APPROVER_FAILED         = BASE + 108;
-    /** @hide */
-    public static final int REMOVE_EXTERNAL_APPROVER_SUCCEEDED      = BASE + 109;
-
-    /** @hide */
-    public static final int SET_CONNECTION_REQUEST_RESULT           = BASE + 110;
-    /** @hide */
-    public static final int SET_CONNECTION_REQUEST_RESULT_FAILED    = BASE + 111;
-    /** @hide */
-    public static final int SET_CONNECTION_REQUEST_RESULT_SUCCEEDED = BASE + 112;
-
-    /** @hide */
-    public static final int SET_VENDOR_ELEMENTS                       = BASE + 113;
-    /** @hide */
-    public static final int SET_VENDOR_ELEMENTS_FAILED                = BASE + 114;
-    /** @hide */
-    public static final int SET_VENDOR_ELEMENTS_SUCCEEDED             = BASE + 115;
-
     /**
      * Create a new WifiP2pManager instance. Applications use
      * {@link android.content.Context#getSystemService Context.getSystemService()} to retrieve
@@ -1028,126 +847,6 @@
     }
 
     /**
-     * Interface for callback invocation when an incoming request is received.
-     *
-     * This callback is registered by
-     * {@link #addExternalApprover(Channel, MacAddress, ExternalApproverRequestListener)}.
-     */
-    public interface ExternalApproverRequestListener {
-        /**
-         * This device received a negotiation request from another peer.
-         *
-         * Used in {@link #onConnectionRequested(int, WifiP2pConfig, WifiP2pDevice)}.
-         */
-        int REQUEST_TYPE_NEGOTIATION = 0;
-        /**
-         * This device received an invitation request from GO to join the group.
-         *
-         * Used in {@link #onConnectionRequested(int, WifiP2pConfig, WifiP2pDevice)}.
-         */
-        int REQUEST_TYPE_INVITATION = 1;
-        /**
-         * This GO device received a request from a peer to join the group.
-         *
-         * Used in {@link #onConnectionRequested(int, WifiP2pConfig, WifiP2pDevice)}.
-         */
-        int REQUEST_TYPE_JOIN = 2;
-        /** @hide */
-        @IntDef(prefix = {"REQUEST_TYPE__"}, value = {
-            REQUEST_TYPE_NEGOTIATION,
-            REQUEST_TYPE_INVITATION,
-            REQUEST_TYPE_JOIN})
-        @Retention(RetentionPolicy.SOURCE)
-        public @interface RequestType {
-        }
-
-        /**
-         * Detached by a call to
-         * {@link #removeExternalApprover(Channel, MacAddress, ActionListener)}.
-         *
-         * Used in {@link #onDetached(MacAddress, int)}.
-         */
-        int APPROVER_DETACH_REASON_REMOVE = 0;
-        /**
-         * Detached due to a framework failure.
-         *
-         * Used in {@link #onDetached(MacAddress, int)}.
-         */
-        int APPROVER_DETACH_REASON_FAILURE = 1;
-        /**
-         * Detached when a new approver replaces an old one.
-         *
-         * Used in {@link #onDetached(MacAddress, int)}.
-         */
-        int APPROVER_DETACH_REASON_REPLACE = 2;
-        /**
-         * Detached since the {@link WifiP2pManager} channel was closed, e.g.
-         * by using {@link Channel#close()} method.
-         *
-         * Used in {@link #onDetached(MacAddress, int)}.
-         */
-        int APPROVER_DETACH_REASON_CLOSE = 3;
-        /** @hide */
-        @IntDef(prefix = {"APPROVER_DETACH_REASON_"}, value = {
-            APPROVER_DETACH_REASON_REMOVE,
-            APPROVER_DETACH_REASON_FAILURE,
-            APPROVER_DETACH_REASON_REPLACE,
-            APPROVER_DETACH_REASON_CLOSE})
-        @Retention(RetentionPolicy.SOURCE)
-        public @interface ApproverDetachReason {
-        }
-
-        /**
-         * Called when an approver registration via
-         * {@link #addExternalApprover(Channel, MacAddress, ExternalApproverRequestListener)}
-         * is successful.
-         *
-         * @param deviceAddress is the peer MAC address used in the registration.
-         */
-        void onAttached(@NonNull MacAddress deviceAddress);
-        /**
-         * Called when an approver registration via
-         * {@link #addExternalApprover(Channel, MacAddress, ExternalApproverRequestListener)}
-         * has failed.
-         *
-         * @param deviceAddress is the peer MAC address used in the registration.
-         * @param reason is the failure reason.
-         */
-        void onDetached(@NonNull MacAddress deviceAddress, @ApproverDetachReason int reason);
-        /**
-         * Called when there is an incoming connection request
-         * which matches a peer (identified by its {@link MacAddress}) registered by the external
-         * approver through
-         * {@link #addExternalApprover(Channel, MacAddress, ExternalApproverRequestListener)}.
-         * The external approver is expected to follow up with a connection decision using the
-         * {@link #setConnectionRequestResult(Channel, MacAddress, int, ActionListener)} with
-         * {@link #CONNECTION_REQUEST_ACCEPT}, {@link #CONNECTION_REQUEST_REJECT}, or
-         * {@link #CONNECTION_REQUEST_DEFER_TO_SERVICE}.
-         *
-         * @param requestType is one of {@link #REQUEST_TYPE_NEGOTIATION},
-         *        {@link #REQUEST_TYPE_INVITATION}, and {@link #REQUEST_TYPE_JOIN}.
-         * @param config is the peer configuration.
-         * @param device is the peer information.
-         */
-        void onConnectionRequested(
-                @RequestType int requestType, @NonNull WifiP2pConfig config,
-                @NonNull WifiP2pDevice device);
-        /**
-         * Called when a PIN is generated by the WiFi service.
-         *
-         * The external approver can display the PIN, exchange the PIN via Out-Of-Band way
-         * or ask the wifi service to show the PIN as usual using the
-         * {@link #setConnectionRequestResult(Channel, MacAddress, int, ActionListener)}
-         * with {@link #CONNECTION_REQUEST_DEFER_SHOW_PIN_TO_SERVICE}.
-         *
-         * @param deviceAddress is the peer MAC address used in the registration.
-         * @param pin is the WPS PIN.
-         */
-        void onPinGenerated(@NonNull MacAddress deviceAddress, @NonNull String pin);
-    }
-
-
-    /**
      * A channel that connects the application to the Wifi p2p framework.
      * Most p2p operations require a Channel as an argument. An instance of Channel is obtained
      * by doing a call on {@link #initialize}
@@ -1179,14 +878,6 @@
         private final CloseGuard mCloseGuard = new CloseGuard();
 
         /**
-         * Return the binder object.
-         * @hide
-         */
-        public @NonNull Binder getBinder() {
-            return mBinder;
-        }
-
-        /**
          * Close the current P2P connection and indicate to the P2P service that connections
          * created by the app can be removed.
          */
@@ -1233,19 +924,7 @@
 
             @Override
             public void handleMessage(Message message) {
-                Object listener = null;
-                // The listener for an external approver should be
-                // removed after detaching from the service.
-                switch (message.what) {
-                    case EXTERNAL_APPROVER_ATTACH:
-                    case EXTERNAL_APPROVER_CONNECTION_REQUESTED:
-                    case EXTERNAL_APPROVER_PIN_GENERATED:
-                        listener = getListener(message.arg2);
-                        break;
-                    default:
-                        listener = removeListener(message.arg2);
-                        break;
-                }
+                Object listener = getListener(message.arg2);
                 switch (message.what) {
                     case AsyncChannel.CMD_CHANNEL_DISCONNECTED:
                         if (mChannelListener != null) {
@@ -1277,10 +956,6 @@
                     case REPORT_NFC_HANDOVER_FAILED:
                     case FACTORY_RESET_FAILED:
                     case SET_ONGOING_PEER_CONFIG_FAILED:
-                    case REMOVE_CLIENT_FAILED:
-                    case REMOVE_EXTERNAL_APPROVER_FAILED:
-                    case SET_CONNECTION_REQUEST_RESULT_FAILED:
-                    case SET_VENDOR_ELEMENTS_FAILED:
                         if (listener != null) {
                             ((ActionListener) listener).onFailure(message.arg1);
                         }
@@ -1309,10 +984,6 @@
                     case REPORT_NFC_HANDOVER_SUCCEEDED:
                     case FACTORY_RESET_SUCCEEDED:
                     case SET_ONGOING_PEER_CONFIG_SUCCEEDED:
-                    case REMOVE_CLIENT_SUCCEEDED:
-                    case REMOVE_EXTERNAL_APPROVER_SUCCEEDED:
-                    case SET_CONNECTION_REQUEST_RESULT_SUCCEEDED:
-                    case SET_VENDOR_ELEMENTS_SUCCEEDED:
                         if (listener != null) {
                             ((ActionListener) listener).onSuccess();
                         }
@@ -1387,38 +1058,6 @@
                                     .onDeviceInfoAvailable((WifiP2pDevice) message.obj);
                         }
                         break;
-                    case EXTERNAL_APPROVER_ATTACH:
-                        if (listener != null) {
-                            ((ExternalApproverRequestListener) listener)
-                                    .onAttached((MacAddress) message.obj);
-                        }
-                        break;
-                    case EXTERNAL_APPROVER_DETACH:
-                        if (listener != null) {
-                            ((ExternalApproverRequestListener) listener)
-                                    .onDetached((MacAddress) message.obj, message.arg1);
-                        }
-                        break;
-                    case EXTERNAL_APPROVER_CONNECTION_REQUESTED:
-                        if (listener != null) {
-                            int requestType = message.arg1;
-                            Bundle bundle = (Bundle) message.obj;
-                            WifiP2pDevice device = bundle.getParcelable(EXTRA_PARAM_KEY_DEVICE);
-                            WifiP2pConfig config = bundle.getParcelable(EXTRA_PARAM_KEY_CONFIG);
-                            ((ExternalApproverRequestListener) listener)
-                                    .onConnectionRequested(requestType, config, device);
-                        }
-                        break;
-                    case EXTERNAL_APPROVER_PIN_GENERATED:
-                        if (listener != null) {
-                            Bundle bundle = (Bundle) message.obj;
-                            MacAddress deviceAddress = bundle.getParcelable(
-                                    EXTRA_PARAM_KEY_PEER_ADDRESS);
-                            String pin = bundle.getString(EXTRA_PARAM_KEY_WPS_PIN);
-                            ((ExternalApproverRequestListener) listener)
-                                    .onPinGenerated(deviceAddress, pin);
-                        }
-                        break;
                     default:
                         Log.d(TAG, "Ignored " + message);
                         break;
@@ -1482,13 +1121,6 @@
         private Object getListener(int key) {
             if (key == INVALID_LISTENER_KEY) return null;
             synchronized (mListenerMapLock) {
-                return mListenerMap.get(key);
-            }
-        }
-
-        private Object removeListener(int key) {
-            if (key == INVALID_LISTENER_KEY) return null;
-            synchronized (mListenerMapLock) {
                 return mListenerMap.remove(key);
             }
         }
@@ -1524,20 +1156,8 @@
      */
     public Channel initialize(Context srcContext, Looper srcLooper, ChannelListener listener) {
         Binder binder = new Binder();
-        Bundle extras = prepareExtrasBundle(srcContext);
-        int displayId = Display.DEFAULT_DISPLAY;
-        try {
-            Display display = srcContext.getDisplay();
-            if (display != null) {
-                displayId = display.getDisplayId();
-            }
-        } catch (UnsupportedOperationException e) {
-            // an acceptable (per API definition) result of getDisplay - implying there's no display
-            // associated with the context
-        }
-        extras.putInt(EXTRA_PARAM_KEY_DISPLAY_ID, displayId);
         Channel channel = initializeChannel(srcContext, srcLooper, listener,
-                getMessenger(binder, srcContext.getOpPackageName(), extras), binder);
+                getMessenger(binder, srcContext.getOpPackageName()), binder);
         return channel;
     }
 
@@ -1551,21 +1171,6 @@
                 null);
     }
 
-    private Bundle prepareExtrasBundle(Channel c) {
-        Bundle b = prepareExtrasBundle(c.mContext);
-        b.putBinder(CALLING_BINDER, c.getBinder());
-        return b;
-    }
-
-    private Bundle prepareExtrasBundle(Context context) {
-        Bundle bundle = new Bundle();
-        if (SdkLevel.isAtLeastS()) {
-            bundle.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                    context.getAttributionSource());
-        }
-        return bundle;
-    }
-
     private Channel initializeChannel(Context srcContext, Looper srcLooper,
             ChannelListener listener, Messenger messenger, Binder binder) {
         if (messenger == null) return null;
@@ -1577,10 +1182,6 @@
             bundle.putString(CALLING_PACKAGE, c.mContext.getOpPackageName());
             bundle.putString(CALLING_FEATURE_ID, c.mContext.getAttributionTag());
             bundle.putBinder(CALLING_BINDER, binder);
-            if (SdkLevel.isAtLeastT()) {
-                bundle.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                        c.mContext.getAttributionSource());
-            }
             c.mAsyncChannel.sendMessage(UPDATE_CHANNEL_INFO, 0,
                     c.putListener(null), bundle);
             return c;
@@ -1604,124 +1205,15 @@
      * determine when the framework notifies of a change as peers are discovered.
      *
      * <p> Upon receiving a {@link #WIFI_P2P_PEERS_CHANGED_ACTION} intent, an application
-     * can request the list of peers using {@link #requestPeers}.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
+     * can request for the list of peers using {@link #requestPeers}.
      *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callbacks on success or failure. Can be null.
      */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void discoverPeers(Channel channel, ActionListener listener) {
-        checkChannel(channel);
-        Bundle extras = prepareExtrasBundle(channel);
-        channel.mAsyncChannel.sendMessage(DISCOVER_PEERS, WIFI_P2P_SCAN_FULL,
-                channel.putListener(listener), extras);
-    }
-
-    /**
-     * Scan only the social channels.
-     *
-     * A discovery process involves scanning for available Wi-Fi peers
-     * for the purpose of establishing a connection.
-     *
-     * <p> The function call immediately returns after sending a discovery request
-     * to the framework. The application is notified of a success or failure to initiate
-     * discovery through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p> The discovery remains active until a connection is initiated or
-     * a p2p group is formed. Register for {@link #WIFI_P2P_PEERS_CHANGED_ACTION} intent to
-     * determine when the framework notifies of a change as peers are discovered.
-     *
-     * <p> Upon receiving a {@link #WIFI_P2P_PEERS_CHANGED_ACTION} intent, an application
-     * can request the list of peers using {@link #requestPeers}.
-     * <p>
-     * The application must have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     * <p>
-     * Use {@link #isChannelConstrainedDiscoverySupported()} to determine whether the device
-     * supports this feature. If {@link #isChannelConstrainedDiscoverySupported()} return
-     * {@code false} then this method will throw {@link UnsupportedOperationException}.
-     *
-     * @param channel is the channel created at {@link #initialize}
-     * @param listener for callbacks on success or failure.
-     */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void discoverPeersOnSocialChannels(@NonNull Channel channel,
-            @Nullable ActionListener listener) {
-        if (!isChannelConstrainedDiscoverySupported()) {
-            throw new UnsupportedOperationException();
-        }
-        checkChannel(channel);
-        Bundle extras = prepareExtrasBundle(channel);
-        channel.mAsyncChannel.sendMessage(DISCOVER_PEERS, WIFI_P2P_SCAN_SOCIAL,
-                channel.putListener(listener), extras);
-    }
-
-    /**
-     * Scan only a single channel specified by frequency.
-     *
-     * A discovery process involves scanning for available Wi-Fi peers
-     * for the purpose of establishing a connection.
-     *
-     * <p> The function call immediately returns after sending a discovery request
-     * to the framework. The application is notified of a success or failure to initiate
-     * discovery through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p> The discovery remains active until a connection is initiated or
-     * a p2p group is formed. Register for {@link #WIFI_P2P_PEERS_CHANGED_ACTION} intent to
-     * determine when the framework notifies of a change as peers are discovered.
-     *
-     * <p> Upon receiving a {@link #WIFI_P2P_PEERS_CHANGED_ACTION} intent, an application
-     * can request the list of peers using {@link #requestPeers}.
-     * <p>
-     * The application must have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     * <p>
-     * Use {@link #isChannelConstrainedDiscoverySupported()} to determine whether the device
-     * supports this feature. If {@link #isChannelConstrainedDiscoverySupported()} return
-     * {@code false} then this method will throw {@link UnsupportedOperationException}.
-     *
-     * @param channel is the channel created at {@link #initialize}
-     * @param frequencyMhz is the frequency of the channel to use for peer discovery.
-     * @param listener for callbacks on success or failure.
-     */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void discoverPeersOnSpecificFrequency(
-            @NonNull Channel channel, int frequencyMhz, @Nullable ActionListener listener) {
-        if (!isChannelConstrainedDiscoverySupported()) {
-            throw new UnsupportedOperationException();
-        }
-        checkChannel(channel);
-        if (frequencyMhz <= 0) {
-            throw new IllegalArgumentException("This frequency must be a positive value.");
-        }
-        Bundle extras = prepareExtrasBundle(channel);
-        extras.putInt(EXTRA_PARAM_KEY_PEER_DISCOVERY_FREQ, frequencyMhz);
-        channel.mAsyncChannel.sendMessage(DISCOVER_PEERS, WIFI_P2P_SCAN_SINGLE_FREQ,
-                channel.putListener(listener), extras);
+    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
+    public void discoverPeers(Channel c, ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(DISCOVER_PEERS, 0, c.putListener(listener));
     }
 
     /**
@@ -1732,12 +1224,12 @@
      * stop through listener callbacks {@link ActionListener#onSuccess} or
      * {@link ActionListener#onFailure}.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callbacks on success or failure. Can be null.
      */
-    public void stopPeerDiscovery(Channel channel, ActionListener listener) {
-        checkChannel(channel);
-        channel.mAsyncChannel.sendMessage(STOP_DISCOVERY, 0, channel.putListener(listener));
+    public void stopPeerDiscovery(Channel c, ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(STOP_DISCOVERY, 0, c.putListener(listener));
     }
 
     /**
@@ -1748,11 +1240,6 @@
      * connect through listener callbacks {@link ActionListener#onSuccess} or
      * {@link ActionListener#onFailure}.
      *
-     * <p> An app should use {@link WifiP2pConfig.Builder} to build the configuration
-     * for this API, ex. call {@link WifiP2pConfig.Builder#setDeviceAddress(MacAddress)}
-     * to set the peer MAC address and {@link WifiP2pConfig.Builder#enablePersistentMode(boolean)}
-     * to configure the persistent mode.
-     *
      * <p> Register for {@link #WIFI_P2P_CONNECTION_CHANGED_ACTION} intent to
      * determine when the framework notifies of a change in connectivity.
      *
@@ -1762,30 +1249,16 @@
      * <p> If the current device is part of an existing p2p group or has created
      * a p2p group with {@link #createGroup}, an invitation to join the group is sent to
      * the peer device.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
      *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param config options as described in {@link WifiP2pConfig} class
      * @param listener for callbacks on success or failure. Can be null.
      */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void connect(Channel channel, WifiP2pConfig config, ActionListener listener) {
-        checkChannel(channel);
+    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
+    public void connect(Channel c, WifiP2pConfig config, ActionListener listener) {
+        checkChannel(c);
         checkP2pConfig(config);
-        Bundle extras = prepareExtrasBundle(channel);
-        extras.putParcelable(EXTRA_PARAM_KEY_CONFIG, config);
-        channel.mAsyncChannel.sendMessage(CONNECT, 0, channel.putListener(listener), extras);
+        c.mAsyncChannel.sendMessage(CONNECT, 0, c.putListener(listener), config);
     }
 
     /**
@@ -1796,12 +1269,12 @@
      * cancellation through listener callbacks {@link ActionListener#onSuccess} or
      * {@link ActionListener#onFailure}.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callbacks on success or failure. Can be null.
      */
-    public void cancelConnect(Channel channel, ActionListener listener) {
-        checkChannel(channel);
-        channel.mAsyncChannel.sendMessage(CANCEL_CONNECT, 0, channel.putListener(listener));
+    public void cancelConnect(Channel c, ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(CANCEL_CONNECT, 0, c.putListener(listener));
     }
 
     /**
@@ -1819,28 +1292,15 @@
      * {@link ActionListener#onFailure}.
      *
      * <p> Application can request for the group details with {@link #requestGroupInfo}.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
      *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callbacks on success or failure. Can be null.
      */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void createGroup(Channel channel, ActionListener listener) {
-        checkChannel(channel);
-        Bundle extras = prepareExtrasBundle(channel);
-        channel.mAsyncChannel.sendMessage(CREATE_GROUP, WifiP2pGroup.NETWORK_ID_PERSISTENT,
-                channel.putListener(listener), extras);
+    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
+    public void createGroup(Channel c, ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(CREATE_GROUP, WifiP2pGroup.NETWORK_ID_PERSISTENT,
+                c.putListener(listener));
     }
 
     /**
@@ -1862,32 +1322,18 @@
      * {@link ActionListener#onFailure}.
      *
      * <p> Application can request for the group details with {@link #requestGroupInfo}.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
      *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param channel is the channel created at {@link #initialize}.
+     * @param c is the channel created at {@link #initialize}.
      * @param config the configuration of a p2p group.
      * @param listener for callbacks on success or failure. Can be null.
      */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void createGroup(@NonNull Channel channel,
+    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
+    public void createGroup(@NonNull Channel c,
             @Nullable WifiP2pConfig config,
             @Nullable ActionListener listener) {
-        checkChannel(channel);
-        Bundle extras = prepareExtrasBundle(channel);
-        extras.putParcelable(EXTRA_PARAM_KEY_CONFIG, config);
-        channel.mAsyncChannel.sendMessage(CREATE_GROUP, 0,
-                channel.putListener(listener), extras);
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(CREATE_GROUP, 0,
+                c.putListener(listener), config);
     }
 
     /**
@@ -1898,68 +1344,48 @@
      * group removal through listener callbacks {@link ActionListener#onSuccess} or
      * {@link ActionListener#onFailure}.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callbacks on success or failure. Can be null.
      */
-    public void removeGroup(Channel channel, ActionListener listener) {
-        checkChannel(channel);
-        channel.mAsyncChannel.sendMessage(REMOVE_GROUP, 0, channel.putListener(listener));
+    public void removeGroup(Channel c, ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(REMOVE_GROUP, 0, c.putListener(listener));
     }
 
     /**
-     * Force p2p to enter listen state.
+     * Force p2p to enter listen state
      *
-     * When this API is called, this device will periodically enter LISTENING state until
-     * {@link #stopListening(Channel, ActionListener)} or
-     * {@link #stopPeerDiscovery(Channel, ActionListener)} are called.
-     * While in LISTENING state, this device will dwell at its social channel and respond
-     * to probe requests from other Wi-Fi Direct peers.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
+     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}
+     * @param listener for callbacks on success or failure. Can be null.
      *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     * @param channel is the channel created at
-     *    {@link #initialize(Context, Looper, ChannelListener)}
-     * @param listener for callbacks on success or failure.
+     * @hide
      */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void startListening(@NonNull Channel channel, @Nullable ActionListener listener) {
-        checkChannel(channel);
-        Bundle extras = prepareExtrasBundle(channel);
-        channel.mAsyncChannel.sendMessage(START_LISTEN, 0, channel.putListener(listener), extras);
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
+    public void startListening(@NonNull Channel c, @Nullable ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(START_LISTEN, 0, c.putListener(listener));
     }
 
     /**
-     * Force p2p to exit listen state.
+     * Force p2p to exit listen state
      *
-     * When this API is called, this device will stop entering LISTENING state periodically
-     * which is triggered by {@link #startListening(Channel, ActionListener)}.
-     * If there are running peer discovery which is triggered by
-     * {@link #discoverPeers(Channel, ActionListener)} or running service discovery which is
-     * triggered by {@link #discoverServices(Channel, ActionListener)}, they will be stopped
-     * as well.
+     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}
+     * @param listener for callbacks on success or failure. Can be null.
      *
-     * @param channel is the channel created at
-     *    {@link #initialize(Context, Looper, ChannelListener)}
-     * @param listener for callbacks on success or failure.
+     * @hide
      */
-    public void stopListening(@NonNull Channel channel, @Nullable ActionListener listener) {
-        checkChannel(channel);
-        channel.mAsyncChannel.sendMessage(STOP_LISTEN, 0, channel.putListener(listener));
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
+    public void stopListening(@NonNull Channel c, @Nullable ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(STOP_LISTEN, 0, c.putListener(listener));
     }
 
     /**
      * Set P2P listening and operating channel.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listeningChannel the listening channel's Wifi channel number. e.g. 1, 6, 11.
      * @param operatingChannel the operating channel's Wifi channel number. e.g. 1, 6, 11.
      * @param listener for callbacks on success or failure. Can be null.
@@ -1972,14 +1398,13 @@
             android.Manifest.permission.NETWORK_STACK,
             android.Manifest.permission.OVERRIDE_WIFI_CONFIG
     })
-    public void setWifiP2pChannels(@NonNull Channel channel, int listeningChannel,
-            int operatingChannel, @Nullable ActionListener listener) {
-        checkChannel(channel);
+    public void setWifiP2pChannels(@NonNull Channel c, int listeningChannel, int operatingChannel,
+            @Nullable ActionListener listener) {
+        checkChannel(c);
         Bundle p2pChannels = new Bundle();
         p2pChannels.putInt("lc", listeningChannel);
         p2pChannels.putInt("oc", operatingChannel);
-        channel.mAsyncChannel.sendMessage(
-                SET_CHANNEL, 0, channel.putListener(listener), p2pChannels);
+        c.mAsyncChannel.sendMessage(SET_CHANNEL, 0, c.putListener(listener), p2pChannels);
     }
 
     /**
@@ -1993,9 +1418,9 @@
      * @hide
      */
     @UnsupportedAppUsage(trackingBug = 185141982)
-    public void startWps(Channel channel, WpsInfo wps, ActionListener listener) {
-        checkChannel(channel);
-        channel.mAsyncChannel.sendMessage(START_WPS, 0, channel.putListener(listener), wps);
+    public void startWps(Channel c, WpsInfo wps, ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(START_WPS, 0, c.putListener(listener), wps);
     }
 
     /**
@@ -2014,32 +1439,16 @@
      *
      * <p>The service information can be cleared with calls to
      *  {@link #removeLocalService} or {@link #clearLocalServices}.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
      *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param servInfo is a local service information.
      * @param listener for callbacks on success or failure. Can be null.
      */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void addLocalService(Channel channel, WifiP2pServiceInfo servInfo,
-            ActionListener listener) {
-        checkChannel(channel);
+    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
+    public void addLocalService(Channel c, WifiP2pServiceInfo servInfo, ActionListener listener) {
+        checkChannel(c);
         checkServiceInfo(servInfo);
-        Bundle extras = prepareExtrasBundle(channel);
-        extras.putParcelable(EXTRA_PARAM_KEY_SERVICE_INFO, servInfo);
-        channel.mAsyncChannel.sendMessage(
-                ADD_LOCAL_SERVICE, 0, channel.putListener(listener), extras);
+        c.mAsyncChannel.sendMessage(ADD_LOCAL_SERVICE, 0, c.putListener(listener), servInfo);
     }
 
     /**
@@ -2050,16 +1459,15 @@
      * add service through listener callbacks {@link ActionListener#onSuccess} or
      * {@link ActionListener#onFailure}.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param servInfo is the local service information.
      * @param listener for callbacks on success or failure. Can be null.
      */
-    public void removeLocalService(Channel channel, WifiP2pServiceInfo servInfo,
+    public void removeLocalService(Channel c, WifiP2pServiceInfo servInfo,
             ActionListener listener) {
-        checkChannel(channel);
+        checkChannel(c);
         checkServiceInfo(servInfo);
-        channel.mAsyncChannel.sendMessage(
-                REMOVE_LOCAL_SERVICE, 0, channel.putListener(listener), servInfo);
+        c.mAsyncChannel.sendMessage(REMOVE_LOCAL_SERVICE, 0, c.putListener(listener), servInfo);
     }
 
     /**
@@ -2070,12 +1478,12 @@
      * add service through listener callbacks {@link ActionListener#onSuccess} or
      * {@link ActionListener#onFailure}.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callbacks on success or failure. Can be null.
      */
-    public void clearLocalServices(Channel channel, ActionListener listener) {
-        checkChannel(channel);
-        channel.mAsyncChannel.sendMessage(CLEAR_LOCAL_SERVICES, 0, channel.putListener(listener));
+    public void clearLocalServices(Channel c, ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(CLEAR_LOCAL_SERVICES, 0, c.putListener(listener));
     }
 
     /**
@@ -2086,13 +1494,13 @@
      *
      * <p> see {@link #discoverServices} for the detail.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callbacks on receiving service discovery response.
      */
-    public void setServiceResponseListener(Channel channel,
+    public void setServiceResponseListener(Channel c,
             ServiceResponseListener listener) {
-        checkChannel(channel);
-        channel.mServRspListener = listener;
+        checkChannel(c);
+        c.mServRspListener = listener;
     }
 
     /**
@@ -2101,15 +1509,15 @@
      *
      * <p> see {@link #discoverServices} for the detail.
      *
-     * @param channel
+     * @param c
      * @param servListener is for listening to a Bonjour service response
      * @param txtListener is for listening to a Bonjour TXT record response
      */
-    public void setDnsSdResponseListeners(Channel channel,
+    public void setDnsSdResponseListeners(Channel c,
             DnsSdServiceResponseListener servListener, DnsSdTxtRecordListener txtListener) {
-        checkChannel(channel);
-        channel.mDnsSdServRspListener = servListener;
-        channel.mDnsSdTxtListener = txtListener;
+        checkChannel(c);
+        c.mDnsSdServRspListener = servListener;
+        c.mDnsSdTxtListener = txtListener;
     }
 
     /**
@@ -2118,13 +1526,13 @@
      *
      * <p> see {@link #discoverServices} for the detail.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callbacks on receiving service discovery response.
      */
-    public void setUpnpServiceResponseListener(Channel channel,
+    public void setUpnpServiceResponseListener(Channel c,
             UpnpServiceResponseListener listener) {
-        checkChannel(channel);
-        channel.mUpnpServRspListener = listener;
+        checkChannel(c);
+        c.mUpnpServRspListener = listener;
     }
 
     /**
@@ -2142,28 +1550,14 @@
      * <p>The application is notified of the response against the service discovery request
      * through listener callbacks registered by {@link #setServiceResponseListener} or
      * {@link #setDnsSdResponseListeners}, or {@link #setUpnpServiceResponseListener}.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
      *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callbacks on success or failure. Can be null.
      */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void discoverServices(Channel channel, ActionListener listener) {
-        checkChannel(channel);
-        Bundle extras = prepareExtrasBundle(channel);
-        channel.mAsyncChannel.sendMessage(
-                DISCOVER_SERVICES, 0, channel.putListener(listener), extras);
+    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
+    public void discoverServices(Channel c, ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(DISCOVER_SERVICES, 0, c.putListener(listener));
     }
 
     /**
@@ -2181,16 +1575,16 @@
      * {@link #removeServiceRequest(Channel, WifiP2pServiceRequest, ActionListener)} or
      * {@link #clearServiceRequests(Channel, ActionListener)}.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param req is the service discovery request.
      * @param listener for callbacks on success or failure. Can be null.
      */
-    public void addServiceRequest(Channel channel,
+    public void addServiceRequest(Channel c,
             WifiP2pServiceRequest req, ActionListener listener) {
-        checkChannel(channel);
+        checkChannel(c);
         checkServiceRequest(req);
-        channel.mAsyncChannel.sendMessage(ADD_SERVICE_REQUEST, 0,
-                channel.putListener(listener), req);
+        c.mAsyncChannel.sendMessage(ADD_SERVICE_REQUEST, 0,
+                c.putListener(listener), req);
     }
 
     /**
@@ -2201,16 +1595,16 @@
      * add service through listener callbacks {@link ActionListener#onSuccess} or
      * {@link ActionListener#onFailure}.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param req is the service discovery request.
      * @param listener for callbacks on success or failure. Can be null.
      */
-    public void removeServiceRequest(Channel channel, WifiP2pServiceRequest req,
+    public void removeServiceRequest(Channel c, WifiP2pServiceRequest req,
             ActionListener listener) {
-        checkChannel(channel);
+        checkChannel(c);
         checkServiceRequest(req);
-        channel.mAsyncChannel.sendMessage(REMOVE_SERVICE_REQUEST, 0,
-                channel.putListener(listener), req);
+        c.mAsyncChannel.sendMessage(REMOVE_SERVICE_REQUEST, 0,
+                c.putListener(listener), req);
     }
 
     /**
@@ -2221,82 +1615,54 @@
      * or failure to add service through listener callbacks {@link ActionListener#onSuccess} or
      * {@link ActionListener#onFailure}.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callbacks on success or failure. Can be null.
      */
-    public void clearServiceRequests(Channel channel, ActionListener listener) {
-        checkChannel(channel);
-        channel.mAsyncChannel.sendMessage(CLEAR_SERVICE_REQUESTS,
-                0, channel.putListener(listener));
+    public void clearServiceRequests(Channel c, ActionListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(CLEAR_SERVICE_REQUESTS,
+                0, c.putListener(listener));
     }
 
     /**
      * Request the current list of peers.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
      *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callback when peer list is available. Can be null.
      */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void requestPeers(Channel channel, PeerListListener listener) {
-        checkChannel(channel);
-        Bundle extras = prepareExtrasBundle(channel);
-        channel.mAsyncChannel.sendMessage(REQUEST_PEERS, 0, channel.putListener(listener), extras);
+    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
+    public void requestPeers(Channel c, PeerListListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(REQUEST_PEERS, 0, c.putListener(listener));
     }
 
     /**
      * Request device connection info.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callback when connection info is available. Can be null.
      */
-    public void requestConnectionInfo(Channel channel, ConnectionInfoListener listener) {
-        checkChannel(channel);
-        channel.mAsyncChannel.sendMessage(
-                REQUEST_CONNECTION_INFO, 0, channel.putListener(listener));
+    public void requestConnectionInfo(Channel c, ConnectionInfoListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(REQUEST_CONNECTION_INFO, 0, c.putListener(listener));
     }
 
     /**
      * Request p2p group info.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
      *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callback when group info is available. Can be null.
      */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
-    public void requestGroupInfo(Channel channel, GroupInfoListener listener) {
-        checkChannel(channel);
-        Bundle extras = prepareExtrasBundle(channel);
-        channel.mAsyncChannel.sendMessage(
-                REQUEST_GROUP_INFO, 0, channel.putListener(listener), extras);
+    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
+    public void requestGroupInfo(Channel c, GroupInfoListener listener) {
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(REQUEST_GROUP_INFO, 0, c.putListener(listener));
     }
 
     /**
      * Set p2p device name.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callback when group info is available. Can be null.
      *
      * @hide
@@ -2307,18 +1673,18 @@
             android.Manifest.permission.NETWORK_STACK,
             android.Manifest.permission.OVERRIDE_WIFI_CONFIG
     })
-    public void setDeviceName(@NonNull Channel channel, @NonNull String devName,
+    public void setDeviceName(@NonNull Channel c, @NonNull String devName,
             @Nullable ActionListener listener) {
-        checkChannel(channel);
+        checkChannel(c);
         WifiP2pDevice d = new WifiP2pDevice();
         d.deviceName = devName;
-        channel.mAsyncChannel.sendMessage(SET_DEVICE_NAME, 0, channel.putListener(listener), d);
+        c.mAsyncChannel.sendMessage(SET_DEVICE_NAME, 0, c.putListener(listener), d);
     }
 
     /**
      * Set Wifi Display information.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param wfdInfo the Wifi Display information to set
      * @param listener for callbacks on success or failure. Can be null.
      *
@@ -2326,53 +1692,23 @@
      */
     @SystemApi
     @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY)
-    public void setWfdInfo(@NonNull Channel channel, @NonNull WifiP2pWfdInfo wfdInfo,
+    public void setWfdInfo(@NonNull Channel c, @NonNull WifiP2pWfdInfo wfdInfo,
             @Nullable ActionListener listener) {
-        setWFDInfo(channel, wfdInfo, listener);
+        setWFDInfo(c, wfdInfo, listener);
     }
 
     /** @hide */
     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
     @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY)
-    public void setWFDInfo(@NonNull Channel channel, @NonNull WifiP2pWfdInfo wfdInfo,
+    public void setWFDInfo(@NonNull Channel c, @NonNull WifiP2pWfdInfo wfdInfo,
             @Nullable ActionListener listener) {
-        checkChannel(channel);
+        checkChannel(c);
         try {
             mService.checkConfigureWifiDisplayPermission();
         } catch (RemoteException e) {
             e.rethrowFromSystemServer();
         }
-        channel.mAsyncChannel.sendMessage(SET_WFD_INFO, 0, channel.putListener(listener), wfdInfo);
-    }
-
-    /**
-     * Remove the client with the MAC address from the group.
-     *
-     * <p> The function call immediately returns after sending a client removal request
-     * to the framework. The application is notified of a success or failure to initiate
-     * client removal through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p> The callbacks are triggered on the thread specified when initializing the
-     * {@code channel}, see {@link #initialize}.
-     * <p>
-     * Use {@link #isGroupClientRemovalSupported()} to determine whether the device supports
-     * this feature. If {@link #isGroupClientRemovalSupported()} return {@code false} then this
-     * method will throw {@link UnsupportedOperationException}.
-     *
-     * @param channel is the channel created at {@link #initialize}
-     * @param peerAddress MAC address of the client.
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void removeClient(@NonNull Channel channel, @NonNull MacAddress peerAddress,
-            @Nullable ActionListener listener) {
-        if (!isGroupClientRemovalSupported()) {
-            throw new UnsupportedOperationException();
-        }
-        checkChannel(channel);
-        channel.mAsyncChannel.sendMessage(
-                REMOVE_CLIENT, 0, channel.putListener(listener), peerAddress);
+        c.mAsyncChannel.sendMessage(SET_WFD_INFO, 0, c.putListener(listener), wfdInfo);
     }
 
 
@@ -2388,7 +1724,7 @@
      * {@link #requestPersistentGroupInfo(Channel, PersistentGroupInfoListener)} and
      *  a network id can be obtained by {@link WifiP2pGroup#getNetworkId()}.
      *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param netId the network id of the p2p group.
      * @param listener for callbacks on success or failure. Can be null.
      *
@@ -2400,44 +1736,30 @@
             android.Manifest.permission.NETWORK_STACK,
             android.Manifest.permission.OVERRIDE_WIFI_CONFIG
     })
-    public void deletePersistentGroup(@NonNull Channel channel, int netId,
+    public void deletePersistentGroup(@NonNull Channel c, int netId,
             @Nullable ActionListener listener) {
-        checkChannel(channel);
-        channel.mAsyncChannel.sendMessage(
-                DELETE_PERSISTENT_GROUP, netId, channel.putListener(listener));
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(DELETE_PERSISTENT_GROUP, netId, c.putListener(listener));
     }
 
     /**
      * Request a list of all the persistent p2p groups stored in system.
      *
-     * <p>The caller must have one of {@link android.Manifest.permission.NETWORK_SETTINGS},
-     * {@link android.Manifest.permission.NETWORK_STACK}, and
-     * {@link android.Manifest.permission.READ_WIFI_CREDENTIAL}.
-     *
-     * <p>If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later,
-     * the application must have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param channel is the channel created at {@link #initialize}
+     * @param c is the channel created at {@link #initialize}
      * @param listener for callback when persistent group info list is available. Can be null.
      *
      * @hide
      */
     @SystemApi
-    @RequiresPermission(allOf = {
+    @RequiresPermission(anyOf = {
             android.Manifest.permission.NETWORK_SETTINGS,
             android.Manifest.permission.NETWORK_STACK,
-            android.Manifest.permission.READ_WIFI_CREDENTIAL,
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION}, conditional = true)
-    public void requestPersistentGroupInfo(@NonNull Channel channel,
+            android.Manifest.permission.READ_WIFI_CREDENTIAL
+    })
+    public void requestPersistentGroupInfo(@NonNull Channel c,
             @Nullable PersistentGroupInfoListener listener) {
-        checkChannel(channel);
-        Bundle extras = prepareExtrasBundle(channel);
-        channel.mAsyncChannel.sendMessage(
-                REQUEST_PERSISTENT_GROUP_INFO, 0, channel.putListener(listener), extras);
+        checkChannel(c);
+        c.mAsyncChannel.sendMessage(REQUEST_PERSISTENT_GROUP_INFO, 0, c.putListener(listener));
     }
 
     /** @hide */
@@ -2468,40 +1790,6 @@
     public static final int MIRACAST_SINK     = 2;
 
     /**
-     * Accept the incoming request.
-     *
-     * Used in {@link #setConnectionRequestResult(Channel, MacAddress, int, ActionListener)}.
-     */
-    public static final int CONNECTION_REQUEST_ACCEPT = 0;
-    /**
-     * Reject the incoming request.
-     *
-     * Used in {@link #setConnectionRequestResult(Channel, MacAddress, int, ActionListener)}.
-     */
-    public static final int CONNECTION_REQUEST_REJECT = 1;
-    /**
-     * Defer the decision back to the Wi-Fi service (which will display a dialog to the user).
-     *
-     * Used in {@link #setConnectionRequestResult(Channel, MacAddress, int, ActionListener)}.
-     */
-    public static final int CONNECTION_REQUEST_DEFER_TO_SERVICE = 2;
-    /**
-     * Defer the PIN display to the Wi-Fi service (which will display a dialog to the user).
-     *
-     * Used in {@link #setConnectionRequestResult(Channel, MacAddress, int, ActionListener)}.
-     */
-    public static final int CONNECTION_REQUEST_DEFER_SHOW_PIN_TO_SERVICE = 3;
-    /** @hide */
-    @IntDef(prefix = {"CONNECTION_REQUEST_"}, value = {
-        CONNECTION_REQUEST_ACCEPT,
-        CONNECTION_REQUEST_REJECT,
-        CONNECTION_REQUEST_DEFER_TO_SERVICE,
-        CONNECTION_REQUEST_DEFER_SHOW_PIN_TO_SERVICE})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface ConnectionRequestResponse {
-    }
-
-    /**
      * This is used to provide information to drivers to optimize performance depending
      * on the current mode of operation.
      * {@link #MIRACAST_DISABLED} - disabled
@@ -2526,16 +1814,29 @@
         }
     }
 
-    private Messenger getMessenger(@NonNull Binder binder, @Nullable String packageName,
-            @NonNull Bundle extras) {
+    private Messenger getMessenger(@NonNull Binder binder, @Nullable String packageName) {
         try {
-            return mService.getMessenger(binder, packageName, extras);
+            return mService.getMessenger(binder, packageName);
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
     }
 
     /**
+     * Get a reference to WifiP2pService handler. This is used to establish
+     * an AsyncChannel communication with WifiService
+     *
+     * @param binder A binder for the service to associate with this client.
+     *
+     * @return Messenger pointing to the WifiP2pService handler
+     * @hide
+     */
+    public Messenger getMessenger(Binder binder) {
+        // No way to determine package name in this case.
+        return getMessenger(binder, null);
+    }
+
+    /**
      * Get a reference to P2pStateMachine handler. This is used to establish
      * a priveleged AsyncChannel communication with WifiP2pService.
      *
@@ -2550,59 +1851,6 @@
         }
     }
 
-    private long getSupportedFeatures() {
-        try {
-            return mService.getSupportedFeatures();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    private boolean isFeatureSupported(long feature) {
-        return (getSupportedFeatures() & feature) == feature;
-    }
-
-    /**
-     * Check if this device supports setting vendor elements.
-     *
-     * Gates whether the
-     * {@link #setVendorElements(Channel, List, ActionListener)}
-     * method is functional on this device.
-     *
-     * @return {@code true} if supported, {@code false} otherwise.
-     */
-    public boolean isSetVendorElementsSupported() {
-        return isFeatureSupported(FEATURE_SET_VENDOR_ELEMENTS);
-    }
-
-    /**
-     * Check if this device supports discovery limited to a specific frequency or
-     * the social channels.
-     *
-     * Gates whether
-     * {@link #discoverPeersOnSpecificFrequency(Channel, int, ActionListener)} and
-     * {@link #discoverPeersOnSocialChannels(Channel, ActionListener)}
-     * methods are functional on this device.
-     *
-     * @return {@code true} if supported, {@code false} otherwise.
-     */
-    public boolean isChannelConstrainedDiscoverySupported() {
-        return isFeatureSupported(FEATURE_FLEXIBLE_DISCOVERY);
-    }
-
-    /**
-     * Check if this device supports removing clients from a group.
-     *
-     * Gates whether the
-     * {@link #removeClient(Channel, MacAddress, ActionListener)}
-     * method is functional on this device.
-     * @return {@code true} if supported, {@code false} otherwise.
-     */
-    public boolean isGroupClientRemovalSupported() {
-        return isFeatureSupported(FEATURE_GROUP_CLIENT_REMOVAL);
-    }
-
-
     /**
      * Get a handover request message for use in WFA NFC Handover transfer.
      * @hide
@@ -2708,7 +1956,7 @@
      * broadcast event with extra {@link #EXTRA_WIFI_STATE}.
      *
      * @param c is the channel created at {@link #initialize}.
-     * @param listener for callback when p2p state is available.
+     * @param listener for callback when p2p state is available..
      */
     public void requestP2pState(@NonNull Channel c,
             @NonNull P2pStateListener listener) {
@@ -2729,7 +1977,7 @@
      * broadcast event with extra {@link #EXTRA_DISCOVERY_STATE}.
      *
      * @param c is the channel created at {@link #initialize}.
-     * @param listener for callback when discovery state is available.
+     * @param listener for callback when discovery state is available..
      */
     public void requestDiscoveryState(@NonNull Channel c,
             @NonNull DiscoveryStateListener listener) {
@@ -2751,7 +1999,7 @@
      * broadcast event with extra {@link #EXTRA_NETWORK_INFO}.
      *
      * @param c is the channel created at {@link #initialize}.
-     * @param listener for callback when network info is available.
+     * @param listener for callback when network info is available..
      */
     public void requestNetworkInfo(@NonNull Channel c,
             @NonNull NetworkInfoListener listener) {
@@ -2760,7 +2008,7 @@
         c.mAsyncChannel.sendMessage(REQUEST_NETWORK_INFO, 0, c.putListener(listener));
     }
 
-    /**
+     /**
      * Request Device Info
      *
      * <p> This method provides the device info
@@ -2778,227 +2026,14 @@
      *
      * <p> This information is also included in the {@link #WIFI_P2P_THIS_DEVICE_CHANGED_ACTION}
      * broadcast event with extra {@link #EXTRA_WIFI_P2P_DEVICE}.
-     * <p>
-     * If targeting {@link android.os.Build.VERSION_CODES#TIRAMISU} or later, the application must
-     * have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * If targeting an earlier release than {@link android.os.Build.VERSION_CODES#TIRAMISU}, the
-     * application must have {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
      *
      * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}.
      * @param listener for callback when network info is available.
      */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.ACCESS_FINE_LOCATION
-            }, conditional = true)
+    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
     public void requestDeviceInfo(@NonNull Channel c, @NonNull DeviceInfoListener listener) {
         checkChannel(c);
         if (listener == null) throw new IllegalArgumentException("This listener cannot be null.");
-
-        Bundle extras = prepareExtrasBundle(c);
-        c.mAsyncChannel.sendMessage(REQUEST_DEVICE_INFO, 0, c.putListener(listener), extras);
-    }
-
-    /**
-     * Set the external approver for a specific peer.
-     *
-     * This API associates a specific peer with an approver. When an incoming request is received
-     * from a peer, an authorization request is routed to the attached approver. The approver then
-     * calls {@link #setConnectionRequestResult(Channel, MacAddress, int, ActionListener)} to send
-     * the result to the WiFi service. A specific peer (identified by its {@code MacAddress}) can
-     * only be attached to a single approver. The previous approver will be detached once a new
-     * approver is attached. The approver will also be detached automatically when the channel is
-     * closed.
-     * <p>
-     * When an approver is attached, {@link ExternalApproverRequestListener#onAttached(MacAddress)}
-     * is called. When an approver is detached,
-     * {@link ExternalApproverRequestListener#onDetached(MacAddress, int)} is called.
-     * When an incoming request is received,
-     * {@link ExternalApproverRequestListener#onConnectionRequested(int, WifiP2pConfig, WifiP2pDevice)}
-     * is called. When a WPS PIN is generated,
-     * {@link ExternalApproverRequestListener#onPinGenerated(MacAddress, String)} is called.
-     * <p>
-     * The application must have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}.
-     * @param deviceAddress the peer which is bound to the external approver.
-     * @param listener for callback when the framework needs to notify the external approver.
-     */
-    @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION)
-    public void addExternalApprover(@NonNull Channel c, @NonNull MacAddress deviceAddress,
-            @NonNull ExternalApproverRequestListener listener) {
-        checkChannel(c);
-        if (listener == null) throw new IllegalArgumentException("This listener cannot be null.");
-        if (null == deviceAddress) {
-            throw new IllegalArgumentException("deviceAddress cannot be empty");
-        }
-
-        Bundle extras = prepareExtrasBundle(c);
-        extras.putParcelable(EXTRA_PARAM_KEY_PEER_ADDRESS, deviceAddress);
-        c.mAsyncChannel.sendMessage(ADD_EXTERNAL_APPROVER, 0, c.putListener(listener), extras);
-    }
-
-    /**
-     * Remove the external approver for a specific peer.
-     *
-     * The application must have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}.
-     * @param deviceAddress the peer which is bound to the external approver.
-     * @param listener for callback on success or failure.
-     */
-    @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION)
-    public void removeExternalApprover(@NonNull Channel c, @NonNull MacAddress deviceAddress,
-            @Nullable ActionListener listener) {
-        checkChannel(c);
-        if (null == deviceAddress) {
-            throw new IllegalArgumentException("deviceAddress cannot be empty");
-        }
-
-        Bundle extras = prepareExtrasBundle(c);
-        extras.putParcelable(EXTRA_PARAM_KEY_PEER_ADDRESS, deviceAddress);
-        c.mAsyncChannel.sendMessage(REMOVE_EXTERNAL_APPROVER, 0, c.putListener(listener), extras);
-    }
-
-    /**
-     * Set the result for the incoming request from a specific peer.
-     *
-     * The application must have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}.
-     * @param deviceAddress the peer which is bound to the external approver.
-     * @param result the response for the incoming request.
-     * @param listener for callback on success or failure.
-     */
-    @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION)
-    public void setConnectionRequestResult(@NonNull Channel c, @NonNull MacAddress deviceAddress,
-            @ConnectionRequestResponse int result, @Nullable ActionListener listener) {
-        checkChannel(c);
-        if (null == deviceAddress) {
-            throw new IllegalArgumentException("deviceAddress cannot be empty");
-        }
-
-        Bundle extras = prepareExtrasBundle(c);
-        extras.putParcelable(EXTRA_PARAM_KEY_PEER_ADDRESS, deviceAddress);
-        c.mAsyncChannel.sendMessage(SET_CONNECTION_REQUEST_RESULT,
-                result, c.putListener(listener), extras);
-    }
-
-    /**
-     * Set the result with PIN for the incoming request from a specific peer.
-     *
-     * The application must have {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation". If the application does not declare
-     * android:usesPermissionFlags="neverForLocation", then it must also have
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
-     *
-     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}.
-     * @param deviceAddress the peer which is bound to the external approver.
-     * @param result the response for the incoming request.
-     * @param pin the PIN for the incoming request.
-     * @param listener for callback on success or failure.
-     */
-    @RequiresPermission(android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION)
-    public void setConnectionRequestResult(@NonNull Channel c, @NonNull MacAddress deviceAddress,
-            @ConnectionRequestResponse int result, @Nullable String pin,
-            @Nullable ActionListener listener) {
-        checkChannel(c);
-        if (null == deviceAddress) {
-            throw new IllegalArgumentException("deviceAddress cannot be empty");
-        }
-        if (result == CONNECTION_REQUEST_ACCEPT && TextUtils.isEmpty(pin)) {
-            throw new IllegalArgumentException("PIN cannot be empty for accepting a request");
-        }
-
-        Bundle extras = prepareExtrasBundle(c);
-        extras.putParcelable(EXTRA_PARAM_KEY_PEER_ADDRESS, deviceAddress);
-        extras.putString(EXTRA_PARAM_KEY_WPS_PIN, pin);
-        c.mAsyncChannel.sendMessage(SET_CONNECTION_REQUEST_RESULT,
-                result, c.putListener(listener), extras);
-    }
-
-    /**
-     * Set/Clear vendor specific information elements (VSIEs) to be published during
-     * Wi-Fi Direct (P2P) discovery.
-     *
-     * Once {@link Channel#close()} is called, the vendor information elements will be cleared from
-     * framework. The information element format is defined in the IEEE 802.11-2016 spec
-     * Table 9-77.
-     * <p>
-     * To clear the previously set vendor elements, call this API with an empty List.
-     * <p>
-     * The maximum accumulated length of all VSIEs must be before the limit specified by
-     * {@link #getP2pMaxAllowedVendorElementsLengthBytes()}.
-     * <p>
-     * To publish vendor elements, this API should be called before peer discovery API, ex.
-     * {@link #discoverPeers(Channel, ActionListener)}.
-     * <p>
-     * Use {@link #isSetVendorElementsSupported()} to determine whether the device supports
-     * this feature. If {@link #isSetVendorElementsSupported()} return {@code false} then
-     * this method will throw {@link UnsupportedOperationException}.
-     *
-     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}.
-     * @param vendorElements application information as vendor-specific information elements.
-     * @param listener for callback when network info is available.
-     */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.NEARBY_WIFI_DEVICES,
-            android.Manifest.permission.OVERRIDE_WIFI_CONFIG
-            })
-    public void setVendorElements(@NonNull Channel c,
-            @NonNull List<ScanResult.InformationElement> vendorElements,
-            @Nullable ActionListener listener) {
-        if (!isSetVendorElementsSupported()) {
-            throw new UnsupportedOperationException();
-        }
-        checkChannel(c);
-        int totalBytes = 0;
-        for (ScanResult.InformationElement e : vendorElements) {
-            if (e.id != ScanResult.InformationElement.EID_VSA) {
-                throw new IllegalArgumentException("received InformationElement which is not "
-                        + "a Vendor Specific IE (VSIE). VSIEs have an ID = 221.");
-            }
-            // Length field is 1 byte.
-            if (e.bytes == null || e.bytes.length > 0xff) {
-                throw new IllegalArgumentException("received InformationElement whose payload "
-                        + "size is 0 or greater than 255.");
-            }
-            // The total bytes of an IE is EID (1 byte) + length (1 byte) + payload length.
-            totalBytes += 2 + e.bytes.length;
-            if (totalBytes > WIFI_P2P_VENDOR_ELEMENTS_MAXIMUM_LENGTH) {
-                throw new IllegalArgumentException("received InformationElement whose total "
-                        + "size is greater than " + WIFI_P2P_VENDOR_ELEMENTS_MAXIMUM_LENGTH + ".");
-            }
-        }
-        Bundle extras = prepareExtrasBundle(c);
-        extras.putParcelableArrayList(EXTRA_PARAM_KEY_INFORMATION_ELEMENT_LIST,
-                new ArrayList<>(vendorElements));
-        c.mAsyncChannel.sendMessage(SET_VENDOR_ELEMENTS, 0,
-                c.putListener(listener), extras);
-    }
-
-    /**
-     * Return the maximum total length (in bytes) of all Vendor specific information
-     * elements (VSIEs) which can be set using the
-     * {@link #setVendorElements(Channel, List, ActionListener)}.
-     *
-     * The length is calculated adding the payload length + 2 bytes for each VSIE
-     * (2 bytes: 1 byte for type and 1 byte for length).
-     */
-    public static int getP2pMaxAllowedVendorElementsLengthBytes() {
-        return WIFI_P2P_VENDOR_ELEMENTS_MAXIMUM_LENGTH;
+        c.mAsyncChannel.sendMessage(REQUEST_DEVICE_INFO, 0, c.putListener(listener));
     }
 }
diff --git a/framework/java/android/net/wifi/rtt/IWifiRttManager.aidl b/framework/java/android/net/wifi/rtt/IWifiRttManager.aidl
index facbd87..7c92a6b 100644
--- a/framework/java/android/net/wifi/rtt/IWifiRttManager.aidl
+++ b/framework/java/android/net/wifi/rtt/IWifiRttManager.aidl
@@ -16,7 +16,6 @@
 
 package android.net.wifi.rtt;
 
-import android.os.Bundle;
 import android.os.WorkSource;
 
 import android.net.wifi.rtt.IRttCallback;
@@ -29,7 +28,6 @@
 {
     boolean isAvailable();
     void startRanging(in IBinder binder, in String callingPackage, in String callingFeatureId,
-            in WorkSource workSource, in RangingRequest request, in IRttCallback callback,
-            in Bundle extras);
+            in WorkSource workSource, in RangingRequest request, in IRttCallback callback);
     void cancelRanging(in WorkSource workSource);
 }
diff --git a/framework/java/android/net/wifi/rtt/RangingRequest.java b/framework/java/android/net/wifi/rtt/RangingRequest.java
index c146bc2..8d45dca 100644
--- a/framework/java/android/net/wifi/rtt/RangingRequest.java
+++ b/framework/java/android/net/wifi/rtt/RangingRequest.java
@@ -207,16 +207,15 @@
          * which to measure range. The total number of peers added to a request cannot exceed the
          * limit specified by {@link #getMaxPeers()}.
          * <p>
-         * Two-sided Ranging will be supported if the Access Point supports IEEE 802.11mc, also
-         * known as two-sided RTT, and this is determined by the method
-         * {@link ScanResult#is80211mcResponder()}. If not supported, one-sided RTT will be
-         * performed with no correction for the AP packet turnaround time.
+         * Ranging will only be supported if the Access Point supports IEEE 802.11mc, also known as
+         * two-sided RTT. Use {@link ScanResult#is80211mcResponder()} to verify the Access Point's
+         * capabilities. If not supported the result status will be
+         * {@link RangingResult#STATUS_RESPONDER_DOES_NOT_SUPPORT_IEEE80211MC}.
          *
-         * @param apInfo Information about an Access Point (AP) obtained in a Scan Result.
+         * @param apInfo Information of an Access Point (AP) obtained in a Scan Result.
          * @return The builder to facilitate chaining
          *         {@code builder.setXXX(..).setXXX(..)}.
          */
-        @NonNull
         public Builder addAccessPoint(@NonNull ScanResult apInfo) {
             if (apInfo == null) {
                 throw new IllegalArgumentException("Null ScanResult!");
@@ -229,16 +228,15 @@
          * which to measure range. The total number of peers added to a request cannot exceed the
          * limit specified by {@link #getMaxPeers()}.
          * <p>
-         * Two-sided Ranging will be supported if the Access Point supports IEEE 802.11mc, also
-         * known as two-sided RTT, and this is determined by the method
-         * {@link ScanResult#is80211mcResponder()}. If not supported, one-sided RTT will be
-         * performed with no correction for the AP packet turnaround time.
+         * Ranging will only be supported if the Access Point supports IEEE 802.11mc, also known as
+         * two-sided RTT. Use {@link ScanResult#is80211mcResponder()} to verify the Access Point's
+         * capabilities. If not supported, the result status will be
+         * {@link RangingResult#STATUS_RESPONDER_DOES_NOT_SUPPORT_IEEE80211MC}.
          *
-         * @param apInfos Information about Access Points (APs) obtained in a Scan Result.
+         * @param apInfos Information of an Access Points (APs) obtained in a Scan Result.
          * @return The builder to facilitate chaining
          *         {@code builder.setXXX(..).setXXX(..)}.
          */
-        @NonNull
         public Builder addAccessPoints(@NonNull List<ScanResult> apInfos) {
             if (apInfos == null) {
                 throw new IllegalArgumentException("Null list of ScanResults!");
@@ -250,54 +248,6 @@
         }
 
         /**
-         * Add the Responder device specified by the {@link ResponderConfig} to the list of devices
-         * with which to measure range. The total number of peers added to the request cannot exceed
-         * the limit specified by {@link #getMaxPeers()}.
-         * <p>
-         * Two-sided Ranging will be supported if an Access Point supports IEEE 802.11mc, also
-         * known as two-sided RTT, and this is specified in the {@link ResponderConfig} builder.
-         * If not supported, one-sided RTT will be performed with no correction for
-         * the AP packet turnaround time.
-         *
-         * @param responder Information on the RTT Responder.
-         * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
-         */
-        @NonNull
-        public Builder addResponder(@NonNull ResponderConfig responder) {
-            if (responder == null) {
-                throw new IllegalArgumentException("Null Responder!");
-            }
-
-            mRttPeers.add(responder);
-            return this;
-        }
-
-        /**
-         * Add the devices specified by the {@link ResponderConfig}s to the list of devices with
-         * which to measure range. The total number of peers added to a request cannot exceed the
-         * limit specified by {@link #getMaxPeers()}.
-         * <p>
-         * Two-sided Ranging will be supported if an Access Point supports IEEE 802.11mc, also
-         * known as two-sided RTT, and this is specified in the {@link ResponderConfig} builder.
-         * If not supported, one-sided RTT will be performed with no correction for the AP packet
-         * turnaround time.
-         *
-         * @param responders Information representing the set of access points to be ranged
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        @NonNull
-        public Builder addResponders(@NonNull List<ResponderConfig> responders) {
-            if (responders == null) {
-                throw new IllegalArgumentException("Null list of Responders");
-            }
-            for (ResponderConfig responder : responders) {
-                addResponder(responder);
-            }
-            return this;
-        }
-
-        /**
          * Add the non-802.11mc capable device specified by the {@link ScanResult} to the list of
          * devices with which to measure range. The total number of peers added to a request cannot
          * exceed the limit specified by {@link #getMaxPeers()}.
@@ -317,7 +267,7 @@
          * Note: one-sided RTT should only be used if you are very familiar with statistical
          * estimation techniques.
          *
-         * @param apInfo Information about an Access Point (AP) obtained in a Scan Result
+         * @param apInfo Information of an Access Point (AP) obtained in a Scan Result.
          * @return The builder to facilitate chaining
          *         {@code builder.setXXX(..).setXXX(..)}.
          */
@@ -352,7 +302,7 @@
          * Note: one-sided RTT should only be used if you are very familiar with statistical
          * estimation techniques.
          *
-         * @param apInfos Information about Access Points (APs) obtained in a Scan Result.
+         * @param apInfos Information of an Access Points (APs) obtained in a Scan Result.
          * @return The builder to facilitate chaining
          *         {@code builder.setXXX(..).setXXX(..)}.
          */
@@ -426,6 +376,25 @@
             return addResponder(ResponderConfig.fromWifiAwarePeerHandleWithDefaults(peerHandle));
         }
 
+        /**
+         * Add the Responder device specified by the {@link ResponderConfig} to the list of devices
+         * with which to measure range. The total number of peers added to the request cannot exceed
+         * the limit specified by {@link #getMaxPeers()}.
+         *
+         * @param responder Information on the RTT Responder.
+         * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
+         *
+         * @hide
+         */
+        @SystemApi
+        public Builder addResponder(@NonNull ResponderConfig responder) {
+            if (responder == null) {
+                throw new IllegalArgumentException("Null Responder!");
+            }
+
+            mRttPeers.add(responder);
+            return this;
+        }
 
         /**
          * Build {@link RangingRequest} given the current configurations made on the
diff --git a/framework/java/android/net/wifi/rtt/ResponderConfig.java b/framework/java/android/net/wifi/rtt/ResponderConfig.java
index 27c220c..58dcd65 100644
--- a/framework/java/android/net/wifi/rtt/ResponderConfig.java
+++ b/framework/java/android/net/wifi/rtt/ResponderConfig.java
@@ -17,19 +17,16 @@
 package android.net.wifi.rtt;
 
 import static android.net.wifi.ScanResult.InformationElement.EID_EXTENSION_PRESENT;
-import static android.net.wifi.ScanResult.InformationElement.EID_EXT_EHT_CAPABILITIES;
 import static android.net.wifi.ScanResult.InformationElement.EID_EXT_HE_CAPABILITIES;
 import static android.net.wifi.ScanResult.InformationElement.EID_HT_CAPABILITIES;
 import static android.net.wifi.ScanResult.InformationElement.EID_VHT_CAPABILITIES;
 
 import android.annotation.IntDef;
-import android.annotation.IntRange;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
 import android.net.MacAddress;
 import android.net.wifi.ScanResult;
-import android.net.wifi.WifiAnnotations;
 import android.net.wifi.aware.PeerHandle;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -45,7 +42,10 @@
  * <p>
  * A Responder configuration may be constructed from a {@link ScanResult} or manually (with the
  * data obtained out-of-band from a peer).
+ *
+ * @hide
  */
+@SystemApi
 public final class ResponderConfig implements Parcelable {
     private static final String TAG = "ResponderConfig";
     private static final int AWARE_BAND_2_DISCOVERY_CHANNEL = 2437;
@@ -58,198 +58,129 @@
 
     /**
      * Responder is an AP.
-     * @hide
      */
-    @SystemApi
     public static final int RESPONDER_AP = 0;
-
     /**
      * Responder is a STA.
-     * @hide
      */
-    @SystemApi
     public static final int RESPONDER_STA = 1;
-
     /**
      * Responder is a Wi-Fi Direct Group Owner (GO).
-     * @hide
      */
-    @SystemApi
     public static final int RESPONDER_P2P_GO = 2;
-
     /**
      * Responder is a Wi-Fi Direct Group Client.
-     * @hide
      */
-    @SystemApi
     public static final int RESPONDER_P2P_CLIENT = 3;
-
     /**
      * Responder is a Wi-Fi Aware device.
-     * @hide
      */
-    @SystemApi
     public static final int RESPONDER_AWARE = 4;
 
+
     /** @hide */
     @IntDef({
             CHANNEL_WIDTH_20MHZ, CHANNEL_WIDTH_40MHZ, CHANNEL_WIDTH_80MHZ, CHANNEL_WIDTH_160MHZ,
-            CHANNEL_WIDTH_80MHZ_PLUS_MHZ, CHANNEL_WIDTH_320MHZ})
+            CHANNEL_WIDTH_80MHZ_PLUS_MHZ})
     @Retention(RetentionPolicy.SOURCE)
     public @interface ChannelWidth {
     }
 
-
     /**
      * Channel bandwidth is 20 MHZ
-     * @hide
      */
-    @SystemApi
     public static final int CHANNEL_WIDTH_20MHZ = 0;
-
     /**
      * Channel bandwidth is 40 MHZ
-     * @hide
      */
-    @SystemApi
     public static final int CHANNEL_WIDTH_40MHZ = 1;
-
     /**
      * Channel bandwidth is 80 MHZ
-     * @hide
      */
-    @SystemApi
     public static final int CHANNEL_WIDTH_80MHZ = 2;
-
     /**
      * Channel bandwidth is 160 MHZ
-     * @hide
      */
-    @SystemApi
     public static final int CHANNEL_WIDTH_160MHZ = 3;
-
     /**
      * Channel bandwidth is 160 MHZ, but 80MHZ + 80MHZ
-     * @hide
      */
-    @SystemApi
     public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4;
 
-    /**
-     * Channel bandwidth is 320 MHZ
-     * @hide
-     */
-    @SystemApi
-    public static final int CHANNEL_WIDTH_320MHZ = 5;
-
-
     /** @hide */
-    @IntDef({PREAMBLE_LEGACY, PREAMBLE_HT, PREAMBLE_VHT, PREAMBLE_HE, PREAMBLE_EHT})
+    @IntDef({PREAMBLE_LEGACY, PREAMBLE_HT, PREAMBLE_VHT, PREAMBLE_HE})
     @Retention(RetentionPolicy.SOURCE)
     public @interface PreambleType {
     }
 
     /**
      * Preamble type: Legacy.
-     * @hide
      */
-    @SystemApi
     public static final int PREAMBLE_LEGACY = 0;
 
     /**
      * Preamble type: HT.
-     * @hide
      */
-    @SystemApi
     public static final int PREAMBLE_HT = 1;
 
     /**
      * Preamble type: VHT.
-     * @hide
      */
-    @SystemApi
     public static final int PREAMBLE_VHT = 2;
 
     /**
      * Preamble type: HE.
-     * @hide
      */
-    @SystemApi
     public static final int PREAMBLE_HE = 3;
 
     /**
-     * Preamble type: EHT.
-     * @hide
-     */
-    @SystemApi
-    public static final int PREAMBLE_EHT = 4;
-
-    /**
      * The MAC address of the Responder. Will be null if a Wi-Fi Aware peer identifier (the
      * peerHandle field) ise used to identify the Responder.
-     * @hide
      */
-    @SystemApi
-    @Nullable public final MacAddress macAddress;
+    public final MacAddress macAddress;
 
     /**
      * The peer identifier of a Wi-Fi Aware Responder. Will be null if a MAC Address (the macAddress
      * field) is used to identify the Responder.
-     * @hide
      */
-    @SystemApi
-    @Nullable public final PeerHandle peerHandle;
+    public final PeerHandle peerHandle;
 
     /**
      * The device type of the Responder.
-     * @hide
      */
-    @SystemApi
     public final int responderType;
 
     /**
      * Indicates whether the Responder device supports IEEE 802.11mc.
-     * @hide
      */
-    @SystemApi
     public final boolean supports80211mc;
 
     /**
      * Responder channel bandwidth, specified using {@link ChannelWidth}.
-     * @hide
      */
-    @SystemApi
     public final int channelWidth;
 
     /**
      * The primary 20 MHz frequency (in MHz) of the channel of the Responder.
-     * @hide
      */
-    @SystemApi
     public final int frequency;
 
     /**
-     * Not used if the {@link #channelWidth} is 20 MHz. If the Responder uses 40, 80, 160 or
-     * 320 MHz, this is the center frequency (in MHz), if the Responder uses 80 + 80 MHz,
-     * this is the center frequency of the first segment (in MHz).
-     * @hide
+     * Not used if the {@link #channelWidth} is 20 MHz. If the Responder uses 40, 80 or 160 MHz,
+     * this is the center frequency (in MHz), if the Responder uses 80 + 80 MHz, this is the
+     * center frequency of the first segment (in MHz).
      */
-    @SystemApi
     public final int centerFreq0;
 
     /**
      * Only used if the {@link #channelWidth} is 80 + 80 MHz. If the Responder uses 80 + 80 MHz,
      * this is the center frequency of the second segment (in MHz).
-     * @hide
      */
-    @SystemApi
     public final int centerFreq1;
 
     /**
      * The preamble used by the Responder, specified using {@link PreambleType}.
-     * @hide
      */
-    @SystemApi
     public final int preamble;
 
     /**
@@ -258,12 +189,11 @@
      * @param macAddress      The MAC address of the Responder.
      * @param responderType   The type of the responder device, specified using
      *                        {@link ResponderType}.
-     *                        For an access point (AP) use {@code RESPONDER_AP}.
      * @param supports80211mc Indicates whether the responder supports IEEE 802.11mc.
      * @param channelWidth    Responder channel bandwidth, specified using {@link ChannelWidth}.
      * @param frequency       The primary 20 MHz frequency (in MHz) of the channel of the Responder.
      * @param centerFreq0     Not used if the {@code channelWidth} is 20 MHz. If the Responder uses
-     *                        40, 80, 160 or 320 MHz, this is the center frequency (in MHz), if the
+     *                        40, 80 or 160 MHz, this is the center frequency (in MHz), if the
      *                        Responder uses 80 + 80 MHz, this is the center frequency of the first
      *                        segment (in MHz).
      * @param centerFreq1     Only used if the {@code channelWidth} is 80 + 80 MHz. If the
@@ -273,9 +203,7 @@
      *                        MHz).
      * @param preamble        The preamble used by the Responder, specified using
      *                        {@link PreambleType}.
-     * @hide
      */
-    @SystemApi
     public ResponderConfig(@NonNull MacAddress macAddress, @ResponderType int responderType,
             boolean supports80211mc, @ChannelWidth int channelWidth, int frequency, int centerFreq0,
             int centerFreq1, @PreambleType int preamble) {
@@ -304,7 +232,7 @@
      * @param channelWidth    Responder channel bandwidth, specified using {@link ChannelWidth}.
      * @param frequency       The primary 20 MHz frequency (in MHz) of the channel of the Responder.
      * @param centerFreq0     Not used if the {@code channelWidth} is 20 MHz. If the Responder uses
-     *                        40, 80, 160, or 320 MHz, this is the center frequency (in MHz), if the
+     *                        40, 80 or 160 MHz, this is the center frequency (in MHz), if the
      *                        Responder uses 80 + 80 MHz, this is the center frequency of the first
      *                        segment (in MHz).
      * @param centerFreq1     Only used if the {@code channelWidth} is 80 + 80 MHz. If the
@@ -314,9 +242,7 @@
      *                        MHz).
      * @param preamble        The preamble used by the Responder, specified using
      *                        {@link PreambleType}.
-     * @hide
      */
-    @SystemApi
     public ResponderConfig(@NonNull PeerHandle peerHandle, @ResponderType int responderType,
             boolean supports80211mc, @ChannelWidth int channelWidth, int frequency, int centerFreq0,
             int centerFreq1, @PreambleType int preamble) {
@@ -332,9 +258,8 @@
     }
 
     /**
-     * Constructs Responder configuration. This is a constructor which specifies both
-     * a MAC address and a Wi-Fi PeerHandle to identify the Responder. For an RTT RangingRequest
-     * the Wi-Fi Aware peer identifier can be constructed using an Identifier set to zero.
+     * Constructs Responder configuration. This is an internal-only constructor which specifies both
+     * a MAC address and a Wi-Fi PeerHandle to identify the Responder.
      *
      * @param macAddress      The MAC address of the Responder.
      * @param peerHandle      The Wi-Fi Aware peer identifier of the Responder.
@@ -344,7 +269,7 @@
      * @param channelWidth    Responder channel bandwidth, specified using {@link ChannelWidth}.
      * @param frequency       The primary 20 MHz frequency (in MHz) of the channel of the Responder.
      * @param centerFreq0     Not used if the {@code channelWidth} is 20 MHz. If the Responder uses
-     *                        40, 80, 160 or 320 MHz, this is the center frequency (in MHz), if the
+     *                        40, 80 or 160 MHz, this is the center frequency (in MHz), if the
      *                        Responder uses 80 + 80 MHz, this is the center frequency of the first
      *                        segment (in MHz).
      * @param centerFreq1     Only used if the {@code channelWidth} is 80 + 80 MHz. If the
@@ -354,7 +279,6 @@
      *                        MHz).
      * @param preamble        The preamble used by the Responder, specified using
      *                        {@link PreambleType}.
-     *
      * @hide
      */
     public ResponderConfig(@NonNull MacAddress macAddress, @NonNull PeerHandle peerHandle,
@@ -376,12 +300,11 @@
      * Creates a Responder configuration from a {@link ScanResult} corresponding to an Access
      * Point (AP), which can be obtained from {@link android.net.wifi.WifiManager#getScanResults()}.
      */
-    @NonNull
-    public static ResponderConfig fromScanResult(@NonNull ScanResult scanResult) {
+    public static ResponderConfig fromScanResult(ScanResult scanResult) {
         MacAddress macAddress = MacAddress.fromString(scanResult.BSSID);
         int responderType = RESPONDER_AP;
         boolean supports80211mc = scanResult.is80211mcResponder();
-        int channelWidth = translateFromScanResultToLocalChannelWidth(scanResult.channelWidth);
+        int channelWidth = translateScanResultChannelWidth(scanResult.channelWidth);
         int frequency = scanResult.frequency;
         int centerFreq0 = scanResult.centerFreq0;
         int centerFreq1 = scanResult.centerFreq1;
@@ -391,7 +314,6 @@
             boolean htCapabilitiesPresent = false;
             boolean vhtCapabilitiesPresent = false;
             boolean heCapabilitiesPresent = false;
-            boolean ehtCapabilitiesPresent = false;
 
             for (ScanResult.InformationElement ie : scanResult.informationElements) {
                 if (ie.id == EID_HT_CAPABILITIES) {
@@ -400,14 +322,10 @@
                     vhtCapabilitiesPresent = true;
                 } else if (ie.id == EID_EXTENSION_PRESENT && ie.idExt == EID_EXT_HE_CAPABILITIES) {
                     heCapabilitiesPresent = true;
-                } else if (ie.id == EID_EXTENSION_PRESENT && ie.idExt == EID_EXT_EHT_CAPABILITIES) {
-                    ehtCapabilitiesPresent = true;
                 }
             }
 
-            if (ehtCapabilitiesPresent && ScanResult.is6GHz(frequency)) {
-                preamble = PREAMBLE_EHT;
-            } else if (heCapabilitiesPresent && ScanResult.is6GHz(frequency)) {
+            if (heCapabilitiesPresent && ScanResult.is6GHz(frequency)) {
                 preamble = PREAMBLE_HE;
             } else if (vhtCapabilitiesPresent) {
                 preamble = PREAMBLE_VHT;
@@ -418,10 +336,7 @@
             }
         } else {
             Log.e(TAG, "Scan Results do not contain IEs - using backup method to select preamble");
-            if (channelWidth == CHANNEL_WIDTH_320MHZ) {
-                preamble = PREAMBLE_EHT;
-            } else if (channelWidth == CHANNEL_WIDTH_80MHZ
-                    || channelWidth == CHANNEL_WIDTH_160MHZ) {
+            if (channelWidth == CHANNEL_WIDTH_80MHZ || channelWidth == CHANNEL_WIDTH_160MHZ) {
                 preamble = PREAMBLE_VHT;
             } else {
                 preamble = PREAMBLE_HT;
@@ -435,12 +350,8 @@
     /**
      * Creates a Responder configuration from a MAC address corresponding to a Wi-Fi Aware
      * Responder. The Responder parameters are set to defaults.
-     * @hide
      */
-    @SystemApi
-    @NonNull
-    public static ResponderConfig fromWifiAwarePeerMacAddressWithDefaults(
-            @NonNull MacAddress macAddress) {
+    public static ResponderConfig fromWifiAwarePeerMacAddressWithDefaults(MacAddress macAddress) {
         /* Note: the parameters are those of the Aware discovery channel (channel 6). A Responder
          * is expected to be brought up and available to negotiate a maximum accuracy channel
          * (i.e. Band 5 @ 80MHz). A Responder is brought up on the peer by starting an Aware
@@ -453,12 +364,8 @@
     /**
      * Creates a Responder configuration from a {@link PeerHandle} corresponding to a Wi-Fi Aware
      * Responder. The Responder parameters are set to defaults.
-     * @hide
      */
-    @SystemApi
-    @NonNull
-    public static ResponderConfig fromWifiAwarePeerHandleWithDefaults(
-            @NonNull PeerHandle peerHandle) {
+    public static ResponderConfig fromWifiAwarePeerHandleWithDefaults(PeerHandle peerHandle) {
         /* Note: the parameters are those of the Aware discovery channel (channel 6). A Responder
          * is expected to be brought up and available to negotiate a maximum accuracy channel
          * (i.e. Band 5 @ 80MHz). A Responder is brought up on the peer by starting an Aware
@@ -472,7 +379,6 @@
      * Check whether the Responder configuration is valid.
      *
      * @return true if valid, false otherwise.
-     *
      * @hide
      */
     public boolean isValid(boolean awareSupported) {
@@ -482,219 +388,17 @@
         if (!awareSupported && responderType == RESPONDER_AWARE) {
             return false;
         }
+
         return true;
     }
 
-    /**
-     * @return the MAC address of the responder
-     */
-    @Nullable
-    public MacAddress getMacAddress() {
-        return macAddress;
-    }
-
-    /**
-     * @return true if the Responder supports the 802.11mc protocol, false otherwise.
-     */
-    public boolean is80211mcSupported() {
-        return supports80211mc;
-    }
-
-    /**
-     * AP Channel bandwidth; one of {@link ScanResult#CHANNEL_WIDTH_20MHZ},
-     * {@link ScanResult#CHANNEL_WIDTH_40MHZ},
-     * {@link ScanResult#CHANNEL_WIDTH_80MHZ}, {@link ScanResult#CHANNEL_WIDTH_160MHZ},
-     * {@link ScanResult #CHANNEL_WIDTH_80MHZ_PLUS_MHZ} or {@link ScanResult#CHANNEL_WIDTH_320MHZ}.
-     *
-     * @return the bandwidth repsentation of the Wi-Fi channel
-     */
-    public @WifiAnnotations.ChannelWidth int getChannelWidth() {
-        return translateFromLocalToScanResultChannelWidth(channelWidth);
-    }
-
-    /**
-     * @return the frequency in MHz of the Wi-Fi channel
-     */
-    @IntRange(from = 0)
-    public int getFrequencyMhz() {
-        return frequency;
-    }
-
-    /**
-     * If the Access Point (AP) bandwidth is 20 MHz, 0 MHz is returned.
-     * If the AP use 40, 80 or 160 MHz, this is the center frequency (in MHz).
-     * if the AP uses 80 + 80 MHz, this is the center frequency of the first segment (in MHz).
-     *
-     * @return the center frequency in MHz of the first channel segment
-     */
-    @IntRange(from = 0)
-    public int getCenterFreq0Mhz() {
-        return centerFreq0;
-    }
-
-    /**
-     * If the Access Point (AP) bandwidth is 80 + 80 MHz, this param is not used and returns 0.
-     * If the AP uses 80 + 80 MHz, this is the center frequency of the second segment in MHz.
-     *
-     * @return the center frequency in MHz of the second channel segment (if used)
-     */
-    @IntRange(from = 0)
-    public int getCenterFreq1Mhz() {
-        return centerFreq1;
-    }
-
-    /**
-     * Get the preamble type of the channel.
-     *
-     * @return the preamble used for this channel
-     */
-    public @WifiAnnotations.PreambleType int getPreamble() {
-        return translateFromLocalToScanResultPreamble(preamble);
-    }
-
-    /**
-     * Builder class used to construct {@link ResponderConfig} objects.
-     */
-    public static final class Builder {
-        private MacAddress mMacAddress;
-        private @ResponderType int mResponderType;
-        private boolean mSupports80211Mc = true;
-        private @ChannelWidth int mChannelWidth = CHANNEL_WIDTH_20MHZ;
-        private int mFrequency = 0;
-        private int mCenterFreq0 = 0;
-        private int mCenterFreq1 = 0;
-        private @PreambleType int mPreamble = PREAMBLE_LEGACY;
-
-        /**
-         * Sets the Responder MAC Address.
-         *
-         * @param macAddress the phyical address of the responder
-         * @return the builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        @NonNull
-        public Builder setMacAddress(@NonNull MacAddress macAddress) {
-            this.mMacAddress = macAddress;
-            return this;
-        }
-
-        /**
-         * Sets an indication the access point can to respond to the two-sided Wi-Fi RTT protocol,
-         * but, if false, indicates only one-sided Wi-Fi RTT is possible.
-         *
-         * @param supports80211mc the ability to support the Wi-Fi RTT protocol
-         * @return the builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        @NonNull
-        public Builder set80211mcSupported(boolean supports80211mc) {
-            this.mSupports80211Mc = supports80211mc;
-            return this;
-        }
-
-        /**
-         * Sets the channel bandwidth in MHz.
-         *
-         * @param channelWidth the bandwidth of the channel in MHz
-         * @return the builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        @NonNull
-        public Builder setChannelWidth(@WifiAnnotations.ChannelWidth int channelWidth) {
-            this.mChannelWidth = translateFromScanResultToLocalChannelWidth(channelWidth);
-            return this;
-        }
-
-        /**
-         * Sets the frequency of the channel in MHz.
-         * <p>
-         * Note: The frequency is used as a hint, and the underlying WiFi subsystem may use it, or
-         * select an alternate if its own connectivity scans have determined the frequency of the
-         * access point has changed.
-         * </p>
-         *
-         * @param frequency the frequency of the channel in MHz
-         * @return the builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        @NonNull
-        public Builder setFrequencyMhz(@IntRange(from = 0) int frequency) {
-            this.mFrequency = frequency;
-            return this;
-        }
-
-        /**
-         * Sets the center frequency in MHz of the first segment of the channel.
-         * <p>
-         * Note: The frequency is used as a hint, and the underlying WiFi subsystem may use it, or
-         * select an alternate if its own connectivity scans have determined the frequency of the
-         * access point has changed.
-         * </p>
-         *
-         * @param centerFreq0 the center frequency in MHz of first channel segment
-         * @return the builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        @NonNull
-        public Builder setCenterFreq0Mhz(@IntRange(from = 0) int centerFreq0) {
-            this.mCenterFreq0 = centerFreq0;
-            return this;
-        }
-
-        /**
-         * Sets the center frequency in MHz of the second segment of the channel, if used.
-         * <p>
-         * Note: The frequency is used as a hint, and the underlying WiFi subsystem may use it, or
-         * select an alternate if its own connectivity scans have determined the frequency of the
-         * access point has changed.
-         * </p>
-         *
-         * @param centerFreq1 the center frequency in MHz of second channel segment
-         * @return the builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        @NonNull
-        public Builder setCenterFreq1Mhz(@IntRange(from = 0) int centerFreq1) {
-            this.mCenterFreq1 = centerFreq1;
-            return this;
-        }
-
-        /**
-         * Sets the preamble encoding for the protocol.
-         *
-         * @param preamble the preamble encoding
-         * @return the builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        @NonNull
-        public Builder setPreamble(@WifiAnnotations.PreambleType int preamble) {
-            this.mPreamble = translateFromScanResultToLocalPreamble(preamble);
-            return this;
-        }
-
-        /**
-         * Build {@link ResponderConfig} given the current configurations made on the builder.
-         * @return an instance of {@link ResponderConfig}
-         */
-        @NonNull
-        public ResponderConfig build() {
-            if (mMacAddress == null) {
-                throw new IllegalArgumentException(
-                        "Invalid ResponderConfig - must specify a MAC address");
-            }
-            mResponderType = RESPONDER_AP;
-            return new ResponderConfig(mMacAddress, mResponderType, mSupports80211Mc, mChannelWidth,
-                    mFrequency, mCenterFreq0, mCenterFreq1, mPreamble);
-        }
-    }
-
     @Override
     public int describeContents() {
         return 0;
     }
 
     @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
+    public void writeToParcel(Parcel dest, int flags) {
         if (macAddress == null) {
             dest.writeBoolean(false);
         } else {
@@ -777,6 +481,7 @@
                 frequency, centerFreq0, centerFreq1, preamble);
     }
 
+    /** @hide */
     @Override
     public String toString() {
         return new StringBuffer("ResponderConfig: macAddress=").append(macAddress).append(
@@ -788,16 +493,8 @@
                 ", preamble=").append(preamble).toString();
     }
 
-    /**
-     * Translate an SDK channel width encoding to a local channel width encoding
-     *
-     * @param scanResultChannelWidth the {@link ScanResult} defined channel width encoding
-     * @return the translated channel width encoding
-     *
-     * @hide
-     */
-    static int translateFromScanResultToLocalChannelWidth(
-            @WifiAnnotations.ChannelWidth int scanResultChannelWidth) {
+    /** @hide */
+    static int translateScanResultChannelWidth(int scanResultChannelWidth) {
         switch (scanResultChannelWidth) {
             case ScanResult.CHANNEL_WIDTH_20MHZ:
                 return CHANNEL_WIDTH_20MHZ;
@@ -809,92 +506,9 @@
                 return CHANNEL_WIDTH_160MHZ;
             case ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ:
                 return CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
-            case ScanResult.CHANNEL_WIDTH_320MHZ:
-                return CHANNEL_WIDTH_320MHZ;
             default:
                 throw new IllegalArgumentException(
-                        "translateFromScanResultChannelWidth: bad " + scanResultChannelWidth);
-        }
-    }
-
-    /**
-     * Translate the local channel width encoding to the SDK channel width encoding.
-     *
-     * @param localChannelWidth the locally defined channel width encoding
-     * @return the translated channel width encoding
-     *
-     * @hide
-     */
-    static int translateFromLocalToScanResultChannelWidth(@ChannelWidth int localChannelWidth) {
-        switch (localChannelWidth) {
-            case CHANNEL_WIDTH_20MHZ:
-                return ScanResult.CHANNEL_WIDTH_20MHZ;
-            case CHANNEL_WIDTH_40MHZ:
-                return ScanResult.CHANNEL_WIDTH_40MHZ;
-            case CHANNEL_WIDTH_80MHZ:
-                return ScanResult.CHANNEL_WIDTH_80MHZ;
-            case CHANNEL_WIDTH_160MHZ:
-                return ScanResult.CHANNEL_WIDTH_160MHZ;
-            case CHANNEL_WIDTH_80MHZ_PLUS_MHZ:
-                return ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
-            case CHANNEL_WIDTH_320MHZ:
-                return ScanResult.CHANNEL_WIDTH_320MHZ;
-            default:
-                throw new IllegalArgumentException(
-                        "translateFromLocalChannelWidth: bad " + localChannelWidth);
-        }
-    }
-
-    /**
-     * Translate the {@link ScanResult} preamble encoding to the local preamble encoding.
-     *
-     * @param scanResultPreamble the channel width supplied
-     * @return the local encoding of the Preamble
-     *
-     * @hide
-     */
-    static int translateFromScanResultToLocalPreamble(
-            @WifiAnnotations.PreambleType int scanResultPreamble) {
-        switch (scanResultPreamble) {
-            case ScanResult.PREAMBLE_LEGACY:
-                return PREAMBLE_LEGACY;
-            case ScanResult.PREAMBLE_HT:
-                return PREAMBLE_HT;
-            case ScanResult.PREAMBLE_VHT:
-                return PREAMBLE_VHT;
-            case ScanResult.PREAMBLE_HE:
-                return PREAMBLE_HE;
-            case ScanResult.PREAMBLE_EHT:
-                return PREAMBLE_EHT;
-            default:
-                throw new IllegalArgumentException(
-                        "translateFromScanResultPreamble: bad " + scanResultPreamble);
-        }
-    }
-
-    /**
-     * Translate the local preamble encoding to the {@link ScanResult} preamble encoding.
-     *
-     * @param localPreamble the local preamble encoding
-     * @return the {@link ScanResult} encoding of the Preamble
-     *
-     * @hide
-     */
-    static int translateFromLocalToScanResultPreamble(@PreambleType int localPreamble) {
-        switch (localPreamble) {
-            case PREAMBLE_LEGACY:
-                return ScanResult.PREAMBLE_LEGACY;
-            case PREAMBLE_HT:
-                return ScanResult.PREAMBLE_HT;
-            case PREAMBLE_VHT:
-                return ScanResult.PREAMBLE_VHT;
-            case PREAMBLE_HE:
-                return ScanResult.PREAMBLE_HE;
-            case PREAMBLE_EHT:
-                return ScanResult.PREAMBLE_EHT;
-            default:
-                throw new IllegalArgumentException(
-                        "translateFromLocalPreamble: bad " + localPreamble);
+                        "translateScanResultChannelWidth: bad " + scanResultChannelWidth);
         }
     }
 }
diff --git a/framework/java/android/net/wifi/rtt/WifiRttManager.java b/framework/java/android/net/wifi/rtt/WifiRttManager.java
index 3ef865c..865702a 100644
--- a/framework/java/android/net/wifi/rtt/WifiRttManager.java
+++ b/framework/java/android/net/wifi/rtt/WifiRttManager.java
@@ -20,7 +20,6 @@
 import static android.Manifest.permission.ACCESS_WIFI_STATE;
 import static android.Manifest.permission.CHANGE_WIFI_STATE;
 import static android.Manifest.permission.LOCATION_HARDWARE;
-import static android.Manifest.permission.NEARBY_WIFI_DEVICES;
 
 import android.annotation.CallbackExecutor;
 import android.annotation.NonNull;
@@ -30,15 +29,11 @@
 import android.annotation.SystemApi;
 import android.annotation.SystemService;
 import android.content.Context;
-import android.net.wifi.WifiManager;
 import android.os.Binder;
-import android.os.Bundle;
 import android.os.RemoteException;
 import android.os.WorkSource;
 import android.util.Log;
 
-import com.android.modules.utils.build.SdkLevel;
-
 import java.util.List;
 import java.util.concurrent.Executor;
 
@@ -108,20 +103,13 @@
     /**
      * Initiate a request to range to a set of devices specified in the {@link RangingRequest}.
      * Results will be returned in the {@link RangingResultCallback} set of callbacks.
-     * <p>
-     * Ranging request with only Wifi Aware peers can be performed with either
-     * {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation", or
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}. All other types of ranging requests
-     * require {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
      *
      * @param request  A request specifying a set of devices whose distance measurements are
      *                 requested.
      * @param executor The Executor on which to run the callback.
      * @param callback A callback for the result of the ranging request.
      */
-    @RequiresPermission(allOf = {ACCESS_FINE_LOCATION, CHANGE_WIFI_STATE, ACCESS_WIFI_STATE,
-            NEARBY_WIFI_DEVICES})
+    @RequiresPermission(allOf = {ACCESS_FINE_LOCATION, CHANGE_WIFI_STATE, ACCESS_WIFI_STATE})
     public void startRanging(@NonNull RangingRequest request,
             @NonNull @CallbackExecutor Executor executor, @NonNull RangingResultCallback callback) {
         startRanging(null, request, executor, callback);
@@ -130,12 +118,6 @@
     /**
      * Initiate a request to range to a set of devices specified in the {@link RangingRequest}.
      * Results will be returned in the {@link RangingResultCallback} set of callbacks.
-     * <p>
-     * Ranging request with only Wifi Aware peers can be performed with either
-     * {@link android.Manifest.permission#NEARBY_WIFI_DEVICES} with
-     * android:usesPermissionFlags="neverForLocation", or
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}. All other types of ranging requests
-     * require {@link android.Manifest.permission#ACCESS_FINE_LOCATION}.
      *
      * @param workSource A mechanism to specify an alternative work-source for the request.
      * @param request  A request specifying a set of devices whose distance measurements are
@@ -147,7 +129,7 @@
      */
     @SystemApi
     @RequiresPermission(allOf = {LOCATION_HARDWARE, ACCESS_FINE_LOCATION, CHANGE_WIFI_STATE,
-            ACCESS_WIFI_STATE, NEARBY_WIFI_DEVICES}, conditional = true)
+            ACCESS_WIFI_STATE})
     public void startRanging(@Nullable WorkSource workSource, @NonNull RangingRequest request,
             @NonNull @CallbackExecutor Executor executor, @NonNull RangingResultCallback callback) {
         if (VDBG) {
@@ -164,11 +146,6 @@
 
         Binder binder = new Binder();
         try {
-            Bundle extras = new Bundle();
-            if (SdkLevel.isAtLeastS()) {
-                extras.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                        mContext.getAttributionSource());
-            }
             mService.startRanging(binder, mContext.getOpPackageName(),
                     mContext.getAttributionTag(), workSource, request, new IRttCallback.Stub() {
                         @Override
@@ -183,7 +160,7 @@
                             clearCallingIdentity();
                             executor.execute(() -> callback.onRangingResults(results));
                         }
-                    }, extras);
+                    });
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
diff --git a/framework/tests/Android.bp b/framework/tests/Android.bp
index f3ed87a..4679fc0 100644
--- a/framework/tests/Android.bp
+++ b/framework/tests/Android.bp
@@ -25,8 +25,8 @@
     defaults: ["framework-wifi-test-defaults"],
 
     min_sdk_version: "30",
-    target_sdk_version: "33",
-    compile_multilib: "both",
+    target_sdk_version: "30",
+
     srcs: ["**/*.java"],
 
     jacoco: {
@@ -40,7 +40,8 @@
         "core-test-rules",
         "frameworks-base-testutils",
         "guava",
-        "wifi-modules-utils",
+        "mockito-target-minus-junit4",
+        "modules-utils-build",
         "net-tests-utils",
         "net-utils-framework-common",
         "truth-prebuilt",
@@ -51,13 +52,6 @@
         "android.test.base",
     ],
 
-    // These are required for mockito static/final mocking
-    // mockito-target-extended-minus-junit4 is already included in frameworks-base-testutils
-    jni_libs: [
-        "libdexmakerjvmtiagent",
-        "libstaticjvmtiagent",
-    ],
-
     test_suites: [
         "general-tests",
         "mts-wifi",
diff --git a/framework/tests/AndroidManifest.xml b/framework/tests/AndroidManifest.xml
index d3b77e6..8fcf78f 100644
--- a/framework/tests/AndroidManifest.xml
+++ b/framework/tests/AndroidManifest.xml
@@ -18,7 +18,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="android.net.wifi.test">
 
-    <application android:debuggable="true">
+    <application>
         <uses-library android:name="android.test.runner"/>
         <activity android:label="WifiTestDummyLabel"
              android:name="WifiTestDummyName"
diff --git a/framework/tests/src/android/net/wifi/ScanResultTest.java b/framework/tests/src/android/net/wifi/ScanResultTest.java
index 965505a..c26e535 100644
--- a/framework/tests/src/android/net/wifi/ScanResultTest.java
+++ b/framework/tests/src/android/net/wifi/ScanResultTest.java
@@ -16,10 +16,6 @@
 
 package android.net.wifi;
 
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
-
-import static com.google.common.truth.Truth.assertThat;
-
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -28,21 +24,14 @@
 import static org.mockito.Mockito.validateMockitoUsage;
 
 import android.net.wifi.ScanResult.InformationElement;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.Parcel;
 
 import androidx.test.filters.SmallTest;
 
-import com.android.dx.mockito.inline.extended.ExtendedMockito;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.MockitoAnnotations;
-import org.mockito.MockitoSession;
-
-import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * Unit tests for {@link android.net.wifi.WifiScanner}.
@@ -50,7 +39,6 @@
 @SmallTest
 public class ScanResultTest {
     public static final String TEST_SSID = "\"test_ssid\"";
-    public static final String TEST_SSID_NON_UTF_8 = "B9C8B8E8";
     public static final String TEST_BSSID = "04:ac:fe:45:34:10";
     public static final String TEST_CAPS = "CCMP";
     public static final int TEST_LEVEL = -56;
@@ -165,18 +153,6 @@
     }
 
     /**
-     * Verify parcel read/write for ScanResult with non-UTF-8 SSID.
-     */
-    @Test
-    public void verifyScanResultParcelWithNonUtf8Ssid() throws Exception {
-        ScanResult writeScanResult = createScanResult();
-        writeScanResult.setWifiSsid(WifiSsid.fromString(TEST_SSID_NON_UTF_8));
-        ScanResult readScanResult = parcelReadWrite(writeScanResult);
-        assertScanResultEquals(writeScanResult, readScanResult);
-    }
-
-
-    /**
      * Verify parcel read/write for ScanResult.
      */
     @Test
@@ -290,22 +266,6 @@
     }
 
     /**
-     * Verify toString for ScanResult with non-UTF-8 SSID.
-     */
-    @Test
-    public void verifyScanResultToStringWithNonUtf8Ssid() throws Exception {
-        ScanResult scanResult = createScanResult();
-        scanResult.setWifiSsid(WifiSsid.fromString(TEST_SSID_NON_UTF_8));
-        assertEquals("SSID: B9C8B8E8, BSSID: 04:ac:fe:45:34:10, capabilities: CCMP, "
-                + "level: -56, frequency: 2412, timestamp: 2480, "
-                + "distance: 0(cm), distanceSd: 0(cm), "
-                + "passpoint: no, ChannelBandwidth: 0, centerFreq0: 0, centerFreq1: 0, "
-                + "standard: 11ac, "
-                + "80211mcResponder: is not supported, "
-                + "Radio Chain Infos: null, interface name: test_ifname", scanResult.toString());
-    }
-
-    /**
      * verify frequency to channel conversion for all possible frequencies.
      */
     @Test
@@ -326,46 +286,6 @@
     }
 
     /**
-     * Verify that getSecurityTypes returns the types derived from the generated security params
-     */
-    @Test
-    public void verifyGetSecurityTypesDerivedFromSecurityParams() {
-        List<Integer> wifiConfigSecurityTypes = List.of(
-                WifiConfiguration.SECURITY_TYPE_OPEN,
-                WifiConfiguration.SECURITY_TYPE_WEP,
-                WifiConfiguration.SECURITY_TYPE_PSK,
-                WifiConfiguration.SECURITY_TYPE_EAP,
-                WifiConfiguration.SECURITY_TYPE_SAE,
-                WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT,
-                WifiConfiguration.SECURITY_TYPE_OWE,
-                WifiConfiguration.SECURITY_TYPE_WAPI_PSK,
-                WifiConfiguration.SECURITY_TYPE_WAPI_CERT,
-                WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE,
-                WifiConfiguration.SECURITY_TYPE_OSEN,
-                WifiConfiguration.SECURITY_TYPE_PASSPOINT_R1_R2,
-                WifiConfiguration.SECURITY_TYPE_PASSPOINT_R3);
-        List<SecurityParams> securityParamsList = wifiConfigSecurityTypes.stream()
-                .map(SecurityParams::createSecurityParamsBySecurityType)
-                .collect(Collectors.toList());
-        List<Integer> wifiInfoSecurityTypes = wifiConfigSecurityTypes.stream()
-                .map(WifiInfo::convertWifiConfigurationSecurityType)
-                .collect(Collectors.toList());
-
-        MockitoSession session =
-                ExtendedMockito.mockitoSession().spyStatic(ScanResultUtil.class).startMocking();
-        try {
-            ScanResult scanResult = new ScanResult();
-            scanResult.capabilities = "";
-            doReturn(securityParamsList).when(
-                    () -> ScanResultUtil.generateSecurityParamsListFromScanResult(scanResult));
-            assertThat(scanResult.getSecurityTypes())
-                    .asList().containsExactlyElementsIn(wifiInfoSecurityTypes);
-        } finally {
-            session.finishMocking();
-        }
-    }
-
-    /**
      * Write the provided {@link ScanResult} to a parcel and deserialize it.
      */
     private static ScanResult parcelReadWrite(ScanResult writeResult) throws Exception {
@@ -377,7 +297,7 @@
 
     private static ScanResult createScanResult() {
         ScanResult result = new ScanResult();
-        result.setWifiSsid(WifiSsid.fromString(TEST_SSID));
+        result.wifiSsid = WifiSsid.createFromAsciiEncoded(TEST_SSID);
         result.BSSID = TEST_BSSID;
         result.capabilities = TEST_CAPS;
         result.level = TEST_LEVEL;
@@ -391,7 +311,6 @@
 
     private static void assertScanResultEquals(ScanResult expected, ScanResult actual) {
         assertEquals(expected.SSID, actual.SSID);
-        assertEquals(expected.getWifiSsid(), actual.getWifiSsid());
         assertEquals(expected.BSSID, actual.BSSID);
         assertEquals(expected.capabilities, actual.capabilities);
         assertEquals(expected.level, actual.level);
@@ -401,32 +320,4 @@
         assertArrayEquals(expected.radioChainInfos, actual.radioChainInfos);
         assertArrayEquals(expected.informationElements, actual.informationElements);
     }
-
-    /**
-     * Test ScanResult.getBand() function.
-     */
-    @Test
-    public void testScanResultGetBand() throws Exception {
-        ScanResult scanResult = createScanResult();
-        assertEquals(WifiScanner.WIFI_BAND_24_GHZ, scanResult.getBand());
-    }
-
-    /**
-     * Test ScanResult.toBand() function.
-     */
-    @Test
-    public void testScanResultToBand() throws Exception {
-        assertEquals(WifiScanner.WIFI_BAND_24_GHZ, ScanResult.toBand(TEST_FREQUENCY));
-    }
-
-    /**
-     * Test ScanResult.getBandFromOpClass() function.
-     */
-    @Test
-    public void testScanResultGetBandFromOpCalss() throws Exception {
-        assertEquals(WifiScanner.WIFI_BAND_24_GHZ, ScanResult.getBandFromOpClass(81, 11));
-        assertEquals(WifiScanner.WIFI_BAND_UNSPECIFIED, ScanResult.getBandFromOpClass(81, 36));
-        assertEquals(WifiScanner.WIFI_BAND_5_GHZ, ScanResult.getBandFromOpClass(120, 149));
-        assertEquals(WifiScanner.WIFI_BAND_6_GHZ, ScanResult.getBandFromOpClass(131, 32));
-    }
 }
diff --git a/framework/tests/src/android/net/wifi/SecurityParamsTest.java b/framework/tests/src/android/net/wifi/SecurityParamsTest.java
index 4f2e73b..c586ded 100644
--- a/framework/tests/src/android/net/wifi/SecurityParamsTest.java
+++ b/framework/tests/src/android/net/wifi/SecurityParamsTest.java
@@ -550,7 +550,7 @@
         parcelR.unmarshall(bytes, 0, bytes.length);
         parcelR.setDataPosition(0);
 
-        SecurityParams reParams = SecurityParams.CREATOR.createFromParcel(parcelR);
+        SecurityParams reParams = SecurityParams.createFromParcel(parcelR);
         assertEquals(params, reParams);
     }
 }
diff --git a/framework/tests/src/android/net/wifi/SoftApCapabilityTest.java b/framework/tests/src/android/net/wifi/SoftApCapabilityTest.java
index 389bc70..d59605c 100644
--- a/framework/tests/src/android/net/wifi/SoftApCapabilityTest.java
+++ b/framework/tests/src/android/net/wifi/SoftApCapabilityTest.java
@@ -30,8 +30,6 @@
 @SmallTest
 public class SoftApCapabilityTest {
 
-    private static final String DRIVER_COUNTRY_CODE = "US";
-
     /**
      * Verifies copy constructor.
      */
@@ -43,7 +41,6 @@
         int[] testSupported5Glist = {36, 149};
         int[] testSupported60Glist = {1, 2};
         SoftApCapability capability = new SoftApCapability(testSoftApFeature);
-        capability.setCountryCode(DRIVER_COUNTRY_CODE);
         capability.setMaxSupportedClients(10);
         capability.setSupportedChannelList(SoftApConfiguration.BAND_2GHZ, testSupported2Glist);
         capability.setSupportedChannelList(SoftApConfiguration.BAND_5GHZ, testSupported5Glist);
@@ -72,8 +69,6 @@
         capability.setSupportedChannelList(SoftApConfiguration.BAND_5GHZ, testSupported5Glist);
         capability.setSupportedChannelList(SoftApConfiguration.BAND_60GHZ, testSupported60Glist);
 
-        capability.setCountryCode(DRIVER_COUNTRY_CODE);
-
         Parcel parcelW = Parcel.obtain();
         capability.writeToParcel(parcelW, 0);
         byte[] bytes = parcelW.marshall();
diff --git a/framework/tests/src/android/net/wifi/SoftApConfigurationTest.java b/framework/tests/src/android/net/wifi/SoftApConfigurationTest.java
index c0cae0c..eb9dbb3 100644
--- a/framework/tests/src/android/net/wifi/SoftApConfigurationTest.java
+++ b/framework/tests/src/android/net/wifi/SoftApConfigurationTest.java
@@ -16,14 +16,9 @@
 
 package android.net.wifi;
 
-import static android.net.wifi.ScanResult.InformationElement.EID_VSA;
-
 import static com.google.common.truth.Truth.assertThat;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThrows;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeTrue;
 
@@ -46,22 +41,6 @@
 public class SoftApConfigurationTest {
     private static final String TEST_CHAR_SET_AS_STRING = "abcdefghijklmnopqrstuvwxyz0123456789";
     private static final String TEST_BSSID = "aa:22:33:aa:bb:cc";
-    private static final List<ScanResult.InformationElement> TEST_TWO_VENDOR_ELEMENTS =
-            new ArrayList<>(Arrays.asList(
-                    new ScanResult.InformationElement(EID_VSA, 0, new byte[]{ 1, 2, 3, 4 }),
-                    new ScanResult.InformationElement(
-                            EID_VSA,
-                            0,
-                            new byte[]{ (byte) 170, (byte) 187, (byte) 204, (byte) 221 })
-                    ));
-    private static final List<ScanResult.InformationElement> TEST_TWO_VENDOR_ELEMENTS_INVALID =
-            new ArrayList<>(Arrays.asList(
-                    new ScanResult.InformationElement(EID_VSA, 0, new byte[]{ 1, 2, 3, 4 }),
-                    new ScanResult.InformationElement(
-                            (byte) 222,
-                            0,
-                            new byte[]{ (byte) 170, (byte) 187, (byte) 204, (byte) 221 })
-                    ));
 
     private SoftApConfiguration parcelUnparcel(SoftApConfiguration configIn) {
         Parcel parcel = Parcel.obtain();
@@ -95,36 +74,27 @@
     @Test
     public void testBasicSettings() {
         MacAddress testBssid = MacAddress.fromString(TEST_BSSID);
-        String utf8Ssid = "ssid";
         SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setSsid(utf8Ssid)
+                .setSsid("ssid")
+                .setBssid(testBssid)
                 .build();
-        assertThat(original.getSsid()).isEqualTo(utf8Ssid);
-        assertThat(original.getWifiSsid()).isEqualTo(WifiSsid.fromUtf8Text(utf8Ssid));
+        assertThat(original.getSsid()).isEqualTo("ssid");
+        assertThat(original.getBssid()).isEqualTo(testBssid);
         assertThat(original.getPassphrase()).isNull();
         assertThat(original.getSecurityType()).isEqualTo(SoftApConfiguration.SECURITY_TYPE_OPEN);
         assertThat(original.getBand()).isEqualTo(SoftApConfiguration.BAND_2GHZ);
         assertThat(original.getChannel()).isEqualTo(0);
         assertThat(original.isHiddenSsid()).isEqualTo(false);
         assertThat(original.getMaxNumberOfClients()).isEqualTo(0);
-        assertThat(original.getPersistentRandomizedMacAddress()).isNull();
         if (SdkLevel.isAtLeastS()) {
+            assertThat(original.getMacRandomizationSetting())
+                    .isEqualTo(SoftApConfiguration.RANDOMIZATION_PERSISTENT);
             assertThat(original.isBridgedModeOpportunisticShutdownEnabled())
                     .isEqualTo(true);
             assertThat(original.isIeee80211axEnabled())
                     .isEqualTo(true);
             assertThat(original.isUserConfiguration())
                     .isEqualTo(true);
-            if (SdkLevel.isAtLeastT()) {
-                assertThat(original.getBridgedModeOpportunisticShutdownTimeoutMillis())
-                        .isEqualTo(SoftApConfiguration.DEFAULT_TIMEOUT);
-                assertThat(original.getMacRandomizationSetting())
-                        .isEqualTo(SoftApConfiguration.RANDOMIZATION_NON_PERSISTENT);
-                assertThat(original.getVendorElements().size()).isEqualTo(0);
-            } else {
-                assertThat(original.getMacRandomizationSetting())
-                        .isEqualTo(SoftApConfiguration.RANDOMIZATION_PERSISTENT);
-            }
         }
 
         SoftApConfiguration unparceled = parcelUnparcel(original);
@@ -139,39 +109,6 @@
     }
 
     @Test
-    public void testSetWifiSsid() {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        // UTF-8
-        WifiSsid wifiSsidUtf8 = WifiSsid.fromUtf8Text("ssid");
-        SoftApConfiguration utf8Config = new SoftApConfiguration.Builder()
-                .setWifiSsid(wifiSsidUtf8)
-                .build();
-        assertThat(utf8Config.getWifiSsid()).isEqualTo(wifiSsidUtf8);
-        assertThat(utf8Config.getSsid()).isEqualTo("ssid");
-
-        SoftApConfiguration unparceled = parcelUnparcel(utf8Config);
-        assertThat(unparceled).isNotSameInstanceAs(utf8Config);
-        assertThat(unparceled).isEqualTo(utf8Config);
-        assertThat(unparceled.hashCode()).isEqualTo(utf8Config.hashCode());
-
-        // Non-UTF-8
-        byte[] nonUtf8Bytes =
-                new byte[]{(byte) 0x01, (byte) 0x23, (byte) 0x45, (byte) 0x67, (byte) 0x89};
-        WifiSsid wifiSsidNonUtf8 = WifiSsid.fromBytes(nonUtf8Bytes);
-        SoftApConfiguration nonUtf8Config = new SoftApConfiguration.Builder()
-                .setWifiSsid(wifiSsidNonUtf8)
-                .build();
-        assertThat(nonUtf8Config.getWifiSsid()).isEqualTo(wifiSsidNonUtf8);
-        assertThat(nonUtf8Config.getSsid()).isEqualTo(WifiManager.UNKNOWN_SSID);
-
-        unparceled = parcelUnparcel(nonUtf8Config);
-        assertThat(unparceled).isNotSameInstanceAs(nonUtf8Config);
-        assertThat(unparceled).isEqualTo(nonUtf8Config);
-        assertThat(unparceled.hashCode()).isEqualTo(nonUtf8Config.hashCode());
-    }
-
-    @Test
     public void testWpa2() {
         SoftApConfiguration original = new SoftApConfiguration.Builder()
                 .setPassphrase("secretsecret", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
@@ -197,7 +134,6 @@
 
     @Test
     public void testWpa2WithAllFieldCustomized() {
-        MacAddress testRandomizedMacAddress = MacAddress.fromString(TEST_BSSID);
         List<MacAddress> testBlockedClientList = new ArrayList<>();
         List<MacAddress> testAllowedClientList = new ArrayList<>();
         testBlockedClientList.add(MacAddress.fromString("11:22:33:44:55:66"));
@@ -211,8 +147,7 @@
                 .setShutdownTimeoutMillis(500000)
                 .setClientControlByUserEnabled(true)
                 .setBlockedClientList(testBlockedClientList)
-                .setAllowedClientList(testAllowedClientList)
-                .setRandomizedMacAddress(testRandomizedMacAddress);
+                .setAllowedClientList(testAllowedClientList);
         if (SdkLevel.isAtLeastS()) {
             originalBuilder.setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE);
             originalBuilder.setBridgedModeOpportunisticShutdownEnabled(false);
@@ -220,11 +155,6 @@
             originalBuilder.setUserConfiguration(false);
         }
 
-        if (SdkLevel.isAtLeastT()) {
-            originalBuilder.setBridgedModeOpportunisticShutdownTimeoutMillis(300_000);
-            originalBuilder.setVendorElements(TEST_TWO_VENDOR_ELEMENTS);
-        }
-
         SoftApConfiguration original = originalBuilder.build();
         assertThat(original.getPassphrase()).isEqualTo("secretsecret");
         assertThat(original.getSecurityType()).isEqualTo(
@@ -238,8 +168,6 @@
         assertThat(original.isClientControlByUserEnabled()).isEqualTo(true);
         assertThat(original.getBlockedClientList()).isEqualTo(testBlockedClientList);
         assertThat(original.getAllowedClientList()).isEqualTo(testAllowedClientList);
-        assertThat(original.getPersistentRandomizedMacAddress())
-                .isEqualTo(testRandomizedMacAddress);
         if (SdkLevel.isAtLeastS()) {
             assertThat(original.getMacRandomizationSetting())
                     .isEqualTo(SoftApConfiguration.RANDOMIZATION_NONE);
@@ -250,12 +178,6 @@
             assertThat(original.isUserConfiguration())
                     .isEqualTo(false);
         }
-        if (SdkLevel.isAtLeastT()) {
-            assertThat(original.getBridgedModeOpportunisticShutdownTimeoutMillis())
-                    .isEqualTo(300_000);
-            assertThat(original.getVendorElements())
-                    .isEqualTo(TEST_TWO_VENDOR_ELEMENTS);
-        }
 
         SoftApConfiguration unparceled = parcelUnparcel(original);
         assertThat(unparceled).isNotSameInstanceAs(original);
@@ -321,70 +243,6 @@
         assertThat(copy.hashCode()).isEqualTo(original.hashCode());
     }
 
-    @Test
-    public void testWpa3OweTransition() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setPassphrase(null,
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION)
-                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(false)
-                .build();
-        assertThat(original.getSecurityType()).isEqualTo(
-                SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION);
-        assertThat(original.getPassphrase()).isEqualTo(null);
-        assertThat(original.getBand()).isEqualTo(SoftApConfiguration.BAND_5GHZ);
-        assertThat(original.getChannel()).isEqualTo(149);
-        assertThat(original.isHiddenSsid()).isEqualTo(false);
-
-        SoftApConfiguration unparceled = parcelUnparcel(original);
-        assertThat(unparceled).isNotSameInstanceAs(original);
-        assertThat(unparceled).isEqualTo(original);
-        assertThat(unparceled.hashCode()).isEqualTo(original.hashCode());
-
-        SoftApConfiguration copy = new SoftApConfiguration.Builder(original).build();
-        assertThat(copy).isNotSameInstanceAs(original);
-        assertThat(copy).isEqualTo(original);
-        assertThat(copy.hashCode()).isEqualTo(original.hashCode());
-
-        assertThrows(IllegalArgumentException.class,
-                () -> new SoftApConfiguration.Builder().setPassphrase(
-                        "something or other",
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION));
-    }
-
-    @Test
-    public void testWpa3Owe() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setPassphrase(null,
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_OWE)
-                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(false)
-                .build();
-        assertThat(original.getSecurityType()).isEqualTo(
-                SoftApConfiguration.SECURITY_TYPE_WPA3_OWE);
-        assertThat(original.getPassphrase()).isEqualTo(null);
-        assertThat(original.getBand()).isEqualTo(SoftApConfiguration.BAND_5GHZ);
-        assertThat(original.getChannel()).isEqualTo(149);
-        assertThat(original.isHiddenSsid()).isEqualTo(false);
-
-        SoftApConfiguration unparceled = parcelUnparcel(original);
-        assertThat(unparceled).isNotSameInstanceAs(original);
-        assertThat(unparceled).isEqualTo(original);
-        assertThat(unparceled.hashCode()).isEqualTo(original.hashCode());
-
-        SoftApConfiguration copy = new SoftApConfiguration.Builder(original).build();
-        assertThat(copy).isNotSameInstanceAs(original);
-        assertThat(copy).isEqualTo(original);
-        assertThat(copy.hashCode()).isEqualTo(original.hashCode());
-
-        assertThrows(IllegalArgumentException.class,
-                () -> new SoftApConfiguration.Builder().setPassphrase(
-                        "something or other",
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_OWE));
-    }
-
     @Test(expected = IllegalArgumentException.class)
     public void testInvalidBroadcastBssid() {
         SoftApConfiguration original = new SoftApConfiguration.Builder()
@@ -400,25 +258,49 @@
     }
 
     @Test(expected = IllegalArgumentException.class)
+    public void testInvalidShortPasswordLengthForWpa2() {
+        SoftApConfiguration original = new SoftApConfiguration.Builder()
+                .setPassphrase(generateRandomString(SoftApConfiguration.PSK_MIN_LEN - 1),
+                        SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
+                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
+                .setHiddenSsid(true)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testInvalidLongPasswordLengthForWpa2() {
+        SoftApConfiguration original = new SoftApConfiguration.Builder()
+                .setPassphrase(generateRandomString(SoftApConfiguration.PSK_MAX_LEN + 1),
+                        SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
+                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
+                .setHiddenSsid(true)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testInvalidShortPasswordLengthForWpa3SaeTransition() {
+        SoftApConfiguration original = new SoftApConfiguration.Builder()
+                .setPassphrase(generateRandomString(SoftApConfiguration.PSK_MIN_LEN - 1),
+                        SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION)
+                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
+                .setHiddenSsid(true)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testInvalidLongPasswordLengthForWpa3SaeTransition() {
+        SoftApConfiguration original = new SoftApConfiguration.Builder()
+                .setPassphrase(generateRandomString(SoftApConfiguration.PSK_MAX_LEN + 1),
+                        SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION)
+                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
+                .setHiddenSsid(true)
+                .build();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
     public void testInvalieShutdownTimeoutMillis() {
         SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setShutdownTimeoutMillis(-2)
-                .build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testZeroIsInvalidBridgedModeOpportunisticShutdownTimeoutMillis() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setBridgedModeOpportunisticShutdownTimeoutMillis(0)
-                .build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testInvalidBridgedModeOpportunisticShutdownTimeoutMillis() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setBridgedModeOpportunisticShutdownTimeoutMillis(-2)
+                .setShutdownTimeoutMillis(-1)
                 .build();
     }
 
@@ -664,124 +546,4 @@
                 .setChannels(invalid_channels)
                 .build();
     }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testInvalidVendorElementsID() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setVendorElements(TEST_TWO_VENDOR_ELEMENTS_INVALID)
-                .build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testInvalidVendorElementsDuplicate() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        List<ScanResult.InformationElement> dupElements = new ArrayList<>(TEST_TWO_VENDOR_ELEMENTS);
-        dupElements.addAll(TEST_TWO_VENDOR_ELEMENTS);
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setVendorElements(dupElements)
-                .build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testThrowsExceptionWhenBssidSetButMacRandomizationSettingIsPersistent() {
-        assumeTrue(SdkLevel.isAtLeastS());
-        MacAddress testBssid = MacAddress.fromString(TEST_BSSID);
-        SoftApConfiguration config_setBssidAfterSetMacRandomizationSettingToPersistent =
-                new SoftApConfiguration.Builder()
-                .setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_PERSISTENT)
-                .setBssid(testBssid)
-                .build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testThrowsExceptionWhenBssidSetButMacRandomizationSettingIsNonPersistent() {
-        assumeTrue(SdkLevel.isAtLeastS());
-        MacAddress testBssid = MacAddress.fromString(TEST_BSSID);
-        SoftApConfiguration config_setBssidAfterSetMacRandomizationSettingToNonPersistent =
-                new SoftApConfiguration.Builder()
-                .setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NON_PERSISTENT)
-                .setBssid(testBssid)
-                .build();
-    }
-
-    @Test
-    public void testSetBssidSucceededWWithDisableMacRandomizationSetting() {
-        assumeTrue(SdkLevel.isAtLeastS());
-        MacAddress testBssid = MacAddress.fromString(TEST_BSSID);
-        SoftApConfiguration config_setBssidAfterSetMacRandomizationSettingToNone =
-                new SoftApConfiguration.Builder()
-                .setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE)
-                .setBssid(testBssid)
-                .build();
-        assertEquals(config_setBssidAfterSetMacRandomizationSettingToNone.getBssid(),
-                testBssid);
-    }
-
-    @Test
-    public void testSetAllowedAcsChannels() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        SoftApConfiguration config = new SoftApConfiguration.Builder()
-                .build();
-        assertEquals(0, config.getAllowedAcsChannels(SoftApConfiguration.BAND_2GHZ).length);
-        assertEquals(0, config.getAllowedAcsChannels(SoftApConfiguration.BAND_5GHZ).length);
-        assertEquals(0, config.getAllowedAcsChannels(SoftApConfiguration.BAND_6GHZ).length);
-
-        int[] channels2g = {1, 6, 11};
-        int[] channels5g = {36, 149, 136};
-        int[] channels6g = {1, 2, 3};
-
-        config = new SoftApConfiguration.Builder()
-                .setAllowedAcsChannels(SoftApConfiguration.BAND_2GHZ, channels2g)
-                .setAllowedAcsChannels(SoftApConfiguration.BAND_5GHZ, channels5g)
-                .setAllowedAcsChannels(SoftApConfiguration.BAND_6GHZ, channels6g)
-                .build();
-        assertArrayEquals(channels2g, config.getAllowedAcsChannels(SoftApConfiguration.BAND_2GHZ));
-        assertArrayEquals(channels5g, config.getAllowedAcsChannels(SoftApConfiguration.BAND_5GHZ));
-        assertArrayEquals(channels6g, config.getAllowedAcsChannels(SoftApConfiguration.BAND_6GHZ));
-    }
-
-    @Test
-    public void testSetAllowedAcsChannelsInvalidValues() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        int[] channels2g = {1, 6, 11, 50};
-        int[] channels5g = {36, 7, 149, 800};
-        int[] channels6g = {1, 2, -1, 3};
-
-        assertThrows(IllegalArgumentException.class,
-                () -> new SoftApConfiguration.Builder()
-                        .setAllowedAcsChannels(SoftApConfiguration.BAND_2GHZ, channels2g));
-        assertThrows(IllegalArgumentException.class,
-                () -> new SoftApConfiguration.Builder()
-                        .setAllowedAcsChannels(SoftApConfiguration.BAND_5GHZ, channels5g));
-        assertThrows(IllegalArgumentException.class,
-                () -> new SoftApConfiguration.Builder()
-                        .setAllowedAcsChannels(SoftApConfiguration.BAND_6GHZ, channels6g));
-    }
-
-    @Test
-    public void testMaxChannelBandwidth() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        SoftApConfiguration config = new SoftApConfiguration.Builder()
-                .build();
-        assertEquals(SoftApInfo.CHANNEL_WIDTH_AUTO, config.getMaxChannelBandwidth());
-
-        config = new SoftApConfiguration.Builder()
-                .setMaxChannelBandwidth(SoftApInfo.CHANNEL_WIDTH_20MHZ)
-                .build();
-        assertEquals(SoftApInfo.CHANNEL_WIDTH_20MHZ, config.getMaxChannelBandwidth());
-
-        config = new SoftApConfiguration.Builder()
-                .setMaxChannelBandwidth(SoftApInfo.CHANNEL_WIDTH_AUTO)
-                .build();
-        assertEquals(SoftApInfo.CHANNEL_WIDTH_AUTO, config.getMaxChannelBandwidth());
-
-        // Invalid value
-        assertThrows(IllegalArgumentException.class,
-                () -> new SoftApConfiguration.Builder()
-                        .setMaxChannelBandwidth(SoftApInfo.CHANNEL_WIDTH_80MHZ_PLUS_MHZ));
-    }
 }
diff --git a/framework/tests/src/android/net/wifi/WifiConfigurationTest.java b/framework/tests/src/android/net/wifi/WifiConfigurationTest.java
index a40f39e..1eb7661 100644
--- a/framework/tests/src/android/net/wifi/WifiConfigurationTest.java
+++ b/framework/tests/src/android/net/wifi/WifiConfigurationTest.java
@@ -17,7 +17,6 @@
 package android.net.wifi;
 
 import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_EAP;
-import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_EAP_SUITE_B;
 import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE;
 import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT;
 import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_OPEN;
@@ -30,7 +29,6 @@
 import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_WAPI_CERT;
 import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_WAPI_PSK;
 import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_WEP;
-import static android.net.wifi.WifiConfiguration.getSecurityTypeName;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
@@ -42,14 +40,12 @@
 import static org.junit.Assume.assumeTrue;
 
 import android.net.MacAddress;
-import android.net.ProxyInfo;
 import android.net.wifi.WifiConfiguration.GroupCipher;
 import android.net.wifi.WifiConfiguration.KeyMgmt;
 import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
 import android.net.wifi.WifiConfiguration.PairwiseCipher;
 import android.net.wifi.WifiConfiguration.Protocol;
 import android.os.Parcel;
-import android.os.ParcelUuid;
 import android.util.Pair;
 
 import androidx.test.filters.SmallTest;
@@ -73,18 +69,6 @@
     private static final int TEST_CARRIER_ID = 1234;
     private static final int TEST_SUB_ID = 3;
     private static final String TEST_PACKAGE_NAME = "google.com";
-    private static final int[] SECURITY_TYPES_EXCEPT_PASSPOINT = {
-            SECURITY_TYPE_OPEN,
-            SECURITY_TYPE_WEP,
-            SECURITY_TYPE_PSK,
-            SECURITY_TYPE_EAP,
-            SECURITY_TYPE_SAE,
-            SECURITY_TYPE_EAP_SUITE_B,
-            SECURITY_TYPE_OWE,
-            SECURITY_TYPE_WAPI_PSK,
-            SECURITY_TYPE_WAPI_CERT,
-            SECURITY_TYPE_EAP_WPA3_ENTERPRISE,
-            SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT};
 
     @Before
     public void setUp() {
@@ -102,7 +86,6 @@
     public void testWifiConfigurationParcel() {
         String cookie = "C O.o |<IE";
         WifiConfiguration config = new WifiConfiguration();
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
         config.setPasspointManagementObjectTree(cookie);
         config.trusted = false;
         config.oemPaid = true;
@@ -115,9 +98,6 @@
         MacAddress macBeforeParcel = config.getRandomizedMacAddress();
         config.subscriptionId = 1;
         config.carrierId = 1189;
-        config.restricted = true;
-        config.isCurrentlyConnected = true;
-        config.setSubscriptionGroup(ParcelUuid.fromString("0000110B-0000-1000-8000-00805F9B34FB"));
         Parcel parcelW = Parcel.obtain();
         config.writeToParcel(parcelW, 0);
         byte[] bytes = parcelW.marshall();
@@ -138,17 +118,6 @@
         assertTrue(reconfig.oemPaid);
         assertTrue(reconfig.oemPrivate);
         assertTrue(reconfig.carrierMerged);
-        assertEquals(config.carrierId, reconfig.carrierId);
-        assertEquals(config.subscriptionId, reconfig.subscriptionId);
-        assertEquals(config.getSubscriptionGroup(), reconfig.getSubscriptionGroup());
-        assertTrue(reconfig.restricted);
-        assertTrue(reconfig.isCurrentlyConnected);
-        assertEquals(config.getBssidAllowlist(), reconfig.getBssidAllowlist());
-        assertEquals(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_PSK),
-                reconfig.getSecurityParams(
-                        WifiConfiguration.SECURITY_TYPE_PSK));
 
         Parcel parcelWW = Parcel.obtain();
         reconfig.writeToParcel(parcelWW, 0);
@@ -172,8 +141,6 @@
         MacAddress macBeforeParcel = config.getRandomizedMacAddress();
         config.subscriptionId = 1;
         config.carrierId = 1189;
-        config.restricted = true;
-        config.isCurrentlyConnected = true;
 
         WifiConfiguration reconfig = new WifiConfiguration(config);
 
@@ -186,10 +153,6 @@
         assertTrue(reconfig.oemPaid);
         assertTrue(reconfig.oemPrivate);
         assertTrue(reconfig.carrierMerged);
-        assertEquals(config.carrierId, reconfig.carrierId);
-        assertEquals(config.subscriptionId, reconfig.subscriptionId);
-        assertTrue(reconfig.restricted);
-        assertTrue(reconfig.isCurrentlyConnected);
     }
 
     @Test
@@ -605,43 +568,6 @@
     }
 
     /**
-     * Ensure that {@link NetworkSelectionStatus#setCandidateSecurityParams(SecurityParams)}
-     * and {{@link NetworkSelectionStatus#getCandidateSecurityParams()} work
-     * as expectation.
-     */
-    @Test
-    public void testCandidateSecurityParams() {
-        NetworkSelectionStatus status = new NetworkSelectionStatus();
-        SecurityParams params = SecurityParams.createSecurityParamsBySecurityType(
-                SECURITY_TYPE_PSK);
-        status.setCandidateSecurityParams(params);
-        assertEquals(params, status.getCandidateSecurityParams());
-    }
-
-    /**
-     * Ensure that {@link NetworkSelectionStatus#setLastUsedSecurityParams(SecurityParams)}
-     * and {{@link NetworkSelectionStatus#getLastUsedSecurityParams()} work
-     * as expectation.
-     */
-    @Test
-    public void testLastUsedSecurityParams() {
-        NetworkSelectionStatus status = new NetworkSelectionStatus();
-        SecurityParams params = SecurityParams.createSecurityParamsBySecurityType(
-                SECURITY_TYPE_PSK);
-        status.setLastUsedSecurityParams(params);
-        assertEquals(params, status.getLastUsedSecurityParams());
-    }
-
-
-    @Test
-    public void testSetHttpProxyShouldNotCrashOnBadInput() {
-        ProxyInfo badHttpProxy = new ProxyInfo((ProxyInfo) null);
-
-        WifiConfiguration wifiConfiguration = new WifiConfiguration();
-        wifiConfiguration.setHttpProxy(badHttpProxy);
-    }
-
-    /**
      * Ensure that {@link WifiConfiguration#setSecurityParams(int)} sets up the
      * {@link WifiConfiguration} object correctly for SAE security type.
      * @throws Exception
@@ -1019,17 +945,6 @@
         }
     }
 
-    private String createNetworkKey(String ssid, String keyMgmt, String providerName,
-            int carrierId, int subId, boolean isFromSuggestion) {
-        StringBuilder sb = new StringBuilder();
-        sb.append(ssid).append(keyMgmt);
-        if (isFromSuggestion) {
-            sb.append("_").append(providerName).append('-')
-                    .append(carrierId).append('-').append(subId);
-        }
-        return sb.toString();
-    }
-
     /** Verify that adding security types works as expected. */
     @Test
     public void testAddSecurityTypes() {
@@ -1315,69 +1230,4 @@
         List<SecurityParams> list = null;
         config.setSecurityParams(list);
     }
-
-    /**
-     * Verifies that getNetworkKeyFromSecurityType returns the correct String
-     * for networks of various different security types, the result should be stable.
-     *
-     * Note: DO NOT update the test if it happens failure! Fixed it is necessary, otherwise
-     * we will break Wi-Fi data usage functionality.
-     */
-    @Test
-    public void testGetNetworkKeyFromSecurityTypeString() {
-        WifiConfiguration config = new WifiConfiguration();
-        final String mSsid = "TestAP";
-        config.SSID = mSsid;
-        config.carrierId = TEST_CARRIER_ID;
-        config.subscriptionId = TEST_SUB_ID;
-        config.creatorName = TEST_PACKAGE_NAME;
-
-        for (int securityType : SECURITY_TYPES_EXCEPT_PASSPOINT) {
-            assertEquals(createNetworkKey(mSsid, getSecurityTypeName(securityType),
-                    TEST_PACKAGE_NAME, TEST_CARRIER_ID, TEST_SUB_ID, false),
-                    config.getNetworkKeyFromSecurityType(securityType));
-        }
-
-        // Test for passpoint configuration.
-        config.setPasspointUniqueId(TEST_PASSPOINT_UNIQUE_ID);
-        assertEquals(TEST_SUB_ID + "-" + TEST_PASSPOINT_UNIQUE_ID,
-                config.getNetworkKeyFromSecurityType(SECURITY_TYPE_PASSPOINT_R1_R2));
-    }
-
-    /**
-     * Verifies that getAllNetworkKeys returns the correct String set
-     * for networks of various different security types, the result should be stable.
-     *
-     * Note: DO NOT update the test if it happens failure! Fixed it is necessary, otherwise
-     * we will break Wi-Fi data usage functionality.
-     */
-    @Test
-    public void testGetAllPersistableNetworkKeysString() {
-        WifiConfiguration config = new WifiConfiguration();
-        final String mSsid = "TestAP";
-        config.SSID = mSsid;
-        config.carrierId = TEST_CARRIER_ID;
-        config.subscriptionId = TEST_SUB_ID;
-        config.creatorName = TEST_PACKAGE_NAME;
-        for (int securityType : SECURITY_TYPES_EXCEPT_PASSPOINT) {
-            config.setSecurityParams(securityType);
-            assertTrue(config.getAllNetworkKeys().contains(
-                    createNetworkKey(mSsid, getSecurityTypeName(securityType),
-                    TEST_PACKAGE_NAME, TEST_CARRIER_ID, TEST_SUB_ID, false)));
-        }
-
-        // Test with multi-security types
-        config.setSecurityParams(SECURITY_TYPE_PSK);
-        config.addSecurityParams(SECURITY_TYPE_SAE);
-        assertTrue(config.getAllNetworkKeys().contains(
-                createNetworkKey(mSsid, getSecurityTypeName(SECURITY_TYPE_PSK),
-                TEST_PACKAGE_NAME, TEST_CARRIER_ID, TEST_SUB_ID, false)));
-        assertTrue(config.getAllNetworkKeys().contains(
-                createNetworkKey(mSsid, getSecurityTypeName(SECURITY_TYPE_SAE),
-                TEST_PACKAGE_NAME, TEST_CARRIER_ID, TEST_SUB_ID, false)));
-        // Test for passpoint configuration.
-        config.setPasspointUniqueId(TEST_PASSPOINT_UNIQUE_ID);
-        assertTrue(config.getAllNetworkKeys().contains(
-                config.getNetworkKeyFromSecurityType(SECURITY_TYPE_PASSPOINT_R1_R2)));
-    }
 }
diff --git a/framework/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java b/framework/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
index 940a612..6b1ffb9 100644
--- a/framework/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
+++ b/framework/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
@@ -25,8 +25,6 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.junit.Assume.assumeTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
 
 import android.net.wifi.WifiEnterpriseConfig.Eap;
 import android.net.wifi.WifiEnterpriseConfig.Phase2;
@@ -56,7 +54,6 @@
     private static final String TEST_DOMAIN_SUFFIX_MATCH = "domainSuffixMatch";
     private static final String TEST_ALT_SUBJECT_MATCH = "DNS:server.test.com";
     private static final String TEST_DECORATED_IDENTITY_PREFIX = "androidwifi.dev!";
-    private static final long TEST_SELECTED_RCOI = 0xcafeL;
 
     private WifiEnterpriseConfig mEnterpriseConfig;
 
@@ -611,47 +608,6 @@
         assertEquals(TEST_DECORATED_IDENTITY_PREFIX, config.getDecoratedIdentityPrefix());
     }
 
-    @Test
-    public void testTrustOnFirstUse() {
-        WifiEnterpriseConfig config = new WifiEnterpriseConfig();
-
-        assertFalse(config.isTrustOnFirstUseEnabled());
-        config.enableTrustOnFirstUse(true);
-        assertTrue(config.isTrustOnFirstUseEnabled());
-        config.enableTrustOnFirstUse(false);
-        assertFalse(config.isTrustOnFirstUseEnabled());
-    }
-
-    @Test
-    public void testHasCaCertificate() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiEnterpriseConfig config = new WifiEnterpriseConfig();
-        assertFalse(config.hasCaCertificate());
-        config.setCaPath("/tmp/testCa.cert");
-        assertTrue(config.hasCaCertificate());
-
-        config = new WifiEnterpriseConfig();
-        assertFalse(config.hasCaCertificate());
-        config.setCaCertificate(FakeKeys.CA_CERT0);
-        assertTrue(config.hasCaCertificate());
-
-        config = new WifiEnterpriseConfig();
-        assertFalse(config.hasCaCertificate());
-        config.setCaCertificateAliases(new String[] {"single_alias 0"});
-        assertTrue(config.hasCaCertificate());
-    }
-
-    @Test
-    public void testUserApproveNoCaCert() {
-        WifiEnterpriseConfig config = new WifiEnterpriseConfig();
-
-        assertFalse(config.isUserApproveNoCaCert());
-        config.setUserApproveNoCaCert(true);
-        assertTrue(config.isUserApproveNoCaCert());
-        config.setUserApproveNoCaCert(false);
-        assertFalse(config.isUserApproveNoCaCert());
-    }
-
     /**
      * Verify that the set decorated identity prefix doesn't accept a malformed input.
      *
@@ -665,15 +621,6 @@
         config.setDecoratedIdentityPrefix(TEST_DECORATED_IDENTITY_PREFIX.replace('!', 'a'));
     }
 
-    @Test
-    public void testSetGetSelectedRcoi() {
-        WifiEnterpriseConfig config = new WifiEnterpriseConfig();
-
-        assertEquals(0, config.getSelectedRcoi());
-        config.setSelectedRcoi(TEST_SELECTED_RCOI);
-        assertEquals(TEST_SELECTED_RCOI, config.getSelectedRcoi());
-    }
-
     private void testIsEnterpriseConfigServerCertEnabled(int eapMethod) {
         WifiEnterpriseConfig configWithCertAndDomainSuffixMatch = createEnterpriseConfig(eapMethod,
                 Phase2.NONE, FakeKeys.CA_CERT0, null, TEST_DOMAIN_SUFFIX_MATCH, null);
@@ -709,49 +656,4 @@
         config.setAltSubjectMatch(altSubjectMatch);
         return config;
     }
-
-    /**
-     * Verify that setCaCertificate() raises IllegalArgumentException
-     * for a self-signed certificate.
-     *
-     * @throws IllegalArgumentException
-     */
-    @Test (expected = IllegalArgumentException.class)
-    public void testSetCaCertificateExceptionWithSelfSignedCert() throws Exception {
-        X509Certificate mockCert = mock(X509Certificate.class);
-        when(mockCert.getBasicConstraints()).thenReturn(-1);
-
-        mEnterpriseConfig.setCaCertificate(mockCert);
-    }
-
-    /**
-     * Verify that setCaCertificateForTrustOnFirstUse sunny case.
-     */
-    @Test
-    public void testSetCaCertificateForTrustOnFirstUseSuccess() throws Exception {
-        X509Certificate mockCert = mock(X509Certificate.class);
-        when(mockCert.getBasicConstraints()).thenReturn(-1);
-
-        mEnterpriseConfig.enableTrustOnFirstUse(true);
-
-        mEnterpriseConfig.setCaCertificateForTrustOnFirstUse(mockCert);
-        assertEquals(mEnterpriseConfig.getCaCertificate(), mockCert);
-    }
-
-    /**
-     * Verify that setCaCertificateForTrustOnFirstUse() raises IllegalArgumentException
-     * when Trust on First Use is not enabled.
-     *
-     * @throws IllegalArgumentException
-     */
-    @Test (expected = IllegalArgumentException.class)
-    public void testSetCaCertificateForTrustOnFirstUseExceptionWithNoTofuEnabled()
-            throws Exception {
-        X509Certificate mockCert = mock(X509Certificate.class);
-        when(mockCert.getBasicConstraints()).thenReturn(-1);
-
-        mEnterpriseConfig.enableTrustOnFirstUse(false);
-
-        mEnterpriseConfig.setCaCertificateForTrustOnFirstUse(mockCert);
-    }
 }
diff --git a/framework/tests/src/android/net/wifi/WifiInfoTest.java b/framework/tests/src/android/net/wifi/WifiInfoTest.java
index 5124ddd..7b72fc7 100644
--- a/framework/tests/src/android/net/wifi/WifiInfoTest.java
+++ b/framework/tests/src/android/net/wifi/WifiInfoTest.java
@@ -27,9 +27,7 @@
 import static org.junit.Assert.fail;
 import static org.junit.Assume.assumeTrue;
 
-import android.net.MacAddress;
 import android.net.NetworkCapabilities;
-import android.net.wifi.util.HexEncoding;
 import android.os.Parcel;
 import android.telephony.SubscriptionManager;
 
@@ -39,7 +37,6 @@
 
 import org.junit.Test;
 
-import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
@@ -65,65 +62,15 @@
     private static final int TEST_NETWORK_ID = 5;
     private static final int TEST_NETWORK_ID2 = 6;
     private static final int TEST_SUB_ID = 1;
-    private static final String TEST_NETWORK_KEY = "TestNetworkKey";
-    private static final String AP_MLD_MAC_ADDRESS = "22:33:44:55:66:77";
-    private static final String MLO_LINK_STA_MAC_ADDRESS = "12:34:56:78:9a:bc";
-    private static final String MLO_LINK_AP_MAC_ADDRESS = "bc:9a:78:56:34:12";
 
-    private void addMloInfo(WifiInfo info) {
-        info.setApMldMacAddress(MacAddress.fromString(AP_MLD_MAC_ADDRESS));
-        List<MloLink> links = new ArrayList<>();
-        MloLink link = new MloLink();
-        link.setStaMacAddress(MacAddress.fromString(MLO_LINK_STA_MAC_ADDRESS));
-        link.setApMacAddress(MacAddress.fromString(MLO_LINK_AP_MAC_ADDRESS));
-        links.add(link);
-        info.setAffiliatedMloLinks(links);
-    }
-
-    private void assertMloNoRedaction(WifiInfo info) {
-        assertNotNull(info.getApMldMacAddress());
-        assertEquals(AP_MLD_MAC_ADDRESS, info.getApMldMacAddress().toString());
-        List<MloLink> links = info.getAffiliatedMloLinks();
-        assertEquals(1, links.size());
-        for (MloLink link : links) {
-            assertNotNull(link.getApMacAddress());
-            assertEquals(MLO_LINK_AP_MAC_ADDRESS, link.getApMacAddress().toString());
-            assertNotNull(link.getStaMacAddress());
-            assertEquals(MLO_LINK_STA_MAC_ADDRESS, link.getStaMacAddress().toString());
-        }
-    }
-
-    private void assertMloLocalMacRedaction(WifiInfo info) {
-        assertNotNull(info.getApMldMacAddress());
-        assertEquals(AP_MLD_MAC_ADDRESS, info.getApMldMacAddress().toString());
-        List<MloLink> links = info.getAffiliatedMloLinks();
-        assertEquals(1, links.size());
-        for (MloLink link : links) {
-            assertNotNull(link.getApMacAddress());
-            assertEquals(MLO_LINK_AP_MAC_ADDRESS, link.getApMacAddress().toString());
-            assertNull(link.getStaMacAddress());
-        }
-    }
-
-    private void assertMloSensitiveLocationRedaction(WifiInfo info) {
-        assertNull(info.getApMldMacAddress());
-        List<MloLink> links = info.getAffiliatedMloLinks();
-        assertEquals(1, links.size());
-        for (MloLink link : links) {
-            assertNull(link.getApMacAddress());
-            assertNotNull(link.getStaMacAddress());
-            assertEquals(MLO_LINK_STA_MAC_ADDRESS, link.getStaMacAddress().toString());
-        }
-    }
-
-    private WifiInfo makeWifiInfoForRedactionTest(
+    private WifiInfo makeWifiInfoForNoRedactions(
             List<ScanResult.InformationElement> informationElements) {
         WifiInfo info = new WifiInfo();
         info.txSuccess = TEST_TX_SUCCESS;
         info.txRetries = TEST_TX_RETRIES;
         info.txBad = TEST_TX_BAD;
         info.rxSuccess = TEST_RX_SUCCESS;
-        info.setSSID(WifiSsid.fromUtf8Text(TEST_SSID));
+        info.setSSID(WifiSsid.createFromAsciiEncoded(TEST_SSID));
         info.setBSSID(TEST_BSSID);
         info.setNetworkId(TEST_NETWORK_ID);
         info.setTrusted(true);
@@ -141,10 +88,6 @@
         info.setInformationElements(informationElements);
         info.setIsPrimary(true);
         info.setMacAddress(TEST_BSSID);
-        if (SdkLevel.isAtLeastT()) {
-            addMloInfo(info);
-        }
-
         return info;
     }
 
@@ -158,7 +101,6 @@
         assertEquals(TEST_BSSID, info.getBSSID());
         assertEquals(TEST_NETWORK_ID, info.getNetworkId());
         assertTrue(info.isTrusted());
-        assertFalse((info.isRestricted()));
         assertTrue(info.isOsuAp());
         assertTrue(info.isPasspointAp());
         assertEquals(TEST_PACKAGE_NAME, info.getRequestingPackageName());
@@ -188,9 +130,6 @@
             assertEquals(TEST_SUB_ID, info.getSubscriptionId());
             assertTrue(info.isPrimary());
         }
-        if (SdkLevel.isAtLeastT()) {
-            assertMloNoRedaction(info);
-        }
     }
 
     /**
@@ -199,7 +138,7 @@
     @Test
     public void testWifiInfoRedactNoRedactions() throws Exception {
         List<ScanResult.InformationElement> informationElements = generateIes();
-        WifiInfo writeWifiInfo = makeWifiInfoForRedactionTest(informationElements);
+        WifiInfo writeWifiInfo = makeWifiInfoForNoRedactions(informationElements);
 
         // Make a copy which allows parcelling of location sensitive data.
         WifiInfo redactedWifiInfo = writeWifiInfo.makeCopy(NetworkCapabilities.REDACT_NONE);
@@ -210,9 +149,6 @@
         parcel.setDataPosition(0);
         WifiInfo readWifiInfo = WifiInfo.CREATOR.createFromParcel(parcel);
 
-        // Verify that redaction did not affect the original WifiInfo
-        assertNoRedaction(writeWifiInfo, informationElements);
-
         assertNoRedaction(redactedWifiInfo, informationElements);
         assertNoRedaction(readWifiInfo, informationElements);
 
@@ -222,6 +158,33 @@
         }
     }
 
+    private WifiInfo makeWifiInfoForLocationSensitiveRedaction() {
+        WifiInfo info = new WifiInfo();
+        info.txSuccess = TEST_TX_SUCCESS;
+        info.txRetries = TEST_TX_RETRIES;
+        info.txBad = TEST_TX_BAD;
+        info.rxSuccess = TEST_RX_SUCCESS;
+        info.setSSID(WifiSsid.createFromAsciiEncoded(TEST_SSID));
+        info.setBSSID(TEST_BSSID);
+        info.setNetworkId(TEST_NETWORK_ID);
+        info.setTrusted(true);
+        info.setOemPaid(true);
+        info.setOemPrivate(true);
+        info.setCarrierMerged(true);
+        info.setOsuAp(true);
+        info.setFQDN(TEST_FQDN);
+        info.setProviderFriendlyName(TEST_PROVIDER_NAME);
+        info.setRequestingPackageName(TEST_PACKAGE_NAME);
+        info.setWifiStandard(TEST_WIFI_STANDARD);
+        info.setMaxSupportedTxLinkSpeedMbps(TEST_MAX_SUPPORTED_TX_LINK_SPEED_MBPS);
+        info.setMaxSupportedRxLinkSpeedMbps(TEST_MAX_SUPPORTED_RX_LINK_SPEED_MBPS);
+        info.setSubscriptionId(TEST_SUB_ID);
+        info.setInformationElements(generateIes());
+        info.setIsPrimary(true);
+        info.setMacAddress(TEST_BSSID);
+        return info;
+    }
+
     private void assertLocationSensitiveRedaction(WifiInfo info) {
         assertNotNull(info);
         assertEquals(TEST_TX_SUCCESS, info.txSuccess);
@@ -232,7 +195,6 @@
         assertEquals(WifiInfo.DEFAULT_MAC_ADDRESS, info.getBSSID());
         assertEquals(WifiConfiguration.INVALID_NETWORK_ID, info.getNetworkId());
         assertTrue(info.isTrusted());
-        assertFalse(info.isRestricted());
         assertTrue(info.isOsuAp());
         assertFalse(info.isPasspointAp()); // fqdn & friendly name is masked.
         assertEquals(TEST_PACKAGE_NAME, info.getRequestingPackageName());
@@ -250,10 +212,6 @@
             assertEquals(TEST_SUB_ID, info.getSubscriptionId());
             assertTrue(info.isPrimary());
         }
-        assertEquals(null, info.getNetworkKey());
-        if (SdkLevel.isAtLeastT()) {
-            assertMloSensitiveLocationRedaction(info);
-        }
     }
 
     /**
@@ -261,8 +219,7 @@
      */
     @Test
     public void testWifiInfoRedactLocationSensitiveInfo() throws Exception {
-        List<ScanResult.InformationElement> informationElements = generateIes();
-        WifiInfo writeWifiInfo = makeWifiInfoForRedactionTest(informationElements);
+        WifiInfo writeWifiInfo = makeWifiInfoForLocationSensitiveRedaction();
 
         WifiInfo redactedWifiInfo =
                 writeWifiInfo.makeCopy(NetworkCapabilities.REDACT_FOR_ACCESS_FINE_LOCATION);
@@ -273,9 +230,6 @@
         parcel.setDataPosition(0);
         WifiInfo readWifiInfo = WifiInfo.CREATOR.createFromParcel(parcel);
 
-        // Verify that redaction did not affect the original WifiInfo
-        assertNoRedaction(writeWifiInfo, informationElements);
-
         assertLocationSensitiveRedaction(redactedWifiInfo);
         assertLocationSensitiveRedaction(readWifiInfo);
 
@@ -285,47 +239,13 @@
         }
     }
 
-    private void assertLocalMacAddressInfoRedaction(WifiInfo info) {
-        assertNotNull(info);
-        assertEquals(TEST_TX_SUCCESS, info.txSuccess);
-        assertEquals(TEST_TX_RETRIES, info.txRetries);
-        assertEquals(TEST_TX_BAD, info.txBad);
-        assertEquals(TEST_RX_SUCCESS, info.rxSuccess);
-        assertEquals("\"" + TEST_SSID + "\"", info.getSSID());
-        assertEquals(TEST_BSSID, info.getBSSID());
-        assertEquals(TEST_NETWORK_ID, info.getNetworkId());
-        assertTrue(info.isTrusted());
-        assertFalse(info.isRestricted());
-        assertTrue(info.isOsuAp());
-        assertTrue(info.isPasspointAp());
-        assertEquals(TEST_PACKAGE_NAME, info.getRequestingPackageName());
-
-        assertEquals(TEST_FQDN, info.getPasspointFqdn());
-        assertEquals(TEST_PROVIDER_NAME, info.getPasspointProviderFriendlyName());
-        assertEquals(TEST_WIFI_STANDARD, info.getWifiStandard());
-        assertEquals(TEST_MAX_SUPPORTED_TX_LINK_SPEED_MBPS, info.getMaxSupportedTxLinkSpeedMbps());
-        assertEquals(TEST_MAX_SUPPORTED_RX_LINK_SPEED_MBPS, info.getMaxSupportedRxLinkSpeedMbps());
-        assertEquals(WifiInfo.DEFAULT_MAC_ADDRESS, info.getMacAddress());
-        if (SdkLevel.isAtLeastS()) {
-            assertTrue(info.isOemPaid());
-            assertTrue(info.isOemPrivate());
-            assertTrue(info.isCarrierMerged());
-            assertEquals(TEST_SUB_ID, info.getSubscriptionId());
-            assertTrue(info.isPrimary());
-        }
-        assertEquals(null, info.getNetworkKey());
-        if (SdkLevel.isAtLeastT()) {
-            assertMloLocalMacRedaction(info);
-        }
-    }
-
     /**
      *  Verify redaction of WifiInfo with REDACT_FOR_LOCAL_MAC_ADDRESS.
      */
     @Test
     public void testWifiInfoRedactLocalMacAddressInfo() throws Exception {
-        List<ScanResult.InformationElement> informationElements = generateIes();
-        WifiInfo writeWifiInfo = makeWifiInfoForRedactionTest(informationElements);
+        WifiInfo writeWifiInfo = new WifiInfo();
+        writeWifiInfo.setMacAddress(TEST_BSSID);
 
         WifiInfo redactedWifiInfo =
                 writeWifiInfo.makeCopy(NetworkCapabilities.REDACT_FOR_LOCAL_MAC_ADDRESS);
@@ -336,11 +256,12 @@
         parcel.setDataPosition(0);
         WifiInfo readWifiInfo = WifiInfo.CREATOR.createFromParcel(parcel);
 
-        // Verify that redaction did not affect the original WifiInfo
-        assertNoRedaction(writeWifiInfo, informationElements);
+        assertNotNull(redactedWifiInfo);
+        assertEquals(WifiInfo.DEFAULT_MAC_ADDRESS, redactedWifiInfo.getMacAddress());
 
-        assertLocalMacAddressInfoRedaction(redactedWifiInfo);
-        assertLocalMacAddressInfoRedaction(readWifiInfo);
+        assertNotNull(readWifiInfo);
+        assertEquals(WifiInfo.DEFAULT_MAC_ADDRESS, readWifiInfo.getMacAddress());
+
         if (SdkLevel.isAtLeastS()) {
             // equals() was only introduced in S.
             assertEquals(redactedWifiInfo, readWifiInfo);
@@ -394,6 +315,18 @@
                 | NetworkCapabilities.REDACT_FOR_NETWORK_SETTINGS, redactions);
     }
 
+    private WifiInfo makeWifiInfoForLocationSensitiveAndLocalMacAddressRedaction() {
+        WifiInfo info = new WifiInfo();
+        info.setSSID(WifiSsid.createFromAsciiEncoded(TEST_SSID));
+        info.setBSSID(TEST_BSSID);
+        info.setNetworkId(TEST_NETWORK_ID);
+        info.setFQDN(TEST_FQDN);
+        info.setProviderFriendlyName(TEST_PROVIDER_NAME);
+        info.setInformationElements(generateIes());
+        info.setMacAddress(TEST_BSSID);
+        return info;
+    }
+
     private void assertLocationSensitiveAndLocalMacAddressRedaction(WifiInfo info) {
         assertNotNull(info);
         assertEquals(WifiManager.UNKNOWN_SSID, info.getSSID());
@@ -403,15 +336,14 @@
         assertNull(info.getPasspointProviderFriendlyName());
         assertEquals(WifiInfo.DEFAULT_MAC_ADDRESS, info.getMacAddress());
         assertNull(info.getInformationElements());
-        assertNull(info.getNetworkKey());
     }
 
     @Test
     public void testWifiInfoRedactLocationAndLocalMacAddressSensitiveInfo()
             throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
-        List<ScanResult.InformationElement> informationElements = generateIes();
-        WifiInfo writeWifiInfo = makeWifiInfoForRedactionTest(informationElements);
+
+        WifiInfo writeWifiInfo = makeWifiInfoForLocationSensitiveAndLocalMacAddressRedaction();
 
         WifiInfo redactedWifiInfo =
                 writeWifiInfo.makeCopy(NetworkCapabilities.REDACT_FOR_ACCESS_FINE_LOCATION
@@ -494,7 +426,6 @@
         writeWifiInfo.setMaxSupportedRxLinkSpeedMbps(TEST_MAX_SUPPORTED_RX_LINK_SPEED_MBPS);
         writeWifiInfo.setSubscriptionId(TEST_SUB_ID);
         writeWifiInfo.setIsPrimary(true);
-        writeWifiInfo.setRestricted(true);
 
         WifiInfo readWifiInfo = new WifiInfo(writeWifiInfo);
 
@@ -513,7 +444,6 @@
                 readWifiInfo.getMaxSupportedTxLinkSpeedMbps());
         assertEquals(TEST_MAX_SUPPORTED_RX_LINK_SPEED_MBPS,
                 readWifiInfo.getMaxSupportedRxLinkSpeedMbps());
-        assertTrue(readWifiInfo.isRestricted());
         if (SdkLevel.isAtLeastS()) {
             assertTrue(readWifiInfo.isOemPaid());
             assertTrue(readWifiInfo.isOemPrivate());
@@ -536,7 +466,7 @@
         assertEquals(WifiInfo.LINK_SPEED_UNKNOWN, wifiInfo.getRxLinkSpeedMbps());
         assertEquals(WifiInfo.INVALID_RSSI, wifiInfo.getRssi());
         assertEquals(WifiManager.UNKNOWN_SSID, wifiInfo.getSSID());
-        assertNull(wifiInfo.getBSSID());
+        assertEquals(null, wifiInfo.getBSSID());
         assertEquals(-1, wifiInfo.getNetworkId());
         if (SdkLevel.isAtLeastS()) {
             assertFalse(wifiInfo.isOemPaid());
@@ -545,10 +475,6 @@
             assertEquals(SubscriptionManager.INVALID_SUBSCRIPTION_ID, wifiInfo.getSubscriptionId());
             assertFalse(wifiInfo.isPrimary());
         }
-        assertNull(wifiInfo.getNetworkKey());
-        assertEquals(MloLink.INVALID_MLO_LINK_ID, wifiInfo.getApMloLinkId());
-        assertNull(wifiInfo.getApMldMacAddress());
-        assertEquals(0, wifiInfo.getAffiliatedMloLinks().size());
     }
 
     /**
@@ -591,27 +517,6 @@
     }
 
     @Test
-    public void testSetSsid() throws Exception {
-        WifiInfo.Builder builder = new WifiInfo.Builder();
-
-        // Null
-        assertEquals(WifiManager.UNKNOWN_SSID, builder.build().getSSID());
-
-        // Empty
-        builder.setSsid(new byte[0]);
-        assertEquals(WifiManager.UNKNOWN_SSID, builder.build().getSSID());
-
-        // UTF-8
-        builder.setSsid(TEST_SSID.getBytes(StandardCharsets.UTF_8));
-        assertEquals("\"" + TEST_SSID + "\"", builder.build().getSSID());
-
-        // Non-UTF-8
-        byte[] gbkBytes = "服務集識別碼".getBytes(Charset.forName("GBK"));
-        builder.setSsid(gbkBytes);
-        assertEquals(HexEncoding.encodeToString(gbkBytes), builder.build().getSSID());
-    }
-
-    @Test
     public void testWifiInfoEquals() throws Exception {
         WifiInfo.Builder builder = new WifiInfo.Builder()
                 .setSsid(TEST_SSID.getBytes(StandardCharsets.UTF_8))
@@ -639,10 +544,10 @@
             assertNotEquals(info1, info2);
         }
 
-        info1.setSSID(WifiSsid.fromBytes(null));
+        info1.setSSID(WifiSsid.createFromHex(null));
         assertNotEquals(info1, info2);
 
-        info2.setSSID(WifiSsid.fromBytes(null));
+        info2.setSSID(WifiSsid.createFromHex(null));
         if (SdkLevel.isAtLeastS()) {
             assertEquals(info1, info2);
         } else {
@@ -707,10 +612,10 @@
             assertNotEquals(info1.hashCode(), info2.hashCode());
         }
 
-        info1.setSSID(WifiSsid.fromBytes(null));
+        info1.setSSID(WifiSsid.createFromHex(null));
         assertNotEquals(info1.hashCode(), info2.hashCode());
 
-        info2.setSSID(WifiSsid.fromBytes(null));
+        info2.setSSID(WifiSsid.createFromHex(null));
         if (SdkLevel.isAtLeastS()) {
             assertEquals(info1.hashCode(), info2.hashCode());
         } else {
diff --git a/framework/tests/src/android/net/wifi/WifiManagerTest.java b/framework/tests/src/android/net/wifi/WifiManagerTest.java
index 8e78900..f5954d4 100644
--- a/framework/tests/src/android/net/wifi/WifiManagerTest.java
+++ b/framework/tests/src/android/net/wifi/WifiManagerTest.java
@@ -17,18 +17,18 @@
 package android.net.wifi;
 
 import static android.net.wifi.WifiConfiguration.METERED_OVERRIDE_METERED;
-import static android.net.wifi.WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT;
-import static android.net.wifi.WifiManager.ACTION_REMOVE_SUGGESTION_LINGER;
 import static android.net.wifi.WifiManager.ActionListener;
+import static android.net.wifi.WifiManager.BUSY;
 import static android.net.wifi.WifiManager.COEX_RESTRICTION_SOFTAP;
 import static android.net.wifi.WifiManager.COEX_RESTRICTION_WIFI_AWARE;
 import static android.net.wifi.WifiManager.COEX_RESTRICTION_WIFI_DIRECT;
-import static android.net.wifi.WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE;
+import static android.net.wifi.WifiManager.ERROR;
 import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.ERROR_GENERIC;
 import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.ERROR_INCOMPATIBLE_MODE;
 import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.ERROR_NO_CHANNEL;
 import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.ERROR_TETHERING_DISALLOWED;
 import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.REQUEST_REGISTERED;
+import static android.net.wifi.WifiManager.NOT_AUTHORIZED;
 import static android.net.wifi.WifiManager.OnWifiActivityEnergyInfoListener;
 import static android.net.wifi.WifiManager.SAP_START_FAILURE_GENERAL;
 import static android.net.wifi.WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS;
@@ -38,19 +38,16 @@
 import static android.net.wifi.WifiManager.WIFI_AP_STATE_FAILED;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_ADDITIONAL_STA_LOCAL_ONLY;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_ADDITIONAL_STA_MBB;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_ADDITIONAL_STA_MULTI_INTERNET;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_ADDITIONAL_STA_RESTRICTED;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_AP_STA;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_DECORATED_IDENTITY;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP_AKM;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP_ENROLLEE_RESPONDER;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_P2P;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_PASSPOINT;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_PASSPOINT_TERMS_AND_CONDITIONS;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_SCANNER;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SAE;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SUITE_B;
 import static android.net.wifi.WifiManager.WpsCallback;
@@ -85,13 +82,10 @@
 
 import android.annotation.NonNull;
 import android.app.ActivityManager;
-import android.content.AttributionSource;
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
 import android.net.DhcpInfo;
-import android.net.DhcpOption;
 import android.net.MacAddress;
-import android.net.wifi.WifiManager.ActiveCountryCodeChangedCallback;
 import android.net.wifi.WifiManager.CoexCallback;
 import android.net.wifi.WifiManager.LocalOnlyHotspotCallback;
 import android.net.wifi.WifiManager.LocalOnlyHotspotObserver;
@@ -111,18 +105,16 @@
 import android.net.wifi.WifiUsabilityStatsEntry.RadioStats;
 import android.net.wifi.WifiUsabilityStatsEntry.RateStats;
 import android.os.Build;
-import android.os.Bundle;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.os.IBinder;
 import android.os.RemoteException;
 import android.os.connectivity.WifiActivityEnergyInfo;
 import android.os.test.TestLooper;
-import android.util.ArraySet;
 import android.util.SparseArray;
 
 import androidx.test.filters.SmallTest;
 
-import com.android.modules.utils.HandlerExecutor;
 import com.android.modules.utils.build.SdkLevel;
 
 import org.junit.Before;
@@ -139,9 +131,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
-import java.util.Set;
 import java.util.concurrent.Executor;
-import java.util.function.BiConsumer;
 
 /**
  * Unit tests for {@link android.net.wifi.WifiManager}.
@@ -169,8 +159,6 @@
             MacAddress.fromString("22:33:44:aa:aa:77"),
             MacAddress.fromString("aa:bb:cc:11:11:ff"),
             MacAddress.fromString("22:bb:cc:11:aa:ff")};
-    private static final String TEST_SSID = "\"Test WiFi Networks\"";
-    private static final byte[] TEST_OUI = new byte[]{0x01, 0x02, 0x03};
 
     @Mock Context mContext;
     @Mock android.net.wifi.IWifiManager mWifiService;
@@ -188,7 +176,6 @@
     @Mock ActivityManager mActivityManager;
     @Mock WifiConnectedNetworkScorer mWifiConnectedNetworkScorer;
     @Mock SuggestionUserApprovalStatusListener mSuggestionUserApprovalStatusListener;
-    @Mock ActiveCountryCodeChangedCallback mActiveCountryCodeChangedCallback;
 
     private Handler mHandler;
     private TestLooper mLooper;
@@ -212,10 +199,7 @@
      */
     private boolean compareWifiAndSoftApConfiguration(
             SoftApConfiguration softApConfig, WifiConfiguration wifiConfig) {
-        // SoftApConfiguration#toWifiConfiguration() creates a config with an unquoted UTF-8 SSID
-        // instead of the double quoted behavior in the javadoc for WifiConfiguration#SSID. Thus,
-        // we need to compare the wifi config SSID directly with the unquoted UTF-8 text.
-        if (!Objects.equals(wifiConfig.SSID, softApConfig.getWifiSsid().getUtf8Text())) {
+        if (!Objects.equals(wifiConfig.SSID, softApConfig.getSsid())) {
             return false;
         }
         if (!Objects.equals(wifiConfig.BSSID, softApConfig.getBssid())) {
@@ -302,8 +286,6 @@
                     mRunnable.run();
                 }
             };
-            AttributionSource attributionSource = mock(AttributionSource.class);
-            when(mContext.getAttributionSource()).thenReturn(attributionSource);
         }
         mRestartCallback = new SubsystemRestartTrackingCallback() {
             @Override
@@ -549,7 +531,7 @@
         SoftApConfiguration softApConfig = generatorTestSoftApConfig();
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(REQUEST_REGISTERED);
+                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
 
         callback.onStarted(mWifiManager.new LocalOnlyHotspotReservation(softApConfig));
@@ -571,7 +553,7 @@
         SoftApConfiguration softApConfig = generatorTestSoftApConfig();
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(REQUEST_REGISTERED);
+                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
 
         callback.onStarted(mWifiManager.new LocalOnlyHotspotReservation(softApConfig));
@@ -726,20 +708,6 @@
         assertEquals(sub, observer.mSub);
     }
 
-    @Test
-    public void testSetSsidsDoNotBlocklist() throws Exception {
-        // test non-empty set
-        List<WifiSsid> expectedSsids = new ArrayList<>();
-        expectedSsids.add(WifiSsid.fromString("\"TEST_SSID\""));
-        mWifiManager.setSsidsAllowlist(new ArraySet<>(expectedSsids));
-        verify(mWifiService).setSsidsAllowlist(any(), eq(expectedSsids));
-
-        // test empty set
-        mWifiManager.setSsidsAllowlist(Collections.EMPTY_SET);
-        verify(mWifiService).setSsidsAllowlist(any(),
-                eq(Collections.EMPTY_LIST));
-    }
-
     /**
      * Verify call to startLocalOnlyHotspot goes to WifiServiceImpl.
      */
@@ -749,7 +717,7 @@
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
 
         verify(mWifiService).startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class),
-                anyString(), nullable(String.class), eq(null), any());
+                anyString(), nullable(String.class), eq(null));
     }
 
     /**
@@ -761,7 +729,7 @@
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         doThrow(new SecurityException()).when(mWifiService).startLocalOnlyHotspot(
                 any(ILocalOnlyHotspotCallback.class), anyString(), nullable(String.class),
-                eq(null), any());
+                eq(null));
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
     }
 
@@ -774,7 +742,7 @@
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         doThrow(new IllegalStateException()).when(mWifiService).startLocalOnlyHotspot(
                 any(ILocalOnlyHotspotCallback.class), anyString(), nullable(String.class),
-                eq(null), any());
+                eq(null));
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
     }
 
@@ -785,7 +753,7 @@
     public void testCorrectLooperIsUsedForHandler() throws Exception {
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(ERROR_INCOMPATIBLE_MODE);
+                nullable(String.class), eq(null))).thenReturn(ERROR_INCOMPATIBLE_MODE);
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
         mLooper.dispatchAll();
         assertEquals(ERROR_INCOMPATIBLE_MODE, callback.mFailureReason);
@@ -804,7 +772,7 @@
         when(mContext.getMainExecutor()).thenReturn(altLooper.getNewExecutor());
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(ERROR_INCOMPATIBLE_MODE);
+                nullable(String.class), eq(null))).thenReturn(ERROR_INCOMPATIBLE_MODE);
         mWifiManager.startLocalOnlyHotspot(callback, null);
         altLooper.dispatchAll();
         assertEquals(ERROR_INCOMPATIBLE_MODE, callback.mFailureReason);
@@ -825,7 +793,7 @@
         ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
                 ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
         when(mWifiService.startLocalOnlyHotspot(internalCallback.capture(), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(REQUEST_REGISTERED);
+                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
         mWifiManager.startLocalOnlyHotspot(callback, callbackHandler);
         callbackLooper.dispatchAll();
         mLooper.dispatchAll();
@@ -857,7 +825,7 @@
         ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
                 ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
         when(mWifiService.startLocalOnlyHotspot(internalCallback.capture(), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(REQUEST_REGISTERED);
+                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
         mWifiManager.startLocalOnlyHotspot(callback, callbackHandler);
         callbackLooper.dispatchAll();
         mLooper.dispatchAll();
@@ -884,7 +852,7 @@
         ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
                 ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
         when(mWifiService.startLocalOnlyHotspot(internalCallback.capture(), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(REQUEST_REGISTERED);
+                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
         mWifiManager.startLocalOnlyHotspot(callback, callbackHandler);
         callbackLooper.dispatchAll();
         mLooper.dispatchAll();
@@ -909,7 +877,7 @@
         ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
                 ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
         when(mWifiService.startLocalOnlyHotspot(internalCallback.capture(), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(REQUEST_REGISTERED);
+                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
         mWifiManager.startLocalOnlyHotspot(callback, callbackHandler);
         callbackLooper.dispatchAll();
         mLooper.dispatchAll();
@@ -932,7 +900,7 @@
         ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
                 ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
         when(mWifiService.startLocalOnlyHotspot(internalCallback.capture(), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(REQUEST_REGISTERED);
+                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
         mWifiManager.startLocalOnlyHotspot(callback, callbackHandler);
         callbackLooper.dispatchAll();
         mLooper.dispatchAll();
@@ -951,7 +919,7 @@
     public void testLocalOnlyHotspotCallbackFullOnIncompatibleMode() throws Exception {
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(ERROR_INCOMPATIBLE_MODE);
+                nullable(String.class), eq(null))).thenReturn(ERROR_INCOMPATIBLE_MODE);
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
         mLooper.dispatchAll();
         assertEquals(ERROR_INCOMPATIBLE_MODE, callback.mFailureReason);
@@ -967,7 +935,7 @@
     public void testLocalOnlyHotspotCallbackFullOnTetheringDisallowed() throws Exception {
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(ERROR_TETHERING_DISALLOWED);
+                nullable(String.class), eq(null))).thenReturn(ERROR_TETHERING_DISALLOWED);
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
         mLooper.dispatchAll();
         assertEquals(ERROR_TETHERING_DISALLOWED, callback.mFailureReason);
@@ -985,7 +953,7 @@
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         doThrow(new SecurityException()).when(mWifiService).startLocalOnlyHotspot(
                 any(ILocalOnlyHotspotCallback.class), anyString(), nullable(String.class),
-                eq(null), any());
+                eq(null));
         try {
             mWifiManager.startLocalOnlyHotspot(callback, mHandler);
         } catch (SecurityException e) {
@@ -1006,7 +974,7 @@
     public void testLocalOnlyHotspotCallbackFullOnNoChannelError() throws Exception {
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(REQUEST_REGISTERED);
+                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
         mLooper.dispatchAll();
         //assertEquals(ERROR_NO_CHANNEL, callback.mFailureReason);
@@ -1022,7 +990,7 @@
     public void testCancelLocalOnlyHotspotRequestCallsStopOnWifiService() throws Exception {
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(REQUEST_REGISTERED);
+                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
         mWifiManager.cancelLocalOnlyHotspotRequest();
         verify(mWifiService).stopLocalOnlyHotspot();
@@ -1044,7 +1012,7 @@
     public void testCallbackAfterLocalOnlyHotspotWasCancelled() throws Exception {
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(REQUEST_REGISTERED);
+                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
         mWifiManager.cancelLocalOnlyHotspotRequest();
         verify(mWifiService).stopLocalOnlyHotspot();
@@ -1063,7 +1031,7 @@
     public void testCancelAfterLocalOnlyHotspotCallbackTriggered() throws Exception {
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null), any())).thenReturn(ERROR_INCOMPATIBLE_MODE);
+                nullable(String.class), eq(null))).thenReturn(ERROR_INCOMPATIBLE_MODE);
         mWifiManager.startLocalOnlyHotspot(callback, mHandler);
         mLooper.dispatchAll();
         assertEquals(ERROR_INCOMPATIBLE_MODE, callback.mFailureReason);
@@ -1082,7 +1050,7 @@
         TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
         mWifiManager.startLocalOnlyHotspot(customConfig, mExecutor, callback);
         verify(mWifiService).startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class),
-                anyString(), nullable(String.class), eq(customConfig), any());
+                anyString(), nullable(String.class), eq(customConfig));
     }
 
     /**
@@ -1576,85 +1544,6 @@
      * Verify client-provided callback is being called through callback proxy
      */
     @Test
-    public void softApCallbackProxyCallsOnSoftApInfoChangedWhenClientConnected() throws Exception {
-        ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), mSoftApCallback);
-        verify(mWifiService).registerSoftApCallback(callbackCaptor.capture());
-        List<WifiClient> clientList;
-        // Verify the register callback in disable state.
-        callbackCaptor.getValue().onConnectedClientsOrInfoChanged(
-                (Map<String, SoftApInfo>) mTestSoftApInfoMap.clone(),
-                (Map<String, List<WifiClient>>) mTestWifiClientsMap.clone(), false, true);
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onConnectedClientsChanged(new ArrayList<WifiClient>());
-        verify(mSoftApCallback, never()).onConnectedClientsChanged(any(), any());
-        verify(mSoftApCallback).onInfoChanged(new SoftApInfo());
-        verify(mSoftApCallback).onInfoChanged(new ArrayList<SoftApInfo>());
-        // After verify, reset mSoftApCallback for nex test
-        reset(mSoftApCallback);
-
-        // Single AP mode Test
-        // Test info update
-        initTestInfoAndAddToTestMap(1);
-        callbackCaptor.getValue().onConnectedClientsOrInfoChanged(
-                (Map<String, SoftApInfo>) mTestSoftApInfoMap.clone(),
-                (Map<String, List<WifiClient>>) mTestWifiClientsMap.clone(), false, false);
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onInfoChanged(mTestApInfo1);
-        verify(mSoftApCallback).onInfoChanged(Mockito.argThat((List<SoftApInfo> infos) ->
-                        infos.contains(mTestApInfo1)));
-        verify(mSoftApCallback, never()).onConnectedClientsChanged(any());
-        verify(mSoftApCallback, never()).onConnectedClientsChanged(any(), any());
-        // After verify, reset mSoftApCallback for nex test
-        reset(mSoftApCallback);
-
-        clientList = initWifiClientAndAddToTestMap(TEST_AP_INSTANCES[0], 1, 0);
-        callbackCaptor.getValue().onConnectedClientsOrInfoChanged(
-                (Map<String, SoftApInfo>) mTestSoftApInfoMap.clone(),
-                (Map<String, List<WifiClient>>) mTestWifiClientsMap.clone(), false, false);
-        mLooper.dispatchAll();
-        // checked NO any infoChanged, includes InfoChanged(SoftApInfo)
-        // and InfoChanged(List<SoftApInfo>)
-        verify(mSoftApCallback, never()).onInfoChanged(any(SoftApInfo.class));
-        verify(mSoftApCallback, never()).onInfoChanged(any(List.class));
-        verify(mSoftApCallback).onConnectedClientsChanged(mTestApInfo1, clientList);
-        verify(mSoftApCallback).onConnectedClientsChanged(clientList);
-        // After verify, reset mSoftApCallback for nex test
-        reset(mSoftApCallback);
-
-        // Test info changed when client connected
-        SoftApInfo changedInfo = new SoftApInfo(mTestSoftApInfoMap.get(TEST_AP_INSTANCES[0]));
-        changedInfo.setFrequency(2422);
-        mTestSoftApInfoMap.put(TEST_AP_INSTANCES[0], changedInfo);
-        callbackCaptor.getValue().onConnectedClientsOrInfoChanged(
-                (Map<String, SoftApInfo>) mTestSoftApInfoMap.clone(),
-                (Map<String, List<WifiClient>>) mTestWifiClientsMap.clone(), false, false);
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onInfoChanged(changedInfo);
-        verify(mSoftApCallback).onInfoChanged(Mockito.argThat((List<SoftApInfo> infos) ->
-                        infos.contains(changedInfo)));
-        verify(mSoftApCallback).onConnectedClientsChanged(clientList);
-        verify(mSoftApCallback).onConnectedClientsChanged(changedInfo, clientList);
-        // After verify, reset mSoftApCallback for nex test
-        reset(mSoftApCallback);
-
-        // Test Stop, all of infos is empty
-        mTestSoftApInfoMap.clear();
-        callbackCaptor.getValue().onConnectedClientsOrInfoChanged(
-                (Map<String, SoftApInfo>) mTestSoftApInfoMap.clone(),
-                (Map<String, List<WifiClient>>) mTestWifiClientsMap.clone(), false, false);
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onInfoChanged(new SoftApInfo());
-        verify(mSoftApCallback).onInfoChanged(new ArrayList<SoftApInfo>());
-        verify(mSoftApCallback).onConnectedClientsChanged(any());
-        verify(mSoftApCallback).onConnectedClientsChanged(any(), any());
-    }
-
-    /*
-     * Verify client-provided callback is being called through callback proxy
-     */
-    @Test
     public void softApCallbackProxyCallsOnSoftApInfoChangedInBridgedMode() throws Exception {
         ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
                 ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
@@ -2001,7 +1890,7 @@
         WpsCallbackTester wpsCallback = new WpsCallbackTester();
         mWifiManager.startWps(null, wpsCallback);
         assertTrue(wpsCallback.mFailed);
-        assertEquals(ActionListener.FAILURE_INTERNAL_ERROR, wpsCallback.mFailureCode);
+        assertEquals(ERROR, wpsCallback.mFailureCode);
         assertFalse(wpsCallback.mStarted);
         assertFalse(wpsCallback.mSucceeded);
         verifyNoMoreInteractions(mWifiService);
@@ -2024,7 +1913,7 @@
         WpsCallbackTester wpsCallback = new WpsCallbackTester();
         mWifiManager.cancelWps(wpsCallback);
         assertTrue(wpsCallback.mFailed);
-        assertEquals(ActionListener.FAILURE_INTERNAL_ERROR, wpsCallback.mFailureCode);
+        assertEquals(ERROR, wpsCallback.mFailureCode);
         assertFalse(wpsCallback.mStarted);
         assertFalse(wpsCallback.mSucceeded);
         verifyNoMoreInteractions(mWifiService);
@@ -2330,8 +2219,8 @@
         List<WifiNetworkSuggestion> testList = new ArrayList<>();
         when(mWifiService.addNetworkSuggestions(any(List.class), anyString(),
                 nullable(String.class))).thenReturn(STATUS_NETWORK_SUGGESTIONS_SUCCESS);
-        when(mWifiService.removeNetworkSuggestions(any(List.class), anyString(), anyInt()))
-                .thenReturn(STATUS_NETWORK_SUGGESTIONS_SUCCESS);
+        when(mWifiService.removeNetworkSuggestions(any(List.class), anyString())).thenReturn(
+                STATUS_NETWORK_SUGGESTIONS_SUCCESS);
         when(mWifiService.getNetworkSuggestions(anyString()))
                 .thenReturn(testList);
 
@@ -2345,18 +2234,7 @@
 
         assertEquals(STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiManager.removeNetworkSuggestions(new ArrayList<>()));
-        verify(mWifiService).removeNetworkSuggestions(anyList(), eq(TEST_PACKAGE_NAME),
-                eq(ACTION_REMOVE_SUGGESTION_DISCONNECT));
-    }
-
-    @Test
-    public void testRemoveNetworkSuggestionWithAction() throws Exception {
-        when(mWifiService.removeNetworkSuggestions(anyList(), anyString(), anyInt()))
-                .thenReturn(STATUS_NETWORK_SUGGESTIONS_SUCCESS);
-        assertEquals(STATUS_NETWORK_SUGGESTIONS_SUCCESS, mWifiManager
-                .removeNetworkSuggestions(new ArrayList<>(), ACTION_REMOVE_SUGGESTION_LINGER));
-        verify(mWifiService).removeNetworkSuggestions(any(List.class),
-                eq(TEST_PACKAGE_NAME), eq(ACTION_REMOVE_SUGGESTION_LINGER));
+        verify(mWifiService).removeNetworkSuggestions(anyList(), eq(TEST_PACKAGE_NAME));
     }
 
     /**
@@ -2364,7 +2242,10 @@
      */
     @Test
     public void getMaxNumberOfNetworkSuggestionsPerApp() {
-        when(mContext.getSystemService(ActivityManager.class)).thenReturn(mActivityManager);
+        when(mContext.getSystemServiceName(ActivityManager.class))
+                .thenReturn(Context.ACTIVITY_SERVICE);
+        when(mContext.getSystemService(Context.ACTIVITY_SERVICE))
+                .thenReturn(mActivityManager);
         when(mActivityManager.isLowRamDevice()).thenReturn(true);
         assertEquals(256, mWifiManager.getMaxNumberOfNetworkSuggestionsPerApp());
 
@@ -2391,12 +2272,6 @@
         verify(mWifiService).getConfiguredNetworks(any(), any(), eq(true));
     }
 
-    @Test
-    public void testGetPrivilegedConfiguredNetworks() throws Exception {
-        mWifiManager.getPrivilegedConfiguredNetworks();
-        verify(mWifiService).getPrivilegedConfiguredNetworks(any(), any(), any());
-    }
-
     /**
      * Verify the call to startRestrictingAutoJoinToSubscriptionId goes to WifiServiceImpl.
      */
@@ -2515,19 +2390,6 @@
     }
 
     /**
-     * Test behavior of isEasyConnectDppAkmSupported
-     */
-    @Test
-    public void testIsEasyConnectDppAkmSupported() throws Exception {
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(WIFI_FEATURE_DPP_AKM));
-        assertTrue(mWifiManager.isEasyConnectDppAkmSupported());
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(~WIFI_FEATURE_DPP_AKM));
-        assertFalse(mWifiManager.isEasyConnectDppAkmSupported());
-    }
-
-    /**
      * Test behavior of isEasyConnectEnrolleeResponderModeSupported
      */
     @Test
@@ -2564,23 +2426,19 @@
         assertFalse(mWifiManager.isStaConcurrencyForLocalOnlyConnectionsSupported());
         assertFalse(mWifiManager.isMakeBeforeBreakWifiSwitchingSupported());
         assertFalse(mWifiManager.isStaConcurrencyForRestrictedConnectionsSupported());
-        assertFalse(mWifiManager.isStaConcurrencyForMultiInternetSupported());
 
         when(mWifiService.getSupportedFeatures())
                 .thenReturn(new Long(WIFI_FEATURE_ADDITIONAL_STA_LOCAL_ONLY));
         assertTrue(mWifiManager.isStaConcurrencyForLocalOnlyConnectionsSupported());
         assertFalse(mWifiManager.isMakeBeforeBreakWifiSwitchingSupported());
         assertFalse(mWifiManager.isStaConcurrencyForRestrictedConnectionsSupported());
-        assertFalse(mWifiManager.isStaConcurrencyForMultiInternetSupported());
 
         when(mWifiService.getSupportedFeatures())
                 .thenReturn(new Long(WIFI_FEATURE_ADDITIONAL_STA_MBB
-                        | WIFI_FEATURE_ADDITIONAL_STA_RESTRICTED
-                        | WIFI_FEATURE_ADDITIONAL_STA_MULTI_INTERNET));
+                        | WIFI_FEATURE_ADDITIONAL_STA_RESTRICTED));
         assertFalse(mWifiManager.isStaConcurrencyForLocalOnlyConnectionsSupported());
         assertTrue(mWifiManager.isMakeBeforeBreakWifiSwitchingSupported());
         assertTrue(mWifiManager.isStaConcurrencyForRestrictedConnectionsSupported());
-        assertTrue(mWifiManager.isStaConcurrencyForMultiInternetSupported());
     }
 
     /**
@@ -2589,20 +2447,11 @@
     @Test
     public void testAddNetwork() throws Exception {
         WifiConfiguration configuration = new WifiConfiguration();
-        when(mWifiService.addOrUpdateNetwork(any(), anyString(), any()))
+        when(mWifiService.addOrUpdateNetwork(any(), anyString()))
                 .thenReturn(TEST_NETWORK_ID);
 
-        ArgumentCaptor<Bundle> bundleCaptor = ArgumentCaptor.forClass(Bundle.class);
-
         assertEquals(mWifiManager.addNetwork(configuration), TEST_NETWORK_ID);
-        verify(mWifiService).addOrUpdateNetwork(eq(configuration), eq(TEST_PACKAGE_NAME),
-                bundleCaptor.capture());
-        if (SdkLevel.isAtLeastS()) {
-            assertEquals(mContext.getAttributionSource(),
-                    bundleCaptor.getValue().getParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE));
-        } else {
-            assertNull(bundleCaptor.getValue().getParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE));
-        }
+        verify(mWifiService).addOrUpdateNetwork(configuration, mContext.getOpPackageName());
 
         // send a null config
         assertEquals(mWifiManager.addNetwork(null), -1);
@@ -2633,21 +2482,12 @@
     @Test
     public void testUpdateNetwork() throws Exception {
         WifiConfiguration configuration = new WifiConfiguration();
-        when(mWifiService.addOrUpdateNetwork(any(), anyString(), any()))
+        when(mWifiService.addOrUpdateNetwork(any(), anyString()))
                 .thenReturn(TEST_NETWORK_ID);
 
-        ArgumentCaptor<Bundle> bundleCaptor = ArgumentCaptor.forClass(Bundle.class);
-
         configuration.networkId = TEST_NETWORK_ID;
         assertEquals(mWifiManager.updateNetwork(configuration), TEST_NETWORK_ID);
-        verify(mWifiService).addOrUpdateNetwork(eq(configuration), eq(TEST_PACKAGE_NAME),
-                bundleCaptor.capture());
-        if (SdkLevel.isAtLeastS()) {
-            assertEquals(mContext.getAttributionSource(),
-                    bundleCaptor.getValue().getParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE));
-        } else {
-            assertNull(bundleCaptor.getValue().getParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE));
-        }
+        verify(mWifiService).addOrUpdateNetwork(configuration, mContext.getOpPackageName());
 
         // config with invalid network ID
         configuration.networkId = -1;
@@ -2927,8 +2767,7 @@
 
         ArgumentCaptor<IActionListener> binderListenerCaptor =
                 ArgumentCaptor.forClass(IActionListener.class);
-        verify(mWifiService).connect(eq(null), eq(TEST_NETWORK_ID), binderListenerCaptor.capture(),
-                anyString());
+        verify(mWifiService).connect(eq(null), eq(TEST_NETWORK_ID), binderListenerCaptor.capture());
         assertNotNull(binderListenerCaptor.getValue());
 
         // Trigger on success.
@@ -2937,9 +2776,9 @@
         verify(externalListener).onSuccess();
 
         // Trigger on failure.
-        binderListenerCaptor.getValue().onFailure(WifiManager.ActionListener.FAILURE_BUSY);
+        binderListenerCaptor.getValue().onFailure(BUSY);
         mLooper.dispatchAll();
-        verify(externalListener).onFailure(WifiManager.ActionListener.FAILURE_BUSY);
+        verify(externalListener).onFailure(BUSY);
     }
 
     /**
@@ -2948,12 +2787,12 @@
     @Test
     public void testConnectWithListenerHandleSecurityException() throws Exception {
         doThrow(new SecurityException()).when(mWifiService)
-                .connect(eq(null), anyInt(), any(IActionListener.class), anyString());
+                .connect(eq(null), anyInt(), any(IActionListener.class));
         ActionListener externalListener = mock(ActionListener.class);
         mWifiManager.connect(TEST_NETWORK_ID, externalListener);
 
         mLooper.dispatchAll();
-        verify(externalListener).onFailure(ActionListener.FAILURE_NOT_AUTHORIZED);
+        verify(externalListener).onFailure(NOT_AUTHORIZED);
     }
 
     /**
@@ -2962,12 +2801,12 @@
     @Test
     public void testConnectWithListenerHandleRemoteException() throws Exception {
         doThrow(new RemoteException()).when(mWifiService)
-                .connect(eq(null), anyInt(), any(IActionListener.class), anyString());
+                .connect(eq(null), anyInt(), any(IActionListener.class));
         ActionListener externalListener = mock(ActionListener.class);
         mWifiManager.connect(TEST_NETWORK_ID, externalListener);
 
         mLooper.dispatchAll();
-        verify(externalListener).onFailure(ActionListener.FAILURE_INTERNAL_ERROR);
+        verify(externalListener).onFailure(ERROR);
     }
 
     /**
@@ -2978,8 +2817,7 @@
         WifiConfiguration configuration = new WifiConfiguration();
         mWifiManager.connect(configuration, null);
 
-        verify(mWifiService).connect(eq(configuration), eq(WifiConfiguration.INVALID_NETWORK_ID),
-                eq(null), anyString());
+        verify(mWifiService).connect(configuration, WifiConfiguration.INVALID_NETWORK_ID, null);
     }
 
     /**
@@ -3312,28 +3150,6 @@
         verify(mWifiService).setWifiScoringEnabled(true);
     }
 
-    /**
-     * Verify the call to addCustomDhcpOptions goes to WifiServiceImpl.
-     */
-    @Test
-    public void addCustomDhcpOptionsGoesToWifiServiceImpl() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        mWifiManager.addCustomDhcpOptions(
-                WifiSsid.fromString(TEST_SSID), TEST_OUI, new ArrayList<DhcpOption>());
-        verify(mWifiService).addCustomDhcpOptions(
-                WifiSsid.fromString(TEST_SSID), TEST_OUI, new ArrayList<DhcpOption>());
-    }
-
-    /**
-     * Verify the call to removeCustomDhcpOptions goes to WifiServiceImpl.
-     */
-    @Test
-    public void removeCustomDhcpOptionsGoesToWifiServiceImpl() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        mWifiManager.removeCustomDhcpOptions(WifiSsid.fromString(TEST_SSID), TEST_OUI);
-        verify(mWifiService).removeCustomDhcpOptions(WifiSsid.fromString(TEST_SSID), TEST_OUI);
-    }
-
     @Test
     public void testScanThrottle() throws Exception {
         mWifiManager.setScanThrottleEnabled(true);
@@ -3460,15 +3276,6 @@
     }
 
     @Test
-    public void testSetExternalPnoScanRequestNullFrequencies() throws Exception {
-        mWifiManager.setExternalPnoScanRequest(Collections.EMPTY_LIST, null,
-                mock(Executor.class), mock(WifiManager.PnoScanResultsCallback.class));
-        // null frequencies should get converted to empty array
-        verify(mWifiService).setExternalPnoScanRequest(any(), any(), eq(Collections.EMPTY_LIST),
-                eq(new int[0]), any(), any());
-    }
-
-    @Test
     public void testSetEmergencyScanRequestInProgress() throws Exception {
         mWifiManager.setEmergencyScanRequestInProgress(true);
         verify(mWifiService).setEmergencyScanRequestInProgress(true);
@@ -3549,19 +3356,6 @@
     }
 
     /**
-     * Test behavior of isTrustOnFirstUseSupported.
-     */
-    @Test
-    public void testIsTrustOnFirstUseSupported() throws Exception {
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(WIFI_FEATURE_TRUST_ON_FIRST_USE));
-        assertTrue(mWifiManager.isTrustOnFirstUseSupported());
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(~WIFI_FEATURE_TRUST_ON_FIRST_USE));
-        assertFalse(mWifiManager.isTrustOnFirstUseSupported());
-    }
-
-    /**
      * Verify call to getAllowedChannels goes to WifiServiceImpl
      */
     @Test
@@ -3590,304 +3384,4 @@
                 eq(WifiAvailableChannel.FILTER_CONCURRENCY
                     | WifiAvailableChannel.FILTER_CELLULAR_COEXISTENCE));
     }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if callback is not provided.
-     */
-    @Test
-    public void testRegisterActiveCountryCodeChangedCallbackThrowsExceptionOnNullCallback() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        try {
-            mWifiManager.registerActiveCountryCodeChangedCallback(
-                    new HandlerExecutor(mHandler), null);
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if executor is null.
-     */
-    @Test
-    public void testRegisterActiveCountryCodeChangedCallbackThrowsExceptionOnNullExecutor() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        try {
-            mWifiManager.registerActiveCountryCodeChangedCallback(null,
-                    mActiveCountryCodeChangedCallback);
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if callback is not provided.
-     */
-    @Test
-    public void testUnregisterActiveCountryCodeChangedCallbackThrowsExceptionOnNullCallback() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        try {
-            mWifiManager.unregisterActiveCountryCodeChangedCallback(null);
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Verify the call to registerActiveCountryCodeChangedCallback goes to WifiServiceImpl.
-     */
-    @Test
-    public void testRegisterActiveCountryCodeChangedCallbackCallGoesToWifiServiceImpl()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        mWifiManager.registerActiveCountryCodeChangedCallback(new HandlerExecutor(mHandler),
-                mActiveCountryCodeChangedCallback);
-        verify(mWifiService).registerDriverCountryCodeChangedListener(
-                any(IOnWifiDriverCountryCodeChangedListener.Stub.class), anyString(),
-                any() /* getAttributionTag(), nullable */);
-    }
-
-    /**
-     * Verify the call to unregisterActiveCountryCodeChangedCallback goes to WifiServiceImpl.
-     */
-    @Test
-    public void testUnregisterActiveCountryCodeChangedCallbackCallGoesToWifiServiceImpl()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        ArgumentCaptor<IOnWifiDriverCountryCodeChangedListener.Stub> listenerCaptor =
-                ArgumentCaptor.forClass(IOnWifiDriverCountryCodeChangedListener.Stub.class);
-        mWifiManager.registerActiveCountryCodeChangedCallback(new HandlerExecutor(mHandler),
-                mActiveCountryCodeChangedCallback);
-        verify(mWifiService).registerDriverCountryCodeChangedListener(listenerCaptor.capture(),
-                 anyString(), any() /* getAttributionTag(), nullable */);
-
-        mWifiManager.unregisterActiveCountryCodeChangedCallback(
-                mActiveCountryCodeChangedCallback);
-        verify(mWifiService).unregisterDriverCountryCodeChangedListener(listenerCaptor.getValue());
-    }
-
-    /*
-     * Verify client-provided callback is being called through callback proxy
-     */
-    @Test
-    public void testDriverCountryCodeChangedCallbackProxyCallsOnActiveCountryCodeChanged()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        ArgumentCaptor<IOnWifiDriverCountryCodeChangedListener.Stub> listenerCaptor =
-                ArgumentCaptor.forClass(IOnWifiDriverCountryCodeChangedListener.Stub.class);
-        mWifiManager.registerActiveCountryCodeChangedCallback(new HandlerExecutor(mHandler),
-                mActiveCountryCodeChangedCallback);
-        verify(mWifiService).registerDriverCountryCodeChangedListener(listenerCaptor.capture(),
-                 anyString(), any() /* getAttributionTag(), nullable */);
-
-        listenerCaptor.getValue().onDriverCountryCodeChanged(TEST_COUNTRY_CODE);
-        mLooper.dispatchAll();
-        verify(mActiveCountryCodeChangedCallback).onActiveCountryCodeChanged(TEST_COUNTRY_CODE);
-    }
-
-    /*
-     * Verify client-provided callback is being called through callback proxy
-     */
-    @Test
-    public void testDriverCountryCodeChangedCallbackProxyCallsOnCountryCodeInactiveWhenNull()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        ArgumentCaptor<IOnWifiDriverCountryCodeChangedListener.Stub> listenerCaptor =
-                ArgumentCaptor.forClass(IOnWifiDriverCountryCodeChangedListener.Stub.class);
-        mWifiManager.registerActiveCountryCodeChangedCallback(new HandlerExecutor(mHandler),
-                mActiveCountryCodeChangedCallback);
-        verify(mWifiService).registerDriverCountryCodeChangedListener(listenerCaptor.capture(),
-                 anyString(), any() /* getAttributionTag(), nullable */);
-
-        listenerCaptor.getValue().onDriverCountryCodeChanged(null);
-        mLooper.dispatchAll();
-        verify(mActiveCountryCodeChangedCallback).onCountryCodeInactive();
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if callback is not provided.
-     */
-    @Test
-    public void registerLohsSoftApCallbackThrowsIllegalArgumentExceptionOnNullCallback() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        try {
-            mWifiManager.registerLocalOnlyHotspotSoftApCallback(
-                    new HandlerExecutor(mHandler), null);
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if executor is null.
-     */
-    @Test
-    public void registerLohsSoftApCallbackThrowsIllegalArgumentExceptionOnNullExecutor() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        try {
-            mWifiManager.registerLocalOnlyHotspotSoftApCallback(null, mSoftApCallback);
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if callback is not provided.
-     */
-    @Test
-    public void unregisterLohsSoftApCallbackThrowsIllegalArgumentExceptionOnNullCallback() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        try {
-            mWifiManager.unregisterLocalOnlyHotspotSoftApCallback(null);
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Verify the call to registerLocalOnlyHotspotSoftApCallback goes to WifiServiceImpl.
-     */
-    @Test
-    public void registerLocalOnlyHotspotSoftApCallbackCallGoesToWifiServiceImpl()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        mWifiManager.registerLocalOnlyHotspotSoftApCallback(new HandlerExecutor(mHandler),
-                mSoftApCallback);
-        verify(mWifiService).registerLocalOnlyHotspotSoftApCallback(
-                any(ISoftApCallback.Stub.class), any(Bundle.class));
-    }
-
-    /**
-     * Verify the call to unregisterLocalOnlyHotspotSoftApCallback goes to WifiServiceImpl.
-     */
-    @Test
-    public void unregisterLocalOnlyHotspotSoftApCallbackCallGoesToWifiServiceImpl()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
-        mWifiManager.registerLocalOnlyHotspotSoftApCallback(new HandlerExecutor(mHandler),
-                mSoftApCallback);
-        verify(mWifiService).registerLocalOnlyHotspotSoftApCallback(callbackCaptor.capture(),
-                any(Bundle.class));
-
-        mWifiManager.unregisterLocalOnlyHotspotSoftApCallback(mSoftApCallback);
-        verify(mWifiService).unregisterLocalOnlyHotspotSoftApCallback(eq(callbackCaptor.getValue()),
-                any(Bundle.class));
-    }
-
-    /**
-     * Verify lohs client-provided callback is being called through callback proxy.
-     */
-    @Test
-    public void softApCallbackProxyCallsCallbackForLohsRegister() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiClient testWifiClient = new WifiClient(MacAddress.fromString("22:33:44:55:66:77"),
-                TEST_AP_INSTANCES[0]);
-        SoftApCapability testSoftApCapability = new SoftApCapability(0);
-        // Prepare test info and clients
-        initTestInfoAndAddToTestMap(1);
-        List<WifiClient> clientList = initWifiClientAndAddToTestMap(TEST_AP_INSTANCES[0], 1, 0);
-
-        ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
-        mWifiManager.registerLocalOnlyHotspotSoftApCallback(
-                new HandlerExecutor(mHandler), mSoftApCallback);
-        verify(mWifiService).registerLocalOnlyHotspotSoftApCallback(callbackCaptor.capture(),
-                any(Bundle.class));
-
-        callbackCaptor.getValue().onStateChanged(WIFI_AP_STATE_ENABLED, 0);
-        callbackCaptor.getValue().onConnectedClientsOrInfoChanged(
-                (Map<String, SoftApInfo>) mTestSoftApInfoMap.clone(),
-                (Map<String, List<WifiClient>>) mTestWifiClientsMap.clone(), false, true);
-        callbackCaptor.getValue().onCapabilityChanged(testSoftApCapability);
-        callbackCaptor.getValue().onBlockedClientConnecting(testWifiClient,
-                WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS);
-
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onStateChanged(WIFI_AP_STATE_ENABLED, 0);
-
-        verify(mSoftApCallback).onConnectedClientsChanged(clientList);
-        verify(mSoftApCallback).onConnectedClientsChanged(mTestApInfo1, clientList);
-        verify(mSoftApCallback).onInfoChanged(mTestApInfo1);
-        verify(mSoftApCallback).onInfoChanged(Mockito.argThat((List<SoftApInfo> infos) ->
-                        infos.contains(mTestApInfo1)));
-
-        verify(mSoftApCallback).onCapabilityChanged(testSoftApCapability);
-
-        verify(mSoftApCallback).onBlockedClientConnecting(testWifiClient,
-                WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS);
-    }
-
-    /*
-     * Verify call to {@link WifiManager#isStaConcurrencyForMultiInternetSupported}.
-     */
-    @Test
-    public void testIsStaConcurrencyForMultiInternetSupported() throws Exception {
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(WIFI_FEATURE_ADDITIONAL_STA_MULTI_INTERNET));
-        assertTrue(mWifiManager.isStaConcurrencyForMultiInternetSupported());
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(~WIFI_FEATURE_ADDITIONAL_STA_MULTI_INTERNET));
-        assertFalse(mWifiManager.isStaConcurrencyForMultiInternetSupported());
-    }
-
-    /*
-     * Verify call to {@link WifiManager#getStaConcurrencyForMultiInternetMode()}.
-     */
-    @Test
-    public void testGetStaConcurrencyForMultiInternetMode() throws Exception {
-        final int mode = mWifiManager.getStaConcurrencyForMultiInternetMode();
-        verify(mWifiService).getStaConcurrencyForMultiInternetMode();
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED, mode);
-    }
-
-    /*
-     * Verify call to {@link WifiManager#setStaConcurrencyForMultiInternetMode()}.
-     */
-    @Test
-    public void testSetStaConcurrencyForMultiInternetMode() throws Exception {
-        mWifiManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_DBS_AP);
-        verify(mWifiService).setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_DBS_AP);
-    }
-
-    /**
-     * Verify call to
-     * {@link WifiManager#reportCreateInterfaceImpact(int, boolean, Executor, BiConsumer)}.
-     */
-    @Test
-    public void testIsItPossibleToCreateInterface() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        final int interfaceToCreate = WifiManager.WIFI_INTERFACE_TYPE_DIRECT;
-        final boolean requireNewInterface = false;
-        final boolean canCreate = true;
-        final String packageName1 = "TestPackage1";
-        final String packageName2 = "TestPackage2";
-        final int[] interfaces =
-                {WifiManager.WIFI_INTERFACE_TYPE_AP, WifiManager.WIFI_INTERFACE_TYPE_AWARE};
-        final String[] packagesForInterfaces =
-                {TEST_PACKAGE_NAME, packageName1 + "," + packageName2};
-        final Set<WifiManager.InterfaceCreationImpact> interfacePairs = Set.of(
-                new WifiManager.InterfaceCreationImpact(interfaces[0],
-                        new ArraySet<>(new String[]{TEST_PACKAGE_NAME})),
-                new WifiManager.InterfaceCreationImpact(interfaces[1],
-                        new ArraySet<>(new String[]{packageName1, packageName2})));
-        when(mContext.getOpPackageName()).thenReturn(TEST_PACKAGE_NAME);
-        BiConsumer<Boolean, Set<WifiManager.InterfaceCreationImpact>> resultCallback = mock(
-                BiConsumer.class);
-        ArgumentCaptor<IInterfaceCreationInfoCallback.Stub> cbCaptor = ArgumentCaptor.forClass(
-                IInterfaceCreationInfoCallback.Stub.class);
-        ArgumentCaptor<Set<WifiManager.InterfaceCreationImpact>> resultCaptor =
-                ArgumentCaptor.forClass(Set.class);
-
-        mWifiManager.reportCreateInterfaceImpact(interfaceToCreate, requireNewInterface,
-                new SynchronousExecutor(), resultCallback);
-        verify(mWifiService).reportCreateInterfaceImpact(eq(TEST_PACKAGE_NAME),
-                eq(interfaceToCreate), eq(requireNewInterface), cbCaptor.capture());
-        cbCaptor.getValue().onResults(canCreate, interfaces, packagesForInterfaces);
-        verify(resultCallback).accept(eq(canCreate), resultCaptor.capture());
-        assertEquals(interfacePairs, resultCaptor.getValue());
-    }
 }
diff --git a/framework/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java b/framework/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java
index 397ede4..5ffb08a 100644
--- a/framework/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java
+++ b/framework/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java
@@ -16,7 +16,6 @@
 
 package android.net.wifi;
 
-import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
@@ -29,7 +28,6 @@
 import android.net.wifi.hotspot2.PasspointConfiguration;
 import android.net.wifi.hotspot2.PasspointTestUtils;
 import android.os.Parcel;
-import android.os.ParcelUuid;
 import android.telephony.SubscriptionManager;
 
 import androidx.test.filters.SmallTest;
@@ -38,7 +36,6 @@
 
 import org.junit.Test;
 
-import java.nio.charset.Charset;
 import java.security.cert.X509Certificate;
 
 /**
@@ -56,8 +53,6 @@
     private static final int DEFAULT_PRIORITY_GROUP = 0;
     private static final int TEST_PRIORITY_GROUP = 1;
     private static final int TEST_CARRIER_ID = 1998;
-    private static final ParcelUuid GROUP_UUID = ParcelUuid
-            .fromString("0000110B-0000-1000-8000-00805F9B34FB");
 
     /**
      * Validate correctness of WifiNetworkSuggestion object created by
@@ -956,8 +951,6 @@
                 .build();
         assertEquals(WifiConfiguration.RANDOMIZATION_PERSISTENT,
                 suggestion.wifiConfiguration.macRandomizationSetting);
-        assertEquals(WifiNetworkSuggestion.RANDOMIZATION_PERSISTENT,
-                suggestion.getMacRandomizationSetting());
 
         suggestion = new WifiNetworkSuggestion.Builder()
                 .setSsid(TEST_SSID)
@@ -966,8 +959,6 @@
                 .build();
         assertEquals(WifiConfiguration.RANDOMIZATION_NON_PERSISTENT,
                 suggestion.wifiConfiguration.macRandomizationSetting);
-        assertEquals(WifiNetworkSuggestion.RANDOMIZATION_NON_PERSISTENT,
-                suggestion.getMacRandomizationSetting());
     }
 
     /**
@@ -977,35 +968,24 @@
     @Test
     public void testWifiNetworkSuggestionBuilderSetMacRandomizationPasspoint() {
         PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        passpointConfiguration.setMacRandomizationEnabled(false);
         WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
                 .setPasspointConfig(passpointConfiguration)
                 .build();
-        assertEquals(false,
-                suggestion.passpointConfiguration.isNonPersistentMacRandomizationEnabled());
-        assertTrue(suggestion.passpointConfiguration.isMacRandomizationEnabled());
+        assertEquals(false, suggestion.passpointConfiguration.isEnhancedMacRandomizationEnabled());
 
         suggestion = new WifiNetworkSuggestion.Builder()
                 .setPasspointConfig(passpointConfiguration)
                 .setMacRandomizationSetting(
                         WifiNetworkSuggestion.RANDOMIZATION_PERSISTENT)
                 .build();
-        assertEquals(false,
-                suggestion.passpointConfiguration.isNonPersistentMacRandomizationEnabled());
-        assertTrue(suggestion.passpointConfiguration.isMacRandomizationEnabled());
-        assertEquals(WifiNetworkSuggestion.RANDOMIZATION_PERSISTENT,
-                suggestion.getMacRandomizationSetting());
+        assertEquals(false, suggestion.passpointConfiguration.isEnhancedMacRandomizationEnabled());
 
         suggestion = new WifiNetworkSuggestion.Builder()
                 .setPasspointConfig(passpointConfiguration)
                 .setMacRandomizationSetting(
                         WifiNetworkSuggestion.RANDOMIZATION_NON_PERSISTENT)
                 .build();
-        assertEquals(true,
-                suggestion.passpointConfiguration.isNonPersistentMacRandomizationEnabled());
-        assertTrue(suggestion.passpointConfiguration.isMacRandomizationEnabled());
-        assertEquals(WifiNetworkSuggestion.RANDOMIZATION_NON_PERSISTENT,
-                suggestion.getMacRandomizationSetting());
+        assertEquals(true, suggestion.passpointConfiguration.isEnhancedMacRandomizationEnabled());
     }
 
     /**
@@ -1628,111 +1608,4 @@
                 .setIsWpa3SaeH2eOnlyModeEnabled(true)
                 .build();
     }
-
-    /**
-     * Test set a network suggestion with restricted
-     */
-    @Test
-    public void testSetRestrictedNetwork() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setRestricted(true)
-                .build();
-        assertTrue(suggestion.isRestricted());
-        assertFalse(suggestion.isUserAllowedToManuallyConnect);
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when set {@link WifiNetworkSuggestion.Builder#setRestricted(boolean)} to true and
-     * set {@link WifiNetworkSuggestion.Builder#setCredentialSharedWithUser(boolean)} to true
-     * together.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testCredentialSharedWithUserWithSetRestrictedNetwork() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setRestricted(true)
-                .setCredentialSharedWithUser(true)
-                .build();
-    }
-
-    /**
-     * Test set a network suggestion with Subscription Group
-     */
-    @Test
-    public void testSetSubscriptionGroup() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setSubscriptionGroup(GROUP_UUID)
-                .build();
-        assertEquals(suggestion.getSubscriptionGroup(), GROUP_UUID);
-    }
-
-    /**
-     * Test set a passpoint network suggestion with Subscription Group
-     */
-    @Test
-    public void testSetSubscriptionGroupOnPasspoint() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setPasspointConfig(PasspointTestUtils.createConfig())
-                .setSubscriptionGroup(GROUP_UUID)
-                .build();
-        assertEquals(suggestion.getSubscriptionGroup(), GROUP_UUID);
-        assertEquals(suggestion.getPasspointConfig().getSubscriptionGroup(), GROUP_UUID);
-    }
-
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when set {@link WifiNetworkSuggestion.Builder#setSubscriptionGroup(ParcelUuid)} to null
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testSetSubscriptionGroupWithNull() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setSubscriptionGroup(null)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when set both {@link WifiNetworkSuggestion.Builder#setSubscriptionGroup(ParcelUuid)} and
-     * {@link WifiNetworkSuggestion.Builder#setSubscriptionId(int)}
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testSetBothSubscriptionGroupAdnSubscriptionId() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setSubscriptionGroup(GROUP_UUID)
-                .setSubscriptionId(1)
-                .build();
-    }
-
-    @Test
-    public void testSetWifiSsid() {
-        WifiSsid ssid = WifiSsid.fromBytes("服務集識別碼".getBytes(Charset.forName("GBK")));
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setWifiSsid(ssid)
-                .build();
-        assertArrayEquals(ssid.getBytes(), suggestion.getWifiSsid().getBytes());
-        assertNull(suggestion.getSsid());
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testSetEmptyWifiSsid() {
-        WifiSsid ssid = WifiSsid.fromBytes(null);
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setWifiSsid(ssid)
-                .build();
-    }
 }
diff --git a/framework/tests/src/android/net/wifi/WifiScannerTest.java b/framework/tests/src/android/net/wifi/WifiScannerTest.java
index 5157dec..07b97cf 100644
--- a/framework/tests/src/android/net/wifi/WifiScannerTest.java
+++ b/framework/tests/src/android/net/wifi/WifiScannerTest.java
@@ -25,7 +25,6 @@
 import static org.junit.Assert.fail;
 import static org.junit.Assume.assumeTrue;
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
@@ -34,7 +33,6 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import android.app.test.MockAnswerUtil;
 import android.content.Context;
 import android.net.wifi.WifiScanner.PnoSettings;
 import android.net.wifi.WifiScanner.PnoSettings.PnoNetwork;
@@ -46,7 +44,6 @@
 import android.os.Message;
 import android.os.Messenger;
 import android.os.Parcel;
-import android.os.RemoteException;
 import android.os.test.TestLooper;
 
 import androidx.test.filters.SmallTest;
@@ -64,7 +61,6 @@
 import org.mockito.Spy;
 
 import java.util.Arrays;
-import java.util.List;
 import java.util.concurrent.Executor;
 
 /**
@@ -270,12 +266,6 @@
         assertEquals(WifiScanner.WIFI_RNR_NOT_NEEDED, scanSettings.getRnrSetting());
     }
 
-    @Test
-    public void testIsScanning() throws Exception {
-        mWifiScanner.isScanning();
-        verify(mService).isScanning();
-    }
-
     /**
      * Test behavior of {@link WifiScanner#startScan(ScanSettings, ScanListener)}
      * @throws Exception
@@ -307,64 +297,6 @@
     }
 
     /**
-     * Test behavior of {@link WifiScanner#getSingleScanResults()}.
-     */
-    @Test
-    public void testGetSingleScanResults() {
-        ScanResult scanResult = new ScanResult();
-        scanResult.SSID = TEST_SSID_1;
-        ScanResult[] scanResults = {scanResult};
-
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public void answer(Message msg) {
-                Message responseMessage = Message.obtain();
-                responseMessage.what = msg.what == WifiScanner.CMD_GET_SINGLE_SCAN_RESULTS
-                        ? WifiScanner.CMD_OP_SUCCEEDED : WifiScanner.CMD_OP_FAILED;
-                responseMessage.arg2 = msg.arg2;
-                responseMessage.obj = new WifiScanner.ParcelableScanResults(scanResults);
-                try {
-                    msg.replyTo.send(responseMessage);
-                } catch (RemoteException e) {
-                    e.printStackTrace();
-                }
-            }
-        }).when(mHandler).handleMessage(any());
-
-        mLooper.startAutoDispatch();
-        List<ScanResult> results = mWifiScanner.getSingleScanResults();
-        mLooper.stopAutoDispatch();
-        assertEquals(1, results.size());
-        assertEquals(TEST_SSID_1, results.get(0).SSID);
-    }
-
-    /**
-     * Test behavior of {@link WifiScanner#getSingleScanResults()} with an incorrect response from
-     * the server.
-     */
-    @Test
-    public void testGetSingleScanResultsIncorrectResponse() {
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public void answer(Message msg) {
-                Message responseMessage = Message.obtain();
-                responseMessage.what = msg.what == WifiScanner.CMD_GET_SINGLE_SCAN_RESULTS
-                        ? WifiScanner.CMD_OP_SUCCEEDED : WifiScanner.CMD_OP_FAILED;
-                responseMessage.arg2 = msg.arg2;
-                responseMessage.obj = null;
-                try {
-                    msg.replyTo.send(responseMessage);
-                } catch (RemoteException e) {
-                    e.printStackTrace();
-                }
-            }
-        }).when(mHandler).handleMessage(any());
-
-        mLooper.startAutoDispatch();
-        List<ScanResult> results = mWifiScanner.getSingleScanResults();
-        mLooper.stopAutoDispatch();
-        assertEquals(0, results.size());
-    }
-
-    /**
      * Test behavior of {@link WifiScanner#stopScan(ScanListener)}
      * @throws Exception
      */
diff --git a/framework/tests/src/android/net/wifi/WifiSsidTest.java b/framework/tests/src/android/net/wifi/WifiSsidTest.java
index 54e12bf..10a37c0 100644
--- a/framework/tests/src/android/net/wifi/WifiSsidTest.java
+++ b/framework/tests/src/android/net/wifi/WifiSsidTest.java
@@ -16,21 +16,14 @@
 
 package android.net.wifi;
 
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.junit.Assert.fail;
-
-import android.net.wifi.util.HexEncoding;
-import android.os.Parcel;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import androidx.test.filters.SmallTest;
 
 import org.junit.Test;
 
-import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.List;
 
 /**
  * Unit tests for {@link android.net.wifi.WifiSsid}.
@@ -38,189 +31,30 @@
 @SmallTest
 public class WifiSsidTest {
 
-    private static final String TEST_SSID_UTF_8 = "Test SSID";
-    private static final String TEST_SSID_UTF_8_QUOTED = "\"" + TEST_SSID_UTF_8 + "\"";
-    private static final byte[] TEST_SSID_UTF_8_BYTES =
-            TEST_SSID_UTF_8.getBytes(StandardCharsets.UTF_8);
-    private static final String TEST_SSID_UTF_8_HEX =
-            HexEncoding.encodeToString(TEST_SSID_UTF_8_BYTES);
-
-    private static final byte[] TEST_SSID_NON_UTF_8_BYTES =
-            "服務集識別碼".getBytes(Charset.forName("GBK"));
-    private static final String TEST_SSID_NON_UTF_8_HEX =
-            HexEncoding.encodeToString(TEST_SSID_NON_UTF_8_BYTES);
+    private static final String TEST_SSID = "Test SSID";
+    private static final byte[] TEST_SSID_BYTES = TEST_SSID.getBytes(StandardCharsets.US_ASCII);
 
     /**
-     * Verify the behavior of fromByteArray()
+     * Check that createFromByteArray() works.
      */
     @Test
-    public void testFromByteArray() {
-        WifiSsid wifiSsidUtf8 = WifiSsid.fromBytes(TEST_SSID_UTF_8_BYTES);
-        assertThat(wifiSsidUtf8).isNotNull();
-        assertThat(wifiSsidUtf8.getBytes()).isEqualTo(TEST_SSID_UTF_8_BYTES);
-        assertThat(wifiSsidUtf8.getUtf8Text()).isEqualTo(TEST_SSID_UTF_8);
-        assertThat(wifiSsidUtf8.toString()).isEqualTo(TEST_SSID_UTF_8_QUOTED);
-
-        WifiSsid wifiSsidNonUtf8 = WifiSsid.fromBytes(TEST_SSID_NON_UTF_8_BYTES);
-        assertThat(wifiSsidNonUtf8).isNotNull();
-        assertThat(wifiSsidNonUtf8.getBytes()).isEqualTo(TEST_SSID_NON_UTF_8_BYTES);
-        assertThat(wifiSsidNonUtf8.getUtf8Text()).isNull();
-        assertThat(wifiSsidNonUtf8.toString()).isEqualTo(TEST_SSID_NON_UTF_8_HEX);
-
-        WifiSsid wifiSsidEmpty = WifiSsid.fromBytes(new byte[0]);
-        assertThat(wifiSsidEmpty).isNotNull();
-        assertThat(wifiSsidEmpty.getBytes()).isEmpty();
-        assertThat(wifiSsidEmpty.getUtf8Text().toString()).isEmpty();
-        assertThat(wifiSsidEmpty.toString()).isEmpty();
-
-        WifiSsid wifiSsidNull = WifiSsid.fromBytes(null);
-        assertThat(wifiSsidNull).isNotNull();
-        assertThat(wifiSsidNull.getBytes()).isEmpty();
-        assertThat(wifiSsidNull.getUtf8Text().toString()).isEmpty();
-        assertThat(wifiSsidNull.toString()).isEmpty();
-
-        try {
-            WifiSsid.fromBytes(new byte[33]);
-            fail("Expected IllegalArgumentException for byte array length greater than 32.");
-        } catch (IllegalArgumentException e) {
-            // Success
-        }
+    public void testCreateFromByteArray() {
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(TEST_SSID_BYTES);
+        assertTrue(wifiSsid != null);
+        assertEquals(TEST_SSID, wifiSsid.toString());
     }
 
     /**
-     * Verify the behavior of fromUtf8String()
-     */
-    @Test
-    public void testFromUtf8String() {
-        WifiSsid wifiSsidUtf8 = WifiSsid.fromUtf8Text(TEST_SSID_UTF_8);
-        assertThat(wifiSsidUtf8).isNotNull();
-        assertThat(wifiSsidUtf8.getBytes()).isEqualTo(TEST_SSID_UTF_8_BYTES);
-        assertThat(wifiSsidUtf8.getUtf8Text()).isEqualTo(TEST_SSID_UTF_8);
-        assertThat(wifiSsidUtf8.toString()).isEqualTo(TEST_SSID_UTF_8_QUOTED);
-
-        WifiSsid wifiSsidEmpty = WifiSsid.fromUtf8Text("");
-        assertThat(wifiSsidEmpty).isNotNull();
-        assertThat(wifiSsidEmpty.getBytes()).isEmpty();
-        assertThat(wifiSsidEmpty.getUtf8Text().toString()).isEmpty();
-        assertThat(wifiSsidEmpty.toString()).isEmpty();
-
-        WifiSsid wifiSsidNull = WifiSsid.fromUtf8Text(null);
-        assertThat(wifiSsidNull).isNotNull();
-        assertThat(wifiSsidNull.getBytes()).isEmpty();
-        assertThat(wifiSsidNull.getUtf8Text().toString()).isEmpty();
-        assertThat(wifiSsidNull.toString()).isEmpty();
-
-        try {
-            WifiSsid.fromUtf8Text("This is an SSID that is much longer than 32 bytes");
-            fail("Expected IllegalArgumentException for byte array length greater than 32.");
-        } catch (IllegalArgumentException e) {
-            // Success
-        }
-    }
-
-    /**
-     * Verify the behavior of fromString()
-     */
-    @Test
-    public void testFromString() {
-        WifiSsid wifiSsidUtf8 = WifiSsid.fromString(TEST_SSID_UTF_8_QUOTED);
-        assertThat(wifiSsidUtf8).isNotNull();
-        assertThat(wifiSsidUtf8.getBytes()).isEqualTo(TEST_SSID_UTF_8_BYTES);
-        assertThat(wifiSsidUtf8.getUtf8Text()).isEqualTo(TEST_SSID_UTF_8);
-        assertThat(wifiSsidUtf8.toString()).isEqualTo(TEST_SSID_UTF_8_QUOTED);
-
-        WifiSsid wifiSsidUtf8Hex = WifiSsid.fromString(TEST_SSID_UTF_8_HEX);
-        assertThat(wifiSsidUtf8Hex).isNotNull();
-        assertThat(wifiSsidUtf8Hex.getBytes()).isEqualTo(TEST_SSID_UTF_8_BYTES);
-        assertThat(wifiSsidUtf8Hex.getUtf8Text()).isEqualTo(TEST_SSID_UTF_8);
-        assertThat(wifiSsidUtf8Hex.toString()).isEqualTo(TEST_SSID_UTF_8_QUOTED);
-
-        WifiSsid wifiSsidNonUtf8 = WifiSsid.fromString(TEST_SSID_NON_UTF_8_HEX);
-        assertThat(wifiSsidNonUtf8).isNotNull();
-        assertThat(wifiSsidNonUtf8.getBytes()).isEqualTo(TEST_SSID_NON_UTF_8_BYTES);
-        assertThat(wifiSsidNonUtf8.getUtf8Text()).isNull();
-        assertThat(wifiSsidNonUtf8.toString()).isEqualTo(TEST_SSID_NON_UTF_8_HEX);
-
-        WifiSsid wifiSsidEmpty = WifiSsid.fromUtf8Text("");
-        assertThat(wifiSsidEmpty).isNotNull();
-        assertThat(wifiSsidEmpty.getBytes()).isEmpty();
-        assertThat(wifiSsidEmpty.getUtf8Text().toString()).isEmpty();
-        assertThat(wifiSsidEmpty.toString()).isEmpty();
-
-        WifiSsid wifiSsidNull = WifiSsid.fromUtf8Text(null);
-        assertThat(wifiSsidNull).isNotNull();
-        assertThat(wifiSsidNull.getBytes()).isEmpty();
-        assertThat(wifiSsidNull.getUtf8Text().toString()).isEmpty();
-        assertThat(wifiSsidNull.toString()).isEmpty();
-
-        try {
-            WifiSsid.fromString("\"This is an SSID that is much longer than 32 bytes\"");
-            fail("Expected IllegalArgumentException for byte array length greater than 32.");
-        } catch (IllegalArgumentException e) {
-            // Success
-        }
-
-        try {
-            WifiSsid.fromString(
-                    "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789AB");
-            fail("Expected IllegalArgumentException for byte array length greater than 32.");
-        } catch (IllegalArgumentException e) {
-            // Success
-        }
-
-        try {
-            WifiSsid.fromString("0123456");
-            fail("Expected IllegalArgumentException for odd-length hexadecimal string");
-        } catch (IllegalArgumentException e) {
-            // Success
-        }
-    }
-
-    /**
-     * Verify that SSID created from bytes, UTF-8 String, and toString()-formatted String with the
-     * same content are equal.
+     * Verify that SSID created from byte array and string with the same content are equal.
      *
      * @throws Exception
      */
     @Test
     public void testEquals() throws Exception {
-        WifiSsid fromBytesUtf8 = WifiSsid.fromBytes(TEST_SSID_UTF_8_BYTES);
-        WifiSsid fromUtf8StringUtf8 = WifiSsid.fromUtf8Text(TEST_SSID_UTF_8);
-        WifiSsid fromStringUtf8 = WifiSsid.fromString(TEST_SSID_UTF_8_QUOTED);
-        assertThat(fromBytesUtf8).isNotNull();
-        assertThat(fromUtf8StringUtf8).isNotNull();
-        assertThat(fromStringUtf8).isNotNull();
-        assertThat(fromBytesUtf8).isEqualTo(fromUtf8StringUtf8);
-        assertThat(fromBytesUtf8).isEqualTo(fromStringUtf8);
-        assertThat(fromUtf8StringUtf8).isEqualTo(fromStringUtf8);
-
-        WifiSsid fromBytesNonUtf8 = WifiSsid.fromBytes(TEST_SSID_NON_UTF_8_BYTES);
-        WifiSsid fromStringNonUtf8 = WifiSsid.fromString(TEST_SSID_NON_UTF_8_HEX);
-        assertThat(fromBytesNonUtf8).isNotNull();
-        assertThat(fromStringNonUtf8).isNotNull();
-        assertThat(fromBytesNonUtf8).isEqualTo(fromStringNonUtf8);
-
-        assertThat(fromBytesUtf8).isNotEqualTo(fromBytesNonUtf8);
-    }
-
-    /**
-     * Verify the behavior of the Parcelable interface implementation.
-     */
-    @Test
-    public void testParcelable() throws Exception {
-        List<WifiSsid> testWifiSsids = Arrays.asList(
-                WifiSsid.fromBytes(TEST_SSID_UTF_8_BYTES),
-                WifiSsid.fromBytes(TEST_SSID_NON_UTF_8_BYTES),
-                WifiSsid.fromUtf8Text(TEST_SSID_UTF_8),
-                WifiSsid.fromString(TEST_SSID_UTF_8_QUOTED),
-                WifiSsid.fromString(TEST_SSID_UTF_8_HEX),
-                WifiSsid.fromString(TEST_SSID_NON_UTF_8_HEX));
-
-        for (WifiSsid wifiSsid : testWifiSsids) {
-            Parcel parcel = Parcel.obtain();
-            wifiSsid.writeToParcel(parcel, 0);
-            parcel.setDataPosition(0);
-            assertThat(WifiSsid.CREATOR.createFromParcel(parcel)).isEqualTo(wifiSsid);
-        }
+        WifiSsid fromBytes = WifiSsid.createFromByteArray(TEST_SSID_BYTES);
+        WifiSsid fromString = WifiSsid.createFromAsciiEncoded(TEST_SSID);
+        assertTrue(fromBytes != null);
+        assertTrue(fromString != null);
+        assertEquals(fromBytes, fromString);
     }
 }
diff --git a/framework/tests/src/android/net/wifi/WifiStringResourceWrapperTest.java b/framework/tests/src/android/net/wifi/WifiStringResourceWrapperTest.java
deleted file mode 100644
index 36dcf31..0000000
--- a/framework/tests/src/android/net/wifi/WifiStringResourceWrapperTest.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi;
-
-import static android.net.wifi.WifiStringResourceWrapper.CARRIER_ID_RESOURCE_NAME_SUFFIX;
-
-import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.lenient;
-import static org.mockito.Mockito.validateMockitoUsage;
-import static org.mockito.Mockito.when;
-
-import android.content.res.Resources;
-import android.telephony.SubscriptionManager;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.MockitoSession;
-
-/**
- * Unit tests for {@link WifiStringResourceWrapper}
- */
-@SmallTest
-public class WifiStringResourceWrapperTest {
-    private MockitoSession mStaticMockSession = null;
-
-    @Mock WifiContext mContext;
-    @Mock Resources mResources;
-
-    WifiStringResourceWrapper mDut;
-
-    private static final int SUB_ID = 123;
-    private static final int CARRIER_ID = 4567;
-
-    private static final int RES_ID_NOT_FOUND = 0;
-
-    private static final String RES_NAME_1 = "some_eap_error";
-    private static final int RES_ID_1 = 32764;
-    private static final String RES_STRING_VAL_1 = "Some message";
-
-    private static final int RES_ID_2 = 32765;
-    private static final String[] RES_STRING_ARRAY_VAL_2 = { // carrier ID not included
-            ":::1234:::Some message AA",
-            ":::45678:::Some message BB"
-    };
-    private static final String[] RES_STRING_ARRAY_VAL_3 = { // carrier ID is here!
-            ":::1234:::Some message CC",
-            ":::4567:::Some message DD"
-    };
-    private static final String[] RES_STRING_ARRAY_VAL_4 = { // carrier ID is here - empty message
-            ":::1234:::Some message EE",
-            ":::4567:::"
-    };
-    private static final String[] RES_STRING_ARRAY_VAL_5 = { // carrier ID is here - bad format
-            ":::1234:::Some message FF",
-            ":::4567::"
-    };
-
-    /**
-     * Sets up for unit test
-     */
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-
-        // static mocking
-        mStaticMockSession = mockitoSession()
-                .mockStatic(SubscriptionManager.class)
-                .startMocking();
-        lenient().when(SubscriptionManager.getResourcesForSubId(any(), eq(SUB_ID)))
-                .thenReturn(mResources);
-
-        when(mResources.getIdentifier(eq(RES_NAME_1), eq("string"), any())).thenReturn(RES_ID_1);
-        when(mResources.getString(eq(RES_ID_1), any())).thenReturn(RES_STRING_VAL_1);
-        when(mResources.getIdentifier(eq(RES_NAME_1 + CARRIER_ID_RESOURCE_NAME_SUFFIX),
-                eq("array"), any())).thenReturn(RES_ID_NOT_FOUND);
-
-        mDut = new WifiStringResourceWrapper(mContext, SUB_ID, CARRIER_ID);
-    }
-
-    @After
-    public void cleanUp() throws Exception {
-        validateMockitoUsage();
-        if (mStaticMockSession != null) {
-            mStaticMockSession.finishMocking();
-        }
-    }
-
-    @Test
-    public void testBasicOperations() {
-        assertEquals("Some message", mDut.getString(RES_NAME_1));
-        assertNull(mDut.getString("something else"));
-    }
-
-    @Test
-    public void testCarrierIdWithBaseNoOverride() {
-        when(mResources.getIdentifier(eq(RES_NAME_1 + CARRIER_ID_RESOURCE_NAME_SUFFIX),
-                eq("array"), any())).thenReturn(RES_ID_2);
-        when(mResources.getStringArray(eq(RES_ID_2))).thenReturn(RES_STRING_ARRAY_VAL_2);
-        assertEquals("Some message", mDut.getString(RES_NAME_1));
-    }
-
-    @Test
-    public void testCarrierIdAvailable() {
-        when(mResources.getIdentifier(eq(RES_NAME_1 + CARRIER_ID_RESOURCE_NAME_SUFFIX),
-                eq("array"), any())).thenReturn(RES_ID_2);
-        when(mResources.getStringArray(eq(RES_ID_2))).thenReturn(RES_STRING_ARRAY_VAL_3);
-        assertEquals("Some message DD", mDut.getString(RES_NAME_1));
-    }
-
-    @Test
-    public void testCarrierIdAvailableEmptyMessage() {
-        when(mResources.getIdentifier(eq(RES_NAME_1 + CARRIER_ID_RESOURCE_NAME_SUFFIX),
-                eq("array"), any())).thenReturn(RES_ID_2);
-        when(mResources.getStringArray(eq(RES_ID_2))).thenReturn(RES_STRING_ARRAY_VAL_4);
-        assertEquals("", mDut.getString(RES_NAME_1));
-    }
-
-    @Test
-    public void testCarrierIdBadlyFormatted() {
-        when(mResources.getIdentifier(eq(RES_NAME_1 + CARRIER_ID_RESOURCE_NAME_SUFFIX),
-                eq("array"), any())).thenReturn(RES_ID_2);
-        when(mResources.getStringArray(eq(RES_ID_2))).thenReturn(RES_STRING_ARRAY_VAL_5);
-        assertEquals("Some message", mDut.getString(RES_NAME_1));
-    }
-}
diff --git a/framework/tests/src/android/net/wifi/aware/WifiAwareDataPathSecurityConfigTest.java b/framework/tests/src/android/net/wifi/aware/WifiAwareDataPathSecurityConfigTest.java
deleted file mode 100644
index ce9e617..0000000
--- a/framework/tests/src/android/net/wifi/aware/WifiAwareDataPathSecurityConfigTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2022 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 android.net.wifi.aware;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit test harness for WifiAwareDataPathSecurityConfig class.
- */
-@SmallTest
-public class WifiAwareDataPathSecurityConfigTest {
-    private static final String INVALID_PASSPHRASE = "0";
-    private static final String PASSPHRASE = "PASSPHRASE";
-    private static final byte[] PMK = "01234567890123456789012345678901".getBytes();
-    private static final byte[] INVALID_PMK = "0123456789012345678901234567890".getBytes();
-    private static final byte[] PMKID = "0123456789012345".getBytes();
-    private static final byte[] INVALID_PMKID = "012345678901234".getBytes();
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testBuilderWithInvalidPassphrase() {
-        WifiAwareDataPathSecurityConfig.Builder builder =
-                new WifiAwareDataPathSecurityConfig
-                        .Builder(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128);
-        builder.setPskPassphrase(INVALID_PASSPHRASE);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testBuilderWithInvalidPmk() {
-        WifiAwareDataPathSecurityConfig.Builder builder =
-                new WifiAwareDataPathSecurityConfig
-                        .Builder(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128);
-        builder.setPmk(INVALID_PMK);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testBuilderWithInvalidPmkId() {
-        WifiAwareDataPathSecurityConfig.Builder builder =
-                new WifiAwareDataPathSecurityConfig
-                        .Builder(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_128);
-        builder.setPmkId(INVALID_PMKID);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testBuilderWithInvalidCipherSuite() {
-        WifiAwareDataPathSecurityConfig.Builder builder =
-                new WifiAwareDataPathSecurityConfig
-                        .Builder(3);
-    }
-
-    @Test
-    public void testBuilderWithSKCipherSuite() {
-        WifiAwareDataPathSecurityConfig.Builder builder =
-                new WifiAwareDataPathSecurityConfig
-                        .Builder(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128);
-        builder.setPskPassphrase(PASSPHRASE);
-        WifiAwareDataPathSecurityConfig securityConfig = builder.build();
-        assertTrue(securityConfig.isValid());
-        assertEquals(PASSPHRASE, securityConfig.getPskPassphrase());
-        assertEquals(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128,
-                securityConfig.getCipherSuite());
-
-        builder = new WifiAwareDataPathSecurityConfig
-                .Builder(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256);
-        builder.setPmk(PMK);
-        securityConfig = builder.build();
-        assertTrue(securityConfig.isValid());
-        assertEquals(PMK, securityConfig.getPmk());
-        assertEquals(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256,
-                securityConfig.getCipherSuite());
-    }
-
-    @Test
-    public void testBuilderWithPKCipherSuite() {
-        WifiAwareDataPathSecurityConfig.Builder builder =
-                new WifiAwareDataPathSecurityConfig
-                        .Builder(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_128);
-        builder.setPmk(PMK);
-        builder.setPmkId(PMKID);
-        WifiAwareDataPathSecurityConfig securityConfig = builder.build();
-        assertTrue(securityConfig.isValid());
-        assertEquals(PMK, securityConfig.getPmk());
-        assertEquals(PMKID, securityConfig.getPmkId());
-        assertEquals(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_128,
-                securityConfig.getCipherSuite());
-    }
-
-}
diff --git a/framework/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java b/framework/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java
index 86ea6d2..f2bdb3c 100644
--- a/framework/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java
+++ b/framework/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java
@@ -16,7 +16,6 @@
 
 package android.net.wifi.aware;
 
-import static android.net.wifi.ScanResult.CHANNEL_WIDTH_80MHZ;
 import static android.net.wifi.aware.WifiAwareManager.WIFI_AWARE_DISCOVERY_LOST_REASON_PEER_NOT_VISIBLE;
 import static android.net.wifi.aware.WifiAwareNetworkSpecifier.NETWORK_SPECIFIER_TYPE_IB;
 
@@ -161,12 +160,6 @@
         verify(mockAwareService).isDeviceAttached();
     }
 
-    @Test
-    public void testIsSetChannelOnDataPathSupported() throws Exception {
-        mDut.isSetChannelOnDataPathSupported();
-        verify(mockAwareService).isSetChannelOnDataPathSupported();
-    }
-
     /**
      * Validate pass-through of isInstantCommunicationModeEnabled() and
      * enableInstantCommunicationMode() API
@@ -211,7 +204,7 @@
         // (1) connect + success
         mDut.attach(mockCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).connect(binder.capture(), any(), any(),
-                clientProxyCallback.capture(), isNull(), eq(false), any());
+                clientProxyCallback.capture(), isNull(), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -221,7 +214,7 @@
         PublishConfig publishConfig = new PublishConfig.Builder().build();
         session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                any(), any());
+                any());
 
         // (3) disconnect
         session.close();
@@ -234,7 +227,7 @@
         // (5) connect
         mDut.attach(mockCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).connect(binder.capture(), any(), any(), any(), isNull(),
-                eq(false), any());
+                eq(false));
 
         verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService);
     }
@@ -256,7 +249,7 @@
         // (1) connect + failure
         mDut.attach(mockCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                isNull(), eq(false), any());
+                isNull(), eq(false));
         clientProxyCallback.getValue().onConnectFail(reason);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttachFailed();
@@ -264,7 +257,7 @@
         // (2) connect + success
         mDut.attach(mockCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                isNull(), eq(false), any());
+                isNull(), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -274,12 +267,7 @@
         SubscribeConfig subscribeConfig = new SubscribeConfig.Builder().build();
         session.subscribe(subscribeConfig, mockSessionCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).subscribe(any(), any(), eq(clientId), eq(subscribeConfig),
-                any(), any());
-
-        // (5) Terminate attach session
-        clientProxyCallback.getValue().onAttachTerminate();
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAwareSessionTerminated();
+                any());
 
         verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService);
     }
@@ -299,7 +287,7 @@
         // (1) connect + success
         mDut.attach(mockCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                isNull(), eq(false), any());
+                isNull(), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(any());
@@ -307,7 +295,7 @@
         // (2) connect + success
         mDut.attach(mockCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                isNull(), eq(false), any());
+                isNull(), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId + 1);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(any());
@@ -354,7 +342,7 @@
         // (0) connect + success
         mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false), any());
+                eq(configRequest), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -363,7 +351,7 @@
         // (1) publish
         session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                sessionProxyCallback.capture(), any());
+                sessionProxyCallback.capture());
 
         // (2) publish session created
         sessionProxyCallback.getValue().onSessionStarted(sessionId);
@@ -372,8 +360,7 @@
 
         // (3) ...
         publishSession.getValue().sendMessage(peerHandle, messageId, string1.getBytes());
-        sessionProxyCallback.getValue().onMatch(peerHandle.peerId, string1.getBytes(), matchFilter,
-                0, new byte[0]);
+        sessionProxyCallback.getValue().onMatch(peerHandle.peerId, string1.getBytes(), matchFilter);
         sessionProxyCallback.getValue().onMessageReceived(peerHandle.peerId, string1.getBytes());
         sessionProxyCallback.getValue().onMessageSendFail(messageId, reason);
         sessionProxyCallback.getValue().onMessageSendSuccess(messageId);
@@ -384,7 +371,6 @@
         inOrder.verify(mockSessionCallback).onServiceDiscovered(peerIdCaptor.capture(),
                 eq(string1.getBytes()),
                 matchFilterCaptor.capture());
-        inOrder.verify(mockSessionCallback).onServiceDiscovered(any(ServiceDiscoveryInfo.class));
 
         // note: need to capture/compare elements since the Mockito eq() is a shallow comparator
         List<byte[]> parsedMatchFilter = new TlvBufferUtils.TlvIterable(0, 1, matchFilter).toList();
@@ -455,7 +441,7 @@
         // (1) connect successfully
         mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false), any());
+                eq(configRequest), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -464,7 +450,7 @@
         // (2) publish: successfully - then terminated
         session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                sessionProxyCallback.capture(), any());
+                sessionProxyCallback.capture());
         sessionProxyCallback.getValue().onSessionStarted(sessionId);
         sessionProxyCallback.getValue().onSessionTerminated(0);
         mMockLooper.dispatchAll();
@@ -512,7 +498,7 @@
         // (0) connect + success
         mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false), any());
+                eq(configRequest), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -521,7 +507,7 @@
         // (1) subscribe
         session.subscribe(subscribeConfig, mockSessionCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).subscribe(any(), any(), eq(clientId), eq(subscribeConfig),
-                sessionProxyCallback.capture(), any());
+                sessionProxyCallback.capture());
 
         // (2) subscribe session created
         sessionProxyCallback.getValue().onSessionStarted(sessionId);
@@ -530,10 +516,9 @@
 
         // (3) ...
         subscribeSession.getValue().sendMessage(peerHandle, messageId, string1.getBytes());
-        sessionProxyCallback.getValue().onMatch(peerHandle.peerId, string1.getBytes(), matchFilter,
-                0, new byte[0]);
+        sessionProxyCallback.getValue().onMatch(peerHandle.peerId, string1.getBytes(), matchFilter);
         sessionProxyCallback.getValue().onMatchWithDistance(peerHandle.peerId, string1.getBytes(),
-                matchFilter, distanceMm, 0, new byte[0]);
+                matchFilter, distanceMm);
         sessionProxyCallback.getValue().onMessageReceived(peerHandle.peerId, string1.getBytes());
         sessionProxyCallback.getValue().onMessageSendFail(messageId, reason);
         sessionProxyCallback.getValue().onMessageSendSuccess(messageId);
@@ -542,12 +527,9 @@
         inOrder.verify(mockAwareService).sendMessage(eq(clientId), eq(sessionId),
                 eq(peerHandle.peerId), eq(string1.getBytes()), eq(messageId), eq(0));
         inOrder.verify(mockSessionCallback).onServiceDiscovered(peerIdCaptor.capture(),
-                eq(string1.getBytes()), any());
-        inOrder.verify(mockSessionCallback).onServiceDiscovered(any(ServiceDiscoveryInfo.class));
+                eq(string1.getBytes()), isNull());
         inOrder.verify(mockSessionCallback).onServiceDiscoveredWithinRange(peerIdCaptor.capture(),
-                eq(string1.getBytes()), any(), eq(distanceMm));
-        inOrder.verify(mockSessionCallback).onServiceDiscoveredWithinRange(
-                any(ServiceDiscoveryInfo.class), eq(distanceMm));
+                eq(string1.getBytes()), isNull(), eq(distanceMm));
         assertEquals((peerIdCaptor.getValue()).peerId, peerHandle.peerId);
         inOrder.verify(mockSessionCallback).onMessageReceived(peerIdCaptor.capture(),
                 eq(string1.getBytes()));
@@ -608,7 +590,7 @@
         // (1) connect successfully
         mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false), any());
+                eq(configRequest), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -617,7 +599,7 @@
         // (2) subscribe: successfully - then terminated
         session.subscribe(subscribeConfig, mockSessionCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).subscribe(any(), any(), eq(clientId), eq(subscribeConfig),
-                sessionProxyCallback.capture(), any());
+                sessionProxyCallback.capture());
         sessionProxyCallback.getValue().onSessionStarted(sessionId);
         sessionProxyCallback.getValue().onSessionTerminated(0);
         mMockLooper.dispatchAll();
@@ -1026,7 +1008,7 @@
         // (1) connect successfully
         mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false), any());
+                eq(configRequest), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -1035,7 +1017,7 @@
         // (2) publish successfully
         session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                sessionProxyCallback.capture(), any());
+                sessionProxyCallback.capture());
         sessionProxyCallback.getValue().onSessionStarted(sessionId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onPublishStarted(publishSession.capture());
@@ -1074,16 +1056,14 @@
         collector.checkThat("client_id", clientId, equalTo(ns.clientId));
         collector.checkThat("session_id", sessionId, equalTo(ns.sessionId));
         collector.checkThat("peer_id", peerHandle.peerId, equalTo(ns.peerId));
-        collector.checkThat("pmk", pmk , equalTo(ns
-                .getWifiAwareDataPathSecurityConfig().getPmk()));
+        collector.checkThat("pmk", pmk , equalTo(ns.pmk));
 
         collector.checkThat("role", WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER,
                 equalTo(nsb.role));
         collector.checkThat("client_id", clientId, equalTo(nsb.clientId));
         collector.checkThat("session_id", sessionId, equalTo(nsb.sessionId));
         collector.checkThat("peer_id", peerHandle.peerId, equalTo(nsb.peerId));
-        collector.checkThat("pmk", pmk , equalTo(nsb
-                .getWifiAwareDataPathSecurityConfig().getPmk()));
+        collector.checkThat("pmk", pmk , equalTo(nsb.pmk));
         collector.checkThat("port", port, equalTo(nsb.port));
         collector.checkThat("transportProtocol", transportProtocol, equalTo(nsb.transportProtocol));
 
@@ -1094,7 +1074,7 @@
                         peerHandle, passphrase);
         nsb = new WifiAwareNetworkSpecifier.Builder(publishSession.getValue(),
                 peerHandle).setPskPassphrase(passphrase).setPort(port).setTransportProtocol(
-                transportProtocol).setChannelFrequencyMhz(5750, true).build();
+                transportProtocol).build();
 
         // validate format
         collector.checkThat("role", WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER,
@@ -1102,20 +1082,16 @@
         collector.checkThat("client_id", clientId, equalTo(ns.clientId));
         collector.checkThat("session_id", sessionId, equalTo(ns.sessionId));
         collector.checkThat("peer_id", peerHandle.peerId, equalTo(ns.peerId));
-        collector.checkThat("passphrase", passphrase, equalTo(ns
-                .getWifiAwareDataPathSecurityConfig().getPskPassphrase()));
+        collector.checkThat("passphrase", passphrase, equalTo(ns.passphrase));
 
         collector.checkThat("role", WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER,
                 equalTo(nsb.role));
         collector.checkThat("client_id", clientId, equalTo(nsb.clientId));
         collector.checkThat("session_id", sessionId, equalTo(nsb.sessionId));
         collector.checkThat("peer_id", peerHandle.peerId, equalTo(nsb.peerId));
-        collector.checkThat("passphrase", passphrase, equalTo(nsb
-                .getWifiAwareDataPathSecurityConfig().getPskPassphrase()));
+        collector.checkThat("passphrase", passphrase, equalTo(nsb.passphrase));
         collector.checkThat("port", port, equalTo(nsb.port));
         collector.checkThat("transportProtocol", transportProtocol, equalTo(nsb.transportProtocol));
-        collector.checkThat("channel", 5750, equalTo(nsb.getChannelFrequencyMhz()));
-        collector.checkThat("ForceChannel", true, equalTo(nsb.isChannelRequired()));
 
         verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService,
                 mockPublishSession, mockRttListener);
@@ -1145,7 +1121,7 @@
         // (1) connect successfully
         mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false), any());
+                eq(configRequest), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -1167,8 +1143,7 @@
         collector.checkThat("role", role, equalTo(ns.role));
         collector.checkThat("client_id", clientId, equalTo(ns.clientId));
         collector.checkThat("peer_mac", someMac, equalTo(ns.peerMac));
-        collector.checkThat("pmk", pmk, equalTo(
-                ns.getWifiAwareDataPathSecurityConfig().getPmk()));
+        collector.checkThat("pmk", pmk, equalTo(ns.pmk));
 
         // (4) request an encrypted (Passphrase) direct network specifier
         ns = (WifiAwareNetworkSpecifier) session.createNetworkSpecifierPassphrase(role, someMac,
@@ -1178,8 +1153,7 @@
         collector.checkThat("role", role, equalTo(ns.role));
         collector.checkThat("client_id", clientId, equalTo(ns.clientId));
         collector.checkThat("peer_mac", someMac, equalTo(ns.peerMac));
-        collector.checkThat("passphrase", passphrase, equalTo(
-                ns.getWifiAwareDataPathSecurityConfig().getPskPassphrase()));
+        collector.checkThat("passphrase", passphrase, equalTo(ns.passphrase));
 
         verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService,
                 mockPublishSession, mockRttListener);
@@ -1331,7 +1305,7 @@
         // (1) connect successfully
         mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false), any());
+                eq(configRequest), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -1340,7 +1314,7 @@
         // (2) publish successfully
         session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
         inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                sessionProxyCallback.capture(), any());
+                sessionProxyCallback.capture());
         sessionProxyCallback.getValue().onSessionStarted(sessionId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onPublishStarted(publishSession.capture());
@@ -1434,23 +1408,6 @@
     }
 
     /**
-     * Validate that a valid {@link WifiAwareNetworkSpecifier.Builder} can be reusable.
-     */
-    @Test
-    public void testNetworkSpecifierBuilderReusable() throws Exception {
-        final PeerHandle peerHandle = new PeerHandle(123412);
-        final byte[] pmk = PMK_VALID;
-
-        DiscoverySession publishSession = executeSessionStartup(true);
-
-        WifiAwareNetworkSpecifier.Builder nsBuilder = new WifiAwareNetworkSpecifier
-                .Builder(publishSession, peerHandle).setPmk(pmk);
-        nsBuilder.build();
-        // Verify that calling build second time will also success.
-        nsBuilder.build();
-    }
-
-    /**
      * Validate that get an exception when creating a network specifier with an invalid port number
      * (<=0).
      */
@@ -1583,7 +1540,7 @@
         // (1) connect successfully
         mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false), any());
+                eq(configRequest), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -1623,7 +1580,7 @@
         // (1) connect successfully
         mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
         inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false), any());
+                eq(configRequest), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -1633,7 +1590,7 @@
             // (2) publish successfully
             session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
             inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                    sessionProxyCallback.capture(), any());
+                    sessionProxyCallback.capture());
             sessionProxyCallback.getValue().onSessionStarted(sessionId);
             mMockLooper.dispatchAll();
             inOrder.verify(mockSessionCallback).onPublishStarted(publishSession.capture());
@@ -1642,7 +1599,7 @@
             // (2) subscribe successfully
             session.subscribe(subscribeConfig, mockSessionCallback, mMockLooperHandler);
             inOrder.verify(mockAwareService).subscribe(any(), any(), eq(clientId),
-                    eq(subscribeConfig), sessionProxyCallback.capture(), any());
+                    eq(subscribeConfig), sessionProxyCallback.capture());
             sessionProxyCallback.getValue().onSessionStarted(sessionId);
             mMockLooper.dispatchAll();
             inOrder.verify(mockSessionCallback).onSubscribeStarted(subscribeSession.capture());
@@ -1657,7 +1614,7 @@
         WifiAwareNetworkSpecifier ns = new WifiAwareNetworkSpecifier(NETWORK_SPECIFIER_TYPE_IB,
                 WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER, 5, 568, 334,
                 HexEncoding.decode("000102030405".toCharArray(), false),
-                "01234567890123456789012345678901".getBytes(), null, 666, 4);
+                "01234567890123456789012345678901".getBytes(), "blah blah", 666, 4);
 
         Parcel parcelW = Parcel.obtain();
         ns.writeToParcel(parcelW, 0);
@@ -1676,8 +1633,6 @@
 
     @Test
     public void testWifiAwareNetworkCapabilitiesParcel() throws UnknownHostException {
-        final WifiAwareChannelInfo channelInfo = new WifiAwareChannelInfo(5750,
-                CHANNEL_WIDTH_80MHZ, 2);
         final Inet6Address inet6 = MacAddress.fromString(
                 "11:22:33:44:55:66").getLinkLocalIpv6FromEui48Mac();
         // note: placeholder scope = 5
@@ -1686,8 +1641,7 @@
         final int transportProtocol = 6;
 
         assertEquals(inet6Scoped.toString(), "/fe80::1322:33ff:fe44:5566%5");
-        WifiAwareNetworkInfo cap = new WifiAwareNetworkInfo(inet6Scoped, port, transportProtocol,
-                List.of(channelInfo));
+        WifiAwareNetworkInfo cap = new WifiAwareNetworkInfo(inet6Scoped, port, transportProtocol);
 
         Parcel parcelW = Parcel.obtain();
         cap.writeToParcel(parcelW, 0);
@@ -1703,7 +1657,6 @@
         assertEquals(cap.getPeerIpv6Addr().toString(), "/fe80::1322:33ff:fe44:5566%5");
         assertEquals(cap, rereadCap);
         assertEquals(cap.hashCode(), rereadCap.hashCode());
-        assertEquals(cap.getChannelInfoList(), rereadCap.getChannelInfoList());
     }
 
     // ParcelablePeerHandle tests
diff --git a/framework/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java b/framework/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java
index 93e62b2..2ded849 100644
--- a/framework/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java
+++ b/framework/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java
@@ -39,7 +39,7 @@
 @SmallTest
 public class OsuProviderTest {
     private static final WifiSsid TEST_SSID =
-            WifiSsid.fromBytes("TEST SSID".getBytes(StandardCharsets.UTF_8));
+            WifiSsid.createFromByteArray("TEST SSID".getBytes(StandardCharsets.UTF_8));
     private static final String TEST_FRIENDLY_NAME = "Friendly Name";
     private static final Map<String, String> TEST_FRIENDLY_NAMES =
             new HashMap<String, String>() {
diff --git a/framework/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java b/framework/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
index d8393f9..e25f882 100644
--- a/framework/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
+++ b/framework/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
@@ -56,7 +56,7 @@
     private static final int MAX_URL_BYTES = 1023;
     private static final int CERTIFICATE_FINGERPRINT_BYTES = 32;
     private static final String TEST_DECORATED_IDENTITY_PREFIX = "androidwifi.dev!";
-    private static final long SUBSCRIPTION_EXPIRATION_TIME_MS = 1643996661000L;
+
     /**
      * Verify parcel write and read consistency for the given configuration.
      *
@@ -192,7 +192,7 @@
         assertFalse(config.validateForR2());
         assertTrue(config.isAutojoinEnabled());
         assertTrue(config.isMacRandomizationEnabled());
-        assertFalse(config.isNonPersistentMacRandomizationEnabled());
+        assertFalse(config.isEnhancedMacRandomizationEnabled());
         assertTrue(config.getMeteredOverride() == METERED_OVERRIDE_NONE);
     }
 
@@ -658,20 +658,4 @@
 
         config.setDecoratedIdentityPrefix(TEST_DECORATED_IDENTITY_PREFIX.replace('!', 'a'));
     }
-
-    /**
-     * Tests {@link PasspointConfiguration#getSubscriptionExpirationTimeMillis()} and
-     * {@link PasspointConfiguration#setSubscriptionExpirationTimeInMillis(long)}
-     * <p>
-     */
-    @Test
-    public void testGetSetSubscriptionExpirationTimeMillis() throws Exception {
-        PasspointConfiguration passpointConfiguration = new PasspointConfiguration();
-        assertEquals(Long.MIN_VALUE,
-                passpointConfiguration.getSubscriptionExpirationTimeMillis());
-        passpointConfiguration
-                .setSubscriptionExpirationTimeInMillis(SUBSCRIPTION_EXPIRATION_TIME_MS);
-        assertEquals(SUBSCRIPTION_EXPIRATION_TIME_MS,
-                passpointConfiguration.getSubscriptionExpirationTimeMillis());
-    }
 }
diff --git a/framework/tests/src/android/net/wifi/hotspot2/PasspointTestUtils.java b/framework/tests/src/android/net/wifi/hotspot2/PasspointTestUtils.java
index 329f077..7125b17 100644
--- a/framework/tests/src/android/net/wifi/hotspot2/PasspointTestUtils.java
+++ b/framework/tests/src/android/net/wifi/hotspot2/PasspointTestUtils.java
@@ -21,7 +21,6 @@
 import android.net.wifi.hotspot2.pps.HomeSp;
 import android.net.wifi.hotspot2.pps.Policy;
 import android.net.wifi.hotspot2.pps.UpdateParameter;
-import android.os.ParcelUuid;
 import android.util.Base64;
 
 import java.util.ArrayList;
@@ -32,8 +31,6 @@
 public class PasspointTestUtils {
     private static final int CERTIFICATE_FINGERPRINT_BYTES = 32;
     private static final int TEST_SUB_ID = 1;
-    private static final ParcelUuid GROUP_UUID = ParcelUuid
-            .fromString("0000110B-0000-1000-8000-00805F9B34FB");
 
     /**
      * Utility function for creating a {@link android.net.wifi.hotspot2.pps.HomeSP}.
@@ -161,7 +158,6 @@
         friendlyNames.put("kr", "ServiceName2");
         config.setServiceFriendlyNames(friendlyNames);
         config.setSubscriptionId(TEST_SUB_ID);
-        config.setSubscriptionGroup(GROUP_UUID);
         return config;
     }
 
diff --git a/framework/tests/src/android/net/wifi/p2p/WifiP2pConfigTest.java b/framework/tests/src/android/net/wifi/p2p/WifiP2pConfigTest.java
index e5f2431..6199325 100644
--- a/framework/tests/src/android/net/wifi/p2p/WifiP2pConfigTest.java
+++ b/framework/tests/src/android/net/wifi/p2p/WifiP2pConfigTest.java
@@ -19,7 +19,6 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-import android.net.MacAddress;
 import android.os.Parcel;
 
 import androidx.test.filters.SmallTest;
@@ -133,52 +132,6 @@
         }
     }
 
-    /** Verify that a default config can be built. */
-    @Test
-    public void testBuildDefaultConfig() {
-        WifiP2pConfig c = new WifiP2pConfig.Builder()
-                .setDeviceAddress(MacAddress.fromString(DEVICE_ADDRESS)).build();
-        assertEquals(c.deviceAddress, DEVICE_ADDRESS);
-    }
-
-    /** Verify that a non-persistent config can be built. */
-    @Test
-    public void testBuildNonPersistentConfig() throws Exception {
-        WifiP2pConfig c = new WifiP2pConfig.Builder()
-                .setDeviceAddress(MacAddress.fromString(DEVICE_ADDRESS))
-                .enablePersistentMode(false).build();
-        assertEquals(c.deviceAddress, DEVICE_ADDRESS);
-        assertEquals(WifiP2pGroup.NETWORK_ID_TEMPORARY, c.netId);
-    }
-
-    /**
-     * Verify that the builder throws IllegalStateException if none of
-     * network name, passphrase, and device address is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testBuildThrowIllegalStateExceptionWithoutNetworkNamePassphraseDeviceAddress()
-            throws Exception {
-        WifiP2pConfig c = new WifiP2pConfig.Builder().build();
-    }
-
-    /**
-     * Verify that the builder throws IllegalStateException if only network name is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testBuildThrowIllegalStateExceptionWithOnlyNetworkName()
-            throws Exception {
-        WifiP2pConfig c = new WifiP2pConfig.Builder().setNetworkName("DIRECT-ab-Hello").build();
-    }
-
-    /**
-     * Verify that the builder throws IllegalStateException if only passphrase is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testBuildThrowIllegalStateExceptionWithOnlyPassphrase()
-            throws Exception {
-        WifiP2pConfig c = new WifiP2pConfig.Builder().setPassphrase("12345677").build();
-    }
-
     @Test
     /*
      * Verify WifiP2pConfig basic operations
diff --git a/framework/tests/src/android/net/wifi/p2p/WifiP2pDeviceTest.java b/framework/tests/src/android/net/wifi/p2p/WifiP2pDeviceTest.java
index 7af86b9..6edc287 100644
--- a/framework/tests/src/android/net/wifi/p2p/WifiP2pDeviceTest.java
+++ b/framework/tests/src/android/net/wifi/p2p/WifiP2pDeviceTest.java
@@ -18,20 +18,11 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
-
-import android.net.wifi.ScanResult;
 
 import androidx.test.filters.SmallTest;
 
-import com.android.modules.utils.build.SdkLevel;
-
 import org.junit.Test;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
 /**
  * Unit test harness for {@link android.net.wifi.p2p.WifiP2pDevice}
  */
@@ -124,18 +115,4 @@
         WifiP2pDevice copy = new WifiP2pDevice(device);
         compareWifiP2pDevices(device, copy);
     }
-
-    /**
-     * Test that application information setter/getter.
-     */
-    @Test
-    public void testVendorElementsSetterGetter() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiP2pDevice device = new WifiP2pDevice();
-        List<ScanResult.InformationElement> ies =  new ArrayList<>(Arrays.asList(
-                new ScanResult.InformationElement(ScanResult.InformationElement.EID_VSA,
-                        0, new byte[]{1, 2, 3, 4})));
-        device.setVendorElements(ies);
-        assertEquals(ies, device.getVendorElements());
-    }
 }
diff --git a/framework/tests/src/android/net/wifi/p2p/WifiP2pManagerTest.java b/framework/tests/src/android/net/wifi/p2p/WifiP2pManagerTest.java
index 9915bf7..9e8dca4 100644
--- a/framework/tests/src/android/net/wifi/p2p/WifiP2pManagerTest.java
+++ b/framework/tests/src/android/net/wifi/p2p/WifiP2pManagerTest.java
@@ -16,43 +16,22 @@
 
 package android.net.wifi.p2p;
 
-import static android.net.wifi.WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
 
-import android.content.AttributionSource;
 import android.content.Context;
-import android.net.wifi.ScanResult;
-import android.os.Bundle;
 import android.os.test.TestLooper;
-import android.view.Display;
 
 import androidx.test.filters.SmallTest;
 
-import com.android.modules.utils.build.SdkLevel;
-
 import libcore.junit.util.ResourceLeakageDetector;
 
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
-import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * Unit test harness for WifiP2pManager.
  */
@@ -61,8 +40,6 @@
     private WifiP2pManager mDut;
     private TestLooper mTestLooper;
 
-    private static final String PACKAGE_NAME = "some.package.name";
-
     @Mock
     public Context mContextMock;
     @Mock
@@ -72,68 +49,12 @@
     public ResourceLeakageDetector.LeakageDetectorRule leakageDetectorRule =
             ResourceLeakageDetector.getRule();
 
-    ArgumentCaptor<Bundle> mBundleCaptor = ArgumentCaptor.forClass(Bundle.class);
-
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
 
         mDut = new WifiP2pManager(mP2pServiceMock);
         mTestLooper = new TestLooper();
-
-        when(mContextMock.getOpPackageName()).thenReturn(PACKAGE_NAME);
-        if (SdkLevel.isAtLeastS()) {
-            AttributionSource attributionSource = mock(AttributionSource.class);
-            when(mContextMock.getAttributionSource()).thenReturn(attributionSource);
-        }
-    }
-
-    /**
-     * Validate initialization flow.
-     */
-    @Test
-    public void testInitialize() throws Exception {
-        mDut.initialize(mContextMock, mTestLooper.getLooper(), null);
-        verify(mP2pServiceMock).getMessenger(any(), eq(PACKAGE_NAME), mBundleCaptor.capture());
-        if (SdkLevel.isAtLeastS()) {
-            assertEquals(mContextMock.getAttributionSource(),
-                    mBundleCaptor.getValue().getParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE));
-        } else {
-            assertNull(mBundleCaptor.getValue().getParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE));
-        }
-        assertTrue(mBundleCaptor.getValue().containsKey(WifiP2pManager.EXTRA_PARAM_KEY_DISPLAY_ID));
-        assertEquals(Display.DEFAULT_DISPLAY,
-                mBundleCaptor.getValue().getInt(WifiP2pManager.EXTRA_PARAM_KEY_DISPLAY_ID));
-    }
-
-    /**
-     * Validate initialization flow with Display Context.
-     */
-    @Test
-    public void testInitializeWithDisplayContext() throws Exception {
-        final int displayId = 1023;
-
-        Display display = mock(Display.class);
-        when(display.getDisplayId()).thenReturn(displayId);
-        when(mContextMock.getDisplay()).thenReturn(display);
-        mDut.initialize(mContextMock, mTestLooper.getLooper(), null);
-        verify(mP2pServiceMock).getMessenger(any(), eq(PACKAGE_NAME), mBundleCaptor.capture());
-        assertTrue(mBundleCaptor.getValue().containsKey(WifiP2pManager.EXTRA_PARAM_KEY_DISPLAY_ID));
-        assertEquals(displayId,
-                mBundleCaptor.getValue().getInt(WifiP2pManager.EXTRA_PARAM_KEY_DISPLAY_ID));
-    }
-
-    /**
-     * Validate initialization flow with invalid Display Context.
-     */
-    @Test
-    public void testInitializeWithInvalidDisplayContext() throws Exception {
-        doThrow(UnsupportedOperationException.class).when(mContextMock).getDisplay();
-        mDut.initialize(mContextMock, mTestLooper.getLooper(), null);
-        verify(mP2pServiceMock).getMessenger(any(), eq(PACKAGE_NAME), mBundleCaptor.capture());
-        assertTrue(mBundleCaptor.getValue().containsKey(WifiP2pManager.EXTRA_PARAM_KEY_DISPLAY_ID));
-        assertEquals(Display.DEFAULT_DISPLAY,
-                mBundleCaptor.getValue().getInt(WifiP2pManager.EXTRA_PARAM_KEY_DISPLAY_ID));
     }
 
     /**
@@ -161,95 +82,4 @@
 
         leakageDetectorRule.assertUnreleasedResourceCount(channel, 0);
     }
-
-    /**
-     * Validate that non vendor-specific information element raises IllegalArgumentException.
-     */
-    @Test
-    public void testSetVendorElementsWithNonVendorSpecificInformationElement() throws Exception {
-        when(mP2pServiceMock.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_SET_VENDOR_ELEMENTS);
-        WifiP2pManager.Channel channel = mock(WifiP2pManager.Channel.class);
-        List<ScanResult.InformationElement> ies = new ArrayList<>();
-        ies.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_VSA, 0, new byte[4]));
-        ies.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_SSID, 0, new byte[4]));
-
-        try {
-            mDut.setVendorElements(channel, ies, null);
-            fail("expected IllegalArgumentException.");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Validate that the length of a VSIE exceeds 255 raises IllegalArgumentException.
-     */
-    @Test
-    public void testSetVendorElementsWithIeSizeOver255Bytes() throws Exception {
-        when(mP2pServiceMock.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_SET_VENDOR_ELEMENTS);
-        WifiP2pManager.Channel channel = mock(WifiP2pManager.Channel.class);
-        List<ScanResult.InformationElement> ies = new ArrayList<>();
-        ies.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_VSA, 0, new byte[256]));
-
-        try {
-            mDut.setVendorElements(channel, ies, null);
-            fail("expected IllegalArgumentException.");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Validate that the total length of VSIEs exceeds 512 raises IllegalArgumentException.
-     */
-    @Test
-    public void testSetVendorElementsWithTotalSizeOver512Bytes() throws Exception {
-        when(mP2pServiceMock.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_SET_VENDOR_ELEMENTS);
-        WifiP2pManager.Channel channel = mock(WifiP2pManager.Channel.class);
-        List<ScanResult.InformationElement> ies = new ArrayList<>();
-        ies.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_VSA, 0, new byte[256]));
-        ies.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_VSA, 0, new byte[256]));
-
-        try {
-            mDut.setVendorElements(channel, ies, null);
-            fail("expected IllegalArgumentException.");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /** Test {@link WifiP2pManager#isSetVendorElementsSupported()} work as expectation. */
-    @Test
-    public void testIsSetVendorElementsSupported() throws Exception {
-        when(mP2pServiceMock.getSupportedFeatures()).thenReturn(0L);
-        assertFalse(mDut.isSetVendorElementsSupported());
-        when(mP2pServiceMock.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_SET_VENDOR_ELEMENTS);
-        assertTrue(mDut.isSetVendorElementsSupported());
-    }
-
-    /** Test {@link WifiP2pManager#isChannelConstrainedDiscoverySupported()} work as expectation. */
-    @Test
-    public void testIsFlexibleDiscoverySupported() throws Exception {
-        when(mP2pServiceMock.getSupportedFeatures()).thenReturn(0L);
-        assertFalse(mDut.isChannelConstrainedDiscoverySupported());
-        when(mP2pServiceMock.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_FLEXIBLE_DISCOVERY);
-        assertTrue(mDut.isChannelConstrainedDiscoverySupported());
-    }
-
-    /** Test {@link WifiP2pManager#isGroupClientRemovalSupported()} work as expectation. */
-    @Test
-    public void testIsGroupClientRemovalSupported() throws Exception {
-        when(mP2pServiceMock.getSupportedFeatures()).thenReturn(0L);
-        assertFalse(mDut.isGroupClientRemovalSupported());
-        when(mP2pServiceMock.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_GROUP_CLIENT_REMOVAL);
-        assertTrue(mDut.isGroupClientRemovalSupported());
-    }
 }
diff --git a/framework/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java b/framework/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java
index 8f51798..656731a 100644
--- a/framework/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java
+++ b/framework/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java
@@ -19,7 +19,6 @@
 import static junit.framework.Assert.fail;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
@@ -31,7 +30,6 @@
 import android.net.MacAddress;
 import android.net.wifi.ScanResult;
 import android.net.wifi.aware.PeerHandle;
-import android.os.Bundle;
 import android.os.IBinder;
 import android.os.Parcel;
 import android.os.test.TestLooper;
@@ -94,7 +92,7 @@
         // verify ranging request passed to service
         mDut.startRanging(request, mMockLooperExecutor, callbackMock);
         verify(mockRttService).startRanging(any(IBinder.class), eq(packageName), eq(featureId),
-                eq(null),  eq(request), callbackCaptor.capture(), any(Bundle.class));
+                eq(null),  eq(request), callbackCaptor.capture());
 
         // service calls back with success
         callbackCaptor.getValue().onRangingResults(results);
@@ -118,7 +116,7 @@
         // verify ranging request passed to service
         mDut.startRanging(request, mMockLooperExecutor, callbackMock);
         verify(mockRttService).startRanging(any(IBinder.class), eq(packageName), eq(featureId),
-                eq(null), eq(request), callbackCaptor.capture(), any(Bundle.class));
+                eq(null), eq(request), callbackCaptor.capture());
 
         // service calls back with failure code
         callbackCaptor.getValue().onRangingFailure(failureCode);
@@ -171,7 +169,7 @@
     }
 
     /**
-     * Validate 80211mc APs cannot be used in Non-80211mc ranging request builders.
+     * Validate the rtt burst size is set correctly when in range.
      */
     @Test
     public void test802llmcCapableAccessPointFailsForNon11mcBuilderMethods() {
@@ -262,59 +260,24 @@
 
     /**
      * Validate that can request as many range operation as the upper limit on number of requests.
-     * Testing all methods to add 80211mc capable responders.
      */
     @Test
     public void testRangingRequestAtLimit() {
-        ScanResult scanResult1 = new ScanResult();
-        scanResult1.BSSID = "AA:BB:CC:DD:EE:FF";
-        scanResult1.setFlag(ScanResult.FLAG_80211mc_RESPONDER);
-
+        ScanResult scanResult = new ScanResult();
+        scanResult.BSSID = "AA:BB:CC:DD:EE:FF";
+        scanResult.setFlag(ScanResult.FLAG_80211mc_RESPONDER);
         List<ScanResult> scanResultList = new ArrayList<>();
-        for (int i = 0; i < RangingRequest.getMaxPeers() - 5; ++i) {
-            scanResultList.add(scanResult1);
+        for (int i = 0; i < RangingRequest.getMaxPeers() - 3; ++i) {
+            scanResultList.add(scanResult);
         }
-
-        ScanResult scanResult2 = new ScanResult();
-        scanResult2.BSSID = "11:22:33:44:55:66";
-        scanResult2.setFlag(ScanResult.FLAG_80211mc_RESPONDER);
-
-        ResponderConfig responderConfig2a = ResponderConfig.fromScanResult(scanResult2);
-        int preamble = responderConfig2a.getPreamble();
-
-        ResponderConfig.Builder responderBuilder = new ResponderConfig.Builder();
-        ResponderConfig responderConfig2b = responderBuilder
-                .setMacAddress(MacAddress.fromString(scanResult2.BSSID))
-                .set80211mcSupported(scanResult2.is80211mcResponder())
-                .setChannelWidth(scanResult2.channelWidth)
-                .setFrequencyMhz(scanResult2.frequency)
-                .setCenterFreq0Mhz(scanResult2.centerFreq0)
-                .setCenterFreq1Mhz(scanResult2.centerFreq1)
-                .setPreamble(preamble)
-                .build();
-
-        // Validate ResponderConfig.Builder setter method arguments match getter method results.
-        assertTrue(responderConfig2a.getMacAddress().toString().equalsIgnoreCase(scanResult2.BSSID)
-                && responderConfig2a.is80211mcSupported() == scanResult2.is80211mcResponder()
-                && responderConfig2a.getChannelWidth() == scanResult2.channelWidth
-                && responderConfig2a.getFrequencyMhz() == scanResult2.frequency
-                && responderConfig2a.getCenterFreq0Mhz() == scanResult2.centerFreq0
-                && responderConfig2a.getCenterFreq1Mhz() == scanResult2.centerFreq1
-                && responderConfig2a.getPreamble() == preamble);
-
-        ArrayList<ResponderConfig> responderList = new ArrayList<>();
-        responderList.add(responderConfig2b);
-
         MacAddress mac1 = MacAddress.fromString("00:01:02:03:04:05");
 
         // create request using max RTT Peers
         RangingRequest.Builder builder = new RangingRequest.Builder();
-        builder.addAccessPoint(scanResult1);        // Add 1
-        builder.addAccessPoints(scanResultList);    // Add MaxPeers - 5
-        builder.addResponder(responderConfig2a);    // Add 1
-        builder.addResponders(responderList);       // Add 1
-        builder.addAccessPoint(scanResult2);        // Add 1
-        builder.addWifiAwarePeer(mac1);             // Add 1
+        builder.addAccessPoint(scanResult);
+        builder.addAccessPoints(scanResultList);
+        builder.addAccessPoint(scanResult);
+        builder.addWifiAwarePeer(mac1);
         RangingRequest request = builder.build();
 
         // verify request
@@ -326,66 +289,10 @@
         int numRttPeers = rttPeers.size();
         assertEquals(RangingRequest.getMaxPeers(), numRttPeers);
         // confirm each peer has the correct mac address
-        for (int i = 0; i < numRttPeers - 4; ++i) {
-            assertEquals("AA:BB:CC:DD:EE:FF",
-                    rttPeers.get(i).macAddress.toString().toUpperCase());
-        }
-        for (int i = numRttPeers - 4; i < numRttPeers - 1; ++i) {
-            assertEquals("11:22:33:44:55:66",
-                    rttPeers.get(i).macAddress.toString().toUpperCase());
-        }
-        assertEquals("00:01:02:03:04:05",
-                rttPeers.get(numRttPeers - 1).macAddress.toString().toUpperCase());
-    }
-
-    /**
-     * Validate that a non802llmc ranging request can have as many range operations as the upper
-     * limit for number of requests. Testing all methods to add non-80211mc capable responders using
-     * a mix of ScanResults and ResponderConfigs.
-     */
-    @Test
-    public void testNon80211mcRangingRequestAtLimit() {
-        ScanResult scanResult1 = new ScanResult();
-        scanResult1.BSSID = "AA:BB:CC:DD:EE:FF";
-
-        List<ScanResult> scanResultList = new ArrayList<>();
-        for (int i = 0; i < RangingRequest.getMaxPeers() - 5; ++i) {
-            scanResultList.add(scanResult1);
-        }
-
-        ScanResult scanResult2 = new ScanResult();
-        scanResult2.BSSID = "11:22:33:44:55:66";
-
-        ResponderConfig responderConfig2 = ResponderConfig.fromScanResult(scanResult2);
-        List<ResponderConfig> responderConfigList = new ArrayList<>();
-        for (int i = 0; i < 3; ++i) {
-            responderConfigList.add(responderConfig2);
-        }
-
-        // create request using max RTT Peers
-        RangingRequest.Builder builder = new RangingRequest.Builder();
-        builder.addNon80211mcCapableAccessPoint(scanResult1);        // Add 1
-        builder.addNon80211mcCapableAccessPoints(scanResultList);    // Add MaxPeers - 5 = 5
-        builder.addResponders(responderConfigList);                  // Add 3
-        builder.addNon80211mcCapableAccessPoint(scanResult2);        // Add 1
-        RangingRequest request = builder.build();
-
-        // verify request
-        request.enforceValidity(true);
-        // confirm rtt burst size is set correctly to default value
-        assertEquals(request.getRttBurstSize(), RangingRequest.getDefaultRttBurstSize());
-        // confirm the number of peers in the request is the max number of peers
-        List<ResponderConfig> rttPeers = request.getRttResponders();
-        int numRttPeers = rttPeers.size();
-        assertEquals(RangingRequest.getMaxPeers(), numRttPeers);
-        // confirm each peer has the correct mac address
-        for (int i = 0; i < numRttPeers - 4; ++i) {
-            assertEquals("AA:BB:CC:DD:EE:FF",
-                    rttPeers.get(i).macAddress.toString().toUpperCase());
-        }
-        for (int i = numRttPeers - 4; i < numRttPeers; ++i) {
-            assertEquals("11:22:33:44:55:66",
-                    rttPeers.get(i).macAddress.toString().toUpperCase());
+        for (int i = 0; i < numRttPeers - 1; ++i) {
+            assertEquals("AA:BB:CC:DD:EE:FF", rttPeers.get(i).macAddress.toString().toUpperCase());
+            assertEquals("00:01:02:03:04:05",
+                    rttPeers.get(numRttPeers - 1).macAddress.toString().toUpperCase());
         }
     }
 
diff --git a/service/Android.bp b/service/Android.bp
index 03cfa94..4f7a1d8 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -42,6 +42,12 @@
     ],
 }
 
+filegroup {
+    name: "wifi-service-BaseWifiService",
+    srcs: ["java/com/android/server/wifi/BaseWifiService.java"],
+    path: "java",
+}
+
 // pre-jarjar version of wifi-service that builds against pre-jarjar version of framework-wifi
 java_library {
     name: "wifi-service-pre-jarjar",
@@ -57,7 +63,6 @@
         strict_updatability_linting: true,
     },
     libs: [
-        "androidx.annotation_annotation",
         "error_prone_annotations",
         "jsr305",
         "framework-annotations-lib",
@@ -66,9 +71,7 @@
         // need pre-jarjar symbols so that wifi-service can reference the original class names at
         // compile time
         "framework-wifi-pre-jarjar",
-        "framework-bluetooth",
         "framework-connectivity.stubs.module_lib",
-        "framework-connectivity-t.stubs.module_lib",
         "framework-statsd.stubs.module_lib",
         "framework-tethering.stubs.module_lib",
         "unsupportedappusage",
@@ -81,23 +84,17 @@
         "android.hardware.wifi-V1.3-java",
         "android.hardware.wifi-V1.4-java",
         "android.hardware.wifi-V1.5-java",
-        "android.hardware.wifi-V1.6-java",
-        // AIDL hostapd implementation
-        "android.hardware.wifi.hostapd-V1-java",
-        // HIDL hostapd implementation
         "android.hardware.wifi.hostapd-V1.0-java",
         "android.hardware.wifi.hostapd-V1.1-java",
         "android.hardware.wifi.hostapd-V1.2-java",
         "android.hardware.wifi.hostapd-V1.3-java",
-        // AIDL supplicant implementation
-        "android.hardware.wifi.supplicant-V1-java",
-        // HIDL supplicant implementation
         "android.hardware.wifi.supplicant-V1.0-java",
         "android.hardware.wifi.supplicant-V1.1-java",
         "android.hardware.wifi.supplicant-V1.2-java",
         "android.hardware.wifi.supplicant-V1.3-java",
         "android.hardware.wifi.supplicant-V1.4-java",
         "android.hidl.manager-V1.2-java",
+        "androidx.annotation_annotation",
         "bouncycastle-unbundled",
         "ksoap2",
         // Note: libprotobuf-java-lite uses a few core platform APIs which
@@ -106,7 +103,6 @@
         // the necessary core platform APIs.
         "libprotobuf-java-lite",
         "libnanohttpd",
-        "modules-utils-locallog",
         "services.net-module-wifi",
         "wifi-lite-protos",
         "wifi-nano-protos",
@@ -134,6 +130,10 @@
         shrink: true,
         proguard_flags_files: ["proguard.flags"],
     },
+    dex_preopt: {
+        enabled: false,
+        app_image: false,
+    },
 
     visibility: [
         "//frameworks/opt/net/wifi/service/apex",
diff --git a/service/ServiceWifiResources/AndroidManifest.xml b/service/ServiceWifiResources/AndroidManifest.xml
index 8efbce2..04ba1d3 100644
--- a/service/ServiceWifiResources/AndroidManifest.xml
+++ b/service/ServiceWifiResources/AndroidManifest.xml
@@ -23,10 +23,6 @@
           android:versionCode="1"
           android:versionName="R-initial">
     <protected-broadcast android:name="com.android.server.wifi.action.CarrierNetwork.USER_CLICKED" />
-    <protected-broadcast android:name="com.android.server.wifi.ClientModeImpl.ACTION_CERT_NOTIF_TAP" />
-    <protected-broadcast android:name="com.android.server.wifi.ClientModeImpl.ACTION_CERT_NOTIF_ACCEPT" />
-    <protected-broadcast android:name="com.android.server.wifi.ClientModeImpl.ACTION_CERT_NOTIF_REJECT" />
-    <protected-broadcast android:name="com.android.server.wifi.ClientModeImpl.EXTRA_PENDING_CERT_SSID" />
     <application
         android:label="@string/wifiResourcesAppLabel"
         android:defaultToDeviceProtectedStorage="true"
diff --git a/service/ServiceWifiResources/res/layout/wifi_p2p_dialog.xml b/service/ServiceWifiResources/res/layout/wifi_p2p_dialog.xml
index 8579493..86dcbfa 100644
--- a/service/ServiceWifiResources/res/layout/wifi_p2p_dialog.xml
+++ b/service/ServiceWifiResources/res/layout/wifi_p2p_dialog.xml
@@ -19,7 +19,7 @@
     android:layout_height="wrap_content">
 
     <LinearLayout
-        android:layout_width="match_parent"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:orientation="vertical">
 
@@ -34,10 +34,13 @@
                 style="@style/wifi_item">
                 <TextView
                     android:text="@string/wifi_p2p_enter_pin_message"
-                    style="@style/wifi_p2p_dialog_enter_pin_message" />
+                    style="@style/wifi_item_label" />
 
                 <EditText android:id="@+id/wifi_p2p_wps_pin"
-                        style="@style/wifi_p2p_dialog_pin_input" />
+                        android:singleLine="true"
+                        android:maxLines="8"
+                        android:inputType="number"
+                        style="@style/wifi_item_content" />
             </LinearLayout>
         </LinearLayout>
     </LinearLayout>
diff --git a/service/ServiceWifiResources/res/layout/wifi_p2p_dialog_row.xml b/service/ServiceWifiResources/res/layout/wifi_p2p_dialog_row.xml
index ca9bbb2..2c88b10 100644
--- a/service/ServiceWifiResources/res/layout/wifi_p2p_dialog_row.xml
+++ b/service/ServiceWifiResources/res/layout/wifi_p2p_dialog_row.xml
@@ -17,10 +17,12 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     style="@style/wifi_item">
     <TextView
-            android:id="@+id/name"
-            style="@style/wifi_p2p_dialog_row_label"/>
+            style="@style/wifi_item_label"
+            android:id="@+id/name" />
 
     <TextView
             android:id="@+id/value"
-            style="@style/wifi_p2p_dialog_row_content"/>
+            style="@style/wifi_item_content"
+            android:textStyle="bold"
+            android:textAlignment="viewStart" />
 </LinearLayout>
diff --git a/service/ServiceWifiResources/res/values-af/strings.xml b/service/ServiceWifiResources/res/values-af/strings.xml
index a9431f9..f332710 100644
--- a/service/ServiceWifiResources/res/values-af/strings.xml
+++ b/service/ServiceWifiResources/res/values-af/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Instelling is opgedateer. Probeer weer koppel"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Kan nie privaatheidinstelling verander nie"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Kon nie netwerk kry nie"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Jy kan nie van buite Verizon se dekkingsgebied aan Verizon Wi-Fi Access koppel nie. (Fout = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Jy is nie op Verizon Wi-Fi Access ingeteken nie. Bel ons asseblief by 800-922-0204. (Fout = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Daar is \'n probleem met jou Verizon Wi-Fi Access-rekening. Bel ons asseblief by 800-922-0204. (Fout = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Jy is reeds aan Verizon Wi-Fi Access gekoppel. (Fout = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie. Bel ons asseblief by 800-922-0204. (Fout = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Daar is \'n probleem met jou Verizon Wi-Fi Access-rekening. Bel ons asseblief by 800-922-0204. (Fout = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access is nie in jou ligging beskikbaar nie. Probeer later weer of probeer van \'n ander ligging af. (Fout = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie. Probeer later weer of probeer van \'n ander ligging af."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie weens fout 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie weens fout 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-stawingsfout, onbekende foutkode"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Warmkol is afgeskakel"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Geen toestelle is gekoppel nie. Tik om te wysig."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi is ontkoppel"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Sit \'n <xliff:g id="CARRIER_NAME">%2$s</xliff:g>-SIM in om aan <xliff:g id="SSID">%1$s</xliff:g> te koppel"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> wil ’n netwerkhulpbron gebruik"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Dit kan probleme veroorsaak vir <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Dit kan probleme vir hierdie programme veroorsaak: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Laat toe"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Moenie toelaat nie"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Word hierdie netwerk vertrou?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ja, koppel"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nee, moenie koppel nie"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Laat hierdie netwerk slegs toe om te koppel as die inligting hieronder reg lyk.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Bedienernaam:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Uitreikernaam:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisasie:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontak:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Handtekening:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Netwerk moet geverifieer word"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Gaan netwerkbesonderhede vir <xliff:g id="SSID">%1$s</xliff:g> na voordat jy koppel. Tik om voort te gaan."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Kon nie sertifikaat installeer nie."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Kan nie hierdie netwerk verifieer nie"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Koppel in elk geval"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Moenie koppel nie"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Die netwerk <xliff:g id="SSID">%1$s</xliff:g> kort \'n sertifikaat."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Vind uit hoe om sertifikate by te voeg"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Kan nie hierdie netwerk verifieer nie"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Die netwerk <xliff:g id="SSID">%1$s</xliff:g> kort \'n sertifikaat. Tik om uit te vind hoe om sertifikate by te voeg."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Koppel in elk geval"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Moenie koppel nie"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Laat <xliff:g id="APP_NAME">%1$s</xliff:g> toe om wi-fi aan te skakel?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Jy kan wi-fi in Kitsinstellings afskakel"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Laat toe"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Moenie toelaat nie"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-am/strings.xml b/service/ServiceWifiResources/res/values-am/strings.xml
index 7a2bca5..d8c3494 100644
--- a/service/ServiceWifiResources/res/values-am/strings.xml
+++ b/service/ServiceWifiResources/res/values-am/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"ቅንብር ተዘምኗል። እንደገና ለማገናኘት ይሞክሩ።"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"የግላዊነት ቅንብርን መቀየር አይቻልም"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"አውታረ መረብ አልተገኘም"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ የVerizon ሽፋን ካለው አካባቢ ውጭ ሆነው ከVerizon Wi-Fi መዳረሻ ጋር መገናኘት አይችሉም። (ስህተት = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ ለVerizon Wi-Fi መዳረሻ ደንበኝነት አልተመዘገቡም። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ የእርስዎ የVerizon Wi-Fi መዳረሻ መለያ ችግር አለበት። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ አስቀድመው ከVerizon Wi-Fi መዳረሻ ጋር ተገናኝተዋል። (ስህተት = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ የእርስዎ የVerizon Wi-Fi መዳረሻ መለያ ችግር አለበት። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ የVerizon Wi-Fi መዳረሻ ከእርስዎ አካባቢ የሚገኝ አይደለም። በኋላ ላይ እንደገና ይሞክሩ ወይም ከተለየ አካባቢ ይሞክሩ። (ስህተት = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ። በኋላ ላይ እንደገና ይሞክሩ ወይም ከተለየ አካባቢ ይሞክሩ።"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ በስህተት 16384 ምክንያት እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ።"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ በስህተት 16385 ምክንያት እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ።"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>፦ የEAP ማረጋገጥ ስህተት፣ ያልታወቀ የስህተት ኮድ"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> ፦ እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ።"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"መገናኛ ነጥብ ጠፍቷል"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"ምንም መሣሪያ አልተገናኘም። ለመቀየር መታ ያድርጉ።"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"የWifi ግንኙነት ተቋርጧል"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"ክ<xliff:g id="SSID">%1$s</xliff:g> ጋር ለመገናኘት የ<xliff:g id="CARRIER_NAME">%2$s</xliff:g> ሲም ያስገቡ"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> የአውታረ መረብ ንብረትን መጠቀም ይፈልጋል"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"ይህ ለ<xliff:g id="APPS">%3$s</xliff:g> ችግሮችን ሊያስከትል ይችላል።"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"ይህ ለእነዚህ መተግበሪያዎች ችግር ሊፈጥር ይችላል፦ <xliff:g id="APPS">%3$s</xliff:g>።"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"ፍቀድ"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"አትፍቀድ"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"ይህ አውታረ መረብ የታመነ ነው?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"አዎ፣ አገናኝ"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"አይ፣ አታገናኝ"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"ከታች ያለው መረጃ ትክክል መስሎ ከታየ ብቻ ይህ አውታረ መረብ እንዲገናኝ ይፍቀዱ።\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"የአገልጋይ ስም፦\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"የሰጪ ስም፦\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"ድርጅት፦\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"እውቂያ፦\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"ፊርማ፦\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"አውታረ መረብ መረጋገጥ አለበት"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"ከማገናኘትዎ በፊት የአውታረ መረብ ዝርዝሮችን ለ<xliff:g id="SSID">%1$s</xliff:g> ይገምግሙ። ለመቀጠል መታ ያድርጉ።"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"የእውቅና ማረጋገጫ መጫን አልተሳካም።"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"ይህን አውታረ መረብ ማረጋገጥ አልተቻለም"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"ለማንኛውም ተገናኝ"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"አታገናኝ"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"አውታረ መረቡ <xliff:g id="SSID">%1$s</xliff:g> የእውቅና ማረጋገጫ ይጎድለዋል።"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"የእውቅና ማረጋገጫዎችን እንዴት ማከል እንደሚችሉ ይወቁ"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"ይህን አውታረ መረብ ማረጋገጥ አልተቻለም"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"አውታረ መረቡ <xliff:g id="SSID">%1$s</xliff:g> የእውቅና ማረጋገጫ ይጎድለዋል። የእውቅና ማረጋገጫዎችን እንዴት ማከል እንደሚቻል ለማወቅ መታ ያድርጉ።"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"ለማንኛውም ተገናኝ"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"አታገናኝ"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g> Wi-Fiን እንዲያበራ ይፈቀድለት?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"በፈጣን ቅንብሮች ውስጥ Wi-Fiን ማጥፋት ይችላሉ"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"ፍቀድ"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"አትፍቀድ"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ar/strings.xml b/service/ServiceWifiResources/res/values-ar/strings.xml
index bd8cff9..9d7c002 100644
--- a/service/ServiceWifiResources/res/values-ar/strings.xml
+++ b/service/ServiceWifiResources/res/values-ar/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"تم تعديل الإعداد. حاوِل إعادة الاتصال."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"لا يمكن تغيير إعداد الخصوصية."</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"لم يتم العثور على الشبكة."</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"‏<xliff:g id="SSID">%1$s</xliff:g> : حدث خطأ رقم 32756 في مصادقة بروتوكول المصادقة القابلة للتوسيع (EAP)"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطأ في مصادقة EAP رقم 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: لا يمكنك الاتصال بشبكة Verizon Wi-Fi Access من خارج نطاق تغطية Verizon. (الخطأ = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطأ في مصادقة EAP رقم 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: لم تشترك في Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطأ في مصادقة EAP رقم 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة في حسابك على Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطأ في مصادقة EAP رقم 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: سبق واتصلت بشبكة Verizon Wi-Fi Access. (الخطأ = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطأ في مصادقة EAP رقم 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطأ في مصادقة EAP رقم 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة في حسابك على Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطأ في مصادقة EAP رقم 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access غير متاح في موقعك الجغرافي. يُرجى إعادة المحاولة لاحقًا أو المحاولة من موقع جغرافي مختلف. (الخطأ = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدث خطأ رقم 32767 في مصادقة بروتوكول المصادقة القابلة للتوسيع (EAP)"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access. يُرجى إعادة المحاولة لاحقًا أو المحاولة من موقع جغرافي مختلف."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدث خطأ رقم 16384 في مصادقة بروتوكول المصادقة القابلة للتوسيع (EAP)"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء الاتصال بشبكة Verizon Wi-Fi Access بسبب الخطأ رقم 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدث خطأ رقم 16385 في مصادقة بروتوكول المصادقة القابلة للتوسيع (EAP)"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء الاتصال بشبكة Verizon Wi-Fi Access بسبب الخطأ رقم 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدث خطأ في مصادقة بروتوكول المصادقة القابلة للتوسيع (EAP)، رمز الخطأ غير معروف"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"تم إيقاف نقطة الاتصال."</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"ما مِن أجهزة متصلة. انقر للتعديل."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"‏تم قطع اتصال Wi-Fi."</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"‏للاتصال بشبكة <xliff:g id="SSID">%1$s</xliff:g>، عليك إدخال شريحة SIM من <xliff:g id="CARRIER_NAME">%2$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"يريد التطبيق <xliff:g id="APP">%1$s</xliff:g> استخدام مورد للاتصال بالشبكات."</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"قد يتسبب هذا الإجراء في مشاكل للتطبيق <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"قد يتسبب هذا الإجراء في حدوث مشاكل لهذه التطبيقات: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"السماح"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"عدم السماح"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"هل هذه الشبكة موثوقة؟"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"نعم، أريد الاتصال"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"لا، عدم الاتصال"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"ننصحك بعدم السماح لهذه الشبكة بالاتصال إلا إذا كانت المعلومات أدناه تبدو صحيحة:\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"اسم الخادم:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"اسم جهة الإصدار:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"المؤسسة:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"التواصل:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"التوقيع:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"يجب التحقّق من الشبكة."</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"يُرجى مراجعة تفاصيل الشبكة لـ <xliff:g id="SSID">%1$s</xliff:g> قبل التوصيل. انقر للمتابعة."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"تعذّر تثبيت الشهادة."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"يتعذّر التحقّق من هذه الشبكة."</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"الاتصال على أي حال"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"عدم الاتصال"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"تفتقد هذه الشبكة <xliff:g id="SSID">%1$s</xliff:g> شهادة."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"تعرّف على كيفية إضافة شهادات."</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"يتعذّر التحقّق من هذه الشبكة."</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"تفتقد هذه الشبكة <xliff:g id="SSID">%1$s</xliff:g> شهادة. انقر للتعرّف على كيفية إضافة شهادات."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"الاتصال على أي حال"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"عدم الاتصال"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"‏هل تريد السماح لتطبيق <xliff:g id="APP_NAME">%1$s</xliff:g> بتفعيل Wi-Fi؟"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"‏يمكنك إيقاف Wi-Fi في الإعدادات السريعة."</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"السماح"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"عدم السماح"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-as/strings.xml b/service/ServiceWifiResources/res/values-as/strings.xml
index 9de7a10..b6eda5f 100644
--- a/service/ServiceWifiResources/res/values-as/strings.xml
+++ b/service/ServiceWifiResources/res/values-as/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"ছেটিংটো আপডে’ট হ’ল। পুনৰ সংযোগ কৰিবলৈ চেষ্টা কৰক।"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"গোপনীয়তাৰ ছেটিংটো সলনি কৰিব নোৱাৰি"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"নেটৱৰ্ক বিচাৰ পোৱা নগ’ল"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পৰ্কীয় আসোঁৱাহ 32769"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : ইএপি বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পর্কীয় আসোঁৱাহ 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপুনি Verizonৰ ক’ভাৰেজ ক্ষেত্ৰৰ বাহিৰৰ পৰা Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰিব নোৱাৰে। (আসোঁৱাহ = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : ইএপি বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পর্কীয় আসোঁৱাহ 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপুনি Verizon Wi-Fi Access ছাবস্ক্ৰাইব কৰা নাই। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : ইএপি বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পর্কীয় আসোঁৱাহ 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপোনাৰ Verizon Wi-Fi Access একাউণ্টটোত কিবা সমস্যা আছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : ইএপি বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পর্কীয় আসোঁৱাহ 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপুনি ইতিমধ্যে Verizon Wi-Fi Accessৰ সৈতে সংযুক্ত হৈ আছে। (আসোঁৱাহ = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : ইএপি বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পর্কীয় আসোঁৱাহ 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : ইএপি বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পর্কীয় আসোঁৱাহ 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপোনাৰ Verizon Wi-Fi Access একাউণ্টটোত কিবা সমস্যা আছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : ইএপি বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পর্কীয় আসোঁৱাহ 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access আপোনাৰ অৱস্থানৰ পৰা উপলব্ধ নহয়। পাছত পুনৰ চেষ্টা কৰক অথবা এটা বেলেগ অৱস্থানৰ পৰা চেষ্টা কৰক। (আসোঁৱাহ = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পৰ্কীয় আসোঁৱাহ 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে। পাছত পুনৰ চেষ্টা কৰক অথবা এটা বেলেগ অৱস্থানৰ পৰা চেষ্টা কৰক।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পৰ্কীয় আসোঁৱাহ 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আসোঁৱাহ 16385ৰ বাবে আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পৰ্কীয় আসোঁৱাহ 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আসোঁৱাহ 16385ৰ বাবে আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP বিশ্বাসযোগ্যতা প্ৰমাণীকৰণ সম্পৰ্কীয় আসোঁৱাহ, অজ্ঞাত আসোঁৱাহ ক’ড"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে।"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"হটস্পট অফ কৰা হ’ল"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"কোনো ডিভাইচ সংযোগ কৰা হোৱা নাই। সংশোধন কৰিবলৈ টিপক।"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"ৱাই-ফাই সংযোগ বিচ্ছিন্ন হৈছে"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g>ৰ সৈতে সংযোগ কৰিবলৈ এখন <xliff:g id="CARRIER_NAME">%2$s</xliff:g> ছিম ভৰাওক"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g>এ এটা নেটৱৰ্কিং সম্পদ ব্যৱহাৰ কৰিব বিচাৰে"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"এইটোৱে হয়তো <xliff:g id="APPS">%3$s</xliff:g>ৰ বাবে সমস্যাৰ সৃষ্টি কৰিব পাৰে।"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"এইটোৱে এই এপ্‌সমূহৰ বাবে সমস্যাৰ সৃষ্টি কৰিব পাৰে: <xliff:g id="APPS">%3$s</xliff:g>।"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"অনুমতি দিয়ক"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"অনুমতি নিদিব"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"এই নেটৱৰ্কটো বিশ্বাসী হয়নে?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"হয়, সংযোগ কৰক"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"নাই, সংযোগ নকৰিব"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"তলত দিয়া তথ্যখিনি শুদ্ধ যেন লাগিলেহে এই নেটৱৰ্কটোক সংযোগ কৰিবলৈ অনুমতি দিয়ক।\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"ছাৰ্ভাৰৰ নাম:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"জাৰিকৰ্তাৰ নাম:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"প্ৰতিষ্ঠান:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"ইয়াৰ সৈতে যোগাযোগ কৰক:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"চহী:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"নেটৱৰ্ক সত্যাপন কৰাৰ আৱশ্যক"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"সংযোগ কৰাৰ পূৰ্বে <xliff:g id="SSID">%1$s</xliff:g>ৰ নেটৱৰ্কৰ তথ্য পৰ্যালোচনা কৰক। অব্যাহত ৰাখিবলৈ টিপক।"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"প্ৰমাণপত্ৰ ইনষ্টল কৰাত বিফল হ’ল।"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"এই নেটৱৰ্কটো সত্যাপন কৰিব নোৱাৰি"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"তথাপি সংযোগ কৰক"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"সংযোগ নকৰিব"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"নেটৱৰ্ক <xliff:g id="SSID">%1$s</xliff:g>টোত এখন প্ৰমাণপত্ৰ নাই।"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"কেনেকৈ প্ৰমাণপত্ৰ যোগ দিব সেয়া জানক"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"এই নেটৱৰ্কটো সত্যাপন কৰিব নোৱাৰি"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"নেটৱৰ্ক <xliff:g id="SSID">%1$s</xliff:g>টোত এখন প্ৰমাণপত্ৰ নাই। কেনেকৈ প্ৰমাণপত্ৰ যোগ দিব সেয়া জানিবলৈ টিপক।"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"তথাপি সংযোগ কৰক"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"সংযোগ নকৰিব"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g>ক ৱাই-ফাই অন কৰিবলৈ অনুমতি দিবনে?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"আপুনি ক্ষিপ্ৰ ছেটিঙত ৱাই-ফাই অফ কৰিব পাৰে"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"অনুমতি দিয়ক"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"অনুমতি নিদিব"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-az/strings.xml b/service/ServiceWifiResources/res/values-az/strings.xml
index 5a307dc..af0378a 100644
--- a/service/ServiceWifiResources/res/values-az/strings.xml
+++ b/service/ServiceWifiResources/res/values-az/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Ayar güncəlləndi. Yenidən qoşulmağa çalışın."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Məxfilik ayarını dəyişmək mümkün deyil"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Şəbəkə tapılmadı"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası: 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Verizon əhatə dairəsindən kənarda Verizon Wi-Fi Access\'ə qoşula bilməzsiniz. (Xəta = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'ə abunə olmamısınız. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access hesabınız ilə bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Artıq Verizon Wi-Fi Access\'ə qoşulmusunuz. (Xəta = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access hesabınız ilə bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access məkanınızdan əlçatan deyil. Sonra cəhd edin, ya da fərqli məkandan yoxlayın. (Xəta = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası: 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var. Sonra cəhd edin, ya da fərqli məkandan yoxlayın."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası: 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: 16384 saylı xətaya görə Verizon Wi-Fi Access\'ə qoşmaq olmur."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası: 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: 16385 saylı xətaya görə Verizon Wi-Fi Access\'ə qoşmaq olmur."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP doğrulama xətası, naməlum xəta kodu"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot deaktiv edilib"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Heç bir cihaz qoşulmayıb. Dəyişiklik etmək üçün toxunun."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi‑Fi bağlantısı kəsildi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> şəbəkəsinə qoşulmaq üçün <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM kartı daxil edin"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> şəbəkə resursundan istifadə etmək istəyir"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Bu, <xliff:g id="APPS">%3$s</xliff:g> üçün problemlərə səbəb ola bilər."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Bu tətbiqlər üçün problem yarana bilər: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"İcazə verin"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"İcazə verməyin"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Bu şəbəkə etibarlıdır?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Bəli, qoşulun"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Xeyr, qoşulmayın"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Yalnız aşağıdakı məlumat düzgün göründükdə bu şəbəkəyə qoşulmağa icazə verin.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Serverin adı:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Təminatçının Adı:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Təşkilat:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakt:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"İmza:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Şəbəkə doğrulanmalıdır"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Qoşulmazdan əvvəl <xliff:g id="SSID">%1$s</xliff:g> üçün şəbəkə detallarını nəzərdən keçirin. Davam etmək üçün toxunun."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Sertifikatı quraşdırmaq alınmadı."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Bu şəbəkəni doğrulamaq olmur"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"İstənilən halda qoşulun"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Qoşulmayın"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> şəbəkəsində sertifikat yoxdur."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Sertifikat əlavə etmək qaydasını öyrənin"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Bu şəbəkəni doğrulamaq olmur"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> şəbəkəsində sertifikat yoxdur. Sertifikat əlavə etmək qaydasını öyrənmək üçün toxunun."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"İstənilən halda qoşulun"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Qoşulmayın"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g> tətbiqinə Wi-Fi\'ı aktiv etmək icazəsi verilsin?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Sürətli Ayarlarda Wi‑Fi\'ı deaktiv edə bilərsiniz"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"İcazə verin"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"İcazə verməyin"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-b+sr+Latn/strings.xml b/service/ServiceWifiResources/res/values-b+sr+Latn/strings.xml
index 35c7ec9..60ed190 100644
--- a/service/ServiceWifiResources/res/values-b+sr+Latn/strings.xml
+++ b/service/ServiceWifiResources/res/values-b+sr+Latn/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Podešavanje je ažurirano. Probajte ponovo da se povežete."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Promena podešavanja privatnosti nije uspela"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Mreža nije pronađena"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška pri potvrdi identiteta 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška pri potvrdi identiteta 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Ne možete da se povežete na Verizon WiFi Access van oblasti koju Verizon pokriva. (Greška = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška pri potvrdi identiteta 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na Verizon WiFi Access. Pozovite nas na 800 922 0204. (Greška = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška pri potvrdi identiteta 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon WiFi Access nalogom. Pozovite nas na 800 922 0204. (Greška = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška pri potvrdi identiteta 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani na Verizon WiFi Access. (Greška = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška pri potvrdi identiteta 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access. Pozovite nas na 800 922 0204. (Greška = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška pri potvrdi identiteta 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon WiFi Access nalogom. Pozovite nas na 800 922 0204. (Greška = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška pri potvrdi identiteta 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon WiFi Access nije dostupan sa vaše lokacije. Probajte ponovo kasnije ili probajte sa neke druge lokacije. (Greška = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : Greška pri EAP potvrdi identiteta 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access. Probajte ponovo kasnije ili probajte sa neke druge lokacije."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : Greška pri EAP potvrdi identiteta 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access zbog greške 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : Greška pri EAP potvrdi identiteta 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access zbog greške 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Greška pri EAP potvrdi identiteta, nepoznat kôd greške"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot je isključen"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nijedan uređaj nije povezan. Dodirnite da biste izmenili."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"WiFi veza je prekinuta"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Da biste se povezali na mrežu <xliff:g id="SSID">%1$s</xliff:g>, stavite <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM karticu"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> želi da koristi mrežni resurs"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"To može da dovede do problema za <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Ovo može da izazove probleme za ove aplikacije: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Dozvoli"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Ne dozvoli"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Da li je ova mreža pouzdana?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Da, poveži"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ne, nemoj da povežeš"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Dozvolite ovoj mreži da se poveže samo ako informacije u nastavku deluju tačno.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Naziv servera:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Naziv izdavaoca:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizacija:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakt:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Potpis:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Mreža mora da se verifikuje"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Pregledajte pojedinosti mreže <xliff:g id="SSID">%1$s</xliff:g> pre povezivanja. Dodirnite da biste nastavili."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Instalacija sertifikata nije uspela."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Ne možemo da verifikujemo ovu mrežu"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Ipak poveži"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ne povezuj"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> mreže nema sertifikat."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Saznajte kako da dodate sertifikate"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Ne možemo da verifikujemo ovu mrežu"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> mreže nema sertifikat. Dodirnite da biste saznali kako da dodate sertifikate."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Ipak poveži"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ne povezuj"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Želite da dozvolite da <xliff:g id="APP_NAME">%1$s</xliff:g> uključuje WiFi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Možete da isključite WiFi u Brzim podešavanjima"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Dozvoli"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Ne dozvoli"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-be/strings.xml b/service/ServiceWifiResources/res/values-be/strings.xml
index f7ad9e8..c124b49 100644
--- a/service/ServiceWifiResources/res/values-be/strings.xml
+++ b/service/ServiceWifiResources/res/values-be/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Налады абноўлены. Паспрабуйце падключыцца яшчэ раз."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Не ўдалося змяніць наладу прыватнасці"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Сетка не знойдзена"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : вы не можаце падключыцца да Verizon Wi-Fi Access, калі не знаходзіцеся ў зоне пакрыцця Verizon. (Памылка = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : вы не падпісаны на Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204. (Памылка = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з вашым уліковым запісам Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204. (Памылка = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : вы ўжо падключаны да Verizon Wi-Fi Access. (Памылка = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з падключэннем да Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204. (Памылка = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з вашым уліковым запісам Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204. (Памылка = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : з месца, дзе вы знаходзіцеся, няма доступу да Verizon Wi-Fi Access. Паўтарыце спробу пазней або змяніце месцазнаходжанне. (Памылка = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з падключэннем да Verizon Wi-Fi Access. Паўтарыце спробу пазней або змяніце месцазнаходжанне."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : праз памылку 16384 узнікла праблема з падключэннем да Verizon Wi-Fi Access."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : праз памылку 16385 узнікла праблема з падключэннем да Verizon Wi-Fi Access."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : памылка аўтэнтыфікацыі EAP, невядомы код памылкі"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з падключэннем да Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Хот-спот выключаны"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Няма падключаных прылад. Націсніце, каб змяніць налады."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi выключаны"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Каб падключыцца да сеткі \"<xliff:g id="SSID">%1$s</xliff:g>\", устаўце SIM-карту аператара \"<xliff:g id="CARRIER_NAME">%2$s</xliff:g>\""</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> запытвае дазвол на выкарыстанне сеткавага рэсурсу"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Могуць узнікнуць праблемы ў наступных праграмах: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Могуць узнікнуць праблемы ў наступных праграмах: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Дазволіць"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Не дазваляць"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Гэта бяспечная сетка?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Падключыцца"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Не падключацца"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Падключайцеся да гэтай сеткі, толькі калі прыведзеная ніжэй інфармацыя правільная.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Сервер:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Эмітэнт:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Арганізацыя:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Кантакт:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Подпіс:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Трэба спраўдзіць сетку"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Перад падключэннем праглядзіце звесткі пра сетку <xliff:g id="SSID">%1$s</xliff:g>. Націсніце, каб працягнуць."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Збой усталёўкі сертыфіката."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Не ўдалося спраўдзіць гэту сетку"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Усё роўна падключыцца"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Не падключацца"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"У сеткі <xliff:g id="SSID">%1$s</xliff:g> адсутнічае сертыфікат."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Даведацца, як дадаваць сертыфікаты"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Не ўдалося спраўдзіць гэту сетку"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"У сеткі <xliff:g id="SSID">%1$s</xliff:g> адсутнічае сертыфікат. Націсніце, каб даведацца, як дадаваць сертыфікаты."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Усё роўна падключыцца"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Не падключацца"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Дазволіць праграме \"<xliff:g id="APP_NAME">%1$s</xliff:g>\" актываваць сетку Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Вы можаце выключыць сетку Wi‑Fi у Хуткіх наладах"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Дазволіць"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Не дазваляць"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-bg/strings.xml b/service/ServiceWifiResources/res/values-bg/strings.xml
index fc9e348..9b46cdc 100644
--- a/service/ServiceWifiResources/res/values-bg/strings.xml
+++ b/service/ServiceWifiResources/res/values-bg/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Настройката е актуализирана. Опитайте отново да установите връзка."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Настройката за поверителност не може да се промени"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Мрежата не е намерена"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Не можете да се свържете с Verizon Wi-Fi Access извън района на покритие на Verizon. (Грешка 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Нямате абонамент за Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем с профила ви във Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Вече сте установили връзка с Verizon Wi-Fi Access. (Грешка 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем с профила ви във Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access не се предлага за местоположението ви. Опитайте отново по-късно или от друго местоположение. (Грешка 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access. Опитайте отново по-късно или от друго местоположение."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access поради грешка 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access поради грешка 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> – Грешка при удостоверяването на EAP: неизвестен код на грешка"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Точката за достъп е изключена"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Няма свързани устройства. Докоснете за промяна."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Няма връзка с Wi-Fi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"За да се свържете с(ъс) <xliff:g id="SSID">%1$s</xliff:g>, поставете SIM карта от <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> иска да използва ресурс на мрежата"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Това може да причини проблеми за <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Това може да доведе до проблеми за следните приложения: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Разрешаване"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Забраняване"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Надеждна ли е тази мрежа?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Да, свързване"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Не, без свързване"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Разрешете на тази мрежа да се свърже само ако информацията по-долу изглежда правилна.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Име на сървъра:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Име на издателя:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Организация:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Контакт:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Подпис:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Мрежата трябва да бъде потвърдена"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Прегледайте подробностите за мрежата <xliff:g id="SSID">%1$s</xliff:g>, преди да се свържете. Докоснете, за да продължите."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Инсталирането на сертификата не бе успешно."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Тази мрежа не може да се потвърди"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Свързване въпреки това"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Без свързване"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"За мрежата <xliff:g id="SSID">%1$s</xliff:g> липсва сертификат."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Научете как да добавите сертификати"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Тази мрежа не може да се потвърди"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"За мрежата <xliff:g id="SSID">%1$s</xliff:g> липсва сертификат. Докоснете, за да научите как да добавите сертификати."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Свързване въпреки това"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Без свързване"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Да се разреши ли на <xliff:g id="APP_NAME">%1$s</xliff:g> да включва Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Можете да изключите Wi‑Fi от бързите настройки"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Разрешаване"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Забраняване"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-bn/strings.xml b/service/ServiceWifiResources/res/values-bn/strings.xml
index fdda105..f6786af 100644
--- a/service/ServiceWifiResources/res/values-bn/strings.xml
+++ b/service/ServiceWifiResources/res/values-bn/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"সেটিং আপডেট করা হয়েছে। আবার কানেক্ট করার চেষ্টা করুন।"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"গোপনীয়তা সেটিংস পরিবর্তন করা যাবে না"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"নেটওয়ার্ক পাওয়া যায়নি"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণ সমস্যা 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণের সমস্যা 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon-এর কভারেজ এলাকার বাইরে থেকে আপনি Verizon Wi-Fi Access-এ কানেক্ট করতে পারবেন না। (সমস্যা = ৩২৭৬০)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণের সমস্যা 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপনি Verizon Wi-Fi Access সাবস্ক্রাইব করেননি। ৮০০-৯২২-০২০৪ নম্বরে আমাদের সাথে যোগাযোগ করুন। (সমস্যা = ৩২৭৬১)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণের সমস্যা 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access অ্যাকাউন্ট সংক্রান্ত কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে আমাদের সাথে যোগাযোগ করুন। (সমস্যা = ৩২৭৬২)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণের সমস্যা 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপনি ইতিমধ্যেই Verizon Wi-Fi Access-এ কানেক্ট করেছেন। (সমস্যা = ৩২৭৬৩)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণের সমস্যা 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-এর সাথে কানেক্ট করার সময় কিছু সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে আমাদের সাথে যোগাযোগ করুন। (সমস্যা = ৩২৭৬৪)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণের সমস্যা 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access অ্যাকাউন্ট সংক্রান্ত কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে আমাদের সাথে যোগাযোগ করুন। (সমস্যা = ৩২৭৬৫)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণের সমস্যা 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : আপনার লোকেশনে Verizon Wi-Fi Access উপলভ্য নেই। পরে আবার চেষ্টা করুন অথবা অন্য লোকেশন থেকে চেষ্টা করুন। (সমস্যা = ৩২৭৬৬)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণ সমস্যা ৩২৭৬৭"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-এর সাথে কানেক্ট করার সময় কিছু সমস্যা হয়েছে। পরে আবার চেষ্টা করুন অথবা অন্য লোকেশন থেকে চেষ্টা করুন।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণ সমস্যা ১৬৩৮৪"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ১৬৩৮৪ সমস্যার জন্য Verizon Wi-Fi Access-এর সাথে আপনাকে কানেক্ট করা যাচ্ছে না।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণ সমস্যা ১৬৩৮৫"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ১৬৩৮৫ সমস্যার জন্য Verizon Wi-Fi Access-এর সাথে আপনাকে কানেক্ট করা যাচ্ছে না।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP যাচাইকরণ সমস্যা, সমস্যার কোড অজানা"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-এর সাথে কানেক্ট করার সময় কিছু সমস্যা হয়েছে।"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"হটস্পট বন্ধ করা আছে"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"কোনও ডিভাইস কানেক্ট করা নেই। পরিবর্তন করতে ট্যাপ করুন।"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"ওয়াই-ফাই ডিসকানেক্ট হয়েছে"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g>-এ কানেক্ট করার জন্য <xliff:g id="CARRIER_NAME">%2$s</xliff:g>-এর সিম কার্ড যোগ করুন"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> একটি নেটওয়ার্ক রিসোর্স ব্যবহার করতে চায়"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"এর জন্য <xliff:g id="APPS">%3$s</xliff:g> থেকে সমস্যা হতে পারে।"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"এর ফলে এই অ্যাপে সমস্যা হতে পারে: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"অনুমতি দিন"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"অনুমতি দেবেন না"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"এই নেটওয়ার্কটি কি বিশ্বস্ত?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"হ্যাঁ, কানেক্ট করুন"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"না, কানেক্ট করবেন না"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"নিচে দেওয়া তথ্য যদি সঠিক হয় তাহলেই এই নেটওয়ার্ককে কানেক্ট করার অনুমতি দিন।\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"সার্ভারের নাম:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"ইস্যুকারীর নাম:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"সংস্থা:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"পরিচিতি:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"স্বাক্ষর:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"নেটওয়ার্ক যাচাই করা প্রয়োজন"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"কানেক্ট করার আগে <xliff:g id="SSID">%1$s</xliff:g>-এর নেটওয়ার্ক সংক্রান্ত বিবরণ পর্যালোচনা করুন। চালিয়ে যেতে ট্যাপ করুন।"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"সার্টিফিকেট ইনস্টল করা যায়নি।"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"এই নেটওয়ার্ক যাচাই করা যায়নি"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"তবুও কানেক্ট করুন"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"কানেক্ট করবেন না"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> নেটওয়ার্কে একটি সার্টিফিকেট নেই।"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"কীভাবে সার্টিফিকেট যোগ করতে হয় তা জানুন"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"এই নেটওয়ার্ক যাচাই করা যায়নি"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> নেটওয়ার্কে একটি সার্টিফিকেট নেই। সার্টিফিকেট কীভাবে যোগ করতে হয় জানতে ট্যাপ করুন।"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"তবুও কানেক্ট করুন"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"কানেক্ট করবেন না"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g>-কে ওয়াই-ফাই বন্ধ করার অনুমতি দেবেন?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"\'দ্রুত সেটিংস\' মেনু থেকে আপনি ওয়াই-ফাই বন্ধ করতে পারবেন"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"অনুমতি দিন"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"অনুমতি দেবেন না"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-bs/strings.xml b/service/ServiceWifiResources/res/values-bs/strings.xml
index 29c2616..8e47a11 100644
--- a/service/ServiceWifiResources/res/values-bs/strings.xml
+++ b/service/ServiceWifiResources/res/values-bs/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Postavka je ažurirana. Pokušajte se ponovo povezati."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Nije moguće promijeniti postavku privatnosti"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Mreža nije pronađena"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP greška autentifikacije 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška autentifikacije 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Ne možete se povezati s WiFi pristupom Verizonu izvan područja pokrivenosti Verizona. (Greška = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška autentifikacije 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Niste pretplaćeni na WiFi pristup Verizonu. Pozovite nas na broj 800 922 0204. (Greška = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška autentifikacije 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Došlo je do problema s vašim računom za WiFi pristup Verizonu. Pozovite nas na broj 800 922 0204. (Greška = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška autentifikacije 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Već ste povezani s WiFi pristupom Verizonu. (Greška = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška autentifikacije 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Došlo je do problema pri povezivanju s WiFi pristupom Verizonu. Pozovite nas na broj 800 922 0204. (Greška = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška autentifikacije 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Došlo je do problema s vašim računom za WiFi pristup Verizonu. Pozovite nas na broj 800 922 0204. (Greška = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: EAP greška autentifikacije 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: WiFi pristup Verizonu nije dostupan s vaše lokacije. Pokušajte ponovo kasnije ili pokušajte s druge lokacije. (Greška = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP greška autentifikacije 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Došlo je do problema pri povezivanju s WiFi pristupom Verizonu. Pokušajte ponovo kasnije ili pokušajte s druge lokacije."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP greška autentifikacije 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Došlo je do problema kod povezivanja za WiFi pristup Verizonu zbog greške 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP greška autentifikacije 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Došlo je do problema kod povezivanja za WiFi pristup Verizonu zbog greške 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP greška autentifikacije, nepoznat kôd greške"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Došlo je do problema pri povezivanju s WiFi pristupom Verizonu."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Pristupna tačka je isključena"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nema povezanih uređaja. Dodirnite da izmijenite."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"WiFi nije povezan"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Da se povežete s mrežom <xliff:g id="SSID">%1$s</xliff:g>, umetnite SIM karticu mobilnog operatera <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"Aplikacija <xliff:g id="APP">%1$s</xliff:g> želi koristiti izvor umrežavanja"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Ovo može prouzrokovati probleme za: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Ovo može uzrokovati problem sljedećim aplikacijama: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Dozvoli"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Nemoj dozvoliti"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Je li ova mreža pouzdana?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Da, poveži"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ne, nemoj povezati"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Dozvolite ovoj mreži da se poveže samo ako informacije u nastavku izgledaju ispravno.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Naziv servera:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Naziv izdavača:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizacija:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakt:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Potpis:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Mrežu je potrebno potvrditi"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Prije povezivanja pregledajte detalje mreže za <xliff:g id="SSID">%1$s</xliff:g>. Dodirnite da nastavite."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Instalacija certifikata nije uspjela."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Nije moguće potvrditi ovu mrežu"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Ipak se poveži"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Nemoj se povezati"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Mreži <xliff:g id="SSID">%1$s</xliff:g> nedostaje certifikat."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Saznajte kako dodati certifikate"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Nije moguće potvrditi ovu mrežu"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Mreži <xliff:g id="SSID">%1$s</xliff:g> nedostaje certifikat. Dodirnite da saznate kako dodati certifikate."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Ipak se poveži"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Nemoj se povezati"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Dozvoliti da aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> uključi WiFi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"WiFi možete isključiti u Brzim postavkama"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Dozvoli"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Nemoj dozvoliti"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ca/strings.xml b/service/ServiceWifiResources/res/values-ca/strings.xml
index 35f6cde..c62e0ab 100644
--- a/service/ServiceWifiResources/res/values-ca/strings.xml
+++ b/service/ServiceWifiResources/res/values-ca/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"La configuració s\'ha actualitzat. Torna a provar de connectar-te."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"No es pot canviar l\'opció de configuració de privadesa"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"No s\'ha trobat la xarxa"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: no et pots connectar a Verizon Wi‑Fi Access des de fora de l\'àrea de cobertura de Verizon. (Error: 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: no tens una subscripció a Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema amb el teu compte de Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: ja estàs connectat a Verizon Wi‑Fi Access. (Error: 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema amb el teu compte de Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi‑Fi Access no està disponible des de la teva ubicació. Torna-ho a provar més tard o bé des d\'una altra ubicació. (Error: 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access. Torna-ho a provar més tard o bé des d\'una altra ubicació."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access a causa de l\'error 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access a causa de l\'error 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: error d\'autenticació EAP, codi d\'error desconegut"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"S\'ha desactivat el punt d\'accés Wi‑Fi"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"No hi ha cap dispositiu connectat. Toca per modificar."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"La Wi‑Fi està desconnectada"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Per connectar-te a <xliff:g id="SSID">%1$s</xliff:g>, insereix una SIM de l\'operador<xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> vol utilitzar un recurs de xarxa"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Això pot ocasionar problemes a <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Això pot causar problemes per a aquestes aplicacions: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Permet"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"No permetis"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Aquesta xarxa és de confiança?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Sí, connecta\'t"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"No, no et connectis"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Permet que aquesta xarxa es connecti només si la informació següent sembla correcta.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nom del servidor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nom de l\'emissor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organització:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contacte:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signatura:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Cal verificar la xarxa"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Revisa els detalls de la xarxa <xliff:g id="SSID">%1$s</xliff:g> abans de connectar-te. Toca per continuar."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Ha fallat la instal·lació del certificat."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"No es pot verificar aquesta xarxa"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Connecta\'t de totes maneres"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"No et connectis"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Falta un certificat de la xarxa <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Informació sobre com pots afegir certificats"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"No es pot verificar aquesta xarxa"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Falta un certificat de la xarxa <xliff:g id="SSID">%1$s</xliff:g>. Toca per obtenir informació sobre com pots afegir certificats."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Connecta\'t de totes maneres"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"No et connectis"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Vols permetre que <xliff:g id="APP_NAME">%1$s</xliff:g> activi la Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Pots desactivar la Wi‑Fi a la configuració ràpida"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Permet"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"No permetis"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-cs/strings.xml b/service/ServiceWifiResources/res/values-cs/strings.xml
index f30ded3..d802261 100644
--- a/service/ServiceWifiResources/res/values-cs/strings.xml
+++ b/service/ServiceWifiResources/res/values-cs/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Nastavení bylo aktualizováno. Zkuste se připojit znovu."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Nastavení ochrany soukromí se nepodařilo změnit"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Síť nebyla nalezena"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : K síti Verizon Wi-Fi Access se nelze připojit mimo dosah pokrytí společnosti Verizon. (Chyba = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Síť Verizon Wi-Fi Access nemáte předplacenou. Zavolejte nám na číslo 800-922-0204. (Chyba = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : U vašeho účtu Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204. (Chyba = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : K síti Verizon Wi-Fi Access jste už připojeni. (Chyba = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Při připojování k síti Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204. (Chyba = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : U vašeho účtu Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204. (Chyba = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ve vaší oblasti není k dispozici. Zkuste to později nebo z jiného místa. (Chyba = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Při připojování k síti Verizon Wi-Fi Access došlo k problému. Zkuste to později nebo z jiného místa."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Při připojování k síti Verizon Wi-Fi Access došlo k problému kvůli chybě 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: Chyba ověření EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Při připojování k síti Verizon Wi-Fi Access došlo k problému kvůli chybě 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Chyba ověření EAP, neznámý kód chyby"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Při připojování k síti Verizon Wi-Fi Access došlo k problému."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot je vypnutý"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Žádná připojená zařízení Upravíte klepnutím."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Síť Wi-Fi je odpojena"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Chcete-li se připojit k síti <xliff:g id="SSID">%1$s</xliff:g>, vložte SIM kartu operátora <xliff:g id="CARRIER_NAME">%2$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"Aplikace <xliff:g id="APP">%1$s</xliff:g> chce použít síťový zdroj"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Toto může způsobit problémy <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Může to způsobovat problémy pro tyto aplikace: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Povolit"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Nepovolovat"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Je tato síť důvěryhodná?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ano, připojit"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ne, nepřipojovat"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Připojení k této síti povolte pouze v případě, že níže uvedené informace vypadají správně.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Název severu:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Název vydavatele:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizace:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakt:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Podpis:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Síť je potřeba ověřit"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Před připojením k síti <xliff:g id="SSID">%1$s</xliff:g> zkontrolujte její podrobnosti. Pokračujte klepnutím."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Instalace certifikátu selhala."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Tuto síť nelze ověřit"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Přesto připojit"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Nepřipojovat"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Síti <xliff:g id="SSID">%1$s</xliff:g> chybí certifikát."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Přečtěte si, jak přidat certifikáty"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Tuto síť nelze ověřit"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Síti <xliff:g id="SSID">%1$s</xliff:g> chybí certifikát. Klepnutím zobrazíte pokyny k přidání certifikátů."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Přesto připojit"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Nepřipojovat"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Povolit aplikaci <xliff:g id="APP_NAME">%1$s</xliff:g> zapnout Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Wi‑Fi můžete vypnout v Rychlém nastavení"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Povolit"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Nepovolovat"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-da/strings.xml b/service/ServiceWifiResources/res/values-da/strings.xml
index 09ada61..58f854a 100644
--- a/service/ServiceWifiResources/res/values-da/strings.xml
+++ b/service/ServiceWifiResources/res/values-da/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Indstillingen blev opdateret. Prøv at oprette forbindelse igen."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Privatlivsindstillingen kan ikke ændres"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Netværket blev ikke fundet"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access uden for Verizons dækningsområde (fejl = 32760)."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du abonnerer ikke på Verizon Wi-Fi Access. Ring til os på telefonnummer 800-922-0204 (fejl = 32761)."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Der er et problem med din Verizon Wi-Fi Access-konto. Ring til os på telefonnummer 800-922-0204 (fejl = 32762)."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du har allerede oprettet forbindelse til Verizon Wi-Fi Access (fejl = 32763)."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access. Ring til os på telefonnummer 800-922-0204 (fejl = 32764)."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Der er et problem med din Verizon Wi-Fi Access-konto. Ring til os på telefonnummer 800-922-0204 (fejl = 32765)."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access er ikke tilgængeligt i dit område. Prøv igen senere eller fra en anden placering (fejl = 32766)."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access. Prøv igen senere eller fra en anden placering."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access på grund af fejlen 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access på grund af fejlen 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-godkendelsesfejl, ukendt fejlkode"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot er slået fra"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Der er ikke tilsluttet nogen enheder. Tryk for at ændre."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi-forbindelsen er afbrudt"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Indsæt et SIM-kort fra <xliff:g id="CARRIER_NAME">%2$s</xliff:g> for at oprette forbindelse til <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> anmoder om at bruge en netværksressource"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Dette kan skabe problemer for <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Dette kan skabe problemer for følgende apps: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Tillad"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Tillad ikke"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Er dette et netværk, du har tillid til?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ja, opret forbindelse"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nej, opret ikke forbindelse"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Tillad kun, at der oprettes forbindelse til dette netværk, hvis oplysningerne nedenfor ser korrekte ud.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Servernavn:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Udstedernavn:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisation:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakt:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signatur:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Netværket skal bekræftes"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Gennemgå netværksoplysningerne for <xliff:g id="SSID">%1$s</xliff:g>, inden du opretter forbindelse. Tryk for at fortsætte."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Installationen af certifikatet mislykkedes."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Dette netværk kan ikke bekræftes"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Opret forbindelse alligevel"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Opret ikke forbindelse"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Netværket <xliff:g id="SSID">%1$s</xliff:g> mangler et certifikat."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Se, hvordan du tilføjer certifikater"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Dette netværk kan ikke bekræftes"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Netværket <xliff:g id="SSID">%1$s</xliff:g> mangler et certifikat. Tryk for at se, hvordan du tilføjer certifikater."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Opret forbindelse alligevel"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Opret ikke forbindelse"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Vil du give <xliff:g id="APP_NAME">%1$s</xliff:g> tilladelse til at aktivere Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Du kan deaktivere Wi‑Fi via kvikmenuen"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Tillad"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Tillad ikke"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-de/strings.xml b/service/ServiceWifiResources/res/values-de/strings.xml
index b670e2b..6811bf0 100644
--- a/service/ServiceWifiResources/res/values-de/strings.xml
+++ b/service/ServiceWifiResources/res/values-de/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Einstellung aktualisiert. Versuch noch einmal, eine Verbindung herzustellen."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Datenschutzeinstellung kann nicht geändert werden"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Netzwerk nicht gefunden"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Eine Verbindung mit Verizon Wi-Fi Access ist außerhalb der Abdeckung von Verizon nicht möglich. (Fehler = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du bist nicht bei Verizon Wi-Fi Access angemeldet. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Es gibt ein Problem mit deinem Verizon Wi-Fi Access-Konto. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du bist bereits mit Verizon Wi-Fi Access verbunden. (Fehler = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Es gibt ein Problem mit deinem Verizon Wi-Fi Access-Konto. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ist an deinem Standort nicht verfügbar. Du kannst es noch einmal später oder von einem anderen Standort aus versuchen. (Fehler = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden. Du kannst es noch einmal später oder von einem anderen Standort aus versuchen."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Aufgrund von Fehler 16384 kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Aufgrund von Fehler 16385 kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-Authentifizierungsfehler, unbekannter Fehlercode"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot ist deaktiviert"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Keine Geräte verbunden. Tippen, um Einstellungen zu ändern."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"WLAN nicht verbunden"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Lege eine SIM-Karte von <xliff:g id="CARRIER_NAME">%2$s</xliff:g> ein, um eine Verbindung mit <xliff:g id="SSID">%1$s</xliff:g> herzustellen"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> möchte eine Netzwerkressource verwenden"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Dies verursacht möglicherweise Probleme in <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Dies kann zu Problemen mit folgenden Apps führen: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Zulassen"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Nicht zulassen"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Ist dieses Netzwerk vertrauenswürdig?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ja, verbinden"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nein, nicht verbinden"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Lass nur eine Verbindung mit diesem Netzwerk zu, wenn die Informationen unten korrekt sind.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Servername:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Ausstellername:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisation:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakt:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signatur:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Das Netzwerk muss verifiziert sein"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Sieh dir die Netzwerkdetails von <xliff:g id="SSID">%1$s</xliff:g> an, bevor du dich mit dem Netzwerk verbindest. Tippe, um fortzufahren."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Installation des Zertifikats fehlgeschlagen."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Dieses Netzwerk kann nicht verifiziert werden"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Trotzdem verbinden"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Nicht verbinden"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Für das Netzwerk <xliff:g id="SSID">%1$s</xliff:g> fehlt ein Zertifikat."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Informationen zum Hinzufügen von Zertifikaten"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Dieses Netzwerk kann nicht verifiziert werden"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Für das Netzwerk <xliff:g id="SSID">%1$s</xliff:g> fehlt ein Zertifikat. Tippe hier, um zu erfahren, wie du Zertifikate hinzufügen kannst."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Trotzdem verbinden"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Nicht verbinden"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Zulassen, dass <xliff:g id="APP_NAME">%1$s</xliff:g> WLAN aktiviert?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Das WLAN kannst du in den Schnelleinstellungen deaktivieren"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Zulassen"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Nicht zulassen"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-el/strings.xml b/service/ServiceWifiResources/res/values-el/strings.xml
index 38eecd8..a3f9174 100644
--- a/service/ServiceWifiResources/res/values-el/strings.xml
+++ b/service/ServiceWifiResources/res/values-el/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Η ρύθμιση ενημερώθηκε. Δοκιμάστε να συνδεθείτε ξανά."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Δεν είναι δυνατή η αλλαγή της ρύθμισης απορρήτου"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Δεν βρέθηκε δίκτυο"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Δεν μπορείτε να συνδεθείτε στο Verizon Wi-Fi Access εκτός της περιοχής κάλυψης της Verizon. (Σφάλμα = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Δεν έχετε εγγραφεί στο Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τον λογαριασμό σας Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Έχετε συνδεθεί ήδη με το Verizon Wi-Fi Access. (Σφάλμα = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τον λογαριασμό σας Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Το Verizon Wi-Fi Access δεν είναι διαθέσιμο από την τοποθεσία σας. Δοκιμάστε ξανά αργότερα ή από διαφορετική τοποθεσία. (Σφάλμα = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access. Δοκιμάστε ξανά αργότερα ή από διαφορετική τοποθεσία."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access λόγω του σφάλματος 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access λόγω του σφάλματος 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Σφάλμα ελέγχου ταυτότητας EAP, άγνωστος κωδικός σφάλματος"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Το σημείο πρόσβασης Wi-Fi απενεργοποιήθηκε."</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Δεν υπάρχουν συνδεδεμένες συσκευές. Πατήστε για τροποποίηση."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Το Wi-Fi αποσυνδέθηκε."</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Για να συνδεθείτε στο <xliff:g id="SSID">%1$s</xliff:g>, τοποθετήστε μια κάρτα SIM <xliff:g id="CARRIER_NAME">%2$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"Η εφαρμογή <xliff:g id="APP">%1$s</xliff:g> θέλει να χρησιμοποιήσει έναν πόρο δικτύωσης"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Αυτή η ενέργεια μπορεί να προκαλέσει προβλήματα στα εξής: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Αυτό μπορεί να προκαλέσει προβλήματα σε αυτές τις εφαρμογές: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Να επιτρέπεται"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Να μην επιτρέπεται"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Είναι αξιόπιστο αυτό το δίκτυο;"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ναι, να γίνει σύνδεση"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Όχι, να μην γίνει σύνδεση"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Επιτρέψτε τη σύνδεση σε αυτό το δίκτυο μόνο αν οι παρακάτω πληροφορίες είναι σωστές.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Όνομα διακομιστή:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Όνομα εκδότη:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Οργανισμός:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Επαφή:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Υπογραφή:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Απαιτείται επαλήθευση του δικτύου."</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Ελέγξτε τις λεπτομέρειες του δικτύου <xliff:g id="SSID">%1$s</xliff:g> πριν από τη σύνδεση. Πατήστε για συνέχεια."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Αποτυχία εγκατάστασης πιστοποιητικού."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Δεν είναι δυνατή η επαλήθευση αυτού του δικτύου."</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Σύνδεση ούτως ή άλλως"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Να μην γίνει σύνδεση"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Λείπει ένα πιστοποιητικό από το δίκτυο <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Μάθετε πώς να προσθέτετε πιστοποιητικά"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Δεν είναι δυνατή η επαλήθευση αυτού του δικτύου."</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Λείπει ένα πιστοποιητικό από το δίκτυο <xliff:g id="SSID">%1$s</xliff:g>. Πατήστε για να μάθετε πώς μπορείτε να προσθέσετε πιστοποιητικά."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Σύνδεση ούτως ή άλλως"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Να μην γίνει σύνδεση"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Να επιτρέπεται στο <xliff:g id="APP_NAME">%1$s</xliff:g> να ενεργοποιεί το Wi‑Fi;"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Μπορείτε να απενεργοποιήσετε το Wi‑Fi από τις Γρήγορες ρυθμίσεις"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Να επιτρέπεται"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Να μην επιτρέπεται"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-en-rAU/strings.xml b/service/ServiceWifiResources/res/values-en-rAU/strings.xml
index 6529546..49be15f 100644
--- a/service/ServiceWifiResources/res/values-en-rAU/strings.xml
+++ b/service/ServiceWifiResources/res/values-en-rAU/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Setting updated. Try connecting again."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Can\'t change privacy setting"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Network not found"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP authentication error 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error, unknown error code"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot turned off"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"No devices connected. Tap to modify."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi‑Fi disconnected"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"To connect to <xliff:g id="SSID">%1$s</xliff:g>, insert a <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> wants to use a networking resource"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"This may cause problems for <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"This may cause problems for these apps: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Allow"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Don\'t allow"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Is this network trusted?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Yes, connect"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"No, don\'t connect"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Only allow this network to connect if the information below looks correct.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Server name:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Issuer name:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisation:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contact:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signature:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Network needs to be verified"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Review network details for <xliff:g id="SSID">%1$s</xliff:g> before connecting. Tap to continue."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Certificate installation failed."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Can\'t verify this network"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Connect anyway"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Don\'t connect"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"The network <xliff:g id="SSID">%1$s</xliff:g> is missing a certificate."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Learn how to add certificates"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Can\'t verify this network"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"The network <xliff:g id="SSID">%1$s</xliff:g> is missing a certificate. Tap to learn how to add certificates."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Connect anyway"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Don\'t connect"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Allow <xliff:g id="APP_NAME">%1$s</xliff:g> to turn on Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"You can turn off Wi‑Fi in Quick Settings"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Allow"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Don\'t allow"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-en-rCA/strings.xml b/service/ServiceWifiResources/res/values-en-rCA/strings.xml
index 6529546..49be15f 100644
--- a/service/ServiceWifiResources/res/values-en-rCA/strings.xml
+++ b/service/ServiceWifiResources/res/values-en-rCA/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Setting updated. Try connecting again."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Can\'t change privacy setting"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Network not found"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP authentication error 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error, unknown error code"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot turned off"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"No devices connected. Tap to modify."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi‑Fi disconnected"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"To connect to <xliff:g id="SSID">%1$s</xliff:g>, insert a <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> wants to use a networking resource"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"This may cause problems for <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"This may cause problems for these apps: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Allow"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Don\'t allow"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Is this network trusted?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Yes, connect"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"No, don\'t connect"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Only allow this network to connect if the information below looks correct.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Server name:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Issuer name:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisation:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contact:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signature:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Network needs to be verified"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Review network details for <xliff:g id="SSID">%1$s</xliff:g> before connecting. Tap to continue."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Certificate installation failed."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Can\'t verify this network"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Connect anyway"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Don\'t connect"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"The network <xliff:g id="SSID">%1$s</xliff:g> is missing a certificate."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Learn how to add certificates"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Can\'t verify this network"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"The network <xliff:g id="SSID">%1$s</xliff:g> is missing a certificate. Tap to learn how to add certificates."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Connect anyway"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Don\'t connect"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Allow <xliff:g id="APP_NAME">%1$s</xliff:g> to turn on Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"You can turn off Wi‑Fi in Quick Settings"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Allow"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Don\'t allow"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-en-rGB/strings.xml b/service/ServiceWifiResources/res/values-en-rGB/strings.xml
index 6529546..49be15f 100644
--- a/service/ServiceWifiResources/res/values-en-rGB/strings.xml
+++ b/service/ServiceWifiResources/res/values-en-rGB/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Setting updated. Try connecting again."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Can\'t change privacy setting"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Network not found"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP authentication error 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error, unknown error code"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot turned off"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"No devices connected. Tap to modify."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi‑Fi disconnected"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"To connect to <xliff:g id="SSID">%1$s</xliff:g>, insert a <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> wants to use a networking resource"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"This may cause problems for <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"This may cause problems for these apps: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Allow"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Don\'t allow"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Is this network trusted?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Yes, connect"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"No, don\'t connect"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Only allow this network to connect if the information below looks correct.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Server name:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Issuer name:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisation:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contact:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signature:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Network needs to be verified"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Review network details for <xliff:g id="SSID">%1$s</xliff:g> before connecting. Tap to continue."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Certificate installation failed."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Can\'t verify this network"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Connect anyway"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Don\'t connect"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"The network <xliff:g id="SSID">%1$s</xliff:g> is missing a certificate."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Learn how to add certificates"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Can\'t verify this network"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"The network <xliff:g id="SSID">%1$s</xliff:g> is missing a certificate. Tap to learn how to add certificates."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Connect anyway"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Don\'t connect"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Allow <xliff:g id="APP_NAME">%1$s</xliff:g> to turn on Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"You can turn off Wi‑Fi in Quick Settings"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Allow"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Don\'t allow"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-en-rIN/strings.xml b/service/ServiceWifiResources/res/values-en-rIN/strings.xml
index 6529546..49be15f 100644
--- a/service/ServiceWifiResources/res/values-en-rIN/strings.xml
+++ b/service/ServiceWifiResources/res/values-en-rIN/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Setting updated. Try connecting again."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Can\'t change privacy setting"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Network not found"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP authentication error 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error, unknown error code"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot turned off"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"No devices connected. Tap to modify."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi‑Fi disconnected"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"To connect to <xliff:g id="SSID">%1$s</xliff:g>, insert a <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> wants to use a networking resource"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"This may cause problems for <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"This may cause problems for these apps: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Allow"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Don\'t allow"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Is this network trusted?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Yes, connect"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"No, don\'t connect"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Only allow this network to connect if the information below looks correct.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Server name:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Issuer name:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisation:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contact:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signature:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Network needs to be verified"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Review network details for <xliff:g id="SSID">%1$s</xliff:g> before connecting. Tap to continue."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Certificate installation failed."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Can\'t verify this network"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Connect anyway"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Don\'t connect"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"The network <xliff:g id="SSID">%1$s</xliff:g> is missing a certificate."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Learn how to add certificates"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Can\'t verify this network"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"The network <xliff:g id="SSID">%1$s</xliff:g> is missing a certificate. Tap to learn how to add certificates."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Connect anyway"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Don\'t connect"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Allow <xliff:g id="APP_NAME">%1$s</xliff:g> to turn on Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"You can turn off Wi‑Fi in Quick Settings"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Allow"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Don\'t allow"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-en-rXC/strings.xml b/service/ServiceWifiResources/res/values-en-rXC/strings.xml
index f7af68e..25571d7 100644
--- a/service/ServiceWifiResources/res/values-en-rXC/strings.xml
+++ b/service/ServiceWifiResources/res/values-en-rXC/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‎‏‎‎‏‎‏‏‎‎‎‏‏‎‎‎‎‎‎‎‏‏‏‏‎‎‎‏‎‎‏‏‎‏‎‎‎‎‏‏‎‎‎‏‎‏‏‎‏‏‎‏‎‏‏‎‏‏‎Setting updated. Try connecting again.‎‏‎‎‏‎"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‎‎‎‎‏‎‏‎‏‏‏‏‎‏‎‏‏‏‎‎‎‎‏‎‎‎‏‏‏‏‏‏‏‎‎‏‏‎‏‎‏‏‎‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‎Can\'t change privacy setting‎‏‎‎‏‎"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‏‎‎‎‏‎‎‎‎‏‎‏‎‏‎‏‎‏‎‎‏‏‏‎‎‎‎‏‏‎‏‎‏‎‏‏‏‏‎‎‎‎‏‎‎‏‎‎‏‏‏‎‏‏‎‏‎‎‎Network not found‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‎‏‏‏‎‎‏‏‎‏‏‏‏‏‏‏‎‏‏‏‎‏‏‏‎‏‏‏‏‏‏‎‎‎‎‎‏‏‏‎‏‎‏‏‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 32756‎‏‎‎‏‎"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‏‏‏‏‏‎‎‎‏‏‎‏‏‎‎‏‎‏‏‎‎‏‎‏‏‎‏‏‏‏‏‎‏‏‏‏‎‎‎‏‎‏‏‎‎‏‏‏‏‏‏‎‏‏‎‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 32760‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‎‏‎‎‏‏‏‎‎‏‏‏‏‏‏‎‎‏‏‎‏‏‏‎‎‎‏‏‎‏‎‎‎‏‏‏‏‏‎‎‏‎‎‏‎‏‎‏‏‎‏‎‏‏‏‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You can’t connect to Verizon Wi-Fi Access from outside the Verizon coverage area. (Error = 32760)‎‏‎‎‏‎"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‏‏‎‏‏‏‏‏‏‏‎‎‎‎‎‎‏‎‏‎‏‏‏‎‎‏‎‏‎‏‎‎‏‏‏‎‏‎‎‎‏‎‎‎‎‏‏‎‏‏‏‏‏‎‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 32761‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‏‏‏‏‎‎‏‏‎‎‏‏‎‏‎‏‎‏‏‎‎‏‎‎‏‎‏‎‎‏‎‏‏‏‎‏‎‎‎‏‏‎‏‏‎‏‎‎‏‎‎‏‏‎‏‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You are not subscribed to Verizon Wi-Fi Access. Please call us at 800-922-0204. (Error = 32761)‎‏‎‎‏‎"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‎‏‎‎‎‎‏‏‎‏‎‏‏‎‎‏‎‎‏‏‎‏‎‏‏‎‎‎‎‏‏‏‏‎‏‏‏‎‏‏‎‎‏‎‏‎‏‎‎‏‏‎‎‎‏‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 32762‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‎‎‎‏‏‎‎‏‏‏‏‏‏‏‎‎‎‏‎‎‏‎‎‏‎‎‏‎‎‎‏‎‎‏‏‎‏‏‏‎‎‏‎‎‏‎‎‎‎‎‏‏‎‎‏‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204. (Error = 32762)‎‏‎‎‏‎"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎‎‎‎‎‎‎‏‎‎‏‎‎‏‏‏‎‏‏‏‎‏‎‏‏‎‎‎‏‏‎‏‎‎‏‏‏‏‏‎‎‏‎‎‎‏‎‎‏‏‏‎‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 32763‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‎‎‎‎‏‏‎‎‏‏‏‎‏‏‏‏‏‏‏‎‎‏‏‎‏‏‎‎‏‎‏‎‏‎‎‎‎‎‏‏‏‎‎‏‏‎‏‎‏‏‏‏‎‏‎‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You are already connected to Verizon Wi-Fi Access. (Error = 32763)‎‏‎‎‏‎"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‎‏‏‏‏‏‏‏‏‎‏‏‎‎‏‏‏‎‎‏‎‎‏‎‏‏‏‏‎‏‎‏‎‏‎‏‎‏‏‏‏‏‎‎‎‏‏‎‏‏‎‎‏‎‏‏‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 32764‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‏‏‎‎‏‎‎‎‎‏‎‎‎‎‏‏‏‎‏‎‎‏‏‎‎‏‏‏‏‎‎‎‏‎‏‏‏‏‏‎‏‏‎‎‎‎‏‎‎‏‏‏‏‏‎‏‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access. Please call us at 800-922-0204. (Error = 32764)‎‏‎‎‏‎"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‏‎‎‎‎‏‎‏‎‎‏‎‎‏‏‎‏‏‏‎‎‎‏‏‏‎‏‎‏‏‏‏‏‏‎‎‎‏‏‏‎‎‏‎‏‎‎‏‎‎‏‏‎‏‏‏‎‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 32765‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‏‏‎‏‏‏‎‎‏‎‎‏‏‎‏‎‎‏‏‏‎‎‎‎‏‎‏‏‎‎‏‏‎‏‎‎‎‏‎‎‎‏‎‎‏‎‏‏‎‎‏‏‎‏‎‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204. (Error = 32765)‎‏‎‎‏‎"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‎‎‎‏‏‎‏‎‏‏‎‎‏‎‎‎‎‎‎‏‎‏‎‎‎‏‏‏‎‏‏‏‎‏‏‎‏‏‎‎‏‏‎‎‎‏‏‏‏‏‎‏‏‎‎‏‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 32766‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‎‏‏‎‎‎‏‏‎‎‎‏‏‏‏‏‏‎‎‎‎‎‎‏‏‏‏‎‎‏‎‎‎‎‎‎‏‏‏‏‏‏‎‎‎‎‎‎‎‏‎‏‏‏‏‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : Verizon Wi-Fi Access is not available from your location. Try again later or try from a different location. (Error = 32766)‎‏‎‎‏‎"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‎‏‎‎‏‏‏‎‎‏‏‏‏‏‏‏‎‏‎‏‏‏‎‏‎‎‏‏‏‎‎‎‎‎‏‎‎‏‎‏‏‏‏‎‏‎‎‏‎‏‎‎‎‏‎‏‏‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 32767‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‎‎‎‎‎‏‏‏‏‎‎‏‏‏‎‏‎‏‏‏‎‎‏‏‎‎‏‏‏‎‎‏‏‏‏‎‏‏‏‏‏‎‎‏‎‏‎‏‎‎‎‎‎‎‎‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access. Try again later or try from a different location.‎‏‎‎‏‎"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‏‏‏‏‏‏‏‏‏‏‎‎‎‎‏‏‎‏‏‎‏‎‎‎‎‎‎‏‏‎‏‏‏‏‎‎‎‎‏‏‏‎‎‎‏‎‏‎‏‏‎‏‎‎‏‏‏‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 16384‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‏‏‏‏‏‏‎‏‏‏‎‎‎‏‎‎‏‎‎‎‎‏‏‏‎‏‏‎‎‏‎‏‏‎‏‏‏‏‎‏‏‎‎‏‏‎‏‎‏‏‎‏‏‏‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access due to error 16384.‎‏‎‎‏‎"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‎‎‎‏‏‏‏‎‎‏‎‏‏‏‏‏‏‎‏‎‏‎‏‏‎‏‏‎‎‏‏‎‏‎‎‎‏‎‎‏‎‏‎‏‏‎‏‎‏‏‏‎‏‏‏‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error 16385‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‎‏‎‏‎‏‏‏‎‎‏‏‏‎‎‎‎‏‎‏‎‏‏‎‏‏‏‎‎‎‏‏‎‏‎‏‏‏‏‎‎‎‏‏‎‎‏‎‎‎‏‏‏‏‏‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access due to error 16385.‎‏‎‎‏‎"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‏‏‎‎‎‏‎‏‏‏‏‎‏‎‎‏‏‎‎‏‎‎‎‎‏‎‎‎‏‎‎‏‏‎‏‏‏‏‏‎‏‎‏‎‎‎‎‏‎‎‏‏‎‎‏‏‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : EAP authentication error, unknown error code‎‏‎‎‏‎"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‎‏‎‎‏‏‏‏‎‎‎‎‎‎‏‎‏‎‎‏‏‎‏‎‏‎‎‏‎‏‎‎‏‏‎‏‏‏‎‎‏‏‎‎‏‎‎‏‎‎‏‎‏‎‏‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access.‎‏‎‎‏‎"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‏‏‏‏‏‏‎‎‏‏‏‏‏‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‎‏‎‏‎‏‏‎‏‎‎‎‏‏‎‏‏‏‎‏‏‏‎‎‏‎‎‎Hotspot turned off‎‏‎‎‏‎"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‏‎‏‎‏‎‏‏‏‎‏‎‎‏‎‏‎‏‏‏‎‎‏‏‎‏‎‎‎‏‎‎‏‏‎‎‎‎‏‏‏‎‎‏‎‏‎‏‎‎‏‏‎‏‎‎‎‎‎No devices connected. Tap to modify.‎‏‎‎‏‎"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‏‏‏‎‏‏‎‎‏‎‏‎‎‎‎‏‏‎‎‎‎‏‏‎‎‏‎‏‏‏‏‏‏‏‏‎‎‎‏‎‏‏‏‎‏‎‎‎‏‎‏‎‎‎‎‎‎‏‏‎Wi‑Fi disconnected‎‏‎‎‏‎"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‏‎‎‏‏‏‏‎‏‏‎‏‏‎‎‏‏‎‎‏‎‏‎‏‏‏‎‎‎‏‎‎‏‎‏‎‏‎‏‏‏‏‏‎‏‏‎‏‏‎‎‎‏‎To connect to ‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎, insert a ‎‏‎‎‏‏‎<xliff:g id="CARRIER_NAME">%2$s</xliff:g>‎‏‎‎‏‏‏‎ SIM‎‏‎‎‏‎"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‏‏‎‎‎‎‎‏‎‏‎‏‏‏‎‏‏‏‎‏‏‏‎‎‎‎‎‎‎‏‏‏‎‎‏‎‏‎‎‎‏‎‎‏‎‎‎‏‎‎‎‎‎‏‏‎‎‎‎‎‏‎‎‏‏‎<xliff:g id="APP">%1$s</xliff:g>‎‏‎‎‏‏‏‎ wants to use a networking resource‎‏‎‎‏‎"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‎‏‏‎‎‎‎‎‏‏‏‎‎‎‏‎‏‎‎‏‎‏‏‏‏‎‎‎‏‏‏‎‏‏‎‏‏‏‎‏‎‎‏‎‏‏‏‎‎‎‏‎‎‎‏‏‎‎‏‎This may cause problems for ‎‏‎‎‏‏‎<xliff:g id="APPS">%3$s</xliff:g>‎‏‎‎‏‏‏‎.‎‏‎‎‏‎"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‎‏‎‏‏‏‏‏‏‎‎‏‏‎‎‏‏‎‎‎‏‏‏‎‏‎‎‎‏‎‏‎‎‎‎‎‏‎‎‎‎‏‏‎‏‎‏‏‏‎‏‏‏‏‎‎‏‏‎This may cause problems for these apps: ‎‏‎‎‏‏‎<xliff:g id="APPS">%3$s</xliff:g>‎‏‎‎‏‏‏‎.‎‏‎‎‏‎"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‎‏‎‏‎‏‎‎‏‎‎‎‎‏‎‎‏‏‎‎‎‎‎‏‏‎‎‎‎‏‎‎‎‎‎‎‏‎‏‎‎‎‏‏‎‏‎‎‏‎‎‏‏‎‏‎‎‎‎Allow‎‏‎‎‏‎"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‏‏‎‎‏‎‎‎‎‏‎‏‎‎‎‏‏‎‏‏‏‏‏‏‏‎‎‏‎‎‎‏‎‎‎‏‏‎‏‏‏‏‏‎‏‎‎‎‏‎‏‎‏‏‏‎‎‏‎Don\'t allow‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‏‎‏‏‎‏‏‏‏‎‏‎‏‎‏‎‎‎‏‎‎‎‎‎‏‏‏‎‎‏‎‏‏‎‏‏‏‎‎‎‎‏‏‏‎‏‏‎‎‏‏‏‏‎‏‏‏‏‎‎Is this network trusted?‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‏‏‏‎‎‏‏‏‎‏‏‏‏‎‎‏‏‎‎‏‎‎‏‎‎‎‏‏‎‎‎‎‏‏‎‎‏‎‎‏‎‎‎‎‎‏‎‎‏‏‏‎‎‎‏‏‎‏‏‎Yes, connect‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‏‎‎‎‎‏‎‏‎‏‏‏‎‎‏‎‏‎‏‏‎‎‎‎‎‎‏‎‎‎‎‏‎‏‏‏‎‏‎‏‏‏‎‏‏‏‎‏‎‎‏‎‏‏‏‎‏‏‎No, don\'t connect‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‏‎‏‏‎‏‎‏‏‎‏‏‏‎‏‎‎‎‏‏‎‎‎‏‎‎‎‎‏‏‎‏‎‏‏‎‎‏‎‏‎‏‎‎‎‏‏‏‎‏‏‏‎‎‏‏‏‎‎Only allow this network to connect if the information below looks correct.‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‎‏‏‎‏‏‏‎‏‎‎‏‏‎‎‏‎‎‏‎‏‏‎‏‏‎‏‏‎‎‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‏‏‏‎‎‏‏‎‎‎‎‎‎‏‎Server Name:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="VALUE">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‏‏‏‏‏‎‏‎‏‏‏‎‏‏‏‎‏‏‏‎‏‏‎‏‏‎‎‏‏‏‏‎‎‎‎‏‏‏‎‎‏‏‎‏‎‏‏‏‏‏‏‏‏‏‎‎‎‎‎Issuer Name:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="VALUE">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‎‏‎‎‎‎‎‎‏‎‏‏‏‎‏‎‎‎‏‎‏‏‎‏‏‎‎‎‎‎‏‎‏‏‏‎‏‎‎‎‏‏‎‎‎‏‏‎‏‎‎‏‏‏‏‏‏‎Organization:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="VALUE">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‎‎‎‏‏‏‏‎‏‎‎‏‏‏‏‎‏‏‏‎‎‎‏‏‎‏‏‎‏‎‏‏‏‎‏‎‎‎‎‎‎‎‎‏‎‎‏‏‎‎‎‏‎‎‎‏‏‏‎Contact:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="VALUE">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‎‏‏‏‎‎‎‏‏‏‎‏‎‎‏‎‏‎‏‎‏‏‎‎‏‏‏‏‎‎‏‏‏‏‏‏‏‎‎‏‎‏‏‎‎‎‏‎‎‎‏‎‎‎‎‎‎‎‎Signature:‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="VALUE">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‏‏‏‏‎‏‏‏‎‏‎‏‏‏‎‏‎‏‎‎‏‏‏‏‎‏‏‎‎‏‎‏‎‎‎‏‎‎‏‏‏‎‎‏‏‏‎‏‎‎‏‏‎‏‏‎‎‏‎‎‎Network needs to be verified‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‎‎‏‎‎‎‎‎‎‎‎‎‏‏‎‏‏‏‏‏‎‏‏‎‏‎‎‏‎‎‎‏‏‎‏‎‎‎‎‏‎‎‏‏‏‎‏‏‏‏‎‏‎‎‎‎‎‎‏‎Review network details for ‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ before connecting. Tap to continue.‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‏‏‏‎‎‎‎‎‎‏‎‎‎‏‎‏‎‏‎‎‎‎‏‏‎‏‎‏‏‎‎‎‏‏‏‏‎‎‏‎‎‏‎‎‏‏‏‎‎‏‎‎‎‎‎‎‏‏‎Certificate installation failed.‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‏‏‏‏‏‏‏‏‎‏‏‏‎‏‏‎‏‎‎‏‏‎‏‎‏‏‎‎‎‎‎‎‎‏‏‏‏‎‎‏‎‎‎‏‎‎‏‏‏‏‎‏‎‏‎‎‏‎‏‎Can\'t verify this network‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‎‎‎‎‏‎‎‏‏‏‎‏‎‏‏‏‎‏‎‏‎‎‏‎‏‏‎‏‏‏‎‏‎‎‏‎‏‎‎‎‎‎‏‎‏‎‎‎‏‎‎‏‏‎‏‎‏‎‎Connect anyway‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‎‎‏‎‎‏‎‏‏‏‏‎‎‎‏‎‎‏‎‎‏‏‏‏‏‎‏‏‎‏‎‎‏‏‏‏‎‎‎‎‏‏‏‏‎‏‎‏‎‏‎‎‎‎‎‏‎‏‎Don\'t connect‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‏‏‎‏‏‎‏‏‏‎‎‎‏‎‏‏‏‎‎‏‎‏‏‏‎‎‏‏‏‎‏‏‏‏‎‎‎‏‎‏‎‏‏‏‏‏‏‏‎‎‎‎‎‏‏‏‏‏‏‎The network ‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ is missing a certificate.‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‏‏‏‏‎‎‏‎‎‎‏‎‏‎‎‎‎‏‎‏‏‎‎‏‎‏‎‎‏‎‏‎‏‏‏‎‏‎‏‏‏‏‎‏‏‎‏‎‏‎‏‏‎‎‎‏‎‎‎Learn how to add certificates‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‎‎‏‎‏‎‏‏‏‏‎‏‏‎‎‏‏‎‎‎‏‏‏‏‎‎‎‏‏‏‏‎‏‎‎‎‎‎‎‏‎‎‎‎‎‏‎‎‏‎‏‏‏‏‎‏‏‏‎Can\'t verify this network‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‏‏‏‎‏‎‏‏‏‎‎‎‎‎‏‏‎‏‎‎‏‏‎‏‏‎‎‏‎‏‎‎‎‎‎‎‎‎‎‎‏‏‏‎‏‏‏‏‏‎‎‏‏‎‎‏‏‎‎‎The network ‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ is missing a certificate. Tap to learn how to add certificates.‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‏‎‏‎‎‏‎‏‎‏‏‎‏‎‏‏‏‏‏‏‏‏‏‏‎‏‏‎‎‎‏‎‎‏‎‏‎‎‎‎‎‎‏‎‏‏‎‎‎‎‎‏‎‏‏‎‏‏‎‎Connect anyway‎‏‎‎‏‎"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‏‏‎‏‎‎‏‎‏‏‏‏‏‎‏‏‏‎‎‏‎‏‏‏‏‏‎‏‏‏‏‎‏‎‏‎‎‏‎‏‏‏‏‎‎‏‏‎‏‏‏‏‏‎‏‏‏‎‎Don\'t connect‎‏‎‎‏‎"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‎‎‎‏‏‎‏‎‎‏‎‏‏‎‏‏‎‎‎‎‎‎‏‎‎‎‏‏‎‏‏‏‎‎‏‏‎‎‎‎‏‎‏‏‎‎‎‏‎‏‎‎‏‏‏‏‏‏‎‎‎Allow ‎‏‎‎‏‏‎<xliff:g id="APP_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎ to turn on Wi‑Fi?‎‏‎‎‏‎"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‎‎‎‏‏‎‎‎‎‎‎‎‎‏‏‎‏‎‎‎‏‏‏‏‏‎‎‎‎‎‏‏‏‎‎‏‎‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‏‎‎You can turn off Wi‑Fi in Quick Settings‎‏‎‎‏‎"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‏‏‏‏‏‏‏‎‎‎‏‏‏‎‎‎‎‎‎‎‏‎‎‏‏‎‏‎‎‏‏‏‎‏‎‎‎‏‏‎‏‏‏‎‎‏‎‎‏‏‎‎‎‎‎‎‏‎‎Allow‎‏‎‎‏‎"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‏‎‎‎‎‏‏‏‎‎‏‏‏‏‏‏‏‏‎‎‎‏‎‎‏‎‎‏‏‎‎‎‏‏‏‎‏‎‏‏‏‎‎‎‏‎‎Don\'t allow‎‏‎‎‏‎"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-es-rUS/strings.xml b/service/ServiceWifiResources/res/values-es-rUS/strings.xml
index 82b941c..12a13fb 100644
--- a/service/ServiceWifiResources/res/values-es-rUS/strings.xml
+++ b/service/ServiceWifiResources/res/values-es-rUS/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Se actualizó la configuración. Intenta conectarte de nuevo."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"No se puede cambiar la configuración de privacidad"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"No se encontró ninguna red"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: No te puedes conectar a Verizon Wi-Fi Access si te encuentras fuera del área de cobertura de Verizon. (Error: 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: No te suscribiste a Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Hay un problema con tu cuenta de Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ya te conectaste a Verizon Wi-Fi Access. (Error: 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Se produjo un error al conectarte a Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Hay un problema con tu cuenta de Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access no está disponible en tu ubicación. Vuelve a intentarlo más tarde o en una ubicación diferente. (Error: 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Se produjo un error al conectarte a Verizon Wi-Fi Access. Vuelve a intentarlo más tarde o en una ubicación diferente."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: No se pudo establecer la conexión a Verizon Wi-Fi Access debido al error 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: Error de autenticación de EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: No se pudo establecer la conexión a Verizon Wi-Fi Access debido al error 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Error de autenticación de EAP; código de error desconocido"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Se produjo un error al conectarte a Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Se desactivó el hotspot"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"No hay dispositivos conectados. Presiona para modificar la configuración."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Sin conexión Wi-Fi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Para conectarte a <xliff:g id="SSID">%1$s</xliff:g>, inserta una SIM de <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> quiere usar un recurso de redes"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Esta acción podría causar problemas para <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Esto podría causar problemas para estas apps: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Permitir"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"No permitir"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"¿Es una red segura?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Sí, conectar"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"No, no conectar"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Permite que esta red se conecte solo si la información que se muestra más abajo es correcta.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nombre del servidor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nombre de la entidad emisora\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organización:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Comunicarse con:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Firma:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Es necesario verificar la red"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Antes de conectarte, revisa los detalles de la red <xliff:g id="SSID">%1$s</xliff:g>. Presiona para continuar."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Se produjo un error cuando se instalaba el certificado."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"No se pudo verificar esta red"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Conectar de todos modos"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"No conectar"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"A la red <xliff:g id="SSID">%1$s</xliff:g> le falta un certificado."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Obtén más información para agregar certificados"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"No se pudo verificar esta red"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"A la red <xliff:g id="SSID">%1$s</xliff:g> le falta un certificado. Presiona a fin de obtener más información para agregar certificados."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Conectar de todos modos"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"No conectar"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"¿Deseas permitir que <xliff:g id="APP_NAME">%1$s</xliff:g> desactive el Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Puedes desactivar el Wi‑Fi en la Configuración rápida"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Permitir"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"No permitir"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-es/strings.xml b/service/ServiceWifiResources/res/values-es/strings.xml
index 6eb7856..a6d6748 100644
--- a/service/ServiceWifiResources/res/values-es/strings.xml
+++ b/service/ServiceWifiResources/res/values-es/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Se ha cambiado el ajuste. Prueba a conectarte de nuevo."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"No se ha podido cambiar el ajuste de privacidad"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"No se ha encontrado la red"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: no puedes conectarte a Verizon Wi‑Fi Access si no estás en el área de cobertura de Verizon. Error: 32760."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: no tienes una suscripción a Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32761."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: hay un problema con tu cuenta de Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32762."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: ya te has conectado a Verizon Wi‑Fi Access. Error: 32763."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32764."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: hay un problema con tu cuenta de Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32765."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi‑Fi Access no está disponible en tu ubicación. Inténtalo de nuevo más tarde o cuando estés en otro lugar. Error: 32766."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access. Inténtalo de nuevo más tarde o cuando estés en otro lugar."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access debido a un error 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access debido a un error 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: error de autenticación de EAP, código de error desconocido"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Compartir Internet desactivado"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"No hay dispositivos conectados. Toca para modificar este ajuste."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi‑Fi desconectado"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Para conectarte a <xliff:g id="SSID">%1$s</xliff:g>, inserta una tarjeta SIM de <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> quiere usar un recurso de redes"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Esta acción puede ocasionar problemas a <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Eso puede provocar problemas en estas aplicaciones: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Permitir"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"No permitir"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"¿Esta red es de confianza?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Sí, conectar"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"No, no conectar"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Autoriza la conexión a esta red solo si la información que figura abajo parece correcta.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nombre del servidor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nombre de la entidad emisora:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organización:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contacto:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Firma:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"La red debe verificarse"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Revisa los detalles de la red <xliff:g id="SSID">%1$s</xliff:g> antes de conectarte. Toca para continuar."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"No se ha podido instalar el certificado."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"No se puede verificar esta red"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Conectar de todos modos"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"No conectar"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Falta un certificado en la red <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Consulta cómo añadir certificados"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"No se puede verificar esta red"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Falta un certificado en la red <xliff:g id="SSID">%1$s</xliff:g>. Toca para saber cómo añadir certificados."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Conectar de todos modos"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"No conectar"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"¿Permitir que <xliff:g id="APP_NAME">%1$s</xliff:g> active la Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Puedes desactivar la Wi‑Fi en los ajustes rápidos"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Permitir"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"No permitir"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-et/strings.xml b/service/ServiceWifiResources/res/values-et/strings.xml
index 06bbcbf..82134bb 100644
--- a/service/ServiceWifiResources/res/values-et/strings.xml
+++ b/service/ServiceWifiResources/res/values-et/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Seadet värskendati. Proovige uuesti ühendada."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Privaatsusseadet ei saa muuta"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Võrku ei leitud"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: te ei saa väljaspool Verizoni leviala Verizon Wi-Fi Accessiga ühendust luua. (Viga = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: te ei ole Verizon Wi-Fi Accessi tellinud. Helistage meile numbril 800 922 0204. (Viga = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: teie Verizon Wi-Fi Accessi kontoga on probleem. Helistage meile numbril 800 922 0204. (Viga = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: olete Verizon Wi-Fi Accessiga juba ühendatud. (Viga = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem. Helistage meile numbril 800 922 0204. (Viga = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: teie Verizon Wi-Fi Accessi kontoga on probleem. Helistage meile numbril 800 922 0204. (Viga = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ei ole teie asukohas saadaval. Proovige hiljem või mõnes teises asukohas uuesti. (Viga = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem. Proovige hiljem või mõnes teises asukohas uuesti."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem vea 16384 tõttu."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentimise viga 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem vea 16385 tõttu."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP autentimise viga, tundmatu veakood"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Kuumkoht lülitati välja"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Ükski seade pole ühendatud. Puudutage muutmiseks."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"WiFi-ühendus on katkestatud"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Võrguga <xliff:g id="SSID">%1$s</xliff:g> ühendamiseks sisestage operaatori <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM-kaart"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> soovib kasutada võrgundusressurssi"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"See võib järgmistele rakendustele probleeme tekitada: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"See võib järgmistes rakendustes probleeme tekitada: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Luba"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Ära luba"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Kas see võrk on usaldusväärne?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Jah, ühenda"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ei, ära ühenda"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Lubage selle võrguga ühendada ainult juhul, kui allolev teave näib õige.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Serveri nimi:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Väljaandja nimi:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisatsioon:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Võta ühendust:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Allkiri:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Võrk tuleb kinnitada"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Vaadake võrgu <xliff:g id="SSID">%1$s</xliff:g> üksikasjad enne ühendamist üle. Puudutage jätkamiseks."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Sertifikaadi installimine ebaõnnestus."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Seda võrku ei õnnestu kinnitada"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Ühenda siiski"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ära ühenda"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Võrgul <xliff:g id="SSID">%1$s</xliff:g> pole sertifikaati."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Vaadake, kuidas sertifikaadid lisada"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Seda võrku ei õnnestu kinnitada"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Võrgul <xliff:g id="SSID">%1$s</xliff:g> pole sertifikaati. Puudutage, et hankida sertifikaatide lisamise kohta lisateavet."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Ühenda siiski"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ära ühenda"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Kas lubada rakendusel <xliff:g id="APP_NAME">%1$s</xliff:g> WiFi sisse lülitada?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"WiFi saab välja lülitada kiirseadetes"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Luba"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Ära luba"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-eu/strings.xml b/service/ServiceWifiResources/res/values-eu/strings.xml
index 060a627..719791f 100644
--- a/service/ServiceWifiResources/res/values-eu/strings.xml
+++ b/service/ServiceWifiResources/res/values-eu/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Eguneratu da ezarpena. Saiatu berriro konektatzen."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Ezin da aldatu pribatutasun-ezarpena"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Ez da aurkitu sarea"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAPen autentifikazio-errorea (32756)"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP metodoaren autentifikazio-errorea 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: ezin zara konektatu Verizon-en wifi-sarbidera Verizon-en estaldura-eremutik kanpo bazaude. (Errorea: 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP metodoaren autentifikazio-errorea 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: ez zaude harpidetuta Verizon-en wifi-sarbidera. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP metodoaren autentifikazio-errorea 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbideko kontuarekin. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP metodoaren autentifikazio-errorea 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Verizon-en wifi-sarbidera konektatuta zaude dagoeneko. (Errorea: 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP metodoaren autentifikazio-errorea 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbidera konektatzeko. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP metodoaren autentifikazio-errorea 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbideko kontuarekin. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP metodoaren autentifikazio-errorea 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Verizon-en wifi-sarbidea ez dago erabilgarri zauden tokian. Saiatu berriro geroago edo beste kokapen batetik. (Errorea: 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAPen autentifikazio-errorea (32767)"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbidera konektatzeko. Saiatu berriro geroago edo beste kokapen batetik."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: EAPen autentifikazio-errorea (16384)"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: 16384 errorea dela eta, arazo bat dago Verizon-en wifi-sarbidera konektatzeko."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: EAPen autentifikazio-errorea (16385)"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: 16385 errorea dela eta, arazo bat dago Verizon-en wifi-sarbidera konektatzeko."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: EAPen autentifikazio-errorea (errore-kode ezezaguna)"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbidera konektatzeko."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Wifi-gunea desaktibatu egin da"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Ez dago gailurik konektatuta. Sakatu aldatzeko."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Deskonektatu egin da wifia"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> sarera konektatzeko, sartu <xliff:g id="CARRIER_NAME">%2$s</xliff:g> operadorearen SIM txartel bat"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> aplikazioak sareko baliabide bat erabili behar du"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Baliteke horrek arazoak eragitea <xliff:g id="APPS">%3$s</xliff:g> aplikazioan."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Arazoak eragin diezazkieke aplikazio hauei: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Eman baimena"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Ez eman baimenik"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Fidagarria al da sarea?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Bai, konektatu nahi dut"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ez, ez dut konektatu nahi"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Eman konektatzeko baimena aplikazioari beheko informazioa zuzena bada soilik.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Zerbitzariaren izena:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Jaulkitzailearen izena:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Erakundea:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Jarri honekin harremanetan:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Sinadura:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Sarea egiaztatu egin behar da"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Konektatu aurretik, berrikusi <xliff:g id="SSID">%1$s</xliff:g> sarearen xehetasunak. Sakatu hau aurrera egiteko."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Ezin izan da instalatu ziurtagiria."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Ezin da egiaztatu sarea"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Konektatu halere"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ez konektatu"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> sareari ziurtagiri bat falta zaio."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Lortu ziurtagiriak gehitzeko argibideak"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Ezin da egiaztatu sarea"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> sareari ziurtagiri bat falta zaio. Sakatu hau ziurtagiriak gehitzeko argibideak lortzeko."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Konektatu halere"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ez konektatu"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Wifia aktibatzeko baimena eman nahi diozu <xliff:g id="APP_NAME">%1$s</xliff:g> aplikazioari?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Ezarpen bizkorrak erabil ditzakezu wifia desaktibatzeko"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Eman baimena"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Ez eman baimenik"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-fa/strings.xml b/service/ServiceWifiResources/res/values-fa/strings.xml
index 714efd7..79b973e 100644
--- a/service/ServiceWifiResources/res/values-fa/strings.xml
+++ b/service/ServiceWifiResources/res/values-fa/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"تنظیم به‌روزرسانی شد. دوباره متصل شوید."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"تنظیم حریم‌خصوصی تغییر نکرد"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"شبکه‌ای پیدا نشد"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای اصالت‌سنجی EAP با کد خطای ۳۲۷۵۶"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۰ اصالت‌سنجی EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : نمی‌توانید خارج از منطقه تحت پوشش Verizon به Verizon Wi-Fi Access متصل شوید. (خطا = ۳۲۷۶۰)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۱ اصالت‌سنجی EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : مشترک Verizon Wi-Fi Access نیستید. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۱)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۲ اصالت‌سنجی EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : مشکلی در حساب Verizon Wi-Fi Access وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۲)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۳ اصالت‌سنجی EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : درحال‌حاضر به Verizon Wi-Fi Access متصل هستید. (خطا = ۳۲۷۶۳)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۴ اصالت‌سنجی EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۴)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۵ اصالت‌سنجی EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : مشکلی در حساب Verizon Wi-Fi Access وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۵)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای ۳۲۷۶۶ اصالت‌سنجی EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access در مکان شما دردسترس نیست. بعداً دوباره تلاش کنید یا از مکان متفاوتی امتحان کنید. (خطا = ۳۲۷۶۶)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای اصالت‌سنجی EAP با کد خطای ۳۲۷۶۷"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد. بعداً دوباره تلاش کنید یا از مکان متفاوتی امتحان کنید."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای اصالت‌سنجی EAP با کد خطای ۱۶۳۸۴"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : به‌دلیل بروز خطای ۱۶۳۸۴، اتصال به Verizon Wi-Fi Access با مشکل روبرو است."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای اصالت‌سنجی EAP با کد خطای ۱۶۳۸۵"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : به‌دلیل بروز خطای ۱۶۳۸۵، اتصال به Verizon Wi-Fi Access با مشکل روبرو است."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"‏<xliff:g id="SSID">%1$s</xliff:g> : خطای اصالت‌سنجی EAP با کد خطای نامشخص"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"نقطه اتصال خاموش شد"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"هیچ دستگاهی متصل نیست. برای اصلاح ضربه بزنید."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"‏Wi-Fi قطع شد."</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"برای متصل شدن به <xliff:g id="SSID">%1$s</xliff:g>، یک سیم‌کارت <xliff:g id="CARRIER_NAME">%2$s</xliff:g> در دستگاه قرار دهید"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> می‌خواهد از منبع شبکه‌ای استفاده کند"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"ممکن است باعث بروز مشکلاتی برای <xliff:g id="APPS">%3$s</xliff:g> شود."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"این ممکن است مشکلاتی برای این برنامه‌ها ایجاد کند: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"اجازه دادن"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"اجازه ندادن"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"آیا این شبکه مورد اعتماد است؟"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"بله، متصل شود"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"نهِ متصل نشود"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"اگر اطلاعات زیر درست به نظر می‌رسد، فقط به این شبکه اجازه دهید متصل شود.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"نام سرور:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"نام صادرکننده:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"سازمان:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"تماس:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"امضا:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"شبکه باید تأیید شود"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"قبل‌از متصل شدن، جزئیات شبکه را برای <xliff:g id="SSID">%1$s</xliff:g> مرور کنید. برای ادامه، ضربه بزنید."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"گواهینامه نصب نشد."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"تأیید این شبکه ممکن نیست"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"درهرصورت متصل شود"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"متصل نشود"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"شبکه <xliff:g id="SSID">%1$s</xliff:g> فاقد گواهینامه است."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"با نحوه افزودن گواهینامه‌ها آشنا شوید"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"تأیید این شبکه ممکن نیست"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"شبکه <xliff:g id="SSID">%1$s</xliff:g> فاقد گواهینامه است. برای آشنایی با نحوه افزودن گواهینامه، ضربه بزنید."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"درهرصورت متصل شود"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"متصل نشود"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"‏به <xliff:g id="APP_NAME">%1$s</xliff:g> اجازه می‌دهید Wi‑Fi را روشن کند؟"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"‏می‌توانید Wi‑Fi را در «تنظیمات فوری» خاموش کنید"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"اجازه دادن"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"اجازه ندادن"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-fi/strings.xml b/service/ServiceWifiResources/res/values-fi/strings.xml
index a10f79b..ad6d6a0 100644
--- a/service/ServiceWifiResources/res/values-fi/strings.xml
+++ b/service/ServiceWifiResources/res/values-fi/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Asetus päivitetty. Yritä muodostaa yhteys uudelleen."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Yksityisyysasetusta ei voi muuttaa"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Verkkoa ei löydy"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizonin Wi-Fi‑yhteyttä ei voi muodostaa Verizonin kattavuusalueen ulkopuolelta. (Virhe = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Et ole tilannut Verizonin Wi-Fi‑yhteyttä. Soita meille: 800-922-0204. (Virhe = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi ‑tilisi kanssa on ongelma. Soita meille: 800-922-0204. (Virhe = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Olet jo yhteydessä Verizonin Wi-Fiin. (Virhe = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ongelma yhdistettäessä Verizonin Wi-Fiin. Soita meille: 800-922-0204. (Virhe = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi ‑tilisi kanssa on ongelma. Soita meille: 800-922-0204. (Virhe = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi ei ole saatavilla sijainnissasi. Yritä uudelleen tai toisesta sijainnista. (Virhe = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ongelma yhdistettäessä Verizonin Wi-Fiin. Yritä uudelleen tai toisesta sijainnista."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fiin yhdistämisessä on ongelma virheen 16384 takia."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fiin yhdistämisessä on ongelma virheen 16385 takia."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-todennusvirhe, tuntematon virhekoodi"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ongelma yhdistettäessä Verizonin Wi-Fiin."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot pois päältä"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Ei liitettyjä laitteita. Muokkaa napauttamalla."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Ei Wi-Fi-yhteyttä"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Aseta SIM-kortti (<xliff:g id="CARRIER_NAME">%2$s</xliff:g>), jotta <xliff:g id="SSID">%1$s</xliff:g> voidaan yhdistää"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> pyytää lupaa käyttää verkkoresurssia"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"<xliff:g id="APPS">%3$s</xliff:g> ei välttämättä toimi ongelmitta."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Tämä voi aiheuttaa ongelmia näissä sovelluksissa: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Salli"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Älä salli"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Onko verkko luotettu?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Kyllä, yhdistä"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ei, älä yhdistä"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Salli yhteys tähän verkkoon vain, jos alla olevat tiedot näyttävät olevan oikein.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Palvelimen nimi:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Myöntäjän nimi:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisaatio:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakti:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Allekirjoitus:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Verkko täytyy todentaa"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Tarkista verkon (<xliff:g id="SSID">%1$s</xliff:g>) tiedot ennen yhteyden muodostamista. Jatka napauttamalla."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Varmenteen asennus epäonnistui."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Verkkoa ei voi todentaa"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Yhdistä silti"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Älä yhdistä"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Verkolta (<xliff:g id="SSID">%1$s</xliff:g>) puuttuu varmenne."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Katso, miten voit lisätä varmenteita"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Verkkoa ei voi todentaa"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Verkolta (<xliff:g id="SSID">%1$s</xliff:g>) puuttuu varmenne. Napauta, jos haluat oppia lisäämään varmenteita."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Yhdistä silti"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Älä yhdistä"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Sallitaanko <xliff:g id="APP_NAME">%1$s</xliff:g>-sovelluksen laittaa Wi-Fi-yhteys päälle?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Voit laittaa Wi-Fi-yhteyden pois päältä pika-asetuksista"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Salli"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Älä salli"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-fr-rCA/strings.xml b/service/ServiceWifiResources/res/values-fr-rCA/strings.xml
index 8d01727..9e6c5f7 100644
--- a/service/ServiceWifiResources/res/values-fr-rCA/strings.xml
+++ b/service/ServiceWifiResources/res/values-fr-rCA/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Paramètre mis à jour. Réessayez de vous connecter."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Impossible de modifier les paramètres de confidentialité"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Réseau introuvable"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification PAE 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : vous ne pouvez pas vous connecter à Verizon Wi-Fi Access en dehors de la zone de couverture de Verizon. (erreur = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : vous n\'êtes pas abonné à Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : vous êtes déjà connecté à Verizon Wi-Fi Access. (erreur =  32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access n\'est pas proposé dans votre région. Réessayez plus tard ou essayez à partir d\'une région différente. (erreur = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification PAE 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access. Réessayez plus tard ou essayez à partir d\'une région différente."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification PAE 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access en raison de l\'erreur 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification PAE 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access en raison de l\'erreur 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification PAE, code d\'erreur inconnu"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Point d\'accès sans fil désactivé"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Aucun appareil n\'est connecté. Touchez pour effectuer une modification."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi déconnecté"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Pour vous connecter à <xliff:g id="SSID">%1$s</xliff:g>, insérez une carte SIM de <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> souhaite utiliser une ressource de réseautage"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Cela peut causer des problèmes pour <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Cela peut entraîner des problèmes pour ces applications : <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Autoriser"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Ne pas autoriser"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"S\'agit-il d\'un réseau de confiance?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Oui, se connecter"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Non, ne pas se connecter"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"N\'autorisez ce réseau à se connecter que si les informations ci-dessous sont correctes.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nom du serveur :\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nom de l\'émetteur :\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisation :\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contact :\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signature :\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Le réseau doit être vérifié"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Vérifiez les détails du réseau <xliff:g id="SSID">%1$s</xliff:g> avant de vous connecter. Touchez pour continuer."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Échec de l\'installation du certificat."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Impossible de vérifier ce réseau"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Se connecter quand même"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ne pas se connecter"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Le réseau <xliff:g id="SSID">%1$s</xliff:g> n\'a pas de certificat."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Apprendre à ajouter des certificats"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Impossible de vérifier ce réseau"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Le réseau <xliff:g id="SSID">%1$s</xliff:g> n\'a pas de certificat. Touchez pour apprendre à ajouter des certificats."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Se connecter quand même"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ne pas se connecter"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Autoriser <xliff:g id="APP_NAME">%1$s</xliff:g> à activer le Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Vous pouvez désactiver le Wi-Fi dans les Paramètres rapides"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Autoriser"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Ne pas autoriser"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-fr/strings.xml b/service/ServiceWifiResources/res/values-fr/strings.xml
index 6dede35..55c58b5 100644
--- a/service/ServiceWifiResources/res/values-fr/strings.xml
+++ b/service/ServiceWifiResources/res/values-fr/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Paramètre mis à jour. Essayez de vous reconnecter."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Impossible de modifier le paramètre de confidentialité"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Réseau introuvable"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : impossible de vous connecter à Verizon Wi-Fi Access si vous n\'êtes pas dans une zone couverte par Verizon. (Erreur 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : vous n\'avez pas d\'abonnement à Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : vous êtes déjà connecté à Verizon Wi-Fi Access. (Erreur 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access n\'est pas disponible dans votre région. Réessayez plus tard ou depuis un autre lieu. (Erreur 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access. Réessayez plus tard ou depuis un autre lieu."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access en raison de l\'erreur 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access en raison de l\'erreur 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : erreur d\'authentification EAP, code inconnu"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Point d\'accès désactivé"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Aucun appareil connecté. Appuyez pour modifier."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi déconnecté"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Pour vous connecter au réseau <xliff:g id="SSID">%1$s</xliff:g>, insérez une carte SIM <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> souhaite utiliser une ressource de mise en réseau"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Cela peut causer des problèmes pour <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Cela peut causer des problèmes pour ces applis : <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Autoriser"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Interdire"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"S\'agit-il d\'un réseau de confiance ?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Oui, connecter"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Non, ne pas connecter"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"N\'autorisez la connexion à ce réseau que si les informations ci-dessous semblent correctes.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nom du serveur :\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nom de l\'émetteur :\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisation :\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contact :\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signature :\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Le réseau doit être validé"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Consultez les détails du réseau <xliff:g id="SSID">%1$s</xliff:g> avant de le connecter. Appuyez pour continuer."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Échec de l\'installation du certificat."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Impossible de valider ce réseau"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Connecter quand même"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ne pas connecter"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Il manque un certificat pour le réseau <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Découvrir comment ajouter des certificats"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Impossible de valider ce réseau"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Il manque un certificat pour le réseau <xliff:g id="SSID">%1$s</xliff:g>. Appuyez pour découvrir comment ajouter des certificats."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Connecter quand même"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ne pas connecter"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Autoriser <xliff:g id="APP_NAME">%1$s</xliff:g> à activer le Wi‑Fi ?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Vous pouvez désactiver le Wi‑Fi dans \"Réglages rapides\""</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Autoriser"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Ne pas autoriser"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-gl/strings.xml b/service/ServiceWifiResources/res/values-gl/strings.xml
index 9a1f8d6..0cfe40e 100644
--- a/service/ServiceWifiResources/res/values-gl/strings.xml
+++ b/service/ServiceWifiResources/res/values-gl/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Actualizouse a opción de configuración. Proba a conectarte de novo."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Non se puido cambiar a configuración de privacidade"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Non se atopou ningunha rede"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (32756) de autenticación de EAP"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (32760) de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: non podes conectar con Verizon Wi-Fi Access desde fóra da área de cobertura de Verizon. (Erro = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (32761) de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: non tes subscrición a Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (32762) de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa túa conta de Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (32763) de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: xa estableciches conexión con Verizon Wi-Fi Access. (Erro = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (32764) de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (32765) de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa túa conta de Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (32766) de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access non está dispoñible desde a túa localización. Téntao de novo máis tarde ou proba desde unha localización diferente. (Erro = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (32767) de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access. Téntao de novo máis tarde ou proba desde unha localización diferente."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (16384) de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa conexión a Verizon Wi-Fi Access debido ao erro 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro (16385) de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa conexión a Verizon Wi-Fi Access debido ao erro 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: produciuse un erro descoñecido de autenticación de EAP"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"A zona wifi esta desactivada"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Non hai ningún dispositivo conectado. Toca para modificalo."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Desconectouse a wifi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Para conectarte a <xliff:g id="SSID">%1$s</xliff:g>, introduce unha tarxeta SIM de <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> require o uso dun recurso de rede"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Pode provocar problemas para <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Pode causarlles problemas a estas aplicacións: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Permitir"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Non permitir"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Esta rede é de confianza?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Si, conectar"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Non, non conectar"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Permite que esta rede se conecte unicamente se a seguinte información parece correcta.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nome do servidor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nome do emisor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organización:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contacto:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Sinatura:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Debe verificarse a rede"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Antes de establecer conexión, revisa os datos da rede <xliff:g id="SSID">%1$s</xliff:g>. Toca a pantalla para continuar."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Produciuse un erro ao instalar o certificado."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Non se puido verificar esta rede"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Conectar igualmente"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Non conectar"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Á rede <xliff:g id="SSID">%1$s</xliff:g> fáltalle un certificado."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Información sobre como engadir certificados"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Non se puido verificar esta rede"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Á rede <xliff:g id="SSID">%1$s</xliff:g> fáltalle un certificado. Toca a pantalla para obter información sobre como engadir certificados."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Conectar igualmente"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Non conectar"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Queres permitir que <xliff:g id="APP_NAME">%1$s</xliff:g> active a wifi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Podes desactivar a wifi en Configuración rápida"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Permitir"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Non permitir"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-gu/strings.xml b/service/ServiceWifiResources/res/values-gu/strings.xml
index 790bcc2..b50e8a0 100644
--- a/service/ServiceWifiResources/res/values-gu/strings.xml
+++ b/service/ServiceWifiResources/res/values-gu/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"સેટિંગ અપડેટ કર્યું. ફરીથી કનેક્ટ કરવાનો પ્રયાસ કરો."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"પ્રાઇવસી સેટિંગ બદલી શકાતું નથી"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"નેટવર્ક મળ્યું નથી"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : તમે Verizon કવરેજ વિસ્તારની બહારથી Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરી શકશો નહીં. (ભૂલ = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : તમે Verizon વાઇ-ફાઇ ઍક્સેસને સબ્સ્ક્રાઇબ કરેલું નથી. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : તમારા Verizon વાઇ-ફાઇ ઍક્સેસ એકાઉન્ટમાં કોઈ સમસ્યા છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : તમે પહેલેથી Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરેલું છે. (ભૂલ = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : તમારા Verizon વાઇ-ફાઇ ઍક્સેસ એકાઉન્ટમાં કોઈ સમસ્યા છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : તમારા સ્થાનથી Verizon વાઇ-ફાઇ ઍક્સેસ ઉપલબ્ધ નથી. થોડા સમય પછી અથવા કોઈ અલગ સ્થાનેથી પ્રયાસ કરો. (ભૂલ = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે. થોડા સમય પછી અથવા કોઈ અલગ સ્થાનેથી પ્રયાસ કરો."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ભૂલ 16384ને લીધે તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં ભૂલ આવી."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ભૂલ 16385ને લીધે તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં ભૂલ આવી."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP પ્રમાણીકરણમાં ભૂલ, ભૂલનો અજાણ્યો કોડ"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"હૉટસ્પૉટ બંધ કર્યું"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"કોઈ ડિવાઇસ કનેક્ટ કરેલું નથી. ફેરફાર કરવા માટે ટૅપ કરો."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"વાઇ-ફાઇ ડિસ્કનેક્ટ થયું"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> સાથે કનેક્ટ કરવા માટે, <xliff:g id="CARRIER_NAME">%2$s</xliff:g>નું સિમ કાર્ડ દાખલ કરો"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> નેટવર્કિગ સંસાધનનો ઉપયોગ કરવા માગે છે"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"આ કદાચ <xliff:g id="APPS">%3$s</xliff:g> માટે સમસ્યા ઊભી કરી શકે."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"આનાથી આ ઍપ માટે સમસ્યાઓ ઊભી થઈ શકે છે: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"મંજૂરી આપો"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"મંજૂરી આપશો નહીં"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"શું આ નેટવર્ક વિશ્વસનીય છે?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"હા, કનેક્ટ કરો"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"ના, કનેક્ટ કરશો નહીં"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"જો નીચે આપેલી માહિતી સાચી જણાય, તો જ આ નેટવર્કને કનેક્ટ કરવાની મંજૂરી આપો.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"સર્વરનું નામ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"રજૂકર્તાનું નામ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"સંસ્થા:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"સંપર્ક કરો:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"સહી:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"નેટવર્કની ચકાસણી થવી જરૂરી છે"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"કનેક્ટ કરતા પહેલાં <xliff:g id="SSID">%1$s</xliff:g>ના નેટવર્કની વિગતોનો રિવ્યૂ કરો. આગળ વધવા માટે ટૅપ કરો."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"પ્રમાણપત્ર ઇન્સ્ટૉલ કરવામાં નિષ્ફળ રહ્યાં."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"આ નેટવર્ક ચકાસી શકાતું નથી"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"કોઈપણ રીતે કનેક્ટ કરો"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"કનેક્ટ કરશો નહીં"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> નેટવર્કમાં પ્રમાણપત્ર ખૂટે છે."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"પ્રમાણપત્રો ઉમેરવાની રીત જાણો"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"આ નેટવર્ક ચકાસી શકાતું નથી"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> નેટવર્કમાં પ્રમાણપત્ર ખૂટે છે. પ્રમાણપત્રો ઉમેરવાની રીત જાણવા માટે ટૅપ કરો."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"કોઈપણ રીતે કનેક્ટ કરો"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"કનેક્ટ કરશો નહીં"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"વાઇ-ફાઇ ચાલુ કરવા માટે <xliff:g id="APP_NAME">%1$s</xliff:g>ને મંજૂરી આપીએ?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"તમે ઝડપી સેટિંગમાં જઈને વાઇ-ફાઇ બંધ કરી શકો છો"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"મંજૂરી આપો"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"મંજૂરી આપશો નહીં"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-hi/strings.xml b/service/ServiceWifiResources/res/values-hi/strings.xml
index 6ad225d..b0d5521 100644
--- a/service/ServiceWifiResources/res/values-hi/strings.xml
+++ b/service/ServiceWifiResources/res/values-hi/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"सेटिंग अपडेट की गई. फिर से कनेक्ट करने की कोशिश करें."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"निजता सेटिंग नहीं बदली जा सकती"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"नेटवर्क नहीं मिला"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon के कवरेज एरिया के बाहर, Verizon Wi-Fi Access से कनेक्ट नहीं किया जा सकता. (गड़बड़ी = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : आपने Verizon Wi-Fi Access की सदस्यता नहीं ली है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : आपके Verizon Wi-Fi Access खाते में कोई समस्या है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : आपका डिवाइस पहले से ही Verizon Wi-Fi Access से कनेक्ट है. (गड़बड़ी = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : आपके डिवाइस को Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या आई है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : आपके Verizon Wi-Fi Access खाते में कोई समस्या है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : आपकी जगह पर Verizon Wi-Fi Access उपलब्ध नहीं है. कुछ देर बाद या किसी दूसरी जगह से कोशिश करें. (गड़बड़ी = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : आपके डिवाइस को Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या आई है. कुछ देर बाद या किसी दूसरी जगह से कोशिश करें."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : गड़बड़ी 16384 की वजह से, आपके डिवाइस को Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या आई है."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : गड़बड़ी 16385 की वजह से, आपके डिवाइस को Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या आई है."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP authentication error, अज्ञात गड़बड़ी कोड"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : आपके डिवाइस को Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या आई है."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"हॉटस्पॉट बंद किया गया"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"कोई भी डिवाइस जुड़ा नहीं है. बदलाव करने के लिए टैप करें."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"वाई-फ़ाई डिसकनेक्ट हो गया"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> से कनेक्ट करने के लिए, <xliff:g id="CARRIER_NAME">%2$s</xliff:g> का सिम डालें"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> को नेटवर्किंग से जुड़े संसाधन इस्तेमाल करने की अनुमति चाहिए"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"इससे <xliff:g id="APPS">%3$s</xliff:g> में समस्याएं आ सकती हैं."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"इससे इन ऐप्लिकेशन में समस्याएं आ सकती हैं: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"अनुमति दें"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"अनुमति न दें"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"क्या यह भरोसेमंद नेटवर्क है?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"हां, कनेक्ट करें"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"नहीं, कनेक्ट न करें"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"दी गई जानकारी के सही पाए जाने पर ही, इस नेटवर्क से कनेक्ट करने की अनुमति दें.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"सर्वर का नाम:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"जारी करने वाले का नाम:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"संगठन:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"संपर्क:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"हस्ताक्षर:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"नेटवर्क की पुष्टि करनी होगी"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"कनेक्ट करने से पहले, <xliff:g id="SSID">%1$s</xliff:g> के लिए नेटवर्क से जुड़ी जानकारी देखें. जारी रखने के लिए टैप करें."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"सर्टिफ़िकेट इंस्टॉल नहीं हो सका."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"इस नेटवर्क की पुष्टि नहीं की जा सकी"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"फिर भी कनेक्ट करें"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"कनेक्ट न करें"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> नेटवर्क के पास सर्टिफ़िकेट मौजूद नहीं है."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"सर्टिफ़िकेट जोड़ने का तरीका जानें"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"इस नेटवर्क की पुष्टि नहीं की जा सकी"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> नेटवर्क के पास सर्टिफ़िकेट मौजूद नहीं है. सर्टिफ़िकेट जोड़ने का तरीका जानने के लिए टैप करें."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"फिर भी कनेक्ट करें"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"कनेक्ट न करें"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"क्या <xliff:g id="APP_NAME">%1$s</xliff:g> को वाई-फ़ाई चालू करने की अनुमति देनी है?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"\'फटाफट सेटिंग\' में जाकर, वाई-फ़ाई बंद किया जा सकता है"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"अनुमति दें"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"अनुमति न दें"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-hr/strings.xml b/service/ServiceWifiResources/res/values-hr/strings.xml
index cde9204..53b6a11 100644
--- a/service/ServiceWifiResources/res/values-hr/strings.xml
+++ b/service/ServiceWifiResources/res/values-hr/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Postavka je ažurirana. Pokušajte se ponovo povezati."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Promjena postavke privatnosti nije uspjela"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Mreža nije pronađena"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: ne možete se povezati s Wi-Fi pristupom Verizonu izvan područja pokrivenosti Verizona. (Pogreška = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: niste pretplaćeni na Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: postoji problem s vašim računom za Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: već ste povezani s Wi-Fi pristupom Verizonu. (Pogreška = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: postoji problem s povezivanjem s Wi-Fi pristupom Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: postoji problem s vašim računom za Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Wi-Fi pristup Verizonu nije dostupan s vaše lokacije. Pokušajte ponovno kasnije ili s druge lokacije. (Pogreška = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: postoji problem s povezivanjem s Wi-Fi pristupom Verizonu. Pokušajte ponovno kasnije ili s druge lokacije."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: postoji problem s vašim povezivanjem s Wi-Fi pristupom Verizonu zbog pogreške 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: postoji problem s vašim povezivanjem s Wi-Fi pristupom Verizonu zbog pogreške 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP pogreška autentifikacije, nepoznati kôd pogreške"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: postoji problem s povezivanjem s Wi-Fi pristupom Verizonu."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Žarišna točka je isključena"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nije povezan nijedan uređaj. Dodirnite za prilagodbu."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi je isključen"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Da biste se povezali s mrežom <xliff:g id="SSID">%1$s</xliff:g> umetnite SIM mobilnog operatera <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> želi upotrijebiti resurs umrežavanja"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"To može prouzročiti probleme za aplikaciju <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"To može izazvati probleme sljedećim aplikacijama: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Dopusti"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Nemoj dopustiti"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Je li ova mreža pouzdana?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Da, poveži"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ne, nemoj povezati"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Dopustite toj mreži da se poveže samo ako informacije u nastavku izgledaju ispravno.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Naziv poslužitelja:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Naziv izdavača:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizacija:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakt:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Potpis:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Mrežu je potrebno potvrditi"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Prije povezivanja pregledajte pojedinosti za <xliff:g id="SSID">%1$s</xliff:g>. Dodirnite za nastavak."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Instalacija certifikata nije uspjela."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Ta se mreža ne može potvrditi"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Svejedno poveži"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Nemoj povezati"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Mreži <xliff:g id="SSID">%1$s</xliff:g> nedostaje certifikat."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Saznajte kako dodati certifikate"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Ta se mreža ne može potvrditi"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Mreži <xliff:g id="SSID">%1$s</xliff:g> nedostaje certifikat. Dodirnite da biste saznali kako dodati certifikate."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Svejedno poveži"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Nemoj povezati"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Želite li dopustiti da <xliff:g id="APP_NAME">%1$s</xliff:g> uključi Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Wi‑Fi možete isključiti u brzim postavkama"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Dopusti"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Nemoj dopustiti"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-hu/strings.xml b/service/ServiceWifiResources/res/values-hu/strings.xml
index 35c29c4..bd963b8 100644
--- a/service/ServiceWifiResources/res/values-hu/strings.xml
+++ b/service/ServiceWifiResources/res/values-hu/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Beállítás frissítve. Próbáljon ismét csatlakozni."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Nem lehet módosítani az adatvédelmi beállítást"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"A hálózat nem található"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Nem kapcsolódhat a Verizon Wi-Fi-hozzáférési szolgáltatásához a Verizon lefedettségi területén kívülről. (Hiba = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Nem fizetett elő a Verizon Wi-Fi-hozzáférési szolgáltatására. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Valami gond van az Ön Verizon Wi-Fi-hozzáférési fiókjával. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Már kapcsolódott a Verizon Wi-Fi-hozzáférési szolgáltatásához. (Hiba = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Valami gond van az Ön Verizon Wi-Fi-hozzáférési fiókjával. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : A Verizon Wi-Fi-hozzáférési szolgáltatása nem áll rendelkezésre az Ön tartózkodási helyén. Próbálja újra, vagy próbáljon meg máshol csatlakozni. (Hiba = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során. Próbálja újra, vagy próbáljon meg máshol csatlakozni."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során az 16384-es kódú hiba miatt."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során az 16385-ös kódú hiba miatt."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP hitelesítési hiba, ismeretlen hibakód"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot kikapcsolva"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nincsenek csatlakoztatott eszközök. Koppintson a módosításhoz."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Nincs Wi-Fi-kapcsolat"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"A(z) <xliff:g id="SSID">%1$s</xliff:g> csatlakoztatásához helyezzen be <xliff:g id="CARRIER_NAME">%2$s</xliff:g> szolgáltatóhoz tartozó SIM-kártyát"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"A következő alkalmazás hálózatkezelési forrást kíván használni: <xliff:g id="APP">%1$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Ez problémákat okozhat a következő alkalmazásoknál: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Ez problémákat okozhat a következő alkalmazásoknál: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Engedélyezés"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Tiltás"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Ez megbízható hálózat?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Igen, csatlakozzon"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nem, ne csatlakozzon"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Csak akkor engedélyezze a hálózathoz való csatlakozást, ha az alábbi információk helyesnek tűnnek.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Szerver neve:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Kibocsátó neve:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Szervezet:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kapcsolat:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Aláírás:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"A hálózatot igazolni kell"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Tekintse át a hálózat (<xliff:g id="SSID">%1$s</xliff:g>) adatait a csatlakozás előtt. Koppintson a folytatáshoz."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"A tanúsítvány telepítése sikertelen."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Ez a hálózat nem igazolható"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Csatlakozás mindenképp"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ne csatlakozzon"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"A hálózati <xliff:g id="SSID">%1$s</xliff:g> egyik tanúsítványa hiányzik."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"További információ a tanúsítványok hozzáadásáról"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Ez a hálózat nem igazolható"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"A hálózati <xliff:g id="SSID">%1$s</xliff:g> egyik tanúsítványa hiányzik. Koppintással további információkhoz juthat a tanúsítványok hozzáadásáról."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Csatlakozás mindenképp"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ne csatlakozzon"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Engedélyezi a(z) <xliff:g id="APP_NAME">%1$s</xliff:g> számára a Wi‑Fi bekapcsolását?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"A Wi‑Fi-t a Gyorsbeállításokban kapcsolhatja ki"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Engedélyezés"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Tiltás"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-hy/strings.xml b/service/ServiceWifiResources/res/values-hy/strings.xml
index 6a380d5..0ce91be 100644
--- a/service/ServiceWifiResources/res/values-hy/strings.xml
+++ b/service/ServiceWifiResources/res/values-hy/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Կարգավորումը թարմացվեց։ Փորձեք նորից միանալ։"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Չհաջողվեց փոփոխել գաղտնիության կարգավորումները"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Ցանցը չի գտնվել"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>՝ EAP-ի նույնականացման սխալ 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP նույնականացման սխալ 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Դուք չեք կարող միանալ Verizon Wi-Fi Access-ին, երբ Verizon-ի ծածկույթից դուրս եք։ Սխալի կոդը՝ 32760։"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP նույնականացման սխալ 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Դուք բաժանորդագրված չեք Verizon Wi-Fi Access-ին։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32761։"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP նույնականացման սխալ 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Ձեր Verizon Wi-Fi Access հաշվի հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32762։"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP նույնականացման սխալ 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Դուք արդեն միացած եք Verizon Wi-Fi Access-ին։ Սխալի կոդը՝ 32763։"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP նույնականացման սխալ 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32764։"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP նույնականացման սխալ 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Ձեր Verizon Wi-Fi Access հաշվի հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32765։"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP նույնականացման սխալ 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ը հասանելի չէ ձեր գտնվելու վայրից։ Փորձեք ավելի ուշ կամ մեկ այլ վայրից։ Սխալի կոդը՝ 32766։"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> – EAP նույնականացման սխալ 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։ Փորձեք ավելի ուշ կամ մեկ այլ վայրից։"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> – EAP նույնականացման սխալ 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Չհաջողվեց միանալ Verizon Wi-Fi Access-ին առաջացած 16384 սխալի պատճառով։"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> – EAP նույնականացման սխալ 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Չհաջողվեց միանալ Verizon Wi-Fi Access-ին առաջացած 16385 սխալի պատճառով։"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> – EAP նույնականացման սխալ, սխալի կոդն անհայտ է"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Թեժ կետն անջատված է"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Կապված սարքեր չկան։ Հպեք՝ փոփոխելու համար։"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi-ն անջատված է"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> ցանցին միանալու համար տեղադրեք <xliff:g id="CARRIER_NAME">%2$s</xliff:g> օպերատորի SIM քարտը"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> հավելվածին անհրաժեշտ է ցանցային ռեսուրս օգտագործել"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Սա կարող է խնդիրներ առաջացնել այստեղ՝ <xliff:g id="APPS">%3$s</xliff:g>։"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Սա կարող է խնդիրներ առաջացնել այս հավելվածների համար՝ <xliff:g id="APPS">%3$s</xliff:g>։"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Թույլատրել"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Չեղարկել"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Այս ցանցը վստահելի՞ է"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Այո, միանալ"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ոչ, չմիանալ"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Թույլատրեք այս ցանցին միացումը, միայն եթե ստորև բերված տեղեկությունները ճիշտ են։\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Սերվերի անվանումը՝\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Թողարկողի անվանումը՝\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Կազմակերպություն՝\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Կոնտակտային անձ՝\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Ստորագրություն՝\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Անհրաժեշտ է ստուգել ցանցը"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Միանալուց առաջ ցանցի տվյալներում ստուգեք դրա անվանումը (<xliff:g id="SSID">%1$s</xliff:g>)։ Հպեք՝ շարունակելու համար։"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Չհաջողվեց տեղադրել հավաստագիրը։"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Չհաջողվեց հաստատել այս ցանցը"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Միանալ"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Չմիանալ"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Ցանցը (<xliff:g id="SSID">%1$s</xliff:g>) չունի հավաստագիր։"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Իմանալ, թե ինչպես հավաստագրեր ավելացնել"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Չհաջողվեց հաստատել այս ցանցը"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Ցանցը (<xliff:g id="SSID">%1$s</xliff:g>) չունի հավաստագիր։ Հպեք՝ իմանալու, թե ինչպես կարելի է հավաստագրեր ավելացնել։"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Միանալ"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Չմիանալ"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Թույլատրե՞լ <xliff:g id="APP_NAME">%1$s</xliff:g> հավելվածին միացնել Wi‑Fi-ը"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Wi‑Fi-ը կարող եք անջատել Արագ կարգավորումներում"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Թույլատրել"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Չթույլատրել"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-in/strings.xml b/service/ServiceWifiResources/res/values-in/strings.xml
index d14baff..08d689c 100644
--- a/service/ServiceWifiResources/res/values-in/strings.xml
+++ b/service/ServiceWifiResources/res/values-in/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Setelan diperbarui. Coba hubungkan lagi."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Tidak dapat mengubah setelan privasi"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Jaringan tidak ditemukan"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Anda tidak dapat terhubung ke Verizon Wi-Fi Access dari luar area cakupan Verizon. (Error = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Anda tidak berlangganan Verizon Wi-Fi Access. Harap hubungi kami di 800-922-0204. (Error = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Ada masalah dengan akun Verizon Wi-Fi Access Anda. Harap hubungi kami di 800-922-0204. (Error = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Anda sudah terhubung ke Verizon Wi-Fi Access. (Error = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Verizon Wi-Fi Access. Harap hubungi kami di 800-922-0204. (Error = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Ada masalah dengan akun Verizon Wi-Fi Access Anda. Harap hubungi kami di 800-922-0204. (Error = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access tidak tersedia di lokasi Anda. Coba lagi nanti atau coba dari lokasi lain. (Error = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Verizon Wi-Fi Access. Coba lagi nanti atau coba dari lokasi lain."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Verizon Wi-Fi Access karena error 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Verizon Wi-Fi Access karena error 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Error autentikasi EAP, kode error tidak diketahui"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot dinonaktifkan"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Tidak ada perangkat yang terhubung. Ketuk untuk mengubah."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi tidak terhubung"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Untuk terhubung ke <xliff:g id="SSID">%1$s</xliff:g>, masukkan SIM <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> ingin menggunakan resource jaringan"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Ini dapat menyebabkan masalah untuk <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Hal ini dapat menyebabkan masalah pada aplikasi berikut: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Izinkan"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Jangan izinkan"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Apakah jaringan ini tepercaya?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ya, hubungkan"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Tidak, jangan hubungkan"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Hanya izinkan jaringan ini terhubung jika informasi di bawah terlihat benar.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nama Server:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nama Penerbit:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisasi:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontak:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Tanda Tangan:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Jaringan perlu diverifikasi"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Tinjau detail jaringan untuk <xliff:g id="SSID">%1$s</xliff:g> sebelum terhubung. Ketuk untuk melanjutkan."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Penginstalan sertifikat gagal."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Tidak dapat memverifikasi jaringan ini"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Tetap hubungkan"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Jangan hubungkan"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Jaringan <xliff:g id="SSID">%1$s</xliff:g> kehilangan sertifikat."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Pelajari cara menambahkan sertifikat"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Tidak dapat memverifikasi jaringan ini"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Jaringan <xliff:g id="SSID">%1$s</xliff:g> kehilangan sertifikat. Ketuk untuk mempelajari cara menambahkan sertifikat."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Tetap hubungkan"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Jangan hubungkan"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Izinkan <xliff:g id="APP_NAME">%1$s</xliff:g> mengaktifkan Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Anda dapat menonaktifkan Wi‑Fi di Setelan Cepat"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Izinkan"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Jangan izinkan"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-is/strings.xml b/service/ServiceWifiResources/res/values-is/strings.xml
index 9909f3f..ecbdd65 100644
--- a/service/ServiceWifiResources/res/values-is/strings.xml
+++ b/service/ServiceWifiResources/res/values-is/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Stilling uppfærð. Reyndu aftur að tengja."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Ekki er hægt að breyta persónuverndarstillingu"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Netið fannst ekki"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Ekki er hægt að tengjast WiFi-aðgangi Verizon utan þjónustusvæðis Verizon. (Villa = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Þú ert ekki áskrifandi að WiFi-aðgangi Verizon. Hringdu í okkur í síma 800-922-0204. (Villa = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp í tengslum við Verizon WiFi-aðgangsreikninginn þinn. Hringdu í okkur í síma 800-922-0204. (Villa = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Þú ert nú þegar tengd(ur) við WiFi-aðgang Verizon. (Villa = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon. Hringdu í okkur í síma 800-922-0204. (Villa = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp í tengslum við Verizon WiFi-aðgangsreikninginn þinn. Hringdu í okkur í síma 800-922-0204. (Villa = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : WiFi-aðgangur Verizon er ekki í boði þar sem þú ert. Reyndu aftur síðar eða á öðrum stað. (Villa = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon. Reyndu aftur síðar eða á öðrum stað."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon vegna villu 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon vegna villu 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-auðkenningarvilla, óþekktur villukóði"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Slökkt á heitum reit"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Engin tæki eru tengd. Ýttu til að breyta."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi ótengt"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Til að tengjast <xliff:g id="SSID">%1$s</xliff:g> skaltu setja inn SIM-kort frá <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> vill nota netkerfisgögn"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Þetta gæti valdið vandamálum í <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Þetta getur valdið vandamálum fyrir þessi forrit: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Leyfa"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Ekki leyfa"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Er þetta traust net?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Já, tengja"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nei, ekki tengja"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Aðeins leyfa þessu neti að tengjast ef neðangreindar upplýsingar virðast réttar.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Heiti þjóns:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Heiti útgefanda:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Fyrirtæki/stofnun:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Hafa samband við:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Undirskrift:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Nauðsynlegt er að staðfesta netið"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Farðu yfir netupplýsingar fyrir <xliff:g id="SSID">%1$s</xliff:g> áður en þú tengir. Ýttu til að halda áfram."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Uppsetning vottorðs mistókst."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Ekki er hægt að staðfesta þetta net"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Tengjast samt"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ekki tengjast"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Netið <xliff:g id="SSID">%1$s</xliff:g> vantar vottorð."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Kynntu þér hvernig vottorðum er bætt við"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Ekki er hægt að staðfesta þetta net"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Netið <xliff:g id="SSID">%1$s</xliff:g> vantar vottorð. Ýttu til að kynna þér hvernig vottorðum er bætt við."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Tengjast samt"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ekki tengjast"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Leyfa <xliff:g id="APP_NAME">%1$s</xliff:g> að kveikja á WiFi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Þú getur slökkt á WiFi í flýtistillingum"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Leyfa"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Ekki leyfa"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-it/strings.xml b/service/ServiceWifiResources/res/values-it/strings.xml
index 107cc50..14056fa 100644
--- a/service/ServiceWifiResources/res/values-it/strings.xml
+++ b/service/ServiceWifiResources/res/values-it/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Impostazione aggiornata. Prova a ricollegarti."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Impossibile cambiare l\'impostazione sulla privacy"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Rete non trovata"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: non puoi connetterti a Verizon Wi-Fi Access se sei fuori dall\'area di copertura Verizon. (Errore 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: non hai un abbonamento a Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema con il tuo account Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: connessione a Verizon Wi-Fi Access già stabilita. (Errore 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema con il tuo account Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access non è disponibile dalla tua posizione. Riprova più tardi o prova da un\'altra posizione. (Errore 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access. Riprova più tardi o prova da un\'altra posizione."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access a causa di un errore 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access a causa di un errore 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: errore di autenticazione EAP, codice di errore sconosciuto"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot disattivato"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nessun dispositivo connesso. Tocca per modificare."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Rete Wi-Fi scollegata"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Per connetterti alla rete <xliff:g id="SSID">%1$s</xliff:g>, inserisci una SIM <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> vuole utilizzare una risorsa di rete"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"L\'operazione potrebbe causare problemi a <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Le seguenti app potrebbero avere problemi: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Consenti"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Non consentire"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Questa rete è attendibile?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Sì, connetti"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"No, non connettere"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Consenti a questa rete di connettersi solo se le informazioni di seguito ti sembrano corrette.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nome server:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nome emittente:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizzazione:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contatto:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Firma:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"La rete deve essere verificata"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Controlla i dettagli della rete per <xliff:g id="SSID">%1$s</xliff:g> prima di connetterti. Tocca per continuare."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Installazione del certificato non riuscita."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Impossibile verificare questa rete"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Connetti comunque"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Non connettere"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Alla rete <xliff:g id="SSID">%1$s</xliff:g> manca un certificato."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Scopri come aggiungere certificati"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Impossibile verificare questa rete"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Alla rete <xliff:g id="SSID">%1$s</xliff:g> manca un certificato. Tocca per scoprire come aggiungere certificati."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Connetti comunque"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Non connettere"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Vuoi consentire all\'app <xliff:g id="APP_NAME">%1$s</xliff:g> di attivare il Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Puoi disattivare il Wi‑Fi nelle Impostazioni rapide"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Consenti"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Non consentire"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-iw/strings.xml b/service/ServiceWifiResources/res/values-iw/strings.xml
index 28763b9..895c5be 100644
--- a/service/ServiceWifiResources/res/values-iw/strings.xml
+++ b/service/ServiceWifiResources/res/values-iw/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"ההגדרה עודכנה. אפשר לנסות שוב להתחבר."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"לא ניתן לשנות את הגדרות הפרטיות"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"הרשת לא נמצאה"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"‏<xliff:g id="SSID">%1$s</xliff:g>: שגיאה 32756 באימות EAP"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"‏<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32760 באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : לא ניתן להתחבר לגישת Wi-Fi של Verizon מחוץ לאזור הכיסוי של Verizon. (שגיאה = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"‏<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32761 באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : לא נרשמת לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"‏<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32762 באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : יש בעיה עם החשבון שלך לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"‏<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32763 באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : כבר יש לך חיבור לגישת Wi-Fi של Verizon. (שגיאה = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"‏<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32764 באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"‏<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32765 באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : יש בעיה עם החשבון שלך לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"‏<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32766 באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : גישת Wi-Fi של Verizon לא זמינה מהמיקום שלך. אפשר לנסות שוב מאוחר יותר או לנסות ממיקום אחר. (שגיאה = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"‏<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 32767 באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon. אפשר לנסות שוב מאוחר יותר או לנסות ממיקום אחר."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"‏<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 16384 באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : הייתה בעיה בהתחברות אל גישת ה-Wi-Fi של Verizon בגלל שגיאה 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"‏<xliff:g id="SSID">%1$s</xliff:g> : שגיאה 16385 באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : הייתה בעיה בהתחברות אל גישת ה-Wi-Fi של Verizon בגלל שגיאה 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"‏<xliff:g id="SSID">%1$s</xliff:g> : קוד שגיאה לא ידוע באימות EAP"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"‏נקודת האינטרנט (hotspot) נכבתה"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"אין מכשירים מחוברים. יש להקיש כדי לשנות."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"‏Wi-Fi מנותק"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"‏יש להכניס SIM של <xliff:g id="CARRIER_NAME">%2$s</xliff:g> כדי להתחבר אל <xliff:g id="SSID">%1$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"האפליקציה <xliff:g id="APP">%1$s</xliff:g> מבקשת להשתמש במשאב רשת"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"הפעולה עלולה לגרום לבעיות ב‑<xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"כתוצאה מכך, ייתכנו בעיות באפליקציות הבאות: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"אישור"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"אין אישור"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"האם הרשת הזו מהימנה?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"כן, אני רוצה להתחבר"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"לא, אני לא רוצה להתחבר"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"יש לאשר את ההתחברות לרשת הזו רק אם המידע שבהמשך נראה נכון.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"שם השרת:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"שם המנפיק:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"ארגון:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"איש קשר:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"חתימה:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"צריך לאמת את הרשת"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"צריך לעיין בפרטי הרשת <xliff:g id="SSID">%1$s</xliff:g> לפני שמתחברים אליה. מקישים כדי להמשיך."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"הניסיון להתקנת האישור נכשל."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"לא ניתן לאמת את הרשת הזו"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"יש להתחבר בכל זאת"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"אין להתחבר"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"חסר אישור לרשת <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"הוראות להוספת אישורים"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"לא ניתן לאמת את הרשת הזו"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"חסר אישור לרשת <xliff:g id="SSID">%1$s</xliff:g>. יש להקיש כדי ללמוד איך להוסיף אישורים."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"יש להתחבר בכל זאת"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"אין להתחבר"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"‏לאפשר לאפליקציה <xliff:g id="APP_NAME">%1$s</xliff:g> להפעיל את ה-Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"‏אפשר לכבות את ה-Wi-Fi בהגדרות המהירות"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"אישור"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"אין אישור"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ja/strings.xml b/service/ServiceWifiResources/res/values-ja/strings.xml
index 28a6ccc..b10ab30 100644
--- a/service/ServiceWifiResources/res/values-ja/strings.xml
+++ b/service/ServiceWifiResources/res/values-ja/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"設定を更新しました。もう一度接続してみてください。"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"プライバシー設定を変更できません"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"ネットワークが見つかりません"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 認証エラー 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: EAP 認証エラー 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon のサービスエリア外から Verizon Wi-Fi Access に接続することはできません(エラー = 32760)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: EAP 認証エラー 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access に登録されていません。800-922-0204 までお電話でお問い合わせください(エラー = 32761)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: EAP 認証エラー 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : お使いの Verizon Wi-Fi Access アカウントに問題があります。800-922-0204 までお電話でお問い合わせください(エラー = 32762)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: EAP 認証エラー 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access にすでに接続しています(エラー = 32763)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: EAP 認証エラー 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access への接続中に問題が発生しました。800-922-0204 までお電話でお問い合わせください(エラー = 32764)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: EAP 認証エラー 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : お使いの Verizon Wi-Fi Access アカウントに問題があります。800-922-0204 までお電話でお問い合わせください(エラー = 32765)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: EAP 認証エラー 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 現在地では Verizon Wi-Fi Access はご利用いただけません。しばらくしてからもう一度お試しいただくか、場所を変えてお試しください(エラー = 32766)。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 認証エラー 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access への接続中に問題が発生しました。しばらくしてからもう一度お試しいただくか、場所を変えてお試しください。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 認証エラー 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : エラー 16384 のため、Verizon Wi-Fi Access への接続中に問題が発生しました。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 認証エラー 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : エラー 16385 のため、Verizon Wi-Fi Access への接続中に問題が発生しました。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 認証エラー、エラーコード不明"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access への接続中に問題が発生しました。"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"アクセス ポイントが OFF になりました"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"デバイスは接続されていません。タップすると変更できます。"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi が切断されました"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> に接続するには、<xliff:g id="CARRIER_NAME">%2$s</xliff:g> の SIM を挿入します"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> がネットワーク リソースの使用を求めています"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"このために <xliff:g id="APPS">%3$s</xliff:g> で問題が発生することがあります。"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"次のアプリに問題が発生する可能性があります。<xliff:g id="APPS">%3$s</xliff:g>。"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"許可"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"許可しない"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"このネットワークは信頼できますか?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"はい、接続します"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"いいえ、接続しません"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"以下の情報が正しい場合にのみ、このネットワークの接続を許可します。\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"サーバー名:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"発行者の名前:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"組織:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"連絡先:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"署名:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"ネットワークの確認が必要です"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"接続する前に <xliff:g id="SSID">%1$s</xliff:g> のネットワークの詳細を確認してください。タップして続行します。"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"証明書をインストールできませんでした。"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"このネットワークを確認できません"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"接続する"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"接続しない"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"ネットワーク <xliff:g id="SSID">%1$s</xliff:g> に証明書がありません。"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"証明書を追加する方法"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"このネットワークを確認できません"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"ネットワーク <xliff:g id="SSID">%1$s</xliff:g> に証明書がありません。タップして、証明書を追加する方法を参照してください。"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"接続する"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"接続しない"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Wi‑Fi を ON にすることを <xliff:g id="APP_NAME">%1$s</xliff:g> に許可しますか?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"クイック設定で Wi‑Fi を OFF にできます"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"許可"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"許可しない"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ka/strings.xml b/service/ServiceWifiResources/res/values-ka/strings.xml
index d7d230c..1de03b0 100644
--- a/service/ServiceWifiResources/res/values-ka/strings.xml
+++ b/service/ServiceWifiResources/res/values-ka/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"პარამეტრი განახლდა. ცადეთ ხელახლა დაკავშირება."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"კონფიდენციალურობის პარამეტრის შეცვლა ვერ ხერხდება"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"ქსელი ვერ მოიძებნა"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავტორიზაციის შეცდომა 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავთენტიკაციის შეცდომა 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : თქვენს Verizon Wi-Fi Access-ს ვერ დაუკავშირდებით Verizon-ის დაფარვის ზონის გარედან. (შეცდომა = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავთენტიკაციის შეცდომა 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access გამოწერილი არ გაქვთ. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204. (შეცდომა = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავთენტიკაციის შეცდომა 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204. (შეცდომა = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავთენტიკაციის შეცდომა 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : თქვენ უკვე დაკავშირებული ხართ Verizon Wi-Fi Access-თან. (შეცდომა = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავთენტიკაციის შეცდომა 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204. (შეცდომა = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავთენტიკაციის შეცდომა 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204. (შეცდომა = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავთენტიკაციის შეცდომა 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access თქვენი მდებარეობიდან მიუწვდომელია. ცადეთ მოგვიანებით ან ცადეთ სხვა მდებარეობიდან. (შეცდომა = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავტორიზაციის შეცდომა 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა. ცადეთ მოგვიანებით ან ცადეთ სხვა მდებარეობიდან."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავტორიზაციის შეცდომა 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირება შეუძლებელია შეცდომა 16384-ის გამო."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავტორიზაციის შეცდომა 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირება შეუძლებელია შეცდომა 16385-ის გამო."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ავტორიზაციის შეცდომა, უცნობი შეცდომის კოდი"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"უსადენო ქსელი გამორთულია"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"დაკავშირებული მოწყობილობები არ არის. შეეხეთ შესაცვლელად."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi ქსელთან კავშირი გაწყდა."</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g>-თან დასაკავშირებლად მოათავსეთ <xliff:g id="CARRIER_NAME">%2$s</xliff:g>-ის SIM-ბარათი"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g>-ს სურს ქსელური რესურსის გამოყენება"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"ამან შეიძლება პრობლემა შეუქმნას <xliff:g id="APPS">%3$s</xliff:g>-ს."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"ამან შეიძლება პრობლემები შეუქმნას აპებს: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"დაშვება"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"უარყოფა"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"ეს სანდო ქსელია?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"დიახ, დაუკავშირდეს"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"არა, არ დაუკავშირდეს"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"მხოლოდ ამ ქსელს მიეცეს დაკავშირების უფლება, როცა ქვემოთ მოცემული ინფორმაცია არასწორია.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"სერვერის სახელი:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"გამცემის სახელი:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"ორგანიზაცია:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"დაუკავშირდით:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"ხელმოწერა:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"საჭიროა ქსელის დადასტურება"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"დაკავშირებამდე გადახედეთ <xliff:g id="SSID">%1$s</xliff:g> ქსელის დეტალებს. შეეხეთ გასაგრძელებლად."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"სერტიფიკატის ინსტალაცია ვერ მოხერხდა."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"ამ ქსელის დადასტურება შეუძლებელია"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"მაინც დაკავშირება"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"არ დაუკავშირდეს"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"ქსელის <xliff:g id="SSID">%1$s</xliff:g>-ს აკლია სერტიფიკატი."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"სერტიფიკატების დამატების წესი"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"ამ ქსელის დადასტურება შეუძლებელია"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"ქსელის <xliff:g id="SSID">%1$s</xliff:g>-ს აკლია სერტიფიკატი. შეეხეთ და შეიტყვეთ სერტიფიკატების დამატების წესი."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"მაინც დაკავშირება"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"არ დაუკავშირდეს"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"დაუშვებთ, რომ <xliff:g id="APP_NAME">%1$s</xliff:g>-მა Wi‑Fi ჩართოს?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"შეგიძლიათ, გამორთოთ Wi-Fi სწრაფი პარამეტრებიდან"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"დაშვება"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"აკრძალვა"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-kk/strings.xml b/service/ServiceWifiResources/res/values-kk/strings.xml
index 161521b..0d28492 100644
--- a/service/ServiceWifiResources/res/values-kk/strings.xml
+++ b/service/ServiceWifiResources/res/values-kk/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Параметр жаңартылды. Қайта қосылып көріңіз."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Құпиялылық параметрі өзгертілмейді."</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Желі табылмады"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP аутентификация қатесі (32756)"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне Verizon қызмет көрсету аясынан тыс жерден қосыла алмайсыз. (Қате = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне жазылмағансыз. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтына қатысты ақау пайда болды. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылып қойғансыз. (Қате = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде ақау пайда болды. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтына қатысты ақау пайда болды. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қазіргі орналасқан жеріңізде жұмыс істемейді. Әрекетті кейінірек немесе басқа жерден қайталап көріңіз. (Қате = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі (32767)"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде ақау пайда болды. Әрекетті кейінірек немесе басқа жерден қайталап көріңіз."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі (16384)"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде 16384 қатесіне байланысты ақау пайда болды."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі (16385)"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде 16385 қатесіне байланысты ақау пайда болды."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация қатесі, қате коды белгісіз"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде ақау пайда болды."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Хотспот өшірілді"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Ешқандай құрылғы қосылмаған. Өзгерту үшін түртіңіз."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi ажыратылған."</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> желісіне қосылу үшін <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM картасын салыңыз."</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> қолданбасы желі ресурсын қолдануға рұқсат сұрайды."</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"<xliff:g id="APPS">%3$s</xliff:g> үшін ақаулар пайда болуы мүмкін."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Мұндайда келесі қолданбаларда проблема туындауы мүмкін: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Рұқсат беру"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Рұқсат бермеу"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Бұл желіге сенесіз бе?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Иә, қосылу"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Жоқ, қосылмау"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Төмендегі ақпарат дұрыс болса ғана, осы желіге қосылуға рұқсат беріңіз.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Сервер аты:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Шығарушы аты:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Ұйым:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Контакт:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Қолтаңба:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Желі расталуы керек"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"<xliff:g id="SSID">%1$s</xliff:g> желісіне қосылмас бұрын, оның мәліметтерін тексеріп алыңыз. Жалғастыру үшін түртіңіз."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Сертификатты орнату мүмкін емес."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Бұл желіні растау мүмкін емес"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Бәрібір қосылу"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Қосылмау"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> желісінде сертификат жоқ."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Сертификаттарды қосып үйреніңіз"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Бұл желіні растау мүмкін емес"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> желісінде сертификат жоқ. Сертификат қосуды үйрену үшін түртіңіз."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Бәрібір қосылу"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Қосылмау"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g> қолданбасына Wi‑Fi-ды қосуға рұқсат берілсін бе?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Wi‑Fi-ды \"Жылдам параметрлер\" бөлімінде өшіре аласыз."</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Рұқсат беру"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Рұқсат бермеу"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-km/strings.xml b/service/ServiceWifiResources/res/values-km/strings.xml
index dbbdc98..de96aba 100644
--- a/service/ServiceWifiResources/res/values-km/strings.xml
+++ b/service/ServiceWifiResources/res/values-km/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"បាន​ធ្វើ​បច្ចុប្បន្នភាព​ការ​កំណត់។ សូម​សាកល្បង​ភ្ជាប់ម្ដងទៀត។"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"មិនអាច​ប្ដូរ​ការកំណត់​ឯកជនភាព​បានទេ"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"រក​មិនឃើញ​បណ្ដាញ​ទេ"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>៖ បញ្ហាក្នុងការ​ផ្ទៀងផ្ទាត់ EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកមិនអាចភ្ជាប់​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ពីក្រៅ​តំបន់គ្របដណ្ដប់​របស់ Verizon បានទេ។ (បញ្ហា = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកមិនបានជាវ​ការចូលប្រើ Wi-Fi របស់ Verizon ទេ។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ជាមួយគណនី​ចូលប្រើ Wi-Fi របស់ Verizon របស់អ្នក។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកបានភ្ជាប់​ទៅការចូលប្រើ Wi-Fi របស់ Verizon រួចហើយ។ (បញ្ហា = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ជាមួយគណនី​ចូលប្រើ Wi-Fi របស់ Verizon របស់អ្នក។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ មិនអាចចូលប្រើ Wi-Fi របស់ Verizon ពីទីតាំង​របស់អ្នក​បានទេ។ សូមព្យាយាម​ម្ដងទៀត​នៅពេលក្រោយ ឬសាកល្បងពី​ទីតាំងផ្សេង។ (បញ្ហា = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>៖ បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។ សូមព្យាយាម​ម្ដងទៀត​នៅពេលក្រោយ ឬសាកល្បងពី​ទីតាំងផ្សេង។"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>៖ បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ដោយសារបញ្ហា 16384។"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>៖ បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ដោយសារបញ្ហា 16385។"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>៖ បញ្ហាក្នុង​ការផ្ទៀងផ្ទាត់ EAP មិនស្គាល់លេខ​កូដ​បញ្ហា"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"បានបិទ​ហតស្ប៉ត"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"មិនមាន​ឧបករណ៍​ដែល​បានភ្ជាប់ទេ។ សូមចុច ដើម្បី​កែ។"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"បានផ្តាច់ Wi-Fi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"ដើម្បី​ភ្ជាប់ <xliff:g id="SSID">%1$s</xliff:g> សូមបញ្ចូល​ស៊ីម <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> ចង់ប្រើ​ធនធាន​បណ្ដាញ"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"សកម្មភាពនេះអាច​បណ្ដាលឱ្យមាន​បញ្ហាសម្រាប់ <xliff:g id="APPS">%3$s</xliff:g>។"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"វាអាចបណ្ដាលឱ្យមានបញ្ហាសម្រាប់កម្មវិធីទាំងនេះ៖ <xliff:g id="APPS">%3$s</xliff:g>។"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"អនុញ្ញាត"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"កុំអនុញ្ញាត"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"តើជឿទុកចិត្ត​បណ្តាញនេះ​បានទេ?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"បាទ/ចាស ភ្ជាប់"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"ទេ កុំភ្ជាប់"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"អនុញ្ញាតឱ្យ​បណ្ដាញនេះ​ភ្ជាប់ លុះត្រាតែ​ព័ត៌មានខាងក្រោម​ត្រឹមត្រូវ​តែប៉ុណ្ណោះ។\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"ឈ្មោះ​ម៉ាស៊ីនមេ៖\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"ឈ្មោះស្ថាប័ន​ចេញ​វិញ្ញាបនបត្រ៖\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"ស្ថាប័ន៖\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"ទំនាក់ទំនង៖\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"ហត្ថលេខា៖\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"ចាំបាច់ត្រូវ​ផ្ទៀងផ្ទាត់​បណ្ដាញ"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"ពិនិត្យមើល​ព័ត៌មានលម្អិត​អំពីបណ្ដាញ​ពាក់ព័ន្ធនឹង <xliff:g id="SSID">%1$s</xliff:g> មុននឹង​ភ្ជាប់។ ចុច​ដើម្បី​បន្ត។"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"ការដំឡើង​វិញ្ញាបនបត្រ​មិនបានសម្រេចទេ។"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"មិនអាច​ផ្ទៀងផ្ទាត់​បណ្ដាញនេះ​បានទេ"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"មិនអីទេ ភ្ជាប់ចុះ"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"កុំ​ភ្ជាប់"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"បណ្ដាញ <xliff:g id="SSID">%1$s</xliff:g> មិនមាន​វិញ្ញាបនបត្រ​ទេ។"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"ស្វែងយល់​អំពីរបៀប​បញ្ចូល​វិញ្ញាបនបត្រ"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"មិនអាច​ផ្ទៀងផ្ទាត់​បណ្ដាញនេះ​បានទេ"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"បណ្ដាញ <xliff:g id="SSID">%1$s</xliff:g> មិនមាន​វិញ្ញាបនបត្រ​ទេ។ ចុចដើម្បី​ស្វែងយល់​អំពីរបៀបបញ្ចូល​វិញ្ញាបនបត្រ។"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"មិនអីទេ ភ្ជាប់ចុះ"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"កុំ​ភ្ជាប់"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"អនុញ្ញាតឱ្យ <xliff:g id="APP_NAME">%1$s</xliff:g> បើក Wi‑Fi ឬ?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"អ្នកអាច​បិទ Wi‑Fi នៅក្នុង​ការកំណត់រហ័ស"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"អនុញ្ញាត"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"កុំអនុញ្ញាត"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-kn/strings.xml b/service/ServiceWifiResources/res/values-kn/strings.xml
index c2c888a..112f07b 100644
--- a/service/ServiceWifiResources/res/values-kn/strings.xml
+++ b/service/ServiceWifiResources/res/values-kn/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"ಸೆಟ್ಟಿಂಗ್ ಅನ್ನು ಅಪ್‌ಡೇಟ್ ಮಾಡಲಾಗಿದೆ. ಪುನಃ ಕನೆಕ್ಟ್ ಮಾಡಲು ಪ್ರಯತ್ನಿಸಿ."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"ಗೌಪ್ಯತೆ ಸೆಟ್ಟಿಂಗ್‌ ಅನ್ನು ಬದಲಾಯಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"ನೆಟ್‌ವರ್ಕ್ ಕಂಡುಬಂದಿಲ್ಲ"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon ಕವರೇಜ್ ಪ್ರದೇಶದ ಹೊರಗಿನಿಂದ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಕನೆಕ್ಟ್ ಮಾಡಲು ನಿಮಗೆ ಸಾಧ್ಯವಿಲ್ಲ. (ದೋಷ = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ನೀವು Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಸಬ್‌ಸ್ಕ್ರೈಬ್ ಆಗಿಲ್ಲ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಖಾತೆಯಲ್ಲಿ ಸಮಸ್ಯೆಯಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ನೀವು ಈಗಾಗಲೇ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಕನೆಕ್ಟ್ ಆಗಿದ್ದೀರಿ. (ದೋಷ = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಖಾತೆಯಲ್ಲಿ ಸಮಸ್ಯೆಯಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ ಸ್ಥಳದಿಂದ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಲಭ್ಯವಿಲ್ಲ. ನಂತರ ಪುನಃ ಪ್ರಯತ್ನಿಸಿ ಅಥವಾ ಬೇರೊಂದು ಸ್ಥಳದಿಂದ ಪ್ರಯತ್ನಿಸಿ. (ದೋಷ = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ. ನಂತರ ಪುನಃ ಪ್ರಯತ್ನಿಸಿ ಅಥವಾ ಬೇರೊಂದು ಸ್ಥಳದಿಂದ ಪ್ರಯತ್ನಿಸಿ."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16384 ದೋಷದ ಕಾರಣ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡಲು ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16385 ದೋಷದ ಕಾರಣ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡಲು ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ಪ್ರಮಾಣೀಕರಣ ದೋಷ, ಅಪರಿಚಿತ ದೋಷ ಕೋಡ್"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"ಹಾಟ್‌ಸ್ಪಾಟ್ ಅನ್ನು ಆಫ್ ಮಾಡಲಾಗಿದೆ"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"ಯಾವುದೇ ಸಾಧನಗಳನ್ನು ಕನೆಕ್ಟ್ ಮಾಡಿಲ್ಲ. ಮಾರ್ಪಡಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"ವೈ-ಫೈ ಕನೆಕ್ಷನ್ ಕಡಿತಗೊಂಡಿದೆ."</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> ಗೆ ಕನೆಕ್ಟ್ ಮಾಡಲು, <xliff:g id="CARRIER_NAME">%2$s</xliff:g> ಸಿಮ್‌ ಅನ್ನು ಸೇರಿಸಿ"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> ನೆಟ್‌ವರ್ಕಿಂಗ್ ಸಂಪನ್ಮೂಲವನ್ನು ಬಳಸಲು ಬಯಸುತ್ತದೆ"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"ಇದು <xliff:g id="APPS">%3$s</xliff:g> ಗಾಗಿ ಸಮಸ್ಯೆಗಳನ್ನು ಉಂಟುಮಾಡಬಹುದು."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"ಈ ಆ್ಯಪ್‌ಗಳಿಗಾಗಿ ಇದು ಸಮಸ್ಯೆಯನ್ನು ಉಂಟುಮಾಡಬಹುದು: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"ಅನುಮತಿಸಿ"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"ಅನುಮತಿಸಬೇಡಿ"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"ಈ ನೆಟ್‌ವರ್ಕ್ ವಿಶ್ವಾಸಾರ್ಹವೇ?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"ಹೌದು, ಕನೆಕ್ಟ್ ಮಾಡಿ"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"ಇಲ್ಲ, ಕನೆಕ್ಟ್ ಮಾಡಬೇಡಿ"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"ಈ ಕೆಳಗಿನ ಮಾಹಿತಿಯು ಸರಿಯಾಗಿದೆ ಎಂದು ಕಂಡುಬಂದರೆ ಮಾತ್ರ ಈ ನೆಟ್‌ವರ್ಕ್‌ಗೆ ಕನೆಕ್ಟ್ ಆಗಲು ಅನುಮತಿಸಿ.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"ಸರ್ವರ್ ಹೆಸರು:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"ವಿತರಕರ ಹೆಸರು:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"ಸಂಸ್ಥೆ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"ಸಂಪರ್ಕ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"ಸಹಿ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"ನೆಟ್‌ವರ್ಕ್ ಅನ್ನು ಪರಿಶೀಲಿಸುವ ಅಗತ್ಯವಿದೆ"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"ಕನೆಕ್ಟ್ ಮಾಡುವ ಮುನ್ನ <xliff:g id="SSID">%1$s</xliff:g> ನೆಟ್‌ವರ್ಕ್ ವಿವರಗಳನ್ನು ಪರಿಶೀಲಿಸಿ. ಮುಂದುವರಿಯಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"ಪ್ರಮಾಣಪತ್ರದ ಇನ್‌ಸ್ಟಾಲೇಶನ್ ವಿಫಲವಾಗಿದೆ."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"ಈ ನೆಟ್‌ವರ್ಕ್ ಅನ್ನು ಪರಿಶೀಲಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"ಹೇಗಿದ್ದರೂ ಕನೆಕ್ಟ್ ಮಾಡಿ"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"ಕನೆಕ್ಟ್ ಮಾಡಬೇಡಿ"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"ನೆಟ್‌ವರ್ಕ್ <xliff:g id="SSID">%1$s</xliff:g> ಒಂದು ಪ್ರಮಾಣಪತ್ರವನ್ನು ಹೊಂದಿಲ್ಲ."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"ಪ್ರಮಾಣಪತ್ರಗಳನ್ನು ಸೇರಿಸುವುದು ಹೇಗೆ ಎಂದು ತಿಳಿಯಿರಿ"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"ಈ ನೆಟ್‌ವರ್ಕ್ ಅನ್ನು ಪರಿಶೀಲಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"ನೆಟ್‌ವರ್ಕ್ <xliff:g id="SSID">%1$s</xliff:g> ಒಂದು ಪ್ರಮಾಣಪತ್ರವನ್ನು ಹೊಂದಿಲ್ಲ. ಪ್ರಮಾಣಪತ್ರಗಳನ್ನು ಸೇರಿಸುವುದು ಹೇಗೆ ಎಂದು ತಿಳಿಯಲು ಟ್ಯಾಪ್ ಮಾಡಿ."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"ಹೇಗಿದ್ದರೂ ಕನೆಕ್ಟ್ ಮಾಡಿ"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"ಕನೆಕ್ಟ್ ಮಾಡಬೇಡಿ"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"ವೈ-ಫೈ ಅನ್ನು ಆನ್ ಮಾಡಲು <xliff:g id="APP_NAME">%1$s</xliff:g> ಗೆ ಅನುಮತಿಸಬೇಕೇ?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"ತ್ವರಿತ ಸೆಟ್ಟಿಂಗ್‍ಗಳಲ್ಲಿ ನೀವು ವೈ-ಫೈ ಅನ್ನು ಆಫ್ ಮಾಡಬಹುದು"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"ಅನುಮತಿಸಿ"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"ಅನುಮತಿಸಬೇಡಿ"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ko/strings.xml b/service/ServiceWifiResources/res/values-ko/strings.xml
index 02928f5..2daf32a 100644
--- a/service/ServiceWifiResources/res/values-ko/strings.xml
+++ b/service/ServiceWifiResources/res/values-ko/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"설정이 업데이트되었습니다. 다시 연결해 보세요."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"개인정보 보호 설정을 변경할 수 없습니다."</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"네트워크를 찾을 수 없습니다."</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon 서비스 지역 외부에서는 Verizon Wi-Fi Access에 연결할 수 없습니다. (오류 = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access를 구독 중이 아닙니다. 800-922-0204번으로 문의하세요. (오류 = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access 계정에 문제가 있습니다. 800-922-0204번으로 문의하세요. (오류 = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: 이미 Verizon Wi-Fi Access에 연결되어 있습니다. (오류 = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다. 800-922-0204번으로 문의하세요. (오류 = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access 계정에 문제가 있습니다. 800-922-0204번으로 문의하세요. (오류 = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: 현재 위치에서는 Verizon Wi-Fi Access를 이용할 수 없습니다. 나중에 다시 시도하거나 다른 위치에서 시도해 보세요. (오류 = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다. 나중에 다시 시도하거나 다른 위치에서 시도해 보세요."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: 오류 16384로 인해 Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: 오류 16385로 인해 Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 인증 오류, 알 수 없는 오류 코드"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"핫스팟이 사용 중지됨"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"연결된 기기가 없습니다. 수정하려면 탭하세요."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi 연결이 끊어졌습니다."</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g>에 연결하려면 <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM을 삽입하세요."</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g>에서 네트워킹 리소스를 사용하려고 합니다."</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"<xliff:g id="APPS">%3$s</xliff:g>에 문제를 일으킬 수 있습니다."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"다음 앱에서 문제를 일으킬 수 있습니다. <xliff:g id="APPS">%3$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"허용"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"허용 안함"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"신뢰하는 네트워크인가요?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"예, 연결"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"연결 안 함"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"아래 정보가 올바른 경우에만 이 네트워크에 연결하도록 허용하세요.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"서버 이름:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"발급기관 이름:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"조직:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"연락처:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"서명:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"네트워크 인증 필요"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"연결하기 전에 <xliff:g id="SSID">%1$s</xliff:g>의 네트워크 세부정보를 확인하세요. 계속하려면 탭하세요."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"인증서를 설치할 수 없습니다."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"이 네트워크를 확인할 수 없음"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"무시하고 연결"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"연결 안 함"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> 네트워크에 인증서가 없습니다."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"인증서 추가 방법 알아보기"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"이 네트워크를 확인할 수 없음"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> 네트워크에 인증서가 없습니다. 인증서 추가 방법을 알아보려면 탭하세요."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"무시하고 연결"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"연결 안 함"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g>에서 Wi‑Fi를 켜도록 허용하시겠습니까?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"빠른 설정에서 Wi‑Fi를 끌 수 있습니다."</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"허용"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"허용 안함"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ky/strings.xml b/service/ServiceWifiResources/res/values-ky/strings.xml
index 9138fca..00d0953 100644
--- a/service/ServiceWifiResources/res/values-ky/strings.xml
+++ b/service/ServiceWifiResources/res/values-ky/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Жөндөө жаңырды. Кайра туташып көрүңүз."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Купуялык жөндөөлөрүн өзгөртүүгө болбойт"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Тармак табылган жок"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке Verizon иштеген аймактан сырткары жерде туташа албайсыз. (Ката = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке жазылган эмессиз. 800-922-0204 номерине телефон чалыңыз. (Ката = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтуңузда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз. (Ката = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташып турасыз. (Ката = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз. (Ката = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтуңузда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз. (Ката = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access сиз жүргөн жерде жеткиликтүү эмес. Кийинчерээк же башка жерден кайталаңыз. (Ката = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты. Кийинчерээк же башка жерден кайталаңыз."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16384 катасынан улам Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16385 катасынан улам Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP аутентификация катасы, белгисиз ката коду"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Байланыш түйүнү  өчүрүлдү"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Туташып турган түзмөктөр жок. Өзгөртүү үчүн таптап коюңуз."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi‑Fi туташуусу жок"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> тармагына туташуу үчүн <xliff:g id="CARRIER_NAME">%2$s</xliff:g> байланыш операторунун SIM-картасын салыңыз"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> тармактын булагын колдонгусу келет"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Бул <xliff:g id="APPS">%3$s</xliff:g> үчүн көйгөй жаратышы мүмкүн."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Бул төмөнкү колдонмолордо маселелерди жаратышы мүмкүн: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Уруксат берүү"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Тыюу салуу"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Бул ишенимдүү тармакпы?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ооба, туташтырылсын"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Жок, туташтырылбасын"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Бул тармакка төмөндө туура маалымат көрсөтүлсө гана туташыңыз.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Сервердин аталышы:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Чыгарган тараптын аталышы:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Уюм:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Байланыш:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Колтамга:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Тармакты текшерүү керек"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Туташуудан мурун <xliff:g id="SSID">%1$s</xliff:g> тармагынын чоо-жайын карап чыгыңыз. Улантуу үчүн басып коюңуз."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Тастыктама орнотулган жок."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Бул тармак ырасталган жок"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Баары бир туташуу"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Туташпасын"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Тармактын <xliff:g id="SSID">%1$s</xliff:g> тастыктамасы жок."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Тастыктамаларды кошконду үйрөнүп алыңыз"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Бул тармак ырасталган жок"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Тармактын <xliff:g id="SSID">%1$s</xliff:g> тастыктамасы жок. Тастыктамаларды кошконду үйрөнүп алыңыз."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Баары бир туташуу"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Туташпасын"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g> колдонмосуна Wi‑Fi\'ды күйгүзүүгө уруксат берилсинби?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Wi‑Fi\'ды Ыкчам жөндөөлөрдөн өчүрсөңүз болот"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Уруксат берүү"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Тыюу салуу"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-lo/strings.xml b/service/ServiceWifiResources/res/values-lo/strings.xml
index 4a2f4a1..15453c4 100644
--- a/service/ServiceWifiResources/res/values-lo/strings.xml
+++ b/service/ServiceWifiResources/res/values-lo/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"ອັບເດດການຕັ້ງຄ່າແລ້ວ ກະລຸນາລອງເຊື່ອມຕໍ່ໃໝ່."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"ບໍ່ສາມາດປ່ຽນການຕັ້ງຄ່າຄວາມເປັນສ່ວນຕົວໄດ້"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"ບໍ່ພົບເຄືອຂ່າຍ"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ທ່ານບໍ່ສາມາດເຊື່ອມຕໍ່ຫາ Verizon Wi-Fi Access ຈາກນອກພື້ນທີ່ຄອບຄຸມ Verizon ໄດ້. (ຜິດພາດ = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ທ່ານບໍ່ໄດ້ສະໝັກໃຊ້ Verizon Wi-Fi Access. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາກັບບັນຊີ Verizon Wi-Fi Access ຂອງທ່ານ. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ທ່ານເຊື່ອມຕໍ່ຫາ Verizon Wi-Fi Access ຢູ່ກ່ອນແລ້ວ. (ຜິດພາດ = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາກັບບັນຊີ Verizon Wi-Fi Access ຂອງທ່ານ. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ບໍ່ສາມາດໃຊ້ Verizon Wi-Fi Access ຈາກສະຖານທີ່ຂອງທ່ານໄດ້. ກະລຸນາລອງໃໝ່ ຫຼື ລອງຈາກສະຖານທີ່ອື່ນ. (ຜິດພາດ = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access. ກະລຸນາລອງໃໝ່ ຫຼື ລອງຈາກສະຖານທີ່ອື່ນ."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access ເນື່ອງຈາກຂໍ້ຜິດພາດ 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access ເນື່ອງຈາກຂໍ້ຜິດພາດ 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : ການພິສູດຢືນຢັນ EAP ຜິດພາດ, ບໍ່ຮູ້ລະຫັດຂໍ້ຜິດພາດ"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"ປິດຮັອດສະປອດແລ້ວ"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"ບໍ່ມີອຸປະກອນເຊື່ອມຕໍ່. ແຕະເພື່ອແກ້ໄຂ."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"ຕັດການເຊື່ອມຕໍ່ Wi-Fi ແລ້ວ"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"ເພື່ອເຊື່ອມຕໍ່ຫາ <xliff:g id="SSID">%1$s</xliff:g>, ກະລຸນາໃສ່ຊິມ <xliff:g id="CARRIER_NAME">%2$s</xliff:g> ກ່ອນ"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> ຕ້ອງການໃຊ້ຊັບ​ພະ​ຍາ​ກອນເຄືອຂ່າຍ"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"ນີ້ອາດກໍ່ໃຫ້ເກີດບັນຫາສຳລັບ <xliff:g id="APPS">%3$s</xliff:g> ໄດ້."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"ແອັບນີ້ອາດສ້າງບັນຫາໃຫ້ກັບແອັບເຫຼົ່ານີ້: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"ອະນຸຍາດ"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"ບໍ່ອະນຸຍາດ"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"ເຄືອຂ່າຍນີ້ເຊື່ອຖືໄດ້ບໍ່?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"ແມ່ນແລ້ວ, ເຊື່ອມຕໍ່"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"ບໍ່, ຢ່າເຊື່ອມຕໍ່"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"ທ່ານຄວນອະນຸຍາດໃຫ້ເຄືອຂ່າຍນີ້ເຊື່ອມຕໍ່ໄດ້ໃນກໍລະນີທີ່ຂໍ້ມູນທາງລຸ່ມຖືກຕ້ອງເທົ່ານັ້ນ.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"ຊື່ເຊີບເວີ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"ຊື່ຜູ້ອອກໃບຮັບຮອງ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"ອົງການ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"ລາຍຊື່ຜູ້ຕິດຕໍ່:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"ລາຍເຊັນ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"ຕ້ອງຢັ້ງຢືນເຄືອຂ່າຍກ່ອນ"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"ກະລຸນາກວດສອບລາຍລະອຽດເຄືອຂ່າຍສຳລັບ <xliff:g id="SSID">%1$s</xliff:g> ກ່ອນການເຊື່ອມຕໍ່. ແຕະເພື່ອສືບຕໍ່."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"ການຕິດຕັ້ງໃບຮັບຮອງບໍ່ສຳເລັດ."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"ບໍ່ສາມາດຢັ້ງຢືນເຄືອຂ່າຍນີ້ໄດ້"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"ຢືນຢັນການເຊື່ອມຕໍ່"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"ຢ່າເຊື່ອມຕໍ່"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"ເຄືອຂ່າຍ <xliff:g id="SSID">%1$s</xliff:g> ບໍ່ມີໃບຮັບຮອງ."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"ສຶກສາວິທີເພີ່ມໃບຮັບຮອງ"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"ບໍ່ສາມາດຢັ້ງຢືນເຄືອຂ່າຍນີ້ໄດ້"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"ເຄືອຂ່າຍ <xliff:g id="SSID">%1$s</xliff:g> ບໍ່ມີໃບຮັບຮອງ. ແຕະເພື່ອສຶກສາວິທີເພີ່ມໃບຮັບຮອງ."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"ຢືນຢັນການເຊື່ອມຕໍ່"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"ຢ່າເຊື່ອມຕໍ່"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"ອະນຸຍາດໃຫ້ <xliff:g id="APP_NAME">%1$s</xliff:g> ເປີດ Wi‑Fi ໄດ້ບໍ?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"ທ່ານສາມາດປິດ Wi‑Fi ໄດ້ໃນການ​ຕັ້ງ​ຄ່າ​ດ່ວນ"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"ອະນຸຍາດ"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"ບໍ່ອະນຸຍາດ"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-lt/strings.xml b/service/ServiceWifiResources/res/values-lt/strings.xml
index 533b32c..bcb010b 100644
--- a/service/ServiceWifiResources/res/values-lt/strings.xml
+++ b/service/ServiceWifiResources/res/values-lt/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Nustatymas atnaujintas. Bandykite prisijungti dar kartą."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Nepavyko pakeisti privatumo nustatymo"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Tinklas nerastas"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentifikavimo klaida Nr. 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> – EAP autentifikavimo klaida: 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: negalite prisijungti prie „Verizon“ „Wi-Fi“ prieigos taško būdami ne „Verizon“ aprėpties zonoje. (Klaida = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> – EAP autentifikavimo klaida: 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: neprenumeruojate „Verizon“ „Wi-Fi“ prieigos taško. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> – EAP autentifikavimo klaida: 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: iškilo su „Verizon“ „Wi-Fi“ prieigos taško paskyra susijusi problema. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> – EAP autentifikavimo klaida: 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: jau esate prisijungę prie „Verizon“ „Wi-Fi“ prieigos taško. (Klaida = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> – EAP autentifikavimo klaida: 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> – EAP autentifikavimo klaida: 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: iškilo su „Verizon“ „Wi-Fi“ prieigos taško paskyra susijusi problema. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> – EAP autentifikavimo klaida: 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: „Verizon“ „Wi-Fi“ prieigos taškas nepasiekiamas iš jūsų vietovės. Vėliau bandykite dar kartą arba pabandykite iš kitos vietovės. (Klaida = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentifikavimo klaida Nr. 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema. Vėliau bandykite dar kartą arba pabandykite iš kitos vietovės."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentifikavimo klaida Nr. 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema dėl klaidos Nr. 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentifikavimo klaida Nr. 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema dėl klaidos Nr. 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentifikavimo klaida, nežinomas klaidos kodas"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Viešosios interneto prieigos taškas išjungtas"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nėra jokių prijungtų įrenginių. Palieskite, kad pakeistumėte."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"„Wi-Fi“ atjungtas"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Jei norite prisijungti prie „<xliff:g id="SSID">%1$s</xliff:g>“, įdėkite „<xliff:g id="CARRIER_NAME">%2$s</xliff:g>“ SIM kortelę"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"„<xliff:g id="APP">%1$s</xliff:g>“ nori naudoti tinklų šaltinį"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Dėl to gali kilti su „<xliff:g id="APPS">%3$s</xliff:g>“ susijusių problemų."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Dėl to gali kilti problemų šiose programose: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Leisti"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Neleisti"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Ar šis tinklas patikimas?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Taip, prisijungti"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ne, neprisijungti"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Leisti prisijungti prie šio tinklo, tik jei toliau pateikta informacija yra tinkama.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Serverio pavadinimas:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Leidėjo pavadinimas:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizacija:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Susisiekti su:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Parašas:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Reikia patvirtinti tinklą"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Prieš prisijungdami peržiūrėkite išsamią <xliff:g id="SSID">%1$s</xliff:g> tinklo informaciją. Palieskite ir tęskite."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Nepavyko įdiegti sertifikato."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Nepavyko patvirtinti šio tinklo"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Vis tiek prisijungti"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Neprisijungti"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Trūksta tinklo <xliff:g id="SSID">%1$s</xliff:g> sertifikato."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Sužinokite, kaip pridėti sertifikatus"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Nepavyko patvirtinti šio tinklo"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Trūksta tinklo <xliff:g id="SSID">%1$s</xliff:g> sertifikato. Palieskite, kad sužinotumėte, kaip pridėti sertifikatus."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Vis tiek prisijungti"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Neprisijungti"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Leisti programai „<xliff:g id="APP_NAME">%1$s</xliff:g>“ įjungti „Wi‑Fi“?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"„Wi‑Fi“ galite išjungti sparčiuosiuose nustatymuose"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Leisti"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Neleisti"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-lv/strings.xml b/service/ServiceWifiResources/res/values-lv/strings.xml
index ed2c654..a5221a2 100644
--- a/service/ServiceWifiResources/res/values-lv/strings.xml
+++ b/service/ServiceWifiResources/res/values-lv/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Iestatījums atjaunināts. Mēģiniet izveidot savienojumu vēlreiz."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Nevar mainīt konfidencialitātes iestatījumu"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Tīkls nav atrasts"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: lai izveidotu savienojumu ar pakalpojumu Verizon Wi-Fi Access, ir jābūt Verizon pārklājuma zonā. (Kļūda Nr. 32760.)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: jums nav Verizon Wi-Fi Access abonementa. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32761.)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: radusies problēma ar jūsu Verizon Wi-Fi Access kontu. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32762.)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: savienojums ar Verizon Wi-Fi Access jau ir izveidots. (Kļūda Nr. 32763.)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32764.)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: radusies problēma ar jūsu Verizon Wi-Fi Access kontu. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32765.)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: jūsu atrašanās vietā pakalpojums Verizon Wi-Fi Access nav pieejams. Vēlāk mēģiniet vēlreiz, vai arī mēģiniet izveidot savienojumu no citas atrašanās vietas. (Kļūda Nr. 32766.)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma. Vēlāk mēģiniet vēlreiz, vai arī mēģiniet izveidot savienojumu no citas atrašanās vietas."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma kļūdas Nr. 16384 dēļ."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma kļūdas Nr. 16385 dēļ."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: EAP autentificēšanas kļūda, nezināms kļūdas kods"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Tīklājs ir izslēgts"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nav pievienota neviena ierīce. Pieskarieties, lai mainītu iestatījumus."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi savienojums ir pārtraukts."</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Lai izveidotu savienojumu ar tīklu <xliff:g id="SSID">%1$s</xliff:g>, ievietojiet operatora <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM karti."</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"Lietotne <xliff:g id="APP">%1$s</xliff:g> vēlas izmantot tīklošanas resursu"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Var rasties problēmas ar lietotnēm (<xliff:g id="APPS">%3$s</xliff:g>)."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Var rasties problēmas ar šīm lietotnēm: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Atļaut"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Neatļaut"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Vai šis tīkls ir uzticams?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Jā, izveidot savienojumu"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nē, neizveidot savienojumu"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Atļaujiet šim tīklam izveidot savienojumu tikai tad, ja tālāk norādītā informācija šķiet pareiza.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Servera nosaukums:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Izsniedzēja vārds/nosaukums:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizācija:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontaktpersona:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Paraksts:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Nepieciešama tīkla verifikācija"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Pirms savienojuma izveides pārskatiet detalizēto informāciju par tīklu <xliff:g id="SSID">%1$s</xliff:g>. Pieskarieties, lai turpinātu."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Neizdevās instalēt sertifikātu."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Nevar verificēt šo tīklu"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Tomēr izveidot savienojumu"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Neizveidot savienojumu"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Tīklam <xliff:g id="SSID">%1$s</xliff:g> trūkst sertifikāta."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Uzzināt, kā pievienot sertifikātus"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Nevar verificēt šo tīklu"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Tīklam <xliff:g id="SSID">%1$s</xliff:g> trūkst sertifikāta. Pieskarieties, lai uzzinātu, kā pievienot sertifikātus."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Tomēr izveidot savienojumu"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Neizveidot savienojumu"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Vai atļaut lietotnei <xliff:g id="APP_NAME">%1$s</xliff:g> ieslēgt Wi-Fi savienojumu?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Varat izslēgt Wi-Fi savienojumu ātrajos iestatījumos."</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Atļaut"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Neatļaut"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-af/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-af/strings.xml
index aea2b36..175c01e 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-af/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-af/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Jy kan nie van buite Verizon se dekkingsgebied aan Verizon Wi-F Access koppel nie. (Fout = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Jy is nie op Verizon Wi-Fi Access ingeteken nie. Bel ons asseblief by 800-922-0204. (Fout = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Daar is \'n probleem met jou Verizon Wi-Fi Access-rekening. Bel ons asseblief by 800-922-0204. (Fout = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Jy is reeds aan Verizon Wi-Fi Access gekoppel. (Fout = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie. Bel ons asseblief by 800-922-0204. (Fout = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Daar is \'n probleem met jou Verizon Wi-Fi Access-rekening. Bel ons asseblief by 800-922-0204. (Fout = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access is nie in jou ligging beskikbaar nie. Probeer later weer of probeer van \'n ander ligging af. (Fout = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie. Probeer later weer of probeer van \'n ander ligging af."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie weens fout 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie weens fout 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Jy kan nie van buite Verizon se dekkingsgebied aan Verizon Wi-F Access koppel nie."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Jy is nie op Verizon Wi-Fi Access ingeteken nie. Bel ons asseblief by 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Daar is \'n probleem met jou Verizon Wi-Fi Access-rekening. Bel ons asseblief by 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Jy is reeds aan Verizon Wi-Fi Access gekoppel."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie. Bel ons asseblief by 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Daar is \'n probleem met jou Verizon Wi-Fi Access-rekening. Bel ons asseblief by 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access is nie in jou ligging beskikbaar nie. Probeer later weer of probeer van \'n ander ligging af."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-am/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-am/strings.xml
index 6a4a497..ad19df9 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-am/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-am/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>፦ የVerizon ሽፋን ካለው አካባቢ ውጭ ሆነው ከVerizon Wi-Fi መዳረሻ ጋር መገናኘት አይችሉም። (ስህተት = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>፦ ለVerizon Wi-Fi መዳረሻ ደንበኝነት አልተመዘገቡም። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>፦ የእርስዎ የVerizon Wi-Fi መዳረሻ መለያ ችግር አለበት። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>፦ አስቀድመው ከVerizon Wi-Fi መዳረሻ ጋር ተገናኝተዋል። (ስህተት = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>፦ እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>፦ የእርስዎ የVerizon Wi-Fi መዳረሻ መለያ ችግር አለበት። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>፦ የVerizon Wi-Fi መዳረሻ ከእርስዎ አካባቢ የሚገኝ አይደለም። በኋላ ላይ እንደገና ይሞክሩ ወይም ከተለየ አካባቢ ይሞክሩ። (ስህተት = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>፦ እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ። በኋላ ላይ እንደገና ይሞክሩ ወይም ከተለየ አካባቢ ይሞክሩ።"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>፦ በስህተት 16384 ምክንያት እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ።"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>፦ በስህተት 16385 ምክንያት እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ።"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>፦ እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ።"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> ፦ የVerizon ሽፋን ካለው አካባቢ ውጭ ሆነው ከVerizon Wi-Fi Access ጋር መገናኘት አይችሉም።"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> ፦ ለVerizon Wi-Fi Access ደንበኝነት አልተመዘገቡም። እባክዎ 800-922-0204 ላይ ይደውሉልን።"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> ፦ የእርስዎ Verizon Wi-Fi Access መለያ ጋር ችግር አለበት። እባክዎ 800-922-0204 ላይ ይደውሉልን።"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> ፦ አስቀድመው ከVerizon Wi-Fi Access ጋር ተገናኝተዋል።"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> ፦ እርስዎን ከVerizon Wi-Fi Access ጋር ማገናኘት ላይ ችግር አለ። እባክዎ 800-922-0204 ላይ ይደውሉልን።"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> ፦ የእርስዎ Verizon Wi-Fi Access መለያ ጋር ችግር አለበት። እባክዎ 800-922-0204 ላይ ይደውሉልን።"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ከእርስዎ አካባቢ የሚገኝ አይደለም። በኋላ ላይ እንደገና ይሞክሩ ወይም ከተለየ አካባቢ ይሞክሩ።"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ar/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ar/strings.xml
index ca358a8..0d29f47 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ar/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ar/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"‏<xliff:g id="SSID">%1$s</xliff:g>: لا يمكنك الاتصال بشبكة Verizon Wi-Fi Access من خارج نطاق تغطية Verizon. (الخطأ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"‏<xliff:g id="SSID">%1$s</xliff:g>: لم تشترك في Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة في حسابك على Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"‏<xliff:g id="SSID">%1$s</xliff:g>: سبق واتصلت بشبكة Verizon Wi-Fi Access. (الخطأ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة في حسابك على Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"‏<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access غير متاح في موقعك الجغرافي. يُرجى إعادة المحاولة لاحقًا أو المحاولة من موقع جغرافي مختلف. (الخطأ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access. يُرجى إعادة المحاولة لاحقًا أو المحاولة من موقع جغرافي مختلف."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء الاتصال بشبكة Verizon Wi-Fi Access بسبب الخطأ رقم 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء الاتصال بشبكة Verizon Wi-Fi Access بسبب الخطأ رقم 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"‏<xliff:g id="SSID">%1$s</xliff:g> : لا يمكنك الاتصال بشبكة Verizon Wi-Fi Access من خارج نطاق تغطية Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"‏<xliff:g id="SSID">%1$s</xliff:g> : لم تشترك في Verizon Wi-Fi Access. يُرجى الاتصال بالرقم ‎800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"‏<xliff:g id="SSID">%1$s</xliff:g> : حدثت مشكلة في حسابك على Verizon Wi-Fi Access. يُرجى الاتصال بالرقم ‎800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"‏<xliff:g id="SSID">%1$s</xliff:g> : سبق واتصلت بشبكة Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"‏<xliff:g id="SSID">%1$s</xliff:g> : حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access. يُرجى الاتصال بالرقم ‎800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"‏<xliff:g id="SSID">%1$s</xliff:g> : حدثت مشكلة في حسابك على Verizon Wi-Fi Access. يُرجى الاتصال بالرقم ‎800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"‏<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access غير متاح في موقعك الجغرافية. يُرجى إعادة المحاولة لاحقًا أو المحاولة من موقع جغرافي مختلف."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-as/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-as/strings.xml
index 144eaec..45bd2e5 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-as/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-as/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি Verizonৰ ক’ভাৰেকজ ক্ষেত্ৰৰ বাহিৰৰ পৰা Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰিব নোৱাৰে। (আসোঁৱাহ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি Verizon Wi-Fi Access ছাবস্ক্ৰাইব কৰা নাই। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাৰ Verizon Wi-Fi Access একাউণ্টটোত কিবা সমস্যা আছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি ইতিমধ্যে Verizon Wi-Fi Accessৰ সৈতে সংযুক্ত হৈ আছে। (আসোঁৱাহ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাৰ Verizon Wi-Fi Access একাউণ্টটোত কিবা সমস্যা আছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access আপোনাৰ অৱস্থানৰ পৰা উপলব্ধ নহয়। পাছত পুনৰ চেষ্টা কৰক অথবা এটা বেলেগ অৱস্থানৰ পৰা চেষ্টা কৰক। (আসোঁৱাহ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে। পাছত পুনৰ চেষ্টা কৰক অথবা এটা বেলেগ অৱস্থানৰ পৰা চেষ্টা কৰক।"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : আসোঁৱাহ 16384ৰ বাবে আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে।"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : আসোঁৱাহ 16385ৰ বাবে আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে।"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে।"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি Verizon কভাৰেজ ক্ষেত্ৰৰ বাহিৰৰ পৰা Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰিব নোৱাৰে।"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি Verizon Wi-Fi Access ছাবস্ক্ৰাইব কৰা নাই। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক।"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাৰ Verizon Wi-Fi Access একাউণ্টটোত কিবা সমস্যা আছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক।"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি ইতিমধ্যে Verizon Wi-Fi Accessৰ সৈতে সংযুক্ত হৈ আছে।"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক।"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাৰ Verizon Wi-Fi Access একাউণ্টটোত কিবা সমস্যা আছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক।"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access আপোনাৰ অৱস্থানৰ পৰা উপলব্ধ নহয়। পাছত পুনৰ চেষ্টা কৰক অথবা এটা বেলেগ অৱস্থানৰ পৰা চেষ্টা কৰক।"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-az/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-az/strings.xml
index 84d97f2..977e819 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-az/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-az/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon əhatə dairəsindən kənarda Verizon Wi-Fi Access\'ə qoşula bilməzsiniz. (Xəta = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ə abunə olmamısınız. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hesabınız ilə bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Artıq Verizon Wi-Fi Access\'ə qoşulmusunuz. (Xəta = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hesabınız ilə bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access məkanınızdan əlçatan deyil. Sonra cəhd edin, ya da fərqli məkandan yoxlayın. (Xəta = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var. Sonra cəhd edin, ya da fərqli məkandan yoxlayın."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 saylı xətaya görə Verizon Wi-Fi Access\'ə qoşmaq olmur."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 saylı xətaya görə Verizon Wi-Fi Access\'ə qoşmaq olmur."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon əhatə dairəsindən kənarda Verizon Wi-Fi Access\'ə qoşula bilməzsiniz."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ə abunə olmamısınız. 800-922-0204 nömrəsini yığaraq bizə zəng edin."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hesabınız ilə bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Artıq Verizon Wi-Fi Access\'ə qoşulmusunuz."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hesabınız ilə bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access məkanınızdan əlçatan deyil. Sonra cəhd edin, ya da fərqli məkandan yoxlayın."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-b+sr+Latn/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-b+sr+Latn/strings.xml
index e47d2b3..97742d5 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-b+sr+Latn/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-b+sr+Latn/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete da se povežete na Verizon WiFi Access van oblasti koju Verizon pokriva. (Greška = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na Verizon Wi-Fi Access. Pozovite nas na 800 922 0204. (Greška = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon Wi-Fi Access nalogom. Pozovite nas na 800 922 0204. (Greška = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani na Verizon WiFi Access. (Greška = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon Wi-Fi Access. Pozovite nas na 800 922 0204. (Greška = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon Wi-Fi Access nalogom. Pozovite nas na 800 922 0204. (Greška = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nije dostupan sa vaše lokacije. Probajte ponovo kasnije ili probajte sa neke druge lokacije. (Greška = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon Wi-Fi Access. Probajte ponovo kasnije ili probajte sa neke druge lokacije."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access zbog greške 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access zbog greške 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete da se povežete na Verizon WiFi Access van oblasti koju Verizon pokriva."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na Verizon WiFi Access. Pozovite nas na 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon WiFi Access nalogom. Pozovite nas na 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani na Verizon WiFi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access. Pozovite nas na 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon WiFi Access nalogom. Pozovite nas na 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon WiFi Access nije dostupan sa vaše lokacije. Probajte ponovo kasnije ili probajte sa neke druge lokacije."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-be/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-be/strings.xml
index 7d25173..1bd7ef8 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-be/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-be/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : вы не можаце падключыцца да Verizon Wi-Fi Access, калі не знаходзіцеся ў зоне пакрыцця Verizon. (Памылка = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : вы не падпісаны на Verizon Wi-Fi Access. Пазваніце нам па нумары 800-922-0204. (Памылка = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з вашым уліковым запісам Verizon Wi-Fi Access. Пазваніце нам па нумары 800-922-0204. (Памылка = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : вы ўжо падключаны да Verizon Wi-Fi Access. (Памылка = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з падключэннем да Verizon Wi-Fi Access. Пазваніце нам па нумары 800-922-0204. (Памылка = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з вашым уліковым запісам Verizon Wi-Fi Access. Пазваніце нам па нумары 800-922-0204. (Памылка = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : з месца, дзе вы знаходзіцеся, няма доступу да Verizon Wi-Fi Access. Паўтарыце спробу пазней або змяніце месцазнаходжанне. (Памылка = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з падключэннем да Verizon Wi-Fi Access. Паўтарыце спробу пазней або змяніце месцазнаходжанне."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : праз памылку 16384 узнікла праблема з падключэннем да Verizon Wi-Fi Access."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : праз памылку 16385 узнікла праблема з падключэннем да Verizon Wi-Fi Access."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з падключэннем да Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : вы не можаце падключыцца да Verizon Wi-Fi Access, калі не знаходзіцеся ў зоне пакрыцця Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : вы не падпісаны на Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : ёсць праблема з вашым уліковым запісам Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : вы ўжо падключаны да Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : ёсць праблема з падключэннем да Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : ёсць праблема з вашым уліковым запісам Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : з месца, дзе вы знаходзіцеся, няма доступу да Verizon Wi-Fi Access. Паўтарыце спробу пазней або змяніце месцазнаходжанне."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-bg/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-bg/strings.xml
index 9fe3aa7..0da11fd 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-bg/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-bg/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: Не можете да се свържете с Verizon Wi-Fi Access извън района на покритие на Verizon. (Грешка 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: Нямате абонамент за Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем с профила ви във Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: Вече сте установили връзка с Verizon Wi-Fi Access. (Грешка 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем с профила ви във Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access не се предлага за местоположението ви. Опитайте отново по-късно или от друго местоположение. (Грешка 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access. Опитайте отново по-късно или от друго местоположение."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access поради грешка 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access поради грешка 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: Не можете да се свържете с Verizon Wi-Fi Access извън района на покритие на Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: Нямате абонамент за Verizon Wi-Fi Access. Моля, обадете ни се на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем с профила ви във Verizon Wi-Fi Access. Моля, обадете ни се на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: Вече сте установили връзка с Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access. Моля, обадете ни се на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем с профила ви във Verizon Wi-Fi Access. Моля, обадете ни се на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access не се предлага за местоположението ви. Опитайте отново по-късно или от друго местоположение."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-bn/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-bn/strings.xml
index af60e57..0aecbee 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-bn/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-bn/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon-এর কভারেজ এলাকার বাইরে থেকে আপনি Verizon Wi-Fi Access-এ কানেক্ট করতে পারবেন না। (সমস্যা = ৩২৭৬০)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : আপনি Verizon Wi-Fi Access-এ সাবস্ক্রাইব করেননি। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন। (সমস্যা = ৩২৭৬১)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access অ্যাকাউন্ট নিয়ে কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন। (সমস্যা = ৩২৭৬২)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : আপনি আগেই Verizon Wi-Fi Access-এ কানেক্ট করেছেন। (সমস্যা = ৩২৭৬৩)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-এর সাথে কানেক্ট করার সময় কিছু সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন। (সমস্যা = ৩২৭৬৪)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access অ্যাকাউন্ট নিয়ে কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন। (সমস্যা = ৩২৭৬৫)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার লোকেশনে Verizon Wi-Fi Access উপলভ্য নেই। পরে আবার চেষ্টা করুন বা অন্য লোকেশন থেকে চেষ্টা করুন। (সমস্যা = ৩২৭৬৬)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-এর সাথে কানেক্ট করার সময় কিছু সমস্যা হয়েছে। পরে আবার চেষ্টা করুন বা অন্য লোকেশন থেকে চেষ্টা করুন।"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : ১৬৩৮৪ সমস্যার জন্য Verizon Wi-Fi Access-এর সাথে আপনাকে কানেক্ট করা যাচ্ছে না।"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : ১৬৩৮৫ সমস্যার জন্য Verizon Wi-Fi Access-এর সাথে আপনাকে কানেক্ট করা যাচ্ছে না।"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-এর সাথে কানেক্ট করার সময় কিছু সমস্যা হয়েছে।"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon কভারেজ এলাকার বাইরে আপনি Verizon Wi-Fi Access-এর সাথে কানেক্ট করতে পারবেন না।"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : আপনি Verizon Wi-Fi Access সাবস্ক্রাইব করেননি। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন।"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access অ্যাকাউন্ট নিয়ে কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন।"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : আপনি আগে থেকে Verizon Wi-Fi Access-এর সাথে কানেক্ট করেছেন।"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access-এর সাথে কানেক্ট করতে কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন।"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access অ্যাকাউন্ট নিয়ে কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন।"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার লোকেশনে Verizon Wi-Fi Access উপলভ্য নেই। পরে আবার চেষ্টা করুন বা অন্য লোকেশন থেকে চেষ্টা করুন।"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-bs/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-bs/strings.xml
index 687b9c0..6e02983 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-bs/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-bs/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete se povezati s WiFi pristupom Verizonu izvan područja pokrivenosti Verizona. (Greška = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na WiFi pristup Verizonu. Pozovite nas na broj 800-922-0204. (Greška = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema s vašim računom za WiFi pristup Verizonu. Pozovite nas na broj 800-922-0204. (Greška = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani s WiFi pristupom Verizonu. (Greška = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema pri povezivanju s WiFi pristupom Verizonu. Pozovite nas na broj 800-922-0204. (Greška = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema s vašim računom za WiFi pristup Verizonu. Pozovite nas na broj 800-922-0204. (Greška = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : WiFi pristup Verizonu nije dostupan s vaše lokacije. Pokušajte ponovo kasnije ili pokušajte s druge lokacije. (Greška = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema pri povezivanju s WiFi pristupom Verizonu. Pokušajte ponovo kasnije ili pokušajte s druge lokacije."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema kod povezivanja za WiFi pristup Verizonu zbog greške 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema kod povezivanja za WiFi pristup Verizonu zbog greške 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema pri povezivanju s WiFi pristupom Verizonu."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete se povezati s WiFi pristupom Verizonu izvan područja pokrivenosti Verizona."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na WiFi pristup Verizonu. Pozovite nas na broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema s vašim računom za WiFi pristup Verizonu. Pozovite nas na broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani s WiFi pristupom Verizonu."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema pri povezivanju s WiFi pristupom Verizonu. Pozovite nas na broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema s vašim računom za WiFi pristup Verizonu. Pozovite nas na broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : WiFi pristup Verizonu nije dostupan s vaše lokacije. Pokušajte ponovo kasnije ili pokušajte s druge lokacije."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ca/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ca/strings.xml
index 3ca031c..ba4f2c5 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ca/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ca/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: no et pots connectar a Verizon Wi‑Fi Access des de fora de l\'àrea de cobertura de Verizon. (Error: 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: no estàs subscrit a Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema amb el teu compte de Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: ja estàs connectat a Verizon Wi‑Fi Access. (Error: 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema amb el teu compte de Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi‑Fi Access no està disponible des de la teva ubicació. Torna-ho a provar més tard o bé des d\'una altra ubicació. (Error: 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access. Torna-ho a provar més tard o bé des d\'una altra ubicació."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access a causa de l\'error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access a causa de l\'error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: no et pots connectar a Verizon Wi‑Fi Access des de fora de l\'àrea de cobertura de Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: no estàs subscrit a Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema amb el teu compte de Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: ja estàs connectat a Verizon Wi‑Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema amb el teu compte de Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi‑Fi Access no està disponible des de la teva ubicació. Torna-ho a provar més tard o bé des d\'una altra ubicació."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-cs/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-cs/strings.xml
index 9cebcb0..5eba3b4 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-cs/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-cs/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: K síti Verizon Wi-Fi Access se nelze připojit mimo dosah pokrytí společnosti Verizon. (Chyba = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: Síť Verizon Wi-Fi Access nemáte předplacenou. Zavolejte nám na číslo 800-922-0204. (Chyba = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: U vašeho účtu Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204. (Chyba = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: K síti Verizon Wi-Fi Access jste už připojeni. (Chyba = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204. (Chyba = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: U vašeho účtu Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204. (Chyba = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ve vaší oblasti není k dispozici. Zkuste to později nebo z jiného místa. (Chyba = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému. Zkuste to později nebo z jiného místa."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému kvůli chybě 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému kvůli chybě 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: K síti Verizon Wi-Fi Access se nelze připojit mimo dosah pokrytí společnosti Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: Síť Verizon Wi-Fi Access nemáte předplacenou. Zavolejte nám na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: U vašeho účtu Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: K síti Verizon Wi-Fi Access jste už připojeni."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: U vašeho účtu Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ve vaší oblasti není k dispozici. Zkuste to později nebo z jiného místa."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-da/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-da/strings.xml
index b0c8a64..8972969 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-da/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-da/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access uden for Verizons dækningsområde (fejl = 32760)."</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: Du abonnerer ikke på Verizon Wi-Fi Access. Ring til os på telefonnummer 800-922-0204 (fejl = 32761)."</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: Der er et problem med din Verizon Wi-Fi Access-konto. Ring til os på telefonnummer 800-922-0204 (fejl = 32762)."</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: Du har allerede oprettet forbindelse til Verizon Wi-Fi Access (fejl = 32763)."</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access. Ring til os på telefonnummer 800-922-0204 (fejl = 32764)."</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: Der er et problem med din Verizon Wi-Fi Access-konto. Ring til os på telefonnummer 800-922-0204 (fejl = 32765)."</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access er ikke tilgængeligt i dit område. Prøv igen senere eller fra en anden placering (fejl = 32766)."</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access. Prøv igen senere eller fra en anden placering."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access på grund af fejlen 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access på grund af fejlen 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Du kan ikke oprette forbindelse til Verizon Wi-Fi Access uden for Verizons dækningsområde."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Du abonnerer ikke på Verizon Wi-Fi Access. Ring til os på telefonnummer 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Der er et problem med din Verizon Wi-Fi Access-konto. Ring til os på telefonnummer 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Du har allerede oprettet forbindelse til Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Du kan ikke oprette forbindelse til Verizon Wi-Fi Access. Ring til os på telefonnummer 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Der er et problem med din Verizon Wi-Fi Access-konto. Ring til os på telefonnummer 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access er ikke tilgængeligt i dit område. Prøv igen senere eller fra en anden lokation."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-de/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-de/strings.xml
index 642a858..7895365 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-de/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-de/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: Eine Verbindung mit Verizon Wi-Fi Access ist außerhalb der Abdeckung von Verizon nicht möglich. (Fehler = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: Du bist nicht bei Verizon Wi-Fi Access angemeldet. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: Es gibt ein Problem mit deinem Verizon Wi-Fi Access-Konto. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: Du bist bereits mit Verizon Wi-Fi Access verbunden. (Fehler = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: Es gibt ein Problem mit deinem Verizon Wi-Fi Access-Konto. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ist an deinem Standort nicht verfügbar. Du kannst es noch einmal später oder von einem anderen Standort aus versuchen. (Fehler = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden. Du kannst es noch einmal später oder von einem anderen Standort aus versuchen."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: Aufgrund von Fehler 16384 kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: Aufgrund von Fehler 16385 kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Eine Verbindung mit Verizon Wi-Fi Access ist außerhalb der Abdeckung von Verizon nicht möglich."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Du bist nicht bei Verizon Wi-Fi Access angemeldet. Bitte ruf uns unter 800-922-0204 an."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Es gibt ein Problem mit deinem Verizon Wi-Fi Access-Konto. Bitte ruf uns unter 800-922-0204 an."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Du bist bereits mit Verizon Wi-Fi Access verbunden."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden. Bitte ruf uns unter 800-922-0204 an."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Es gibt ein Problem mit deinem Verizon Wi-Fi Access-Konto. Bitte ruf uns unter 800-922-0204 an."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ist an deinem Standort nicht verfügbar. Du kannst es später noch einmal oder von einem anderen Standort aus versuchen."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-el/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-el/strings.xml
index 92624a6..9441caf 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-el/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-el/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Δεν μπορείτε να συνδεθείτε στο Verizon Wi-Fi Access εκτός της περιοχής κάλυψης της Verizon. (Σφάλμα = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Δεν έχετε εγγραφεί στο Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τον λογαριασμό σας Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Έχετε συνδεθεί ήδη με το Verizon Wi-Fi Access. (Σφάλμα = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τον λογαριασμό σας Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Το Verizon Wi-Fi Access δεν είναι διαθέσιμο από την τοποθεσία σας. Δοκιμάστε ξανά αργότερα ή από διαφορετική τοποθεσία. (Σφάλμα = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access. Δοκιμάστε ξανά αργότερα ή από διαφορετική τοποθεσία."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access λόγω του σφάλματος 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access λόγω του σφάλματος 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Δεν μπορείτε να συνδεθείτε στο Verizon Wi-Fi Access εκτός της περιοχής κάλυψης της Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Δεν έχετε εγγραφεί στο Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τον λογαριασμό σας Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Έχετε συνδεθεί ήδη με το Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τον λογαριασμό σας Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Το Verizon Wi-Fi Access δεν είναι διαθέσιμο από την τοποθεσία σας. Δοκιμάστε ξανά αργότερα ή δοκιμάστε από διαφορετική τοποθεσία."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rAU/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rAU/strings.xml
index e41da71..f859dc2 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rAU/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rAU/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rCA/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rCA/strings.xml
index e41da71..f859dc2 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rCA/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rCA/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rGB/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rGB/strings.xml
index e41da71..f859dc2 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rGB/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rGB/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rIN/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rIN/strings.xml
index e41da71..f859dc2 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rIN/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rIN/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rXC/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rXC/strings.xml
index 38ba1c2..df65353 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rXC/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-en-rXC/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‎‏‏‎‎‏‏‏‏‏‏‎‎‏‎‎‎‎‎‏‎‏‏‎‎‎‎‏‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‎‎‎‎‏‏‏‏‏‎‏‎‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You can’t connect to Verizon Wi-Fi Access from outside the Verizon coverage area. (Error = 32760)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‏‏‎‎‏‏‏‏‎‏‏‎‎‏‎‏‏‎‎‏‏‎‏‎‏‏‏‎‏‎‎‎‎‏‏‏‏‎‎‏‎‎‏‏‎‎‎‎‎‎‏‎‎‎‏‏‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You are not subscribed to Verizon Wi-Fi Access. Please call us at 800-922-0204. (Error = 32761)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‏‏‏‎‎‎‎‎‏‎‏‏‏‎‏‎‏‏‎‎‎‏‎‏‏‎‏‏‏‏‎‎‎‎‎‎‎‎‏‏‎‎‏‎‏‏‏‏‏‎‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204. (Error = 32762)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‎‎‎‏‎‏‏‎‎‎‎‏‎‎‎‏‎‎‎‏‎‏‏‏‏‎‏‎‏‎‎‎‏‏‎‎‎‏‏‏‏‎‏‎‎‏‎‏‏‎‎‏‏‎‏‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You are already connected to Verizon Wi-Fi Access. (Error = 32763)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‎‏‏‎‎‎‏‎‏‎‏‏‎‎‎‏‏‎‎‎‏‏‎‏‎‎‏‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‏‎‏‎‎‏‎‎‎‎‎‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access. Please call us at 800-922-0204. (Error = 32764)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‎‏‏‏‏‏‎‎‏‎‏‏‏‎‏‎‎‎‏‎‏‏‏‎‎‏‎‎‏‎‏‏‏‎‎‏‏‎‏‏‎‎‎‏‏‏‏‏‏‏‏‎‏‏‏‏‏‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204. (Error = 32765)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‏‎‎‏‎‏‏‏‎‎‎‎‏‏‎‎‏‎‏‎‎‎‎‎‏‎‎‎‏‏‏‎‏‏‎‏‏‎‏‏‏‎‏‎‎‏‎‎‎‏‏‏‎‏‏‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : Verizon Wi-Fi Access is not available from your location. Try again later or try from a different location. (Error = 32766)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‏‎‎‎‏‎‎‏‏‎‎‏‎‎‏‏‏‎‎‏‏‎‏‏‏‎‎‏‏‎‏‎‏‏‏‎‎‎‏‎‎‏‎‏‎‎‏‏‏‎‎‏‏‎‎‏‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access. Try again later or try from a different location.‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‏‏‎‎‎‏‎‏‏‎‏‎‏‎‏‏‎‎‎‎‎‏‎‏‏‎‏‎‏‎‏‏‎‎‎‏‎‎‏‏‎‏‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access due to error 16384.‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‎‏‎‎‎‎‏‎‎‏‏‏‏‎‏‎‏‏‏‎‏‏‏‏‎‏‏‎‎‎‏‏‎‎‏‎‏‎‏‎‏‏‏‎‎‏‏‎‎‏‎‎‏‎‏‏‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access due to error 16385.‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‎‏‏‎‏‎‏‎‏‏‏‎‏‏‏‏‏‏‎‎‎‎‏‎‎‏‎‎‏‎‏‎‎‎‏‎‎‏‏‎‏‏‏‎‏‏‏‏‎‏‎‎‎‏‏‏‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‏‏‏‎‏‎‎‎‎‏‎‏‏‎‏‎‏‏‏‏‏‏‏‎‏‎‎‎‎‎‏‎‎‏‏‎‏‎‎‎‎‏‎‏‏‏‎‎‏‎‏‎‎‎‏‎‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You can’t connect to Verizon Wi-Fi Access from outside the Verizon coverage area.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‎‏‎‎‏‏‏‏‎‏‏‎‎‏‏‎‎‎‏‎‎‎‎‏‏‏‏‏‎‎‎‎‎‎‎‎‎‏‏‏‎‎‏‏‏‎‏‏‎‏‏‏‏‎‏‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You are not subscribed to Verizon Wi-Fi Access. Please call us at 800-922-0204.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‎‏‏‎‎‏‎‎‎‎‎‎‎‎‏‏‎‏‎‎‎‏‏‎‎‏‏‎‏‏‎‏‏‎‎‏‎‏‏‎‏‏‏‏‏‏‏‏‎‏‏‎‎‏‏‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‏‏‏‏‎‏‏‏‎‏‎‏‏‏‏‏‏‎‏‏‏‎‎‎‏‎‎‏‎‏‎‏‎‎‎‏‏‎‎‏‏‏‎‎‏‎‏‏‏‏‎‏‎‏‏‎‎‎‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You are already connected to Verizon Wi-Fi Access.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‏‎‏‎‏‏‏‏‎‎‏‎‎‎‏‏‎‏‎‎‎‏‏‏‏‎‎‎‎‎‎‎‎‏‏‎‏‏‏‎‎‎‎‎‏‏‎‏‏‏‎‎‏‎‏‏‏‎‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access. Please call us at 800-922-0204.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‎‎‎‎‎‎‎‎‎‏‏‏‎‎‏‏‎‏‎‏‏‏‎‎‎‏‏‏‎‎‏‎‏‎‎‏‎‏‏‎‏‎‏‏‏‏‎‏‎‏‎‏‏‏‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‎‎‎‏‏‎‏‏‎‎‏‏‏‎‏‎‎‏‎‎‎‎‎‏‎‏‏‏‎‏‏‎‏‎‏‎‎‎‏‏‎‎‏‎‏‏‎‏‏‏‏‎‏‏‏‏‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : Verizon Wi-Fi Access is not available from your location. Try again later or try from a different location.‎‏‎‎‏‎"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-es-rUS/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-es-rUS/strings.xml
index 4d768d0..7267621 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-es-rUS/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-es-rUS/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: No te puedes conectar a Verizon Wi-Fi Access si te encuentras fuera del área de cobertura de Verizon. (Error: 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: No te suscribiste a Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: Hay un problema con tu cuenta de Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: Ya te conectaste a Verizon Wi-Fi Access. (Error: 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Se produjo un error al conectarte a Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: Hay un problema con tu cuenta de Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access no está disponible en tu ubicación. Vuelve a intentarlo más tarde o en una ubicación diferente. (Error: 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Se produjo un error al conectarte a Verizon Wi-Fi Access. Vuelve a intentarlo más tarde o en una ubicación diferente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: No se pudo establecer la conexión a Verizon Wi-Fi Access debido al error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: No se pudo establecer la conexión a Verizon Wi-Fi Access debido al error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Se produjo un error al conectarte a Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : No te puedes conectar a Verizon Wi-Fi Access si te encuentras fuera del área de cobertura de Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : No te suscribiste a Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Hay un problema con tu cuenta de Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Ya te conectaste a Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Se produjo un error al conectarte a Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Hay un problema con tu cuenta de Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access no está disponible en tu ubicación. Vuelve a intentarlo más tarde o en una ubicación diferente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-es/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-es/strings.xml
index aee8cc5..073184e 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-es/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-es/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: no puedes conectarte a Verizon Wi‑Fi Access si no estás en el área de cobertura de Verizon. Error: 32760."</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: no tienes una suscripción a Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32761."</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: hay un problema con tu cuenta de Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32762."</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: ya te has conectado a Verizon Wi‑Fi Access. Error: 32763."</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32764."</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: hay un problema con tu cuenta de Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32765."</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi‑Fi Access no está disponible en tu ubicación. Inténtalo de nuevo más tarde o cuando estés en otro sitio. Error: 32766."</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access. Inténtalo de nuevo más tarde o cuando estés en otro sitio."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access debido a un error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access debido a un error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: no puedes conectarte a Verizon Wi‑Fi Access si no estás en el área de cobertura de Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: no tienes una suscripción a Verizon Wi‑Fi Access. Llámanos al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: hay un problema con tu cuenta de Verizon Wi‑Fi Access. Llámanos al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: ya te has conectado a Verizon Wi‑Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: no se ha podido conectar a Verizon Wi‑Fi Access. Llámanos al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: hay un problema con tu cuenta de Verizon Wi‑Fi Access. Llámanos al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi‑Fi Access no está disponible en tu ubicación. Inténtalo de nuevo más tarde o cuando estés en otro sitio."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-et/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-et/strings.xml
index ce88e62..616d72e 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-et/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-et/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: te ei saa väljaspool Verizoni leviala Verizon Wi-Fi Accessiga ühendust luua. (Viga = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: te ei ole Verizon Wi-Fi Accessi tellinud. Helistage meile numbril 800 922 0204. (Viga = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: teie Verizon Wi-Fi Accessi kontoga on probleem. Helistage meile numbril 800 922 0204. (Viga = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: olete Verizon Wi-Fi Accessiga juba ühendatud. (Viga = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem. Helistage meile numbril 800 922 0204. (Viga = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: teie Verizon Wi-Fi Accessi kontoga on probleem. Helistage meile numbril 800 922 0204. (Viga = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ei ole teie asukohas saadaval. Proovige hiljem või mõnes teises asukohas uuesti. (Viga = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem. Proovige hiljem või mõnes teises asukohas uuesti."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem vea 16384 tõttu."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem vea 16385 tõttu."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: te ei saa väljaspool Verizoni leviala Verizon Wi-Fi Accessiga ühendust luua."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: te ei ole Verizon Wi-Fi Accessi tellinud. Helistage meile numbril 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: teie Verizon Wi-Fi Accessi kontoga on probleem. Helistage meile numbril 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: olete Verizon Wi-Fi Accessiga juba ühendatud."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem. Helistage meile numbril 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: teie Verizon Wi-Fi Accessi kontoga on probleem. Helistage meile numbril 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ei ole teie asukohas saadaval. Proovige hiljem või mõnes teises asukohas uuesti."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-eu/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-eu/strings.xml
index 6248bb7..a5c746c 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-eu/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-eu/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: ezin zara konektatu Verizon-en wifi-sarbidera Verizon-en estaldura-eremutik kanpo bazaude. (Errorea: 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: ez zaude harpidetuta Verizon-en wifi-sarbidera. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbideko kontuarekin. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: dagoeneko konektatuta zaude Verizon-en wifi-sarbidera. (Errorea: 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbidera konektatzeko. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbideko kontuarekin. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon-en wifi-sarbidea ez dago erabilgarri zauden tokian. Saiatu berriro geroago edo beste toki batean zaudenean. (Errorea: 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbidera konektatzeko. Saiatu berriro geroago edo beste toki batean zaudenean."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: 16384 errorea dela eta, arazo bat dago Verizon-en wifi-sarbidera konektatzeko."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: 16385 errorea dela eta, arazo bat dago Verizon-en wifi-sarbidera konektatzeko."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbidera konektatzeko."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: ezin zara konektatu Verizon Wi-Fi Access zerbitzura Verizon-en estaldura-eremutik kanpo bazaude."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: ez zaude harpidetuta Verizon Wi-Fi Access zerbitzura. Dei iezaguzu 800-922-0204 zenbakira."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon Wi-Fi Access zerbitzuko kontuarekin. Dei iezaguzu 800-922-0204 zenbakira."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: dagoeneko konektatuta zaude Verizon Wi-Fi Access zerbitzura."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon Wi-Fi Access zerbitzura konektatzeko. Dei iezaguzu 800-922-0204 zenbakira."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon Wi-Fi Access zerbitzuko kontuarekin. Dei iezaguzu 800-922-0204 zenbakira."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ez dago erabilgarri kokapen horretan. Saiatu berriro geroago edo beste kokapen batetik."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-fa/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-fa/strings.xml
index 8348882..fd8f22e 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-fa/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-fa/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"‏<xliff:g id="SSID">%1$s</xliff:g> : خارج از منطقه تحت پوشش Verizon نمی‌توانید به Verizon Wi-Fi Access متصل شوید. (خطا = ۳۲۷۶۰)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشترک Verizon Wi-Fi Access نیستید. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۱)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشکلی در حساب Verizon Wi-Fi Access وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۲)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"‏<xliff:g id="SSID">%1$s</xliff:g> : درحال‌حاضر به Verizon Wi-Fi Access متصل هستید. (خطا = ۳۲۷۶۳)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"‏<xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۴)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشکلی در حساب Verizon Wi-Fi Access وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۵)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"‏<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access در مکان شما دردسترس نیست. بعداً دوباره تلاش کنید یا از مکان متفاوتی امتحان کنید. (خطا = ۳۲۷۶۶)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"‏<xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد. بعداً دوباره تلاش کنید یا از مکان متفاوتی امتحان کنید."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"‏<xliff:g id="SSID">%1$s</xliff:g> : به‌دلیل خطای ۱۶۳۸۴، هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"‏<xliff:g id="SSID">%1$s</xliff:g> : به‌دلیل خطای ۱۶۳۸۵، هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"‏<xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"‏<xliff:g id="SSID">%1$s</xliff:g> : خارج از منطقه تحت پوشش Verizon نمی‌توانید به Verizon Wi-Fi Access متصل شوید."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشترک Verizon Wi-Fi Access نیستید. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشکلی در حساب Verizon Wi-Fi Access وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"‏<xliff:g id="SSID">%1$s</xliff:g> : در حال‌حاضر به Verizon Wi-Fi Access متصل هستید."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"‏<xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشکلی در حساب Verizon Wi-Fi Access وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"‏<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access در مکان شما در دسترس نیست. بعداً دوباره تلاش کنید یا از مکان متفاوتی امتحان کنید."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-fi/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-fi/strings.xml
index a3a9cd6..4b08dc7 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-fi/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-fi/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizonin Wi-Fi‑yhteyttä ei voi muodostaa Verizonin kattavuusalueen ulkopuolelta. (Virhe = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Et ole tilannut Verizonin Wi-Fi‑yhteyttä. Soita meille: 800-922-0204. (Virhe = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ‑tilisi kanssa on ongelma. Soita meille: 800-922-0204. (Virhe = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Olet jo yhteydessä Verizonin Wi-Fiin. (Virhe = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Ongelma yhdistettäessä Verizonin Wi-Fiin. Soita meille: 800-922-0204. (Virhe = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ‑tilisi kanssa on ongelma. Soita meille: 800-922-0204. (Virhe = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ei ole saatavilla sijainnissasi. Yritä uudelleen tai kokeile toisesta sijainnista. (Virhe = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Ongelma yhdistettäessä Verizonin Wi-Fiin. Yritä uudelleen tai kokeile toisesta sijainnista."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fiin yhdistämisessä on ongelma virheen 16384 takia."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fiin yhdistämisessä on ongelma virheen 16385 takia."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Ongelma yhdistettäessä Verizonin Wi-Fiin."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Verizonin Wi-Fi‑yhteyttä ei voi muodostaa Verizonin kattavuusalueen ulkopuolelta."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Et ole tilannut Verizonin Wi-Fi‑yhteyttä. Soita meille: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ‑tilisi kanssa on ongelma. Soita meille: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Olet jo yhteydessä Verizonin Wi-Fiin."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Ongelma yhdistettäessä Verizonin Wi-Fiin. Soita meille: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ‑tilisi kanssa on ongelma. Soita meille: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ei ole saatavilla sijainnissasi. Yritä uudelleen tai toisesta sijainnista."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-fr-rCA/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-fr-rCA/strings.xml
index 57a5b6f..c4d506d 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-fr-rCA/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-fr-rCA/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : vous ne pouvez pas vous connecter à Verizon Wi-Fi Access en dehors de la zone de couverture de Verizon. (erreur = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : vous n\'êtes pas abonné à Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : vous êtes déjà connecté à Verizon Wi-Fi Access. (erreur = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access n\'est pas proposé dans votre région. Réessayez plus tard ou essayez à partir d\'une région différente. (erreur = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access. Réessayez plus tard ou essayez à partir d\'une région différente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access en raison de l\'erreur 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access en raison de l\'erreur 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Vous ne pouvez pas vous connecter à Verizon Wi-Fi Access en dehors de la zone de couverture de Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Vous n\'êtes pas abonné à Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Vous êtes déjà connecté à Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Il y a un problème de connexion à Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access n\'est pas proposé dans votre région. Réessayez plus tard ou essayez à partir d\'une région différente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-fr/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-fr/strings.xml
index 2804658..aa8d319 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-fr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-fr/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : impossible de vous connecter à Verizon Wi-Fi Access si vous n\'êtes pas dans une zone couverte par Verizon. (Erreur 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : vous n\'avez pas d\'abonnement à Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : vous êtes déjà connecté à Verizon Wi-Fi Access. (Erreur 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access n\'est pas disponible dans votre région. Réessayez plus tard ou depuis un autre lieu. (Erreur 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access. Réessayez plus tard ou depuis un autre lieu."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access en raison de l\'erreur 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access en raison de l\'erreur 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : vous ne pouvez pas vous connecter à Verizon Wi-Fi Access si vous ne vous trouvez pas dans une zone couverte par le réseau Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : vous n\'avez pas d\'abonnement à Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : un problème lié à votre compte Verizon Wi-Fi Access a été détecté. Veuillez nous appeler au 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : votre connexion à Verizon Wi-Fi Access est déjà active."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : un problème lié à votre compte Verizon Wi-Fi Access a été détecté. Veuillez nous appeler au 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : le service Verizon Wi-Fi Access n\'est pas disponible dans votre région. Veuillez réessayer plus tard ou depuis un autre lieu."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-gl/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-gl/strings.xml
index 2d70ecd..b6d8bd7 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-gl/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-gl/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: non podes conectar con Verizon Wi-Fi Access desde fóra da área de cobertura de Verizon. (Erro = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: non tes subscrición a Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa túa conta de Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: xa estableciches conexión con Verizon Wi-Fi Access. (Erro = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa túa conta de Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access non está dispoñible desde a túa localización. Téntao de novo máis tarde ou proba desde unha localización diferente. (Erro = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access. Téntao de novo máis tarde ou proba desde unha localización diferente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa conexión a Verizon Wi-Fi Access debido ao erro 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa conexión a Verizon Wi-Fi Access debido ao erro 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: non podes conectar con Verizon Wi-Fi Access desde fóra da área de cobertura de Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: non tes subscrición a Verizon Wi-Fi Access. Chámanos ao número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa túa conta de Verizon Wi-Fi Access. Chámanos ao número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: xa estableciches conexión con Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access. Chámanos ao número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa túa conta de Verizon Wi-Fi Access. Chámanos ao número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access non está dispoñible desde a túa localización. Téntao de novo máis tarde ou proba desde unha localización diferente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-gu/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-gu/strings.xml
index 94fce20..5b59cb8 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-gu/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-gu/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : તમે Verizon કવરેજ વિસ્તારની બહારથી Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ થઈ શકતાં નથી. (ભૂલ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : તમે Verizon વાઇ-ફાઇ ઍક્સેસને સબ્સ્ક્રાઇબ કરેલું નથી. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા Verizon વાઇ-ફાઇ ઍક્સેસ એકાઉન્ટમાં કોઈ સમસ્યા છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : તમે પહેલેથી Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરેલું છે. (ભૂલ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા Verizon વાઇ-ફાઇ ઍક્સેસ એકાઉન્ટમાં કોઈ સમસ્યા છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા સ્થાનથી Verizon વાઇ-ફાઇ ઍક્સેસ ઉપલબ્ધ નથી. થોડા સમય પછી અથવા કોઈ અલગ સ્થાનેથી પ્રયાસ કરો. (ભૂલ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે. થોડા સમય પછી અથવા કોઈ અલગ સ્થાનેથી પ્રયાસ કરો."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : ભૂલ 16384ને લીધે તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં ભૂલ આવી."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : ભૂલ 16385ને લીધે તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં ભૂલ આવી."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : તમે Verizon કવરેજ વિસ્તારની બહારથી Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ થઈ શકતાં નથી."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : તમે Verizon વાઇ-ફાઇ ઍક્સેસને સબ્સ્ક્રાઇબ કરેલું નથી. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા વાઇ-ફાઇ ઍક્સેસ એકાઉન્ટમાં કોઈ સમસ્યા છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : તમે પહેલેથી Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરેલું છે."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા વાઇ-ફાઇ ઍક્સેસ એકાઉન્ટમાં કોઈ સમસ્યા છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા સ્થળેથી Verizon વાઇ-ફાઇ ઍક્સેસ ઉપલબ્ધ નથી. પછીથી અથવા કોઈ અલગ સ્થળેથી પ્રયાસ કરો."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-hi/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-hi/strings.xml
index ed3d850..db80707 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-hi/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-hi/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon के कवरेज एरिया के बाहर, Verizon Wi-Fi Access से कनेक्ट नहीं किया जा सकता. (गड़बड़ी = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : आपने Verizon Wi-Fi Access की सदस्यता नहीं ली है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : आपके Verizon Wi-Fi Access खाते में कोई समस्या है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : आप पहले ही Verizon Wi-Fi Access से कनेक्ट हैं. (गड़बड़ी = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : आपको Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : आपके Verizon Wi-Fi Access खाते में कोई समस्या है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : आपकी जगह पर Verizon Wi-Fi Access उपलब्ध नहीं है. कुछ देर बाद या किसी दूसरी जगह से कोशिश करें. (गड़बड़ी = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : आपको Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है. कुछ देर बाद या किसी दूसरी जगह से कोशिश करें."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : आपको 16384 गड़बड़ी की वजह से, Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : आपको 16385 गड़बड़ी की वजह से, Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : आपको Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : आप Verizon के कवरेज एरिया के बाहर Verizon Wi-Fi Access से कनेक्ट नहीं हो सकते."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : आपने Verizon Wi-Fi Access की सदस्यता नहीं ली है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : आपके Verizon Wi-Fi Access खाते में कोई समस्या है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : आप पहले ही Verizon Wi-Fi Access से कनेक्ट हैं."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : आपको Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : आपके Verizon Wi-Fi Access खाते में कोई समस्या है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : आपकी जगह पर Verizon Wi-Fi Access उपलब्ध नहीं है. कृपया थोड़ी देर में कोशिश करें या किसी दूसरी जगह से कोशिश करें."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-hr/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-hr/strings.xml
index 2c44903..7aa8cfd 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-hr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-hr/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : ne možete se povezati s Wi-Fi pristupom Verizonu izvan područja pokrivenosti Verizona. (Pogreška = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : niste pretplaćeni na Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim računom za Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : već ste povezani s Wi-Fi pristupom Verizonu. (Pogreška = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s povezivanjem s Wi-Fi pristupom Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim računom za Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Wi-Fi pristup Verizonu nije dostupan s vaše lokacije. Pokušajte ponovno kasnije ili s druge lokacije. (Pogreška = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s povezivanjem s Wi-Fi pristupom Verizonu. Pokušajte ponovno kasnije ili s druge lokacije."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim povezivanjem s Wi-Fi pristupom Verizonu zbog pogreške 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim povezivanjem s Wi-Fi pristupom Verizonu zbog pogreške 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s povezivanjem s Wi-Fi pristupom Verizonu."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : ne možete se povezati s Wi-Fi pristupom Verizonu izvan područja pokrivenosti Verizona."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : niste pretplaćeni na Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim računom za Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : već ste povezani s Wi-Fi pristupom Verizonu."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s povezivanjem s Wi-Fi pristupom Verizonu. Nazovite nas na telefonski broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim računom za Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Wi-Fi pristup Verizonu nije dostupan s vaše lokacije. Pokušajte ponovno kasnije ili s druge lokacije."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-hu/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-hu/strings.xml
index fb6bb93..81584bb 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-hu/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-hu/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Nem kapcsolódhat a Verizon Wi-Fi-hozzáférési szolgáltatásához a Verizon lefedettségi területén kívülről. (Hiba = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Nem fizetett elő a Verizon Wi-Fi-hozzáférési szolgáltatására. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Valami gond van Verizon Wi-Fi-hozzáférési fiókjával. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Már kapcsolódott a Verizon Wi-Fi-hozzáférési szolgáltatásához. (Hiba = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Valami gond van Verizon Wi-Fi-hozzáférési fiókjával. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : A Verizon Wi-Fi-hozzáférési szolgáltatása nem áll rendelkezésre az Ön tartózkodási helyén. Próbálja újra, vagy próbáljon meg máshol csatlakozni. (Hiba = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során. Próbálja újra, vagy próbáljon meg máshol csatlakozni."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során az 16384-es kódú hiba miatt."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során az 16385-ös kódú hiba miatt."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: Nem kapcsolódhat a Verizon Wi-Fi-hozzáférési szolgáltatásához a Verizon lefedettségi területén kívülről."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: Nem fizetett elő a Verizon Wi-Fi-hozzáférési szolgáltatására. Hívjon minket a következő telefonszámon: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: Valami gond van Verizon Wi-Fi-hozzáférési fiókjával. Hívjon minket a következő telefonszámon: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: Már kapcsolódott a Verizon Wi-Fi-hozzáférési szolgáltatásához."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során. Hívjon minket a következő telefonszámon: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: Valami gond van Verizon Wi-Fi-hozzáférési fiókjával. Hívjon minket a következő telefonszámon: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: A Verizon Wi-Fi-hozzáférési szolgáltatása nem áll rendelkezésre az Ön tartózkodási helyén. Próbálja újra, vagy próbáljon meg máshol csatlakozni."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-hy/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-hy/strings.xml
index 8a9a0de..efc13d6 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-hy/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-hy/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք չեք կարող միանալ Verizon Wi-Fi Access-ին, երբ Verizon-ի ծածկույթից դուրս եք։ Սխալի կոդը՝ 32760։"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք բաժանորդագրված չեք Verizon Wi-Fi Access-ին։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32761։"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> – Ձեր Verizon Wi-Fi Access հաշվի հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32762։"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք արդեն միացած եք Verizon Wi-Fi Access-ին։ Սխալի կոդը՝ 32763։"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32764։"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> – Ձեր Verizon Wi-Fi Access հաշվի հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32765։"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ը հասանելի չէ ձեր գտնվելու վայրից։ Փորձեք ավելի ուշ կամ մեկ այլ վայրից։ Սխալի կոդը՝ 32766։"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։ Փորձեք ավելի ուշ կամ մեկ այլ վայրից։"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> – Չհաջողվեց միանալ Verizon Wi-Fi Access-ին առաջացած 16384 սխալի պատճառով։"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> – Չհաջողվեց միանալ Verizon Wi-Fi Access-ին առաջացած 16385 սխալի պատճառով։"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք չեք կարող միանալ Verizon Wi-Fi Access-ին, երբ Verizon-ի ծածկույթից դուրս եք։"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք բաժանորդագրված չեք Verizon Wi-Fi Access-ին։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> – Ձեր Verizon Wi-Fi Access հաշվի հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք արդեն միացած եք Verizon Wi-Fi Access-ին։"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> – Ձեր Verizon Wi-Fi Access հաշվի հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ը հասանելի չէ ձեր գտնվելու վայրից։ Փորձեք ավելի ուշ կամ մեկ այլ վայրից։"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-in/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-in/strings.xml
index d852e9d..1335245 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-in/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-in/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak dapat terhubung ke Akses Wi-Fi Verizon dari luar area cakupan Verizon. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak berlangganan Akses Wi-Fi Verizon. Harap hubungi kami di 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Ada masalah dengan akun Akses Wi-Fi Verizon Anda. Harap hubungi kami di 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Anda sudah terhubung ke Akses Wi-Fi Verizon. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon. Harap hubungi kami di 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Ada masalah dengan akun Akses Wi-Fi Verizon Anda. Harap hubungi kami di 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Akses Wi-Fi Verizon tidak tersedia di lokasi Anda. Coba lagi nanti atau coba dari lokasi lain. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon. Coba lagi nanti atau coba dari lokasi lain."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon karena error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon karena error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak dapat terhubung ke Akses Wi-Fi Verizon dari luar area cakupan Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak berlangganan Akses Wi-Fi Verizon. Harap hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Ada masalah dengan akun Akses Wi-Fi Verizon Anda. Harap hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Anda sudah terhubung ke Akses Wi-Fi Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon Anda. Harap hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Ada masalah dengan akun Akses Wi-Fi Verizon Anda. Harap hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Akses Wi-Fi Verizon tidak tersedia di lokasi Anda. Coba lagi nanti atau coba dari lokasi yang berbeda."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-is/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-is/strings.xml
index cc98b61..044dbbf 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-is/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-is/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Ekki er hægt að tengjast WiFi-aðgangi Verizon utan þjónustusvæðis Verizon. (Villa = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Þú ert ekki áskrifandi að WiFi-aðgangi Verizon. Hringdu í okkur í síma 800-922-0204. (Villa = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp í tengslum við Verizon WiFi-aðgangsreikninginn þinn. Hringdu í okkur í síma 800-922-0204. (Villa = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Þú ert nú þegar tengd(ur) við WiFi-aðgang Verizon. (Villa = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon. Hringdu í okkur í síma 800-922-0204. (Villa = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp í tengslum við Verizon WiFi-aðgangsreikninginn þinn. Hringdu í okkur í síma 800-922-0204. (Villa = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : WiFi-aðgangur Verizon er ekki í boði þar sem þú ert. Reyndu aftur síðar eða á öðrum stað. (Villa = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon. Reyndu aftur síðar eða á öðrum stað."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon vegna villu 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon vegna villu 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Ekki er hægt að tengjast Verizon Wi-Fi Access utan þjónustusvæðis Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Þú ert ekki áskrifandi að Verizon Wi-Fi Access. Hringdu í okkur í síma 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp í tengslum við Verizon Wi-Fi Access reikninginn þinn. Hringdu í okkur í síma 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Þú ert nú þegar tengd(ur) við Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við Verizon Wi-Fi Access. Hringdu í okkur í síma 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp í tengslum við Verizon Wi-Fi Access reikninginn þinn. Hringdu í okkur í síma 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access er ekki í boði þar sem þú ert. Reyndu aftur síðar eða á öðrum stað."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-it/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-it/strings.xml
index 7192e82..a75d31e 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-it/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-it/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: non puoi connetterti a Verizon Wi-Fi Access se sei fuori dell\'area di copertura Verizon. (Errore 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: non hai un abbonamento a Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema con il tuo account Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: connessione a Verizon Wi-Fi Access già stabilita. (Errore 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema con il tuo account Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access non è disponibile dalla tua posizione. Riprova più tardi o prova da un\'altra posizione. (Errore 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access. Riprova più tardi o prova da un\'altra posizione."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access a causa di un errore 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access a causa di un errore 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: non puoi connetterti a Verizon Wi-Fi Access se sei fuori dell\'area di copertura Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: non hai un abbonamento a Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema con il tuo account Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: connessione a Verizon Wi-Fi Access già stabilita."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema di connessione a Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema con il tuo account Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access non è disponibile dalla tua posizione. Riprova più tardi o prova da un\'altra posizione."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-iw/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-iw/strings.xml
index 8fa7c78..eaf1158 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-iw/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-iw/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"‏<xliff:g id="SSID">%1$s</xliff:g> : לא ניתן להתחבר לגישת Wi-Fi של Verizon מחוץ לאזור הכיסוי של Verizon. (שגיאה = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"‏<xliff:g id="SSID">%1$s</xliff:g> : לא נרשמת לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה עם החשבון שלך לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"‏<xliff:g id="SSID">%1$s</xliff:g> : כבר יש לך חיבור לגישת Wi-Fi של Verizon. (שגיאה = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה עם החשבון שלך לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"‏<xliff:g id="SSID">%1$s</xliff:g> : גישת Wi-Fi של Verizon לא זמינה מהמיקום שלך. אפשר לנסות שוב מאוחר יותר או לנסות ממיקום אחר. (שגיאה = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon. אפשר לנסות שוב מאוחר יותר או לנסות ממיקום אחר."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"‏<xliff:g id="SSID">%1$s</xliff:g> : הייתה בעיה בהתחברות אל גישת ה-Wi-Fi של Verizon בגלל שגיאה 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"‏<xliff:g id="SSID">%1$s</xliff:g> : הייתה בעיה בהתחברות אל גישת ה-Wi-Fi של Verizon בגלל שגיאה 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"‏<xliff:g id="SSID">%1$s</xliff:g> : לא ניתן להתחבר לגישת Wi-Fi של Verizon מחוץ לאזור הכיסוי של Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"‏<xliff:g id="SSID">%1$s</xliff:g> : לא נרשמת לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה עם החשבון שלך לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"‏<xliff:g id="SSID">%1$s</xliff:g> : כבר יש לך חיבור לגישת Wi-Fi של Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה עם החשבון שלך לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"‏<xliff:g id="SSID">%1$s</xliff:g> : גישת Wi-Fi של Verizon לא זמינה מהמיקום שלך. אפשר לנסות שוב מאוחר יותר או לנסות ממיקום אחר."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ja/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ja/strings.xml
index e1b50c2..ea77141 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ja/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ja/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon のサービスエリア外から Verizon Wi-Fi Access に接続することはできません(エラー = 32760)。"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access に登録されていません。800-922-0204 までお電話でお問い合わせください(エラー = 32761)。"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : お使いの Verizon Wi-Fi Access アカウントに問題があります。800-922-0204 までお電話でお問い合わせください(エラー = 32762)。"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access にすでに接続しています(エラー = 32763)。"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access への接続中に問題が発生しました。800-922-0204 までお電話でお問い合わせください(エラー = 32764)。"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : お使いの Verizon Wi-Fi Access アカウントに問題があります。800-922-0204 までお電話でお問い合わせください(エラー = 32765)。"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : 現在地では Verizon Wi-Fi Access はご利用いただけません。しばらくしてからもう一度お試しいただくか、場所を変えてお試しください(エラー = 32766)。"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access への接続中に問題が発生しました。しばらくしてからもう一度お試しいただくか、場所を変えてお試しください。"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : エラー 16384 のため、Verizon Wi-Fi Access への接続中に問題が発生しました。"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : エラー 16385 のため、Verizon Wi-Fi Access への接続中に問題が発生しました。"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access への接続中に問題が発生しました。"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon のサービスエリア外から Verizon Wi-Fi Access に接続することはできません。"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access に登録されていません。800-922-0204 までお電話でお問い合わせください。"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: お使いの Verizon Wi-Fi Access アカウントに問題があります。800-922-0204 までお電話でお問い合わせください。"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access にすでに接続しています。"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access への接続中に問題が発生しました。800-922-0204 までお電話でお問い合わせください。"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: お使いの Verizon Wi-Fi Access アカウントに問題があります。800-922-0204 までお電話でお問い合わせください。"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: 現在地では Verizon Wi-Fi Access はご利用いただけません。しばらくしてからもう一度お試しいただくか、場所を変えてお試しください。"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ka/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ka/strings.xml
index 191ab00..741064b 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ka/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ka/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-ს ვერ დაუკავშირდებით Verizon-ის დაფარვის ზონის გარეთ. (შეცდომა = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access გამოწერილი არ გაქვთ. გთხოვთ, დაგვირეკოთ ტელეფონის ნომერზე 800-922-0204. (შეცდომა = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონის ნომერზე 800-922-0204. (შეცდომა = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენ უკვე დაკავშირებული ხართ Verizon Wi-Fi Access-თან. (შეცდომა = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონის ნომერზე 800-922-0204. (შეცდომა = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონის ნომერზე 800-922-0204. (შეცდომა = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access თქვენი მდებარეობიდან მიუწვდომელია. ცადეთ მოგვიანებით ან ცადეთ სხვა მდებარეობიდან. (შეცდომა = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა. ცადეთ მოგვიანებით ან ცადეთ სხვა მდებარეობიდან."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა შეცდომა 16384-ის გამო."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა შეცდომა 16385-ის გამო."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-ს ვერ დაუკავშირდებით Verizon-ის დაფარვის ზონის გარეთ."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access გამოწერილი არ გაქვთ. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენ უკვე დაკავშირებული ხართ Verizon Wi-Fi Access-თან."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access თქვენი მდებარეობიდან მიუწვდომელია. ცადეთ მოგვიანებით ან ცადეთ სხვა მდებარეობიდან."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-kk/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-kk/strings.xml
index 8ab784b..6044ecc 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-kk/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-kk/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне Verizon қызмет көрсету аясынан тыс жерден қосыла алмайсыз. (Қате = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне жазылмағансыз. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтына қатысты ақау пайда болды. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылып қойғансыз. (Қате = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде ақау пайда болды. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтына қатысты ақау пайда болды. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қазіргі орналасқан жеріңізде жұмыс істемейді. Әрекетті кейінірек немесе басқа жерден қайталап көріңіз. (Қате = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде ақау пайда болды. Әрекетті кейінірек немесе басқа жерден қайталап көріңіз."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде 16384 қатесіне байланысты ақау пайда болды."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде 16385 қатесіне байланысты ақау пайда болды."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде ақау пайда болды."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне Verizon қызмет көрсету аясынан тыс жерден қосыла алмайсыз."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне жазылған жоқсыз. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтына қатысты мәселе шықты. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне әлдеқашан қосылғансыз."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде мәселе шықты. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтына қатысты мәселе шықты. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қазіргі орналасқан жеріңізде жұмыс істемейді. Әрекетті кейінірек немесе басқа жерден қайталап көріңіз."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-km/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-km/strings.xml
index 12f7358..c7b0d6c 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-km/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-km/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកមិនអាចភ្ជាប់​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ពីក្រៅ​តំបន់គ្របដណ្ដប់​របស់ Verizon បានទេ។ (បញ្ហា = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកមិនបានជាវ​ការចូលប្រើ Wi-Fi របស់ Verizon ទេ។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ជាមួយគណនី​ចូលប្រើ Wi-Fi របស់ Verizon របស់អ្នក។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកបានភ្ជាប់​ទៅការចូលប្រើ Wi-Fi របស់ Verizon រួចហើយ។ (បញ្ហា = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ជាមួយគណនី​ចូលប្រើ Wi-Fi របស់ Verizon របស់អ្នក។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>៖ មិនអាចចូលប្រើ Wi-Fi របស់ Verizon ពីទីតាំង​របស់អ្នក​បានទេ។ សូមព្យាយាម​ម្ដងទៀត​នៅពេលក្រោយ ឬសាកល្បងពី​ទីតាំងផ្សេង។ (បញ្ហា = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។ សូមព្យាយាម​ម្ដងទៀត​នៅពេលក្រោយ ឬសាកល្បងពី​ទីតាំងផ្សេង។"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ដោយសារបញ្ហា 16384។"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ដោយសារបញ្ហា 16385។"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកមិនអាចភ្ជាប់​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ពីក្រៅ​តំបន់គ្រប់ដណ្ដប់​របស់ Verizon បានទេ។"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកមិនបានជាវ​ការចូលប្រើ Wi-Fi របស់ Verizon ទេ។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ជាមួយគណនី​ចូលប្រើ Wi-Fi របស់ Verizon របស់អ្នក។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកបានភ្ជាប់​ទៅការចូលប្រើ Wi-Fi របស់ Verizon រួចហើយ។"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ជាមួយគណនី​ចូលប្រើ Wi-Fi របស់ Verizon របស់អ្នក។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>៖ មិនអាចប្រើ​ការចូលប្រើ Wi-Fi របស់ Verizon ពីទីតាំង​របស់អ្នក​បានទេ។ សូមព្យាយាម​ម្ដងទៀត​នៅពេលក្រោយ ឬសាកល្បងពី​ទីតាំងផ្សេង។"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-kn/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-kn/strings.xml
index 809949b..8819f96 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-kn/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-kn/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ಕವರೇಜ್ ಪ್ರದೇಶದ ಹೊರಗಿನಿಂದ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಕನೆಕ್ಟ್ ಮಾಡಲು ನಿಮಗೆ ಸಾಧ್ಯವಿಲ್ಲ. (ದೋಷ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : ನೀವು Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಸಬ್‌ಸ್ಕ್ರೈಬ್ ಆಗಿಲ್ಲ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಖಾತೆಯಲ್ಲಿ ಸಮಸ್ಯೆಯಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : ನೀವು ಈಗಾಗಲೇ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಕನೆಕ್ಟ್ ಆಗಿರುವಿರಿ. (ದೋಷ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗುತ್ತಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಖಾತೆಯಲ್ಲಿ ಸಮಸ್ಯೆಯಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ ಸ್ಥಳದಿಂದ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಲಭ್ಯವಿಲ್ಲ. ನಂತರ ಪುನಃ ಪ್ರಯತ್ನಿಸಿ ಅಥವಾ ಬೇರೊಂದು ಸ್ಥಳದಿಂದ ಪ್ರಯತ್ನಿಸಿ. (ದೋಷ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗುತ್ತಿದೆ. ನಂತರ ಪುನಃ ಪ್ರಯತ್ನಿಸಿ ಅಥವಾ ಬೇರೊಂದು ಸ್ಥಳದಿಂದ ಪ್ರಯತ್ನಿಸಿ."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 ದೋಷದ ಕಾರಣ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡಲು ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 ದೋಷದ ಕಾರಣ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡಲು ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗುತ್ತಿದೆ."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ಕವರೇಜ್ ಪ್ರದೇಶದ ಹೊರಗಿನಿಂದ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಕನೆಕ್ಟ್ ಮಾಡಲು ನಿಮಗೆ ಸಾಧ್ಯವಿಲ್ಲ."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : ನೀವು Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಸಬ್‌ಸ್ಕ್ರೈಬ್‌ ಆಗಿಲ್ಲ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಖಾತೆಯಲ್ಲಿ ಸಮಸ್ಯೆಯಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : ನೀವು ಈಗಾಗಲೇ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಕನೆಕ್ಟ್ ಆಗಿರುವಿರಿ."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗುತ್ತಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಖಾತೆಯಲ್ಲಿ ಸಮಸ್ಯೆಯಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ ಸ್ಥಳದಿಂದ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಲಭ್ಯವಿಲ್ಲ. ನಂತರ ಪುನಃ ಪ್ರಯತ್ನಿಸಿ ಅಥವಾ ಬೇರೊಂದು ಸ್ಥಳದಿಂದ ಪ್ರಯತ್ನಿಸಿ."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ko/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ko/strings.xml
index 445ab19..2f33698 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ko/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ko/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon 서비스 지역 외부에서는 Verizon Wi-Fi Access에 연결할 수 없습니다. (오류 = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access를 구독 중이 아닙니다. 800-922-0204번으로 문의하세요. (오류 = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access 계정에 문제가 있습니다. 800-922-0204번으로 문의하세요. (오류 = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: 이미 Verizon Wi-Fi Access에 연결되어 있습니다. (오류 = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다. 800-922-0204번으로 문의하세요. (오류 = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access 계정에 문제가 있습니다. 800-922-0204번으로 문의하세요. (오류 = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: 현재 위치에서는 Verizon Wi-Fi Access를 이용할 수 없습니다. 나중에 다시 시도하거나 다른 위치에서 시도해 보세요. (오류 = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다. 나중에 다시 시도하거나 다른 위치에서 시도해 보세요."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 오류 16384로 인해 Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 오류 16385로 인해 Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon 서비스 지역 외부에서는 Verizon Wi-Fi Access에 연결할 수 없습니다."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access를 구독 중이 아닙니다. 800-922-0204번으로 문의하세요."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access 계정에 문제가 있습니다. 800-922-0204번으로 문의하세요."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: 이미 Verizon Wi-Fi Access에 연결되어 있습니다."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다. 800-922-0204번으로 문의하세요."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access 계정에 문제가 있습니다. 800-922-0204번으로 문의하세요."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: 해당 위치에서는 Verizon Wi-Fi Access를 이용할 수 없습니다. 나중에 다시 시도하거나 다른 장소에서 시도해 보세요."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ky/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ky/strings.xml
index 93d56eb..a13b602 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ky/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ky/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке Verizon иштеген аймактан сырткары жерде туташа албайсыз. (Ката = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке катталган эмессиз. 800-922-0204 номерине телефон чалыңыз. (Ката = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтуңузда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз. (Ката = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташып турасыз. (Ката = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз. (Ката = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтуңузда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз. (Ката = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access сиз жүргөн жерде жеткиликтүү эмес. Кийинчерээк же башка жерден кайталаңыз. (Ката = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты. Кийинчерээк же башка жерден кайталаңыз."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 катасынан улам Verizon Wi-Fi тармагына туташууда маселе келип чыкты."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 катасынан улам Verizon Wi-Fi тармагына туташууда маселе келип чыкты."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке Verizon иштеген аймактан сырткары жерде туташа албайсыз."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке катталган эмессиз. 800-922-0204 номерине телефон чалыңыз."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтуңузда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташып турасыз."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтуңузда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access сиз жүргөн жерде жеткиликтүү эмес. Кийинчерээк же башка жерден кайталаңыз."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-lo/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-lo/strings.xml
index 78fc650..133eaa2 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-lo/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-lo/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານບໍ່ສາມາດເຊື່ອມຕໍ່ຫາ Verizon Wi-Fi Access ຈາກນອກພື້ນທີ່ຄອບຄຸມ Verizon ໄດ້. (ຜິດພາດ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານບໍ່ໄດ້ສະໝັກໃຊ້ Verizon Wi-Fi Access. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາກັບບັນຊີ Verizon Wi-Fi Access ຂອງທ່ານ. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານເຊື່ອມຕໍ່ຫາ Verizon Wi-Fi Access ຢູ່ກ່ອນແລ້ວ. (ຜິດພາດ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາກັບບັນຊີ Verizon Wi-Fi Access ຂອງທ່ານ. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : ບໍ່ສາມາດໃຊ້ Verizon Wi-Fi Access ຈາກສະຖານທີ່ຂອງທ່ານໄດ້. ກະລຸນາລອງໃໝ່ ຫຼື ລອງຈາກສະຖານທີ່ອື່ນ. (ຜິດພາດ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access. ກະລຸນາລອງໃໝ່ ຫຼື ລອງຈາກສະຖານທີ່ອື່ນ."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access ເນື່ອງຈາກຂໍ້ຜິດພາດ 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access ເນື່ອງຈາກຂໍ້ຜິດພາດ 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານບໍ່ສາມາດເຊື່ອມຕໍ່ຫາ Verizon Wi-Fi Access ຈາກນອກພື້ນທີ່ຄອບຄຸມ Verizon ໄດ້."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານບໍ່ໄດ້ສະໝັກໃຊ້ Verizon Wi-Fi Access. ກະລຸນາໂທຫາພວກເຮົາທີ່ເບີ 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາກັບບັນຊີ Verizon Wi-Fi Access ຂອງທ່ານ. ກະລຸນາໂທຫາພວກເຮົາທີ່ເບີ 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານເຊື່ອມຕໍ່ຫາ Verizon Wi-Fi Access ຢູ່ກ່ອນແລ້ວ."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access. ກະລຸນາໂທຫາພວກເຮົາທີ່ເບີ 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາກັບບັນຊີ Verizon Wi-Fi Access ຂອງທ່ານ. ກະລຸນາໂທຫາພວກເຮົາທີ່ເບີ 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : ບໍ່ສາມາດໃຊ້ Verizon Wi-Fi Access ຈາກສະຖານທີ່ຂອງທ່ານໄດ້. ກະລຸນາລອງໃໝ່ ຫຼື ລອງຈາກສະຖານທີ່ອື່ນ."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-lt/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-lt/strings.xml
index aa182b2..de6a11a 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-lt/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-lt/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: negalite prisijungti prie „Verizon“ „Wi-Fi“ prieigos taško būdami ne „Verizon“ aprėpties zonoje. (Klaida = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: neprenumeruojate „Verizon“ „Wi-Fi“ prieigos taško. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: iškilo su „Verizon“ „Wi-Fi“ prieigos taško paskyra susijusi problema. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: jau esate prisijungę prie „Verizon“ „Wi-Fi“ prieigos taško. (Klaida = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: iškilo su „Verizon“ „Wi-Fi“ prieigos taško paskyra susijusi problema. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: „Verizon“ „Wi-Fi“ prieigos taškas nepasiekiamas iš jūsų vietovės. Vėliau bandykite dar kartą arba pabandykite iš kitos vietovės. (Klaida = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema. Vėliau bandykite dar kartą arba pabandykite iš kitos vietovės."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema dėl klaidos Nr. 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema dėl klaidos Nr. 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: negalite prisijungti prie „Verizon“ „Wi-Fi“ prieigos taško būdami ne „Verizon“ aprėpties zonoje."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: neprenumeruojate „Verizon“ „Wi-Fi“ prieigos taško. Paskambinkite telefono numeriu 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: iškilo su „Verizon“ „Wi-Fi“ prieigos taško paskyra susijusi problema. Paskambinkite telefono numeriu 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: jau esate prisijungę prie „Verizon“ „Wi-Fi“ prieigos taško."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema. Paskambinkite telefono numeriu 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: iškilo su „Verizon“ „Wi-Fi“ prieigos taško paskyra susijusi problema. Paskambinkite telefono numeriu 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: „Verizon“ „Wi-Fi“ prieigos taškas nepasiekiamas iš jūsų vietovės. Vėliau bandykite dar kartą arba pabandykite iš kitos vietovės."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-lv/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-lv/strings.xml
index 6cb0b72..06ae578 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-lv/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-lv/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: lai izveidotu savienojumu ar pakalpojumu Verizon Wi-Fi Access, ir jābūt Verizon pārklājuma zonā. (Kļūda Nr. 32760.)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: jums nav Verizon Wi-Fi Access abonementa. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32761.)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: radusies problēma ar jūsu Verizon Wi-Fi Access kontu. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32762.)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: savienojums ar Verizon Wi-Fi Access jau ir izveidots. (Kļūda Nr. 32763.)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32764.)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: radusies problēma ar jūsu Verizon Wi-Fi Access kontu. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32765.)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: jūsu atrašanās vietā pakalpojums Verizon Wi-Fi Access nav pieejams. Vēlāk mēģiniet vēlreiz, vai arī mēģiniet izveidot savienojumu no citas atrašanās vietas. (Kļūda Nr. 32766.)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma. Vēlāk mēģiniet vēlreiz, vai arī mēģiniet izveidot savienojumu no citas atrašanās vietas."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma kļūdas Nr. 16384 dēļ."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma kļūdas Nr. 16385 dēļ."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: lai izveidotu savienojumu ar pakalpojumu Verizon Wi-Fi Access, ir jābūt Verizon pārklājuma zonā."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: jums nav Verizon Wi-Fi Access abonementa. Lūdzu, zvaniet mums uz numuru 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: radusies problēma ar jūsu Verizon Wi-Fi Access kontu. Lūdzu, zvaniet mums uz numuru 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: savienojums ar Verizon Wi-Fi Access jau ir izveidots."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma. Lūdzu, zvaniet mums uz numuru 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: radusies problēma ar jūsu Verizon Wi-Fi Access kontu. Lūdzu, zvaniet mums uz numuru 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: jūsu atrašanās vietā pakalpojums Verizon Wi-Fi Access nav pieejams. Vēlāk mēģiniet vēlreiz, vai arī mēģiniet izveidot savienojumu no citas atrašanās vietas."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-mk/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-mk/strings.xml
index 6fefc4f..5bfcd9d 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-mk/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-mk/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: не може да се поврзете на Verizon Wi-Fi Access надвор од областа на покривање на Verizon. (Грешка = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: не сте претплатени на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: проблем со вашата сметка на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: веќе сте поврзани на Verizon Wi-Fi Access. (Грешка = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: проблем со вашата сметка на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access не е достапна од вашата локација. Пробајте повторно подоцна или од друга локација. (Грешка = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access. Пробајте повторно подоцна или од друга локација."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access поради грешка 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access поради грешка 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: не може да се поврзете на Verizon Wi-Fi Access надвор од областа на покривање на Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: не сте претплатени на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: проблем со вашата сметка на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: веќе сте поврзани на Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: проблем со вашата сметка на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access не е достапна од вашата локација. Обидете повторно подоцна или обидете се од друга локација."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ml/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ml/strings.xml
index bf30a37..09abed7 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ml/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ml/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon കവറേജ് ഏരിയയ്‌ക്ക് പുറത്ത് നിന്ന് നിങ്ങൾക്ക് Verizon വൈഫൈ ആക്‌സസിലേക്ക് കണക്റ്റ് ചെയ്യാനാകില്ല. (പിശക് = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസിലേക്ക് നിങ്ങൾ വരിക്കാരായിട്ടില്ല. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങളുടെ Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട് ഒരു പ്രശ്‌നമുണ്ട്. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങൾ Verizon വൈഫൈ ആക്‌സസിലേക്ക് മുമ്പേ കണക്‌റ്റ് ചെയ്തിട്ടുണ്ട്. (പിശക് = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങളുടെ Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട് ഒരു പ്രശ്‌നമുണ്ട്. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് നിങ്ങളുടെ ലൊക്കേഷനിൽ ലഭ്യമല്ല. പിന്നീട് വീണ്ടും ശ്രമിക്കുക അല്ലെങ്കിൽ മറ്റൊരു ലൊക്കേഷനിൽ നിന്ന് ശ്രമിക്കുക. (പിശക് = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്. പിന്നീട് വീണ്ടും ശ്രമിക്കുക അല്ലെങ്കിൽ മറ്റൊരു ലൊക്കേഷനിൽ നിന്ന് ശ്രമിക്കുക."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 പിശക് കാരണം Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 പിശക് കാരണം Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon കവറേജ് ഏരിയയ്‌ക്ക് പുറത്ത് നിന്ന് നിങ്ങൾക്ക് Verizon വൈഫൈ ആക്‌സസിലേക്ക് കണക്റ്റ് ചെയ്യാനാകില്ല."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസിലേക്ക് നിങ്ങൾ സബ്‌സ്‌ക്രൈബ് ചെയ്‌തിട്ടില്ല. ഞങ്ങളുടെ 800-922-0204 എന്ന നമ്പറിൽ വിളിക്കുക."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങളുടെ Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട് ഒരു പ്രശ്‌നമുണ്ട്. ഞങ്ങളുടെ 800-922-0204 എന്ന നമ്പറിൽ വിളിക്കുക."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങൾ മുമ്പേ തന്നെ Verizon വൈഫൈ ആക്‌സസിലേക്ക് കണക്‌റ്റ് ചെയ്തിട്ടുണ്ട്."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്. ഞങ്ങളുടെ 800-922-0204 എന്ന നമ്പറിൽ വിളിക്കുക."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങളുടെ Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട് ഒരു പ്രശ്‌നമുണ്ട്. ഞങ്ങളുടെ 800-922-0204 എന്ന നമ്പറിൽ വിളിക്കുക."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് നിങ്ങളുടെ ലൊക്കേഷനില്‍ ലഭ്യമല്ല. മറ്റൊരു ലൊക്കേഷനിൽ നിന്ന് പിന്നീട് വീണ്ടും ശ്രമിക്കുക."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-mn/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-mn/strings.xml
index c573d64..8975948 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-mn/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-mn/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon-ны хамрах бүсийн гаднаас Verizon Wi-Fi хандалтад холбогдох боломжгүй. (Алдаа = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon Wi-Fi хандалтыг захиалаагүй байна. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Таны Verizon Wi-Fi хандалтын бүртгэлтэй холбоотой асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon Wi-Fi хандалтад аль хэдийн холбогдсон байна. (Алдаа = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Таны Verizon Wi-Fi хандалтын бүртгэлтэй холбоотой асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi хандалт нь таны байршлаас боломжгүй байна. Дараа дахин оролдох эсвэл өөр байршлаас оролдоно уу. (Алдаа = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа. Дараа дахин оролдох эсвэл өөр байршлаас оролдоно уу."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Алдаа 16384-ийн улмаас таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Алдаа 16385-ын улмаас таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon-ы хамрах бүсийн гаднаас Verizon Wi-Fi хандалтад холбогдох боломжгүй."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon Wi-Fi хандалтад бүртгүүлээгүй байна. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Таны Verizon Wi-Fi хандалтын бүртгэлтэй холбоотой асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon Wi-Fi хандалтад хэдийн холбогдсон байна."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Таны Verizon Wi-Fi хандалтын бүртгэлтэй холбоотой асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi хандалт нь таны байршлаас боломжгүй байна. Дараа дахин оролдох эсвэл өөр байршлаас оролдоно уу."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-mr/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-mr/strings.xml
index 4c4730d..fefc1b8 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-mr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-mr/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही Verizon कव्हरेज क्षेत्राच्या बाहेरून Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करू शकत नाही. (एरर = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही Verizon वाय-फाय अ‍ॅक्सेस चे सदस्यत्व घेतलेले नाही. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या Verizon वाय-फाय अ‍ॅक्सेस खात्यामध्ये समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही आधीपासून Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट केलेले आहे. (एरर = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या Verizon वाय-फाय अ‍ॅक्सेस खात्यामध्ये समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या स्थानावरून Verizon वाय-फाय अ‍ॅक्सेस उपलब्ध नाही. नंतर पुन्हा प्रयत्न करा किंवा वेगळ्या स्थानावरून प्रयत्न करा. (एरर = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली. नंतर पुन्हा प्रयत्न करा किंवा वेगळ्या स्थानावरून प्रयत्न करा."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 एरर आल्यामुळे तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 एरर आल्यामुळे तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही व्हेरिझॉन कव्हरेज क्षेत्राच्या बाहेरून व्हेरिझॉन वाय-फाय अ‍ॅक्सेस शी कनेक्ट करू शकत नाही."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही व्हेरिझॉन वाय-फाय अ‍ॅक्सेस चे सदस्यत्व घेतलेले नाही. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या व्हेरिझॉन वाय-फाय अ‍ॅक्सेस खात्यामध्ये समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही आधीपासून व्हेरिझॉन वाय-फाय अ‍ॅक्सेस शी कनेक्ट केलेले आहे."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला व्हेरिझॉन वाय-फाय अ‍ॅक्सेस शी कनेक्ट करण्यात समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या व्हेरिझॉन वाय-फाय अ‍ॅक्सेस खात्यामध्ये समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या स्थानावरून व्हेरिझॉन वाय-फाय अ‍ॅक्सेस उपलब्ध नाही. नंतर पुन्हा प्रयत्न करा किंवा वेगळ्या स्थानावरून प्रयत्न करा."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ms/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ms/strings.xml
index 7d9dc65..d8a6dc7 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ms/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ms/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak boleh menyambung ke Verizon Wi-Fi Access dari luar kawasan liputan Verizon. (Ralat = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak melanggan Verizon Wi-Fi Access. Sila hubungi kami di 800-922-0204. (Ralat = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah dengan akaun Verizon Wi-Fi Access anda. Sila hubungi kami di 800-922-0204. (Ralat = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Anda sudah disambungkan ke Verizon Wi-Fi Access. (Ralat = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda ke Verizon Wi-Fi Access. Sila hubungi kami di 800-922-0204. (Ralat = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah dengan akaun Verizon Wi-Fi Access anda. Sila hubungi kami di 800-922-0204. (Ralat = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access tidak tersedia dari lokasi anda. Cuba lagi nanti atau cuba dari lokasi lain. (Ralat = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda ke Verizon Wi-Fi Access. Cuba lagi nanti atau cuba dari lokasi lain."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda kepada Verizon Wi-Fi Access disebabkan oleh ralat 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda kepada Verizon Wi-Fi Access disebabkan oleh ralat 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda ke Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak boleh menyambung ke Verizon Wi-Fi Access dari luar kawasan liputan Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak melanggan Verizon Wi-Fi Access. Sila hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah dengan akaun Verizon Wi-Fi Access anda. Sila hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Anda sudah disambungkan ke Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah semasa menyambungkan anda ke Verizon Wi-Fi Access. Sila hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah dengan akaun Verizon Wi-Fi Access anda. Sila hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access tidak tersedia dari lokasi anda. Cuba lagi nanti atau cuba dari lokasi lain."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-my/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-my/strings.xml
index 619ba1b..63c5e25 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-my/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-my/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon ဝန်ဆောင်မှုမရှိသည့်နေရာမှနေ၍ Verizon Wi-Fi Access သို့ ချိတ်ဆက်၍မရပါ။ (အမှားကုဒ် = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> - သင်သည် Verizon Wi-Fi Access သို့ စာရင်းသွင်းမထားပါ။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှား = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> - သင့် Verizon Wi-Fi Access အကောင့်တွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှားကုဒ် = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> - သင်သည် Verizon Wi-Fi Access သို့ ချိတ်ဆက်ထားပြီးဖြစ်သည်။ (အမှား = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon Wi-Fi Access သို့ ချိတ်ဆက်ရာတွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှားကုဒ် = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> - သင့် Verizon Wi-Fi Access အကောင့်တွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှား = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> - သင့်တည်နေရာတွင် Verizon Wi-Fi Access မရနိုင်ပါ။ နောက်မှထပ်စမ်းကြည့်ပါ သို့မဟုတ် အခြားတည်နေရာမှနေ၍ စမ်းကြည့်ပါ။ (အမှားကုဒ် = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon Wi-Fi Access သို့ ချိတ်ဆက်ရာတွင် ပြဿနာရှိနေသည်။ နောက်မှထပ်စမ်းကြည့်ပါ သို့မဟုတ် အခြားတည်နေရာမှနေ၍ စမ်းကြည့်ပါ။"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> - သင့်ကို Verizon Wi-Fi Access နှင့် ချိတ်ဆက်ပေးရာတွင် အမှားကုဒ် 16384 ကြောင့် ပြဿနာရှိတစ်ခုရှိနေသည်။"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> - သင့်ကို Verizon Wi-Fi Access နှင့် ချိတ်ဆက်ပေးရာတွင် အမှားကုဒ် 16385 ကြောင့် ပြဿနာရှိတစ်ခုရှိနေသည်။"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon Wi-Fi Access သို့ ချိတ်ဆက်ရာတွင် ပြဿနာရှိနေသည်။"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon ဝန်ဆောင်မှုမရှိသည့်နေရာမှနေ၍ Verizon Wi-Fi Access သို့ ချိတ်ဆက်၍မရပါ။"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> - သင်သည် Verizon Wi-Fi Access သို့ စာရင်းသွင်းမထားပါ။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> - သင့် Verizon Wi-Fi Access အကောင့်တွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> - သင်သည် Verizon Wi-Fi Access သို့ ချိတ်ဆက်ထားပြီးဖြစ်သည်။"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon Wi-Fi Access သို့ ချိတ်ဆက်ရာတွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> - သင့် Verizon Wi-Fi Access အကောင့်တွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> - သင့်တည်နေရာတွင် Verizon Wi-Fi Access မရနိုင်ပါ။ နောက်မှထပ်စမ်းကြည့်ပါ သို့မဟုတ် အခြားတည်နေရာမှနေ၍ စမ်းကြည့်ပါ။"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-nb/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-nb/strings.xml
index 82a9d95..bf0854d 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-nb/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-nb/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Du kan ikke koble til Verizon Wi-Fi Access fra utenfor Verizons dekningsområde. (Feil = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Du abonnerer ikke på Verizon Wi-Fi Access. Ring oss på 800-922-0204. (Feil = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med Verizon Wi-Fi Access-kontoen din. Ring oss på 800-922-0204. (Feil = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Du er allerede koblet til Verizon Wi-Fi Access. (Feil = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access. Ring oss på 800-922-0204. (Feil = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med Verizon Wi-Fi Access-kontoen din. Ring oss på 800-922-0204. (Feil = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access er ikke tilgjengelig fra der du er. Prøv igjen senere, eller prøv fra et annet sted. (Feil = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access. Prøv igjen senere, eller prøv fra et annet sted."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access på grunn av feil 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access på grunn av feil 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Du kan ikke koble til Verizon Wi-Fi Access fra utenfor Verizons dekningsområde."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Du abonnerer ikke på Verizon Wi-Fi Access. Ring oss på 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med Verizon Wi-Fi Access-kontoen din. Ring oss på 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Du er allerede koblet til Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access. Ring oss på 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med Verizon Wi-Fi Access-kontoen din. Ring oss på 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access er ikke tilgjengelig fra der du er. Prøv på nytt senere, eller prøv fra et annet sted."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ne/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ne/strings.xml
index 358e7d8..cc50940 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ne/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ne/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईं Verizon कभरेज क्षेत्रबाहिरबाट Verizon Wi-Fi Access मा कनेक्ट गर्न सक्नुहुन्न। (त्रुटि = ३२७६०)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंले Verizon Wi-Fi Access को सदस्यता लिनुभएको छैन। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६१)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको Verizon Wi-Fi Access खातामा कुनै समस्या छ। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६२)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंले आफ्नो डिभाइस Verizon Wi-Fi Access मा कनेक्ट गरिसक्नुभएको छ। (त्रुटि = ३२७६३)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६४)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको Verizon Wi-Fi Access खातामा कुनै समस्या छ। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६५)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईं रहेको स्थानमा Verizon Wi-Fi Access उपलब्ध छैन। पछि फेरि प्रयास गर्नुहोस् वा अर्को स्थानमा गएर कनेक्ट गर्ने प्रयास गर्नुहोस्। (त्रुटि = ३२७६६)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ। पछि फेरि प्रयास गर्नुहोस् वा अर्को स्थानमा गएर कनेक्ट गर्ने प्रयास गर्नुहोस्।"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : त्रुटि १६३८४ का कारण तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ।"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : त्रुटि १६३८५ का कारण तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ।"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ।"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईं Verizon कभरेज क्षेत्र बाहिरबाट Verizon Wi-Fi Access मा जोडिन सक्नुहुन्न।"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंले Verizon Wi-Fi Access को सदस्यता लिनुभएको छैन। कृपया 800-922-0204 मा फोन गर्नुहोस्।"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको Verizon Wi-Fi Access खातामा कुनै समस्या छ। कृपया 800-922-0204 मा फोन गर्नुहोस्।"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईं अहिले Verizon Wi-Fi Access मा नै जोडिनुभएको छ।"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंलाई Verizon Wi-Fi Access मा जोड्ने क्रममा कुनै समस्या भयो। कृपया 800-922-0204 मा फोन गर्नुहोस्।"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको Verizon Wi-Fi Access खातामा कुनै समस्या छ। कृपया 800-922-0204 मा फोन गर्नुहोस्।"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईं रहेको स्थानमा Verizon Wi-Fi Access उपलब्ध छैन। पछि फेरि प्रयास गर्नुहोस् वा अर्को स्थानमा गएर जोडिने प्रयास गर्नुहोस्।"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-nl/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-nl/strings.xml
index f05b34d..04164a6 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-nl/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-nl/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: Je kunt buiten het dekkingsgebied van Verizon geen verbinding maken met Verizon Wi-Fi Access. (Fout = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: Je hebt geen abonnement op Verizon Wi-Fi Access. Bel ons op 800-922-0204. (Fout = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem met je Verizon Wi-Fi Access-account. Bel ons op 800-922-0204. (Fout = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: Je hebt al verbinding met Verizon Wi-Fi Access. (Fout = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij het maken van verbinding met Verizon Wi-Fi Access. Bel ons op 800-922-0204. (Fout = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem met je Verizon Wi-Fi Access-account. Bel ons op 800-922-0204. (Fout = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access is niet beschikbaar op jouw locatie. Probeer het later opnieuw of ga naar een andere locatie. (Fout = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij het maken van verbinding met Verizon Wi-Fi Access. Probeer het later opnieuw of ga naar een andere locatie."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij verbinding maken met Verizon Wi-Fi Access vanwege fout 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij verbinding maken met Verizon Wi-Fi Access vanwege fout 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij het maken van verbinding met Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: Je kunt buiten het dekkingsgebied van Verizon geen verbinding maken met Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: Je hebt geen abonnement op Verizon Wi-Fi Access. Bel ons op 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem met je Verizon Wi-Fi Access-account. Bel ons op 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: Je hebt al verbinding met Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij het maken van verbinding met Verizon Wi-Fi Access. Bel ons op 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem met je Verizon Wi-Fi Access-account. Bel ons op 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access is niet beschikbaar op jouw locatie. Probeer het later opnieuw of ga naar een andere locatie."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-or/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-or/strings.xml
index f4c76c2..1f572de 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-or/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-or/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ Verizon କଭରେଜ କ୍ଷେତ୍ର ବାହାରେ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିପାରିବେ ନାହିଁ। (ତ୍ରୁଟି = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ Verizon Wi-Fi Accessର ସଦସ୍ୟତା ନେଇନାହାଁନ୍ତି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ Verizon Wi-Fi Access ଆକାଉଣ୍ଟରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ ପୂର୍ବରୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିଛନ୍ତି। (ତ୍ରୁଟି = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ Verizon Wi-Fi Access ଆକାଉଣ୍ଟରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ଆପଣଙ୍କ ଲୋକେସନରେ ଉପଲବ୍ଧ ନାହିଁ। ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ କିମ୍ବା ଏକ ଭିନ୍ନ ଲୋକେସନରୁ ଚେଷ୍ଟା କରନ୍ତୁ। (ତ୍ରୁଟି = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ କିମ୍ବା ଏକ ଭିନ୍ନ ଲୋକେସନରୁ ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : ତ୍ରୁଟି 16384 ଯୋଗୁଁ ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି।"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : ତ୍ରୁଟି 16385 ଯୋଗୁଁ ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି।"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି।"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ Verizon କଭରେଜ୍ କ୍ଷେତ୍ର ବାହାରେ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିପାରିବେ ନାହିଁ।"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ Verizon Wi-Fi Accessର ସଦସ୍ୟତା ନେଇ ନାହାଁନ୍ତି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ୍ କରନ୍ତୁ।"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ Verizon Wi-Fi Access ଆକାଉଣ୍ଟରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ୍ କରନ୍ତୁ।"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ ପୂର୍ବରୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିସାରିଛନ୍ତି।"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ସମସ୍ୟା ହେଉଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ୍ କରନ୍ତୁ।"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ Verizon Wi-Fi Access ଆକାଉଣ୍ଟରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ୍ କରନ୍ତୁ।"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ଆପଣଙ୍କ ଲୋକେସନରେ ଉପଲବ୍ଧ ନାହିଁ। ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ କିମ୍ବା ଏକ ଭିନ୍ନ ଲୋକେସନରୁ ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-pa/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-pa/strings.xml
index b0ee828..01498b8 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-pa/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-pa/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ Verizon ਕਵਰੇਜ ਖੇਤਰ ਤੋਂ ਬਾਹਰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਨਹੀਂ ਕਰ ਸਕਦੇ। (ਗੜਬੜ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ Verizon Wi-Fi Access ਲਈ ਗਾਹਕੀ ਨਹੀਂ ਲਈ ਹੋਈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਡੇ Verizon Wi-Fi Access ਖਾਤੇ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ ਪਹਿਲਾਂ ਤੋਂ ਹੀ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਹੋ। (ਗੜਬੜ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਡੇ Verizon Wi-Fi Access ਖਾਤੇ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ਤੁਹਾਡੇ ਟਿਕਾਣੇ ਤੋਂ ਉਪਲਬਧ ਨਹੀਂ ਹੈ। ਬਾਅਦ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜਾਂ ਕਿਸੇ ਹੋਰ ਟਿਕਾਣੇ ਤੋਂ ਕੋਸ਼ਿਸ਼ ਕਰੋ। (ਗੜਬੜ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਬਾਅਦ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜਾਂ ਕਿਸੇ ਹੋਰ ਟਿਕਾਣੇ ਤੋਂ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : ਗੜਬੜ 16384 ਕਰਕੇ ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ।"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : ਗੜਬੜ 16385 ਕਰਕੇ ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ।"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ।"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ Verizon ਕਵਰੇਜ ਖੇਤਰ ਤੋਂ ਬਾਹਰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਨਹੀਂ ਕਰ ਸਕਦੇ।"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ Verizon Wi-Fi Access ਲਈ ਗਾਹਕੀ ਨਹੀਂ ਲਈ ਹੋਈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ।"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਡੇ Verizon Wi-Fi Access ਖਾਤੇ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ।"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ ਪਹਿਲਾਂ ਤੋਂ ਹੀ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਹੋ।"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ।"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਡੇ Verizon Wi-Fi Access ਖਾਤੇ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ।"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ਤੁਹਾਡੇ ਟਿਕਾਣੇ ਤੋਂ ਉਪਲਬਧ ਨਹੀਂ ਹੈ। ਬਾਅਦ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜਾਂ ਕਿਸੇ ਹੋਰ ਟਿਕਾਣੇ ਤੋਂ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-pl/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-pl/strings.xml
index a59f680..16f0b39 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-pl/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-pl/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : nie możesz połączyć się z Wi-Fi Verizon poza obszarem obsługiwanym przez Verizon. (Błąd = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : nie subskrybujesz Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z Twoim kontem Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : połączenie z Wi-Fi Verizon jest już aktywne. (Błąd = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z Twoim kontem Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : usługa Wi-Fi Verizon jest niedostępna w Twojej lokalizacji. Spróbuj ponownie później lub z innej lokalizacji. (Błąd = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon. Spróbuj ponownie później lub z innej lokalizacji."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon z powodu błędu 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon z powodu błędu 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : nie możesz połączyć się z Wi-Fi Verizon poza obszarem obsługiwanym przez Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : nie subskrybujesz Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z Twoim kontem Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : już jesteś połączony z Wi-Fi Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z Twoim kontem Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Wi-Fi Verizon jest niedostępne w Twojej lokalizacji. Spróbuj ponownie później lub z innej lokalizacji."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-pt-rBR/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-pt-rBR/strings.xml
index 37f4e2f..b317b03 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-pt-rBR/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-pt-rBR/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível se conectar ao Verizon Wi-Fi Access fora da área de cobertura. Código de erro: 32760."</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: você não se inscreveu no Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32761."</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32762."</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: você já se conectou ao Verizon Wi-Fi Access. Código de erro: 32763."</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32764."</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32765."</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: o Verizon Wi-Fi Access não está disponível no seu local. Tente novamente mais tarde ou de um local diferente. Código de erro: 32766."</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Tente novamente mais tarde ou de um local diferente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível se conectar ao Verizon Wi-Fi Access fora da área de cobertura."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: você não se inscreveu no Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: você já se conectou ao Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: o Verizon Wi-Fi Access não está disponível neste local. Tente novamente mais tarde ou de um local diferente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-pt-rPT/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-pt-rPT/strings.xml
index 8458794..fb6f76c 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-pt-rPT/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-pt-rPT/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível estabelecer ligação ao ponto de acesso Wi-Fi da Verizon fora da área de cobertura da Verizon. (Erro = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: não possui uma subscrição do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: existe um problema com a sua conta do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: já tem ligação ao ponto de acesso Wi-Fi da Verizon. (Erro = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: existe um problema com a sua conta do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: o ponto de acesso Wi-Fi da Verizon não está disponível a partir da sua localização. Tente novamente mais tarde ou experimente a partir de uma localização diferente. (Erro = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon. Tente novamente mais tarde ou experimente a partir de uma localização diferente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon devido ao erro 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon devido ao erro 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível estabelecer ligação ao ponto de acesso Wi-Fi da Verizon fora da área de cobertura da Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: não possui uma subscrição do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: existe um problema com a sua conta do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: já tem ligação ao ponto de acesso Wi-Fi da Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: existe um problema com a sua conta do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: o ponto de acesso Wi-Fi da Verizon não está disponível a partir da sua localização. Tente novamente mais tarde ou experimente a partir de uma localização diferente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-pt/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-pt/strings.xml
index 37f4e2f..b317b03 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-pt/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-pt/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível se conectar ao Verizon Wi-Fi Access fora da área de cobertura. Código de erro: 32760."</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: você não se inscreveu no Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32761."</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32762."</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: você já se conectou ao Verizon Wi-Fi Access. Código de erro: 32763."</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32764."</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32765."</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: o Verizon Wi-Fi Access não está disponível no seu local. Tente novamente mais tarde ou de um local diferente. Código de erro: 32766."</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Tente novamente mais tarde ou de um local diferente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível se conectar ao Verizon Wi-Fi Access fora da área de cobertura."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: você não se inscreveu no Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: você já se conectou ao Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: o Verizon Wi-Fi Access não está disponível neste local. Tente novamente mais tarde ou de um local diferente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ro/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ro/strings.xml
index f4a20bd..3a5d77b 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ro/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ro/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : nu vă puteți conecta la Verizon Wi-Fi Access în afara ariei de acoperire Verizon. (Eroare = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : nu v-ați abonat la Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de contul dvs. Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : v-ați conectat deja la Verizon Wi-Fi Access. (Eroare = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de contul dvs. Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nu este disponibil în locația dvs. Încercați din nou mai târziu sau încercați dintr-o altă locație. (Eroare = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access. Încercați din nou mai târziu sau încercați dintr-o altă locație."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access din cauza erorii 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access din cauza erorii 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : nu vă puteți conecta la Verizon Wi-Fi Access în afara ariei de acoperire Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : nu v-ați abonat la Verizon Wi-Fi Access. Apelați-ne la 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de contul dvs. Verizon Wi-Fi Access. Apelați-ne la 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : v-ați conectat deja la Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access. Apelați-ne la 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de contul dvs. Verizon Wi-Fi Access. Apelați-ne la 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nu este disponibil în locația dvs. Încercați din nou mai târziu sau încercați dintr-o altă locație."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ru/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ru/strings.xml
index 7c79d44..fa1dceb 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ru/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ru/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: вы не можете подключиться к сервису Verizon Wi-Fi Access вне зоны покрытия Verizon. Код ошибки: 32760."</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: вы не подписаны на сервис Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32761."</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: возникла проблема с вашим аккаунтом Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32762."</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: вы уже подключены к сервису Verizon Wi-Fi Access. Код ошибки: 32763."</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32764."</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: возникла проблема с вашим аккаунтом Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32765."</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: сервис Verizon Wi-Fi Access недоступен там, где вы находитесь. Повторите попытку позже или в другом месте. Код ошибки: 32766."</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access. Повторите попытку позже или в другом месте."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access из-за ошибки 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access из-за ошибки 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: вы не можете подключиться к сервису Verizon Wi-Fi Access вне зоны покрытия Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: вы не подписаны на сервис Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: возникла проблема с вашим аккаунтом Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: вы уже подключены к сервису Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: возникла проблема с вашим аккаунтом Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: сервис Verizon Wi-Fi Access недоступен там, где вы находитесь. Повторите попытку позже или в другом месте."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-si/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-si/strings.xml
index 7a31060..a2ee37e 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-si/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-si/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ආවරණ ප්‍රදේශයට පිටතින් ඔබට Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ විය නොහැකිය. (දෝෂය = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබ Verizon Wi-Fi ප්‍රවේශය වෙත ග්‍රාහක වී නැත. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබගේ Verizon Wi-Fi ප්‍රවේශ ගිණුම සම්බන්ධ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබ දැනටමත් Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ වී ඇත. (දෝෂය = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබගේ Verizon Wi-Fi ප්‍රවේශ ගිණුම සම්බන්ධ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ප්‍රවේශය ඔබගේ ස්ථානය වෙතින් ලබා ගත නොහැකිය. පසුව නැවත උත්සාහ කරන්න නැතහොත් වෙනත් ස්ථානයකින් උත්සාහ කරන්න. (දෝෂය = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ. පසුව නැවත උත්සාහ කරන්න නැතහොත් වෙනත් ස්ථානයකින් උත්සාහ කරන්න."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 දෝෂය හේතුවෙන් ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 දෝෂය හේතුවෙන් ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ආවරණ ප්‍රදේශයට පිටතින් ඔබට Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ විය නොහැකිය."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබ Verizon Wi-Fi ප්‍රවේශය වෙත දායක වී නැත. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබේ Verizon Wi-Fi ප්‍රවේශ ගිණුම හා ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබ දැනටමත් Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ වී ඇත."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබේ Verizon Wi-Fi ප්‍රවේශ ගිණුම හා ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ප්‍රවේශය ඔබේ ස්ථානය වෙතින් ලබා ගත නොහැකිය. පසුව නැවත උත්සාහ කරන්න නැතහොත් වෙනත් ස්ථානයකින් උත්සාහ කරන්න."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-sk/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-sk/strings.xml
index 9b2f10a..dd48f63 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-sk/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-sk/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : k službe Verizon Wi-Fi Access sa nemôžete pripojiť mimo oblasti, v ktorej Verizon poskytuje služby. (Chyba = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access neodoberáte. Zavolajte na číslo 800-922-0204. (Chyba = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : vyskytol sa problém s vaším účtom Verizon Wi-Fi Access. Zavolajte na číslo 800-922-0204. (Chyba = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : k službe Verizon Wi-Fi Access ste sa už pripojili. (Chyba = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém. Zavolajte na číslo 800-922-0204. (Chyba = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : vyskytol sa problém s vaším účtom Verizon Wi-Fi Access. Zavolajte na číslo 800-922-0204. (Chyba = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nie je k dispozícii vo vašej oblasti. Skúste to znova alebo pokus zopakujte v inej oblasti. (Chyba = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém. Skúste to znova alebo pokus zopakujte v inej oblasti."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém, ktorý spôsobila chyba 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém, ktorý spôsobila chyba 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : K službe Verizon Wi-Fi Access sa nemôžete pripojiť mimo oblasti, v ktorej Verizon poskytuje služby."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Službu Verizon Wi-Fi Access neodoberáte. Zavolajte na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Vyskytol sa problém s vaším účtom Verizon Wi-Fi Access. Zavolajte na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : K službe Verizon Wi-Fi Access ste sa už pripojili."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém. Zavolajte na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Vyskytol sa problém s vaším účtom Verizon Wi-Fi Access. Zavolajte na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nie je k dispozícii vo vašej oblasti. Skúste to znova alebo pokus zopakujte v inej oblasti."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-sl/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-sl/strings.xml
index 3e99b16..e54358e 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-sl/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-sl/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: Povezave s storitvijo Verizon Wi-Fi Access ni mogoče vzpostaviti zunaj območja, ki ga pokriva operater Verizon. (napaka = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: Niste naročeni na storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave z vašim računom za storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: Povezava s storitvijo Verizon Wi-Fi Access je že vzpostavljena. (napaka = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave z vašim računom za storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Storitev Verizon Wi-Fi Access ni na voljo na vaši lokaciji. Poskusite znova pozneje ali z druge lokacije. (napaka = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access. Poskusite znova pozneje ali z druge lokacije."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access zaradi napake 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access zaradi napake 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: Povezave s storitvijo Verizon Wi-Fi Access ni mogoče vzpostaviti zunaj območja, ki ga pokriva operater Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: Niste naročeni na storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave z vašim računom za storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: Povezava s storitvijo Verizon Wi-Fi Access je že vzpostavljena."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access. Pokličite nas na 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave z vašim računom za storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Storitev Verizon Wi-Fi Access ni na voljo na vaši lokaciji. Poskusite znova pozneje ali z druge lokacije."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-sq/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-sq/strings.xml
index a86c7b2..1b52a10 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-sq/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-sq/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Nuk mund të lidhesh me Verizon Wi-Fi Access nga jashtë zonës së mbulimit të Verizon. (Gabimi = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Nuk je abonuar në Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me llogarinë tënde të Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Je lidhur tashmë me Verizon Wi-Fi Access. (Gabimi = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me lidhjen tënde me Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me llogarinë tënde të Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nuk ofrohet nga vendndodhja jote. Provo përsëri më vonë ose provo nga një vendndodhje tjetër. (Gabimi = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me lidhjen tënde me Verizon Wi-Fi Access. Provo përsëri më vonë ose provo nga një vendndodhje tjetër."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me lidhjen tënde me Verizon Wi-Fi Access për shkak të gabimit 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me lidhjen tënde me Verizon Wi-Fi Access për shkak të gabimit 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me lidhjen tënde me Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Nuk mund të lidhesh me Verizon Wi-Fi Access nga jashtë zonës së mbulimit të Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Nuk je abonuar në Verizon Wi-Fi Access. Na telefono në 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me llogarinë tënde të Verizon Wi-Fi Access. Na telefono në 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Je lidhur tashmë me Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem gjatë lidhjes sate me Verizon Wi-Fi Access. Na telefono në 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me llogarinë tënde të Verizon Wi-Fi Access. Na telefono në 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nuk ofrohet nga vendndodhja jote. Provo përsëri më vonë ose provo nga një vendndodhje tjetër."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-sr/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-sr/strings.xml
index b675db3..507ded0 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-sr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-sr/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Не можете да се повежете на Verizon WiFi Access ван области коју Verizon покрива. (Грешка = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Нисте претплаћени на Verizon Wi-Fi Access. Позовите нас на 800 922 0204. (Грешка = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon Wi-Fi Access налогом. Позовите нас на 800 922 0204. (Грешка = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Већ сте повезани на Verizon WiFi Access. (Грешка = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon Wi-Fi Access. Позовите нас на 800 922 0204. (Грешка = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon Wi-Fi Access налогом. Позовите нас на 800 922 0204. (Грешка = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access није доступан са ваше локације. Пробајте поново касније или пробајте са неке друге локације. (Грешка = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon Wi-Fi Access. Пробајте поново касније или пробајте са неке друге локације."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access због грешке 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access због грешке 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Не можете да се повежете на Verizon WiFi Access ван области коју Verizon покрива."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Нисте претплаћени на Verizon WiFi Access. Позовите нас на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon WiFi Access налогом. Позовите нас на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Већ сте повезани на Verizon WiFi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access. Позовите нас на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon WiFi Access налогом. Позовите нас на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon WiFi Access није доступан са ваше локације. Пробајте поново касније или пробајте са неке друге локације."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-sv/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-sv/strings.xml
index e1f6f8e..19f153d 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-sv/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-sv/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan inte ansluta till Verizon Wi-Fi Access om du befinner dig utanför Verizons täckningsområde. (Fel = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: Du prenumererar inte på Verizon Wi-Fi Access. Ring oss på 800 922 0204. (Fel = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: Ett fel har uppstått i Verizon Wi-Fi Access-kontot. Ring oss på 800 922 0204. (Fel = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: Du är redan ansluten till Verizon Wi-Fi Access. (Fel = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access. Ring oss på 800 922 0204. (Fel = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: Ett fel har uppstått i Verizon Wi-Fi Access-kontot. Ring oss på 800 922 0204. (Fel = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access är inte tillgängligt där du befinner dig. Försök igen senare eller anslut från en annan plats. (Fel = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access. Försök igen senare eller anslut från en annan plats."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access på grund av felet 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access på grund av felet 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Det går inte att ansluta till Verizon wifi Access om du befinner dig utanför Verizons täckningsområde."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Du prenumererar inte på Verizon wifi Access. Ring oss på 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Ett fel har uppstått i Verizon wifi Access-kontot. Ring oss på 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Du är redan ansluten till Verizon wifi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Det gick inte att ansluta till Verizon wifi Access. Ring oss på 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Ett fel har uppstått i Verizon wifi Access-kontot. Ring oss på 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon wifi Access är inte tillgängligt där du befinner dig. Försök igen senare eller anslut från en annan plats."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-sw/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-sw/strings.xml
index db2ad02..a7a9868 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-sw/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-sw/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Huwezi kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon ukiwa nje ya eneo la mtandao wa Verizon. (Hitilafu = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Hujajisajili kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya Akaunti yako ya huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Tayari umeunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. (Hitilafu = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya Akaunti yako ya huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Huduma ya Ufikiaji wa Wi-Fi ya Verizon haipatikani katika eneo lako. Jaribu tena baadaye au ujaribu ukiwa katika eneo tofauti. (Hitilafu = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. Jaribu tena baadaye au ujaribu ukiwa katika eneo tofauti."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon kutokana na hitilafu ya 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon kutokana na hitilafu ya 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Huwezi kuunganisha kwenye Ufikiaji wa Wi-Fi ya Verizon ukiwa nje ya eneo la mtandao wa Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Hujajisajili kwenye Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya Akaunti yako ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Tayari umeunganisha kwenye Ufikiaji wa Wi-Fi ya Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya Akaunti yako ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Ufikiaji wa Wi-Fi ya Verizon haupatikani katika eneo lako. Jaribu tena baadaye au ujaribu ukiwa katika eneo tofauti."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ta/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ta/strings.xml
index 78ae561..da08ad4 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ta/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ta/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon கவரேஜ் இல்லாத பகுதியில் Verizon Wi-Fi Accessஸுடன் இணைக்க முடியாது. (பிழை = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access சேவைக்கு நீங்கள் சந்தா பெறவில்லை. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் Verizon Wi-Fi Access கணக்கில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் ஏற்கெனவே இணைக்கப்பட்டுள்ளீர்கள். (பிழை = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் Verizon Wi-Fi Access கணக்கில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் பகுதியில் Verizon Wi-Fi Access சேவை கிடைக்கவில்லை. மீண்டும் முயலவும் அல்லது வேறு இடத்திலிருந்து முயலவும். (பிழை = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது. மீண்டும் முயலவும் அல்லது வேறு இடத்திலிருந்து முயலவும்."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 பிழை காரணமாக Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 பிழை காரணமாக Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon கவரேஜ் பகுதியைத் தாண்டி Verizon வைஃபை Accessஸுடன் இணைக்க முடியாது."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : நீங்கள் Verizon வைஃபை Accessஸிற்கு சந்தா செய்யவில்லை. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும்."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் Verizon வைஃபை Access கணக்கில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும்."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon வைஃபை Accessஸுடன் ஏற்கெனவே இணைப்பில் உள்ளீர்கள்."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon வைஃபை Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும்."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் Verizon வைஃபை Access கணக்கில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும்."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் பகுதிக்கு Verizon வைஃபை Access சேவை கிடைக்கவில்லை. மீண்டும் முயலவும் அல்லது வேறு இருப்பிடத்தில் இருந்து முயலவும்."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-te/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-te/strings.xml
index 6b52892..baf6d38 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-te/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-te/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు Verizon కవరేజీ ప్రాంతానికి వెలుపల నుండి Verizon Wi-Fi Accessకు కనెక్ట్ చేయలేరు. (ఎర్రర్ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు Verizon Wi-Fi Accessకు సబ్‌స్క్రయిబ్ చేసుకోలేదు. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : మీ Verizon Wi-Fi Access ఖాతాలో సమస్య ఉంది. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు ఇప్పటికే Verizon Wi-Fi Accessకు కనెక్ట్ చేయబడ్డారు. (ఎర్రర్ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessకు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : మీ Verizon Wi-Fi Access ఖాతాలో సమస్య ఉంది. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : మీ లొకేషన్ వద్ద Verizon Wi-Fi Access అందుబాటులో లేదు. తర్వాత మళ్లీ ట్రై చేయండి లేదా వేరే లొకేషన్ నుండి ట్రై చేయండి. (ఎర్రర్ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessకు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది. తర్వాత మళ్లీ ట్రై చేయండి లేదా వేరే లొకేషన్ నుండి ట్రై చేయండి."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 ఎర్రర్ కారణంగా మిమ్మల్ని Verizon Wi-Fi Accessకు కనెక్ట్ చేయడంలో సమస్య ఏర్పడింది."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 ఎర్రర్ కారణంగా మిమ్మల్ని Verizon Wi-Fi Accessకు కనెక్ట్ చేయడంలో సమస్య ఏర్పడింది."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessకు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు Verizon కవరేజీ ప్రాంతానికి వెలుపల నుండి Verizon Wi-Fi యాక్సెస్‌కు కనెక్ట్ చేయలేరు."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు Verizon Wi-Fi యాక్సెస్‌కు సభ్యత్వం పొందలేదు. 800-922-0204 నంబర్ వద్ద దయచేసి మాకు కాల్ చేయండి."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : మీ Verizon Wi-Fi యాక్సెస్ ఖాతాలో సమస్య ఉంది. 800-922-0204 నంబర్ వద్ద దయచేసి మాకు కాల్ చేయండి."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు ఇప్పటికే Verizon Wi-Fi యాక్సెస్‌కు కనెక్ట్ చేయబడ్డారు."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi యాక్సెస్‌కు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది. 800-922-0204 నంబర్ వద్ద దయచేసి మాకు కాల్ చేయండి."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : మీ Verizon Wi-Fi యాక్సెస్ ఖాతాలో సమస్య ఉంది. 800-922-0204 నంబర్ వద్ద దయచేసి మాకు కాల్ చేయండి."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : మీ లొకేషన్ వద్ద Verizon Wi-Fi యాక్సెస్ అందుబాటులో లేదు. తర్వాత మళ్లీ ప్రయత్నించండి లేదా వేరే లొకేషన్ నుండి ప్రయత్నించండి."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-th/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-th/strings.xml
index eb122d2..4a0b204 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-th/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-th/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : คุณไม่สามารถเชื่อมต่อกับ Verizon Wi-Fi Access จากนอกพื้นที่ให้บริการของ Verizon (ข้อผิดพลาด = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : คุณไม่ได้สมัครใช้บริการ Verizon Wi-Fi Access โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : บัญชี Verizon Wi-Fi Access ของคุณมีปัญหา โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : คุณเชื่อมต่อกับ Verizon Wi-Fi Access อยู่แล้ว (ข้อผิดพลาด = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : บัญชี Verizon Wi-Fi Access ของคุณมีปัญหา โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ไม่พร้อมให้บริการจากตำแหน่งของคุณ โปรดลองอีกครั้งในภายหลังหรือลองจากตำแหน่งอื่น (ข้อผิดพลาด = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access โปรดลองอีกครั้งในภายหลังหรือลองจากตำแหน่งอื่น"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access เนื่องจากข้อผิดพลาด 16384"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access เนื่องจากข้อผิดพลาด 16385"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : คุณเชื่อมต่อกับ Verizon Wi-Fi Access จากนอกพื้นที่ให้บริการของ Verizon ไม่ได้"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : คุณไม่ได้สมัครใช้บริการ Verizon Wi-Fi Access โปรดโทรหาเราที่ 800-922-0204"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : บัญชี Verizon Wi-Fi Access ของคุณมีปัญหา โปรดโทรหาเราที่ 800-922-0204"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : คุณเชื่อมต่อกับ Verizon Wi-Fi Access แล้ว"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access โปรดโทรหาเราที่ 800-922-0204"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : บัญชี Verizon Wi-Fi Access ของคุณมีปัญหา โปรดโทรหาเราที่ 800-922-0204"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ไม่พร้อมให้บริการจากตำแหน่งของคุณ โปรดลองอีกครั้งในภายหลังหรือลองจากตำแหน่งอื่น"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-tl/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-tl/strings.xml
index 04f5ca0..6bd4176 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-tl/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-tl/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi ka puwedeng kumonekta sa Verizon Wi-Fi Access mula sa labas ng lugar na saklaw ng Verizon. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi ka naka-subscribe sa Verizon Wi-Fi Access. Pakitawagan kami sa 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa iyong Verizon Wi-Fi Access account. Pakitawagan kami sa 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Nakakonekta ka na sa Verizon Wi-Fi Access. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access. Pakitawagan kami sa 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa iyong Verizon Wi-Fi Access account. Pakitawagan kami sa 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi available sa iyong lokasyon ang Verizon Wi-Fi Access. Subukan ulit sa ibang pagkakataon o subukan mula sa ibang lokasyon. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access. Subukan ulit sa ibang pagkakataon o subukan mula sa ibang lokasyon."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access dahil sa error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access dahil sa error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi ka puwedeng kumonekta sa Verizon Wi-Fi Access mula sa labas ng lugar na saklaw ng Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi ka naka-subscribe sa Verizon Wi-Fi Access. Pakitawagan kami sa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa iyong Verizon Wi-Fi Access account. Pakitawagan kami sa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Nakakonekta ka na sa Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access. Pakitawagan kami sa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa iyong Verizon Wi-Fi Access account. Pakitawagan kami sa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi available sa iyong lokasyon ang Verizon Wi-Fi Access. Subukan ulit sa ibang pagkakataon o subukan mula sa ibang lokasyon."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-tr/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-tr/strings.xml
index d45514b..c7fdd96 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-tr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-tr/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon\'ın kapsama alanının dışından Verizon Wi-Fi Access\'e bağlanamazsınız. (Hata = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access abonesi değilsiniz. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access hesabınızla ilgili bir sorun var. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e zaten bağlısınız. (Hata = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access hesabınızla ilgili bir sorun var. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access bulunduğunuz konumdan kullanılamıyor. Daha sonra tekrar deneyin veya farklı bir konumdan bağlanmaya çalışın. (Hata = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu. Daha sonra tekrar deneyin veya farklı bir konumdan bağlanmaya çalışın."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 hatası nedeniyle Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 hatası nedeniyle Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon\'ın kapsama alanının dışından Verizon Wi-Fi Access\'e bağlanamazsınız."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access abonesi değilsiniz. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access hesabınızla ilgili bir sorun var. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e zaten bağlısınız."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e bağlanırken bir sorun oluştu. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access hesabınızla ilgili bir sorun var. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access bulunduğunuz konumdan kullanılamıyor. Daha sonra tekrar deneyin veya farklı bir konumdan bağlanmaya çalışın."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-uk/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-uk/strings.xml
index 8c6b2f6..606e33c 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-uk/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-uk/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>: не можна підключитися до Verizon Wi-Fi Access за межами зони покриття Verizon. (Помилка = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>: у вас немає підписки на Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з вашим обліковим записом Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>: пристрій уже підключено до Verizon Wi-Fi Access. (Помилка = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з вашим обліковим записом Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>: сервіс Verizon Wi-Fi Access недоступний за вашим місцезнаходженням. Повторіть спробу пізніше або змініть місцезнаходження. (Помилка = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access. Повторіть спробу пізніше або змініть місцезнаходження."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з підключенням до Verizon Wi-Fi Access через помилку 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з підключенням до Verizon Wi-Fi Access через помилку 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>: не можна підключитися до Verizon Wi-Fi Access за межами зони покриття."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>: у вас немає підписки на Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з вашим обліковим записом Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>: пристрій уже підключено до Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з вашим обліковим записом Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>: сервіс Verizon Wi-Fi Access недоступний за вашим розташуванням. Повторіть спробу пізніше або змініть місцезнаходження."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-ur/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-ur/strings.xml
index 8dd0029..bce60f5 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-ur/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-ur/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ Verizon کوریج علاقے کے باہر سے Verizon Wi-Fi رسائی سے منسلک نہیں ہو سکتے۔ (خرابی = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ نے Verizon Wi-Fi رسائی کو سبسکرائب نہیں کیا ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کے Verizon Wi-Fi رسائی اکاؤنٹ کے ساتھ ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ پہلے سے ہی Verizon Wi-Fi رسائی سے منسلک ہیں۔ (خرابی = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کے Verizon Wi-Fi رسائی اکاؤنٹ کے ساتھ ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"‏<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi رسائی آپ کے مقام سے دستیاب نہیں ہے۔ بعد میں دوبارہ کوشش کریں یا دوسرے مقام سے کوشش کریں۔ (خرابی = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔ بعد میں دوبارہ کوشش کریں یا دوسرے مقام سے کوشش کریں۔"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"‏<xliff:g id="SSID">%1$s</xliff:g> : خرابی 16384 کی وجہ سے آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"‏<xliff:g id="SSID">%1$s</xliff:g> : خرابی 16385 کی وجہ سے آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ Verizon کوریج علاقہ کے باہر سے Verizon Wi-Fi رسائی کے لیے منسلک نہیں کر سکتے ہیں۔"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ Verizon Wi-Fi رسائی کے رکن نہیں ہیں۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کے Verizon Wi-Fi رسائی اکاؤنٹ کے ساتھ ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ پہلے سے ہی Verizon Wi-Fi رسائی سے منسلک ہیں۔"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کے Verizon Wi-Fi رسائی اکاؤنٹ کے ساتھ ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"‏<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi رسائی آپ کے مقام سے دستیاب نہیں ہے۔ بعد میں دوبارہ کوشش کریں یا دوسرے مقام سے کوشش کر کے دیکھیں۔"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-uz/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-uz/strings.xml
index 73d0548..d0b976d 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-uz/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-uz/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon qamrovidan tashqarida Verizon Wi-Fi Access xizmatiga ulana olmaysiz. (Xato = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga obuna boʻlmagansiz. 800-922-0204 raqamiga telefon qiling. (Xato = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hisobingiz bilan muammo bor. 800-922-0204 raqamiga telefon qiling. (Xato = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Allaqachon Verizon Wi-Fi Access xizmatiga ulangansiz. (Xato = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi. 800-922-0204 raqamiga telefon qiling. (Xato = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hisobingiz bilan muammo bor. 800-922-0204 raqamiga telefon qiling. (Xato = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access siz turgan joyda ishlamaydi. Keyinroq qayta urining yoki boshqa joydan urining. (Xato = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi. Keyinroq qayta urining yoki boshqa joydan urining."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 xatosi tufayli Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 xatosi tufayli Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon qamrovidan tashqarida Verizon Wi-Fi Access xizmatiga ulana olmaysiz."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga obuna boʻlmagansiz. 800-922-0204 raqamiga telefon qiling."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hisobingiz bilan muammo bor. 800-922-0204 raqamiga telefon qiling."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Allaqachon Verizon Wi-Fi Access xizmatiga ulangansiz."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi. 800-922-0204 raqamiga telefon qiling."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hisobingiz bilan muammo bor. 800-922-0204 raqamiga telefon qiling."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access siz turgan joyda ishlamaydi. Keyinroq qayta urining yoki boshqa joydan urining."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-vi/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-vi/strings.xml
index 789dc65..f67fb1b 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-vi/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-vi/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn không kết nối được với dịch vụ Truy cập Wi-Fi của Verizon từ bên ngoài khu vực phủ sóng của Verizon. (Lỗi = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn chưa đăng ký dịch vụ Truy cập Wi-Fi của Verizon. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố với tài khoản Truy cập Wi-Fi của Verizon mà bạn sử dụng. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn đã kết nối với dịch vụ Truy cập Wi-Fi của Verizon. (Lỗi = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố với tài khoản Truy cập Wi-Fi của Verizon mà bạn sử dụng. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Dịch vụ Truy cập Wi-Fi của Verizon chưa có ở vị trí của bạn. Hãy thử lại sau hoặc thử ở một vị trí khác. (Lỗi = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon. Hãy thử lại sau hoặc thử ở một vị trí khác."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon do lỗi 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon do lỗi 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn không thể kết nối với dịch vụ Truy cập Wi-Fi của Verizon từ bên ngoài khu vực phủ sóng của Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn chưa đăng ký dịch vụ Truy cập Wi-Fi của Verizon. Vui lòng gọi cho chúng tôi theo số 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố với tài khoản Truy cập Wi-Fi của Verizon mà bạn có. Vui lòng gọi cho chúng tôi theo số 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn đã kết nối với dịch vụ Truy cập Wi-Fi của Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon. Vui lòng gọi cho chúng tôi theo số 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố với tài khoản Truy cập Wi-Fi của Verizon mà bạn có. Vui lòng gọi cho chúng tôi theo số 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Không có dịch vụ Truy cập Wi-Fi của Verizon tại vị trí của bạn. Hãy thử lại sau hoặc thử ở một vị trí khác."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rCN/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rCN/strings.xml
index 3a11055..43fac58 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rCN/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rCN/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>:您无法从 Verizon 覆盖区域外的地点连接到 Verizon Wi-Fi Access。(错误 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>:您没有订阅 Verizon Wi-Fi Access。请拨打 800-922-0204 与我们联系。(错误 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帐号出现问题。请拨打 800-922-0204 与我们联系。(错误 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>:您已经连接到 Verizon Wi-Fi Access。(错误 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>:将您连接到 Verizon Wi-Fi Access 时出现问题。请拨打 800-922-0204 与我们联系。(错误 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帐号出现问题。请拨打 800-922-0204 与我们联系。(错误 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>:Verizon Wi-Fi Access 在您所在的地点无法使用。请稍后重试,或换个地点再试一次。(错误 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>:将您连接到 Verizon Wi-Fi Access 时出现问题。请稍后重试,或换个地点再试一次。"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>:由于错误 16384,将您连接到 Verizon Wi-Fi Access 时出现问题。"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>:由于错误 16385,将您连接到 Verizon Wi-Fi Access 时出现问题。"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>:将您连接到 Verizon Wi-Fi Access 时出现问题。"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>:您无法从 Verizon 覆盖区域外的地点连接到 Verizon WLAN Access。"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>:您没有订阅 Verizon WLAN Access。请拨打 800-922-0204 与我们联系。"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon WLAN Access 帐号出现问题。请拨打 800-922-0204 与我们联系。"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>:您已连接到 Verizon WLAN Access。"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>:将您连接到 Verizon WLAN Access 时出现问题。请拨打 800-922-0204 与我们联系。"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon WLAN Access 帐号出现问题。请拨打 800-922-0204 与我们联系。"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>:Verizon WLAN Access 在您所在的地点无法使用。请稍后重试,或换个地点再试一次。"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rHK/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rHK/strings.xml
index 395de88..159cc31 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rHK/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rHK/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g>:無法從 Verizon 訊號覆蓋範圍外的地點連線至 Verizon Wi-Fi Access (錯誤 = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g>:您未訂閱 Verizon Wi-Fi Access。請致電 800-922-0204 與我們聯絡 (錯誤 = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帳戶發生問題。請致電 800-922-0204 與我們聯絡 (錯誤 = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g>:您已連線至 Verizon Wi-Fi Access (錯誤 = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。請致電 800-922-0204 與我們聯絡 (錯誤 = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帳戶發生問題。請致電 800-922-0204 與我們聯絡 (錯誤 = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g>:您目前的所在地點無法使用 Verizon Wi-Fi Access,請稍後再試。您亦可換個地點,然後再試一次 (錯誤 = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。請稍後再試。您亦可換個地點,然後再試一次。"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g>:錯誤 16384 導致連線至 Verizon Wi-Fi Access 時發生問題。"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g>:錯誤 16385 導致連線至 Verizon Wi-Fi Access 時發生問題。"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>:無法從 Verizon 訊號覆蓋範圍外的地點連線至 Verizon Wi-Fi Access。"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>:您未訂閱 Verizon Wi-Fi Access。請致電 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帳戶發生問題。請致電 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>:您已連線至 Verizon Wi-Fi Access。"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。請致電 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帳戶發生問題。請致電 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>:您目前的所在地點無法使用 Verizon Wi-Fi Access,請稍後再試。您亦可換個地點,然後再試一次。"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rTW/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rTW/strings.xml
index 138b68d..bdcfb24 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rTW/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-zh-rTW/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : 無法在 Verizon 訊號涵蓋範圍之外的地點連線至 Verizon Wi-Fi Access (錯誤 = 32760)。"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : 你並未訂閱 Verizon Wi-Fi Access。請撥打 800-922-0204 與我們聯絡 (錯誤 = 32761)。"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : 你的 Verizon Wi-Fi Access 帳戶發生問題。請撥打 800-922-0204 與我們聯絡 (錯誤 = 32762)。"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : 你已連線至 Verizon Wi-Fi Access (錯誤 = 32763)。"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : 連線至 Verizon Wi-Fi Access 時發生問題,請撥打 800-922-0204 與我們聯絡 (錯誤 = 32764)。"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : 你的 Verizon Wi-Fi Access 帳戶發生問題。請撥打 800-922-0204 與我們聯絡 (錯誤 = 32765)。"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : 你目前的所在地點無法使用 Verizon Wi-Fi Access,請稍後再試。你也可以換個地點,然後再試一次 (錯誤 = 32766)。"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : 連線至 Verizon Wi-Fi Access 時發生問題,請稍後再試。你也可以換個地點,然後再試一次。"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : 發生錯誤 16384,因此無法連線至 Verizon Wi-Fi Access。"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : 發生錯誤 16385,因此無法連線至 Verizon Wi-Fi Access。"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : 連線至 Verizon Wi-Fi Access 時發生問題。"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g>:無法在 Verizon 訊號涵蓋範圍之外的地點連線至 Verizon Wi-Fi Access。"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g>:你並未訂閱 Verizon Wi-Fi Access。請撥打 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g>:你的 Verizon Wi-Fi Access 帳戶發生問題。請撥打 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g>:你已連線至 Verizon Wi-Fi Access。"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。請撥打 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g>:你的 Verizon Wi-Fi Access 帳戶發生問題。請撥打 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g>:你目前的所在地點無法使用 Verizon Wi-Fi Access,請稍後再試。你也可以換個地點,然後再試一次。"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004-zu/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004-zu/strings.xml
index f6febdc..e8c69e2 100644
--- a/service/ServiceWifiResources/res/values-mcc310-mnc004-zu/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004-zu/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="7899190980723541970">"<xliff:g id="SSID">%1$s</xliff:g> : Awukwazi ukuxhuma kukufinyelela kwi-Verizon Wi-Fi kusuka ngaphandle kwendawo yokufakwa ye-Verizon. (Iphutha = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="4502241555553812761">"<xliff:g id="SSID">%1$s</xliff:g> : Awubhalisele ukufinyelela kwi-Verizon Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="8636803855192974833">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga nge-akhawunti yakho yokufinyelela kwi-Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="2907148732721960554">"<xliff:g id="SSID">%1$s</xliff:g> : Usuxhumeke kakade kukufinyelela kwi-Verizon Wi-Fi. (Iphutha = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="7893339226278701313">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma kukufinyelela kwi-Verizon Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="280860840894726014">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga nge-akhawunti yakho yokufinyelela kwi-Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="8240516953105404383">"<xliff:g id="SSID">%1$s</xliff:g> : Ukufinyelela kwi-Verizon Wi-Fi akutholakali kusuka endaweni yakho. Zama futhi ngemuva kwesikhathi noma zama indawo ehlukile. (Iphutha = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="2748970858713796197">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma kukufinyelela kwi-Verizon Wi-Fi. Zama futhi ngemuva kwesikhathi noma zama indawo ehlukile."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="6940754993270246981"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="4532250424174893199"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="3188087130800435510">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma ekufinyeleleni kwi-Verizon Wi-Fi ngenxa yephutha elingu-16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="5914307659373687387">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma ekufinyeleleni kwi-Verizon Wi-Fi ngenxa yephutha elingu-16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4276024988348676667">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma kukufinyelela kwi-Verizon Wi-Fi."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="5711364720754353427">"<xliff:g id="SSID">%1$s</xliff:g> : Awukwazi ukuxhuma kukufinyelela kwi-Verizon Wi-Fi kusuka ngaphandle kwendawo yokufakwa ye-Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="7871615432524623339">"<xliff:g id="SSID">%1$s</xliff:g> : Awubhalisele ukufinyelela kwi-Verizon Wi-Fi. Sicela usishayele ucingo ku-800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="2994908156286205343">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga nge-akhawunti yakho yokufinyelela kwi-Wi-Fi. Sicela usishayele ucingo ku-800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="8051026304965697200">"<xliff:g id="SSID">%1$s</xliff:g> : Usuxhumeke kakade kukufinyelela kwi-Verizon Wi-Fi."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="7311904315070770780">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma kukufinyelela kwi-Verizon Wi-Fi. Sicela usishayele ucingo ku-800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="576968115890091383">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga nge-akhawunti yakho yokufinyelela kwi-Wi-Fi. Sicela usishayele ucingo ku-800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="895346637290649533">"<xliff:g id="SSID">%1$s</xliff:g> : Ukufinyelela kwi-Verizon Wi-Fi akutholakali kusuka endaweni yakho. Zama futhi ngemuva kwesikhathi noma zama indawo ehlukile."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc310-mnc004/strings.xml b/service/ServiceWifiResources/res/values-mcc310-mnc004/strings.xml
new file mode 100644
index 0000000..af976d4
--- /dev/null
+++ b/service/ServiceWifiResources/res/values-mcc310-mnc004/strings.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2020 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.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- A notification is shown when eap failure happens. It should be overridden by carrier-specific overlays. -->
+    <string name="wifi_eap_error_message_code_32760"><xliff:g id="ssid">%1$s</xliff:g> : You can\u2019t connect to Verizon Wi-Fi Access from outside the Verizon coverage area.</string>
+    <string name="wifi_eap_error_message_code_32761"><xliff:g id="ssid">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi Access. Please call us at 800-922-0204.</string>
+    <string name="wifi_eap_error_message_code_32762"><xliff:g id="ssid">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204.</string>
+    <string name="wifi_eap_error_message_code_32763"><xliff:g id="ssid">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi Access.</string>
+    <string name="wifi_eap_error_message_code_32764"><xliff:g id="ssid">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi Access. Please call us at 800-922-0204.</string>
+    <string name="wifi_eap_error_message_code_32765"><xliff:g id="ssid">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204.</string>
+    <string name="wifi_eap_error_message_code_32766"><xliff:g id="ssid">%1$s</xliff:g> : Verizon Wi-Fi Access is not available from your location. Try again later or try from a different location.</string>
+</resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-af/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-af/strings.xml
index 6f50c6d..8e63928 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-af/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-af/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Jy kan nie van buite Verizon se dekkingsgebied aan Verizon Wi-F Access koppel nie. (Fout = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Jy is nie op Verizon Wi-Fi Access ingeteken nie. Bel ons asseblief by 800-922-0204. (Fout = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Daar is \'n probleem met jou Verizon Wi-Fi Access-rekening. Bel ons asseblief by 800-922-0204. (Fout = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Jy is reeds aan Verizon Wi-Fi Access gekoppel. (Fout = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie. Bel ons asseblief by 800-922-0204. (Fout = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Daar is \'n probleem met jou Verizon Wi-Fi Access-rekening. Bel ons asseblief by 800-922-0204. (Fout = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access is nie in jou ligging beskikbaar nie. Probeer later weer of probeer van \'n ander ligging af. (Fout = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie. Probeer later weer of probeer van \'n ander ligging af."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie weens fout 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie weens fout 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Jy kan nie van buite Verizon se dekkingsgebied aan Verizon Wi-F Access koppel nie."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Jy is nie op Verizon Wi-Fi Access ingeteken nie. Bel ons asseblief by 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Daar is \'n probleem met jou Verizon Wi-Fi Access-rekening. Bel ons asseblief by 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Jy is reeds aan Verizon Wi-Fi Access gekoppel."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Kan jou nie aan Verizon Wi-Fi Access koppel nie. Bel ons asseblief by 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Daar is \'n probleem met jou Verizon Wi-Fi Access-rekening. Bel ons asseblief by 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access is nie in jou ligging beskikbaar nie. Probeer later weer of probeer van \'n ander ligging af."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-am/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-am/strings.xml
index 25e2be2..2079c9c 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-am/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-am/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>፦ የVerizon ሽፋን ካለው አካባቢ ውጭ ሆነው ከVerizon Wi-Fi መዳረሻ ጋር መገናኘት አይችሉም። (ስህተት = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>፦ ለVerizon Wi-Fi መዳረሻ ደንበኝነት አልተመዘገቡም። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>፦ የእርስዎ የVerizon Wi-Fi መዳረሻ መለያ ችግር አለበት። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>፦ አስቀድመው ከVerizon Wi-Fi መዳረሻ ጋር ተገናኝተዋል። (ስህተት = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>፦ እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>፦ የእርስዎ የVerizon Wi-Fi መዳረሻ መለያ ችግር አለበት። እባክዎ 800-922-0204 ላይ ይደውሉልን። (ስህተት = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>፦ የVerizon Wi-Fi መዳረሻ ከእርስዎ አካባቢ የሚገኝ አይደለም። በኋላ ላይ እንደገና ይሞክሩ ወይም ከተለየ አካባቢ ይሞክሩ። (ስህተት = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>፦ እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ። በኋላ ላይ እንደገና ይሞክሩ ወይም ከተለየ አካባቢ ይሞክሩ።"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>፦ በስህተት 16384 ምክንያት እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ።"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>፦ በስህተት 16385 ምክንያት እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ።"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>፦ እርስዎን ከVerizon Wi-Fi መዳረሻ ጋር ማገናኘት ላይ ችግር አለ።"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> ፦ የVerizon ሽፋን ካለው አካባቢ ውጭ ሆነው ከVerizon Wi-Fi Access ጋር መገናኘት አይችሉም።"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> ፦ ለVerizon Wi-Fi Access ደንበኝነት አልተመዘገቡም። እባክዎ 800-922-0204 ላይ ይደውሉልን።"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> ፦ የእርስዎ Verizon Wi-Fi Access መለያ ጋር ችግር አለበት። እባክዎ 800-922-0204 ላይ ይደውሉልን።"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> ፦ አስቀድመው ከVerizon Wi-Fi Access ጋር ተገናኝተዋል።"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> ፦ እርስዎን ከVerizon Wi-Fi Access ጋር ማገናኘት ላይ ችግር አለ። እባክዎ 800-922-0204 ላይ ይደውሉልን።"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> ፦ የእርስዎ Verizon Wi-Fi Access መለያ ጋር ችግር አለበት። እባክዎ 800-922-0204 ላይ ይደውሉልን።"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ከእርስዎ አካባቢ የሚገኝ አይደለም። በኋላ ላይ እንደገና ይሞክሩ ወይም ከተለየ አካባቢ ይሞክሩ።"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ar/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ar/strings.xml
index 3f5450b..3847e5c 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ar/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ar/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"‏<xliff:g id="SSID">%1$s</xliff:g>: لا يمكنك الاتصال بشبكة Verizon Wi-Fi Access من خارج نطاق تغطية Verizon. (الخطأ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"‏<xliff:g id="SSID">%1$s</xliff:g>: لم تشترك في Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة في حسابك على Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"‏<xliff:g id="SSID">%1$s</xliff:g>: سبق واتصلت بشبكة Verizon Wi-Fi Access. (الخطأ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة في حسابك على Verizon Wi-Fi Access. يُرجى الاتصال بنا على الرقم ‎800-922-0204. (الخطأ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"‏<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access غير متاح في موقعك الجغرافي. يُرجى إعادة المحاولة لاحقًا أو المحاولة من موقع جغرافي مختلف. (الخطأ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access. يُرجى إعادة المحاولة لاحقًا أو المحاولة من موقع جغرافي مختلف."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء الاتصال بشبكة Verizon Wi-Fi Access بسبب الخطأ رقم 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء الاتصال بشبكة Verizon Wi-Fi Access بسبب الخطأ رقم 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"‏<xliff:g id="SSID">%1$s</xliff:g>: حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"‏<xliff:g id="SSID">%1$s</xliff:g> : لا يمكنك الاتصال بشبكة Verizon Wi-Fi Access من خارج نطاق تغطية Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"‏<xliff:g id="SSID">%1$s</xliff:g> : لم تشترك في Verizon Wi-Fi Access. يُرجى الاتصال بالرقم ‎800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"‏<xliff:g id="SSID">%1$s</xliff:g> : حدثت مشكلة في حسابك على Verizon Wi-Fi Access. يُرجى الاتصال بالرقم ‎800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"‏<xliff:g id="SSID">%1$s</xliff:g> : سبق واتصلت بشبكة Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"‏<xliff:g id="SSID">%1$s</xliff:g> : حدثت مشكلة أثناء اتصالك بشبكة Verizon Wi-Fi Access. يُرجى الاتصال بالرقم ‎800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"‏<xliff:g id="SSID">%1$s</xliff:g> : حدثت مشكلة في حسابك على Verizon Wi-Fi Access. يُرجى الاتصال بالرقم ‎800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"‏<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access غير متاح في موقعك الجغرافية. يُرجى إعادة المحاولة لاحقًا أو المحاولة من موقع جغرافي مختلف."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-as/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-as/strings.xml
index 320f9fe..628851d 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-as/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-as/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি Verizonৰ ক’ভাৰেকজ ক্ষেত্ৰৰ বাহিৰৰ পৰা Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰিব নোৱাৰে। (আসোঁৱাহ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি Verizon Wi-Fi Access ছাবস্ক্ৰাইব কৰা নাই। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাৰ Verizon Wi-Fi Access একাউণ্টটোত কিবা সমস্যা আছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি ইতিমধ্যে Verizon Wi-Fi Accessৰ সৈতে সংযুক্ত হৈ আছে। (আসোঁৱাহ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাৰ Verizon Wi-Fi Access একাউণ্টটোত কিবা সমস্যা আছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক। (আসোঁৱাহ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access আপোনাৰ অৱস্থানৰ পৰা উপলব্ধ নহয়। পাছত পুনৰ চেষ্টা কৰক অথবা এটা বেলেগ অৱস্থানৰ পৰা চেষ্টা কৰক। (আসোঁৱাহ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে। পাছত পুনৰ চেষ্টা কৰক অথবা এটা বেলেগ অৱস্থানৰ পৰা চেষ্টা কৰক।"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : আসোঁৱাহ 16384ৰ বাবে আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে।"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : আসোঁৱাহ 16385ৰ বাবে আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে।"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে।"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি Verizon কভাৰেজ ক্ষেত্ৰৰ বাহিৰৰ পৰা Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰিব নোৱাৰে।"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি Verizon Wi-Fi Access ছাবস্ক্ৰাইব কৰা নাই। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক।"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাৰ Verizon Wi-Fi Access একাউণ্টটোত কিবা সমস্যা আছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক।"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : আপুনি ইতিমধ্যে Verizon Wi-Fi Accessৰ সৈতে সংযুক্ত হৈ আছে।"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাক Verizon Wi-Fi Accessৰ সৈতে সংযোগ কৰাত এটা সমস্যা হৈছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক।"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : আপোনাৰ Verizon Wi-Fi Access একাউণ্টটোত কিবা সমস্যা আছে। অনুগ্ৰহ কৰি ৮০০-৯২২-০২০৪ নম্বৰটোত আমালৈ কল কৰক।"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access আপোনাৰ অৱস্থানৰ পৰা উপলব্ধ নহয়। পাছত পুনৰ চেষ্টা কৰক অথবা এটা বেলেগ অৱস্থানৰ পৰা চেষ্টা কৰক।"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-az/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-az/strings.xml
index f9dad8c..8f8e630 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-az/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-az/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon əhatə dairəsindən kənarda Verizon Wi-Fi Access\'ə qoşula bilməzsiniz. (Xəta = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ə abunə olmamısınız. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hesabınız ilə bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Artıq Verizon Wi-Fi Access\'ə qoşulmusunuz. (Xəta = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hesabınız ilə bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin. (Xəta = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access məkanınızdan əlçatan deyil. Sonra cəhd edin, ya da fərqli məkandan yoxlayın. (Xəta = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var. Sonra cəhd edin, ya da fərqli məkandan yoxlayın."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 saylı xətaya görə Verizon Wi-Fi Access\'ə qoşmaq olmur."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 saylı xətaya görə Verizon Wi-Fi Access\'ə qoşmaq olmur."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon əhatə dairəsindən kənarda Verizon Wi-Fi Access\'ə qoşula bilməzsiniz."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ə abunə olmamısınız. 800-922-0204 nömrəsini yığaraq bizə zəng edin."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hesabınız ilə bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Artıq Verizon Wi-Fi Access\'ə qoşulmusunuz."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Sizi Verizon Wi-Fi Access\'ə qoşmaqla bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hesabınız ilə bağlı problem var. 800-922-0204 nömrəsini yığaraq bizə zəng edin."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access məkanınızdan əlçatan deyil. Sonra cəhd edin, ya da fərqli məkandan yoxlayın."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-b+sr+Latn/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-b+sr+Latn/strings.xml
index 9507cda..2a2b342 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-b+sr+Latn/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-b+sr+Latn/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete da se povežete na Verizon WiFi Access van oblasti koju Verizon pokriva. (Greška = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na Verizon Wi-Fi Access. Pozovite nas na 800 922 0204. (Greška = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon Wi-Fi Access nalogom. Pozovite nas na 800 922 0204. (Greška = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani na Verizon WiFi Access. (Greška = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon Wi-Fi Access. Pozovite nas na 800 922 0204. (Greška = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon Wi-Fi Access nalogom. Pozovite nas na 800 922 0204. (Greška = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nije dostupan sa vaše lokacije. Probajte ponovo kasnije ili probajte sa neke druge lokacije. (Greška = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon Wi-Fi Access. Probajte ponovo kasnije ili probajte sa neke druge lokacije."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access zbog greške 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access zbog greške 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete da se povežete na Verizon WiFi Access van oblasti koju Verizon pokriva."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na Verizon WiFi Access. Pozovite nas na 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon WiFi Access nalogom. Pozovite nas na 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani na Verizon WiFi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Postoji problem pri povezivanju na Verizon WiFi Access. Pozovite nas na 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema u vezi sa Verizon WiFi Access nalogom. Pozovite nas na 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon WiFi Access nije dostupan sa vaše lokacije. Probajte ponovo kasnije ili probajte sa neke druge lokacije."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-be/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-be/strings.xml
index 65a9812..aca4186 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-be/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-be/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : вы не можаце падключыцца да Verizon Wi-Fi Access, калі не знаходзіцеся ў зоне пакрыцця Verizon. (Памылка = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : вы не падпісаны на Verizon Wi-Fi Access. Пазваніце нам па нумары 800-922-0204. (Памылка = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з вашым уліковым запісам Verizon Wi-Fi Access. Пазваніце нам па нумары 800-922-0204. (Памылка = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : вы ўжо падключаны да Verizon Wi-Fi Access. (Памылка = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з падключэннем да Verizon Wi-Fi Access. Пазваніце нам па нумары 800-922-0204. (Памылка = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з вашым уліковым запісам Verizon Wi-Fi Access. Пазваніце нам па нумары 800-922-0204. (Памылка = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : з месца, дзе вы знаходзіцеся, няма доступу да Verizon Wi-Fi Access. Паўтарыце спробу пазней або змяніце месцазнаходжанне. (Памылка = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з падключэннем да Verizon Wi-Fi Access. Паўтарыце спробу пазней або змяніце месцазнаходжанне."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : праз памылку 16384 узнікла праблема з падключэннем да Verizon Wi-Fi Access."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : праз памылку 16385 узнікла праблема з падключэннем да Verizon Wi-Fi Access."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : узнікла праблема з падключэннем да Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : вы не можаце падключыцца да Verizon Wi-Fi Access, калі не знаходзіцеся ў зоне пакрыцця Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : вы не падпісаны на Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : ёсць праблема з вашым уліковым запісам Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : вы ўжо падключаны да Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : ёсць праблема з падключэннем да Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : ёсць праблема з вашым уліковым запісам Verizon Wi-Fi Access. Выклікайце нас па нумары 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : з месца, дзе вы знаходзіцеся, няма доступу да Verizon Wi-Fi Access. Паўтарыце спробу пазней або змяніце месцазнаходжанне."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-bg/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-bg/strings.xml
index 1bb327c..6a1df50 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-bg/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-bg/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: Не можете да се свържете с Verizon Wi-Fi Access извън района на покритие на Verizon. (Грешка 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: Нямате абонамент за Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем с профила ви във Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: Вече сте установили връзка с Verizon Wi-Fi Access. (Грешка 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем с профила ви във Verizon Wi-Fi Access. Моля, обадете ни се на 800-922-0204. (Грешка 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access не се предлага за местоположението ви. Опитайте отново по-късно или от друго местоположение. (Грешка 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access. Опитайте отново по-късно или от друго местоположение."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access поради грешка 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access поради грешка 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: Не можете да се свържете с Verizon Wi-Fi Access извън района на покритие на Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: Нямате абонамент за Verizon Wi-Fi Access. Моля, обадете ни се на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем с профила ви във Verizon Wi-Fi Access. Моля, обадете ни се на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: Вече сте установили връзка с Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем при свързването с Verizon Wi-Fi Access. Моля, обадете ни се на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: Възникна проблем с профила ви във Verizon Wi-Fi Access. Моля, обадете ни се на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access не се предлага за местоположението ви. Опитайте отново по-късно или от друго местоположение."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-bn/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-bn/strings.xml
index beed7a4..5af5cde 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-bn/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-bn/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon-এর কভারেজ এলাকার বাইরে থেকে আপনি Verizon Wi-Fi Access-এ কানেক্ট করতে পারবেন না। (সমস্যা = ৩২৭৬০)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : আপনি Verizon Wi-Fi Access-এ সাবস্ক্রাইব করেননি। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন। (সমস্যা = ৩২৭৬১)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access অ্যাকাউন্ট নিয়ে কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন। (সমস্যা = ৩২৭৬২)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : আপনি আগেই Verizon Wi-Fi Access-এ কানেক্ট করেছেন। (সমস্যা = ৩২৭৬৩)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-এর সাথে কানেক্ট করার সময় কিছু সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন। (সমস্যা = ৩২৭৬৪)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access অ্যাকাউন্ট নিয়ে কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন। (সমস্যা = ৩২৭৬৫)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার লোকেশনে Verizon Wi-Fi Access উপলভ্য নেই। পরে আবার চেষ্টা করুন বা অন্য লোকেশন থেকে চেষ্টা করুন। (সমস্যা = ৩২৭৬৬)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-এর সাথে কানেক্ট করার সময় কিছু সমস্যা হয়েছে। পরে আবার চেষ্টা করুন বা অন্য লোকেশন থেকে চেষ্টা করুন।"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : ১৬৩৮৪ সমস্যার জন্য Verizon Wi-Fi Access-এর সাথে আপনাকে কানেক্ট করা যাচ্ছে না।"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : ১৬৩৮৫ সমস্যার জন্য Verizon Wi-Fi Access-এর সাথে আপনাকে কানেক্ট করা যাচ্ছে না।"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access-এর সাথে কানেক্ট করার সময় কিছু সমস্যা হয়েছে।"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon কভারেজ এলাকার বাইরে আপনি Verizon Wi-Fi Access-এর সাথে কানেক্ট করতে পারবেন না।"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : আপনি Verizon Wi-Fi Access সাবস্ক্রাইব করেননি। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন।"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access অ্যাকাউন্ট নিয়ে কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন।"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : আপনি আগে থেকে Verizon Wi-Fi Access-এর সাথে কানেক্ট করেছেন।"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access-এর সাথে কানেক্ট করতে কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন।"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার Verizon Wi-Fi Access অ্যাকাউন্ট নিয়ে কোনও সমস্যা হয়েছে। ৮০০-৯২২-০২০৪ নম্বরে যোগাযোগ করুন।"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : আপনার লোকেশনে Verizon Wi-Fi Access উপলভ্য নেই। পরে আবার চেষ্টা করুন বা অন্য লোকেশন থেকে চেষ্টা করুন।"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-bs/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-bs/strings.xml
index 070c713..53a5469 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-bs/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-bs/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete se povezati s WiFi pristupom Verizonu izvan područja pokrivenosti Verizona. (Greška = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na WiFi pristup Verizonu. Pozovite nas na broj 800 922 0204. (Greška = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema s vašim računom za WiFi pristup Verizonu. Pozovite nas na broj 800 922 0204. (Greška = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani s WiFi pristupom Verizonu. (Greška = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema pri povezivanju s WiFi pristupom Verizonu. Pozovite nas na broj 800 922 0204. (Greška = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema s vašim računom za WiFi pristup Verizonu. Pozovite nas na broj 800 922 0204. (Greška = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : WiFi pristup Verizonu nije dostupan s vaše lokacije. Pokušajte ponovo kasnije ili pokušajte s druge lokacije. (Greška = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema pri povezivanju s WiFi pristupom Verizonu. Pokušajte ponovo kasnije ili pokušajte s druge lokacije."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema kod povezivanja za WiFi pristup Verizonu zbog greške 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema kod povezivanja za WiFi pristup Verizonu zbog greške 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema pri povezivanju s WiFi pristupom Verizonu."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Ne možete se povezati s WiFi pristupom Verizonu izvan područja pokrivenosti Verizona."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Niste pretplaćeni na WiFi pristup Verizonu. Pozovite nas na broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema s vašim računom za WiFi pristup Verizonu. Pozovite nas na broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Već ste povezani s WiFi pristupom Verizonu."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema pri povezivanju s WiFi pristupom Verizonu. Pozovite nas na broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Došlo je do problema s vašim računom za WiFi pristup Verizonu. Pozovite nas na broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : WiFi pristup Verizonu nije dostupan s vaše lokacije. Pokušajte ponovo kasnije ili pokušajte s druge lokacije."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ca/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ca/strings.xml
index a09db18..ed77d7f 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ca/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ca/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: no et pots connectar a Verizon Wi‑Fi Access des de fora de l\'àrea de cobertura de Verizon. (Error: 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: no estàs subscrit a Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema amb el teu compte de Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: ja estàs connectat a Verizon Wi‑Fi Access. (Error: 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema amb el teu compte de Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204. (Error: 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi‑Fi Access no està disponible des de la teva ubicació. Torna-ho a provar més tard o bé des d\'una altra ubicació. (Error: 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access. Torna-ho a provar més tard o bé des d\'una altra ubicació."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access a causa de l\'error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access a causa de l\'error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: no et pots connectar a Verizon Wi‑Fi Access des de fora de l\'àrea de cobertura de Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: no estàs subscrit a Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema amb el teu compte de Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: ja estàs connectat a Verizon Wi‑Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema en connectar-te a Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: hi ha un problema amb el teu compte de Verizon Wi‑Fi Access. Truca\'ns al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi‑Fi Access no està disponible des de la teva ubicació. Torna-ho a provar més tard o bé des d\'una altra ubicació."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-cs/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-cs/strings.xml
index 3661cfb..b9a72e9 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-cs/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-cs/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: K síti Verizon Wi-Fi Access se nelze připojit mimo dosah pokrytí společnosti Verizon. (Chyba = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: Síť Verizon Wi-Fi Access nemáte předplacenou. Zavolejte nám na číslo 800-922-0204. (Chyba = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: U vašeho účtu Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204. (Chyba = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: K síti Verizon Wi-Fi Access jste už připojeni. (Chyba = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204. (Chyba = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: U vašeho účtu Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204. (Chyba = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ve vaší oblasti není k dispozici. Zkuste to později nebo z jiného místa. (Chyba = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému. Zkuste to později nebo z jiného místa."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému kvůli chybě 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému kvůli chybě 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: K síti Verizon Wi-Fi Access se nelze připojit mimo dosah pokrytí společnosti Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: Síť Verizon Wi-Fi Access nemáte předplacenou. Zavolejte nám na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: U vašeho účtu Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: K síti Verizon Wi-Fi Access jste už připojeni."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: Při připojování k síti Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: U vašeho účtu Verizon Wi-Fi Access došlo k problému. Zavolejte nám na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ve vaší oblasti není k dispozici. Zkuste to později nebo z jiného místa."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-da/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-da/strings.xml
index c274643..d7180f4 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-da/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-da/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access uden for Verizons dækningsområde (fejl = 32760)."</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: Du abonnerer ikke på Verizon Wi-Fi Access. Ring til os på telefonnummer 800-922-0204 (fejl = 32761)."</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: Der er et problem med din Verizon Wi-Fi Access-konto. Ring til os på telefonnummer 800-922-0204 (fejl = 32762)."</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: Du har allerede oprettet forbindelse til Verizon Wi-Fi Access (fejl = 32763)."</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access. Ring til os på telefonnummer 800-922-0204 (fejl = 32764)."</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: Der er et problem med din Verizon Wi-Fi Access-konto. Ring til os på telefonnummer 800-922-0204 (fejl = 32765)."</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access er ikke tilgængeligt i dit område. Prøv igen senere eller fra en anden placering (fejl = 32766)."</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access. Prøv igen senere eller fra en anden placering."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access på grund af fejlen 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access på grund af fejlen 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan ikke oprette forbindelse til Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Du kan ikke oprette forbindelse til Verizon Wi-Fi Access uden for Verizons dækningsområde."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Du abonnerer ikke på Verizon Wi-Fi Access. Ring til os på telefonnummer 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Der er et problem med din Verizon Wi-Fi Access-konto. Ring til os på telefonnummer 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Du har allerede oprettet forbindelse til Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Du kan ikke oprette forbindelse til Verizon Wi-Fi Access. Ring til os på telefonnummer 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Der er et problem med din Verizon Wi-Fi Access-konto. Ring til os på telefonnummer 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access er ikke tilgængeligt i dit område. Prøv igen senere eller fra en anden lokation."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-de/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-de/strings.xml
index 1a352a2..03cf13f 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-de/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-de/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: Eine Verbindung mit Verizon Wi-Fi Access ist außerhalb der Abdeckung von Verizon nicht möglich. (Fehler = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: Du bist nicht bei Verizon Wi-Fi Access angemeldet. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: Es gibt ein Problem mit deinem Verizon Wi-Fi Access-Konto. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: Du bist bereits mit Verizon Wi-Fi Access verbunden. (Fehler = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: Es gibt ein Problem mit deinem Verizon Wi-Fi Access-Konto. Bitte ruf uns unter 800-922-0204 an. (Fehler = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ist an deinem Standort nicht verfügbar. Du kannst es noch einmal später oder von einem anderen Standort aus versuchen. (Fehler = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden. Du kannst es noch einmal später oder von einem anderen Standort aus versuchen."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: Aufgrund von Fehler 16384 kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: Aufgrund von Fehler 16385 kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Eine Verbindung mit Verizon Wi-Fi Access ist außerhalb der Abdeckung von Verizon nicht möglich."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Du bist nicht bei Verizon Wi-Fi Access angemeldet. Bitte ruf uns unter 800-922-0204 an."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Es gibt ein Problem mit deinem Verizon Wi-Fi Access-Konto. Bitte ruf uns unter 800-922-0204 an."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Du bist bereits mit Verizon Wi-Fi Access verbunden."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Es kann keine Verbindung zu Verizon Wi-Fi Access hergestellt werden. Bitte ruf uns unter 800-922-0204 an."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Es gibt ein Problem mit deinem Verizon Wi-Fi Access-Konto. Bitte ruf uns unter 800-922-0204 an."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ist an deinem Standort nicht verfügbar. Du kannst es später noch einmal oder von einem anderen Standort aus versuchen."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-el/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-el/strings.xml
index 1828a7d..4fd73d9 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-el/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-el/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Δεν μπορείτε να συνδεθείτε στο Verizon Wi-Fi Access εκτός της περιοχής κάλυψης της Verizon. (Σφάλμα = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Δεν έχετε εγγραφεί στο Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τον λογαριασμό σας Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Έχετε συνδεθεί ήδη με το Verizon Wi-Fi Access. (Σφάλμα = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τον λογαριασμό σας Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204. (Σφάλμα = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Το Verizon Wi-Fi Access δεν είναι διαθέσιμο από την τοποθεσία σας. Δοκιμάστε ξανά αργότερα ή από διαφορετική τοποθεσία. (Σφάλμα = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access. Δοκιμάστε ξανά αργότερα ή από διαφορετική τοποθεσία."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access λόγω του σφάλματος 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access λόγω του σφάλματος 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Δεν μπορείτε να συνδεθείτε στο Verizon Wi-Fi Access εκτός της περιοχής κάλυψης της Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Δεν έχετε εγγραφεί στο Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τον λογαριασμό σας Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Έχετε συνδεθεί ήδη με το Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τη σύνδεση στο Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Υπάρχει πρόβλημα με τον λογαριασμό σας Verizon Wi-Fi Access. Καλέστε μας στον αριθμό 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Το Verizon Wi-Fi Access δεν είναι διαθέσιμο από την τοποθεσία σας. Δοκιμάστε ξανά αργότερα ή δοκιμάστε από διαφορετική τοποθεσία."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rAU/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rAU/strings.xml
index 30f57c8..ba92eb8 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rAU/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rAU/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rCA/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rCA/strings.xml
index 30f57c8..ba92eb8 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rCA/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rCA/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rGB/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rGB/strings.xml
index 30f57c8..ba92eb8 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rGB/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rGB/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rIN/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rIN/strings.xml
index 30f57c8..ba92eb8 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rIN/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rIN/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Try again later or try from a different location."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access due to error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : You can’t connect to Verizon Wi-Fi access from outside the Verizon coverage area."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi access. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi access account. Please call us on 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi access is not available from your location. Try again later or try from a different location."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rXC/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rXC/strings.xml
index f366750..72fb542 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rXC/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-en-rXC/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‎‏‎‏‎‎‎‏‎‎‎‎‎‏‏‏‎‏‏‎‏‏‎‎‏‏‏‏‏‎‎‎‎‏‎‎‏‏‎‏‏‎‎‎‏‏‎‏‏‎‏‎‎‎‎‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You can’t connect to Verizon Wi-Fi Access from outside the Verizon coverage area. (Error = 32760)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‏‎‎‏‏‏‏‏‎‏‏‏‏‎‎‏‎‎‎‎‎‏‎‎‎‎‎‎‏‎‎‎‏‏‏‏‎‎‎‏‎‎‏‎‎‏‏‏‏‎‎‎‏‎‏‎‎‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You are not subscribed to Verizon Wi-Fi Access. Please call us at 800-922-0204. (Error = 32761)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‎‎‎‏‎‏‏‏‎‎‏‏‎‎‎‏‎‎‏‎‏‏‎‎‎‏‎‎‏‎‏‏‏‎‎‏‏‎‎‏‎‎‏‏‏‎‎‏‏‎‎‏‎‏‏‏‏‏‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204. (Error = 32762)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‏‏‎‏‏‎‏‎‎‏‎‏‎‎‏‏‏‏‎‎‏‎‏‏‎‎‏‎‎‏‎‎‎‎‏‏‏‎‎‎‏‏‎‏‏‎‎‎‎‏‎‏‏‎‏‏‎‏‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You are already connected to Verizon Wi-Fi Access. (Error = 32763)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‏‏‎‏‏‏‏‎‏‎‎‎‎‎‏‏‎‏‎‎‎‏‏‏‏‏‏‎‎‏‏‏‏‏‏‎‏‎‏‏‎‏‎‏‎‏‏‏‎‎‎‏‎‏‎‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access. Please call us at 800-922-0204. (Error = 32764)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‎‎‎‏‎‏‎‎‎‎‎‏‎‎‏‎‎‎‏‎‎‎‏‎‎‎‏‎‎‏‎‎‎‎‏‏‏‎‏‏‏‏‎‎‎‎‏‎‎‏‎‏‏‎‏‎‎‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204. (Error = 32765)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‏‎‏‏‏‎‏‎‏‏‎‎‎‏‏‏‏‎‎‏‎‏‎‏‎‏‏‎‎‏‎‏‎‎‎‎‏‎‎‎‏‎‎‏‏‏‎‏‎‎‏‏‏‎‎‎‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : Verizon Wi-Fi Access is not available from your location. Try again later or try from a different location. (Error = 32766)‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‏‎‎‎‏‎‏‏‎‏‏‎‏‏‏‏‎‎‏‎‏‎‏‎‏‎‎‏‏‏‎‏‎‏‏‎‎‎‎‎‏‎‎‏‎‏‎‎‏‎‏‏‏‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access. Try again later or try from a different location.‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‏‏‎‏‎‎‎‏‎‏‎‎‏‏‎‎‎‏‎‎‏‏‎‏‎‎‎‎‏‏‏‎‎‏‏‎‏‏‎‏‎‎‎‎‎‎‏‎‎‏‏‏‎‎‏‏‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access due to error 16384.‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‏‏‎‏‏‎‏‏‎‎‏‎‎‏‏‎‏‎‎‎‏‎‎‏‏‏‏‎‎‎‎‎‏‎‏‏‎‏‏‎‏‎‏‎‏‏‎‏‏‏‎‎‏‏‎‎‏‎‏‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access due to error 16385.‎‏‎‎‏‎"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‏‎‎‎‎‏‏‏‎‏‏‎‏‏‏‎‏‏‏‎‏‎‎‎‎‏‎‎‎‏‏‎‎‏‏‏‏‎‏‎‏‏‎‏‎‎‏‏‎‎‏‏‎‏‏‏‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‏‎‏‏‏‎‎‏‏‏‎‏‏‎‎‏‎‏‎‏‎‎‏‏‏‏‏‎‎‏‎‎‎‏‎‏‏‏‏‎‏‎‎‎‎‏‎‎‏‏‏‏‎‎‎‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You can’t connect to Verizon Wi-Fi Access from outside the Verizon coverage area.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‏‎‏‏‏‎‎‏‏‏‏‏‏‎‏‏‏‏‏‏‎‎‎‏‎‎‎‎‏‎‏‏‎‏‏‎‎‏‎‏‏‏‏‎‎‏‎‏‎‏‏‏‎‏‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You are not subscribed to Verizon Wi-Fi Access. Please call us at 800-922-0204.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‏‏‎‎‏‎‎‏‏‏‎‎‎‎‏‎‎‎‏‎‎‎‎‏‎‏‏‎‏‏‏‎‎‎‎‏‏‎‏‏‏‏‎‎‏‏‎‎‎‏‎‎‏‎‏‎‏‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‏‎‎‎‎‎‏‏‏‏‏‏‏‎‏‏‎‎‎‎‏‏‎‎‎‎‏‎‎‏‎‎‏‎‎‏‏‏‏‎‏‎‏‎‎‏‏‎‏‏‏‏‏‏‏‎‏‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : You are already connected to Verizon Wi-Fi Access.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‏‏‎‏‏‎‏‎‎‎‎‏‏‎‎‎‎‏‎‎‏‎‎‏‏‏‎‎‎‎‎‎‎‏‎‎‎‏‏‏‏‎‎‎‏‎‎‎‎‏‏‎‏‎‏‏‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem connecting you to Verizon Wi-Fi Access. Please call us at 800-922-0204.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‎‎‏‎‏‏‏‏‎‎‏‎‎‎‏‏‎‏‎‎‎‏‎‎‎‎‏‎‎‎‏‏‏‏‎‏‏‎‎‎‎‎‎‎‎‎‏‎‎‎‏‏‎‎‏‎‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204.‎‏‎‎‏‎"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‏‏‎‎‎‎‏‏‎‎‏‎‎‎‏‎‏‏‎‏‎‏‏‏‎‎‏‏‎‏‎‎‏‎‎‏‎‏‏‏‏‎‏‏‎‎‎‎‎‎‏‎‎‏‏‏‎‎‎‏‎‎‏‏‎<xliff:g id="SSID">%1$s</xliff:g>‎‏‎‎‏‏‏‎ : Verizon Wi-Fi Access is not available from your location. Try again later or try from a different location.‎‏‎‎‏‎"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-es-rUS/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-es-rUS/strings.xml
index 25b8739..e87cf2a 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-es-rUS/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-es-rUS/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: No te puedes conectar a Verizon Wi-Fi Access si te encuentras fuera del área de cobertura de Verizon. (Error: 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: No te suscribiste a Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: Hay un problema con tu cuenta de Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: Ya te conectaste a Verizon Wi-Fi Access. (Error: 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Se produjo un error al conectarte a Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: Hay un problema con tu cuenta de Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204. (Error: 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access no está disponible en tu ubicación. Vuelve a intentarlo más tarde o en una ubicación diferente. (Error: 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Se produjo un error al conectarte a Verizon Wi-Fi Access. Vuelve a intentarlo más tarde o en una ubicación diferente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: No se pudo establecer la conexión a Verizon Wi-Fi Access debido al error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: No se pudo establecer la conexión a Verizon Wi-Fi Access debido al error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Se produjo un error al conectarte a Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : No te puedes conectar a Verizon Wi-Fi Access si te encuentras fuera del área de cobertura de Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : No te suscribiste a Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Hay un problema con tu cuenta de Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Ya te conectaste a Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Se produjo un error al conectarte a Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Hay un problema con tu cuenta de Verizon Wi-Fi Access. Comunícate con nosotros al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access no está disponible en tu ubicación. Vuelve a intentarlo más tarde o en una ubicación diferente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-es/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-es/strings.xml
index 6f88fc9..86e5e98 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-es/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-es/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: no puedes conectarte a Verizon Wi‑Fi Access si no estás en el área de cobertura de Verizon. Error: 32760."</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: no tienes una suscripción a Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32761."</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: hay un problema con tu cuenta de Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32762."</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: ya te has conectado a Verizon Wi‑Fi Access. Error: 32763."</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32764."</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: hay un problema con tu cuenta de Verizon Wi‑Fi Access. Llámanos al 800-922-0204. Error: 32765."</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi‑Fi Access no está disponible en tu ubicación. Inténtalo de nuevo más tarde o cuando estés en otro sitio. Error: 32766."</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access. Inténtalo de nuevo más tarde o cuando estés en otro sitio."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access debido a un error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access debido a un error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: no se te ha podido conectar a Verizon Wi‑Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: no puedes conectarte a Verizon Wi‑Fi Access si no estás en el área de cobertura de Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: no tienes una suscripción a Verizon Wi‑Fi Access. Llámanos al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: hay un problema con tu cuenta de Verizon Wi‑Fi Access. Llámanos al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: ya te has conectado a Verizon Wi‑Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: no se ha podido conectar a Verizon Wi‑Fi Access. Llámanos al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: hay un problema con tu cuenta de Verizon Wi‑Fi Access. Llámanos al 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi‑Fi Access no está disponible en tu ubicación. Inténtalo de nuevo más tarde o cuando estés en otro sitio."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-et/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-et/strings.xml
index f5f78ed..08c9e49 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-et/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-et/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: te ei saa väljaspool Verizoni leviala Verizon Wi-Fi Accessiga ühendust luua. (Viga = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: te ei ole Verizon Wi-Fi Accessi tellinud. Helistage meile numbril 800 922 0204. (Viga = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: teie Verizon Wi-Fi Accessi kontoga on probleem. Helistage meile numbril 800 922 0204. (Viga = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: olete Verizon Wi-Fi Accessiga juba ühendatud. (Viga = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem. Helistage meile numbril 800 922 0204. (Viga = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: teie Verizon Wi-Fi Accessi kontoga on probleem. Helistage meile numbril 800 922 0204. (Viga = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ei ole teie asukohas saadaval. Proovige hiljem või mõnes teises asukohas uuesti. (Viga = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem. Proovige hiljem või mõnes teises asukohas uuesti."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem vea 16384 tõttu."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem vea 16385 tõttu."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: te ei saa väljaspool Verizoni leviala Verizon Wi-Fi Accessiga ühendust luua."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: te ei ole Verizon Wi-Fi Accessi tellinud. Helistage meile numbril 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: teie Verizon Wi-Fi Accessi kontoga on probleem. Helistage meile numbril 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: olete Verizon Wi-Fi Accessiga juba ühendatud."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: teie ja Verizon Wi-Fi Accessi vahelise ühenduse loomisel on probleem. Helistage meile numbril 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: teie Verizon Wi-Fi Accessi kontoga on probleem. Helistage meile numbril 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ei ole teie asukohas saadaval. Proovige hiljem või mõnes teises asukohas uuesti."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-eu/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-eu/strings.xml
index 178900c..c413c91 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-eu/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-eu/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: ezin zara konektatu Verizon-en wifi-sarbidera Verizon-en estaldura-eremutik kanpo bazaude. (Errorea: 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: ez zaude harpidetuta Verizon-en wifi-sarbidera. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbideko kontuarekin. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: dagoeneko konektatuta zaude Verizon-en wifi-sarbidera. (Errorea: 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbidera konektatzeko. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbideko kontuarekin. Dei iezaguzu 800 922 0204 zenbakira. (Errorea: 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon-en wifi-sarbidea ez dago erabilgarri zauden tokian. Saiatu berriro geroago edo beste toki batean zaudenean. (Errorea: 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbidera konektatzeko. Saiatu berriro geroago edo beste toki batean zaudenean."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: 16384 errorea dela eta, arazo bat dago Verizon-en wifi-sarbidera konektatzeko."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: 16385 errorea dela eta, arazo bat dago Verizon-en wifi-sarbidera konektatzeko."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon-en wifi-sarbidera konektatzeko."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: ezin zara konektatu Verizon Wi-Fi Access zerbitzura Verizon-en estaldura-eremutik kanpo bazaude."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: ez zaude harpidetuta Verizon Wi-Fi Access zerbitzura. Dei iezaguzu 800-922-0204 zenbakira."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon Wi-Fi Access zerbitzuko kontuarekin. Dei iezaguzu 800-922-0204 zenbakira."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: dagoeneko konektatuta zaude Verizon Wi-Fi Access zerbitzura."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon Wi-Fi Access zerbitzura konektatzeko. Dei iezaguzu 800-922-0204 zenbakira."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: arazo bat dago Verizon Wi-Fi Access zerbitzuko kontuarekin. Dei iezaguzu 800-922-0204 zenbakira."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access ez dago erabilgarri kokapen horretan. Saiatu berriro geroago edo beste kokapen batetik."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-fa/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-fa/strings.xml
index c19ded1..bcad7da 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-fa/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-fa/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"‏<xliff:g id="SSID">%1$s</xliff:g> : خارج از منطقه تحت پوشش Verizon نمی‌توانید به Verizon Wi-Fi Access متصل شوید. (خطا = ۳۲۷۶۰)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشترک Verizon Wi-Fi Access نیستید. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۱)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشکلی در حساب Verizon Wi-Fi Access وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۲)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"‏<xliff:g id="SSID">%1$s</xliff:g> : درحال‌حاضر به Verizon Wi-Fi Access متصل هستید. (خطا = ۳۲۷۶۳)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"‏<xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۴)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشکلی در حساب Verizon Wi-Fi Access وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید. (خطا = ۳۲۷۶۵)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"‏<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access در مکان شما دردسترس نیست. بعداً دوباره تلاش کنید یا از مکان متفاوتی امتحان کنید. (خطا = ۳۲۷۶۶)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"‏<xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد. بعداً دوباره تلاش کنید یا از مکان متفاوتی امتحان کنید."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"‏<xliff:g id="SSID">%1$s</xliff:g> : به‌دلیل خطای ۱۶۳۸۴، هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"‏<xliff:g id="SSID">%1$s</xliff:g> : به‌دلیل خطای ۱۶۳۸۵، هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"‏<xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"‏<xliff:g id="SSID">%1$s</xliff:g> : خارج از منطقه تحت پوشش Verizon نمی‌توانید به Verizon Wi-Fi Access متصل شوید."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشترک Verizon Wi-Fi Access نیستید. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشکلی در حساب Verizon Wi-Fi Access وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"‏<xliff:g id="SSID">%1$s</xliff:g> : در حال‌حاضر به Verizon Wi-Fi Access متصل هستید."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"‏<xliff:g id="SSID">%1$s</xliff:g> : هنگام اتصال به Verizon Wi-Fi Access مشکلی وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"‏<xliff:g id="SSID">%1$s</xliff:g> : مشکلی در حساب Verizon Wi-Fi Access وجود دارد. لطفاً ازطریق شماره ۰۲۰۴-۹۲۲-۸۰۰ با ما تماس بگیرید."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"‏<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access در مکان شما در دسترس نیست. بعداً دوباره تلاش کنید یا از مکان متفاوتی امتحان کنید."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-fi/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-fi/strings.xml
index 3c28233..d3f8ed2 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-fi/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-fi/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizonin Wi-Fi‑yhteyttä ei voi muodostaa Verizonin kattavuusalueen ulkopuolelta. (Virhe = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Et ole tilannut Verizonin Wi-Fi‑yhteyttä. Soita meille: 800-922-0204. (Virhe = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ‑tilisi kanssa on ongelma. Soita meille: 800-922-0204. (Virhe = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Olet jo yhteydessä Verizonin Wi-Fiin. (Virhe = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Ongelma yhdistettäessä Verizonin Wi-Fiin. Soita meille: 800-922-0204. (Virhe = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ‑tilisi kanssa on ongelma. Soita meille: 800-922-0204. (Virhe = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ei ole saatavilla sijainnissasi. Yritä uudelleen tai kokeile toisesta sijainnista. (Virhe = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Ongelma yhdistettäessä Verizonin Wi-Fiin. Yritä uudelleen tai kokeile toisesta sijainnista."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fiin yhdistämisessä on ongelma virheen 16384 takia."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fiin yhdistämisessä on ongelma virheen 16385 takia."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Ongelma yhdistettäessä Verizonin Wi-Fiin."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Verizonin Wi-Fi‑yhteyttä ei voi muodostaa Verizonin kattavuusalueen ulkopuolelta."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Et ole tilannut Verizonin Wi-Fi‑yhteyttä. Soita meille: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ‑tilisi kanssa on ongelma. Soita meille: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Olet jo yhteydessä Verizonin Wi-Fiin."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Ongelma yhdistettäessä Verizonin Wi-Fiin. Soita meille: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ‑tilisi kanssa on ongelma. Soita meille: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ei ole saatavilla sijainnissasi. Yritä uudelleen tai toisesta sijainnista."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-fr-rCA/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-fr-rCA/strings.xml
index ed813fd..9b8ff41 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-fr-rCA/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-fr-rCA/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : vous ne pouvez pas vous connecter à Verizon Wi-Fi Access en dehors de la zone de couverture de Verizon. (erreur = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : vous n\'êtes pas abonné à Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : vous êtes déjà connecté à Verizon Wi-Fi Access. (erreur = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204. (erreur = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access n\'est pas proposé dans votre région. Réessayez plus tard ou essayez à partir d\'une région différente. (erreur = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access. Réessayez plus tard ou essayez à partir d\'une région différente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access en raison de l\'erreur 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access en raison de l\'erreur 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème de connexion à Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Vous ne pouvez pas vous connecter à Verizon Wi-Fi Access en dehors de la zone de couverture de Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Vous n\'êtes pas abonné à Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Vous êtes déjà connecté à Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Il y a un problème de connexion à Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 1 800 922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access n\'est pas proposé dans votre région. Réessayez plus tard ou essayez à partir d\'une région différente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-fr/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-fr/strings.xml
index 67b8e46..6145d20 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-fr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-fr/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : impossible de vous connecter à Verizon Wi-Fi Access si vous n\'êtes pas dans une zone couverte par Verizon. (Erreur 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : vous n\'avez pas d\'abonnement à Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : vous êtes déjà connecté à Verizon Wi-Fi Access. (Erreur 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : il y a un problème avec votre compte Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204. (Erreur 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access n\'est pas disponible dans votre région. Réessayez plus tard ou depuis un autre lieu. (Erreur 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access. Réessayez plus tard ou depuis un autre lieu."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access en raison de l\'erreur 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access en raison de l\'erreur 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : vous ne pouvez pas vous connecter à Verizon Wi-Fi Access si vous ne vous trouvez pas dans une zone couverte par le réseau Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : vous n\'avez pas d\'abonnement à Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : un problème lié à votre compte Verizon Wi-Fi Access a été détecté. Veuillez nous appeler au 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : votre connexion à Verizon Wi-Fi Access est déjà active."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : un problème est survenu lors de votre connexion à Verizon Wi-Fi Access. Veuillez nous appeler au 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : un problème lié à votre compte Verizon Wi-Fi Access a été détecté. Veuillez nous appeler au 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : le service Verizon Wi-Fi Access n\'est pas disponible dans votre région. Veuillez réessayer plus tard ou depuis un autre lieu."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-gl/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-gl/strings.xml
index 2236f85..3cfaacc 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-gl/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-gl/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: non podes conectar con Verizon Wi-Fi Access desde fóra da área de cobertura de Verizon. (Erro = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: non tes subscrición a Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa túa conta de Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: xa estableciches conexión con Verizon Wi-Fi Access. (Erro = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa túa conta de Verizon Wi-Fi Access. Chámanos ao número 800-922-0204. (Erro = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access non está dispoñible desde a túa localización. Téntao de novo máis tarde ou proba desde unha localización diferente. (Erro = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access. Téntao de novo máis tarde ou proba desde unha localización diferente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa conexión a Verizon Wi-Fi Access debido ao erro 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa conexión a Verizon Wi-Fi Access debido ao erro 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: non podes conectar con Verizon Wi-Fi Access desde fóra da área de cobertura de Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: non tes subscrición a Verizon Wi-Fi Access. Chámanos ao número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa túa conta de Verizon Wi-Fi Access. Chámanos ao número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: xa estableciches conexión con Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema ao conectar con Verizon Wi-Fi Access. Chámanos ao número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: houbo un problema coa túa conta de Verizon Wi-Fi Access. Chámanos ao número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access non está dispoñible desde a túa localización. Téntao de novo máis tarde ou proba desde unha localización diferente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-gu/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-gu/strings.xml
index aeee262..d8d659f 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-gu/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-gu/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : તમે Verizon કવરેજ વિસ્તારની બહારથી Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ થઈ શકતાં નથી. (ભૂલ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : તમે Verizon વાઇ-ફાઇ ઍક્સેસને સબ્સ્ક્રાઇબ કરેલું નથી. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા Verizon વાઇ-ફાઇ ઍક્સેસ એકાઉન્ટમાં કોઈ સમસ્યા છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : તમે પહેલેથી Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરેલું છે. (ભૂલ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા Verizon વાઇ-ફાઇ ઍક્સેસ એકાઉન્ટમાં કોઈ સમસ્યા છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો. (ભૂલ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા સ્થાનથી Verizon વાઇ-ફાઇ ઍક્સેસ ઉપલબ્ધ નથી. થોડા સમય પછી અથવા કોઈ અલગ સ્થાનેથી પ્રયાસ કરો. (ભૂલ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે. થોડા સમય પછી અથવા કોઈ અલગ સ્થાનેથી પ્રયાસ કરો."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : ભૂલ 16384ને લીધે તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં ભૂલ આવી."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : ભૂલ 16385ને લીધે તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં ભૂલ આવી."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : તમે Verizon કવરેજ વિસ્તારની બહારથી Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ થઈ શકતાં નથી."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : તમે Verizon વાઇ-ફાઇ ઍક્સેસને સબ્સ્ક્રાઇબ કરેલું નથી. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા વાઇ-ફાઇ ઍક્સેસ એકાઉન્ટમાં કોઈ સમસ્યા છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : તમે પહેલેથી Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરેલું છે."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : તમને Verizon વાઇ-ફાઇ ઍક્સેસ સાથે કનેક્ટ કરવામાં કોઈ સમસ્યા આવે છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા વાઇ-ફાઇ ઍક્સેસ એકાઉન્ટમાં કોઈ સમસ્યા છે. કૃપા કરીને અમને 800-922-0204 પર કૉલ કરો."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : તમારા સ્થળેથી Verizon વાઇ-ફાઇ ઍક્સેસ ઉપલબ્ધ નથી. પછીથી અથવા કોઈ અલગ સ્થળેથી પ્રયાસ કરો."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-hi/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-hi/strings.xml
index b993ad4..b19bfbd 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-hi/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-hi/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon के कवरेज एरिया के बाहर, Verizon Wi-Fi Access से कनेक्ट नहीं किया जा सकता. (गड़बड़ी = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : आपने Verizon Wi-Fi Access की सदस्यता नहीं ली है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : आपके Verizon Wi-Fi Access खाते में कोई समस्या है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : आप पहले ही Verizon Wi-Fi Access से कनेक्ट हैं. (गड़बड़ी = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : आपको Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : आपके Verizon Wi-Fi Access खाते में कोई समस्या है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें. (गड़बड़ी = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : आपकी जगह पर Verizon Wi-Fi Access उपलब्ध नहीं है. कुछ देर बाद या किसी दूसरी जगह से कोशिश करें. (गड़बड़ी = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : आपको Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है. कुछ देर बाद या किसी दूसरी जगह से कोशिश करें."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : आपको 16384 गड़बड़ी की वजह से, Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : आपको 16385 गड़बड़ी की वजह से, Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : आपको Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : आप Verizon के कवरेज एरिया के बाहर Verizon Wi-Fi Access से कनेक्ट नहीं हो सकते."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : आपने Verizon Wi-Fi Access की सदस्यता नहीं ली है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : आपके Verizon Wi-Fi Access खाते में कोई समस्या है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : आप पहले ही Verizon Wi-Fi Access से कनेक्ट हैं."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : आपको Verizon Wi-Fi Access से कनेक्ट करने में कोई समस्या हुई है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : आपके Verizon Wi-Fi Access खाते में कोई समस्या है. कृपया 800-922-0204 पर कॉल करके हमसे संपर्क करें."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : आपकी जगह पर Verizon Wi-Fi Access उपलब्ध नहीं है. कृपया थोड़ी देर में कोशिश करें या किसी दूसरी जगह से कोशिश करें."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-hr/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-hr/strings.xml
index a2407a9..2c3924f 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-hr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-hr/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : ne možete se povezati s Wi-Fi pristupom Verizonu izvan područja pokrivenosti Verizona. (Pogreška = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : niste pretplaćeni na Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim računom za Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : već ste povezani s Wi-Fi pristupom Verizonu. (Pogreška = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s povezivanjem s Wi-Fi pristupom Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim računom za Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204. (Pogreška = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Wi-Fi pristup Verizonu nije dostupan s vaše lokacije. Pokušajte ponovno kasnije ili s druge lokacije. (Pogreška = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s povezivanjem s Wi-Fi pristupom Verizonu. Pokušajte ponovno kasnije ili s druge lokacije."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim povezivanjem s Wi-Fi pristupom Verizonu zbog pogreške 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim povezivanjem s Wi-Fi pristupom Verizonu zbog pogreške 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s povezivanjem s Wi-Fi pristupom Verizonu."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : ne možete se povezati s Wi-Fi pristupom Verizonu izvan područja pokrivenosti Verizona."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : niste pretplaćeni na Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim računom za Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : već ste povezani s Wi-Fi pristupom Verizonu."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s povezivanjem s Wi-Fi pristupom Verizonu. Nazovite nas na telefonski broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : postoji problem s vašim računom za Wi-Fi pristup Verizonu. Nazovite nas na telefonski broj 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Wi-Fi pristup Verizonu nije dostupan s vaše lokacije. Pokušajte ponovno kasnije ili s druge lokacije."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-hu/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-hu/strings.xml
index 73362ee..766c55f 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-hu/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-hu/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Nem kapcsolódhat a Verizon Wi-Fi-hozzáférési szolgáltatásához a Verizon lefedettségi területén kívülről. (Hiba = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Nem fizetett elő a Verizon Wi-Fi-hozzáférési szolgáltatására. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Valami gond van Verizon Wi-Fi-hozzáférési fiókjával. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Már kapcsolódott a Verizon Wi-Fi-hozzáférési szolgáltatásához. (Hiba = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Valami gond van Verizon Wi-Fi-hozzáférési fiókjával. Hívjon minket a következő telefonszámon: 800-922-0204. (Hiba = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : A Verizon Wi-Fi-hozzáférési szolgáltatása nem áll rendelkezésre az Ön tartózkodási helyén. Próbálja újra, vagy próbáljon meg máshol csatlakozni. (Hiba = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során. Próbálja újra, vagy próbáljon meg máshol csatlakozni."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során az 16384-es kódú hiba miatt."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során az 16385-ös kódú hiba miatt."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: Nem kapcsolódhat a Verizon Wi-Fi-hozzáférési szolgáltatásához a Verizon lefedettségi területén kívülről."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: Nem fizetett elő a Verizon Wi-Fi-hozzáférési szolgáltatására. Hívjon minket a következő telefonszámon: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: Valami gond van Verizon Wi-Fi-hozzáférési fiókjával. Hívjon minket a következő telefonszámon: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: Már kapcsolódott a Verizon Wi-Fi-hozzáférési szolgáltatásához."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: Valami probléma történt a Verizon Wi-Fi-hozzáférési szolgáltatásához való kapcsolódás során. Hívjon minket a következő telefonszámon: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: Valami gond van Verizon Wi-Fi-hozzáférési fiókjával. Hívjon minket a következő telefonszámon: 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: A Verizon Wi-Fi-hozzáférési szolgáltatása nem áll rendelkezésre az Ön tartózkodási helyén. Próbálja újra, vagy próbáljon meg máshol csatlakozni."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-hy/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-hy/strings.xml
index 110f048..690dc5f 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-hy/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-hy/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք չեք կարող միանալ Verizon Wi-Fi Access-ին, երբ Verizon-ի ծածկույթից դուրս եք։ Սխալի կոդը՝ 32760։"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք բաժանորդագրված չեք Verizon Wi-Fi Access-ին։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32761։"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> – Ձեր Verizon Wi-Fi Access հաշվի հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32762։"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք արդեն միացած եք Verizon Wi-Fi Access-ին։ Սխալի կոդը՝ 32763։"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32764։"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> – Ձեր Verizon Wi-Fi Access հաշվի հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։ Սխալի կոդը՝ 32765։"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ը հասանելի չէ ձեր գտնվելու վայրից։ Փորձեք ավելի ուշ կամ մեկ այլ վայրից։ Սխալի կոդը՝ 32766։"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։ Փորձեք ավելի ուշ կամ մեկ այլ վայրից։"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> – Չհաջողվեց միանալ Verizon Wi-Fi Access-ին առաջացած 16384 սխալի պատճառով։"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> – Չհաջողվեց միանալ Verizon Wi-Fi Access-ին առաջացած 16385 սխալի պատճառով։"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք չեք կարող միանալ Verizon Wi-Fi Access-ին, երբ Verizon-ի ծածկույթից դուրս եք։"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք բաժանորդագրված չեք Verizon Wi-Fi Access-ին։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> – Ձեր Verizon Wi-Fi Access հաշվի հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> – Դուք արդեն միացած եք Verizon Wi-Fi Access-ին։"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ին միանալու հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> – Ձեր Verizon Wi-Fi Access հաշվի հետ կապված խնդիր կա։ Զանգեք մեզ 800-922-0204 հեռախոսահամարով։"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> – Verizon Wi-Fi Access-ը հասանելի չէ ձեր գտնվելու վայրից։ Փորձեք ավելի ուշ կամ մեկ այլ վայրից։"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-in/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-in/strings.xml
index 9aeda06..94fcf63 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-in/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-in/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak dapat terhubung ke Akses Wi-Fi Verizon dari luar area cakupan Verizon. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak berlangganan Akses Wi-Fi Verizon. Harap hubungi kami di 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Ada masalah dengan akun Akses Wi-Fi Verizon Anda. Harap hubungi kami di 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Anda sudah terhubung ke Akses Wi-Fi Verizon. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon. Harap hubungi kami di 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Ada masalah dengan akun Akses Wi-Fi Verizon Anda. Harap hubungi kami di 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Akses Wi-Fi Verizon tidak tersedia di lokasi Anda. Coba lagi nanti atau coba dari lokasi lain. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon. Coba lagi nanti atau coba dari lokasi lain."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon karena error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon karena error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak dapat terhubung ke Akses Wi-Fi Verizon dari luar area cakupan Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak berlangganan Akses Wi-Fi Verizon. Harap hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Ada masalah dengan akun Akses Wi-Fi Verizon Anda. Harap hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Anda sudah terhubung ke Akses Wi-Fi Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Terjadi masalah saat menghubungkan ke Akses Wi-Fi Verizon Anda. Harap hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Ada masalah dengan akun Akses Wi-Fi Verizon Anda. Harap hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Akses Wi-Fi Verizon tidak tersedia di lokasi Anda. Coba lagi nanti atau coba dari lokasi yang berbeda."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-is/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-is/strings.xml
index 46520bb..609cc8a 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-is/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-is/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Ekki er hægt að tengjast WiFi-aðgangi Verizon utan þjónustusvæðis Verizon. (Villa = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Þú ert ekki áskrifandi að WiFi-aðgangi Verizon. Hringdu í okkur í síma 800-922-0204. (Villa = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp í tengslum við Verizon WiFi-aðgangsreikninginn þinn. Hringdu í okkur í síma 800-922-0204. (Villa = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Þú ert nú þegar tengd(ur) við WiFi-aðgang Verizon. (Villa = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon. Hringdu í okkur í síma 800-922-0204. (Villa = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp í tengslum við Verizon WiFi-aðgangsreikninginn þinn. Hringdu í okkur í síma 800-922-0204. (Villa = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : WiFi-aðgangur Verizon er ekki í boði þar sem þú ert. Reyndu aftur síðar eða á öðrum stað. (Villa = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon. Reyndu aftur síðar eða á öðrum stað."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon vegna villu 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon vegna villu 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við WiFi-aðgang Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Ekki er hægt að tengjast Verizon Wi-Fi Access utan þjónustusvæðis Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Þú ert ekki áskrifandi að Verizon Wi-Fi Access. Hringdu í okkur í síma 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp í tengslum við Verizon Wi-Fi Access reikninginn þinn. Hringdu í okkur í síma 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Þú ert nú þegar tengd(ur) við Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp við að tengja þig við Verizon Wi-Fi Access. Hringdu í okkur í síma 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Vandamál kom upp í tengslum við Verizon Wi-Fi Access reikninginn þinn. Hringdu í okkur í síma 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access er ekki í boði þar sem þú ert. Reyndu aftur síðar eða á öðrum stað."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-it/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-it/strings.xml
index d352d74..b12ecd1 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-it/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-it/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: non puoi connetterti a Verizon Wi-Fi Access se sei fuori dell\'area di copertura Verizon. (Errore 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: non hai un abbonamento a Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema con il tuo account Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: connessione a Verizon Wi-Fi Access già stabilita. (Errore 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema con il tuo account Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204. (Errore 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access non è disponibile dalla tua posizione. Riprova più tardi o prova da un\'altra posizione. (Errore 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access. Riprova più tardi o prova da un\'altra posizione."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access a causa di un errore 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access a causa di un errore 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema durante la connessione a Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: non puoi connetterti a Verizon Wi-Fi Access se sei fuori dell\'area di copertura Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: non hai un abbonamento a Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema con il tuo account Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: connessione a Verizon Wi-Fi Access già stabilita."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema di connessione a Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: si è verificato un problema con il tuo account Verizon Wi-Fi Access. Chiamaci al numero 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access non è disponibile dalla tua posizione. Riprova più tardi o prova da un\'altra posizione."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-iw/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-iw/strings.xml
index b35a95b..9858b67 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-iw/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-iw/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"‏<xliff:g id="SSID">%1$s</xliff:g> : לא ניתן להתחבר לגישת Wi-Fi של Verizon מחוץ לאזור הכיסוי של Verizon. (שגיאה = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"‏<xliff:g id="SSID">%1$s</xliff:g> : לא נרשמת לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה עם החשבון שלך לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"‏<xliff:g id="SSID">%1$s</xliff:g> : כבר יש לך חיבור לגישת Wi-Fi של Verizon. (שגיאה = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה עם החשבון שלך לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204. (שגיאה = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"‏<xliff:g id="SSID">%1$s</xliff:g> : גישת Wi-Fi של Verizon לא זמינה מהמיקום שלך. אפשר לנסות שוב מאוחר יותר או לנסות ממיקום אחר. (שגיאה = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon. אפשר לנסות שוב מאוחר יותר או לנסות ממיקום אחר."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"‏<xliff:g id="SSID">%1$s</xliff:g> : הייתה בעיה בהתחברות אל גישת ה-Wi-Fi של Verizon בגלל שגיאה 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"‏<xliff:g id="SSID">%1$s</xliff:g> : הייתה בעיה בהתחברות אל גישת ה-Wi-Fi של Verizon בגלל שגיאה 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"‏<xliff:g id="SSID">%1$s</xliff:g> : לא ניתן להתחבר לגישת Wi-Fi של Verizon מחוץ לאזור הכיסוי של Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"‏<xliff:g id="SSID">%1$s</xliff:g> : לא נרשמת לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה עם החשבון שלך לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"‏<xliff:g id="SSID">%1$s</xliff:g> : כבר יש לך חיבור לגישת Wi-Fi של Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה בהתחברות לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"‏<xliff:g id="SSID">%1$s</xliff:g> : יש בעיה עם החשבון שלך לגישת Wi-Fi של Verizon. עליך להתקשר אלינו למספר 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"‏<xliff:g id="SSID">%1$s</xliff:g> : גישת Wi-Fi של Verizon לא זמינה מהמיקום שלך. אפשר לנסות שוב מאוחר יותר או לנסות ממיקום אחר."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ja/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ja/strings.xml
index ef24569..a6968bc 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ja/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ja/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon のサービスエリア外から Verizon Wi-Fi Access に接続することはできません(エラー = 32760)。"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access に登録されていません。800-922-0204 までお電話でお問い合わせください(エラー = 32761)。"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : お使いの Verizon Wi-Fi Access アカウントに問題があります。800-922-0204 までお電話でお問い合わせください(エラー = 32762)。"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access にすでに接続しています(エラー = 32763)。"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access への接続中に問題が発生しました。800-922-0204 までお電話でお問い合わせください(エラー = 32764)。"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : お使いの Verizon Wi-Fi Access アカウントに問題があります。800-922-0204 までお電話でお問い合わせください(エラー = 32765)。"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : 現在地では Verizon Wi-Fi Access はご利用いただけません。しばらくしてからもう一度お試しいただくか、場所を変えてお試しください(エラー = 32766)。"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access への接続中に問題が発生しました。しばらくしてからもう一度お試しいただくか、場所を変えてお試しください。"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : エラー 16384 のため、Verizon Wi-Fi Access への接続中に問題が発生しました。"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : エラー 16385 のため、Verizon Wi-Fi Access への接続中に問題が発生しました。"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access への接続中に問題が発生しました。"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon のサービスエリア外から Verizon Wi-Fi Access に接続することはできません。"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access に登録されていません。800-922-0204 までお電話でお問い合わせください。"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: お使いの Verizon Wi-Fi Access アカウントに問題があります。800-922-0204 までお電話でお問い合わせください。"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access にすでに接続しています。"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access への接続中に問題が発生しました。800-922-0204 までお電話でお問い合わせください。"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: お使いの Verizon Wi-Fi Access アカウントに問題があります。800-922-0204 までお電話でお問い合わせください。"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: 現在地では Verizon Wi-Fi Access はご利用いただけません。しばらくしてからもう一度お試しいただくか、場所を変えてお試しください。"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ka/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ka/strings.xml
index a689595..8ee8679 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ka/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ka/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-ს ვერ დაუკავშირდებით Verizon-ის დაფარვის ზონის გარეთ. (შეცდომა = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access გამოწერილი არ გაქვთ. გთხოვთ, დაგვირეკოთ ტელეფონის ნომერზე 800-922-0204. (შეცდომა = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონის ნომერზე 800-922-0204. (შეცდომა = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენ უკვე დაკავშირებული ხართ Verizon Wi-Fi Access-თან. (შეცდომა = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონის ნომერზე 800-922-0204. (შეცდომა = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონის ნომერზე 800-922-0204. (შეცდომა = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access თქვენი მდებარეობიდან მიუწვდომელია. ცადეთ მოგვიანებით ან ცადეთ სხვა მდებარეობიდან. (შეცდომა = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა. ცადეთ მოგვიანებით ან ცადეთ სხვა მდებარეობიდან."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა შეცდომა 16384-ის გამო."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა შეცდომა 16385-ის გამო."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-ს ვერ დაუკავშირდებით Verizon-ის დაფარვის ზონის გარეთ."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access გამოწერილი არ გაქვთ. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენ უკვე დაკავშირებული ხართ Verizon Wi-Fi Access-თან."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access-თან დაკავშირებისას პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: თქვენს Verizon Wi-Fi Access ანგარიშთან დაკავშირებით პრობლემა წარმოიშვა. გთხოვთ, დაგვირეკოთ ტელეფონზე 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access თქვენი მდებარეობიდან მიუწვდომელია. ცადეთ მოგვიანებით ან ცადეთ სხვა მდებარეობიდან."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-kk/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-kk/strings.xml
index 2e8abb9..f31d062 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-kk/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-kk/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне Verizon қызмет көрсету аясынан тыс жерден қосыла алмайсыз. (Қате = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне жазылмағансыз. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтына қатысты ақау пайда болды. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылып қойғансыз. (Қате = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде ақау пайда болды. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтына қатысты ақау пайда болды. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз. (Қате = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қазіргі орналасқан жеріңізде жұмыс істемейді. Әрекетті кейінірек немесе басқа жерден қайталап көріңіз. (Қате = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде ақау пайда болды. Әрекетті кейінірек немесе басқа жерден қайталап көріңіз."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде 16384 қатесіне байланысты ақау пайда болды."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде 16385 қатесіне байланысты ақау пайда болды."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде ақау пайда болды."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне Verizon қызмет көрсету аясынан тыс жерден қосыла алмайсыз."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне жазылған жоқсыз. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтына қатысты мәселе шықты. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне әлдеқашан қосылғансыз."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қызметіне қосылу кезінде мәселе шықты. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтына қатысты мәселе шықты. Бізге 800-922-0204 нөмірі арқылы хабарласыңыз."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access қазіргі орналасқан жеріңізде жұмыс істемейді. Әрекетті кейінірек немесе басқа жерден қайталап көріңіз."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-km/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-km/strings.xml
index d6b0a6e..b515f6c 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-km/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-km/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកមិនអាចភ្ជាប់​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ពីក្រៅ​តំបន់គ្របដណ្ដប់​របស់ Verizon បានទេ។ (បញ្ហា = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកមិនបានជាវ​ការចូលប្រើ Wi-Fi របស់ Verizon ទេ។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ជាមួយគណនី​ចូលប្រើ Wi-Fi របស់ Verizon របស់អ្នក។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកបានភ្ជាប់​ទៅការចូលប្រើ Wi-Fi របស់ Verizon រួចហើយ។ (បញ្ហា = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ជាមួយគណនី​ចូលប្រើ Wi-Fi របស់ Verizon របស់អ្នក។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។ (បញ្ហា = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>៖ មិនអាចចូលប្រើ Wi-Fi របស់ Verizon ពីទីតាំង​របស់អ្នក​បានទេ។ សូមព្យាយាម​ម្ដងទៀត​នៅពេលក្រោយ ឬសាកល្បងពី​ទីតាំងផ្សេង។ (បញ្ហា = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។ សូមព្យាយាម​ម្ដងទៀត​នៅពេលក្រោយ ឬសាកល្បងពី​ទីតាំងផ្សេង។"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ដោយសារបញ្ហា 16384។"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ដោយសារបញ្ហា 16385។"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកមិនអាចភ្ជាប់​ទៅការចូលប្រើ Wi-Fi របស់ Verizon ពីក្រៅ​តំបន់គ្រប់ដណ្ដប់​របស់ Verizon បានទេ។"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកមិនបានជាវ​ការចូលប្រើ Wi-Fi របស់ Verizon ទេ។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ជាមួយគណនី​ចូលប្រើ Wi-Fi របស់ Verizon របស់អ្នក។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>៖ អ្នកបានភ្ជាប់​ទៅការចូលប្រើ Wi-Fi របស់ Verizon រួចហើយ។"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ក្នុងការ​ភ្ជាប់អ្នក​ទៅការចូលប្រើ Wi-Fi របស់ Verizon។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>៖ មានបញ្ហា​ជាមួយគណនី​ចូលប្រើ Wi-Fi របស់ Verizon របស់អ្នក។ សូមហៅទូរសព្ទ​មកយើង​តាមរយៈលេខ 800-922-0204។"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>៖ មិនអាចប្រើ​ការចូលប្រើ Wi-Fi របស់ Verizon ពីទីតាំង​របស់អ្នក​បានទេ។ សូមព្យាយាម​ម្ដងទៀត​នៅពេលក្រោយ ឬសាកល្បងពី​ទីតាំងផ្សេង។"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-kn/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-kn/strings.xml
index 48e82aa..f85d006 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-kn/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-kn/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ಕವರೇಜ್ ಪ್ರದೇಶದ ಹೊರಗಿನಿಂದ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಕನೆಕ್ಟ್ ಮಾಡಲು ನಿಮಗೆ ಸಾಧ್ಯವಿಲ್ಲ. (ದೋಷ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : ನೀವು Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಸಬ್‌ಸ್ಕ್ರೈಬ್ ಆಗಿಲ್ಲ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಖಾತೆಯಲ್ಲಿ ಸಮಸ್ಯೆಯಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : ನೀವು ಈಗಾಗಲೇ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಕನೆಕ್ಟ್ ಆಗಿರುವಿರಿ. (ದೋಷ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗುತ್ತಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಖಾತೆಯಲ್ಲಿ ಸಮಸ್ಯೆಯಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ. (ದೋಷ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ ಸ್ಥಳದಿಂದ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಲಭ್ಯವಿಲ್ಲ. ನಂತರ ಪುನಃ ಪ್ರಯತ್ನಿಸಿ ಅಥವಾ ಬೇರೊಂದು ಸ್ಥಳದಿಂದ ಪ್ರಯತ್ನಿಸಿ. (ದೋಷ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗುತ್ತಿದೆ. ನಂತರ ಪುನಃ ಪ್ರಯತ್ನಿಸಿ ಅಥವಾ ಬೇರೊಂದು ಸ್ಥಳದಿಂದ ಪ್ರಯತ್ನಿಸಿ."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 ದೋಷದ ಕಾರಣ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡಲು ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 ದೋಷದ ಕಾರಣ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡಲು ಸಮಸ್ಯೆ ಎದುರಾಗಿದೆ."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗುತ್ತಿದೆ."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ಕವರೇಜ್ ಪ್ರದೇಶದ ಹೊರಗಿನಿಂದ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಕನೆಕ್ಟ್ ಮಾಡಲು ನಿಮಗೆ ಸಾಧ್ಯವಿಲ್ಲ."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : ನೀವು Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಸಬ್‌ಸ್ಕ್ರೈಬ್‌ ಆಗಿಲ್ಲ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಖಾತೆಯಲ್ಲಿ ಸಮಸ್ಯೆಯಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : ನೀವು ಈಗಾಗಲೇ Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ಕನೆಕ್ಟ್ ಆಗಿರುವಿರಿ."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ವೈ-ಫೈ ಪ್ರವೇಶಕ್ಕೆ ನಿಮ್ಮನ್ನು ಕನೆಕ್ಟ್ ಮಾಡುವಾಗ ಸಮಸ್ಯೆ ಎದುರಾಗುತ್ತಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಖಾತೆಯಲ್ಲಿ ಸಮಸ್ಯೆಯಿದೆ. ನಮ್ಮನ್ನು ಸಂಪರ್ಕಿಸಲು 800-922-0204 ಗೆ ಕರೆ ಮಾಡಿ."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : ನಿಮ್ಮ ಸ್ಥಳದಿಂದ Verizon ವೈ-ಫೈ ಪ್ರವೇಶ ಲಭ್ಯವಿಲ್ಲ. ನಂತರ ಪುನಃ ಪ್ರಯತ್ನಿಸಿ ಅಥವಾ ಬೇರೊಂದು ಸ್ಥಳದಿಂದ ಪ್ರಯತ್ನಿಸಿ."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ko/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ko/strings.xml
index 26f4bbe..78fce4e 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ko/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ko/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon 서비스 지역 외부에서는 Verizon Wi-Fi Access에 연결할 수 없습니다. (오류 = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access를 구독 중이 아닙니다. 800-922-0204번으로 문의하세요. (오류 = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access 계정에 문제가 있습니다. 800-922-0204번으로 문의하세요. (오류 = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: 이미 Verizon Wi-Fi Access에 연결되어 있습니다. (오류 = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다. 800-922-0204번으로 문의하세요. (오류 = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access 계정에 문제가 있습니다. 800-922-0204번으로 문의하세요. (오류 = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: 현재 위치에서는 Verizon Wi-Fi Access를 이용할 수 없습니다. 나중에 다시 시도하거나 다른 위치에서 시도해 보세요. (오류 = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다. 나중에 다시 시도하거나 다른 위치에서 시도해 보세요."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 오류 16384로 인해 Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 오류 16385로 인해 Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon 서비스 지역 외부에서는 Verizon Wi-Fi Access에 연결할 수 없습니다."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access를 구독 중이 아닙니다. 800-922-0204번으로 문의하세요."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access 계정에 문제가 있습니다. 800-922-0204번으로 문의하세요."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: 이미 Verizon Wi-Fi Access에 연결되어 있습니다."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access에 연결하는 중에 문제가 발생했습니다. 800-922-0204번으로 문의하세요."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access 계정에 문제가 있습니다. 800-922-0204번으로 문의하세요."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: 해당 위치에서는 Verizon Wi-Fi Access를 이용할 수 없습니다. 나중에 다시 시도하거나 다른 장소에서 시도해 보세요."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ky/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ky/strings.xml
index 84066a7..844394f 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ky/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ky/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке Verizon иштеген аймактан сырткары жерде туташа албайсыз. (Ката = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке катталган эмессиз. 800-922-0204 номерине телефон чалыңыз. (Ката = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтуңузда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз. (Ката = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташып турасыз. (Ката = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз. (Ката = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтуңузда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз. (Ката = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access сиз жүргөн жерде жеткиликтүү эмес. Кийинчерээк же башка жерден кайталаңыз. (Ката = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты. Кийинчерээк же башка жерден кайталаңыз."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 катасынан улам Verizon Wi-Fi тармагына туташууда маселе келип чыкты."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 катасынан улам Verizon Wi-Fi тармагына туташууда маселе келип чыкты."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке Verizon иштеген аймактан сырткары жерде туташа албайсыз."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке катталган эмессиз. 800-922-0204 номерине телефон чалыңыз."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтуңузда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташып турасыз."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'ке туташууда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access аккаунтуңузда маселе келип чыкты. 800-922-0204 номерине телефон чалыңыз."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access сиз жүргөн жерде жеткиликтүү эмес. Кийинчерээк же башка жерден кайталаңыз."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-lo/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-lo/strings.xml
index 1237309..82f1df0 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-lo/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-lo/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານບໍ່ສາມາດເຊື່ອມຕໍ່ຫາ Verizon Wi-Fi Access ຈາກນອກພື້ນທີ່ຄອບຄຸມ Verizon ໄດ້. (ຜິດພາດ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານບໍ່ໄດ້ສະໝັກໃຊ້ Verizon Wi-Fi Access. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາກັບບັນຊີ Verizon Wi-Fi Access ຂອງທ່ານ. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານເຊື່ອມຕໍ່ຫາ Verizon Wi-Fi Access ຢູ່ກ່ອນແລ້ວ. (ຜິດພາດ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາກັບບັນຊີ Verizon Wi-Fi Access ຂອງທ່ານ. ກະລຸນາໂທຫາພວກເຮົາຢູ່ເບີ 800-922-0204. (ຜິດພາດ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : ບໍ່ສາມາດໃຊ້ Verizon Wi-Fi Access ຈາກສະຖານທີ່ຂອງທ່ານໄດ້. ກະລຸນາລອງໃໝ່ ຫຼື ລອງຈາກສະຖານທີ່ອື່ນ. (ຜິດພາດ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access. ກະລຸນາລອງໃໝ່ ຫຼື ລອງຈາກສະຖານທີ່ອື່ນ."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access ເນື່ອງຈາກຂໍ້ຜິດພາດ 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access ເນື່ອງຈາກຂໍ້ຜິດພາດ 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານບໍ່ສາມາດເຊື່ອມຕໍ່ຫາ Verizon Wi-Fi Access ຈາກນອກພື້ນທີ່ຄອບຄຸມ Verizon ໄດ້."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານບໍ່ໄດ້ສະໝັກໃຊ້ Verizon Wi-Fi Access. ກະລຸນາໂທຫາພວກເຮົາທີ່ເບີ 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາກັບບັນຊີ Verizon Wi-Fi Access ຂອງທ່ານ. ກະລຸນາໂທຫາພວກເຮົາທີ່ເບີ 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : ທ່ານເຊື່ອມຕໍ່ຫາ Verizon Wi-Fi Access ຢູ່ກ່ອນແລ້ວ."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາໃນການເຊື່ອມຕໍ່ທ່ານຫາ Verizon Wi-Fi Access. ກະລຸນາໂທຫາພວກເຮົາທີ່ເບີ 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : ເກີດບັນຫາກັບບັນຊີ Verizon Wi-Fi Access ຂອງທ່ານ. ກະລຸນາໂທຫາພວກເຮົາທີ່ເບີ 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : ບໍ່ສາມາດໃຊ້ Verizon Wi-Fi Access ຈາກສະຖານທີ່ຂອງທ່ານໄດ້. ກະລຸນາລອງໃໝ່ ຫຼື ລອງຈາກສະຖານທີ່ອື່ນ."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-lt/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-lt/strings.xml
index 2c82744..b64f342 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-lt/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-lt/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: negalite prisijungti prie „Verizon“ „Wi-Fi“ prieigos taško būdami ne „Verizon“ aprėpties zonoje. (Klaida = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: neprenumeruojate „Verizon“ „Wi-Fi“ prieigos taško. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: iškilo su „Verizon“ „Wi-Fi“ prieigos taško paskyra susijusi problema. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: jau esate prisijungę prie „Verizon“ „Wi-Fi“ prieigos taško. (Klaida = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: iškilo su „Verizon“ „Wi-Fi“ prieigos taško paskyra susijusi problema. Paskambinkite telefono numeriu 800-922-0204. (Klaida = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: „Verizon“ „Wi-Fi“ prieigos taškas nepasiekiamas iš jūsų vietovės. Vėliau bandykite dar kartą arba pabandykite iš kitos vietovės. (Klaida = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema. Vėliau bandykite dar kartą arba pabandykite iš kitos vietovės."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema dėl klaidos Nr. 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema dėl klaidos Nr. 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: negalite prisijungti prie „Verizon“ „Wi-Fi“ prieigos taško būdami ne „Verizon“ aprėpties zonoje."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: neprenumeruojate „Verizon“ „Wi-Fi“ prieigos taško. Paskambinkite telefono numeriu 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: iškilo su „Verizon“ „Wi-Fi“ prieigos taško paskyra susijusi problema. Paskambinkite telefono numeriu 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: jau esate prisijungę prie „Verizon“ „Wi-Fi“ prieigos taško."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: prisijungiant prie „Verizon“ „Wi-Fi“ prieigos taško kilo problema. Paskambinkite telefono numeriu 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: iškilo su „Verizon“ „Wi-Fi“ prieigos taško paskyra susijusi problema. Paskambinkite telefono numeriu 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: „Verizon“ „Wi-Fi“ prieigos taškas nepasiekiamas iš jūsų vietovės. Vėliau bandykite dar kartą arba pabandykite iš kitos vietovės."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-lv/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-lv/strings.xml
index 812a2b3..2f81073 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-lv/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-lv/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: lai izveidotu savienojumu ar pakalpojumu Verizon Wi-Fi Access, ir jābūt Verizon pārklājuma zonā. (Kļūda Nr. 32760.)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: jums nav Verizon Wi-Fi Access abonementa. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32761.)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: radusies problēma ar jūsu Verizon Wi-Fi Access kontu. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32762.)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: savienojums ar Verizon Wi-Fi Access jau ir izveidots. (Kļūda Nr. 32763.)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32764.)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: radusies problēma ar jūsu Verizon Wi-Fi Access kontu. Lūdzu, zvaniet mums uz numuru 800-922-0204. (Kļūda Nr. 32765.)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: jūsu atrašanās vietā pakalpojums Verizon Wi-Fi Access nav pieejams. Vēlāk mēģiniet vēlreiz, vai arī mēģiniet izveidot savienojumu no citas atrašanās vietas. (Kļūda Nr. 32766.)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma. Vēlāk mēģiniet vēlreiz, vai arī mēģiniet izveidot savienojumu no citas atrašanās vietas."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma kļūdas Nr. 16384 dēļ."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma kļūdas Nr. 16385 dēļ."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: lai izveidotu savienojumu ar pakalpojumu Verizon Wi-Fi Access, ir jābūt Verizon pārklājuma zonā."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: jums nav Verizon Wi-Fi Access abonementa. Lūdzu, zvaniet mums uz numuru 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: radusies problēma ar jūsu Verizon Wi-Fi Access kontu. Lūdzu, zvaniet mums uz numuru 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: savienojums ar Verizon Wi-Fi Access jau ir izveidots."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: veidojot savienojumu ar pakalpojumu Verizon Wi-Fi Access, radās problēma. Lūdzu, zvaniet mums uz numuru 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: radusies problēma ar jūsu Verizon Wi-Fi Access kontu. Lūdzu, zvaniet mums uz numuru 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: jūsu atrašanās vietā pakalpojums Verizon Wi-Fi Access nav pieejams. Vēlāk mēģiniet vēlreiz, vai arī mēģiniet izveidot savienojumu no citas atrašanās vietas."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-mk/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-mk/strings.xml
index 5a804da..57ad546 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-mk/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-mk/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: не може да се поврзете на Verizon Wi-Fi Access надвор од областа на покривање на Verizon. (Грешка = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: не сте претплатени на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: проблем со вашата сметка на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: веќе сте поврзани на Verizon Wi-Fi Access. (Грешка = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: проблем со вашата сметка на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access не е достапна од вашата локација. Пробајте повторно подоцна или од друга локација. (Грешка = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access. Пробајте повторно подоцна или од друга локација."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access поради грешка 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access поради грешка 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: не може да се поврзете на Verizon Wi-Fi Access надвор од областа на покривање на Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: не сте претплатени на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: проблем со вашата сметка на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: веќе сте поврзани на Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: проблем со вашата сметка на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access не е достапна од вашата локација. Обидете повторно подоцна или обидете се од друга локација."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ml/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ml/strings.xml
index 93e69db..17cdbcb 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ml/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ml/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon കവറേജ് ഏരിയയ്‌ക്ക് പുറത്ത് നിന്ന് നിങ്ങൾക്ക് Verizon വൈഫൈ ആക്‌സസിലേക്ക് കണക്റ്റ് ചെയ്യാനാകില്ല. (പിശക് = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസിലേക്ക് നിങ്ങൾ വരിക്കാരായിട്ടില്ല. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങളുടെ Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട് ഒരു പ്രശ്‌നമുണ്ട്. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങൾ Verizon വൈഫൈ ആക്‌സസിലേക്ക് മുമ്പേ കണക്‌റ്റ് ചെയ്തിട്ടുണ്ട്. (പിശക് = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങളുടെ Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട് ഒരു പ്രശ്‌നമുണ്ട്. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് നിങ്ങളുടെ ലൊക്കേഷനിൽ ലഭ്യമല്ല. പിന്നീട് വീണ്ടും ശ്രമിക്കുക അല്ലെങ്കിൽ മറ്റൊരു ലൊക്കേഷനിൽ നിന്ന് ശ്രമിക്കുക. (പിശക് = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്. പിന്നീട് വീണ്ടും ശ്രമിക്കുക അല്ലെങ്കിൽ മറ്റൊരു ലൊക്കേഷനിൽ നിന്ന് ശ്രമിക്കുക."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 പിശക് കാരണം Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 പിശക് കാരണം Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon കവറേജ് ഏരിയയ്‌ക്ക് പുറത്ത് നിന്ന് നിങ്ങൾക്ക് Verizon വൈഫൈ ആക്‌സസിലേക്ക് കണക്റ്റ് ചെയ്യാനാകില്ല."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസിലേക്ക് നിങ്ങൾ സബ്‌സ്‌ക്രൈബ് ചെയ്‌തിട്ടില്ല. ഞങ്ങളുടെ 800-922-0204 എന്ന നമ്പറിൽ വിളിക്കുക."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങളുടെ Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട് ഒരു പ്രശ്‌നമുണ്ട്. ഞങ്ങളുടെ 800-922-0204 എന്ന നമ്പറിൽ വിളിക്കുക."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങൾ മുമ്പേ തന്നെ Verizon വൈഫൈ ആക്‌സസിലേക്ക് കണക്‌റ്റ് ചെയ്തിട്ടുണ്ട്."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്. ഞങ്ങളുടെ 800-922-0204 എന്ന നമ്പറിൽ വിളിക്കുക."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങളുടെ Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട് ഒരു പ്രശ്‌നമുണ്ട്. ഞങ്ങളുടെ 800-922-0204 എന്ന നമ്പറിൽ വിളിക്കുക."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് നിങ്ങളുടെ ലൊക്കേഷനില്‍ ലഭ്യമല്ല. മറ്റൊരു ലൊക്കേഷനിൽ നിന്ന് പിന്നീട് വീണ്ടും ശ്രമിക്കുക."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-mn/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-mn/strings.xml
index e93e270..aff6f05 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-mn/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-mn/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon-ны хамрах бүсийн гаднаас Verizon Wi-Fi хандалтад холбогдох боломжгүй. (Алдаа = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon Wi-Fi хандалтыг захиалаагүй байна. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Таны Verizon Wi-Fi хандалтын бүртгэлтэй холбоотой асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon Wi-Fi хандалтад аль хэдийн холбогдсон байна. (Алдаа = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Таны Verizon Wi-Fi хандалтын бүртгэлтэй холбоотой асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi хандалт нь таны байршлаас боломжгүй байна. Дараа дахин оролдох эсвэл өөр байршлаас оролдоно уу. (Алдаа = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа. Дараа дахин оролдох эсвэл өөр байршлаас оролдоно уу."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Алдаа 16384-ийн улмаас таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Алдаа 16385-ын улмаас таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon-ы хамрах бүсийн гаднаас Verizon Wi-Fi хандалтад холбогдох боломжгүй."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon Wi-Fi хандалтад бүртгүүлээгүй байна. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Таны Verizon Wi-Fi хандалтын бүртгэлтэй холбоотой асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Та Verizon Wi-Fi хандалтад хэдийн холбогдсон байна."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Таны Verizon Wi-Fi хандалтын бүртгэлтэй холбоотой асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi хандалт нь таны байршлаас боломжгүй байна. Дараа дахин оролдох эсвэл өөр байршлаас оролдоно уу."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-mr/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-mr/strings.xml
index 8274737..7f83c2c 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-mr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-mr/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही Verizon कव्हरेज क्षेत्राच्या बाहेरून Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करू शकत नाही. (एरर = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही Verizon वाय-फाय अ‍ॅक्सेस चे सदस्यत्व घेतलेले नाही. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या Verizon वाय-फाय अ‍ॅक्सेस खात्यामध्ये समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही आधीपासून Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट केलेले आहे. (एरर = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या Verizon वाय-फाय अ‍ॅक्सेस खात्यामध्ये समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या स्थानावरून Verizon वाय-फाय अ‍ॅक्सेस उपलब्ध नाही. नंतर पुन्हा प्रयत्न करा किंवा वेगळ्या स्थानावरून प्रयत्न करा. (एरर = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली. नंतर पुन्हा प्रयत्न करा किंवा वेगळ्या स्थानावरून प्रयत्न करा."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 एरर आल्यामुळे तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 एरर आल्यामुळे तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही व्हेरिझॉन कव्हरेज क्षेत्राच्या बाहेरून व्हेरिझॉन वाय-फाय अ‍ॅक्सेस शी कनेक्ट करू शकत नाही."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही व्हेरिझॉन वाय-फाय अ‍ॅक्सेस चे सदस्यत्व घेतलेले नाही. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या व्हेरिझॉन वाय-फाय अ‍ॅक्सेस खात्यामध्ये समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्ही आधीपासून व्हेरिझॉन वाय-फाय अ‍ॅक्सेस शी कनेक्ट केलेले आहे."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला व्हेरिझॉन वाय-फाय अ‍ॅक्सेस शी कनेक्ट करण्यात समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या व्हेरिझॉन वाय-फाय अ‍ॅक्सेस खात्यामध्ये समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : तुमच्या स्थानावरून व्हेरिझॉन वाय-फाय अ‍ॅक्सेस उपलब्ध नाही. नंतर पुन्हा प्रयत्न करा किंवा वेगळ्या स्थानावरून प्रयत्न करा."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ms/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ms/strings.xml
index e2cf346..d3a10be 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ms/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ms/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak boleh menyambung ke Verizon Wi-Fi Access dari luar kawasan liputan Verizon. (Ralat = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak melanggan Verizon Wi-Fi Access. Sila hubungi kami di 800-922-0204. (Ralat = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah dengan akaun Verizon Wi-Fi Access anda. Sila hubungi kami di 800-922-0204. (Ralat = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Anda sudah disambungkan ke Verizon Wi-Fi Access. (Ralat = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda ke Verizon Wi-Fi Access. Sila hubungi kami di 800-922-0204. (Ralat = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah dengan akaun Verizon Wi-Fi Access anda. Sila hubungi kami di 800-922-0204. (Ralat = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access tidak tersedia dari lokasi anda. Cuba lagi nanti atau cuba dari lokasi lain. (Ralat = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda ke Verizon Wi-Fi Access. Cuba lagi nanti atau cuba dari lokasi lain."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda kepada Verizon Wi-Fi Access disebabkan oleh ralat 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda kepada Verizon Wi-Fi Access disebabkan oleh ralat 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda ke Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak boleh menyambung ke Verizon Wi-Fi Access dari luar kawasan liputan Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Anda tidak melanggan Verizon Wi-Fi Access. Sila hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah dengan akaun Verizon Wi-Fi Access anda. Sila hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Anda sudah disambungkan ke Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah semasa menyambungkan anda ke Verizon Wi-Fi Access. Sila hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah dengan akaun Verizon Wi-Fi Access anda. Sila hubungi kami di 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access tidak tersedia dari lokasi anda. Cuba lagi nanti atau cuba dari lokasi lain."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-my/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-my/strings.xml
index 71df0af..86d5c9d 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-my/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-my/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon ဝန်ဆောင်မှုမရှိသည့်နေရာမှနေ၍ Verizon Wi-Fi Access သို့ ချိတ်ဆက်၍မရပါ။ (အမှားကုဒ် = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> - သင်သည် Verizon Wi-Fi Access သို့ စာရင်းသွင်းမထားပါ။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှား = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> - သင့် Verizon Wi-Fi Access အကောင့်တွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှားကုဒ် = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> - သင်သည် Verizon Wi-Fi Access သို့ ချိတ်ဆက်ထားပြီးဖြစ်သည်။ (အမှား = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon Wi-Fi Access သို့ ချိတ်ဆက်ရာတွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှားကုဒ် = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> - သင့် Verizon Wi-Fi Access အကောင့်တွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှား = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> - သင့်တည်နေရာတွင် Verizon Wi-Fi Access မရနိုင်ပါ။ နောက်မှထပ်စမ်းကြည့်ပါ သို့မဟုတ် အခြားတည်နေရာမှနေ၍ စမ်းကြည့်ပါ။ (အမှားကုဒ် = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon Wi-Fi Access သို့ ချိတ်ဆက်ရာတွင် ပြဿနာရှိနေသည်။ နောက်မှထပ်စမ်းကြည့်ပါ သို့မဟုတ် အခြားတည်နေရာမှနေ၍ စမ်းကြည့်ပါ။"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> - သင့်ကို Verizon Wi-Fi Access နှင့် ချိတ်ဆက်ပေးရာတွင် အမှားကုဒ် 16384 ကြောင့် ပြဿနာရှိတစ်ခုရှိနေသည်။"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> - သင့်ကို Verizon Wi-Fi Access နှင့် ချိတ်ဆက်ပေးရာတွင် အမှားကုဒ် 16385 ကြောင့် ပြဿနာရှိတစ်ခုရှိနေသည်။"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon Wi-Fi Access သို့ ချိတ်ဆက်ရာတွင် ပြဿနာရှိနေသည်။"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon ဝန်ဆောင်မှုမရှိသည့်နေရာမှနေ၍ Verizon Wi-Fi Access သို့ ချိတ်ဆက်၍မရပါ။"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> - သင်သည် Verizon Wi-Fi Access သို့ စာရင်းသွင်းမထားပါ။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> - သင့် Verizon Wi-Fi Access အကောင့်တွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> - သင်သည် Verizon Wi-Fi Access သို့ ချိတ်ဆက်ထားပြီးဖြစ်သည်။"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> - Verizon Wi-Fi Access သို့ ချိတ်ဆက်ရာတွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> - သင့် Verizon Wi-Fi Access အကောင့်တွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> - သင့်တည်နေရာတွင် Verizon Wi-Fi Access မရနိုင်ပါ။ နောက်မှထပ်စမ်းကြည့်ပါ သို့မဟုတ် အခြားတည်နေရာမှနေ၍ စမ်းကြည့်ပါ။"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-nb/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-nb/strings.xml
index b1cf82f..9f61888 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-nb/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-nb/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Du kan ikke koble til Verizon Wi-Fi Access fra utenfor Verizons dekningsområde. (Feil = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Du abonnerer ikke på Verizon Wi-Fi Access. Ring oss på 800-922-0204. (Feil = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med Verizon Wi-Fi Access-kontoen din. Ring oss på 800-922-0204. (Feil = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Du er allerede koblet til Verizon Wi-Fi Access. (Feil = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access. Ring oss på 800-922-0204. (Feil = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med Verizon Wi-Fi Access-kontoen din. Ring oss på 800-922-0204. (Feil = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access er ikke tilgjengelig fra der du er. Prøv igjen senere, eller prøv fra et annet sted. (Feil = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access. Prøv igjen senere, eller prøv fra et annet sted."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access på grunn av feil 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access på grunn av feil 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Du kan ikke koble til Verizon Wi-Fi Access fra utenfor Verizons dekningsområde."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Du abonnerer ikke på Verizon Wi-Fi Access. Ring oss på 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med Verizon Wi-Fi Access-kontoen din. Ring oss på 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Du er allerede koblet til Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access. Ring oss på 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med Verizon Wi-Fi Access-kontoen din. Ring oss på 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access er ikke tilgjengelig fra der du er. Prøv på nytt senere, eller prøv fra et annet sted."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ne/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ne/strings.xml
index c4cb8d3..7eeff09 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ne/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ne/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईं Verizon कभरेज क्षेत्रबाहिरबाट Verizon Wi-Fi Access मा कनेक्ट गर्न सक्नुहुन्न। (त्रुटि = ३२७६०)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंले Verizon Wi-Fi Access को सदस्यता लिनुभएको छैन। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६१)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको Verizon Wi-Fi Access खातामा कुनै समस्या छ। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६२)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंले आफ्नो डिभाइस Verizon Wi-Fi Access मा कनेक्ट गरिसक्नुभएको छ। (त्रुटि = ३२७६३)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६४)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको Verizon Wi-Fi Access खातामा कुनै समस्या छ। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६५)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईं रहेको स्थानमा Verizon Wi-Fi Access उपलब्ध छैन। पछि फेरि प्रयास गर्नुहोस् वा अर्को स्थानमा गएर कनेक्ट गर्ने प्रयास गर्नुहोस्। (त्रुटि = ३२७६६)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ। पछि फेरि प्रयास गर्नुहोस् वा अर्को स्थानमा गएर कनेक्ट गर्ने प्रयास गर्नुहोस्।"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : त्रुटि १६३८४ का कारण तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ।"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : त्रुटि १६३८५ का कारण तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ।"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ।"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईं Verizon कभरेज क्षेत्र बाहिरबाट Verizon Wi-Fi Access मा जोडिन सक्नुहुन्न।"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंले Verizon Wi-Fi Access को सदस्यता लिनुभएको छैन। कृपया 800-922-0204 मा फोन गर्नुहोस्।"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको Verizon Wi-Fi Access खातामा कुनै समस्या छ। कृपया 800-922-0204 मा फोन गर्नुहोस्।"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईं अहिले Verizon Wi-Fi Access मा नै जोडिनुभएको छ।"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंलाई Verizon Wi-Fi Access मा जोड्ने क्रममा कुनै समस्या भयो। कृपया 800-922-0204 मा फोन गर्नुहोस्।"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईंको Verizon Wi-Fi Access खातामा कुनै समस्या छ। कृपया 800-922-0204 मा फोन गर्नुहोस्।"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : तपाईं रहेको स्थानमा Verizon Wi-Fi Access उपलब्ध छैन। पछि फेरि प्रयास गर्नुहोस् वा अर्को स्थानमा गएर जोडिने प्रयास गर्नुहोस्।"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-nl/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-nl/strings.xml
index b968680..e78f85c 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-nl/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-nl/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: Je kunt buiten het dekkingsgebied van Verizon geen verbinding maken met Verizon Wi-Fi Access. (Fout = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: Je hebt geen abonnement op Verizon Wi-Fi Access. Bel ons op 800-922-0204. (Fout = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem met je Verizon Wi-Fi Access-account. Bel ons op 800-922-0204. (Fout = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: Je hebt al verbinding met Verizon Wi-Fi Access. (Fout = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij het maken van verbinding met Verizon Wi-Fi Access. Bel ons op 800-922-0204. (Fout = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem met je Verizon Wi-Fi Access-account. Bel ons op 800-922-0204. (Fout = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access is niet beschikbaar op jouw locatie. Probeer het later opnieuw of ga naar een andere locatie. (Fout = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij het maken van verbinding met Verizon Wi-Fi Access. Probeer het later opnieuw of ga naar een andere locatie."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij verbinding maken met Verizon Wi-Fi Access vanwege fout 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij verbinding maken met Verizon Wi-Fi Access vanwege fout 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij het maken van verbinding met Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: Je kunt buiten het dekkingsgebied van Verizon geen verbinding maken met Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: Je hebt geen abonnement op Verizon Wi-Fi Access. Bel ons op 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem met je Verizon Wi-Fi Access-account. Bel ons op 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: Je hebt al verbinding met Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij het maken van verbinding met Verizon Wi-Fi Access. Bel ons op 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem met je Verizon Wi-Fi Access-account. Bel ons op 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access is niet beschikbaar op jouw locatie. Probeer het later opnieuw of ga naar een andere locatie."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-or/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-or/strings.xml
index accb355..cbdaa0d 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-or/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-or/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ Verizon କଭରେଜ କ୍ଷେତ୍ର ବାହାରେ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିପାରିବେ ନାହିଁ। (ତ୍ରୁଟି = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ Verizon Wi-Fi Accessର ସଦସ୍ୟତା ନେଇନାହାଁନ୍ତି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ Verizon Wi-Fi Access ଆକାଉଣ୍ଟରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ ପୂର୍ବରୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିଛନ୍ତି। (ତ୍ରୁଟି = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ Verizon Wi-Fi Access ଆକାଉଣ୍ଟରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ଆପଣଙ୍କ ଲୋକେସନରେ ଉପଲବ୍ଧ ନାହିଁ। ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ କିମ୍ବା ଏକ ଭିନ୍ନ ଲୋକେସନରୁ ଚେଷ୍ଟା କରନ୍ତୁ। (ତ୍ରୁଟି = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ କିମ୍ବା ଏକ ଭିନ୍ନ ଲୋକେସନରୁ ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : ତ୍ରୁଟି 16384 ଯୋଗୁଁ ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି।"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : ତ୍ରୁଟି 16385 ଯୋଗୁଁ ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି।"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି।"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ Verizon କଭରେଜ୍ କ୍ଷେତ୍ର ବାହାରେ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିପାରିବେ ନାହିଁ।"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ Verizon Wi-Fi Accessର ସଦସ୍ୟତା ନେଇ ନାହାଁନ୍ତି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ୍ କରନ୍ତୁ।"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ Verizon Wi-Fi Access ଆକାଉଣ୍ଟରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ୍ କରନ୍ତୁ।"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ ପୂର୍ବରୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିସାରିଛନ୍ତି।"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ସମସ୍ୟା ହେଉଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ୍ କରନ୍ତୁ।"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ Verizon Wi-Fi Access ଆକାଉଣ୍ଟରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ୍ କରନ୍ତୁ।"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ଆପଣଙ୍କ ଲୋକେସନରେ ଉପଲବ୍ଧ ନାହିଁ। ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ କିମ୍ବା ଏକ ଭିନ୍ନ ଲୋକେସନରୁ ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-pa/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-pa/strings.xml
index 6951600..3ea97c2 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-pa/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-pa/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ Verizon ਕਵਰੇਜ ਖੇਤਰ ਤੋਂ ਬਾਹਰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਨਹੀਂ ਕਰ ਸਕਦੇ। (ਗੜਬੜ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ Verizon Wi-Fi Access ਲਈ ਗਾਹਕੀ ਨਹੀਂ ਲਈ ਹੋਈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਡੇ Verizon Wi-Fi Access ਖਾਤੇ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ ਪਹਿਲਾਂ ਤੋਂ ਹੀ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਹੋ। (ਗੜਬੜ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਡੇ Verizon Wi-Fi Access ਖਾਤੇ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ਤੁਹਾਡੇ ਟਿਕਾਣੇ ਤੋਂ ਉਪਲਬਧ ਨਹੀਂ ਹੈ। ਬਾਅਦ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜਾਂ ਕਿਸੇ ਹੋਰ ਟਿਕਾਣੇ ਤੋਂ ਕੋਸ਼ਿਸ਼ ਕਰੋ। (ਗੜਬੜ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਬਾਅਦ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜਾਂ ਕਿਸੇ ਹੋਰ ਟਿਕਾਣੇ ਤੋਂ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : ਗੜਬੜ 16384 ਕਰਕੇ ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ।"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : ਗੜਬੜ 16385 ਕਰਕੇ ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ।"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ।"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ Verizon ਕਵਰੇਜ ਖੇਤਰ ਤੋਂ ਬਾਹਰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਨਹੀਂ ਕਰ ਸਕਦੇ।"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ Verizon Wi-Fi Access ਲਈ ਗਾਹਕੀ ਨਹੀਂ ਲਈ ਹੋਈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ।"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਡੇ Verizon Wi-Fi Access ਖਾਤੇ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ।"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ ਪਹਿਲਾਂ ਤੋਂ ਹੀ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਹੋ।"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ।"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਡੇ Verizon Wi-Fi Access ਖਾਤੇ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ।"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ਤੁਹਾਡੇ ਟਿਕਾਣੇ ਤੋਂ ਉਪਲਬਧ ਨਹੀਂ ਹੈ। ਬਾਅਦ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜਾਂ ਕਿਸੇ ਹੋਰ ਟਿਕਾਣੇ ਤੋਂ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-pl/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-pl/strings.xml
index 8686cca..364da71 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-pl/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-pl/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : nie możesz połączyć się z Wi-Fi Verizon poza obszarem obsługiwanym przez Verizon. (Błąd = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : nie subskrybujesz Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z Twoim kontem Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : połączenie z Wi-Fi Verizon jest już aktywne. (Błąd = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z Twoim kontem Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : usługa Wi-Fi Verizon jest niedostępna w Twojej lokalizacji. Spróbuj ponownie później lub z innej lokalizacji. (Błąd = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon. Spróbuj ponownie później lub z innej lokalizacji."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon z powodu błędu 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon z powodu błędu 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : nie możesz połączyć się z Wi-Fi Verizon poza obszarem obsługiwanym przez Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : nie subskrybujesz Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z Twoim kontem Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : już jesteś połączony z Wi-Fi Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z Twoim kontem Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Wi-Fi Verizon jest niedostępne w Twojej lokalizacji. Spróbuj ponownie później lub z innej lokalizacji."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-pt-rBR/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-pt-rBR/strings.xml
index 080d4c1..a082141 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-pt-rBR/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-pt-rBR/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível se conectar ao Verizon Wi-Fi Access fora da área de cobertura. Código de erro: 32760."</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: você não se inscreveu no Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32761."</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32762."</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: você já se conectou ao Verizon Wi-Fi Access. Código de erro: 32763."</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32764."</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32765."</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: o Verizon Wi-Fi Access não está disponível no seu local. Tente novamente mais tarde ou de um local diferente. Código de erro: 32766."</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Tente novamente mais tarde ou de um local diferente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível se conectar ao Verizon Wi-Fi Access fora da área de cobertura."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: você não se inscreveu no Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: você já se conectou ao Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: o Verizon Wi-Fi Access não está disponível neste local. Tente novamente mais tarde ou de um local diferente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-pt-rPT/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-pt-rPT/strings.xml
index 8883d17..f6fae1b 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-pt-rPT/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-pt-rPT/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível estabelecer ligação ao ponto de acesso Wi-Fi da Verizon fora da área de cobertura da Verizon. (Erro = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: não possui uma subscrição do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: existe um problema com a sua conta do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: já tem ligação ao ponto de acesso Wi-Fi da Verizon. (Erro = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: existe um problema com a sua conta do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: o ponto de acesso Wi-Fi da Verizon não está disponível a partir da sua localização. Tente novamente mais tarde ou experimente a partir de uma localização diferente. (Erro = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon. Tente novamente mais tarde ou experimente a partir de uma localização diferente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon devido ao erro 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon devido ao erro 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível estabelecer ligação ao ponto de acesso Wi-Fi da Verizon fora da área de cobertura da Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: não possui uma subscrição do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: existe um problema com a sua conta do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: já tem ligação ao ponto de acesso Wi-Fi da Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao estabelecer ligação ao ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: existe um problema com a sua conta do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: o ponto de acesso Wi-Fi da Verizon não está disponível a partir da sua localização. Tente novamente mais tarde ou experimente a partir de uma localização diferente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-pt/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-pt/strings.xml
index 080d4c1..a082141 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-pt/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-pt/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível se conectar ao Verizon Wi-Fi Access fora da área de cobertura. Código de erro: 32760."</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: você não se inscreveu no Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32761."</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32762."</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: você já se conectou ao Verizon Wi-Fi Access. Código de erro: 32763."</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32764."</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Código de erro: 32765."</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: o Verizon Wi-Fi Access não está disponível no seu local. Tente novamente mais tarde ou de um local diferente. Código de erro: 32766."</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Tente novamente mais tarde ou de um local diferente."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: não é possível se conectar ao Verizon Wi-Fi Access fora da área de cobertura."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: você não se inscreveu no Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: você já se conectou ao Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: o Verizon Wi-Fi Access não está disponível neste local. Tente novamente mais tarde ou de um local diferente."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ro/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ro/strings.xml
index 6786a21..cb915f2 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ro/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ro/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : nu vă puteți conecta la Verizon Wi-Fi Access în afara ariei de acoperire Verizon. (Eroare = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : nu v-ați abonat la Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de contul dvs. Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : v-ați conectat deja la Verizon Wi-Fi Access. (Eroare = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de contul dvs. Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nu este disponibil în locația dvs. Încercați din nou mai târziu sau încercați dintr-o altă locație. (Eroare = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access. Încercați din nou mai târziu sau încercați dintr-o altă locație."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access din cauza erorii 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access din cauza erorii 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : nu vă puteți conecta la Verizon Wi-Fi Access în afara ariei de acoperire Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : nu v-ați abonat la Verizon Wi-Fi Access. Apelați-ne la 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de contul dvs. Verizon Wi-Fi Access. Apelați-ne la 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : v-ați conectat deja la Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de conectarea la Verizon Wi-Fi Access. Apelați-ne la 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : există o problemă legată de contul dvs. Verizon Wi-Fi Access. Apelați-ne la 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nu este disponibil în locația dvs. Încercați din nou mai târziu sau încercați dintr-o altă locație."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ru/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ru/strings.xml
index e7394e7..ab1a53b 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ru/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ru/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: вы не можете подключиться к сервису Verizon Wi-Fi Access вне зоны покрытия Verizon. Код ошибки: 32760."</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: вы не подписаны на сервис Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32761."</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: возникла проблема с вашим аккаунтом Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32762."</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: вы уже подключены к сервису Verizon Wi-Fi Access. Код ошибки: 32763."</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32764."</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: возникла проблема с вашим аккаунтом Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32765."</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: сервис Verizon Wi-Fi Access недоступен там, где вы находитесь. Повторите попытку позже или в другом месте. Код ошибки: 32766."</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access. Повторите попытку позже или в другом месте."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access из-за ошибки 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access из-за ошибки 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: вы не можете подключиться к сервису Verizon Wi-Fi Access вне зоны покрытия Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: вы не подписаны на сервис Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: возникла проблема с вашим аккаунтом Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: вы уже подключены к сервису Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: возникла проблема с вашим аккаунтом Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: сервис Verizon Wi-Fi Access недоступен там, где вы находитесь. Повторите попытку позже или в другом месте."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-si/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-si/strings.xml
index 5f56892..48e9f42 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-si/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-si/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ආවරණ ප්‍රදේශයට පිටතින් ඔබට Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ විය නොහැකිය. (දෝෂය = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබ Verizon Wi-Fi ප්‍රවේශය වෙත ග්‍රාහක වී නැත. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබගේ Verizon Wi-Fi ප්‍රවේශ ගිණුම සම්බන්ධ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබ දැනටමත් Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ වී ඇත. (දෝෂය = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබගේ Verizon Wi-Fi ප්‍රවේශ ගිණුම සම්බන්ධ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ප්‍රවේශය ඔබගේ ස්ථානය වෙතින් ලබා ගත නොහැකිය. පසුව නැවත උත්සාහ කරන්න නැතහොත් වෙනත් ස්ථානයකින් උත්සාහ කරන්න. (දෝෂය = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ. පසුව නැවත උත්සාහ කරන්න නැතහොත් වෙනත් ස්ථානයකින් උත්සාහ කරන්න."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 දෝෂය හේතුවෙන් ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 දෝෂය හේතුවෙන් ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon ආවරණ ප්‍රදේශයට පිටතින් ඔබට Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ විය නොහැකිය."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබ Verizon Wi-Fi ප්‍රවේශය වෙත දායක වී නැත. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබේ Verizon Wi-Fi ප්‍රවේශ ගිණුම හා ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබ දැනටමත් Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ වී ඇත."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : ඔබේ Verizon Wi-Fi ප්‍රවේශ ගිණුම හා ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ප්‍රවේශය ඔබේ ස්ථානය වෙතින් ලබා ගත නොහැකිය. පසුව නැවත උත්සාහ කරන්න නැතහොත් වෙනත් ස්ථානයකින් උත්සාහ කරන්න."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-sk/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-sk/strings.xml
index a0de029..27cc33b 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-sk/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-sk/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : k službe Verizon Wi-Fi Access sa nemôžete pripojiť mimo oblasti, v ktorej Verizon poskytuje služby. (Chyba = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access neodoberáte. Zavolajte na číslo 800-922-0204. (Chyba = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : vyskytol sa problém s vaším účtom Verizon Wi-Fi Access. Zavolajte na číslo 800-922-0204. (Chyba = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : k službe Verizon Wi-Fi Access ste sa už pripojili. (Chyba = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém. Zavolajte na číslo 800-922-0204. (Chyba = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : vyskytol sa problém s vaším účtom Verizon Wi-Fi Access. Zavolajte na číslo 800-922-0204. (Chyba = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nie je k dispozícii vo vašej oblasti. Skúste to znova alebo pokus zopakujte v inej oblasti. (Chyba = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém. Skúste to znova alebo pokus zopakujte v inej oblasti."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém, ktorý spôsobila chyba 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém, ktorý spôsobila chyba 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : K službe Verizon Wi-Fi Access sa nemôžete pripojiť mimo oblasti, v ktorej Verizon poskytuje služby."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Službu Verizon Wi-Fi Access neodoberáte. Zavolajte na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Vyskytol sa problém s vaším účtom Verizon Wi-Fi Access. Zavolajte na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : K službe Verizon Wi-Fi Access ste sa už pripojili."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém. Zavolajte na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Vyskytol sa problém s vaším účtom Verizon Wi-Fi Access. Zavolajte na číslo 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nie je k dispozícii vo vašej oblasti. Skúste to znova alebo pokus zopakujte v inej oblasti."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-sl/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-sl/strings.xml
index 457caf0..222bf50 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-sl/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-sl/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: Povezave s storitvijo Verizon Wi-Fi Access ni mogoče vzpostaviti zunaj območja, ki ga pokriva operater Verizon. (napaka = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: Niste naročeni na storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave z vašim računom za storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: Povezava s storitvijo Verizon Wi-Fi Access je že vzpostavljena. (napaka = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave z vašim računom za storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Storitev Verizon Wi-Fi Access ni na voljo na vaši lokaciji. Poskusite znova pozneje ali z druge lokacije. (napaka = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access. Poskusite znova pozneje ali z druge lokacije."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access zaradi napake 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access zaradi napake 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: Povezave s storitvijo Verizon Wi-Fi Access ni mogoče vzpostaviti zunaj območja, ki ga pokriva operater Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: Niste naročeni na storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave z vašim računom za storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: Povezava s storitvijo Verizon Wi-Fi Access je že vzpostavljena."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access. Pokličite nas na 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave z vašim računom za storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Storitev Verizon Wi-Fi Access ni na voljo na vaši lokaciji. Poskusite znova pozneje ali z druge lokacije."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-sq/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-sq/strings.xml
index 1d985fa..3583db1 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-sq/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-sq/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Nuk mund të lidhesh me Verizon Wi-Fi Access nga jashtë zonës së mbulimit të Verizon. (Gabimi = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Nuk je abonuar në Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me llogarinë tënde të Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Je lidhur tashmë me Verizon Wi-Fi Access. (Gabimi = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me lidhjen tënde me Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me llogarinë tënde të Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nuk ofrohet nga vendndodhja jote. Provo përsëri më vonë ose provo nga një vendndodhje tjetër. (Gabimi = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me lidhjen tënde me Verizon Wi-Fi Access. Provo përsëri më vonë ose provo nga një vendndodhje tjetër."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me lidhjen tënde me Verizon Wi-Fi Access për shkak të gabimit 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me lidhjen tënde me Verizon Wi-Fi Access për shkak të gabimit 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me lidhjen tënde me Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Nuk mund të lidhesh me Verizon Wi-Fi Access nga jashtë zonës së mbulimit të Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Nuk je abonuar në Verizon Wi-Fi Access. Na telefono në 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me llogarinë tënde të Verizon Wi-Fi Access. Na telefono në 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Je lidhur tashmë me Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem gjatë lidhjes sate me Verizon Wi-Fi Access. Na telefono në 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Ka një problem me llogarinë tënde të Verizon Wi-Fi Access. Na telefono në 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nuk ofrohet nga vendndodhja jote. Provo përsëri më vonë ose provo nga një vendndodhje tjetër."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-sr/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-sr/strings.xml
index 195fbd5..e4edd17 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-sr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-sr/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Не можете да се повежете на Verizon WiFi Access ван области коју Verizon покрива. (Грешка = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Нисте претплаћени на Verizon Wi-Fi Access. Позовите нас на 800 922 0204. (Грешка = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon Wi-Fi Access налогом. Позовите нас на 800 922 0204. (Грешка = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Већ сте повезани на Verizon WiFi Access. (Грешка = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon Wi-Fi Access. Позовите нас на 800 922 0204. (Грешка = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon Wi-Fi Access налогом. Позовите нас на 800 922 0204. (Грешка = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access није доступан са ваше локације. Пробајте поново касније или пробајте са неке друге локације. (Грешка = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon Wi-Fi Access. Пробајте поново касније или пробајте са неке друге локације."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access због грешке 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access због грешке 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Не можете да се повежете на Verizon WiFi Access ван области коју Verizon покрива."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Нисте претплаћени на Verizon WiFi Access. Позовите нас на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon WiFi Access налогом. Позовите нас на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Већ сте повезани на Verizon WiFi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access. Позовите нас на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon WiFi Access налогом. Позовите нас на 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon WiFi Access није доступан са ваше локације. Пробајте поново касније или пробајте са неке друге локације."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-sv/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-sv/strings.xml
index 9f8a5c8..0f4fa89 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-sv/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-sv/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: Du kan inte ansluta till Verizon Wi-Fi Access om du befinner dig utanför Verizons täckningsområde. (Fel = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: Du prenumererar inte på Verizon Wi-Fi Access. Ring oss på 800 922 0204. (Fel = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: Ett fel har uppstått i Verizon Wi-Fi Access-kontot. Ring oss på 800 922 0204. (Fel = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: Du är redan ansluten till Verizon Wi-Fi Access. (Fel = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access. Ring oss på 800 922 0204. (Fel = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: Ett fel har uppstått i Verizon Wi-Fi Access-kontot. Ring oss på 800 922 0204. (Fel = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access är inte tillgängligt där du befinner dig. Försök igen senare eller anslut från en annan plats. (Fel = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access. Försök igen senare eller anslut från en annan plats."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access på grund av felet 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access på grund av felet 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Det går inte att ansluta till Verizon wifi Access om du befinner dig utanför Verizons täckningsområde."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Du prenumererar inte på Verizon wifi Access. Ring oss på 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Ett fel har uppstått i Verizon wifi Access-kontot. Ring oss på 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Du är redan ansluten till Verizon wifi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Det gick inte att ansluta till Verizon wifi Access. Ring oss på 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Ett fel har uppstått i Verizon wifi Access-kontot. Ring oss på 800 922 0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon wifi Access är inte tillgängligt där du befinner dig. Försök igen senare eller anslut från en annan plats."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-sw/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-sw/strings.xml
index 2967f3a..3601dc1 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-sw/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-sw/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Huwezi kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon ukiwa nje ya eneo la mtandao wa Verizon. (Hitilafu = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Hujajisajili kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya Akaunti yako ya huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Tayari umeunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. (Hitilafu = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya Akaunti yako ya huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Huduma ya Ufikiaji wa Wi-Fi ya Verizon haipatikani katika eneo lako. Jaribu tena baadaye au ujaribu ukiwa katika eneo tofauti. (Hitilafu = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. Jaribu tena baadaye au ujaribu ukiwa katika eneo tofauti."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon kutokana na hitilafu ya 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon kutokana na hitilafu ya 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Huwezi kuunganisha kwenye Ufikiaji wa Wi-Fi ya Verizon ukiwa nje ya eneo la mtandao wa Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Hujajisajili kwenye Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya Akaunti yako ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Tayari umeunganisha kwenye Ufikiaji wa Wi-Fi ya Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya kuunganisha kwenye Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya Akaunti yako ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Ufikiaji wa Wi-Fi ya Verizon haupatikani katika eneo lako. Jaribu tena baadaye au ujaribu ukiwa katika eneo tofauti."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ta/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ta/strings.xml
index 32facc9..1a1083e 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ta/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ta/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon கவரேஜ் இல்லாத பகுதியில் Verizon Wi-Fi Accessஸுடன் இணைக்க முடியாது. (பிழை = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access சேவைக்கு நீங்கள் சந்தா பெறவில்லை. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் Verizon Wi-Fi Access கணக்கில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் ஏற்கெனவே இணைக்கப்பட்டுள்ளீர்கள். (பிழை = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் Verizon Wi-Fi Access கணக்கில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் பகுதியில் Verizon Wi-Fi Access சேவை கிடைக்கவில்லை. மீண்டும் முயலவும் அல்லது வேறு இடத்திலிருந்து முயலவும். (பிழை = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது. மீண்டும் முயலவும் அல்லது வேறு இடத்திலிருந்து முயலவும்."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 பிழை காரணமாக Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 பிழை காரணமாக Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon கவரேஜ் பகுதியைத் தாண்டி Verizon வைஃபை Accessஸுடன் இணைக்க முடியாது."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : நீங்கள் Verizon வைஃபை Accessஸிற்கு சந்தா செய்யவில்லை. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும்."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் Verizon வைஃபை Access கணக்கில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும்."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon வைஃபை Accessஸுடன் ஏற்கெனவே இணைப்பில் உள்ளீர்கள்."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon வைஃபை Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும்."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் Verizon வைஃபை Access கணக்கில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும்."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : உங்கள் பகுதிக்கு Verizon வைஃபை Access சேவை கிடைக்கவில்லை. மீண்டும் முயலவும் அல்லது வேறு இருப்பிடத்தில் இருந்து முயலவும்."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-te/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-te/strings.xml
index 502bd2e..1dc2a02 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-te/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-te/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు Verizon కవరేజీ ప్రాంతానికి వెలుపల నుండి Verizon Wi-Fi Accessకు కనెక్ట్ చేయలేరు. (ఎర్రర్ = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు Verizon Wi-Fi Accessకు సబ్‌స్క్రయిబ్ చేసుకోలేదు. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : మీ Verizon Wi-Fi Access ఖాతాలో సమస్య ఉంది. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు ఇప్పటికే Verizon Wi-Fi Accessకు కనెక్ట్ చేయబడ్డారు. (ఎర్రర్ = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessకు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : మీ Verizon Wi-Fi Access ఖాతాలో సమస్య ఉంది. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : మీ లొకేషన్ వద్ద Verizon Wi-Fi Access అందుబాటులో లేదు. తర్వాత మళ్లీ ట్రై చేయండి లేదా వేరే లొకేషన్ నుండి ట్రై చేయండి. (ఎర్రర్ = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessకు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది. తర్వాత మళ్లీ ట్రై చేయండి లేదా వేరే లొకేషన్ నుండి ట్రై చేయండి."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 ఎర్రర్ కారణంగా మిమ్మల్ని Verizon Wi-Fi Accessకు కనెక్ట్ చేయడంలో సమస్య ఏర్పడింది."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 ఎర్రర్ కారణంగా మిమ్మల్ని Verizon Wi-Fi Accessకు కనెక్ట్ చేయడంలో సమస్య ఏర్పడింది."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessకు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు Verizon కవరేజీ ప్రాంతానికి వెలుపల నుండి Verizon Wi-Fi యాక్సెస్‌కు కనెక్ట్ చేయలేరు."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు Verizon Wi-Fi యాక్సెస్‌కు సభ్యత్వం పొందలేదు. 800-922-0204 నంబర్ వద్ద దయచేసి మాకు కాల్ చేయండి."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : మీ Verizon Wi-Fi యాక్సెస్ ఖాతాలో సమస్య ఉంది. 800-922-0204 నంబర్ వద్ద దయచేసి మాకు కాల్ చేయండి."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : మీరు ఇప్పటికే Verizon Wi-Fi యాక్సెస్‌కు కనెక్ట్ చేయబడ్డారు."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi యాక్సెస్‌కు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది. 800-922-0204 నంబర్ వద్ద దయచేసి మాకు కాల్ చేయండి."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : మీ Verizon Wi-Fi యాక్సెస్ ఖాతాలో సమస్య ఉంది. 800-922-0204 నంబర్ వద్ద దయచేసి మాకు కాల్ చేయండి."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : మీ లొకేషన్ వద్ద Verizon Wi-Fi యాక్సెస్ అందుబాటులో లేదు. తర్వాత మళ్లీ ప్రయత్నించండి లేదా వేరే లొకేషన్ నుండి ప్రయత్నించండి."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-th/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-th/strings.xml
index 387c5fe..62240c1 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-th/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-th/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : คุณไม่สามารถเชื่อมต่อกับ Verizon Wi-Fi Access จากนอกพื้นที่ให้บริการของ Verizon (ข้อผิดพลาด = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : คุณไม่ได้สมัครใช้บริการ Verizon Wi-Fi Access โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : บัญชี Verizon Wi-Fi Access ของคุณมีปัญหา โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : คุณเชื่อมต่อกับ Verizon Wi-Fi Access อยู่แล้ว (ข้อผิดพลาด = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : บัญชี Verizon Wi-Fi Access ของคุณมีปัญหา โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ไม่พร้อมให้บริการจากตำแหน่งของคุณ โปรดลองอีกครั้งในภายหลังหรือลองจากตำแหน่งอื่น (ข้อผิดพลาด = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access โปรดลองอีกครั้งในภายหลังหรือลองจากตำแหน่งอื่น"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access เนื่องจากข้อผิดพลาด 16384"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access เนื่องจากข้อผิดพลาด 16385"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : คุณเชื่อมต่อกับ Verizon Wi-Fi Access จากนอกพื้นที่ให้บริการของ Verizon ไม่ได้"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : คุณไม่ได้สมัครใช้บริการ Verizon Wi-Fi Access โปรดโทรหาเราที่ 800-922-0204"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : บัญชี Verizon Wi-Fi Access ของคุณมีปัญหา โปรดโทรหาเราที่ 800-922-0204"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : คุณเชื่อมต่อกับ Verizon Wi-Fi Access แล้ว"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access โปรดโทรหาเราที่ 800-922-0204"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : บัญชี Verizon Wi-Fi Access ของคุณมีปัญหา โปรดโทรหาเราที่ 800-922-0204"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ไม่พร้อมให้บริการจากตำแหน่งของคุณ โปรดลองอีกครั้งในภายหลังหรือลองจากตำแหน่งอื่น"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-tl/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-tl/strings.xml
index 1ae2d0e..834e939 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-tl/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-tl/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi ka puwedeng kumonekta sa Verizon Wi-Fi Access mula sa labas ng lugar na saklaw ng Verizon. (Error = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi ka naka-subscribe sa Verizon Wi-Fi Access. Pakitawagan kami sa 800-922-0204. (Error = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa iyong Verizon Wi-Fi Access account. Pakitawagan kami sa 800-922-0204. (Error = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Nakakonekta ka na sa Verizon Wi-Fi Access. (Error = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access. Pakitawagan kami sa 800-922-0204. (Error = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa iyong Verizon Wi-Fi Access account. Pakitawagan kami sa 800-922-0204. (Error = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi available sa iyong lokasyon ang Verizon Wi-Fi Access. Subukan ulit sa ibang pagkakataon o subukan mula sa ibang lokasyon. (Error = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access. Subukan ulit sa ibang pagkakataon o subukan mula sa ibang lokasyon."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access dahil sa error 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access dahil sa error 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi ka puwedeng kumonekta sa Verizon Wi-Fi Access mula sa labas ng lugar na saklaw ng Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi ka naka-subscribe sa Verizon Wi-Fi Access. Pakitawagan kami sa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa iyong Verizon Wi-Fi Access account. Pakitawagan kami sa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Nakakonekta ka na sa Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access. Pakitawagan kami sa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : May problema sa iyong Verizon Wi-Fi Access account. Pakitawagan kami sa 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Hindi available sa iyong lokasyon ang Verizon Wi-Fi Access. Subukan ulit sa ibang pagkakataon o subukan mula sa ibang lokasyon."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-tr/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-tr/strings.xml
index bf6604b..e09fbf3 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-tr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-tr/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon\'ın kapsama alanının dışından Verizon Wi-Fi Access\'e bağlanamazsınız. (Hata = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access abonesi değilsiniz. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access hesabınızla ilgili bir sorun var. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e zaten bağlısınız. (Hata = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access hesabınızla ilgili bir sorun var. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access bulunduğunuz konumdan kullanılamıyor. Daha sonra tekrar deneyin veya farklı bir konumdan bağlanmaya çalışın. (Hata = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu. Daha sonra tekrar deneyin veya farklı bir konumdan bağlanmaya çalışın."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 hatası nedeniyle Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 hatası nedeniyle Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon\'ın kapsama alanının dışından Verizon Wi-Fi Access\'e bağlanamazsınız."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access abonesi değilsiniz. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access hesabınızla ilgili bir sorun var. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e zaten bağlısınız."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access\'e bağlanırken bir sorun oluştu. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access hesabınızla ilgili bir sorun var. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access bulunduğunuz konumdan kullanılamıyor. Daha sonra tekrar deneyin veya farklı bir konumdan bağlanmaya çalışın."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-uk/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-uk/strings.xml
index 9d1b63d..422a78a 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-uk/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-uk/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>: не можна підключитися до Verizon Wi-Fi Access за межами зони покриття Verizon. (Помилка = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>: у вас немає підписки на Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з вашим обліковим записом Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>: пристрій уже підключено до Verizon Wi-Fi Access. (Помилка = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з вашим обліковим записом Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>: сервіс Verizon Wi-Fi Access недоступний за вашим місцезнаходженням. Повторіть спробу пізніше або змініть місцезнаходження. (Помилка = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access. Повторіть спробу пізніше або змініть місцезнаходження."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з підключенням до Verizon Wi-Fi Access через помилку 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з підключенням до Verizon Wi-Fi Access через помилку 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>: не можна підключитися до Verizon Wi-Fi Access за межами зони покриття."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>: у вас немає підписки на Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з вашим обліковим записом Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>: пристрій уже підключено до Verizon Wi-Fi Access."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з вашим обліковим записом Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>: сервіс Verizon Wi-Fi Access недоступний за вашим розташуванням. Повторіть спробу пізніше або змініть місцезнаходження."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-ur/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-ur/strings.xml
index 49d0dbf..4cd77f1 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-ur/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-ur/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ Verizon کوریج علاقے کے باہر سے Verizon Wi-Fi رسائی سے منسلک نہیں ہو سکتے۔ (خرابی = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ نے Verizon Wi-Fi رسائی کو سبسکرائب نہیں کیا ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کے Verizon Wi-Fi رسائی اکاؤنٹ کے ساتھ ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ پہلے سے ہی Verizon Wi-Fi رسائی سے منسلک ہیں۔ (خرابی = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کے Verizon Wi-Fi رسائی اکاؤنٹ کے ساتھ ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"‏<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi رسائی آپ کے مقام سے دستیاب نہیں ہے۔ بعد میں دوبارہ کوشش کریں یا دوسرے مقام سے کوشش کریں۔ (خرابی = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔ بعد میں دوبارہ کوشش کریں یا دوسرے مقام سے کوشش کریں۔"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"‏<xliff:g id="SSID">%1$s</xliff:g> : خرابی 16384 کی وجہ سے آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"‏<xliff:g id="SSID">%1$s</xliff:g> : خرابی 16385 کی وجہ سے آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ Verizon کوریج علاقہ کے باہر سے Verizon Wi-Fi رسائی کے لیے منسلک نہیں کر سکتے ہیں۔"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ Verizon Wi-Fi رسائی کے رکن نہیں ہیں۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کے Verizon Wi-Fi رسائی اکاؤنٹ کے ساتھ ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ پہلے سے ہی Verizon Wi-Fi رسائی سے منسلک ہیں۔"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"‏<xliff:g id="SSID">%1$s</xliff:g> : آپ کے Verizon Wi-Fi رسائی اکاؤنٹ کے ساتھ ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"‏<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi رسائی آپ کے مقام سے دستیاب نہیں ہے۔ بعد میں دوبارہ کوشش کریں یا دوسرے مقام سے کوشش کر کے دیکھیں۔"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-uz/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-uz/strings.xml
index 94e5864..c0d3347 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-uz/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-uz/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon qamrovidan tashqarida Verizon Wi-Fi Access xizmatiga ulana olmaysiz. (Xato = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga obuna boʻlmagansiz. 800-922-0204 raqamiga telefon qiling. (Xato = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hisobingiz bilan muammo bor. 800-922-0204 raqamiga telefon qiling. (Xato = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Allaqachon Verizon Wi-Fi Access xizmatiga ulangansiz. (Xato = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi. 800-922-0204 raqamiga telefon qiling. (Xato = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hisobingiz bilan muammo bor. 800-922-0204 raqamiga telefon qiling. (Xato = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access siz turgan joyda ishlamaydi. Keyinroq qayta urining yoki boshqa joydan urining. (Xato = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi. Keyinroq qayta urining yoki boshqa joydan urining."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 16384 xatosi tufayli Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 16385 xatosi tufayli Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon qamrovidan tashqarida Verizon Wi-Fi Access xizmatiga ulana olmaysiz."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga obuna boʻlmagansiz. 800-922-0204 raqamiga telefon qiling."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hisobingiz bilan muammo bor. 800-922-0204 raqamiga telefon qiling."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Allaqachon Verizon Wi-Fi Access xizmatiga ulangansiz."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo chiqdi. 800-922-0204 raqamiga telefon qiling."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hisobingiz bilan muammo bor. 800-922-0204 raqamiga telefon qiling."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access siz turgan joyda ishlamaydi. Keyinroq qayta urining yoki boshqa joydan urining."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-vi/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-vi/strings.xml
index b27b69c..1be10e6 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-vi/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-vi/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn không kết nối được với dịch vụ Truy cập Wi-Fi của Verizon từ bên ngoài khu vực phủ sóng của Verizon. (Lỗi = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn chưa đăng ký dịch vụ Truy cập Wi-Fi của Verizon. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố với tài khoản Truy cập Wi-Fi của Verizon mà bạn sử dụng. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn đã kết nối với dịch vụ Truy cập Wi-Fi của Verizon. (Lỗi = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố với tài khoản Truy cập Wi-Fi của Verizon mà bạn sử dụng. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Dịch vụ Truy cập Wi-Fi của Verizon chưa có ở vị trí của bạn. Hãy thử lại sau hoặc thử ở một vị trí khác. (Lỗi = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon. Hãy thử lại sau hoặc thử ở một vị trí khác."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon do lỗi 16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon do lỗi 16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn không thể kết nối với dịch vụ Truy cập Wi-Fi của Verizon từ bên ngoài khu vực phủ sóng của Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn chưa đăng ký dịch vụ Truy cập Wi-Fi của Verizon. Vui lòng gọi cho chúng tôi theo số 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố với tài khoản Truy cập Wi-Fi của Verizon mà bạn có. Vui lòng gọi cho chúng tôi theo số 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Bạn đã kết nối với dịch vụ Truy cập Wi-Fi của Verizon."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon. Vui lòng gọi cho chúng tôi theo số 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố với tài khoản Truy cập Wi-Fi của Verizon mà bạn có. Vui lòng gọi cho chúng tôi theo số 800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Không có dịch vụ Truy cập Wi-Fi của Verizon tại vị trí của bạn. Hãy thử lại sau hoặc thử ở một vị trí khác."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rCN/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rCN/strings.xml
index 3ec426e..3e1c924 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rCN/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rCN/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>:您无法从 Verizon 覆盖区域外的地点连接到 Verizon Wi-Fi Access。(错误 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>:您没有订阅 Verizon Wi-Fi Access。请拨打 800-922-0204 与我们联系。(错误 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帐号出现问题。请拨打 800-922-0204 与我们联系。(错误 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>:您已经连接到 Verizon Wi-Fi Access。(错误 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>:将您连接到 Verizon Wi-Fi Access 时出现问题。请拨打 800-922-0204 与我们联系。(错误 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帐号出现问题。请拨打 800-922-0204 与我们联系。(错误 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>:Verizon Wi-Fi Access 在您所在的地点无法使用。请稍后重试,或换个地点再试一次。(错误 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>:将您连接到 Verizon Wi-Fi Access 时出现问题。请稍后重试,或换个地点再试一次。"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>:由于错误 16384,将您连接到 Verizon Wi-Fi Access 时出现问题。"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>:由于错误 16385,将您连接到 Verizon Wi-Fi Access 时出现问题。"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>:将您连接到 Verizon Wi-Fi Access 时出现问题。"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>:您无法从 Verizon 覆盖区域外的地点连接到 Verizon WLAN Access。"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>:您没有订阅 Verizon WLAN Access。请拨打 800-922-0204 与我们联系。"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon WLAN Access 帐号出现问题。请拨打 800-922-0204 与我们联系。"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>:您已连接到 Verizon WLAN Access。"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>:将您连接到 Verizon WLAN Access 时出现问题。请拨打 800-922-0204 与我们联系。"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon WLAN Access 帐号出现问题。请拨打 800-922-0204 与我们联系。"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>:Verizon WLAN Access 在您所在的地点无法使用。请稍后重试,或换个地点再试一次。"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rHK/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rHK/strings.xml
index 3abf513..285bdc7 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rHK/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rHK/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g>:無法從 Verizon 訊號覆蓋範圍外的地點連線至 Verizon Wi-Fi Access (錯誤 = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g>:您未訂閱 Verizon Wi-Fi Access。請致電 800-922-0204 與我們聯絡 (錯誤 = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帳戶發生問題。請致電 800-922-0204 與我們聯絡 (錯誤 = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g>:您已連線至 Verizon Wi-Fi Access (錯誤 = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。請致電 800-922-0204 與我們聯絡 (錯誤 = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帳戶發生問題。請致電 800-922-0204 與我們聯絡 (錯誤 = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g>:您目前的所在地點無法使用 Verizon Wi-Fi Access,請稍後再試。您亦可換個地點,然後再試一次 (錯誤 = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。請稍後再試。您亦可換個地點,然後再試一次。"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g>:錯誤 16384 導致連線至 Verizon Wi-Fi Access 時發生問題。"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g>:錯誤 16385 導致連線至 Verizon Wi-Fi Access 時發生問題。"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>:無法從 Verizon 訊號覆蓋範圍外的地點連線至 Verizon Wi-Fi Access。"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>:您未訂閱 Verizon Wi-Fi Access。請致電 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帳戶發生問題。請致電 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>:您已連線至 Verizon Wi-Fi Access。"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。請致電 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帳戶發生問題。請致電 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>:您目前的所在地點無法使用 Verizon Wi-Fi Access,請稍後再試。您亦可換個地點,然後再試一次。"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rTW/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rTW/strings.xml
index a972b7e..7f166e8 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rTW/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-zh-rTW/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : 無法在 Verizon 訊號涵蓋範圍之外的地點連線至 Verizon Wi-Fi Access (錯誤 = 32760)。"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : 你並未訂閱 Verizon Wi-Fi Access。請撥打 800-922-0204 與我們聯絡 (錯誤 = 32761)。"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : 你的 Verizon Wi-Fi Access 帳戶發生問題。請撥打 800-922-0204 與我們聯絡 (錯誤 = 32762)。"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : 你已連線至 Verizon Wi-Fi Access (錯誤 = 32763)。"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : 連線至 Verizon Wi-Fi Access 時發生問題,請撥打 800-922-0204 與我們聯絡 (錯誤 = 32764)。"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : 你的 Verizon Wi-Fi Access 帳戶發生問題。請撥打 800-922-0204 與我們聯絡 (錯誤 = 32765)。"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : 你目前的所在地點無法使用 Verizon Wi-Fi Access,請稍後再試。你也可以換個地點,然後再試一次 (錯誤 = 32766)。"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : 連線至 Verizon Wi-Fi Access 時發生問題,請稍後再試。你也可以換個地點,然後再試一次。"</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : 發生錯誤 16384,因此無法連線至 Verizon Wi-Fi Access。"</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : 發生錯誤 16385,因此無法連線至 Verizon Wi-Fi Access。"</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : 連線至 Verizon Wi-Fi Access 時發生問題。"</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g>:無法在 Verizon 訊號涵蓋範圍之外的地點連線至 Verizon Wi-Fi Access。"</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g>:你並未訂閱 Verizon Wi-Fi Access。請撥打 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g>:你的 Verizon Wi-Fi Access 帳戶發生問題。請撥打 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g>:你已連線至 Verizon Wi-Fi Access。"</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。請撥打 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g>:你的 Verizon Wi-Fi Access 帳戶發生問題。請撥打 800-922-0204 與我們聯絡。"</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g>:你目前的所在地點無法使用 Verizon Wi-Fi Access,請稍後再試。你也可以換個地點,然後再試一次。"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480-zu/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480-zu/strings.xml
index 6365e21..a72353b 100644
--- a/service/ServiceWifiResources/res/values-mcc311-mnc480-zu/strings.xml
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480-zu/strings.xml
@@ -16,17 +16,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="wifi_eap_error_message_code_32760" msgid="3261764688537859713">"<xliff:g id="SSID">%1$s</xliff:g> : Awukwazi ukuxhuma kukufinyelela kwi-Verizon Wi-Fi kusuka ngaphandle kwendawo yokufakwa ye-Verizon. (Iphutha = 32760)"</string>
-    <string name="wifi_eap_error_message_code_32761" msgid="1871122777148389539">"<xliff:g id="SSID">%1$s</xliff:g> : Awubhalisele ukufinyelela kwi-Verizon Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32761)"</string>
-    <string name="wifi_eap_error_message_code_32762" msgid="7021976880137083261">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga nge-akhawunti yakho yokufinyelela kwi-Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32762)"</string>
-    <string name="wifi_eap_error_message_code_32763" msgid="6747866353019749815">"<xliff:g id="SSID">%1$s</xliff:g> : Usuxhumeke kakade kukufinyelela kwi-Verizon Wi-Fi. (Iphutha = 32763)"</string>
-    <string name="wifi_eap_error_message_code_32764" msgid="5438673929477381203">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma kukufinyelela kwi-Verizon Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32764)"</string>
-    <string name="wifi_eap_error_message_code_32765" msgid="2927499260559495889">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga nge-akhawunti yakho yokufinyelela kwi-Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32765)"</string>
-    <string name="wifi_eap_error_message_code_32766" msgid="825723520633879152">"<xliff:g id="SSID">%1$s</xliff:g> : Ukufinyelela kwi-Verizon Wi-Fi akutholakali kusuka endaweni yakho. Zama futhi ngemuva kwesikhathi noma zama indawo ehlukile. (Iphutha = 32766)"</string>
-    <string name="wifi_eap_error_message_code_32767" msgid="5227394021313254586">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma kukufinyelela kwi-Verizon Wi-Fi. Zama futhi ngemuva kwesikhathi noma zama indawo ehlukile."</string>
-    <string name="wifi_eap_error_message_code_32768" msgid="5139270879227638419"></string>
-    <string name="wifi_eap_error_message_code_32769" msgid="1736674109204049023"></string>
-    <string name="wifi_eap_error_message_code_16384" msgid="1100339784338115021">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma ekufinyeleleni kwi-Verizon Wi-Fi ngenxa yephutha elingu-16384."</string>
-    <string name="wifi_eap_error_message_code_16385" msgid="4279775601920162197">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma ekufinyeleleni kwi-Verizon Wi-Fi ngenxa yephutha elingu-16385."</string>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="3323018400668273886">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma kukufinyelela kwi-Verizon Wi-Fi."</string>
+    <string name="wifi_eap_error_message_code_32760" msgid="1073938428568671170">"<xliff:g id="SSID">%1$s</xliff:g> : Awukwazi ukuxhuma kukufinyelela kwi-Verizon Wi-Fi kusuka ngaphandle kwendawo yokufakwa ye-Verizon."</string>
+    <string name="wifi_eap_error_message_code_32761" msgid="5240496654119200117">"<xliff:g id="SSID">%1$s</xliff:g> : Awubhalisele ukufinyelela kwi-Verizon Wi-Fi. Sicela usishayele ucingo ku-800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32762" msgid="1380081181230313771">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga nge-akhawunti yakho yokufinyelela kwi-Wi-Fi. Sicela usishayele ucingo ku-800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32763" msgid="2668371888408710653">"<xliff:g id="SSID">%1$s</xliff:g> : Usuxhumeke kakade kukufinyelela kwi-Verizon Wi-Fi."</string>
+    <string name="wifi_eap_error_message_code_32764" msgid="4857239018269450670">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma kukufinyelela kwi-Verizon Wi-Fi. Sicela usishayele ucingo ku-800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32765" msgid="3223606535554861258">"<xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga nge-akhawunti yakho yokufinyelela kwi-Wi-Fi. Sicela usishayele ucingo ku-800-922-0204."</string>
+    <string name="wifi_eap_error_message_code_32766" msgid="2703925241673900110">"<xliff:g id="SSID">%1$s</xliff:g> : Ukufinyelela kwi-Verizon Wi-Fi akutholakali kusuka endaweni yakho. Zama futhi ngemuva kwesikhathi noma zama indawo ehlukile."</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mcc311-mnc480/strings.xml b/service/ServiceWifiResources/res/values-mcc311-mnc480/strings.xml
new file mode 100644
index 0000000..af976d4
--- /dev/null
+++ b/service/ServiceWifiResources/res/values-mcc311-mnc480/strings.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2020 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.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- A notification is shown when eap failure happens. It should be overridden by carrier-specific overlays. -->
+    <string name="wifi_eap_error_message_code_32760"><xliff:g id="ssid">%1$s</xliff:g> : You can\u2019t connect to Verizon Wi-Fi Access from outside the Verizon coverage area.</string>
+    <string name="wifi_eap_error_message_code_32761"><xliff:g id="ssid">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi Access. Please call us at 800-922-0204.</string>
+    <string name="wifi_eap_error_message_code_32762"><xliff:g id="ssid">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204.</string>
+    <string name="wifi_eap_error_message_code_32763"><xliff:g id="ssid">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi Access.</string>
+    <string name="wifi_eap_error_message_code_32764"><xliff:g id="ssid">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi Access. Please call us at 800-922-0204.</string>
+    <string name="wifi_eap_error_message_code_32765"><xliff:g id="ssid">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204.</string>
+    <string name="wifi_eap_error_message_code_32766"><xliff:g id="ssid">%1$s</xliff:g> : Verizon Wi-Fi Access is not available from your location. Try again later or try from a different location.</string>
+</resources>
diff --git a/service/ServiceWifiResources/res/values-mk/strings.xml b/service/ServiceWifiResources/res/values-mk/strings.xml
index d555968..5079742 100644
--- a/service/ServiceWifiResources/res/values-mk/strings.xml
+++ b/service/ServiceWifiResources/res/values-mk/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Поставките се ажурирани. Обидете се да се поврзете повторно."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Не може да се променат поставките за приватност"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Не е пронајдена мрежа"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 32756 при проверката со EAP"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 32760 при проверката со EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : не може да се поврзете на Verizon Wi-Fi Access надвор од областа на покривање на Verizon. (Грешка = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 32761 при проверката со EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : не сте претплатени на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 32762 при проверката со EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : проблем со вашата сметка на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 32763 при проверката со EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : веќе сте поврзани на Verizon Wi-Fi Access. (Грешка = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 32764 при проверката со EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 32765 при проверката со EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : проблем со вашата сметка на Verizon Wi-Fi Access. Контактирајте со нас на 800-922-0204. (Грешка = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 32766 при проверката со EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access не е достапна од вашата локација. Пробајте повторно подоцна или од друга локација. (Грешка = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 32767 при проверката со EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access. Пробајте повторно подоцна или од друга локација."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 16384 при проверката со EAP"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access поради грешка 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: грешка 16385 при проверката со EAP"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access поради грешка 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : грешка при проверката со EAP, непознат код за грешка"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : наидовме на проблем при обидот да ве поврземе на Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Точката на пристап е исклучена"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Нема поврзани уреди. Допрете за да измените."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi е исклучено"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"За да се поврзете на <xliff:g id="SSID">%1$s</xliff:g>, вметнете SIM-картичка на <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> сака да користи ресурс за вмрежување"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Ова може да предизвика проблеми за <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Ова може да претставува проблем за следните апликации: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Дозволи"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Не дозволувај"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Дали мрежава е доверлива?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Поврзи се"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Не поврзувај се"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Дозволете поврзување со мрежава само ако податоците долу изгледаат точни.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Име на сервер:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Име на издавач:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Организација:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Контактирајте со:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Потпис:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Мрежава треба да се потврди"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Прегледајте ги деталите за мрежа за <xliff:g id="SSID">%1$s</xliff:g> пред поврзување. Допрете за да продолжите."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Не успеа инсталирањето сертификат."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Не може да се потврди мрежава"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Сепак поврзи се"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Не поврзувај"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"На мрежата <xliff:g id="SSID">%1$s</xliff:g> ѝ недостасува сертификат."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Дознајте како да додадете сертификати"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Не може да се потврди мрежава"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"На мрежата <xliff:g id="SSID">%1$s</xliff:g> ѝ недостасува сертификат. Допрете за да дознаете како да додадете сертификати."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Сепак поврзи се"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Не поврзувај"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Да се дозволи <xliff:g id="APP_NAME">%1$s</xliff:g> да вклучува Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Може да го исклучите Wi‑Fi во „Брзи поставки“"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Дозволи"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Не дозволувај"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ml/strings.xml b/service/ServiceWifiResources/res/values-ml/strings.xml
index 737c0e6..632de13 100644
--- a/service/ServiceWifiResources/res/values-ml/strings.xml
+++ b/service/ServiceWifiResources/res/values-ml/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"ക്രമീകരണം അപ്‌ഡേറ്റ് ചെയ്തു. വീണ്ടും കണക്‌റ്റ് ചെയ്യാൻ ശ്രമിക്കുക."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"സ്വകാര്യതാ ക്രമീകരണം മാറ്റാനാവില്ല"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"നെറ്റ്‌വർക്ക് കണ്ടെത്തിയില്ല"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്‌നം 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon കവറേജ് ഏരിയയ്‌ക്ക് പുറത്ത് നിന്ന് നിങ്ങൾക്ക് Verizon വൈഫൈ ആക്‌സസിലേക്ക് കണക്റ്റ് ചെയ്യാനാകില്ല. (പിശക് = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസിൽ നിങ്ങൾ വരിക്കാരായിട്ടില്ല. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങളുടെ Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട് ഒരു പ്രശ്‌നമുണ്ട്. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങൾ Verizon വൈഫൈ ആക്‌സസിലേക്ക് മുമ്പേ കണക്‌റ്റ് ചെയ്‌തിട്ടുണ്ട്. (പിശക് = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : നിങ്ങളുടെ Verizon വൈഫൈ ആക്‌സസ് അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട് ഒരു പ്രശ്‌നമുണ്ട്. 800-922-0204 എന്ന നമ്പറിൽ ഞങ്ങളെ വിളിക്കുക. (പിശക് = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസ് നിങ്ങളുടെ ലൊക്കേഷനിൽ ലഭ്യമല്ല. പിന്നീട് വീണ്ടും ശ്രമിക്കുക അല്ലെങ്കിൽ മറ്റൊരു ലൊക്കേഷനിൽ നിന്ന് ശ്രമിക്കുക. (പിശക് = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്. പിന്നീട് വീണ്ടും ശ്രമിക്കുക അല്ലെങ്കിൽ മറ്റൊരു ലൊക്കേഷനിൽ നിന്ന് ശ്രമിക്കുക."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16384 പിശക് കാരണം Verizon വൈഫൈ ആക്‌സസിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16385 പിശക് കാരണം Verizon വൈഫൈ ആക്‌സസിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP പരിശോധിച്ചുറപ്പിക്കുന്നതിലെ പ്രശ്നം, അജ്ഞാത പിശക് കോഡ്"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon വൈഫൈ ആക്‌സസിലേക്ക് നിങ്ങളെ കണക്‌റ്റ് ചെയ്യുന്നതിൽ ഒരു പ്രശ്‌നമുണ്ട്."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"ഹോട്ട്‌സ്‌പോട്ട് ഓഫാക്കി"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"ഉപകരണങ്ങളൊന്നും കണക്‌റ്റ് ചെയ്തിട്ടില്ല. പരിഷ്‌കരിക്കാൻ ടാപ്പ് ചെയ്യുക."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"വൈഫൈ വിച്ഛേദിച്ചു"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> എന്നതിലേക്ക് കണക്‌റ്റ് ചെയ്യാൻ <xliff:g id="CARRIER_NAME">%2$s</xliff:g> സിം ഇടുക"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> എന്നത് ഒരു നെറ്റ്‌വർക്കിംഗ് ഉറവിടം ഉപയോഗിക്കാൻ ആഗ്രഹിക്കുന്നു"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"ഇത് <xliff:g id="APPS">%3$s</xliff:g> എന്നതിന് പ്രശ്‌നങ്ങൾ സൃഷ്‌ടിച്ചേക്കാം."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"ഇത് ഈ ആപ്പുകൾക്ക് പ്രശ്‌നം സൃഷ്‌ടിച്ചേക്കാം: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"അനുവദിക്കുക"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"അനുവദിക്കരുത്"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"ഈ നെറ്റ്‌വർക്ക് വിശ്വസനീയമാണോ?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"ഉവ്വ്, കണക്റ്റ് ചെയ്യുക"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"വേണ്ട, കണക്റ്റ് ചെയ്യരുത്"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"ചുവടെയുള്ള വിവരങ്ങൾ ശരിയാണെങ്കിൽ മാത്രം ഈ നെറ്റ്‌വർക്ക് കണക്റ്റ് ചെയ്യാൻ അനുവദിക്കുക.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"സെർവറിന്റെ പേര്:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"ഇഷ്യൂവറിന്റെ പേര്:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"സ്ഥാപനം:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"കോൺടാക്റ്റ്:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"ഒപ്പ്:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"നെറ്റ്‌വർക്ക് പരിശോധിച്ചുറപ്പിക്കേണ്ടതുണ്ട്"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"കണക്റ്റ് ചെയ്യുന്നതിന് മുമ്പ് <xliff:g id="SSID">%1$s</xliff:g> എന്നതിന്റെ നെറ്റ്‌വർക്ക് വിശദാംശങ്ങൾ അവലോകനം ചെയ്യുക. തുടരാൻ ടാപ്പ് ചെയ്യുക."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"സർട്ടിഫിക്കറ്റ് ഇൻസ്റ്റാൾ ചെയ്യാനായില്ല."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"ഈ നെറ്റ്‌വർക്ക് പരിശോധിച്ചുറപ്പിക്കാനാകുന്നില്ല"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"എന്തായാലും കണക്‌റ്റ് ചെയ്യുക"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"കണക്റ്റ് ചെയ്യരുത്"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> എന്ന നെറ്റ്‌വർക്കിന് ഒരു സർട്ടിഫിക്കറ്റ് ഇല്ല."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"സർട്ടിഫിക്കറ്റുകൾ ചേർക്കുന്നത് എങ്ങനെയെന്നറിയൂ"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"ഈ നെറ്റ്‌വർക്ക് പരിശോധിച്ചുറപ്പിക്കാനാകുന്നില്ല"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> എന്ന നെറ്റ്‌വർക്കിന് ഒരു സർട്ടിഫിക്കറ്റ് ഇല്ല. സർട്ടിഫിക്കറ്റുകൾ ചേർക്കുന്നത് എങ്ങനെയെന്നറിയാൻ ടാപ് ചെയ്യുക."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"എന്തായാലും കണക്‌റ്റ് ചെയ്യുക"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"കണക്റ്റ് ചെയ്യരുത്"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"വൈഫൈ ഓണാക്കാൻ <xliff:g id="APP_NAME">%1$s</xliff:g> എന്നതിനെ അനുവദിക്കണോ?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"ദ്രുത ക്രമീകരണത്തിൽ നിങ്ങൾക്ക് വൈഫൈ ഓഫാക്കാൻ കഴിയും"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"അനുവദിക്കുക"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"അനുവദിക്കരുത്"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mn/strings.xml b/service/ServiceWifiResources/res/values-mn/strings.xml
index ab0b903..096bcfc 100644
--- a/service/ServiceWifiResources/res/values-mn/strings.xml
+++ b/service/ServiceWifiResources/res/values-mn/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Тохиргоог шинэчиллээ. Дахин холбогдохыг оролдоно уу."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Нууцлалын тохиргоог өөрчлөх боломжгүй байна"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Сүлжээ олдсонгүй"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-н баталгаажуулалтын алдаа 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP нотолгооны алдаа 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Та Verizon-н хамрах бүсийн гаднаас Verizon Wi-Fi хандалтад холбогдох боломжгүй. (Алдаа = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP нотолгооны алдаа 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Ta Verizon Wi-Fi хандалтыг захиалаагүй байна. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP нотолгооны алдаа 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Таны Verizon Wi-Fi хандалтын бүртгэлтэй холбоотой асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP нотолгооны алдаа 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Та Verizon Wi-Fi хандалтад аль хэдийн холбогдсон байна. (Алдаа = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP нотолгооны алдаа 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP нотолгооны алдаа 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Таны Verizon Wi-Fi хандалтын бүртгэлтэй холбоотой асуудал гарлаа. 800-922-0204 дугаар луу залгаж, бидэнтэй холбогдоно уу. (Алдаа = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP нотолгооны алдаа 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi хандалт нь таны байршлаас боломжгүй байна. Дараа дахин оролдох эсвэл өөр байршлаас оролдоно уу. (Алдаа = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-н баталгаажуулалтын алдаа 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа. Дараа дахин оролдох эсвэл өөр байршлаас оролдоно уу."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-н баталгаажуулалтын алдаа 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Алдаа 16384-ийн улмаас таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-н баталгаажуулалтын алдаа 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Алдаа 16385-ын улмаас таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-н баталгаажуулалтын алдаа. Алдааны код тодорхойгүй"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Таныг Verizon Wi-Fi хандалтад холбоход асуудал гарлаа."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Сүлжээний цэгийг унтраасан"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Ямар ч төхөөрөмж холбогдоогүй байна. Өөрчлөхийн тулд товшино уу."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wifi-г салгалаа"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g>-д холбогдохын тулд <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM-г хийнэ үү"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> сүлжээний эх сурвалж ашиглахыг хүсэж байна"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Энэ нь <xliff:g id="APPS">%3$s</xliff:g>-д асуудал үүсгэж болзошгүй."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Энэ нь эдгээр аппад асуудал үүсгэж болзошгүй: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Зөвшөөрөх"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Зөвшөөрөхгүй"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Энэ сүлжээ итгэмжлэгдсэн үү?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Тийм, холбогд"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Үгүй, бүү холбогд"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Зөвхөн доорх мэдээллийг зөв харагдаж байгаа тохиолдолд энэ сүлжээг холбохыг зөвшөөрнө үү.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Серверийн нэр:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Гаргагчийн нэр:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Байгууллага:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">\n"<xliff:g id="VALUE">%1$s</xliff:g>\n\n-тай холбогдох"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Гарын үсэг:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Сүлжээ баталгаажсан байх хэрэгтэй"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"<xliff:g id="SSID">%1$s</xliff:g> сүлжээний дэлгэрэнгүйг холбохоос өмнө үнэлнэ үү. Үргэлжлүүлэхийн тулд товшино уу."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Сертификатын суулгац амжилтгүй боллоо."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Энэ сүлжээг баталгаажуулах боломжгүй байна"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Ямар ч байсан холбогдох"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Бүү холбогд"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> сүлжээнд сертификат хоосон байна."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Хэрхэн сертификатууд нэмэхийг сураарай."</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Энэ сүлжээг баталгаажуулах боломжгүй байна"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> сүлжээнд сертификат хоосон байна. Хэрхэн сертификатууд нэмэх талаар сурах бол товшино уу."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Ямар ч байсан холбогдох"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Бүү холбогд"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g>-д Wi-Fi асаахыг зөвшөөрөх үү?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Та Wi-Fi-г Шуурхай тохиргоо хэсэгт унтраах боломжтой"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Зөвшөөр"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Бүү зөвшөөр"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-mr/strings.xml b/service/ServiceWifiResources/res/values-mr/strings.xml
index 4d4c79b..563b3da 100644
--- a/service/ServiceWifiResources/res/values-mr/strings.xml
+++ b/service/ServiceWifiResources/res/values-mr/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"सेटिंग अपडेट केले. पुन्हा कनेक्ट करण्याचा प्रयत्न करा."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"गोपनीयता सेटिंग्ज बदलू शकत नाही"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"नेटवर्क मिळाला नाही आहे"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर ३२७५६"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर ३२७६०"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : तुम्ही Verizon कव्हरेज क्षेत्राच्या बाहेरून Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करू शकत नाही. (एरर = ३२७६०)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर ३२७६१"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : तुम्ही Verizon वाय-फाय अ‍ॅक्सेस चे सदस्यत्व घेतलेले नाही. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = ३२७६१)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर ३२७६२"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : तुमच्या Verizon वाय-फाय अ‍ॅक्सेस खात्यामध्ये समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = ३२७६२)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर ३२७६३"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : तुम्ही आधीपासून Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट केलेले आहे. (एरर = ३२७६३)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर ३२७६४"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = ३२७६४)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर ३२७६५"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : तुमच्या Verizon वाय-फाय अ‍ॅक्सेस खात्यामध्ये समस्या आहे. कृपया आम्हाला ८००-९२२-०२०४ वर कॉल करा. (एरर = ३२७६५)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर ३२७६६"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : तुमच्या स्थानावरून Verizon वाय-फाय अ‍ॅक्सेस उपलब्ध नाही. नंतर पुन्हा प्रयत्न करा किंवा वेगळ्या स्थानावरून प्रयत्न करा. (एरर = ३२७६६)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली. नंतर पुन्हा प्रयत्न करा किंवा वेगळ्या स्थानावरून प्रयत्न करा."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : १६३८४ एरर आल्यामुळे तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : १६३८५ एरर आल्यामुळे तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ऑथेंटिकेशन एरर, अज्ञात एरर कोड"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : तुम्हाला Verizon वाय-फाय अ‍ॅक्सेस शी कनेक्ट करताना समस्या आली."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"हॉटस्पॉट बंद आहे"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"कोणतीही डिव्हाइस कनेक्ट केलेली नाहीत. सुधारित करण्यासाठी टॅप करा."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"वाय-फाय डिस्कनेक्ट झाले"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> शी कनेक्ट करण्यासाठी, एक <xliff:g id="CARRIER_NAME">%2$s</xliff:g> सिम घाला"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> ला नेटवर्किंग स्रोत वापरायचे आहे"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"यामुळे <xliff:g id="APPS">%3$s</xliff:g> ला समस्या येऊ शकतात."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"यामुळे पुढील अ‍ॅप्सना समस्या येऊ शकतात : <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"अनुमती द्या"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"अनुमती देऊ नका"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"हे नेटवर्क विश्वसनीय आहे का?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"होय, कनेक्ट करा"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"नाही, कनेक्ट करू नका"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"खालील माहिती योग्य वाटत असेल, तरच या नेटवर्कला कनेक्ट करण्याची अनुमती द्या.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"सर्व्हरचे नाव:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"जारीकर्त्याचे नाव:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"संस्था:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"संपर्क:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"स्वाक्षरी:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"नेटवर्कची पडताळणी करणे आवश्यक आहे"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"कनेक्ट करण्यापूर्वी <xliff:g id="SSID">%1$s</xliff:g> च्या नेटवर्कशी संबंधित तपशिलांचे पुनरावलोकन करा. सुरू ठेवण्यासाठी टॅप करा."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"प्रमाणपत्र इंस्टॉल करता आले नाही."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"या नेटवर्कची पडताळणी करता आली नाही"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"तरीही कनेक्ट करा"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"कनेक्ट करू नका"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> नेटवर्कचे प्रमाणपत्र उपलब्ध नाही."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"प्रमाणपत्रे कशी जोडायची ते जाणून घ्या"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"या नेटवर्कची पडताळणी करता आली नाही"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> नेटवर्कचे प्रमाणपत्र उपलब्ध नाही. प्रमाणपत्रे कशी जोडावी हे जाणून घेण्यासाठी, टॅप करा."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"तरीही कनेक्ट करा"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"कनेक्ट करू नका"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g> ला वाय-फाय सुरू करण्याची अनुमती द्यायची आहे का?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"तुम्ही क्विक सेटिंग्ज मध्ये वाय-फाय बंद करू शकता"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"अनुमती द्या"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"अनुमती देऊ नका"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ms/strings.xml b/service/ServiceWifiResources/res/values-ms/strings.xml
index b46abcb..9aa664c 100644
--- a/service/ServiceWifiResources/res/values-ms/strings.xml
+++ b/service/ServiceWifiResources/res/values-ms/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Tetapan dikemas kini. Cuba sambung lagi."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Tidak boleh menukar tetapan privasi"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Rangkaian tidak ditemukan"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Anda tidak boleh menyambung ke Verizon Wi-Fi Access dari luar kawasan liputan Verizon. (Ralat = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Anda tidak melanggan Verizon Wi-Fi Access. Sila hubungi kami di 800-922-0204. (Ralat = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah dengan akaun Verizon Wi-Fi Access anda. Sila hubungi kami di 800-922-0204. (Ralat = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Anda sudah disambungkan ke Verizon Wi-Fi Access. (Ralat = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda ke Verizon Wi-Fi Access. Sila hubungi kami di 800-922-0204. (Ralat = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah dengan akaun Verizon Wi-Fi Access anda. Sila hubungi kami di 800-922-0204. (Ralat = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access tidak tersedia dari lokasi anda. Cuba lagi nanti atau cuba dari lokasi lain. (Ralat = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda ke Verizon Wi-Fi Access. Cuba lagi nanti atau cuba dari lokasi lain."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda kepada Verizon Wi-Fi Access disebabkan oleh ralat 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda kepada Verizon Wi-Fi Access disebabkan oleh ralat 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Ralat pengesahan EAP, kod ralat tidak diketahui"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Terdapat masalah menyambungkan anda ke Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Tempat liputan dimatikan."</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Tiada peranti disambungkan. Ketik untuk mengubah suai."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi diputuskan sambungannya"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Untuk menyambung kepada <xliff:g id="SSID">%1$s</xliff:g>, masukkan SIM <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> ingin menggunakan sumber perangkaian"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Tindakan ini mungkin menyebabkan masalah untuk <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Hal ini mungkin menyebabkan masalah untuk apl ini: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Benarkan"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Jangan benarkan"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Adakah rangkaian ini dipercayai?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ya, sambung"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Tidak, jangan sambung"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Hanya benarkan rangkaian ini untuk bersambung jika maklumat di bawah kelihatan betul.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nama Pelayan:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nama Pengeluar:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisasi:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kenalan:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Tandatangan:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Rangkaian perlu disahkan"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Semak butiran rangkaian untuk <xliff:g id="SSID">%1$s</xliff:g> sebelum bersambung. Ketik untuk meneruskan."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Pemasangan sijil gagal."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Tidak dapat mengesahkan rangkaian ini"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Sambungkan juga"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Jangan sambung"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> rangkaian tiada sijil."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Ketahui cara menambah sijil"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Tidak dapat mengesahkan rangkaian ini"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> rangkaian tiada sijil. Ketik untuk mengetahui cara menambah sijil."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Sambungkan juga"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Jangan sambung"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Benarkan <xliff:g id="APP_NAME">%1$s</xliff:g> menghidupkan Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Anda boleh mematikan Wi‑Fi dalam Tetapan Pantas"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Benarkan"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Jangan benarkan"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-my/strings.xml b/service/ServiceWifiResources/res/values-my/strings.xml
index 3dd3fa1..31f9008 100644
--- a/service/ServiceWifiResources/res/values-my/strings.xml
+++ b/service/ServiceWifiResources/res/values-my/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"ဆက်တင် အပ်ဒိတ်လုပ်ပြီးပြီ။ ထပ်ချိတ်ဆက်ကြည့်ပါ။"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"ကိုယ်ရေးလုံခြုံမှုဆက်တင်ကို ပြောင်းလဲ၍မရပါ"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"ကွန်ရက်ကို ရှာမတွေ့ပါ"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှားကုဒ် 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှား 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - Verizon ဝန်ဆောင်မှုပေးသောနေရာ ပြင်ပမှ Verizon Wi-Fi Access သို့ ချိတ်ဆက်၍မရပါ။ (အမှား = ၃၂၇၆၀)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှား 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - သင်သည် Verizon Wi-Fi Access တွင် စာရင်းသွင်းမထားပါ။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှား = ၃၂၇၆၁)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှား 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - သင့် Verizon Wi-Fi Access အကောင့်တွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှား = ၃၂၇၆၂)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှား 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - သင်သည် Verizon Wi-Fi Access သို့ ချိတ်ဆက်ထားပြီးဖြစ်သည်။ (အမှား = ၃၂၇၆၃)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှား 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - သင့်ကို Verizon Wi-Fi Access နှင့် ချိတ်ဆက်ပေးရာတွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှားကုဒ် = ၃၂၇၆၄)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှား 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - သင့် Verizon Wi-Fi Access အကောင့်တွင် ပြဿနာရှိနေသည်။ ၈၀၀-၉၂၂-၀၂၀၄ ကို ခေါ်ပါ။ (အမှား = ၃၂၇၆၅)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှား 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - သင့်တည်နေရာတွင် Verizon Wi-Fi Access မရနိုင်ပါ။ နောက်မှထပ်စမ်းကြည့်ပါ (သို့) အခြားနေရာမှ စမ်းကြည့်ပါ။ (အမှားကုဒ် = ၃၂၇၆၆)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှားကုဒ် 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - သင့်ကို Verizon Wi-Fi Access နှင့် ချိတ်ဆက်ပေးရာတွင် ပြဿနာရှိနေသည်။ နောက်မှထပ်စမ်းကြည့်ပါ (သို့) အခြားနေရာမှ စမ်းကြည့်ပါ။"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှားကုဒ် 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - သင့်ကို Verizon Wi-Fi Access နှင့် ချိတ်ဆက်ပေးရာတွင် အမှားကုဒ် ၁၆၃၈၄ ကြောင့် ပြဿနာရှိနေသည်။"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှားကုဒ် 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - သင့်ကို Verizon Wi-Fi Access နှင့် ချိတ်ဆက်ပေးရာတွင် အမှားကုဒ် ၁၆၃၈၅ ကြောင့် ပြဿနာရှိနေသည်။"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> - EAP အထောက်အထားစိစစ်ခြင်း အမှား၊ အမှားကုဒ် မသိပါ"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> - သင့်ကို Verizon Wi-Fi Access နှင့် ချိတ်ဆက်ပေးရာတွင် ပြဿနာရှိနေသည်။"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"ဟော့စပေါ့ ပိတ်ထားသည်"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"ချိတ်ဆက်ထားသောစက် မရှိပါ။ ပြင်ဆင်ရန် တို့ပါ။"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi ချိတ်ဆက်မှု မရှိပါ"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> နှင့် ချိတ်ဆက်ရန် <xliff:g id="CARRIER_NAME">%2$s</xliff:g> ဆင်းမ်ကတ် ထည့်ပါ။"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> က ကွန်ရက်ရင်းမြစ်ကို အသုံးပြုလိုသည်"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"<xliff:g id="APPS">%3$s</xliff:g> အတွက် ပြဿနာများ ဖြစ်ပေါ်နိုင်သည်။"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"၎င်းက ဤအက်ပ်များအတွက် ပြဿနာများ ဖြစ်စေနိုင်သည်- <xliff:g id="APPS">%3$s</xliff:g>။"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"ခွင့်ပြုရန်"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"ခွင့်မပြုပါ"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"ဤကွန်ရက်ကို ယုံကြည်ရပါသလား။"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"ချိတ်ဆက်ရန်"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"မချိတ်ဆက်ပါနှင့်"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"အောက်ပါအချက်အလက်များ မှန်ကန်မှသာ ဤကွန်ရက်ကို ချိတ်ဆက်ရန်ခွင့်ပြုပါ။\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"ဆာဗာအမည်-\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"ထုတ်ပေးသူ အမည်-\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"အဖွဲ့အစည်း-\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"အဆက်အသွယ်-\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"လက်မှတ်-\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"ကွန်ရက်ကို စိစစ်ရမည်"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"မချိတ်ဆက်မီ <xliff:g id="SSID">%1$s</xliff:g> အတွက် ကွန်ရက်အသေးစိတ်ကို ကြည့်ရှုပါ။ ဆက်လုပ်ရန် တို့ပါ"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"အသိအမှတ်ပြုလက်မှတ် ထည့်သွင်း၍မရပါ။"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"ဤကွန်ရက်ကို စိစစ်၍မရပါ"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"မည်သို့ပင်ဖြစ်စေ ချိတ်ဆက်ရန်"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"မချိတ်ဆက်ပါနှင့်"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"ကွန်ရက် <xliff:g id="SSID">%1$s</xliff:g> တွင် အသိအမှတ်ပြုလက်မှတ် မရှိပါ။"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"အသိအမှတ်ပြုလက်မှတ်များ ထည့်သွင်းပုံ လေ့လာပါ"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"ဤကွန်ရက်ကို စိစစ်၍မရပါ"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"ကွန်ရက် <xliff:g id="SSID">%1$s</xliff:g> တွင် အသိအမှတ်ပြုလက်မှတ် မရှိပါ။ အသိအမှတ်ပြုလက်မှတ်များ ထည့်သွင်းပုံ လေ့လာရန် တို့ပါ။"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"မည်သို့ပင်ဖြစ်စေ ချိတ်ဆက်ရန်"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"မချိတ်ဆက်ပါနှင့်"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g> ကို Wi‑Fi ဖွင့်ခွင့်ပြုမလား။"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"‘အမြန် ဆက်တင်များ’ တွင် Wi‑Fi ပိတ်နိုင်သည်"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"ခွင့်ပြုရန်"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"ခွင့်မပြုရန်"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-nb/strings.xml b/service/ServiceWifiResources/res/values-nb/strings.xml
index c2e8360..b0c0e85 100644
--- a/service/ServiceWifiResources/res/values-nb/strings.xml
+++ b/service/ServiceWifiResources/res/values-nb/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Innstillingen er oppdatert. Prøv å koble til igjen."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Kan ikke endre personverninnstillingen"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Fant ikke nettverket"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Du kan ikke koble til Verizon Wi-Fi Access fra utenfor Verizons dekningsområde. (Feil = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Du abonnerer ikke på Verizon Wi-Fi Access. Ring oss på 800-922-0204. (Feil = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med Verizon Wi-Fi Access-kontoen din. Ring oss på 800-922-0204. (Feil = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Du er allerede koblet til Verizon Wi-Fi Access. (Feil = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access. Ring oss på 800-922-0204. (Feil = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med Verizon Wi-Fi Access-kontoen din. Ring oss på 800-922-0204. (Feil = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access er ikke tilgjengelig fra der du er. Prøv på nytt senere, eller prøv fra et annet sted. (Feil = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access. Prøv på nytt senere, eller prøv fra et annet sted."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access på grunn av feil 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access på grunn av feil 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-autentiseringsfeil, ukjent feilkode"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Det har oppstått et problem med å koble deg til Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Wi-Fi-sonen er slått av"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Ingen enheter er koblet til. Trykk for å endre."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi er frakoblet"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"For å koble til <xliff:g id="SSID">%1$s</xliff:g>, sett inn et <xliff:g id="CARRIER_NAME">%2$s</xliff:g>-SIM-kort"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> vil bruke en nettverksressurs"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Dette kan forårsake problemer for <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Dette kan forårsake problemer for disse appene: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Tillat"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Ikke tillat"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Stoler du på dette nettverket?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ja, koble til"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nei, ikke koble til"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Bare gi dette nettverket tillatelse til å koble til hvis informasjonen nedenfor ser riktig ut.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Tjenernavn:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Utstedernavn:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisasjon:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakt:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signatur:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Nettverket må bekreftes"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Gjennomgå nettverksdetaljene for <xliff:g id="SSID">%1$s</xliff:g> før du kobler til. Trykk for å fortsette."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Installeringen av sertifikatet mislyktes."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Kan ikke bekrefte dette nettverket"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Koble til likevel"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ikke koble til"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Nettverket <xliff:g id="SSID">%1$s</xliff:g> mangler et sertifikat."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Finn ut hvordan du legger til sertifikater"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Kan ikke bekrefte dette nettverket"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Nettverket <xliff:g id="SSID">%1$s</xliff:g> mangler et sertifikat. Trykk for å finne ut hvordan du legger til sertifikater."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Koble til likevel"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ikke koble til"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Vil du gi <xliff:g id="APP_NAME">%1$s</xliff:g> tillatelse til å slå på Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Du kan slå av Wi‑Fi i hurtiginnstillingene"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Tillat"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Ikke tillat"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ne/strings.xml b/service/ServiceWifiResources/res/values-ne/strings.xml
index 6427df7..3e044ed 100644
--- a/service/ServiceWifiResources/res/values-ne/strings.xml
+++ b/service/ServiceWifiResources/res/values-ne/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"सेटिङ अद्यावधिक गरियो। फेरि जोडी हेर्नुहोस्।"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"गोपनीयता सेटिङ परिवर्तन गर्न सकिँदैन"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"नेटवर्क फेला परेन"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि ३२७५६"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि ३२७६०"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : तपाईं Verizon कभरेज क्षेत्रबाहिरबाट Verizon Wi-Fi Access मा कनेक्ट गर्न सक्नुहुन्न। (त्रुटि = ३२७६०)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि ३२७६१"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : तपाईंले Verizon Wi-Fi Access को सदस्यता लिनुभएको छैन। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६१)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि ३२७६२"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : तपाईंको Verizon Wi-Fi Access खातामा कुनै समस्या छ। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६२)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि ३२७६३"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : तपाईंले आफ्नो डिभाइस Verizon Wi-Fi Access मा कनेक्ट गरिसक्नुभएको छ। (त्रुटि = ३२७६३)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि ३२७६४"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६४)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि ३२७६५"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : तपाईंको Verizon Wi-Fi Access खातामा कुनै समस्या छ। कृपया हामीलाई ८००-९२२-०२०४ मा कल गर्नुहोस्। (त्रुटि = ३२७६५)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि ३२७६६"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : तपाईं रहेको स्थानमा Verizon Wi-Fi Access उपलब्ध छैन। पछि फेरि प्रयास गर्नुहोस् वा अर्को स्थानमा गएर कनेक्ट गर्ने प्रयास गर्नुहोस्। (त्रुटि = ३२७६६)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि ३२७६७"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ। पछि फेरि प्रयास गर्नुहोस् वा अर्को स्थानमा गएर कनेक्ट गर्ने प्रयास गर्नुहोस्।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि १६३८४"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : त्रुटि १६३८४ का कारण तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि १६३८५"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : त्रुटि १६३८५ का कारण तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP प्रमाणीकरणसम्बन्धी त्रुटि, त्रुटिको कोड थाहा छैन"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g> : तपाईंको डिभाइस Verizon Wi-Fi Access मा कनेक्ट गर्ने क्रममा समस्या भइरहेको छ।"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"हटस्पट निष्क्रिय पारिएको छ"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"कुनै यन्त्र जोडिएको छैन। परिमार्जन गर्न ट्याप गर्नुहोस्।"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi विच्छेद गरियो।"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> मा जोडिन <xliff:g id="CARRIER_NAME">%2$s</xliff:g> को SIM सम्मिलित गर्नुहोस्"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> कुनै नेटवर्किङ स्रोत प्रयोग गर्न चाहन्छ"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"यसले गर्दा <xliff:g id="APPS">%3$s</xliff:g> मा समस्या आउन सक्छ।"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"यसले गर्दा यी एपहरूमा समस्या आउन सक्छ: <xliff:g id="APPS">%3$s</xliff:g>।"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"अनुमति दिनुहोस्"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"अनुमति नदिनुहोस्"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"यो नेटवर्क विश्वसनीय छ?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"कनेक्ट गर्नुहोस्"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"कनेक्ट नगर्नुहोस्"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"तलको जानकारी सही छ जस्तो देखिन्छ भने मात्र यो नेटवर्कलाई कनेक्ट गर्ने अनुमति दिनुहोस्।\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"सर्भरको नाम:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"जारीकर्ताको नाम:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"संस्थाको नाम:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"निम्नमा सम्पर्क गर्नुहोस्:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"हस्ताक्षर:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"नेटवर्कको पुष्टि गरिनु पर्ने हुन्छ"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"<xliff:g id="SSID">%1$s</xliff:g> मा कनेक्ट गर्नुअघि यसका नेटवर्कसम्बन्धी विवरण जाँच्नुहोस्। जारी राख्न ट्याप गर्नुहोस्।"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"प्रमाणपत्र इन्सटल गर्न सकिएन।"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"यो नेटवर्क पुष्टि गर्न सकिएन"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"जे भए पनि कनेक्ट गर्नुहोस्"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"कनेक्ट नगर्नुहोस्"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"नेटवर्क <xliff:g id="SSID">%1$s</xliff:g> मा कुनै एउटा प्रमाणपत्र छुटेको छ।"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"प्रमाणपत्र हाल्ने तरिका जान्नुहोस्"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"यो नेटवर्क पुष्टि गर्न सकिएन"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"नेटवर्क <xliff:g id="SSID">%1$s</xliff:g> मा कुनै एउटा प्रमाणपत्र छुटेको छ। प्रमाणपत्र हाल्ने तरिका जान्नका लागि ट्याप गर्नुहोस्।"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"जे भए पनि कनेक्ट गर्नुहोस्"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"कनेक्ट नगर्नुहोस्"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g> लाई Wi‑Fi अन गर्ने अनुमति दिने हो?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"तपाईं द्रुत सेटिङहरूमा गएर Wi‑Fi अफ गर्न सक्नुहुन्छ"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"अनुमति दिनुहोस्"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"अनुमति नदिनुहोस्"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-nl/strings.xml b/service/ServiceWifiResources/res/values-nl/strings.xml
index 65d6836..db9e233 100644
--- a/service/ServiceWifiResources/res/values-nl/strings.xml
+++ b/service/ServiceWifiResources/res/values-nl/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Instelling geüpdatet. Probeer opnieuw verbinding te maken."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Wijzigen van privacyinstelling is mislukt"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Netwerk niet gevonden"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Je kunt buiten het dekkingsgebied van Verizon geen verbinding maken met Verizon Wi-Fi Access. (Fout = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Je hebt geen abonnement op Verizon Wi-Fi Access. Bel ons op 800-922-0204. (Fout = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem met je Verizon Wi-Fi Access-account. Bel ons op 800-922-0204. (Fout = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Je hebt al verbinding met Verizon Wi-Fi Access. (Fout = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij verbinding maken met Verizon Wi-Fi Access. Bel ons op 800-922-0204. (Fout = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem met je Verizon Wi-Fi Access-account. Bel ons op 800-922-0204. (Fout = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access is niet beschikbaar op jouw locatie. Probeer het later opnieuw of ga naar een andere locatie. (Fout = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij verbinding maken met Verizon Wi-Fi Access. Probeer het later opnieuw of ga naar een andere locatie."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij verbinding maken met Verizon Wi-Fi Access vanwege fout 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-verificatiefout 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij verbinding maken met Verizon Wi-Fi Access vanwege fout 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP-verificatiefout, onbekende foutcode"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Er is een probleem bij verbinding maken met Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot staat uit"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Geen apparaten gekoppeld. Tik om te wijzigen."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wifi-verbinding verbroken"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Plaats een simkaart van <xliff:g id="CARRIER_NAME">%2$s</xliff:g> om verbinding te maken met <xliff:g id="SSID">%1$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> wil een netwerkbron gebruiken"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Dit kan problemen veroorzaken voor <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Dit kan problemen veroorzaken voor deze apps: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Toestaan"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Niet toestaan"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Is dit een vertrouwd netwerk?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ja, verbinding maken"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nee, geen verbinding maken"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Sta deze netwerkverbinding alleen toe als de onderstaande informatie juist lijkt.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Servernaam:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Naam uitgever:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisatie:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contact:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Handtekening:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Netwerk moet worden geverifieerd"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Check de netwerkgegevens voor <xliff:g id="SSID">%1$s</xliff:g> voordat je verbinding maakt. Tik om door te gaan."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Installatie van certificaat mislukt."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Kan dit netwerk niet verifiëren"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Toch verbinding maken"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Geen verbinding maken"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Er ontbreekt een certificaat voor het netwerk <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Leren hoe je certificaten toevoegt"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Kan dit netwerk niet verifiëren"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Er ontbreekt een certificaat voor het netwerk <xliff:g id="SSID">%1$s</xliff:g>. Tik om te bekijken hoe je certificaten toevoegt."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Toch verbinding maken"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Geen verbinding maken"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Toestaan dat <xliff:g id="APP_NAME">%1$s</xliff:g> wifi aanzet?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Je kunt wifi uitzetten via Snelle instellingen"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Toestaan"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Niet toestaan"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-or/strings.xml b/service/ServiceWifiResources/res/values-or/strings.xml
index ea3c970..5122c23 100644
--- a/service/ServiceWifiResources/res/values-or/strings.xml
+++ b/service/ServiceWifiResources/res/values-or/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"ସେଟିଂକୁ ଅପଡେଟ୍ କରାଯାଇଛି। ପୁଣି ସଂଯୋଗ କରିବାକୁ ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"ଗୋପନୀୟତା ସେଟିଂ ବଦଳିପାରିବ ନାହିଁ"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"ନେଟ୍‌ୱାର୍କ ମିଳିଲା ନାହିଁ"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣୀକରଣ ତ୍ରୁଟି 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣିକତାରେ ତ୍ରୁଟି 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ Verizon କଭରେଜ କ୍ଷେତ୍ରର ବାହାରେ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିପାରିବେ ନାହିଁ। (ତ୍ରୁଟି = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣିକତାରେ ତ୍ରୁଟି 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ Verizon Wi-Fi Accessର ସଦସ୍ୟତା ନେଇନାହାଁନ୍ତି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣିକତାରେ ତ୍ରୁଟି 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ Verizon Wi-Fi Access ଆକାଉଣ୍ଟରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣିକତାରେ ତ୍ରୁଟି 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ଆପଣ ପୂର୍ବରୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିଛନ୍ତି। (ତ୍ରୁଟି = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣିକତାରେ ତ୍ରୁଟି 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣିକତାରେ ତ୍ରୁଟି 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ Verizon Wi-Fi Access ଆକାଉଣ୍ଟରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ଦୟାକରି 800-922-0204ରେ ଆମକୁ କଲ କରନ୍ତୁ। (ତ୍ରୁଟି = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣିକତାରେ ତ୍ରୁଟି 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କ ଲୋକେସନରେ Verizon Wi-Fi Access ଉପଲବ୍ଧ ନାହିଁ। ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ କିମ୍ବା ଏକ ଭିନ୍ନ ଲୋକେସନରୁ ଚେଷ୍ଟା କରନ୍ତୁ। (ତ୍ରୁଟି = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣୀକରଣ ତ୍ରୁଟି 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି। ପରେ ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ କିମ୍ବା ଏକ ଭିନ୍ନ ଲୋକେସନରୁ ଚେଷ୍ଟା କରନ୍ତୁ।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣୀକରଣ ତ୍ରୁଟି 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ତ୍ରୁଟି 16384 ଯୋଗୁଁ ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣୀକରଣ ତ୍ରୁଟି 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ତ୍ରୁଟି 16385 ଯୋଗୁଁ ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ପ୍ରମାଣୀକରଣ ତ୍ରୁଟି, ଅଜଣା ତ୍ରୁଟି କୋଡ"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ଆପଣଙ୍କୁ Verizon Wi-Fi Access ସହ ସଂଯୋଗ କରିବାରେ ଏକ ସମସ୍ୟା ହୋଇଛି।"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"ହଟସ୍ପଟ୍ ବନ୍ଦ କରାଯାଇଛି"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"କୌଣସି ଡିଭାଇସ୍ ସଂଯୁକ୍ତ ନାହିଁ। ପରିବର୍ତ୍ତନ କରିବାକୁ ଟାପ୍ କରନ୍ତୁ।"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"ୱାଇ-ଫାଇ ସଂଯୋଗ ବିଚ୍ଛିନ୍ନ ହୋଇଛି"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g>କୁ ସଂଯୋଗ କରିବା ପାଇଁ ଏକ <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM ଭର୍ତ୍ତି କରନ୍ତୁ"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> ଏକ ନେଟୱାର୍କିଂ ରିସୋର୍ସ ବ୍ୟବହାର କରିବାକୁ ଚାହୁଁଛି"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"ଏହା <xliff:g id="APPS">%3$s</xliff:g> ପାଇଁ ସମସ୍ୟାର କାରଣ ହୋଇପାରେ।"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"ଏହି ଆପ୍ସ ପାଇଁ ଏହା ସମସ୍ୟାର କାରଣ ହୋଇପାରେ: <xliff:g id="APPS">%3$s</xliff:g>।"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"ଅନୁମତି ଦିଅନ୍ତୁ"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"ଅନୁମତି ଦିଅନ୍ତୁ ନାହିଁ"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"ଏହି ନେଟୱାର୍କଟି ବିଶ୍ୱସ୍ତ ଅଟେ?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"ହଁ, ସଂଯୋଗ କରନ୍ତୁ"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"ନା, ସଂଯୋଗ କରନ୍ତୁ ନାହିଁ"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"ଯଦି ନିମ୍ନୋକ୍ତ ସୂଚନା ଠିକ୍ ଲାଗେ, ତେବେ ହିଁ ଏହି ନେଟୱାର୍କକୁ ସଂଯୋଗ କରିବା ପାଇଁ ଅନୁମତି ଦିଅନ୍ତୁ।\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"ସର୍ଭର ନାମ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"ପ୍ରଦାନକାରୀର ନାମ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"ସଂସ୍ଥା:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"ଯୋଗାଯୋଗ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"ଦସ୍ତଖତ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"ନେଟୱାର୍କକୁ ଯାଞ୍ଚ କରିବା ଆବଶ୍ୟକ"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"ସଂଯୋଗ କରିବା ପୂର୍ବରୁ <xliff:g id="SSID">%1$s</xliff:g> ପାଇଁ ଥିବା ନେଟୱାର୍କ ବିବରଣୀର ସମୀକ୍ଷା କରନ୍ତୁ। ଜାରି ରଖିବାକୁ ଟାପ କରନ୍ତୁ।"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"ସାର୍ଟିଫିକେଟ ଇନଷ୍ଟଲ କରିବା ବିଫଳ ହୋଇଛି।"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"ଏହି ନେଟୱାର୍କକୁ ଯାଞ୍ଚ କରାଯାଇପାରିବ ନାହିଁ"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"ଯେ କୌଣସି ମତେ ସଂଯୋଗ କରନ୍ତୁ"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"ସଂଯୋଗ କରନ୍ତୁ ନାହିଁ"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> ନେଟୱାର୍କରେ ଏକ ସାର୍ଟିଫିକେଟ ଉପଲବ୍ଧ ନାହିଁ।"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"ସାର୍ଟିଫିକେଟଗୁଡ଼ିକ କିପରି ଯୋଗ କରିବେ ତାହା ଜାଣନ୍ତୁ"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"ଏହି ନେଟୱାର୍କକୁ ଯାଞ୍ଚ କରାଯାଇପାରିବ ନାହିଁ"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> ନେଟୱାର୍କରେ ଏକ ସାର୍ଟିଫିକେଟ ଉପଲବ୍ଧ ନାହିଁ। ସାର୍ଟିଫିକେଟଗୁଡ଼ିକ କିପରି ଯୋଗ କରିବେ ସେ ବିଷୟରେ ଜାଣିବା ପାଇଁ ଟାପ କରନ୍ତୁ।"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"ଯେ କୌଣସି ମତେ ସଂଯୋଗ କରନ୍ତୁ"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"ସଂଯୋଗ କରନ୍ତୁ ନାହିଁ"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"ୱାଇ-ଫାଇ ଚାଲୁ କରିବା ପାଇଁ <xliff:g id="APP_NAME">%1$s</xliff:g>କୁ ଅନୁମତି ଦେବେ?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"ଆପଣ କ୍ୱିକ ସେଟିଂସରେ ୱାଇ-ଫାଇ ବନ୍ଦ କରିପାରିବେ"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"ଅନୁମତି ଦିଅନ୍ତୁ"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"ଅନୁମତି ଦିଅନ୍ତୁ ନାହିଁ"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-pa/strings.xml b/service/ServiceWifiResources/res/values-pa/strings.xml
index 59320cb..feae8ce 100644
--- a/service/ServiceWifiResources/res/values-pa/strings.xml
+++ b/service/ServiceWifiResources/res/values-pa/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"ਸੈਟਿੰਗ ਅੱਪਡੇਟ ਕੀਤੀ ਗਈ। ਦੁਬਾਰਾ ਕਨੈਕਟ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"ਪਰਦੇਦਾਰੀ ਸੈਟਿੰਗ ਨਹੀਂ ਬਦਲ ਸਕਦੇ"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"ਨੈੱਟਵਰਕ ਨਹੀਂ ਮਿਲਿਆ"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ Verizon ਕਵਰੇਜ ਖੇਤਰ ਤੋਂ ਬਾਹਰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਨਹੀਂ ਕਰ ਸਕਦੇ। (ਗੜਬੜ = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ Verizon Wi-Fi Access ਲਈ ਗਾਹਕੀ ਨਹੀਂ ਲਈ ਹੋਈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਡੇ Verizon Wi-Fi Access ਖਾਤੇ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ਤੁਸੀਂ ਪਹਿਲਾਂ ਤੋਂ ਹੀ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਹੋ। (ਗੜਬੜ = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਡੇ Verizon Wi-Fi Access ਖਾਤੇ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਕਿਰਪਾ ਕਰਕੇ ਸਾਨੂੰ 800-922-0204 \'ਤੇ ਕਾਲ ਕਰੋ। (ਗੜਬੜ = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ਤੁਹਾਡੇ ਟਿਕਾਣੇ ਤੋਂ ਉਪਲਬਧ ਨਹੀਂ ਹੈ। ਬਾਅਦ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜਾਂ ਕਿਸੇ ਹੋਰ ਟਿਕਾਣੇ ਤੋਂ ਕੋਸ਼ਿਸ਼ ਕਰੋ। (ਗੜਬੜ = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ। ਬਾਅਦ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜਾਂ ਕਿਸੇ ਹੋਰ ਟਿਕਾਣੇ ਤੋਂ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ਗੜਬੜ 16384 ਦੇ ਕਾਰਨ ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ਗੜਬੜ 16385 ਦੇ ਕਾਰਨ ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ।"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ਪ੍ਰਮਾਣੀਕਰਨ ਗੜਬੜ, ਅਗਿਆਤ ਗੜਬੜ ਕੋਡ"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ਤੁਹਾਨੂੰ Verizon Wi-Fi Access ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਵਿੱਚ ਕੋਈ ਸਮੱਸਿਆ ਹੈ।"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"ਹੌਟਸਪੌਟ ਬੰਦ ਕੀਤਾ ਗਿਆ"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"ਕੋਈ ਕਨੈਕਟ ਕੀਤੇ ਹੋਏ ਡੀਵਾਈਸ ਨਹੀਂ। ਸੋਧਣ ਲਈ ਟੈਪ ਕਰੋ।"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"ਵਾਈ-ਫਾਈ ਡਿਸਕਨੈਕਟ ਕੀਤਾ ਗਿਆ"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਲਈ, <xliff:g id="CARRIER_NAME">%2$s</xliff:g> ਦਾ ਸਿਮ ਪਾਓ"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> ਕਿਸੇ ਨੈੱਟਵਰਕਿੰਗ ਸਰੋਤ ਦੀ ਵਰਤੋਂ ਕਰਨਾ ਚਾਹੁੰਦੀ ਹੈ"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"ਇਸ ਨਾਲ <xliff:g id="APPS">%3$s</xliff:g> ਵਿੱਚ ਸਮੱਸਿਆਵਾਂ ਆ ਸਕਦੀਆਂ ਹਨ।"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"ਇਸ ਨਾਲ ਇਨ੍ਹਾਂ ਐਪਾਂ ਲਈ ਸਮੱਸਿਆਵਾਂ ਆ ਸਕਦੀਆਂ ਹਨ: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"ਆਗਿਆ ਦਿਓ"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"ਆਗਿਆ ਨਾ ਦਿਓ"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"ਕੀ ਇਹ ਨੈੱਟਵਰਕ ਭਰੋਸੇਯੋਗ ਹੈ?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"ਹਾਂ, ਕਨੈਕਟ ਕਰੋ"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"ਨਹੀਂ, ਕਨੈਕਟ ਨਾ ਕਰੋ"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"ਹੇਠਾਂ ਦਿੱਤੀ ਜਾਣਕਾਰੀ ਸਹੀ ਲੱਗਣ \'ਤੇ ਹੀ ਇਸ ਨੈੱਟਵਰਕ ਨਾਲ ਕਨੈਕਟ ਕਰਨ ਦੀ ਇਜਾਜ਼ਤ ਦਿਓ।\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"ਸਰਵਰ ਦਾ ਨਾਮ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"ਜਾਰੀਕਰਤਾ ਦਾ ਨਾਮ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"ਸੰਸਥਾ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"ਸੰਪਰਕ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"ਦਸਤਖਤ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"ਨੈੱਟਵਰਕ ਦੀ ਪੁਸ਼ਟੀ ਕਰਨ ਦੀ ਲੋੜ ਹੈ"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"ਕਨੈਕਟ ਕਰਨ ਤੋਂ ਪਹਿਲਾਂ <xliff:g id="SSID">%1$s</xliff:g> ਲਈ ਨੈੱਟਵਰਕ ਵੇਰਵਿਆਂ ਦੀ ਸਮੀਖਿਆ ਕਰੋ। ਜਾਰੀ ਰੱਖਣ ਲਈ ਟੈਪ ਕਰੋ।"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"ਪ੍ਰਮਾਣ-ਪੱਤਰ ਨੂੰ ਸਥਾਪਤ ਕਰਨਾ ਅਸਫਲ ਰਿਹਾ।"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"ਇਸ ਨੈੱਟਵਰਕ ਦੀ ਪੁਸ਼ਟੀ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"ਫਿਰ ਵੀ ਕਨੈਕਟ ਕਰੋ"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"ਕਨੈਕਟ ਨਾ ਕਰੋ"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"ਨੈੱਟਵਰਕ <xliff:g id="SSID">%1$s</xliff:g> ਕੋਲ ਕੋਈ ਪ੍ਰਮਾਣ-ਪੱਤਰ ਮੌਜੂਦ ਨਹੀਂ ਹੈ।"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"ਪ੍ਰਮਾਣ-ਪੱਤਰਾਂ ਨੂੰ ਸ਼ਾਮਲ ਕਰਨ ਦਾ ਤਰੀਕਾ ਜਾਣੋ"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"ਇਸ ਨੈੱਟਵਰਕ ਦੀ ਪੁਸ਼ਟੀ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"ਨੈੱਟਵਰਕ <xliff:g id="SSID">%1$s</xliff:g> ਕੋਲ ਕੋਈ ਪ੍ਰਮਾਣ-ਪੱਤਰ ਮੌਜੂਦ ਨਹੀਂ ਹੈ। ਪ੍ਰਮਾਣ-ਪੱਤਰਾਂ ਨੂੰ ਸ਼ਾਮਲ ਕਰਨ ਦਾ ਤਰੀਕਾ ਜਾਣਨ ਲਈ ਟੈਪ ਕਰੋ।"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"ਫਿਰ ਵੀ ਕਨੈਕਟ ਕਰੋ"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"ਕਨੈਕਟ ਨਾ ਕਰੋ"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"ਕੀ <xliff:g id="APP_NAME">%1$s</xliff:g> ਨੂੰ ਵਾਈ-ਫਾਈ ਚਾਲੂ ਕਰਨ ਦੀ ਆਗਿਆ ਦੇਣੀ ਹੈ?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"ਤੁਸੀਂ ਤਤਕਾਲ ਸੈਟਿੰਗਾਂ ਵਿੱਚ ਜਾ ਕੇ ਵਾਈ-ਫਾਈ ਨੂੰ ਬੰਦ ਕਰ ਸਕਦੇ ਹੋ"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"ਆਗਿਆ ਦਿਓ"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"ਆਗਿਆ ਨਾ ਦਿਓ"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-pl/strings.xml b/service/ServiceWifiResources/res/values-pl/strings.xml
index 7a0dae0..8b4d8bd 100644
--- a/service/ServiceWifiResources/res/values-pl/strings.xml
+++ b/service/ServiceWifiResources/res/values-pl/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Zaktualizowano ustawienie. Spróbuj połączyć się ponownie."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Nie można zmienić ustawienia prywatności"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Nie znaleziono sieci"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : błąd uwierzytelniania EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: błąd uwierzytelniania EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : nie możesz połączyć się z Wi-Fi Verizon poza obszarem obsługiwanym przez Verizon. (Błąd = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: błąd uwierzytelniania EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : nie subskrybujesz Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: błąd uwierzytelniania EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z Twoim kontem Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: błąd uwierzytelniania EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : połączenie z Wi-Fi Verizon jest już aktywne. (Błąd = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: błąd uwierzytelniania EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : błąd uwierzytelniania EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z Twoim kontem Wi-Fi Verizon. Zadzwoń pod numer +1 800-922-0204. (Błąd = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: błąd uwierzytelniania EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : usługa Wi-Fi Verizon jest niedostępna w Twojej lokalizacji. Spróbuj ponownie później lub z innej lokalizacji. (Błąd = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : błąd uwierzytelniania EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon. Spróbuj ponownie później lub z innej lokalizacji."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : błąd uwierzytelniania EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon z powodu błędu 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : błąd uwierzytelniania EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon z powodu błędu 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : błąd uwierzytelniania EAP, nieznany kod błędu"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : wystąpił problem z połączeniem z Wi-Fi Verizon."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot jest wyłączony"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Brak połączonych urządzeń. Kliknij, by zmodyfikować."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi rozłączone"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Aby połączyć się z siecią <xliff:g id="SSID">%1$s</xliff:g>, włóż kartę SIM operatora <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"Aplikacja <xliff:g id="APP">%1$s</xliff:g> chce użyć zasobu sieciowego"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Może to spowodować problem z aplikacjami <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Może to spowodować problemy w tych aplikacjach: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Zezwól"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Nie zezwalaj"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Czy to zaufana sieć?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Tak, połącz"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nie, nie łącz"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Zezwól na połączenie z tą siecią tylko w sytuacji, gdy poniższe informacje będą wyglądały na prawidłowe.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nazwa sewera:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nazwa wydawcy:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizacja:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakt:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Podpis:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Sieć wymaga weryfikacji"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Przed połączeniem sprawdź szczegóły sieci <xliff:g id="SSID">%1$s</xliff:g>. Kliknij, aby kontynuować."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Nie udało się zainstalować certyfikatu."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Nie można zweryfikować tej sieci"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Połącz mimo to"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Nie łącz"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"W przypadku sieci <xliff:g id="SSID">%1$s</xliff:g> brakuje certyfikatu."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Jak dodawać certyfikaty"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Nie można zweryfikować tej sieci"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"W przypadku sieci <xliff:g id="SSID">%1$s</xliff:g> brakuje certyfikatu. Kliknij, aby dowiedzieć się, jak dodawać certyfikaty."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Połącz mimo to"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Nie łącz"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Zezwolić aplikacji <xliff:g id="APP_NAME">%1$s</xliff:g> na włączanie Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Możesz wyłączyć Wi‑Fi w Szybkich ustawieniach"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Zezwól"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Nie zezwalaj"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-pt-rBR/strings.xml b/service/ServiceWifiResources/res/values-pt-rBR/strings.xml
index 818eb38..5c8b2e4 100644
--- a/service/ServiceWifiResources/res/values-pt-rBR/strings.xml
+++ b/service/ServiceWifiResources/res/values-pt-rBR/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Configuração atualizada. Tente conectar novamente."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Não foi possível mudar as configurações de privacidade"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Rede não encontrada"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: não é possível se conectar ao Verizon Wi-Fi Access fora da área de cobertura. Erro: 32760."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: você não se inscreveu no Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Erro: 32761."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Erro: 32762."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: você já se conectou ao Verizon Wi-Fi Access. Erro: 32763."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Erro: 32764."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Erro: 32765."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: o Verizon Wi-Fi Access não está disponível no seu local. Tente novamente mais tarde ou de um local diferente. Erro: 32766."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Tente novamente mais tarde ou de um local diferente."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP (código desconhecido)"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Ponto de acesso desativado"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Não há dispositivos conectados. Toque para modificar."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi desconectado"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Para se conectar a <xliff:g id="SSID">%1$s</xliff:g>, insira um chip da <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"O app <xliff:g id="APP">%1$s</xliff:g> quer usar um recurso de rede"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Isso pode causar problemas para <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Isso pode causar problemas para estes apps: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Permitir"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Não permitir"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Esta rede é confiável?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Sim, conectar"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Não conectar"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Permita a conexão dessa rede apenas se as informações abaixo estiverem corretas.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nome do servidor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nome do emissor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organização:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contato:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Assinatura:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"A rede precisa ser verificada"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Revise os detalhes da rede <xliff:g id="SSID">%1$s</xliff:g> antes de se conectar. Toque para continuar."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Erro ao instalar o certificado."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Falha ao verificar esta rede"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Conectar mesmo assim"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Não conectar"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Falta um certificado na rede <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Aprenda a adicionar certificados"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Falha ao verificar esta rede"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Falta um certificado na rede <xliff:g id="SSID">%1$s</xliff:g>. Toque para aprender a adicionar certificados."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Conectar mesmo assim"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Não conectar"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Permitir que o app <xliff:g id="APP_NAME">%1$s</xliff:g> ative o Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"É possível desativar o Wi-Fi nas Configurações rápidas"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Permitir"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Não permitir"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-pt-rPT/strings.xml b/service/ServiceWifiResources/res/values-pt-rPT/strings.xml
index 6fb0c2b..23b27a0 100644
--- a/service/ServiceWifiResources/res/values-pt-rPT/strings.xml
+++ b/service/ServiceWifiResources/res/values-pt-rPT/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Definição atualizada. Experimente estabelecer ligação novamente."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Não é possível alterar a definição de privacidade."</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Rede não encontrada."</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: não é possível ligar ao ponto de acesso Wi-Fi da Verizon fora da área de cobertura da Verizon. (Erro = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: não possui uma subscrição do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: existe um problema com a sua conta do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: já tem ligação ao ponto de acesso Wi-Fi da Verizon. (Erro = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao ligar ao ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: existe um problema com a sua conta do ponto de acesso Wi-Fi da Verizon. Contacte-nos através do número 800-922-0204. (Erro = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: o ponto de acesso Wi-Fi da Verizon não está disponível a partir da sua localização. Tente novamente mais tarde ou experimente a partir de uma localização diferente. (Erro = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao ligar ao ponto de acesso Wi-Fi da Verizon. Tente novamente mais tarde ou experimente a partir de uma localização diferente."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao ligar ao ponto de acesso Wi-Fi da Verizon devido ao erro 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao ligar ao ponto de acesso Wi-Fi da Verizon devido ao erro 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP, código de erro desconhecido"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: ocorreu um problema ao ligar ao ponto de acesso Wi-Fi da Verizon."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Zona Wi-Fi desativada"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nenhum dispositivo ligado. Toque para modificar."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi desligado"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Para estabelecer ligação a <xliff:g id="SSID">%1$s</xliff:g>, insira um SIM do operador <xliff:g id="CARRIER_NAME">%2$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"A app <xliff:g id="APP">%1$s</xliff:g> precisa de usar um recurso das redes"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Isto pode causar problemas para <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Isto pode causar problemas para estas apps: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Permitir"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Não permitir"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Esta rede é de confiança?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Sim, ligar"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Não, não ligar"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Permita que esta rede estabeleça ligação apenas se as informações abaixo estiverem corretas.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nome do servidor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nome do emissor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organização:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contacto:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Assinatura:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"A rede tem de ser validada"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Verifique os detalhes da rede de <xliff:g id="SSID">%1$s</xliff:g> antes de ligar. Toque para continuar."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"A instalação do certificado falhou."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Não é possível validar esta rede"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Ligar mesmo assim"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Não ligar"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"A rede <xliff:g id="SSID">%1$s</xliff:g> tem um certificado em falta."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Saiba como adicionar certificados"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Não é possível validar esta rede"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"A rede <xliff:g id="SSID">%1$s</xliff:g> tem um certificado em falta. Toque para saber como adicionar certificados."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Ligar mesmo assim"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Não ligar"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Permitir que a app <xliff:g id="APP_NAME">%1$s</xliff:g> ative o Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Pode desativar o Wi‑Fi nas Definições rápidas"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Permitir"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Não permitir"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-pt/strings.xml b/service/ServiceWifiResources/res/values-pt/strings.xml
index 818eb38..5c8b2e4 100644
--- a/service/ServiceWifiResources/res/values-pt/strings.xml
+++ b/service/ServiceWifiResources/res/values-pt/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Configuração atualizada. Tente conectar novamente."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Não foi possível mudar as configurações de privacidade"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Rede não encontrada"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: não é possível se conectar ao Verizon Wi-Fi Access fora da área de cobertura. Erro: 32760."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: você não se inscreveu no Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Erro: 32761."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Erro: 32762."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: você já se conectou ao Verizon Wi-Fi Access. Erro: 32763."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Erro: 32764."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema com sua conta do Verizon Wi-Fi Access. Entre em contato pelo número 800-922-0204. Erro: 32765."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP nº 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: o Verizon Wi-Fi Access não está disponível no seu local. Tente novamente mais tarde ou de um local diferente. Erro: 32766."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access. Tente novamente mais tarde ou de um local diferente."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access devido ao erro 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: erro de autenticação EAP (código desconhecido)"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: há um problema na conexão com o Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Ponto de acesso desativado"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Não há dispositivos conectados. Toque para modificar."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi desconectado"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Para se conectar a <xliff:g id="SSID">%1$s</xliff:g>, insira um chip da <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"O app <xliff:g id="APP">%1$s</xliff:g> quer usar um recurso de rede"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Isso pode causar problemas para <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Isso pode causar problemas para estes apps: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Permitir"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Não permitir"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Esta rede é confiável?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Sim, conectar"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Não conectar"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Permita a conexão dessa rede apenas se as informações abaixo estiverem corretas.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Nome do servidor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Nome do emissor:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organização:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Contato:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Assinatura:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"A rede precisa ser verificada"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Revise os detalhes da rede <xliff:g id="SSID">%1$s</xliff:g> antes de se conectar. Toque para continuar."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Erro ao instalar o certificado."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Falha ao verificar esta rede"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Conectar mesmo assim"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Não conectar"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Falta um certificado na rede <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Aprenda a adicionar certificados"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Falha ao verificar esta rede"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Falta um certificado na rede <xliff:g id="SSID">%1$s</xliff:g>. Toque para aprender a adicionar certificados."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Conectar mesmo assim"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Não conectar"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Permitir que o app <xliff:g id="APP_NAME">%1$s</xliff:g> ative o Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"É possível desativar o Wi-Fi nas Configurações rápidas"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Permitir"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Não permitir"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ro/strings.xml b/service/ServiceWifiResources/res/values-ro/strings.xml
index 39dea2c..820d77f 100644
--- a/service/ServiceWifiResources/res/values-ro/strings.xml
+++ b/service/ServiceWifiResources/res/values-ro/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Setarea a fost actualizată. Încercați să vă conectați din nou."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Nu puteți modifica setarea de confidențialitate"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Rețeaua nu a fost găsită"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: eroare de autentificare EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: nu vă puteți conecta la Verizon Wi-Fi Access în afara ariei de acoperire Verizon. (Eroare = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: nu v-ați abonat la Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: există o problemă legată de contul dvs. Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: v-ați conectat deja la Verizon Wi-Fi Access. (Eroare = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: există o problemă legată de conectarea la Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: există o problemă legată de contul dvs. Verizon Wi-Fi Access. Apelați-ne la 800-922-0204. (Eroare = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access nu este disponibil în locația dvs. Încercați din nou mai târziu sau încercați dintr-o altă locație. (Eroare = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: există o problemă legată de conectarea la Verizon Wi-Fi Access. Încercați din nou mai târziu sau încercați dintr-o altă locație."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: există o problemă legată de conectarea la Verizon Wi-Fi Access din cauza erorii 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: există o problemă legată de conectarea la Verizon Wi-Fi Access din cauza erorii 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : eroare de autentificare EAP, cod de eroare necunoscut"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: există o problemă legată de conectarea la Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspotul a fost dezactivat"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Niciun dispozitiv conectat. Atingeți pentru a modifica."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Rețea Wi-Fi deconectată"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Pentru a vă conecta la <xliff:g id="SSID">%1$s</xliff:g>, introduceți un SIM <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> dorește să folosească o resursă pentru rețele"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Acțiunea poate cauza probleme pentru <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Acțiunea poate cauza probleme pentru următoarele aplicații: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Permiteți"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Nu permiteți"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Această rețea este de încredere?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Da, conectează"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nu, nu conecta"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Permite conectarea la această rețea numai dacă informațiile de mai jos sunt corecte.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Numele serverului:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Numele emitentului:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizație:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Persoana de contact:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Semnătura:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Rețeaua trebuie să fie verificată"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Examinați detaliile rețelei pentru <xliff:g id="SSID">%1$s</xliff:g> înainte de conectare. Atingeți pentru a continua."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Certificatul nu a fost instalat."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Rețeaua nu poate fi verificată"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Conectează oricum"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Nu conecta"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Lipsește un certificat pentru rețeaua <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Aflați cum să adăugați certificate"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Rețeaua nu poate fi verificată"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Lipsește un certificat pentru rețeaua <xliff:g id="SSID">%1$s</xliff:g>. Atingeți pentru a afla cum să adăugați certificate."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Conectează oricum"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Nu conecta"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Permiteți ca <xliff:g id="APP_NAME">%1$s</xliff:g> să activeze conexiunea Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Puteți să dezactivați conexiunea Wi‑Fi din Setările rapide"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Permiteți"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Nu permiteți"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ru/strings.xml b/service/ServiceWifiResources/res/values-ru/strings.xml
index b433845..45c4b1d 100644
--- a/service/ServiceWifiResources/res/values-ru/strings.xml
+++ b/service/ServiceWifiResources/res/values-ru/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Настройки сохранены. Попробуйте подключиться ещё раз."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Не удается изменить настройки конфиденциальности."</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Сеть не найдена."</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: ошибка аутентификации EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : Ошибка аутентификации EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: вы не можете подключиться к сервису Verizon Wi-Fi Access вне зоны покрытия Verizon. Код ошибки: 32760."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : Ошибка аутентификации EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: вы не подписаны на сервис Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32761."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : Ошибка аутентификации EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: возникла проблема с вашим аккаунтом Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32762."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : Ошибка аутентификации EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: вы уже подключены к сервису Verizon Wi-Fi Access. Код ошибки: 32763."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : Ошибка аутентификации EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32764."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : Ошибка аутентификации EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: возникла проблема с вашим аккаунтом Verizon Wi-Fi Access. Позвоните нам по номеру 800 922-02-04. Код ошибки: 32765."</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : Ошибка аутентификации EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: сервис Verizon Wi-Fi Access недоступен там, где вы находитесь. Повторите попытку позже или в другом месте. Код ошибки: 32766."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: ошибка аутентификации EAP 32767."</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access. Повторите попытку позже или в другом месте."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: ошибка аутентификации EAP 16384."</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access из-за ошибки 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: ошибка аутентификации EAP 16385."</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access из-за ошибки 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: ошибка аутентификации EAP, неизвестный код ошибки."</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: не удалось подключиться к сервису Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Точка доступа отключена"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Нет подключенных устройств. Нажмите, чтобы внести изменения."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Нет подключения к Wi-Fi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Чтобы подключиться к сети \"<xliff:g id="SSID">%1$s</xliff:g>\", вставьте SIM-карту оператора \"<xliff:g id="CARRIER_NAME">%2$s</xliff:g>\"."</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"Приложение \"<xliff:g id="APP">%1$s</xliff:g>\" запрашивает доступ к сетевому ресурсу."</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Это может повлиять на работу приложений: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Это может привести к проблемам в работе следующих приложений: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Разрешить"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Не разрешать"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Это безопасная сеть?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Да, подключить"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Нет, не подключать"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Подключайтесь к этой сети только в том случае, если ниже приведена верная информация.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Имя сервера:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Имя издателя:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Организация:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Контактная информация:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Подпись:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Нужно проверить сеть"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Прежде чем подключаться, изучите сведения о сети <xliff:g id="SSID">%1$s</xliff:g>. Нажмите, чтобы продолжить."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Ошибка при установке сертификата."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Не удается проверить эту сеть."</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Все равно подключиться"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Не подключаться"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"У сети <xliff:g id="SSID">%1$s</xliff:g> нет сертификата."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Как добавлять сертификаты"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Не удается проверить эту сеть."</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"У сети <xliff:g id="SSID">%1$s</xliff:g> нет сертификата. Нажмите, чтобы узнать, как его добавить."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Все равно подключиться"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Не подключаться"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Разрешить приложению \"<xliff:g id="APP_NAME">%1$s</xliff:g>\" включить Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Отключить Wi‑Fi можно в быстрых настройках."</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Разрешить"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Не разрешать"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-si/strings.xml b/service/ServiceWifiResources/res/values-si/strings.xml
index 703658d..3e7984a 100644
--- a/service/ServiceWifiResources/res/values-si/strings.xml
+++ b/service/ServiceWifiResources/res/values-si/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"සැකසීම යාවත්කාලීනයි. නැවත සබැඳීමට උත්සාහ කරන්න."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"රහස්‍යතා සැකසීම වෙනස් කළ නොහැකිය"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"ජාලය හමු වූයේ නැත"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon ආවරණ ප්‍රදේශයට පිටතින් ඔබට Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ විය නොහැකිය. (දෝෂය = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ඔබ Verizon Wi-Fi ප්‍රවේශය වෙත ග්‍රාහක වී නැත. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ඔබගේ Verizon Wi-Fi ප්‍රවේශ ගිණුම සම්බන්ධ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ඔබ දැනටමත් Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ වී ඇත. (දෝෂය = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ඔබගේ Verizon Wi-Fi ප්‍රවේශ ගිණුම සම්බන්ධ ගැටලුවක් තිබේ. කරුණාකර 800-922-0204 අංකයෙන් අපට අමතන්න. (දෝෂය = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi ප්‍රවේශය ඔබගේ ස්ථානය වෙතින් ලබා ගත නොහැකිය. පසුව නැවත උත්සාහ කරන්න නැතහොත් වෙනත් ස්ථානයකින් උත්සාහ කරන්න. (දෝෂය = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ. පසුව නැවත උත්සාහ කරන්න නැතහොත් වෙනත් ස්ථානයකින් උත්සාහ කරන්න."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16384 දෝෂය හේතුවෙන් ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16385 දෝෂය හේතුවෙන් ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP සත්‍යාපනය කිරීමේ දෝෂය, නොදන්නා දෝෂ කේතය"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : ඔබව Verizon Wi-Fi ප්‍රවේශය වෙත සම්බන්ධ කිරීමේ ගැටලුවක් තිබේ."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"හොට්ස්පොට් ක්‍රියා විරහිතයි"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"උපාංග කිසිවක් සම්බන්ධ කර නැත. වෙනස් කිරීමට තට්ටු කරන්න."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi‑Fi විසන්ධි විය"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> වෙත සම්බන්ධ වීමට, <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM එකක් ඇතුල් කරන්න"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> හට ජාලකරණ සම්පතක් භාවිත කිරීමට අවශ්‍යයි"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"මෙය <xliff:g id="APPS">%3$s</xliff:g> සඳහා ගැටලු ඇති කළ හැකිය."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"මෙය මෙම යෙදුම් සඳහා ගැටලු ඇති කළ හැකිය: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"ඉඩ දෙන්න"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"ඉඩ නොදෙන්න"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"මෙම ජාලය විශ්වාසදායකද?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"ඔව්, සම්බන්ධ වන්න"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"එපා, සම්බන්ධ වෙන්න එපා"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"පහත තොරතුරු නිවැරදි බව පෙනේ නම් පමණක් මෙම ජාලයට සම්බන්ධ වීමට ඉඩ දෙන්න.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"සේවාදායක නම:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"නිකුත් කරන්‍නාගේ නම:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"සංවිධානය:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"සම්බන්ධ කර ගන්න:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"අත්සන:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"ජාලය සත්‍යාපනය කිරීම අවශ්‍ය වේ"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"සම්බන්ධ වීමට පෙර <xliff:g id="SSID">%1$s</xliff:g> සඳහා ජාල විස්තර සමාලෝචනය කරන්න. ඉදිරියට යාමට තට්ටු කරන්න."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"සහතික ස්ථාපනය කිරීම අසාර්ථක විය."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"මෙම ජාලය සත්‍යාපනය කළ නොහැකිය"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"කෙසේ වෙතත් සම්බන්ධ කරන්න"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"සම්බන්ධ නොකරන්න"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"ජාල <xliff:g id="SSID">%1$s</xliff:g>හි සහතිකයක් අස්ථානගතයි."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"සහතික එක් කරන ආකාරය දැන ගන්න"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"මෙම ජාලය සත්‍යාපනය කළ නොහැකිය"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"ජාල <xliff:g id="SSID">%1$s</xliff:g>හි සහතිකයක් අස්ථානගතයි. සහතික එක් කරන ආකාරය දැන ගැනීමට තට්ටු කරන්න."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"කෙසේ වෙතත් සම්බන්ධ කරන්න"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"සම්බන්ධ නොකරන්න"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Wi-Fi ක්‍රියාත්මක කිරීමට <xliff:g id="APP_NAME">%1$s</xliff:g> හට ඉඩ දෙන්නද?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"ඔබට ඉක්මන් සැකසීම් තුළ Wi‑Fi ක්‍රියාවිරහිත කළ හැකිය"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"ඉඩ දෙන්න"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"ඉඩ නොදෙන්න"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-sk/strings.xml b/service/ServiceWifiResources/res/values-sk/strings.xml
index 1cc4421..2928434 100644
--- a/service/ServiceWifiResources/res/values-sk/strings.xml
+++ b/service/ServiceWifiResources/res/values-sk/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Nastavenie bolo aktualizované. Skúste sa znova pripojiť."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Nastavenie ochrany súkromia sa nedá zmeniť"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Sieť nebola nájdená"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : k službe Verizon Wi-Fi Access sa nemôžete pripojiť mimo oblasti, v ktorej Verizon poskytuje služby. (Chyba = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access neodoberáte. Zavolajte na číslo 800-922-0204. (Chyba = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : vyskytol sa problém s vaším účtom Verizon Wi-Fi Access. Zavolajte na číslo 800-922-0204. (Chyba = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : k službe Verizon Wi-Fi Access ste sa už pripojili. (Chyba = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní k službe Verizon Wi-Fi Access sa vyskytol problém. Zavolajte na číslo 800-922-0204. (Chyba = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : vyskytol sa problém s vaším účtom Verizon Wi-Fi Access. Zavolajte na číslo 800-922-0204. (Chyba = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access nie je vo vašej oblasti k dispozícii. Skúste to znova alebo pokus zopakujte v inej oblasti. (Chyba = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní k službe Verizon Wi-Fi Access sa vyskytol problém. Skúste to znova alebo pokus zopakujte v inej oblasti."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém, ktorý spôsobila chyba 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní vášho účtu k službe Verizon Wi-Fi Access sa vyskytol problém, ktorý spôsobila chyba 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : chyba overenia EAP, neznámy kód chyby"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : pri pripájaní k službe Verizon Wi-Fi Access sa vyskytol problém."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot je vypnutý"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nie sú pripojené žiadne zariadenia. Klepnutím to môžete upraviť."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Sieť Wi‑Fi je odpojená"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Ak sa chcete pripojiť k sieti <xliff:g id="SSID">%1$s</xliff:g>, vložte SIM kartu operátora <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> chce použiť sieťový zdroj"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Môže to spôsobovať problémy aplikáciám <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Môže to spôsobiť problémy týmto aplikáciám: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Povoliť"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Nepovoliť"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Je táto sieť dôveryhodná?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Áno, pripojiť"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nie, nepripojiť"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Ak sa vám zdá informácia nižšie správna, povoľte pripojenie k tejto sieti.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Názov servera:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Názov vydavateľa:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizácia:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontaktovať:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Podpis:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Sieť je potrebné overiť"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Pred pripojením skontrolujte podrobnosti siete (<xliff:g id="SSID">%1$s</xliff:g>). Pokračujte klepnutím."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Certifikát sa nepodarilo nainštalovať"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Táto sieť sa nedá overiť"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Pripojiť"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Nepripojiť"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> siete nemá certifikát."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Prečítajte si, ako pridať certifikáty"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Táto sieť sa nedá overiť"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> siete nemá certifikát. Klepnutím si zobrazte informácie, ako pridať certifikáty."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Pripojiť"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Nepripojiť"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Chcete aplikácii <xliff:g id="APP_NAME">%1$s</xliff:g> povoliť zapnúť Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Wi‑Fi môžete vypnúť v rýchlych nastaveniach"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Povoliť"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Nepovoliť"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-sl/strings.xml b/service/ServiceWifiResources/res/values-sl/strings.xml
index a0ead33..9a1d12b 100644
--- a/service/ServiceWifiResources/res/values-sl/strings.xml
+++ b/service/ServiceWifiResources/res/values-sl/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Nastavitev je posodobljena. Poskusite se znova povezati."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Nastavitve zasebnosti ni mogoče spremeniti"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Omrežja ni mogoče najti"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 32756 pri preverjanju pristnosti EAP."</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 32760 pri preverjanju pristnosti EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Povezave s storitvijo Verizon Wi-Fi Access ni mogoče vzpostaviti zunaj območja, ki ga pokriva operater Verizon. (napaka = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 32761 pri preverjanju pristnosti EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Niste naročeni na storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 32762 pri preverjanju pristnosti EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave z vašim računom za storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 32763 pri preverjanju pristnosti EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Povezava s storitvijo Verizon Wi-Fi Access je že vzpostavljena. (napaka = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 32764 pri preverjanju pristnosti EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 32765 pri preverjanju pristnosti EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave z vašim računom za storitev Verizon Wi-Fi Access. Pokličite nas na 800-922-0204. (napaka = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 32766 pri preverjanju pristnosti EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Storitev Verizon Wi-Fi Access ni na voljo na vaši lokaciji. Poskusite znova pozneje ali z druge lokacije. (napaka = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 32767 pri preverjanju pristnosti EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access. Poskusite znova pozneje ali z druge lokacije."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 16384 pri preverjanju pristnosti EAP"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access zaradi napake 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka 16385 pri preverjanju pristnosti EAP"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access zaradi napake 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: Napaka pri preverjanju pristnosti EAP, neznana koda napake"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Prišlo je do težave pri povezovanju s storitvijo Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Dostopna točka je izklopljena"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nobena naprava ni povezana. Dotaknite se, da spremenite."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Povezava Wi-Fi je prekinjena"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Za povezavo z omrežjem <xliff:g id="SSID">%1$s</xliff:g> vstavite kartico SIM operaterja <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> želi uporabljati omrežni vir."</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"To lahko povzroči težave za: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"To lahko povzroči težave tem aplikacijam: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Dovoli"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Ne dovoli"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Ali je to omrežje zaupanja vredno?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Da, poveži"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ne, ne poveži"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Temu omrežju dovoli vzpostavitev povezave samo, če so spodnji podatki videti pravilni.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Ime strežnika:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Ime izdajatelja:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizacija:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Stik:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Podpis:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Omrežje je treba preveriti"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Pred vzpostavljanjem povezave preglejte podatke o omrežju <xliff:g id="SSID">%1$s</xliff:g>. Dotaknite se, če želite nadaljevati."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Namestitev potrdila ni uspela."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Tega omrežja ni mogoče preveriti."</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Vseeno poveži"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ne poveži"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Za omrežje <xliff:g id="SSID">%1$s</xliff:g> manjka potrdilo."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Preberite, kako dodate potrdila."</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Tega omrežja ni mogoče preveriti."</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Za omrežje <xliff:g id="SSID">%1$s</xliff:g> manjka potrdilo. Dotaknite se, če želite izvedeti, kako dodate potrdila."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Vseeno poveži"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ne poveži"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Ali dovolite aplikaciji <xliff:g id="APP_NAME">%1$s</xliff:g>, da vklopi Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Wi‑Fi lahko izklopite v hitrih nastavitvah."</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Dovoli"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Ne dovoli"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-sq/strings.xml b/service/ServiceWifiResources/res/values-sq/strings.xml
index 1abb7cf..e9ce3a9 100644
--- a/service/ServiceWifiResources/res/values-sq/strings.xml
+++ b/service/ServiceWifiResources/res/values-sq/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Cilësimi u përditësua. Provo të lidhesh përsëri."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Cilësimi i privatësisë nuk mund të ndryshohet"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Rrjeti nuk u gjet"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Nuk mund të lidhesh me Verizon Wi-Fi Access nga jashtë zonës së mbulimit të Verizon. (Gabimi = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Nuk je abonuar në Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ka një problem me llogarinë tënde të Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Je lidhur tashmë me Verizon Wi-Fi Access. (Gabimi = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ka një problem me lidhjen tënde me Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ka një problem me llogarinë tënde të Verizon Wi-Fi Access. Na telefono në 800-922-0204. (Gabimi = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access nuk ofrohet nga vendndodhja jote. Provo përsëri më vonë ose provo nga një vendndodhje tjetër. (Gabimi = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ka një problem me lidhjen tënde me Verizon Wi-Fi Access. Provo përsëri më vonë ose provo nga një vendndodhje tjetër."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ka një problem me lidhjen tënde me Verizon Wi-Fi Access për shkak të gabimit 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ka një problem me lidhjen tënde me Verizon Wi-Fi Access për shkak të gabimit 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Gabimi i vërtetimit të EAP, kod i panjohur gabimi"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ka një problem me lidhjen tënde me Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Zona e qasjes për internet është çaktivizuar"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Nuk ka pajisje të lidhura. Trokit për ta modifikuar."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi është i shkëputur"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Për t\'u lidhur me <xliff:g id="SSID">%1$s</xliff:g> fut një kartë SIM nga <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> dëshiron të përdorë një burim rrjeti"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Kjo mund të shkaktojë probleme për <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Kjo mund të shkaktojë probleme për këto aplikacione: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Lejo"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Mos lejo"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"A është i besueshëm ky rrjet?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Po, lidhu"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Jo, mos u lidh"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Lejo që ky rrjet të lidhet vetëm nëse informacioni më poshtë duket i saktë.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Emri i serverit:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Emri i lëshuesit:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organizata:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakti:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Nënshkrimi:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Rrjeti duhet të verifikohet"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Shqyrto detajet e rrjetit për <xliff:g id="SSID">%1$s</xliff:g> përpara se të lidhesh. Trokit për të vazhduar."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Instalimi i certifikatës dështoi."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Ky rrjet nuk mund të verifikohet"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Lidhu gjithsesi"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Mos u lidh"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Rrjetit <xliff:g id="SSID">%1$s</xliff:g> i mungon një certifikatë."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Mëso se si të shtosh certifikata"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Ky rrjet nuk mund të verifikohet"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Rrjetit <xliff:g id="SSID">%1$s</xliff:g> i mungon një certifikatë. Trokit për të mësuar se si të shtosh certifikata."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Lidhu gjithsesi"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Mos u lidh"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Të lejohet që <xliff:g id="APP_NAME">%1$s</xliff:g> të aktivizojë Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Mund ta çaktivizosh Wi-Fi te \"Cilësimet e shpejta\""</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Lejo"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Mos lejo"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-sr/strings.xml b/service/ServiceWifiResources/res/values-sr/strings.xml
index 397e041..36d3821 100644
--- a/service/ServiceWifiResources/res/values-sr/strings.xml
+++ b/service/ServiceWifiResources/res/values-sr/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Подешавање је ажурирано. Пробајте поново да се повежете."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Промена подешавања приватности није успела"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Мрежа није пронађена"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP грешка при потврди идентитета 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: EAP грешка при потврди идентитета 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Не можете да се повежете на Verizon WiFi Access ван области коју Verizon покрива. (Грешка = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: EAP грешка при потврди идентитета 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Нисте претплаћени на Verizon WiFi Access. Позовите нас на 800 922 0204. (Грешка = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: EAP грешка при потврди идентитета 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon WiFi Access налогом. Позовите нас на 800 922 0204. (Грешка = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: EAP грешка при потврди идентитета 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Већ сте повезани на Verizon WiFi Access. (Грешка = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: EAP грешка при потврди идентитета 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access. Позовите нас на 800 922 0204. (Грешка = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: EAP грешка при потврди идентитета 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Дошло је до проблема у вези са Verizon WiFi Access налогом. Позовите нас на 800 922 0204. (Грешка = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: EAP грешка при потврди идентитета 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon WiFi Access није доступан са ваше локације. Пробајте поново касније или пробајте са неке друге локације. (Грешка = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : Грешка при EAP потврди идентитета 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access. Пробајте поново касније или пробајте са неке друге локације."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : Грешка при EAP потврди идентитета 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access због грешке 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : Грешка при EAP потврди идентитета 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access због грешке 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Грешка при EAP потврди идентитета, непознат кôд грешке"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Постоји проблем при повезивању на Verizon WiFi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Хотспот је искључен"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Ниједан уређај није повезан. Додирните да бисте изменили."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"WiFi веза је прекинута"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Да бисте се повезали на мрежу <xliff:g id="SSID">%1$s</xliff:g>, ставите <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM картицу"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> жели да користи мрежни ресурс"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"То може да доведе до проблема за <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Ово може да изазове проблеме за ове апликације: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Дозволи"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Не дозволи"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Да ли је ова мрежа поуздана?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Да, повежи"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Не, немој да повежеш"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Дозволите овој мрежи да се повеже само ако информације у наставку делују тачно.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Назив сервера:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Назив издаваоца:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Организација:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Контакт:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Потпис:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Мрежа мора да се верификује"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Прегледајте појединости мреже <xliff:g id="SSID">%1$s</xliff:g> пре повезивања. Додирните да бисте наставили."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Инсталација сертификата није успела."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Не можемо да верификујемо ову мрежу"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Ипак повежи"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Не повезуј"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> мреже нема сертификат."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Сазнајте како да додате сертификате"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Не можемо да верификујемо ову мрежу"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> мреже нема сертификат. Додирните да бисте сазнали како да додате сертификате."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Ипак повежи"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Не повезуј"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Желите да дозволите да <xliff:g id="APP_NAME">%1$s</xliff:g> укључује WiFi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Можете да искључите WiFi у Брзим подешавањима"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Дозволи"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Не дозволи"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-sv/strings.xml b/service/ServiceWifiResources/res/values-sv/strings.xml
index 2ff0315..94217a8 100644
--- a/service/ServiceWifiResources/res/values-sv/strings.xml
+++ b/service/ServiceWifiResources/res/values-sv/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Inställningen har uppdaterats. Försök ansluta igen."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Det gick inte att ändra integritetsinställningen"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Nätverket hittades inte"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du kan inte ansluta till Verizon Wi-Fi Access om du befinner dig utanför Verizons täckningsområde. (Fel = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du prenumererar inte på Verizon Wi-Fi Access. Ring oss på 800 922 0204. (Fel = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ett fel har uppstått i Verizon Wi-Fi Access-kontot. Ring oss på 800 922 0204. (Fel = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Du är redan ansluten till Verizon Wi-Fi Access. (Fel = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access. Ring oss på 800 922 0204. (Fel = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Ett fel har uppstått i Verizon Wi-Fi Access-kontot. Ring oss på 800 922 0204. (Fel = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Verizon Wi-Fi Access är inte tillgängligt där du befinner dig. Försök igen senare eller anslut från en annan plats. (Fel = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access. Försök igen senare eller anslut från en annan plats."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access på grund av felet 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access på grund av felet 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: EAP-autentiseringsfel. Okänd felkod"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: Det gick inte att ansluta till Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Surfzonen har inaktiverats"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Inga enheter har anslutits. Tryck för att ändra."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Ingen wifi-anslutning"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Sätt i ett SIM-kort från <xliff:g id="CARRIER_NAME">%2$s</xliff:g> om du vill ansluta till <xliff:g id="SSID">%1$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> vill använda en nätverksresurs"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Detta kan leda till problem med <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Detta kan orsaka problem med dessa appar: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Tillåt"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Tillåt inte"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Är det här ett betrott nätverk?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ja, anslut"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Nej, anslut inte"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Tillåt bara att nätverket ansluter om uppgifterna nedan verkar stämma.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Servernamn:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Utgivarens namn:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisation:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontakt:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Signatur:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Nätverket måste verifieras"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Granska nätverksinformationen för <xliff:g id="SSID">%1$s</xliff:g> innan du ansluter. Tryck för att fortsätta."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Installationen av certifikatet misslyckades."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Det gick inte att verifiera nätverket"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Anslut ändå"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Anslut inte"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Det saknas ett certifikat för nätverket <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Läs mer om hur du lägger till certifikat"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Det gick inte att verifiera nätverket"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Det saknas ett certifikat för nätverket <xliff:g id="SSID">%1$s</xliff:g>. Tryck här för att ta reda på hur du lägger till certifikat."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Anslut ändå"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Anslut inte"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Vill du tillåta att <xliff:g id="APP_NAME">%1$s</xliff:g> aktiverar wifi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Du kan stänga av wifi i snabbinställningarna"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Tillåt"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Tillåt inte"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-sw/strings.xml b/service/ServiceWifiResources/res/values-sw/strings.xml
index cab9c87..18bbe01 100644
--- a/service/ServiceWifiResources/res/values-sw/strings.xml
+++ b/service/ServiceWifiResources/res/values-sw/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Imesasisha mipangilio. Jaribu kuunganisha tena."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Imeshindwa kubadilisha mipangilio ya faragha"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Mtandao haupatikani"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 32756 ya uthibitishaji wa EAP"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 32760 ya uthibitishaji wa EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Huwezi kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon ukiwa nje ya eneo la mtandao wa Verizon. (Hitilafu = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 32761 ya uthibitishaji wa EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Hujajisajili kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 32762 ya uthibitishaji wa EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya akaunti yako ya huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 32763 ya uthibitishaji wa EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Tayari umeunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. (Hitilafu = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 32764 ya uthibitishaji wa EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 32765 ya uthibitishaji wa EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kuna hitilafu ya akaunti yako ya huduma ya Ufikiaji wa Wi-Fi ya Verizon. Tafadhali tupigie kwa 800-922-0204. (Hitilafu = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 32766 ya uthibitishaji wa EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Huduma ya Ufikiaji wa Wi-Fi ya Verizon haipatikani katika eneo lako. Jaribu tena baadaye au ujaribu ukiwa katika eneo tofauti. (Hitilafu = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 32767 ya uthibitishaji wa EAP"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon. Jaribu tena baadaye au ujaribu ukiwa katika eneo tofauti."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 16384 ya uthibitishaji wa EAP"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kuna tatizo la kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon kutokana na hitilafu ya 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya 16385 ya uthibitishaji wa EAP"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kuna tatizo la kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon kutokana na hitilafu ya 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Hitilafu ya uthibitishaji ya EAP, msimbo usiojulikana wa hitilafu"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>: Kuna hitilafu ya kuunganisha kwenye huduma ya Ufikiaji wa Wi-Fi ya Verizon."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Mtandaopepe umezimwa"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Hakuna vifaa vilivyounganishwa. Gusa ili ubadilishe."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi imeondolewa"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Ili uunganishe kwenye <xliff:g id="SSID">%1$s</xliff:g>, weka SIM ya <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> inataka kutumia nyenzo ya mtandao"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Hii inaweza kusababisha tatizo kwenye <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Huenda hali hii ikasababisha matatizo kwenye programu hizi: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Ruhusu"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Usiruhusu"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Je, unaamini mtandao huu?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ndiyo, unganisha"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Hapana, usiunganishe"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Ruhusu tu mtandao huu uunganishe ikiwa maelezo yaliyo hapa chini yanaonekana sahihi.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Jina la Seva:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Jina la Mtoaji:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Shirika:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Anwani:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Sahihi:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Unahitaji kuthibitisha mtandao"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Kagua maelezo ya mtandao ya <xliff:g id="SSID">%1$s</xliff:g> kabla ya kuunganisha. Gusa ili uendelee."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Imeshindwa kusakinisha cheti."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Imeshindwa kuthibitisha mtandao huu"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Unganisha hata hivyo"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Usiunganishe"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Mtandao wa <xliff:g id="SSID">%1$s</xliff:g> hauna cheti."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Pata maelezo kuhusu jinsi ya kuweka vyeti"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Imeshindwa kuthibitisha mtandao huu"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Mtandao wa <xliff:g id="SSID">%1$s</xliff:g> hauna cheti. Gusa ili upate maelezo kuhusu jinsi ya kuweka vyeti."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Unganisha hata hivyo"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Usiunganishe"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Ungependa kuruhusu <xliff:g id="APP_NAME">%1$s</xliff:g> iwashe Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Unaweza kuzima Wi-Fi kwenye Mipangilio ya Haraka"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Ruhusu"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Usiruhusu"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ta/strings.xml b/service/ServiceWifiResources/res/values-ta/strings.xml
index bdd4f13..3445ea4 100644
--- a/service/ServiceWifiResources/res/values-ta/strings.xml
+++ b/service/ServiceWifiResources/res/values-ta/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"அமைப்பு புதுப்பிக்கப்பட்டது. மீண்டும் இணைக்க முயலவும்."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"தனியுரிமை அமைப்பை மாற்ற இயலவில்லை"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"நெட்வொர்க்கைக் கண்டறிய முடியவில்லை"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon கவரேஜ் இல்லாத பகுதியிலிருந்து Verizon Wi-Fi Accessஸுடன் இணைக்க முடியாது. (பிழை = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access சேவைக்கு நீங்கள் சந்தா பெறவில்லை. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : உங்கள் Verizon Wi-Fi Access கணக்கில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் ஏற்கெனவே இணைக்கப்பட்டுள்ளீர்கள். (பிழை = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : உங்கள் Verizon Wi-Fi Access கணக்கில் சிக்கல் உள்ளது. 800-922-0204 என்ற எண்ணில் எங்களைத் தொடர்புகொள்ளவும். (பிழை = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : உங்கள் பகுதியில் Verizon Wi-Fi Access சேவை கிடைக்கவில்லை. சிறிது நேரம் கழித்து மீண்டும் முயலவும் அல்லது வேறு இடத்திலிருந்து முயலவும். (பிழை = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது. சிறிது நேரம் கழித்து மீண்டும் முயலவும் அல்லது வேறு இடத்திலிருந்து முயலவும்."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16384 பிழை காரணமாக Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16385 பிழை காரணமாக Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP அங்கீகரிப்புப் பிழை, தெரியாத பிழைக் குறியீடு"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessஸுடன் இணைப்பதில் சிக்கல் உள்ளது."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"ஹாட்ஸ்பாட் முடக்கப்பட்டது"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"சாதனங்கள் எதுவும் இணைக்கப்படவில்லை. மாற்ற, தட்டவும்."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"வைஃபை துண்டிக்கப்பட்டது"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> இல் இணைக்க <xliff:g id="CARRIER_NAME">%2$s</xliff:g> சிம்மைச் செருகவும்"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> ஆப்ஸ் நெட்வொர்க் ஆதாரத்தைப் பயன்படுத்த விரும்புகிறது"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"<xliff:g id="APPS">%3$s</xliff:g> ஆப்ஸுக்கு இது சிக்கல்களை ஏற்படுத்தலாம்."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"இந்த ஆப்ஸுக்கு இது சிக்கல்களை ஏற்படுத்தக்கூடும்: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"அனுமதி"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"அனுமதிக்க வேண்டாம்"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"இந்த நெட்வொர்க் நம்பகமானதா?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"ஆம். இணைக்கவும்"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"இல்லை. இணைக்க வேண்டாம்"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"கீழே உள்ள தகவல்கள் சரியாக இருந்தால் மட்டுமே இந்த நெட்வொர்க்கை இணைக்க அனுமதிக்கவும்.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"சேவையகத்தின் பெயர்:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"வழங்குநர் பெயர்:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"நிறுவனம்:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"தொடர்பு:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"கையொப்பம்:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"நெட்வொர்க் சரிபார்க்கப்பட வேண்டும்"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"இணைப்பதற்கு முன்பு <xliff:g id="SSID">%1$s</xliff:g> இன் நெட்வொர்க் விவரங்களைப் பாருங்கள். தொடர தட்டவும்."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"சான்றிதழை நிறுவ முடியவில்லை."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"இந்த நெட்வொர்க்கைச் சரிபார்க்க முடியவில்லை"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"பரவாயில்லை, இணை"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"இணைக்க வேண்டாம்"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"நெட்வொர்க் <xliff:g id="SSID">%1$s</xliff:g> இல் சான்றிதழ் இல்லை."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"சான்றிதழ்களைச் சேர்ப்பது எப்படியென அறிக"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"இந்த நெட்வொர்க்கைச் சரிபார்க்க முடியவில்லை"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"நெட்வொர்க் <xliff:g id="SSID">%1$s</xliff:g> இல் சான்றிதழ் இல்லை. சான்றிதழ்களை எப்படிச் சேர்ப்பது என அறிய தட்டவும்."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"பரவாயில்லை, இணை"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"இணைக்க வேண்டாம்"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"வைஃபையை இயக்க <xliff:g id="APP_NAME">%1$s</xliff:g> ஆப்ஸை அனுமதிக்கவா?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"விரைவு அமைப்புகளில் நீங்கள் வைஃபையை முடக்கிக்கொள்ளலாம்"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"அனுமதி"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"அனுமதிக்க வேண்டாம்"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-te/strings.xml b/service/ServiceWifiResources/res/values-te/strings.xml
index 68e05b1..3893f37 100644
--- a/service/ServiceWifiResources/res/values-te/strings.xml
+++ b/service/ServiceWifiResources/res/values-te/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"సెట్టింగ్ అప్‌డేట్ చేయబడింది. మళ్లీ కనెక్ట్ చేయడానికి ట్రై చేయండి."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"గోప్యతా సెట్టింగ్‌లను మార్చడం సాధ్యం కాదు"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"నెట్‌వర్క్ కనుగొనబడలేదు"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : మీరు Verizon కవరేజీ ప్రాంతానికి వెలుపల నుండి Verizon Wi-Fi Accessకు కనెక్ట్ చేయలేరు. (ఎర్రర్ = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : మీరు Verizon Wi-Fi Accessకు సబ్‌స్క్రయిబ్ చేసుకోలేదు. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : మీ Verizon Wi-Fi Access ఖాతాలో సమస్య ఉంది. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : మీరు ఇప్పటికే Verizon Wi-Fi Accessకు కనెక్ట్ చేయబడ్డారు. (ఎర్రర్ = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessకు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : మీ Verizon Wi-Fi Access ఖాతాలో సమస్య ఉంది. దయచేసి 800-922-0204 నంబర్ ద్వారా మాకు కాల్ చేయండి. (ఎర్రర్ = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : మీ లొకేషన్ వద్ద Verizon Wi-Fi యాక్సెస్ అందుబాటులో లేదు. తర్వాత మళ్లీ ట్రై చేయండి లేదా వేరే లొకేషన్ నుండి ట్రై చేయండి. (ఎర్రర్ = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessకు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది. తర్వాత మళ్లీ ట్రై చేయండి లేదా వేరే లొకేషన్ నుండి ట్రై చేయండి."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16384 ఎర్రర్ కారణంగా మిమ్మల్ని Verizon Wi-Fi Accessకు కనెక్ట్ చేయడంలో సమస్య ఏర్పడింది."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్ 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16385 ఎర్రర్ కారణంగా మిమ్మల్ని Verizon Wi-Fi Accessకు కనెక్ట్ చేయడంలో సమస్య ఏర్పడింది."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP ప్రామాణీకరణ ఎర్రర్, తెలియని ఎర్రర్ కోడ్"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Accessకు మిమ్మల్ని కనెక్ట్ చేయడంలో సమస్య ఉంది."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"హాట్‌స్పాట్ ఆఫ్ చేయబడింది"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"పరికరాలు ఏవీ కనెక్ట్ కాలేదు. మార్చడానికి నొక్కండి."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wifi డిస్‌కనెక్ట్ చేయబడింది"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g>కి కనెక్ట్ చేయడానికి, <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIMను చొప్పించండి"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> నెట్‌వర్కింగ్ రిసోర్స్‌ను ఉపయోగించాలనుకుంటోంది"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"ఇది <xliff:g id="APPS">%3$s</xliff:g>కు సమస్యలను కలిగించవచ్చు."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"ఇది ఈ యాప్‌లకు సమస్యలను కలిగించవచ్చు: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"అనుమతించండి"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"అనుమతించవద్దు"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"ఈ నెట్‌వర్క్ విశ్వసనీయమైనదా?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"అవును, కనెక్ట్ చేయండి"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"వద్దు, కనెక్ట్ చేయవద్దు"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"కింది సమాచారం సరైనదిగా అనిపిస్తేనే ఈ నెట్‌వర్క్ కనెక్ట్ కావడానికి అనుమతించండి.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"సర్వర్ పేరు:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"జారీ చేసేవారి పేరు:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"సంస్థ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"కాంటాక్ట్:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"సంతకం:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"నెట్‌వర్క్‌ను వెరిఫై చేయాల్సిన అవసరం ఉంది"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"కనెక్ట్ చేయడానికి ముందు <xliff:g id="SSID">%1$s</xliff:g>‌కి సంబంధించిన నెట్‌వర్క్ వివరాలను రివ్యూ చేయండి. కొనసాగడానికి ట్యాప్ చేయండి."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"సర్టిఫికెట్‌ను ఇన్‌స్టాల్ చేయడం విఫలమైంది."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"ఈ నెట్‌వర్క్‌ను వెరిఫై చేయడం సాధ్యం కాదు"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"ఏదేమైనా కనెక్ట్ చేయండి"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"కనెక్ట్ చేయవద్దు"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"నెట్‌వర్క్ <xliff:g id="SSID">%1$s</xliff:g>‌లో సర్టిఫికెట్ లేదు."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"సర్టిఫికెట్‌లను ఎలా జోడించాలో తెలుసుకోండి"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"ఈ నెట్‌వర్క్‌ను వెరిఫై చేయడం సాధ్యం కాదు"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"నెట్‌వర్క్ <xliff:g id="SSID">%1$s</xliff:g>‌లో సర్టిఫికెట్ లేదు. సర్టిఫికెట్‌లను ఎలా జోడించాలో తెలుసుకోవడానికి ట్యాప్ చేయండి."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"ఏదేమైనా కనెక్ట్ చేయండి"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"కనెక్ట్ చేయవద్దు"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Wi‑Fiని ఆన్ చేయడానికి <xliff:g id="APP_NAME">%1$s</xliff:g> యాప్‌ను అనుమతించాలా?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"మీరు క్విక్ సెట్టింగ్‌లలో Wi‑Fiని ఆఫ్ చేయవచ్చు"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"అనుమతించండి"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"అనుమతించవద్దు"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-th/strings.xml b/service/ServiceWifiResources/res/values-th/strings.xml
index f043b67..c780db6 100644
--- a/service/ServiceWifiResources/res/values-th/strings.xml
+++ b/service/ServiceWifiResources/res/values-th/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"อัปเดตการตั้งค่าแล้ว ลองเชื่อมต่ออีกครั้ง"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"เปลี่ยนการตั้งค่าความเป็นส่วนตัวไม่ได้"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"ไม่พบเครือข่าย"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : คุณไม่สามารถเชื่อมต่อกับ Verizon Wi-Fi Access จากนอกพื้นที่ให้บริการของ Verizon (ข้อผิดพลาด = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : คุณไม่ได้สมัครใช้บริการ Verizon Wi-Fi Access โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : บัญชี Verizon Wi-Fi Access ของคุณมีปัญหา โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : คุณเชื่อมต่อกับ Verizon Wi-Fi Access อยู่แล้ว (ข้อผิดพลาด = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : บัญชี Verizon Wi-Fi Access ของคุณมีปัญหา โปรดโทรหาเราที่ 800-922-0204 (ข้อผิดพลาด = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access ไม่พร้อมให้บริการจากตำแหน่งของคุณ โปรดลองอีกครั้งในภายหลังหรือลองจากตำแหน่งอื่น (ข้อผิดพลาด = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access โปรดลองอีกครั้งในภายหลังหรือลองจากตำแหน่งอื่น"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access เนื่องจากข้อผิดพลาด 16384"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access เนื่องจากข้อผิดพลาด 16385"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : ข้อผิดพลาดในการตรวจสอบสิทธิ์ EAP รหัสข้อผิดพลาดที่ไม่รู้จัก"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : มีปัญหาในการเชื่อมต่อคุณกับ Verizon Wi-Fi Access"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"ปิดฮอตสปอตแล้ว"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"ไม่มีอุปกรณ์ที่เชื่อมต่อ แตะเพื่อแก้ไข"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"ไม่ได้เชื่อมต่อ Wi-Fi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"หากต้องการเชื่อมต่อกับ <xliff:g id="SSID">%1$s</xliff:g> ให้ใส่ซิมของ <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> ต้องการใช้ทรัพยากรเครือข่าย"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"การดำเนินการนี้อาจทำให้เกิดปัญหากับ <xliff:g id="APPS">%3$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"การดำเนินการนี้อาจทำให้เกิดปัญหากับแอปเหล่านี้: <xliff:g id="APPS">%3$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"อนุญาต"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"ไม่อนุญาต"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"เครือข่ายนี้เชื่อถือได้ไหม"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"ใช่ เชื่อมต่อ"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"ไม่ ไม่เชื่อมต่อ"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"อนุญาตให้เครือข่ายนี้เชื่อมต่อเฉพาะในกรณีที่ข้อมูลด้านล่างดูถูกต้อง\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"ชื่อเซิร์ฟเวอร์:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"ชื่อผู้ออกใบรับรอง:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"องค์กร:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"รายชื่อติดต่อ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"ลายเซ็น:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"ต้องยืนยันเครือข่าย"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"ตรวจสอบรายละเอียดเครือข่ายสำหรับ <xliff:g id="SSID">%1$s</xliff:g> ก่อนเชื่อมต่อ แตะเพื่อดำเนินการต่อ"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"ติดตั้งใบรับรองไม่สำเร็จ"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"ยืนยันเครือข่ายนี้ไม่ได้"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"ยังต้องการเชื่อมต่อ"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"ไม่เชื่อมต่อ"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"เครือข่าย <xliff:g id="SSID">%1$s</xliff:g> ไม่มีใบรับรอง"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"ดูวิธีเพิ่มใบรับรอง"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"ยืนยันเครือข่ายนี้ไม่ได้"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"เครือข่าย <xliff:g id="SSID">%1$s</xliff:g> ไม่มีใบรับรอง แตะเพื่อดูวิธีเพิ่มใบรับรอง"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"ยังต้องการเชื่อมต่อ"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"ไม่เชื่อมต่อ"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"อนุญาตให้ <xliff:g id="APP_NAME">%1$s</xliff:g> เปิด Wi‑Fi ใช่ไหม"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"คุณปิด Wi‑Fi ได้ในการตั้งค่าด่วน"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"อนุญาต"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"ไม่อนุญาต"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-tl/strings.xml b/service/ServiceWifiResources/res/values-tl/strings.xml
index 89bb36d..7dfc668 100644
--- a/service/ServiceWifiResources/res/values-tl/strings.xml
+++ b/service/ServiceWifiResources/res/values-tl/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Na-update ang setting. Subukang kumonekta ulit."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Hindi puwedeng baguhin ang setting ng privacy"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Hindi nakita ang network"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Hindi ka puwedeng kumonekta sa Verizon Wi-Fi Access mula sa labas ng lugar na sakop ng Verizon. (Error = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Hindi ka naka-subscribe sa Verizon Wi-Fi Access. Pakitawagan kami sa 800-922-0204. (Error = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : May problema sa iyong Verizon Wi-Fi Access account. Pakitawagan kami sa 800-922-0204. (Error = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Nakakonekta ka na sa Verizon Wi-Fi Access. (Error = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access. Pakitawagan kami sa 800-922-0204. (Error = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : May problema sa iyong Verizon Wi-Fi Access account. Pakitawagan kami sa 800-922-0204. (Error = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Hindi available sa iyong lokasyon ang Verizon Wi-Fi Access. Subukan ulit sa ibang pagkakataon o subukan mula sa ibang lokasyon. (Error = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access. Subukan ulit sa ibang pagkakataon o subukan mula sa ibang lokasyon."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access dahil sa error 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access dahil sa error 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Error sa pag-authenticate ng EAP, hindi alam ang error code"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : May problema sa pagkonekta sa iyo sa Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Naka-off ang hotspot"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Walang mga nakakonektang device. I-tap para baguhin."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Nadiskonekta ang Wi‑Fi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Para makakonekta sa <xliff:g id="SSID">%1$s</xliff:g>, maglagay ng <xliff:g id="CARRIER_NAME">%2$s</xliff:g> na SIM"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"Gustong gumamit ng <xliff:g id="APP">%1$s</xliff:g> ng resource sa networking"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Posible itong magdulot ng mga problema para sa <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Puwede itong magdulot ng mga problema para sa mga app na ito: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Payagan"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Huwag payagan"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Pinagkakatiwalaan ba ang network na ito?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Oo, kumonekta"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Hindi, huwag kumonekta"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Payagan lang ang network na ito na kumonekta kung mukhang tama ang impormasyon sa ibaba.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Pangalan ng Server:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Pangalan ng Nagbigay:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Organisasyon:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Makipag-ugnayan sa:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Lagda:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Kailangang ma-verify ng network"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Suriin ang mga detalye ng network para sa <xliff:g id="SSID">%1$s</xliff:g> bago kumonekta. I-tap para magpatuloy."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Hindi na-install ang certificate."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Hindi ma-verify ang network na ito"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Kumonekta pa rin"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Huwag kumonekta"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Kulang ng certificate ang network na <xliff:g id="SSID">%1$s</xliff:g>."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Alamin kung paano magdagdag ng mga certificate"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Hindi ma-verify ang network na ito"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Kulang ng certificate ang network na <xliff:g id="SSID">%1$s</xliff:g>. I-tap para matuto pa tungkol sa kung paano magdagdag ng mga certificate."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Kumonekta pa rin"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Huwag kumonekta"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Payagan ang <xliff:g id="APP_NAME">%1$s</xliff:g> na i-on ang Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Puwede mong i-off ang Wi‑Fi sa Mga Mabilisang Setting"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Payagan"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Huwag payagan"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-tr/strings.xml b/service/ServiceWifiResources/res/values-tr/strings.xml
index 54bbaa3..1d36896 100644
--- a/service/ServiceWifiResources/res/values-tr/strings.xml
+++ b/service/ServiceWifiResources/res/values-tr/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Ayar güncellendi. Tekrar bağlanmayı deneyin."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Gizlilik ayarı değiştirilemiyor"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Ağ bulunamadı"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon\'ın kapsama alanının dışından Verizon Wi-Fi Access\'e bağlanamazsınız. (Hata = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access abonesi değilsiniz. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hesabınızla ilgili bir sorun var. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'e zaten bağlısınız. (Hata = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hesabınızla ilgili bir sorun var. Bize ulaşmak için lütfen 800-922-0204 numaralı telefonu arayın. (Hata = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access bulunduğunuz konumdan kullanılamıyor. Daha sonra tekrar deneyin veya farklı bir konumdan bağlanmaya çalışın. (Hata = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu. Daha sonra tekrar deneyin veya farklı bir konumdan bağlanmaya çalışın."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16384 hatası nedeniyle Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16385 hatası nedeniyle Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP kimlik doğrulama hatası, bilinmeyen hata kodu"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access\'e bağlanırken bir sorun oldu."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot kapatıldı"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Bağlı cihaz yok. Değiştirmek için dokunun."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Kablosuz bağlantı kesildi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> ağına bağlanmak için <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM\'ini takın"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g>, ağ iletişimi kaynağı kullanmak istiyor"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Bu durum <xliff:g id="APPS">%3$s</xliff:g> için sorunlara yol açabilir."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"<xliff:g id="APPS">%3$s</xliff:g> uygulamalarında sorun yaşanmasına sebep olabilir."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"İzin ver"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"İzin verme"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Bu ağ güvenilir mi?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Evet, bağlan"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Hayır, bağlanma"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Bu ağın bağlanmasına yalnızca aşağıdaki bilgiler doğru görünüyorsa izin verin.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Sunucu Adı:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Sertifika Verenin Adı:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Kuruluş:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"İletişim:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"İmza:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Ağın doğrulanması gerekiyor"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Bağlanmadan önce <xliff:g id="SSID">%1$s</xliff:g> ağ ayrıntılarını inceleyin. Devam etmek için dokunun."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Sertifika yükleme işlemi başarısız."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Bu ağ doğrulanamıyor"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Yine de bağlan"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Bağlanma"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"<xliff:g id="SSID">%1$s</xliff:g> ağında bir sertifika eksik."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Nasıl sertifika ekleyeceğinizi öğrenin"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Bu ağ doğrulanamıyor"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"<xliff:g id="SSID">%1$s</xliff:g> ağında bir sertifika eksik. Nasıl sertifika ekleyeceğinizi öğrenmek için dokunun."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Yine de bağlan"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Bağlanma"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g> uygulamasının kablosuz bağlantıyı açmasına izin verilsin mi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Kablosuz bağlantıyı Hızlı Ayarlar\'dan kapatabilirsiniz"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"İzin ver"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"İzin verme"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-uk/strings.xml b/service/ServiceWifiResources/res/values-uk/strings.xml
index 3bef499..84f2970 100644
--- a/service/ServiceWifiResources/res/values-uk/strings.xml
+++ b/service/ServiceWifiResources/res/values-uk/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Налаштування оновлено. Спробуйте підключитися знову."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Не вдалося змінити налаштування конфіденційності"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Мережу не знайдено"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP (32756)"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: не можна підключитися до Verizon Wi-Fi Access за межами зони покриття Verizon. (Помилка = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: у вас немає підписки на Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з вашим обліковим записом Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: пристрій уже підключено до Verizon Wi-Fi Access. (Помилка = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з вашим обліковим записом Verizon Wi-Fi Access. Зателефонуйте нам на номер 800-922-0204. (Помилка = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: сервіс Verizon Wi-Fi Access недоступний за вашим місцезнаходженням. Повторіть спробу пізніше або змініть місцезнаходження. (Помилка = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP (32767)"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access. Повторіть спробу пізніше або змініть місцезнаходження."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP (16384)"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з підключенням до Verizon Wi-Fi Access через помилку 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP (16385)"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: виникла проблема з підключенням до Verizon Wi-Fi Access через помилку 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>: помилка автентифікації за протоколом EAP (код помилки невідомий)"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>: не вдалося підключитися до Verizon Wi-Fi Access."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Точку доступу вимкнено"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Немає підключених пристроїв. Натисніть, щоб змінити."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Від\'єднано від мережі Wi-Fi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Щоб підключитися до мережі \"<xliff:g id="SSID">%1$s</xliff:g>\", вставте SIM-карту \"<xliff:g id="CARRIER_NAME">%2$s</xliff:g>\""</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"Додаток <xliff:g id="APP">%1$s</xliff:g> хоче використовувати мережевий ресурс"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Це може вплинути на роботу додатків <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Це може вплинути на роботу таких додатків: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Дозволити"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Не дозволяти"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Це надійна мережа?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Так, підключитися"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Ні, не підключатися"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Дозволяйте підключення до цієї мережі, лише якщо наведена нижче інформація правильна.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Назва сервера:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Назва видавця:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Організація:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Контактна особа:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Підпис:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Потрібно підтвердити мережу"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Перш ніж підключатися, перевірте відомості про мережу <xliff:g id="SSID">%1$s</xliff:g>. Натисніть, щоб продовжити."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Не вдалося встановити сертифікат."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Не вдається підтвердити цю мережу"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Усе одно підключитися"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Не підключатися"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Для мережі з таким іменем (<xliff:g id="SSID">%1$s</xliff:g>) немає сертифіката."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Як додавати сертифікати"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Не вдається підтвердити цю мережу"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Для мережі з таким іменем (<xliff:g id="SSID">%1$s</xliff:g>) немає сертифіката. Натисніть, щоб дізнатися, як додавати сертифікати."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Усе одно підключитися"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Не підключатися"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Дозволити додатку <xliff:g id="APP_NAME">%1$s</xliff:g> вмикати Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Wi-Fi можна вимкнути у швидких налаштуваннях"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Дозволити"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Не дозволяти"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-ur/strings.xml b/service/ServiceWifiResources/res/values-ur/strings.xml
index b9ca64e..83481fa 100644
--- a/service/ServiceWifiResources/res/values-ur/strings.xml
+++ b/service/ServiceWifiResources/res/values-ur/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"ترتیبات اپ ڈیٹ کر دی گئی۔ دوبارہ منسلک کرنے کی کوشش کریں۔"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"رازداری کی ترتیب تبدیل نہیں ہو سکتی"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"نیٹ ورک نہیں ملا"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : آپ Verizon کوریج علاقے کے باہر سے Verizon Wi-Fi رسائی سے منسلک نہیں ہو سکتے۔ (خرابی = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : آپ نے Verizon Wi-Fi رسائی کو سبسکرائب نہیں کیا ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : آپ کے Verizon Wi-Fi رسائی اکاؤنٹ کے ساتھ ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : آپ پہلے سے ہی Verizon Wi-Fi رسائی سے منسلک ہیں۔ (خرابی = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : آپ کے Verizon Wi-Fi رسائی اکاؤنٹ کے ساتھ ایک مسئلہ ہے۔ براہ کرم ہمیں 0204-922-800 پر کال کریں۔ (خرابی = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi رسائی آپ کے مقام سے دستیاب نہیں ہے۔ بعد میں دوبارہ کوشش کریں یا دوسرے مقام سے کوشش کریں۔ (خرابی = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔ بعد میں دوبارہ کوشش کریں یا دوسرے مقام سے کوشش کریں۔"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : خرابی 16384 کی وجہ سے آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : خرابی 16385 کی وجہ سے آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"‏<xliff:g id="SSID">%1$s</xliff:g> : EAP توثیق کی خرابی، نامعلوم خرابی کا کوڈ"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"‏<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : آپ کو Verizon Wi-Fi رسائی سے منسلک ہونے میں ایک مسئلہ ہے۔"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"ہاٹ اسپاٹ کو آف کر دیا گیا"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"کوئی آلات منسلک نہیں ہیں۔ ترمیم کرنے کے لیے تھپتھپائیں۔"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"‏Wifi غیر منسلک ہو گیا"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"‏<xliff:g id="SSID">%1$s</xliff:g> سے منسلک ہونے کے ليے <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM داخل کریں"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> نیٹ ورکنگ وسیلہ استعمال کرنا چاہتا ہے"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"یہ <xliff:g id="APPS">%3$s</xliff:g> کے لیے مسائل کو سبب بنا سکتا ہے۔"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"اس سے ان ایپس کے لیے مسائل پیدا ہو سکتے ہیں: <xliff:g id="APPS">%3$s</xliff:g>۔"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"اجازت دیں"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"اجازت نہ دیں"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"کیا یہ نیٹ ورک قابل اعتماد ہے؟"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"ہاں، منسلک کریں"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"نہیں، منسلک نہ کریں"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"اس نیٹ ورک کو صرف اس صورت میں منسلک کرنے کی اجازت دیں جب نیچے دی گئی معلومات درست لگتی ہے۔\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"سرور کا نام:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"جاری کنندہ کا نام:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"تنظیم:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"رابطہ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"دستخط:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"نیٹ ورک کی تصدیق کی ضرورت ہے"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"منسلک ہونے سے قبل <xliff:g id="SSID">%1$s</xliff:g> کے لیے نیٹ ورک کی تفصیلات کا جائزہ لیں۔ جاری رکھنے کیلئے تھپتھپائیں۔"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"سرٹیفکیٹ انسٹالیشن ناکام ہو گیا۔"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"اس نیٹ ورک کی توثیق نہیں کر سکتے"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"بہرحال منسلک کریں"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"منسلک نہ کریں"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"نیٹ ورک <xliff:g id="SSID">%1$s</xliff:g> ایک سرٹیفکیٹ غائب ہے۔"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"سرٹیفکیٹس شامل کرنے کا طریقہ جانیں"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"اس نیٹ ورک کی توثیق نہیں کر سکتے"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"نیٹ ورک <xliff:g id="SSID">%1$s</xliff:g> ایک سرٹیفکیٹ غائب ہے۔ سرٹیفکیٹس شامل کرنے کا طریقہ جاننے کے لیے تھپتھپائیں۔"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"بہرحال منسلک کریں"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"منسلک نہ کریں"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"‏<xliff:g id="APP_NAME">%1$s</xliff:g> کو Wi-Fi آن کرنے کی اجازت دیں؟"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"‏آپ فوری ترتیبات میں Wi-Fi آف کر سکتے ہیں"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"اجازت دیں"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"اجازت نہ دیں"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-uz/strings.xml b/service/ServiceWifiResources/res/values-uz/strings.xml
index d66d0d6..4a289db 100644
--- a/service/ServiceWifiResources/res/values-uz/strings.xml
+++ b/service/ServiceWifiResources/res/values-uz/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Sozlama yangilandi. Qaytadan ulaning."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Maxfiylik parametrini oʻzgartirib boʻlmadi"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Tarmoq topilmadi"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon qamrovidan tashqarida Verizon Wi-Fi Access xizmatiga ulana olmaysiz. (Xato = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga obuna qilmagansiz. 800-922-0204 raqamiga telefon qiling. (Xato = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : haqiqiylikni tekshirishda xato: 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hisobingiz bilan bogʻliq muammo mavjud. 800-922-0204 raqamiga telefon qiling. (Xato = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Allaqachon Verizon Wi-Fi Access xizmatiga ulangansiz. (Xato = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo yuz berdi. 800-922-0204 raqamiga telefon qiling. (Xato = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access hisobingiz bilan bogʻliq muammo mavjud. 800-922-0204 raqamiga telefon qiling. (Xato = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access siz turgan joyda ishlamaydi. Keyinroq yoki boshqa joyda qayta urining. (Xato = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo yuz berdi. Keyinroq yoki boshqa joyda qayta urining."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16384 xatosi tufayli Verizon Wi-Fi Access xizmatiga ulanishda muammo yuz berdi."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 16385 xatosi tufayli Verizon Wi-Fi Access xizmatiga ulanishda muammo yuz berdi."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP haqiqiylikni tekshirishda xato: xato kodi nomaʼlum"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon Wi-Fi Access xizmatiga ulanishda muammo yuz berdi."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Hotspot oʻchirildi"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Hech qanday qurilma ulanmagan. Oʻzgartirish uchun tegining."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi uzildi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"<xliff:g id="SSID">%1$s</xliff:g> nomli tarmoqqa ulanish uchun <xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM kartasini joylang"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> tarmoq resursidan foydalanmoqchi"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Bu <xliff:g id="APPS">%3$s</xliff:g> uchun muammo paydo qilishi mumkin."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Bu quyidagi ilovalar uchun muammolarga olib kelishi mumkin: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Ruxsat"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Rad etish"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Bu tarmoq ishonchlimi?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Ha, ulansin"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Yoʻq, ulanmasin"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Bu tarmoqqa ulanishga faqat quyidagi axborot xatosiz boʻlsa ruxsat bering.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Server nomi:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Emitent nomi:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Tashkilot:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Kontact:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Imzo:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Tarmoqni tekshirish zarur"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Ulanishdan oldin tarmoq (<xliff:g id="SSID">%1$s</xliff:g>) axborotini tekshiring. Davom etish uchun bosing."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Sertifikat oʻrnatilmadi."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Bu tarmoq tasdiqlanmadi"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Baribir ulansin"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ulanmasin"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Tarmoq (<xliff:g id="SSID">%1$s</xliff:g>) sertifikati mavjud emas."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Sertifikat kiritish haqida batafsil"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Bu tarmoq tasdiqlanmadi"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Tarmoq (<xliff:g id="SSID">%1$s</xliff:g>) sertifikati mavjud emas. Sertifikat kiritish haqida batafsil axborot olish uchun bosing."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Baribir ulansin"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ulanmasin"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"<xliff:g id="APP_NAME">%1$s</xliff:g> ilovasiga Wi‑Fi aloqasini yoqishi uchun ruxsat berilsinmi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Tezkor sozlamalar orqali Wi-Fi aloqani faolsizlantirish mumkin"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Ruxsat berish"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Rad etish"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-vi/strings.xml b/service/ServiceWifiResources/res/values-vi/strings.xml
index 827fd90..a90bd21 100644
--- a/service/ServiceWifiResources/res/values-vi/strings.xml
+++ b/service/ServiceWifiResources/res/values-vi/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Đã cập nhật tùy chọn cài đặt. Hãy thử kết nối lại."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Không thể thay đổi tùy chọn cài đặt quyền riêng tư"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Không tìm thấy mạng"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Bạn không kết nối được với dịch vụ Truy cập Wi-Fi của Verizon ở bên ngoài khu vực phủ sóng của Verizon. (Lỗi = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Bạn chưa đăng ký dịch vụ Truy cập Wi-Fi của Verizon. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố với tài khoản Truy cập Wi-Fi của Verizon mà bạn sử dụng. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Bạn đã kết nối với dịch vụ Truy cập Wi-Fi của Verizon. (Lỗi = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố với tài khoản Truy cập Wi-Fi của Verizon mà bạn sử dụng. Vui lòng gọi cho chúng tôi theo số 800-922-0204. (Lỗi = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Dịch vụ Truy cập Wi-Fi của Verizon chưa có ở vị trí của bạn. Hãy thử lại sau hoặc thử ở một vị trí khác. (Lỗi = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon. Hãy thử lại sau hoặc thử ở một vị trí khác."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon do lỗi 16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon do lỗi 16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Lỗi xác thực EAP, mã lỗi không xác định"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Đã xảy ra sự cố khi kết nối bạn với dịch vụ Truy cập Wi-Fi của Verizon."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"Đã tắt điểm phát sóng"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Chưa kết nối thiết bị nào. Hãy nhấn để chỉnh sửa."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Đã ngắt kết nối Wi-Fi"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Để kết nối với <xliff:g id="SSID">%1$s</xliff:g>, hãy lắp một thẻ SIM <xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"<xliff:g id="APP">%1$s</xliff:g> muốn dùng một tài nguyên mạng"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Điều này có thể gây ra sự cố cho <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Điều này có thể khiến những ứng dụng này gặp vấn đề: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Cho phép"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Không cho phép"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Mạng này có đáng tin cậy không?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Có, hãy kết nối"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Không, không kết nối"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Chỉ cho phép mạng này kết nối nếu thông tin bên dưới là chính xác.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Tên máy chủ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Tên công ty phát hành:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Tổ chức:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Liên hệ:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Chữ ký:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Cần xác minh mạng"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Hãy xem lại thông tin mạng của <xliff:g id="SSID">%1$s</xliff:g> trước khi kết nối. Nhấn để tiếp tục."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Không cài đặt được chứng chỉ."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Không xác minh được mạng này"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Vẫn kết nối"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Không kết nối"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Mạng <xliff:g id="SSID">%1$s</xliff:g> bị thiếu chứng chỉ."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Tìm hiểu cách thêm chứng chỉ"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Không xác minh được mạng này"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Mạng <xliff:g id="SSID">%1$s</xliff:g> bị thiếu chứng chỉ. Nhấn để tìm hiểu cách thêm chứng chỉ."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Vẫn kết nối"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Không kết nối"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Cho phép <xliff:g id="APP_NAME">%1$s</xliff:g> bật Wi‑Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Bạn có thể tắt Wi-Fi trong phần Cài đặt nhanh"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Cho phép"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Không cho phép"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-zh-rCN/strings.xml b/service/ServiceWifiResources/res/values-zh-rCN/strings.xml
index a860bb3..b0ab302 100644
--- a/service/ServiceWifiResources/res/values-zh-rCN/strings.xml
+++ b/service/ServiceWifiResources/res/values-zh-rCN/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"设置已更新。请尝试重新连接。"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"无法更改隐私设置"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"未找到任何网络"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:Verizon 信号覆盖范围外的地点无法连接到 Verizon Wi-Fi Access。(错误 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:您并未订阅 Verizon Wi-Fi Access。请拨打 800-922-0204 与我们联系。(错误 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帐号出现了问题。请拨打 800-922-0204 与我们联系。(错误 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:您已连接到 Verizon Wi-Fi Access。(错误 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:连接到 Verizon Wi-Fi Access 时出现了问题。请拨打 800-922-0204 与我们联系。(错误 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帐号出现了问题。请拨打 800-922-0204 与我们联系。(错误 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:您目前所在的地点无法使用 Verizon Wi-Fi Access。请稍后重试,或换一个地点再试。(错误 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:连接到 Verizon Wi-Fi Access 时出现了问题。请稍后重试,或换一个地点再试。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:发生错误 16384,无法连接到 Verizon Wi-Fi Access。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:发生错误 16385,无法连接到 Verizon Wi-Fi Access。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 身份验证错误(错误代码未知)"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g>:连接到 Verizon Wi-Fi Access 时出现了问题。"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"热点已关闭"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"未连接到任何设备。点按即可修改。"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"WLAN 连接已断开"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"要连接到“<xliff:g id="SSID">%1$s</xliff:g>”,请插入<xliff:g id="CARRIER_NAME">%2$s</xliff:g> SIM 卡"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"“<xliff:g id="APP">%1$s</xliff:g>”想要使用网络资源"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"这可能会导致以下应用出现问题:<xliff:g id="APPS">%3$s</xliff:g>。"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"这可能会导致这些应用出现问题:<xliff:g id="APPS">%3$s</xliff:g>。"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"允许"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"不允许"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"这是受信任的网络吗?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"是,连接"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"否,不连接"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"请先确保下面的信息正确无误,再允许此网络连接。\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"服务器名称:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"核发机构名称:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"组织:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"联系人:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"签名:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"必须验证网络"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"请在连接前先检查 <xliff:g id="SSID">%1$s</xliff:g> 的网络详细信息。点按即可继续。"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"证书安装失败。"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"无法验证此网络"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"仍然连接"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"不连接"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"网络 <xliff:g id="SSID">%1$s</xliff:g> 缺少证书。"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"了解如何添加证书"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"无法验证此网络"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"网络 <xliff:g id="SSID">%1$s</xliff:g> 缺少证书。点按即可了解如何添加证书。"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"仍然连接"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"不连接"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"允许“<xliff:g id="APP_NAME">%1$s</xliff:g>”开启 WLAN?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"您可以在“快捷设置”中关闭 WLAN"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"允许"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"不允许"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-zh-rHK/strings.xml b/service/ServiceWifiResources/res/values-zh-rHK/strings.xml
index 02691ca..4d81fc2 100644
--- a/service/ServiceWifiResources/res/values-zh-rHK/strings.xml
+++ b/service/ServiceWifiResources/res/values-zh-rHK/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"已更新設定,請嘗試重新連線。"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"無法更改私隱設定"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"找不到網絡"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>:無法從 Verizon 訊號覆蓋範圍外的地點連線至 Verizon Wi-Fi Access (錯誤 = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>:您未訂閱 Verizon Wi-Fi Access。請致電 800-922-0204 與我們聯絡 (錯誤 = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帳戶發生問題。請致電 800-922-0204 與我們聯絡 (錯誤 = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>:您已連線至 Verizon Wi-Fi Access (錯誤 = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。請致電 800-922-0204 與我們聯絡 (錯誤 = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>:您的 Verizon Wi-Fi Access 帳戶發生問題。請致電 800-922-0204 與我們聯絡 (錯誤 = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>:您目前的所在地點無法使用 Verizon Wi-Fi Access,請稍後再試。您亦可換個地點,然後再試一次 (錯誤 = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。請稍後再試。您亦可換個地點,然後再試一次。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 發生錯誤 16384,因此無法連線至 Verizon Wi-Fi Access。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 發生錯誤 16385,因此無法連線至 Verizon Wi-Fi Access。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 (錯誤代碼不明)"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g> <xliff:g id="SSID">%1$s</xliff:g>:連線至 Verizon Wi-Fi Access 時發生問題。"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"熱點已關閉"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"未連接到任何裝置,輕按即可修改。"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi 連線已中斷"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"插入「<xliff:g id="CARRIER_NAME">%2$s</xliff:g>」SIM 卡以連線至「<xliff:g id="SSID">%1$s</xliff:g>」"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"「<xliff:g id="APP">%1$s</xliff:g>」想使用網絡資源"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"這可能會導致「<xliff:g id="APPS">%3$s</xliff:g>」出現問題。"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"這可能會導致這些應用程式出現問題:<xliff:g id="APPS">%3$s</xliff:g>。"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"允許"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"不允許"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"這是可信任的網絡嗎?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"是,請連線"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"否,不要連線"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"必須確保以下資料正確,方可允許此網絡連線。\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"伺服器名稱:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"發卡機構名稱:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"機構:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"聯絡人:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"簽名:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"需要驗證網絡"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"連線前請檢查 <xliff:g id="SSID">%1$s</xliff:g> 網絡詳情。輕按即可繼續。"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"無法安裝憑證。"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"無法驗證此網絡"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"仍要連線"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"不要連線"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"網絡 <xliff:g id="SSID">%1$s</xliff:g> 缺少憑證。"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"瞭解如何新增憑證"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"無法驗證此網絡"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"網絡 <xliff:g id="SSID">%1$s</xliff:g> 缺少憑證。輕按即可瞭解如何新增憑證。"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"仍要連線"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"不要連線"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」開啟 Wi‑Fi 嗎?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"您可以在「快速設定」中關閉 Wi-Fi"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"允許"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"不允許"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-zh-rTW/strings.xml b/service/ServiceWifiResources/res/values-zh-rTW/strings.xml
index 474b321..5e3c474 100644
--- a/service/ServiceWifiResources/res/values-zh-rTW/strings.xml
+++ b/service/ServiceWifiResources/res/values-zh-rTW/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"設定已更新,請再次嘗試連線。"</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"無法變更隱私權設定"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"找不到網路"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Verizon 訊號涵蓋範圍外的地點無法連線至 Verizon Wi-Fi Access (錯誤 = 32760)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 你並未訂閱 Verizon Wi-Fi Access。請撥打 800-922-0204 與我們聯絡 (錯誤 = 32761)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 你的 Verizon Wi-Fi Access 帳戶發生問題。請撥打 800-922-0204 與我們聯絡 (錯誤 = 32762)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 你已連線至 Verizon Wi-Fi Access (錯誤 = 32763)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 連線至 Verizon Wi-Fi Access 時發生問題,請撥打 800-922-0204 與我們聯絡 (錯誤 = 32764)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 你的 Verizon Wi-Fi Access 帳戶發生問題。請撥打 800-922-0204 與我們聯絡 (錯誤 = 32765)。"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g>:EAP 驗證錯誤 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 你目前的所在地點無法使用 Verizon Wi-Fi Access,請稍後再試。你也可以換個地點,然後再試一次 (錯誤 = 32766)。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 連線至 Verizon Wi-Fi Access 時發生問題,請稍後再試。你也可以換個地點,然後再試一次。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 發生錯誤 16384,因此無法連線至 Verizon Wi-Fi Access。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 發生錯誤 16385,因此無法連線至 Verizon Wi-Fi Access。"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : EAP 驗證錯誤 (錯誤代碼不明)"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : 連線至 Verizon Wi-Fi Access 時發生問題。"</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"無線基地台已關閉"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"未連線到任何裝置,輕觸即可修改。"</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"Wi-Fi 連線中斷"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"如要連線到「<xliff:g id="SSID">%1$s</xliff:g>」,請插入「<xliff:g id="CARRIER_NAME">%2$s</xliff:g>」的 SIM 卡"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"「<xliff:g id="APP">%1$s</xliff:g>」想要使用網路資源"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"這可能會造成以下應用程式的問題:<xliff:g id="APPS">%3$s</xliff:g>。"</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"這可能會導致以下應用程式發生問題:<xliff:g id="APPS">%3$s</xliff:g>。"</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"允許"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"不允許"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"這是受信任的網路嗎?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"是,連線"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"否,不要連線"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"請先確認下方資訊正確無誤,再連線到這個網路。\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"伺服器名稱:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"核發者名稱:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"機構:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"聯絡人:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"簽名:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"必須驗證網路"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"連線之前,請先確認 <xliff:g id="SSID">%1$s</xliff:g> 的網路資訊是否正確。輕觸這裡即可繼續。"</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"憑證安裝失敗。"</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"無法驗證這個網路"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"仍要連線"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"不要連線"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"網路 <xliff:g id="SSID">%1$s</xliff:g> 缺少憑證。"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"瞭解如何新增憑證"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"無法驗證這個網路"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"網路 <xliff:g id="SSID">%1$s</xliff:g> 缺少憑證。輕觸即可瞭解如何新增憑證。"</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"仍要連線"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"不要連線"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"要允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」開啟 Wi-Fi 嗎?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"你可以透過快速設定關閉 Wi-Fi"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"允許"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"不允許"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values-zu/strings.xml b/service/ServiceWifiResources/res/values-zu/strings.xml
index 000e2c1..5e99219 100644
--- a/service/ServiceWifiResources/res/values-zu/strings.xml
+++ b/service/ServiceWifiResources/res/values-zu/strings.xml
@@ -70,84 +70,15 @@
     <string name="wifi_disable_mac_randomization_dialog_success" msgid="5849155828154391387">"Isilungiselelo sibuyekeziwe. Zama ukuxhuma futhi."</string>
     <string name="wifi_disable_mac_randomization_dialog_failure" msgid="2894643619143813096">"Ayikwazi ukushintsha isilungiselelo sobumfihlo"</string>
     <string name="wifi_disable_mac_randomization_dialog_network_not_found" msgid="7359256966900782004">"Inethiwekhi ayitholiwe"</string>
-    <string name="wifi_eap_error_message_code_32756" msgid="2620877003804313434">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 32756"</string>
-    <!-- no translation found for wifi_eap_error_message_code_32756_carrier_overrides:0 (9114567205305206743) -->
     <string name="wifi_eap_error_message_code_32760" msgid="5258191595973470188">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 32760"</string>
-  <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-    <item msgid="7582366019846559418">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Awukwazi ukuxhuma Ekufinyeleleni kwi-Verizon Wi-Fi kusuka ngaphandle kwendawo yokufakwa ye-Verizon. (Iphutha = 32760)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32761" msgid="3962610712123291591">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 32761"</string>
-  <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-    <item msgid="5173744897521799785">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Awubhalisele Ukufinyelela kwi-Verizon Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32761)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32762" msgid="2381670648753465737">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 32762"</string>
-  <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-    <item msgid="2911560823350042826">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga nge-akhawunti yakho Yokufinyelela kwi-Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32762)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32763" msgid="4467733260757049969">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 32763"</string>
-  <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-    <item msgid="591026649262091217">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Usuxhumekile kakade Ekufinyeleleni kwe-Verizon Wi-Fi. (Iphutha = 32763)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32764" msgid="7349538467012877101">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 32764"</string>
-  <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-    <item msgid="3909719534712787947">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma Ekufinyeleleni kwe-Verizon Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32764)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32765" msgid="2167528358066037980">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 32765"</string>
-  <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-    <item msgid="7454136618636618962">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga nge-akhawunti yakho Yokufinyelela kwi-Wi-Fi. Sicela usishayele ucingo ku-800-922-0204. (Iphutha = 32765)"</item>
-  </string-array>
     <string name="wifi_eap_error_message_code_32766" msgid="2335996367705677670">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 32766"</string>
-  <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-    <item msgid="5876210184761573755">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Ukufinyelela kwi-Verizon Wi-Fi akutholakali kusuka endaweni yakho. Zama futhi ngemuva kwesikhathi noma zama indawo ehlukile. (Iphutha = 32766)"</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_32767" msgid="7094289719914089006">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 32767"</string>
-  <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-    <item msgid="873264900678243330">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma Ekufinyeleleni kwe-Verizon Wi-Fi. Zama futhi ngemuva kwesikhathi noma zama indawo ehlukile."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16384" msgid="575394783233092922">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 16384"</string>
-  <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-    <item msgid="5042774904407799226">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kunenkinga kukhona inkinga yokukuxhuma Ekufinyeleleni kwi-Verizon Wi-Fi ngenxa yephutha elingu-16384."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_code_16385" msgid="8392878664662215609">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokugunyaza le-EAP 16385"</string>
-  <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-    <item msgid="1251122579833932025">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma Ekufinyeleleni kwi-Verizon Wi-Fi ngenxa yephutha elingu-16385."</item>
-  </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code" msgid="4480884285384231323">"<xliff:g id="SSID">%1$s</xliff:g> : Iphutha lokuqinisekisa le-EAP, ikhodi yephutha engaziwa"</string>
-  <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-    <item msgid="6141795443609380009">"<xliff:g id="CARRIER_ID_PREFIX">:::1839:::</xliff:g><xliff:g id="SSID">%1$s</xliff:g> : Kukhona inkinga yokukuxhuma Ekufinyeleleni kwe-Verizon Wi-Fi."</item>
-  </string-array>
     <string name="wifi_softap_auto_shutdown_timeout_expired_title" msgid="4896534374569504484">"I-Hotspot ivaliwe"</string>
     <string name="wifi_softap_auto_shutdown_timeout_expired_summary" msgid="7975476698140267728">"Awekho amadivayisi axhunyiwe. Thepha ukuze ushintshe."</string>
     <string name="wifi_sim_required_title" msgid="2262227800991155459">"I-Wi-Fi inqanyuliwe"</string>
     <string name="wifi_sim_required_message" msgid="284812212346125745">"Ukuze uxhumeke ku-<xliff:g id="SSID">%1$s</xliff:g> faka i-SIM ye-<xliff:g id="CARRIER_NAME">%2$s</xliff:g>"</string>
-    <string name="wifi_interface_priority_title" msgid="5117627874976875544">"I-<xliff:g id="APP">%1$s</xliff:g> ifuna ukusebenzisa insiza yenethiwekhi"</string>
-    <string name="wifi_interface_priority_message" msgid="4253391172756140313">"Lokhu kungabangela izinkinga ze-<xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_message_plural" msgid="8178086373318831859">"Lokhu kungase kubangele izinkinga kulawa ma-app: <xliff:g id="APPS">%3$s</xliff:g>."</string>
-    <string name="wifi_interface_priority_approve" msgid="7877379614986261096">"Vumela"</string>
-    <string name="wifi_interface_priority_reject" msgid="1378461018835886777">"Ungavumeli"</string>
-    <string name="wifi_ca_cert_dialog_title" msgid="3872340345882915806">"Ingabe le nethiwekhi iyathenjwa?"</string>
-    <string name="wifi_ca_cert_dialog_continue_text" msgid="1674156611893471003">"Yebo, xhuma"</string>
-    <string name="wifi_ca_cert_dialog_abort_text" msgid="1303170595421648059">"Cha, ungaxhumi"</string>
-    <string name="wifi_ca_cert_dialog_message_hint" msgid="5969214285536370126">"Vumela le nethiwekhi ukuthi ixhume uma ulwazi olungezansi lubukeka lulungile.\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text" msgid="3707809865604348289">"Igama Leseva:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text" msgid="1147216922475192304">"Igama Lokhiphayo:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text" msgid="4936354600863239487">"Inhlangano:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text" msgid="5799083318641183815">"Oxhumana naye:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text" msgid="704614002854299776">"Isiginesha:\n<xliff:g id="VALUE">%1$s</xliff:g>\n\n"</string>
-    <string name="wifi_ca_cert_notification_title" msgid="537569884930429796">"Inethiwekhi idinga ukuqinisekiswa"</string>
-    <string name="wifi_ca_cert_notification_message" msgid="6413248690626616961">"Buyekeza imininingwane yenethiwekhi ye-<xliff:g id="SSID">%1$s</xliff:g> ngaphambi kokuxhuma. Thepha ukuze uqhubeke."</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert" msgid="4864192219789736195">"Ukufaka isitifiketi kwehlulekile."</string>
-    <string name="wifi_ca_cert_dialog_preT_title" msgid="6916320484037009061">"Ayikwazi ukuqinisekisa le nethiwekhi"</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text" msgid="3181614240421159530">"Xhuma noma kunjalo"</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text" msgid="1195575129023960325">"Ungaxhumi"</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint" msgid="5682518783200852031">"Inethiwekhi ye-<xliff:g id="SSID">%1$s</xliff:g> ayinaso isitifiketi."</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link" msgid="6325483132538546884">"Funda indlela yokwengeza izitifiketi"</string>
-    <string name="wifi_ca_cert_notification_preT_title" msgid="7255129934648316663">"Ayikwazi ukuqinisekisa le nethiwekhi"</string>
-    <string name="wifi_ca_cert_notification_preT_message" msgid="4565553176090475724">"Inethiwekhi ye-<xliff:g id="SSID">%1$s</xliff:g> ayinaso isitifiketi. Thepha ukuze ufunde indlela yokwengeza izitifiketi."</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text" msgid="1525418430746943670">"Xhuma noma kunjalo"</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text" msgid="8307996031461071854">"Ungaxhumi"</string>
-    <string name="wifi_enable_request_dialog_title" msgid="3577459145316177148">"Vumela i-<xliff:g id="APP_NAME">%1$s</xliff:g> ukuthi ivule i-Wi-Fi?"</string>
-    <string name="wifi_enable_request_dialog_message" msgid="6395169178524938278">"Ungavala i-Wi-Fi Kumasethingi Asheshayo"</string>
-    <string name="wifi_enable_request_dialog_positive_button" msgid="6050832555821470466">"Vumela"</string>
-    <string name="wifi_enable_request_dialog_negative_button" msgid="4754219902374918882">"Ungavumeli"</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values/config.xml b/service/ServiceWifiResources/res/values/config.xml
index bd7a0e2..b57b4cc 100644
--- a/service/ServiceWifiResources/res/values/config.xml
+++ b/service/ServiceWifiResources/res/values/config.xml
@@ -36,18 +36,12 @@
     <!-- boolean indicating whether the WiFi chipset has 60GHz band support -->
     <bool translatable="false" name ="config_wifi60ghzSupport">false</bool>
 
-    <!-- Indicates that 11ax mode is supported on this device
+      <!-- Indicates that 11ax mode is supported on this device
            Note that if this flag is set to true, then 11ax is assumed to be supported.
            However, if it is left to the default value of false, the 11ax support will
            be checked via NL80211 interface -->
     <bool translatable="false" name="config_wifi11axSupportOverride">false</bool>
 
-    <!-- Indicates that 11be mode is supported on this device
-           Note that if this flag is set to true, then 11be is assumed to be supported.
-           However, if it is left to the default value of false, the 11be support will
-           be checked via NL80211 interface -->
-    <bool translatable="false" name="config_wifi11beSupportOverride">false</bool>
-
     <!-- Indicates whether to enable overriding the max number of spatial stream supported by the device
          If true, config_wifiFrameworkMaxNumSpatialStreamDeviceOverrideValue
          will be used to override the max number of spatial stream supported by the device.
@@ -93,22 +87,10 @@
     <!-- Parameters for controlling network selection by the framework -->
 
     <!-- The ratio of the next two parameters is the multiplier that converts the estimated
-         throughput in Mbps to score points, when the throughput is less than 800Mbps. -->
+         throughput in Mbps to score points. -->
     <integer translatable="false" name="config_wifiFrameworkThroughputBonusNumerator">120</integer>
     <integer translatable="false" name="config_wifiFrameworkThroughputBonusDenominator">433</integer>
 
-    <!-- The ratio of the next two parameters is the multiplier that converts the estimated
-         throughput in Mbps to score points for each point of throughput more than 800Mbps.
-         This default ratio is picked to help favor 6G HE160 over 5G HE80 which have throughput
-         difference up to 1200Mbps. 1200Mbps difference leads to 75 points difference, which is
-         roughly equivalent to 18dB RSSI.-->
-    <integer translatable="false" name="config_wifiFrameworkThroughputBonusNumeratorAfter800Mbps">1</integer>
-    <integer translatable="false" name="config_wifiFrameworkThroughputBonusDenominatorAfter800Mbps">16</integer>
-
-    <!-- Boolean indicating whether 6Ghz RSSI boost is given to compensate for power spectrum
-         limitations -->
-    <bool translatable="false" name="config_wifiEnable6GhzBeaconRssiBoost">true</bool>
-
     <!-- Maximum contribution (in score points) due to the estimated throughput. -->
     <integer translatable="false" name="config_wifiFrameworkThroughputBonusLimit">320</integer>
 
@@ -126,13 +108,6 @@
          the sum of rssi base score and throughput score-->
     <integer translatable="false" name="config_wifiFrameworkCurrentNetworkBonusPercent">20</integer>
     <integer translatable="false" name="config_wifiFrameworkSecureNetworkBonus">40</integer>
-    <!-- Integer specifying the bonus to give to a 6Ghz candidate during network selection scoring -->
-    <integer translatable="false" name="config_wifiBand6GhzBonus">0</integer>
-    <!-- Integer specifying the expected amount of score to reach the next tier during candidate
-         scoring. This value should be configured according to the value of parameters that
-         determine the scoring buckets such as config_wifiFrameworkSavedNetworkBonus and
-         config_wifiFrameworkUnmeteredNetworkBonus. -->
-    <integer translatable="false" name="config_wifiScoringBucketStepSize">500</integer>
 
     <!-- The duration in minutes to strongly favor the last-selected network over other options. -->
     <integer translatable="false" name="config_wifiFrameworkLastSelectionMinutes">480</integer>
@@ -170,9 +145,6 @@
          If both APs in Dual AP mode are idle, it shuts down the AP in higher band. -->
     <integer translatable="false" name="config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond">300000</integer>
 
-    <!-- boolean indicating whether or not to disable shutdown idle instance timer in the bridged mode when charging -->
-    <bool translatable="false" name ="config_wifiFrameworkSoftApDisableBridgedModeShutdownIdleInstanceWhenCharging">false</bool>
-
     <!-- Integer indicating maximum hardware supported client number of soft ap -->
     <integer translatable="false" name="config_wifiHardwareSoftapMaxClientCount">16</integer>
 
@@ -191,9 +163,6 @@
     <!-- boolean indicating whether or not to reset max client setting configuration during cloud configuration restore -->
     <bool translatable="false" name ="config_wifiSoftapResetMaxClientSettingConfig">true</bool>
 
-    <!-- boolean indicating whether or not to auto-upgrade band setting configuration to dual bands during cloud configuration restore when device supported -->
-    <bool translatable="false" name ="config_wifiSoftapAutoUpgradeToBridgedConfigWhenSupported">true</bool>
-
     <!-- List of allowed channels in 2GHz band for softap. If the device doesn't want to restrict
          channels this should be empty. Values is a comma separated channel string and/or channel
          range string like '1-6,11'. -->
@@ -292,9 +261,6 @@
     <!-- Wifi driver supports IEEE80211AX for softap -->
     <bool translatable="false" name="config_wifiSoftapIeee80211axSupported">false</bool>
 
-    <!-- Wifi driver supports IEEE80211BE for softap -->
-    <bool translatable="false" name="config_wifiSoftapIeee80211beSupported">false</bool>
-
     <!-- Wifi driver supports IEEE80211AX single user beamformer for softap -->
     <bool translatable="false" name="config_wifiSoftapHeSuBeamformerSupported">false</bool>
 
@@ -319,11 +285,6 @@
     <!-- Wifi driver supports 60GHz band for softap when chip support 60GHz -->
     <bool translatable="false" name="config_wifiSoftap60ghzSupported">false</bool>
 
-    <!-- Indicates that the framework should auto append lower bands to band configuration for
-         avoiding coexistence handling. For example: 5g only band will change to 2.4g|5g and
-         6g band will change to 2.4|5g|6g band -->
-    <bool translatable="false" name="config_wifiSoftapAutoAppendLowerBandsToBandConfigurationEnabled">true</bool>
-
     <!-- Indicates that local-only hotspot should be brought up at 6GHz if possible.
          This option is for automotive builds only (the one that have
          PackageManager#FEATURE_AUTOMOTIVE) -->
@@ -334,16 +295,12 @@
          PackageManager#FEATURE_AUTOMOTIVE) -->
     <bool translatable="false" name="config_wifi_local_only_hotspot_5ghz">false</bool>
 
-    <!-- Set to "true" to always use the factory MAC saved in WifiConfigStore when available.
-         Set to "false" to get the factory MAC from vendor HAL every time it's needed. -->
-    <bool translatable="false" name="config_wifiSaveFactoryMacToWifiConfigStore">true</bool>
-
     <!-- Indicates that connected MAC randomization is supported on this device -->
     <bool translatable="false" name="config_wifi_connected_mac_randomization_supported">false</bool>
 
-    <!-- Indicates that non-persistent MAC randomization is allowed on open networks that do not
+    <!-- Indicates that enhanced MAC randomization is allowed on open networks that do not
      use captive portals -->
-    <bool translatable="false" name="config_wifiAllowNonPersistentMacRandomizationOnOpenSsids">false</bool>
+    <bool translatable="false" name="config_wifiAllowEnhancedMacRandomizationOnOpenSsids">false</bool>
 
     <!-- Indicates that p2p MAC randomization is supported on this device -->
     <bool translatable="false" name="config_wifi_p2p_mac_randomization_supported">false</bool>
@@ -360,25 +317,17 @@
     <!-- Indicates that dynamic country code update in AP mode is supported on this device -->
     <bool translatable="false" name="config_wifiSoftApDynamicCountryCodeUpdateSupported">false</bool>
 
-    <!-- list of SSIDs to force disable MAC randomization -->
-    <string-array translatable="false" name="config_wifiForceDisableMacRandomizationSsidList">
+    <!-- list of SSIDs to enable aggressive MAC randomization on -->
+    <string-array translatable="false" name="config_wifi_aggressive_randomization_ssid_allowlist">
         <!-- SSIDs are expected in quoted format:
         <item>\"SSID_1\"</item>
         <item>\"SSID_2\"</item>
         -->
     </string-array>
 
-    <!-- list of SSIDs to enable non-persistent MAC randomization on -->
-    <string-array translatable="false" name="config_wifi_non_persistent_randomization_ssid_allowlist">
-        <!-- SSIDs are expected in quoted format:
-        <item>\"SSID_1\"</item>
-        <item>\"SSID_2\"</item>
-        -->
-    </string-array>
-
-    <!-- list of SSIDs to disable non-persistent MAC randomization on. If a SSID is in both the
-    allowlist and blocklist, then non-persistent MAC randomization will still be disabled. -->
-    <string-array translatable="false" name="config_wifi_non_persistent_randomization_ssid_blocklist">
+    <!-- list of SSIDs to disable aggressive MAC randomization on. If a SSID is in both the
+    allowlist and blocklist, then aggressive MAC randomization will still be disabled. -->
+    <string-array translatable="false" name="config_wifi_aggressive_randomization_ssid_blocklist">
         <!-- SSIDs are expected in quoted format:
         <item>\"SSID_1\"</item>
         <item>\"SSID_2\"</item>
@@ -478,60 +427,6 @@
         <item>160</item>
     </integer-array>
 
-    <!-- Array describing scanning schedule in seconds when device is connected and screen is on
-     and the connected network is the only saved network.
-     When this array is set to an empty array, the normal connected scan schedule defined
-     in config_wifiConnectedScanIntervalScheduleSec will be used -->
-    <integer-array translatable="false" name="config_wifiSingleSavedNetworkConnectedScanIntervalScheduleSec">
-    </integer-array>
-
-    <!-- This controls the scan type when config_wifiDisconnectedScanIntervalScheduleSec is being
-    used as the scan schedule.
-
-    Valid values: a non-empty list of WifiAnnotations#ScanType of variable length.
-    For example, if this is programmed as
-        <item>2</item>
-        <item>2</item>
-        <item>1</item>
-    then the first 2 periodic scan will be of type WifiScanner.SCAN_TYPE_HIGH_ACCURACY, and from
-    the 3rd scan onward, the scan type will be WifiScanner.SCAN_TYPE_LOW_POWER.
-    -->
-    <integer-array translatable="false" name="config_wifiDisconnectedScanType">
-        <item>2</item>
-    </integer-array>
-
-    <!-- This controls the scan type when config_wifiConnectedScanIntervalScheduleSec is being
-    used as the scan schedule.
-
-    Valid values: a non-empty list of WifiAnnotations#ScanType of variable length.
-    For example, if this is programmed as
-        <item>2</item>
-        <item>2</item>
-        <item>1</item>
-    then the first 2 periodic scan will be of type WifiScanner.SCAN_TYPE_HIGH_ACCURACY, and from
-    the 3rd scan onward, the scan type will be WifiScanner.SCAN_TYPE_LOW_POWER.
-    -->
-    <integer-array translatable="false" name="config_wifiConnectedScanType">
-        <item>2</item>
-    </integer-array>
-
-    <!-- This controls the scan type when config_wifiSingleSavedNetworkConnectedScanIntervalScheduleSec
-    is being used as the scan schedule.
-
-    Valid values: Leave as empty, or a list of WifiAnnotations#ScanType of variable length.
-    For example, if this is programmed as
-        <item>2</item>
-        <item>2</item>
-        <item>1</item>
-    then the first 2 periodic scan will be of type WifiScanner.SCAN_TYPE_HIGH_ACCURACY, and from
-    the 3rd scan onward, the scan type will be WifiScanner.SCAN_TYPE_LOW_POWER.
-
-    When this array is set to an empty array, the normal scan type defined in
-    config_wifiConnectedScanType will be used.
-    -->
-    <integer-array translatable="false" name="config_wifiSingleSavedNetworkConnectedScanType">
-    </integer-array>
-
     <!-- Integer specifying minimum wait time in seconds for next PNO scan when a network is found
     by PNO scan but gets rejected by Wifi Network Selector due to its low RSSI value-->
     <integer translatable="false" name="config_wifiPnoScanLowRssiNetworkRetryStartDelaySec"> 20 </integer>
@@ -544,6 +439,13 @@
          in seconds when device is connected and screen is on -->
     <integer translatable="false" name="config_wifiConnectedHighRssiScanMinimumWindowSizeSec"> 600 </integer>
 
+    <!-- Array describing scanning schedule in seconds when device is connected and screen is on
+         and the connected network is the only saved network.
+         When this array is set to an empty array, the noraml connected scan schedule defined
+         in config_wifiConnectedScanIntervalScheduleSec will be used -->
+    <integer-array translatable="false" name="config_wifiSingleSavedNetworkConnectedScanIntervalScheduleSec">
+    </integer-array>
+
     <!-- List of constants to indicate how many failures are needed to temporarily disable a network
     from auto-connect -->
     <integer translatable="false" name="config_wifiDisableReasonAssociationRejectionThreshold"> 3 </integer>
@@ -563,7 +465,6 @@
     <integer translatable="false" name="config_wifiBssidBlocklistMonitorDhcpFailureThreshold"> 2 </integer>
     <integer translatable="false" name="config_wifiBssidBlocklistMonitorAbnormalDisconnectThreshold"> 3 </integer>
     <integer translatable="false" name="config_wifiBssidBlocklistMonitorNonlocalDisconnectConnectingThreshold"> 2 </integer>
-    <integer translatable="false" name="config_wifiBssidBlocklistMonitorNoResponseThreshold"> 1 </integer>
 
     <!-- Base duration to block a BSSID after consecutive failures happen. (default = 5 mins)
     The blocklist duration is increased exponentially for a BSSID that consecutively gets added to the blocklist.
@@ -704,17 +605,9 @@
     <!-- Enable concurrent restricted connectivity + internet connectivity
          Note: this is conditional on the device supporting dual concurrent STAs. -->
     <bool translatable="false" name="config_wifiMultiStaRestrictedConcurrencyEnabled">false</bool>
-    <!-- Enable concurrent internet connectivity + internet connectivity
-         Note: this is conditional on the device supporting dual concurrent STAs. -->
-    <bool translatable="false" name="config_wifiMultiStaMultiInternetConcurrencyEnabled">false</bool>
     <!-- Enable the default coex channel avoidance algorithm and disable the functionality of
          WifiManager#setCoexUnsafeChannels. -->
     <bool translatable="false" name="config_wifiDefaultCoexAlgorithmEnabled">false</bool>
-    <!-- If the default coex channel avoidance algorithm is enabled, then avoid channels that
-         conflict with GPS L1. -->
-    <bool translatable="false" name="config_wifiCoexForGpsL1">false</bool>
-    <!-- The distance in KHz between Wi-Fi-based interference and GPS L1 that is considered unsafe. -->
-    <integer translatable="false" name="config_wifiCoexGpsL1ThresholdKhz">10000</integer>
     <!-- Filepath of the xml table of parameters used by Wifi coex channel avoidance. -->
     <string translatable="false" name="config_wifiCoexTableFilepath">/vendor/etc/wifi/coex_table.xml</string>
     <!-- A value to indicate how many failures are needed to temporarily or permanently
@@ -733,16 +626,6 @@
      -->
     <bool translatable="false" name="config_wifiAllowMultipleNetworksOnSameAwareNdi">false</bool>
 
-    <!-- A boolean indicate if device supports ser channel on the Aware data-path setup. If the
-    value is false, channel setting on the data-path request will be ignored.
-    -->
-    <bool translatable="false" name="config_wifiSupportChannelOnDataPath">false</bool>
-
-    <!-- A value indicate the duration of Wi-Fi Aware Instant Communication Mode for a single
-    session. When duration is finished, framework will disable the Instant Communication Mode.
-    -->
-    <integer translatable="false" name="config_wifiAwareInstantCommunicationModeDurationMillis">30000</integer>
-
     <!-- Integer threshold for minimum packets required to notify clients of data activity -->
     <integer translatable="false" name="config_wifiTrafficPollerTxPacketThreshold">0</integer>
     <integer translatable="false" name="config_wifiTrafficPollerRxPacketThreshold">0</integer>
@@ -791,107 +674,4 @@
 
     <!-- Indicate max number of log records for WifiClientModeImpl -->
     <integer translatable="false" name="config_wifiClientModeImplNumLogRecs">100</integer>
-
-    <!-- Indicates whether or not the WLAN driver supports the NL80211_CMD_REG_CHANGE or
-         NL80211_CMD_WIPHY_REG_CHANGE events which indicate the current country code which is
-         being used by the WLAN driver. If the driver doesn't support these events
-         (configuration is `false`) then the driver must handle the setCountryCode request from
-         HAL as a blocking call. In such a case the country code will be applied
-         immediately after the country code is sent to the driver (if the method returns a
-         success). -->
-    <bool translatable="false" name="config_wifiDriverSupportedNl80211RegChangedEvent">false</bool>
-
-    <!-- Indicate whether the verbose logging is always on -->
-    <!-- 0: verbose logging controlled by user
-         1: verbose logging on by default for userdebug
-         2: verbose logging on by default for all builds -->
-    <integer translatable="false" name="config_wifiVerboseLoggingAlwaysOnLevel">0</integer>
-
-    <!-- Indicate the help page link for the Root CA certifiate installation. -->
-    <string translatable="false" name="config_wifiCertInstallationHelpLink">https://support.google.com/pixelphone/answer/2844832</string>
-
-    <!-- Indicate the number of networks to restore in a batch. 0 : all networks in a batch -->
-    <integer translatable="false" name="config_wifiConfigurationRestoreNetworksBatchNum">50</integer>
-
-    <!-- OEM privileged WiFi admin package names. Empty by default-->
-    <string-array translatable="false" name="config_oemPrivilegedWifiAdminPackages">
-        <!-- Add package names here, example: -->
-        <!-- <item>com.something.manager</item> -->
-    </string-array>
-
-    <!-- Wifi driver supports Opportunistic Wireless Encryption (OWE) Transition
-         aka Enhanced Open for Soft-AP -->
-    <bool translatable="false" name="config_wifiSoftapOweTransitionSupported">false</bool>
-
-    <!-- Wifi driver supports Opportunistic Wireless Encryption (OWE)
-         aka Enhanced Open for Soft-AP -->
-    <bool translatable="false" name="config_wifiSoftapOweSupported">false</bool>
-
-    <!-- Indicate the gravity of Wifi dialogs. Must be an integer corresponding to a
-         android.view.Gravity.GravityFlags constant. Default = Gravity.NO_GRAVITY (0) -->
-    <integer translatable="false" name="config_wifiDialogGravity">0</integer>
-    <!-- Whether to show a confirmation dialog to the user if a third party app targeting below SDK
-         level Q tries to enable Wi-Fi -->
-    <bool translatable="false" name="config_showConfirmationDialogForThirdPartyAppsEnablingWifi">false</bool>
-    <!-- Indicate the time in milliseconds to wait before auto-cancelling a P2P invitation received
-         dialog that the user has not responded to. A value of 0 indicates no timeout. -->
-    <integer translatable="false" name="config_p2pInvitationReceivedDialogTimeoutMs">0</integer>
-    <!-- Indicates whether or not to play a notification sound upon displaying a P2P invitation
-         received dialog that the user has not responded to. If the device is in vibrate mode, then
-         the device will vibrate instead of playing a sound. -->
-    <bool translatable="false" name="config_p2pInvitationReceivedDialogNotificationSound">false</bool>
-
-    <!-- Indicates whether or not the Soft AP needs to be restarted when country code changed -->
-    <bool translatable="false" name="config_wifiForcedSoftApRestartWhenCountryCodeChanged">true</bool>
-
-    <!-- list of package names that HalDeviceManager (interface priority decision maker) will
-         treat as foreground, even if they are in the background. -->
-    <string-array translatable="false" name="config_wifiInterfacePriorityTreatAsForegroundList">
-        <!-- Below is a sample configuration for this list:
-        <item>com.company1.example.test.name1</item>
-        <item>com.company2.example.test.name2</item>
-        -->
-    </string-array>
-
-    <!-- Indicates whether or not user approval is required for device-to-device interface priority
-         decisions (note: packages included in
-         `config_excludedFromUserApprovalForD2dInterfacePriority` are excluded). -->
-    <bool translatable="false" name="config_wifiUserApprovalRequiredForD2dInterfacePriority">false</bool>
-    <!-- list of package names that are excluded from the user approval flag
-         `config_wifiUserApprovalRequiredForD2dInterfacePriority`. I.e. any priority conflicts from
-          requests by these packages will be handled by the default resolution of the framework. -->
-    <string-array translatable="false" name="config_wifiExcludedFromUserApprovalForD2dInterfacePriority">
-        <!-- Below is a sample configuration for this list:
-        <item>com.company1.example.test.name1</item>
-        <item>com.company2.example.test.name2</item>
-        -->
-    </string-array>
-
-    <!-- boolean indicating whether the Easy Connect (DPP) AKM is supported -->
-    <bool translatable="false" name ="config_wifiDppAkmSupported">false</bool>
-    <!-- Indicates the number of octets to mask for each BSSID in the SecurityLog output.
-         The first N octets will each be replaced with 'xx' in the formatted BSSID string. -->
-    <integer translatable="false" name="config_wifiNumMaskedBssidOctetsInSecurityLog">4</integer>
-    <!-- Indicates whether or not the network-centric QoS policy feature is enabled. -->
-    <bool translatable="false" name="config_wifiNetworkCentricQosPolicyFeatureEnabled">false</bool>
-
-    <!-- The world mode country code value definition in the wifi driver -->
-    <string translatable="false" name="config_wifiDriverWorldModeCountryCode">00</string>
-
-    <!-- Indicates whether or not the AP WAN Link Status ANQP element is used to filter candidate
-         networks. Note that even if enabled (overlay = true) that invalid elements (all zeros
-         are still ignored).
-         If disabled (overlay = false) then the
-         `config_wifiPasspointUseApWanLinkStatusAnqpElementFqdnAllowList`
-         specifies a list of FQDNs for which the element will still be considered. -->
-    <bool translatable="false" name="config_wifiPasspointUseApWanLinkStatusAnqpElement">true</bool>
-    <!-- list of FQDNs for which to use the AP WAN Link Status ANQP element. Overrides any
-         configuration specified in `config_wifiPasspointUseApWanLinkStatusAnqpElement`. -->
-    <string-array translatable="false" name="config_wifiPasspointUseApWanLinkStatusAnqpElementFqdnAllowlist">
-        <!-- Below is a sample configuration for this list:
-        <item>XYZ</item>
-        <item>ABC</item>
-        -->
-    </string-array>
-
 </resources>
diff --git a/service/ServiceWifiResources/res/values/overlayable.xml b/service/ServiceWifiResources/res/values/overlayable.xml
index 72149f5..1e716a4 100644
--- a/service/ServiceWifiResources/res/values/overlayable.xml
+++ b/service/ServiceWifiResources/res/values/overlayable.xml
@@ -25,7 +25,6 @@
           <item type="bool" name="config_wifi6ghzSupport" />
           <item type="bool" name="config_wifi60ghzSupport" />
           <item type="bool" name="config_wifi11axSupportOverride" />
-          <item type="bool" name="config_wifi11beSupportOverride" />
           <item type="bool" name="config_wifiFrameworkMaxNumSpatialStreamDeviceOverrideEnable" />
           <item type="integer" name="config_wifiFrameworkMaxNumSpatialStreamDeviceOverrideValue" />
           <item type="bool" name="config_wifi_fast_bss_transition_enabled" />
@@ -38,17 +37,12 @@
           <item type="bool" name="config_wifi_turn_off_during_emergency_call" />
           <item type="integer" name="config_wifiFrameworkThroughputBonusNumerator" />
           <item type="integer" name="config_wifiFrameworkThroughputBonusDenominator" />
-          <item type="integer" name="config_wifiFrameworkThroughputBonusNumeratorAfter800Mbps" />
-          <item type="integer" name="config_wifiFrameworkThroughputBonusDenominatorAfter800Mbps" />
-          <item type="bool" name="config_wifiEnable6GhzBeaconRssiBoost" />
           <item type="integer" name="config_wifiFrameworkThroughputBonusLimit" />
           <item type="integer" name="config_wifiFrameworkSavedNetworkBonus" />
           <item type="integer" name="config_wifiFrameworkUnmeteredNetworkBonus" />
           <item type="integer" name="config_wifiFrameworkCurrentNetworkBonusMin" />
           <item type="integer" name="config_wifiFrameworkCurrentNetworkBonusPercent" />
           <item type="integer" name="config_wifiFrameworkSecureNetworkBonus" />
-          <item type="integer" name="config_wifiBand6GhzBonus" />
-          <item type="integer" name="config_wifiScoringBucketStepSize" />
           <item type="integer" name="config_wifiFrameworkLastSelectionMinutes" />
           <item type="integer" name="config_wifiFrameworkMinPacketPerSecondActiveTraffic" />
           <item type="integer" name="config_wifiFrameworkMinPacketPerSecondHighTraffic" />
@@ -66,14 +60,12 @@
           <item type="integer" name="config_wifiFrameworkScoreGoodRssiThreshold6ghz" />
           <item type="integer" name="config_wifiFrameworkSoftApShutDownTimeoutMilliseconds" />
           <item type="integer" name="config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond" />
-          <item type="bool" name="config_wifiFrameworkSoftApDisableBridgedModeShutdownIdleInstanceWhenCharging" />
           <item type="bool" name="config_wifiSoftApDynamicCountryCodeUpdateSupported" />
           <item type="bool" name="config_wifiSoftapResetChannelConfig" />
           <item type="bool" name="config_wifiSoftapResetHiddenConfig" />
           <item type="bool" name="config_wifiSoftapResetUserControlConfig" />
           <item type="bool" name="config_wifiSoftapResetAutoShutdownTimerConfig" />
           <item type="bool" name="config_wifiSoftapResetMaxClientSettingConfig" />
-          <item type="bool" name="config_wifiSoftapAutoUpgradeToBridgedConfigWhenSupported" />
           <item type="string"  name="config_wifiSoftap2gChannelList" />
           <item type="string"  name="config_wifiSoftap5gChannelList" />
           <item type="string"  name="config_wifiSoftap6gChannelList" />
@@ -101,28 +93,24 @@
           <item type="bool" name="config_wifiSoftapMacAddressCustomizationSupported" />
           <item type="bool" name="config_wifi_softap_ieee80211ac_supported" />
           <item type="bool" name="config_wifiSoftapIeee80211axSupported" />
-          <item type="bool" name="config_wifiSoftapIeee80211beSupported" />
           <item type="bool" name="config_wifiSoftap24ghzSupported" />
           <item type="bool" name="config_wifiSoftap5ghzSupported" />
           <item type="bool" name="config_wifiSoftap6ghzSupported" />
           <item type="bool" name="config_wifiSoftap60ghzSupported" />
-          <item type="bool" name="config_wifiSoftapAutoAppendLowerBandsToBandConfigurationEnabled" />
           <item type="bool" name="config_wifiSoftapHeSuBeamformerSupported" />
           <item type="bool" name="config_wifiSoftapHeSuBeamformeeSupported" />
           <item type="bool" name="config_wifiSoftapHeMuBeamformerSupported" />
           <item type="bool" name="config_wifiSoftapHeTwtSupported" />
           <item type="bool" name="config_wifiLocalOnlyHotspot6ghz" />
           <item type="bool" name="config_wifi_local_only_hotspot_5ghz" />
-          <item type="bool" name="config_wifiSaveFactoryMacToWifiConfigStore" />
           <item type="bool" name="config_wifi_connected_mac_randomization_supported" />
-          <item type="bool" name="config_wifiAllowNonPersistentMacRandomizationOnOpenSsids" />
+          <item type="bool" name="config_wifiAllowEnhancedMacRandomizationOnOpenSsids" />
           <item type="bool" name="config_wifi_p2p_mac_randomization_supported" />
           <item type="bool" name="config_wifi_ap_mac_randomization_supported" />
           <item type="bool" name="config_wifiBridgedSoftApSupported" />
           <item type="bool" name="config_wifiStaWithBridgedSoftApConcurrencySupported" />
-          <item type="array" name="config_wifiForceDisableMacRandomizationSsidList" />
-          <item type="array" name="config_wifi_non_persistent_randomization_ssid_allowlist" />
-          <item type="array" name="config_wifi_non_persistent_randomization_ssid_blocklist" />
+          <item type="array" name="config_wifi_aggressive_randomization_ssid_allowlist" />
+          <item type="array" name="config_wifi_aggressive_randomization_ssid_blocklist" />
           <item type="integer" name="config_wifiRecentFailureReasonExpirationMinutes" />
           <item type="integer" name="config_wifiAllNonCarrierMergedWifiMinDisableDurationMinutes" />
           <item type="integer" name="config_wifiAllNonCarrierMergedWifiMaxDisableDurationMinutes" />
@@ -138,9 +126,6 @@
           <item type="array" name="config_wifiDisconnectedScanIntervalScheduleSec" />
           <item type="array" name="config_wifiConnectedScanIntervalScheduleSec" />
           <item type="array" name="config_wifiSingleSavedNetworkConnectedScanIntervalScheduleSec" />
-          <item type="array" name="config_wifiDisconnectedScanType" />
-          <item type="array" name="config_wifiConnectedScanType" />
-          <item type="array" name="config_wifiSingleSavedNetworkConnectedScanType" />
           <item type="integer" name="config_wifiPnoScanLowRssiNetworkRetryStartDelaySec" />
           <item type="integer" name="config_wifiPnoScanLowRssiNetworkRetryMaxDelaySec" />
           <item type="integer" name="config_wifiConnectedHighRssiScanMinimumWindowSizeSec" />
@@ -162,7 +147,6 @@
           <item type="integer" name="config_wifiBssidBlocklistMonitorConnectedScoreBaseBlockDurationMs" />
           <item type="integer" name="config_wifiBssidBlocklistMonitorFailureStreakCap" />
           <item type="integer" name="config_wifiBssidBlocklistAbnormalDisconnectTimeWindowMs" />
-          <item type="integer" name="config_wifiBssidBlocklistMonitorNoResponseThreshold" />
           <item type="bool" name="config_wifiScanHiddenNetworksScanOnlyMode" />
           <item type="integer" name="config_wifiHardwareSoftapMaxClientCount" />
           <item type="bool" name="config_wifiIsUnusableEventMetricsEnabled" />
@@ -198,16 +182,11 @@
           <item type="bool" name="config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled" />
           <item type="bool" name="config_wifiMultiStaLocalOnlyConcurrencyEnabled" />
           <item type="bool" name="config_wifiMultiStaRestrictedConcurrencyEnabled" />
-          <item type="bool" name="config_wifiMultiStaMultiInternetConcurrencyEnabled" />
           <item type="bool" name="config_wifiDefaultCoexAlgorithmEnabled"/>
-          <item type="bool" name="config_wifiCoexForGpsL1"/>
-          <item type="integer" name="config_wifiCoexGpsL1ThresholdKhz"/>
           <item type="string" name="config_wifiCoexTableFilepath"/>
           <item type="integer" name="config_wifiDisableReasonAuthenticationFailureCarrierSpecificThreshold" />
           <item type="integer" name="config_wifiDisableReasonAuthenticationFailureCarrierSpecificDurationMs" />
           <item type="bool" name="config_wifiAllowMultipleNetworksOnSameAwareNdi"/>
-          <item type="integer" name="config_wifiAwareInstantCommunicationModeDurationMillis" />
-          <item type="bool" name="config_wifiSupportChannelOnDataPath"/>
           <item type="integer" name="config_wifiTrafficPollerTxPacketThreshold"/>
           <item type="integer" name="config_wifiTrafficPollerRxPacketThreshold"/>
           <item type="integer" name="config_wifiLinkBandwidthUpdateThresholdPercent" />
@@ -223,26 +202,6 @@
           <item type="integer" name="config_wifiConnectivityLocalLogMaxLinesLowRam" />
           <item type="integer" name="config_wifiConnectivityLocalLogMaxLinesHighRam" />
           <item type="integer" name="config_wifiClientModeImplNumLogRecs" />
-          <item type="bool" name="config_wifiDriverSupportedNl80211RegChangedEvent" />
-          <item type="integer" name="config_wifiVerboseLoggingAlwaysOnLevel" />
-          <item type="string" name="config_wifiCertInstallationHelpLink" />
-          <item type="integer" name="config_wifiConfigurationRestoreNetworksBatchNum" />
-          <item type="array" name="config_oemPrivilegedWifiAdminPackages" />
-          <item type="bool" name="config_wifiSoftapOweSupported" />
-          <item type="bool" name="config_wifiSoftapOweTransitionSupported" />
-          <item type="integer" name="config_wifiDialogGravity" />
-          <item type="bool" name="config_showConfirmationDialogForThirdPartyAppsEnablingWifi" />
-          <item type="integer" name="config_p2pInvitationReceivedDialogTimeoutMs"/>
-          <item type="bool" name="config_p2pInvitationReceivedDialogNotificationSound"/>
-          <item type="bool" name="config_wifiForcedSoftApRestartWhenCountryCodeChanged" />
-          <item type="bool" name="config_wifiDppAkmSupported" />
-          <item type="array" name="config_wifiInterfacePriorityTreatAsForegroundList"/>
-          <item type="bool" name="config_wifiUserApprovalRequiredForD2dInterfacePriority" />
-          <item type="array" name="config_wifiExcludedFromUserApprovalForD2dInterfacePriority" />
-          <item type="bool" name="config_wifiNetworkCentricQosPolicyFeatureEnabled" />
-          <item type="string" name="config_wifiDriverWorldModeCountryCode" />
-          <item type="bool" name="config_wifiPasspointUseApWanLinkStatusAnqpElement" />
-          <item type="array" name="config_wifiPasspointUseApWanLinkStatusAnqpElementFqdnAllowlist" />
           <!-- Params from config.xml that can be overlayed -->
 
           <!-- Params from strings.xml that can be overlayed -->
@@ -304,25 +263,10 @@
           <item type="string" name="wifi_eap_error_message_code_32764" />
           <item type="string" name="wifi_eap_error_message_code_32765" />
           <item type="string" name="wifi_eap_error_message_code_32766" />
-          <item type="string" name="wifi_eap_error_message_code_32767" />
-          <item type="string" name="wifi_eap_error_message_code_32768" />
-          <item type="string" name="wifi_eap_error_message_code_32769" />
-          <item type="string" name="wifi_eap_error_message_code_16384" />
-          <item type="string" name="wifi_eap_error_message_code_16385" />
-          <item type="string" name="wifi_eap_error_message_unknown_error_code" />
           <item type="string" name="wifi_softap_auto_shutdown_timeout_expired_title" />
           <item type="string" name="wifi_softap_auto_shutdown_timeout_expired_summary" />
           <item type="string" name="wifi_sim_required_title" />
           <item type="string" name="wifi_sim_required_message" />
-          <item type="string" name="wifi_enable_request_dialog_title" />
-          <item type="string" name="wifi_enable_request_dialog_message" />
-          <item type="string" name="wifi_enable_request_dialog_positive_button" />
-          <item type="string" name="wifi_enable_request_dialog_negative_button" />
-          <item type="string" name="wifi_interface_priority_title" />
-          <item type="string" name="wifi_interface_priority_message" />
-          <item type="string" name="wifi_interface_priority_message_plural" />
-          <item type="string" name="wifi_interface_priority_approve" />
-          <item type="string" name="wifi_interface_priority_reject" />
           <!-- Params from strings.xml that can be overlayed -->
 
           <!-- Params from styles.xml that can be overlayed -->
@@ -330,11 +274,6 @@
           <item type="style" name="wifi_item_label" />
           <item type="style" name="wifi_item_content" />
           <item type="style" name="wifi_section" />
-          <item type="style" name="wifi_p2p_invitation_received_dialog" />
-          <item type="style" name="wifi_p2p_dialog_row_label" />
-          <item type="style" name="wifi_p2p_dialog_row_content" />
-          <item type="style" name="wifi_p2p_dialog_enter_pin_message" />
-          <item type="style" name="wifi_p2p_dialog_pin_input" />
           <!-- Params from styles.xml that can be overlayed -->
 
           <!-- Params from drawable/ that can be overlayed -->
diff --git a/service/ServiceWifiResources/res/values/strings.xml b/service/ServiceWifiResources/res/values/strings.xml
index 15ffcf0..ae3f197 100644
--- a/service/ServiceWifiResources/res/values/strings.xml
+++ b/service/ServiceWifiResources/res/values/strings.xml
@@ -121,56 +121,14 @@
     <string name="wifi_disable_mac_randomization_dialog_network_not_found">Network not found</string>
     <!-- End of string constants used to inform the user that the current network may be failing to connect due to not supporting randomized MAC-->
 
-    <!-- A notification is shown when eap failure happens. It should be overridden by carrier-specific overlays. An empty string will result in no notification shown.-->
-    <!-- Note: the :::integer::: is a carrier identifier - it is not to be translated! -->
-    <string name="wifi_eap_error_message_code_32756"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 32756</string>
-    <string-array name="wifi_eap_error_message_code_32756_carrier_overrides">
-        <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g></item>
-    </string-array>
+    <!-- A notification is shown when eap failure happens. It should be overridden by carrier-specific overlays. -->
     <string name="wifi_eap_error_message_code_32760"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 32760</string>
-    <string-array name="wifi_eap_error_message_code_32760_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : You can\u2019t connect to Verizon Wi-Fi Access from outside the Verizon coverage area. (Error = 32760)</item>
-    </string-array>
     <string name="wifi_eap_error_message_code_32761"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 32761</string>
-    <string-array name="wifi_eap_error_message_code_32761_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : You are not subscribed to Verizon Wi-Fi Access. Please call us at 800-922-0204. (Error = 32761)</item>
-    </string-array>
     <string name="wifi_eap_error_message_code_32762"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 32762</string>
-    <string-array name="wifi_eap_error_message_code_32762_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204. (Error = 32762)</item>
-    </string-array>
     <string name="wifi_eap_error_message_code_32763"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 32763</string>
-    <string-array name="wifi_eap_error_message_code_32763_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : You are already connected to Verizon Wi-Fi Access. (Error = 32763)</item>
-    </string-array>
     <string name="wifi_eap_error_message_code_32764"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 32764</string>
-    <string-array name="wifi_eap_error_message_code_32764_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi Access. Please call us at 800-922-0204. (Error = 32764)</item>
-    </string-array>
     <string name="wifi_eap_error_message_code_32765"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 32765</string>
-    <string-array name="wifi_eap_error_message_code_32765_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : There is a problem with your Verizon Wi-Fi Access account. Please call us at 800-922-0204. (Error = 32765)</item>
-    </string-array>
     <string name="wifi_eap_error_message_code_32766"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 32766</string>
-    <string-array name="wifi_eap_error_message_code_32766_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : Verizon Wi-Fi Access is not available from your location. Try again later or try from a different location. (Error = 32766)</item>
-    </string-array>
-    <string name="wifi_eap_error_message_code_32767"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 32767</string>
-    <string-array name="wifi_eap_error_message_code_32767_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi Access. Try again later or try from a different location.</item>
-    </string-array>
-    <string name="wifi_eap_error_message_code_16384"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 16384</string>
-    <string-array name="wifi_eap_error_message_code_16384_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi Access due to error 16384.</item>
-    </string-array>
-    <string name="wifi_eap_error_message_code_16385"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error 16385</string>
-    <string-array name="wifi_eap_error_message_code_16385_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi Access due to error 16385.</item>
-    </string-array>
-    <string name="wifi_eap_error_message_unknown_error_code"><xliff:g id="ssid">%1$s</xliff:g> : EAP authentication error, unknown error code</string>
-    <string-array name="wifi_eap_error_message_unknown_error_code_carrier_overrides">
-      <item><xliff:g id="carrier_id_prefix">:::1839:::</xliff:g><xliff:g id="ssid">%1$s</xliff:g> : There is a problem connecting you to Verizon Wi-Fi Access.</item>
-    </string-array>
 
 
     <!-- A notification is shown when softap auto shutdown timeout expired. It should be overridden by carrier-specific overlays. -->
@@ -180,46 +138,4 @@
     <!-- A notification is shown when eap-sim/aka/aka' wifi network is disconnected due to sim removal -->
     <string name="wifi_sim_required_title">Wi\u2011Fi disconnected</string>
     <string name="wifi_sim_required_message">To connect to <xliff:g id="ssid">%1$s</xliff:g>, insert a <xliff:g id="carrier_name">%2$s</xliff:g> SIM</string>
-
-    <!-- External approver for interface priority calls. -->
-    <string name="wifi_interface_priority_title"><xliff:g id="app">%1$s</xliff:g> wants to use a networking resource</string>
-    <!-- Note: additional available arguments for customized message (not used in default string):
-          %1$s: application name
-          %2$s: interface name
-     -->
-    <string name="wifi_interface_priority_message">This may cause problems for <xliff:g id="apps">%3$s</xliff:g>.</string>
-    <string name="wifi_interface_priority_message_plural">This may cause problems for these apps: <xliff:g id="apps">%3$s</xliff:g>.</string>
-    <string name="wifi_interface_priority_approve">Allow</string>
-    <string name="wifi_interface_priority_reject">Don\'t allow</string>
-
-    <!-- Trust On First Use dialog and notification text. -->
-    <string name="wifi_ca_cert_dialog_title">Is this network trusted?</string>
-    <string name="wifi_ca_cert_dialog_continue_text">Yes, connect</string>
-    <string name="wifi_ca_cert_dialog_abort_text">No, don\'t connect</string>
-    <string name="wifi_ca_cert_dialog_message_hint">Only allow this network to connect if the information below looks correct.\n\n</string>
-    <string name="wifi_ca_cert_dialog_message_server_name_text">Server Name:\n<xliff:g id="value">%1$s</xliff:g>\n\n</string>
-    <string name="wifi_ca_cert_dialog_message_issuer_name_text">Issuer Name:\n<xliff:g id="value">%1$s</xliff:g>\n\n</string>
-    <string name="wifi_ca_cert_dialog_message_organization_text">Organization:\n<xliff:g id="value">%1$s</xliff:g>\n\n</string>
-    <string name="wifi_ca_cert_dialog_message_contact_text">Contact:\n<xliff:g id="value">%1$s</xliff:g>\n\n</string>
-    <string name="wifi_ca_cert_dialog_message_signature_name_text">Signature:\n<xliff:g id="value">%1$s</xliff:g>\n\n</string>
-    <string name="wifi_ca_cert_notification_title">Network needs to be verified</string>
-    <string name="wifi_ca_cert_notification_message">Review network details for <xliff:g id="ssid">%1$s</xliff:g> before connecting. Tap to continue.</string>
-    <string name="wifi_ca_cert_failed_to_install_ca_cert">Certificate installation failed.</string>
-
-    <!-- Legacy EAP network dialog and notification text on Pre-T devices. -->
-    <string name="wifi_ca_cert_dialog_preT_title">Can\'t verify this network</string>
-    <string name="wifi_ca_cert_dialog_preT_continue_text">Connect anyway</string>
-    <string name="wifi_ca_cert_dialog_preT_abort_text">Don\'t connect</string>
-    <string name="wifi_ca_cert_dialog_preT_message_hint">The network <xliff:g id="ssid">%1$s</xliff:g> is missing a certificate.</string>
-    <string name="wifi_ca_cert_dialog_preT_message_link">Learn how to add certificates</string>
-    <string name="wifi_ca_cert_notification_preT_title">Can\'t verify this network</string>
-    <string name="wifi_ca_cert_notification_preT_message">The network <xliff:g id="ssid">%1$s</xliff:g> is missing a certificate. Tap to learn how to add certificates.</string>
-    <string name="wifi_ca_cert_notification_preT_continue_text">Connect anyway</string>
-    <string name="wifi_ca_cert_notification_preT_abort_text">Don\'t connect</string>
-
-    <!-- User-confirmation dialog for pre-Q apps enabling Wi-Fi. -->
-    <string name="wifi_enable_request_dialog_title">Allow <xliff:g id="app_name" example="App123">%1$s</xliff:g> to turn on Wi\u2011Fi?</string>
-    <string name="wifi_enable_request_dialog_message">You can turn off Wi\u2011Fi in Quick Settings</string>
-    <string name="wifi_enable_request_dialog_positive_button">Allow</string>
-    <string name="wifi_enable_request_dialog_negative_button">Don\u0027t allow</string>
 </resources>
diff --git a/service/ServiceWifiResources/res/values/styles.xml b/service/ServiceWifiResources/res/values/styles.xml
index 872616d..1de17d6 100644
--- a/service/ServiceWifiResources/res/values/styles.xml
+++ b/service/ServiceWifiResources/res/values/styles.xml
@@ -16,7 +16,7 @@
 <resources>
     <!-- Wifi dialog styles -->
     <style name="wifi_item">
-        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_width">200dip</item>
         <item name="android:layout_height">wrap_content</item>
         <item name="android:layout_marginTop">8dip</item>
         <item name="android:layout_marginStart">16dip</item>
@@ -42,21 +42,4 @@
         <item name="android:layout_height">wrap_content</item>
         <item name="android:orientation">vertical</item>
     </style>
-
-    <style name="wifi_p2p_invitation_received_dialog" />
-
-    <style name="wifi_p2p_dialog_row_label" parent="@style/wifi_item_label" />
-
-    <style name="wifi_p2p_dialog_row_content" parent="@style/wifi_item_content">
-        <item name="android:textStyle">bold</item>
-        <item name="android:textAlignment">viewStart</item>
-    </style>
-
-    <style name="wifi_p2p_dialog_enter_pin_message" parent="@style/wifi_item_label" />
-
-    <style name="wifi_p2p_dialog_pin_input" parent="@style/wifi_item_content">
-        <item name="android:singleLine">true</item>
-        <item name="android:maxLength">8</item>
-        <item name="android:inputType">number</item>
-    </style>
 </resources>
diff --git a/service/java/com/android/server/wifi/ActiveModeWarden.java b/service/java/com/android/server/wifi/ActiveModeWarden.java
index 2e8fb31..79ebee6 100644
--- a/service/java/com/android/server/wifi/ActiveModeWarden.java
+++ b/service/java/com/android/server/wifi/ActiveModeWarden.java
@@ -18,11 +18,6 @@
 
 import static android.net.wifi.WifiManager.IFACE_IP_MODE_LOCAL_ONLY;
 import static android.net.wifi.WifiManager.IFACE_IP_MODE_TETHERED;
-import static android.net.wifi.WifiManager.WIFI_STATE_DISABLED;
-import static android.net.wifi.WifiManager.WIFI_STATE_DISABLING;
-import static android.net.wifi.WifiManager.WIFI_STATE_ENABLED;
-import static android.net.wifi.WifiManager.WIFI_STATE_ENABLING;
-import static android.net.wifi.WifiManager.WIFI_STATE_UNKNOWN;
 
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_LOCAL_ONLY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_PRIMARY;
@@ -53,8 +48,6 @@
 import android.os.Process;
 import android.os.RemoteCallbackList;
 import android.os.RemoteException;
-import android.os.UserHandle;
-import android.os.UserManager;
 import android.os.WorkSource;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
@@ -68,7 +61,6 @@
 import com.android.internal.util.Protocol;
 import com.android.internal.util.State;
 import com.android.internal.util.StateMachine;
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.ActiveModeManager.ClientConnectivityRole;
 import com.android.server.wifi.ActiveModeManager.ClientInternetConnectivityRole;
 import com.android.server.wifi.ActiveModeManager.ClientRole;
@@ -86,7 +78,6 @@
 import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.Executor;
-import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
@@ -123,7 +114,6 @@
     private final WifiMetrics mWifiMetrics;
     private final ExternalScoreUpdateObserverProxy mExternalScoreUpdateObserverProxy;
     private final DppManager mDppManager;
-    private final UserManager mUserManager;
 
     private WifiServiceImpl.SoftApCallbackInternal mSoftApCallback;
     private WifiServiceImpl.SoftApCallbackInternal mLohsCallback;
@@ -145,65 +135,6 @@
     private WorkSource mLastScanOnlyClientModeManagerRequestorWs = null;
 
     /**
-     * One of  {@link WifiManager#WIFI_STATE_DISABLED},
-     * {@link WifiManager#WIFI_STATE_DISABLING},
-     * {@link WifiManager#WIFI_STATE_ENABLED},
-     * {@link WifiManager#WIFI_STATE_ENABLING},
-     * {@link WifiManager#WIFI_STATE_UNKNOWN}
-     */
-    private final AtomicInteger mWifiState = new AtomicInteger(WIFI_STATE_DISABLED);
-
-    /**
-     * Method that allows the active ClientModeManager to set the wifi state that is
-     * retrieved by API calls. Only primary ClientModeManager should call this method when state
-     * changes
-     * @param newState new state to set, invalid states are ignored.
-     */
-    public void setWifiStateForApiCalls(int newState) {
-        switch (newState) {
-            case WIFI_STATE_DISABLING:
-            case WIFI_STATE_DISABLED:
-            case WIFI_STATE_ENABLING:
-            case WIFI_STATE_ENABLED:
-            case WIFI_STATE_UNKNOWN:
-                if (mVerboseLoggingEnabled) {
-                    Log.d(TAG, "setting wifi state to: " + newState);
-                }
-                mWifiState.set(newState);
-                break;
-            default:
-                Log.d(TAG, "attempted to set an invalid state: " + newState);
-                break;
-        }
-    }
-
-    private String getWifiStateName() {
-        switch (mWifiState.get()) {
-            case WIFI_STATE_DISABLING:
-                return "disabling";
-            case WIFI_STATE_DISABLED:
-                return "disabled";
-            case WIFI_STATE_ENABLING:
-                return "enabling";
-            case WIFI_STATE_ENABLED:
-                return "enabled";
-            case WIFI_STATE_UNKNOWN:
-                return "unknown state";
-            default:
-                return "[invalid state]";
-        }
-    }
-
-    /**
-     * Method used by WifiServiceImpl to get the current state of Wifi for API calls.
-     * The Wifi state is a global state of the device, which equals to the state of the primary STA.
-     * This method must be thread safe.
-     */
-    public int getWifiState() {
-        return mWifiState.get();
-    }
-
-    /**
      * Called from WifiServiceImpl to register a callback for notifications from SoftApManager
      */
     public void registerSoftApCallback(@NonNull WifiServiceImpl.SoftApCallbackInternal callback) {
@@ -343,7 +274,6 @@
         mExternalScoreUpdateObserverProxy = externalScoreUpdateObserverProxy;
         mDppManager = dppManager;
         mGraveyard = new Graveyard();
-        mUserManager = mWifiInjector.getUserManager();
 
         wifiNative.registerStatusListener(isReady -> {
             if (!isReady && !mIsShuttingdown) {
@@ -494,13 +424,8 @@
      * @return Returns whether we can create more client mode managers or not.
      */
     public boolean canRequestMoreClientModeManagersInRole(@NonNull WorkSource requestorWs,
-            @NonNull ClientRole clientRole, boolean didUserApprove) {
-        WorkSource ifCreatorWs = new WorkSource(requestorWs);
-        if (didUserApprove) {
-            // If user select to connect from the UI, promote the priority
-            ifCreatorWs.add(mFacade.getSettingsWorkSource(mContext));
-        }
-        if (!mWifiNative.isItPossibleToCreateStaIface(ifCreatorWs)) {
+            @NonNull ClientRole clientRole) {
+        if (!mWifiNative.isItPossibleToCreateStaIface(requestorWs)) {
             return false;
         }
         if (clientRole == ROLE_CLIENT_LOCAL_ONLY) {
@@ -522,9 +447,7 @@
         }
         if (clientRole == ROLE_CLIENT_SECONDARY_LONG_LIVED) {
             return mContext.getResources().getBoolean(
-                    R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled)
-                    || mContext.getResources().getBoolean(
-                    R.bool.config_wifiMultiStaMultiInternetConcurrencyEnabled);
+                    R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled);
         }
         Log.e(TAG, "Unrecognized role=" + clientRole);
         return false;
@@ -575,16 +498,6 @@
                         R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled);
     }
 
-    /**
-     * @return Returns whether the device can support at least two concurrent client mode managers
-     * and the multi internet use-case is enabled.
-     */
-    public boolean isStaStaConcurrencySupportedForMultiInternet() {
-        return mWifiNative.isStaStaConcurrencySupported()
-                && mContext.getResources().getBoolean(
-                        R.bool.config_wifiMultiStaMultiInternetConcurrencyEnabled);
-    }
-
     /** Begin listening to broadcasts and start the internal state machine. */
     public void start() {
         mContext.registerReceiver(new BroadcastReceiver() {
@@ -598,13 +511,7 @@
         mContext.registerReceiver(new BroadcastReceiver() {
             @Override
             public void onReceive(Context context, Intent intent) {
-                boolean airplaneModeUpdated = mSettingsStore.updateAirplaneModeTracker();
-                boolean userRestrictionSet =
-                        SdkLevel.isAtLeastT() && mUserManager.hasUserRestrictionForUser(
-                                UserManager.DISALLOW_CHANGE_WIFI_STATE,
-                                UserHandle.getUserHandleForUid(Process.SYSTEM_UID));
-                if (!userRestrictionSet && airplaneModeUpdated) {
-                    mSettingsStore.handleAirplaneModeToggled();
+                if (mSettingsStore.handleAirplaneModeToggled()) {
                     airplaneModeToggled();
                 }
             }
@@ -643,9 +550,9 @@
      * @param reason One of {@link SelfRecovery.RecoveryReason}
      */
     public void recoveryRestartWifi(@SelfRecovery.RecoveryReason int reason,
-            boolean requestBugReport) {
+            @Nullable String reasonDetail, boolean requestBugReport) {
         mWifiController.sendMessage(WifiController.CMD_RECOVERY_RESTART_WIFI, reason,
-                requestBugReport ? 1 : 0, SelfRecovery.getRecoveryReasonAsString(reason));
+                requestBugReport ? 1 : 0, reasonDetail);
     }
 
     /**
@@ -687,8 +594,8 @@
     }
 
     /** Update SoftAp Capability. */
-    public void updateSoftApCapability(SoftApCapability capability, int ipMode) {
-        mWifiController.sendMessage(WifiController.CMD_UPDATE_AP_CAPABILITY, ipMode, 0, capability);
+    public void updateSoftApCapability(SoftApCapability capability) {
+        mWifiController.sendMessage(WifiController.CMD_UPDATE_AP_CAPABILITY, capability);
     }
 
     /** Update SoftAp Configuration. */
@@ -745,45 +652,40 @@
         @NonNull public final ClientConnectivityRole clientRole;
         @NonNull public final String ssid;
         @Nullable public final String bssid;
-        public final boolean didUserApprove;
 
         AdditionalClientModeManagerRequestInfo(
-                @NonNull ExternalClientModeManagerRequestListener listener,
+                @NonNull  ExternalClientModeManagerRequestListener listener,
                 @NonNull WorkSource requestorWs,
                 @NonNull ClientConnectivityRole clientRole,
                 @NonNull String ssid,
                 // For some use-cases, bssid is selected by firmware.
-                @Nullable String bssid,
-                boolean didUserApprove) {
+                @Nullable String bssid) {
             this.listener = listener;
             this.requestorWs = requestorWs;
             this.clientRole = clientRole;
             this.ssid = ssid;
             this.bssid = bssid;
-            this.didUserApprove = didUserApprove;
-
         }
     }
 
     /**
      * Request a local only client manager.
+     *
      * @param listener used to receive the requested ClientModeManager. Will receive:
      *                 1. null - if Wifi is toggled off
      *                 2. The primary ClientModeManager - if a new ClientModeManager cannot be
      *                    created.
      *                 3. The new ClientModeManager - if it was created successfully.
      * @param requestorWs the WorkSource for this request
-     * @param didUserApprove if user explicitly approve on this request
      */
     public void requestLocalOnlyClientModeManager(
             @NonNull ExternalClientModeManagerRequestListener listener,
-            @NonNull WorkSource requestorWs, @NonNull String ssid, @NonNull String bssid,
-            boolean didUserApprove) {
+            @NonNull WorkSource requestorWs, @NonNull String ssid, @NonNull String bssid) {
         mWifiController.sendMessage(
                 WifiController.CMD_REQUEST_ADDITIONAL_CLIENT_MODE_MANAGER,
                 new AdditionalClientModeManagerRequestInfo(
                         Objects.requireNonNull(listener), Objects.requireNonNull(requestorWs),
-                        ROLE_CLIENT_LOCAL_ONLY, ssid, bssid, didUserApprove));
+                        ROLE_CLIENT_LOCAL_ONLY, ssid, bssid));
     }
 
     /**
@@ -803,7 +705,7 @@
                 WifiController.CMD_REQUEST_ADDITIONAL_CLIENT_MODE_MANAGER,
                 new AdditionalClientModeManagerRequestInfo(
                         Objects.requireNonNull(listener), Objects.requireNonNull(requestorWs),
-                        ROLE_CLIENT_SECONDARY_LONG_LIVED, ssid, bssid, false));
+                        ROLE_CLIENT_SECONDARY_LONG_LIVED, ssid, bssid));
     }
 
     /**
@@ -825,7 +727,7 @@
                 WifiController.CMD_REQUEST_ADDITIONAL_CLIENT_MODE_MANAGER,
                 new AdditionalClientModeManagerRequestInfo(
                         Objects.requireNonNull(listener), Objects.requireNonNull(requestorWs),
-                        ROLE_CLIENT_SECONDARY_TRANSIENT, ssid, bssid, false));
+                        ROLE_CLIENT_SECONDARY_TRANSIENT, ssid, bssid));
     }
 
     /**
@@ -833,7 +735,7 @@
      */
     public boolean canRequestSecondaryTransientClientModeManager() {
         return canRequestMoreClientModeManagersInRole(INTERNAL_REQUESTOR_WS,
-                ROLE_CLIENT_SECONDARY_TRANSIENT, false);
+                ROLE_CLIENT_SECONDARY_TRANSIENT);
     }
 
     /**
@@ -1058,11 +960,9 @@
         }
     }
 
-    private void updateCapabilityToSoftApModeManager(SoftApCapability capability, int ipMode) {
+    private void updateCapabilityToSoftApModeManager(SoftApCapability capability) {
         for (SoftApManager softApManager : mSoftApManagers) {
-            if (ipMode == softApManager.getSoftApModeConfiguration().getTargetMode()) {
-                softApManager.updateCapability(capability);
-            }
+            softApManager.updateCapability(capability);
         }
     }
 
@@ -1217,11 +1117,10 @@
     }
 
     /**
-     * Method to stop client mode manager.
+     * Method to stop client mode manger.
      */
     private void stopAdditionalClientModeManager(ClientModeManager clientModeManager) {
-        if (clientModeManager instanceof DefaultClientModeManager
-                || clientModeManager.getRole() == ROLE_CLIENT_PRIMARY
+        if (clientModeManager.getRole() == ROLE_CLIENT_PRIMARY
                 || clientModeManager.getRole() == ROLE_CLIENT_SCAN_ONLY) return;
         Log.d(TAG, "Shutting down additional client mode manager: " + clientModeManager);
         clientModeManager.stop();
@@ -1245,7 +1144,6 @@
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.println("Dump of " + TAG);
         pw.println("Current wifi mode: " + getCurrentMode());
-        pw.println("Wi-Fi is " + getWifiStateName());
         pw.println("NumActiveModeManagers: " + getActiveModeManagerCount());
         mWifiController.dump(fd, pw, args);
         for (ActiveModeManager manager : getActiveModeManagers()) {
@@ -1264,9 +1162,6 @@
             pw.println("   Restricted use-case enabled: "
                     + mContext.getResources().getBoolean(
                             R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled));
-            pw.println("   Multi internet use-case enabled: "
-                    + mContext.getResources().getBoolean(
-                            R.bool.config_wifiMultiStaMultiInternetConcurrencyEnabled));
         }
         pw.println("STA + AP Concurrency Supported: " + isStaApConcurrencySupported());
         mWifiInjector.getHalDeviceManager().dump(fd, pw, args);
@@ -1524,22 +1419,6 @@
     }
 
     /**
-     * During Wifi off -> on transition, there is a race condition between country code update,
-     * single scan triggered by App based ACTION_WIFI_SCAN_AVAILABILITY_CHANGED. The single scan
-     * might fail if country code is updated while the scan is ongoing.
-     * To mitigate that issue, send ACTION_WIFI_SCAN_AVAILABILITY_CHANGED again when the country
-     * code update is completed.
-     *
-     * @param newCountryCode the new country code, null when there is no active mode enabled.
-     */
-    public void updateClientScanModeAfterCountryCodeUpdate(@Nullable String newCountryCode) {
-        // Handle country code changed only during Wifi off -> on transition.
-        if (newCountryCode != null) {
-            updateClientScanMode();
-        }
-    }
-
-    /**
      * WifiController is the class used to manage wifi state for various operating
      * modes (normal, airplane, wifi hotspot, etc.).
      */
@@ -1874,7 +1753,7 @@
                         }
                         break;
                     case CMD_UPDATE_AP_CAPABILITY:
-                        updateCapabilityToSoftApModeManager((SoftApCapability) msg.obj, msg.arg1);
+                        updateCapabilityToSoftApModeManager((SoftApCapability) msg.obj);
                         break;
                     case CMD_UPDATE_AP_CONFIG:
                         updateConfigurationToSoftApModeManager((SoftApConfiguration) msg.obj);
@@ -2001,7 +1880,6 @@
                             }
                         }
                         mRestartCallbacks.finishBroadcast();
-                        mWifiInjector.getSelfRecovery().onRecoveryCompleted();
                         break;
                     default:
                         return NOT_HANDLED;
@@ -2033,6 +1911,22 @@
                 super.exit();
             }
 
+            private boolean isClientModeManagerConnectedOrConnectingToBssid(
+                    @NonNull ClientModeManager clientModeManager,
+                    @NonNull String ssid, @NonNull String bssid) {
+                WifiConfiguration connectedOrConnectingWifiConfiguration = coalesce(
+                        clientModeManager.getConnectingWifiConfiguration(),
+                        clientModeManager.getConnectedWifiConfiguration());
+                String connectedOrConnectingBssid = coalesce(
+                        clientModeManager.getConnectingBssid(),
+                        clientModeManager.getConnectedBssid());
+                String connectedOrConnectingSsid =
+                        connectedOrConnectingWifiConfiguration == null
+                                ? null : connectedOrConnectingWifiConfiguration.SSID;
+                return Objects.equals(ssid, connectedOrConnectingSsid)
+                        && Objects.equals(bssid, connectedOrConnectingBssid);
+            }
+
             @Nullable
             private ConcreteClientModeManager findAnyClientModeManagerConnectingOrConnectedToBssid(
                     @NonNull String ssid, @Nullable String bssid) {
@@ -2049,7 +1943,7 @@
 
             private void handleAdditionalClientModeManagerRequest(
                     @NonNull AdditionalClientModeManagerRequestInfo requestInfo) {
-                ClientModeManager primaryManager = getPrimaryClientModeManagerNullable();
+                ClientModeManager primaryManager = getPrimaryClientModeManager();
                 // TODO(b/228529090): Remove this special code once root cause is resolved.
                 // Special case for holders with ENTER_CAR_MODE_PRIORITIZED. Only give them the
                 // primary STA to avoid the device getting into STA+STA state.
@@ -2059,12 +1953,9 @@
                     WorkSource workSource = requestInfo.requestorWs;
                     for (int i = 0; i < workSource.size(); i++) {
                         int curUid = workSource.getUid(i);
-                        if (mWifiPermissionsUtil.checkEnterCarModePrioritized(curUid)) {
+                        if (curUid != Process.SYSTEM_UID
+                                && mWifiPermissionsUtil.checkEnterCarModePrioritized(curUid)) {
                             requestInfo.listener.onAnswer(primaryManager);
-                            if (mVerboseLoggingEnabled) {
-                                Log.w(TAG, "Uid " + curUid
-                                        + " has car mode permission - disabling STA+STA");
-                            }
                             return;
                         }
                     }
@@ -2099,8 +1990,8 @@
                         return;
                     }
                     // Existing secondary CMM connected to the same ssid/bssid.
-                    if (!canRequestMoreClientModeManagersInRole(requestInfo.requestorWs,
-                            requestInfo.clientRole, requestInfo.didUserApprove)) {
+                    if (!canRequestMoreClientModeManagersInRole(
+                            requestInfo.requestorWs, requestInfo.clientRole)) {
                         Log.e(TAG, "New request cannot override existing request on "
                                 + "ClientModeManager=" + cmmForSameBssid);
                         // If the new request does not have priority over the existing request,
@@ -2131,8 +2022,8 @@
                     requestInfo.listener.onAnswer(cmmForSameRole);
                     return;
                 }
-                if (canRequestMoreClientModeManagersInRole(requestInfo.requestorWs,
-                        requestInfo.clientRole, requestInfo.didUserApprove)) {
+                if (canRequestMoreClientModeManagersInRole(
+                        requestInfo.requestorWs, requestInfo.clientRole)) {
                     // Can create an additional client mode manager.
                     Log.v(TAG, "Starting a new ClientModeManager");
                     startAdditionalClientModeManager(
@@ -2140,21 +2031,6 @@
                             requestInfo.listener, requestInfo.requestorWs);
                     return;
                 }
-
-                // fallback decision
-                if (requestInfo.clientRole == ROLE_CLIENT_LOCAL_ONLY
-                        && mContext.getResources().getBoolean(
-                        R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled)
-                        && !mWifiPermissionsUtil.isTargetSdkLessThan(
-                        requestInfo.requestorWs.getPackageName(0), Build.VERSION_CODES.S,
-                        requestInfo.requestorWs.getUid(0))) {
-                    Log.d(TAG, "Will not fall back to single STA for a local-only connection when "
-                            + "STA+STA is supported (unless for a pre-S legacy app). "
-                            + " Priority inversion.");
-                    requestInfo.listener.onAnswer(null);
-                    return;
-                }
-
                 // Fall back to single STA behavior.
                 Log.v(TAG, "Falling back to single STA behavior using primary ClientModeManager="
                         + primaryManager);
@@ -2209,45 +2085,31 @@
                         }
                     case CMD_AP_STOPPED:
                     case CMD_AP_START_FAILURE:
-                        if (hasAnyModeManager()) {
-                            log("AP disabled, remain in EnabledState.");
-                            break;
-                        }
-                        if (msg.what == CMD_AP_STOPPED) {
-                            mWifiInjector.getSelfRecovery().onWifiStopped();
-                            if (mWifiInjector.getSelfRecovery().isRecoveryInProgress()) {
-                                // Recovery in progress, transit to disabled state.
+                        if (!hasAnyModeManager()) {
+                            if (shouldEnableSta()) {
+                                log("SoftAp disabled, start client mode");
+                                startPrimaryOrScanOnlyClientModeManager(
+                                        // Assumes user toggled it on from settings before.
+                                        mFacade.getSettingsWorkSource(mContext));
+                            } else {
+                                log("SoftAp mode disabled, return to DisabledState");
                                 transitionTo(mDisabledState);
-                                break;
                             }
-                        }
-                        if (shouldEnableSta()) {
-                            log("SoftAp disabled, start client mode");
-                            startPrimaryOrScanOnlyClientModeManager(
-                                    // Assumes user toggled it on from settings before.
-                                    mFacade.getSettingsWorkSource(mContext));
                         } else {
-                            log("SoftAp mode disabled, return to DisabledState");
-                            transitionTo(mDisabledState);
+                            log("AP disabled, remain in EnabledState.");
                         }
                         break;
                     case CMD_STA_START_FAILURE:
                     case CMD_STA_STOPPED:
                         // Client mode stopped. Head to Disabled to wait for next command if there
-                        // is no active mode manager.
+                        // no active mode managers.
                         if (!hasAnyModeManager()) {
-                            mWifiInjector.getSelfRecovery().onWifiStopped();
                             log("STA disabled, return to DisabledState.");
                             transitionTo(mDisabledState);
                         } else {
                             log("STA disabled, remain in EnabledState.");
                         }
                         break;
-                    case  CMD_DEFERRED_RECOVERY_RESTART_WIFI:
-                        // Wifi shutdown is not completed yet, still in enabled state.
-                        // Defer the message and wait for entering disabled state.
-                        deferMessage(msg);
-                        break;
                     case CMD_RECOVERY_RESTART_WIFI: {
                         final String bugTitle;
                         final String bugDetail = (String) msg.obj;
@@ -2296,24 +2158,4 @@
     private static <T> T coalesce(T a, T  b) {
         return a != null ? a : b;
     }
-
-    /**
-     * Check if CMM is connecting or connected to target BSSID and SSID
-     */
-    public static boolean isClientModeManagerConnectedOrConnectingToBssid(
-            @NonNull ClientModeManager clientModeManager,
-            @NonNull String ssid, @NonNull String bssid) {
-        WifiConfiguration connectedOrConnectingWifiConfiguration = coalesce(
-                clientModeManager.getConnectingWifiConfiguration(),
-                clientModeManager.getConnectedWifiConfiguration());
-        String connectedOrConnectingBssid = coalesce(
-                clientModeManager.getConnectingBssid(),
-                clientModeManager.getConnectedBssid());
-        String connectedOrConnectingSsid =
-                connectedOrConnectingWifiConfiguration == null
-                        ? null : connectedOrConnectingWifiConfiguration.SSID;
-        Log.v(TAG, connectedOrConnectingBssid + "   " + connectedOrConnectingSsid);
-        return Objects.equals(ssid, connectedOrConnectingSsid)
-                && Objects.equals(bssid, connectedOrConnectingBssid);
-    }
 }
diff --git a/service/java/com/android/server/wifi/AggressiveConnectedScore.java b/service/java/com/android/server/wifi/AggressiveConnectedScore.java
index 4604235..c8ad00d7 100644
--- a/service/java/com/android/server/wifi/AggressiveConnectedScore.java
+++ b/service/java/com/android/server/wifi/AggressiveConnectedScore.java
@@ -49,16 +49,10 @@
         mFrequencyMHz = 5000;
     }
 
-    /**
-     * Generate the Wi-Fi network score.
-     * @return the generated Wi-Fi network score.
-     */
     @Override
     public int generateScore() {
-        final int transitionScore = isPrimary() ? WIFI_TRANSITION_SCORE
-                : WIFI_SECONDARY_TRANSITION_SCORE;
         int threshRssi = mScoringParams.getSufficientRssi(mFrequencyMHz);
-        int score = (mRssi - threshRssi) + transitionScore;
+        int score = (mRssi - threshRssi) + WIFI_TRANSITION_SCORE;
         return score;
     }
 }
diff --git a/service/java/com/android/server/wifi/AssocRejectEventInfo.java b/service/java/com/android/server/wifi/AssocRejectEventInfo.java
index d5ab40a..b99e8f1 100644
--- a/service/java/com/android/server/wifi/AssocRejectEventInfo.java
+++ b/service/java/com/android/server/wifi/AssocRejectEventInfo.java
@@ -17,7 +17,7 @@
 package com.android.server.wifi;
 
 import android.annotation.NonNull;
-import android.hardware.wifi.supplicant.AssociationRejectionData;
+import android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.AssociationRejectionData;
 
 import com.android.server.wifi.util.NativeUtil;
 
@@ -44,34 +44,8 @@
         this.mboAssocDisallowedInfo = null;
     }
 
-    public AssocRejectEventInfo(android.hardware.wifi.supplicant.V1_4
-            .ISupplicantStaIfaceCallback.AssociationRejectionData assocRejectData) {
-        String ssid = NativeUtil.encodeSsid(assocRejectData.ssid);
-        String bssid = NativeUtil.macAddressFromByteArray(assocRejectData.bssid);
-        this.ssid = Objects.requireNonNull(ssid);
-        this.bssid = Objects.requireNonNull(bssid);
-        this.statusCode = assocRejectData.statusCode;
-        this.timedOut = assocRejectData.timedOut;
-        if (assocRejectData.isMboAssocDisallowedReasonCodePresent) {
-            this.mboAssocDisallowedInfo = new MboOceController.MboAssocDisallowedAttr(
-                    assocRejectData.mboAssocDisallowedReason);
-        } else {
-            this.mboAssocDisallowedInfo = null;
-        }
-        if (assocRejectData.isOceRssiBasedAssocRejectAttrPresent) {
-            this.oceRssiBasedAssocRejectInfo =
-                    new MboOceController.OceRssiBasedAssocRejectAttr(
-                            assocRejectData.oceRssiBasedAssocRejectData.deltaRssi,
-                            assocRejectData.oceRssiBasedAssocRejectData.retryDelayS);
-        } else {
-            this.oceRssiBasedAssocRejectInfo = null;
-        }
-    }
-
-    // Constructor using the AIDL definition
     public AssocRejectEventInfo(AssociationRejectionData assocRejectData) {
-        String ssid = NativeUtil.encodeSsid(
-                NativeUtil.byteArrayToArrayList(assocRejectData.ssid));
+        String ssid = NativeUtil.encodeSsid(assocRejectData.ssid);
         String bssid = NativeUtil.macAddressFromByteArray(assocRejectData.bssid);
         this.ssid = Objects.requireNonNull(ssid);
         this.bssid = Objects.requireNonNull(bssid);
diff --git a/service/java/com/android/server/wifi/AuthenticationFailureEventInfo.java b/service/java/com/android/server/wifi/AuthenticationFailureEventInfo.java
deleted file mode 100644
index be820a4..0000000
--- a/service/java/com/android/server/wifi/AuthenticationFailureEventInfo.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import android.annotation.NonNull;
-import android.net.MacAddress;
-
-import java.util.Objects;
-
-/**
- * Store authentication failure information passed from WifiMonitor.
- */
-public class AuthenticationFailureEventInfo {
-    @NonNull public final String ssid;
-    @NonNull public final MacAddress bssid;
-    public final int reasonCode;
-    public final int errorCode;
-
-    public AuthenticationFailureEventInfo(@NonNull String ssid, @NonNull MacAddress bssid,
-            int reasonCode, int errorCode) {
-        this.ssid = ssid;
-        this.bssid = bssid;
-        this.reasonCode = reasonCode;
-        this.errorCode = errorCode;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(" ssid: ").append(ssid);
-        sb.append(" bssid: ").append(bssid);
-        sb.append(" reasonCode: ").append(reasonCode);
-        sb.append(" errorCode: ").append(errorCode);
-        return sb.toString();
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(ssid, bssid, reasonCode, errorCode);
-    }
-
-    @Override
-    public boolean equals(Object that) {
-        if (this == that) return true;
-        if (!(that instanceof AuthenticationFailureEventInfo)) return false;
-
-        AuthenticationFailureEventInfo thatAuthenticationFailureEventInfo =
-                (AuthenticationFailureEventInfo) that;
-        return (reasonCode == thatAuthenticationFailureEventInfo.reasonCode
-                && errorCode == thatAuthenticationFailureEventInfo.errorCode
-                && Objects.equals(ssid, thatAuthenticationFailureEventInfo.ssid)
-                && Objects.equals(bssid, thatAuthenticationFailureEventInfo.bssid));
-    }
-}
diff --git a/service/java/com/android/server/wifi/AvailableNetworkNotifier.java b/service/java/com/android/server/wifi/AvailableNetworkNotifier.java
index 81aa467..3f424da 100644
--- a/service/java/com/android/server/wifi/AvailableNetworkNotifier.java
+++ b/service/java/com/android/server/wifi/AvailableNetworkNotifier.java
@@ -34,8 +34,6 @@
 import android.net.wifi.IActionListener;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Process;
@@ -47,10 +45,9 @@
 import android.util.Log;
 
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.ConnectToNetworkNotificationAndActionCount;
 import com.android.server.wifi.util.ActionListenerWrapper;
-import com.android.server.wifi.util.WifiPermissionsUtil;
+import com.android.server.wifi.util.ScanResultUtil;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
@@ -133,7 +130,6 @@
     private final ConnectToNetworkNotificationBuilder mNotificationBuilder;
     private final MakeBeforeBreakManager mMakeBeforeBreakManager;
     private final WifiNotificationManager mWifiNotificationManager;
-    private final WifiPermissionsUtil mWifiPermissionsUtil;
 
     @VisibleForTesting
     ScanResult mRecommendedNetwork;
@@ -171,8 +167,7 @@
             ConnectHelper connectHelper,
             ConnectToNetworkNotificationBuilder connectToNetworkNotificationBuilder,
             MakeBeforeBreakManager makeBeforeBreakManager,
-            WifiNotificationManager wifiNotificationManager,
-            WifiPermissionsUtil wifiPermissionsUtil) {
+            WifiNotificationManager wifiNotificationManager) {
         mTag = tag;
         mStoreDataIdentifier = storeDataIdentifier;
         mToggleSettingsName = toggleSettingsName;
@@ -188,7 +183,6 @@
         mNotificationBuilder = connectToNetworkNotificationBuilder;
         mMakeBeforeBreakManager = makeBeforeBreakManager;
         mWifiNotificationManager = wifiNotificationManager;
-        mWifiPermissionsUtil = wifiPermissionsUtil;
         mScreenOn = false;
         wifiConfigStore.registerStoreData(new SsidSetStoreData(mStoreDataIdentifier,
                 new AvailableNetworkNotifierStoreData()));
@@ -214,8 +208,7 @@
             new BroadcastReceiver() {
                 @Override
                 public void onReceive(Context context, Intent intent) {
-                    if (!TextUtils.equals(mTag,
-                            intent.getStringExtra(AVAILABLE_NETWORK_NOTIFIER_TAG))) {
+                    if (!mTag.equals(intent.getStringExtra(AVAILABLE_NETWORK_NOTIFIER_TAG))) {
                         return;
                     }
                     switch (intent.getAction()) {
@@ -276,13 +269,9 @@
     }
 
     private boolean isControllerEnabled() {
-        UserManager userManager = mContext.getSystemService(UserManager.class);
-        UserHandle currentUser = UserHandle.of(mWifiPermissionsUtil.getCurrentUser());
-        return mSettingEnabled
-                && !userManager.hasUserRestrictionForUser(
-                        UserManager.DISALLOW_CONFIG_WIFI, currentUser)
-                && !(SdkLevel.isAtLeastT() && userManager.hasUserRestrictionForUser(
-                        UserManager.DISALLOW_ADD_WIFI_CONFIG, currentUser));
+        return mSettingEnabled && !mContext.getSystemService(UserManager.class)
+                .hasUserRestrictionForUser(UserManager.DISALLOW_CONFIG_WIFI,
+                    UserHandle.CURRENT);
     }
 
     /**
@@ -461,7 +450,7 @@
                             // only keep netId, discard other fields
                             new NetworkUpdateResult(result.getNetworkId()),
                             new ActionListenerWrapper(listener),
-                            Process.SYSTEM_UID, mContext.getOpPackageName()));
+                            Process.SYSTEM_UID));
             addNetworkToBlocklist(mRecommendedNetwork.SSID);
         }
 
diff --git a/framework/java/android/net/wifi/BaseWifiService.java b/service/java/com/android/server/wifi/BaseWifiService.java
similarity index 81%
rename from framework/java/android/net/wifi/BaseWifiService.java
rename to service/java/com/android/server/wifi/BaseWifiService.java
index 8e09d79..0368169 100644
--- a/framework/java/android/net/wifi/BaseWifiService.java
+++ b/service/java/com/android/server/wifi/BaseWifiService.java
@@ -14,17 +14,38 @@
  * limitations under the License.
  */
 
-package android.net.wifi;
+package com.android.server.wifi;
 
 import android.annotation.NonNull;
-import android.annotation.Nullable;
 import android.net.DhcpInfo;
-import android.net.DhcpOption;
 import android.net.Network;
+import android.net.wifi.CoexUnsafeChannel;
+import android.net.wifi.IActionListener;
+import android.net.wifi.ICoexCallback;
+import android.net.wifi.IDppCallback;
+import android.net.wifi.ILocalOnlyHotspotCallback;
+import android.net.wifi.INetworkRequestMatchCallback;
+import android.net.wifi.IOnWifiActivityEnergyInfoListener;
+import android.net.wifi.IOnWifiUsabilityStatsListener;
+import android.net.wifi.IScanResultsCallback;
+import android.net.wifi.ISoftApCallback;
+import android.net.wifi.ISubsystemRestartCallback;
+import android.net.wifi.ISuggestionConnectionStatusListener;
+import android.net.wifi.ISuggestionUserApprovalStatusListener;
+import android.net.wifi.ITrafficStateCallback;
+import android.net.wifi.IWifiConnectedNetworkScorer;
+import android.net.wifi.IWifiManager;
+import android.net.wifi.IWifiVerboseLoggingStatusChangedListener;
+import android.net.wifi.ScanResult;
+import android.net.wifi.SoftApConfiguration;
+import android.net.wifi.WifiAvailableChannel;
+import android.net.wifi.WifiConfiguration;
+import android.net.wifi.WifiInfo;
+import android.net.wifi.WifiManager;
+import android.net.wifi.WifiNetworkSuggestion;
 import android.net.wifi.hotspot2.IProvisioningCallback;
 import android.net.wifi.hotspot2.OsuProvider;
 import android.net.wifi.hotspot2.PasspointConfiguration;
-import android.os.Bundle;
 import android.os.IBinder;
 import android.os.RemoteException;
 import android.os.WorkSource;
@@ -49,8 +70,6 @@
  *
  * When a new API is added to IWifiManager.aidl, a stub should be added in BaseWifiService as
  * well otherwise compilation will fail.
- *
- * @hide
  */
 public class BaseWifiService extends IWifiManager.Stub {
 
@@ -66,6 +85,11 @@
         throw new UnsupportedOperationException();
     }
 
+    @Deprecated
+    public ParceledListSlice getConfiguredNetworks(String packageName, String featureId) {
+        throw new UnsupportedOperationException();
+    }
+
     @Override
     public ParceledListSlice getConfiguredNetworks(String packageName, String featureId,
             boolean callerNetworksOnly) {
@@ -73,24 +97,7 @@
     }
 
     @Override
-    public ParceledListSlice getPrivilegedConfiguredNetworks(String packageName, String featureId,
-            Bundle extras) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public WifiConfiguration getPrivilegedConnectedNetwork(
-            String packageName, String featureId, Bundle extras) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void setScreenOnScanSchedule(int[] scanScheduleSeconds, int[] scanType) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void setOneShotScreenOnConnectivityScanDelayMillis(int delayMs) {
+    public ParceledListSlice getPrivilegedConfiguredNetworks(String packageName, String featureId) {
         throw new UnsupportedOperationException();
     }
 
@@ -101,16 +108,6 @@
     }
 
     @Override
-    public void setSsidsAllowlist(String packageName, List<WifiSsid> ssids) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public List<WifiSsid> getSsidsAllowlist(String packageName) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
     public Map<OsuProvider, List<ScanResult>> getMatchingOsuProviders(
             List<ScanResult> scanResults) {
         throw new UnsupportedOperationException();
@@ -123,7 +120,7 @@
     }
 
     @Override
-    public int addOrUpdateNetwork(WifiConfiguration config, String packageName, Bundle extras) {
+    public int addOrUpdateNetwork(WifiConfiguration config, String packageName) {
         throw new UnsupportedOperationException();
     }
 
@@ -190,11 +187,6 @@
     }
 
     @Override
-    public void queryAutojoinGlobal(@NonNull IBooleanListener listener) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
     public void allowAutojoin(int netId, boolean choice) {
         throw new UnsupportedOperationException();
     }
@@ -270,20 +262,7 @@
     }
 
     @Override
-    public void registerDriverCountryCodeChangedListener(
-            @NonNull IOnWifiDriverCountryCodeChangedListener listener,
-            @Nullable String packageName, @Nullable String featureId) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void unregisterDriverCountryCodeChangedListener(
-            @NonNull IOnWifiDriverCountryCodeChangedListener listener) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public String getCountryCode(String packageName, String featureId) {
+    public String getCountryCode() {
         throw new UnsupportedOperationException();
     }
 
@@ -419,7 +398,7 @@
 
     @Override
     public int startLocalOnlyHotspot(ILocalOnlyHotspotCallback callback, String packageName,
-            String featureId, SoftApConfiguration customConfig, Bundle extras) {
+            String featureId, SoftApConfiguration customConfig) {
         throw new UnsupportedOperationException();
     }
 
@@ -429,16 +408,6 @@
     }
 
     @Override
-    public void registerLocalOnlyHotspotSoftApCallback(ISoftApCallback callback, Bundle extras) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void unregisterLocalOnlyHotspotSoftApCallback(ISoftApCallback callback, Bundle extras) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
     public void startWatchLocalOnlyHotspot(ILocalOnlyHotspotCallback callback) {
         throw new UnsupportedOperationException();
     }
@@ -600,7 +569,7 @@
 
     @Override
     public int removeNetworkSuggestions(
-            List<WifiNetworkSuggestion> networkSuggestions, String callingPackageName, int action) {
+            List<WifiNetworkSuggestion> networkSuggestions, String callingPackageName) {
         throw new UnsupportedOperationException();
     }
 
@@ -669,14 +638,8 @@
         throw new UnsupportedOperationException();
     }
 
-    /** TO BE REMOVED */
-    public void connect(WifiConfiguration config, int netId, IActionListener callback) {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
-    public void connect(WifiConfiguration config, int netId, IActionListener callback,
-            @NonNull String packageName) {
+    public void connect(WifiConfiguration config, int netId, IActionListener callback) {
         throw new UnsupportedOperationException();
     }
 
@@ -690,14 +653,8 @@
         throw new UnsupportedOperationException();
     }
 
-    /** TO BE REMOVED */
-    public void save(WifiConfiguration config, IActionListener callback) {
-        throw new UnsupportedOperationException();
-    }
-
     @Override
-    public void save(WifiConfiguration config, IActionListener callback,
-            @NonNull String packageName) {
+    public void save(WifiConfiguration config, IActionListener callback) {
         throw new UnsupportedOperationException();
     }
 
@@ -740,24 +697,6 @@
     }
 
     @Override
-    public void setExternalPnoScanRequest(@NonNull IBinder binder,
-            @NonNull IPnoScanResultsCallback callback,
-            @NonNull List<WifiSsid> ssids, @NonNull int[] frequencies,
-            @NonNull String packageName, @NonNull String featureId) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void clearExternalPnoScanRequest() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void getLastCallerInfoForApi(int apiType, @NonNull ILastCallerListener listener) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
     public boolean setWifiConnectedNetworkScorer(IBinder binder,
             IWifiConnectedNetworkScorer scorer) {
         throw new UnsupportedOperationException();
@@ -839,67 +778,5 @@
             int band, int mode, int filter) {
         throw new UnsupportedOperationException();
     }
-
-    @Override
-    public boolean isWifiPasspointEnabled() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void setWifiPasspointEnabled(boolean enabled) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public @WifiManager.WifiMultiInternetMode int getStaConcurrencyForMultiInternetMode() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public boolean setStaConcurrencyForMultiInternetMode(
-            @WifiManager.WifiMultiInternetMode int mode) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void notifyMinimumRequiredWifiSecurityLevelChanged(int level) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void notifyWifiSsidPolicyChanged(int policyType, @NonNull List<WifiSsid> ssids) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public String[] getOemPrivilegedWifiAdminPackages() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void replyToP2pInvitationReceivedDialog(
-            int dialogId, boolean accepted, @Nullable String optionalPin) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void replyToSimpleDialog(int dialogId, int button) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void addCustomDhcpOptions(WifiSsid ssid, byte[] oui, @NonNull List<DhcpOption> options) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void removeCustomDhcpOptions(WifiSsid ssid, byte[] oui) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void reportCreateInterfaceImpact(String packageName, int interfaceType,
-            boolean requireNewInterface, IInterfaceCreationInfoCallback callback) {
-        throw new UnsupportedOperationException();
-    }
 }
+
diff --git a/service/java/com/android/server/wifi/ClientMode.java b/service/java/com/android/server/wifi/ClientMode.java
index dfef172..7b2bb1f 100644
--- a/service/java/com/android/server/wifi/ClientMode.java
+++ b/service/java/com/android/server/wifi/ClientMode.java
@@ -50,24 +50,13 @@
  * If the STA is in client mode, ClientMode is implemented using {@link ClientModeImpl}.
  */
 public interface ClientMode {
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(flag = true, prefix = {"POWER_SAVE_CLIENT_"},
-            value = {
-                    POWER_SAVE_CLIENT_DHCP,
-                    POWER_SAVE_CLIENT_WIFI_LOCK})
-    @interface PowerSaveClientType {}
-    int POWER_SAVE_CLIENT_DHCP = 0x1;
-    int POWER_SAVE_CLIENT_WIFI_LOCK = 0x2;
-
     void dump(FileDescriptor fd, PrintWriter pw, String[] args);
 
     void enableVerboseLogging(boolean verbose);
 
-    void connectNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper, int callingUid,
-            @NonNull String packageName);
+    void connectNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper, int callingUid);
 
-    void saveNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper, int callingUid,
-            @NonNull String packageName);
+    void saveNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper, int callingUid);
 
     void disconnect();
 
@@ -140,8 +129,7 @@
 
     WifiLinkLayerStats getWifiLinkLayerStats();
 
-    boolean setPowerSave(@PowerSaveClientType int client, boolean ps);
-    boolean enablePowerSave();
+    boolean setPowerSave(boolean ps);
 
     boolean setLowLatencyMode(boolean enabled);
 
@@ -292,10 +280,4 @@
      * will be artificially reduced so that ConnectivityService will prefer any other connection.
      */
     void setShouldReduceNetworkScore(boolean shouldReduceNetworkScore);
-
-
-    /**
-     * update the capabilities
-     */
-    void updateCapabilities();
 }
diff --git a/service/java/com/android/server/wifi/ClientModeDefaults.java b/service/java/com/android/server/wifi/ClientModeDefaults.java
index 33c3b7a..3bf9753 100644
--- a/service/java/com/android/server/wifi/ClientModeDefaults.java
+++ b/service/java/com/android/server/wifi/ClientModeDefaults.java
@@ -16,7 +16,6 @@
 
 package com.android.server.wifi;
 
-import android.annotation.NonNull;
 import android.net.DhcpResultsParcelable;
 import android.net.Network;
 import android.net.wifi.IWifiConnectedNetworkScorer;
@@ -45,13 +44,13 @@
     default void dump(FileDescriptor fd, PrintWriter pw, String[] args) { }
 
     default void connectNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper,
-            int callingUid, @NonNull String packageName) {
+            int callingUid) {
         // wifi off, can't connect.
-        wrapper.sendFailure(WifiManager.ActionListener.FAILURE_BUSY);
+        wrapper.sendFailure(WifiManager.BUSY);
     }
 
     default void saveNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper,
-            int callingUid, @NonNull String packageName) {
+            int callingUid) {
         // wifi off, nothing more to do here.
         wrapper.sendSuccess();
     }
@@ -131,11 +130,7 @@
         return null;
     }
 
-    default boolean setPowerSave(@PowerSaveClientType int client, boolean ps) {
-        return false;
-    }
-
-    default boolean enablePowerSave() {
+    default boolean setPowerSave(boolean ps) {
         return false;
     }
 
@@ -224,7 +219,4 @@
 
     @Override
     default void setShouldReduceNetworkScore(boolean shouldReduceNetworkScore) { }
-
-    @Override
-    default void updateCapabilities() { }
 }
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index d4762ea..815d369 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -21,9 +21,7 @@
 import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.DISABLED_NO_INTERNET_TEMPORARY;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA256;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA384;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE;
 
-import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_LOCAL_ONLY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_PRIMARY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_LONG_LIVED;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_TRANSIENT;
@@ -34,11 +32,12 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.ActivityManager;
-import android.app.admin.SecurityLog;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback.ReasonCode;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback.StatusCode;
 import android.net.CaptivePortalData;
 import android.net.ConnectivityManager;
 import android.net.DhcpResultsParcelable;
@@ -64,36 +63,30 @@
 import android.net.ip.IIpClient;
 import android.net.ip.IpClientCallbacks;
 import android.net.ip.IpClientManager;
-import android.net.networkstack.aidl.dhcp.DhcpOption;
-import android.net.networkstack.aidl.ip.ReachabilityLossInfoParcelable;
-import android.net.networkstack.aidl.ip.ReachabilityLossReason;
 import android.net.shared.Layer2Information;
 import android.net.shared.ProvisioningConfiguration;
 import android.net.shared.ProvisioningConfiguration.ScanResultInfo;
 import android.net.vcn.VcnManager;
 import android.net.vcn.VcnNetworkPolicyResult;
 import android.net.wifi.IWifiConnectedNetworkScorer;
-import android.net.wifi.MloLink;
 import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
 import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiAnnotations.WifiStandard;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiNetworkAgentSpecifier;
 import android.net.wifi.WifiNetworkSpecifier;
-import android.net.wifi.WifiSsid;
 import android.net.wifi.hotspot2.IProvisioningCallback;
 import android.net.wifi.hotspot2.OsuProvider;
 import android.net.wifi.nl80211.DeviceWiphyCapabilities;
 import android.net.wifi.nl80211.WifiNl80211Manager;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.BatteryStatsManager;
 import android.os.Build;
 import android.os.ConditionVariable;
+import android.os.HandlerExecutor;
 import android.os.IBinder;
 import android.os.Looper;
 import android.os.Message;
@@ -110,7 +103,6 @@
 import android.util.ArraySet;
 import android.util.Log;
 import android.util.Pair;
-import android.util.Range;
 
 import androidx.annotation.RequiresApi;
 
@@ -119,17 +111,12 @@
 import com.android.internal.util.Protocol;
 import com.android.internal.util.State;
 import com.android.internal.util.StateMachine;
-import com.android.modules.utils.HandlerExecutor;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.net.module.util.Inet4AddressUtils;
 import com.android.net.module.util.MacAddressUtils;
 import com.android.net.module.util.NetUtils;
 import com.android.server.wifi.ActiveModeManager.ClientRole;
 import com.android.server.wifi.MboOceController.BtmFrameData;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyRequest;
-import com.android.server.wifi.SupplicantStaIfaceHal.StaIfaceReasonCode;
-import com.android.server.wifi.SupplicantStaIfaceHal.StaIfaceStatusCode;
-import com.android.server.wifi.SupplicantStaIfaceHal.SupplicantEventCode;
 import com.android.server.wifi.WifiCarrierInfoManager.SimAuthRequestData;
 import com.android.server.wifi.WifiCarrierInfoManager.SimAuthResponseData;
 import com.android.server.wifi.WifiNative.RxFateReport;
@@ -146,9 +133,9 @@
 import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiIsUnusableEvent;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiUsabilityStats;
 import com.android.server.wifi.util.ActionListenerWrapper;
-import com.android.server.wifi.util.InformationElementUtil;
 import com.android.server.wifi.util.NativeUtil;
 import com.android.server.wifi.util.RssiUtil;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.server.wifi.util.StateMachineObituary;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.wifi.resources.R;
@@ -156,6 +143,7 @@
 import java.io.BufferedReader;
 import java.io.FileDescriptor;
 import java.io.FileNotFoundException;
+import java.io.FileReader;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.lang.annotation.Retention;
@@ -164,7 +152,6 @@
 import java.net.Inet6Address;
 import java.net.InetAddress;
 import java.net.URL;
-import java.security.cert.X509Certificate;
 import java.time.Duration;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -191,11 +178,9 @@
 
     private static final int IPCLIENT_STARTUP_TIMEOUT_MS = 2_000;
     private static final int IPCLIENT_SHUTDOWN_TIMEOUT_MS = 60_000; // 60 seconds
-    private static final int NETWORK_AGENT_TEARDOWN_DELAY_MS = 5_000; // Max teardown delay.
     @VisibleForTesting public static final long CONNECTING_WATCHDOG_TIMEOUT_MS = 30_000; // 30 secs.
     @VisibleForTesting
     public static final short NETWORK_NOT_FOUND_EVENT_THRESHOLD = 3;
-    public static final String ARP_TABLE_PATH = "/proc/net/arp";
 
     private boolean mVerboseLoggingEnabled = false;
 
@@ -216,7 +201,7 @@
     protected void log(String s) {
         Log.d(getTag(), s);
     }
-    private final WifiContext mContext;
+    private final Context mContext;
     private final WifiMetrics mWifiMetrics;
     private final WifiMonitor mWifiMonitor;
     private final WifiNative mWifiNative;
@@ -263,10 +248,6 @@
     private final String mInterfaceName;
     private final ConcreteClientModeManager mClientModeManager;
 
-    private final WifiNotificationManager mNotificationManager;
-    private final QosPolicyRequestHandler mQosPolicyRequestHandler;
-
-    private boolean mFailedToResetMacAddress = false;
     private int mLastSignalLevel = -1;
     private int mLastTxKbps = -1;
     private int mLastRxKbps = -1;
@@ -282,9 +263,6 @@
     private byte[] mCachedPacketFilter;
     @Nullable
     private WifiNative.ConnectionCapabilities mLastConnectionCapabilities;
-    private int mPowerSaveDisableRequests = 0; // mask based on @PowerSaveClientType
-    private boolean mIsUserSelected = false;
-    private boolean mCurrentConnectionDetectedCaptivePortal;
 
     private String getTag() {
         return TAG + "[" + (mInterfaceName == null ? "unknown" : mInterfaceName) + "]";
@@ -359,7 +337,6 @@
     // This is the BSSID we are trying to associate to, it can be set to SUPPLICANT_BSSID_ANY
     // if we havent selected a BSSID for joining.
     private String mTargetBssid = SUPPLICANT_BSSID_ANY;
-    private int mTargetBand = ScanResult.UNSPECIFIED;
     // This one is used to track the current target network ID. This is used for error
     // handling during connection setup since many error message from supplicant does not report
     // SSID. Once connected, it will be set to invalid
@@ -423,13 +400,6 @@
     private final WifiNetworkFactory mNetworkFactory;
     private final UntrustedWifiNetworkFactory mUntrustedNetworkFactory;
     private final OemWifiNetworkFactory mOemWifiNetworkFactory;
-    private final RestrictedWifiNetworkFactory mRestrictedWifiNetworkFactory;
-    @VisibleForTesting
-    InsecureEapNetworkHandler mInsecureEapNetworkHandler;
-    @VisibleForTesting
-    InsecureEapNetworkHandler.InsecureEapNetworkHandlerCallbacks
-            mInsecureEapNetworkHandlerCallbacksImpl;
-    private final MultiInternetManager mMultiInternetManager;
 
     @VisibleForTesting
     @Nullable
@@ -518,8 +488,6 @@
     /* A layer 3 neighbor on the Wi-Fi link became unreachable. */
     static final int CMD_IP_REACHABILITY_LOST                           = BASE + 149;
 
-    static final int CMD_IP_REACHABILITY_FAILURE                        = BASE + 150;
-
     static final int CMD_ACCEPT_UNVALIDATED                             = BASE + 153;
 
     /* used to offload sending IP packet */
@@ -561,6 +529,9 @@
     /** Used to remove packet filter from apf. */
     static final int CMD_REMOVE_KEEPALIVE_PACKET_FILTER_FROM_APF = BASE + 210;
 
+    /* Indicates that diagnostics should time out a connection start event. */
+    static final int CMD_DIAGS_CONNECT_TIMEOUT                          = BASE + 252;
+
     @VisibleForTesting
     static final int CMD_PRE_DHCP_ACTION                                = BASE + 255;
     private static final int CMD_PRE_DHCP_ACTION_COMPLETE               = BASE + 256;
@@ -574,12 +545,6 @@
 
     static final int CMD_CONNECTABLE_STATE_SETUP                        = BASE + 300;
 
-    @VisibleForTesting
-    static final int CMD_ACCEPT_EAP_SERVER_CERTIFICATE                  = BASE + 301;
-
-    @VisibleForTesting
-    static final int CMD_REJECT_EAP_SERVER_CERTIFICATE                  = BASE + 302;
-
     /* Tracks if suspend optimizations need to be disabled by DHCP,
      * screen or due to high perf mode.
      * When any of them needs to disable it, we keep the suspend optimizations
@@ -647,9 +612,6 @@
     // internet is less than this value.
     @VisibleForTesting
     public static final int PROBABILITY_WITH_INTERNET_TO_PERMANENTLY_DISABLE_NETWORK = 60;
-    // Disable a network permanently due to wrong password even if the network had successfully
-    // connected before wrong password failure on this network reached this threshold.
-    public static final int THRESHOLD_TO_PERM_WRONG_PASSWORD = 3;
 
     // Maximum duration to continue to log Wifi usability stats after a data stall is triggered.
     @VisibleForTesting
@@ -668,7 +630,7 @@
 
     /** Note that this constructor will also start() the StateMachine. */
     public ClientModeImpl(
-            @NonNull WifiContext context,
+            @NonNull Context context,
             @NonNull WifiMetrics wifiMetrics,
             @NonNull Clock clock,
             @NonNull WifiScoreCard wifiScoreCard,
@@ -694,8 +656,6 @@
             @NonNull WifiNetworkFactory networkFactory,
             @NonNull UntrustedWifiNetworkFactory untrustedWifiNetworkFactory,
             @NonNull OemWifiNetworkFactory oemPaidWifiNetworkFactory,
-            @NonNull RestrictedWifiNetworkFactory restrictedWifiNetworkFactory,
-            @NonNull MultiInternetManager multiInternetManager,
             @NonNull WifiLastResortWatchdog wifiLastResortWatchdog,
             @NonNull WakeupController wakeupController,
             @NonNull WifiLockManager wifiLockManager,
@@ -723,8 +683,7 @@
             @NonNull TelephonyManager telephonyManager,
             @NonNull WifiInjector wifiInjector,
             @NonNull WifiSettingsConfigStore settingsConfigStore,
-            boolean verboseLoggingEnabled,
-            @NonNull WifiNotificationManager wifiNotificationManager) {
+            boolean verboseLoggingEnabled) {
         super(TAG, looper);
         mWifiMetrics = wifiMetrics;
         mClock = clock;
@@ -783,8 +742,6 @@
 
         mUntrustedNetworkFactory = untrustedWifiNetworkFactory;
         mOemWifiNetworkFactory = oemPaidWifiNetworkFactory;
-        mRestrictedWifiNetworkFactory = restrictedWifiNetworkFactory;
-        mMultiInternetManager = multiInternetManager;
 
         mWifiLastResortWatchdog = wifiLastResortWatchdog;
         mWakeupController = wakeupController;
@@ -816,49 +773,9 @@
 
         mWifiNetworkSelector = wifiNetworkSelector;
         mWifiInjector = wifiInjector;
-        mQosPolicyRequestHandler = new QosPolicyRequestHandler(mInterfaceName, mWifiNative, this,
-                mWifiInjector.getWifiHandlerThread());
 
         enableVerboseLogging(verboseLoggingEnabled);
 
-        mNotificationManager = wifiNotificationManager;
-
-        mInsecureEapNetworkHandlerCallbacksImpl =
-                new InsecureEapNetworkHandler.InsecureEapNetworkHandlerCallbacks() {
-                @Override
-                public void onAccept(String ssid) {
-                    log("Accept Root CA cert for " + ssid);
-                    sendMessage(CMD_ACCEPT_EAP_SERVER_CERTIFICATE, ssid);
-                }
-
-                @Override
-                public void onReject(String ssid) {
-                    log("Reject Root CA cert for " + ssid);
-                    sendMessage(CMD_REJECT_EAP_SERVER_CERTIFICATE,
-                            WifiMetricsProto.ConnectionEvent.AUTH_FAILURE_REJECTED_BY_USER,
-                            0, ssid);
-                }
-
-                @Override
-                public void onError(String ssid) {
-                    log("Insecure EAP network error for " + ssid);
-                    sendMessage(CMD_REJECT_EAP_SERVER_CERTIFICATE,
-                            WifiMetricsProto.ConnectionEvent.AUTH_FAILURE_EAP_FAILURE,
-                            0, ssid);
-                }};
-        mInsecureEapNetworkHandler = new InsecureEapNetworkHandler(
-                mContext,
-                mWifiConfigManager,
-                mWifiNative,
-                mFacade,
-                mNotificationManager,
-                mWifiInjector.getWifiDialogManager(),
-                isTrustOnFirstUseSupported(),
-                mWifiGlobals.isInsecureEnterpriseConfigurationAllowed(),
-                mInsecureEapNetworkHandlerCallbacksImpl,
-                mInterfaceName,
-                getHandler());
-
         addState(mConnectableState); {
             addState(mConnectingOrConnectedState, mConnectableState); {
                 addState(mL2ConnectingState, mConnectingOrConnectedState);
@@ -902,10 +819,6 @@
             WifiMonitor.MBO_OCE_BSS_TM_HANDLING_DONE,
             WifiMonitor.TRANSITION_DISABLE_INDICATION,
             WifiMonitor.NETWORK_NOT_FOUND_EVENT,
-            WifiMonitor.TOFU_ROOT_CA_CERTIFICATE,
-            WifiMonitor.AUXILIARY_SUPPLICANT_EVENT,
-            WifiMonitor.QOS_POLICY_RESET_EVENT,
-            WifiMonitor.QOS_POLICY_REQUEST_EVENT,
     };
 
     private void registerForWifiMonitorEvents()  {
@@ -929,7 +842,7 @@
     private static boolean isValidBssid(String bssidStr) {
         try {
             MacAddress bssid = MacAddress.fromString(bssidStr);
-            return !Objects.equals(bssid, WifiManager.ALL_ZEROS_MAC_ADDRESS);
+            return !bssid.equals(WifiManager.ALL_ZEROS_MAC_ADDRESS);
         } catch (IllegalArgumentException e) {
             return false;
         }
@@ -941,33 +854,6 @@
         }
     }
 
-    /*
-     * Log wifi event to SecurityLog if the event occurred on a managed network.
-     */
-    private void logEventIfManagedNetwork(@Nullable WifiConfiguration config,
-            @SupplicantEventCode int eventCode, MacAddress bssid, String reasonString) {
-        if (!SdkLevel.isAtLeastT() || config == null
-                || !mWifiPermissionsUtil.isAdmin(config.creatorUid, config.creatorName)) {
-            return;
-        }
-
-        int numRedactedOctets = mContext.getResources()
-                .getInteger(R.integer.config_wifiNumMaskedBssidOctetsInSecurityLog);
-        String redactedBssid = ScanResultUtil.redactBssid(bssid, numRedactedOctets);
-        if (eventCode == SupplicantStaIfaceHal.SUPPLICANT_EVENT_DISCONNECTED) {
-            SecurityLog.writeEvent(SecurityLog.TAG_WIFI_DISCONNECTION, redactedBssid, reasonString);
-        } else {
-            SecurityLog.writeEvent(SecurityLog.TAG_WIFI_CONNECTION,
-                    SupplicantStaIfaceHal.supplicantEventCodeToString(eventCode),
-                    redactedBssid, reasonString);
-        }
-    }
-
-    protected void clearQueuedQosMessages() {
-        removeMessages(WifiMonitor.QOS_POLICY_RESET_EVENT);
-        removeMessages(WifiMonitor.QOS_POLICY_REQUEST_EVENT);
-    }
-
     /**
      * Class to implement the MulticastLockManager.FilterController callback.
      */
@@ -1050,11 +936,6 @@
         }
 
         @Override
-        public void onReachabilityFailure(ReachabilityLossInfoParcelable lossInfo) {
-            sendMessage(CMD_IP_REACHABILITY_FAILURE, lossInfo);
-        }
-
-        @Override
         public void installPacketFilter(byte[] filter) {
             sendMessage(CMD_INSTALL_PACKET_FILTER, filter);
         }
@@ -1114,20 +995,6 @@
         stopIpClient();
     }
 
-    private List<DhcpOption> convertToInternalDhcpOptions(List<android.net.DhcpOption> options) {
-        List<DhcpOption> internalOptions = new ArrayList<DhcpOption>();
-        for (android.net.DhcpOption option : options) {
-            DhcpOption internalOption = new DhcpOption();
-            internalOption.type = option.getType();
-            if (option.getValue() != null) {
-                byte[] value = option.getValue();
-                internalOption.value = Arrays.copyOf(value, value.length);
-            }
-            internalOptions.add(internalOption);
-        }
-        return internalOptions;
-    }
-
     /**
      * Listener for config manager network config related events.
      * TODO (b/117601161) : Move some of the existing handling in WifiConnectivityManager's listener
@@ -1160,36 +1027,31 @@
                 mWifiBlocklistMonitor.handleNetworkRemoved(newConfig.SSID);
             }
 
-            if (newConfig.networkId != mLastNetworkId)  {
+            // Check if user/app change meteredOverride for connected network.
+            if (newConfig.networkId != mLastNetworkId
+                    || newConfig.meteredOverride == oldConfig.meteredOverride) {
                 // nothing to do.
                 return;
             }
             boolean isMetered = WifiConfiguration.isMetered(newConfig, mWifiInfo);
             boolean wasMetered = WifiConfiguration.isMetered(oldConfig, mWifiInfo);
-            // Check if user/app change meteredOverride or trusted for connected network.
-            if (isMetered == wasMetered
-                    && (!SdkLevel.isAtLeastT() || newConfig.trusted == oldConfig.trusted)) {
+            if (isMetered == wasMetered) {
+                // no meteredness change, nothing to do.
+                if (mVerboseLoggingEnabled) {
+                    Log.v(getTag(), "User/app changed meteredOverride, "
+                            + "but no change in meteredness");
+                }
                 return;
             }
-
-            if (SdkLevel.isAtLeastT()) {
-                mWifiInfo.setTrusted(newConfig.trusted);
-                if (!newConfig.trusted) {
-                    Log.w(getTag(), "Network marked untrusted, triggering disconnect");
-                    sendMessage(CMD_DISCONNECT, StaEvent.DISCONNECT_NETWORK_UNTRUSTED);
-                    return;
-                }
-            }
-
+            // If unmetered->metered trigger a disconnect.
+            // If metered->unmetered update capabilities.
             if (isMetered) {
                 Log.w(getTag(), "Network marked metered, triggering disconnect");
                 sendMessage(CMD_DISCONNECT, StaEvent.DISCONNECT_NETWORK_METERED);
-                return;
+            } else {
+                Log.i(getTag(), "Network marked unmetered, triggering capabilities update");
+                updateCapabilities(newConfig);
             }
-
-            Log.i(getTag(), "Network marked metered=" + isMetered
-                    + " trusted=" + newConfig.trusted + ", triggering capabilities update");
-            updateCapabilities(newConfig);
         }
 
         @Override
@@ -1253,7 +1115,6 @@
 
         mWifiScoreReport.enableVerboseLogging(mVerboseLoggingEnabled);
         mSupplicantStateTracker.enableVerboseLogging(mVerboseLoggingEnabled);
-        mQosPolicyRequestHandler.enableVerboseLogging(mVerboseLoggingEnabled);
     }
 
     /**
@@ -1290,17 +1151,10 @@
      * @param uid UID of the app requesting the connection.
      * @param forceReconnect Whether to force a connection even if we're connected to the same
      *                       network currently.
-     * @param packageName package name of the app requesting the connection.
      */
-    private void connectToUserSelectNetwork(int netId, int uid, boolean forceReconnect,
-            @NonNull String packageName) {
-        if (mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
-                || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid)) {
-            mIsUserSelected = true;
-        }
-        logd("connectToUserSelectNetwork netId " + netId + ", uid " + uid + ", package "
-                + packageName + ", forceReconnect = " + forceReconnect + ", isUserSelected = "
-                + mIsUserSelected);
+    private void connectToUserSelectNetwork(int netId, int uid, boolean forceReconnect) {
+        logd("connectToUserSelectNetwork netId " + netId + ", uid " + uid
+                + ", forceReconnect = " + forceReconnect);
         updateSaeAutoUpgradeFlagForUserSelectNetwork(netId);
         if (!forceReconnect && (mLastNetworkId == netId || mTargetNetworkId == netId)) {
             // We're already connecting/connected to the user specified network, don't trigger a
@@ -1308,7 +1162,7 @@
             logi("connectToUserSelectNetwork already connecting/connected=" + netId);
         } else {
             mWifiConnectivityManager.prepareForForcedConnection(netId);
-            if (UserHandle.getAppId(uid) == Process.SYSTEM_UID) {
+            if (uid == Process.SYSTEM_UID) {
                 mWifiMetrics.setNominatorForNetwork(netId,
                         WifiMetricsProto.ConnectionEvent.NOMINATOR_MANUAL);
             }
@@ -1372,49 +1226,21 @@
         mRxTimeLastReport = mRxTime;
         int period = (int) (now - mLastOntimeReportTimeStamp);
         mLastOntimeReportTimeStamp = now;
-        sb.append("[on:" + on + " tx:" + tx + " rx:" + rx + " period:" + period + "]");
+        sb.append(String.format("[on:%d tx:%d rx:%d period:%d]", on, tx, rx, period));
         // Report stats since Screen State Changed
         on = mOnTime - mOnTimeScreenStateChange;
         period = (int) (now - mLastScreenStateChangeTimeStamp);
-        sb.append(" from screen [on:" + on + " period:" + period + "]");
+        sb.append(String.format(" from screen [on:%d period:%d]", on, period));
         return sb.toString();
     }
 
-    /**
-     * receives changes in the interface up/down events for the interface associated with this
-     * ClientModeImpl. This is expected to be called from the ClientModeManager running on the
-     * wifi handler thread.
-     */
-    public void onUpChanged(boolean isUp) {
-        if (isUp && mFailedToResetMacAddress) {
-            // When the firmware does a subsystem restart, wifi will disconnect but we may fail to
-            // re-randomize the MAC address of the interface since it's undergoing recovery. Thus,
-            // check every time the interface goes up and re-randomize if the failure was detected.
-            if (mWifiGlobals.isConnectedMacRandomizationEnabled()) {
-                mFailedToResetMacAddress = !mWifiNative.setStaMacAddress(
-                        mInterfaceName, MacAddressUtils.createRandomUnicastAddress());
-                if (mFailedToResetMacAddress) {
-                    Log.e(getTag(), "Failed to set random MAC address on interface up");
-                }
-            }
-        }
-        // No need to handle interface down since it's already handled in the ClientModeManager.
-    }
-
     public WifiLinkLayerStats getWifiLinkLayerStats() {
         if (mInterfaceName == null) {
             loge("getWifiLinkLayerStats called without an interface");
             return null;
         }
         mLastLinkLayerStatsUpdate = mClock.getWallClockMillis();
-        WifiLinkLayerStats stats = null;
-        if (isPrimary()) {
-            stats = mWifiNative.getWifiLinkLayerStats(mInterfaceName);
-        } else {
-            if (mVerboseLoggingEnabled) {
-                Log.w(getTag(), "Can't getWifiLinkLayerStats on secondary iface");
-            }
-        }
+        WifiLinkLayerStats stats = mWifiNative.getWifiLinkLayerStats(mInterfaceName);
         if (stats != null) {
             mOnTime = stats.on_time;
             mTxTime = stats.tx_time;
@@ -1437,11 +1263,8 @@
     private void updateInterfaceCapabilities() {
         DeviceWiphyCapabilities cap = getDeviceWiphyCapabilities();
         if (cap != null) {
-            // Some devices don't have support of 11ax/be indicated by the chip,
+            // Some devices don't have support of 11ax indicated by the chip,
             // so an override config value is used
-            if (mContext.getResources().getBoolean(R.bool.config_wifi11beSupportOverride)) {
-                cap.setWifiStandardSupport(ScanResult.WIFI_STANDARD_11BE, true);
-            }
             if (mContext.getResources().getBoolean(R.bool.config_wifi11axSupportOverride)) {
                 cap.setWifiStandardSupport(ScanResult.WIFI_STANDARD_11AX, true);
             }
@@ -1843,12 +1666,9 @@
         pw.println("mSuspendOptimizationsEnabled " + mContext.getResources().getBoolean(
                 R.bool.config_wifiSuspendOptimizationsEnabled));
         pw.println("mSuspendOptNeedsDisabled " + mSuspendOptNeedsDisabled);
-        pw.println("mPowerSaveDisableRequests " + mPowerSaveDisableRequests);
         dumpIpClient(fd, pw, args);
         pw.println("WifiScoreReport:");
         mWifiScoreReport.dump(fd, pw, args);
-        pw.println("QosPolicyRequestHandler:");
-        mQosPolicyRequestHandler.dump(fd, pw, args);
         pw.println();
     }
 
@@ -1963,10 +1783,7 @@
                     sb.append(" BSSID=").append((String) msg.obj);
                 }
                 if (mTargetBssid != null) {
-                    sb.append(" Target Bssid=").append(mTargetBssid);
-                }
-                if (mLastBssid != null) {
-                    sb.append(" Last Bssid=").append(mLastBssid);
+                    sb.append(" Target=").append(mTargetBssid);
                 }
                 sb.append(" roam=").append(Boolean.toString(mIsAutoRoaming));
                 break;
@@ -2001,19 +1818,16 @@
                 sb.append(" f=").append(mWifiInfo.getFrequency());
                 sb.append(" sc=").append(mWifiInfo.getScore());
                 sb.append(" link=").append(mWifiInfo.getLinkSpeed());
-                sb.append(" tx=").append(
-                        ((int) (mWifiInfo.getSuccessfulTxPacketsPerSecond() * 10)) / 10.0);
-                sb.append(", ").append(
-                        ((int) (mWifiInfo.getRetriedTxPacketsPerSecond() * 10)) / 10.0);
-                sb.append(", ").append(((int) (mWifiInfo.getLostTxPacketsPerSecond() * 10)) / 10.0);
-                sb.append(" rx=").append(
-                        ((int) (mWifiInfo.getSuccessfulRxPacketsPerSecond() * 10)) / 10.0);
-                sb.append(" bcn=" + mRunningBeaconCount);
+                sb.append(String.format(" tx=%.1f,", mWifiInfo.getSuccessfulTxPacketsPerSecond()));
+                sb.append(String.format(" %.1f,", mWifiInfo.getRetriedTxPacketsPerSecond()));
+                sb.append(String.format(" %.1f ", mWifiInfo.getLostTxPacketsPerSecond()));
+                sb.append(String.format(" rx=%.1f", mWifiInfo.getSuccessfulRxPacketsPerSecond()));
+                sb.append(String.format(" bcn=%d", mRunningBeaconCount));
                 report = reportOnTime();
                 if (report != null) {
                     sb.append(" ").append(report);
                 }
-                sb.append(" score=" + mWifiInfo.getScore());
+                sb.append(String.format(" score=%d", mWifiInfo.getScore()));
                 break;
             case CMD_START_CONNECT:
                 sb.append(" ");
@@ -2098,7 +1912,7 @@
                 if (mWifiInfo.getBSSID() != null) {
                     sb.append(" ").append(mWifiInfo.getBSSID());
                 }
-                sb.append(" bcn=" + mRunningBeaconCount);
+                sb.append(String.format(" bcn=%d", mRunningBeaconCount));
                 break;
             case CMD_UPDATE_LINKPROPERTIES:
                 sb.append(" ");
@@ -2115,11 +1929,6 @@
                     sb.append(" ").append((String) msg.obj);
                 }
                 break;
-            case CMD_IP_REACHABILITY_FAILURE:
-                if (msg.obj != null) {
-                    sb.append(" ").append(/* ReachabilityLossInfoParcelable */ msg.obj);
-                }
-                break;
             case CMD_INSTALL_PACKET_FILTER:
                 sb.append(" len=" + ((byte[]) msg.obj).length);
                 break;
@@ -2187,6 +1996,8 @@
                 return "CMD_CONNECTING_WATCHDOG_TIMER";
             case CMD_CONNECT_NETWORK:
                 return "CMD_CONNECT_NETWORK";
+            case CMD_DIAGS_CONNECT_TIMEOUT:
+                return "CMD_DIAGS_CONNECT_TIMEOUT";
             case CMD_DISCONNECT:
                 return "CMD_DISCONNECT";
             case CMD_ENABLE_RSSI_POLL:
@@ -2199,8 +2010,6 @@
                 return "CMD_IP_CONFIGURATION_SUCCESSFUL";
             case CMD_IP_REACHABILITY_LOST:
                 return "CMD_IP_REACHABILITY_LOST";
-            case CMD_IP_REACHABILITY_FAILURE:
-                return "CMD_IP_REACHABILITY_FAILURE";
             case CMD_IPV4_PROVISIONING_FAILURE:
                 return "CMD_IPV4_PROVISIONING_FAILURE";
             case CMD_IPV4_PROVISIONING_SUCCESS:
@@ -2257,10 +2066,6 @@
                 return "CMD_UNWANTED_NETWORK";
             case CMD_UPDATE_LINKPROPERTIES:
                 return "CMD_UPDATE_LINKPROPERTIES";
-            case CMD_ACCEPT_EAP_SERVER_CERTIFICATE:
-                return "CMD_ACCEPT_EAP_SERVER_CERTIFICATE";
-            case CMD_REJECT_EAP_SERVER_CERTIFICATE:
-                return "CMD_REJECT_EAP_SERVER_CERTIFICATE";
             case WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT:
                 return "SUPPLICANT_STATE_CHANGE_EVENT";
             case WifiMonitor.AUTHENTICATION_FAILURE_EVENT:
@@ -2271,10 +2076,6 @@
                 return "NETWORK_CONNECTION_EVENT";
             case WifiMonitor.NETWORK_DISCONNECTION_EVENT:
                 return "NETWORK_DISCONNECTION_EVENT";
-            case WifiMonitor.ASSOCIATED_BSSID_EVENT:
-                return "ASSOCIATED_BSSID_EVENT";
-            case WifiMonitor.TARGET_BSSID_EVENT:
-                return "TARGET_BSSID_EVENT";
             case WifiMonitor.ASSOCIATION_REJECTION_EVENT:
                 return "ASSOCIATION_REJECTION_EVENT";
             case WifiMonitor.ANQP_DONE_EVENT:
@@ -2309,8 +2110,6 @@
                 return "BLOCK_DISCOVERY";
             case WifiMonitor.NETWORK_NOT_FOUND_EVENT:
                 return "NETWORK_NOT_FOUND_EVENT";
-            case WifiMonitor.TOFU_ROOT_CA_CERTIFICATE:
-                return "TOFU_ROOT_CA_CERTIFICATE";
             default:
                 return "what:" + what;
         }
@@ -2321,31 +2120,6 @@
         return mClientModeManager.getRole() == ROLE_CLIENT_PRIMARY;
     }
 
-    /** Check whether this connection is the secondary internet wifi connection. */
-    private boolean isSecondaryInternet() {
-        return mClientModeManager.getRole() == ROLE_CLIENT_SECONDARY_LONG_LIVED
-                && mClientModeManager.isSecondaryInternet();
-    }
-
-    /** Check whether this connection is for local only network. */
-    private boolean isLocalOnly() {
-        return mClientModeManager.getRole() == ROLE_CLIENT_LOCAL_ONLY;
-    }
-
-    /**
-     * Check if originaly requested as local only for ClientModeManager before fallback.
-     * A secondary role could fallback to primary due to hardware support limit.
-     * @return true if the original request for ClientModeManager is local only.
-     */
-    public boolean isRequestedForLocalOnly(WifiConfiguration currentWifiConfiguration,
-            String currentBssid) {
-        Set<Integer> uids =
-                mNetworkFactory.getSpecificNetworkRequestUids(
-                        currentWifiConfiguration, currentBssid);
-        // Check if there is an active specific request in WifiNetworkFactory for local only.
-        return !uids.isEmpty();
-    }
-
     private void handleScreenStateChanged(boolean screenOn) {
         mScreenOn = screenOn;
         if (mVerboseLoggingEnabled) {
@@ -2355,7 +2129,7 @@
                             R.bool.config_wifiSuspendOptimizationsEnabled)
                     + " state " + getCurrentState().getName());
         }
-        if (isPrimary() || isSecondaryInternet()) {
+        if (isPrimary()) {
             // Only enable RSSI polling on primary STA, none of the secondary STA use-cases
             // can become the default route when other networks types that provide internet
             // connectivity (e.g. cellular) are available. So, no point in scoring
@@ -2379,9 +2153,7 @@
             }
         }
 
-        if (isConnected()) {
-            getWifiLinkLayerStats();
-        }
+        getWifiLinkLayerStats();
         mOnTimeScreenStateChange = mOnTime;
         mLastScreenStateChangeTimeStamp = mLastLinkLayerStatsUpdate;
 
@@ -2438,8 +2210,7 @@
      * Fetch link layer stats, RSSI, linkspeed, and frequency on current connection
      * and update Network capabilities
      */
-    private WifiLinkLayerStats updateLinkLayerStatsRssiSpeedFrequencyCapabilities(long txBytes,
-            long rxBytes) {
+    private WifiLinkLayerStats updateLinkLayerStatsRssiSpeedFrequencyCapabilities() {
         WifiLinkLayerStats stats = getWifiLinkLayerStats();
         WifiNl80211Manager.SignalPollResult pollResult = mWifiNative.signalPoll(mInterfaceName);
         if (pollResult == null) {
@@ -2501,13 +2272,11 @@
                 // TODO (b/162602799): Do we need to change the update frequency?
                 sendRssiChangeBroadcast(newRssi);
             }
-            updateLinkBandwidthAndCapabilities(stats, newSignalLevel != mLastSignalLevel, txBytes,
-                    rxBytes);
+            updateLinkBandwidthAndCapabilities(stats, newSignalLevel != mLastSignalLevel);
             mLastSignalLevel = newSignalLevel;
         } else {
             mWifiInfo.setRssi(WifiInfo.INVALID_RSSI);
             updateCapabilities();
-            mLastSignalLevel = -1;
         }
         mWifiConfigManager.updateScanDetailCacheFromWifiInfo(mWifiInfo);
         /*
@@ -2520,9 +2289,9 @@
     // Update the link bandwidth. If the link bandwidth changes by a large amount or signal level
     // changes, also update network capabilities.
     private void updateLinkBandwidthAndCapabilities(WifiLinkLayerStats stats,
-            boolean hasSignalLevelChanged, long txBytes, long rxBytes) {
+            boolean hasSignalLevelChanged) {
         WifiScoreCard.PerNetwork network = mWifiScoreCard.lookupNetwork(mWifiInfo.getSSID());
-        network.updateLinkBandwidth(mLastLinkLayerStats, stats, mWifiInfo, txBytes, rxBytes);
+        network.updateLinkBandwidth(mLastLinkLayerStats, stats, mWifiInfo);
         int newTxKbps = network.getTxLinkBandwidthKbps();
         int newRxKbps = network.getRxLinkBandwidthKbps();
         int txDeltaKbps = Math.abs(newTxKbps - mLastTxKbps);
@@ -2729,21 +2498,6 @@
         return Arrays.asList(matchingScanResult.informationElements);
     }
 
-    private void setMultiLinkInfo(@Nullable String bssid) {
-        if (bssid == null) return;
-        ScanResult matchingScanResult = mScanRequestProxy.getScanResult(bssid);
-        if (matchingScanResult == null) return;
-        if (matchingScanResult.getApMldMacAddress() != null) {
-            mWifiInfo.setApMldMacAddress(matchingScanResult.getApMldMacAddress());
-            mWifiInfo.setApMloLinkId(matchingScanResult.getApMloLinkId());
-            mWifiInfo.setAffiliatedMloLinks(matchingScanResult.getAffiliatedMloLinks());
-        } else {
-            mWifiInfo.setApMldMacAddress(null);
-            mWifiInfo.setApMloLinkId(MloLink.INVALID_MLO_LINK_ID);
-            mWifiInfo.setAffiliatedMloLinks(Collections.emptyList());
-        }
-    }
-
     private SupplicantState handleSupplicantStateChange(StateChangeResult stateChangeResult) {
         SupplicantState state = stateChangeResult.state;
         mWifiScoreCard.noteSupplicantStateChanging(mWifiInfo, state);
@@ -2757,7 +2511,6 @@
             mWifiInfo.setNetworkId(stateChangeResult.networkId);
             mWifiInfo.setBSSID(stateChangeResult.bssid);
             mWifiInfo.setSSID(stateChangeResult.wifiSsid);
-            setMultiLinkInfo(stateChangeResult.bssid);
             if (state == SupplicantState.ASSOCIATED) {
                 updateWifiInfoLinkParamsAfterAssociation();
             }
@@ -2770,7 +2523,6 @@
             mWifiInfo.setWifiStandard(ScanResult.WIFI_STANDARD_UNKNOWN);
             mWifiInfo.setInformationElements(null);
             mWifiInfo.clearCurrentSecurityType();
-            mWifiInfo.resetMultiLinkInfo();
         }
         updateLayer2Information();
         // SSID might have been updated, so call updateCapabilities
@@ -2811,13 +2563,12 @@
         mWifiInfo.setCarrierMerged(config.carrierMerged);
         mWifiInfo.setSubscriptionId(config.subscriptionId);
         mWifiInfo.setOsuAp(config.osu);
-        mWifiInfo.setRestricted(config.restricted);
         if (config.fromWifiNetworkSpecifier || config.fromWifiNetworkSuggestion) {
             mWifiInfo.setRequestingPackageName(config.creatorName);
         }
         mWifiInfo.setIsPrimary(isPrimary());
         SecurityParams securityParams = config.getNetworkSelectionStatus()
-                .getLastUsedSecurityParams();
+                .getCandidateSecurityParams();
         if (securityParams != null) {
             mWifiInfo.setCurrentSecurityType(securityParams.getSecurityType());
         } else {
@@ -2837,18 +2588,6 @@
         mWifiInfo.setMaxSupportedRxLinkSpeedMbps(maxRxLinkSpeedMbps);
         mWifiMetrics.setConnectionMaxSupportedLinkSpeedMbps(mInterfaceName,
                 maxTxLinkSpeedMbps, maxRxLinkSpeedMbps);
-        if (mLastConnectionCapabilities.wifiStandard == ScanResult.WIFI_STANDARD_11BE) {
-            WifiNative.ConnectionMloLinksInfo info =
-                    mWifiNative.getConnectionMloLinksInfo(mInterfaceName);
-            if (info != null) {
-                for (int i = 0; i < info.links.length; i++) {
-                    mWifiInfo.updateMloLinkStaAddress(info.links[i].linkId,
-                            info.links[i].staMacAddress);
-                    mWifiInfo.updateMloLinkState(
-                            info.links[i].linkId, MloLink.MLO_LINK_STATE_ACTIVE);
-                }
-            }
-        }
         if (mVerboseLoggingEnabled) {
             StringBuilder sb = new StringBuilder();
             logd(sb.append("WifiStandard: ").append(mLastConnectionCapabilities.wifiStandard)
@@ -2925,7 +2664,7 @@
 
         // DISASSOC_AP_BUSY could be received in both after L3 connection is successful or right
         // after BSSID association if the AP can't accept more stations.
-        if (disconnectReason == StaIfaceReasonCode.DISASSOC_AP_BUSY) {
+        if (disconnectReason == ReasonCode.DISASSOC_AP_BUSY) {
             mWifiConfigManager.setRecentFailureAssociationStatus(
                     mWifiInfo.getNetworkId(),
                     WifiConfiguration.RECENT_FAILURE_DISCONNECTION_AP_BUSY);
@@ -2942,7 +2681,6 @@
         if (mNetworkAgent != null) {
             mNetworkAgent.unregister();
             mNetworkAgent = null;
-            mQosPolicyRequestHandler.setNetworkAgent(null);
         }
 
         /* Clear network properties */
@@ -2953,15 +2691,10 @@
         registerDisconnected();
         mLastNetworkId = WifiConfiguration.INVALID_NETWORK_ID;
         mLastSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
-        mCurrentConnectionDetectedCaptivePortal = false;
         mLastSimBasedConnectionCarrierName = null;
         checkAbnormalDisconnectionAndTakeBugReport();
         mWifiScoreCard.resetConnectionState(mInterfaceName);
         updateLayer2Information();
-        // If there is new connection in progress, this is for the new connection, so keept it.
-        if (!newConnectionInProgress) {
-            mIsUserSelected = false;
-        }
     }
 
     void handlePreDhcpSetup() {
@@ -2992,7 +2725,7 @@
         // power settings when we control suspend mode optimizations.
         // TODO: Remove this comment when the driver is fixed.
         setSuspendOptimizationsNative(SUSPEND_DUE_TO_DHCP, false);
-        setPowerSave(POWER_SAVE_CLIENT_DHCP, false);
+        setPowerSave(false);
 
         // Update link layer stats
         getWifiLinkLayerStats();
@@ -3033,7 +2766,7 @@
     void handlePostDhcpSetup() {
         /* Restore power save and suspend optimizations */
         setSuspendOptimizationsNative(SUSPEND_DUE_TO_DHCP, true);
-        setPowerSave(POWER_SAVE_CLIENT_DHCP, true);
+        setPowerSave(true);
 
         mWifiP2pConnection.sendMessage(
                 WifiP2pServiceImpl.BLOCK_DISCOVERY, WifiP2pServiceImpl.DISABLED);
@@ -3050,25 +2783,12 @@
      *           false to disable power save.
      * @return true for success, false for failure
      */
-    public boolean setPowerSave(@PowerSaveClientType int client, boolean ps) {
+    public boolean setPowerSave(boolean ps) {
         if (mInterfaceName != null) {
             if (mVerboseLoggingEnabled) {
-                Log.d(getTag(), "Request to set power save for: " + mInterfaceName + " to: " + ps
-                        + " requested by: " + client + ", mPowerSaveDisableRequests = "
-                        + mPowerSaveDisableRequests);
+                Log.d(getTag(), "Setting power save for: " + mInterfaceName + " to: " + ps);
             }
-            if (ps) {
-                mPowerSaveDisableRequests &= ~client;
-            } else {
-                mPowerSaveDisableRequests |= client;
-            }
-            boolean actualPs = mPowerSaveDisableRequests == 0;
-            if (mVerboseLoggingEnabled) {
-                Log.d(getTag(), "Setting power save to: " + actualPs
-                        + ", mPowerSaveDisableRequests = " + mPowerSaveDisableRequests);
-            }
-
-            mWifiNative.setPowerSave(mInterfaceName, actualPs);
+            mWifiNative.setPowerSave(mInterfaceName, ps);
         } else {
             Log.e(getTag(), "Failed to setPowerSave, interfaceName is null");
             return false;
@@ -3077,15 +2797,6 @@
     }
 
     /**
-     * Enable power save.
-     *
-     * @return true for success, false for failure.
-     */
-    public boolean enablePowerSave() {
-        return setPowerSave(~0, true);
-    }
-
-    /**
      * Set low latency mode
      *
      * @param enabled true to enable low latency
@@ -3103,6 +2814,8 @@
         return true;
     }
 
+    @VisibleForTesting
+    public static final long DIAGS_CONNECT_TIMEOUT_MILLIS = 60 * 1000;
     /**
      * Inform other components that a new connection attempt is starting.
      */
@@ -3122,6 +2835,8 @@
         if (isPrimary()) {
             mWrongPasswordNotifier.onNewConnectionAttempt();
         }
+        removeMessages(CMD_DIAGS_CONNECT_TIMEOUT);
+        sendMessageDelayed(CMD_DIAGS_CONNECT_TIMEOUT, DIAGS_CONNECT_TIMEOUT_MILLIS);
     }
 
     private void handleConnectionAttemptEndForDiagnostics(int level2FailureCode) {
@@ -3132,11 +2847,8 @@
                 // WifiDiagnostics doesn't care about pre-empted connections, or cases
                 // where we failed to initiate a connection attempt with supplicant.
                 break;
-            case WifiMetrics.ConnectionEvent.FAILURE_NO_RESPONSE:
-                mWifiDiagnostics.reportConnectionEvent(
-                        WifiDiagnostics.CONNECTION_EVENT_TIMEOUT, mClientModeManager);
-                break;
             default:
+                removeMessages(CMD_DIAGS_CONNECT_TIMEOUT);
                 mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_FAILED,
                         mClientModeManager);
         }
@@ -3167,21 +2879,15 @@
                 mWifiScoreCard.noteConnectionFailure(mWifiInfo, mLastScanRssi, ssid,
                         blocklistReason);
                 checkAbnormalConnectionFailureAndTakeBugReport(ssid);
-                mWifiBlocklistMonitor.handleBssidConnectionFailure(bssid, configuration,
+                mWifiBlocklistMonitor.handleBssidConnectionFailure(bssid, ssid,
                         blocklistReason, mLastScanRssi);
                 WifiScoreCard.NetworkConnectionStats recentStats = mWifiScoreCard.lookupNetwork(
                         ssid).getRecentStats();
                 if (recentStats.getCount(WifiScoreCard.CNT_CONSECUTIVE_CONNECTION_FAILURE)
-                        >= WifiBlocklistMonitor.NUM_CONSECUTIVE_FAILURES_PER_NETWORK_EXP_BACKOFF
-                        && configuration.getNetworkSelectionStatus().isNetworkEnabled()) {
+                        >= WifiBlocklistMonitor.NUM_CONSECUTIVE_FAILURES_PER_NETWORK_EXP_BACKOFF) {
                     mWifiConfigManager.updateNetworkSelectionStatus(mTargetNetworkId,
                             WifiConfiguration.NetworkSelectionStatus.DISABLED_CONSECUTIVE_FAILURES);
                 }
-                if (recentStats.getCount(WifiScoreCard.CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE)
-                        >= THRESHOLD_TO_PERM_WRONG_PASSWORD) {
-                    mWifiConfigManager.updateNetworkSelectionStatus(mTargetNetworkId,
-                            WifiConfiguration.NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD);
-                }
             }
         }
 
@@ -3213,10 +2919,9 @@
 
         mWifiMetrics.endConnectionEvent(mInterfaceName, level2FailureCode,
                 connectivityFailureCode, level2FailureReason, mWifiInfo.getFrequency());
+        mWifiConnectivityManager.handleConnectionAttemptEnded(
+                mClientModeManager, level2FailureCode, bssid, ssid);
         if (configuration != null) {
-            mWifiConnectivityManager.handleConnectionAttemptEnded(
-                    mClientModeManager, level2FailureCode, level2FailureReason, bssid,
-                    configuration);
             mNetworkFactory.handleConnectionAttemptEnded(level2FailureCode, configuration, bssid);
             mWifiNetworkSuggestionsManager.handleConnectionAttemptEnded(
                     level2FailureCode, configuration, getConnectedBssidInternal());
@@ -3234,8 +2939,8 @@
         if (config == null) return;
 
         switch(reason) {
-            case StaIfaceReasonCode.UNSPECIFIED:
-            case StaIfaceReasonCode.DEAUTH_LEAVING:
+            case ReasonCode.UNSPECIFIED:
+            case ReasonCode.DEAUTH_LEAVING:
                 logi("Keep PMK cache for network disconnection reason " + reason);
                 break;
             default:
@@ -3286,8 +2991,6 @@
                     return WifiBlocklistMonitor.REASON_NONLOCAL_DISCONNECT_CONNECTING;
                 }
                 return -1;
-            case WifiMetrics.ConnectionEvent.FAILURE_NO_RESPONSE:
-                return WifiBlocklistMonitor.REASON_FAILURE_NO_RESPONSE;
             default:
                 return -1;
         }
@@ -3357,6 +3060,10 @@
             }
             log("DHCP failure count=" + count);
         }
+        reportConnectionAttemptEnd(
+                WifiMetrics.ConnectionEvent.FAILURE_DHCP,
+                WifiMetricsProto.ConnectionEvent.HLF_DHCP,
+                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN);
         synchronized (mDhcpResultsParcelableLock) {
             mDhcpResultsParcelable = new DhcpResultsParcelable();
         }
@@ -3387,110 +3094,15 @@
         mWifiNative.disconnect(mInterfaceName);
     }
 
-    private void handleIpReachabilityFailure(ReachabilityLossInfoParcelable lossInfo) {
-        if (lossInfo == null || lossInfo.reason == ReachabilityLossReason.CONFIRM
-                || lossInfo.reason == ReachabilityLossReason.ORGANIC) {
-            mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_CMD_IP_REACHABILITY_LOST);
-            mWifiMetrics.logWifiIsUnusableEvent(mInterfaceName,
-                    WifiIsUnusableEvent.TYPE_IP_REACHABILITY_LOST);
-            mWifiMetrics.addToWifiUsabilityStatsList(mInterfaceName,
-                    WifiUsabilityStats.LABEL_BAD,
-                    WifiUsabilityStats.TYPE_IP_REACHABILITY_LOST, -1);
-            if (mWifiGlobals.getIpReachabilityDisconnectEnabled()) {
-                handleIpReachabilityLost();
-            } else {
-                logd("CMD_IP_REACHABILITY_LOST but disconnect disabled -- ignore");
-            }
-            return;
-        }
-
-        if (lossInfo.reason == ReachabilityLossReason.ROAM) {
-            WifiConfiguration config = getConnectedWifiConfigurationInternal();
-            if (config == null) {
-                // special case for IP reachability lost which happens right after linked network
-                // roaming. The linked network roaming reset the mLastNetworkId which results in
-                // the connected configuration to be null.
-                config = getConnectingWifiConfigurationInternal();
-            }
-            final NetworkAgentConfig naConfig = getNetworkAgentConfigInternal(config);
-            final NetworkCapabilities nc = getCapabilities(
-                    getConnectedWifiConfigurationInternal(), getConnectedBssidInternal());
-
-            mWifiInfo.setInetAddress(null);
-            if (mNetworkAgent != null) {
-                if (SdkLevel.isAtLeastT()) {
-                    mNetworkAgent.unregisterAfterReplacement(NETWORK_AGENT_TEARDOWN_DELAY_MS);
-                } else {
-                    mNetworkAgent.unregister();
-                }
-            }
-            mNetworkAgent = mWifiInjector.makeWifiNetworkAgent(nc, mLinkProperties, naConfig,
-                    mNetworkFactory.getProvider(), new WifiNetworkAgentCallback());
-            mWifiScoreReport.setNetworkAgent(mNetworkAgent);
-            if (SdkLevel.isAtLeastT()) {
-                mQosPolicyRequestHandler.setNetworkAgent(mNetworkAgent);
-            }
-
-            transitionTo(mL3ProvisioningState);
-        } else {
-            logd("Invalid failure reason from onIpReachabilityFailure");
-        }
-    }
-
-    private NetworkAgentConfig getNetworkAgentConfigInternal(WifiConfiguration config) {
-        boolean explicitlySelected = false;
-        // Non primary CMMs is never user selected. This prevents triggering the No Internet
-        // dialog for those networks, which is difficult to handle.
-        if (isPrimary() && isRecentlySelectedByTheUser(config)) {
-            // If explicitlySelected is true, the network was selected by the user via Settings
-            // or QuickSettings. If this network has Internet access, switch to it. Otherwise,
-            // switch to it only if the user confirms that they really want to switch, or has
-            // already confirmed and selected "Don't ask again".
-            explicitlySelected =
-                    mWifiPermissionsUtil.checkNetworkSettingsPermission(config.lastConnectUid);
-            if (mVerboseLoggingEnabled) {
-                log("Network selected by UID " + config.lastConnectUid
-                        + " explicitlySelected=" + explicitlySelected);
-            }
-        }
-        NetworkAgentConfig.Builder naConfigBuilder = new NetworkAgentConfig.Builder()
-                .setLegacyType(ConnectivityManager.TYPE_WIFI)
-                .setLegacyTypeName(NETWORKTYPE)
-                .setExplicitlySelected(explicitlySelected)
-                .setUnvalidatedConnectivityAcceptable(
-                        explicitlySelected && config.noInternetAccessExpected)
-                .setPartialConnectivityAcceptable(config.noInternetAccessExpected);
-        if (config.carrierMerged) {
-            String subscriberId = null;
-            TelephonyManager subMgr = mTelephonyManager.createForSubscriptionId(
-                    config.subscriptionId);
-            if (subMgr != null) {
-                subscriberId = subMgr.getSubscriberId();
-            }
-            if (subscriberId != null) {
-                naConfigBuilder.setSubscriberId(subscriberId);
-            }
-        }
-        if (mVcnManager == null && SdkLevel.isAtLeastS()) {
-            mVcnManager = mContext.getSystemService(VcnManager.class);
-        }
-        if (mVcnManager != null && mVcnPolicyChangeListener == null) {
-            mVcnPolicyChangeListener = new WifiVcnNetworkPolicyChangeListener();
-            mVcnManager.addVcnNetworkPolicyChangeListener(new HandlerExecutor(getHandler()),
-                    mVcnPolicyChangeListener);
-        }
-        return naConfigBuilder.build();
-    }
-
     /*
-     * Read a MAC address in /proc/net/arp, used by ClientModeImpl
+     * Read a MAC address in /proc/arp/table, used by ClientModeImpl
      * so as to record MAC address of default gateway.
      **/
     private String macAddressFromRoute(String ipAddress) {
         String macAddress = null;
         BufferedReader reader = null;
         try {
-            reader = mWifiInjector.createBufferedReader(ARP_TABLE_PATH);
+            reader = new BufferedReader(new FileReader("/proc/net/arp"));
 
             // Skip over the line bearing column titles
             String line = reader.readLine();
@@ -3502,11 +3114,11 @@
                 }
 
                 // ARP column format is
-                // IPAddress HWType Flags HWAddress Mask Device
+                // Address HWType HWAddress Flags Mask IFace
                 String ip = tokens[0];
                 String mac = tokens[3];
 
-                if (TextUtils.equals(ipAddress, ip)) {
+                if (ipAddress.equals(ip)) {
                     macAddress = mac;
                     break;
                 }
@@ -3567,12 +3179,10 @@
         }
         String currentMacString = mWifiNative.getMacAddress(mInterfaceName);
         MacAddress currentMac = getMacAddressFromBssidString(currentMacString);
-        MacAddress newMac = isSecondaryInternet() && mClientModeManager.isSecondaryInternetDbsAp()
-                ? MacAddressUtils.createRandomUnicastAddress()
-                : mWifiConfigManager.getRandomizedMacAndUpdateIfNeeded(config);
+        MacAddress newMac = mWifiConfigManager.getRandomizedMacAndUpdateIfNeeded(config);
         if (!WifiConfiguration.isValidMacAddressForRandomization(newMac)) {
             Log.wtf(getTag(), "Config generated an invalid MAC address");
-        } else if (Objects.equals(newMac, currentMac)) {
+        } else if (newMac.equals(currentMac)) {
             Log.d(getTag(), "No changes in MAC address");
         } else {
             mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_MAC_CHANGE, config);
@@ -3630,10 +3240,9 @@
         mLastSimBasedConnectionCarrierName = null;
         mLastSignalLevel = -1;
         if (mWifiGlobals.isConnectedMacRandomizationEnabled()) {
-            mFailedToResetMacAddress = !mWifiNative.setStaMacAddress(
-                    mInterfaceName, MacAddressUtils.createRandomUnicastAddress());
-            if (mFailedToResetMacAddress) {
-                Log.e(getTag(), "Failed to set random MAC address on ClientMode creation");
+            if (!mWifiNative.setStaMacAddress(
+                    mInterfaceName, MacAddressUtils.createRandomUnicastAddress())) {
+                Log.e(getTag(), "Failed to set random MAC address on bootup");
             }
         }
         mWifiInfo.setMacAddress(mWifiNative.getMacAddress(mInterfaceName));
@@ -3666,7 +3275,7 @@
                 && mContext.getResources().getBoolean(
                         R.bool.config_wifiSuspendOptimizationsEnabled));
 
-        enablePowerSave();
+        setPowerSave(true);
 
         // Disable wpa_supplicant from auto reconnecting.
         mWifiNative.enableStaAutoReconnect(mInterfaceName, false);
@@ -3823,9 +3432,6 @@
 
     private void connectToNetwork(WifiConfiguration config) {
         if ((config != null) && mWifiNative.connectToNetwork(mInterfaceName, config)) {
-            // Update the internal config once the connection request is accepted.
-            mWifiConfigManager.setNetworkLastUsedSecurityParams(config.networkId,
-                    config.getNetworkSelectionStatus().getCandidateSecurityParams());
             mWifiLastResortWatchdog.noteStartConnectTime(config.networkId);
             mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_CMD_START_CONNECT, config);
             mIsAutoRoaming = false;
@@ -3851,9 +3457,9 @@
             @Override
             public void onReceive(Context context, Intent intent) {
                 String action = intent.getAction();
-                if (TextUtils.equals(action, Intent.ACTION_SCREEN_ON)) {
+                if (action.equals(Intent.ACTION_SCREEN_ON)) {
                     sendMessage(CMD_SCREEN_STATE_CHANGED, 1);
-                } else if (TextUtils.equals(action, Intent.ACTION_SCREEN_OFF)) {
+                } else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
                     sendMessage(CMD_SCREEN_STATE_CHANGED, 0);
                 }
             }
@@ -4003,7 +3609,6 @@
                         loge("CMD_START_CONNECT and no config, bail out...");
                         break;
                     }
-                    mCurrentConnectionDetectedCaptivePortal = false;
                     mTargetNetworkId = netId;
                     // Update scorecard while there is still state from existing connection
                     mLastScanRssi = mWifiConfigManager.findScanRssi(netId,
@@ -4031,8 +3636,6 @@
                             break;
                         }
                     }
-                    mInsecureEapNetworkHandler.prepareConnection(mTargetWifiConfiguration);
-                    setSelectedRcoiForPasspoint(config);
                     connectToNetwork(config);
                     break;
                 }
@@ -4056,14 +3659,13 @@
                     ConnectNetworkMessage cnm = (ConnectNetworkMessage) message.obj;
                     if (mIpClient == null) {
                         logd("IpClient is not ready, CONNECT_NETWORK dropped");
-                        cnm.listener.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+                        cnm.listener.sendFailure(WifiManager.ERROR);
                         break;
                     }
                     NetworkUpdateResult result = cnm.result;
                     int netId = result.getNetworkId();
                     connectToUserSelectNetwork(
-                            netId, message.sendingUid, result.hasCredentialChanged(),
-                            cnm.packageName);
+                            netId, message.sendingUid, result.hasCredentialChanged());
                     mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_CONNECT_NETWORK,
                             mWifiConfigManager.getConfiguredNetwork(netId));
                     cnm.listener.sendSuccess();
@@ -4073,7 +3675,7 @@
                     ConnectNetworkMessage cnm = (ConnectNetworkMessage) message.obj;
                     if (mIpClient == null) {
                         logd("IpClient is not ready, SAVE_NETWORK dropped");
-                        cnm.listener.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+                        cnm.listener.sendFailure(WifiManager.ERROR);
                         break;
                     }
                     NetworkUpdateResult result = cnm.result;
@@ -4119,11 +3721,7 @@
                             && result.hasCredentialChanged()) {
                         logi("CMD_SAVE_NETWORK credential changed for nid="
                                 + netId + " while disconnected. Connecting.");
-                        WifiConfiguration config =
-                                mWifiConfigManager.getConfiguredNetwork(netId);
-                        if (!mWifiPermissionsUtil.isAdminRestrictedNetwork(config)) {
-                            startConnectToNetwork(netId, message.sendingUid, SUPPLICANT_BSSID_ANY);
-                        }
+                        startConnectToNetwork(netId, message.sendingUid, SUPPLICANT_BSSID_ANY);
                     } else if (result.hasCredentialChanged()) {
                         WifiConfiguration currentConfig =
                                 getConnectedWifiConfigurationInternal();
@@ -4245,6 +3843,11 @@
                     }
                     break;
                 }
+                case CMD_DIAGS_CONNECT_TIMEOUT: {
+                    mWifiDiagnostics.reportConnectionEvent(
+                            WifiDiagnostics.CONNECTION_EVENT_TIMEOUT, mClientModeManager);
+                    break;
+                }
                 case WifiP2pServiceImpl.P2P_CONNECTION_CHANGED:
                 case CMD_RESET_SIM_NETWORKS:
                 case WifiMonitor.NETWORK_CONNECTION_EVENT:
@@ -4270,15 +3873,12 @@
                     // in one of the child states.
                     break;
                 }
-                case CMD_ACCEPT_EAP_SERVER_CERTIFICATE:
-                case CMD_REJECT_EAP_SERVER_CERTIFICATE:
                 case CMD_START_ROAM:
                 case CMD_START_RSSI_MONITORING_OFFLOAD:
                 case CMD_STOP_RSSI_MONITORING_OFFLOAD:
                 case CMD_IP_CONFIGURATION_SUCCESSFUL:
                 case CMD_IP_CONFIGURATION_LOST:
-                case CMD_IP_REACHABILITY_LOST:
-                case CMD_IP_REACHABILITY_FAILURE: {
+                case CMD_IP_REACHABILITY_LOST: {
                     mMessageHandlingStatus = MESSAGE_HANDLING_STATUS_DISCARD;
                     break;
                 }
@@ -4360,11 +3960,6 @@
         } else {
             builder.removeCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED);
         }
-
-        if (mWifiInfo.isRestricted()) {
-            builder.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED);
-        }
-
         if (SdkLevel.isAtLeastS()) {
             if (mWifiInfo.isOemPaid()) {
                 builder.addCapability(NetworkCapabilities.NET_CAPABILITY_OEM_PAID);
@@ -4381,10 +3976,7 @@
         }
 
         builder.setOwnerUid(currentWifiConfiguration.creatorUid);
-        builder.setAdministratorUids(new int[]{currentWifiConfiguration.creatorUid});
-        if (SdkLevel.isAtLeastT()) {
-            builder.setAllowedUids(Set.of(currentWifiConfiguration.creatorUid));
-        }
+        builder.setAdministratorUids(new int[] {currentWifiConfiguration.creatorUid});
 
         if (!WifiConfiguration.isMetered(currentWifiConfiguration, mWifiInfo)) {
             builder.addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED);
@@ -4402,7 +3994,7 @@
             builder.removeCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
         }
 
-        if (!WifiManager.UNKNOWN_SSID.equals(mWifiInfo.getSSID())) {
+        if (!mWifiInfo.getSSID().equals(WifiManager.UNKNOWN_SSID)) {
             builder.setSsid(mWifiInfo.getSSID());
         }
 
@@ -4416,26 +4008,16 @@
             }
         }
 
-        List<Integer> uids = new ArrayList<>(mNetworkFactory
-                .getSpecificNetworkRequestUids(
-                        currentWifiConfiguration, currentBssid));
+        Pair<Integer, String> specificRequestUidAndPackageName =
+                mNetworkFactory.getSpecificNetworkRequestUidAndPackageName(
+                        currentWifiConfiguration, currentBssid);
         // There is an active specific request.
-        // TODO: Check if the specific Request is for dual band Wifi or local only.
-        if (!uids.isEmpty()
-                && !mWifiConnectivityManager.hasMultiInternetConnection()) {
+        if (specificRequestUidAndPackageName.first != Process.INVALID_UID) {
             // Remove internet capability.
             builder.removeCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET);
-            if (SdkLevel.isAtLeastS()) {
-                builder.setUids(getUidRangeSet(uids));
-            } else {
-                // Use requestor Uid and PackageName on pre-S device.
-                Pair<Integer, String> specificRequestUidAndPackageName = mNetworkFactory
-                        .getSpecificNetworkRequestUidAndPackageName(currentWifiConfiguration,
-                                currentBssid);
-                // Fill up the uid/packageName for this connection.
-                builder.setRequestorUid(specificRequestUidAndPackageName.first);
-                builder.setRequestorPackageName(specificRequestUidAndPackageName.second);
-            }
+            // Fill up the uid/packageName for this connection.
+            builder.setRequestorUid(specificRequestUidAndPackageName.first);
+            builder.setRequestorPackageName(specificRequestUidAndPackageName.second);
             // Fill up the network agent specifier for this connection, allowing NetworkCallbacks
             // to match local-only specifiers in requests. TODO(b/187921303): a third-party app can
             // observe this location-sensitive information by registering a NetworkCallback.
@@ -4474,27 +4056,6 @@
         return builder.build();
     }
 
-    private Set<Range<Integer>> getUidRangeSet(List<Integer> uids) {
-        Collections.sort(uids);
-        Set<Range<Integer>> uidRanges = new ArraySet<>();
-        int start = 0;
-        int next = 0;
-        for (int i : uids) {
-            if (start == next) {
-                start = i;
-                next = start + 1;
-            } else if (i == next) {
-                next++;
-            } else {
-                uidRanges.add(new Range<>(start, next - 1));
-                start = i;
-                next = start + 1;
-            }
-        }
-        uidRanges.add(new Range<>(start, next - 1));
-        return uidRanges;
-    }
-
     private void updateLinkBandwidth(NetworkCapabilities.Builder networkCapabilitiesBuilder) {
         int txTputKbps = 0;
         int rxTputKbps = 0;
@@ -4524,7 +4085,6 @@
     /**
      * Method to update network capabilities from the current WifiConfiguration.
      */
-    @Override
     public void updateCapabilities() {
         updateCapabilities(getConnectedWifiConfigurationInternal());
     }
@@ -4608,7 +4168,6 @@
                         + ", redirectUri=" + redirectUri);
                 mWifiConfigManager.noteCaptivePortalDetected(mWifiInfo.getNetworkId());
                 mCmiMonitor.onCaptivePortalDetected(mClientModeManager);
-                mCurrentConnectionDetectedCaptivePortal = true;
             }
         }
 
@@ -4693,35 +4252,6 @@
             if (!isThisCallbackActive()) return;
             unwantedNetwork(NETWORK_STATUS_UNWANTED_DISABLE_AUTOJOIN);
         }
-
-        @Override
-        public void onDscpPolicyStatusUpdated(int policyId, int status) {
-            mQosPolicyRequestHandler.setQosPolicyStatus(policyId, status);
-        }
-    }
-
-    private boolean isNewConnectionInProgress(@NonNull String disconnectingSsid) {
-        String targetSsid = getConnectingSsidInternal();
-        // If network is removed while connecting, targetSsid can be null.
-        if (targetSsid == null) {
-            return false;
-        }
-        // When connecting to another network while already connected, the old network will first
-        // disconnect before the new connection can begin. Thus, the presence of a mLastNetworkId
-        // that's different from the mTargetNetworkId indicates that this network disconnection is
-        // triggered for the previously connected network as opposed to the current ongoing
-        // connection.
-        boolean isConnectingWhileAlreadyConnected =
-                mLastNetworkId != WifiConfiguration.INVALID_NETWORK_ID
-                && mLastNetworkId != mTargetNetworkId;
-
-        // This second condition is needed to catch cases where 2 simultaneous connections happen
-        // back-to-back. When a new connection start before the previous one finishes, the
-        // previous network will get removed from the supplicant and cause a disconnect message
-        // to be received with the previous network's SSID. Thus, if the disconnecting SSID does not
-        // match the target SSID, it means a new connection is in progress.
-        boolean isConnectingToAnotherNetwork = !disconnectingSsid.equals(targetSsid);
-        return isConnectingWhileAlreadyConnected || isConnectingToAnotherNetwork;
     }
 
     private void unwantedNetwork(int reason) {
@@ -4751,9 +4281,8 @@
             // 2. Set a random MAC address to ensure that we're not leaking the MAC address.
             mWifiNative.disableNetwork(mInterfaceName);
             if (mWifiGlobals.isConnectedMacRandomizationEnabled()) {
-                mFailedToResetMacAddress = !mWifiNative.setStaMacAddress(
-                        mInterfaceName, MacAddressUtils.createRandomUnicastAddress());
-                if (mFailedToResetMacAddress) {
+                if (!mWifiNative.setStaMacAddress(
+                        mInterfaceName, MacAddressUtils.createRandomUnicastAddress())) {
                     Log.e(getTag(), "Failed to set random MAC address on disconnect");
                 }
             }
@@ -4798,30 +4327,6 @@
                         log("ConnectingOrConnectedState: Supplicant State change "
                                 + stateChangeResult);
                     }
-                    @SupplicantEventCode int supplicantEvent;
-                    switch (stateChangeResult.state) {
-                        case COMPLETED:
-                            supplicantEvent = SupplicantStaIfaceHal.SUPPLICANT_EVENT_CONNECTED;
-                            break;
-                        case ASSOCIATING:
-                            supplicantEvent = SupplicantStaIfaceHal.SUPPLICANT_EVENT_ASSOCIATING;
-                            break;
-                        case ASSOCIATED:
-                            supplicantEvent = SupplicantStaIfaceHal.SUPPLICANT_EVENT_ASSOCIATED;
-                            break;
-                        default:
-                            supplicantEvent = -1;
-                    }
-                    if (supplicantEvent != -1) {
-                        WifiConfiguration config = mWifiConfigManager.getConfiguredNetwork(
-                                    stateChangeResult.networkId);
-                        try {
-                            logEventIfManagedNetwork(config, supplicantEvent,
-                                    MacAddress.fromString(stateChangeResult.bssid), "");
-                        } catch (IllegalArgumentException e) {
-                            Log.i(TAG, "Invalid bssid received for state change event");
-                        }
-                    }
                     if (state == SupplicantState.DISCONNECTED && mNetworkAgent != null) {
                         if (mVerboseLoggingEnabled) {
                             log("Missed CTRL-EVENT-DISCONNECTED, disconnect");
@@ -4903,17 +4408,8 @@
                             String decoratedPseudonym = mWifiCarrierInfoManager
                                     .decoratePseudonymWith3GppRealm(config,
                                             anonymousIdentity);
-                            if (decoratedPseudonym != null
-                                    && !decoratedPseudonym.equals(anonymousIdentity)) {
+                            if (decoratedPseudonym != null) {
                                 anonymousIdentity = decoratedPseudonym;
-                                // propagate to the supplicant to avoid using
-                                // the original anonymous identity for firmware
-                                // roaming.
-                                if (mVerboseLoggingEnabled) {
-                                    log("Update decorated pseudonym: " + anonymousIdentity);
-                                }
-                                mWifiNative.setEapAnonymousIdentity(mInterfaceName,
-                                        anonymousIdentity);
                             }
                             if (mVerboseLoggingEnabled) {
                                 log("EAP Pseudonym: " + anonymousIdentity);
@@ -4944,8 +4440,6 @@
                             mPasspointManager.requestVenueUrlAnqpElement(scanResult);
                         }
                     }
-                    mWifiInfo.setNetworkKey(config.getNetworkKeyFromSecurityType(
-                            mWifiInfo.getCurrentSecurityType()));
                     transitionTo(mL3ProvisioningState);
                     break;
                 }
@@ -4969,8 +4463,7 @@
                     if (mVerboseLoggingEnabled) {
                         log("ConnectingOrConnectedState: Network disconnection " + eventInfo);
                     }
-                    if (eventInfo.reasonCode
-                            == StaIfaceReasonCode.FOURWAY_HANDSHAKE_TIMEOUT) {
+                    if (eventInfo.reasonCode == ReasonCode.FOURWAY_HANDSHAKE_TIMEOUT) {
                         String bssid = !isValidBssid(eventInfo.bssid)
                                 ? mTargetBssid : eventInfo.bssid;
                         mWifiLastResortWatchdog.noteConnectionFailureAndTriggerIfNeeded(
@@ -4978,17 +4471,12 @@
                                 WifiLastResortWatchdog.FAILURE_CODE_AUTHENTICATION,
                                 isConnected());
                     }
-                    WifiConfiguration config = getConnectingWifiConfigurationInternal();
-                    clearNetworkCachedDataIfNeeded(config, eventInfo.reasonCode);
-                    try {
-                        logEventIfManagedNetwork(config,
-                                SupplicantStaIfaceHal.SUPPLICANT_EVENT_DISCONNECTED,
-                                MacAddress.fromString(eventInfo.bssid),
-                                "reason=" + eventInfo.reasonCode);
-                    } catch (IllegalArgumentException e) {
-                        Log.e(TAG, "Invalid bssid received for disconnection event");
-                    }
-                    boolean newConnectionInProgress = isNewConnectionInProgress(eventInfo.ssid);
+                    clearNetworkCachedDataIfNeeded(
+                            getConnectingWifiConfigurationInternal(), eventInfo.reasonCode);
+                    String targetSsid = getConnectingSsidInternal();
+                    // If network is removed while connecting, targetSsid can be null.
+                    boolean newConnectionInProgress =
+                            targetSsid != null && !eventInfo.ssid.equals(targetSsid);
                     if (!newConnectionInProgress) {
                         int level2FailureReason = eventInfo.locallyGenerated
                                 ? WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN :
@@ -5015,13 +4503,6 @@
                     }
                     break;
                 }
-                case WifiMonitor.AUXILIARY_SUPPLICANT_EVENT: {
-                    SupplicantEventInfo eventInfo = (SupplicantEventInfo) message.obj;
-                    logEventIfManagedNetwork(getConnectingWifiConfigurationInternal(),
-                            eventInfo.eventCode, eventInfo.bssid,
-                            eventInfo.reasonString);
-                    break;
-                }
                 case CMD_DISCONNECT: {
                     mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_FRAMEWORK_DISCONNECT,
                             message.arg1);
@@ -5043,19 +4524,6 @@
                     mWifiConfigManager.updateNetworkTransitionDisable(message.arg1, message.arg2);
                     break;
                 }
-                case WifiMonitor.QOS_POLICY_RESET_EVENT: {
-                    if (SdkLevel.isAtLeastT() && mNetworkAgent != null) {
-                        mNetworkAgent.sendRemoveAllDscpPolicies();
-                    }
-                    break;
-                }
-                case WifiMonitor.QOS_POLICY_REQUEST_EVENT: {
-                    if (SdkLevel.isAtLeastT()) {
-                        mQosPolicyRequestHandler.queueQosPolicyRequest(
-                                message.arg1, (List<QosPolicyRequest>) message.obj);
-                    }
-                    break;
-                }
                 default: {
                     handleStatus = NOT_HANDLED;
                     break;
@@ -5085,9 +4553,6 @@
         @Override
         public void exit() {
             if (mVerboseLoggingEnabled) Log.v(getTag(), "Exiting L2ConnectingState");
-            // Cancel any pending CMD_CONNECTING_WATCHDOG_TIMER since this is only valid in
-            // L2ConnectingState anyway.
-            removeMessages(CMD_CONNECTING_WATCHDOG_TIMER);
         }
 
         @Override
@@ -5155,9 +4620,9 @@
                     setAssociationRejectionStatusInConfig(mTargetNetworkId, assocRejectEventInfo);
                     int level2FailureReason =
                             WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN;
-                    if (statusCode == StaIfaceStatusCode.AP_UNABLE_TO_HANDLE_NEW_STA
-                            || statusCode == StaIfaceStatusCode.ASSOC_REJECTED_TEMPORARILY
-                            || statusCode == StaIfaceStatusCode.DENIED_INSUFFICIENT_BANDWIDTH) {
+                    if (statusCode == StatusCode.AP_UNABLE_TO_HANDLE_NEW_STA
+                            || statusCode == StatusCode.ASSOC_REJECTED_TEMPORARILY
+                            || statusCode == StatusCode.DENIED_INSUFFICIENT_BANDWIDTH) {
                         level2FailureReason = WifiMetricsProto.ConnectionEvent
                                 .ASSOCIATION_REJECTION_AP_UNABLE_TO_HANDLE_NEW_STA;
                     }
@@ -5181,20 +4646,13 @@
                     break;
                 }
                 case WifiMonitor.AUTHENTICATION_FAILURE_EVENT: {
-                    AuthenticationFailureEventInfo authenticationFailureEventInfo =
-                            (AuthenticationFailureEventInfo) message.obj;
-                    if (!TextUtils.equals(authenticationFailureEventInfo.ssid,
-                            getConnectingSsidInternal())) {
-                        logw("Authentication failure event received on not target network");
-                        break;
-                    }
                     stopIpClient();
                     mWifiDiagnostics.triggerBugReportDataCapture(
                             WifiDiagnostics.REPORT_REASON_AUTH_FAILURE);
                     int disableReason = WifiConfiguration.NetworkSelectionStatus
                             .DISABLED_AUTHENTICATION_FAILURE;
-                    int reasonCode = authenticationFailureEventInfo.reasonCode;
-                    int errorCode = authenticationFailureEventInfo.errorCode;
+                    int reasonCode = message.arg1;
+                    int errorCode = message.arg2;
                     log("L2ConnectingState: Authentication failure "
                             + " reason=" + reasonCode + " error=" + errorCode);
                     WifiConfiguration targetedNetwork =
@@ -5203,19 +4661,10 @@
                     if (isPermanentWrongPasswordFailure(mTargetNetworkId, reasonCode)) {
                         disableReason = WifiConfiguration.NetworkSelectionStatus
                                 .DISABLED_BY_WRONG_PASSWORD;
-                        // For primary role, send error notification except for local only network,
-                        // for secondary role, send only for secondary internet.
-                        final boolean isForLocalOnly = isRequestedForLocalOnly(
-                                targetedNetwork, mTargetBssid) || isLocalOnly();
-                        final boolean needNotifyError = isPrimary() ? !isForLocalOnly
-                                : isSecondaryInternet();
-                        if (targetedNetwork != null && needNotifyError) {
-                            mWrongPasswordNotifier.onWrongPasswordError(targetedNetwork);
+                        if (targetedNetwork != null && isPrimary()) {
+                            mWrongPasswordNotifier.onWrongPasswordError(targetedNetwork.SSID);
                         }
                     } else if (reasonCode == WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE) {
-                        logEventIfManagedNetwork(targetedNetwork,
-                                SupplicantStaIfaceHal.SUPPLICANT_EVENT_EAP_FAILURE,
-                                authenticationFailureEventInfo.bssid, "error=" + errorCode);
                         if (targetedNetwork != null && targetedNetwork.enterpriseConfig != null
                                 && targetedNetwork.enterpriseConfig.isAuthenticationSimBased()) {
                             // only show EAP failure notification if primary
@@ -5296,9 +4745,6 @@
                                 mWifiInfo.setOsuAp(true);
                             }
                             mWifiInfo.setProviderFriendlyName(config.providerFriendlyName);
-                            mWifiInfo.setNetworkKey(
-                                    config.getNetworkKeyFromSecurityType(
-                                            mWifiInfo.getCurrentSecurityType()));
                         }
                     }
                     sendNetworkChangeBroadcast(
@@ -5336,7 +4782,7 @@
                     }
 
                     if (!identitySent) {
-                        // Supplicant lacks credentials to connect to that network, hence block list
+                        // Supplicant lacks credentials to connect to that network, hence black list
                         String ssid = (String) message.obj;
                         if (mTargetWifiConfiguration != null && ssid != null
                                 && mTargetWifiConfiguration.SSID != null
@@ -5355,10 +4801,6 @@
                 case CMD_CONNECTING_WATCHDOG_TIMER: {
                     if (mConnectingWatchdogCount == message.arg1) {
                         if (mVerboseLoggingEnabled) log("Connecting watchdog! -> disconnect");
-                        reportConnectionAttemptEnd(
-                                WifiMetrics.ConnectionEvent.FAILURE_NO_RESPONSE,
-                                WifiMetricsProto.ConnectionEvent.HLF_NONE,
-                                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN);
                         handleNetworkDisconnect(false,
                                 WifiStatsLog.WIFI_DISCONNECT_REPORTED__FAILURE_CODE__CONNECTING_WATCHDOG_TIMER);
                         transitionTo(mDisconnectedState);
@@ -5370,7 +4812,7 @@
                             (NetworkConnectionEventInfo) message.obj;
                     String quotedOrHexConnectingSsid = getConnectingSsidInternal();
                     String quotedOrHexConnectedSsid = NativeUtil.encodeSsid(
-                            NativeUtil.byteArrayToArrayList(connectionInfo.wifiSsid.getBytes()));
+                            NativeUtil.byteArrayToArrayList(connectionInfo.wifiSsid.getOctets()));
                     if (quotedOrHexConnectingSsid != null
                             && !quotedOrHexConnectingSsid.equals(quotedOrHexConnectedSsid)) {
                         // possibly a NETWORK_CONNECTION_EVENT for a successful roam on the previous
@@ -5383,14 +4825,6 @@
                     handleStatus = NOT_HANDLED;
                     break;
                 }
-                case WifiMonitor.TOFU_ROOT_CA_CERTIFICATE:
-                    if (null == mTargetWifiConfiguration) break;
-                    if (!mInsecureEapNetworkHandler.setPendingCertificate(
-                            mTargetWifiConfiguration.SSID, message.arg2,
-                            (X509Certificate) message.obj)) {
-                        Log.d(TAG, "Cannot set pending cert.");
-                    }
-                    break;
                 default: {
                     handleStatus = NOT_HANDLED;
                     break;
@@ -5431,7 +4865,56 @@
             // ConnectivityService of that fact so the system can treat it appropriately.
             final WifiConfiguration config = getConnectedWifiConfigurationInternal();
 
-            final NetworkAgentConfig naConfig = getNetworkAgentConfigInternal(config);
+            final boolean explicitlySelected;
+            // Non primary CMMs is never user selected. This prevents triggering the No Internet
+            // dialog for those networks, which is difficult to handle.
+            if (isPrimary() && isRecentlySelectedByTheUser(config)) {
+                // If explicitlySelected is true, the network was selected by the user via Settings
+                // or QuickSettings. If this network has Internet access, switch to it. Otherwise,
+                // switch to it only if the user confirms that they really want to switch, or has
+                // already confirmed and selected "Don't ask again".
+                explicitlySelected =
+                        mWifiPermissionsUtil.checkNetworkSettingsPermission(config.lastConnectUid);
+                if (mVerboseLoggingEnabled) {
+                    log("Network selected by UID " + config.lastConnectUid + " explicitlySelected="
+                            + explicitlySelected);
+                }
+            } else {
+                explicitlySelected = false;
+            }
+
+            if (mVerboseLoggingEnabled) {
+                log("explicitlySelected=" + explicitlySelected + " acceptUnvalidated="
+                        + config.noInternetAccessExpected);
+            }
+
+            NetworkAgentConfig.Builder naConfigBuilder = new NetworkAgentConfig.Builder()
+                    .setLegacyType(ConnectivityManager.TYPE_WIFI)
+                    .setLegacyTypeName(NETWORKTYPE)
+                    .setExplicitlySelected(explicitlySelected)
+                    .setUnvalidatedConnectivityAcceptable(
+                            explicitlySelected && config.noInternetAccessExpected)
+                    .setPartialConnectivityAcceptable(config.noInternetAccessExpected);
+            if (config.carrierMerged) {
+                String subscriberId = null;
+                TelephonyManager subMgr = mTelephonyManager.createForSubscriptionId(
+                        config.subscriptionId);
+                if (subMgr != null) {
+                    subscriberId = subMgr.getSubscriberId();
+                }
+                if (subscriberId != null) {
+                    naConfigBuilder.setSubscriberId(subscriberId);
+                }
+            }
+            if (mVcnManager == null && SdkLevel.isAtLeastS()) {
+                mVcnManager = mContext.getSystemService(VcnManager.class);
+            }
+            if (mVcnManager != null && mVcnPolicyChangeListener == null) {
+                mVcnPolicyChangeListener = new WifiVcnNetworkPolicyChangeListener();
+                mVcnManager.addVcnNetworkPolicyChangeListener(new HandlerExecutor(getHandler()),
+                        mVcnPolicyChangeListener);
+            }
+            final NetworkAgentConfig naConfig = naConfigBuilder.build();
             final NetworkCapabilities nc = getCapabilities(
                     getConnectedWifiConfigurationInternal(), getConnectedBssidInternal());
             // This should never happen.
@@ -5442,9 +4925,6 @@
             mNetworkAgent = mWifiInjector.makeWifiNetworkAgent(nc, mLinkProperties, naConfig,
                     mNetworkFactory.getProvider(), new WifiNetworkAgentCallback());
             mWifiScoreReport.setNetworkAgent(mNetworkAgent);
-            if (SdkLevel.isAtLeastT()) {
-                mQosPolicyRequestHandler.setNetworkAgent(mNetworkAgent);
-            }
 
             // We must clear the config BSSID, as the wifi chipset may decide to roam
             // from this point on and having the BSSID specified in the network block would
@@ -5548,9 +5028,6 @@
                             (mLastBssid == null) ? mTargetBssid : mLastBssid,
                             WifiLastResortWatchdog.FAILURE_CODE_DHCP,
                             isConnected());
-                    handleNetworkDisconnect(false,
-                            WifiStatsLog.WIFI_DISCONNECT_REPORTED__FAILURE_CODE__UNSPECIFIED);
-                    transitionTo(mDisconnectedState); // End of connection attempt.
                     break;
                 }
                 case CMD_IP_REACHABILITY_LOST: {
@@ -5569,12 +5046,6 @@
                     }
                     break;
                 }
-                case CMD_IP_REACHABILITY_FAILURE: {
-                    mWifiDiagnostics.triggerBugReportDataCapture(
-                            WifiDiagnostics.REPORT_REASON_REACHABILITY_FAILURE);
-                    handleIpReachabilityFailure((ReachabilityLossInfoParcelable) message.obj);
-                    break;
-                }
                 case WifiP2pServiceImpl.DISCONNECT_WIFI_REQUEST: {
                     if (mWifiP2pConnection.shouldTemporarilyDisconnectWifi()) {
                         mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_FRAMEWORK_DISCONNECT,
@@ -5644,9 +5115,7 @@
                         if (isPrimary()) {
                             mLinkProbeManager.resetOnScreenTurnedOn();
                         }
-                        long txBytes = mFacade.getTotalTxBytes() - mFacade.getMobileTxBytes();
-                        long rxBytes = mFacade.getTotalRxBytes() - mFacade.getMobileRxBytes();
-                        updateLinkLayerStatsRssiSpeedFrequencyCapabilities(txBytes, rxBytes);
+                        updateLinkLayerStatsRssiSpeedFrequencyCapabilities();
                         sendMessageDelayed(obtainMessage(CMD_RSSI_POLL, mRssiPollToken, 0),
                                 mWifiGlobals.getPollRssiIntervalMillis());
                     }
@@ -5673,19 +5142,10 @@
                                 ScanResult scanResult = scanDetailCache.getScanResult(mLastBssid);
                                 if (scanResult != null) {
                                     mWifiInfo.setFrequency(scanResult.frequency);
-                                    boolean isHidden = true;
-                                    for (byte b : scanResult.getWifiSsid().getBytes()) {
-                                        if (b != 0) {
-                                            isHidden = false;
-                                            break;
-                                        }
-                                    }
-                                    mWifiInfo.setHiddenSSID(isHidden);
                                 }
                             }
                         }
                         sendNetworkChangeBroadcastWithCurrentState();
-                        mMultiInternetManager.notifyBssidAssociatedEvent(mClientModeManager);
                     }
                     break;
                 }
@@ -5791,16 +5251,13 @@
          */
         private WifiLinkLayerStats updateLinkLayerStatsRssiDataStallScoreReport() {
             // Get Info and continue polling
-            long txBytes = mFacade.getTotalTxBytes() - mFacade.getMobileTxBytes();
-            long rxBytes = mFacade.getTotalRxBytes() - mFacade.getMobileRxBytes();
-            WifiLinkLayerStats stats = updateLinkLayerStatsRssiSpeedFrequencyCapabilities(txBytes,
-                    rxBytes);
+            WifiLinkLayerStats stats = updateLinkLayerStatsRssiSpeedFrequencyCapabilities();
             mWifiMetrics.updateWifiUsabilityStatsEntries(mInterfaceName, mWifiInfo, stats);
             // checkDataStallAndThroughputSufficiency() should be called before
             // mWifiScoreReport.calculateAndReportScore() which needs the latest throughput
             int statusDataStall = mWifiDataStall.checkDataStallAndThroughputSufficiency(
                     mInterfaceName, mLastConnectionCapabilities, mLastLinkLayerStats, stats,
-                    mWifiInfo, txBytes, rxBytes);
+                    mWifiInfo);
             if (mDataStallTriggerTimeMs == -1
                     && statusDataStall != WifiIsUnusableEvent.TYPE_UNKNOWN) {
                 mDataStallTriggerTimeMs = mClock.getElapsedSinceBootMillis();
@@ -5868,11 +5325,16 @@
     class L3ProvisioningState extends State {
         @Override
         public void enter() {
-            if (mInsecureEapNetworkHandler.startUserApprovalIfNecessary(mIsUserSelected)) {
-                return;
+            WifiConfiguration currentConfig = getConnectedWifiConfigurationInternal();
+            if (mIpClientWithPreConnection && mIpClient != null) {
+                mIpClient.notifyPreconnectionComplete(mSentHLPs);
+                mIpClientWithPreConnection = false;
+                mSentHLPs = false;
+            } else {
+                startIpClient(currentConfig, false);
             }
-
-            startL3Provisioning();
+            // Get Link layer stats so as we get fresh tx packet counters
+            getWifiLinkLayerStats();
         }
 
         @Override
@@ -5882,6 +5344,10 @@
             switch(message.what) {
                 case WifiMonitor.NETWORK_DISCONNECTION_EVENT: {
                     DisconnectEventInfo eventInfo = (DisconnectEventInfo) message.obj;
+                    reportConnectionAttemptEnd(
+                            WifiMetrics.ConnectionEvent.FAILURE_NETWORK_DISCONNECTION,
+                            WifiMetricsProto.ConnectionEvent.HLF_NONE,
+                            WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN);
                     mWifiLastResortWatchdog.noteConnectionFailureAndTriggerIfNeeded(
                             getConnectingSsidInternal(),
                             !isValidBssid(eventInfo.bssid)
@@ -5891,18 +5357,6 @@
                     handleStatus = NOT_HANDLED;
                     break;
                 }
-                case CMD_ACCEPT_EAP_SERVER_CERTIFICATE:
-                    startL3Provisioning();
-                    break;
-                case CMD_REJECT_EAP_SERVER_CERTIFICATE: {
-                    int l2FailureReason = message.arg1;
-                    reportConnectionAttemptEnd(
-                            WifiMetrics.ConnectionEvent.FAILURE_NETWORK_DISCONNECTION,
-                            WifiMetricsProto.ConnectionEvent.HLF_NONE,
-                            l2FailureReason);
-                    mWifiNative.disconnect(mInterfaceName);
-                    break;
-                }
                 default: {
                     handleStatus = NOT_HANDLED;
                     break;
@@ -5914,20 +5368,6 @@
             }
             return handleStatus;
         }
-
-        private void startL3Provisioning() {
-            WifiConfiguration currentConfig = getConnectedWifiConfigurationInternal();
-            if (mIpClientWithPreConnection && mIpClient != null) {
-                mIpClient.notifyPreconnectionComplete(mSentHLPs);
-                mIpClientWithPreConnection = false;
-                mSentHLPs = false;
-            } else {
-                startIpClient(currentConfig, false);
-            }
-            // Get Link layer stats so as we get fresh tx packet counters
-            getWifiLinkLayerStats();
-        }
-
     }
 
     /**
@@ -6186,8 +5626,9 @@
                                         probInternet < PROBABILITY_WITH_INTERNET_TO_PERMANENTLY_DISABLE_NETWORK
                                                 ? DISABLED_NO_INTERNET_PERMANENT
                                                 : DISABLED_NO_INTERNET_TEMPORARY);
-                            } else { // NETWORK_STATUS_UNWANTED_VALIDATION_FAILED
+                            } else {
                                 // stop collect last-mile stats since validation fail
+                                removeMessages(CMD_DIAGS_CONNECT_TIMEOUT);
                                 mWifiDiagnostics.reportConnectionEvent(
                                         WifiDiagnostics.CONNECTION_EVENT_FAILED,
                                         mClientModeManager);
@@ -6197,31 +5638,36 @@
                                 // selection status to temporarily disable the network.
                                 if (!isRecentlySelectedByTheUser(config)
                                         && !config.noInternetAccessExpected) {
-                                    if (config.getNetworkSelectionStatus()
-                                            .getNetworkSelectionDisableReason()
-                                            != DISABLED_NO_INTERNET_PERMANENT) {
-                                        Log.i(getTag(), "Temporarily disabling network "
-                                                + "because of no-internet access");
-                                        mWifiConfigManager.updateNetworkSelectionStatus(
-                                                config.networkId,
-                                                DISABLED_NO_INTERNET_TEMPORARY);
-                                    }
+                                    Log.i(getTag(), "Temporarily disabling network because of"
+                                            + " no-internet access");
+                                    mWifiConfigManager.updateNetworkSelectionStatus(
+                                            config.networkId,
+                                            DISABLED_NO_INTERNET_TEMPORARY);
                                     mWifiBlocklistMonitor.handleBssidConnectionFailure(
-                                            mLastBssid, config,
+                                            mLastBssid, config.SSID,
                                             WifiBlocklistMonitor.REASON_NETWORK_VALIDATION_FAILURE,
                                             mWifiInfo.getRssi());
                                 }
                                 mWifiScoreCard.noteValidationFailure(mWifiInfo);
-                                mCmiMonitor.onInternetValidationFailed(mClientModeManager,
-                                        mCurrentConnectionDetectedCaptivePortal);
                             }
                         }
+                        if (mClientModeManager.getRole() == ROLE_CLIENT_SECONDARY_TRANSIENT) {
+                            Log.d(getTag(), "Internet validation failed during MBB,"
+                                    + " disconnecting ClientModeManager=" + mClientModeManager);
+                            mWifiMetrics.logStaEvent(
+                                    mInterfaceName,
+                                    StaEvent.TYPE_FRAMEWORK_DISCONNECT,
+                                    StaEvent.DISCONNECT_MBB_NO_INTERNET);
+                            mWifiMetrics.incrementMakeBeforeBreakNoInternetCount();
+                            mWifiNative.disconnect(mInterfaceName);
+                        }
                     }
                     break;
                 }
                 case CMD_NETWORK_STATUS: {
                     if (message.arg1 == NetworkAgent.VALIDATION_STATUS_VALID) {
                         // stop collect last-mile stats since validation pass
+                        removeMessages(CMD_DIAGS_CONNECT_TIMEOUT);
                         mWifiDiagnostics.reportConnectionEvent(
                                 WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED, mClientModeManager);
                         mWifiScoreCard.noteValidationSuccess(mWifiInfo);
@@ -6276,7 +5722,7 @@
                         mWifiScoreCard.noteNonlocalDisconnect(mInterfaceName, eventInfo.reasonCode);
                         int rssi = mWifiInfo.getRssi();
                         mWifiBlocklistMonitor.handleBssidConnectionFailure(mWifiInfo.getBSSID(),
-                                getConnectedWifiConfiguration(),
+                                mWifiInfo.getSSID(),
                                 WifiBlocklistMonitor.REASON_ABNORMAL_DISCONNECT, rssi);
                     }
                     WifiConfiguration config = getConnectedWifiConfigurationInternal();
@@ -6536,18 +5982,18 @@
      * @return true if this is a suspicious disconnect
      */
     static boolean unexpectedDisconnectedReason(int reason) {
-        return reason == StaIfaceReasonCode.PREV_AUTH_NOT_VALID
-                || reason == StaIfaceReasonCode.CLASS2_FRAME_FROM_NONAUTH_STA
-                || reason == StaIfaceReasonCode.CLASS3_FRAME_FROM_NONASSOC_STA
-                || reason == StaIfaceReasonCode.DISASSOC_STA_HAS_LEFT
-                || reason == StaIfaceReasonCode.STA_REQ_ASSOC_WITHOUT_AUTH
-                || reason == StaIfaceReasonCode.MICHAEL_MIC_FAILURE
-                || reason == StaIfaceReasonCode.FOURWAY_HANDSHAKE_TIMEOUT
-                || reason == StaIfaceReasonCode.GROUP_KEY_UPDATE_TIMEOUT
-                || reason == StaIfaceReasonCode.GROUP_CIPHER_NOT_VALID
-                || reason == StaIfaceReasonCode.PAIRWISE_CIPHER_NOT_VALID
-                || reason == StaIfaceReasonCode.IEEE_802_1X_AUTH_FAILED
-                || reason == StaIfaceReasonCode.DISASSOC_LOW_ACK;
+        return reason == ReasonCode.PREV_AUTH_NOT_VALID
+                || reason == ReasonCode.CLASS2_FRAME_FROM_NONAUTH_STA
+                || reason == ReasonCode.CLASS3_FRAME_FROM_NONASSOC_STA
+                || reason == ReasonCode.DISASSOC_STA_HAS_LEFT
+                || reason == ReasonCode.STA_REQ_ASSOC_WITHOUT_AUTH
+                || reason == ReasonCode.MICHAEL_MIC_FAILURE
+                || reason == ReasonCode.FOURWAY_HANDSHAKE_TIMEOUT
+                || reason == ReasonCode.GROUP_KEY_UPDATE_TIMEOUT
+                || reason == ReasonCode.GROUP_CIPHER_NOT_VALID
+                || reason == ReasonCode.PAIRWISE_CIPHER_NOT_VALID
+                || reason == ReasonCode.IEEE_802_1X_AUTH_FAILED
+                || reason == ReasonCode.DISASSOC_LOW_ACK;
     }
 
     private static String getLinkPropertiesSummary(LinkProperties lp) {
@@ -6589,9 +6035,7 @@
     private boolean hasConnectionRequests() {
         return mNetworkFactory.hasConnectionRequests()
                 || mUntrustedNetworkFactory.hasConnectionRequests()
-                || mOemWifiNetworkFactory.hasConnectionRequests()
-                || mRestrictedWifiNetworkFactory.hasConnectionRequests()
-                || mMultiInternetManager.hasPendingConnectionRequests();
+                || mOemWifiNetworkFactory.hasConnectionRequests();
     }
 
     /**
@@ -6607,24 +6051,19 @@
      */
     @Nullable
     private MacAddress retrieveFactoryMacAddressAndStoreIfNecessary() {
-        boolean saveFactoryMacInConfigStore =
-                mWifiGlobals.isSaveFactoryMacToConfigStoreEnabled();
-        if (saveFactoryMacInConfigStore) {
-            // Already present, just return.
-            String factoryMacAddressStr = mSettingsConfigStore.get(WIFI_STA_FACTORY_MAC_ADDRESS);
-            if (factoryMacAddressStr != null) return MacAddress.fromString(factoryMacAddressStr);
-        }
+        // Already present, just return.
+        String factoryMacAddressStr = mSettingsConfigStore.get(WIFI_STA_FACTORY_MAC_ADDRESS);
+        if (factoryMacAddressStr != null) return MacAddress.fromString(factoryMacAddressStr);
+
         MacAddress factoryMacAddress = mWifiNative.getStaFactoryMacAddress(mInterfaceName);
         if (factoryMacAddress == null) {
             // the device may be running an older HAL (version < 1.3).
             Log.w(TAG, "Failed to retrieve factory MAC address");
             return null;
         }
-        if (saveFactoryMacInConfigStore) {
-            mSettingsConfigStore.put(WIFI_STA_FACTORY_MAC_ADDRESS, factoryMacAddress.toString());
-            Log.i(TAG, "Factory MAC address stored in config store: " + factoryMacAddress);
-        }
-        Log.i(TAG, "Factory MAC address retrieved: " + factoryMacAddress);
+        Log.i(TAG, "Factory MAC address retrieved and stored in config store: "
+                + factoryMacAddress);
+        mSettingsConfigStore.put(WIFI_STA_FACTORY_MAC_ADDRESS, factoryMacAddress.toString());
         return factoryMacAddress;
     }
 
@@ -6661,32 +6100,27 @@
     private static class ConnectNetworkMessage {
         public final NetworkUpdateResult result;
         public final ActionListenerWrapper listener;
-        public final String packageName;
 
-        ConnectNetworkMessage(NetworkUpdateResult result, ActionListenerWrapper listener,
-                String packageName) {
+        ConnectNetworkMessage(NetworkUpdateResult result, ActionListenerWrapper listener) {
             this.result = result;
             this.listener = listener;
-            this.packageName = packageName;
         }
     }
 
     /** Trigger network connection and provide status via the provided callback. */
     public void connectNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper,
-            int callingUid, @NonNull String packageName) {
+            int callingUid) {
         Message message =
-                obtainMessage(CMD_CONNECT_NETWORK,
-                new ConnectNetworkMessage(result, wrapper, packageName));
+                obtainMessage(CMD_CONNECT_NETWORK, new ConnectNetworkMessage(result, wrapper));
         message.sendingUid = callingUid;
         sendMessage(message);
     }
 
     /** Trigger network save and provide status via the provided callback. */
     public void saveNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper,
-            int callingUid, @NonNull String packageName) {
+            int callingUid) {
         Message message =
-                obtainMessage(CMD_SAVE_NETWORK,
-                new ConnectNetworkMessage(result, wrapper, packageName));
+                obtainMessage(CMD_SAVE_NETWORK, new ConnectNetworkMessage(result, wrapper));
         message.sendingUid = callingUid;
         sendMessage(message);
     }
@@ -6734,11 +6168,7 @@
                 duration = MboOceConstants.DEFAULT_BLOCKLIST_DURATION_MS;
             }
             // Blocklist the current BSS
-            WifiConfiguration config = getConnectedWifiConfiguration();
-            if (config == null) {
-                config = getConnectingWifiConfiguration();
-            }
-            mWifiBlocklistMonitor.blockBssidForDurationMs(bssid, config, duration,
+            mWifiBlocklistMonitor.blockBssidForDurationMs(bssid, ssid, duration,
                     WifiBlocklistMonitor.REASON_FRAMEWORK_DISCONNECT_MBO_OCE, 0);
         }
 
@@ -6764,13 +6194,6 @@
     }
 
     /**
-     * @return true if this device supports Trust On First Use
-     */
-    private boolean isTrustOnFirstUseSupported() {
-        return (getSupportedFeatures() & WIFI_FEATURE_TRUST_ON_FIRST_USE) != 0;
-    }
-
-    /**
      * Helper method to set the allowed key management schemes from
      * scan result.
      * When the AKM is updated, changes should be propagated to the
@@ -6805,20 +6228,15 @@
             WifiConfiguration config,
             List<ScanResult> scanResults) {
         if (null != config.getNetworkSelectionStatus().getCandidateSecurityParams()) return;
-        if (mVerboseLoggingEnabled) {
-            Log.d(getTag(), "Select candidate security params for " + config.getProfileKey());
-        }
 
         // This comes from wifi picker directly so there is no candidate security params.
         // Run network selection against this SSID.
-        List<ScanDetail> scanDetailsList = scanResults.stream()
+        scanResults.stream()
                 .filter(scanResult -> config.SSID.equals(
-                        ScanResultUtil.createQuotedSsid(scanResult.SSID)))
-                .map(ScanDetail::new)
-                .collect(Collectors.toList());
-        List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector
-                .getCandidatesForUserSelection(config, scanDetailsList);
-        mWifiNetworkSelector.selectNetwork(candidates);
+                        ScanResultUtil.createQuotedSSID(scanResult.SSID)))
+                .map(ScanResultUtil::toScanDetail)
+                .forEach(scanDetail -> mWifiNetworkSelector
+                        .updateNetworkCandidateSecurityParams(config, scanDetail));
         // Get the fresh copy again to retrieve the candidate security params.
         WifiConfiguration freshConfig = mWifiConfigManager.getConfiguredNetwork(config.networkId);
         if (null != freshConfig
@@ -6857,7 +6275,7 @@
         ScanResultMatchInfo key1 = ScanResultMatchInfo.fromWifiConfiguration(config);
         List<ScanResult> scanResults = mScanRequestProxy.getScanResults();
         for (ScanResult scanResult : scanResults) {
-            if (!config.SSID.equals(ScanResultUtil.createQuotedSsid(scanResult.SSID))) {
+            if (!config.SSID.equals(ScanResultUtil.createQuotedSSID(scanResult.SSID))) {
                 continue;
             }
             ScanResultMatchInfo key2 = ScanResultMatchInfo.fromScanResult(scanResult);
@@ -6870,19 +6288,10 @@
         selectCandidateSecurityParamsIfNecessary(config, scanResults);
 
         if (mWifiGlobals.isConnectedMacRandomizationEnabled()) {
-            boolean isMacRandomizationForceDisabled = isMacRandomizationForceDisabledOnSsid(config);
-            if (config.macRandomizationSetting == WifiConfiguration.RANDOMIZATION_NONE
-                    || isMacRandomizationForceDisabled) {
-                setCurrentMacToFactoryMac(config);
-            } else {
+            if (config.macRandomizationSetting != WifiConfiguration.RANDOMIZATION_NONE) {
                 configureRandomizedMacAddress(config);
-            }
-            if (isMacRandomizationForceDisabled
-                    && config.macRandomizationSetting != WifiConfiguration.RANDOMIZATION_NONE) {
-                // update WifiConfigManager to disable MAC randomization so Settings show the right
-                // MAC randomization information.
-                config.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_NONE;
-                mWifiConfigManager.addOrUpdateNetwork(config, Process.SYSTEM_UID);
+            } else {
+                setCurrentMacToFactoryMac(config);
             }
         }
 
@@ -6898,12 +6307,6 @@
         }
     }
 
-    private boolean isMacRandomizationForceDisabledOnSsid(WifiConfiguration config) {
-        Set<String> unsupportedSsids = new ArraySet<>(mContext.getResources().getStringArray(
-                R.array.config_wifiForceDisableMacRandomizationSsidList));
-        return unsupportedSsids.contains(config.SSID);
-    }
-
     private void setConfigurationsPriorToIpClientProvisioning(WifiConfiguration config) {
         mIpClient.setHttpProxy(config.getHttpProxy());
         if (!TextUtils.isEmpty(mContext.getResources().getString(
@@ -6924,9 +6327,6 @@
                 config.macRandomizationSetting
                         != WifiConfiguration.RANDOMIZATION_NONE
                         && mWifiGlobals.isConnectedMacRandomizationEnabled();
-        final List<byte[]> ouis = getOuiInternal(config);
-        final List<android.net.DhcpOption> options =
-                mWifiConfigManager.getCustomDhcpOptions(WifiSsid.fromString(config.SSID), ouis);
         if (mVerboseLoggingEnabled) {
             final String key = config.getProfileKey();
             log("startIpClient netId=" + Integer.toString(mLastNetworkId)
@@ -6968,7 +6368,6 @@
                 // Use EUI64 address generation for link-local IPv6 addresses.
                 prov.withRandomMacAddress();
             }
-            prov.withDhcpOptions(convertToInternalDhcpOptions(options));
             mIpClient.startProvisioning(prov.build());
         } else {
             sendNetworkChangeBroadcast(DetailedState.OBTAINING_IPADDR);
@@ -6987,7 +6386,21 @@
             // CONNECTED.
             stopDhcpSetup();
             setConfigurationsPriorToIpClientProvisioning(config);
-            ScanResult scanResult = getScanResultInternal(config);
+            ScanDetailCache scanDetailCache =
+                    mWifiConfigManager.getScanDetailCacheForNetwork(config.networkId);
+            ScanResult scanResult = null;
+            if (mLastBssid != null) {
+                if (scanDetailCache != null) {
+                    scanResult = scanDetailCache.getScanResult(mLastBssid);
+                }
+
+                // The cached scan result of connected network would be null at the first
+                // connection, try to check full scan result list again to look up matched
+                // scan result associated to the current BSSID.
+                if (scanResult == null) {
+                    scanResult = mScanRequestProxy.getScanResult(mLastBssid);
+                }
+            }
 
             final ProvisioningConfiguration.Builder prov;
             ProvisioningConfiguration.ScanResultInfo scanResultInfo = null;
@@ -7028,48 +6441,12 @@
                 // Use EUI64 address generation for link-local IPv6 addresses.
                 prov.withRandomMacAddress();
             }
-            prov.withDhcpOptions(convertToInternalDhcpOptions(options));
             mIpClient.startProvisioning(prov.build());
         }
 
         return true;
     }
 
-    private List<byte[]> getOuiInternal(WifiConfiguration config) {
-        List<byte[]> ouis = new ArrayList<>();
-        ScanResult scanResult = getScanResultInternal(config);
-        if (scanResult == null) {
-            return ouis;
-        }
-        List<InformationElementUtil.Vsa> vsas = InformationElementUtil.getVendorSpecificIE(
-                scanResult.informationElements);
-        for (InformationElementUtil.Vsa vsa : vsas) {
-            byte[] oui = vsa.oui;
-            if (oui != null) {
-                ouis.add(oui);
-            }
-        }
-        return ouis;
-    }
-
-    private ScanResult getScanResultInternal(WifiConfiguration config) {
-        ScanDetailCache scanDetailCache =
-                mWifiConfigManager.getScanDetailCacheForNetwork(config.networkId);
-        ScanResult scanResult = null;
-        if (mLastBssid != null) {
-            if (scanDetailCache != null) {
-                scanResult = scanDetailCache.getScanResult(mLastBssid);
-            }
-            // The cached scan result of connected network would be null at the first
-            // connection, try to check full scan result list again to look up matched
-            // scan result associated to the current BSSID.
-            if (scanResult == null) {
-                scanResult = mScanRequestProxy.getScanResult(mLastBssid);
-            }
-        }
-        return scanResult;
-    }
-
     @Override
     public boolean setWifiConnectedNetworkScorer(IBinder binder,
             IWifiConnectedNetworkScorer scorer) {
@@ -7180,7 +6557,7 @@
                 enableRssiPolling(true);
             }
         } else {
-            if (mScreenOn && !isSecondaryInternet()) {
+            if (mScreenOn) {
                 // Stop RSSI polling (if enabled) for the secondary network.
                 enableRssiPolling(false);
             }
@@ -7313,32 +6690,17 @@
      * SSID allowlist with the linked networks.
      */
     private void updateLinkedNetworks(@NonNull WifiConfiguration config) {
-        if (!mContext.getResources().getBoolean(R.bool.config_wifiEnableLinkedNetworkRoaming)) {
-            return;
-        }
-
-        SecurityParams params = mWifiNative.getCurrentNetworkSecurityParams(mInterfaceName);
-        if (params == null || !params.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)) {
-            return;
-        }
-
-        // check for FT/PSK
-        ScanResult scanResult = mScanRequestProxy.getScanResult(mLastBssid);
-        if (scanResult == null || scanResult.capabilities.contains("FT/PSK")) {
+        if (!mContext.getResources().getBoolean(R.bool.config_wifiEnableLinkedNetworkRoaming)
+                || !config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_PSK)) {
             return;
         }
 
         mWifiConfigManager.updateLinkedNetworks(config.networkId);
         Map<String, WifiConfiguration> linkedNetworks = mWifiConfigManager
                 .getLinkedNetworksWithoutMasking(config.networkId);
-
         if (!mWifiNative.updateLinkedNetworks(mInterfaceName, config.networkId, linkedNetworks)) {
             return;
         }
-        // Update internal configs once the connection requests are accepted.
-        linkedNetworks.values().forEach(linkedConfig ->
-                mWifiConfigManager.setNetworkLastUsedSecurityParams(
-                        linkedConfig.networkId, params));
 
         List<String> allowlistSsids = new ArrayList<>(linkedNetworks.values().stream()
                 .map(linkedConfig -> linkedConfig.SSID)
@@ -7411,13 +6773,13 @@
         @WifiConfiguration.RecentFailureReason int reason;
 
         switch (statusCode) {
-            case StaIfaceStatusCode.AP_UNABLE_TO_HANDLE_NEW_STA:
+            case StatusCode.AP_UNABLE_TO_HANDLE_NEW_STA:
                 reason = WifiConfiguration.RECENT_FAILURE_AP_UNABLE_TO_HANDLE_NEW_STA;
                 break;
-            case StaIfaceStatusCode.ASSOC_REJECTED_TEMPORARILY:
+            case StatusCode.ASSOC_REJECTED_TEMPORARILY:
                 reason = WifiConfiguration.RECENT_FAILURE_REFUSED_TEMPORARILY;
                 break;
-            case StaIfaceStatusCode.DENIED_POOR_CHANNEL_CONDITIONS:
+            case StatusCode.DENIED_POOR_CHANNEL_CONDITIONS:
                 reason = WifiConfiguration.RECENT_FAILURE_POOR_CHANNEL_CONDITIONS;
                 break;
             default:
@@ -7437,16 +6799,4 @@
         mWifiConfigManager.setRecentFailureAssociationStatus(netId, reason);
 
     }
-
-    private void setSelectedRcoiForPasspoint(WifiConfiguration config) {
-        // Only relevant for Passpoint providers with roaming consortium subscriptions
-        if (config.isPasspoint() && config.roamingConsortiumIds != null
-                && config.roamingConsortiumIds.length > 0) {
-            long selectedRcoi = mPasspointManager.getSelectedRcoiForNetwork(
-                    config.getPasspointUniqueId(), config.SSID);
-            if (selectedRcoi != 0) {
-                config.enterpriseConfig.setSelectedRcoi(selectedRcoi);
-            }
-        }
-    }
 }
diff --git a/service/java/com/android/server/wifi/ClientModeImplListener.java b/service/java/com/android/server/wifi/ClientModeImplListener.java
index c434f58..a999ba4 100644
--- a/service/java/com/android/server/wifi/ClientModeImplListener.java
+++ b/service/java/com/android/server/wifi/ClientModeImplListener.java
@@ -39,15 +39,6 @@
     default void onInternetValidated(@NonNull ConcreteClientModeManager clientModeManager) {}
 
     /**
-     * Called when a ClientModeImpl's internet connection validation failed.
-     * @param clientModeManager the ClientModeManager associated with the ClientModeImpl
-     * @param currentConnectionDetectedCaptivePortal whether current connection has detected
-     *                                               captive portal.
-     */
-    default void onInternetValidationFailed(@NonNull ConcreteClientModeManager clientModeManager,
-            boolean currentConnectionDetectedCaptivePortal) {}
-
-    /**
      * Called when a ClientModeImpl starts a new connection attempt.
      * @param clientModeManager the ClientModeManager associated with the ClientModeImpl
      */
diff --git a/service/java/com/android/server/wifi/ClientModeManager.java b/service/java/com/android/server/wifi/ClientModeManager.java
index a4db70e..52bdb84 100644
--- a/service/java/com/android/server/wifi/ClientModeManager.java
+++ b/service/java/com/android/server/wifi/ClientModeManager.java
@@ -20,6 +20,7 @@
  * Base class for ClientModeManager.
  */
 public interface ClientModeManager extends ActiveModeManager, ClientMode {
+    int syncGetWifiState();
 
     @Override
     ClientRole getRole();
diff --git a/service/java/com/android/server/wifi/ConcreteClientModeManager.java b/service/java/com/android/server/wifi/ConcreteClientModeManager.java
index 7f2f13c..d7b52c3 100644
--- a/service/java/com/android/server/wifi/ConcreteClientModeManager.java
+++ b/service/java/com/android/server/wifi/ConcreteClientModeManager.java
@@ -16,8 +16,11 @@
 
 package com.android.server.wifi;
 
+import static android.net.wifi.WifiManager.WIFI_STATE_DISABLED;
+import static android.net.wifi.WifiManager.WIFI_STATE_DISABLING;
 import static android.net.wifi.WifiManager.WIFI_STATE_ENABLED;
 import static android.net.wifi.WifiManager.WIFI_STATE_ENABLING;
+import static android.net.wifi.WifiManager.WIFI_STATE_UNKNOWN;
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -38,6 +41,7 @@
 import android.net.wifi.hotspot2.OsuProvider;
 import android.net.wifi.nl80211.DeviceWiphyCapabilities;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.os.IBinder;
 import android.os.Looper;
 import android.os.Message;
@@ -60,20 +64,20 @@
 import com.android.internal.util.IState;
 import com.android.internal.util.State;
 import com.android.internal.util.StateMachine;
-import com.android.modules.utils.HandlerExecutor;
 import com.android.server.wifi.WifiNative.InterfaceCallback;
 import com.android.server.wifi.WifiNative.RxFateReport;
 import com.android.server.wifi.WifiNative.TxFateReport;
 import com.android.server.wifi.util.ActionListenerWrapper;
 import com.android.server.wifi.util.StateMachineObituary;
+import com.android.server.wifi.util.WifiHandler;
 import com.android.wifi.resources.R;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.util.ArrayDeque;
-import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * Manage WiFi in Client Mode where we connect to configured networks and in Scan Only Mode where
@@ -134,8 +138,6 @@
     private boolean mVerboseLoggingEnabled = false;
     private int mActiveSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
     private boolean mWifiStateChangeBroadcastEnabled = true;
-    private boolean mSecondaryInternet = false;
-    private boolean mIsDbs = false;
     /**
      * mClientModeImpl is only non-null when in {@link ClientModeStateMachine.ConnectModeState} -
      * it will be null in all other states
@@ -146,6 +148,15 @@
     @Nullable
     private ScanOnlyModeImpl mScanOnlyModeImpl = null;
 
+    /**
+     * One of  {@link WifiManager#WIFI_STATE_DISABLED},
+     * {@link WifiManager#WIFI_STATE_DISABLING},
+     * {@link WifiManager#WIFI_STATE_ENABLED},
+     * {@link WifiManager#WIFI_STATE_ENABLING},
+     * {@link WifiManager#WIFI_STATE_UNKNOWN}
+     */
+    private final AtomicInteger mWifiState = new AtomicInteger(WIFI_STATE_DISABLED);
+
     private boolean mIsStopped = true;
 
     ConcreteClientModeManager(
@@ -190,48 +201,6 @@
     }
 
     /**
-     * Sets whether this ClientModeManager is for secondary STA with internet.
-     * @param secondaryInternet whether the ClientModeManager is for secondary internet.
-     */
-    public void setSecondaryInternet(boolean secondaryInternet) {
-        // TODO: b/197670907 : Add client role ROLE_CLIENT_SECONDARY_INTERNET
-        if (mRole == ROLE_CLIENT_SECONDARY_LONG_LIVED) {
-            mSecondaryInternet = secondaryInternet;
-        }
-    }
-
-    /**
-     * Sets whether this ClientModeManager is for DBS AP multi internet.
-     * @param isDbs whether the ClientModeManager is connecting to to the same SSID as primary.
-     */
-    public void setSecondaryInternetDbsAp(boolean isDbs) {
-        // TODO: b/197670907 : Add client role ROLE_CLIENT_SECONDARY_INTERNET
-        if (mRole == ROLE_CLIENT_SECONDARY_LONG_LIVED) {
-            mIsDbs = isDbs;
-        }
-    }
-
-    /**
-     * Returns whether this ClientModeManager is for secondary STA with internet.
-     * @return true if it is for secondary STA with internet.
-     */
-    public boolean isSecondaryInternet() {
-        return mSecondaryInternet;
-    }
-
-    /**
-     * Returns whether this ClientModeManager is for DBS AP multi internet.
-     * @return true if the ClientModeManager is connecting to to the same SSID as primary.
-     */
-    public boolean isSecondaryInternetDbsAp() {
-        if (!isSecondaryInternet()) {
-            Log.wtf(TAG, "isSecondaryInternetDbsAp called while not secondary internet!?");
-            (new Throwable()).printStackTrace();
-        }
-        return mIsDbs;
-    }
-
-    /**
      * Disconnect from any currently connected networks and stop client mode.
      */
     @Override
@@ -248,7 +217,7 @@
         mDeferStopHandler.start(getWifiOffDeferringTimeMs());
     }
 
-    private class DeferStopHandler extends Handler {
+    private class DeferStopHandler extends WifiHandler {
         private boolean mIsDeferring = false;
         private ImsMmTelManager mImsMmTelManager = null;
         private Looper mLooper = null;
@@ -256,7 +225,7 @@
         private int mMaximumDeferringTimeMillis = 0;
         private long mDeferringStartTimeMillis = 0;
         private ConnectivityManager mConnectivityManager = null;
-        private List<ImsNetworkCallback> mImsNetworks = new ArrayList<>();
+        private boolean mIsImsNetworkLost = false;
         private boolean mIsImsNetworkUnregistered = false;
 
         private final RegistrationManager.RegistrationCallback mImsRegistrationCallback =
@@ -280,23 +249,12 @@
                 };
 
         private final class ImsNetworkCallback extends NetworkCallback {
-            private final int mNetworkType;
             private int mRegisteredImsNetworkCount = 0;
 
-            /**
-             * Constructor for ImsNetworkCallback.
-             *
-             * @param type One of android.net.NetworkCapabilities.NetCapability.
-             */
-            ImsNetworkCallback(int type) {
-                mNetworkType = type;
-            }
-
             @Override
             public void onAvailable(Network network) {
                 synchronized (this) {
-                    Log.d(getTag(), "IMS network available: " + network
-                            + ", type: " + mNetworkType);
+                    Log.d(getTag(), "IMS network available: " + network);
                     mRegisteredImsNetworkCount++;
                 }
             }
@@ -306,25 +264,22 @@
                 synchronized (this) {
                     Log.d(getTag(), "IMS network lost: " + network
                             + " ,isDeferring: " + mIsDeferring
-                            + " ,registered IMS network count: " + mRegisteredImsNetworkCount
-                            + ", type: " + mNetworkType);
+                            + " ,registered IMS network count: " + mRegisteredImsNetworkCount);
                     mRegisteredImsNetworkCount--;
                     if (mIsDeferring && mRegisteredImsNetworkCount <= 0) {
                         mRegisteredImsNetworkCount = 0;
+                        mIsImsNetworkLost = true;
                         checkAndContinueToStopWifi();
                     }
                 }
             }
-
-            public boolean isNetworkLost() {
-                return 0 == mRegisteredImsNetworkCount;
-            }
         }
 
+        private NetworkCallback mImsNetworkCallback = null;
+
         DeferStopHandler(Looper looper) {
-            super(looper);
+            super(TAG, looper);
             mLooper = looper;
-            mConnectivityManager = mContext.getSystemService(ConnectivityManager.class);
         }
 
         public void start(int delayMs) {
@@ -358,33 +313,27 @@
                 return;
             }
 
-            registerImsNetworkCallback(NetworkCapabilities.NET_CAPABILITY_IMS);
-            registerImsNetworkCallback(NetworkCapabilities.NET_CAPABILITY_EIMS);
-        }
-
-        private void registerImsNetworkCallback(int imsType) {
             NetworkRequest imsRequest = new NetworkRequest.Builder()
-                    .addCapability(imsType)
+                    .addCapability(NetworkCapabilities.NET_CAPABILITY_IMS)
                     .addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR)
                     .build();
-            ImsNetworkCallback imsCallback = new ImsNetworkCallback(imsType);
-            mConnectivityManager.registerNetworkCallback(imsRequest, imsCallback,
+
+            mConnectivityManager =
+                    (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
+
+            mImsNetworkCallback = new ImsNetworkCallback();
+            mConnectivityManager.registerNetworkCallback(imsRequest, mImsNetworkCallback,
                     new Handler(mLooper));
-            mImsNetworks.add(imsCallback);
         }
 
         private void checkAndContinueToStopWifi() {
-            if (!mIsImsNetworkUnregistered) return;
-
-            for (ImsNetworkCallback c: mImsNetworks) {
-                if (!c.isNetworkLost()) return;
-            }
-
-            // Add delay for targets where IMS PDN down at modem takes additional delay.
-            int delay = mContext.getResources()
-                    .getInteger(R.integer.config_wifiDelayDisconnectOnImsLostMs);
-            if (delay == 0 || !postDelayed(mRunnable, delay)) {
-                continueToStopWifi();
+            if (mIsImsNetworkLost && mIsImsNetworkUnregistered) {
+                // Add delay for targets where IMS PDN down at modem takes additional delay.
+                int delay = mContext.getResources()
+                        .getInteger(R.integer.config_wifiDelayDisconnectOnImsLostMs);
+                if (delay == 0 || !postDelayed(mRunnable, delay)) {
+                    continueToStopWifi();
+                }
             }
         }
 
@@ -426,14 +375,13 @@
                 }
             }
 
-            if (mConnectivityManager != null && mImsNetworks.size() > 0) {
-                for (ImsNetworkCallback c: mImsNetworks) {
-                    mConnectivityManager.unregisterNetworkCallback(c);
-                }
-                mImsNetworks.clear();
+            if (mConnectivityManager != null && mImsNetworkCallback != null) {
+                mConnectivityManager.unregisterNetworkCallback(mImsNetworkCallback);
+                mImsNetworkCallback = null;
             }
 
             mIsDeferring = false;
+            mIsImsNetworkLost = false;
             mIsImsNetworkUnregistered = false;
         }
     }
@@ -442,8 +390,8 @@
      * Get deferring time before turning off WiFi.
      */
     private int getWifiOffDeferringTimeMs() {
-        SubscriptionManager subscriptionManager =
-                mContext.getSystemService(SubscriptionManager.class);
+        SubscriptionManager subscriptionManager = (SubscriptionManager) mContext.getSystemService(
+                Context.TELEPHONY_SUBSCRIPTION_SERVICE);
         if (subscriptionManager == null) {
             Log.d(getTag(), "SubscriptionManager not found");
             return 0;
@@ -487,7 +435,8 @@
             return 0;
         }
 
-        CarrierConfigManager configManager = mContext.getSystemService(CarrierConfigManager.class);
+        CarrierConfigManager configManager =
+                (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
         PersistableBundle config = configManager.getConfigForSubId(subId);
         return (config != null)
                 ? config.getInt(CarrierConfigManager.Ims.KEY_WIFI_OFF_DEFERRING_TIME_MILLIS_INT)
@@ -613,14 +562,12 @@
         pw.println("Dump of ClientModeManager id=" + mId);
         pw.println("current StateMachine mode: " + getCurrentStateName());
         pw.println("mRole: " + mRole);
-        pw.println("mPreviousRole: " + mPreviousRole);
         pw.println("mTargetRoleChangeInfo: " + mTargetRoleChangeInfo);
         pw.println("mClientInterfaceName: " + mClientInterfaceName);
         pw.println("mIfaceIsUp: " + mIfaceIsUp);
-        pw.println("mSecondaryInternet: " + mSecondaryInternet);
-        pw.println("mIsDbs: " + mIsDbs);
         mStateMachine.dump(fd, pw, args);
         pw.println();
+        pw.println("Wi-Fi is " + syncGetWifiStateByName());
         if (mClientModeImpl == null) {
             pw.println("No active ClientModeImpl instance");
         } else {
@@ -648,16 +595,16 @@
      * @param currentState current wifi state
      */
     private void updateConnectModeState(ClientRole role, int newState, int currentState) {
-        if (role != ROLE_CLIENT_PRIMARY || !mWifiStateChangeBroadcastEnabled) {
-            // do not raise public broadcast unless this is the primary client mode manager
-            return;
-        }
-        // TODO(b/186881160): May need to restore per STA state for Battery state reported.
-        mWifiInjector.getActiveModeWarden().setWifiStateForApiCalls(newState);
+        setWifiStateForApiCalls(newState);
+
         if (newState == WifiManager.WIFI_STATE_UNKNOWN) {
             // do not need to broadcast failure to system
             return;
         }
+        if (role != ROLE_CLIENT_PRIMARY || !mWifiStateChangeBroadcastEnabled) {
+            // do not raise public broadcast unless this is the primary client mode manager
+            return;
+        }
 
         // TODO(b/175839153): this broadcast should only be sent out when wifi is toggled on/off,
         //  not per CMM
@@ -683,6 +630,41 @@
         }
     }
 
+    private void setWifiStateForApiCalls(int newState) {
+        switch (newState) {
+            case WIFI_STATE_DISABLING:
+            case WIFI_STATE_DISABLED:
+            case WIFI_STATE_ENABLING:
+            case WIFI_STATE_ENABLED:
+            case WIFI_STATE_UNKNOWN:
+                if (mVerboseLoggingEnabled) {
+                    Log.d(getTag(), "setting wifi state to: " + newState);
+                }
+                mWifiState.set(newState);
+                break;
+            default:
+                Log.d(getTag(), "attempted to set an invalid state: " + newState);
+                break;
+        }
+    }
+
+    private String syncGetWifiStateByName() {
+        switch (mWifiState.get()) {
+            case WIFI_STATE_DISABLING:
+                return "disabling";
+            case WIFI_STATE_DISABLED:
+                return "disabled";
+            case WIFI_STATE_ENABLING:
+                return "enabling";
+            case WIFI_STATE_ENABLED:
+                return "enabled";
+            case WIFI_STATE_UNKNOWN:
+                return "unknown state";
+            default:
+                return "[invalid state]";
+        }
+    }
+
     private class ClientModeStateMachine extends StateMachine {
         // Commands for the state machine.
         public static final int CMD_START = 0;
@@ -843,8 +825,6 @@
                                 mWifiNativeInterfaceCallback, roleChangeInfo.requestorWs);
                         if (TextUtils.isEmpty(mClientInterfaceName)) {
                             Log.e(getTag(), "Failed to create ClientInterface. Sit in Idle");
-                            takeBugReportInterfaceFailureIfNeeded(
-                                    "Wi-Fi scan STA interface HAL failure");
                             mModeListener.onStartFailure(ConcreteClientModeManager.this);
                             break;
                         }
@@ -876,9 +856,6 @@
                     Log.d(getTag(), "interface down!");
                     mStateMachine.sendMessage(CMD_INTERFACE_DOWN);
                 }
-                if (mClientModeImpl != null) {
-                    mClientModeImpl.onUpChanged(isUp);
-                }
             }
 
             @Override
@@ -908,8 +885,6 @@
                             updateConnectModeState(roleChangeInfo.role,
                                     WifiManager.WIFI_STATE_DISABLED,
                                     WifiManager.WIFI_STATE_UNKNOWN);
-                            takeBugReportInterfaceFailureIfNeeded(
-                                    "Wi-Fi STA interface HAL failure");
                             mModeListener.onStartFailure(ConcreteClientModeManager.this);
                             break;
                         }
@@ -1153,10 +1128,9 @@
         }
     }
 
-    private void takeBugReportInterfaceFailureIfNeeded(String bugTitle) {
-        if (mWifiInjector.getDeviceConfigFacade().isInterfaceFailureBugreportEnabled()) {
-            mWifiInjector.getWifiDiagnostics().takeBugReport(bugTitle, bugTitle);
-        }
+    @Override
+    public int syncGetWifiState() {
+        return mWifiState.get();
     }
 
     @NonNull
@@ -1176,14 +1150,14 @@
 
     @Override
     public void connectNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper,
-            int callingUid, @NonNull String packageName) {
-        getClientMode().connectNetwork(result, wrapper, callingUid, packageName);
+            int callingUid) {
+        getClientMode().connectNetwork(result, wrapper, callingUid);
     }
 
     @Override
     public void saveNetwork(NetworkUpdateResult result, ActionListenerWrapper wrapper,
-            int callingUid, @NonNull String packageName) {
-        getClientMode().saveNetwork(result, wrapper, callingUid, packageName);
+            int callingUid) {
+        getClientMode().saveNetwork(result, wrapper, callingUid);
     }
 
     @Override
@@ -1321,13 +1295,8 @@
     }
 
     @Override
-    public boolean setPowerSave(@PowerSaveClientType int client, boolean ps) {
-        return getClientMode().setPowerSave(client, ps);
-    }
-
-    @Override
-    public boolean enablePowerSave() {
-        return getClientMode().enablePowerSave();
+    public boolean setPowerSave(boolean ps) {
+        return getClientMode().setPowerSave(ps);
     }
 
     @Override
@@ -1453,9 +1422,4 @@
                 + " role=" + getRole()
                 + "}";
     }
-
-    @Override
-    public void updateCapabilities() {
-        getClientMode().updateCapabilities();
-    }
 }
diff --git a/service/java/com/android/server/wifi/ConfigurationMap.java b/service/java/com/android/server/wifi/ConfigurationMap.java
index 85206d9..4219a90 100644
--- a/service/java/com/android/server/wifi/ConfigurationMap.java
+++ b/service/java/com/android/server/wifi/ConfigurationMap.java
@@ -19,7 +19,6 @@
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
 import android.os.UserHandle;
-import android.text.TextUtils;
 
 import androidx.annotation.NonNull;
 
@@ -129,7 +128,7 @@
             return null;
         }
         for (WifiConfiguration config : mPerIDForCurrentUser.values()) {
-            if (TextUtils.equals(config.getProfileKey(), key)) {
+            if (config.getProfileKey().equals(key)) {
                 return config;
             }
         }
diff --git a/service/java/com/android/server/wifi/ConnectHelper.java b/service/java/com/android/server/wifi/ConnectHelper.java
index 50110a9..a9b71b5 100644
--- a/service/java/com/android/server/wifi/ConnectHelper.java
+++ b/service/java/com/android/server/wifi/ConnectHelper.java
@@ -46,10 +46,9 @@
     public void connectToNetwork(
             @NonNull NetworkUpdateResult result,
             @NonNull ActionListenerWrapper wrapper,
-            int callingUid, @NonNull String packageName) {
+            int callingUid) {
         connectToNetwork(
-                mActiveModeWarden.getPrimaryClientModeManager(), result, wrapper, callingUid,
-                packageName);
+                mActiveModeWarden.getPrimaryClientModeManager(), result, wrapper, callingUid);
     }
 
     /**
@@ -60,14 +59,14 @@
             @NonNull ClientModeManager clientModeManager,
             @NonNull NetworkUpdateResult result,
             @NonNull ActionListenerWrapper wrapper,
-            int callingUid, @NonNull String packageName) {
+            int callingUid) {
         int netId = result.getNetworkId();
         if (mWifiConfigManager.getConfiguredNetwork(netId) == null) {
             Log.e(TAG, "connectToNetwork Invalid network Id=" + netId);
-            wrapper.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+            wrapper.sendFailure(WifiManager.ERROR);
             return;
         }
-        mWifiConfigManager.updateBeforeConnect(netId, callingUid, packageName);
-        clientModeManager.connectNetwork(result, wrapper, callingUid, packageName);
+        mWifiConfigManager.updateBeforeConnect(netId, callingUid);
+        clientModeManager.connectNetwork(result, wrapper, callingUid);
     }
 }
diff --git a/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java b/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java
index 709ecae..948abc1 100644
--- a/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java
+++ b/service/java/com/android/server/wifi/ConnectToNetworkNotificationBuilder.java
@@ -23,7 +23,6 @@
 import android.content.Intent;
 import android.graphics.drawable.Icon;
 import android.net.wifi.ScanResult;
-import android.net.wifi.WifiContext;
 import android.util.Log;
 
 import com.android.modules.utils.build.SdkLevel;
diff --git a/service/java/com/android/server/wifi/ConnectedScore.java b/service/java/com/android/server/wifi/ConnectedScore.java
index 2c67a5c..8b37d5d 100644
--- a/service/java/com/android/server/wifi/ConnectedScore.java
+++ b/service/java/com/android/server/wifi/ConnectedScore.java
@@ -16,10 +16,8 @@
 
 package com.android.server.wifi;
 
-import android.annotation.Nullable;
 import android.net.wifi.WifiInfo;
 
-import com.android.server.wifi.ActiveModeManager.ClientRole;
 /**
  * Base class for connection scoring
  */
@@ -31,20 +29,9 @@
     /** Initial Wifi score when starting up NetworkAgent. */
     public static final int WIFI_INITIAL_SCORE = WIFI_MAX_SCORE;
 
-    /** Wifi score of secondary network compared to primary network. */
-    public static final int WIFI_SECONDARY_DELTA_SCORE = 8;
-    /** Maximum NetworkAgent score for secondary network that should be generated by wifi */
-    public static final int WIFI_SECONDARY_MAX_SCORE = WIFI_MAX_SCORE - WIFI_SECONDARY_DELTA_SCORE;
-    /** Initial Wifi score of secondary network when starting up NetworkAgent. */
-    public static final int WIFI_SECONDARY_INITIAL_SCORE = WIFI_INITIAL_SCORE
-            - WIFI_SECONDARY_DELTA_SCORE;
-
     /** Score at which wifi is considered poor enough to give up ant try something else */
     public static final int WIFI_TRANSITION_SCORE = WIFI_MAX_SCORE - 10;
 
-    public static final int WIFI_SECONDARY_TRANSITION_SCORE = WIFI_TRANSITION_SCORE
-            - WIFI_SECONDARY_DELTA_SCORE;
-
     public static final int WIFI_MIN_SCORE = 0;
 
     final Clock mClock;
@@ -52,10 +39,6 @@
     /** This is a typical STD for the connected RSSI for a phone sitting still */
     public double mDefaultRssiStandardDeviation = 2.0;
 
-    /** The current role of the WifiScoreReport owns this scorer. */
-    @Nullable
-    private ClientRole mCurrentRole = null;
-
     /**
      *
      * @param clock is the time source for getMillis()
@@ -124,14 +107,4 @@
      * Clears out state associated with the connection
      */
     public abstract void reset();
-
-    /** Called when the owner {@link ConcreteClientModeManager}'s role changes. */
-    public void onRoleChanged(@Nullable ClientRole role) {
-        mCurrentRole = role;
-    }
-
-    /** Returns whether this scores primary network based on the role */
-    protected boolean isPrimary() {
-        return mCurrentRole != null && mCurrentRole == ActiveModeManager.ROLE_CLIENT_PRIMARY;
-    }
 }
diff --git a/service/java/com/android/server/wifi/ConnectionFailureNotificationBuilder.java b/service/java/com/android/server/wifi/ConnectionFailureNotificationBuilder.java
index aa062a8..8620ddc 100644
--- a/service/java/com/android/server/wifi/ConnectionFailureNotificationBuilder.java
+++ b/service/java/com/android/server/wifi/ConnectionFailureNotificationBuilder.java
@@ -17,12 +17,14 @@
 package com.android.server.wifi;
 
 import android.annotation.NonNull;
+import android.app.AlertDialog;
 import android.app.Notification;
 import android.app.PendingIntent;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.graphics.drawable.Icon;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
+import android.view.WindowManager;
 
 import com.android.wifi.resources.R;
 
@@ -85,4 +87,28 @@
                 .setAutoCancel(true)
                 .build();
     }
+
+    /**
+     * Creates an AlertDialog that allows the user to disable MAC randomization for a network.
+     * @param ssid the displayed SSID in the dialog
+     * @param onUserConfirm
+     */
+    public AlertDialog buildChangeMacRandomizationSettingDialog(
+            String ssid, DialogInterface.OnClickListener onUserConfirm) {
+        AlertDialog.Builder builder = mFrameworkFacade.makeAlertDialogBuilder(mContext)
+                .setTitle(mContext.getResources().getString(
+                        R.string.wifi_disable_mac_randomization_dialog_title))
+                .setMessage(mContext.getResources().getString(
+                        R.string.wifi_disable_mac_randomization_dialog_message, ssid))
+                .setPositiveButton(
+                        mContext.getResources().getString(
+                                R.string.wifi_disable_mac_randomization_dialog_confirm_text),
+                        onUserConfirm)
+                // A null listener allows the dialog to be dismissed directly.
+                .setNegativeButton(android.R.string.no, null);
+        AlertDialog dialog = builder.create();
+        dialog.setCanceledOnTouchOutside(false);
+        dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+        return dialog;
+    }
 }
diff --git a/service/java/com/android/server/wifi/ConnectionFailureNotifier.java b/service/java/com/android/server/wifi/ConnectionFailureNotifier.java
index 9131144..123b8f6 100644
--- a/service/java/com/android/server/wifi/ConnectionFailureNotifier.java
+++ b/service/java/com/android/server/wifi/ConnectionFailureNotifier.java
@@ -16,17 +16,16 @@
 
 package com.android.server.wifi;
 
+import android.app.AlertDialog;
 import android.app.Notification;
 import android.content.BroadcastReceiver;
 import android.content.Context;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.content.res.Resources;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.os.Handler;
 import android.os.Process;
-import android.text.TextUtils;
 import android.util.Log;
 
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
@@ -43,7 +42,6 @@
     private final WifiConfigManager mWifiConfigManager;
     private final WifiConnectivityManager mWifiConnectivityManager;
     private final WifiNotificationManager mNotificationManager;
-    private final WifiDialogManager mWifiDialogManager;
     private final Handler mHandler;
     private final ConnectionFailureNotificationBuilder mConnectionFailureNotificationBuilder;
 
@@ -54,14 +52,12 @@
             WifiConnectivityManager wifiConnectivityManager,
             Handler handler,
             WifiNotificationManager notificationManager,
-            ConnectionFailureNotificationBuilder connectionFailureNotificationBuilder,
-            WifiDialogManager wifiDialogManager) {
+            ConnectionFailureNotificationBuilder connectionFailureNotificationBuilder) {
         mContext = context;
         mFrameworkFacade = framework;
         mWifiConfigManager = wifiConfigManager;
         mWifiConnectivityManager = wifiConnectivityManager;
         mNotificationManager = notificationManager;
-        mWifiDialogManager = wifiDialogManager;
         mHandler = handler;
         mConnectionFailureNotificationBuilder = connectionFailureNotificationBuilder;
 
@@ -73,7 +69,7 @@
                     @Override
                     public void onReceive(Context context, Intent intent) {
                         String action = intent.getAction();
-                        if (TextUtils.equals(action, ConnectionFailureNotificationBuilder
+                        if (action.equals(ConnectionFailureNotificationBuilder
                                 .ACTION_SHOW_SET_RANDOMIZATION_DETAILS)) {
                             int networkId = intent.getIntExtra(
                                     ConnectionFailureNotificationBuilder
@@ -104,71 +100,61 @@
                 notification);
     }
 
+    class DisableMacRandomizationListener implements DialogInterface.OnClickListener {
+        private WifiConfiguration mConfig;
+
+        DisableMacRandomizationListener(WifiConfiguration config) {
+            mConfig = config;
+        }
+
+        @Override
+        public void onClick(DialogInterface dialog, int which) {
+            mHandler.post(() -> {
+                mConfig.macRandomizationSetting =
+                        WifiConfiguration.RANDOMIZATION_NONE;
+                mWifiConfigManager.addOrUpdateNetwork(mConfig, Process.SYSTEM_UID);
+                WifiConfiguration updatedConfig =
+                        mWifiConfigManager.getConfiguredNetwork(mConfig.networkId);
+                if (updatedConfig.macRandomizationSetting
+                        == WifiConfiguration.RANDOMIZATION_NONE) {
+                    String message = mContext.getResources().getString(
+                            R.string.wifi_disable_mac_randomization_dialog_success);
+                    mFrameworkFacade.showToast(mContext, message);
+                    mWifiConfigManager.enableNetwork(updatedConfig.networkId, true,
+                            Process.SYSTEM_UID, null);
+                    mWifiConnectivityManager.forceConnectivityScan(
+                            ClientModeImpl.WIFI_WORK_SOURCE);
+                } else {
+                    // Shouldn't ever fail, but here for completeness
+                    String message = mContext.getResources().getString(
+                            R.string.wifi_disable_mac_randomization_dialog_failure);
+                    mFrameworkFacade.showToast(mContext, message);
+                    Log.e(TAG, "Failed to modify mac randomization setting");
+                }
+            });
+        }
+    }
+
     /**
      * Class to show a AlertDialog which notifies the user of a network not being privacy
      * compliant and then suggests an action.
      */
     private void showRandomizationSettingsDialog(int networkId, String ssidAndSecurityType) {
-        Resources res = mContext.getResources();
         WifiConfiguration config = mWifiConfigManager.getConfiguredNetwork(networkId);
         // Make sure the networkId is still pointing to the correct WifiConfiguration since
         // there might be a large time gap between when the notification shows and when
         // it's tapped.
-        if (config == null || !TextUtils.equals(ssidAndSecurityType,
-                config.getSsidAndSecurityTypeString())) {
-            String message = res.getString(
+        if (config == null || ssidAndSecurityType == null
+                || !ssidAndSecurityType.equals(config.getSsidAndSecurityTypeString())) {
+            String message = mContext.getResources().getString(
                     R.string.wifi_disable_mac_randomization_dialog_network_not_found);
             mFrameworkFacade.showToast(mContext, message);
             return;
         }
 
-        mWifiDialogManager.createSimpleDialog(
-                res.getString(R.string.wifi_disable_mac_randomization_dialog_title),
-                res.getString(R.string.wifi_disable_mac_randomization_dialog_message, config.SSID),
-                res.getString(R.string.wifi_disable_mac_randomization_dialog_confirm_text),
-                res.getString(android.R.string.cancel),
-                null /* neutralButtonText */,
-                new WifiDialogManager.SimpleDialogCallback() {
-                    @Override
-                    public void onPositiveButtonClicked() {
-                        config.macRandomizationSetting =
-                                WifiConfiguration.RANDOMIZATION_NONE;
-                        mWifiConfigManager.addOrUpdateNetwork(config, Process.SYSTEM_UID);
-                        WifiConfiguration updatedConfig =
-                                mWifiConfigManager.getConfiguredNetwork(config.networkId);
-                        if (updatedConfig.macRandomizationSetting
-                                == WifiConfiguration.RANDOMIZATION_NONE) {
-                            String message = mContext.getResources().getString(
-                                    R.string.wifi_disable_mac_randomization_dialog_success);
-                            mFrameworkFacade.showToast(mContext, message);
-                            mWifiConfigManager.enableNetwork(updatedConfig.networkId, true,
-                                    Process.SYSTEM_UID, null);
-                            mWifiConnectivityManager.forceConnectivityScan(
-                                    ClientModeImpl.WIFI_WORK_SOURCE);
-                        } else {
-                            // Shouldn't ever fail, but here for completeness
-                            String message = mContext.getResources().getString(
-                                    R.string.wifi_disable_mac_randomization_dialog_failure);
-                            mFrameworkFacade.showToast(mContext, message);
-                            Log.e(TAG, "Failed to modify mac randomization setting");
-                        }
-                    }
-
-                    @Override
-                    public void onNegativeButtonClicked() {
-                        // Do nothing.
-                    }
-
-                    @Override
-                    public void onNeutralButtonClicked() {
-                        // Not used.
-                    }
-
-                    @Override
-                    public void onCancelled() {
-                        // Do nothing.
-                    }
-                },
-                new WifiThreadRunner(mHandler)).launchDialog();
+        AlertDialog dialog = mConnectionFailureNotificationBuilder
+                .buildChangeMacRandomizationSettingDialog(config.SSID,
+                        new DisableMacRandomizationListener(config));
+        dialog.show();
     }
 }
diff --git a/service/java/com/android/server/wifi/DefaultClientModeManager.java b/service/java/com/android/server/wifi/DefaultClientModeManager.java
index 450dd1e..b29ed83 100644
--- a/service/java/com/android/server/wifi/DefaultClientModeManager.java
+++ b/service/java/com/android/server/wifi/DefaultClientModeManager.java
@@ -17,6 +17,7 @@
 package com.android.server.wifi;
 
 import android.annotation.Nullable;
+import android.net.wifi.WifiManager;
 import android.os.WorkSource;
 
 import java.io.FileDescriptor;
@@ -68,6 +69,11 @@
     public void enableVerboseLogging(boolean verbose) { }
 
     @Override
+    public int syncGetWifiState() {
+        return WifiManager.WIFI_STATE_DISABLED;
+    }
+
+    @Override
     public long getId() {
         return ID;
     }
diff --git a/service/java/com/android/server/wifi/DeviceConfigFacade.java b/service/java/com/android/server/wifi/DeviceConfigFacade.java
index 2650bb4..6fba546 100644
--- a/service/java/com/android/server/wifi/DeviceConfigFacade.java
+++ b/service/java/com/android/server/wifi/DeviceConfigFacade.java
@@ -180,8 +180,8 @@
     private int mHealthMonitorRatioThrNumerator;
     private int mHealthMonitorMinRssiThrDbm;
     private Set<String> mRandomizationFlakySsidHotlist;
-    private Set<String> mNonPersistentMacRandomizationSsidAllowlist;
-    private Set<String> mNonPersistentMacRandomizationSsidBlocklist;
+    private Set<String> mAggressiveMacRandomizationSsidAllowlist;
+    private Set<String> mAggressiveMacRandomizationSsidBlocklist;
     private boolean mIsAbnormalConnectionFailureBugreportEnabled;
     private boolean mIsAbnormalDisconnectionBugreportEnabled;
     private int mHealthMonitorMinNumConnectionAttempt;
@@ -201,10 +201,9 @@
     private int mMinConfirmationDurationSendLowScoreMs;
     private int mMinConfirmationDurationSendHighScoreMs;
     private int mRssiThresholdNotSendLowScoreToCsDbm;
-    private boolean mAllowNonPersistentMacRandomizationOnOpenSsids;
+    private boolean mAllowEnhancedMacRandomizationOnOpenSsids;
     private int mTrafficStatsThresholdMaxKbyte;
     private int mBandwidthEstimatorLargeTimeConstantSec;
-    private boolean mInterfaceFailureBugreportEnabled;
 
     public DeviceConfigFacade(Context context, Handler handler, WifiMetrics wifiMetrics) {
         mContext = context;
@@ -310,9 +309,9 @@
 
         mRandomizationFlakySsidHotlist =
                 getUnmodifiableSetQuoted("randomization_flaky_ssid_hotlist");
-        mNonPersistentMacRandomizationSsidAllowlist =
+        mAggressiveMacRandomizationSsidAllowlist =
                 getUnmodifiableSetQuoted("aggressive_randomization_ssid_allowlist");
-        mNonPersistentMacRandomizationSsidBlocklist =
+        mAggressiveMacRandomizationSsidBlocklist =
                 getUnmodifiableSetQuoted("aggressive_randomization_ssid_blocklist");
 
         mIsAbnormalConnectionFailureBugreportEnabled = DeviceConfig.getBoolean(NAMESPACE,
@@ -369,15 +368,13 @@
         mRssiThresholdNotSendLowScoreToCsDbm = DeviceConfig.getInt(NAMESPACE,
                 "rssi_threshold_not_send_low_score_to_cs_dbm",
                 DEFAULT_RSSI_THRESHOLD_NOT_SEND_LOW_SCORE_TO_CS_DBM);
-        mAllowNonPersistentMacRandomizationOnOpenSsids = DeviceConfig.getBoolean(NAMESPACE,
+        mAllowEnhancedMacRandomizationOnOpenSsids = DeviceConfig.getBoolean(NAMESPACE,
                 "allow_enhanced_mac_randomization_on_open_ssids", false);
         mTrafficStatsThresholdMaxKbyte = DeviceConfig.getInt(NAMESPACE,
                 "traffic_stats_threshold_max_kbyte", DEFAULT_TRAFFIC_STATS_THRESHOLD_MAX_KB);
         mBandwidthEstimatorLargeTimeConstantSec = DeviceConfig.getInt(NAMESPACE,
                 "bandwidth_estimator_time_constant_large_sec",
                 DEFAULT_BANDWIDTH_ESTIMATOR_TIME_CONSTANT_LARGE_SEC);
-        mInterfaceFailureBugreportEnabled = DeviceConfig.getBoolean(NAMESPACE,
-                "interface_failure_bugreport_enabled", false);
 
     }
 
@@ -624,17 +621,17 @@
     }
 
     /**
-     * Gets the list of SSIDs for non-persistent MAC randomization.
+     * Gets the list of SSIDs for aggressive MAC randomization.
      */
-    public Set<String> getNonPersistentMacRandomizationSsidAllowlist() {
-        return mNonPersistentMacRandomizationSsidAllowlist;
+    public Set<String> getAggressiveMacRandomizationSsidAllowlist() {
+        return mAggressiveMacRandomizationSsidAllowlist;
     }
 
     /**
-     * Gets the list of SSIDs that non-persistent MAC randomization should not be used for.
+     * Gets the list of SSIDs that aggressive MAC randomization should not be used for.
      */
-    public Set<String> getNonPersistentMacRandomizationSsidBlocklist() {
-        return mNonPersistentMacRandomizationSsidBlocklist;
+    public Set<String> getAggressiveMacRandomizationSsidBlocklist() {
+        return mAggressiveMacRandomizationSsidBlocklist;
     }
     /**
      * Gets the feature flag for reporting abnormal connection failure.
@@ -774,10 +771,10 @@
     }
 
     /**
-     * Gets whether non-persistent MAC randomization should be allowed on open networks.
+     * Gets whether enhanced MAC randomization should be allowed on open networks.
      */
-    public boolean allowNonPersistentMacRandomizationOnOpenSsids() {
-        return mAllowNonPersistentMacRandomizationOnOpenSsids;
+    public boolean allowEnhancedMacRandomizationOnOpenSsids() {
+        return mAllowEnhancedMacRandomizationOnOpenSsids;
     }
 
     /**
@@ -794,10 +791,4 @@
         return mBandwidthEstimatorLargeTimeConstantSec;
     }
 
-    /**
-     * Gets the feature flag for reporting interface setup failure
-     */
-    public boolean isInterfaceFailureBugreportEnabled() {
-        return mInterfaceFailureBugreportEnabled;
-    }
 }
diff --git a/service/java/com/android/server/wifi/DppManager.java b/service/java/com/android/server/wifi/DppManager.java
index 359e1ad..7cf6e73 100644
--- a/service/java/com/android/server/wifi/DppManager.java
+++ b/service/java/com/android/server/wifi/DppManager.java
@@ -20,6 +20,12 @@
 
 import android.annotation.Nullable;
 import android.content.Context;
+import android.hardware.wifi.supplicant.V1_2.DppAkm;
+import android.hardware.wifi.supplicant.V1_2.DppNetRole;
+import android.hardware.wifi.supplicant.V1_3.DppProgressCode;
+import android.hardware.wifi.supplicant.V1_3.DppSuccessCode;
+import android.hardware.wifi.supplicant.V1_4.DppCurve;
+import android.hardware.wifi.supplicant.V1_4.DppFailureCode;
 import android.net.wifi.EasyConnectStatusCallback;
 import android.net.wifi.IDppCallback;
 import android.net.wifi.ScanResult;
@@ -38,12 +44,6 @@
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.WakeupMessage;
 import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.SupplicantStaIfaceHal.DppAkm;
-import com.android.server.wifi.SupplicantStaIfaceHal.DppCurve;
-import com.android.server.wifi.SupplicantStaIfaceHal.DppEventType;
-import com.android.server.wifi.SupplicantStaIfaceHal.DppFailureCode;
-import com.android.server.wifi.SupplicantStaIfaceHal.DppNetRole;
-import com.android.server.wifi.SupplicantStaIfaceHal.DppProgressCode;
 import com.android.server.wifi.WifiNative.DppEventCallback;
 import com.android.server.wifi.util.ApConfigUtil;
 import com.android.server.wifi.util.WifiPermissionsUtil;
@@ -106,13 +106,6 @@
                 DppManager.this.onFailure(dppStatusCode, ssid, channelList, bandList);
             });
         }
-
-        @Override
-        public void onDppConfiguratorKeyUpdate(byte[] key) {
-            mHandler.post(() -> {
-                DppManager.this.onDppConfiguratorKeyUpdate(key);
-            });
-        }
     };
 
     DppManager(Handler handler, WifiNative wifiNative, WifiConfigManager wifiConfigManager,
@@ -169,34 +162,6 @@
     }
 
     /**
-     * Generate DPP connection keys for Configurator. This is used to connect to
-     * other devices (APs) which this configurator has enrolled using DPP-AKM.
-     * DPP connection keys are received via DppEventCallback.onSuccessConfigReceived
-     *
-     * @param networkId Network ID of DPP-AKM wifi configuration.
-     */
-    private void generateSelfDppConfiguration(int networkId) {
-        WifiConfiguration config = mWifiConfigManager
-                .getConfiguredNetworkWithoutMasking(networkId);
-
-        if (config == null || !config.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)
-                || !config.isDppConfigurator() || (config.getDppConnector().length > 0)) {
-            Log.e(TAG, "Not eligible for generateSelfDppConfiguration yet.");
-            return;
-        }
-
-        mDppRequestInfo.isGeneratingSelfConfiguration = true;
-
-        if (!mWifiNative.generateSelfDppConfiguration(mClientIfaceName,
-                    config.SSID, config.getDppPrivateEcKey())) {
-            Log.e(TAG, "generateSelfDppConfiguration failed!!");
-            mDppRequestInfo.isGeneratingSelfConfiguration = false;
-        }
-
-        return;
-    }
-
-    /**
      * Start DPP request in Configurator-Initiator mode. The goal of this call is to send the
      * selected Wi-Fi configuration to a remote peer so it could join that network.
      *
@@ -267,12 +232,11 @@
         String password = null;
         String psk = null;
         int securityAkm;
-        byte[] privEcKey = null;
 
-        // Currently support either SAE mode or PSK mode or DPP mode
+        // Currently support either SAE mode or PSK mode
         // Check PSK first because PSK config always has a SAE type as a upgrading type.
         if (selectedNetwork.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)) {
-            if (selectedNetwork.preSharedKey.matches("[0-9A-Fa-f]{64}")) {
+            if (selectedNetwork.preSharedKey.matches(String.format("[0-9A-Fa-f]{%d}", 64))) {
                 // PSK
                 psk = selectedNetwork.preSharedKey;
             } else {
@@ -284,29 +248,9 @@
             // SAE
             password = selectedNetwork.preSharedKey;
             securityAkm = DppAkm.SAE;
-        } else if (selectedNetwork.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)) {
-            // DPP
-            if (selectedNetwork.isDppConfigurator()) {
-                privEcKey = selectedNetwork.getDppPrivateEcKey();
-            } else {
-                if (enrolleeNetworkRole != EASY_CONNECT_NETWORK_ROLE_AP) {
-                    try {
-                        Log.e(TAG, "Device is not configured previously to configure"
-                                + "the peer enrollee devices to this network");
-                        callback.onFailure(
-                                EasyConnectStatusCallback
-                                .EASY_CONNECT_EVENT_FAILURE_INVALID_NETWORK,
-                                null, null, new int[0]);
-                    } catch (RemoteException e) {
-                        // Empty
-                    }
-                    return;
-                }
-            }
-            securityAkm = DppAkm.DPP;
         } else {
             try {
-                // Key management must be either PSK or SAE or DPP
+                // Key management must be either PSK or SAE
                 Log.e(TAG, "Key management must be either PSK or SAE");
                 mDppMetrics.updateDppFailure(EasyConnectStatusCallback
                         .EASY_CONNECT_EVENT_FAILURE_INVALID_NETWORK);
@@ -325,7 +269,6 @@
         mDppRequestInfo.binder = binder;
         mDppRequestInfo.callback = callback;
         mDppRequestInfo.authRole = DPP_AUTH_ROLE_INITIATOR;
-        mDppRequestInfo.networkId = selectedNetworkId;
 
         if (!linkToDeath(mDppRequestInfo)) {
             // Notify failure and clean up
@@ -364,7 +307,7 @@
                 mDppRequestInfo.peerId, 0, ssidEncoded, passwordEncoded, psk,
                 enrolleeNetworkRole == EASY_CONNECT_NETWORK_ROLE_AP ? DppNetRole.AP
                         : DppNetRole.STA,
-                securityAkm, privEcKey)) {
+                securityAkm)) {
             Log.e(TAG, "DPP Start Configurator Initiator failure");
 
             // Notify failure and clean up
@@ -565,7 +508,6 @@
             }
         }
 
-        mDppRequestInfo.isGeneratingSelfConfiguration = false;
         cleanupDppResources();
 
         logd("Success: Stopped DPP Session");
@@ -577,11 +519,6 @@
             return;
         }
 
-        if (mDppRequestInfo.isGeneratingSelfConfiguration) {
-            logd("Generate Self Configuration in progress. Skip cleanup");
-            return;
-        }
-
         // Cancel pending timeout
         mDppTimeoutMessage.cancel();
 
@@ -618,8 +555,6 @@
         public long startTime;
         public int authRole = DPP_AUTH_ROLE_INACTIVE;
         public int bootstrapId;
-        public int networkId;
-        public boolean isGeneratingSelfConfiguration = false;
 
         @Override
         public String toString() {
@@ -628,8 +563,7 @@
                     .append(", callback=").append(callback)
                     .append(", peerId=").append(peerId)
                     .append(", authRole=").append(authRole)
-                    .append(", bootstrapId=").append(bootstrapId)
-                    .append(", nId=").append(networkId).toString();
+                    .append(", bootstrapId=").append(bootstrapId).toString();
         }
     }
 
@@ -638,45 +572,15 @@
      *
      * @param verbose 0 to disable verbose logging, or any other value to enable.
      */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
+    public void enableVerboseLogging(int verbose) {
+        mVerboseLoggingEnabled = verbose != 0 ? true : false;
     }
 
     private void onSuccessConfigReceived(WifiConfiguration newWifiConfiguration) {
         try {
             logd("onSuccessConfigReceived");
 
-            if (mDppRequestInfo != null && mDppRequestInfo.isGeneratingSelfConfiguration) {
-                WifiConfiguration existingWifiConfig = mWifiConfigManager
-                        .getConfiguredNetworkWithoutMasking(mDppRequestInfo.networkId);
-
-                if (newWifiConfiguration.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)
-                        && existingWifiConfig != null && existingWifiConfig.isDppConfigurator()
-                        && TextUtils.equals(existingWifiConfig.SSID, newWifiConfiguration.SSID)
-                        && existingWifiConfig.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)) {
-                    if (newWifiConfiguration.getDppConnector().length > 0
-                            && newWifiConfiguration.getDppCSignKey().length > 0
-                            && newWifiConfiguration.getDppNetAccessKey().length > 0) {
-                        Log.d(TAG, "Updating DPP Connection keys for self");
-                        existingWifiConfig.setDppConnectionKeys(
-                                newWifiConfiguration.getDppConnector(),
-                                newWifiConfiguration.getDppCSignKey(),
-                                newWifiConfiguration.getDppNetAccessKey());
-
-                        NetworkUpdateResult networkUpdateResult = mWifiConfigManager
-                                .addOrUpdateNetwork(existingWifiConfig, mDppRequestInfo.uid);
-
-                        if (!networkUpdateResult.isSuccess()) {
-                            Log.e(TAG, "DPP configuration generated, but failed to update network");
-                            mDppRequestInfo.callback.onFailure(EasyConnectStatusCallback
-                                    .EASY_CONNECT_EVENT_FAILURE_CONFIGURATION, null,
-                                    null, new int[0]);
-                        }
-                    }
-                }
-                // Done with self configuration. reset flag.
-                mDppRequestInfo.isGeneratingSelfConfiguration = false;
-            } else if (mDppRequestInfo != null) {
+            if (mDppRequestInfo != null) {
                 long now = mClock.getElapsedSinceBootMillis();
                 mDppMetrics.updateDppOperationTime((int) (now - mDppRequestInfo.startTime));
 
@@ -723,15 +627,13 @@
 
             // Convert from HAL codes to WifiManager/user codes
             switch (dppStatusCode) {
-                case DppEventType.CONFIGURATION_SENT:
+                case DppSuccessCode.CONFIGURATION_SENT:
                     mDppMetrics.updateDppR1CapableEnrolleeResponderDevices();
                     dppSuccessCode = EasyConnectStatusCallback
                             .EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_SENT;
-                    // For Configurator STA, generate self signed keys for network access.
-                    generateSelfDppConfiguration(mDppRequestInfo.networkId);
                     break;
 
-                case DppEventType.CONFIGURATION_APPLIED:
+                case DppSuccessCode.CONFIGURATION_APPLIED:
                     dppSuccessCode = EasyConnectStatusCallback
                             .EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_APPLIED;
                     break;
@@ -739,7 +641,6 @@
                 default:
                     Log.e(TAG, "onSuccess: unknown code " + dppStatusCode);
                     // Success, DPP is complete. Clear the DPP session automatically
-                    mDppRequestInfo.isGeneratingSelfConfiguration = false;
                     cleanupDppResources();
                     return;
             }
@@ -805,31 +706,6 @@
         onFailure(dppStatusCode, null, null, null);
     }
 
-    private void onDppConfiguratorKeyUpdate(byte[] privEcKey) {
-        if (mDppRequestInfo == null) {
-            Log.e(TAG,
-                    "onDppConfiguratorKeyUpdate event without a request information object");
-            return;
-        }
-
-        WifiConfiguration selectedNetwork = mWifiConfigManager
-                .getConfiguredNetworkWithoutMasking(mDppRequestInfo.networkId);
-
-        if (selectedNetwork != null && privEcKey != null && privEcKey.length > 0
-                && selectedNetwork.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)) {
-            Log.d(TAG, "Updating network access keys for DPP networkId="
-                    + mDppRequestInfo.networkId);
-            selectedNetwork.setDppConfigurator(privEcKey);
-
-            NetworkUpdateResult networkUpdateResult = mWifiConfigManager
-                    .addOrUpdateNetwork(selectedNetwork, mDppRequestInfo.uid);
-
-            if (!networkUpdateResult.isSuccess()) {
-                Log.e(TAG, "Failed to update DPP configurator key.");
-            }
-        }
-    }
-
     /**
      *
      * This function performs the Enrollee compatibility check with the network.
@@ -894,7 +770,7 @@
         boolean isNetworkInScanCache = false;
         boolean channelMatch = false;
         for (ScanResult scanResult : mScanRequestProxy.getScanResults()) {
-            if (!TextUtils.equals(ssid, scanResult.SSID)) {
+            if (!ssid.equals(scanResult.SSID)) {
                 continue;
             }
             isNetworkInScanCache = true;
@@ -1026,7 +902,6 @@
         }
 
         // All failures are fatal, clear the DPP session
-        mDppRequestInfo.isGeneratingSelfConfiguration = false;
         cleanupDppResources();
     }
 
@@ -1048,7 +923,6 @@
                 logd("binderDied: uid=" + dppRequestInfo.uid);
 
                 mHandler.post(() -> {
-                    dppRequestInfo.isGeneratingSelfConfiguration = false;
                     cleanupDppResources();
                 });
             }
diff --git a/service/java/com/android/server/wifi/EapFailureNotifier.java b/service/java/com/android/server/wifi/EapFailureNotifier.java
index d795dc6..e76d4c8 100644
--- a/service/java/com/android/server/wifi/EapFailureNotifier.java
+++ b/service/java/com/android/server/wifi/EapFailureNotifier.java
@@ -18,14 +18,15 @@
 
 import android.app.Notification;
 import android.app.PendingIntent;
+import android.content.Context;
 import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.res.Resources;
 import android.graphics.drawable.Icon;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
-import android.net.wifi.WifiStringResourceWrapper;
 import android.provider.Settings;
 import android.service.notification.StatusBarNotification;
-import android.telephony.TelephonyManager;
+import android.telephony.SubscriptionManager;
 import android.text.TextUtils;
 
 import com.android.internal.annotations.VisibleForTesting;
@@ -36,11 +37,7 @@
  */
 public class EapFailureNotifier {
     private static final String TAG = "EapFailureNotifier";
-    @VisibleForTesting
-    static final String ERROR_MESSAGE_OVERLAY_PREFIX = "wifi_eap_error_message_code_";
-    @VisibleForTesting
-    static final String ERROR_MESSAGE_OVERLAY_UNKNOWN_ERROR_CODE =
-            "wifi_eap_error_message_unknown_error_code";
+    private static final String ERROR_MESSAGE_OVERLAY_PREFIX = "wifi_eap_error_message_code_";
 
     private static final long CANCEL_TIMEOUT_MILLISECONDS = 5 * 60 * 1000;
     private final WifiContext mContext;
@@ -69,20 +66,14 @@
      * @return true if the receiving error code is found in wifi resource
      */
     public boolean onEapFailure(int errorCode, WifiConfiguration config, boolean showNotification) {
-        if (errorCode < 0) {
-            // EapErrorCode is defined as an unsigned uint32_t in ISupplicantStaIfaceCallback, so
-            // only consider non-negative error codes for carrier-specific error messages.
-            return false;
-        }
-        WifiStringResourceWrapper sr = mContext.getStringResourceWrapper(
-                mWifiCarrierInfoManager.getBestMatchSubscriptionId(config),
-                config.carrierId == TelephonyManager.UNKNOWN_CARRIER_ID
-                        ? mWifiCarrierInfoManager.getDefaultDataSimCarrierId() : config.carrierId);
-        String errorMessage = sr.getString(ERROR_MESSAGE_OVERLAY_PREFIX + errorCode, config.SSID);
-        if (errorMessage == null) {
-            // Use the generic error message if the code does not match any known code.
-            errorMessage = sr.getString(ERROR_MESSAGE_OVERLAY_UNKNOWN_ERROR_CODE, config.SSID);
-        }
+        Resources res = getResourcesForSubId(mContext,
+                mWifiCarrierInfoManager.getBestMatchSubscriptionId(config));
+        if (res == null) return false;
+        int resourceId = res.getIdentifier(ERROR_MESSAGE_OVERLAY_PREFIX + errorCode,
+                "string", mContext.getWifiOverlayApkPkgName());
+
+        if (resourceId == 0) return false;
+        String errorMessage = res.getString(resourceId, config.SSID);
         if (TextUtils.isEmpty(errorMessage)) return false;
         StatusBarNotification[] activeNotifications = mNotificationManager.getActiveNotifications();
         for (StatusBarNotification activeNotification : activeNotifications) {
@@ -129,6 +120,22 @@
     }
 
     /**
+     *  Returns the resources from the given context for the MCC/MNC
+     *  associated with the subscription.
+     */
+    private Resources getResourcesForSubId(WifiContext context, int subId) {
+        Context resourceContext = null;
+        try {
+            resourceContext = context.createPackageContext(
+                    context.getWifiOverlayApkPkgName(), 0);
+        } catch (PackageManager.NameNotFoundException ex) {
+            return null;
+        }
+
+        return SubscriptionManager.getResourcesForSubId(resourceContext, subId);
+    }
+
+    /**
      * Allow tests to modify mCurrentShownSsid
      */
     @VisibleForTesting
diff --git a/service/java/com/android/server/wifi/ExternalPnoScanRequestManager.java b/service/java/com/android/server/wifi/ExternalPnoScanRequestManager.java
deleted file mode 100644
index 94dd70d..0000000
--- a/service/java/com/android/server/wifi/ExternalPnoScanRequestManager.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import static android.net.wifi.WifiManager.PnoScanResultsCallback.REGISTER_PNO_CALLBACK_RESOURCE_BUSY;
-import static android.net.wifi.WifiManager.PnoScanResultsCallback.REMOVE_PNO_CALLBACK_RESULTS_DELIVERED;
-import static android.net.wifi.WifiManager.PnoScanResultsCallback.REMOVE_PNO_CALLBACK_UNREGISTERED;
-
-import android.annotation.NonNull;
-import android.content.Context;
-import android.content.Intent;
-import android.net.wifi.IPnoScanResultsCallback;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiManager;
-import android.net.wifi.WifiSsid;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.UserHandle;
-import android.util.ArraySet;
-import android.util.Log;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-/**
- * Manages PNO scan requests from apps.
- * This class is not thread safe and is expected to be run on a single thread.
- */
-public class ExternalPnoScanRequestManager implements IBinder.DeathRecipient {
-    private static final String TAG = "ExternalPnoScanRequestManager";
-    private ExternalPnoScanRequest mCurrentRequest;
-    private final Handler mHandler;
-    private int mCurrentRequestOnPnoNetworkFoundCount = 0;
-    private Context mContext;
-    private boolean mVerboseLoggingEnabled = false;
-
-    /**
-     * Creates a ExternalPnoScanRequestManager.
-     * @param handler to run binder death callback.
-     * @param context of the wifi service.
-     */
-    public ExternalPnoScanRequestManager(Handler handler, Context context) {
-        mHandler = handler;
-        mContext = context;
-    }
-
-    /**
-     * Returns a copy of the current SSIDs being requested for PNO scan.
-     */
-    public Set<String> getExternalPnoScanSsids() {
-        return mCurrentRequest == null ? Collections.EMPTY_SET
-                : new ArraySet<>(mCurrentRequest.mSsidStrings);
-    }
-
-    /**
-     * Returns a copy of the current frequencies being requested for PNO scan.
-     */
-    public Set<Integer> getExternalPnoScanFrequencies() {
-        return mCurrentRequest == null ? Collections.EMPTY_SET
-                : new ArraySet<>(mCurrentRequest.mFrequencies);
-    }
-
-    /**
-     * Enables verbose logging.
-     */
-    public void enableVerboseLogging(boolean enabled) {
-        mVerboseLoggingEnabled = enabled;
-    }
-
-    /**
-     * Sets the request. This will fail if there's already a request set.
-     */
-    public boolean setRequest(int uid, @NonNull String packageName, @NonNull IBinder binder,
-            @NonNull IPnoScanResultsCallback callback,
-            @NonNull List<WifiSsid> ssids, @NonNull int[] frequencies) {
-        if (mCurrentRequest != null && uid != mCurrentRequest.mUid) {
-            try {
-                callback.onRegisterFailed(REGISTER_PNO_CALLBACK_RESOURCE_BUSY);
-            } catch (RemoteException e) {
-                Log.e(TAG, "RemoteException failed to trigger onRegisterFailed for callback="
-                        + callback);
-            }
-            return false;
-        }
-        ExternalPnoScanRequest request = new ExternalPnoScanRequestManager.ExternalPnoScanRequest(
-                uid, packageName, binder, callback, ssids, frequencies);
-        try {
-            request.mBinder.linkToDeath(this, 0);
-        } catch (RemoteException e) {
-            Log.e(TAG, "mBinder.linkToDeath failed: " + e.getMessage());
-            return false;
-        }
-        try {
-            request.mCallback.onRegisterSuccess();
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to register request due to remote exception:" + e.getMessage());
-            return false;
-        }
-        removeCurrentRequest();
-        if (mVerboseLoggingEnabled) {
-            Log.i(TAG, "Successfully set external PNO scan request:" + request);
-        }
-        mCurrentRequest = request;
-        return true;
-    }
-
-    private void removeCurrentRequest() {
-        if (mCurrentRequest != null) {
-            try {
-                mCurrentRequest.mBinder.unlinkToDeath(this, 0);
-                if (mVerboseLoggingEnabled) {
-                    Log.i(TAG, "mBinder.unlinkToDeath on request:" + mCurrentRequest);
-                }
-            } catch (NoSuchElementException e) {
-                Log.e(TAG, "Encountered remote exception in unlinkToDeath=" + e.getMessage());
-            }
-        }
-        mCurrentRequest = null;
-        mCurrentRequestOnPnoNetworkFoundCount = 0;
-    }
-
-    /**
-     * Removes the requests. Will fail if the remover's uid and packageName does not match with the
-     * creator's uid and packageName.
-     */
-    public boolean removeRequest(int uid) {
-        if (mCurrentRequest == null || uid != mCurrentRequest.mUid) {
-            return false;
-        }
-
-        try {
-            mCurrentRequest.mCallback.onRemoved(REMOVE_PNO_CALLBACK_UNREGISTERED);
-        } catch (RemoteException e) {
-            Log.e(TAG, "Encountered remote exception in onRemoved=" + e.getMessage());
-        }
-        removeCurrentRequest();
-        return true;
-    }
-
-    /**
-     * Triggered when PNO networks are found. Any results matching the external request will be
-     * sent to the callback.
-     * @param results
-     */
-    public void onPnoNetworkFound(ScanResult[] results) {
-        if (mCurrentRequest == null) {
-            return;
-        }
-        mCurrentRequestOnPnoNetworkFoundCount++;
-        List<ScanResult> requestedResults = new ArrayList<>();
-        for (ScanResult result : results) {
-            if (mCurrentRequest.mSsidStrings.contains(result.getWifiSsid().toString())) {
-                requestedResults.add(result);
-            }
-        }
-        if (requestedResults.isEmpty()) {
-            return;
-        }
-
-        // requested PNO SSIDs found. Send results and then remove request.
-        if (mVerboseLoggingEnabled) {
-            Log.i(TAG, "On network found for request:" + mCurrentRequest);
-        }
-        sendScanResultAvailableBroadcastToPackage(mCurrentRequest.mPackageName);
-        try {
-            mCurrentRequest.mCallback.onScanResultsAvailable(requestedResults);
-            mCurrentRequest.mCallback.onRemoved(REMOVE_PNO_CALLBACK_RESULTS_DELIVERED);
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to send PNO results via callback due to remote exception="
-                    + e.getMessage());
-        }
-        removeCurrentRequest();
-    }
-
-    private void sendScanResultAvailableBroadcastToPackage(String packageName) {
-        Intent intent = new Intent(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION);
-        intent.putExtra(WifiManager.EXTRA_RESULTS_UPDATED, true);
-        intent.setPackage(packageName);
-        mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
-        if (mVerboseLoggingEnabled) {
-            Log.i(TAG, "Successfully sent out targeted broadcast for:" + mCurrentRequest);
-        }
-    }
-
-    /**
-     * Tracks a request for PNO scan made by an app.
-     */
-    public static class ExternalPnoScanRequest {
-        private int mUid;
-        private String mPackageName;
-        private Set<String> mSsidStrings;
-        private Set<Integer> mFrequencies;
-        private IPnoScanResultsCallback mCallback;
-        private IBinder mBinder;
-
-        /**
-         * @param uid identifies the caller
-         * @param binder obtained from the caller
-         * @param callback used to send results back to the caller
-         * @param ssids requested SSIDs for PNO scan
-         */
-        public ExternalPnoScanRequest(int uid, String packageName, IBinder binder,
-                IPnoScanResultsCallback callback, List<WifiSsid> ssids, int[] frequencies) {
-            mUid = uid;
-            mPackageName = packageName;
-            mBinder = binder;
-            mCallback = callback;
-            mSsidStrings = new ArraySet<>();
-            for (WifiSsid wifiSsid : ssids) {
-                mSsidStrings.add(wifiSsid.toString());
-            }
-            mFrequencies = Arrays.stream(frequencies).boxed().collect(Collectors.toSet());
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder sbuf = new StringBuilder();
-            sbuf.append("uid=").append(mUid)
-                    .append(", packageName=").append(mPackageName)
-                    .append(", binder=").append(mBinder)
-                    .append(", callback=").append(mCallback)
-                    .append(", mSsidStrings=");
-            for (String s : mSsidStrings) {
-                sbuf.append(s).append(", ");
-            }
-            sbuf.append(" frequencies=");
-            for (int f : mFrequencies) {
-                sbuf.append(f).append(", ");
-            }
-            return sbuf.toString();
-        }
-    }
-
-    /**
-     * Binder has died. Perform cleanup.
-     */
-    @Override
-    public void binderDied() {
-        // Log binder died, but keep the request since result will still be delivered with directed
-        // broadcast
-        Log.w(TAG, "Binder died.");
-    }
-
-    /**
-     * Dump the local logs.
-     */
-    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        pw.println("Dump of ExternalPnoScanRequestManager");
-        pw.println("ExternalPnoScanRequestManager - Log Begin ----");
-        if (mCurrentRequest != null) {
-            pw.println("Current external PNO scan request:");
-            pw.println(mCurrentRequest.toString());
-        } else {
-            pw.println("No external PNO scan request set.");
-        }
-        pw.println("mCurrentRequestOnPnoNetworkFoundCount: "
-                + mCurrentRequestOnPnoNetworkFoundCount);
-        pw.println("ExternalPnoScanRequestManager - Log End ----");
-    }
-}
diff --git a/service/java/com/android/server/wifi/FrameworkFacade.java b/service/java/com/android/server/wifi/FrameworkFacade.java
index adf5445..5bc57b5 100644
--- a/service/java/com/android/server/wifi/FrameworkFacade.java
+++ b/service/java/com/android/server/wifi/FrameworkFacade.java
@@ -28,7 +28,6 @@
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.Intent;
-import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.content.res.Configuration;
@@ -47,6 +46,8 @@
 import android.util.Log;
 import android.widget.Toast;
 
+import com.android.server.wifi.util.WifiAsyncChannel;
+
 import java.util.List;
 import java.util.NoSuchElementException;
 
@@ -60,13 +61,6 @@
     private CarrierConfigManager mCarrierConfigManager = null;
     private ActivityManager mActivityManager = null;
 
-    // verbose logging controlled by user
-    private static final int VERBOSE_LOGGING_ALWAYS_ON_LEVEL_NONE = 0;
-    // verbose logging on by default for userdebug
-    private static final int VERBOSE_LOGGING_ALWAYS_ON_LEVEL_USERDEBUG = 1;
-    // verbose logging on by default for all builds -->
-    private static final int VERBOSE_LOGGING_ALWAYS_ON_LEVEL_ALL = 2;
-
     private ContentResolver getContentResolver(Context context) {
         if (mContentResolver == null) {
             mContentResolver = context.getContentResolver();
@@ -183,11 +177,10 @@
     }
 
     /**
-     * Wrapper for {@link PendingIntent#getActivity} using the current foreground user.
+     * Wrapper for {@link PendingIntent#getActivity}.
      */
     public PendingIntent getActivity(Context context, int requestCode, Intent intent, int flags) {
-        return PendingIntent.getActivity(context.createContextAsUser(UserHandle.CURRENT, 0),
-                requestCode, intent, flags);
+        return PendingIntent.getActivity(context, requestCode, intent, flags);
     }
 
     public boolean getConfigWiFiDisableInECBM(Context context) {
@@ -221,6 +214,15 @@
     }
 
     /**
+     * Create a new instance of WifiAsyncChannel
+     * @param tag String corresponding to the service creating the channel
+     * @return WifiAsyncChannel object created
+     */
+    public WifiAsyncChannel makeWifiAsyncChannel(String tag) {
+        return new WifiAsyncChannel(tag);
+    }
+
+    /**
      * Check if the provided uid is the app in the foreground.
      * @param uid the uid to check
      * @return true if the app is in the foreground, false otherwise
@@ -264,8 +266,6 @@
      * Create a new instance of {@link AlertDialog.Builder}.
      * @param context reference to a Context
      * @return an instance of AlertDialog.Builder
-     * @deprecated Use {@link WifiDialogManager#createSimpleDialog} instead, or create another
-     *             dialog type in WifiDialogManager.
      */
     public AlertDialog.Builder makeAlertDialogBuilder(Context context) {
         boolean isDarkTheme = (context.getResources().getConfiguration().uiMode
@@ -355,85 +355,4 @@
     public String getWifiKeyGrantAsUser(Context context, UserHandle user, String alias) {
         return KeyChain.getWifiKeyGrantAsUser(context, user, alias);
     }
-
-    /**
-     * Check if the request comes from foreground app/service.
-     * @param context Application context
-     * @param requestorPackageName requestor package name
-     * @return true if the requestor is foreground app/service.
-     */
-    public boolean isRequestFromForegroundAppOrService(Context context,
-            @NonNull String requestorPackageName) {
-        ActivityManager activityManager = getActivityManager(context);
-        if (activityManager == null) return false;
-        try {
-            return activityManager.getPackageImportance(requestorPackageName)
-                    <= ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND_SERVICE;
-        } catch (SecurityException e) {
-            Log.e(TAG, "Failed to check the app state", e);
-            return false;
-        }
-    }
-
-    /**
-     * Check if the request comes from foreground app.
-     * @param context Application context
-     * @param requestorPackageName requestor package name
-     * @return true if requestor is foreground app.
-     */
-    public boolean isRequestFromForegroundApp(Context context,
-            @NonNull String requestorPackageName) {
-        ActivityManager activityManager = getActivityManager(context);
-        if (activityManager == null) return false;
-        try {
-            return activityManager.getPackageImportance(requestorPackageName)
-                    <= ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND;
-        } catch (SecurityException e) {
-            Log.e(TAG, "Failed to check the app state", e);
-            return false;
-        }
-    }
-
-    /**
-     * Check if the verbose always on is enabled
-     * @param alwaysOnLevel verbose logging always on level
-     * @param buildProperties build property of current build
-     * @return true if verbose always on is enabled on current build
-     */
-    public boolean isVerboseLoggingAlwaysOn(int alwaysOnLevel,
-            @NonNull BuildProperties buildProperties) {
-        switch (alwaysOnLevel) {
-            // If the overlay setting enabled for all builds
-            case VERBOSE_LOGGING_ALWAYS_ON_LEVEL_ALL:
-                return true;
-            //If the overlay setting enabled for userdebug builds only
-            case VERBOSE_LOGGING_ALWAYS_ON_LEVEL_USERDEBUG:
-                // If it is a userdebug build
-                if (buildProperties.isUserdebugBuild()) return true;
-                break;
-            case VERBOSE_LOGGING_ALWAYS_ON_LEVEL_NONE:
-                // nothing
-                break;
-            default:
-                Log.e(TAG, "Unrecognized config_wifiVerboseLoggingAlwaysOnLevel " + alwaysOnLevel);
-                break;
-        }
-        return false;
-    }
-
-    /**
-     * Return the (displayable) application name corresponding to the (uid, packageName).
-     */
-    public @NonNull CharSequence getAppName(Context context, @NonNull String packageName, int uid) {
-        ApplicationInfo applicationInfo = null;
-        try {
-            applicationInfo = context.getPackageManager().getApplicationInfoAsUser(
-                    packageName, 0, UserHandle.getUserHandleForUid(uid));
-        } catch (PackageManager.NameNotFoundException e) {
-            Log.e(TAG, "Failed to find app name for " + packageName);
-            return "";
-        }
-        CharSequence appName = context.getPackageManager().getApplicationLabel(applicationInfo);
-        return (appName != null) ? appName : "";
-    }
 }
diff --git a/service/java/com/android/server/wifi/HalDeviceManager.java b/service/java/com/android/server/wifi/HalDeviceManager.java
index c8ce15c..e87c38d 100644
--- a/service/java/com/android/server/wifi/HalDeviceManager.java
+++ b/service/java/com/android/server/wifi/HalDeviceManager.java
@@ -16,14 +16,9 @@
 
 package com.android.server.wifi;
 
-import static com.android.server.wifi.HalDeviceManagerUtil.jsonToStaticChipInfo;
-import static com.android.server.wifi.HalDeviceManagerUtil.staticChipInfoToJson;
-import static com.android.server.wifi.WifiSettingsConfigStore.WIFI_STATIC_CHIP_INFO;
-
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.content.res.Resources;
 import android.hardware.wifi.V1_0.IWifi;
 import android.hardware.wifi.V1_0.IWifiApIface;
 import android.hardware.wifi.V1_0.IWifiChip;
@@ -38,37 +33,21 @@
 import android.hardware.wifi.V1_0.WifiDebugRingBufferStatus;
 import android.hardware.wifi.V1_0.WifiStatus;
 import android.hardware.wifi.V1_0.WifiStatusCode;
-import android.hardware.wifi.V1_5.WifiBand;
-import android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination;
-import android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit;
-import android.hardware.wifi.V1_6.IfaceConcurrencyType;
-import android.hardware.wifi.V1_6.WifiRadioCombination;
-import android.hardware.wifi.V1_6.WifiRadioCombinationMatrix;
-import android.hardware.wifi.V1_6.WifiRadioConfiguration;
 import android.hidl.manager.V1_0.IServiceNotification;
 import android.hidl.manager.V1_2.IServiceManager;
-import android.net.wifi.WifiContext;
 import android.os.Handler;
 import android.os.IHwBinder.DeathRecipient;
 import android.os.RemoteException;
 import android.os.WorkSource;
-import android.text.TextUtils;
-import android.util.ArrayMap;
 import android.util.Log;
 import android.util.Pair;
 import android.util.SparseArray;
-import android.util.SparseBooleanArray;
 import android.util.SparseIntArray;
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.HalDeviceManagerUtil.StaticChipInfo;
 import com.android.server.wifi.util.GeneralUtil.Mutable;
 import com.android.server.wifi.util.WorkSourceHelper;
-import com.android.wifi.resources.R;
-
-import org.json.JSONArray;
-import org.json.JSONException;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
@@ -76,7 +55,6 @@
 import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -95,11 +73,6 @@
     public static final long CHIP_CAPABILITY_ANY = 0L;
     private static final long CHIP_CAPABILITY_UNINITIALIZED = -1L;
 
-    private static final int DBS_24G_5G_MASK =
-            (1 << WifiBand.BAND_24GHZ) | (1 << WifiBand.BAND_5GHZ);
-    private static final int DBS_5G_6G_MASK =
-            (1 << WifiBand.BAND_5GHZ) | (1 << WifiBand.BAND_6GHZ);
-
     private static final int START_HAL_RETRY_INTERVAL_MS = 20;
     // Number of attempts a start() is re-tried. A value of 0 means no retries after a single
     // attempt.
@@ -111,20 +84,19 @@
     private final Handler mEventHandler;
     private WifiDeathRecipient mIWifiDeathRecipient;
     private ServiceManagerDeathRecipient mServiceManagerDeathRecipient;
-    private boolean mIsBridgedSoftApSupported;
-    private boolean mIsStaWithBridgedSoftApConcurrencySupported;
-    private ArrayMap<IWifiIface, SoftApManager> mSoftApManagers = new ArrayMap<>();
 
     // cache the value for supporting vendor HAL or not
     private boolean mIsVendorHalSupported = false;
 
-    /**
-     * Public API for querying interfaces from the HalDeviceManager.
-     */
+    @VisibleForTesting
     public static final int HDM_CREATE_IFACE_STA = 0;
+    @VisibleForTesting
     public static final int HDM_CREATE_IFACE_AP = 1;
+    @VisibleForTesting
     public static final int HDM_CREATE_IFACE_AP_BRIDGE = 2;
+    @VisibleForTesting
     public static final int HDM_CREATE_IFACE_P2P = 3;
+    @VisibleForTesting
     public static final int HDM_CREATE_IFACE_NAN = 4;
 
     @IntDef(flag = false, prefix = { "HDM_CREATE_IFACE_TYPE_" }, value = {
@@ -134,47 +106,18 @@
             HDM_CREATE_IFACE_P2P,
             HDM_CREATE_IFACE_NAN,
     })
-    public @interface HdmIfaceTypeForCreation {};
+    private @interface HdmIfaceTypeForCreation {};
 
-    public static final SparseIntArray HAL_IFACE_MAP = new SparseIntArray() {{
+    private SparseIntArray mHalIfaceMap = new SparseIntArray() {{
             put(HDM_CREATE_IFACE_STA, IfaceType.STA);
             put(HDM_CREATE_IFACE_AP, IfaceType.AP);
             put(HDM_CREATE_IFACE_AP_BRIDGE, IfaceType.AP);
             put(HDM_CREATE_IFACE_P2P, IfaceType.P2P);
             put(HDM_CREATE_IFACE_NAN, IfaceType.NAN);
-        }};
-
-    public static final SparseIntArray REVERSE_HAL_IFACE_MAP = new SparseIntArray() {{
-            put(IfaceType.STA, HDM_CREATE_IFACE_STA);
-            put(IfaceType.AP, HDM_CREATE_IFACE_AP);
-            put(IfaceType.P2P, HDM_CREATE_IFACE_P2P);
-            put(IfaceType.NAN, HDM_CREATE_IFACE_NAN);
-        }};
-
-    public static final SparseIntArray CONCURRENCY_TYPE_TO_CREATE_TYPE_MAP = new SparseIntArray() {{
-            put(android.hardware.wifi.V1_6.IfaceConcurrencyType.STA, HDM_CREATE_IFACE_STA);
-            put(android.hardware.wifi.V1_6.IfaceConcurrencyType.AP, HDM_CREATE_IFACE_AP);
-            put(android.hardware.wifi.V1_6.IfaceConcurrencyType.AP_BRIDGED,
-                    HDM_CREATE_IFACE_AP_BRIDGE);
-            put(android.hardware.wifi.V1_6.IfaceConcurrencyType.P2P, HDM_CREATE_IFACE_P2P);
-            put(android.hardware.wifi.V1_6.IfaceConcurrencyType.NAN, HDM_CREATE_IFACE_NAN);
-        }};
-
-    public static final SparseIntArray IFACE_TYPE_TO_CONCURRENCY_TYPE_MAP = new SparseIntArray() {{
-            put(IfaceType.STA, android.hardware.wifi.V1_6.IfaceConcurrencyType.STA);
-            put(IfaceType.AP, android.hardware.wifi.V1_6.IfaceConcurrencyType.AP);
-            put(IfaceType.P2P, android.hardware.wifi.V1_6.IfaceConcurrencyType.P2P);
-            put(IfaceType.NAN, android.hardware.wifi.V1_6.IfaceConcurrencyType.NAN);
-        }};
-
+            }};
 
     // public API
-    public HalDeviceManager(WifiContext context, Clock clock, WifiInjector wifiInjector,
-            Handler handler) {
-        Resources res = context.getResources();
-        mIsBridgedSoftApSupported = res.getBoolean(R.bool.config_wifiBridgedSoftApSupported);
-        mIsStaWithBridgedSoftApConcurrencySupported =
-                res.getBoolean(R.bool.config_wifiStaWithBridgedSoftApConcurrencySupported);
+    public HalDeviceManager(Clock clock, WifiInjector wifiInjector, Handler handler) {
         mClock = clock;
         mWifiInjector = wifiInjector;
         mEventHandler = handler;
@@ -182,12 +125,12 @@
         mServiceManagerDeathRecipient = new ServiceManagerDeathRecipient();
     }
 
-    /**
-     * Enables verbose logging.
-     */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mDbg = verboseEnabled;
-
+    /* package */ void enableVerboseLogging(int verbose) {
+        if (verbose > 0) {
+            mDbg = true;
+        } else {
+            mDbg = false;
+        }
         if (VDBG) {
             mDbg = true; // just override
         }
@@ -358,19 +301,20 @@
     public IWifiApIface createApIface(
             long requiredChipCapabilities,
             @Nullable InterfaceDestroyedListener destroyedListener, @Nullable Handler handler,
-            @NonNull WorkSource requestorWs, boolean isBridged,
-            @NonNull SoftApManager softApManager) {
-        if (softApManager == null) {
-            Log.e(TAG, "Cannot create AP Iface with null SoftApManager");
-            return null;
-        }
-        IWifiApIface apIface = (IWifiApIface) createIface(isBridged ? HDM_CREATE_IFACE_AP_BRIDGE
+            @NonNull WorkSource requestorWs, boolean isBridged) {
+        return (IWifiApIface) createIface(isBridged ? HDM_CREATE_IFACE_AP_BRIDGE
                 : HDM_CREATE_IFACE_AP, requiredChipCapabilities, destroyedListener,
                 handler, requestorWs);
-        if (apIface != null) {
-            mSoftApManagers.put(apIface, softApManager);
-        }
-        return apIface;
+    }
+
+    /**
+     * Create AP interface if possible (see createStaIface doc).
+     */
+    public IWifiApIface createApIface(
+            @Nullable InterfaceDestroyedListener destroyedListener, @Nullable Handler handler,
+            @NonNull WorkSource requestorWs, boolean isBridged) {
+        return (IWifiApIface) createApIface(CHIP_CAPABILITY_ANY,
+                destroyedListener, handler, requestorWs, isBridged);
     }
 
     /**
@@ -411,22 +355,6 @@
         return success;
     }
 
-    private InterfaceCacheEntry getInterfaceCacheEntry(IWifiIface iface) {
-        String name = getName(iface);
-        int type = getType(iface);
-        if (VDBG) Log.d(TAG, "getInterfaceCacheEntry: iface(name)=" + name);
-
-        synchronized (mLock) {
-            InterfaceCacheEntry cacheEntry = mInterfaceInfoCache.get(Pair.create(name, type));
-            if (cacheEntry == null) {
-                Log.e(TAG, "getInterfaceCacheEntry: no entry for iface(name)=" + name);
-                return null;
-            }
-
-            return cacheEntry;
-        }
-    }
-
     /**
      * Returns the IWifiChip corresponding to the specified interface (or null on error).
      *
@@ -435,70 +363,21 @@
      * other functions - e.g. calling the debug/trace methods.
      */
     public IWifiChip getChip(IWifiIface iface) {
+        String name = getName(iface);
+        int type = getType(iface);
+        if (VDBG) Log.d(TAG, "getChip: iface(name)=" + name);
+
         synchronized (mLock) {
-            InterfaceCacheEntry cacheEntry = getInterfaceCacheEntry(iface);
-            return (cacheEntry == null) ? null : cacheEntry.chip;
-        }
-    }
-
-    private WifiChipInfo getChipInfo(IWifiIface iface) {
-        synchronized (mLock) {
-            InterfaceCacheEntry cacheEntry = getInterfaceCacheEntry(iface);
-            if (null == cacheEntry) return null;
-
-            WifiChipInfo[] chipInfos = getAllChipInfoCached();
-            if (null == chipInfos) return null;
-
-            for (WifiChipInfo info: chipInfos) {
-                if (info.chipId == cacheEntry.chipId) {
-                    return info;
-                }
+            InterfaceCacheEntry cacheEntry = mInterfaceInfoCache.get(Pair.create(name, type));
+            if (cacheEntry == null) {
+                Log.e(TAG, "getChip: no entry for iface(name)=" + name);
+                return null;
             }
-            return null;
+
+            return cacheEntry.chip;
         }
     }
 
-    private boolean isDbsSupported(IWifiIface iface, int dbsMask) {
-        synchronized (mLock) {
-            WifiChipInfo info = getChipInfo(iface);
-            if (null == info) return false;
-            // If there is no radio combination information, cache it.
-            if (null == info.radioCombinationMatrix) {
-                IWifiChip chip = getChip(iface);
-                if (null == chip) return false;
-
-                info.radioCombinationMatrix = getChipSupportedRadioCombinationsMatrix(chip);
-                info.radioCombinationLookupTable = convertRadioCombinationMatrixToLookupTable(
-                        info.radioCombinationMatrix);
-                if (mDbg) {
-                    Log.d(TAG, "radioCombinationMatrix=" + info.radioCombinationMatrix
-                            + "radioCombinationLookupTable=" + info.radioCombinationLookupTable);
-                }
-            }
-            return info.radioCombinationLookupTable.get(dbsMask);
-        }
-    }
-
-    /**
-     * Indicate whether or not 2.4GHz/5GHz DBS is supported.
-     *
-     * @param iface The interface on the chip.
-     * @return true if supported; false, otherwise;
-     */
-    public boolean is24g5gDbsSupported(IWifiIface iface) {
-        return isDbsSupported(iface, DBS_24G_5G_MASK);
-    }
-
-    /**
-     * Indicate whether or not 5GHz/6GHz DBS is supported.
-     *
-     * @param iface The interface on the chip.
-     * @return true if supported; false, otherwise;
-     */
-    public boolean is5g6gDbsSupported(IWifiIface iface) {
-        return isDbsSupported(iface, DBS_5G_6G_MASK);
-    }
-
     /**
      * Replace the requestorWs info for the associated info.
      *
@@ -676,195 +555,91 @@
     }
 
     /**
-     * Returns whether the provided @HdmIfaceTypeForCreation combo can be supported by the device.
-     * Note: This only returns an answer based on the create type combination exposed by the HAL.
+     * Returns whether the provided Iface combo can be supported by the device.
+     * Note: This only returns an answer based on the iface combination exposed by the HAL.
      * The actual iface creation/deletion rules depend on the iface priorities set in
      * {@link #allowedToDeleteIfaceTypeForRequestedType(int, WorkSource, int, WifiIfaceInfo[][])}
      *
-     * @param createTypeCombo SparseArray keyed in by @HdmIfaceTypeForCreation to number of ifaces
-     *                         needed.
+     * @param ifaceCombo SparseArray keyed in by the iface type to number of ifaces needed.
+     * @param requiredChipCapabilities The bitmask of Capabilities which are required.
+     *                                 See IWifiChip.hal for documentation.
      * @return true if the device supports the provided combo, false otherwise.
      */
-    public boolean canDeviceSupportCreateTypeCombo(SparseArray<Integer> createTypeCombo) {
+    public boolean canSupportIfaceCombo(SparseArray<Integer> ifaceCombo,
+            long requiredChipCapabilities) {
         if (VDBG) {
-            Log.d(TAG, "canDeviceSupportCreateTypeCombo: createTypeCombo=" + createTypeCombo);
+            Log.d(TAG, "canSupportIfaceCombo: ifaceCombo=" + ifaceCombo
+                    + ", requiredChipCapabilities=" + requiredChipCapabilities);
         }
 
         synchronized (mLock) {
-            int[] requestedCombo = new int[CREATE_TYPES_BY_PRIORITY.length];
-            for (int createType : CREATE_TYPES_BY_PRIORITY) {
-                requestedCombo[createType] = createTypeCombo.get(createType, 0);
+            if (mWifi == null) return false;
+            int[] ifaceComboArr = new int[IFACE_TYPES_BY_PRIORITY.length];
+            for (int type : IFACE_TYPES_BY_PRIORITY) {
+                ifaceComboArr[type] = ifaceCombo.get(type, 0);
             }
-            for (StaticChipInfo staticChipInfo : getStaticChipInfos()) {
-                SparseArray<List<int[][]>> expandedCreateTypeCombosPerChipModeId =
-                        getExpandedCreateTypeCombosPerChipModeId(
-                                staticChipInfo.getAvailableModes());
-                for (int i = 0; i < expandedCreateTypeCombosPerChipModeId.size(); i++) {
-                    int chipModeId = expandedCreateTypeCombosPerChipModeId.keyAt(i);
-                    for (int[][] expandedCreateTypeCombo
-                            : expandedCreateTypeCombosPerChipModeId.get(chipModeId)) {
-                        for (int[] supportedCombo : expandedCreateTypeCombo) {
-                            if (canCreateTypeComboSupportRequestedCreateTypeCombo(
-                                    supportedCombo, requestedCombo)) {
-                                if (VDBG) {
-                                    Log.d(TAG, "Device can support createTypeCombo="
-                                            + createTypeCombo);
-                                }
-                                return true;
-                            }
-                        }
-                    }
-                }
-            }
-            if (VDBG) {
-                Log.d(TAG, "Device cannot support createTypeCombo=" + createTypeCombo);
-            }
-            return false;
+            WifiChipInfo[] chipInfos = getAllChipInfoCached();
+            if (chipInfos == null) return false;
+            return isItPossibleToCreateIfaceCombo(
+                    chipInfos, requiredChipCapabilities, ifaceComboArr);
         }
     }
 
     /**
-     * Returns whether the provided Iface can be requested by specifier requestor.
+     * Returns whether the provided Iface combo can be supported by the device.
+     * Note: This only returns an answer based on the iface combination exposed by the HAL.
+     * The actual iface creation/deletion rules depend on the iface priorities set in
+     * {@link #allowedToDeleteIfaceTypeForRequestedType(int, WorkSource, int, WifiIfaceInfo[][])}
      *
-     * @param createIfaceType Type of iface requested.
-     * @param requiredChipCapabilities The bitmask of Capabilities which are required.
-     *                                 See IWifiChip.hal for documentation.
-     * @param requestorWs Requestor worksource. This will be used to determine priority of this
-     *                    interface using rules based on the requestor app's context.
+     * @param ifaceCombo SparseArray keyed in by the iface type to number of ifaces needed.
      * @return true if the device supports the provided combo, false otherwise.
      */
-    public boolean isItPossibleToCreateIface(@HdmIfaceTypeForCreation int createIfaceType,
-            long requiredChipCapabilities, WorkSource requestorWs) {
-        if (VDBG) {
-            Log.d(TAG, "isItPossibleToCreateIface: createIfaceType=" + createIfaceType
-                    + ", requiredChipCapabilities=" + requiredChipCapabilities);
-        }
-        return reportImpactToCreateIface(createIfaceType, true, requiredChipCapabilities,
-                requestorWs) != null;
+    public boolean canSupportIfaceCombo(SparseArray<Integer> ifaceCombo) {
+        return canSupportIfaceCombo(ifaceCombo, CHIP_CAPABILITY_ANY);
     }
 
     /**
      * Returns whether the provided Iface can be requested by specifier requestor.
      *
-     * @param createIfaceType Type of iface requested.
+     * @param ifaceType Type of iface requested.
+     * @param requiredChipCapabilities The bitmask of Capabilities which are required.
+     *                                 See IWifiChip.hal for documentation.
      * @param requestorWs Requestor worksource. This will be used to determine priority of this
      *                    interface using rules based on the requestor app's context.
      * @return true if the device supports the provided combo, false otherwise.
      */
     public boolean isItPossibleToCreateIface(
-            @HdmIfaceTypeForCreation int createIfaceType, WorkSource requestorWs) {
-        return isItPossibleToCreateIface(
-                createIfaceType, CHIP_CAPABILITY_ANY, requestorWs);
-    }
-
-    /**
-     * Returns the details of what it would take to create the provided Iface requested by the
-     * specified requestor. The details are the list of other interfaces which would have to be
-     * destroyed.
-     *
-     * Return types imply:
-     * - null: interface cannot be created
-     * - empty list: interface can be crated w/o destroying any other interafces
-     * - otherwise: a list of interfaces to be destroyed
-     *
-     * @param createIfaceType Type of iface requested.
-     * @param queryForNewInterface True: request another interface of the specified type, False: if
-     *                             there's already an interface of the specified type then no need
-     *                             for further operation.
-     * @param requiredChipCapabilities The bitmask of Capabilities which are required.
-     *                                 See IWifiChip.hal for documentation.
-     * @param requestorWs Requestor worksource. This will be used to determine priority of this
-     *                    interface using rules based on the requestor app's context.
-     * @return the list of interfaces that would have to be destroyed and their worksource. The
-     * interface type is described using @HdmIfaceTypeForCreation.
-     */
-    public List<Pair<Integer, WorkSource>> reportImpactToCreateIface(
-            @HdmIfaceTypeForCreation int createIfaceType, boolean queryForNewInterface,
-            long requiredChipCapabilities, WorkSource requestorWs) {
+            int ifaceType, long requiredChipCapabilities, WorkSource requestorWs) {
         if (VDBG) {
-            Log.d(TAG, "reportImpactToCreateIface: ifaceType=" + createIfaceType
-                    + ", requiredChipCapabilities=" + requiredChipCapabilities
-                    + ", requestorWs=" + requestorWs);
+            Log.d(TAG, "isItPossibleToCreateIface: ifaceType=" + ifaceType
+                    + ", requiredChipCapabilities=" + requiredChipCapabilities);
         }
-
-        IfaceCreationData creationData;
         synchronized (mLock) {
+            if (mWifi == null) return false;
             WifiChipInfo[] chipInfos = getAllChipInfo();
-            if (chipInfos == null) {
-                Log.e(TAG, "createIface: no chip info found");
-                stopWifi(); // major error: shutting down
-                return null;
-            }
-
+            if (chipInfos == null) return false;
             if (!validateInterfaceCacheAndRetrieveRequestorWs(chipInfos)) {
-                Log.e(TAG, "createIface: local cache is invalid!");
+                Log.e(TAG, "isItPossibleToCreateIface: local cache is invalid!");
                 stopWifi(); // major error: shutting down
-                return null;
+                return false;
             }
-
-            if (!queryForNewInterface) {
-                for (WifiChipInfo chipInfo: chipInfos) {
-                    if (chipInfo.ifaces[createIfaceType].length != 0) {
-                        return Collections.emptyList(); // approve w/o deleting any interfaces
-                    }
-                }
-            }
-
-            creationData = getBestIfaceCreationProposal(chipInfos, createIfaceType,
-                    requiredChipCapabilities, requestorWs);
+            return isItPossibleToCreateIface(
+                    chipInfos, ifaceType, requiredChipCapabilities, requestorWs);
         }
-
-        if (creationData == null) {
-            return null; // impossible to create requested interface
-        }
-
-        List<Pair<Integer, WorkSource>> details = new ArrayList<>();
-        boolean isModeConfigNeeded = !creationData.chipInfo.currentModeIdValid
-                || creationData.chipInfo.currentModeId != creationData.chipModeId;
-        if (!isModeConfigNeeded && (creationData.interfacesToBeRemovedFirst == null
-                || creationData.interfacesToBeRemovedFirst.isEmpty())) {
-            // can create interface w/o deleting any other interfaces
-            return details;
-        }
-
-        if (isModeConfigNeeded) {
-            if (VDBG) {
-                Log.d(TAG, "isItPossibleToCreateIfaceDetails: mode change from - "
-                        + creationData.chipInfo.currentModeId + ", to - "
-                        + creationData.chipModeId);
-            }
-            for (WifiIfaceInfo[] ifaceInfos: creationData.chipInfo.ifaces) {
-                for (WifiIfaceInfo ifaceInfo : ifaceInfos) {
-                    details.add(Pair.create(ifaceInfo.createType,
-                            ifaceInfo.requestorWsHelper.getWorkSource()));
-                }
-            }
-        } else {
-            for (WifiIfaceInfo ifaceInfo : creationData.interfacesToBeRemovedFirst) {
-                details.add(Pair.create(ifaceInfo.createType,
-                        ifaceInfo.requestorWsHelper.getWorkSource()));
-            }
-        }
-
-        return details;
     }
 
     /**
-     * See {@link #reportImpactToCreateIface(int, boolean, long, WorkSource)}.
+     * Returns whether the provided Iface can be requested by specifier requestor.
      *
      * @param ifaceType Type of iface requested.
-     * @param queryForNewInterface True: request another interface of the specified type, False: if
-     *                             there's already an interface of the specified type then no need
-     *                             for further operation.
      * @param requestorWs Requestor worksource. This will be used to determine priority of this
      *                    interface using rules based on the requestor app's context.
-     * @return the list of interfaces that would have to be destroyed and their worksource.
+     * @return true if the device supports the provided combo, false otherwise.
      */
-    public List<Pair<Integer, WorkSource>> reportImpactToCreateIface(
-            @HdmIfaceTypeForCreation int ifaceType, boolean queryForNewInterface,
-            WorkSource requestorWs) {
-        return reportImpactToCreateIface(ifaceType, queryForNewInterface, CHIP_CAPABILITY_ANY,
-                requestorWs);
+    public boolean isItPossibleToCreateIface(
+            int ifaceType, WorkSource requestorWs) {
+        return isItPossibleToCreateIface(
+                ifaceType, CHIP_CAPABILITY_ANY, requestorWs);
     }
 
     // internal state
@@ -876,9 +651,6 @@
      */
     private static final int[] IFACE_TYPES_BY_PRIORITY =
             {IfaceType.AP, IfaceType.STA, IfaceType.P2P, IfaceType.NAN};
-    private static final int[] CREATE_TYPES_BY_PRIORITY =
-            {HDM_CREATE_IFACE_AP, HDM_CREATE_IFACE_AP_BRIDGE, HDM_CREATE_IFACE_STA,
-                    HDM_CREATE_IFACE_P2P, HDM_CREATE_IFACE_NAN};
 
     private final Object mLock = new Object();
 
@@ -925,7 +697,6 @@
     private class WifiIfaceInfo {
         public String name;
         public IWifiIface iface;
-        public @HdmIfaceTypeForCreation int createType;
         public WorkSourceHelper requestorWsHelper;
 
         @Override
@@ -937,16 +708,12 @@
 
     private class WifiChipInfo {
         public IWifiChip chip;
-        public int chipId = -1;
-        public ArrayList<android.hardware.wifi.V1_6.IWifiChip.ChipMode> availableModes;
-        public boolean currentModeIdValid = false;
-        public int currentModeId = -1;
-        // Arrays of WifiIfaceInfo indexed by @HdmIfaceTypeForCreation, in order of creation as
-        // returned by IWifiChip.getXxxIfaceNames.
-        public WifiIfaceInfo[][] ifaces = new WifiIfaceInfo[CREATE_TYPES_BY_PRIORITY.length][];
+        public int chipId;
+        public ArrayList<IWifiChip.ChipMode> availableModes;
+        public boolean currentModeIdValid;
+        public int currentModeId;
+        public WifiIfaceInfo[][] ifaces = new WifiIfaceInfo[IFACE_TYPES_BY_PRIORITY.length][];
         public long chipCapabilities;
-        public WifiRadioCombinationMatrix radioCombinationMatrix = null;
-        public SparseBooleanArray radioCombinationLookupTable = new SparseBooleanArray();
 
         @Override
         public String toString() {
@@ -994,25 +761,6 @@
         return android.hardware.wifi.V1_5.IWifiChip.castFrom(chip);
     }
 
-    protected android.hardware.wifi.V1_6.IWifiChip getWifiChipForV1_6Mockable(IWifiChip chip) {
-        if (null == chip) return null;
-        return android.hardware.wifi.V1_6.IWifiChip.castFrom(chip);
-    }
-
-    protected android.hardware.wifi.V1_5.IWifiApIface getIWifiApIfaceForV1_5Mockable(
-            IWifiApIface iface) {
-        if (null == iface) return null;
-        return android.hardware.wifi.V1_5.IWifiApIface.castFrom(iface);
-    }
-
-    protected boolean isBridgedSoftApSupportedMockable() {
-        return mIsBridgedSoftApSupported;
-    }
-
-    protected boolean isStaWithBridgedSoftApConcurrencySupportedMockable() {
-        return mIsStaWithBridgedSoftApConcurrencySupported;
-    }
-
     // internal implementation
 
     private void initializeInternal() {
@@ -1138,31 +886,6 @@
     }
 
     /**
-     * Register the wifi HAL event callback. Reset the Wifi HAL interface when it fails.
-     * @return true if success.
-     */
-    private boolean registerWifiHalEventCallback() {
-        try {
-            WifiStatus status;
-            android.hardware.wifi.V1_5.IWifi iWifiV15 = getWifiServiceForV1_5Mockable(mWifi);
-            if (iWifiV15 != null) {
-                status = iWifiV15.registerEventCallback_1_5(mWifiEventCallbackV15);
-            } else {
-                status = mWifi.registerEventCallback(mWifiEventCallback);
-            }
-
-            if (status.code != WifiStatusCode.SUCCESS) {
-                Log.e(TAG, "IWifi.registerEventCallback failed: " + statusString(status));
-                mWifi = null;
-            }
-            return status.code == WifiStatusCode.SUCCESS;
-        } catch (RemoteException e) {
-            Log.e(TAG, "Exception while operating on IWifi: " + e);
-        }
-        return false;
-    }
-
-    /**
      * Initialize IWifi and register death listener and event callback.
      *
      * - It is possible that IWifi is not ready - we have a listener on IServiceManager for it.
@@ -1191,13 +914,21 @@
                     return;
                 }
 
-                // Stopping wifi just in case. This would also trigger the status callback.
-                // Stopping wifi invalidated the registered the event callback, register after the
-                // wifi stop.
-                stopWifi();
-                if (!registerWifiHalEventCallback()) {
+                WifiStatus status;
+                android.hardware.wifi.V1_5.IWifi iWifiV15 = getWifiServiceForV1_5Mockable(mWifi);
+                if (iWifiV15 != null) {
+                    status = iWifiV15.registerEventCallback_1_5(mWifiEventCallbackV15);
+                } else {
+                    status = mWifi.registerEventCallback(mWifiEventCallback);
+                }
+
+                if (status.code != WifiStatusCode.SUCCESS) {
+                    Log.e(TAG, "IWifi.registerEventCallback failed: " + statusString(status));
+                    mWifi = null;
                     return;
                 }
+                // Stopping wifi just in case. This would also trigger the status callback.
+                stopWifi();
                 mIsReady = true;
             } catch (RemoteException e) {
                 Log.e(TAG, "Exception while operating on IWifi: " + e);
@@ -1398,33 +1129,16 @@
                         return null;
                     }
 
-                    Mutable<ArrayList<android.hardware.wifi.V1_6.IWifiChip.ChipMode>>
-                            availableModesResp = new Mutable<>();
-                    android.hardware.wifi.V1_6.IWifiChip chipV16 =
-                            getWifiChipForV1_6Mockable(chipResp.value);
-                    if (chipV16 != null) {
-                        chipV16.getAvailableModes_1_6((WifiStatus status,
-                                ArrayList<android.hardware.wifi.V1_6.IWifiChip.ChipMode> modes) -> {
-                            statusOk.value = status.code == WifiStatusCode.SUCCESS;
-                            if (statusOk.value) {
-                                availableModesResp.value = modes;
-                            } else {
-                                Log.e(TAG, "getAvailableModes_1_6 failed: "
-                                        + statusString(status));
-                            }
-                        });
-                    } else {
-                        chipResp.value.getAvailableModes((WifiStatus status,
-                                ArrayList<IWifiChip.ChipMode> modes) -> {
-                            statusOk.value = status.code == WifiStatusCode.SUCCESS;
-                            if (statusOk.value) {
-                                availableModesResp.value = upgradeV1_0ChipModesToV1_6(modes);
-                            } else {
-                                Log.e(TAG, "getAvailableModes failed: "
-                                        + statusString(status));
-                            }
-                        });
-                    }
+                    Mutable<ArrayList<IWifiChip.ChipMode>> availableModesResp = new Mutable<>();
+                    chipResp.value.getAvailableModes(
+                            (WifiStatus status, ArrayList<IWifiChip.ChipMode> modes) -> {
+                                statusOk.value = status.code == WifiStatusCode.SUCCESS;
+                                if (statusOk.value) {
+                                    availableModesResp.value = modes;
+                                } else {
+                                    Log.e(TAG, "getAvailableModes failed: " + statusString(status));
+                                }
+                            });
                     if (!statusOk.value) {
                         return null;
                     }
@@ -1474,7 +1188,6 @@
                                         WifiIfaceInfo ifaceInfo = new WifiIfaceInfo();
                                         ifaceInfo.name = ifaceName;
                                         ifaceInfo.iface = iface;
-                                        ifaceInfo.createType = HDM_CREATE_IFACE_STA;
                                         staIfaces[ifaceIndex.value++] = ifaceInfo;
                                     } else {
                                         Log.e(TAG, "getStaIface failed: " + statusString(status));
@@ -1508,7 +1221,6 @@
                                         WifiIfaceInfo ifaceInfo = new WifiIfaceInfo();
                                         ifaceInfo.name = ifaceName;
                                         ifaceInfo.iface = iface;
-                                        ifaceInfo.createType = HDM_CREATE_IFACE_AP;
                                         apIfaces[ifaceIndex.value++] = ifaceInfo;
                                     } else {
                                         Log.e(TAG, "getApIface failed: " + statusString(status));
@@ -1518,44 +1230,6 @@
                             return null;
                         }
                     }
-                    Mutable<Integer> numBridgedAps = new Mutable<>(0);
-                    for (WifiIfaceInfo apIfaceInfo : apIfaces) {
-                        android.hardware.wifi.V1_5.IWifiApIface wifiApIfaceV15 =
-                                getIWifiApIfaceForV1_5Mockable((IWifiApIface) apIfaceInfo.iface);
-                        if (wifiApIfaceV15 == null) {
-                            continue;
-                        }
-                        try {
-                            wifiApIfaceV15.getBridgedInstances((status, instances) -> {
-                                statusOk.value = status.code == WifiStatusCode.SUCCESS;
-                                if (statusOk.value) {
-                                    // Only count bridged APs with more than 1 instance as a bridged
-                                    // AP; 1 instance bridged APs will be counted as single AP.
-                                    if (instances != null && instances.size() > 1) {
-                                        apIfaceInfo.createType = HDM_CREATE_IFACE_AP_BRIDGE;
-                                        numBridgedAps.value++;
-                                    }
-                                } else {
-                                    Log.e(TAG, "getBridgedInstances failed: "
-                                            + statusString(status));
-                                }
-                            });
-                        } catch (RemoteException e) {
-                            Log.e(TAG, "IWifiApIface.getBridgedInstances exception: " + e);
-                        }
-                    }
-                    WifiIfaceInfo[] singleApIfaces =
-                            new WifiIfaceInfo[apIfaces.length - numBridgedAps.value];
-                    WifiIfaceInfo[] bridgedApIfaces = new WifiIfaceInfo[numBridgedAps.value];
-                    int singleApIndex = 0;
-                    int bridgedApIndex = 0;
-                    for (WifiIfaceInfo apIfaceInfo : apIfaces) {
-                        if (apIfaceInfo.createType == HDM_CREATE_IFACE_AP_BRIDGE) {
-                            bridgedApIfaces[bridgedApIndex++] = apIfaceInfo;
-                        } else {
-                            singleApIfaces[singleApIndex++] = apIfaceInfo;
-                        }
-                    }
 
                     ifaceIndex.value = 0;
                     chipResp.value.getP2pIfaceNames(
@@ -1580,7 +1254,6 @@
                                         WifiIfaceInfo ifaceInfo = new WifiIfaceInfo();
                                         ifaceInfo.name = ifaceName;
                                         ifaceInfo.iface = iface;
-                                        ifaceInfo.createType = HDM_CREATE_IFACE_P2P;
                                         p2pIfaces[ifaceIndex.value++] = ifaceInfo;
                                     } else {
                                         Log.e(TAG, "getP2pIface failed: " + statusString(status));
@@ -1614,7 +1287,6 @@
                                         WifiIfaceInfo ifaceInfo = new WifiIfaceInfo();
                                         ifaceInfo.name = ifaceName;
                                         ifaceInfo.iface = iface;
-                                        ifaceInfo.createType = HDM_CREATE_IFACE_NAN;
                                         nanIfaces[ifaceIndex.value++] = ifaceInfo;
                                     } else {
                                         Log.e(TAG, "getNanIface failed: " + statusString(status));
@@ -1634,11 +1306,10 @@
                     chipInfo.currentModeIdValid = currentModeValidResp.value;
                     chipInfo.currentModeId = currentModeResp.value;
                     chipInfo.chipCapabilities = chipCapabilities.value;
-                    chipInfo.ifaces[HDM_CREATE_IFACE_STA] = staIfaces;
-                    chipInfo.ifaces[HDM_CREATE_IFACE_AP] = singleApIfaces;
-                    chipInfo.ifaces[HDM_CREATE_IFACE_AP_BRIDGE] = bridgedApIfaces;
-                    chipInfo.ifaces[HDM_CREATE_IFACE_P2P] = p2pIfaces;
-                    chipInfo.ifaces[HDM_CREATE_IFACE_NAN] = nanIfaces;
+                    chipInfo.ifaces[IfaceType.STA] = staIfaces;
+                    chipInfo.ifaces[IfaceType.AP] = apIfaces;
+                    chipInfo.ifaces[IfaceType.P2P] = p2pIfaces;
+                    chipInfo.ifaces[IfaceType.NAN] = nanIfaces;
                 }
                 return chipsInfo;
             } catch (RemoteException e) {
@@ -1649,104 +1320,6 @@
         return null;
     }
 
-    private ArrayList<android.hardware.wifi.V1_6.IWifiChip.ChipMode>
-            upgradeV1_0ChipModesToV1_6(ArrayList<IWifiChip.ChipMode> oldChipModes) {
-        ArrayList<android.hardware.wifi.V1_6.IWifiChip.ChipMode> newChipModes = new ArrayList<>();
-        for (IWifiChip.ChipMode oldChipMode : oldChipModes) {
-            android.hardware.wifi.V1_6.IWifiChip.ChipMode newChipMode =
-                    new android.hardware.wifi.V1_6.IWifiChip.ChipMode();
-            newChipMode.id = oldChipMode.id;
-            newChipMode.availableCombinations = new ArrayList<>();
-            for (IWifiChip.ChipIfaceCombination oldCombo : oldChipMode.availableCombinations) {
-                android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination newCombo =
-                        new ChipConcurrencyCombination();
-                newCombo.limits = new ArrayList<>();
-                boolean isStaInCombination = false;
-                for (IWifiChip.ChipIfaceCombinationLimit oldLimit : oldCombo.limits) {
-                    if (oldLimit.types.contains(IfaceType.STA)) {
-                        isStaInCombination = true;
-                        break;
-                    }
-                }
-                // Add Bridged AP based on the overlays
-                boolean canAddBridgedAp = isBridgedSoftApSupportedMockable() && !(isStaInCombination
-                        && !isStaWithBridgedSoftApConcurrencySupportedMockable());
-                for (IWifiChip.ChipIfaceCombinationLimit oldLimit : oldCombo.limits) {
-                    ChipConcurrencyCombinationLimit newLimit =
-                            new ChipConcurrencyCombinationLimit();
-                    newLimit.types = new ArrayList<>();
-                    for (int oldType : oldLimit.types) {
-                        int newType = IFACE_TYPE_TO_CONCURRENCY_TYPE_MAP.get(oldType);
-                        newLimit.types.add(newType);
-                        if (oldType == IfaceType.AP && canAddBridgedAp) {
-                            newLimit.types.add(IfaceConcurrencyType.AP_BRIDGED);
-                        }
-                    }
-                    newLimit.maxIfaces = oldLimit.maxIfaces;
-                    newCombo.limits.add(newLimit);
-                }
-                newChipMode.availableCombinations.add(newCombo);
-            }
-            newChipModes.add(newChipMode);
-        }
-        return newChipModes;
-    }
-
-    @Nullable
-    private StaticChipInfo[] mCachedStaticChipInfos = null;
-
-    @NonNull
-    private StaticChipInfo[] getStaticChipInfos() {
-        if (mCachedStaticChipInfos == null) {
-            mCachedStaticChipInfos = loadStaticChipInfoFromStore();
-        }
-        return mCachedStaticChipInfos;
-    }
-
-    private void saveStaticChipInfoToStore(StaticChipInfo[] staticChipInfos) {
-        try {
-            JSONArray staticChipInfosJson = new JSONArray();
-            for (StaticChipInfo staticChipInfo : staticChipInfos) {
-                staticChipInfosJson.put(staticChipInfoToJson(staticChipInfo));
-            }
-            mWifiInjector.getSettingsConfigStore().put(WIFI_STATIC_CHIP_INFO,
-                    staticChipInfosJson.toString());
-        } catch (JSONException e) {
-            Log.e(TAG, "JSONException while converting StaticChipInfo to JSON: " + e);
-        }
-    }
-
-    private StaticChipInfo[] loadStaticChipInfoFromStore() {
-        StaticChipInfo[] staticChipInfos = new StaticChipInfo[0];
-        String configString = mWifiInjector.getSettingsConfigStore().get(WIFI_STATIC_CHIP_INFO);
-        if (TextUtils.isEmpty(configString)) {
-            return staticChipInfos;
-        }
-        try {
-            JSONArray staticChipInfosJson = new JSONArray(
-                    mWifiInjector.getSettingsConfigStore().get(WIFI_STATIC_CHIP_INFO));
-            staticChipInfos = new StaticChipInfo[staticChipInfosJson.length()];
-            for (int i = 0; i < staticChipInfosJson.length(); i++) {
-                staticChipInfos[i] = jsonToStaticChipInfo(staticChipInfosJson.getJSONObject(i));
-            }
-        } catch (JSONException e) {
-            Log.e(TAG, "Failed to load static chip info from store: " + e);
-        }
-        return staticChipInfos;
-    }
-
-    private StaticChipInfo[] convertWifiChipInfoToStaticChipInfos(WifiChipInfo[] chipInfos) {
-        StaticChipInfo[] staticChipInfos = new StaticChipInfo[chipInfos.length];
-        for (int i = 0; i < chipInfos.length; i++) {
-            WifiChipInfo chipInfo = chipInfos[i];
-            staticChipInfos[i] = new StaticChipInfo(
-                    chipInfo.chipId,
-                    chipInfo.chipCapabilities,
-                    chipInfo.availableModes);
-        }
-        return staticChipInfos;
-    }
-
     /**
      * Checks the local state of this object (the cached state) against the input 'chipInfos'
      * state (which is a live representation of the Wi-Fi firmware status - read through the HAL).
@@ -1775,24 +1348,19 @@
                     return false;
                 }
 
-                // search for matching interface cache entry by iterating through the corresponding
-                // HdmIfaceTypeForCreation values.
+                // search for interface
+                WifiIfaceInfo[] ifaceInfoList = matchingChipInfo.ifaces[entry.type];
+                if (ifaceInfoList == null) {
+                    Log.e(TAG, "validateInterfaceCache: invalid type on entry " + entry);
+                    return false;
+                }
+
                 boolean matchFound = false;
-                for (int createType : CREATE_TYPES_BY_PRIORITY) {
-                    if (HAL_IFACE_MAP.get(createType) != entry.type) {
-                        continue;
-                    }
-                    WifiIfaceInfo[] ifaceInfoList = matchingChipInfo.ifaces[createType];
-                    if (ifaceInfoList == null) {
-                        Log.e(TAG, "validateInterfaceCache: invalid type on entry " + entry);
-                        return false;
-                    }
-                    for (WifiIfaceInfo ifaceInfo : ifaceInfoList) {
-                        if (ifaceInfo.name.equals(entry.name)) {
-                            ifaceInfo.requestorWsHelper = entry.requestorWsHelper;
-                            matchFound = true;
-                            break;
-                        }
+                for (WifiIfaceInfo ifaceInfo: ifaceInfoList) {
+                    if (ifaceInfo.name.equals(entry.name)) {
+                        ifaceInfo.requestorWsHelper = entry.requestorWsHelper;
+                        matchFound = true;
+                        break;
                     }
                 }
                 if (!matchFound) {
@@ -1841,18 +1409,9 @@
                                 Log.d(TAG, "start IWifi succeeded after trying "
                                          + triedCount + " times");
                             }
-                            WifiChipInfo[] wifiChipInfos = getAllChipInfo();
-                            if (wifiChipInfos != null) {
-                                mCachedStaticChipInfos =
-                                        convertWifiChipInfoToStaticChipInfos(getAllChipInfo());
-                                saveStaticChipInfoToStore(mCachedStaticChipInfos);
-                            } else {
-                                Log.e(TAG, "Started wifi but could not get current chip info.");
-                            }
                             return true;
                         } else if (status.code == WifiStatusCode.ERROR_NOT_AVAILABLE) {
-                            // Should retry. Hal might still be stopping. the registered event
-                            // callback will not be cleared.
+                            // Should retry. Hal might still be stopping.
                             Log.e(TAG, "Cannot start IWifi: " + statusString(status)
                                     + ", Retrying...");
                             try {
@@ -1863,7 +1422,6 @@
                             triedCount++;
                         } else {
                             // Should not retry on other failures.
-                            // Will be handled in the onFailure event.
                             Log.e(TAG, "Cannot start IWifi: " + statusString(status));
                             return false;
                         }
@@ -1922,7 +1480,6 @@
             mEventHandler.post(() -> {
                 Log.e(TAG, "IWifiEventCallback.onFailure: " + statusString(status));
                 synchronized (mLock) {
-                    mWifi = null;
                     mIsReady = false;
                     teardownInternal();
                 }
@@ -1950,13 +1507,9 @@
 
         @Override
         public void onSubsystemRestart(WifiStatus status) throws RemoteException {
-            Log.i(TAG, "onSubsystemRestart");
             mEventHandler.post(() -> {
-                Log.i(TAG, "IWifiEventCallback.onSubsystemRestart: " + statusString(status));
                 synchronized (mLock) {
-                    Log.i(TAG, "Attempting to invoke mSubsystemRestartListener");
                     for (SubsystemRestartListenerProxy cb : mSubsystemRestartListener) {
-                        Log.i(TAG, "Invoking mSubsystemRestartListener");
                         cb.action();
                     }
                 }
@@ -2020,13 +1573,12 @@
             if (chip != null && wci.chipId != chipIdIfProvided.value) {
                 continue;
             }
-            // Map the V1_6 IfaceConcurrencyTypes to the corresponding IfaceType.
-            for (android.hardware.wifi.V1_6.IWifiChip.ChipMode cm: wci.availableModes) {
-                for (ChipConcurrencyCombination cic : cm.availableCombinations) {
-                    for (ChipConcurrencyCombinationLimit cicl : cic.limits) {
-                        for (int concurrencyType: cicl.types) {
-                            results.add(HAL_IFACE_MAP.get(
-                                    CONCURRENCY_TYPE_TO_CREATE_TYPE_MAP.get(concurrencyType)));
+
+            for (IWifiChip.ChipMode cm: wci.availableModes) {
+                for (IWifiChip.ChipIfaceCombination cic: cm.availableCombinations) {
+                    for (IWifiChip.ChipIfaceCombinationLimit cicl: cic.limits) {
+                        for (int type: cicl.types) {
+                            results.add(type);
                         }
                     }
                 }
@@ -2055,16 +1607,12 @@
             if (chipInfos == null) {
                 Log.e(TAG, "createIface: no chip info found");
                 stopWifi(); // major error: shutting down
-                // Event callback has been invalidated in HAL stop, register it again.
-                registerWifiHalEventCallback();
                 return null;
             }
 
             if (!validateInterfaceCacheAndRetrieveRequestorWs(chipInfos)) {
                 Log.e(TAG, "createIface: local cache is invalid!");
                 stopWifi(); // major error: shutting down
-                // Event callback has been invalidated in HAL stop, register it again.
-                registerWifiHalEventCallback();
                 return null;
             }
 
@@ -2074,22 +1622,25 @@
         }
     }
 
-    private static boolean isChipCapabilitiesSupported(long currentChipCapabilities,
+    private static boolean isChipCapabilitiesSupported(@NonNull WifiChipInfo chipInfo,
             long requiredChipCapabilities) {
+        if (chipInfo == null) return false;
+
         if (requiredChipCapabilities == CHIP_CAPABILITY_ANY) return true;
 
-        if (CHIP_CAPABILITY_UNINITIALIZED == currentChipCapabilities) return true;
+        if (CHIP_CAPABILITY_UNINITIALIZED == chipInfo.chipCapabilities) return true;
 
-        return (currentChipCapabilities & requiredChipCapabilities)
+        return (chipInfo.chipCapabilities & requiredChipCapabilities)
                 == requiredChipCapabilities;
     }
 
-    private IfaceCreationData getBestIfaceCreationProposal(
+    private IWifiIface createIfaceIfPossible(
             WifiChipInfo[] chipInfos, @HdmIfaceTypeForCreation int createIfaceType,
-            long requiredChipCapabilities, WorkSource requestorWs) {
-        int targetHalIfaceType = HAL_IFACE_MAP.get(createIfaceType);
+            long requiredChipCapabilities, InterfaceDestroyedListener destroyedListener,
+            Handler handler, WorkSource requestorWs) {
+        int targetHalIfaceType = mHalIfaceMap.get(createIfaceType);
         if (VDBG) {
-            Log.d(TAG, "getBestIfaceCreationProposal: chipInfos=" + Arrays.deepToString(chipInfos)
+            Log.d(TAG, "createIfaceIfPossible: chipInfos=" + Arrays.deepToString(chipInfos)
                     + ", createIfaceType=" + createIfaceType
                     + ", targetHalIfaceType=" + targetHalIfaceType
                     + ", requiredChipCapabilities=" + requiredChipCapabilities
@@ -2097,21 +1648,20 @@
         }
         synchronized (mLock) {
             IfaceCreationData bestIfaceCreationProposal = null;
-            for (WifiChipInfo chipInfo : chipInfos) {
-                if (!isChipCapabilitiesSupported(
-                        chipInfo.chipCapabilities, requiredChipCapabilities)) {
-                    continue;
-                }
+            for (WifiChipInfo chipInfo: chipInfos) {
+                if (!isChipCapabilitiesSupported(chipInfo, requiredChipCapabilities)) continue;
+                for (IWifiChip.ChipMode chipMode: chipInfo.availableModes) {
+                    for (IWifiChip.ChipIfaceCombination chipIfaceCombo : chipMode
+                            .availableCombinations) {
+                        int[][] expandedIfaceCombos = expandIfaceCombos(chipIfaceCombo);
+                        if (VDBG) {
+                            Log.d(TAG, chipIfaceCombo + " expands to "
+                                    + Arrays.deepToString(expandedIfaceCombos));
+                        }
 
-                SparseArray<List<int[][]>> expandedCreateTypeCombosPerChipModeId =
-                        getExpandedCreateTypeCombosPerChipModeId(chipInfo.availableModes);
-                for (int i = 0; i < expandedCreateTypeCombosPerChipModeId.size(); i++) {
-                    int chipModeId = expandedCreateTypeCombosPerChipModeId.keyAt(i);
-                    for (int[][] expandedCreateTypeCombo :
-                            expandedCreateTypeCombosPerChipModeId.get(chipModeId)) {
-                        for (int[] createTypeCombo : expandedCreateTypeCombo) {
-                            IfaceCreationData currentProposal = canCreateTypeComboSupportRequest(
-                                    chipInfo, chipModeId, createTypeCombo, createIfaceType,
+                        for (int[] expandedIfaceCombo: expandedIfaceCombos) {
+                            IfaceCreationData currentProposal = canIfaceComboSupportRequest(
+                                    chipInfo, chipMode, expandedIfaceCombo, targetHalIfaceType,
                                     requestorWs);
                             if (compareIfaceCreationData(currentProposal,
                                     bestIfaceCreationProposal)) {
@@ -2122,43 +1672,6 @@
                     }
                 }
             }
-            return bestIfaceCreationProposal;
-        }
-    }
-
-    /**
-     * Returns a SparseArray indexed by ChipModeId, containing Lists of expanded create type combos
-     * supported by that id.
-     */
-    private SparseArray<List<int[][]>> getExpandedCreateTypeCombosPerChipModeId(
-            ArrayList<android.hardware.wifi.V1_6.IWifiChip.ChipMode> chipModes) {
-        SparseArray<List<int[][]>> combosPerChipModeId = new SparseArray<>();
-        for (android.hardware.wifi.V1_6.IWifiChip.ChipMode chipMode : chipModes) {
-            List<int[][]> expandedCreateTypeCombos = new ArrayList<>();
-            for (ChipConcurrencyCombination chipConcurrencyCombo
-                    : chipMode.availableCombinations) {
-                expandedCreateTypeCombos.add(expandCreateTypeCombo(chipConcurrencyCombo));
-            }
-            combosPerChipModeId.put(chipMode.id, expandedCreateTypeCombos);
-        }
-        return combosPerChipModeId;
-    }
-
-    private IWifiIface createIfaceIfPossible(
-            WifiChipInfo[] chipInfos, @HdmIfaceTypeForCreation int createIfaceType,
-            long requiredChipCapabilities, InterfaceDestroyedListener destroyedListener,
-            Handler handler, WorkSource requestorWs) {
-        int targetHalIfaceType = HAL_IFACE_MAP.get(createIfaceType);
-        if (VDBG) {
-            Log.d(TAG, "createIfaceIfPossible: chipInfos=" + Arrays.deepToString(chipInfos)
-                    + ", createIfaceType=" + createIfaceType
-                    + ", targetHalIfaceType=" + targetHalIfaceType
-                    + ", requiredChipCapabilities=" + requiredChipCapabilities
-                    + ", requestorWs=" + requestorWs);
-        }
-        synchronized (mLock) {
-            IfaceCreationData bestIfaceCreationProposal = getBestIfaceCreationProposal(chipInfos,
-                    createIfaceType, requiredChipCapabilities, requestorWs);
 
             if (bestIfaceCreationProposal != null) {
                 IWifiIface iface = executeChipReconfiguration(bestIfaceCreationProposal,
@@ -2197,67 +1710,93 @@
         return null;
     }
 
+    // similar to createIfaceIfPossible - but simpler code: not looking for best option just
+    // for any option (so terminates on first one).
+    private boolean isItPossibleToCreateIface(WifiChipInfo[] chipInfos,
+            int ifaceType, long requiredChipCapabilities,
+            WorkSource requestorWs) {
+        if (VDBG) {
+            Log.d(TAG, "isItPossibleToCreateIface: chipInfos=" + Arrays.deepToString(chipInfos)
+                    + ", ifaceType=" + ifaceType
+                    + ", requiredChipCapabilities=" + requiredChipCapabilities);
+        }
+
+        for (WifiChipInfo chipInfo: chipInfos) {
+            if (!isChipCapabilitiesSupported(chipInfo, requiredChipCapabilities)) continue;
+            for (IWifiChip.ChipMode chipMode: chipInfo.availableModes) {
+                for (IWifiChip.ChipIfaceCombination chipIfaceCombo : chipMode
+                        .availableCombinations) {
+                    int[][] expandedIfaceCombos = expandIfaceCombos(chipIfaceCombo);
+                    if (VDBG) {
+                        Log.d(TAG, chipIfaceCombo + " expands to "
+                                + Arrays.deepToString(expandedIfaceCombos));
+                    }
+
+                    for (int[] expandedIfaceCombo: expandedIfaceCombos) {
+                        if (canIfaceComboSupportRequest(chipInfo, chipMode, expandedIfaceCombo,
+                                ifaceType, requestorWs) != null) {
+                            return true;
+                        }
+                    }
+                }
+            }
+        }
+
+        return false;
+    }
+
     /**
-     * Expands (or provides an alternative representation) of the ChipConcurrencyCombination as all
-     * possible combinations of @HdmIfaceTypeForCreation.
+     * Expands (or provides an alternative representation) of the ChipIfaceCombination as all
+     * possible combinations of interface.
      *
-     * Returns [# of combinations][4 (@HdmIfaceTypeForCreation)]
+     * Returns [# of combinations][4 (IfaceType)]
      *
      * Note: there could be duplicates - allow (inefficient but ...).
      * TODO: optimize by using a Set as opposed to a []: will remove duplicates. Will need to
      * provide correct hashes.
      */
-    private int[][] expandCreateTypeCombo(ChipConcurrencyCombination chipConcurrencyCombo) {
+    private int[][] expandIfaceCombos(IWifiChip.ChipIfaceCombination chipIfaceCombo) {
         int numOfCombos = 1;
-        for (ChipConcurrencyCombinationLimit limit : chipConcurrencyCombo.limits) {
+        for (IWifiChip.ChipIfaceCombinationLimit limit: chipIfaceCombo.limits) {
             for (int i = 0; i < limit.maxIfaces; ++i) {
                 numOfCombos *= limit.types.size();
             }
         }
 
-        int[][] expandedCreateTypeCombo =
-                new int[numOfCombos][CREATE_TYPES_BY_PRIORITY.length];
+        int[][] expandedIfaceCombos = new int[numOfCombos][IFACE_TYPES_BY_PRIORITY.length];
 
         int span = numOfCombos; // span of an individual type (or sub-tree size)
-        for (ChipConcurrencyCombinationLimit limit : chipConcurrencyCombo.limits) {
+        for (IWifiChip.ChipIfaceCombinationLimit limit: chipIfaceCombo.limits) {
             for (int i = 0; i < limit.maxIfaces; ++i) {
                 span /= limit.types.size();
                 for (int k = 0; k < numOfCombos; ++k) {
-                    expandedCreateTypeCombo[k][CONCURRENCY_TYPE_TO_CREATE_TYPE_MAP.get(
-                            limit.types.get((k / span) % limit.types.size()))]++;
+                    expandedIfaceCombos[k][limit.types.get((k / span) % limit.types.size())]++;
                 }
             }
         }
-        if (VDBG) {
-            Log.d(TAG, "ChipConcurrencyCombo " + chipConcurrencyCombo
-                    + " expands to HdmIfaceTypeForCreation combo "
-                    + Arrays.deepToString(expandedCreateTypeCombo));
-        }
-        return expandedCreateTypeCombo;
+
+        return expandedIfaceCombos;
     }
 
     private class IfaceCreationData {
         public WifiChipInfo chipInfo;
         public int chipModeId;
         public List<WifiIfaceInfo> interfacesToBeRemovedFirst;
-        public List<WifiIfaceInfo> interfacesToBeDowngraded;
 
         @Override
         public String toString() {
             StringBuilder sb = new StringBuilder();
             sb.append("{chipInfo=").append(chipInfo).append(", chipModeId=").append(chipModeId)
                     .append(", interfacesToBeRemovedFirst=").append(interfacesToBeRemovedFirst)
-                    .append(", interfacesToBeDowngraded=").append(interfacesToBeDowngraded)
                     .append(")");
             return sb.toString();
         }
     }
 
     /**
-     * Checks whether the input chip-create-type-combo can support the requested create type:
-     * if not then returns null, if yes then returns information containing the list of interfaces
-     * which would have to be removed first before an interface of the given create type can be
-     * created.
+     * Checks whether the input chip-iface-combo can support the requested interface type: if not
+     * then returns null, if yes then returns information containing the list of interfaces which
+     * would have to be removed first before the requested interface can be created.
      *
      * Note: the list of interfaces to be removed is EMPTY if a chip mode change is required - in
      * that case ALL the interfaces on the current chip have to be removed first.
@@ -2265,100 +1804,78 @@
      * Response determined based on:
      * - Mode configuration: i.e. could the mode support the interface type in principle
      */
-    private IfaceCreationData canCreateTypeComboSupportRequest(
-            WifiChipInfo chipInfo,
-            int chipModeId,
-            int[] chipCreateTypeCombo,
-            @HdmIfaceTypeForCreation int requestedCreateType,
+    private IfaceCreationData canIfaceComboSupportRequest(WifiChipInfo chipInfo,
+            IWifiChip.ChipMode chipMode, int[] chipIfaceCombo, int ifaceType,
             WorkSource requestorWs) {
         if (VDBG) {
-            Log.d(TAG, "canCreateTypeComboSupportRequest: chipInfo=" + chipInfo
-                    + ", chipModeId=" + chipModeId
-                    + ", chipCreateTypeCombo=" + Arrays.toString(chipCreateTypeCombo)
-                    + ", requestedCreateType=" + requestedCreateType
-                    + ", requestorWs=" + requestorWs);
+            Log.d(TAG, "canIfaceComboSupportRequest: chipInfo=" + chipInfo + ", chipMode="
+                    + chipMode + ", chipIfaceCombo=" + Arrays.toString(chipIfaceCombo)
+                    + ", ifaceType=" + ifaceType + ", requestorWs=" + requestorWs);
         }
 
-        // short-circuit: does the combo even support the requested type?
-        if (chipCreateTypeCombo[requestedCreateType] == 0) {
-            if (VDBG) Log.d(TAG, "Requested create type not supported by combo");
+        // short-circuit: does the chipIfaceCombo even support the requested type?
+        if (chipIfaceCombo[ifaceType] == 0) {
+            if (VDBG) Log.d(TAG, "Requested type not supported by combo");
             return null;
         }
 
         boolean isChipModeChangeProposed =
-                chipInfo.currentModeIdValid && chipInfo.currentModeId != chipModeId;
+                chipInfo.currentModeIdValid && chipInfo.currentModeId != chipMode.id;
 
         // short-circuit: can't change chip-mode if an existing interface on this chip has a higher
         // priority than the requested interface
         if (isChipModeChangeProposed) {
-            for (int existingCreateType : CREATE_TYPES_BY_PRIORITY) {
-                WifiIfaceInfo[] createTypeIfaces = chipInfo.ifaces[existingCreateType];
-                if (selectInterfacesToDelete(createTypeIfaces.length, requestedCreateType,
-                        requestorWs, existingCreateType, createTypeIfaces) == null) {
-                    if (VDBG) {
-                        Log.d(TAG, "Couldn't delete existing create type "
-                                + existingCreateType + " interfaces for requested type");
+            for (int type: IFACE_TYPES_BY_PRIORITY) {
+                if (chipInfo.ifaces[type].length != 0) {
+                    if (!allowedToDeleteIfaceTypeForRequestedType(
+                            ifaceType, requestorWs, type, chipInfo.ifaces)) {
+                        if (VDBG) {
+                            Log.d(TAG, "Couldn't delete existing type " + type
+                                    + " interfaces for requested type");
+                        }
+                        return null;
                     }
-                    return null;
                 }
             }
 
             // but if priority allows the mode change then we're good to go
             IfaceCreationData ifaceCreationData = new IfaceCreationData();
             ifaceCreationData.chipInfo = chipInfo;
-            ifaceCreationData.chipModeId = chipModeId;
+            ifaceCreationData.chipModeId = chipMode.id;
 
             return ifaceCreationData;
         }
 
         // possibly supported
         List<WifiIfaceInfo> interfacesToBeRemovedFirst = new ArrayList<>();
-        List<WifiIfaceInfo> interfacesToBeDowngraded = new ArrayList<>();
-        for (int existingCreateType : CREATE_TYPES_BY_PRIORITY) {
-            WifiIfaceInfo[] createTypeIfaces = chipInfo.ifaces[existingCreateType];
-            int numExcessIfaces = createTypeIfaces.length - chipCreateTypeCombo[existingCreateType];
-            // need to count the requested create type as well
-            if (existingCreateType == requestedCreateType) {
-                numExcessIfaces += 1;
+
+        for (int type: IFACE_TYPES_BY_PRIORITY) {
+            int tooManyInterfaces = chipInfo.ifaces[type].length - chipIfaceCombo[type];
+
+            // need to count the requested interface as well
+            if (type == ifaceType) {
+                tooManyInterfaces += 1;
             }
-            if (numExcessIfaces > 0) { // may need to delete some
-                // Try downgrading bridged APs before we consider deleting them.
-                if (existingCreateType == HDM_CREATE_IFACE_AP_BRIDGE) {
-                    int availableSingleApCapacity = chipCreateTypeCombo[HDM_CREATE_IFACE_AP]
-                            - chipInfo.ifaces[HDM_CREATE_IFACE_AP].length;
-                    if (requestedCreateType == HDM_CREATE_IFACE_AP) {
-                        availableSingleApCapacity -= 1;
-                    }
-                    if (availableSingleApCapacity >= numExcessIfaces) {
-                        interfacesToBeDowngraded = selectBridgedApInterfacesToDowngrade(
-                                        numExcessIfaces, createTypeIfaces);
-                        if (interfacesToBeDowngraded != null) {
-                            continue;
-                        }
-                        // Can't downgrade enough bridged APs, fall through to delete them.
-                        if (VDBG) {
-                            Log.d(TAG, "Could not downgrade enough bridged APs for request.");
-                        }
-                    }
-                }
-                List<WifiIfaceInfo> selectedIfacesToDelete =
-                        selectInterfacesToDelete(numExcessIfaces, requestedCreateType, requestorWs,
-                                existingCreateType, createTypeIfaces);
-                if (selectedIfacesToDelete == null) {
+
+            if (tooManyInterfaces > 0) { // may need to delete some
+                if (!allowedToDeleteIfaceTypeForRequestedType(
+                        ifaceType, requestorWs, type, chipInfo.ifaces)) {
                     if (VDBG) {
                         Log.d(TAG, "Would need to delete some higher priority interfaces");
                     }
                     return null;
                 }
-                interfacesToBeRemovedFirst.addAll(selectedIfacesToDelete);
+
+                // delete the most recently created interfaces
+                interfacesToBeRemovedFirst.addAll(selectInterfacesToDelete(tooManyInterfaces,
+                        ifaceType, requestorWs, type, chipInfo.ifaces[type]));
             }
         }
 
         IfaceCreationData ifaceCreationData = new IfaceCreationData();
         ifaceCreationData.chipInfo = chipInfo;
-        ifaceCreationData.chipModeId = chipModeId;
+        ifaceCreationData.chipModeId = chipMode.id;
         ifaceCreationData.interfacesToBeRemovedFirst = interfacesToBeRemovedFirst;
-        ifaceCreationData.interfacesToBeDowngraded = interfacesToBeDowngraded;
 
         return ifaceCreationData;
     }
@@ -2370,8 +1887,7 @@
      * Note: both proposals are 'acceptable' bases on priority criteria.
      *
      * Criteria:
-     * - Proposal is better if it means removing fewer high priority interfaces, or downgrades the
-     *   fewest interfaces.
+     * - Proposal is better if it means removing fewer high priority interfaces
      */
     private boolean compareIfaceCreationData(IfaceCreationData val1, IfaceCreationData val2) {
         if (VDBG) Log.d(TAG, "compareIfaceCreationData: val1=" + val1 + ", val2=" + val2);
@@ -2383,81 +1899,66 @@
             return true;
         }
 
-        int[] val1NumIfacesToBeRemoved = new int[CREATE_TYPES_BY_PRIORITY.length];
-        if (val1.chipInfo.currentModeIdValid
-                && val1.chipInfo.currentModeId != val1.chipModeId) {
-            for (int createType : CREATE_TYPES_BY_PRIORITY) {
-                val1NumIfacesToBeRemoved[createType] = val1.chipInfo.ifaces[createType].length;
+        for (int type: IFACE_TYPES_BY_PRIORITY) {
+            // # of interfaces to be deleted: the list or all interfaces of the type if mode change
+            int numIfacesToDelete1 = 0;
+            if (val1.chipInfo.currentModeIdValid
+                    && val1.chipInfo.currentModeId != val1.chipModeId) {
+                numIfacesToDelete1 = val1.chipInfo.ifaces[type].length;
+            } else {
+                numIfacesToDelete1 = val1.interfacesToBeRemovedFirst.size();
             }
-        } else {
-            for (WifiIfaceInfo ifaceToRemove : val1.interfacesToBeRemovedFirst) {
-                val1NumIfacesToBeRemoved[ifaceToRemove.createType]++;
-            }
-        }
-        int[] val2NumIfacesToBeRemoved = new int[CREATE_TYPES_BY_PRIORITY.length];
-        if (val2.chipInfo.currentModeIdValid
-                && val2.chipInfo.currentModeId != val2.chipModeId) {
-            for (int createType : CREATE_TYPES_BY_PRIORITY) {
-                val2NumIfacesToBeRemoved[createType] = val2.chipInfo.ifaces[createType].length;
-            }
-        } else {
-            for (WifiIfaceInfo ifaceToRemove : val2.interfacesToBeRemovedFirst) {
-                val2NumIfacesToBeRemoved[ifaceToRemove.createType]++;
-            }
-        }
 
-        for (int createType: CREATE_TYPES_BY_PRIORITY) {
-            if (val1NumIfacesToBeRemoved[createType] < val2NumIfacesToBeRemoved[createType]) {
+            int numIfacesToDelete2 = 0;
+            if (val2.chipInfo.currentModeIdValid
+                    && val2.chipInfo.currentModeId != val2.chipModeId) {
+                numIfacesToDelete2 = val2.chipInfo.ifaces[type].length;
+            } else {
+                numIfacesToDelete2 = val2.interfacesToBeRemovedFirst.size();
+            }
+
+            if (numIfacesToDelete1 < numIfacesToDelete2) {
                 if (VDBG) {
-                    Log.d(TAG, "decision based on createType=" + createType + ": "
-                            + val1NumIfacesToBeRemoved[createType]
-                            + " < " + val2NumIfacesToBeRemoved[createType]);
+                    Log.d(TAG, "decision based on type=" + type + ": " + numIfacesToDelete1
+                            + " < " + numIfacesToDelete2);
                 }
                 return true;
             }
         }
 
-        int val1NumIFacesToBeDowngraded = val1.interfacesToBeDowngraded != null
-                ? val1.interfacesToBeDowngraded.size() : 0;
-        int val2NumIFacesToBeDowngraded = val2.interfacesToBeDowngraded != null
-                ? val2.interfacesToBeDowngraded.size() : 0;
-        if (val1NumIFacesToBeDowngraded != val2NumIFacesToBeDowngraded) {
-            return val1NumIFacesToBeDowngraded < val2NumIFacesToBeDowngraded;
-        }
-
         // arbitrary - flip a coin
         if (VDBG) Log.d(TAG, "proposals identical - flip a coin");
         return false;
     }
 
-    private static final int PRIORITY_INTERNAL = 0;
-    private static final int PRIORITY_BG = 1;
-    private static final int PRIORITY_FG_SERVICE = 2;
-    private static final int PRIORITY_FG_APP = 3;
-    private static final int PRIORITY_SYSTEM = 4;
-    private static final int PRIORITY_PRIVILEGED = 5;
+    private static final int PRIORITY_PRIVILEGED = 0;
+    private static final int PRIORITY_SYSTEM = 1;
+    private static final int PRIORITY_FG_APP = 2;
+    private static final int PRIORITY_FG_SERVICE = 3;
+    private static final int PRIORITY_BG = 4;
+    private static final int PRIORITY_INTERNAL = 5;
     // Keep these in sync with any additions/deletions to above buckets.
-    private static final int PRIORITY_MIN = PRIORITY_INTERNAL;
-    private static final int PRIORITY_MAX = PRIORITY_PRIVILEGED;
+    private static final int PRIORITY_MIN = PRIORITY_PRIVILEGED;
+    private static final int PRIORITY_MAX = PRIORITY_INTERNAL;
     @IntDef(prefix = { "PRIORITY_" }, value = {
-            PRIORITY_INTERNAL,
-            PRIORITY_BG,
-            PRIORITY_FG_SERVICE,
-            PRIORITY_FG_APP,
-            PRIORITY_SYSTEM,
             PRIORITY_PRIVILEGED,
+            PRIORITY_SYSTEM,
+            PRIORITY_FG_APP,
+            PRIORITY_FG_SERVICE,
+            PRIORITY_BG,
+            PRIORITY_INTERNAL,
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface RequestorWsPriority {}
 
     /**
      * Returns integer priority level for the provided |ws| based on rules mentioned in
-     * {@link #selectInterfacesToDelete(int, int, WorkSource, int, WifiIfaceInfo[])}.
+     * {@link #allowedToDeleteIfaceTypeForRequestedType(int, WorkSource, int, WifiIfaceInfo[][])}.
      */
     private static @RequestorWsPriority int getRequestorWsPriority(WorkSourceHelper ws) {
         if (ws.hasAnyPrivilegedAppRequest()) return PRIORITY_PRIVILEGED;
         if (ws.hasAnySystemAppRequest()) return PRIORITY_SYSTEM;
-        if (ws.hasAnyForegroundAppRequest(/* allowOverlayBypass */ true)) return PRIORITY_FG_APP;
+        if (ws.hasAnyForegroundAppRequest()) return PRIORITY_FG_APP;
         if (ws.hasAnyForegroundServiceRequest()) return PRIORITY_FG_SERVICE;
         if (ws.hasAnyInternalRequest()) return PRIORITY_INTERNAL;
         return PRIORITY_BG;
@@ -2468,40 +1969,31 @@
      * interface request from |existingRequestorWsPriority|.
      *
      * Rule:
-     *  - If |newRequestorWsPriority| > |existingRequestorWsPriority|, then YES.
+     *  - If |newRequestorWsPriority| < |existingRequestorWsPriority|, then YES.
      *  - If they are at the same priority level, then
      *      - If both are privileged and not for the same interface type, then YES.
      *      - Else, NO.
      */
     private static boolean allowedToDelete(
-            @HdmIfaceTypeForCreation int requestedCreateType,
-            @RequestorWsPriority int newRequestorWsPriority,
-            @HdmIfaceTypeForCreation int existingCreateType,
-            @RequestorWsPriority int existingRequestorWsPriority) {
+            int requestedIfaceType, @RequestorWsPriority int newRequestorWsPriority,
+            int existingIfaceType, @RequestorWsPriority int existingRequestorWsPriority) {
         if (!SdkLevel.isAtLeastS()) {
-            return allowedToDeleteForR(requestedCreateType, existingCreateType);
+            return allowedToDeleteForR(requestedIfaceType, existingIfaceType);
         }
         // If the new request is higher priority than existing priority, then the new requestor
         // wins. This is because at all other priority levels (except privileged), existing caller
         // wins if both the requests are at the same priority level.
-        if (newRequestorWsPriority > existingRequestorWsPriority) {
+        if (newRequestorWsPriority < existingRequestorWsPriority) {
             return true;
         }
         if (newRequestorWsPriority == existingRequestorWsPriority) {
             // If both the requests are same priority for the same iface type, the existing
             // requestor wins.
-            if (requestedCreateType == existingCreateType) {
+            if (requestedIfaceType == existingIfaceType) {
                 return false;
             }
-            // If both the requests are privileged, the new requestor wins. The exception is for
-            // backwards compatibility with P2P Settings, prefer SoftAP over P2P for when the user
-            // enables SoftAP with P2P Settings open.
+            // If both the requests are privileged, the new requestor wins.
             if (newRequestorWsPriority == PRIORITY_PRIVILEGED) {
-                if (requestedCreateType == HDM_CREATE_IFACE_P2P
-                        && (existingCreateType == HDM_CREATE_IFACE_AP
-                        || existingCreateType == HDM_CREATE_IFACE_AP_BRIDGE)) {
-                    return false;
-                }
                 return true;
             }
         }
@@ -2522,34 +2014,31 @@
      * 3. Request for P2P will destroy NAN-only
      * 4. Request for NAN will destroy P2P-only
      */
-    private static boolean allowedToDeleteForR(
-            @HdmIfaceTypeForCreation int requestedCreateType,
-            @HdmIfaceTypeForCreation int existingCreateType) {
+    private static boolean allowedToDeleteForR(int requestedIfaceType, int existingIfaceType) {
         // rule 1
-        if (existingCreateType == requestedCreateType) {
+        if (existingIfaceType == requestedIfaceType) {
             return false;
         }
 
         // rule 2
-        if (requestedCreateType == HDM_CREATE_IFACE_P2P) {
-            return existingCreateType == HDM_CREATE_IFACE_NAN;
+        if (requestedIfaceType == IfaceType.P2P) {
+            return existingIfaceType == IfaceType.NAN;
         }
 
         // rule 3
-        if (requestedCreateType == HDM_CREATE_IFACE_NAN) {
-            return existingCreateType == HDM_CREATE_IFACE_P2P;
+        if (requestedIfaceType == IfaceType.NAN) {
+            return existingIfaceType == IfaceType.P2P;
         }
 
-        // rule 4, the requestedCreateType is either AP/AP_BRIDGED or STA
+        // rule 4, the requestIfaceType is either AP or STA
         return true;
     }
 
     /**
-     * Selects the interfaces of a given type and quantity to delete for a requested interface.
-     * If the specified quantity of interfaces cannot be deleted, returns null.
+     * Returns true if we're allowed to delete the existing interface type for the requested
+     * interface type.
      *
-     * Only interfaces with lower priority than the requestor will be selected, in ascending order
-     * of priority. Priority is determined by the following rules:
+     * General rules:
      * 1. Requests for interfaces have the following priority which are based on corresponding
      * requesting  app's context. Priorities in decreasing order (i.e (i) has the highest priority,
      * (v) has the lowest priority).
@@ -2571,32 +2060,70 @@
      * existing requests.
      * For ex: User turns on wifi, then hotspot on legacy devices which do not support STA + AP, we
      * want the last request from the user (i.e hotspot) to be honored.
-     *
-     * @param requestedQuantity Number of interfaces which need to be selected.
-     * @param requestedCreateType Requested iface type.
-     * @param requestorWs Requestor worksource.
-     * @param existingCreateType Existing iface type.
-     * @param existingInterfaces Array of interfaces to be selected from in order of creation.
      */
-    private List<WifiIfaceInfo> selectInterfacesToDelete(int requestedQuantity,
-            @HdmIfaceTypeForCreation int requestedCreateType, @NonNull WorkSource requestorWs,
-            @HdmIfaceTypeForCreation int existingCreateType,
-            @NonNull WifiIfaceInfo[] existingInterfaces) {
+    private boolean allowedToDeleteIfaceTypeForRequestedType(
+            int requestedIfaceType, WorkSource requestorWs, int existingIfaceType,
+            WifiIfaceInfo[][] existingIfaces) {
+        WorkSourceHelper newRequestorWsHelper = mWifiInjector.makeWsHelper(requestorWs);
+        WifiIfaceInfo[] ifaceInfosForExistingIfaceType = existingIfaces[existingIfaceType];
+        // No ifaces of the existing type, error!
+        if (ifaceInfosForExistingIfaceType.length == 0) {
+            Log.wtf(TAG, "allowedToDeleteIfaceTypeForRequestedType: Num existings ifaces is 0!");
+            return false;
+        }
+        for (WifiIfaceInfo ifaceInfo : ifaceInfosForExistingIfaceType) {
+            int newRequestorWsPriority = getRequestorWsPriority(newRequestorWsHelper);
+            int existingRequestorWsPriority = getRequestorWsPriority(ifaceInfo.requestorWsHelper);
+            if (allowedToDelete(
+                    requestedIfaceType, newRequestorWsPriority, existingIfaceType,
+                    existingRequestorWsPriority)) {
+                if (mDbg) {
+                    Log.d(TAG, "allowedToDeleteIfaceTypeForRequestedType: Allowed to delete "
+                            + "requestedIfaceType=" + requestedIfaceType
+                            + "existingIfaceType=" + existingIfaceType
+                            + ", newRequestorWsPriority=" + newRequestorWsHelper
+                            + ", existingRequestorWsPriority" + existingRequestorWsPriority);
+                }
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Selects the interfaces to delete.
+     *
+     * Rule:
+     *  - Select interfaces that are lower priority than the request priority.
+     *  - If they are at the same priority level, then
+     *      - If both are privileged and different iface type, then delete existing interfaces.
+     *      - Else, not allowed to delete.
+     *  - Delete ifaces based on the descending requestor priority
+     *    (i.e bg app requests are deleted first, privileged app requests are deleted last)
+     *  - If there are > 1 ifaces within the same priority group to delete, select them randomly.
+     *
+     * @param excessInterfaces Number of interfaces which need to be selected.
+     * @param requestedIfaceType Requested iface type.
+     * @param requestorWs Requestor worksource.
+     * @param existingIfaceType Existing iface type.
+     * @param interfaces Array of interfaces.
+     */
+    private List<WifiIfaceInfo> selectInterfacesToDelete(int excessInterfaces,
+            int requestedIfaceType, WorkSource requestorWs, int existingIfaceType,
+            WifiIfaceInfo[] interfaces) {
         if (VDBG) {
-            Log.d(TAG, "selectInterfacesToDelete: requestedQuantity=" + requestedQuantity
-                    + ", requestedCreateType=" + requestedCreateType
+            Log.d(TAG, "selectInterfacesToDelete: excessInterfaces=" + excessInterfaces
+                    + ", requestedIfaceType=" + requestedIfaceType
                     + ", requestorWs=" + requestorWs
-                    + ", existingCreateType=" + existingCreateType
-                    + ", existingInterfaces=" + Arrays.toString(existingInterfaces));
+                    + ", existingIfaceType=" + existingIfaceType
+                    + ", interfaces=" + Arrays.toString(interfaces));
         }
         WorkSourceHelper newRequestorWsHelper = mWifiInjector.makeWsHelper(requestorWs);
 
         boolean lookupError = false;
         // Map of priority levels to ifaces to delete.
         Map<Integer, List<WifiIfaceInfo>> ifacesToDeleteMap = new HashMap<>();
-        // Reverse order to make sure later created interfaces deleted firstly
-        for (int i = existingInterfaces.length - 1; i >= 0; i--) {
-            WifiIfaceInfo info = existingInterfaces[i];
+        for (WifiIfaceInfo info : interfaces) {
             InterfaceCacheEntry cacheEntry;
             synchronized (mLock) {
                 cacheEntry = mInterfaceInfoCache.get(Pair.create(info.name, getType(info.iface)));
@@ -2609,100 +2136,49 @@
             }
             int newRequestorWsPriority = getRequestorWsPriority(newRequestorWsHelper);
             int existingRequestorWsPriority = getRequestorWsPriority(cacheEntry.requestorWsHelper);
-            boolean isAllowedToDelete = allowedToDelete(requestedCreateType, newRequestorWsPriority,
-                    existingCreateType, existingRequestorWsPriority);
-            if (VDBG) {
-                Log.d(TAG, "info=" + info + ":  allowedToDelete=" + isAllowedToDelete
-                        + " (requestedCreateType=" + requestedCreateType
-                        + ", newRequestorWsPriority=" + newRequestorWsPriority
-                        + ", existingCreateType=" + existingCreateType
-                        + ", existingRequestorWsPriority=" + existingRequestorWsPriority + ")");
-            }
-            if (isAllowedToDelete) {
+            if (allowedToDelete(requestedIfaceType, newRequestorWsPriority, existingIfaceType,
+                    existingRequestorWsPriority)) {
                 ifacesToDeleteMap.computeIfAbsent(
                         existingRequestorWsPriority, v -> new ArrayList<>()).add(info);
             }
         }
 
-        List<WifiIfaceInfo> ifacesToDelete;
         if (lookupError) {
             Log.e(TAG, "selectInterfacesToDelete: falling back to arbitrary selection");
-            ifacesToDelete = Arrays.asList(Arrays.copyOf(existingInterfaces, requestedQuantity));
+            return Arrays.asList(Arrays.copyOf(interfaces, excessInterfaces));
         } else {
             int numIfacesToDelete = 0;
-            ifacesToDelete = new ArrayList<>(requestedQuantity);
+            List<WifiIfaceInfo> ifacesToDelete = new ArrayList<>(excessInterfaces);
             // Iterate from lowest priority to highest priority ifaces.
-            for (int i = PRIORITY_MIN; i <= PRIORITY_MAX; i++) {
+            for (int i = PRIORITY_MAX; i >= PRIORITY_MIN; i--) {
                 List<WifiIfaceInfo> ifacesToDeleteListWithinPriority =
                         ifacesToDeleteMap.getOrDefault(i, new ArrayList<>());
                 int numIfacesToDeleteWithinPriority =
-                        Math.min(requestedQuantity - numIfacesToDelete,
+                        Math.min(excessInterfaces - numIfacesToDelete,
                                 ifacesToDeleteListWithinPriority.size());
                 ifacesToDelete.addAll(
                         ifacesToDeleteListWithinPriority.subList(
                                 0, numIfacesToDeleteWithinPriority));
                 numIfacesToDelete += numIfacesToDeleteWithinPriority;
-                if (numIfacesToDelete == requestedQuantity) {
+                if (numIfacesToDelete == excessInterfaces) {
                     break;
                 }
             }
+            return ifacesToDelete;
         }
-        if (ifacesToDelete.size() < requestedQuantity) {
-            return null;
-        }
-        return ifacesToDelete;
     }
 
     /**
-     * Selects the requested quantity of bridged AP ifaces available for downgrade in order of
-     * creation, or returns null if the requested quantity cannot be satisfied.
-     *
-     * @param requestedQuantity Number of interfaces which need to be selected
-     * @param bridgedApIfaces Array of bridged AP interfaces in order of creation
+     * Checks whether the input chip-iface-combo can support the requested interface type.
      */
-    private List<WifiIfaceInfo> selectBridgedApInterfacesToDowngrade(int requestedQuantity,
-            WifiIfaceInfo[] bridgedApIfaces) {
-        List<WifiIfaceInfo> ifacesToDowngrade = new ArrayList<>();
-        for (WifiIfaceInfo ifaceInfo : bridgedApIfaces) {
-            SoftApManager softApManager = mSoftApManagers.get(ifaceInfo.iface);
-            if (softApManager == null) {
-                Log.e(TAG, "selectBridgedApInterfacesToDowngrade: Could not find SoftApManager for"
-                        + " iface: " + ifaceInfo.iface);
-                continue;
-            }
-            String instanceForRemoval =
-                    softApManager.getBridgedApDowngradeIfaceInstanceForRemoval();
-            if (instanceForRemoval == null) {
-                continue;
-            }
-            ifacesToDowngrade.add(ifaceInfo);
-            if (ifacesToDowngrade.size() >= requestedQuantity) {
-                break;
-            }
-        }
-        if (ifacesToDowngrade.size() < requestedQuantity) {
-            return null;
-        }
+    private boolean canIfaceComboSupportRequestedIfaceCombo(
+            int[] chipIfaceCombo, int[] requestedIfaceCombo) {
         if (VDBG) {
-            Log.i(TAG, "selectBridgedApInterfacesToDowngrade: ifaces to downgrade "
-                    + ifacesToDowngrade);
+            Log.d(TAG, "canIfaceComboSupportRequest: chipIfaceCombo=" + chipIfaceCombo
+                    + ", requestedIfaceCombo=" + requestedIfaceCombo);
         }
-        return ifacesToDowngrade;
-    }
-
-    /**
-     * Checks whether the expanded @HdmIfaceTypeForCreation combo can support the requested combo.
-     */
-    private boolean canCreateTypeComboSupportRequestedCreateTypeCombo(
-            int[] chipCombo, int[] requestedCombo) {
-        if (VDBG) {
-            Log.d(TAG, "canCreateTypeComboSupportRequestedCreateTypeCombo: "
-                    + "chipCombo=" + Arrays.toString(chipCombo)
-                    + ", requestedCombo=" + Arrays.toString(requestedCombo));
-        }
-        for (int createType : CREATE_TYPES_BY_PRIORITY) {
-            if (chipCombo[createType]
-                    < requestedCombo[createType]) {
+        for (int ifaceType : IFACE_TYPES_BY_PRIORITY) {
+            if (chipIfaceCombo[ifaceType] < requestedIfaceCombo[ifaceType]) {
                 if (VDBG) Log.d(TAG, "Requested type not supported by combo");
                 return false;
             }
@@ -2710,6 +2186,38 @@
         return true;
     }
 
+    // Is it possible to create iface combo just looking at the device capabilities.
+    private boolean isItPossibleToCreateIfaceCombo(WifiChipInfo[] chipInfos,
+            long requiredChipCapabilities, int[] ifaceCombo) {
+        if (VDBG) {
+            Log.d(TAG, "isItPossibleToCreateIfaceCombo: chipInfos=" + Arrays.deepToString(chipInfos)
+                    + ", ifaceType=" + ifaceCombo
+                    + ", requiredChipCapabilities=" + requiredChipCapabilities);
+        }
+
+        for (WifiChipInfo chipInfo: chipInfos) {
+            if (!isChipCapabilitiesSupported(chipInfo, requiredChipCapabilities)) continue;
+            for (IWifiChip.ChipMode chipMode: chipInfo.availableModes) {
+                for (IWifiChip.ChipIfaceCombination chipIfaceCombo
+                        : chipMode.availableCombinations) {
+                    int[][] expandedIfaceCombos = expandIfaceCombos(chipIfaceCombo);
+                    if (VDBG) {
+                        Log.d(TAG, chipIfaceCombo + " expands to "
+                                + Arrays.deepToString(expandedIfaceCombos));
+                    }
+
+                    for (int[] expandedIfaceCombo: expandedIfaceCombos) {
+                        if (canIfaceComboSupportRequestedIfaceCombo(
+                                expandedIfaceCombo, ifaceCombo)) {
+                            return true;
+                        }
+                    }
+                }
+            }
+        }
+        return false;
+    }
+
     /**
      * Performs chip reconfiguration per the input:
      * - Removes the specified interfaces
@@ -2737,8 +2245,8 @@
                     // TODO: is this necessary? note that even if we don't want to explicitly
                     // remove the interfaces we do need to call the onDeleted callbacks - which
                     // this does
-                    for (WifiIfaceInfo[] ifaceInfos : ifaceCreationData.chipInfo.ifaces) {
-                        for (WifiIfaceInfo ifaceInfo : ifaceInfos) {
+                    for (WifiIfaceInfo[] ifaceInfos: ifaceCreationData.chipInfo.ifaces) {
+                        for (WifiIfaceInfo ifaceInfo: ifaceInfos) {
                             removeIfaceInternal(ifaceInfo.iface,
                                     /* validateRttController */false); // ignore return value
                         }
@@ -2753,20 +2261,10 @@
                     }
                 } else {
                     // remove all interfaces on the delete list
-                    for (WifiIfaceInfo ifaceInfo : ifaceCreationData.interfacesToBeRemovedFirst) {
+                    for (WifiIfaceInfo ifaceInfo: ifaceCreationData.interfacesToBeRemovedFirst) {
                         removeIfaceInternal(ifaceInfo.iface,
                                 /* validateRttController */false); // ignore return value
                     }
-                    // downgrade all interfaces on the downgrade list
-                    for (WifiIfaceInfo ifaceInfo : ifaceCreationData.interfacesToBeDowngraded) {
-                        if (ifaceInfo.createType == HDM_CREATE_IFACE_AP_BRIDGE) {
-                            if (!downgradeBridgedApIface(ifaceInfo)) {
-                                Log.e(TAG, "executeChipReconfiguration: failed to downgrade bridged"
-                                        + " AP: " + ifaceInfo);
-                                return null;
-                            }
-                        }
-                    }
                 }
 
                 // create new interface
@@ -2792,7 +2290,7 @@
                                     });
                         } else {
                             Log.e(TAG, "Hal doesn't support to create AP bridge mode");
-                            return null;
+                            statusResp.value.code = WifiStatusCode.ERROR_NOT_SUPPORTED;
                         }
                         break;
                     case HDM_CREATE_IFACE_AP:
@@ -2968,37 +2466,6 @@
         }
     }
 
-    private boolean downgradeBridgedApIface(WifiIfaceInfo bridgedApIfaceInfo) {
-        SoftApManager bridgedSoftApManager = mSoftApManagers.get(bridgedApIfaceInfo.iface);
-        if (bridgedSoftApManager == null) {
-            Log.e(TAG, "Could not find SoftApManager for bridged AP iface "
-                    + bridgedApIfaceInfo.iface);
-            return false;
-        }
-        String name = getName(bridgedApIfaceInfo.iface);
-        if (name == null) {
-            return false;
-        }
-        IWifiChip chip = getChip(bridgedApIfaceInfo.iface);
-        if (chip == null) {
-            return false;
-        }
-        android.hardware.wifi.V1_5.IWifiChip chip15 = getWifiChipForV1_5Mockable(chip);
-        if (chip15 == null) {
-            return false;
-        }
-        String instanceForRemoval =
-                bridgedSoftApManager.getBridgedApDowngradeIfaceInstanceForRemoval();
-        try {
-            chip15.removeIfaceInstanceFromBridgedApIface(name, instanceForRemoval);
-        } catch (RemoteException e) {
-            Log.e(TAG,
-                    "IWifiChip.removeIfaceInstanceFromBridgedApIface exception: " + e);
-            return false;
-        }
-        return true;
-    }
-
     private abstract class ListenerProxy<LISTENER>  {
         protected LISTENER mListener;
         private Handler mHandler;
@@ -3210,23 +2677,9 @@
 
                 Mutable<IWifiRttController> rttResp = new Mutable<>();
                 try {
-                    android.hardware.wifi.V1_6.IWifiChip chip16 =
-                            android.hardware.wifi.V1_6.IWifiChip.castFrom(chipInfo.chip);
                     android.hardware.wifi.V1_4.IWifiChip chip14 =
                             android.hardware.wifi.V1_4.IWifiChip.castFrom(chipInfo.chip);
-
-                    if (chip16 != null) {
-                        chip16.createRttController_1_6(null,
-                                (WifiStatus status,
-                                 android.hardware.wifi.V1_6.IWifiRttController rtt) -> {
-                                    if (status.code == WifiStatusCode.SUCCESS) {
-                                        rttResp.value = rtt;
-                                    } else {
-                                        Log.e(TAG, "IWifiChip.createRttController_1_6 failed: "
-                                                + statusString(status));
-                                    }
-                                });
-                    } else if (chip14 != null) {
+                    if (chip14 != null) {
                         chip14.createRttController_1_4(null,
                                 (WifiStatus status,
                                  android.hardware.wifi.V1_4.IWifiRttController rtt) -> {
@@ -3305,25 +2758,6 @@
         return false;
     }
 
-    private static SparseBooleanArray convertRadioCombinationMatrixToLookupTable(
-            WifiRadioCombinationMatrix matrix) {
-        SparseBooleanArray lookupTable = new SparseBooleanArray();
-        if (null == matrix) return lookupTable;
-
-        for (WifiRadioCombination combination: matrix.radioCombinations) {
-            int bandMask = 0;
-            for (WifiRadioConfiguration config: combination.radioConfigurations) {
-                bandMask |= 1 << config.bandInfo;
-            }
-            if ((bandMask & DBS_24G_5G_MASK) == DBS_24G_5G_MASK) {
-                lookupTable.put(DBS_24G_5G_MASK, true);
-            } else if ((bandMask & DBS_5G_6G_MASK) == DBS_5G_6G_MASK) {
-                lookupTable.put(DBS_5G_6G_MASK, true);
-            }
-        }
-        return lookupTable;
-    }
-
     /**
      * Get the chip capabilities
      *
@@ -3358,46 +2792,6 @@
     }
 
     /**
-     * Get the supported radio combination matrix.
-     *
-     * This is called after creating an interface and need at least v1.6 HAL.
-     *
-     * @param wifiChip WifiChip
-     * @return Wifi radio combinmation matrix
-     */
-    private WifiRadioCombinationMatrix getChipSupportedRadioCombinationsMatrix(
-            @NonNull IWifiChip wifiChip) {
-        synchronized (mLock) {
-            if (null == wifiChip) return null;
-            android.hardware.wifi.V1_6.IWifiChip chipV16 =
-                    getWifiChipForV1_6Mockable(wifiChip);
-            if (null == chipV16) return null;
-
-            Mutable<WifiRadioCombinationMatrix> radioCombinationMatrixResp =
-                    new Mutable<>();
-            radioCombinationMatrixResp.value = null;
-            try {
-                chipV16.getSupportedRadioCombinationsMatrix((WifiStatus status,
-                            WifiRadioCombinationMatrix matrix) -> {
-                    if (status.code == WifiStatusCode.SUCCESS) {
-                        radioCombinationMatrixResp.value = matrix;
-                        if (mDbg) {
-                            Log.d(TAG, "radioCombinationMatrix=" + matrix);
-                        }
-                    } else {
-                        Log.e(TAG, "getSupportedRadioCombinationsMatrix failed: "
-                                + statusString(status));
-                    }
-                });
-            } catch (RemoteException e) {
-                Log.e(TAG, "Exception on getSupportedRadioCombinationsMatrix: " + e);
-                radioCombinationMatrixResp.value = null;
-            }
-            return radioCombinationMatrixResp.value;
-        }
-    }
-
-    /**
      * Dump the internal state of the class.
      */
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
diff --git a/service/java/com/android/server/wifi/HalDeviceManagerUtil.java b/service/java/com/android/server/wifi/HalDeviceManagerUtil.java
deleted file mode 100644
index 08a4727..0000000
--- a/service/java/com/android/server/wifi/HalDeviceManagerUtil.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import android.annotation.NonNull;
-import android.hardware.wifi.V1_6.IWifiChip;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.ArrayList;
-
-/**
- * Utility methods for HalDeviceManager.
- */
-public class HalDeviceManagerUtil {
-    static class StaticChipInfo {
-        private int mChipId;
-        private long mChipCapabilities;
-        private @NonNull ArrayList<android.hardware.wifi.V1_6.IWifiChip.ChipMode> mAvailableModes =
-                new ArrayList<>();
-
-        StaticChipInfo(
-                int chipId,
-                long chipCapabilities,
-                @NonNull ArrayList<android.hardware.wifi.V1_6.IWifiChip.ChipMode> availableModes) {
-            mChipId = chipId;
-            mChipCapabilities = chipCapabilities;
-            if (availableModes != null) {
-                mAvailableModes = availableModes;
-            }
-        }
-
-        int getChipId() {
-            return mChipId;
-        }
-
-        long getChipCapabilities() {
-            return mChipCapabilities;
-        }
-
-        ArrayList<android.hardware.wifi.V1_6.IWifiChip.ChipMode> getAvailableModes() {
-            return mAvailableModes;
-        }
-    }
-
-    private static final String KEY_CHIP_ID = "chipId";
-    private static final String KEY_CHIP_CAPABILITIES = "chipCapabilities";
-    private static final String KEY_AVAILABLE_MODES = "availableModes";
-
-    static JSONObject staticChipInfoToJson(@NonNull StaticChipInfo staticChipInfo)
-            throws JSONException {
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.put(KEY_CHIP_ID, staticChipInfo.getChipId());
-        jsonObject.put(KEY_CHIP_CAPABILITIES, staticChipInfo.getChipCapabilities());
-        JSONArray availableModesJson = new JSONArray();
-        for (android.hardware.wifi.V1_6.IWifiChip.ChipMode mode
-                : staticChipInfo.getAvailableModes()) {
-            availableModesJson.put(chipModeToJson(mode));
-        }
-        jsonObject.put(KEY_AVAILABLE_MODES, availableModesJson);
-        return jsonObject;
-    }
-
-    static StaticChipInfo jsonToStaticChipInfo(JSONObject jsonObject) throws JSONException {
-        ArrayList<IWifiChip.ChipMode> availableModes =
-                new ArrayList<>();
-        int chipId = jsonObject.getInt(KEY_CHIP_ID);
-        long chipCapabilities = jsonObject.getLong(KEY_CHIP_CAPABILITIES);
-        JSONArray modesJson = jsonObject.getJSONArray(KEY_AVAILABLE_MODES);
-        for (int i = 0; i < modesJson.length(); i++) {
-            availableModes.add(jsonToChipMode(modesJson.getJSONObject(i)));
-        }
-        return new StaticChipInfo(chipId, chipCapabilities, availableModes);
-    }
-
-    private static final String KEY_ID = "id";
-    private static final String KEY_AVAILABLE_COMBINATIONS = "availableCombinations";
-
-    private static JSONObject chipModeToJson(android.hardware.wifi.V1_6.IWifiChip.ChipMode chipMode)
-            throws JSONException {
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.put(KEY_ID, chipMode.id);
-        JSONArray availableCombinationsJson = new JSONArray();
-        for (IWifiChip.ChipConcurrencyCombination combo
-                : chipMode.availableCombinations) {
-            availableCombinationsJson.put(chipConcurrencyCombinationToJson(combo));
-        }
-        jsonObject.put(KEY_AVAILABLE_COMBINATIONS, availableCombinationsJson);
-        return jsonObject;
-    }
-
-    private static android.hardware.wifi.V1_6.IWifiChip.ChipMode jsonToChipMode(
-            JSONObject jsonObject) throws JSONException  {
-        android.hardware.wifi.V1_6.IWifiChip.ChipMode chipMode =
-                new android.hardware.wifi.V1_6.IWifiChip.ChipMode();
-        chipMode.id = jsonObject.getInt(KEY_ID);
-        JSONArray availableCombinationsJson =
-                jsonObject.getJSONArray(KEY_AVAILABLE_COMBINATIONS);
-        for (int i = 0; i < availableCombinationsJson.length(); i++) {
-            chipMode.availableCombinations.add(jsonToChipConcurrencyCombination(
-                    availableCombinationsJson.getJSONObject(i)));
-        }
-        return chipMode;
-    }
-
-    private static final String KEY_CONCURRENCY_LIMITS = "limits";
-
-    private static JSONObject chipConcurrencyCombinationToJson(
-            IWifiChip.ChipConcurrencyCombination combo) throws JSONException {
-        JSONObject jsonObject = new JSONObject();
-        JSONArray limitsJson = new JSONArray();
-        for (IWifiChip.ChipConcurrencyCombinationLimit limit : combo.limits) {
-            limitsJson.put(chipConcurrencyCombinationLimitToJson(limit));
-        }
-        jsonObject.put(KEY_CONCURRENCY_LIMITS, limitsJson);
-        return jsonObject;
-    }
-
-    private static IWifiChip.ChipConcurrencyCombination jsonToChipConcurrencyCombination(
-            JSONObject jsonObject) throws JSONException {
-        IWifiChip.ChipConcurrencyCombination combo = new IWifiChip.ChipConcurrencyCombination();
-        combo.limits = new ArrayList<>();
-        JSONArray limitsJson = jsonObject.getJSONArray(KEY_CONCURRENCY_LIMITS);
-        for (int i = 0; i < limitsJson.length(); i++) {
-            combo.limits.add(
-                    jsonToChipConcurrencyCombinationLimit(limitsJson.getJSONObject(i)));
-        }
-        return combo;
-    }
-
-    private static final String KEY_MAX_IFACES = "maxIfaces";
-    private static final String KEY_TYPES = "types";
-
-    private static JSONObject chipConcurrencyCombinationLimitToJson(
-            IWifiChip.ChipConcurrencyCombinationLimit limit) throws JSONException {
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.put(KEY_MAX_IFACES, limit.maxIfaces);
-        jsonObject.put(KEY_TYPES, new JSONArray(limit.types));
-        return jsonObject;
-    }
-
-    private static IWifiChip.ChipConcurrencyCombinationLimit jsonToChipConcurrencyCombinationLimit(
-            JSONObject jsonObject) throws JSONException {
-        IWifiChip.ChipConcurrencyCombinationLimit
-                limit = new IWifiChip.ChipConcurrencyCombinationLimit();
-        limit.maxIfaces = jsonObject.getInt(KEY_MAX_IFACES);
-        limit.types = new ArrayList<>();
-        JSONArray limitsJson = jsonObject.getJSONArray(KEY_TYPES);
-        for (int i = 0; i < limitsJson.length(); i++) {
-            limit.types.add(limitsJson.getInt(i));
-        }
-        return limit;
-    }
-}
-
diff --git a/service/java/com/android/server/wifi/HostapdHal.java b/service/java/com/android/server/wifi/HostapdHal.java
index ab671e2..2c97b77 100644
--- a/service/java/com/android/server/wifi/HostapdHal.java
+++ b/service/java/com/android/server/wifi/HostapdHal.java
@@ -17,19 +17,42 @@
 
 import android.annotation.NonNull;
 import android.content.Context;
+import android.hardware.wifi.hostapd.V1_0.HostapdStatus;
+import android.hardware.wifi.hostapd.V1_0.HostapdStatusCode;
+import android.hardware.wifi.hostapd.V1_0.IHostapd;
+import android.hardware.wifi.hostapd.V1_2.DebugLevel;
+import android.hardware.wifi.hostapd.V1_2.Ieee80211ReasonCode;
+import android.hardware.wifi.hostapd.V1_3.Bandwidth;
+import android.hardware.wifi.hostapd.V1_3.Generation;
+import android.hidl.manager.V1_0.IServiceManager;
+import android.hidl.manager.V1_0.IServiceNotification;
 import android.net.MacAddress;
+import android.net.wifi.ScanResult;
 import android.net.wifi.SoftApConfiguration;
+import android.net.wifi.SoftApConfiguration.BandType;
+import android.net.wifi.SoftApInfo;
 import android.net.wifi.WifiManager;
-import android.net.wifi.util.Environment;
-import android.os.Build;
 import android.os.Handler;
+import android.os.IHwBinder.DeathRecipient;
+import android.os.RemoteException;
+import android.text.TextUtils;
 import android.util.Log;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.WifiNative.HostapdDeathEventHandler;
-import com.android.server.wifi.WifiNative.SoftApHalCallback;
+import com.android.server.wifi.WifiNative.SoftApListener;
+import com.android.server.wifi.util.ApConfigUtil;
+import com.android.server.wifi.util.NativeUtil;
+import com.android.wifi.resources.R;
 
-import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 import javax.annotation.concurrent.ThreadSafe;
 
@@ -40,19 +63,73 @@
 @ThreadSafe
 public class HostapdHal {
     private static final String TAG = "HostapdHal";
+    @VisibleForTesting
+    public static final String HAL_INSTANCE_NAME = "default";
+    @VisibleForTesting
+    public static final long WAIT_FOR_DEATH_TIMEOUT_MS = 50L;
 
     private final Object mLock = new Object();
     private boolean mVerboseLoggingEnabled = false;
-    private boolean mVerboseHalLoggingEnabled = false;
     private final Context mContext;
     private final Handler mEventHandler;
 
-    // Hostapd HAL interface object - might be implemented by HIDL or AIDL
-    private IHostapdHal mIHostapd;
+    // Hostapd HAL interface objects
+    private IServiceManager mIServiceManager = null;
+    private IHostapd mIHostapd;
+    private HashMap<String, Runnable> mSoftApFailureListeners = new HashMap<>();
+    private SoftApListener mSoftApEventListener;
+    private HostapdDeathEventHandler mDeathEventHandler;
+    private ServiceManagerDeathRecipient mServiceManagerDeathRecipient;
+    private HostapdDeathRecipient mHostapdDeathRecipient;
+    // Death recipient cookie registered for current supplicant instance.
+    private long mDeathRecipientCookie = 0;
+
+    private final IServiceNotification mServiceNotificationCallback =
+            new IServiceNotification.Stub() {
+        public void onRegistration(String fqName, String name, boolean preexisting) {
+            synchronized (mLock) {
+                if (mVerboseLoggingEnabled) {
+                    Log.i(TAG, "IServiceNotification.onRegistration for: " + fqName
+                            + ", " + name + " preexisting=" + preexisting);
+                }
+                if (!initHostapdService()) {
+                    Log.e(TAG, "initalizing IHostapd failed.");
+                    hostapdServiceDiedHandler(mDeathRecipientCookie);
+                } else {
+                    Log.i(TAG, "Completed initialization of IHostapd.");
+                }
+            }
+        }
+    };
+    private class ServiceManagerDeathRecipient implements DeathRecipient {
+        @Override
+        public void serviceDied(long cookie) {
+            mEventHandler.post(() -> {
+                synchronized (mLock) {
+                    Log.w(TAG, "IServiceManager died: cookie=" + cookie);
+                    hostapdServiceDiedHandler(mDeathRecipientCookie);
+                    mIServiceManager = null; // Will need to register a new ServiceNotification
+                }
+            });
+        }
+    }
+    private class HostapdDeathRecipient implements DeathRecipient {
+        @Override
+        public void serviceDied(long cookie) {
+            mEventHandler.post(() -> {
+                synchronized (mLock) {
+                    Log.w(TAG, "IHostapd/IHostapd died: cookie=" + cookie);
+                    hostapdServiceDiedHandler(cookie);
+                }
+            });
+        }
+    }
 
     public HostapdHal(Context context, Handler handler) {
         mContext = context;
         mEventHandler = handler;
+        mServiceManagerDeathRecipient = new ServiceManagerDeathRecipient();
+        mHostapdDeathRecipient = new HostapdDeathRecipient();
     }
 
     /**
@@ -60,40 +137,82 @@
      *
      * @param enable true to enable, false to disable.
      */
-    public void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
+    void enableVerboseLogging(boolean enable) {
         synchronized (mLock) {
-            mVerboseLoggingEnabled = verboseEnabled;
-            mVerboseHalLoggingEnabled = halVerboseEnabled;
-            if (mIHostapd != null) {
-                mIHostapd.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
+            mVerboseLoggingEnabled = enable;
+            setLogLevel();
+        }
+    }
+
+    /**
+     * Uses the IServiceManager to check if the device is running V1_1 of the HAL from the VINTF for
+     * the device.
+     * @return true if supported, false otherwise.
+     */
+    private boolean isV1_1() {
+        return checkHalVersionByInterfaceName(
+                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName);
+    }
+
+    /**
+     * Uses the IServiceManager to check if the device is running V1_2 of the HAL from the VINTF for
+     * the device.
+     * @return true if supported, false otherwise.
+     */
+    private boolean isV1_2() {
+        return checkHalVersionByInterfaceName(
+                android.hardware.wifi.hostapd.V1_2.IHostapd.kInterfaceName);
+    }
+
+    /**
+     * Uses the IServiceManager to check if the device is running V1_3 of the HAL from the VINTF for
+     * the device.
+     * @return true if supported, false otherwise.
+     */
+    private boolean isV1_3() {
+        return checkHalVersionByInterfaceName(
+                android.hardware.wifi.hostapd.V1_3.IHostapd.kInterfaceName);
+    }
+
+    private boolean checkHalVersionByInterfaceName(String interfaceName) {
+        if (interfaceName == null) {
+            return false;
+        }
+        synchronized (mLock) {
+            if (mIServiceManager == null) {
+                Log.e(TAG, "checkHalVersionByInterfaceName called but mServiceManager is null!?");
+                return false;
+            }
+            try {
+                return (mIServiceManager.getTransport(
+                        interfaceName,
+                        HAL_INSTANCE_NAME)
+                        != IServiceManager.Transport.EMPTY);
+            } catch (RemoteException e) {
+                Log.e(TAG, "Exception while operating on IServiceManager: " + e);
+                handleRemoteException(e, "getTransport");
+                return false;
             }
         }
     }
 
     /**
-     * Initialize the HostapdHal. Creates the internal IHostapdHal object
-     * and calls its initialize method.
-     *
-     * @return true if the initialization succeeded
+     * Link to death for IServiceManager object.
+     * @return true on success, false otherwise.
      */
-    public boolean initialize() {
+    private boolean linkToServiceManagerDeath() {
         synchronized (mLock) {
-            if (mVerboseLoggingEnabled) {
-                Log.i(TAG, "Initializing Hostapd Service.");
-            }
-            if (mIHostapd != null) {
-                Log.wtf(TAG, "Hostapd HAL has already been initialized.");
-                return false;
-            }
-            mIHostapd = createIHostapdHalMockable();
-            if (mIHostapd == null) {
-                Log.e(TAG, "Failed to get Hostapd HAL instance");
-                return false;
-            }
-            mIHostapd.enableVerboseLogging(mVerboseLoggingEnabled, mVerboseHalLoggingEnabled);
-            if (!mIHostapd.initialize()) {
-                Log.e(TAG, "Fail to init hostapd, Stopping hostapd startup");
-                mIHostapd = null;
+            if (mIServiceManager == null) return false;
+            try {
+                if (!mIServiceManager.linkToDeath(mServiceManagerDeathRecipient, 0)) {
+                    Log.wtf(TAG, "Error on linkToDeath on IServiceManager");
+                    hostapdServiceDiedHandler(mDeathRecipientCookie);
+                    mIServiceManager = null; // Will need to register a new ServiceNotification
+                    return false;
+                }
+            } catch (RemoteException e) {
+                Log.e(TAG, "IServiceManager.linkToDeath exception", e);
+                mIServiceManager = null; // Will need to register a new ServiceNotification
                 return false;
             }
             return true;
@@ -101,38 +220,154 @@
     }
 
     /**
-     * Wrapper function to create the IHostapdHal object. Created to be mockable in unit tests.
+     * Returns whether or not the hostapd supported to get the AP info from the callback.
      */
-    @VisibleForTesting
-    protected IHostapdHal createIHostapdHalMockable() {
-        synchronized (mLock) {
-            // Prefer AIDL implementation if service is declared.
-            if (HostapdHalAidlImp.serviceDeclared()) {
-                Log.i(TAG, "Initializing hostapd using AIDL implementation.");
-                return new HostapdHalAidlImp(mContext, mEventHandler);
+    public boolean isApInfoCallbackSupported() {
+        return isV1_3();
+    }
 
-            } else if (HostapdHalHidlImp.serviceDeclared()) {
-                Log.i(TAG, "Initializing hostapd using HIDL implementation.");
-                return new HostapdHalHidlImp(mContext, mEventHandler);
+    /**
+     * Registers a service notification for the IHostapd service, which triggers intialization of
+     * the IHostapd
+     * @return true if the service notification was successfully registered
+     */
+    public boolean initialize() {
+        synchronized (mLock) {
+            if (mVerboseLoggingEnabled) {
+                Log.i(TAG, "Registering IHostapd service ready callback.");
             }
-            Log.e(TAG, "No HIDL or AIDL service available for hostapd.");
-            return null;
+            mIHostapd = null;
+            if (mIServiceManager != null) {
+                // Already have an IServiceManager and serviceNotification registered, don't
+                // don't register another.
+                return true;
+            }
+            try {
+                mIServiceManager = getServiceManagerMockable();
+                if (mIServiceManager == null) {
+                    Log.e(TAG, "Failed to get HIDL Service Manager");
+                    return false;
+                }
+                if (!linkToServiceManagerDeath()) {
+                    return false;
+                }
+                /* TODO(b/33639391) : Use the new IHostapd.registerForNotifications() once it
+                   exists */
+                if (!mIServiceManager.registerForNotifications(
+                        IHostapd.kInterfaceName, "", mServiceNotificationCallback)) {
+                    Log.e(TAG, "Failed to register for notifications to "
+                            + IHostapd.kInterfaceName);
+                    mIServiceManager = null; // Will need to register a new ServiceNotification
+                    return false;
+                }
+            } catch (RemoteException e) {
+                Log.e(TAG, "Exception while trying to register a listener for IHostapd service: "
+                        + e);
+                hostapdServiceDiedHandler(mDeathRecipientCookie);
+                mIServiceManager = null; // Will need to register a new ServiceNotification
+                return false;
+            }
+            return true;
         }
     }
 
     /**
-     * Returns whether or not the hostapd supports getting the AP info from the callback.
+     * Link to death for IHostapd object.
+     * @return true on success, false otherwise.
      */
-    public boolean isApInfoCallbackSupported() {
+    private boolean linkToHostapdDeath(DeathRecipient deathRecipient, long cookie) {
         synchronized (mLock) {
-            String methodStr = "isApInfoCallbackSupported";
-            if (mIHostapd == null) {
-                return handleNullIHostapd(methodStr);
+            if (mIHostapd == null) return false;
+            try {
+                if (!mIHostapd.linkToDeath(deathRecipient, cookie)) {
+                    Log.wtf(TAG, "Error on linkToDeath on IHostapd");
+                    hostapdServiceDiedHandler(mDeathRecipientCookie);
+                    return false;
+                }
+            } catch (RemoteException e) {
+                Log.e(TAG, "IHostapd.linkToDeath exception", e);
+                return false;
             }
-            return mIHostapd.isApInfoCallbackSupported();
+            return true;
         }
     }
 
+    private boolean registerCallback(
+            android.hardware.wifi.hostapd.V1_1.IHostapdCallback callback) {
+        synchronized (mLock) {
+            String methodStr = "registerCallback_1_1";
+            try {
+                android.hardware.wifi.hostapd.V1_1.IHostapd iHostapdV1_1 = getHostapdMockableV1_1();
+                if (iHostapdV1_1 == null) return false;
+                HostapdStatus status =  iHostapdV1_1.registerCallback(callback);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
+        }
+    }
+
+    private boolean registerCallback_1_3(
+            android.hardware.wifi.hostapd.V1_3.IHostapdCallback callback) {
+        synchronized (mLock) {
+            String methodStr = "registerCallback_1_3";
+            try {
+                android.hardware.wifi.hostapd.V1_3.IHostapd iHostapdV1_3 = getHostapdMockableV1_3();
+                if (iHostapdV1_3 == null) return false;
+                android.hardware.wifi.hostapd.V1_2.HostapdStatus status =
+                        iHostapdV1_3.registerCallback_1_3(callback);
+                return checkStatusAndLogFailure12(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
+        }
+    }
+
+    /**
+     * Initialize the IHostapd object.
+     * @return true on success, false otherwise.
+     */
+    private boolean initHostapdService() {
+        synchronized (mLock) {
+            try {
+                mIHostapd = getHostapdMockable();
+            } catch (RemoteException e) {
+                Log.e(TAG, "IHostapd.getService exception: " + e);
+                return false;
+            } catch (NoSuchElementException e) {
+                Log.e(TAG, "IHostapd.getService exception: " + e);
+                return false;
+            }
+            if (mIHostapd == null) {
+                Log.e(TAG, "Got null IHostapd service. Stopping hostapd HIDL startup");
+                return false;
+            }
+            if (!linkToHostapdDeath(mHostapdDeathRecipient, ++mDeathRecipientCookie)) {
+                Log.e(TAG, "Fail to link to Hostapd Death, Stopping hostapd HIDL startup");
+                mIHostapd = null;
+                return false;
+            }
+            // Register for callbacks for 1.1 hostapd.
+            if (isV1_3()) {
+                if (!registerCallback_1_3(new HostapdCallback_1_3())) {
+                    Log.e(TAG, "Fail to regiester Callback 1_3, Stopping hostapd HIDL startup");
+                    mIHostapd = null;
+                    return false;
+                }
+            } else if (isV1_1() && !registerCallback(new HostapdCallback())) {
+                Log.e(TAG, "Fail to regiester Callback, Stopping hostapd HIDL startup");
+                mIHostapd = null;
+                return false;
+            }
+
+            // Setup log level
+            setLogLevel();
+        }
+        return true;
+    }
+
     /**
      * Register the provided callback handler for SoftAp events.
      * <p>
@@ -144,14 +379,19 @@
      * @return true on success, false on failure.
      */
     public boolean registerApCallback(@NonNull String ifaceName,
-            @NonNull SoftApHalCallback callback) {
-        synchronized (mLock) {
-            String methodStr = "registerApCallback";
-            if (mIHostapd == null) {
-                return handleNullIHostapd(methodStr);
-            }
-            return mIHostapd.registerApCallback(ifaceName, callback);
+            @NonNull SoftApListener listener) {
+        if (listener == null) {
+            Log.e(TAG, "registerApCallback called with a null callback");
+            return false;
         }
+
+        if (!isV1_3()) {
+            Log.d(TAG, "The current HAL doesn't support event callback.");
+            return false;
+        }
+        mSoftApEventListener = listener;
+        Log.i(TAG, "registerApCallback Successful in " + ifaceName);
+        return true;
     }
 
     /**
@@ -166,11 +406,76 @@
     public boolean addAccessPoint(@NonNull String ifaceName, @NonNull SoftApConfiguration config,
                                   boolean isMetered, @NonNull Runnable onFailureListener) {
         synchronized (mLock) {
-            String methodStr = "addAccessPoint";
-            if (mIHostapd == null) {
-                return handleNullIHostapd(methodStr);
+            final String methodStr = "addAccessPoint";
+            IHostapd.IfaceParams ifaceParamsV1_0 = prepareIfaceParamsV1_0(ifaceName, config);
+            android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams nwParamsV1_2 =
+                    prepareNetworkParamsV1_2(config);
+            if (nwParamsV1_2 == null) return false;
+            if (!checkHostapdAndLogFailure(methodStr)) return false;
+            try {
+                HostapdStatus status;
+                if (!isV1_1()) {
+                    // V1_0 case
+                    status = mIHostapd.addAccessPoint(ifaceParamsV1_0, nwParamsV1_2.V1_0);
+                    if (!checkStatusAndLogFailure(status, methodStr)) {
+                        return false;
+                    }
+                } else {
+                    android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams ifaceParamsV1_1 =
+                            prepareIfaceParamsV1_1(ifaceParamsV1_0, config);
+                    if (!isV1_2()) {
+                        // V1_1 case
+                        android.hardware.wifi.hostapd.V1_1.IHostapd iHostapdV1_1 =
+                                getHostapdMockableV1_1();
+                        if (iHostapdV1_1 == null) return false;
+                        status = iHostapdV1_1.addAccessPoint_1_1(ifaceParamsV1_1,
+                                nwParamsV1_2.V1_0);
+                        if (!checkStatusAndLogFailure(status, methodStr)) {
+                            return false;
+                        }
+                    } else {
+                        // V1_2 & V1_3 case
+                        android.hardware.wifi.hostapd.V1_2.HostapdStatus status12;
+                        android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams ifaceParamsV1_2 =
+                                prepareIfaceParamsV1_2(ifaceParamsV1_1, config);
+                        if (!isV1_3()) {
+                            // V1_2 case
+                            android.hardware.wifi.hostapd.V1_2.IHostapd iHostapdV1_2 =
+                                    getHostapdMockableV1_2();
+                            if (iHostapdV1_2 == null) return false;
+                            status12 = iHostapdV1_2.addAccessPoint_1_2(ifaceParamsV1_2,
+                                    nwParamsV1_2);
+                        } else {
+                            // V1_3 case
+                            android.hardware.wifi.hostapd.V1_3
+                                    .IHostapd.NetworkParams nwParamsV1_3 =
+                                    new android.hardware.wifi.hostapd.V1_3
+                                    .IHostapd.NetworkParams();
+                            nwParamsV1_3.V1_2 = nwParamsV1_2;
+                            nwParamsV1_3.isMetered = isMetered;
+                            android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams ifaceParams1_3 =
+                                    prepareIfaceParamsV1_3(ifaceParamsV1_2, config);
+                            android.hardware.wifi.hostapd.V1_3.IHostapd iHostapdV1_3 =
+                                    getHostapdMockableV1_3();
+                            if (iHostapdV1_3 == null) return false;
+                            status12 = iHostapdV1_3.addAccessPoint_1_3(ifaceParams1_3,
+                                    nwParamsV1_3);
+                        }
+                        if (!checkStatusAndLogFailure12(status12, methodStr)) {
+                            return false;
+                        }
+                    }
+                }
+
+                mSoftApFailureListeners.put(ifaceName, onFailureListener);
+                return true;
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Unrecognized apBand: " + config.getBand());
+                return false;
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mIHostapd.addAccessPoint(ifaceName, config, isMetered, onFailureListener);
         }
     }
 
@@ -182,11 +487,20 @@
      */
     public boolean removeAccessPoint(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "removeAccessPoint";
-            if (mIHostapd == null) {
-                return handleNullIHostapd(methodStr);
+            final String methodStr = "removeAccessPoint";
+            if (!checkHostapdAndLogFailure(methodStr)) return false;
+            try {
+                HostapdStatus status = mIHostapd.removeAccessPoint(ifaceName);
+                if (!checkStatusAndLogFailure(status, methodStr)) {
+                    return false;
+                }
+                mSoftApFailureListeners.remove(ifaceName);
+                mSoftApEventListener = null;
+                return true;
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mIHostapd.removeAccessPoint(ifaceName);
         }
     }
 
@@ -200,13 +514,42 @@
      */
     public boolean forceClientDisconnect(@NonNull String ifaceName,
             @NonNull MacAddress client, int reasonCode) {
-        synchronized (mLock) {
-            String methodStr = "forceClientDisconnect";
-            if (mIHostapd == null) {
-                return handleNullIHostapd(methodStr);
+        final String methodStr = "forceClientDisconnect";
+        if (isV1_2()) {
+            try {
+                android.hardware.wifi.hostapd.V1_2.IHostapd iHostapdV1_2 =
+                        getHostapdMockableV1_2();
+                if (iHostapdV1_2 == null) return false;
+                byte[] clientMacByteArray = client.toByteArray();
+                short disconnectReason;
+                switch (reasonCode) {
+                    case WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER:
+                        disconnectReason = Ieee80211ReasonCode.WLAN_REASON_PREV_AUTH_NOT_VALID;
+                        break;
+                    case WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS:
+                        disconnectReason = Ieee80211ReasonCode.WLAN_REASON_DISASSOC_AP_BUSY;
+                        break;
+                    case WifiManager.SAP_CLIENT_DISCONNECT_REASON_CODE_UNSPECIFIED:
+                        disconnectReason = Ieee80211ReasonCode.WLAN_REASON_UNSPECIFIED;
+                        break;
+                    default:
+                        throw new IllegalArgumentException(
+                                "Unknown disconnect reason code:" + reasonCode);
+                }
+                android.hardware.wifi.hostapd.V1_2.HostapdStatus status =
+                        iHostapdV1_2.forceClientDisconnect(ifaceName,
+                        clientMacByteArray, disconnectReason);
+                if (status.code == HostapdStatusCode.SUCCESS) {
+                    return true;
+                }
+                Log.d(TAG, "Error when call forceClientDisconnect, status.code = " + status.code);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
             }
-            return mIHostapd.forceClientDisconnect(ifaceName, client, reasonCode);
+        } else {
+            Log.d(TAG, "HIDL doesn't support forceClientDisconnect");
         }
+        return false;
     }
 
     /**
@@ -214,13 +557,11 @@
      * @return Returns true on success.
      */
     public boolean registerDeathHandler(@NonNull HostapdDeathEventHandler handler) {
-        synchronized (mLock) {
-            String methodStr = "registerDeathHandler";
-            if (mIHostapd == null) {
-                return handleNullIHostapd(methodStr);
-            }
-            return mIHostapd.registerDeathHandler(handler);
+        if (mDeathEventHandler != null) {
+            Log.e(TAG, "Death handler already present");
         }
+        mDeathEventHandler = handler;
+        return true;
     }
 
     /**
@@ -228,12 +569,35 @@
      * @return Returns true on success.
      */
     public boolean deregisterDeathHandler() {
+        if (mDeathEventHandler == null) {
+            Log.e(TAG, "No Death handler present");
+        }
+        mDeathEventHandler = null;
+        return true;
+    }
+
+    /**
+     * Clear internal state.
+     */
+    private void clearState() {
         synchronized (mLock) {
-            String methodStr = "deregisterDeathHandler";
-            if (mIHostapd == null) {
-                return handleNullIHostapd(methodStr);
+            mIHostapd = null;
+        }
+    }
+
+    /**
+     * Handle hostapd death.
+     */
+    private void hostapdServiceDiedHandler(long cookie) {
+        synchronized (mLock) {
+            if (mDeathRecipientCookie != cookie) {
+                Log.i(TAG, "Ignoring stale death recipient notification");
+                return;
             }
-            return mIHostapd.deregisterDeathHandler();
+            clearState();
+            if (mDeathEventHandler != null) {
+                mDeathEventHandler.onDeath();
+            }
         }
     }
 
@@ -242,11 +606,7 @@
      */
     public boolean isInitializationStarted() {
         synchronized (mLock) {
-            String methodStr = "isInitializationStarted";
-            if (mIHostapd == null) {
-                return handleNullIHostapd(methodStr);
-            }
-            return mIHostapd.isInitializationStarted();
+            return mIServiceManager != null;
         }
     }
 
@@ -255,11 +615,7 @@
      */
     public boolean isInitializationComplete() {
         synchronized (mLock) {
-            String methodStr = "isInitializationComplete";
-            if (mIHostapd == null) {
-                return handleNullIHostapd(methodStr);
-            }
-            return mIHostapd.isInitializationComplete();
+            return mIHostapd != null;
         }
     }
 
@@ -270,11 +626,19 @@
      */
     public boolean startDaemon() {
         synchronized (mLock) {
-            String methodStr = "startDaemon";
-            if (mIHostapd == null) {
-                return handleNullIHostapd(methodStr);
+            try {
+                // This should startup hostapd daemon using the lazy start HAL mechanism.
+                getHostapdMockable();
+            } catch (RemoteException e) {
+                Log.e(TAG, "Exception while trying to start hostapd: "
+                        + e);
+                hostapdServiceDiedHandler(mDeathRecipientCookie);
+                return false;
+            } catch (NoSuchElementException e) {
+                // We're starting the daemon, so expect |NoSuchElementException|.
+                Log.d(TAG, "Successfully triggered start of hostapd using HIDL");
             }
-            return mIHostapd.startDaemon();
+            return true;
         }
     }
 
@@ -283,38 +647,637 @@
      */
     public void terminate() {
         synchronized (mLock) {
-            String methodStr = "terminate";
-            if (mIHostapd == null) {
-                handleNullIHostapd(methodStr);
-                return;
+            // Register for a new death listener to block until hostapd is dead.
+            final long waitForDeathCookie = new Random().nextLong();
+            final CountDownLatch waitForDeathLatch = new CountDownLatch(1);
+            linkToHostapdDeath((cookie) -> {
+                Log.d(TAG, "IHostapd died: cookie=" + cookie);
+                if (cookie != waitForDeathCookie) return;
+                waitForDeathLatch.countDown();
+            }, waitForDeathCookie);
+
+            final String methodStr = "terminate";
+            if (!checkHostapdAndLogFailure(methodStr)) return;
+            try {
+                mIHostapd.terminate();
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
             }
-            mIHostapd.terminate();
-        }
-    }
 
-    private boolean handleNullIHostapd(String methodStr) {
-        Log.e(TAG, "Cannot call " + methodStr + " because mIHostapd is null.");
-        return false;
-    }
-
-    protected void dump(PrintWriter pw) {
-        synchronized (mLock) {
-            pw.println("Dump of HostapdHal");
-            pw.println("AIDL service declared: " + HostapdHalAidlImp.serviceDeclared());
-            pw.println("HIDL service declared: " + HostapdHalHidlImp.serviceDeclared());
-            boolean initialized = mIHostapd != null;
-            pw.println("Initialized: " + initialized);
-            if (initialized) {
-                pw.println("Implementation: " + mIHostapd.getClass().getSimpleName());
-                mIHostapd.dump(pw);
+            // Now wait for death listener callback to confirm that it's dead.
+            try {
+                if (!waitForDeathLatch.await(WAIT_FOR_DEATH_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
+                    Log.w(TAG, "Timed out waiting for confirmation of hostapd death");
+                }
+            } catch (InterruptedException e) {
+                Log.w(TAG, "Failed to wait for hostapd death");
             }
         }
     }
 
     /**
-     * Returns whether or not the hostapd HAL supports reporting single instance died event.
+     * Wrapper functions to access static HAL methods, created to be mockable in unit tests
      */
-    public boolean isSoftApInstanceDiedHandlerSupported() {
-        return Environment.isVndkApiLevelNewerThan(Build.VERSION_CODES.S);
+    @VisibleForTesting
+    protected IServiceManager getServiceManagerMockable() throws RemoteException {
+        synchronized (mLock) {
+            return IServiceManager.getService();
+        }
+    }
+
+    @VisibleForTesting
+    protected IHostapd getHostapdMockable() throws RemoteException {
+        synchronized (mLock) {
+            return IHostapd.getService();
+        }
+    }
+
+    @VisibleForTesting
+    protected android.hardware.wifi.hostapd.V1_1.IHostapd getHostapdMockableV1_1()
+            throws RemoteException {
+        synchronized (mLock) {
+            try {
+                return android.hardware.wifi.hostapd.V1_1.IHostapd.castFrom(mIHostapd);
+            } catch (NoSuchElementException e) {
+                Log.e(TAG, "Failed to get IHostapd", e);
+                return null;
+            }
+        }
+    }
+
+    @VisibleForTesting
+    protected android.hardware.wifi.hostapd.V1_2.IHostapd getHostapdMockableV1_2()
+            throws RemoteException {
+        synchronized (mLock) {
+            try {
+                return android.hardware.wifi.hostapd.V1_2.IHostapd.castFrom(mIHostapd);
+            } catch (NoSuchElementException e) {
+                Log.e(TAG, "Failed to get IHostapd", e);
+                return null;
+            }
+        }
+    }
+
+    @VisibleForTesting
+    protected android.hardware.wifi.hostapd.V1_3.IHostapd getHostapdMockableV1_3()
+            throws RemoteException {
+        synchronized (mLock) {
+            try {
+                return android.hardware.wifi.hostapd.V1_3.IHostapd.castFrom(mIHostapd);
+            } catch (NoSuchElementException e) {
+                Log.e(TAG, "Failed to get IHostapd", e);
+                return null;
+            }
+        }
+    }
+
+    private void updateIfaceParams_1_2FromResource(
+            android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams ifaceParams12) {
+        ifaceParams12.hwModeParams.enable80211AX =
+                mContext.getResources().getBoolean(
+                R.bool.config_wifiSoftapIeee80211axSupported);
+        ifaceParams12.hwModeParams.enable6GhzBand =
+                ApConfigUtil.isBandSupported(SoftApConfiguration.BAND_6GHZ, mContext);
+        ifaceParams12.hwModeParams.enableHeSingleUserBeamformer =
+                mContext.getResources().getBoolean(
+                R.bool.config_wifiSoftapHeSuBeamformerSupported);
+        ifaceParams12.hwModeParams.enableHeSingleUserBeamformee =
+                mContext.getResources().getBoolean(
+                R.bool.config_wifiSoftapHeSuBeamformeeSupported);
+        ifaceParams12.hwModeParams.enableHeMultiUserBeamformer =
+                mContext.getResources().getBoolean(
+                R.bool.config_wifiSoftapHeMuBeamformerSupported);
+        ifaceParams12.hwModeParams.enableHeTargetWakeTime =
+                mContext.getResources().getBoolean(R.bool.config_wifiSoftapHeTwtSupported);
+    }
+
+    private android.hardware.wifi.hostapd.V1_0.IHostapd.IfaceParams
+            prepareIfaceParamsV1_0(String ifaceName, SoftApConfiguration config) {
+        IHostapd.IfaceParams ifaceParamsV1_0 = new IHostapd.IfaceParams();
+        ifaceParamsV1_0.ifaceName = ifaceName;
+        ifaceParamsV1_0.hwModeParams.enable80211N = true;
+        ifaceParamsV1_0.hwModeParams.enable80211AC = mContext.getResources().getBoolean(
+                R.bool.config_wifi_softap_ieee80211ac_supported);
+        boolean enableAcs = ApConfigUtil.isAcsSupported(mContext) && config.getChannel() == 0;
+        if (enableAcs) {
+            ifaceParamsV1_0.channelParams.enableAcs = true;
+            ifaceParamsV1_0.channelParams.acsShouldExcludeDfs = !mContext.getResources()
+                    .getBoolean(R.bool.config_wifiSoftapAcsIncludeDfs);
+        }
+        ifaceParamsV1_0.channelParams.channel = config.getChannel();
+        ifaceParamsV1_0.channelParams.band = getHalBand(config.getBand());
+        return ifaceParamsV1_0;
+    }
+
+    private android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams
+            prepareIfaceParamsV1_1(
+            android.hardware.wifi.hostapd.V1_0.IHostapd.IfaceParams ifaceParamsV10,
+            SoftApConfiguration config) {
+        android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams ifaceParamsV1_1 =
+                new android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams();
+        ifaceParamsV1_1.V1_0 = ifaceParamsV10;
+        ifaceParamsV10.channelParams.band = getHalBand(config.getBand());
+
+        if (ifaceParamsV10.channelParams.enableAcs) {
+            if ((config.getBand() & SoftApConfiguration.BAND_2GHZ) != 0) {
+                ifaceParamsV1_1.channelParams.acsChannelRanges.addAll(
+                        toAcsChannelRanges(mContext.getResources().getString(
+                        R.string.config_wifiSoftap2gChannelList)));
+            }
+            if ((config.getBand() & SoftApConfiguration.BAND_5GHZ) != 0) {
+                ifaceParamsV1_1.channelParams.acsChannelRanges.addAll(
+                        toAcsChannelRanges(mContext.getResources().getString(
+                        R.string.config_wifiSoftap5gChannelList)));
+            }
+        }
+        return ifaceParamsV1_1;
+    }
+
+    private android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams
+            prepareIfaceParamsV1_2(
+            android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams ifaceParamsV11,
+            SoftApConfiguration config) {
+        android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams ifaceParamsV1_2 =
+                new android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams();
+        ifaceParamsV1_2.V1_1 = ifaceParamsV11;
+        updateIfaceParams_1_2FromResource(ifaceParamsV1_2);
+        //Update 80211ax support with the configuration.
+        ifaceParamsV1_2.hwModeParams.enable80211AX &= config.isIeee80211axEnabledInternal();
+
+        ifaceParamsV1_2.channelParams.bandMask = getHalBandMask(config.getBand());
+
+        // Prepare freq ranges/lists if needed
+        if (ifaceParamsV11.V1_0.channelParams.enableAcs && ApConfigUtil.isSendFreqRangesNeeded(
+                config.getBand(), mContext)) {
+            prepareAcsChannelFreqRangesMhz(ifaceParamsV1_2.channelParams, config.getBand());
+        }
+        return ifaceParamsV1_2;
+    }
+
+    private android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams
+            prepareIfaceParamsV1_3(
+            android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams ifaceParamsV12,
+            SoftApConfiguration config) {
+        android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams ifaceParamsV1_3 =
+                new android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams();
+        ifaceParamsV1_3.V1_2 = ifaceParamsV12;
+        ArrayList<android.hardware.wifi.hostapd.V1_3.IHostapd.ChannelParams>
+                channelParams1_3List = new ArrayList<>();
+        if (!SdkLevel.isAtLeastS()) {
+            return ifaceParamsV1_3;
+        }
+        for (int i = 0; i < config.getChannels().size(); i++) {
+            android.hardware.wifi.hostapd.V1_3.IHostapd.ChannelParams channelParam13 =
+                    new android.hardware.wifi.hostapd.V1_3.IHostapd.ChannelParams();
+            // Prepare channel
+            channelParam13.channel = config.getChannels().valueAt(i);
+            // Prepare enableAcs
+            channelParam13.enableAcs = ApConfigUtil.isAcsSupported(mContext)
+                    && channelParam13.channel == 0;
+            // Prepare the bandMask
+            channelParam13.V1_2.bandMask = getHalBandMask(config.getChannels().keyAt(i));
+            channelParam13.bandMask = channelParam13.V1_2.bandMask;
+            // Prepare  AcsChannelFreqRangesMhz
+            if (channelParam13.enableAcs && ApConfigUtil.isSendFreqRangesNeeded(
+                    config.getChannels().keyAt(i), mContext)) {
+                prepareAcsChannelFreqRangesMhz(
+                        channelParam13.V1_2, config.getChannels().keyAt(i));
+            }
+            channelParams1_3List.add(channelParam13);
+        }
+        ifaceParamsV1_3.channelParamsList = channelParams1_3List;
+        return ifaceParamsV1_3;
+    }
+
+    private android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams
+            prepareNetworkParamsV1_2(SoftApConfiguration config) {
+        android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams nwParamsV1_2 =
+                new android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams();
+        nwParamsV1_2.V1_0.ssid.addAll(NativeUtil.stringToByteArrayList(config.getSsid()));
+        nwParamsV1_2.V1_0.isHidden = config.isHiddenSsid();
+        int encryptionType = getEncryptionType(config);
+        nwParamsV1_2.encryptionType = encryptionType;
+        nwParamsV1_2.passphrase = (config.getPassphrase() != null)
+                    ? config.getPassphrase() : "";
+        if (encryptionType
+                == android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE
+                || encryptionType == android.hardware.wifi.hostapd.V1_2.IHostapd
+                .EncryptionType.WPA3_SAE_TRANSITION) {
+            if (!isV1_2()) {
+                // It should not happen since we should reject configuration in SoftApManager
+                Log.e(TAG, "Unsupported Configuration found: " + config);
+                return null;
+            }
+        } else {
+            // Fill old parameter for old hidl.
+            nwParamsV1_2.V1_0.encryptionType = encryptionType;
+            nwParamsV1_2.V1_0.pskPassphrase = (config.getPassphrase() != null)
+                    ? config.getPassphrase() : "";
+        }
+        return nwParamsV1_2;
+    }
+
+    private static int getEncryptionType(SoftApConfiguration localConfig) {
+        int encryptionType;
+        switch (localConfig.getSecurityType()) {
+            case SoftApConfiguration.SECURITY_TYPE_OPEN:
+                encryptionType = IHostapd.EncryptionType.NONE;
+                break;
+            case SoftApConfiguration.SECURITY_TYPE_WPA2_PSK:
+                encryptionType = IHostapd.EncryptionType.WPA2;
+                break;
+            case SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION:
+                encryptionType = android.hardware.wifi.hostapd.V1_2
+                        .IHostapd.EncryptionType.WPA3_SAE_TRANSITION;
+                break;
+            case SoftApConfiguration.SECURITY_TYPE_WPA3_SAE:
+                encryptionType = android.hardware.wifi.hostapd.V1_2
+                        .IHostapd.EncryptionType.WPA3_SAE;
+                break;
+            default:
+                // We really shouldn't default to None, but this was how NetworkManagementService
+                // used to do this.
+                encryptionType = IHostapd.EncryptionType.NONE;
+                break;
+        }
+        return encryptionType;
+    }
+
+    private static int getHalBandMask(int apBand) {
+        int bandMask = 0;
+
+        if (!ApConfigUtil.isBandValid(apBand)) {
+            throw new IllegalArgumentException();
+        }
+
+        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_2GHZ)) {
+            bandMask |= android.hardware.wifi.hostapd.V1_2.IHostapd.BandMask.BAND_2_GHZ;
+        }
+        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_5GHZ)) {
+            bandMask |= android.hardware.wifi.hostapd.V1_2.IHostapd.BandMask.BAND_5_GHZ;
+        }
+        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_6GHZ)) {
+            bandMask |= android.hardware.wifi.hostapd.V1_2.IHostapd.BandMask.BAND_6_GHZ;
+        }
+        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_60GHZ)) {
+            bandMask |= android.hardware.wifi.hostapd.V1_3.IHostapd.BandMask.BAND_60_GHZ;
+        }
+
+        return bandMask;
+    }
+
+    private static int getHalBand(int apBand) {
+        if (!ApConfigUtil.isBandValid(apBand)) {
+            throw new IllegalArgumentException();
+        }
+
+        switch (apBand) {
+            case SoftApConfiguration.BAND_2GHZ:
+                return IHostapd.Band.BAND_2_4_GHZ;
+            case SoftApConfiguration.BAND_5GHZ:
+                return IHostapd.Band.BAND_5_GHZ;
+            default:
+                return IHostapd.Band.BAND_ANY;
+        }
+    }
+
+    /**
+     * Convert channel list string like '1-6,11' to list of AcsChannelRanges
+     */
+    private List<android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange>
+            toAcsChannelRanges(String channelListStr) {
+        ArrayList<android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange> acsChannelRanges =
+                new ArrayList<>();
+
+        for (String channelRange : channelListStr.split(",")) {
+            android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange acsChannelRange =
+                    new android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange();
+            try {
+                if (channelRange.contains("-")) {
+                    String[] channels  = channelRange.split("-");
+                    if (channels.length != 2) {
+                        Log.e(TAG, "Unrecognized channel range, length is " + channels.length);
+                        continue;
+                    }
+                    int start = Integer.parseInt(channels[0].trim());
+                    int end = Integer.parseInt(channels[1].trim());
+                    if (start > end) {
+                        Log.e(TAG, "Invalid channel range, from " + start + " to " + end);
+                        continue;
+                    }
+                    acsChannelRange.start = start;
+                    acsChannelRange.end = end;
+                } else if (!TextUtils.isEmpty(channelRange)) {
+                    acsChannelRange.start = Integer.parseInt(channelRange.trim());
+                    acsChannelRange.end = acsChannelRange.start;
+                }
+            } catch (NumberFormatException e) {
+                // Ignore malformed value
+                Log.e(TAG, "Malformed channel value detected: " + e);
+                continue;
+            }
+            acsChannelRanges.add(acsChannelRange);
+        }
+        return acsChannelRanges;
+    }
+
+
+    /**
+     * Prepare the acsChannelFreqRangesMhz in V1_2.IHostapd.ChannelParams.
+     */
+    private void prepareAcsChannelFreqRangesMhz(
+            android.hardware.wifi.hostapd.V1_2.IHostapd.ChannelParams channelParams12,
+            @BandType int band) {
+        if ((band & SoftApConfiguration.BAND_2GHZ) != 0) {
+            channelParams12.acsChannelFreqRangesMhz.addAll(
+                    toAcsFreqRanges(SoftApConfiguration.BAND_2GHZ));
+        }
+        if ((band & SoftApConfiguration.BAND_5GHZ) != 0) {
+            channelParams12.acsChannelFreqRangesMhz.addAll(
+                    toAcsFreqRanges(SoftApConfiguration.BAND_5GHZ));
+        }
+        if ((band & SoftApConfiguration.BAND_6GHZ) != 0) {
+            channelParams12.acsChannelFreqRangesMhz.addAll(
+                    toAcsFreqRanges(SoftApConfiguration.BAND_6GHZ));
+        }
+    }
+
+    /**
+     * Convert channel list string like '1-6,11' to list of AcsFreqRange
+     */
+    private List<android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange>
+            toAcsFreqRanges(@BandType int band) {
+        List<android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange>
+                acsFrequencyRanges = new ArrayList<>();
+
+        if (!ApConfigUtil.isBandValid(band) || ApConfigUtil.isMultiband(band)) {
+            Log.e(TAG, "Invalid band : " + band);
+            return acsFrequencyRanges;
+        }
+
+        String channelListStr;
+        switch (band) {
+            case SoftApConfiguration.BAND_2GHZ:
+                channelListStr = mContext.getResources().getString(
+                        R.string.config_wifiSoftap2gChannelList);
+                if (TextUtils.isEmpty(channelListStr)) {
+                    channelListStr = ScanResult.BAND_24_GHZ_FIRST_CH_NUM + "-"
+                            + ScanResult.BAND_24_GHZ_LAST_CH_NUM;
+                }
+                break;
+            case SoftApConfiguration.BAND_5GHZ:
+                channelListStr = mContext.getResources().getString(
+                        R.string.config_wifiSoftap5gChannelList);
+                if (TextUtils.isEmpty(channelListStr)) {
+                    channelListStr = ScanResult.BAND_5_GHZ_FIRST_CH_NUM + "-"
+                            + ScanResult.BAND_5_GHZ_LAST_CH_NUM;
+                }
+                break;
+            case SoftApConfiguration.BAND_6GHZ:
+                channelListStr = mContext.getResources().getString(
+                        R.string.config_wifiSoftap6gChannelList);
+                if (TextUtils.isEmpty(channelListStr)) {
+                    channelListStr = ScanResult.BAND_6_GHZ_FIRST_CH_NUM + "-"
+                            + ScanResult.BAND_6_GHZ_LAST_CH_NUM;
+                }
+                break;
+            default:
+                return acsFrequencyRanges;
+        }
+
+        for (String channelRange : channelListStr.split(",")) {
+            android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange acsFrequencyRange =
+                    new android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange();
+            try {
+                if (channelRange.contains("-")) {
+                    String[] channels  = channelRange.split("-");
+                    if (channels.length != 2) {
+                        Log.e(TAG, "Unrecognized channel range, length is " + channels.length);
+                        continue;
+                    }
+                    int start = Integer.parseInt(channels[0].trim());
+                    int end = Integer.parseInt(channels[1].trim());
+                    if (start > end) {
+                        Log.e(TAG, "Invalid channel range, from " + start + " to " + end);
+                        continue;
+                    }
+                    acsFrequencyRange.start = ApConfigUtil.convertChannelToFrequency(start, band);
+                    acsFrequencyRange.end = ApConfigUtil.convertChannelToFrequency(end, band);
+                } else if (!TextUtils.isEmpty(channelRange)) {
+                    int channel = Integer.parseInt(channelRange.trim());
+                    acsFrequencyRange.start = ApConfigUtil.convertChannelToFrequency(channel, band);
+                    acsFrequencyRange.end = acsFrequencyRange.start;
+                }
+            } catch (NumberFormatException e) {
+                // Ignore malformed value
+                Log.e(TAG, "Malformed channel value detected: " + e);
+                continue;
+            }
+            acsFrequencyRanges.add(acsFrequencyRange);
+        }
+        return acsFrequencyRanges;
+    }
+
+    /**
+     * Returns false if Hostapd is null, and logs failure to call methodStr
+     */
+    private boolean checkHostapdAndLogFailure(String methodStr) {
+        synchronized (mLock) {
+            if (mIHostapd == null) {
+                Log.e(TAG, "Can't call " + methodStr + ", IHostapd is null");
+                return false;
+            }
+            return true;
+        }
+    }
+
+    /**
+     * Returns true if provided status code is SUCCESS, logs debug message and returns false
+     * otherwise
+     */
+    private boolean checkStatusAndLogFailure(HostapdStatus status,
+            String methodStr) {
+        synchronized (mLock) {
+            if (status.code != HostapdStatusCode.SUCCESS) {
+                Log.e(TAG, "IHostapd." + methodStr + " failed: " + status.code
+                        + ", " + status.debugMessage);
+                return false;
+            } else {
+                if (mVerboseLoggingEnabled) {
+                    Log.d(TAG, "IHostapd." + methodStr + " succeeded");
+                }
+                return true;
+            }
+        }
+    }
+
+    /**
+     * Returns true if provided status code is SUCCESS, logs debug message and returns false
+     * otherwise
+     */
+    private boolean checkStatusAndLogFailure12(
+            android.hardware.wifi.hostapd.V1_2.HostapdStatus status, String methodStr) {
+        synchronized (mLock) {
+            if (status.code != HostapdStatusCode.SUCCESS) {
+                Log.e(TAG, "IHostapd." + methodStr + " failed: " + status.code
+                        + ", " + status.debugMessage);
+                return false;
+            } else {
+                if (mVerboseLoggingEnabled) {
+                    Log.d(TAG, "IHostapd." + methodStr + " succeeded");
+                }
+                return true;
+            }
+        }
+    }
+
+    private void handleRemoteException(RemoteException e, String methodStr) {
+        synchronized (mLock) {
+            hostapdServiceDiedHandler(mDeathRecipientCookie);
+            Log.e(TAG, "IHostapd." + methodStr + " failed with exception", e);
+        }
+    }
+
+    private class HostapdCallback extends
+            android.hardware.wifi.hostapd.V1_1.IHostapdCallback.Stub {
+        @Override
+        public void onFailure(String ifaceName) {
+            Log.w(TAG, "Failure on iface " + ifaceName);
+            Runnable onFailureListener = mSoftApFailureListeners.get(ifaceName);
+            if (onFailureListener != null) {
+                onFailureListener.run();
+            }
+        }
+    }
+
+    /**
+     * Map hal bandwidth to SoftApInfo.
+     *
+     * @param bandwidth The channel bandwidth of the AP which is defined in the HAL.
+     * @return The channel bandwidth in the SoftApinfo.
+     */
+    @VisibleForTesting
+    public int mapHalBandwidthToSoftApInfo(int bandwidth) {
+        switch (bandwidth) {
+            case Bandwidth.WIFI_BANDWIDTH_20_NOHT:
+                return SoftApInfo.CHANNEL_WIDTH_20MHZ_NOHT;
+            case Bandwidth.WIFI_BANDWIDTH_20:
+                return SoftApInfo.CHANNEL_WIDTH_20MHZ;
+            case Bandwidth.WIFI_BANDWIDTH_40:
+                return SoftApInfo.CHANNEL_WIDTH_40MHZ;
+            case Bandwidth.WIFI_BANDWIDTH_80:
+                return SoftApInfo.CHANNEL_WIDTH_80MHZ;
+            case Bandwidth.WIFI_BANDWIDTH_80P80:
+                return SoftApInfo.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
+            case Bandwidth.WIFI_BANDWIDTH_160:
+                return SoftApInfo.CHANNEL_WIDTH_160MHZ;
+            case Bandwidth.WIFI_BANDWIDTH_2160:
+                return SoftApInfo.CHANNEL_WIDTH_2160MHZ;
+            case Bandwidth.WIFI_BANDWIDTH_4320:
+                return SoftApInfo.CHANNEL_WIDTH_4320MHZ;
+            case Bandwidth.WIFI_BANDWIDTH_6480:
+                return SoftApInfo.CHANNEL_WIDTH_6480MHZ;
+            case Bandwidth.WIFI_BANDWIDTH_8640:
+                return SoftApInfo.CHANNEL_WIDTH_8640MHZ;
+            default:
+                return SoftApInfo.CHANNEL_WIDTH_INVALID;
+        }
+    }
+
+    /**
+     * Map hal generation to wifi standard.
+     *
+     * @param generation The operation mode of the AP which is defined in HAL.
+     * @return The wifi standard in the ScanResult.
+     */
+    @VisibleForTesting
+    public int mapHalGenerationToWifiStandard(int generation) {
+        switch (generation) {
+            case Generation.WIFI_STANDARD_LEGACY:
+                return ScanResult.WIFI_STANDARD_LEGACY;
+            case Generation.WIFI_STANDARD_11N:
+                return ScanResult.WIFI_STANDARD_11N;
+            case Generation.WIFI_STANDARD_11AC:
+                return ScanResult.WIFI_STANDARD_11AC;
+            case Generation.WIFI_STANDARD_11AX:
+                return ScanResult.WIFI_STANDARD_11AX;
+            case Generation.WIFI_STANDARD_11AD:
+                return ScanResult.WIFI_STANDARD_11AD;
+            default:
+                return ScanResult.WIFI_STANDARD_UNKNOWN;
+        }
+    }
+
+    private class HostapdCallback_1_3 extends
+            android.hardware.wifi.hostapd.V1_3.IHostapdCallback.Stub {
+        @Override
+        public void onFailure(String ifaceName) {
+            Log.w(TAG, "Failure on iface " + ifaceName);
+            Runnable onFailureListener = mSoftApFailureListeners.get(ifaceName);
+            if (onFailureListener != null) {
+                onFailureListener.run();
+            }
+        }
+
+        @Override
+        public void onApInstanceInfoChanged(String ifaceName, String apIfaceInstance,
+                int frequency, int bandwidth, int generation, byte[] apIfaceInstanceMacAddress) {
+            Log.d(TAG, "onApInstanceInfoChanged on " + ifaceName + " / " + apIfaceInstance);
+            try {
+                if (mSoftApEventListener != null) {
+                    mSoftApEventListener.onInfoChanged(apIfaceInstance, frequency,
+                            mapHalBandwidthToSoftApInfo(bandwidth),
+                            mapHalGenerationToWifiStandard(generation),
+                            MacAddress.fromBytes(apIfaceInstanceMacAddress));
+                }
+            } catch (IllegalArgumentException iae) {
+                Log.e(TAG, " Invalid apIfaceInstanceMacAddress, " + iae);
+            }
+        }
+
+        @Override
+        public void onConnectedClientsChanged(String ifaceName, String apIfaceInstance,
+                    byte[] clientAddress, boolean isConnected) {
+            try {
+                Log.d(TAG, "onConnectedClientsChanged on " + ifaceName + " / " + apIfaceInstance
+                        + " and Mac is " + MacAddress.fromBytes(clientAddress).toString()
+                        + " isConnected: " + isConnected);
+                if (mSoftApEventListener != null) {
+                    mSoftApEventListener.onConnectedClientsChanged(apIfaceInstance,
+                            MacAddress.fromBytes(clientAddress), isConnected);
+                }
+            } catch (IllegalArgumentException iae) {
+                Log.e(TAG, " Invalid clientAddress, " + iae);
+            }
+        }
+    }
+
+    /**
+     * Set the debug log level for hostapd.
+     *
+     * @return true if request is sent successfully, false otherwise.
+     */
+    public boolean setLogLevel() {
+        synchronized (mLock) {
+            final String methodStr = "setDebugParams";
+            if (!checkHostapdAndLogFailure(methodStr)) return false;
+            if (isV1_2()) {
+                try {
+                    android.hardware.wifi.hostapd.V1_2.IHostapd iHostapdV1_2 =
+                            getHostapdMockableV1_2();
+                    if (iHostapdV1_2 == null) return false;
+                    android.hardware.wifi.hostapd.V1_2.HostapdStatus status =
+                            iHostapdV1_2.setDebugParams(mVerboseLoggingEnabled
+                                    ? DebugLevel.DEBUG
+                                    : DebugLevel.INFO);
+                    return checkStatusAndLogFailure12(status, methodStr);
+                } catch (RemoteException e) {
+                    handleRemoteException(e, methodStr);
+                }
+            } else {
+                Log.d(TAG, "HIDL doesn't support setDebugParams");
+            }
+            return false;
+        }
     }
 }
diff --git a/service/java/com/android/server/wifi/HostapdHalAidlImp.java b/service/java/com/android/server/wifi/HostapdHalAidlImp.java
deleted file mode 100644
index 3b1af86..0000000
--- a/service/java/com/android/server/wifi/HostapdHalAidlImp.java
+++ /dev/null
@@ -1,973 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import android.annotation.NonNull;
-import android.content.Context;
-import android.hardware.wifi.hostapd.ApInfo;
-import android.hardware.wifi.hostapd.BandMask;
-import android.hardware.wifi.hostapd.ChannelBandwidth;
-import android.hardware.wifi.hostapd.ChannelParams;
-import android.hardware.wifi.hostapd.ClientInfo;
-import android.hardware.wifi.hostapd.DebugLevel;
-import android.hardware.wifi.hostapd.EncryptionType;
-import android.hardware.wifi.hostapd.FrequencyRange;
-import android.hardware.wifi.hostapd.Generation;
-import android.hardware.wifi.hostapd.HwModeParams;
-import android.hardware.wifi.hostapd.IHostapd;
-import android.hardware.wifi.hostapd.IHostapdCallback;
-import android.hardware.wifi.hostapd.Ieee80211ReasonCode;
-import android.hardware.wifi.hostapd.IfaceParams;
-import android.hardware.wifi.hostapd.NetworkParams;
-import android.net.MacAddress;
-import android.net.wifi.ScanResult;
-import android.net.wifi.SoftApConfiguration;
-import android.net.wifi.SoftApConfiguration.BandType;
-import android.net.wifi.SoftApInfo;
-import android.net.wifi.WifiAnnotations;
-import android.net.wifi.WifiManager;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.IBinder.DeathRecipient;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.ServiceSpecificException;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.WifiNative.HostapdDeathEventHandler;
-import com.android.server.wifi.util.ApConfigUtil;
-import com.android.server.wifi.util.NativeUtil;
-import com.android.wifi.resources.R;
-
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.annotation.concurrent.ThreadSafe;
-
-/**
- * To maintain thread-safety, the locking protocol is that every non-static method (regardless of
- * access level) acquires mLock.
- */
-@ThreadSafe
-/** The implementation of IHostapdHal which based on Stable AIDL interface */
-public class HostapdHalAidlImp implements IHostapdHal {
-    private static final String TAG = "HostapdHalAidlImp";
-    private static final String HAL_INSTANCE_NAME = IHostapd.DESCRIPTOR + "/default";
-    @VisibleForTesting
-    public static final long WAIT_FOR_DEATH_TIMEOUT_MS = 50L;
-
-    private final Object mLock = new Object();
-    private boolean mVerboseLoggingEnabled = false;
-    private boolean mVerboseHalLoggingEnabled = false;
-    private final Context mContext;
-    private final Handler mEventHandler;
-
-    // Hostapd HAL interface objects
-    private IHostapd mIHostapd;
-    private HashMap<String, Runnable> mSoftApFailureListeners = new HashMap<>();
-    private WifiNative.SoftApHalCallback mSoftApEventCallback;
-    private Set<String> mActiveInstances = new HashSet<>();
-    private HostapdDeathEventHandler mDeathEventHandler;
-    private boolean mServiceDeclared = false;
-    private CountDownLatch mWaitForDeathLatch;
-
-    /**
-     * Default death recipient. Called any time the service dies.
-     */
-    private class HostapdDeathRecipient implements DeathRecipient {
-        private final IBinder mWho;
-        @Override
-        /* Do nothing as we override the default function binderDied(IBinder who). */
-        public void binderDied() {
-            synchronized (mLock) {
-                Log.w(TAG, "IHostapd/IHostapd died. who " + mWho + " service "
-                        + getServiceBinderMockable());
-                if (mWho == getServiceBinderMockable()) {
-                    if (mWaitForDeathLatch != null) {
-                        mWaitForDeathLatch.countDown();
-                    }
-                    mEventHandler.post(() -> {
-                        synchronized (mLock) {
-                            Log.w(TAG, "Handle IHostapd/IHostapd died.");
-                            hostapdServiceDiedHandler(mWho);
-                        }
-                    });
-                }
-            }
-        }
-
-        HostapdDeathRecipient(IBinder who) {
-            mWho = who;
-        }
-    }
-
-    public HostapdHalAidlImp(@NonNull Context context, @NonNull Handler handler) {
-        mContext = context;
-        mEventHandler = handler;
-        Log.d(TAG, "init HostapdHalAidlImp");
-    }
-
-    /**
-     * Enable/Disable verbose logging.
-     *
-     * @param enable true to enable, false to disable.
-     */
-    @Override
-    public void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        synchronized (mLock) {
-            mVerboseLoggingEnabled = verboseEnabled;
-            mVerboseHalLoggingEnabled = halVerboseEnabled;
-            setDebugParams();
-        }
-    }
-
-    /**
-     * Returns whether or not the hostapd supports getting the AP info from the callback.
-     */
-    @Override
-    public boolean isApInfoCallbackSupported() {
-        // Supported in the AIDL implementation
-        return true;
-    }
-
-    /**
-     * Checks whether the IHostapd service is declared, and therefore should be available.
-     * @return true if the IHostapd service is declared
-     */
-    @Override
-    public boolean initialize() {
-        synchronized (mLock) {
-            if (mVerboseLoggingEnabled) {
-                Log.i(TAG, "Checking if IHostapd service is declared.");
-            }
-            mServiceDeclared = serviceDeclared();
-            return mServiceDeclared;
-        }
-    }
-
-    /**
-     * Register for callbacks with the hostapd service. On service-side event,
-     * the hostapd service will trigger our IHostapdCallback implementation, which
-     * in turn calls the proper SoftApHalCallback registered with us by WifiNative.
-     */
-    private boolean registerCallback(IHostapdCallback callback) {
-        synchronized (mLock) {
-            String methodStr = "registerCallback";
-            try {
-                mIHostapd.registerCallback(callback);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Register the provided callback handler for SoftAp events.
-     * <p>
-     * Note that only one callback can be registered at a time - any registration overrides previous
-     * registrations.
-     *
-     * @param ifaceName Name of the interface.
-     * @param listener Callback listener for AP events.
-     * @return true on success, false on failure.
-     */
-    @Override
-    public boolean registerApCallback(@NonNull String ifaceName,
-            @NonNull WifiNative.SoftApHalCallback callback) {
-        // TODO(b/195980798) : Create a hashmap to associate the listener with the ifaceName
-        synchronized (mLock) {
-            if (callback == null) {
-                Log.e(TAG, "registerApCallback called with a null callback");
-                return false;
-            }
-            mSoftApEventCallback = callback;
-            Log.i(TAG, "registerApCallback Successful in " + ifaceName);
-            return true;
-        }
-    }
-
-    /**
-     * Add and start a new access point.
-     *
-     * @param ifaceName Name of the interface.
-     * @param config Configuration to use for the AP.
-     * @param isMetered Indicates if the network is metered or not.
-     * @param onFailureListener A runnable to be triggered on failure.
-     * @return true on success, false otherwise.
-     */
-    @Override
-    public boolean addAccessPoint(@NonNull String ifaceName, @NonNull SoftApConfiguration config,
-            boolean isMetered, Runnable onFailureListener) {
-        synchronized (mLock) {
-            final String methodStr = "addAccessPoint";
-            Log.d(TAG, methodStr + ": " + ifaceName);
-            if (!checkHostapdAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                IfaceParams ifaceParams = prepareIfaceParams(ifaceName, config);
-                NetworkParams nwParams = prepareNetworkParams(isMetered, config);
-                if (ifaceParams == null || nwParams == null) {
-                    Log.e(TAG, "addAccessPoint parameters could not be prepared.");
-                    return false;
-                }
-                mIHostapd.addAccessPoint(ifaceParams, nwParams);
-                mSoftApFailureListeners.put(ifaceName, onFailureListener);
-                return true;
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Unrecognized apBand: " + config.getBand());
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Remove a previously started access point.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    @Override
-    public boolean removeAccessPoint(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "removeAccessPoint";
-            if (!checkHostapdAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mSoftApFailureListeners.remove(ifaceName);
-                mSoftApEventCallback = null;
-                mIHostapd.removeAccessPoint(ifaceName);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Remove a previously connected client.
-     *
-     * @param ifaceName Name of the interface.
-     * @param client Mac Address of the client.
-     * @param reasonCode One of disconnect reason code which defined in {@link WifiManager}.
-     * @return true on success, false otherwise.
-     */
-    @Override
-    public boolean forceClientDisconnect(@NonNull String ifaceName,
-            @NonNull MacAddress client, int reasonCode) {
-        synchronized (mLock) {
-            final String methodStr = "forceClientDisconnect";
-            try {
-                if (!checkHostapdAndLogFailure(methodStr)) {
-                    return false;
-                }
-                byte[] clientMacByteArray = client.toByteArray();
-                int disconnectReason;
-                switch (reasonCode) {
-                    case WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER:
-                        disconnectReason = Ieee80211ReasonCode.WLAN_REASON_PREV_AUTH_NOT_VALID;
-                        break;
-                    case WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS:
-                        disconnectReason = Ieee80211ReasonCode.WLAN_REASON_DISASSOC_AP_BUSY;
-                        break;
-                    case WifiManager.SAP_CLIENT_DISCONNECT_REASON_CODE_UNSPECIFIED:
-                        disconnectReason = Ieee80211ReasonCode.WLAN_REASON_UNSPECIFIED;
-                        break;
-                    default:
-                        throw new IllegalArgumentException(
-                                "Unknown disconnect reason code:" + reasonCode);
-                }
-                mIHostapd.forceClientDisconnect(ifaceName, clientMacByteArray, disconnectReason);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Registers a death notification for hostapd.
-     * @return Returns true on success.
-     */
-    @Override
-    public boolean registerDeathHandler(@NonNull HostapdDeathEventHandler handler) {
-        synchronized (mLock) {
-            if (mDeathEventHandler != null) {
-                Log.e(TAG, "Death handler already present");
-            }
-            mDeathEventHandler = handler;
-            return true;
-        }
-    }
-
-    /**
-     * Deregisters a death notification for hostapd.
-     * @return Returns true on success.
-     */
-    @Override
-    public boolean deregisterDeathHandler() {
-        synchronized (mLock) {
-            if (mDeathEventHandler == null) {
-                Log.e(TAG, "No Death handler present");
-                return false;
-            }
-            mDeathEventHandler = null;
-            return true;
-        }
-    }
-
-    /**
-     * Handle hostapd death.
-     */
-    private void hostapdServiceDiedHandler(IBinder who) {
-        synchronized (mLock) {
-            if (who != getServiceBinderMockable()) {
-                Log.w(TAG, "Ignoring stale death recipient notification");
-                return;
-            }
-            mIHostapd = null;
-            if (mDeathEventHandler != null) {
-                mDeathEventHandler.onDeath();
-            }
-        }
-    }
-
-    private class HostapdCallback extends IHostapdCallback.Stub {
-        @Override
-        public void onFailure(String ifaceName, String instanceName) {
-            Log.w(TAG, "Failure on iface " + ifaceName + ", instance: " + instanceName);
-            Runnable onFailureListener = mSoftApFailureListeners.get(ifaceName);
-            if (onFailureListener != null) {
-                mActiveInstances.remove(instanceName);
-                if (mActiveInstances.size() == 0) {
-                    onFailureListener.run();
-                } else if (mSoftApEventCallback != null) {
-                    mSoftApEventCallback.onInstanceFailure(instanceName);
-                }
-            }
-        }
-
-        @Override
-        public void onApInstanceInfoChanged(ApInfo info) {
-            Log.v(TAG, "onApInstanceInfoChanged on " + info.ifaceName + " / "
-                    + info.apIfaceInstance);
-            try {
-                if (mSoftApEventCallback != null) {
-                    mSoftApEventCallback.onInfoChanged(info.apIfaceInstance, info.freqMhz,
-                            mapHalChannelBandwidthToSoftApInfo(info.channelBandwidth),
-                            mapHalGenerationToWifiStandard(info.generation),
-                            MacAddress.fromBytes(info.apIfaceInstanceMacAddress));
-                }
-                mActiveInstances.add(info.apIfaceInstance);
-            } catch (IllegalArgumentException iae) {
-                Log.e(TAG, " Invalid apIfaceInstanceMacAddress, " + iae);
-            }
-        }
-
-        @Override
-        public void onConnectedClientsChanged(ClientInfo info) {
-            try {
-                Log.d(TAG, "onConnectedClientsChanged on " + info.ifaceName
-                        + " / " + info.apIfaceInstance
-                        + " and Mac is " + MacAddress.fromBytes(info.clientAddress).toString()
-                        + " isConnected: " + info.isConnected);
-                if (mSoftApEventCallback != null) {
-                    mSoftApEventCallback.onConnectedClientsChanged(info.apIfaceInstance,
-                            MacAddress.fromBytes(info.clientAddress), info.isConnected);
-                }
-            } catch (IllegalArgumentException iae) {
-                Log.e(TAG, " Invalid clientAddress, " + iae);
-            }
-        }
-
-        @Override
-        public String getInterfaceHash() {
-            return IHostapdCallback.HASH;
-        }
-
-        @Override
-        public int getInterfaceVersion() {
-            return IHostapdCallback.VERSION;
-        }
-    }
-
-    /**
-     * Signals whether Initialization started and found the declared service
-     */
-    @Override
-    public boolean isInitializationStarted() {
-        synchronized (mLock) {
-            return mServiceDeclared;
-        }
-    }
-
-    /**
-     * Signals whether Initialization completed successfully.
-     */
-    @Override
-    public boolean isInitializationComplete() {
-        synchronized (mLock) {
-            return mIHostapd != null;
-        }
-    }
-
-    /**
-     * Indicates whether the AIDL service is declared
-     */
-    public static boolean serviceDeclared() {
-        // Service Manager API ServiceManager#isDeclared supported after T.
-        if (!SdkLevel.isAtLeastT()) {
-            return false;
-        }
-        return ServiceManager.isDeclared(HAL_INSTANCE_NAME);
-    }
-
-    /**
-     * Wrapper functions created to be mockable in unit tests
-     */
-    @VisibleForTesting
-    protected IBinder getServiceBinderMockable() {
-        synchronized (mLock) {
-            if (mIHostapd == null) return null;
-            return mIHostapd.asBinder();
-        }
-    }
-
-    @VisibleForTesting
-    protected IHostapd getHostapdMockable() {
-        synchronized (mLock) {
-            return IHostapd.Stub.asInterface(
-                    ServiceManager.waitForDeclaredService(HAL_INSTANCE_NAME));
-        }
-    }
-
-    /**
-     * Start hostapd daemon
-     *
-     * @return true when succeed, otherwise false.
-     */
-    @Override
-    public boolean startDaemon() {
-        synchronized (mLock) {
-            final String methodStr = "startDaemon";
-            mIHostapd = getHostapdMockable();
-            if (mIHostapd == null) {
-                Log.e(TAG, "Service hostapd wasn't found.");
-                return false;
-            }
-            Log.i(TAG, "Obtained IHostApd binder.");
-
-            try {
-                IBinder serviceBinder = getServiceBinderMockable();
-                if (serviceBinder == null) return false;
-                mWaitForDeathLatch = null;
-                serviceBinder.linkToDeath(new HostapdDeathRecipient(serviceBinder), /* flags= */ 0);
-                setDebugParams();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-
-            if (!registerCallback(new HostapdCallback())) {
-                Log.e(TAG, "Failed to register callback, stopping hostapd AIDL startup");
-                mIHostapd = null;
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Terminate the hostapd daemon & wait for it's death.
-     */
-    @Override
-    public void terminate() {
-        synchronized (mLock) {
-            final String methodStr = "terminate";
-            if (!checkHostapdAndLogFailure(methodStr)) {
-                return;
-            }
-            Log.i(TAG, "Terminate HostApd Service.");
-            try {
-                mWaitForDeathLatch = new CountDownLatch(1);
-                mIHostapd.terminate();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            }
-        }
-
-        // Now wait for death listener callback to confirm that it's dead.
-        try {
-            if (!mWaitForDeathLatch.await(WAIT_FOR_DEATH_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
-                Log.w(TAG, "Timed out waiting for confirmation of hostapd death");
-            } else {
-                Log.d(TAG, "Got service death confirmation");
-            }
-        } catch (InterruptedException e) {
-            Log.w(TAG, "Failed to wait for hostapd death");
-        }
-    }
-
-    private void handleRemoteException(RemoteException e, String methodStr) {
-        synchronized (mLock) {
-            hostapdServiceDiedHandler(getServiceBinderMockable());
-            Log.e(TAG, "IHostapd." + methodStr + " failed with exception", e);
-        }
-    }
-
-    /**
-     * Set the debug log level for hostapd.
-     *
-     * @return true if request is sent successfully, false otherwise.
-     */
-    private boolean setDebugParams() {
-        synchronized (mLock) {
-            final String methodStr = "setDebugParams";
-            if (!checkHostapdAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mIHostapd.setDebugParams(mVerboseHalLoggingEnabled
-                        ? DebugLevel.DEBUG : DebugLevel.INFO);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    private static int getEncryptionType(SoftApConfiguration localConfig) {
-        int encryptionType;
-        switch (localConfig.getSecurityType()) {
-            case SoftApConfiguration.SECURITY_TYPE_OPEN:
-                encryptionType = EncryptionType.NONE;
-                break;
-            case SoftApConfiguration.SECURITY_TYPE_WPA2_PSK:
-                encryptionType = EncryptionType.WPA2;
-                break;
-            case SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION:
-                encryptionType = EncryptionType.WPA3_SAE_TRANSITION;
-                break;
-            case SoftApConfiguration.SECURITY_TYPE_WPA3_SAE:
-                encryptionType = EncryptionType.WPA3_SAE;
-                break;
-            case SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION:
-                encryptionType = EncryptionType.WPA3_OWE_TRANSITION;
-                break;
-            case SoftApConfiguration.SECURITY_TYPE_WPA3_OWE:
-                encryptionType = EncryptionType.WPA3_OWE;
-                break;
-            default:
-                // We really shouldn't default to None, but this was how NetworkManagementService
-                // used to do this.
-                encryptionType = EncryptionType.NONE;
-                break;
-        }
-        return encryptionType;
-    }
-
-    private static int getHalBandMask(int apBand) throws IllegalArgumentException {
-        int bandMask = 0;
-
-        if (!ApConfigUtil.isBandValid(apBand)) {
-            throw new IllegalArgumentException();
-        }
-
-        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_2GHZ)) {
-            bandMask |= BandMask.BAND_2_GHZ;
-        }
-        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_5GHZ)) {
-            bandMask |= BandMask.BAND_5_GHZ;
-        }
-        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_6GHZ)) {
-            bandMask |= BandMask.BAND_6_GHZ;
-        }
-        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_60GHZ)) {
-            bandMask |= BandMask.BAND_60_GHZ;
-        }
-
-        return bandMask;
-    }
-
-   /**
-     * Prepare the acsChannelFreqRangesMhz in ChannelParams.
-     */
-    private void prepareAcsChannelFreqRangesMhz(ChannelParams channelParams,
-            @BandType int band, SoftApConfiguration config) {
-        List<FrequencyRange> ranges = new ArrayList<>();
-        if ((band & SoftApConfiguration.BAND_2GHZ) != 0) {
-            ranges.addAll(toAcsFreqRanges(SoftApConfiguration.BAND_2GHZ, config));
-        }
-        if ((band & SoftApConfiguration.BAND_5GHZ) != 0) {
-            ranges.addAll(toAcsFreqRanges(SoftApConfiguration.BAND_5GHZ, config));
-        }
-        if ((band & SoftApConfiguration.BAND_6GHZ) != 0) {
-            ranges.addAll(toAcsFreqRanges(SoftApConfiguration.BAND_6GHZ, config));
-        }
-        channelParams.acsChannelFreqRangesMhz = ranges.toArray(
-                new FrequencyRange[ranges.size()]);
-    }
-
-    /**
-     * Convert OEM and SoftApConfiguration channel restrictions to a list of FreqRanges
-     */
-    private List<FrequencyRange> toAcsFreqRanges(@BandType int band, SoftApConfiguration config) {
-        List<Integer> allowedChannelList;
-        List<FrequencyRange> frequencyRanges = new ArrayList<>();
-
-        if (!ApConfigUtil.isBandValid(band) || ApConfigUtil.isMultiband(band)) {
-            Log.e(TAG, "Invalid band : " + band);
-            return frequencyRanges;
-        }
-
-        String oemConfig;
-        switch (band) {
-            case SoftApConfiguration.BAND_2GHZ:
-                oemConfig = mContext.getResources().getString(
-                        R.string.config_wifiSoftap2gChannelList);
-                break;
-            case SoftApConfiguration.BAND_5GHZ:
-                oemConfig = mContext.getResources().getString(
-                        R.string.config_wifiSoftap5gChannelList);
-                break;
-            case SoftApConfiguration.BAND_6GHZ:
-                oemConfig = mContext.getResources().getString(
-                        R.string.config_wifiSoftap6gChannelList);
-                break;
-            default:
-                return frequencyRanges;
-        }
-
-        allowedChannelList = ApConfigUtil.collectAllowedAcsChannels(band, oemConfig,
-                SdkLevel.isAtLeastT()
-                        ? config.getAllowedAcsChannels(band) : new int[] {});
-        if (allowedChannelList.isEmpty()) {
-            Log.e(TAG, "Empty list of allowed channels");
-            return frequencyRanges;
-        }
-        Collections.sort(allowedChannelList);
-
-        // Convert the sorted list to a set of frequency ranges
-        boolean rangeStarted = false;
-        int prevChannel = -1;
-        FrequencyRange freqRange = null;
-        for (int channel : allowedChannelList) {
-            // Continuation of an existing frequency range
-            if (rangeStarted) {
-                if (channel == prevChannel + 1) {
-                    prevChannel = channel;
-                    continue;
-                }
-
-                // End of the existing frequency range
-                freqRange.endMhz = ApConfigUtil.convertChannelToFrequency(prevChannel, band);
-                frequencyRanges.add(freqRange);
-                // We will continue to start a new frequency range
-            }
-
-            // Beginning of a new frequency range
-            freqRange = new FrequencyRange();
-            freqRange.startMhz = ApConfigUtil.convertChannelToFrequency(channel, band);
-            rangeStarted = true;
-            prevChannel = channel;
-        }
-
-        // End the last range
-        freqRange.endMhz = ApConfigUtil.convertChannelToFrequency(prevChannel, band);
-        frequencyRanges.add(freqRange);
-
-        return frequencyRanges;
-    }
-
-    /**
-     * Map hal bandwidth to SoftApInfo.
-     *
-     * @param bandwidth The channel bandwidth of the AP which is defined in the HAL.
-     * @return The channel bandwidth in the SoftApinfo.
-     */
-    @VisibleForTesting
-    public int mapHalChannelBandwidthToSoftApInfo(int channelBandwidth) {
-        switch (channelBandwidth) {
-            case ChannelBandwidth.BANDWIDTH_20_NOHT:
-                return SoftApInfo.CHANNEL_WIDTH_20MHZ_NOHT;
-            case ChannelBandwidth.BANDWIDTH_20:
-                return SoftApInfo.CHANNEL_WIDTH_20MHZ;
-            case ChannelBandwidth.BANDWIDTH_40:
-                return SoftApInfo.CHANNEL_WIDTH_40MHZ;
-            case ChannelBandwidth.BANDWIDTH_80:
-                return SoftApInfo.CHANNEL_WIDTH_80MHZ;
-            case ChannelBandwidth.BANDWIDTH_80P80:
-                return SoftApInfo.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
-            case ChannelBandwidth.BANDWIDTH_160:
-                return SoftApInfo.CHANNEL_WIDTH_160MHZ;
-            case ChannelBandwidth.BANDWIDTH_320:
-                return SoftApInfo.CHANNEL_WIDTH_320MHZ;
-            case ChannelBandwidth.BANDWIDTH_2160:
-                return SoftApInfo.CHANNEL_WIDTH_2160MHZ;
-            case ChannelBandwidth.BANDWIDTH_4320:
-                return SoftApInfo.CHANNEL_WIDTH_4320MHZ;
-            case ChannelBandwidth.BANDWIDTH_6480:
-                return SoftApInfo.CHANNEL_WIDTH_6480MHZ;
-            case ChannelBandwidth.BANDWIDTH_8640:
-                return SoftApInfo.CHANNEL_WIDTH_8640MHZ;
-            default:
-                return SoftApInfo.CHANNEL_WIDTH_INVALID;
-        }
-    }
-
-    /**
-     * Map SoftApInfo bandwidth to hal.
-     *
-     * @param channelBandwidth The channel bandwidth as defined in SoftApInfo
-     * @return The channel bandwidth as defined in hal
-     */
-    @VisibleForTesting
-    public int mapSoftApInfoBandwidthToHal(@WifiAnnotations.Bandwidth int channelBandwidth) {
-        switch (channelBandwidth) {
-            case SoftApInfo.CHANNEL_WIDTH_AUTO:
-                return ChannelBandwidth.BANDWIDTH_AUTO;
-            case SoftApInfo.CHANNEL_WIDTH_20MHZ_NOHT:
-                return ChannelBandwidth.BANDWIDTH_20_NOHT;
-            case SoftApInfo.CHANNEL_WIDTH_20MHZ:
-                return ChannelBandwidth.BANDWIDTH_20;
-            case SoftApInfo.CHANNEL_WIDTH_40MHZ:
-                return ChannelBandwidth.BANDWIDTH_40;
-            case SoftApInfo.CHANNEL_WIDTH_80MHZ:
-                return ChannelBandwidth.BANDWIDTH_80;
-            case SoftApInfo.CHANNEL_WIDTH_80MHZ_PLUS_MHZ:
-                return ChannelBandwidth.BANDWIDTH_80P80;
-            case SoftApInfo.CHANNEL_WIDTH_160MHZ:
-                return ChannelBandwidth.BANDWIDTH_160;
-            case SoftApInfo.CHANNEL_WIDTH_320MHZ:
-                return ChannelBandwidth.BANDWIDTH_320;
-            case SoftApInfo.CHANNEL_WIDTH_2160MHZ:
-                return ChannelBandwidth.BANDWIDTH_2160;
-            case SoftApInfo.CHANNEL_WIDTH_4320MHZ:
-                return ChannelBandwidth.BANDWIDTH_4320;
-            case SoftApInfo.CHANNEL_WIDTH_6480MHZ:
-                return ChannelBandwidth.BANDWIDTH_6480;
-            case SoftApInfo.CHANNEL_WIDTH_8640MHZ:
-                return ChannelBandwidth.BANDWIDTH_8640;
-            default:
-                return ChannelBandwidth.BANDWIDTH_INVALID;
-        }
-    }
-
-    /**
-     * Map hal generation to wifi standard.
-     *
-     * @param generation The operation mode of the AP which is defined in HAL.
-     * @return The wifi standard in the ScanResult.
-     */
-    @VisibleForTesting
-    public int mapHalGenerationToWifiStandard(int generation) {
-        switch (generation) {
-            case Generation.WIFI_STANDARD_LEGACY:
-                return ScanResult.WIFI_STANDARD_LEGACY;
-            case Generation.WIFI_STANDARD_11N:
-                return ScanResult.WIFI_STANDARD_11N;
-            case Generation.WIFI_STANDARD_11AC:
-                return ScanResult.WIFI_STANDARD_11AC;
-            case Generation.WIFI_STANDARD_11AX:
-                return ScanResult.WIFI_STANDARD_11AX;
-            case Generation.WIFI_STANDARD_11BE:
-                return ScanResult.WIFI_STANDARD_11BE;
-            case Generation.WIFI_STANDARD_11AD:
-                return ScanResult.WIFI_STANDARD_11AD;
-            default:
-                return ScanResult.WIFI_STANDARD_UNKNOWN;
-        }
-    }
-
-    private NetworkParams prepareNetworkParams(boolean isMetered,
-            SoftApConfiguration config) {
-        NetworkParams nwParams = new NetworkParams();
-        ArrayList<Byte> ssid = NativeUtil.byteArrayToArrayList(config.getWifiSsid().getBytes());
-        nwParams.ssid = new byte[ssid.size()];
-        for (int i = 0; i < ssid.size(); i++) {
-            nwParams.ssid[i] = ssid.get(i);
-        }
-
-        final List<ScanResult.InformationElement> elements = config.getVendorElementsInternal();
-        int totalLen = 0;
-        for (ScanResult.InformationElement e : elements) {
-            totalLen += 2 + e.bytes.length; // 1 byte ID + 1 byte payload len + payload
-        }
-        nwParams.vendorElements = new byte[totalLen];
-        int i = 0;
-        for (ScanResult.InformationElement e : elements) {
-            nwParams.vendorElements[i++] = (byte) e.id;
-            nwParams.vendorElements[i++] = (byte) e.bytes.length;
-            for (int j = 0; j < e.bytes.length; j++) {
-                nwParams.vendorElements[i++] = e.bytes[j];
-            }
-        }
-
-        nwParams.isMetered = isMetered;
-        nwParams.isHidden = config.isHiddenSsid();
-        nwParams.encryptionType = getEncryptionType(config);
-        nwParams.passphrase = (config.getPassphrase() != null)
-                    ? config.getPassphrase() : "";
-
-        if (nwParams.ssid == null || nwParams.passphrase == null) {
-            return null;
-        }
-        return nwParams;
-    }
-
-    private IfaceParams prepareIfaceParams(String ifaceName, SoftApConfiguration config)
-            throws IllegalArgumentException {
-        IfaceParams ifaceParams = new IfaceParams();
-        ifaceParams.name = ifaceName;
-        ifaceParams.hwModeParams = prepareHwModeParams(config);
-        ifaceParams.channelParams = prepareChannelParamsList(config);
-        if (ifaceParams.name == null || ifaceParams.hwModeParams == null
-                || ifaceParams.channelParams == null) {
-            return null;
-        }
-        return ifaceParams;
-    }
-
-    private HwModeParams prepareHwModeParams(SoftApConfiguration config) {
-        HwModeParams hwModeParams = new HwModeParams();
-        hwModeParams.enable80211N = true;
-        hwModeParams.enable80211AC = mContext.getResources().getBoolean(
-                R.bool.config_wifi_softap_ieee80211ac_supported);
-        hwModeParams.enable80211AX = ApConfigUtil.isIeee80211axSupported(mContext);
-        //Update 80211ax support with the configuration.
-        hwModeParams.enable80211AX &= config.isIeee80211axEnabledInternal();
-        hwModeParams.enable6GhzBand = ApConfigUtil.isBandSupported(
-                SoftApConfiguration.BAND_6GHZ, mContext);
-        hwModeParams.enableHeSingleUserBeamformer = mContext.getResources().getBoolean(
-                R.bool.config_wifiSoftapHeSuBeamformerSupported);
-        hwModeParams.enableHeSingleUserBeamformee = mContext.getResources().getBoolean(
-                R.bool.config_wifiSoftapHeSuBeamformeeSupported);
-        hwModeParams.enableHeMultiUserBeamformer = mContext.getResources().getBoolean(
-                R.bool.config_wifiSoftapHeMuBeamformerSupported);
-        hwModeParams.enableHeTargetWakeTime = mContext.getResources().getBoolean(
-                R.bool.config_wifiSoftapHeTwtSupported);
-        hwModeParams.enable80211BE = ApConfigUtil.isIeee80211beSupported(mContext);
-        //Update 80211be support with the configuration.
-        hwModeParams.enable80211BE &= config.isIeee80211beEnabledInternal();
-
-        if (SdkLevel.isAtLeastT()) {
-            hwModeParams.maximumChannelBandwidth =
-                    mapSoftApInfoBandwidthToHal(config.getMaxChannelBandwidth());
-        } else {
-            hwModeParams.maximumChannelBandwidth = ChannelBandwidth.BANDWIDTH_AUTO;
-        }
-        return hwModeParams;
-    }
-
-    private ChannelParams[] prepareChannelParamsList(SoftApConfiguration config)
-            throws IllegalArgumentException {
-        int nChannels = 1;
-        boolean repeatBand = false;
-        if (SdkLevel.isAtLeastS()) {
-            nChannels = config.getChannels().size();
-        }
-        if (config.getSecurityType()
-                == SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION) {
-            nChannels = 2;
-            repeatBand = true;
-        }
-        ChannelParams[] channelParamsList = new ChannelParams[nChannels];
-        for (int i = 0; i < nChannels; i++) {
-            int band = config.getBand();
-            int channel = config.getChannel();
-            if (SdkLevel.isAtLeastS() && !repeatBand) {
-                band = config.getChannels().keyAt(i);
-                channel = config.getChannels().valueAt(i);
-            }
-            channelParamsList[i] = new ChannelParams();
-            channelParamsList[i].channel = channel;
-            channelParamsList[i].enableAcs = ApConfigUtil.isAcsSupported(mContext)
-                    && channel == 0;
-            channelParamsList[i].bandMask = getHalBandMask(band);
-            channelParamsList[i].acsChannelFreqRangesMhz = new FrequencyRange[0];
-            if (channelParamsList[i].enableAcs) {
-                channelParamsList[i].acsShouldExcludeDfs = !mContext.getResources()
-                        .getBoolean(R.bool.config_wifiSoftapAcsIncludeDfs);
-                if (ApConfigUtil.isSendFreqRangesNeeded(band, mContext, config)) {
-                    prepareAcsChannelFreqRangesMhz(channelParamsList[i], band, config);
-                }
-            }
-            if (channelParamsList[i].acsChannelFreqRangesMhz == null) {
-                return null;
-            }
-        }
-        return channelParamsList;
-    }
-
-    /**
-     * Returns false if Hostapd is null, and logs failure to call methodStr
-     */
-    private boolean checkHostapdAndLogFailure(String methodStr) {
-        synchronized (mLock) {
-            if (mIHostapd == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", IHostapd is null");
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Logs failure for a service specific exception. Error codes are defined in HostapdStatusCode
-     */
-    private void handleServiceSpecificException(
-            ServiceSpecificException exception, String methodStr) {
-        synchronized (mLock) {
-            Log.e(TAG, "IHostapd." + methodStr + " failed: " + exception.toString());
-        }
-    }
-
-    /**
-     * Dump information about the AIDL implementation.
-     *
-     * TODO (b/202302891) Log version information once we freeze the AIDL interface
-     */
-    public void dump(PrintWriter pw) {
-        pw.println("AIDL interface version: 1 (initial)");
-    }
-}
diff --git a/service/java/com/android/server/wifi/HostapdHalHidlImp.java b/service/java/com/android/server/wifi/HostapdHalHidlImp.java
deleted file mode 100644
index 4c9d8e4..0000000
--- a/service/java/com/android/server/wifi/HostapdHalHidlImp.java
+++ /dev/null
@@ -1,1334 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import android.annotation.NonNull;
-import android.content.Context;
-import android.hardware.wifi.hostapd.V1_0.HostapdStatus;
-import android.hardware.wifi.hostapd.V1_0.HostapdStatusCode;
-import android.hardware.wifi.hostapd.V1_0.IHostapd;
-import android.hardware.wifi.hostapd.V1_2.DebugLevel;
-import android.hardware.wifi.hostapd.V1_2.Ieee80211ReasonCode;
-import android.hardware.wifi.hostapd.V1_3.Bandwidth;
-import android.hardware.wifi.hostapd.V1_3.Generation;
-import android.hidl.manager.V1_0.IServiceManager;
-import android.hidl.manager.V1_0.IServiceNotification;
-import android.net.MacAddress;
-import android.net.wifi.ScanResult;
-import android.net.wifi.SoftApConfiguration;
-import android.net.wifi.SoftApConfiguration.BandType;
-import android.net.wifi.SoftApInfo;
-import android.net.wifi.WifiManager;
-import android.os.Handler;
-import android.os.IHwBinder.DeathRecipient;
-import android.os.RemoteException;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.WifiNative.HostapdDeathEventHandler;
-import com.android.server.wifi.WifiNative.SoftApHalCallback;
-import com.android.server.wifi.util.ApConfigUtil;
-import com.android.server.wifi.util.NativeUtil;
-import com.android.wifi.resources.R;
-
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Random;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.annotation.concurrent.ThreadSafe;
-
-/**
- * To maintain thread-safety, the locking protocol is that every non-static method (regardless of
- * access level) acquires mLock.
- */
-@ThreadSafe
-/** The implementation of IHostapdHal which based on HIDL interface */
-public class HostapdHalHidlImp implements IHostapdHal {
-    private static final String TAG = "HostapdHalHidlImp";
-    @VisibleForTesting
-    public static final String HAL_INSTANCE_NAME = "default";
-    @VisibleForTesting
-    public static final long WAIT_FOR_DEATH_TIMEOUT_MS = 50L;
-
-    private final Object mLock = new Object();
-    private boolean mVerboseLoggingEnabled = false;
-    private boolean mVerboseHalLoggingEnabled = false;
-    private final Context mContext;
-    private final Handler mEventHandler;
-
-    // Hostapd HAL interface objects
-    private IServiceManager mIServiceManager;
-    private IHostapd mIHostapd;
-    private HashMap<String, Runnable> mSoftApFailureListeners = new HashMap<>();
-    private SoftApHalCallback mSoftApEventListener;
-    private HostapdDeathEventHandler mDeathEventHandler;
-    private ServiceManagerDeathRecipient mServiceManagerDeathRecipient;
-    private HostapdDeathRecipient mHostapdDeathRecipient;
-    // Death recipient cookie registered for current hostapd instance.
-    private long mDeathRecipientCookie = 0;
-
-    private final IServiceNotification mServiceNotificationCallback =
-            new IServiceNotification.Stub() {
-        public void onRegistration(String fqName, String name, boolean preexisting) {
-            synchronized (mLock) {
-                if (mVerboseLoggingEnabled) {
-                    Log.i(TAG, "IServiceNotification.onRegistration for: " + fqName
-                            + ", " + name + " preexisting=" + preexisting);
-                }
-                if (!initHostapdService()) {
-                    Log.e(TAG, "initalizing IHostapd failed.");
-                    hostapdServiceDiedHandler(mDeathRecipientCookie);
-                } else {
-                    Log.i(TAG, "Completed initialization of IHostapd.");
-                }
-            }
-        }
-    };
-
-    private class ServiceManagerDeathRecipient implements DeathRecipient {
-        @Override
-        public void serviceDied(long cookie) {
-            mEventHandler.post(() -> {
-                synchronized (mLock) {
-                    Log.w(TAG, "IServiceManager died: cookie=" + cookie);
-                    hostapdServiceDiedHandler(mDeathRecipientCookie);
-                    mIServiceManager = null; // Will need to register a new ServiceNotification
-                }
-            });
-        }
-    }
-
-    private class HostapdDeathRecipient implements DeathRecipient {
-        @Override
-        public void serviceDied(long cookie) {
-            mEventHandler.post(() -> {
-                synchronized (mLock) {
-                    Log.w(TAG, "IHostapd/IHostapd died: cookie=" + cookie);
-                    hostapdServiceDiedHandler(cookie);
-                }
-            });
-        }
-    }
-
-    public HostapdHalHidlImp(@NonNull Context context, @NonNull Handler handler) {
-        mContext = context;
-        mEventHandler = handler;
-        mServiceManagerDeathRecipient = new ServiceManagerDeathRecipient();
-        mHostapdDeathRecipient = new HostapdDeathRecipient();
-        Log.d(TAG, "init HostapdHalHidlImp");
-    }
-
-    /**
-     * Enable/Disable verbose logging.
-     *
-     * @param enable true to enable, false to disable.
-     */
-    @Override
-    public void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        synchronized (mLock) {
-            mVerboseLoggingEnabled = verboseEnabled;
-            mVerboseHalLoggingEnabled = halVerboseEnabled;
-            setDebugParams();
-        }
-    }
-
-    /**
-     *
-     * Uses the IServiceManager to check if the device is running V1_X of the HAL from the VINTF for
-     * the device.
-     * @return true if supported, false otherwise.
-     */
-    private boolean isV1_1() {
-        return checkHalVersionByInterfaceName(
-                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName);
-    }
-
-    private boolean isV1_2() {
-        return checkHalVersionByInterfaceName(
-                android.hardware.wifi.hostapd.V1_2.IHostapd.kInterfaceName);
-    }
-
-    private boolean isV1_3() {
-        return checkHalVersionByInterfaceName(
-                android.hardware.wifi.hostapd.V1_3.IHostapd.kInterfaceName);
-    }
-
-    private boolean checkHalVersionByInterfaceName(String interfaceName) {
-        synchronized (mLock) {
-            if (interfaceName == null) return false;
-            if (mIServiceManager == null) {
-                Log.e(TAG, "checkHalVersionByInterfaceName called but mServiceManager is null!?");
-                return false;
-            }
-            try {
-                return (mIServiceManager.getTransport(
-                        interfaceName,
-                        HAL_INSTANCE_NAME)
-                        != IServiceManager.Transport.EMPTY);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Exception while operating on IServiceManager: " + e);
-                handleRemoteException(e, "getTransport");
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Get HIDL interface version number.
-     * @return version number formatted as a string
-     */
-    private String getVersion() {
-        if (isV1_3()) {
-            return "1.3";
-        } else if (isV1_2()) {
-            return "1.2";
-        } else if (isV1_1()) {
-            return "1.1";
-        } else {
-            // Service exists, so at least V1_0 is supported
-            return "1.0";
-        }
-    }
-
-    /**
-     * Link to death for IServiceManager object.
-     * @return true on success, false otherwise.
-     */
-    private boolean linkToServiceManagerDeath() {
-        synchronized (mLock) {
-            if (mIServiceManager == null) return false;
-            try {
-                if (!mIServiceManager.linkToDeath(mServiceManagerDeathRecipient, 0)) {
-                    Log.wtf(TAG, "Error on linkToDeath on IServiceManager");
-                    hostapdServiceDiedHandler(mDeathRecipientCookie);
-                    mIServiceManager = null; // Will need to register a new ServiceNotification
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "IServiceManager.linkToDeath exception", e);
-                mIServiceManager = null; // Will need to register a new ServiceNotification
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Returns whether or not the hostapd supports getting the AP info from the callback.
-     */
-    @Override
-    public boolean isApInfoCallbackSupported() {
-        synchronized (mLock) {
-            return isV1_3();
-        }
-    }
-
-    /**
-     * Registers a service notification for the IHostapd service, which triggers initialization of
-     * the IHostapd
-     * @return true if the service notification was successfully registered
-     */
-    @Override
-    public boolean initialize() {
-        synchronized (mLock) {
-            if (mVerboseLoggingEnabled) {
-                Log.i(TAG, "Registering IHostapd service ready callback.");
-            }
-            mIHostapd = null;
-            if (mIServiceManager != null) {
-                // Already have an IServiceManager and serviceNotification registered, don't
-                // don't register another.
-                return true;
-            }
-            try {
-                mIServiceManager = getServiceManagerMockable();
-                if (mIServiceManager == null) {
-                    Log.e(TAG, "Failed to get HIDL Service Manager");
-                    return false;
-                }
-                if (!linkToServiceManagerDeath()) {
-                    return false;
-                }
-                /* TODO(b/33639391) : Use the new IHostapd.registerForNotifications() once it
-                   exists */
-                if (!mIServiceManager.registerForNotifications(
-                        IHostapd.kInterfaceName, "", mServiceNotificationCallback)) {
-                    Log.e(TAG, "Failed to register for notifications to "
-                            + IHostapd.kInterfaceName);
-                    mIServiceManager = null; // Will need to register a new ServiceNotification
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "Exception while trying to register a listener for IHostapd service: "
-                        + e);
-                hostapdServiceDiedHandler(mDeathRecipientCookie);
-                mIServiceManager = null; // Will need to register a new ServiceNotification
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Link to death for IHostapd object.
-     * @return true on success, false otherwise.
-     */
-    private boolean linkToHostapdDeath(DeathRecipient deathRecipient, long cookie) {
-        synchronized (mLock) {
-            if (mIHostapd == null) return false;
-            try {
-                if (!mIHostapd.linkToDeath(deathRecipient, cookie)) {
-                    Log.wtf(TAG, "Error on linkToDeath on IHostapd");
-                    hostapdServiceDiedHandler(mDeathRecipientCookie);
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "IHostapd.linkToDeath exception", e);
-                return false;
-            }
-            return true;
-        }
-    }
-
-    private boolean registerCallback(
-            android.hardware.wifi.hostapd.V1_1.IHostapdCallback callback) {
-        synchronized (mLock) {
-            String methodStr = "registerCallback_1_1";
-            try {
-                android.hardware.wifi.hostapd.V1_1.IHostapd iHostapdV1_1 = getHostapdMockableV1_1();
-                if (iHostapdV1_1 == null) return false;
-                HostapdStatus status =  iHostapdV1_1.registerCallback(callback);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    private boolean registerCallback_1_3(
-            android.hardware.wifi.hostapd.V1_3.IHostapdCallback callback) {
-        synchronized (mLock) {
-            String methodStr = "registerCallback_1_3";
-            try {
-                android.hardware.wifi.hostapd.V1_3.IHostapd iHostapdV1_3 = getHostapdMockableV1_3();
-                if (iHostapdV1_3 == null) return false;
-                android.hardware.wifi.hostapd.V1_2.HostapdStatus status =
-                        iHostapdV1_3.registerCallback_1_3(callback);
-                return checkStatusAndLogFailure12(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Initialize the IHostapd object.
-     * @return true on success, false otherwise.
-     */
-    private boolean initHostapdService() {
-        synchronized (mLock) {
-            try {
-                mIHostapd = getHostapdMockable();
-            } catch (RemoteException e) {
-                Log.e(TAG, "IHostapd.getService exception: " + e);
-                return false;
-            } catch (NoSuchElementException e) {
-                Log.e(TAG, "IHostapd.getService exception: " + e);
-                return false;
-            }
-            if (mIHostapd == null) {
-                Log.e(TAG, "Got null IHostapd service. Stopping hostapd HIDL startup");
-                return false;
-            }
-            if (!linkToHostapdDeath(mHostapdDeathRecipient, ++mDeathRecipientCookie)) {
-                Log.e(TAG, "Fail to link to Hostapd Death, Stopping hostapd HIDL startup");
-                mIHostapd = null;
-                return false;
-            }
-            // Register for callbacks for 1.1 hostapd.
-            if (isV1_3()) {
-                if (!registerCallback_1_3(new HostapdCallback_1_3())) {
-                    Log.e(TAG, "Fail to register Callback 1_3, Stopping hostapd HIDL startup");
-                    mIHostapd = null;
-                    return false;
-                }
-            } else if (isV1_1() && !registerCallback(new HostapdCallback())) {
-                Log.e(TAG, "Fail to register Callback, Stopping hostapd HIDL startup");
-                mIHostapd = null;
-                return false;
-            }
-
-            // Setup log level
-            setDebugParams();
-        }
-        return true;
-    }
-
-    /**
-     * Register the provided callback handler for SoftAp events.
-     * <p>
-     * Note that only one callback can be registered at a time - any registration overrides previous
-     * registrations.
-     *
-     * @param ifaceName Name of the interface.
-     * @param listener Callback listener for AP events.
-     * @return true on success, false on failure.
-     */
-    @Override
-    public boolean registerApCallback(@NonNull String ifaceName,
-            @NonNull SoftApHalCallback listener) {
-        synchronized (mLock) {
-            if (listener == null) {
-                Log.e(TAG, "registerApCallback called with a null callback");
-                return false;
-            }
-
-            if (!isV1_3()) {
-                Log.d(TAG, "The current HAL doesn't support event callback.");
-                return false;
-            }
-            mSoftApEventListener = listener;
-            Log.i(TAG, "registerApCallback Successful in " + ifaceName);
-            return true;
-        }
-    }
-
-    /**
-     * Add and start a new access point.
-     *
-     * @param ifaceName Name of the interface.
-     * @param config Configuration to use for the AP.
-     * @param isMetered Indicates the network is metered or not.
-     * @param onFailureListener A runnable to be triggered on failure.
-     * @return true on success, false otherwise.
-     */
-    @Override
-    public boolean addAccessPoint(@NonNull String ifaceName, @NonNull SoftApConfiguration config,
-            boolean isMetered, @NonNull Runnable onFailureListener) {
-        synchronized (mLock) {
-            final String methodStr = "addAccessPoint";
-            IHostapd.IfaceParams ifaceParamsV1_0 = prepareIfaceParamsV1_0(ifaceName, config);
-            android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams nwParamsV1_2 =
-                    prepareNetworkParamsV1_2(config);
-            if (nwParamsV1_2 == null) return false;
-            if (!checkHostapdAndLogFailure(methodStr)) return false;
-            try {
-                HostapdStatus status;
-                if (!isV1_1()) {
-                    // V1_0 case
-                    status = mIHostapd.addAccessPoint(ifaceParamsV1_0, nwParamsV1_2.V1_0);
-                    if (!checkStatusAndLogFailure(status, methodStr)) {
-                        return false;
-                    }
-                } else {
-                    android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams ifaceParamsV1_1 =
-                            prepareIfaceParamsV1_1(ifaceParamsV1_0, config);
-                    if (!isV1_2()) {
-                        // V1_1 case
-                        android.hardware.wifi.hostapd.V1_1.IHostapd iHostapdV1_1 =
-                                getHostapdMockableV1_1();
-                        if (iHostapdV1_1 == null) return false;
-                        status = iHostapdV1_1.addAccessPoint_1_1(ifaceParamsV1_1,
-                                nwParamsV1_2.V1_0);
-                        if (!checkStatusAndLogFailure(status, methodStr)) {
-                            return false;
-                        }
-                    } else {
-                        // V1_2 & V1_3 case
-                        android.hardware.wifi.hostapd.V1_2.HostapdStatus status12;
-                        android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams ifaceParamsV1_2 =
-                                prepareIfaceParamsV1_2(ifaceParamsV1_1, config);
-                        if (!isV1_3()) {
-                            // V1_2 case
-                            android.hardware.wifi.hostapd.V1_2.IHostapd iHostapdV1_2 =
-                                    getHostapdMockableV1_2();
-                            if (iHostapdV1_2 == null) return false;
-                            status12 = iHostapdV1_2.addAccessPoint_1_2(ifaceParamsV1_2,
-                                    nwParamsV1_2);
-                        } else {
-                            // V1_3 case
-                            android.hardware.wifi.hostapd.V1_3
-                                    .IHostapd.NetworkParams nwParamsV1_3 =
-                                    new android.hardware.wifi.hostapd.V1_3
-                                            .IHostapd.NetworkParams();
-                            nwParamsV1_3.V1_2 = nwParamsV1_2;
-                            nwParamsV1_3.isMetered = isMetered;
-                            android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams ifaceParams1_3 =
-                                    prepareIfaceParamsV1_3(ifaceParamsV1_2, config);
-                            android.hardware.wifi.hostapd.V1_3.IHostapd iHostapdV1_3 =
-                                    getHostapdMockableV1_3();
-                            if (iHostapdV1_3 == null) return false;
-                            status12 = iHostapdV1_3.addAccessPoint_1_3(ifaceParams1_3,
-                                    nwParamsV1_3);
-                        }
-                        if (!checkStatusAndLogFailure12(status12, methodStr)) {
-                            return false;
-                        }
-                    }
-                }
-
-                mSoftApFailureListeners.put(ifaceName, onFailureListener);
-                return true;
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Unrecognized apBand: " + config.getBand());
-                return false;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Remove a previously started access point.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    @Override
-    public boolean removeAccessPoint(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "removeAccessPoint";
-            if (!checkHostapdAndLogFailure(methodStr)) return false;
-            try {
-                HostapdStatus status = mIHostapd.removeAccessPoint(ifaceName);
-                if (!checkStatusAndLogFailure(status, methodStr)) {
-                    return false;
-                }
-                mSoftApFailureListeners.remove(ifaceName);
-                mSoftApEventListener = null;
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Remove a previously connected client.
-     *
-     * @param ifaceName Name of the interface.
-     * @param client Mac Address of the client.
-     * @param reasonCode One of disconnect reason code which defined in {@link WifiManager}.
-     * @return true on success, false otherwise.
-     */
-    @Override
-    public boolean forceClientDisconnect(@NonNull String ifaceName,
-            @NonNull MacAddress client, int reasonCode) {
-        synchronized (mLock) {
-            final String methodStr = "forceClientDisconnect";
-            if (isV1_2()) {
-                try {
-                    android.hardware.wifi.hostapd.V1_2.IHostapd iHostapdV1_2 =
-                            getHostapdMockableV1_2();
-                    if (iHostapdV1_2 == null) return false;
-                    byte[] clientMacByteArray = client.toByteArray();
-                    short disconnectReason;
-                    switch (reasonCode) {
-                        case WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER:
-                            disconnectReason = Ieee80211ReasonCode.WLAN_REASON_PREV_AUTH_NOT_VALID;
-                            break;
-                        case WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS:
-                            disconnectReason = Ieee80211ReasonCode.WLAN_REASON_DISASSOC_AP_BUSY;
-                            break;
-                        case WifiManager.SAP_CLIENT_DISCONNECT_REASON_CODE_UNSPECIFIED:
-                            disconnectReason = Ieee80211ReasonCode.WLAN_REASON_UNSPECIFIED;
-                            break;
-                        default:
-                            throw new IllegalArgumentException(
-                                    "Unknown disconnect reason code:" + reasonCode);
-                    }
-                    android.hardware.wifi.hostapd.V1_2.HostapdStatus status =
-                            iHostapdV1_2.forceClientDisconnect(ifaceName,
-                                    clientMacByteArray, disconnectReason);
-                    if (status.code == HostapdStatusCode.SUCCESS) {
-                        return true;
-                    }
-                    Log.d(TAG, "Error when call forceClientDisconnect, status.code = "
-                            + status.code);
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                }
-            } else {
-                Log.d(TAG, "HIDL doesn't support forceClientDisconnect");
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Registers a death notification for hostapd.
-     * @return Returns true on success.
-     */
-    @Override
-    public boolean registerDeathHandler(@NonNull HostapdDeathEventHandler handler) {
-        synchronized (mLock) {
-            if (mDeathEventHandler != null) {
-                Log.e(TAG, "Death handler already present");
-            }
-            mDeathEventHandler = handler;
-            return true;
-        }
-    }
-
-    /**
-     * Deregisters a death notification for hostapd.
-     * @return Returns true on success.
-     */
-    @Override
-    public boolean deregisterDeathHandler() {
-        synchronized (mLock) {
-            if (mDeathEventHandler == null) {
-                Log.e(TAG, "No Death handler present");
-            }
-            mDeathEventHandler = null;
-            return true;
-        }
-    }
-
-    /**
-     * Handle hostapd death.
-     */
-    private void hostapdServiceDiedHandler(long cookie) {
-        synchronized (mLock) {
-            if (mDeathRecipientCookie != cookie) {
-                Log.i(TAG, "Ignoring stale death recipient notification");
-                return;
-            }
-            mIHostapd = null;
-            if (mDeathEventHandler != null) {
-                mDeathEventHandler.onDeath();
-            }
-        }
-    }
-
-    /**
-     * Signals whether Initialization completed successfully.
-     */
-    @Override
-    public boolean isInitializationStarted() {
-        synchronized (mLock) {
-            return mIServiceManager != null;
-        }
-    }
-
-    /**
-     * Signals whether Initialization completed successfully.
-     */
-    @Override
-    public boolean isInitializationComplete() {
-        synchronized (mLock) {
-            return mIHostapd != null;
-        }
-    }
-
-    /**
-     * Start hostapd deamon
-     *
-     * @return true when succeed, otherwise false.
-     */
-    @Override
-    public boolean startDaemon() {
-        synchronized (mLock) {
-            try {
-                // This should startup hostapd daemon using the lazy start HAL mechanism.
-                getHostapdMockable();
-            } catch (RemoteException e) {
-                Log.e(TAG, "Exception while trying to start hostapd: "
-                        + e);
-                hostapdServiceDiedHandler(mDeathRecipientCookie);
-                return false;
-            } catch (NoSuchElementException e) {
-                // We're starting the daemon, so expect |NoSuchElementException|.
-                Log.d(TAG, "Successfully triggered start of hostapd using HIDL");
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Terminate the hostapd daemon & wait for it's death.
-     */
-    @Override
-    public void terminate() {
-        synchronized (mLock) {
-            // Register for a new death listener to block until hostapd is dead.
-            final long waitForDeathCookie = new Random().nextLong();
-            final CountDownLatch waitForDeathLatch = new CountDownLatch(1);
-            linkToHostapdDeath((cookie) -> {
-                Log.d(TAG, "IHostapd died: cookie=" + cookie);
-                if (cookie != waitForDeathCookie) return;
-                waitForDeathLatch.countDown();
-            }, waitForDeathCookie);
-
-            final String methodStr = "terminate";
-            if (!checkHostapdAndLogFailure(methodStr)) return;
-            try {
-                mIHostapd.terminate();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            }
-
-            // Now wait for death listener callback to confirm that it's dead.
-            try {
-                if (!waitForDeathLatch.await(WAIT_FOR_DEATH_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
-                    Log.w(TAG, "Timed out waiting for confirmation of hostapd death");
-                }
-            } catch (InterruptedException e) {
-                Log.w(TAG, "Failed to wait for hostapd death");
-            }
-        }
-    }
-
-    /**
-     * Indicates whether the HIDL service is declared. Uses the IServiceManager to check
-     * if the device is running a version >= V1_0 of the HAL from the VINTF for the device.
-     */
-    public static boolean serviceDeclared() {
-        try {
-            IServiceManager serviceManager = IServiceManager.getService();
-            String interfaceName = android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName;
-            if (serviceManager.getTransport(interfaceName, HAL_INSTANCE_NAME)
-                    != IServiceManager.Transport.EMPTY) {
-                return true;
-            }
-            return false;
-        } catch (RemoteException e) {
-            Log.e(TAG, "Unable to check for existence of HIDL service.");
-            return false;
-        }
-    }
-
-    /**
-     * Wrapper functions to access static HAL methods, created to be mockable in unit tests
-     */
-    @VisibleForTesting
-    protected IServiceManager getServiceManagerMockable() throws RemoteException {
-        return IServiceManager.getService();
-    }
-
-    @VisibleForTesting
-    protected IHostapd getHostapdMockable() throws RemoteException {
-        synchronized (mLock) {
-            return IHostapd.getService();
-        }
-    }
-
-    @VisibleForTesting
-    protected android.hardware.wifi.hostapd.V1_1.IHostapd getHostapdMockableV1_1()
-            throws RemoteException {
-        synchronized (mLock) {
-            try {
-                return android.hardware.wifi.hostapd.V1_1.IHostapd.castFrom(mIHostapd);
-            } catch (NoSuchElementException e) {
-                Log.e(TAG, "Failed to get IHostapd", e);
-                return null;
-            }
-        }
-    }
-
-    @VisibleForTesting
-    protected android.hardware.wifi.hostapd.V1_2.IHostapd getHostapdMockableV1_2()
-            throws RemoteException {
-        synchronized (mLock) {
-            try {
-                return android.hardware.wifi.hostapd.V1_2.IHostapd.castFrom(mIHostapd);
-            } catch (NoSuchElementException e) {
-                Log.e(TAG, "Failed to get IHostapd", e);
-                return null;
-            }
-        }
-    }
-
-    @VisibleForTesting
-    protected android.hardware.wifi.hostapd.V1_3.IHostapd getHostapdMockableV1_3()
-            throws RemoteException {
-        synchronized (mLock) {
-            try {
-                return android.hardware.wifi.hostapd.V1_3.IHostapd.castFrom(mIHostapd);
-            } catch (NoSuchElementException e) {
-                Log.e(TAG, "Failed to get IHostapd", e);
-                return null;
-            }
-        }
-    }
-
-    private void updateIfaceParams_1_2FromResource(
-            android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams ifaceParams12) {
-        ifaceParams12.hwModeParams.enable80211AX = ApConfigUtil.isIeee80211axSupported(mContext);
-        ifaceParams12.hwModeParams.enable6GhzBand =
-                ApConfigUtil.isBandSupported(SoftApConfiguration.BAND_6GHZ, mContext);
-        ifaceParams12.hwModeParams.enableHeSingleUserBeamformer =
-                mContext.getResources().getBoolean(
-                        R.bool.config_wifiSoftapHeSuBeamformerSupported);
-        ifaceParams12.hwModeParams.enableHeSingleUserBeamformee =
-                mContext.getResources().getBoolean(
-                        R.bool.config_wifiSoftapHeSuBeamformeeSupported);
-        ifaceParams12.hwModeParams.enableHeMultiUserBeamformer =
-                mContext.getResources().getBoolean(
-                        R.bool.config_wifiSoftapHeMuBeamformerSupported);
-        ifaceParams12.hwModeParams.enableHeTargetWakeTime =
-                mContext.getResources().getBoolean(R.bool.config_wifiSoftapHeTwtSupported);
-    }
-
-    private android.hardware.wifi.hostapd.V1_0.IHostapd.IfaceParams
-            prepareIfaceParamsV1_0(String ifaceName, SoftApConfiguration config) {
-        IHostapd.IfaceParams ifaceParamsV1_0 = new IHostapd.IfaceParams();
-        ifaceParamsV1_0.ifaceName = ifaceName;
-        ifaceParamsV1_0.hwModeParams.enable80211N = true;
-        ifaceParamsV1_0.hwModeParams.enable80211AC = mContext.getResources().getBoolean(
-                R.bool.config_wifi_softap_ieee80211ac_supported);
-        boolean enableAcs = ApConfigUtil.isAcsSupported(mContext) && config.getChannel() == 0;
-        if (enableAcs) {
-            ifaceParamsV1_0.channelParams.enableAcs = true;
-            ifaceParamsV1_0.channelParams.acsShouldExcludeDfs = !mContext.getResources()
-                    .getBoolean(R.bool.config_wifiSoftapAcsIncludeDfs);
-        }
-        ifaceParamsV1_0.channelParams.channel = config.getChannel();
-        ifaceParamsV1_0.channelParams.band = getHalBand(config.getBand());
-        return ifaceParamsV1_0;
-    }
-
-    private android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams
-            prepareIfaceParamsV1_1(
-            android.hardware.wifi.hostapd.V1_0.IHostapd.IfaceParams ifaceParamsV10,
-            SoftApConfiguration config) {
-        android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams ifaceParamsV1_1 =
-                new android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams();
-        ifaceParamsV1_1.V1_0 = ifaceParamsV10;
-        ifaceParamsV10.channelParams.band = getHalBand(config.getBand());
-
-        if (ifaceParamsV10.channelParams.enableAcs) {
-            if ((config.getBand() & SoftApConfiguration.BAND_2GHZ) != 0) {
-                ifaceParamsV1_1.channelParams.acsChannelRanges.addAll(
-                        toAcsChannelRanges(mContext.getResources().getString(
-                                R.string.config_wifiSoftap2gChannelList)));
-            }
-            if ((config.getBand() & SoftApConfiguration.BAND_5GHZ) != 0) {
-                ifaceParamsV1_1.channelParams.acsChannelRanges.addAll(
-                        toAcsChannelRanges(mContext.getResources().getString(
-                                R.string.config_wifiSoftap5gChannelList)));
-            }
-        }
-        return ifaceParamsV1_1;
-    }
-
-    private android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams
-            prepareIfaceParamsV1_2(
-            android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams ifaceParamsV11,
-            SoftApConfiguration config) {
-        android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams ifaceParamsV1_2 =
-                new android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams();
-        ifaceParamsV1_2.V1_1 = ifaceParamsV11;
-        updateIfaceParams_1_2FromResource(ifaceParamsV1_2);
-        //Update 80211ax support with the configuration.
-        ifaceParamsV1_2.hwModeParams.enable80211AX &= config.isIeee80211axEnabledInternal();
-
-        ifaceParamsV1_2.channelParams.bandMask = getHalBandMask(config.getBand());
-
-        // Prepare freq ranges/lists if needed
-        if (ifaceParamsV11.V1_0.channelParams.enableAcs && ApConfigUtil.isSendFreqRangesNeeded(
-                config.getBand(), mContext, config)) {
-            prepareAcsChannelFreqRangesMhz(ifaceParamsV1_2.channelParams, config.getBand(), config);
-        }
-        return ifaceParamsV1_2;
-    }
-
-    private android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams
-            prepareIfaceParamsV1_3(
-            android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams ifaceParamsV12,
-            SoftApConfiguration config) {
-        android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams ifaceParamsV1_3 =
-                new android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams();
-        ifaceParamsV1_3.V1_2 = ifaceParamsV12;
-        ArrayList<android.hardware.wifi.hostapd.V1_3.IHostapd.ChannelParams>
-                channelParams1_3List = new ArrayList<>();
-        if (!SdkLevel.isAtLeastS()) {
-            return ifaceParamsV1_3;
-        }
-        for (int i = 0; i < config.getChannels().size(); i++) {
-            android.hardware.wifi.hostapd.V1_3.IHostapd.ChannelParams channelParam13 =
-                    new android.hardware.wifi.hostapd.V1_3.IHostapd.ChannelParams();
-            // Prepare channel
-            channelParam13.channel = config.getChannels().valueAt(i);
-            // Prepare enableAcs
-            channelParam13.enableAcs = ApConfigUtil.isAcsSupported(mContext)
-                    && channelParam13.channel == 0;
-            // Prepare the bandMask
-            channelParam13.V1_2.bandMask = getHalBandMask(config.getChannels().keyAt(i));
-            channelParam13.bandMask = channelParam13.V1_2.bandMask;
-            // Prepare  AcsChannelFreqRangesMhz
-            if (channelParam13.enableAcs && ApConfigUtil.isSendFreqRangesNeeded(
-                    config.getChannels().keyAt(i), mContext, config)) {
-                prepareAcsChannelFreqRangesMhz(
-                        channelParam13.V1_2, config.getChannels().keyAt(i), config);
-            }
-            channelParams1_3List.add(channelParam13);
-        }
-        ifaceParamsV1_3.channelParamsList = channelParams1_3List;
-        return ifaceParamsV1_3;
-    }
-
-    private android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams
-            prepareNetworkParamsV1_2(SoftApConfiguration config) {
-        android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams nwParamsV1_2 =
-                new android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams();
-        nwParamsV1_2.V1_0.ssid.addAll(
-                NativeUtil.byteArrayToArrayList(config.getWifiSsid().getBytes()));
-        nwParamsV1_2.V1_0.isHidden = config.isHiddenSsid();
-        int encryptionType = getEncryptionType(config);
-        nwParamsV1_2.encryptionType = encryptionType;
-        nwParamsV1_2.passphrase = (config.getPassphrase() != null)
-                ? config.getPassphrase() : "";
-        if (encryptionType
-                == android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE
-                || encryptionType == android.hardware.wifi.hostapd.V1_2.IHostapd
-                .EncryptionType.WPA3_SAE_TRANSITION) {
-            if (!isV1_2()) {
-                // It should not happen since we should reject configuration in SoftApManager
-                Log.e(TAG, "Unsupported Configuration found: " + config);
-                return null;
-            }
-        } else {
-            // Fill old parameter for old hidl.
-            nwParamsV1_2.V1_0.encryptionType = encryptionType;
-            nwParamsV1_2.V1_0.pskPassphrase = (config.getPassphrase() != null)
-                    ? config.getPassphrase() : "";
-        }
-        return nwParamsV1_2;
-    }
-
-    private static int getEncryptionType(SoftApConfiguration localConfig) {
-        int encryptionType;
-        switch (localConfig.getSecurityType()) {
-            case SoftApConfiguration.SECURITY_TYPE_OPEN:
-                encryptionType = IHostapd.EncryptionType.NONE;
-                break;
-            case SoftApConfiguration.SECURITY_TYPE_WPA2_PSK:
-                encryptionType = IHostapd.EncryptionType.WPA2;
-                break;
-            case SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION:
-                encryptionType = android.hardware.wifi.hostapd.V1_2
-                        .IHostapd.EncryptionType.WPA3_SAE_TRANSITION;
-                break;
-            case SoftApConfiguration.SECURITY_TYPE_WPA3_SAE:
-                encryptionType = android.hardware.wifi.hostapd.V1_2
-                        .IHostapd.EncryptionType.WPA3_SAE;
-                break;
-            default:
-                // We really shouldn't default to None, but this was how NetworkManagementService
-                // used to do this.
-                encryptionType = IHostapd.EncryptionType.NONE;
-                break;
-        }
-        return encryptionType;
-    }
-
-    private static int getHalBandMask(int apBand) {
-        int bandMask = 0;
-
-        if (!ApConfigUtil.isBandValid(apBand)) {
-            throw new IllegalArgumentException();
-        }
-
-        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_2GHZ)) {
-            bandMask |= android.hardware.wifi.hostapd.V1_2.IHostapd.BandMask.BAND_2_GHZ;
-        }
-        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_5GHZ)) {
-            bandMask |= android.hardware.wifi.hostapd.V1_2.IHostapd.BandMask.BAND_5_GHZ;
-        }
-        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_6GHZ)) {
-            bandMask |= android.hardware.wifi.hostapd.V1_2.IHostapd.BandMask.BAND_6_GHZ;
-        }
-        if (ApConfigUtil.containsBand(apBand, SoftApConfiguration.BAND_60GHZ)) {
-            bandMask |= android.hardware.wifi.hostapd.V1_3.IHostapd.BandMask.BAND_60_GHZ;
-        }
-
-        return bandMask;
-    }
-
-    private static int getHalBand(int apBand) {
-        if (!ApConfigUtil.isBandValid(apBand)) {
-            throw new IllegalArgumentException();
-        }
-
-        switch (apBand) {
-            case SoftApConfiguration.BAND_2GHZ:
-                return IHostapd.Band.BAND_2_4_GHZ;
-            case SoftApConfiguration.BAND_5GHZ:
-                return IHostapd.Band.BAND_5_GHZ;
-            default:
-                return IHostapd.Band.BAND_ANY;
-        }
-    }
-
-    /**
-     * Convert channel list string like '1-6,11' to list of AcsChannelRanges
-     */
-    private List<android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange>
-            toAcsChannelRanges(String channelListStr) {
-        ArrayList<android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange> acsChannelRanges =
-                new ArrayList<>();
-
-        for (String channelRange : channelListStr.split(",")) {
-            android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange acsChannelRange =
-                    new android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange();
-            try {
-                if (channelRange.contains("-")) {
-                    String[] channels  = channelRange.split("-");
-                    if (channels.length != 2) {
-                        Log.e(TAG, "Unrecognized channel range, length is " + channels.length);
-                        continue;
-                    }
-                    int start = Integer.parseInt(channels[0].trim());
-                    int end = Integer.parseInt(channels[1].trim());
-                    if (start > end) {
-                        Log.e(TAG, "Invalid channel range, from " + start + " to " + end);
-                        continue;
-                    }
-                    acsChannelRange.start = start;
-                    acsChannelRange.end = end;
-                } else if (!TextUtils.isEmpty(channelRange)) {
-                    acsChannelRange.start = Integer.parseInt(channelRange.trim());
-                    acsChannelRange.end = acsChannelRange.start;
-                }
-            } catch (NumberFormatException e) {
-                // Ignore malformed value
-                Log.e(TAG, "Malformed channel value detected: " + e);
-                continue;
-            }
-            acsChannelRanges.add(acsChannelRange);
-        }
-        return acsChannelRanges;
-    }
-
-    /**
-     * Prepare the acsChannelFreqRangesMhz in V1_2.IHostapd.ChannelParams.
-     */
-    private void prepareAcsChannelFreqRangesMhz(
-            android.hardware.wifi.hostapd.V1_2.IHostapd.ChannelParams channelParams12,
-            @BandType int band, SoftApConfiguration config) {
-        if ((band & SoftApConfiguration.BAND_2GHZ) != 0) {
-            channelParams12.acsChannelFreqRangesMhz.addAll(
-                    toAcsFreqRanges(SoftApConfiguration.BAND_2GHZ, config));
-        }
-        if ((band & SoftApConfiguration.BAND_5GHZ) != 0) {
-            channelParams12.acsChannelFreqRangesMhz.addAll(
-                    toAcsFreqRanges(SoftApConfiguration.BAND_5GHZ, config));
-        }
-        if ((band & SoftApConfiguration.BAND_6GHZ) != 0) {
-            channelParams12.acsChannelFreqRangesMhz.addAll(
-                    toAcsFreqRanges(SoftApConfiguration.BAND_6GHZ, config));
-        }
-    }
-
-    /**
-     * Convert channel list string like '1-6,11' to list of AcsFreqRange
-     */
-    private List<android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange>
-            toAcsFreqRanges(@BandType int band, SoftApConfiguration config) {
-        List<android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange>
-                acsFrequencyRanges = new ArrayList<>();
-        List<Integer> allowedChannelList;
-
-        if (!ApConfigUtil.isBandValid(band) || ApConfigUtil.isMultiband(band)) {
-            Log.e(TAG, "Invalid band : " + band);
-            return acsFrequencyRanges;
-        }
-
-        String oemConfig;
-        switch (band) {
-            case SoftApConfiguration.BAND_2GHZ:
-                oemConfig = mContext.getResources().getString(
-                            R.string.config_wifiSoftap2gChannelList);
-                break;
-            case SoftApConfiguration.BAND_5GHZ:
-                oemConfig = mContext.getResources().getString(
-                            R.string.config_wifiSoftap5gChannelList);
-                break;
-            case SoftApConfiguration.BAND_6GHZ:
-                oemConfig = mContext.getResources().getString(
-                            R.string.config_wifiSoftap6gChannelList);
-                break;
-            default:
-                return acsFrequencyRanges;
-        }
-
-        allowedChannelList = ApConfigUtil.collectAllowedAcsChannels(band, oemConfig,
-                SdkLevel.isAtLeastT()
-                        ? config.getAllowedAcsChannels(band) : new int[] {});
-        if (allowedChannelList.isEmpty()) {
-            Log.e(TAG, "Empty list of allowed channels");
-            return acsFrequencyRanges;
-        }
-        Collections.sort(allowedChannelList);
-
-        // Convert the sorted list to a set of frequency ranges
-        boolean rangeStarted = false;
-        int prevChannel = -1;
-        android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange freqRange = null;
-
-        for (int channel : allowedChannelList) {
-            // Continuation of an existing frequency range
-            if (rangeStarted) {
-                if (channel == prevChannel + 1) {
-                    prevChannel = channel;
-                    continue;
-                }
-
-                // End of the existing frequency range
-                freqRange.end = ApConfigUtil.convertChannelToFrequency(prevChannel, band);
-                acsFrequencyRanges.add(freqRange);
-                // We will continue to start a new frequency range
-            }
-
-            // Beginning of a new frequency range
-            freqRange = new android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange();
-            freqRange.start = ApConfigUtil.convertChannelToFrequency(channel, band);
-            rangeStarted = true;
-            prevChannel = channel;
-        }
-
-        // End the last range
-        freqRange.end = ApConfigUtil.convertChannelToFrequency(prevChannel, band);
-        acsFrequencyRanges.add(freqRange);
-
-        return acsFrequencyRanges;
-    }
-
-    /**
-     * Returns false if Hostapd is null, and logs failure to call methodStr
-     */
-    private boolean checkHostapdAndLogFailure(String methodStr) {
-        synchronized (mLock) {
-            if (mIHostapd == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", IHostapd is null");
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Returns true if provided status code is SUCCESS, logs debug message and returns false
-     * otherwise
-     */
-    private boolean checkStatusAndLogFailure(HostapdStatus status,
-            String methodStr) {
-        synchronized (mLock) {
-            if (status.code != HostapdStatusCode.SUCCESS) {
-                Log.e(TAG, "IHostapd." + methodStr + " failed: " + status.code
-                        + ", " + status.debugMessage);
-                return false;
-            } else {
-                if (mVerboseLoggingEnabled) {
-                    Log.d(TAG, "IHostapd." + methodStr + " succeeded");
-                }
-                return true;
-            }
-        }
-    }
-
-    /**
-     * Returns true if provided status code is SUCCESS, logs debug message and returns false
-     * otherwise
-     */
-    private boolean checkStatusAndLogFailure12(
-            android.hardware.wifi.hostapd.V1_2.HostapdStatus status, String methodStr) {
-        synchronized (mLock) {
-            if (status.code != HostapdStatusCode.SUCCESS) {
-                Log.e(TAG, "IHostapd." + methodStr + " failed: " + status.code
-                        + ", " + status.debugMessage);
-                return false;
-            } else {
-                if (mVerboseLoggingEnabled) {
-                    Log.d(TAG, "IHostapd." + methodStr + " succeeded");
-                }
-                return true;
-            }
-        }
-    }
-
-    private void handleRemoteException(RemoteException e, String methodStr) {
-        synchronized (mLock) {
-            hostapdServiceDiedHandler(mDeathRecipientCookie);
-            Log.e(TAG, "IHostapd." + methodStr + " failed with exception", e);
-        }
-    }
-
-    private class HostapdCallback extends
-            android.hardware.wifi.hostapd.V1_1.IHostapdCallback.Stub {
-        @Override
-        public void onFailure(String ifaceName) {
-            Log.w(TAG, "Failure on iface " + ifaceName);
-            Runnable onFailureListener = mSoftApFailureListeners.get(ifaceName);
-            if (onFailureListener != null) {
-                onFailureListener.run();
-            }
-        }
-    }
-
-    /**
-     * Map hal bandwidth to SoftApInfo.
-     *
-     * @param bandwidth The channel bandwidth of the AP which is defined in the HAL.
-     * @return The channel bandwidth in the SoftApinfo.
-     */
-    @VisibleForTesting
-    public int mapHalBandwidthToSoftApInfo(int bandwidth) {
-        switch (bandwidth) {
-            case Bandwidth.WIFI_BANDWIDTH_20_NOHT:
-                return SoftApInfo.CHANNEL_WIDTH_20MHZ_NOHT;
-            case Bandwidth.WIFI_BANDWIDTH_20:
-                return SoftApInfo.CHANNEL_WIDTH_20MHZ;
-            case Bandwidth.WIFI_BANDWIDTH_40:
-                return SoftApInfo.CHANNEL_WIDTH_40MHZ;
-            case Bandwidth.WIFI_BANDWIDTH_80:
-                return SoftApInfo.CHANNEL_WIDTH_80MHZ;
-            case Bandwidth.WIFI_BANDWIDTH_80P80:
-                return SoftApInfo.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
-            case Bandwidth.WIFI_BANDWIDTH_160:
-                return SoftApInfo.CHANNEL_WIDTH_160MHZ;
-            case Bandwidth.WIFI_BANDWIDTH_2160:
-                return SoftApInfo.CHANNEL_WIDTH_2160MHZ;
-            case Bandwidth.WIFI_BANDWIDTH_4320:
-                return SoftApInfo.CHANNEL_WIDTH_4320MHZ;
-            case Bandwidth.WIFI_BANDWIDTH_6480:
-                return SoftApInfo.CHANNEL_WIDTH_6480MHZ;
-            case Bandwidth.WIFI_BANDWIDTH_8640:
-                return SoftApInfo.CHANNEL_WIDTH_8640MHZ;
-            default:
-                return SoftApInfo.CHANNEL_WIDTH_INVALID;
-        }
-    }
-
-    /**
-     * Map hal generation to wifi standard.
-     *
-     * @param generation The operation mode of the AP which is defined in HAL.
-     * @return The wifi standard in the ScanResult.
-     */
-    @VisibleForTesting
-    public int mapHalGenerationToWifiStandard(int generation) {
-        switch (generation) {
-            case Generation.WIFI_STANDARD_LEGACY:
-                return ScanResult.WIFI_STANDARD_LEGACY;
-            case Generation.WIFI_STANDARD_11N:
-                return ScanResult.WIFI_STANDARD_11N;
-            case Generation.WIFI_STANDARD_11AC:
-                return ScanResult.WIFI_STANDARD_11AC;
-            case Generation.WIFI_STANDARD_11AX:
-                return ScanResult.WIFI_STANDARD_11AX;
-            case Generation.WIFI_STANDARD_11AD:
-                return ScanResult.WIFI_STANDARD_11AD;
-            default:
-                return ScanResult.WIFI_STANDARD_UNKNOWN;
-        }
-    }
-
-    private class HostapdCallback_1_3 extends
-            android.hardware.wifi.hostapd.V1_3.IHostapdCallback.Stub {
-        @Override
-        public void onFailure(String ifaceName) {
-            Log.w(TAG, "Failure on iface " + ifaceName);
-            Runnable onFailureListener = mSoftApFailureListeners.get(ifaceName);
-            if (onFailureListener != null) {
-                onFailureListener.run();
-            }
-        }
-
-        @Override
-        public void onApInstanceInfoChanged(String ifaceName, String apIfaceInstance,
-                int frequency, int bandwidth, int generation, byte[] apIfaceInstanceMacAddress) {
-            Log.d(TAG, "onApInstanceInfoChanged on " + ifaceName + " / " + apIfaceInstance);
-            try {
-                if (mSoftApEventListener != null) {
-                    mSoftApEventListener.onInfoChanged(apIfaceInstance, frequency,
-                            mapHalBandwidthToSoftApInfo(bandwidth),
-                            mapHalGenerationToWifiStandard(generation),
-                            MacAddress.fromBytes(apIfaceInstanceMacAddress));
-                }
-            } catch (IllegalArgumentException iae) {
-                Log.e(TAG, " Invalid apIfaceInstanceMacAddress, " + iae);
-            }
-        }
-
-        @Override
-        public void onConnectedClientsChanged(String ifaceName, String apIfaceInstance,
-                byte[] clientAddress, boolean isConnected) {
-            try {
-                Log.d(TAG, "onConnectedClientsChanged on " + ifaceName + " / " + apIfaceInstance
-                        + " and Mac is " + MacAddress.fromBytes(clientAddress).toString()
-                        + " isConnected: " + isConnected);
-                if (mSoftApEventListener != null) {
-                    mSoftApEventListener.onConnectedClientsChanged(apIfaceInstance,
-                            MacAddress.fromBytes(clientAddress), isConnected);
-                }
-            } catch (IllegalArgumentException iae) {
-                Log.e(TAG, " Invalid clientAddress, " + iae);
-            }
-        }
-    }
-
-    /**
-     * Set the debug log level for hostapd.
-     *
-     * @return true if request is sent successfully, false otherwise.
-     */
-    private boolean setDebugParams() {
-        synchronized (mLock) {
-            final String methodStr = "setDebugParams";
-            if (!checkHostapdAndLogFailure(methodStr)) return false;
-            if (isV1_2()) {
-                try {
-                    android.hardware.wifi.hostapd.V1_2.IHostapd iHostapdV1_2 =
-                            getHostapdMockableV1_2();
-                    if (iHostapdV1_2 == null) return false;
-                    android.hardware.wifi.hostapd.V1_2.HostapdStatus status =
-                            iHostapdV1_2.setDebugParams(mVerboseHalLoggingEnabled
-                                    ? DebugLevel.DEBUG
-                                    : DebugLevel.INFO);
-                    return checkStatusAndLogFailure12(status, methodStr);
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                }
-            } else {
-                Log.w(TAG, "HIDL doesn't support setDebugParams");
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Dump information about the HIDL implementation.
-     */
-    public void dump(PrintWriter pw) {
-        synchronized (mLock) {
-            pw.println("HIDL interface version: " + getVersion());
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/IHostapdHal.java b/service/java/com/android/server/wifi/IHostapdHal.java
deleted file mode 100644
index a93cff2..0000000
--- a/service/java/com/android/server/wifi/IHostapdHal.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import android.annotation.NonNull;
-import android.net.MacAddress;
-import android.net.wifi.SoftApConfiguration;
-
-import com.android.server.wifi.WifiNative.HostapdDeathEventHandler;
-import com.android.server.wifi.WifiNative.SoftApHalCallback;
-
-import java.io.PrintWriter;
-
-/** Abstraction of HAL interface */
-interface IHostapdHal {
-    /**
-     * Begin initializing the IHostapdHal object. Specific initialization logic differs
-     * between the HIDL and AIDL implementations.
-     *
-     * @return true if the initialization routine was successful
-     */
-    boolean initialize();
-
-    /**
-     * Start hostapd daemon.
-     */
-    boolean startDaemon();
-
-    /**
-     * Enable/Disable verbose logging.
-     *
-     * @param verboseEnabled true to enable, false to disable.
-     * @param halVerboseEnabled true to enable hal verbose logging, false to disable.
-     */
-    void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled);
-
-    /**
-     * Add and start a new access point.
-     *
-     * @param ifaceName Name of the interface.
-     * @param config Configuration to use for the AP.
-     * @param isMetered Indicates the network is metered or not. Ignored in AIDL imp.
-     * @param onFailureListener A runnable to be triggered on failure.
-     * @return true on success, false otherwise.
-     */
-    boolean addAccessPoint(@NonNull String ifaceName,
-            @NonNull SoftApConfiguration config, boolean isMetered,
-            Runnable onFailureListener);
-
-    /**
-     * Remove a previously started access point.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    boolean removeAccessPoint(@NonNull String ifaceName);
-
-    /**
-     * Remove a previously connected client.
-     *
-     * @param ifaceName Name of the interface.
-     * @param client Mac Address of the client.
-     * @param reasonCode One of disconnect reason code which defined in {@link WifiManager}.
-     * @return true on success, false otherwise.
-     */
-    boolean forceClientDisconnect(@NonNull String ifaceName,
-            @NonNull MacAddress client, int reasonCode);
-
-    /**
-     * Register the provided callback handler for SoftAp events.
-     * <p>
-     * Note that only one callback can be registered at a time - any registration overrides previous
-     * registrations.
-     *
-     * @param ifaceName Name of the interface.
-     * @param callback Callback listener for AP events.
-     * @return true on success, false on failure.
-     */
-    boolean registerApCallback(@NonNull String ifaceName,
-            @NonNull SoftApHalCallback callback);
-
-    /**
-     * Returns whether or not the hostapd supports getting the AP info from the callback.
-     */
-    boolean isApInfoCallbackSupported();
-
-    /**
-     * Registers a death notification for hostapd.
-     * @return Returns true on success.
-     */
-    boolean registerDeathHandler(@NonNull HostapdDeathEventHandler handler);
-
-    /**
-     * Deregisters a death notification for hostapd.
-     * @return Returns true on success.
-     */
-    boolean deregisterDeathHandler();
-
-    /**
-     * Signals whether Initialization started successfully.
-     */
-    boolean isInitializationStarted();
-
-    /**
-     * Signals whether Initialization completed successfully.
-     */
-    boolean isInitializationComplete();
-
-    /**
-     * Terminate the hostapd daemon & wait for it's death.
-     */
-    void terminate();
-
-    /**
-     * Dump information about the specific implementation.
-     */
-    void dump(PrintWriter pw);
-}
diff --git a/service/java/com/android/server/wifi/IMSIParameter.java b/service/java/com/android/server/wifi/IMSIParameter.java
index c2b49f8..4991bb9 100644
--- a/service/java/com/android/server/wifi/IMSIParameter.java
+++ b/service/java/com/android/server/wifi/IMSIParameter.java
@@ -97,7 +97,7 @@
             return mImsi.regionMatches(false, 0, fullIMSI, 0, mImsi.length());
         } else {
             // Exact matching.
-            return TextUtils.equals(mImsi, fullIMSI);
+            return mImsi.equals(fullIMSI);
         }
     }
 
diff --git a/service/java/com/android/server/wifi/ISupplicantStaIfaceHal.java b/service/java/com/android/server/wifi/ISupplicantStaIfaceHal.java
deleted file mode 100644
index 5722df2..0000000
--- a/service/java/com/android/server/wifi/ISupplicantStaIfaceHal.java
+++ /dev/null
@@ -1,766 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-
-import android.annotation.NonNull;
-import android.net.MacAddress;
-import android.net.wifi.SecurityParams;
-import android.net.wifi.WifiConfiguration;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/** Abstraction of Supplicant STA Iface HAL interface */
-interface ISupplicantStaIfaceHal {
-    /**
-     * Enable/Disable verbose logging.
-     *
-     * @param verboseEnabled Verbose flag set in overlay XML.
-     * @param halVerboseEnabled Verbose flag set by the user.
-     */
-    void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled);
-
-    /**
-     * Begin initializing the ISupplicantStaIfaceHal object. Specific initialization
-     * logic differs between the HIDL and AIDL implementations.
-     *
-     * @return true if the initialization routine was successful
-     */
-    boolean initialize();
-
-    /**
-     * Setup a STA interface for the specified iface name.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    boolean setupIface(@NonNull String ifaceName);
-
-    /**
-     * Teardown a STA interface for the specified iface name.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    boolean teardownIface(@NonNull String ifaceName);
-
-    /**
-     * Registers a death notification for supplicant.
-     * @return Returns true on success.
-     */
-    boolean registerDeathHandler(@NonNull WifiNative.SupplicantDeathEventHandler handler);
-
-    /**
-     * Deregisters a death notification for supplicant.
-     * @return Returns true on success.
-     */
-    boolean deregisterDeathHandler();
-
-    /**
-     * Signals whether initialization started successfully.
-     */
-    boolean isInitializationStarted();
-
-    /**
-     * Signals whether initialization completed successfully.
-     */
-    boolean isInitializationComplete();
-
-    /**
-     * Start the supplicant daemon.
-     *
-     * @return true on success, false otherwise.
-     */
-    boolean startDaemon();
-
-    /**
-     * Terminate the supplicant daemon & wait for its death.
-     */
-    void terminate();
-
-    /**
-     * Add the provided network configuration to wpa_supplicant and initiate connection to it.
-     * This method does the following:
-     * 1. If |config| is different to the current supplicant network, removes all supplicant
-     * networks and saves |config|.
-     * 2. Select the new network in wpa_supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @param config WifiConfiguration parameters for the provided network.
-     * @return {@code true} if it succeeds, {@code false} otherwise
-     */
-    boolean connectToNetwork(@NonNull String ifaceName, @NonNull WifiConfiguration config);
-
-    /**
-     * Initiates roaming to the already configured network in wpa_supplicant. If the network
-     * configuration provided does not match the already configured network, then this triggers
-     * a new connection attempt (instead of roam).
-     *
-     * @param ifaceName Name of the interface.
-     * @param config WifiConfiguration parameters for the provided network.
-     * @return {@code true} if it succeeds, {@code false} otherwise
-     */
-    boolean roamToNetwork(@NonNull String ifaceName, WifiConfiguration config);
-
-    /**
-     * Clean HAL cached data for |networkId| in the framework.
-     *
-     * @param networkId Network id of the network to be removed from supplicant.
-     */
-    void removeNetworkCachedData(int networkId);
-
-    /**
-     * Clear HAL cached data if MAC address is changed.
-     *
-     * @param networkId Network id of the network to be checked.
-     * @param curMacAddress Current MAC address
-     */
-    void removeNetworkCachedDataIfNeeded(int networkId, MacAddress curMacAddress);
-
-    /**
-     * Remove all networks from supplicant
-     *
-     * @param ifaceName Name of the interface.
-     */
-    boolean removeAllNetworks(@NonNull String ifaceName);
-
-    /**
-     * Disable the current network in supplicant
-     *
-     * @param ifaceName Name of the interface.
-     */
-    boolean disableCurrentNetwork(@NonNull String ifaceName);
-
-    /**
-     * Set the currently configured network's bssid.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr Bssid to set in the form of "XX:XX:XX:XX:XX:XX"
-     * @return true if succeeds, false otherwise.
-     */
-    boolean setCurrentNetworkBssid(@NonNull String ifaceName, String bssidStr);
-
-    /**
-     * Get the currently configured network's WPS NFC token.
-     *
-     * @param ifaceName Name of the interface.
-     * @return Hex string corresponding to the WPS NFC token.
-     */
-    String getCurrentNetworkWpsNfcConfigurationToken(@NonNull String ifaceName);
-
-    /**
-     * Get the eap anonymous identity for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return anonymous identity string if succeeds, null otherwise.
-     */
-    String getCurrentNetworkEapAnonymousIdentity(@NonNull String ifaceName);
-
-    /**
-     * Send the eap identity response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param identity Identity used for EAP-Identity
-     * @param encryptedIdentity Encrypted identity used for EAP-AKA/EAP-SIM
-     * @return true if succeeds, false otherwise.
-     */
-    boolean sendCurrentNetworkEapIdentityResponse(
-            @NonNull String ifaceName, @NonNull String identity, String encryptedIdentity);
-
-    /**
-     * Send the eap sim gsm auth response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param paramsStr String to send.
-     * @return true if succeeds, false otherwise.
-     */
-    boolean sendCurrentNetworkEapSimGsmAuthResponse(
-            @NonNull String ifaceName, String paramsStr);
-
-    /**
-     * Send the eap sim gsm auth failure for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if succeeds, false otherwise.
-     */
-    boolean sendCurrentNetworkEapSimGsmAuthFailure(@NonNull String ifaceName);
-
-    /**
-     * Send the eap sim umts auth response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param paramsStr String to send.
-     * @return true if succeeds, false otherwise.
-     */
-    boolean sendCurrentNetworkEapSimUmtsAuthResponse(
-            @NonNull String ifaceName, String paramsStr);
-
-    /**
-     * Send the eap sim umts auts response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param paramsStr String to send.
-     * @return true if succeeds, false otherwise.
-     */
-    boolean sendCurrentNetworkEapSimUmtsAutsResponse(
-            @NonNull String ifaceName, String paramsStr);
-
-    /**
-     * Send the eap sim umts auth failure for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if succeeds, false otherwise.
-     */
-    boolean sendCurrentNetworkEapSimUmtsAuthFailure(@NonNull String ifaceName);
-
-    /**
-     * Set WPS device name.
-     *
-     * @param ifaceName Name of the interface.
-     * @param deviceName String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setWpsDeviceName(@NonNull String ifaceName, String deviceName);
-
-    /**
-     * Set WPS device type.
-     *
-     * @param ifaceName Name of the interface.
-     * @param typeStr Type specified as a string. Used format: <categ>-<OUI>-<subcateg>
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setWpsDeviceType(@NonNull String ifaceName, String typeStr);
-
-    /**
-     * Set WPS manufacturer.
-     *
-     * @param ifaceName Name of the interface.
-     * @param manufacturer String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setWpsManufacturer(@NonNull String ifaceName, String manufacturer);
-
-    /**
-     * Set WPS model name.
-     *
-     * @param ifaceName Name of the interface.
-     * @param modelName String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setWpsModelName(@NonNull String ifaceName, String modelName);
-
-    /**
-     * Set WPS model number.
-     *
-     * @param ifaceName Name of the interface.
-     * @param modelNumber String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setWpsModelNumber(@NonNull String ifaceName, String modelNumber);
-
-    /**
-     * Set WPS serial number.
-     *
-     * @param ifaceName Name of the interface.
-     * @param serialNumber String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setWpsSerialNumber(@NonNull String ifaceName, String serialNumber);
-
-    /**
-     * Set WPS config methods
-     *
-     * @param ifaceName Name of the interface.
-     * @param configMethodsStr List of config methods.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setWpsConfigMethods(@NonNull String ifaceName, String configMethodsStr);
-
-    /**
-     * Trigger a reassociation even if the iface is currently connected.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean reassociate(@NonNull String ifaceName);
-
-    /**
-     * Trigger a reconnection if the iface is disconnected.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean reconnect(@NonNull String ifaceName);
-
-    /**
-     * Trigger a disconnection from the currently connected network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean disconnect(@NonNull String ifaceName);
-
-    /**
-     * Enable or disable power save mode.
-     *
-     * @param ifaceName Name of the interface.
-     * @param enable true to enable, false to disable.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setPowerSave(@NonNull String ifaceName, boolean enable);
-
-    /**
-     * Initiate TDLS discover with the specified AP.
-     *
-     * @param ifaceName Name of the interface.
-     * @param macAddress MAC Address of the AP.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean initiateTdlsDiscover(@NonNull String ifaceName, String macAddress);
-
-    /**
-     * Initiate TDLS setup with the specified AP.
-     *
-     * @param ifaceName Name of the interface.
-     * @param macAddress MAC Address of the AP.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean initiateTdlsSetup(@NonNull String ifaceName, String macAddress);
-
-    /**
-     * Initiate TDLS teardown with the specified AP.
-     * @param ifaceName Name of the interface.
-     * @param macAddress MAC Address of the AP.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean initiateTdlsTeardown(@NonNull String ifaceName, String macAddress);
-
-    /**
-     * Request the specified ANQP elements |elements| from the specified AP |bssid|.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssid BSSID of the AP
-     * @param infoElements ANQP elements to be queried. Refer to ISupplicantStaIface.AnqpInfoId.
-     * @param hs20SubTypes HS subtypes to be queried. Refer to ISupplicantStaIface.Hs20AnqpSubTypes.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean initiateAnqpQuery(@NonNull String ifaceName, String bssid,
-            ArrayList<Short> infoElements,
-            ArrayList<Integer> hs20SubTypes);
-
-    /**
-     * Request Venue URL ANQP element from the specified AP |bssid|.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssid BSSID of the AP
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean initiateVenueUrlAnqpQuery(@NonNull String ifaceName, String bssid);
-
-    /**
-     * Request the specified ANQP ICON from the specified AP |bssid|.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssid BSSID of the AP
-     * @param fileName Name of the file to request.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean initiateHs20IconQuery(@NonNull String ifaceName, String bssid, String fileName);
-
-    /**
-     * Gets MAC address from the supplicant
-     *
-     * @param ifaceName Name of the interface.
-     * @return string containing the MAC address, or null on a failed call
-     */
-    String getMacAddress(@NonNull String ifaceName);
-
-    /**
-     * Start using the added RX filters.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean startRxFilter(@NonNull String ifaceName);
-
-    /**
-     * Stop using the added RX filters.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean stopRxFilter(@NonNull String ifaceName);
-
-    /**
-     * Add an RX filter.
-     *
-     * @param ifaceName Name of the interface.
-     * @param type one of {@link WifiNative#RX_FILTER_TYPE_V4_MULTICAST}
-     *        {@link WifiNative#RX_FILTER_TYPE_V6_MULTICAST} values.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean addRxFilter(@NonNull String ifaceName, int type);
-
-    /**
-     * Remove an RX filter.
-     *
-     * @param ifaceName Name of the interface.
-     * @param type one of {@link WifiNative#RX_FILTER_TYPE_V4_MULTICAST}
-     *        {@link WifiNative#RX_FILTER_TYPE_V6_MULTICAST} values.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean removeRxFilter(@NonNull String ifaceName, int type);
-
-    /**
-     * Set Bt coexistence mode.
-     *
-     * @param ifaceName Name of the interface.
-     * @param mode one of the above {@link WifiNative#BLUETOOTH_COEXISTENCE_MODE_DISABLED},
-     *             {@link WifiNative#BLUETOOTH_COEXISTENCE_MODE_ENABLED} or
-     *             {@link WifiNative#BLUETOOTH_COEXISTENCE_MODE_SENSE}.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setBtCoexistenceMode(@NonNull String ifaceName, int mode);
-
-    /** Enable or disable BT coexistence mode.
-     *
-     * @param ifaceName Name of the interface.
-     * @param enable true to enable, false to disable.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setBtCoexistenceScanModeEnabled(@NonNull String ifaceName, boolean enable);
-
-    /**
-     * Enable or disable suspend mode optimizations.
-     *
-     * @param ifaceName Name of the interface.
-     * @param enable true to enable, false otherwise.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setSuspendModeEnabled(@NonNull String ifaceName, boolean enable);
-
-    /**
-     * Set country code.
-     *
-     * @param ifaceName Name of the interface.
-     * @param codeStr 2 byte ASCII string. For ex: US, CA.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setCountryCode(@NonNull String ifaceName, String codeStr);
-
-    /**
-     * Flush all previously configured HLPs.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean flushAllHlp(@NonNull String ifaceName);
-
-    /**
-     * Set FILS HLP packet.
-     *
-     * @param ifaceName Name of the interface.
-     * @param dst Destination MAC address.
-     * @param hlpPacket Hlp Packet data in hex.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean addHlpReq(@NonNull String ifaceName, byte [] dst, byte [] hlpPacket);
-
-    /**
-     * Start WPS pin registrar operation with the specified peer and pin.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr BSSID of the peer.
-     * @param pin Pin to be used.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean startWpsRegistrar(@NonNull String ifaceName, String bssidStr, String pin);
-
-    /**
-     * Start WPS pin display operation with the specified peer.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr BSSID of the peer. Use empty bssid to indicate wildcard.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean startWpsPbc(@NonNull String ifaceName, String bssidStr);
-
-    /**
-     * Start WPS pin keypad operation with the specified pin.
-     *
-     * @param ifaceName Name of the interface.
-     * @param pin Pin to be used.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean startWpsPinKeypad(@NonNull String ifaceName, String pin);
-
-    /**
-     * Start WPS pin display operation with the specified peer.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr BSSID of the peer. Use empty bssid to indicate wildcard.
-     * @return new pin generated on success, null otherwise.
-     */
-    String startWpsPinDisplay(@NonNull String ifaceName, String bssidStr);
-
-    /**
-     * Cancels any ongoing WPS requests.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean cancelWps(@NonNull String ifaceName);
-
-    /**
-     * Sets whether to use external sim for SIM/USIM processing.
-     *
-     * @param ifaceName Name of the interface.
-     * @param useExternalSim true to enable, false otherwise.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setExternalSim(@NonNull String ifaceName, boolean useExternalSim);
-
-    /**
-     * Enable/Disable auto reconnect to networks.
-     * Use this to prevent wpa_supplicant from trying to connect to networks
-     * on its own.
-     *
-     * @param enable true to enable, false to disable.
-     * @return true if no exceptions occurred, false otherwise
-     */
-    boolean enableAutoReconnect(@NonNull String ifaceName, boolean enable);
-
-    /**
-     * Set the debug log level for wpa_supplicant
-     *
-     * @param turnOnVerbose Whether to turn on verbose logging or not.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setLogLevel(boolean turnOnVerbose);
-
-    /**
-     * Set concurrency priority between P2P & STA operations.
-     *
-     * @param isStaHigherPriority Set to true to prefer STA over P2P during concurrency operations,
-     *                            false otherwise.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setConcurrencyPriority(boolean isStaHigherPriority);
-
-    /**
-     * Returns a bitmask of advanced capabilities: WPA3 SAE/SUITE B and OWE
-     * Bitmask used is:
-     * - WIFI_FEATURE_WPA3_SAE
-     * - WIFI_FEATURE_WPA3_SUITE_B
-     * - WIFI_FEATURE_OWE
-     *
-     *  On error, or if these features are not supported, 0 is returned.
-     */
-    long getAdvancedCapabilities(@NonNull String ifaceName);
-
-    /**
-     * Get the driver supported features through supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @return bitmask defined by WifiManager.WIFI_FEATURE_*.
-     */
-    long getWpaDriverFeatureSet(@NonNull String ifaceName);
-
-    /**
-     * Returns connection capabilities of the current network
-     *
-     * @param ifaceName Name of the interface.
-     * @return connection capabilities of the current network
-     */
-    WifiNative.ConnectionCapabilities getConnectionCapabilities(@NonNull String ifaceName);
-
-    /**
-     * Returns connection MLO links info
-     *
-     * @param ifaceName Name of the interface.
-     * @return connection MLO links info
-     */
-    WifiNative.ConnectionMloLinksInfo getConnectionMloLinksInfo(@NonNull String ifaceName);
-
-    /**
-     * Adds a DPP peer URI to the URI list.
-     *
-     * Returns an ID to be used later to refer to this URI (>0).
-     * On error, or if these features are not supported, -1 is returned.
-     */
-    int addDppPeerUri(@NonNull String ifaceName, @NonNull String uri);
-
-    /**
-     * Removes a DPP URI to the URI list given an ID.
-     *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
-     */
-    boolean removeDppUri(@NonNull String ifaceName, int bootstrapId);
-
-    /**
-     * Stops/aborts DPP Initiator request
-     *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
-     */
-    boolean stopDppInitiator(@NonNull String ifaceName);
-
-    /**
-     * Starts DPP Configurator-Initiator request
-     *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
-     */
-    boolean startDppConfiguratorInitiator(@NonNull String ifaceName, int peerBootstrapId,
-            int ownBootstrapId, @NonNull String ssid, String password, String psk,
-            int netRole, int securityAkm, byte[] privEcKey);
-
-    /**
-     * Starts DPP Enrollee-Initiator request
-     *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
-     */
-    boolean startDppEnrolleeInitiator(@NonNull String ifaceName, int peerBootstrapId,
-            int ownBootstrapId);
-
-    /**
-     * Generate a DPP QR code based boot strap info
-     *
-     * Returns DppResponderBootstrapInfo;
-     */
-    WifiNative.DppBootstrapQrCodeInfo generateDppBootstrapInfoForResponder(
-            @NonNull String ifaceName, String macAddress, @NonNull String deviceInfo,
-            int dppCurve);
-
-    /**
-     * Starts DPP Enrollee-Responder request
-     *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
-     */
-    boolean startDppEnrolleeResponder(@NonNull String ifaceName, int listenChannel);
-
-    /**
-     * Stops/aborts DPP Responder request.
-     *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
-     */
-    boolean stopDppResponder(@NonNull String ifaceName, int ownBootstrapId);
-
-    /**
-     * Register callbacks for DPP events.
-     *
-     * @param dppCallback DPP callback object.
-     */
-    void registerDppCallback(WifiNative.DppEventCallback dppCallback);
-
-    /**
-     * Set MBO cellular data availability.
-     *
-     * @param ifaceName Name of the interface.
-     * @param available true means cellular data available, false otherwise.
-     * Returns true when operation is successful
-     */
-    boolean setMboCellularDataStatus(@NonNull String ifaceName, boolean available);
-
-    /**
-     * Check if we've roamed to a linked network and make the linked network the current network
-     * if we have.
-     *
-     * @param ifaceName Name of the interface.
-     * @param newNetworkId Network id of the new network we've roamed to. If fromFramework is
-     *                     {@code true}, this will be a framework network id. Otherwise, this will
-     *                     be a remote network id.
-     * @param fromFramework {@code true} if the network id is a framework network id, {@code false}
-                            if the network id is a remote network id.
-     * @return true if we've roamed to a linked network, false if not.
-     */
-    boolean updateOnLinkedNetworkRoaming(@NonNull String ifaceName,
-            int newNetworkId, boolean fromFramework);
-
-    /**
-     * Updates the linked networks for the current network and sends them to the supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @param networkId Network id of the network to link the configurations to.
-     * @param linkedConfigurations Map of config profile key to config for linking.
-     * @return true if networks were successfully linked, false otherwise.
-     */
-    boolean updateLinkedNetworks(@NonNull String ifaceName, int networkId,
-            Map<String, WifiConfiguration> linkedConfigurations);
-
-    /**
-     * Gets the security params of the current network associated with this interface
-     *
-     * @param ifaceName Name of the interface
-     * @return Security params of the current network associated with the interface
-     */
-    SecurityParams getCurrentNetworkSecurityParams(@NonNull String ifaceName);
-
-    /**
-     * Set whether the network-centric QoS policy feature is enabled or not for this interface.
-     *
-     * @param ifaceName name of the interface.
-     * @param isEnabled true if the feature is enabled, false otherwise.
-     * @return true if operation is successful, false otherwise.
-     */
-    boolean setNetworkCentricQosPolicyFeatureEnabled(@NonNull String ifaceName, boolean isEnabled);
-
-    /**
-     * Sends a QoS policy response.
-     *
-     * @param ifaceName Name of the interface.
-     * @param qosPolicyRequestId Dialog token to identify the request.
-     * @param morePolicies Flag to indicate more QoS policies can be accommodated.
-     * @param qosPolicyStatusList List of framework QosPolicyStatus objects.
-     * @return true if response is sent successfully, false otherwise.
-     */
-    boolean sendQosPolicyResponse(String ifaceName, int qosPolicyRequestId, boolean morePolicies,
-            @NonNull List<SupplicantStaIfaceHal.QosPolicyStatus> qosPolicyStatusList);
-
-    /**
-     * Indicates the removal of all active QoS policies configured by the AP.
-     *
-     * @param ifaceName Name of the interface.
-     */
-    boolean removeAllQosPolicies(String ifaceName);
-
-    /**
-     * Generate DPP credential for network access
-     *
-     * @param ifaceName Name of the interface.
-     * @param ssid ssid of the network
-     * @param privEcKey Private EC Key for DPP Configurator
-     * Returns true when operation is successful. On error, false is returned.
-     */
-    boolean generateSelfDppConfiguration(@NonNull String ifaceName, @NonNull String ssid,
-            byte[] privEcKey);
-
-    /**
-     * Set the currently configured network's anonymous identity.
-     *
-     * @param ifaceName Name of the interface.
-     * @param anonymousIdentity the anonymouns identity.
-     * @return true if succeeds, false otherwise.
-     */
-    boolean setEapAnonymousIdentity(@NonNull String ifaceName, String anonymousIdentity);
-}
diff --git a/service/java/com/android/server/wifi/InsecureEapNetworkHandler.java b/service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
deleted file mode 100644
index 225d01c..0000000
--- a/service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
+++ /dev/null
@@ -1,589 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.app.Notification;
-import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.graphics.drawable.Icon;
-import android.net.Uri;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
-import android.net.wifi.WifiEnterpriseConfig;
-import android.os.Handler;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
-import com.android.server.wifi.util.CertificateSubjectInfo;
-import com.android.server.wifi.util.NativeUtil;
-import com.android.wifi.resources.R;
-
-import java.security.cert.X509Certificate;
-
-/** This class is used to handle insecure EAP networks. */
-public class InsecureEapNetworkHandler {
-    private static final String TAG = "InsecureEapNetworkHandler";
-
-    @VisibleForTesting
-    static final String ACTION_CERT_NOTIF_TAP =
-            "com.android.server.wifi.ClientModeImpl.ACTION_CERT_NOTIF_TAP";
-    @VisibleForTesting
-    static final String ACTION_CERT_NOTIF_ACCEPT =
-            "com.android.server.wifi.ClientModeImpl.ACTION_CERT_NOTIF_ACCEPT";
-    @VisibleForTesting
-    static final String ACTION_CERT_NOTIF_REJECT =
-            "com.android.server.wifi.ClientModeImpl.ACTION_CERT_NOTIF_REJECT";
-    @VisibleForTesting
-    static final String EXTRA_PENDING_CERT_SSID =
-            "com.android.server.wifi.ClientModeImpl.EXTRA_PENDING_CERT_SSID";
-
-    private final String mCaCertHelpLink;
-    private final WifiContext mContext;
-    private final WifiConfigManager mWifiConfigManager;
-    private final WifiNative mWifiNative;
-    private final FrameworkFacade mFacade;
-    private final WifiNotificationManager mNotificationManager;
-    private final WifiDialogManager mWifiDialogManager;
-    private final boolean mIsTrustOnFirstUseSupported;
-    private final boolean mIsInsecureEnterpriseConfigurationAllowed;
-    private final InsecureEapNetworkHandlerCallbacks mCallbacks;
-    private final String mInterfaceName;
-    private final Handler mHandler;
-
-    @NonNull
-    private WifiConfiguration mCurConfig = null;
-    private int mPendingCaCertDepth = -1;
-    @Nullable
-    private X509Certificate mPendingCaCert = null;
-    @Nullable
-    private X509Certificate mPendingServerCert = null;
-    // This is updated on setting a pending CA cert.
-    private CertificateSubjectInfo mPendingCaCertSubjectInfo = null;
-    // This is updated on setting a pending CA cert.
-    private CertificateSubjectInfo mPendingCaCertIssuerInfo = null;
-    @Nullable
-    private WifiDialogManager.DialogHandle mTofuAlertDialog = null;
-    private boolean mIsCertNotificationReceiverRegistered = false;
-
-    BroadcastReceiver mCertNotificationReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            String action = intent.getAction();
-            String ssid = intent.getStringExtra(EXTRA_PENDING_CERT_SSID);
-            // This is an onGoing notification, dismiss it once an action is sent.
-            dismissDialogAndNotification();
-            Log.d(TAG, "Received CertNotification: ssid=" + ssid + ", action=" + action);
-            if (TextUtils.equals(action, ACTION_CERT_NOTIF_TAP)) {
-                askForUserApprovalForCaCertificate();
-            } else if (TextUtils.equals(action, ACTION_CERT_NOTIF_ACCEPT)) {
-                handleAccept(ssid);
-            } else if (TextUtils.equals(action, ACTION_CERT_NOTIF_REJECT)) {
-                handleReject(ssid);
-            }
-        }
-    };
-
-    public InsecureEapNetworkHandler(@NonNull WifiContext context,
-            @NonNull WifiConfigManager wifiConfigManager,
-            @NonNull WifiNative wifiNative,
-            @NonNull FrameworkFacade facade,
-            @NonNull WifiNotificationManager notificationManager,
-            @NonNull WifiDialogManager wifiDialogManager,
-            boolean isTrustOnFirstUseSupported,
-            boolean isInsecureEnterpriseConfigurationAllowed,
-            @NonNull InsecureEapNetworkHandlerCallbacks callbacks,
-            @NonNull String interfaceName,
-            @NonNull Handler handler) {
-        mContext = context;
-        mWifiConfigManager = wifiConfigManager;
-        mWifiNative = wifiNative;
-        mFacade = facade;
-        mNotificationManager = notificationManager;
-        mWifiDialogManager = wifiDialogManager;
-        mIsTrustOnFirstUseSupported = isTrustOnFirstUseSupported;
-        mIsInsecureEnterpriseConfigurationAllowed = isInsecureEnterpriseConfigurationAllowed;
-        mCallbacks = callbacks;
-        mInterfaceName = interfaceName;
-        mHandler = handler;
-
-        mCaCertHelpLink = mContext.getString(R.string.config_wifiCertInstallationHelpLink);
-    }
-
-    /**
-     * Prepare data for a new connection.
-     *
-     * Prepare data if this is an Enterprise configuration, which
-     * uses Server Cert, without a valid Root CA certificate or user approval.
-     *
-     * @param config the running wifi configuration.
-     */
-    public void prepareConnection(@NonNull WifiConfiguration config) {
-        if (null == config) return;
-
-        if (!config.isEnterprise()) return;
-        WifiEnterpriseConfig entConfig = config.enterpriseConfig;
-        if (!entConfig.isEapMethodServerCertUsed()) return;
-        if (entConfig.hasCaCertificate()) return;
-
-        clearConnection();
-
-        Log.d(TAG, "prepareConnection: isTofuSupported=" + mIsTrustOnFirstUseSupported
-                + ", isInsecureEapNetworkAllowed=" + mIsInsecureEnterpriseConfigurationAllowed
-                + ", isTofuEnabled=" + entConfig.isTrustOnFirstUseEnabled()
-                + ", isUserApprovedNoCaCert=" + entConfig.isUserApproveNoCaCert());
-        // If TOFU is not supported or insecure EAP network is allowed without TOFU enabled,
-        // return to skip the dialog if this network is approved before.
-        if (entConfig.isUserApproveNoCaCert()) {
-            if (!mIsTrustOnFirstUseSupported) return;
-            if (mIsInsecureEnterpriseConfigurationAllowed
-                    && !entConfig.isTrustOnFirstUseEnabled()) {
-                return;
-            }
-        }
-
-        mCurConfig = config;
-        registerCertificateNotificationReceiver();
-        // Remove cached PMK in the framework and supplicant to avoid
-        // skipping the EAP flow.
-        clearNativeData();
-        Log.d(TAG, "Remove native cached data and networks for TOFU.");
-    }
-
-    /** Clear data on disconnecting a connection. */
-    private void clearConnection() {
-        unregisterCertificateNotificationReceiver();
-        dismissDialogAndNotification();
-        clearInternalData();
-    }
-
-    /**
-     * Store the received certifiate for later use.
-     *
-     * @param ssid the target network SSID.
-     * @param depth the depth of this cert. The Root CA should be 0 or
-     *        a positive number, and the server cert is 0.
-     * @param cert the Root CA certificate from the server.
-     * @return true if the cert is cached; otherwise, false.
-     */
-    public boolean setPendingCertificate(@NonNull String ssid, int depth,
-            @NonNull X509Certificate cert) {
-        Log.d(TAG, "setPendingCertificate: " + "ssid=" + ssid + " depth=" + depth
-                + " current config=" + mCurConfig);
-        if (TextUtils.isEmpty(ssid)) return false;
-        if (null == mCurConfig) return false;
-        if (!TextUtils.equals(ssid, mCurConfig.SSID)) return false;
-        if (null == cert) return false;
-        if (depth < 0) return false;
-        // 0 is the tail, i.e. the server cert.
-        if (depth == 0 && null == mPendingServerCert) {
-            mPendingServerCert = cert;
-            Log.d(TAG, "Pending server certificate: " + mPendingServerCert);
-        }
-        if (depth < mPendingCaCertDepth) {
-            Log.d(TAG, "Ignore intermediate cert." + cert);
-            return true;
-        }
-
-        mPendingCaCertSubjectInfo = CertificateSubjectInfo.parse(
-                cert.getSubjectDN().getName());
-        if (null == mPendingCaCertSubjectInfo) {
-            Log.e(TAG, "CA cert has no valid subject.");
-            return false;
-        }
-        mPendingCaCertIssuerInfo = CertificateSubjectInfo.parse(
-                cert.getIssuerDN().getName());
-        if (null == mPendingCaCertIssuerInfo) {
-            Log.e(TAG, "CA cert has no valid issuer.");
-            return false;
-        }
-        mPendingCaCertDepth = depth;
-        mPendingCaCert = cert;
-        Log.d(TAG, "Pending Root CA certificate: " + mPendingCaCert);
-        return true;
-    }
-
-    /**
-     * Ask for the user approval if necessary.
-     *
-     * For TOFU is supported and an EAP network without a CA certificate.
-     * - if insecure EAP networks are not allowed
-     *    - if TOFU is not enabled, disconnect it.
-     *    - if no pending CA cert, disconnect it.
-     *    - if no server cert, disconnect it.
-     * - if insecure EAP networks are allowed and TOFU is not enabled
-     *    - follow no TOFU support flow.
-     * - if TOFU is enabled, CA cert is pending, and server cert is pending
-     *     - gate the connecitvity event here
-     *     - if this request is from a user, launch a dialog to get the user approval.
-     *     - if this request is from auto-connect, launch a notification.
-     * If TOFU is not supported, the confirmation flow is similar. Instead of installing CA
-     * cert from the server, just mark this network is approved by the user.
-     *
-     * @param isUserSelected indicates that this connection is triggered by a user.
-     * @return true if the user approval is needed; otherwise, false.
-     */
-    public boolean startUserApprovalIfNecessary(boolean isUserSelected) {
-        if (null == mCurConfig) return false;
-        if (!mCurConfig.isEnterprise()) return false;
-        WifiEnterpriseConfig entConfig = mCurConfig.enterpriseConfig;
-        if (!entConfig.isEapMethodServerCertUsed()) return false;
-        if (entConfig.hasCaCertificate()) return false;
-
-        // If Trust On First Use is supported and insecure enterprise configuration
-        // is not allowed, TOFU must be used for an Enterprise network without certs.
-        if (mIsTrustOnFirstUseSupported && !mIsInsecureEnterpriseConfigurationAllowed
-                && !mCurConfig.enterpriseConfig.isTrustOnFirstUseEnabled()) {
-            Log.d(TAG, "Trust On First Use is not enabled.");
-            handleError(mCurConfig.SSID);
-            return true;
-        }
-
-        if (useTrustOnFirstUse()) {
-            if (null == mPendingCaCert) {
-                Log.d(TAG, "No valid CA cert for TLS-based connection.");
-                handleError(mCurConfig.SSID);
-                return true;
-            } else if (null == mPendingServerCert) {
-                Log.d(TAG, "No valid Server cert for TLS-based connection.");
-                handleError(mCurConfig.SSID);
-                return true;
-            }
-        }
-
-        Log.d(TAG, "startUserApprovalIfNecessaryForInsecureEapNetwork: mIsUserSelected="
-                + isUserSelected);
-
-        if (isUserSelected) {
-            askForUserApprovalForCaCertificate();
-        } else {
-            notifyUserForCaCertificate();
-        }
-        return true;
-    }
-
-    private boolean useTrustOnFirstUse() {
-        return mIsTrustOnFirstUseSupported
-                && mCurConfig.enterpriseConfig.isTrustOnFirstUseEnabled();
-    }
-
-    private void registerCertificateNotificationReceiver() {
-        if (mIsCertNotificationReceiverRegistered) return;
-
-        IntentFilter filter = new IntentFilter();
-        if (useTrustOnFirstUse()) {
-            filter.addAction(ACTION_CERT_NOTIF_TAP);
-        } else {
-            filter.addAction(ACTION_CERT_NOTIF_ACCEPT);
-            filter.addAction(ACTION_CERT_NOTIF_REJECT);
-        }
-        mContext.registerReceiver(mCertNotificationReceiver, filter, null, mHandler);
-        mIsCertNotificationReceiverRegistered = true;
-    }
-
-    private void unregisterCertificateNotificationReceiver() {
-        if (!mIsCertNotificationReceiverRegistered) return;
-
-        mContext.unregisterReceiver(mCertNotificationReceiver);
-        mIsCertNotificationReceiverRegistered = false;
-    }
-
-    @VisibleForTesting
-    void handleAccept(@NonNull String ssid) {
-        if (!isConnectionValid(ssid)) return;
-
-        if (!useTrustOnFirstUse()) {
-            mWifiConfigManager.setUserApproveNoCaCert(mCurConfig.networkId, true);
-        } else {
-            if (null == mPendingCaCert || null == mPendingServerCert) {
-                handleError(ssid);
-                return;
-            }
-            if (!mWifiConfigManager.updateCaCertificate(
-                    mCurConfig.networkId, mPendingCaCert, mPendingServerCert)) {
-                // The user approved this network,
-                // keep the connection regardless of the result.
-                Log.e(TAG, "Cannot update CA cert to network " + mCurConfig.getProfileKey()
-                        + ", CA cert = " + mPendingCaCert);
-            }
-        }
-        mWifiConfigManager.allowAutojoin(mCurConfig.networkId, true);
-        dismissDialogAndNotification();
-        clearInternalData();
-
-        if (null != mCallbacks) mCallbacks.onAccept(ssid);
-    }
-
-    @VisibleForTesting
-    void handleReject(@NonNull String ssid) {
-        if (!isConnectionValid(ssid)) return;
-
-        mWifiConfigManager.allowAutojoin(mCurConfig.networkId, false);
-        dismissDialogAndNotification();
-        clearInternalData();
-        clearNativeData();
-
-        if (null != mCallbacks) mCallbacks.onReject(ssid);
-    }
-
-    private void handleError(@Nullable String ssid) {
-        dismissDialogAndNotification();
-        clearInternalData();
-        clearNativeData();
-
-        if (null != mCallbacks) mCallbacks.onError(ssid);
-    }
-
-    private void askForUserApprovalForCaCertificate() {
-        if (mCurConfig == null || TextUtils.isEmpty(mCurConfig.SSID)) return;
-        if (useTrustOnFirstUse()) {
-            if (null == mPendingCaCert || null == mPendingServerCert) {
-                Log.e(TAG, "Cannot launch a dialog for TOFU without "
-                        + "a valid pending CA certificate.");
-                return;
-            }
-        }
-        dismissDialogAndNotification();
-
-        String title = useTrustOnFirstUse()
-                ? mContext.getString(R.string.wifi_ca_cert_dialog_title)
-                : mContext.getString(R.string.wifi_ca_cert_dialog_preT_title);
-        String positiveButtonText = useTrustOnFirstUse()
-                ? mContext.getString(R.string.wifi_ca_cert_dialog_continue_text)
-                : mContext.getString(R.string.wifi_ca_cert_dialog_preT_continue_text);
-        String negativeButtonText = useTrustOnFirstUse()
-                ? mContext.getString(R.string.wifi_ca_cert_dialog_abort_text)
-                : mContext.getString(R.string.wifi_ca_cert_dialog_preT_abort_text);
-
-        String message = null;
-        String messageUrl = null;
-        int messageUrlStart = 0;
-        int messageUrlEnd = 0;
-        if (useTrustOnFirstUse()) {
-            String signature = NativeUtil.hexStringFromByteArray(
-                    mPendingCaCert.getSignature());
-            StringBuilder contentBuilder = new StringBuilder()
-                    .append(mContext.getString(R.string.wifi_ca_cert_dialog_message_hint))
-                    .append(mContext.getString(
-                            R.string.wifi_ca_cert_dialog_message_server_name_text,
-                            mPendingCaCertSubjectInfo.commonName))
-                    .append(mContext.getString(
-                            R.string.wifi_ca_cert_dialog_message_issuer_name_text,
-                            mPendingCaCertIssuerInfo.commonName));
-            if (!TextUtils.isEmpty(mPendingCaCertSubjectInfo.organization)) {
-                contentBuilder.append(mContext.getString(
-                        R.string.wifi_ca_cert_dialog_message_organization_text,
-                        mPendingCaCertSubjectInfo.organization));
-            }
-            if (!TextUtils.isEmpty(mPendingCaCertSubjectInfo.email)) {
-                contentBuilder.append(mContext.getString(
-                        R.string.wifi_ca_cert_dialog_message_contact_text,
-                        mPendingCaCertSubjectInfo.email));
-            }
-            contentBuilder
-                    .append(mContext.getString(
-                            R.string.wifi_ca_cert_dialog_message_signature_name_text,
-                            signature.substring(0, 16)));
-            message = contentBuilder.toString();
-        } else {
-            String hint = mContext.getString(
-                    R.string.wifi_ca_cert_dialog_preT_message_hint, mCurConfig.SSID);
-            String linkText = mContext.getString(
-                    R.string.wifi_ca_cert_dialog_preT_message_link);
-            message = hint + " " + linkText;
-            messageUrl = mCaCertHelpLink;
-            messageUrlStart = hint.length() + 1;
-            messageUrlEnd = message.length();
-        }
-        mTofuAlertDialog = mWifiDialogManager.createSimpleDialogWithUrl(
-                title,
-                message,
-                messageUrl,
-                messageUrlStart,
-                messageUrlEnd,
-                positiveButtonText,
-                negativeButtonText,
-                null /* neutralButtonText */,
-                new WifiDialogManager.SimpleDialogCallback() {
-                    @Override
-                    public void onPositiveButtonClicked() {
-                        handleAccept(mCurConfig.SSID);
-                    }
-
-                    @Override
-                    public void onNegativeButtonClicked() {
-                        handleReject(mCurConfig.SSID);
-                    }
-
-                    @Override
-                    public void onNeutralButtonClicked() {
-                        // Not used.
-                        handleReject(mCurConfig.SSID);
-                    }
-
-                    @Override
-                    public void onCancelled() {
-                        handleReject(mCurConfig.SSID);
-                    }
-                },
-                new WifiThreadRunner(mHandler));
-        mTofuAlertDialog.launchDialog();
-    }
-
-    private PendingIntent genCaCertNotifIntent(
-            @NonNull String action, @NonNull String ssid) {
-        Intent intent = new Intent(action)
-                .setPackage(mContext.getServiceWifiPackageName())
-                .putExtra(EXTRA_PENDING_CERT_SSID, ssid);
-        return mFacade.getBroadcast(mContext, 0, intent,
-                PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
-    }
-
-    private void notifyUserForCaCertificate() {
-        if (mCurConfig == null) return;
-        if (useTrustOnFirstUse()) {
-            if (null == mPendingCaCert) return;
-            if (null == mPendingServerCert) return;
-        }
-        dismissDialogAndNotification();
-
-        PendingIntent tapPendingIntent;
-        if (useTrustOnFirstUse()) {
-            tapPendingIntent = genCaCertNotifIntent(ACTION_CERT_NOTIF_TAP, mCurConfig.SSID);
-        } else {
-            Intent openLinkIntent = new Intent(Intent.ACTION_VIEW)
-                    .setData(Uri.parse(mCaCertHelpLink))
-                    .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            tapPendingIntent = mFacade.getActivity(mContext, 0, openLinkIntent,
-                    PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
-        }
-
-        String title = useTrustOnFirstUse()
-                ? mContext.getString(R.string.wifi_ca_cert_notification_title)
-                : mContext.getString(R.string.wifi_ca_cert_notification_preT_title);
-        String content = useTrustOnFirstUse()
-                ? mContext.getString(R.string.wifi_ca_cert_notification_message, mCurConfig.SSID)
-                : mContext.getString(R.string.wifi_ca_cert_notification_preT_message,
-                        mCurConfig.SSID);
-        Notification.Builder builder = mFacade.makeNotificationBuilder(mContext,
-                WifiService.NOTIFICATION_NETWORK_ALERTS)
-                .setSmallIcon(Icon.createWithResource(mContext.getWifiOverlayApkPkgName(),
-                            com.android.wifi.resources.R.drawable.stat_notify_wifi_in_range))
-                .setContentTitle(title)
-                .setContentText(content)
-                .setStyle(new Notification.BigTextStyle().bigText(content))
-                .setContentIntent(tapPendingIntent)
-                .setOngoing(true)
-                .setColor(mContext.getResources().getColor(
-                            android.R.color.system_notification_accent_color));
-        // On a device which does not support Trust On First Use,
-        // a user can accept or reject this network via the notification.
-        if (!useTrustOnFirstUse()) {
-            Notification.Action acceptAction = new Notification.Action.Builder(
-                    null /* icon */,
-                    mContext.getString(R.string.wifi_ca_cert_dialog_preT_continue_text),
-                    genCaCertNotifIntent(ACTION_CERT_NOTIF_ACCEPT, mCurConfig.SSID)).build();
-            Notification.Action rejectAction = new Notification.Action.Builder(
-                    null /* icon */,
-                    mContext.getString(R.string.wifi_ca_cert_dialog_preT_abort_text),
-                    genCaCertNotifIntent(ACTION_CERT_NOTIF_REJECT, mCurConfig.SSID)).build();
-            builder.addAction(rejectAction).addAction(acceptAction);
-        }
-        mNotificationManager.notify(SystemMessage.NOTE_SERVER_CA_CERTIFICATE, builder.build());
-    }
-
-    private void dismissDialogAndNotification() {
-        mNotificationManager.cancel(SystemMessage.NOTE_SERVER_CA_CERTIFICATE);
-        if (mTofuAlertDialog != null) {
-            mTofuAlertDialog.dismissDialog();
-            mTofuAlertDialog = null;
-        }
-    }
-
-    private void clearInternalData() {
-        mPendingCaCertDepth = -1;
-        mPendingCaCert = null;
-        mPendingServerCert = null;
-        mPendingCaCertSubjectInfo = null;
-        mPendingCaCertIssuerInfo = null;
-        mCurConfig = null;
-    }
-
-    private void clearNativeData() {
-        // PMK should be cleared or it would skip EAP flow next time.
-        if (null != mCurConfig) {
-            mWifiNative.removeNetworkCachedData(mCurConfig.networkId);
-        }
-        // remove network so that supplicant's PMKSA cache is cleared
-        mWifiNative.removeAllNetworks(mInterfaceName);
-    }
-
-    // There might be two possible conditions that there is no
-    // valid information to handle this response:
-    // 1. A new network request is fired just before getting the response.
-    //    As a result, this response is invalid and should be ignored.
-    // 2. There is something wrong, and it stops at an abnormal state.
-    //    For this case, we should go back DisconnectedState to
-    //    recover the state machine.
-    // Unfortunatually, we cannot identify the condition without valid information.
-    // If condition #1 occurs, and we found that the target SSID is changed,
-    // it should transit to L3Connected soon normally, just ignore this message.
-    // If condition #2 occurs, clear existing data and notify the client mode
-    // via onError callback.
-    private boolean isConnectionValid(@Nullable String ssid) {
-        if (TextUtils.isEmpty(ssid) || null == mCurConfig) {
-            handleError(null);
-            return false;
-        }
-
-        if (!TextUtils.equals(ssid, mCurConfig.SSID)) {
-            Log.w(TAG, "Target SSID " + mCurConfig.SSID
-                    + " is different from TOFU returned SSID" + ssid);
-            return false;
-        }
-        return true;
-    }
-
-    /** The callbacks object to notify the consumer. */
-    public static class InsecureEapNetworkHandlerCallbacks {
-        /**
-         * When a certificate is accepted, this callback is called.
-         *
-         * @param ssid SSID of the network.
-         */
-        public void onAccept(@NonNull String ssid) {}
-        /**
-         * When a certificate is rejected, this callback is called.
-         *
-         * @param ssid SSID of the network.
-         */
-        public void onReject(@NonNull String ssid) {}
-        /**
-         * When there are no valid data to handle this insecure EAP network,
-         * this callback is called.
-         *
-         * @param ssid SSID of the network, it might be null.
-         */
-        public void onError(@Nullable String ssid) {}
-    }
-}
diff --git a/service/java/com/android/server/wifi/InterfaceConflictManager.java b/service/java/com/android/server/wifi/InterfaceConflictManager.java
deleted file mode 100644
index 5869f43..0000000
--- a/service/java/com/android/server/wifi/InterfaceConflictManager.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP_BRIDGE;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_NAN;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_P2P;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_STA;
-
-import android.annotation.IntDef;
-import android.content.res.Resources;
-import android.net.wifi.WifiContext;
-import android.os.Message;
-import android.os.WorkSource;
-import android.text.TextUtils;
-import android.util.ArraySet;
-import android.util.Log;
-import android.util.Pair;
-
-import com.android.internal.util.State;
-import com.android.internal.util.StateMachine;
-import com.android.server.wifi.util.WaitingState;
-import com.android.wifi.resources.R;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.function.Consumer;
-
-/**
- * Displays dialogs asking the user to approve or reject interface priority decisions.
- */
-public class InterfaceConflictManager {
-    private static final String TAG = "InterfaceConflictManager";
-    private boolean mVerboseLoggingEnabled = false;
-
-    private final WifiContext mContext;
-    private final FrameworkFacade mFrameworkFacade;
-    private final HalDeviceManager mHdm;
-    private final WifiThreadRunner mThreadRunner;
-    private final WifiDialogManager mWifiDialogManager;
-
-    private final Resources mResources;
-    private final boolean mUserApprovalNeeded;
-    private final Set<String> mUserApprovalExemptedPackages;
-    private boolean mUserApprovalNeededOverride = false;
-    private boolean mUserApprovalNeededOverrideValue = false;
-
-    private Object mLock = new Object();
-    private boolean mUserApprovalPending = false;
-    private String mUserApprovalPendingTag = null;
-    private boolean mUserJustApproved = false;
-
-    private static final String MESSAGE_BUNDLE_KEY_PENDING_USER = "pending_user_decision";
-
-    public InterfaceConflictManager(WifiContext wifiContext, FrameworkFacade frameworkFacade,
-            HalDeviceManager hdm, WifiThreadRunner threadRunner,
-            WifiDialogManager wifiDialogManager) {
-        mContext = wifiContext;
-        mFrameworkFacade = frameworkFacade;
-        mHdm = hdm;
-        mThreadRunner = threadRunner;
-        mWifiDialogManager = wifiDialogManager;
-
-        mResources = mContext.getResources();
-        mUserApprovalNeeded = mResources.getBoolean(
-                R.bool.config_wifiUserApprovalRequiredForD2dInterfacePriority);
-        String[] packageList = mResources.getStringArray(
-                R.array.config_wifiExcludedFromUserApprovalForD2dInterfacePriority);
-        mUserApprovalExemptedPackages =
-                (packageList == null || packageList.length == 0) ? Collections.emptySet()
-                        : new ArraySet<>(packageList);
-    }
-
-    /**
-     * Enable verbose logging.
-     */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
-    }
-
-    /**
-     * Returns an indication as to whether user approval is needed for this specific request. User
-     * approval is controlled by:
-     * - A global overlay `config_wifiUserApprovalRequiredForD2dInterfacePriority`
-     * - An exemption list overlay `config_wifiExcludedFromUserApprovalForD2dInterfacePriority`
-     *   which is a list of packages which are *exempted* from user approval
-     * - A shell command which can be used to override
-     *
-     * @param requestorWs The WorkSource of the requestor - used to determine whether it is exempted
-     *                    from user approval. All requesting packages must be exempted for the
-     *                    dialog to NOT be displayed.
-     */
-    private boolean isUserApprovalNeeded(WorkSource requestorWs) {
-        if (mUserApprovalNeededOverride) return mUserApprovalNeededOverrideValue;
-        if (!mUserApprovalNeeded || mUserApprovalExemptedPackages.isEmpty()) {
-            return mUserApprovalNeeded;
-        }
-
-        for (int i = 0; i < requestorWs.size(); ++i) {
-            if (!mUserApprovalExemptedPackages.contains(requestorWs.getPackageName(i))) {
-                return true;
-            }
-        }
-
-        return false; // all packages of the requestor are excluded
-    }
-
-    /**
-     * Override (potentially) the user approval needed device configuration. Intended for debugging
-     * via the shell command.
-     *
-     * @param override      Enable overriding the default.
-     * @param overrideValue The actual override value (i.e. disable or enable).
-     */
-    public void setUserApprovalNeededOverride(boolean override, boolean overrideValue) {
-        if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "setUserApprovalNeededOverride: override=" + override + ", overrideValue="
-                    + overrideValue);
-        }
-        mUserApprovalNeededOverride = override;
-        mUserApprovalNeededOverrideValue = overrideValue;
-    }
-
-    /**
-     * Return values for {@link #manageInterfaceConflictForStateMachine}
-     */
-
-    // Caller should continue and execute command: no need for user approval, or user approval
-    // already granted, or command bound to fail so just fail through the normal path
-    public static final int ICM_EXECUTE_COMMAND = 0;
-
-    // Caller should skip executing the command for now (do not defer it - already done!). The user
-    // was asked for permission and the command will be executed again when we get a response.
-    public static final int ICM_SKIP_COMMAND_WAIT_FOR_USER = 1;
-
-    // Caller should abort the command and execute whatever failure code is necessary - this
-    // command was rejected by the user or we cannot ask the user since there's a pending user
-    // request.
-    public static final int ICM_ABORT_COMMAND = 2;
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"ICM_"}, value = {
-            ICM_EXECUTE_COMMAND,
-            ICM_SKIP_COMMAND_WAIT_FOR_USER,
-            ICM_ABORT_COMMAND
-    })
-    @interface IcmResult {}
-
-    /**
-     * Manages interface conflicts for a State Machine based caller. Possible scenarios:
-     * - New request:
-     *     - ok to proceed inline (i.e. caller can just proceed normally - no conflict)
-     *       [nop]
-     *     - need to request user approval (there's conflict, caller need to wait for user response)
-     *       [msg get tagged + deferred, transition to waiting state]
-     * - Previously executed command (i.e. already asked the user)
-     *     - user rejected request
-     *       [discard request, execute any necessary error callbacks]
-     *     - user approved request
-     *       [~nop (i.e. proceed)]
-     * - Busy asking approval for another request:
-     *     - If from another caller: reject
-     *     - If from the same caller: defer the caller (possibly will be approved when gets to ask
-     *       again).
-     *
-     * Synchronization:
-     * - Multiple threads accessing this method will be blocked until the processing of the other
-     *   thread is done. The "processing" is simply the decision making - i.e. not the waiting for
-     *   user response.
-     * - If a user response is pending then subsequent requests are auto-rejected if they require
-     *   user approval. Note that this will result in race condition if this approval changes
-     *   the conditions for the user approval request: e.g. it may increase the impact of a user
-     *   approval (w/o telling the user) or it may be rejected even if approved by the user (if
-     *   the newly allocated interface now has higher priority).
-     *
-     * @param tag Tag of the caller for logging
-     * @param msg The command which needs to be evaluated or executed for user approval
-     * @param stateMachine The source state machine
-     * @param waitingState The {@link WaitingState} added to the above state machine
-     * @param targetState The target state to transition to on user response
-     * @param createIfaceType The interface which needs to be created
-     * @param requestorWs The requestor WorkSource
-     *
-     * @return ICM_EXECUTE_COMMAND caller should execute the command,
-     * ICM_SKIP_COMMAND_WAIT_FOR_USER caller should skip the command (for now),
-     * ICM_ABORT_COMMAND caller should abort this command and execute whatever failure code is
-     * necessary.
-     */
-    public @IcmResult int manageInterfaceConflictForStateMachine(String tag, Message msg,
-            StateMachine stateMachine, WaitingState waitingState, State targetState,
-            @HalDeviceManager.HdmIfaceTypeForCreation int createIfaceType, WorkSource requestorWs) {
-        synchronized (mLock) {
-            if (mUserApprovalPending && !TextUtils.equals(tag, mUserApprovalPendingTag)) {
-                Log.w(TAG, tag + ": rejected since there's a pending user approval for "
-                        + mUserApprovalPendingTag);
-                return ICM_ABORT_COMMAND; // caller should not proceed with operation
-            }
-
-            // is this a command which was waiting for a user decision?
-            boolean isReexecutedCommand = msg.getData().getBoolean(
-                    MESSAGE_BUNDLE_KEY_PENDING_USER, false);
-            if (isReexecutedCommand) {
-                mUserApprovalPending = false;
-                mUserApprovalPendingTag = null;
-
-                if (mVerboseLoggingEnabled) {
-                    Log.d(TAG, tag + ": Re-executing a command with user approval result - "
-                            + mUserJustApproved);
-                }
-                return mUserJustApproved ? ICM_EXECUTE_COMMAND : ICM_ABORT_COMMAND;
-            }
-
-            if (mUserApprovalPending) {
-                Log.w(TAG, tag
-                        + ": trying for another potentially waiting operation - but should be"
-                        + " in a waiting state!?");
-                stateMachine.deferMessage(msg);
-                return ICM_SKIP_COMMAND_WAIT_FOR_USER; // same effect
-            }
-
-            if (!isUserApprovalNeeded(requestorWs)) return ICM_EXECUTE_COMMAND;
-
-            List<Pair<Integer, WorkSource>> impact = mHdm.reportImpactToCreateIface(createIfaceType,
-                    false, requestorWs);
-            if (mVerboseLoggingEnabled) {
-                Log.d(TAG, tag + ": Asking user about creating the interface, impact=" + impact);
-            }
-            if (impact == null || impact.isEmpty()) {
-                Log.d(TAG, tag
-                        + ": Either can't create interface or can w/o sid-effects - proceeding");
-                return ICM_EXECUTE_COMMAND;
-            }
-
-            displayUserApprovalDialog(createIfaceType, requestorWs, impact,
-                    (result) -> {
-                        if (mVerboseLoggingEnabled) {
-                            Log.d(TAG, tag + ": User response to creating " + getInterfaceName(
-                                    createIfaceType) + ": " + result);
-                        }
-                        mUserJustApproved = result;
-                        waitingState.sendTransitionStateCommand(targetState);
-                    });
-            // defer message to have it executed again automatically when switching
-            // states - want to do it now so that it will be at the top of the queue
-            // when we switch back. Will need to skip it if the user rejected it!
-            msg.getData().putBoolean(MESSAGE_BUNDLE_KEY_PENDING_USER, true);
-            stateMachine.deferMessage(msg);
-            stateMachine.transitionTo(waitingState);
-
-            mUserApprovalPending = true;
-            mUserApprovalPendingTag = tag;
-
-            return ICM_SKIP_COMMAND_WAIT_FOR_USER;
-        }
-    }
-
-    /**
-     * Trigger a dialog which requests user approval to resolve an interface priority confict.
-     *
-     * @param createIfaceType The interface to be created.
-     * @param requestorWs The WorkSource of the requesting application.
-     * @param impact The impact of creating this interface (a list of interfaces to be deleted and
-     *               their corresponding impacted WorkSources).
-     * @param handleResult A Consumer to execute with results.
-     */
-    private void displayUserApprovalDialog(
-            @HalDeviceManager.HdmIfaceTypeForCreation int createIfaceType,
-            WorkSource requestorWs,
-            List<Pair<Integer, WorkSource>> impact,
-            Consumer<Boolean> handleResult) {
-        if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "displayUserApprovalDialog: createIfaceType=" + createIfaceType
-                    + ", requestorWs=" + requestorWs + ", impact=" + impact);
-        }
-
-        CharSequence requestorAppName = mFrameworkFacade.getAppName(mContext,
-                requestorWs.getPackageName(0), requestorWs.getUid(0));
-        String requestedInterface = getInterfaceName(createIfaceType);
-        Set<String> impactedPackagesSet = new HashSet<>();
-        for (Pair<Integer, WorkSource> detail : impact) {
-            for (int j = 0; j < detail.second.size(); ++j) {
-                impactedPackagesSet.add(
-                        mFrameworkFacade.getAppName(mContext, detail.second.getPackageName(j),
-                                detail.second.getUid(j)).toString());
-            }
-        }
-        String impactedPackages = TextUtils.join(", ", impactedPackagesSet);
-
-        mWifiDialogManager.createSimpleDialog(
-                mResources.getString(R.string.wifi_interface_priority_title, requestorAppName),
-                impactedPackagesSet.size() == 1 ? mResources.getString(
-                        R.string.wifi_interface_priority_message, requestorAppName,
-                        requestedInterface, impactedPackages)
-                        : mResources.getString(R.string.wifi_interface_priority_message_plural,
-                                requestorAppName, requestedInterface, impactedPackages),
-                mResources.getString(R.string.wifi_interface_priority_approve),
-                mResources.getString(R.string.wifi_interface_priority_reject),
-                null,
-                new WifiDialogManager.SimpleDialogCallback() {
-                    @Override
-                    public void onPositiveButtonClicked() {
-                        if (mVerboseLoggingEnabled) {
-                            Log.d(TAG, "User approved request for " + getInterfaceName(
-                                    createIfaceType));
-                        }
-                        handleResult.accept(true);
-                    }
-
-                    @Override
-                    public void onNegativeButtonClicked() {
-                        if (mVerboseLoggingEnabled) {
-                            Log.d(TAG, "User rejected request for " + getInterfaceName(
-                                    createIfaceType));
-                        }
-                        handleResult.accept(false);
-                    }
-
-                    @Override
-                    public void onNeutralButtonClicked() {
-                        onNegativeButtonClicked();
-                    }
-
-                    @Override
-                    public void onCancelled() {
-                        onNegativeButtonClicked();
-                    }
-                }, mThreadRunner).launchDialog();
-    }
-
-    private String getInterfaceName(@HalDeviceManager.HdmIfaceTypeForCreation int createIfaceType) {
-        switch (createIfaceType) {
-            case HDM_CREATE_IFACE_STA:
-                return "STA";
-            case HDM_CREATE_IFACE_AP:
-                return "AP";
-            case HDM_CREATE_IFACE_AP_BRIDGE:
-                return "AP";
-            case HDM_CREATE_IFACE_P2P:
-                return "Wi-Fi Direct";
-            case HDM_CREATE_IFACE_NAN:
-                return "Wi-Fi Aware";
-        }
-        return "Unknown";
-    }
-
-    /**
-     * Dump the internal state of the class.
-     */
-    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        pw.println("dump of " + TAG + ":");
-        pw.println("  mUserApprovalNeeded=" + mUserApprovalNeeded);
-        pw.println("  mUserApprovalNeededOverride=" + mUserApprovalNeededOverride);
-        pw.println("  mUserApprovalNeededOverrideValue=" + mUserApprovalNeededOverrideValue);
-        pw.println("  mUserApprovalPending=" + mUserApprovalPending);
-        pw.println("  mUserApprovalPendingTag=" + mUserApprovalPendingTag);
-        pw.println("  mUserJustApproved=" + mUserJustApproved);
-    }
-}
diff --git a/service/java/com/android/server/wifi/LinkProbeManager.java b/service/java/com/android/server/wifi/LinkProbeManager.java
index 26d2416..58540a1 100644
--- a/service/java/com/android/server/wifi/LinkProbeManager.java
+++ b/service/java/com/android/server/wifi/LinkProbeManager.java
@@ -220,10 +220,11 @@
         }
 
         if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "link probing triggered with conditions: timeSinceLastLinkProbeMs="
-                    + timeSinceLastLinkProbeMs
-                    + " timeSinceLastTxSuccessIncreaseMs=" + timeSinceLastTxSuccessIncreaseMs
-                    + " rssi=" + rssi + " linkSpeed=" + linkSpeed);
+            Log.d(TAG, String.format(
+                    "link probing triggered with conditions: timeSinceLastLinkProbeMs=%d "
+                            + "timeSinceLastTxSuccessIncreaseMs=%d rssi=%d linkSpeed=%s",
+                    timeSinceLastLinkProbeMs, timeSinceLastTxSuccessIncreaseMs,
+                    rssi, linkSpeed));
         }
 
         // TODO(b/112029045): also report MCS rate to metrics when supported by driver
diff --git a/service/java/com/android/server/wifi/LocalOnlyHotspotRequestInfo.java b/service/java/com/android/server/wifi/LocalOnlyHotspotRequestInfo.java
index 0a651a6..c17f07b 100644
--- a/service/java/com/android/server/wifi/LocalOnlyHotspotRequestInfo.java
+++ b/service/java/com/android/server/wifi/LocalOnlyHotspotRequestInfo.java
@@ -21,9 +21,7 @@
 import android.net.wifi.ILocalOnlyHotspotCallback;
 import android.net.wifi.SoftApConfiguration;
 import android.os.Binder;
-import android.os.Handler;
 import android.os.IBinder;
-import android.os.Looper;
 import android.os.RemoteException;
 import android.os.WorkSource;
 
@@ -37,7 +35,6 @@
 class LocalOnlyHotspotRequestInfo implements IBinder.DeathRecipient {
     static final int HOTSPOT_NO_ERROR = -1;
 
-    private final Handler mHandler;
     private final int mPid;
     private final WorkSource mWs;
     private final ILocalOnlyHotspotCallback mCallback;
@@ -54,11 +51,9 @@
         void onLocalOnlyHotspotRequestorDeath(LocalOnlyHotspotRequestInfo requestor);
     }
 
-    LocalOnlyHotspotRequestInfo(Looper looper, @NonNull WorkSource ws,
-            @NonNull ILocalOnlyHotspotCallback callback,
+    LocalOnlyHotspotRequestInfo(@NonNull WorkSource ws, @NonNull ILocalOnlyHotspotCallback callback,
             @NonNull RequestingApplicationDeathCallback deathCallback,
             @Nullable SoftApConfiguration customConfig) {
-        mHandler = new Handler(looper);
         mPid = Binder.getCallingPid();
         mWs = Preconditions.checkNotNull(ws);
         mCallback = Preconditions.checkNotNull(callback);
@@ -84,7 +79,7 @@
      */
     @Override
     public void binderDied() {
-        mHandler.post(() -> mDeathCallback.onLocalOnlyHotspotRequestorDeath(this));
+        mDeathCallback.onLocalOnlyHotspotRequestorDeath(this);
     }
 
     /**
diff --git a/service/java/com/android/server/wifi/LogcatLog.java b/service/java/com/android/server/wifi/LogcatLog.java
index 32341ac..ec30da0 100644
--- a/service/java/com/android/server/wifi/LogcatLog.java
+++ b/service/java/com/android/server/wifi/LogcatLog.java
@@ -41,8 +41,12 @@
         mTag = tag;
     }
 
-    public static void enableVerboseLogging(boolean verboseEnabled) {
-        sVerboseLogging = verboseEnabled;
+    public static void enableVerboseLogging(int verboseMode) {
+        if (verboseMode > 0) {
+            sVerboseLogging = true;
+        } else {
+            sVerboseLogging = false;
+        }
     }
 
     /* New-style methods */
diff --git a/service/java/com/android/server/wifi/MacAddressUtil.java b/service/java/com/android/server/wifi/MacAddressUtil.java
index 520f75c..3ea2654 100644
--- a/service/java/com/android/server/wifi/MacAddressUtil.java
+++ b/service/java/com/android/server/wifi/MacAddressUtil.java
@@ -18,13 +18,10 @@
 
 import android.net.MacAddress;
 import android.security.keystore.AndroidKeyStoreProvider;
-import android.security.keystore.BackendBusyException;
 import android.security.keystore.KeyGenParameterSpec;
 import android.security.keystore.KeyProperties;
 import android.util.Log;
 
-import com.android.modules.utils.build.SdkLevel;
-
 import java.nio.ByteBuffer;
 import java.nio.charset.StandardCharsets;
 import java.security.InvalidAlgorithmParameterException;
@@ -107,13 +104,6 @@
                 | UnrecoverableKeyException | NoSuchProviderException e) {
             Log.e(TAG, "Failure in obtainMacRandHashFunction", e);
             return null;
-        } catch (Exception e) {
-            if (SdkLevel.isAtLeastS() && e instanceof BackendBusyException) {
-                Log.e(TAG, "Failure in obtainMacRandHashFunction", e);
-                return null;
-            }
-            Log.e(TAG, "Unexpected exception caught in obtainMacRandHashFunction", e);
-            throw e;
         }
     }
 
diff --git a/service/java/com/android/server/wifi/MakeBeforeBreakManager.java b/service/java/com/android/server/wifi/MakeBeforeBreakManager.java
index 13d5bc4..ec20612 100644
--- a/service/java/com/android/server/wifi/MakeBeforeBreakManager.java
+++ b/service/java/com/android/server/wifi/MakeBeforeBreakManager.java
@@ -19,20 +19,13 @@
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_PRIMARY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_TRANSIENT;
 
-import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.annotation.TestApi;
 import android.content.Context;
 import android.util.Log;
 
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wifi.proto.nano.WifiMetricsProto;
-
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -51,49 +44,6 @@
 
     private final List<Runnable> mOnAllSecondaryTransientCmmsStoppedListeners = new ArrayList<>();
     private boolean mVerboseLoggingEnabled = false;
-    private @MbbInternalState int mInternalState = MBB_STATE_NONE;
-
-    /** No MBB has been initiated. Package private. */
-    @VisibleForTesting
-    static final int MBB_STATE_NONE = 0;
-
-    /** Client manager with ROLE_CLIENT_SECONDARY_TRANSIENT has been created for MBB and trying
-     * to connect the new network. */
-    @VisibleForTesting
-    static final int MBB_STATE_SECONDARY_TRANSIENT_CREATED = 1;
-
-    /** MBB has got the captive portal detected. */
-    @VisibleForTesting
-    static final int MBB_STATE_CAPTIVE_PORTAL_DETECTED = 2;
-
-    /** MBB has got the internet validation on new network, start the role switch */
-    @VisibleForTesting
-    static final int MBB_STATE_INTERNET_VALIDATED = 3;
-
-    /** MBB has got the internet validation failed notification. */
-    @VisibleForTesting
-    static final int MBB_STATE_VALIDATION_FAILED = 4;
-
-    /** MBB has got the role changed event when both two roles are secondary transient. This
-     * happens in the middle of the old/new primary role switch */
-    @VisibleForTesting
-    static final int MBB_STATE_ROLES_BEING_SWITCHED_BOTH_SECONDARY_TRANSIENT = 5;
-
-    /** MBB has got the role changed event when one role is primary and anther is secondary
-     * transient. This happens when the old/new primary role switch is done. */
-    @VisibleForTesting
-    static final int MBB_STATE_ROLE_SWITCH_COMPLETE = 6;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"MBB_STATE_"}, value = {
-            MBB_STATE_NONE,
-            MBB_STATE_SECONDARY_TRANSIENT_CREATED,
-            MBB_STATE_CAPTIVE_PORTAL_DETECTED,
-            MBB_STATE_INTERNET_VALIDATED,
-            MBB_STATE_ROLES_BEING_SWITCHED_BOTH_SECONDARY_TRANSIENT,
-            MBB_STATE_ROLE_SWITCH_COMPLETE})
-    private @interface MbbInternalState {}
 
     private static class MakeBeforeBreakInfo {
         @NonNull
@@ -146,14 +96,6 @@
                     @NonNull ConcreteClientModeManager clientModeManager) {
                 MakeBeforeBreakManager.this.onCaptivePortalDetected(clientModeManager);
             }
-
-            @Override
-            public void onInternetValidationFailed(
-                    @NonNull ConcreteClientModeManager clientModeManager,
-                    boolean currentConnectionDetectedCaptivePortal) {
-                MakeBeforeBreakManager.this.onInternetValidationFailed(clientModeManager,
-                        currentConnectionDetectedCaptivePortal);
-            }
         });
     }
 
@@ -172,12 +114,6 @@
             }
             // just in case
             recoverPrimary();
-            if (activeModeManager.getRole() == ROLE_CLIENT_SECONDARY_TRANSIENT) {
-                transitionToState(MBB_STATE_SECONDARY_TRANSIENT_CREATED);
-            } else {
-                Log.w(TAG, " MBB expects ROLE_CLIENT_SECONDARY_TRANSIENT but got "
-                        + activeModeManager.getRole());
-            }
         }
 
         @Override
@@ -191,12 +127,6 @@
             // if either the old or new primary stopped during MBB, abort the MBB attempt
             ConcreteClientModeManager clientModeManager =
                     (ConcreteClientModeManager) activeModeManager;
-            if (mVerboseLoggingEnabled) {
-                if (mInternalState == MBB_STATE_VALIDATION_FAILED) {
-                    Log.w(TAG, " ClientModeManager " + clientModeManager + " removed because"
-                            + " internet validation failed.");
-                }
-            }
             if (mMakeBeforeBreakInfo != null) {
                 boolean oldPrimaryStopped = clientModeManager == mMakeBeforeBreakInfo.oldPrimary;
                 boolean newPrimaryStopped = clientModeManager == mMakeBeforeBreakInfo.newPrimary;
@@ -211,7 +141,6 @@
             }
             recoverPrimary();
             triggerOnStoppedListenersIfNoMoreSecondaryTransientCmms();
-            transitionToState(MBB_STATE_NONE);
         }
 
         @Override
@@ -230,39 +159,6 @@
         }
     }
 
-    private String getInternalStateStr(@MbbInternalState int state) {
-        switch (state) {
-            case MBB_STATE_NONE:
-                return "MBB_STATE_NONE";
-            case MBB_STATE_SECONDARY_TRANSIENT_CREATED:
-                return "MBB_STATE_SECONDARY_TRANSIENT_CREATED";
-            case MBB_STATE_CAPTIVE_PORTAL_DETECTED:
-                return "MBB_STATE_CAPTIVE_PORTAL_DETECTED";
-            case MBB_STATE_INTERNET_VALIDATED:
-                return "MBB_STATE_INTERNET_VALIDATED";
-            case MBB_STATE_ROLES_BEING_SWITCHED_BOTH_SECONDARY_TRANSIENT:
-                return "MBB_STATE_ROLES_BEING_SWITCHED_BOTH_SECONDARY_TRANSIENT";
-            case MBB_STATE_ROLE_SWITCH_COMPLETE:
-                return "MBB_STATE_ROLE_SWITCH_COMPLETE";
-            default:
-                return "UNKNOWN MBB_STATE";
-        }
-    }
-
-    private void transitionToState(@MbbInternalState int state) {
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "MBB state transition: from = " + getInternalStateStr(mInternalState)
-                    + ", to = " + getInternalStateStr(state));
-        }
-        mInternalState = state;
-    }
-
-    // Get internal MBB state. Package private.
-    @TestApi
-    @MbbInternalState int getInternalState() {
-        return mInternalState;
-    }
-
     /**
      * Failsafe: if there is no primary CMM but there exists exactly one CMM in
      * {@link ActiveModeManager#ROLE_CLIENT_SECONDARY_TRANSIENT}, or multiple and MBB is not
@@ -318,11 +214,6 @@
                     ROLE_CLIENT_PRIMARY, mFrameworkFacade.getSettingsWorkSource(mContext));
             return;
         }
-        if (newPrimary.getPreviousRole() == ROLE_CLIENT_PRIMARY) {
-            Log.i(TAG, "Don't start MBB when internet is validated on the lingering "
-                    + "secondary.");
-            return;
-        }
 
         Log.i(TAG, "Starting MBB switch primary from " + currentPrimary + " to " + newPrimary
                 + " by setting current primary's role to ROLE_CLIENT_SECONDARY_TRANSIENT");
@@ -340,52 +231,6 @@
         // current primary CMM). This is to preserve the legacy single STA behavior.
         mBroadcastQueue.fakeDisconnectionBroadcasts();
         mMakeBeforeBreakInfo = new MakeBeforeBreakInfo(currentPrimary, newPrimary);
-        transitionToState(MBB_STATE_INTERNET_VALIDATED);
-    }
-
-    /**
-     * Notify MBB manager the internet validation has failed. This may come before
-     * onInternetValidated and mMakeBeforeBreakInfo is null.
-     * @param clientModeManager client mode manager for current connection.
-     * @param currentConnectionDetectedCaptivePortal whether current connection has detected
-     *                                               captive portal.
-     */
-    private void onInternetValidationFailed(ConcreteClientModeManager clientModeManager,
-            boolean currentConnectionDetectedCaptivePortal) {
-        final ConcreteClientModeManager secondaryCcm = mActiveModeWarden.getClientModeManagerInRole(
-                ROLE_CLIENT_SECONDARY_TRANSIENT);
-        // There has to be at least one ROLE_CLIENT_SECONDARY_TRANSIENT.
-        if (secondaryCcm == null) {
-            Log.w(TAG, "No ClientModeManager with ROLE_CLIENT_SECONDARY_TRANSIENT exist!"
-                    + " current state: " + getInternalStateStr(mInternalState));
-            return;
-        }
-
-        Log.w(TAG, "Internet validation failed during MBB,"
-                + " disconnecting ClientModeManager=" + clientModeManager);
-        mWifiMetrics.logStaEvent(
-                clientModeManager.getInterfaceName(),
-                WifiMetricsProto.StaEvent.TYPE_FRAMEWORK_DISCONNECT,
-                WifiMetricsProto.StaEvent.DISCONNECT_MBB_NO_INTERNET);
-        mWifiMetrics.incrementMakeBeforeBreakNoInternetCount();
-
-        // If the role has already switched, switch the roles back
-        if (clientModeManager.getRole() == ROLE_CLIENT_PRIMARY) {
-            clientModeManager.setRole(ROLE_CLIENT_SECONDARY_TRANSIENT,
-                    mFrameworkFacade.getSettingsWorkSource(mContext));
-            secondaryCcm.setRole(ROLE_CLIENT_PRIMARY,
-                    mFrameworkFacade.getSettingsWorkSource(mContext));
-        }
-        // Disconnect the client mode manager.
-        clientModeManager.disconnect();
-
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "onInternetValidationFailed (" + getInternalStateStr(mInternalState)
-                    + "), removeClientModeManager role: " + clientModeManager.getRole());
-        }
-        // This should trigger {@link ModeChangeCallback#onActiveModeManagerRemoved} to abort MBB.
-        mActiveModeWarden.removeClientModeManager(clientModeManager);
-        transitionToState(MBB_STATE_VALIDATION_FAILED);
     }
 
     private void onCaptivePortalDetected(@NonNull ConcreteClientModeManager newPrimary) {
@@ -409,15 +254,12 @@
         // Once the currentPrimary teardown completes, recoverPrimary() will make the Captive
         // Portal CMM the new primary, because it is the only SECONDARY_TRANSIENT CMM and no
         // primary CMM exists.
-        transitionToState(MBB_STATE_CAPTIVE_PORTAL_DETECTED);
     }
 
     private void maybeContinueMakeBeforeBreak(
             @NonNull ConcreteClientModeManager roleChangedClientModeManager) {
         // not in the middle of MBB
         if (mMakeBeforeBreakInfo == null) {
-            // The new STA iface has been changed to primary.
-            transitionToState(MBB_STATE_ROLE_SWITCH_COMPLETE);
             return;
         }
         // not the CMM we're looking for, keep monitoring
@@ -438,12 +280,11 @@
                         + mMakeBeforeBreakInfo.newPrimary);
                 return;
             }
-            // The old primary has been changed to secondary transient.
-            transitionToState(MBB_STATE_ROLES_BEING_SWITCHED_BOTH_SECONDARY_TRANSIENT);
+
             Log.i(TAG, "Continue MBB switch primary from " + mMakeBeforeBreakInfo.oldPrimary
                     + " to " + mMakeBeforeBreakInfo.newPrimary
                     + " by setting new Primary's role to ROLE_CLIENT_PRIMARY and reducing network"
-                    + " score of old primary");
+                    + " score");
 
             // TODO(b/180974604): In theory, newPrimary.setRole() could still fail, but that would
             //  still count as a MBB success in the metrics. But we don't really handle that
@@ -468,7 +309,6 @@
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.println("Dump of MakeBeforeBreakManager");
         pw.println("mMakeBeforeBreakInfo=" + mMakeBeforeBreakInfo);
-        pw.println("mInternalState " + getInternalStateStr(mInternalState));
     }
 
     /**
@@ -521,5 +361,4 @@
         }
         mOnAllSecondaryTransientCmmsStoppedListeners.clear();
     }
-
 }
diff --git a/service/java/com/android/server/wifi/MboOceController.java b/service/java/com/android/server/wifi/MboOceController.java
index b4a5140..b107f49 100644
--- a/service/java/com/android/server/wifi/MboOceController.java
+++ b/service/java/com/android/server/wifi/MboOceController.java
@@ -19,12 +19,11 @@
 import static android.net.wifi.WifiManager.WIFI_FEATURE_MBO;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_OCE;
 
+import android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.MboAssocDisallowedReasonCode;
 import android.telephony.PhoneStateListener;
 import android.telephony.TelephonyManager;
 import android.util.Log;
 
-import com.android.server.wifi.SupplicantStaIfaceHal.MboAssocDisallowedReasonCode;
-
 /**
  * MboOceController is responsible for controlling MBO and OCE operations.
  */
diff --git a/service/java/com/android/server/wifi/MultiInternetManager.java b/service/java/com/android/server/wifi/MultiInternetManager.java
deleted file mode 100644
index ed1212d..0000000
--- a/service/java/com/android/server/wifi/MultiInternetManager.java
+++ /dev/null
@@ -1,633 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_PRIMARY;
-import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_LONG_LIVED;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.content.Context;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.os.Handler;
-import android.os.WorkSource;
-import android.util.Log;
-import android.util.SparseArray;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.build.SdkLevel;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Manages STA + STA for multi internet networks.
- */
-public class MultiInternetManager {
-    private static final String TAG = "WifiMultiInternet";
-
-    private final ActiveModeWarden mActiveModeWarden;
-    private final FrameworkFacade mFrameworkFacade;
-    private final Context mContext;
-    private final ClientModeImplMonitor mCmiMonitor;
-    private final WifiSettingsStore mSettingsStore;
-    private final Handler mEventHandler;
-    private final Clock mClock;
-    private int mStaConcurrencyMultiInternetMode = WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED;
-    @MultiInternetState
-    private int mMultiInternetConnectionState = MULTI_INTERNET_STATE_NONE;
-    private ConnectionStatusListener mConnectionStatusListener;
-
-    private SparseArray<NetworkConnectionState> mNetworkConnectionStates = new SparseArray<>();
-    private boolean mVerboseLoggingEnabled = false;
-
-    /** No multi internet connection needed. */
-    public static final int MULTI_INTERNET_STATE_NONE = 0;
-    /** Multi internet connection is connecting. */
-    public static final int MULTI_INTERNET_STATE_CONNECTION_REQUESTED = 1;
-    /** No multi internet connection is connected. */
-    public static final int MULTI_INTERNET_STATE_CONNECTED = 2;
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"MULTI_INTERNET_STATE_"}, value = {
-            MULTI_INTERNET_STATE_NONE,
-            MULTI_INTERNET_STATE_CONNECTION_REQUESTED,
-            MULTI_INTERNET_STATE_CONNECTED})
-    public @interface MultiInternetState {}
-
-    /** The internal network connection state per each Wi-Fi band. */
-    class NetworkConnectionState {
-        // If the supplicant connection is completed.
-        private boolean mConnected;
-        // If the internet has been validated.
-        private boolean mValidated;
-        // The connection start time in millisecond
-        public long connectionStartTimeMillis;
-        // The WorkSource of the connection requestor.
-        public WorkSource requestorWorkSource;
-
-        NetworkConnectionState(WorkSource workSource) {
-            this(workSource, -1L);
-        }
-
-        NetworkConnectionState(WorkSource workSource, long connectionStartTime) {
-            requestorWorkSource = workSource;
-            connectionStartTimeMillis = connectionStartTime;
-
-            mConnected = false;
-            mValidated = false;
-        }
-
-        public NetworkConnectionState setConnected(boolean connected) {
-            mConnected = connected;
-            return this;
-        }
-
-        @VisibleForTesting
-        public boolean isConnected() {
-            return mConnected;
-        }
-
-        public NetworkConnectionState setValidated(boolean validated) {
-            mValidated = validated;
-            return this;
-        }
-
-        @VisibleForTesting
-        public boolean isValidated() {
-            return mValidated;
-        }
-    }
-
-    @VisibleForTesting
-    SparseArray<NetworkConnectionState> getNetworkConnectionState() {
-        return mNetworkConnectionStates;
-    }
-
-    /** The Multi Internet Connection Status Listener. The registered listener will be notified
-     * for the connection status change and scan needed. */
-    public interface ConnectionStatusListener {
-        /** Called when connection status changed */
-        void onStatusChange(
-                @MultiInternetManager.MultiInternetState int state,
-                WorkSource requestorWs);
-        /** Called when a scan is needed */
-        void onStartScan(WorkSource requestorWs);
-    }
-
-    @Nullable private WorkSource getRequestorWorkSource(int band) {
-        if (!mNetworkConnectionStates.contains(band)) {
-            return null;
-        }
-        return mNetworkConnectionStates.get(band).requestorWorkSource;
-    }
-
-    private class ModeChangeCallback implements ActiveModeWarden.ModeChangeCallback {
-        @Override
-        public void onActiveModeManagerAdded(@NonNull ActiveModeManager activeModeManager) {
-            if (!mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()
-                    || !isStaConcurrencyForMultiInternetEnabled()) {
-                return;
-            }
-            if (!(activeModeManager instanceof ConcreteClientModeManager)) {
-                return;
-            }
-            final ConcreteClientModeManager ccm = (ConcreteClientModeManager) activeModeManager;
-            // TODO: b/197670907 : Add client role ROLE_CLIENT_SECONDARY_INTERNET
-            if (ccm.getRole() != ROLE_CLIENT_SECONDARY_LONG_LIVED || !ccm.isSecondaryInternet()) {
-                return;
-            }
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "Secondary ClientModeManager created for internet, connecting!");
-            }
-            updateNetworkConnectionStates();
-        }
-
-        @Override
-        public void onActiveModeManagerRemoved(@NonNull ActiveModeManager activeModeManager) {
-            if (!mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()
-                    || !isStaConcurrencyForMultiInternetEnabled()) {
-                return;
-            }
-            if (!(activeModeManager instanceof ConcreteClientModeManager)) {
-                return;
-            }
-            final ConcreteClientModeManager ccm = (ConcreteClientModeManager) activeModeManager;
-            // TODO: b/197670907 : Add client role ROLE_CLIENT_SECONDARY_INTERNET
-            if (ccm.getRole() != ROLE_CLIENT_SECONDARY_LONG_LIVED || !ccm.isSecondaryInternet()) {
-                return;
-            }
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "ClientModeManager for internet removed");
-            }
-            // A secondary cmm was removed because of the connection was lost, start scan
-            // to find the new network connection.
-            updateNetworkConnectionStates();
-            if (hasPendingConnectionRequests()) {
-                startConnectivityScan();
-            }
-        }
-
-        @Override
-        public void onActiveModeManagerRoleChanged(@NonNull ActiveModeManager activeModeManager) {
-            if (!mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()
-                    || !isStaConcurrencyForMultiInternetEnabled()) {
-                return;
-            }
-            if (!(activeModeManager instanceof ConcreteClientModeManager)) {
-                return;
-            }
-            final ConcreteClientModeManager ccm = (ConcreteClientModeManager) activeModeManager;
-            if (ccm.getPreviousRole() == ROLE_CLIENT_SECONDARY_LONG_LIVED
-                    && ccm.isSecondaryInternet()) {
-                Log.w(TAG, "Secondary client mode manager changed role to "
-                        + ccm.getRole());
-            }
-            updateNetworkConnectionStates();
-        }
-    }
-
-    private class ClientModeListenerInternal implements ClientModeImplListener {
-        @Override
-        public void onInternetValidated(@NonNull ConcreteClientModeManager clientModeManager) {
-            if (!mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()
-                    || !isStaConcurrencyForMultiInternetEnabled()) {
-                return;
-            }
-            final WifiInfo info = clientModeManager.syncRequestConnectionInfo();
-            if (info != null) {
-                final int band = ScanResult.toBand(info.getFrequency());
-                if (mNetworkConnectionStates.contains(band)) {
-                    mNetworkConnectionStates.get(band).setValidated(true);
-                }
-            }
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "ClientModeManager role " + clientModeManager.getRole()
-                        + " internet validated for connection");
-            }
-            // If the primary role was connected and internet validated, update the connection state
-            // immediately and issue scan for secondary network connection if needed.
-            // If the secondary role was connected and internet validated, update the connection
-            // state and notify connectivity manager.
-            // TODO: b/197670907 : Add client role ROLE_CLIENT_SECONDARY_INTERNET
-            if (clientModeManager.getRole() == ROLE_CLIENT_PRIMARY) {
-                updateNetworkConnectionStates();
-                final int band = findUnconnectedRequestBand();
-                if (band != ScanResult.UNSPECIFIED) {
-                    // Trigger the connectivity scan
-                    mConnectionStatusListener.onStartScan(getRequestorWorkSource(band));
-                }
-            } else if (clientModeManager.getRole() == ROLE_CLIENT_SECONDARY_LONG_LIVED
-                    && clientModeManager.isSecondaryInternet()) {
-                updateNetworkConnectionStates();
-            }
-        }
-
-        // TODO(b/175896748): not yet triggered by ClientModeImpl
-        @Override
-        public void onL3Connected(@NonNull ConcreteClientModeManager clientModeManager) {
-            if (!mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()
-                    || !isStaConcurrencyForMultiInternetEnabled()) {
-                return;
-            }
-            // TODO: b/197670907 : Add client role ROLE_CLIENT_SECONDARY_INTERNET
-            if (clientModeManager.getRole() != ROLE_CLIENT_SECONDARY_LONG_LIVED
-                    || !clientModeManager.isSecondaryInternet()) {
-                return;
-            }
-            updateNetworkConnectionStates();
-            // If no pending connection requests, update connection listener.
-            if (!hasPendingConnectionRequests()) {
-                final int band = getSecondaryConnectedNetworkBand();
-                if (band == ScanResult.UNSPECIFIED) return;
-                final long connectionTime = mClock.getElapsedSinceBootMillis()
-                        - mNetworkConnectionStates.get(band).connectionStartTimeMillis;
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, "ClientModeManager for internet L3 connected for "
-                            + connectionTime + " ms.");
-                }
-                handleConnectionStateChange(MULTI_INTERNET_STATE_CONNECTED,
-                        getRequestorWorkSource(band));
-            }
-        }
-
-        @Override
-        public void onConnectionEnd(@NonNull ConcreteClientModeManager clientModeManager) {
-            if (!mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()
-                    || !isStaConcurrencyForMultiInternetEnabled()) {
-                return;
-            }
-            if (clientModeManager.getRole() == ROLE_CLIENT_PRIMARY) {
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, "Connection end on primary client mode manager");
-                }
-                // When the primary network connection is ended, disconnect the secondary network,
-                // as the secondary network is opportunistic.
-                // TODO: b/197670907 : Add client role ROLE_CLIENT_SECONDARY_INTERNET
-                for (ConcreteClientModeManager cmm : mActiveModeWarden.getClientModeManagersInRoles(
-                        ROLE_CLIENT_SECONDARY_LONG_LIVED)) {
-                    if (cmm.isSecondaryInternet()) {
-                        if (mVerboseLoggingEnabled) {
-                            Log.v(TAG, "Disconnect secondary client mode manager");
-                        }
-                        cmm.disconnect();
-                    }
-                }
-                // As the secondary network is disconnected, mark all bands as disconnected.
-                for (int i = 0; i < mNetworkConnectionStates.size(); i++) {
-                    mNetworkConnectionStates.valueAt(i).setConnected(false);
-                }
-            }
-            updateNetworkConnectionStates();
-        }
-    }
-
-    public MultiInternetManager(
-            @NonNull ActiveModeWarden activeModeWarden,
-            @NonNull FrameworkFacade frameworkFacade,
-            @NonNull Context context,
-            @NonNull ClientModeImplMonitor cmiMonitor,
-            @NonNull WifiSettingsStore settingsStore,
-            @NonNull Handler handler,
-            @NonNull Clock clock) {
-        mActiveModeWarden = activeModeWarden;
-        mFrameworkFacade = frameworkFacade;
-        mContext = context;
-        mCmiMonitor = cmiMonitor;
-        mSettingsStore = settingsStore;
-        mEventHandler = handler;
-        mClock = clock;
-        mActiveModeWarden.registerModeChangeCallback(new ModeChangeCallback());
-        cmiMonitor.registerListener(new ClientModeListenerInternal());
-        mStaConcurrencyMultiInternetMode = mSettingsStore.getWifiMultiInternetMode();
-    }
-
-    /**
-     * Check if Wi-Fi multi internet use case is enabled.
-     *
-     * @return true if Wi-Fi multi internet use case is enabled.
-     */
-    public boolean isStaConcurrencyForMultiInternetEnabled() {
-        return mStaConcurrencyMultiInternetMode
-            != WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED;
-    }
-
-    /**
-     * Check if Wi-Fi multi internet use case allows multi AP.
-     *
-     * @return true if Wi-Fi multi internet use case allows multi AP.
-     */
-    public boolean isStaConcurrencyForMultiInternetMultiApAllowed() {
-        return mStaConcurrencyMultiInternetMode
-                == WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP;
-    }
-
-    /**
-     * Return Wi-Fi multi internet use case mode.
-     *
-     * @return Current mode of Wi-Fi multi internet use case.
-     */
-    public @WifiManager.WifiMultiInternetMode int getStaConcurrencyForMultiInternetMode() {
-        if (mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()) {
-            return mStaConcurrencyMultiInternetMode;
-        }
-        return WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED;
-    }
-
-    /**
-     * Set the multi internet use case mode.
-     * @return true if the mode set successfully, false if failed.
-     */
-    public boolean setStaConcurrencyForMultiInternetMode(
-            @WifiManager.WifiMultiInternetMode int mode) {
-        final boolean enabled = (mode != WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED);
-        if (!mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()) {
-            return false;
-        }
-
-        if (mode == mStaConcurrencyMultiInternetMode) {
-            return true;
-        }
-        // If the STA+STA multi internet feature was disabled, disconnect the secondary cmm.
-        // TODO: b/197670907 : Add client role ROLE_CLIENT_SECONDARY_INTERNET
-        if (!enabled) {
-            for (ConcreteClientModeManager cmm : mActiveModeWarden.getClientModeManagersInRoles(
-                    ROLE_CLIENT_SECONDARY_LONG_LIVED)) {
-                if (cmm.isSecondaryInternet()) {
-                    cmm.disconnect();
-                }
-            }
-            for (int i = 0; i < mNetworkConnectionStates.size(); i++) {
-                // Clear the connection state for all bands.
-                mNetworkConnectionStates.setValueAt(i, new NetworkConnectionState(null));
-            }
-            handleConnectionStateChange(MULTI_INTERNET_STATE_NONE, null);
-        } else {
-            updateNetworkConnectionStates();
-            final int band = findUnconnectedRequestBand();
-            if (band != ScanResult.UNSPECIFIED) {
-                handleConnectionStateChange(MULTI_INTERNET_STATE_CONNECTION_REQUESTED,
-                        getRequestorWorkSource(band));
-            }
-        }
-        mStaConcurrencyMultiInternetMode = mode;
-        mSettingsStore.handleWifiMultiInternetMode(mode);
-        // Check if there is already multi internet request then start scan for connection.
-        if (hasPendingConnectionRequests()) {
-            startConnectivityScan();
-        }
-        return true;
-    }
-
-    public void setVerboseLoggingEnabled(boolean enabled) {
-        mVerboseLoggingEnabled = enabled;
-    }
-
-    /** Set the Multi Internet Connection Status listener.
-     *
-     * @param listener The Multi Internet Connection Status listener.
-     */
-    public void setConnectionStatusListener(ConnectionStatusListener listener) {
-        mConnectionStatusListener = listener;
-    }
-
-    /** Notify the BSSID associated event from ClientModeImpl. Triggered by
-     *  WifiMonitor.ASSOCIATED_BSSID_EVENT.
-     *  @param clientModeManager the client mode manager with BSSID associated event.
-     */
-    public void notifyBssidAssociatedEvent(ConcreteClientModeManager clientModeManager) {
-        if (clientModeManager.getRole() != ROLE_CLIENT_PRIMARY
-                || !mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()
-                || !isStaConcurrencyForMultiInternetEnabled()) {
-            return;
-        }
-        // If primary CMM has associated to a new BSSID, need to check if it is in a different band
-        // of secondary CMM.
-        final WifiInfo info = clientModeManager.syncRequestConnectionInfo();
-        final ConcreteClientModeManager secondaryCcmm =
-                mActiveModeWarden.getClientModeManagerInRole(ROLE_CLIENT_SECONDARY_LONG_LIVED);
-        // If no secondary client mode manager then it's ok
-        if (secondaryCcmm == null) return;
-        // If secondary client mode manager is not connected or not for secondary internet
-        if (!secondaryCcmm.isConnected() || !secondaryCcmm.isSecondaryInternet()) return;
-        final WifiInfo info2 = secondaryCcmm.syncRequestConnectionInfo();
-        // If secondary network is in same band as primary now
-        if (ScanResult.toBand(info.getFrequency()) == ScanResult.toBand(info2.getFrequency())) {
-            // Need to disconnect secondary network
-            secondaryCcmm.disconnect();
-            // As the secondary network is disconnected, mark all bands as disconnected.
-            for (int i = 0; i < mNetworkConnectionStates.size(); i++) {
-                mNetworkConnectionStates.valueAt(i).setConnected(false);
-            }
-            updateNetworkConnectionStates();
-        }
-    }
-
-    /** Check if there is a connection request for multi internet
-     * @return true if there is one or more connection request
-     */
-    public boolean hasPendingConnectionRequests() {
-        return findUnconnectedRequestBand() != ScanResult.UNSPECIFIED;
-    }
-
-    /**
-     * Check if there is connection request on a specific band.
-     * @param band The band for the connection request.
-     * @return true if there is connection request on specific band.
-     */
-    public boolean hasConnectionRequest(int band) {
-        return mNetworkConnectionStates.contains(band)
-                ? (getRequestorWorkSource(band) != null) : false;
-    }
-
-    /**
-     * Check if there is unconnected network connection request.
-     * @return the band of the connection request that is still not connected.
-     */
-    public int findUnconnectedRequestBand() {
-        for (int i = 0; i < mNetworkConnectionStates.size(); i++) {
-            if (!mNetworkConnectionStates.valueAt(i).isConnected()) {
-                return mNetworkConnectionStates.keyAt(i);
-            }
-        }
-        return ScanResult.UNSPECIFIED;
-    }
-
-    /**
-     * Traverse the client mode managers and update the internal connection states.
-     */
-    private void updateNetworkConnectionStates() {
-        for (int i = 0; i < mNetworkConnectionStates.size(); i++) {
-            mNetworkConnectionStates.valueAt(i).setConnected(false);
-        }
-
-        for (ClientModeManager clientModeManager :
-                mActiveModeWarden.getInternetConnectivityClientModeManagers()) {
-            // TODO: b/197670907 : Add client role ROLE_CLIENT_SECONDARY_INTERNET
-            if (clientModeManager instanceof ConcreteClientModeManager
-                    && (clientModeManager.getRole() == ROLE_CLIENT_PRIMARY
-                    || clientModeManager.getRole() == ROLE_CLIENT_SECONDARY_LONG_LIVED)) {
-                ConcreteClientModeManager ccmm = (ConcreteClientModeManager) clientModeManager;
-                // Exclude the secondary client mode manager not for secondary internet.
-                if (ccmm.getRole() == ROLE_CLIENT_SECONDARY_LONG_LIVED
-                        && !ccmm.isSecondaryInternet()) {
-                    continue;
-                }
-                WifiInfo info = clientModeManager.syncRequestConnectionInfo();
-                // Exclude the network that is not connected or restricted.
-                if (info == null || !clientModeManager.isConnected()
-                        ||  info.isRestricted()) continue;
-                // Exclude the network that is oem paid/private.
-                if (SdkLevel.isAtLeastT() && (info.isOemPaid() || info.isOemPrivate())) continue;
-                final int band = ScanResult.toBand(info.getFrequency());
-                if (mNetworkConnectionStates.contains(band)) {
-                    // Update the connected state
-                    mNetworkConnectionStates.get(band).setConnected(true);
-                }
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, "network band " + band + " role "
-                            + clientModeManager.getRole().toString());
-                }
-            }
-        }
-        // Handle the state change and notify listener
-        if (!hasPendingConnectionRequests()) {
-            if (mNetworkConnectionStates.size() == 0) {
-                handleConnectionStateChange(MULTI_INTERNET_STATE_NONE, null);
-            } else {
-                final int band = getSecondaryConnectedNetworkBand();
-                if (band == ScanResult.UNSPECIFIED) return;
-                handleConnectionStateChange(MULTI_INTERNET_STATE_CONNECTED,
-                        getRequestorWorkSource(band));
-            }
-        } else {
-            final int band = findUnconnectedRequestBand();
-            handleConnectionStateChange(MULTI_INTERNET_STATE_CONNECTION_REQUESTED,
-                    getRequestorWorkSource(band));
-        }
-    }
-
-    /**
-     * Set a network connection request from a requestor WorkSource for a specific band, or clear
-     * the connection request if the WorkSource is null.
-     * Triggered when {@link MultiInternetWifiNetworkFactory} has a pending network request.
-     * @param band The band of the Wi-Fi network requested.
-     * @param requestorWs The requestor's WorkSource. Null to clear a network request for a
-     * a band.
-     */
-    public void setMultiInternetConnectionWorksource(int band, WorkSource requestorWs) {
-        if (!isStaConcurrencyForMultiInternetEnabled()) {
-            Log.w(TAG, "MultInternet is not enabled.");
-            return;
-        }
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "setMultiInternetConnectionWorksource: band=" + band + ", requestorWs="
-                    + requestorWs);
-        }
-        if (requestorWs == null) {
-            // Disconnect secondary network if the request is removed.
-            if (band == getSecondaryConnectedNetworkBand()) {
-                for (ConcreteClientModeManager cmm : mActiveModeWarden.getClientModeManagersInRoles(
-                        ROLE_CLIENT_SECONDARY_LONG_LIVED)) {
-                    if (cmm.isSecondaryInternet()) {
-                        cmm.disconnect();
-                    }
-                }
-            }
-            mNetworkConnectionStates.remove(band);
-            updateNetworkConnectionStates();
-            return;
-        }
-        if (mNetworkConnectionStates.contains(band)) {
-            Log.w(TAG, "band " + band + " already requested.");
-        }
-        mNetworkConnectionStates.put(band, new NetworkConnectionState(requestorWs,
-                    mClock.getElapsedSinceBootMillis()));
-        startConnectivityScan();
-    }
-
-    /** Returns the band of the secondary network connected. */
-    private int getSecondaryConnectedNetworkBand() {
-        final ConcreteClientModeManager secondaryCcmm =
-                mActiveModeWarden.getClientModeManagerInRole(ROLE_CLIENT_SECONDARY_LONG_LIVED);
-        if (secondaryCcmm == null) {
-            return ScanResult.UNSPECIFIED;
-        }
-        final WifiInfo info = secondaryCcmm.syncRequestConnectionInfo();
-        // Make sure secondary network is connected.
-        if (info == null || !secondaryCcmm.isConnected() || !secondaryCcmm.isSecondaryInternet()) {
-            return ScanResult.UNSPECIFIED;
-        }
-        return ScanResult.toBand(info.getFrequency());
-    }
-
-    /**
-     * Handles the connection state change and notifies the status listener.
-     * The listener will only be notified when the state changes. If the state remains the same
-     * but with a different requestor WorkSource then the listener is not notified.
-     *
-     * @param state
-     * @param workSource
-     */
-    private void handleConnectionStateChange(int state, WorkSource workSource) {
-        if (mMultiInternetConnectionState == state) {
-            return;
-        }
-        mMultiInternetConnectionState = state;
-        mConnectionStatusListener.onStatusChange(state, workSource);
-    }
-
-    /**
-     * Start a connectivity scan to trigger the network selection process and connect to
-     * the requested multi internet networks.
-     */
-    private void startConnectivityScan() {
-        if (!isStaConcurrencyForMultiInternetEnabled()) {
-            return;
-        }
-        updateNetworkConnectionStates();
-
-        final int band = findUnconnectedRequestBand();
-        if (band == ScanResult.UNSPECIFIED) return;
-        NetworkConnectionState state = mNetworkConnectionStates.get(band);
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "Schedule connectivity scan for network request with band " + band
-                    + " start time " + state.connectionStartTimeMillis + " now "
-                    + mClock.getElapsedSinceBootMillis());
-        }
-        // Trigger the connectivity scan
-        mConnectionStatusListener.onStartScan(getRequestorWorkSource(band));
-    }
-
-    /** Dump the internal states of MultiInternetManager */
-    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        pw.println("Dump of MultiInternetManager");
-        pw.println(TAG + ": mStaConcurrencyMultiInternetMode "
-                + mStaConcurrencyMultiInternetMode);
-        for (int i = 0; i < mNetworkConnectionStates.size(); i++) {
-            pw.println("band " + mNetworkConnectionStates.keyAt(i) + " connected "
-                    + mNetworkConnectionStates.valueAt(i).isConnected()
-                    + " validated " + mNetworkConnectionStates.valueAt(i).isValidated());
-        }
-    }
-
-}
diff --git a/service/java/com/android/server/wifi/MultiInternetWifiNetworkFactory.java b/service/java/com/android/server/wifi/MultiInternetWifiNetworkFactory.java
deleted file mode 100644
index 1cdcda7..0000000
--- a/service/java/com/android/server/wifi/MultiInternetWifiNetworkFactory.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import android.app.AlarmManager;
-import android.content.Context;
-import android.net.NetworkCapabilities;
-import android.net.NetworkFactory;
-import android.net.NetworkRequest;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiNetworkSpecifier;
-import android.os.Looper;
-import android.os.WorkSource;
-import android.util.LocalLog;
-import android.util.Log;
-import android.util.SparseArray;
-
-import com.android.server.wifi.util.WifiPermissionsUtil;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-
-/**
- * Network factory to handle multi internet wifi network requests.
- */
-public class MultiInternetWifiNetworkFactory extends NetworkFactory {
-    private static final String TAG = "MultiInternetWifiNetworkFactory";
-    private static final int SCORE_FILTER = Integer.MAX_VALUE;
-
-    private final WifiConnectivityManager mWifiConnectivityManager;
-    private final MultiInternetManager mMultiInternetManager;
-    private final WifiPermissionsUtil mWifiPermissionsUtil;
-    private final FrameworkFacade mFacade;
-    private final Context mContext;
-    private final AlarmManager mAlarmManager;
-    private final LocalLog mLocalLog;
-
-    // Verbose logging flag.
-    private boolean mVerboseLoggingEnabled = false;
-    // Connection request state per each band.
-    private SparseArray<NetworkRequestState> mNetworkRequestStates = new SparseArray<>();
-    // Connection request count per each band.
-    private SparseArray<Integer> mConnectionReqCount = new SparseArray<>();
-
-    // A helper to log debugging information in the local log buffer, which can
-    // be retrieved in bugreport.
-    private void localLog(String log) {
-        mLocalLog.log(log);
-        if (mVerboseLoggingEnabled) Log.v(TAG, log);
-    }
-
-    /**
-     * Internal network request state for multi internet networks
-     */
-    public static class NetworkRequestState {
-        public final NetworkRequest networkRequest;
-        public final WifiNetworkSpecifier networkRequestSpecifier;
-        public final boolean isFromSetting;
-        public final boolean isFromForegroundApp;
-        public final boolean isFromForegroundAppOrService;
-
-        NetworkRequestState(NetworkRequest request,
-                WifiNetworkSpecifier specifier,
-                boolean setting,
-                boolean foregroundApp,
-                boolean foregroundAppOrService) {
-            networkRequest = request;
-            networkRequestSpecifier = specifier;
-            isFromSetting = setting;
-            isFromForegroundApp = foregroundApp;
-            isFromForegroundAppOrService = foregroundAppOrService;
-        }
-    }
-
-    /**
-     * Check if the network request is for multi internet Wifi network.
-     * @param networkRequest the network requested by connectivity service
-     * @return true if the request if for multi internet Wifi network, false if not.
-     */
-    public static boolean isWifiMultiInternetRequest(NetworkRequest networkRequest) {
-        if (networkRequest.getNetworkSpecifier() == null
-                || !(networkRequest.getNetworkSpecifier() instanceof WifiNetworkSpecifier)) {
-            return false;
-        }
-        WifiNetworkSpecifier wns = (WifiNetworkSpecifier) networkRequest.getNetworkSpecifier();
-        // Multi internet request must have internet capability, with specifier of band request,
-        // and must not have SSID/BSSID pattern matcher.
-        if (networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
-                && wns.getBand() != ScanResult.UNSPECIFIED
-                && WifiConfigurationUtil.isMatchAllNetworkSpecifier(wns)) {
-            return true;
-        }
-        return false;
-    }
-
-    public MultiInternetWifiNetworkFactory(Looper looper, Context context, NetworkCapabilities nc,
-            FrameworkFacade facade, AlarmManager alarmManager,
-            WifiPermissionsUtil wifiPermissionsUtil,
-            MultiInternetManager multiInternetManager,
-            WifiConnectivityManager connectivityManager,
-            LocalLog localLog) {
-        super(looper, context, TAG, nc);
-        mContext = context;
-        mFacade = facade;
-        mAlarmManager = alarmManager;
-        mWifiPermissionsUtil = wifiPermissionsUtil;
-        mMultiInternetManager = multiInternetManager;
-        mWifiConnectivityManager = connectivityManager;
-        mLocalLog = localLog;
-        setScoreFilter(SCORE_FILTER);
-    }
-
-    /**
-     * Enable verbose logging.
-     */
-    public void enableVerboseLogging(boolean verbose) {
-        mVerboseLoggingEnabled = verbose;
-    }
-
-    /**
-     * Check whether to accept the new network connection request. Validate the incoming request
-     * and return true if valid.
-     */
-    @Override
-    public boolean acceptRequest(NetworkRequest networkRequest) {
-        if (!mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled()
-                || !isWifiMultiInternetRequest(networkRequest)) {
-            return false;
-        }
-        final int uid = networkRequest.getRequestorUid();
-        boolean isFromSetting = mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
-                || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid);
-        boolean isFromNetworkStack = mWifiPermissionsUtil.checkNetworkStackPermission(uid)
-                || mWifiPermissionsUtil.checkMainlineNetworkStackPermission(uid);
-        // Only allow specific wifi network request with band from apps or services with settings
-        // or network stack permission.
-        if (!isFromSetting && !isFromNetworkStack) {
-            // Do not release the network request. The app will not get onUnavailable right away,
-            // it can wait when another app with permission make the request and obtain the network.
-            Log.w(TAG, "Request is from app or service does not have the permission."
-                    + " Rejecting request from " + networkRequest.getRequestorPackageName());
-            return false;
-        }
-        WifiNetworkSpecifier wns = (WifiNetworkSpecifier) networkRequest.getNetworkSpecifier();
-        final int band = wns.getBand();
-        // TODO: b/181741503 Check if the band is supported.
-        localLog("Accepted network request with specifier for band " + band);
-        return true;
-    }
-
-    @Override
-    protected void needNetworkFor(NetworkRequest networkRequest) {
-        if (!mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled()
-                || !isWifiMultiInternetRequest(networkRequest)) {
-            return;
-        }
-        WifiNetworkSpecifier wns = (WifiNetworkSpecifier) networkRequest.getNetworkSpecifier();
-        final int band = wns.getBand();
-        boolean isFromSetting = mWifiPermissionsUtil.checkNetworkSettingsPermission(
-                networkRequest.getRequestorUid());
-        boolean isFromForegroundApp = mFacade.isRequestFromForegroundApp(mContext,
-                networkRequest.getRequestorPackageName());
-        boolean isFromForegroundAppOrService =
-                mFacade.isRequestFromForegroundAppOrService(mContext,
-                        networkRequest.getRequestorPackageName());
-        NetworkRequestState nrs = new NetworkRequestState(networkRequest,
-                new WifiNetworkSpecifier(
-                wns.ssidPatternMatcher, wns.bssidPatternMatcher, wns.getBand(),
-                wns.wifiConfiguration),
-                isFromSetting,
-                isFromForegroundApp,
-                isFromForegroundAppOrService);
-        mNetworkRequestStates.put(band, nrs);
-        // If multi internet is requested, without specifying SSID or BSSID,
-        // The WifiConnectivityManager will perform network selection to choose a candidate.
-        // Create a worksource using the caller's UID.
-        WorkSource workSource = new WorkSource(networkRequest.getRequestorUid());
-        int reqCount = 0;
-        if (mConnectionReqCount.contains(band)) {
-            reqCount = mConnectionReqCount.get(band);
-        }
-        if (reqCount == 0) {
-            localLog("Need network : Uid " + networkRequest.getRequestorUid() + " PackageName "
-                    + networkRequest.getRequestorPackageName() + " for band " + band
-                    + " is rom Setting " + isFromSetting + " ForegroundApp " + isFromForegroundApp
-                    + " ForegroundAppOrService " + isFromForegroundApp);
-            mMultiInternetManager.setMultiInternetConnectionWorksource(
-                    band, new WorkSource(networkRequest.getRequestorUid(),
-                    networkRequest.getRequestorPackageName()));
-        }
-        mConnectionReqCount.put(band, reqCount + 1);
-    }
-
-    @Override
-    protected void releaseNetworkFor(NetworkRequest networkRequest) {
-        if (!isWifiMultiInternetRequest(networkRequest)) {
-            return;
-        }
-        localLog("releaseNetworkFor " + networkRequest);
-        final int band = ((WifiNetworkSpecifier) networkRequest.getNetworkSpecifier()).getBand();
-        int reqCount = mConnectionReqCount.contains(band)
-                ? mConnectionReqCount.get(band) : 0;
-        if (reqCount == 0) {
-            Log.e(TAG, "No valid network request to release");
-            return;
-        }
-        if (reqCount == 1) {
-            mMultiInternetManager.setMultiInternetConnectionWorksource(band, null);
-        }
-        mConnectionReqCount.put(band, reqCount - 1);
-    }
-
-    @Override
-    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        super.dump(fd, pw, args);
-        pw.println("Dump of MultiInternetWifiNetworkFactory");
-        for (int i = 0; i < mConnectionReqCount.size(); i++) {
-            final int band = mConnectionReqCount.keyAt(i);
-            NetworkRequestState state = mNetworkRequestStates.get(band);
-            pw.println("    Band " + band + " Req count " + mConnectionReqCount.valueAt(i)
-                    + " isFromSetting " + state.isFromSetting
-                    + " isFromForegroundApp " + state.isFromForegroundApp
-                    + " isFromForegroundAppOrService " + state.isFromForegroundAppOrService
-                    + " Uid " + state.networkRequest.getRequestorUid()
-                    + " PackageName " + state.networkRequest.getRequestorPackageName());
-        }
-        mLocalLog.dump(fd, pw, args);
-        mMultiInternetManager.dump(fd, pw, args);
-    }
-}
diff --git a/service/java/com/android/server/wifi/NetworkListStoreData.java b/service/java/com/android/server/wifi/NetworkListStoreData.java
index d9d53fa..00626f9 100644
--- a/service/java/com/android/server/wifi/NetworkListStoreData.java
+++ b/service/java/com/android/server/wifi/NetworkListStoreData.java
@@ -25,7 +25,6 @@
 import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.os.Process;
-import android.text.TextUtils;
 import android.util.Log;
 import android.util.Pair;
 
@@ -297,7 +296,7 @@
         }
 
         String configKeyCalculated = configuration.getKey();
-        if (!TextUtils.equals(configKeyParsed, configKeyCalculated)) {
+        if (!configKeyParsed.equals(configKeyCalculated)) {
             // configKey is not part of the SDK. So, we can't expect this to be the same
             // across OEM's. Just log a warning & continue.
             Log.w(TAG, "Configuration key does not match. Retrieved: " + configKeyParsed
@@ -311,7 +310,7 @@
             configuration.creatorUid = Process.SYSTEM_UID;
             configuration.creatorName =
                     mContext.getPackageManager().getNameForUid(Process.SYSTEM_UID);
-        } else if (!TextUtils.equals(creatorName, configuration.creatorName)) {
+        } else if (!creatorName.equals(configuration.creatorName)) {
             Log.w(TAG, "Invalid creatorName for saved network " + configuration.getKey()
                     + ", creatorUid=" + configuration.creatorUid
                     + ", creatorName=" + configuration.creatorName);
@@ -323,7 +322,6 @@
         if (enterpriseConfig != null) {
             configuration.enterpriseConfig = enterpriseConfig;
         }
-        WifiConfigurationUtil.addUpgradableSecurityTypeIfNecessary(configuration);
         return configuration;
     }
 }
diff --git a/service/java/com/android/server/wifi/NetworkSuggestionNominator.java b/service/java/com/android/server/wifi/NetworkSuggestionNominator.java
index 97301a1..8d28d7a 100644
--- a/service/java/com/android/server/wifi/NetworkSuggestionNominator.java
+++ b/service/java/com/android/server/wifi/NetworkSuggestionNominator.java
@@ -78,13 +78,13 @@
         // Update the matching profiles into WifiConfigManager, help displaying Suggestion and
         // Passpoint networks in Wifi Picker
         addOrUpdateSuggestionsToWifiConfigManger(scanDetails);
-        mPasspointNetworkNominateHelper.updatePasspointConfig(scanDetails);
+        mPasspointNetworkNominateHelper.getPasspointNetworkCandidates(scanDetails, true);
     }
 
     @Override
     public void nominateNetworks(List<ScanDetail> scanDetails,
             boolean untrustedNetworkAllowed, boolean oemPaidNetworkAllowed,
-            boolean oemPrivateNetworkAllowed, Set<Integer> restrictedNetworkAllowedUids,
+            boolean oemPrivateNetworkAllowed,
             @NonNull OnConnectableListener onConnectableListener) {
         if (scanDetails.isEmpty()) {
             return;
@@ -93,10 +93,10 @@
 
         findMatchedPasspointSuggestionNetworks(
                 scanDetails, matchMetaInfo, untrustedNetworkAllowed, oemPaidNetworkAllowed,
-                oemPrivateNetworkAllowed, restrictedNetworkAllowedUids);
+                oemPrivateNetworkAllowed);
         findMatchedSuggestionNetworks(scanDetails, matchMetaInfo, untrustedNetworkAllowed,
                 oemPaidNetworkAllowed,
-                oemPrivateNetworkAllowed, restrictedNetworkAllowedUids);
+                oemPrivateNetworkAllowed);
 
         if (matchMetaInfo.isEmpty()) {
             mLocalLog.log("did not see any matching auto-join enabled network suggestions.");
@@ -122,44 +122,40 @@
         WifiConfiguration config = ewns.createInternalWifiConfiguration(mWifiCarrierInfoManager);
         WifiConfiguration wCmConfiguredNetwork =
                 mWifiConfigManager.getConfiguredNetwork(config.getProfileKey());
-        if (wCmConfiguredNetwork != null) {
-            mLocalLog.log(config.getProfileKey() + "is already in the WifiConfigManager");
-            if (!wCmConfiguredNetwork.getNetworkSelectionStatus().isNetworkEnabled()
-                    && !mWifiConfigManager.tryEnableNetwork(wCmConfiguredNetwork.networkId)) {
-                mLocalLog.log("Ignoring blocked network: "
-                        + toNetworkString(wCmConfiguredNetwork));
-            }
-            return;
-        }
         NetworkUpdateResult result = mWifiConfigManager.addOrUpdateNetwork(
-                config, ewns.perAppInfo.uid, ewns.perAppInfo.packageName, false);
+                config, ewns.perAppInfo.uid, ewns.perAppInfo.packageName);
         if (!result.isSuccess()) {
             mLocalLog.log("Failed to add network suggestion");
             return;
         }
         mLocalLog.log(config.getProfileKey()
-                + " is added in the WifiConfigManager");
+                + " is added/updated in the WifiConfigManager");
+        mWifiConfigManager.allowAutojoin(result.getNetworkId(), config.allowAutojoin);
         WifiConfiguration currentWCmConfiguredNetwork =
                 mWifiConfigManager.getConfiguredNetwork(result.getNetworkId());
         // Try to enable network selection
-        if (!mWifiConfigManager.updateNetworkSelectionStatus(result.getNetworkId(),
-                WifiConfiguration.NetworkSelectionStatus.DISABLED_NONE)) {
-            mLocalLog.log("Failed to make network suggestion selectable");
+        if (wCmConfiguredNetwork == null) {
+            if (!mWifiConfigManager.updateNetworkSelectionStatus(result.getNetworkId(),
+                    WifiConfiguration.NetworkSelectionStatus.DISABLED_NONE)) {
+                mLocalLog.log("Failed to make network suggestion selectable");
+            }
+        } else {
+            if (!currentWCmConfiguredNetwork.getNetworkSelectionStatus().isNetworkEnabled()
+                    && !mWifiConfigManager.tryEnableNetwork(wCmConfiguredNetwork.networkId)) {
+                mLocalLog.log("Ignoring blocked network: "
+                        + toNetworkString(wCmConfiguredNetwork));
+            }
         }
     }
 
     /** Helper method to avoid code duplication in regular & passpoint based suggestions filter. */
-    private boolean shouldIgnoreBasedOnChecksForTrustedOrOemPaidOrOemPrivateOrRestricted(
+    private boolean shouldIgnoreBasedOnChecksForTrustedOrOemPaidOrOemPrivate(
             WifiConfiguration config, boolean untrustedNetworkAllowed,
-            boolean oemPaidNetworkAllowed, boolean oemPrivateNetworkAllowed,
-            Set<Integer> restrictedNetworkAllowedUids) {
+            boolean oemPaidNetworkAllowed, boolean oemPrivateNetworkAllowed) {
         // If untrusted network is not allowed, ignore untrusted suggestion.
         if (!untrustedNetworkAllowed && !config.trusted) {
             return true;
         }
-        if (!restrictedNetworkAllowedUids.contains(config.creatorUid) && config.restricted) {
-            return true;
-        }
         // For suggestions with both oem paid & oem private set, ignore them If both oem paid
         // & oem private network is not allowed. If oem paid network is allowed, then mark
         // the suggestion oem paid for this connection attempt, else mark oem private for this
@@ -188,8 +184,7 @@
 
     private void findMatchedPasspointSuggestionNetworks(List<ScanDetail> scanDetails,
             MatchMetaInfo matchMetaInfo, boolean untrustedNetworkAllowed,
-            boolean oemPaidNetworkAllowed, boolean oemPrivateNetworkAllowed,
-            Set<Integer> restrictedNetworkAllowedUids) {
+            boolean oemPaidNetworkAllowed, boolean oemPrivateNetworkAllowed) {
         List<Pair<ScanDetail, WifiConfiguration>> candidates =
                 mPasspointNetworkNominateHelper.getPasspointNetworkCandidates(scanDetails, true);
         for (Pair<ScanDetail, WifiConfiguration> candidate : candidates) {
@@ -212,8 +207,7 @@
                 continue;
             }
             if (!isNetworkAvailableToAutoConnect(config, untrustedNetworkAllowed,
-                    oemPaidNetworkAllowed, oemPrivateNetworkAllowed,
-                    restrictedNetworkAllowedUids)) {
+                    oemPaidNetworkAllowed, oemPrivateNetworkAllowed)) {
                 continue;
             }
 
@@ -224,7 +218,7 @@
     private void findMatchedSuggestionNetworks(List<ScanDetail> scanDetails,
             MatchMetaInfo matchMetaInfo, boolean untrustedNetworkAllowed,
             boolean oemPaidNetworkAllowed,
-            boolean oemPrivateNetworkAllowed, Set<Integer> restrictedNetworkAllowedUids) {
+            boolean oemPrivateNetworkAllowed) {
         for (ScanDetail scanDetail : scanDetails) {
             Set<ExtendedWifiNetworkSuggestion> matchingExtNetworkSuggestions =
                     mWifiNetworkSuggestionsManager.getNetworkSuggestionsForScanDetail(scanDetail);
@@ -257,8 +251,7 @@
                     continue;
                 }
                 if (!isNetworkAvailableToAutoConnect(wCmConfiguredNetwork, untrustedNetworkAllowed,
-                        oemPaidNetworkAllowed, oemPrivateNetworkAllowed,
-                        restrictedNetworkAllowedUids)) {
+                        oemPaidNetworkAllowed, oemPrivateNetworkAllowed)) {
                     continue;
                 }
                 matchMetaInfo.put(ewns, wCmConfiguredNetwork, scanDetail);
@@ -268,7 +261,7 @@
 
     private boolean isNetworkAvailableToAutoConnect(WifiConfiguration config,
             boolean untrustedNetworkAllowed, boolean oemPaidNetworkAllowed,
-            boolean oemPrivateNetworkAllowed, Set<Integer> restrictedNetworkAllowedUids) {
+            boolean oemPrivateNetworkAllowed) {
         // Ignore insecure enterprise config.
         if (config.isEnterprise() && config.enterpriseConfig.isEapMethodServerCertUsed()
                 && !config.enterpriseConfig
@@ -277,9 +270,8 @@
             return false;
         }
         // If oem paid network is not allowed, ignore oem paid suggestion.
-        if (shouldIgnoreBasedOnChecksForTrustedOrOemPaidOrOemPrivateOrRestricted(config,
-                untrustedNetworkAllowed, oemPaidNetworkAllowed, oemPrivateNetworkAllowed,
-                restrictedNetworkAllowedUids)) {
+        if (shouldIgnoreBasedOnChecksForTrustedOrOemPaidOrOemPrivate(config,
+                untrustedNetworkAllowed, oemPaidNetworkAllowed, oemPrivateNetworkAllowed)) {
             mLocalLog.log("Ignoring network since it needs corresponding NetworkRequest: "
                     + toNetworkString(config));
             return false;
@@ -441,8 +433,9 @@
                 List<PerNetworkSuggestionMatchMetaInfo> matchedNetworkInfos =
                         mAppInfos.valueAt(i).getHighestPriorityNetworks();
                 for (PerNetworkSuggestionMatchMetaInfo matchedNetworkInfo : matchedNetworkInfos) {
-                    mLocalLog.log("network suggestion candidate " + toNetworkString(
-                            matchedNetworkInfo.wCmConfiguredNetwork) + " nominated");
+                    mLocalLog.log(String.format("network suggestion candidate %s nominated",
+                                toNetworkString(matchedNetworkInfo.wCmConfiguredNetwork)));
+
                     onConnectableListener.onConnectable(
                             matchedNetworkInfo.matchingScanDetail,
                             matchedNetworkInfo.wCmConfiguredNetwork);
diff --git a/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java b/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java
index 8309b64..ad773e4 100644
--- a/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java
+++ b/service/java/com/android/server/wifi/NetworkSuggestionStoreData.java
@@ -479,7 +479,6 @@
         if (enterpriseConfig != null) {
             wifiConfiguration.enterpriseConfig = enterpriseConfig;
         }
-        WifiConfigurationUtil.addUpgradableSecurityTypeIfNecessary(wifiConfiguration);
         ExtendedWifiNetworkSuggestion ewns = ExtendedWifiNetworkSuggestion
                 .fromWns(new WifiNetworkSuggestion(wifiConfiguration, passpointConfiguration,
                         isAppInteractionRequired, isUserInteractionRequired,
diff --git a/service/java/com/android/server/wifi/OpenNetworkNotifier.java b/service/java/com/android/server/wifi/OpenNetworkNotifier.java
index 8b61c7f..25fd972 100644
--- a/service/java/com/android/server/wifi/OpenNetworkNotifier.java
+++ b/service/java/com/android/server/wifi/OpenNetworkNotifier.java
@@ -16,13 +16,11 @@
 
 package com.android.server.wifi;
 
-import android.net.wifi.WifiContext;
 import android.os.Looper;
 import android.provider.Settings;
 
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
 import com.android.server.wifi.proto.nano.WifiMetricsProto;
-import com.android.server.wifi.util.WifiPermissionsUtil;
 
 /**
  * This class handles the "open wi-fi network available" notification
@@ -46,14 +44,13 @@
             ConnectHelper connectHelper,
             ConnectToNetworkNotificationBuilder connectToNetworkNotificationBuilder,
             MakeBeforeBreakManager makeBeforeBreakManager,
-            WifiNotificationManager wifiNotificationManager,
-            WifiPermissionsUtil wifiPermissionsUtil) {
+            WifiNotificationManager wifiNotificationManager) {
         super(TAG, STORE_DATA_IDENTIFIER, TOGGLE_SETTINGS_NAME,
                 SystemMessage.NOTE_NETWORK_AVAILABLE,
                 WifiMetricsProto.ConnectionEvent.NOMINATOR_OPEN_NETWORK_AVAILABLE,
                 context, looper, framework, clock,
                 wifiMetrics, wifiConfigManager, wifiConfigStore, connectHelper,
                 connectToNetworkNotificationBuilder, makeBeforeBreakManager,
-                wifiNotificationManager, wifiPermissionsUtil);
+                wifiNotificationManager);
     }
 }
diff --git a/service/java/com/android/server/wifi/PmkCacheManager.java b/service/java/com/android/server/wifi/PmkCacheManager.java
deleted file mode 100644
index 3e17283..0000000
--- a/service/java/com/android/server/wifi/PmkCacheManager.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import android.net.MacAddress;
-import android.net.wifi.WifiConfiguration;
-import android.os.Handler;
-import android.util.Log;
-import android.util.SparseArray;
-
-import com.android.internal.annotations.VisibleForTesting;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/** Utilities for storing PMK cache. */
-public class PmkCacheManager {
-    private static final String TAG = "PmkCacheManager";
-
-    @VisibleForTesting
-    static final String PMK_CACHE_EXPIRATION_ALARM_TAG = "PMK_CACHE_EXPIRATION_TIMER";
-
-    private final Clock mClock;
-    private final Handler mEventHandler;
-
-    private boolean mVerboseLoggingEnabled = false;
-    private SparseArray<List<PmkCacheStoreData>> mPmkCacheEntries = new SparseArray<>();
-
-    public PmkCacheManager(Clock clock, Handler eventHandler) {
-        mClock = clock;
-        mEventHandler = eventHandler;
-    }
-
-    /**
-     * Add a PMK cache entry to the store.
-     *
-     * @param macAddress the interface MAC address to connect to the network.
-     * @param networkId the network ID of the WifiConfiguration associates with the network.
-     * @param expirationTimeInSec the expiration time of the PMK cache since boot.
-     * @param serializedEntry the opaque data of the PMK cache.
-     * @return true when PMK cache is added; otherwise, false.
-     */
-    public boolean add(MacAddress macAddress, int networkId,
-            long expirationTimeInSec, ArrayList<Byte> serializedEntry) {
-        if (WifiConfiguration.INVALID_NETWORK_ID == networkId) return false;
-        if (macAddress == null) {
-            Log.w(TAG, "Omit PMK cache due to no valid MAC address");
-            return false;
-        }
-        if (null == serializedEntry) {
-            Log.w(TAG, "Omit PMK cache due to null entry.");
-            return false;
-        }
-        final long elapseTimeInSecond = mClock.getElapsedSinceBootMillis() / 1000;
-        if (elapseTimeInSecond >= expirationTimeInSec) {
-            Log.w(TAG, "Omit expired PMK cache.");
-            return false;
-        }
-
-        PmkCacheStoreData newStoreData =
-                new PmkCacheStoreData(macAddress, serializedEntry, expirationTimeInSec);
-        List<PmkCacheStoreData> pmkDataList = mPmkCacheEntries.get(networkId);
-        if (pmkDataList == null) {
-            pmkDataList = new ArrayList<>();
-            mPmkCacheEntries.put(networkId, pmkDataList);
-        } else {
-            PmkCacheStoreData existStoreData = pmkDataList.stream()
-                    .filter(storeData -> Objects.equals(storeData, newStoreData))
-                    .findAny()
-                    .orElse(null);
-            if (null != existStoreData) {
-                if (mVerboseLoggingEnabled) {
-                    Log.d(TAG, "PMK entry exists, skip it.");
-                }
-                return true;
-            }
-        }
-
-        pmkDataList.add(newStoreData);
-        if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "Network " + networkId + " PmkCache Count: " + pmkDataList.size());
-        }
-        updatePmkCacheExpiration();
-        return true;
-    }
-
-    /**
-     * Remove PMK caches associated with the network ID.
-     *
-     * @param networkId the network ID of PMK caches to be removed.
-     * @return true when PMK caches are removed; otherwise, false.
-     */
-    public boolean remove(int networkId) {
-        if (WifiConfiguration.INVALID_NETWORK_ID == networkId) return false;
-        if (!mPmkCacheEntries.contains(networkId)) return false;
-
-        mPmkCacheEntries.remove(networkId);
-        updatePmkCacheExpiration();
-        return true;
-    }
-
-    /**
-     * Remove PMK caches associated with the network ID when the interface
-     * MAC address is changed.
-     *
-     * @param networkId the network ID of PMK caches to be removed.
-     * @param curMacAddress current interface MAC address.
-     * @return true when PMK caches are removed; otherwise, false.
-     */
-
-    public boolean remove(int networkId, MacAddress curMacAddress) {
-        if (WifiConfiguration.INVALID_NETWORK_ID == networkId) return false;
-        List<PmkCacheStoreData> pmkDataList = mPmkCacheEntries.get(networkId);
-        if (null == pmkDataList) return false;
-
-        pmkDataList.removeIf(pmkData -> !Objects.equals(curMacAddress, pmkData.macAddress));
-
-        if (pmkDataList.size() == 0) {
-            remove(networkId);
-        }
-        return true;
-    }
-
-    /**
-     * Get PMK caches associated with the network ID.
-     *
-     * @param networkId the network ID to be queried.
-     * @return A list of PMK caches associated with the network ID.
-     *         If none of PMK cache is associated with the network ID, return null.
-     */
-    public List<ArrayList<Byte>> get(int networkId) {
-        List<PmkCacheStoreData> pmkDataList = mPmkCacheEntries.get(networkId);
-        if (WifiConfiguration.INVALID_NETWORK_ID == networkId) return null;
-        if (null == pmkDataList) return null;
-
-        final long elapseTimeInSecond = mClock.getElapsedSinceBootMillis() / 1000;
-        List<ArrayList<Byte>> dataList = new ArrayList<>();
-        for (PmkCacheStoreData pmkData: pmkDataList) {
-            if (pmkData.isValid(elapseTimeInSecond)) {
-                dataList.add(pmkData.data);
-            }
-        }
-        return dataList;
-    }
-
-    /**
-     * Enable/Disable verbose logging.
-     *
-     * @param verboseEnabled Verbose flag set in overlay XML.
-     */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
-    }
-
-    @VisibleForTesting
-    void updatePmkCacheExpiration() {
-        mEventHandler.removeCallbacksAndMessages(PMK_CACHE_EXPIRATION_ALARM_TAG);
-
-        long elapseTimeInSecond = mClock.getElapsedSinceBootMillis() / 1000;
-        long nextUpdateTimeInSecond = Long.MAX_VALUE;
-        if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "Update PMK cache expiration at " + elapseTimeInSecond);
-        }
-
-        List<Integer> emptyStoreDataList = new ArrayList<>();
-        for (int i = 0; i < mPmkCacheEntries.size(); i++) {
-            int networkId = mPmkCacheEntries.keyAt(i);
-            List<PmkCacheStoreData> list = mPmkCacheEntries.get(networkId);
-            list.removeIf(pmkData -> !pmkData.isValid(elapseTimeInSecond));
-            if (list.size() == 0) {
-                emptyStoreDataList.add(networkId);
-                continue;
-            }
-            for (PmkCacheStoreData pmkData: list) {
-                if (nextUpdateTimeInSecond > pmkData.expirationTimeInSec) {
-                    nextUpdateTimeInSecond = pmkData.expirationTimeInSec;
-                }
-            }
-        }
-        emptyStoreDataList.forEach(networkId -> mPmkCacheEntries.remove(networkId));
-
-        // No need to arrange next update since there is no valid PMK in the cache.
-        if (nextUpdateTimeInSecond == Long.MAX_VALUE) {
-            return;
-        }
-
-        if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "PMK cache next expiration time: " + nextUpdateTimeInSecond);
-        }
-        long delayedTimeInMs = (nextUpdateTimeInSecond - elapseTimeInSecond) * 1000;
-        mEventHandler.postDelayed(
-                () -> {
-                    updatePmkCacheExpiration();
-                },
-                PMK_CACHE_EXPIRATION_ALARM_TAG,
-                (delayedTimeInMs > 0) ? delayedTimeInMs : 0);
-    }
-
-    private static class PmkCacheStoreData {
-
-        public MacAddress macAddress;
-        public ArrayList<Byte> data;
-        public long expirationTimeInSec;
-
-        PmkCacheStoreData(MacAddress macAddr, ArrayList<Byte> serializedData, long timeInSec) {
-            macAddress = macAddr;
-            data = serializedData;
-            expirationTimeInSec = timeInSec;
-        }
-
-        /**
-         * Validate this PMK cache against the timestamp.
-         *
-         * @param currentTimeInSec the timestamp to be checked.
-         * @return true if this PMK cache is valid against the timestamp; otherwise, false.
-         */
-        public boolean isValid(long currentTimeInSec) {
-            return expirationTimeInSec > 0 && expirationTimeInSec > currentTimeInSec;
-        }
-
-        @Override
-        public boolean equals(Object o) {
-            if (this == o) return true;
-            if (!(o instanceof PmkCacheStoreData)) return false;
-            PmkCacheStoreData storeData = (PmkCacheStoreData) o;
-            return expirationTimeInSec == storeData.expirationTimeInSec
-                    && Objects.equals(macAddress, storeData.macAddress)
-                    && Objects.equals(data, storeData.data);
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(macAddress, data, expirationTimeInSec);
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/QosPolicyRequestHandler.java b/service/java/com/android/server/wifi/QosPolicyRequestHandler.java
deleted file mode 100644
index d6180983..0000000
--- a/service/java/com/android/server/wifi/QosPolicyRequestHandler.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import android.annotation.NonNull;
-import android.net.DscpPolicy;
-import android.net.NetworkAgent;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.util.Log;
-import android.util.Pair;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyRequest;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyStatus;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/*
- * Handler for QoS policy requests.
- */
-public class QosPolicyRequestHandler {
-    private static final String TAG = "QosPolicyRequestHandler";
-    @VisibleForTesting
-    public static final int PROCESSING_TIMEOUT_MILLIS = 500;
-
-    private final String mInterfaceName;
-    private final WifiNative mWifiNative;
-    private final ClientModeImpl mClientModeImpl;
-    private WifiNetworkAgent mNetworkAgent;
-    private Handler mHandler;
-    private boolean mVerboseLoggingEnabled;
-
-    private int mQosRequestDialogToken;
-    private int mNumQosPoliciesInRequest;
-    private boolean mQosResourcesAvailable;
-    private boolean mQosRequestIsProcessing = false;
-    private List<QosPolicyStatus> mQosPolicyStatusList = new ArrayList<>();
-    private List<Pair<Integer, List<QosPolicyRequest>>> mQosPolicyRequestQueue = new ArrayList<>();
-
-    public QosPolicyRequestHandler(
-            @NonNull String ifaceName, @NonNull WifiNative wifiNative,
-            @NonNull ClientModeImpl clientModeImpl, @NonNull HandlerThread handlerThread) {
-        mInterfaceName = ifaceName;
-        mWifiNative = wifiNative;
-        mClientModeImpl = clientModeImpl;
-        mHandler = new Handler(handlerThread.getLooper());
-    }
-
-    /**
-     * Enable/disable verbose logging.
-     */
-    public void enableVerboseLogging(boolean verbose) {
-        mVerboseLoggingEnabled = verbose;
-    }
-
-    /**
-     * Dump internal state regarding the policy request queue, and the request which is
-     * currently being processed.
-     */
-    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        pw.println("mQosRequestDialogToken: " + mQosRequestDialogToken);
-        pw.println("mNumQosPoliciesInRequest: " + mNumQosPoliciesInRequest);
-        pw.println("mQosResourcesAvailable: " + mQosResourcesAvailable);
-        pw.println("mQosPolicyStatusList size: " + mQosPolicyStatusList.size());
-        for (QosPolicyStatus status : mQosPolicyStatusList) {
-            pw.println("    Policy id: " + status.policyId + ", status: "
-                    + status.dscpPolicyStatus);
-        }
-        pw.println("mQosPolicyRequestQueue size: " + mQosPolicyRequestQueue.size());
-        for (Pair<Integer, List<QosPolicyRequest>> request : mQosPolicyRequestQueue) {
-            pw.println("    Dialog token: " + request.first
-                    + ", Num policies: " + request.second.size());
-            for (QosPolicyRequest policy : request.second) {
-                pw.println("        " + policy);
-            }
-        }
-    }
-
-    /**
-     * Set the network agent.
-     */
-    public void setNetworkAgent(WifiNetworkAgent wifiNetworkAgent) {
-        WifiNetworkAgent oldNetworkAgent = mNetworkAgent;
-        mNetworkAgent = wifiNetworkAgent;
-        if (mNetworkAgent == null) {
-            mQosPolicyStatusList.clear();
-            mQosPolicyRequestQueue.clear();
-            mQosRequestIsProcessing = false;
-        } else if (oldNetworkAgent != null) {
-            // Existing network agent was replaced by a new one.
-            resetProcessingState();
-        }
-    }
-
-    /**
-     * Queue a QoS policy request to be processed.
-     * @param dialogToken Token identifying the request.
-     * @param policies List of policies that we are requesting to set.
-     */
-    public void queueQosPolicyRequest(int dialogToken, List<QosPolicyRequest> policies) {
-        if (mNetworkAgent == null) {
-            Log.e(TAG, "Attempted to call queueQosPolicyRequest, but mNetworkAgent is null");
-            return;
-        }
-        mQosPolicyRequestQueue.add(new Pair(dialogToken, policies));
-        processNextQosPolicyRequestIfPossible();
-    }
-
-    /**
-     * Set the status for a policy which was processed.
-     * @param policyId ID of the policy.
-     * @param status code received from the NetworkAgent.
-     */
-    public void setQosPolicyStatus(int policyId, int status) {
-        if (mNetworkAgent == null) {
-            Log.e(TAG, "Attempted to call setQosPolicyStatus, but mNetworkAgent is null");
-            return;
-        }
-
-        mQosPolicyStatusList.add(new QosPolicyStatus(policyId, status));
-        if (status == NetworkAgent.DSCP_POLICY_STATUS_INSUFFICIENT_PROCESSING_RESOURCES) {
-            mQosResourcesAvailable = false;
-        }
-        sendQosPolicyResponseIfReady();
-    }
-
-    private void rejectQosPolicy(int policyId) {
-        mQosPolicyStatusList.add(new QosPolicyStatus(
-                policyId, NetworkAgent.DSCP_POLICY_STATUS_REQUEST_DECLINED));
-        sendQosPolicyResponseIfReady();
-    }
-
-    private void sendQosPolicyResponseIfReady() {
-        if (mQosRequestIsProcessing && mQosPolicyStatusList.size() == mNumQosPoliciesInRequest) {
-            mWifiNative.sendQosPolicyResponse(mInterfaceName, mQosRequestDialogToken,
-                    mQosResourcesAvailable, mQosPolicyStatusList);
-            mQosRequestIsProcessing = false;
-            mHandler.post(() -> processNextQosPolicyRequestIfPossible());
-        }
-    }
-
-    private void processNextQosPolicyRequestIfPossible() {
-        if (!mQosRequestIsProcessing && mQosPolicyRequestQueue.size() != 0) {
-            Pair<Integer, List<QosPolicyRequest>> nextRequest = mQosPolicyRequestQueue.get(0);
-            mQosPolicyRequestQueue.remove(0);
-            mQosRequestIsProcessing = true;
-            processQosPolicyRequest(nextRequest.first, nextRequest.second);
-        }
-    }
-
-    private void checkForProcessingStall(int dialogToken) {
-        if (mQosRequestIsProcessing && dialogToken == mQosRequestDialogToken) {
-            Log.e(TAG, "Stop processing stalled QoS request " + dialogToken);
-            resetProcessingState();
-        }
-    }
-
-    private void resetProcessingState() {
-        mQosRequestIsProcessing = false;
-        mQosPolicyRequestQueue.clear();
-        mClientModeImpl.clearQueuedQosMessages();
-        mWifiNative.removeAllQosPolicies(mInterfaceName);
-        if (mNetworkAgent != null) {
-            mNetworkAgent.sendRemoveAllDscpPolicies();
-        }
-    }
-
-    private void processQosPolicyRequest(int dialogToken, List<QosPolicyRequest> policies) {
-        if (mNetworkAgent == null) {
-            Log.e(TAG, "Attempted to call processQosPolicyRequest, but mNetworkAgent is null");
-            return;
-        }
-
-        mQosRequestDialogToken = dialogToken;
-        mQosResourcesAvailable = true;
-        mNumQosPoliciesInRequest = policies.size();
-        mQosPolicyStatusList.clear();
-
-        if (policies.size() == 0) {
-            sendQosPolicyResponseIfReady();
-            return;
-        }
-
-        // Reject entire batch if any duplicate policy id's exist.
-        Set<Byte> uniquePolicyIds = new HashSet<>();
-        for (QosPolicyRequest policy : policies) {
-            uniquePolicyIds.add(policy.policyId);
-        }
-        if (policies.size() != uniquePolicyIds.size()) {
-            for (QosPolicyRequest policy : policies) {
-                rejectQosPolicy(policy.policyId);
-            }
-            return;
-        }
-
-        if (SdkLevel.isAtLeastT()) {
-            for (QosPolicyRequest policy : policies) {
-                if (policy.isRemoveRequest()) {
-                    mNetworkAgent.sendRemoveDscpPolicy(policy.policyId);
-                } else if (policy.isAddRequest()) {
-                    if (!policy.classifierParams.isValid) {
-                        rejectQosPolicy(policy.policyId);
-                        continue;
-                    }
-                    DscpPolicy.Builder builder = new DscpPolicy.Builder(
-                            policy.policyId, policy.dscp)
-                            .setSourcePort(policy.classifierParams.srcPort)
-                            .setProtocol(policy.classifierParams.protocol)
-                            .setDestinationPortRange(policy.classifierParams.dstPortRange);
-
-                    // Only set src and dest IP if a value exists in classifierParams.
-                    if (policy.classifierParams.hasSrcIp) {
-                        builder.setSourceAddress(policy.classifierParams.srcIp);
-                    }
-                    if (policy.classifierParams.hasDstIp) {
-                        builder.setDestinationAddress(policy.classifierParams.dstIp);
-                    }
-
-                    try {
-                        mNetworkAgent.sendAddDscpPolicy(builder.build());
-                    } catch (IllegalArgumentException e) {
-                        Log.e(TAG, "Unable to send DSCP policy ", e);
-                        rejectQosPolicy(policy.policyId);
-                        continue;
-                    }
-                } else {
-                    Log.e(TAG, "Unknown request type received");
-                    rejectQosPolicy(policy.policyId);
-                    continue;
-                }
-            }
-            mHandler.postDelayed(() -> checkForProcessingStall(dialogToken),
-                    PROCESSING_TIMEOUT_MILLIS);
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/RestrictedWifiNetworkFactory.java b/service/java/com/android/server/wifi/RestrictedWifiNetworkFactory.java
deleted file mode 100644
index 8ef248e..0000000
--- a/service/java/com/android/server/wifi/RestrictedWifiNetworkFactory.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import android.content.Context;
-import android.net.NetworkCapabilities;
-import android.net.NetworkFactory;
-import android.net.NetworkRequest;
-import android.os.Looper;
-import android.util.ArraySet;
-import android.util.Log;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.Set;
-
-/**
- * Network factory to handle restricted wifi network requests.
- * @see android.net.wifi.WifiNetworkSuggestion.Builder#setRestricted(boolean)
- */
-public class RestrictedWifiNetworkFactory extends NetworkFactory {
-    private static final String TAG = "RestrictedWifiNetworkFactory";
-    private static final int SCORE_FILTER = Integer.MAX_VALUE;
-
-    private final WifiConnectivityManager mWifiConnectivityManager;
-    private Set<Integer> mRequestUids = new ArraySet<>();
-
-    public RestrictedWifiNetworkFactory(Looper l, Context c, NetworkCapabilities f,
-                                       WifiConnectivityManager connectivityManager) {
-        super(l, c, TAG, f);
-        mWifiConnectivityManager = connectivityManager;
-
-        setScoreFilter(SCORE_FILTER);
-    }
-
-    @Override
-    protected void needNetworkFor(NetworkRequest networkRequest) {
-        if (!networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED)) {
-            if (mRequestUids.add(networkRequest.getRequestorUid())) {
-                mWifiConnectivityManager.addRestrictionConnectionAllowedUid(networkRequest
-                        .getRequestorUid());
-            }
-        }
-    }
-
-    @Override
-    protected void releaseNetworkFor(NetworkRequest networkRequest) {
-        if (!networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED)) {
-            if (mRequestUids.size() == 0) {
-                Log.e(TAG, "No valid network request to release");
-                return;
-            }
-            if (mRequestUids.remove(networkRequest.getRequestorUid())) {
-                mWifiConnectivityManager.removeRestrictionConnectionAllowedUid(networkRequest
-                        .getRequestorUid());
-            }
-        }
-    }
-
-    @Override
-    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
-        super.dump(fd, pw, args);
-        pw.println(TAG + ": mConnectionReqCount " + mRequestUids.size());
-    }
-
-    /**
-     * Check if there is at-least one connection request.
-     */
-    public boolean hasConnectionRequests() {
-        return mRequestUids.size() > 0;
-    }
-}
-
diff --git a/service/java/com/android/server/wifi/SarManager.java b/service/java/com/android/server/wifi/SarManager.java
index da7ec96..03af0c7 100644
--- a/service/java/com/android/server/wifi/SarManager.java
+++ b/service/java/com/android/server/wifi/SarManager.java
@@ -30,14 +30,14 @@
 import android.media.AudioManager;
 import android.net.wifi.WifiManager;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.os.Looper;
 import android.os.PowerManager;
 import android.telephony.PhoneStateListener;
 import android.telephony.TelephonyManager;
-import android.text.TextUtils;
 import android.util.Log;
 
-import com.android.modules.utils.HandlerExecutor;
+import com.android.server.wifi.util.WifiHandler;
 import com.android.wifi.resources.R;
 
 import java.io.FileDescriptor;
@@ -106,7 +106,7 @@
         mTelephonyManager = telephonyManager;
         mWifiNative = wifiNative;
         mAudioManager = mContext.getSystemService(AudioManager.class);
-        mHandler = new Handler(looper);
+        mHandler = new WifiHandler(TAG, looper);
         mPhoneStateListener = new WifiPhoneStateListener(looper);
     }
 
@@ -247,9 +247,9 @@
                     @Override
                     public void onReceive(Context context, Intent intent) {
                         String action = intent.getAction();
-                        if (TextUtils.equals(action, Intent.ACTION_SCREEN_ON)) {
+                        if (action.equals(Intent.ACTION_SCREEN_ON)) {
                             handleScreenStateChanged(true);
-                        } else if (TextUtils.equals(action, Intent.ACTION_SCREEN_OFF)) {
+                        } else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
                             handleScreenStateChanged(false);
                         }
                     }
@@ -427,8 +427,12 @@
     /**
      * Enable/disable verbose logging.
      */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
+    public void enableVerboseLogging(int verbose) {
+        if (verbose > 0) {
+            mVerboseLoggingEnabled = true;
+        } else {
+            mVerboseLoggingEnabled = false;
+        }
     }
 
     /**
diff --git a/service/java/com/android/server/wifi/SavedNetworkNominator.java b/service/java/com/android/server/wifi/SavedNetworkNominator.java
index f2b761c..9af1212 100644
--- a/service/java/com/android/server/wifi/SavedNetworkNominator.java
+++ b/service/java/com/android/server/wifi/SavedNetworkNominator.java
@@ -17,7 +17,6 @@
 package com.android.server.wifi;
 
 import android.annotation.NonNull;
-import android.net.MacAddress;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
 import android.telephony.TelephonyManager;
@@ -28,8 +27,6 @@
 import com.android.server.wifi.util.WifiPermissionsUtil;
 
 import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
 
 /**
  * This class is the WifiNetworkSelector.NetworkNominator implementation for
@@ -84,7 +81,7 @@
     public void update(List<ScanDetail> scanDetails) {
         // Update the matching profiles into WifiConfigManager, help displaying Passpoint networks
         // in Wifi Picker
-        mPasspointNetworkNominateHelper.updatePasspointConfig(scanDetails);
+        mPasspointNetworkNominateHelper.getPasspointNetworkCandidates(scanDetails, false);
     }
 
     /**
@@ -93,10 +90,9 @@
      */
     @Override
     public void nominateNetworks(List<ScanDetail> scanDetails,
-            boolean untrustedNetworkAllowed /* unused */,
-            boolean oemPaidNetworkAllowed /* unused */,
-            boolean oemPrivateNetworkAllowed /* unused */,
-            Set<Integer> restrictedNetworkAllowedUids /* unused */,
+                    boolean untrustedNetworkAllowed /* unused */,
+                    boolean oemPaidNetworkAllowed /* unused */,
+                    boolean oemPrivateNetworkAllowed /* unused */,
             @NonNull OnConnectableListener onConnectableListener) {
         findMatchedSavedNetworks(scanDetails, onConnectableListener);
         findMatchedPasspointNetworks(scanDetails, onConnectableListener);
@@ -118,7 +114,9 @@
 
             /**
              * Ignore Passpoint and Ephemeral networks. They are configured networks,
-             * but without being persisted to the storage.
+             * but without being persisted to the storage. They are nominated by
+             * {@link PasspointNetworkNominator} and {@link ScoredNetworkNominator}
+             * respectively.
              */
             if (network.isPasspoint() || network.isEphemeral()) {
                 continue;
@@ -156,23 +154,6 @@
                         + scanResult.BSSID);
                 continue;
             }
-            List<MacAddress> bssidList = network.getBssidAllowlistInternal();
-            if (bssidList != null) {
-                if (bssidList.isEmpty()) {
-                    localLog("Network " + WifiNetworkSelector.toNetworkString(network)
-                            + " has specified BSSID list " + bssidList + ". Skip "
-                            + scanResult.BSSID);
-                    continue;
-                }
-                Set<String> bssidSet = bssidList.stream().map(MacAddress::toString)
-                        .collect(Collectors.toSet());
-                if (!bssidSet.contains(scanResult.BSSID)) {
-                    localLog("Network " + WifiNetworkSelector.toNetworkString(network)
-                            + " has specified BSSID list " + bssidList + ". Skip "
-                            + scanResult.BSSID);
-                    continue;
-                }
-            }
             if (isNetworkSimBasedCredential(network) && !isSimBasedNetworkAbleToAutoJoin(network)) {
                 localLog("Ignoring SIM auto join disabled SSID: " + network.SSID);
                 continue;
diff --git a/service/java/com/android/server/wifi/ScanDetail.java b/service/java/com/android/server/wifi/ScanDetail.java
index 018aefd..5be45de 100644
--- a/service/java/com/android/server/wifi/ScanDetail.java
+++ b/service/java/com/android/server/wifi/ScanDetail.java
@@ -20,10 +20,6 @@
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiSsid;
 
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
-import com.android.internal.annotations.VisibleForTesting;
 import com.android.server.wifi.hotspot2.NetworkDetail;
 import com.android.server.wifi.hotspot2.Utils;
 import com.android.server.wifi.hotspot2.anqp.ANQPElement;
@@ -44,88 +40,51 @@
     private long mSeen = 0;
     private byte[] mInformationElementRawData;
 
-    /**
-     * Main constructor used when converting from NativeScanResult
-     */
-    public ScanDetail(@Nullable NetworkDetail networkDetail, @Nullable WifiSsid wifiSsid,
-            @Nullable String bssid, @Nullable String caps, int level, int frequency, long tsf,
-            @Nullable ScanResult.InformationElement[] informationElements,
-            @Nullable List<String> anqpLines, @Nullable byte[] informationElementRawData) {
+    public ScanDetail(NetworkDetail networkDetail, WifiSsid wifiSsid, String bssid,
+            String caps, int level, int frequency, long tsf,
+            ScanResult.InformationElement[] informationElements, List<String> anqpLines,
+            byte[] informationElementRawData) {
         mNetworkDetail = networkDetail;
-        long hessid = 0L;
-        int anqpDomainId = ScanResult.UNSPECIFIED;
-        byte[] osuProviders = null;
-        int channelWidth = ScanResult.UNSPECIFIED;
-        int centerFreq0 = ScanResult.UNSPECIFIED;
-        int centerFreq1 = ScanResult.UNSPECIFIED;
-        boolean isPasspoint = false;
-        boolean is80211McResponder = false;
-        if (networkDetail != null) {
-            hessid = networkDetail.getHESSID();
-            anqpDomainId = networkDetail.getAnqpDomainID();
-            osuProviders = networkDetail.getOsuProviders();
-            channelWidth = networkDetail.getChannelWidth();
-            centerFreq0 = networkDetail.getCenterfreq0();
-            centerFreq1 = networkDetail.getCenterfreq1();
-            isPasspoint = caps.contains("EAP")
-                    && networkDetail.isInterworking() && networkDetail.getHSRelease() != null;
-            is80211McResponder = networkDetail.is80211McResponderSupport();
-        }
-        mScanResult = new ScanResult(wifiSsid, bssid, hessid, anqpDomainId, osuProviders, caps,
-                level, frequency, tsf);
+        mScanResult = new ScanResult(wifiSsid, bssid, networkDetail.getHESSID(),
+                networkDetail.getAnqpDomainID(), networkDetail.getOsuProviders(),
+                caps, level, frequency, tsf);
         mSeen = System.currentTimeMillis();
         mScanResult.seen = mSeen;
-        mScanResult.channelWidth = channelWidth;
-        mScanResult.centerFreq0 = centerFreq0;
-        mScanResult.centerFreq1 = centerFreq1;
+        mScanResult.channelWidth = networkDetail.getChannelWidth();
+        mScanResult.centerFreq0 = networkDetail.getCenterfreq0();
+        mScanResult.centerFreq1 = networkDetail.getCenterfreq1();
         mScanResult.informationElements = informationElements;
         mScanResult.anqpLines = anqpLines;
-        if (is80211McResponder) {
+        if (networkDetail.is80211McResponderSupport()) {
             mScanResult.setFlag(ScanResult.FLAG_80211mc_RESPONDER);
         }
-        if (isPasspoint) {
+        if (networkDetail.isInterworking() && networkDetail.getHSRelease() != null) {
             mScanResult.setFlag(ScanResult.FLAG_PASSPOINT_NETWORK);
         }
         mInformationElementRawData = informationElementRawData;
     }
 
-    /**
-     * Creates a ScanDetail without NetworkDetail for unit testing
-     */
-    @VisibleForTesting
-    public ScanDetail(@Nullable WifiSsid wifiSsid, @Nullable String bssid, String caps, int level,
-            int frequency, long tsf, long seen) {
-        this(null, wifiSsid, bssid, caps, level, frequency, tsf, null, null, null);
+    public ScanDetail(WifiSsid wifiSsid, String bssid, String caps, int level, int frequency,
+                      long tsf, long seen) {
+        mNetworkDetail = null;
+        mScanResult = new ScanResult(wifiSsid, bssid, 0L, -1, null, caps, level, frequency, tsf);
         mSeen = seen;
-        mScanResult.seen = seen;
+        mScanResult.seen = mSeen;
+        mScanResult.channelWidth = 0;
+        mScanResult.centerFreq0 = 0;
+        mScanResult.centerFreq1 = 0;
+        mScanResult.flags = 0;
     }
 
-    /**
-     * Create a ScanDetail from a ScanResult
-     */
-    public ScanDetail(@NonNull ScanResult scanResult) {
+    public ScanDetail(ScanResult scanResult, NetworkDetail networkDetail) {
         mScanResult = scanResult;
-        mNetworkDetail = new NetworkDetail(
-                scanResult.BSSID,
-                scanResult.informationElements,
-                scanResult.anqpLines,
-                scanResult.frequency);
+        mNetworkDetail = networkDetail;
         // Only inherit |mScanResult.seen| if it was previously set. This ensures that |mSeen|
         // will always contain a valid timestamp.
         mSeen = (mScanResult.seen == 0) ? System.currentTimeMillis() : mScanResult.seen;
     }
 
     /**
-     * Copy constructor
-     */
-    public ScanDetail(@NonNull ScanDetail scanDetail) {
-        mScanResult = new ScanResult(scanDetail.mScanResult);
-        mNetworkDetail = new NetworkDetail(scanDetail.mNetworkDetail);
-        mSeen = scanDetail.mSeen;
-        mInformationElementRawData = scanDetail.mInformationElementRawData;
-    }
-
-    /**
      * Store ANQ element information
      *
      * @param anqpElements Map<Constants.ANQPElementType, ANQPElement>
@@ -182,8 +141,9 @@
         if (networkDetail != null) {
             return networkDetail.toKeyString();
         } else {
-            return "'" + mScanResult.BSSID + "':" + Utils.macToSimpleString(
-                    Utils.parseMac(mScanResult.BSSID));
+            return String.format("'%s':%012x",
+                                 mScanResult.BSSID,
+                                 Utils.parseMac(mScanResult.BSSID));
         }
     }
 
@@ -213,10 +173,11 @@
     @Override
     public String toString() {
         try {
-            return "'" + mScanResult.BSSID + "'/" + Utils.macToSimpleString(
-                    Utils.parseMac(mScanResult.BSSID));
+            return String.format("'%s'/%012x",
+                                 mScanResult.SSID,
+                                 Utils.parseMac(mScanResult.BSSID));
         } catch (IllegalArgumentException iae) {
-            return "'" + mScanResult.BSSID + "'/----";
+            return String.format("'%s'/----", mScanResult.BSSID);
         }
     }
 }
diff --git a/service/java/com/android/server/wifi/ScanDetailCache.java b/service/java/com/android/server/wifi/ScanDetailCache.java
index 90dd4d0..1b518cf 100644
--- a/service/java/com/android/server/wifi/ScanDetailCache.java
+++ b/service/java/com/android/server/wifi/ScanDetailCache.java
@@ -208,10 +208,10 @@
                     ageDay   = (milli / (24 * 60 * 60 * 1000));
                 }
                 sbuf.append("{").append(result.BSSID).append(",").append(result.frequency);
-                sbuf.append(",").append(result.level);
+                sbuf.append(",").append(String.format("%3d", result.level));
                 if (ageSec > 0 || ageMilli > 0) {
-                    sbuf.append("," + ageDay + "." + ageHour + "." + ageMin + "." + ageSec + "."
-                            + ageMilli + "ms");
+                    sbuf.append(String.format(",%4d.%02d.%02d.%02d.%03dms", ageDay,
+                            ageHour, ageMin, ageSec, ageMilli));
                 }
                 NetworkDetail networkDetail = scanDetail.getNetworkDetail();
                 if (networkDetail != null && networkDetail.isInterworking()) {
diff --git a/service/java/com/android/server/wifi/ScanRequestProxy.java b/service/java/com/android/server/wifi/ScanRequestProxy.java
index 3e4d8be..d047b40 100644
--- a/service/java/com/android/server/wifi/ScanRequestProxy.java
+++ b/service/java/com/android/server/wifi/ScanRequestProxy.java
@@ -28,20 +28,19 @@
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiScanner;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.os.RemoteCallbackList;
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.os.WorkSource;
-import android.text.TextUtils;
 import android.util.ArrayMap;
 import android.util.Log;
 import android.util.Pair;
 
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.HandlerExecutor;
 import com.android.modules.utils.build.SdkLevel;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.wifi.resources.R;
 
@@ -220,8 +219,8 @@
     /**
      * Enable verbose logging.
      */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
+    public void enableVerboseLogging(int verbose) {
+        mVerboseLoggingEnabled = (verbose > 0);
     }
 
     /**
@@ -373,7 +372,7 @@
             return false;
         }
         for (String name : exceptionList) {
-            if (TextUtils.equals(packageName, name)) {
+            if (packageName.equals(name)) {
                 return true;
             }
         }
@@ -489,11 +488,10 @@
         if (mScanningForHiddenNetworksEnabled) {
             settings.hiddenNetworks.clear();
             // retrieve the list of hidden network SSIDs from saved network to scan for, if enabled.
-            settings.hiddenNetworks.addAll(mWifiConfigManager.retrieveHiddenNetworkList(false));
+            settings.hiddenNetworks.addAll(mWifiConfigManager.retrieveHiddenNetworkList());
             // retrieve the list of hidden network SSIDs from Network suggestion to scan for.
             settings.hiddenNetworks.addAll(
-                    mWifiInjector.getWifiNetworkSuggestionsManager()
-                    .retrieveHiddenNetworkList(false));
+                    mWifiInjector.getWifiNetworkSuggestionsManager().retrieveHiddenNetworkList());
         }
         mWifiScanner.startScan(settings, new HandlerExecutor(mHandler),
                 new ScanRequestProxyScanListener(), workSource);
@@ -582,10 +580,6 @@
     public void setScanThrottleEnabled(boolean enable) {
         mThrottleEnabled = enable;
         mSettingsConfigStore.put(WIFI_SCAN_THROTTLE_ENABLED, enable);
-
-        // reset internal counters when enabling/disabling throttling
-        mLastScanTimestampsForFgApps.clear();
-        mLastScanTimestampForBgApps = 0;
         Log.i(TAG, "Scan throttle enabled " + mThrottleEnabled);
     }
 
@@ -600,7 +594,7 @@
     /** Indicate whether there are WPA2 personal only networks. */
     public boolean isWpa2PersonalOnlyNetworkInRange(String ssid) {
         return mLastScanResultsMap.values().stream().anyMatch(r ->
-                TextUtils.equals(ssid, r.getWifiSsid().toString())
+                ssid.equals(ScanResultUtil.createQuotedSSID(r.SSID))
                 && ScanResultUtil.isScanResultForPskNetwork(r)
                 && !ScanResultUtil.isScanResultForSaeNetwork(r));
     }
@@ -608,7 +602,7 @@
     /** Indicate whether there are WPA3 only networks. */
     public boolean isWpa3PersonalOnlyNetworkInRange(String ssid) {
         return mLastScanResultsMap.values().stream().anyMatch(r ->
-                TextUtils.equals(ssid, r.getWifiSsid().toString())
+                ssid.equals(ScanResultUtil.createQuotedSSID(r.SSID))
                 && ScanResultUtil.isScanResultForSaeNetwork(r)
                 && !ScanResultUtil.isScanResultForPskNetwork(r));
     }
@@ -616,14 +610,14 @@
     /** Indicate whether there are WPA2/WPA3 transition mode networks. */
     public boolean isWpa2Wpa3PersonalTransitionNetworkInRange(String ssid) {
         return mLastScanResultsMap.values().stream().anyMatch(r ->
-                TextUtils.equals(ssid, ScanResultUtil.createQuotedSsid(r.SSID))
+                ssid.equals(ScanResultUtil.createQuotedSSID(r.SSID))
                 && ScanResultUtil.isScanResultForPskSaeTransitionNetwork(r));
     }
 
     /** Indicate whether there are OPEN only networks. */
     public boolean isOpenOnlyNetworkInRange(String ssid) {
         return mLastScanResultsMap.values().stream().anyMatch(r ->
-                TextUtils.equals(ssid, r.getWifiSsid().toString())
+                ssid.equals(ScanResultUtil.createQuotedSSID(r.SSID))
                 && ScanResultUtil.isScanResultForOpenNetwork(r)
                 && !ScanResultUtil.isScanResultForOweNetwork(r));
     }
@@ -631,7 +625,7 @@
     /** Indicate whether there are OWE only networks. */
     public boolean isOweOnlyNetworkInRange(String ssid) {
         return mLastScanResultsMap.values().stream().anyMatch(r ->
-                TextUtils.equals(ssid, r.getWifiSsid().toString())
+                ssid.equals(ScanResultUtil.createQuotedSSID(r.SSID))
                 && ScanResultUtil.isScanResultForOweNetwork(r)
                 && !ScanResultUtil.isScanResultForOweTransitionNetwork(r));
     }
@@ -639,7 +633,7 @@
     /** Indicate whether there are WPA2 Enterprise only networks. */
     public boolean isWpa2EnterpriseOnlyNetworkInRange(String ssid) {
         return mLastScanResultsMap.values().stream().anyMatch(r ->
-                TextUtils.equals(ssid, r.getWifiSsid().toString())
+                ssid.equals(ScanResultUtil.createQuotedSSID(r.SSID))
                 && ScanResultUtil.isScanResultForEapNetwork(r)
                 && !ScanResultUtil.isScanResultForWpa3EnterpriseTransitionNetwork(r)
                 && !ScanResultUtil.isScanResultForWpa3EnterpriseOnlyNetwork(r));
@@ -648,7 +642,7 @@
     /** Indicate whether there are WPA3 Enterprise only networks. */
     public boolean isWpa3EnterpriseOnlyNetworkInRange(String ssid) {
         return mLastScanResultsMap.values().stream().anyMatch(r ->
-                TextUtils.equals(ssid, r.getWifiSsid().toString())
+                ssid.equals(ScanResultUtil.createQuotedSSID(r.SSID))
                 && ScanResultUtil.isScanResultForWpa3EnterpriseOnlyNetwork(r)
                 && !ScanResultUtil.isScanResultForWpa3EnterpriseTransitionNetwork(r)
                 && !ScanResultUtil.isScanResultForEapNetwork(r));
diff --git a/service/java/com/android/server/wifi/ScanResultMatchInfo.java b/service/java/com/android/server/wifi/ScanResultMatchInfo.java
index b0aab8d..a9f7720 100644
--- a/service/java/com/android/server/wifi/ScanResultMatchInfo.java
+++ b/service/java/com/android/server/wifi/ScanResultMatchInfo.java
@@ -20,8 +20,8 @@
 import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiSsid;
-import android.net.wifi.util.ScanResultUtil;
+
+import com.android.server.wifi.util.ScanResultUtil;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -60,12 +60,11 @@
      */
     public static ScanResultMatchInfo fromScanResult(ScanResult scanResult) {
         ScanResultMatchInfo info = new ScanResultMatchInfo();
-        WifiSsid wifiSsid = scanResult.getWifiSsid();
-        if (wifiSsid != null) {
-            info.networkSsid = wifiSsid.toString();
-        } else {
-            info.networkSsid = "\"" + scanResult.SSID + "\"";
-        }
+        // Scan result ssid's are not quoted, hence add quotes.
+        // TODO: This matching algo works only if the scan result contains a string SSID.
+        // However, according to our public documentation ths {@link WifiConfiguration#SSID} can
+        // either have a hex string or quoted ASCII string SSID.
+        info.networkSsid = ScanResultUtil.createQuotedSSID(scanResult.SSID);
         info.securityParamsList =
                 ScanResultUtil.generateSecurityParamsListFromScanResult(scanResult);
         info.mFromScanResult = true;
diff --git a/service/java/com/android/server/wifi/ScoredNetworkNominator.java b/service/java/com/android/server/wifi/ScoredNetworkNominator.java
new file mode 100644
index 0000000..4a538a3
--- /dev/null
+++ b/service/java/com/android/server/wifi/ScoredNetworkNominator.java
@@ -0,0 +1,407 @@
+/*
+ * Copyright (C) 2017 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.server.wifi;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.database.ContentObserver;
+import android.net.NetworkKey;
+import android.net.NetworkScoreManager;
+import android.net.wifi.ScanResult;
+import android.net.wifi.SecurityParams;
+import android.net.wifi.WifiConfiguration;
+import android.os.Handler;
+import android.provider.Settings;
+import android.util.LocalLog;
+import android.util.Log;
+import android.util.Pair;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.wifi.util.ScanResultUtil;
+import com.android.server.wifi.util.WifiPermissionsUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * {@link WifiNetworkSelector.NetworkNominator} implementation that uses scores obtained by
+ * {@link NetworkScoreManager#requestScores(NetworkKey[])} to make network connection decisions.
+ */
+public class ScoredNetworkNominator implements WifiNetworkSelector.NetworkNominator {
+    private static final String TAG = "ScoredNetworkNominator";
+    // TODO (b/150977740): Stop using the @hide settings global flag.
+    @VisibleForTesting
+    public static final String SETTINGS_GLOBAL_USE_OPEN_WIFI_PACKAGE =
+            "use_open_wifi_package";
+    private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
+
+    /**
+     * Attribution tag used for checks on the scorers access to location permissions.
+     */
+    private static final String ATTRIBUTION_FEATURE_ID = "system_scored_network_nominator";
+
+    private final NetworkScoreManager mNetworkScoreManager;
+    private final PackageManager mPackageManager;
+    private final WifiConfigManager mWifiConfigManager;
+    private final LocalLog mLocalLog;
+    private final ContentObserver mContentObserver;
+    private final WifiPermissionsUtil mWifiPermissionsUtil;
+    private boolean mNetworkRecommendationsEnabled;
+    private WifiNetworkScoreCache mScoreCache;
+
+    ScoredNetworkNominator(final Context context, Handler handler,
+            final FrameworkFacade frameworkFacade, NetworkScoreManager networkScoreManager,
+            PackageManager packageManager,
+            WifiConfigManager wifiConfigManager, LocalLog localLog,
+            WifiNetworkScoreCache wifiNetworkScoreCache,
+            WifiPermissionsUtil wifiPermissionsUtil) {
+        mScoreCache = wifiNetworkScoreCache;
+        mWifiPermissionsUtil = wifiPermissionsUtil;
+        mNetworkScoreManager = networkScoreManager;
+        mPackageManager = packageManager;
+        mWifiConfigManager = wifiConfigManager;
+        mLocalLog = localLog;
+        mContentObserver = new ContentObserver(handler) {
+            @Override
+            public void onChange(boolean selfChange) {
+                mNetworkRecommendationsEnabled = frameworkFacade.getStringSetting(context,
+                        SETTINGS_GLOBAL_USE_OPEN_WIFI_PACKAGE) != null;
+            }
+        };
+        frameworkFacade.registerContentObserver(context,
+                Settings.Global.getUriFor(SETTINGS_GLOBAL_USE_OPEN_WIFI_PACKAGE),
+                false /* notifyForDescendents */, mContentObserver);
+        mContentObserver.onChange(false /* unused */);
+        mLocalLog.log("ScoredNetworkNominator constructed. mNetworkRecommendationsEnabled: "
+                + mNetworkRecommendationsEnabled);
+    }
+
+    @Override
+    public void update(List<ScanDetail> scanDetails) {
+        if (mNetworkRecommendationsEnabled) {
+            updateNetworkScoreCache(scanDetails);
+        }
+    }
+
+    private void updateNetworkScoreCache(List<ScanDetail> scanDetails) {
+        ArrayList<NetworkKey> unscoredNetworks = new ArrayList<NetworkKey>();
+        for (int i = 0; i < scanDetails.size(); i++) {
+            ScanResult scanResult = scanDetails.get(i).getScanResult();
+            NetworkKey networkKey = NetworkKey.createFromScanResult(scanResult);
+            if (networkKey != null) {
+                // Is there a ScoredNetwork for this ScanResult? If not, request a score.
+                if (mScoreCache.getScoredNetwork(networkKey) == null) {
+                    unscoredNetworks.add(networkKey);
+                }
+            }
+        }
+
+        // Kick the score manager if there are any unscored network.
+        if (!unscoredNetworks.isEmpty() && activeScorerAllowedtoSeeScanResults()) {
+            mNetworkScoreManager.requestScores(unscoredNetworks);
+        }
+    }
+
+    private Pair<Integer, String> getActiveScorerUidAndPackage() {
+        String packageName = mNetworkScoreManager.getActiveScorerPackage();
+        if (packageName == null) return null;
+        int uid = -1;
+        try {
+            uid = mPackageManager.getApplicationInfo(packageName, 0).uid;
+        } catch (PackageManager.NameNotFoundException e) {
+            Log.e(TAG, "Failed to retrieve package uid", e);
+            return null;
+        }
+        return Pair.create(uid, packageName);
+    }
+
+    private boolean activeScorerAllowedtoSeeScanResults() {
+        Pair<Integer, String> scorerUidAndPackage = getActiveScorerUidAndPackage();
+        if (scorerUidAndPackage == null) return false;
+        try {
+            // TODO moltmann: Can we set a featureID here instead of null?
+            mWifiPermissionsUtil.enforceCanAccessScanResults(
+                    scorerUidAndPackage.second, ATTRIBUTION_FEATURE_ID,
+                    scorerUidAndPackage.first, null);
+            return true;
+        } catch (SecurityException e) {
+            return false;
+        }
+    }
+
+    @Override
+    public void nominateNetworks(List<ScanDetail> scanDetails,
+            boolean untrustedNetworkAllowed, boolean oemPaidNetworkAllowed /* unused */,
+            boolean oemPrivateNetworkAllowed /* unused */,
+            @NonNull OnConnectableListener onConnectableListener) {
+        if (!mNetworkRecommendationsEnabled) {
+            mLocalLog.log("Skipping nominateNetworks; Network recommendations disabled.");
+            return;
+        }
+
+        final ScoreTracker scoreTracker = new ScoreTracker();
+        for (int i = 0; i < scanDetails.size(); i++) {
+            ScanDetail scanDetail = scanDetails.get(i);
+            ScanResult scanResult = scanDetail.getScanResult();
+            if (scanResult == null) continue;
+            if (mWifiConfigManager.isNetworkTemporarilyDisabledByUser(
+                    ScanResultUtil.createQuotedSSID(scanResult.SSID))) {
+                debugLog("Ignoring user disabled SSID: " + scanResult.SSID);
+                continue;
+            }
+            final WifiConfiguration configuredNetwork =
+                    mWifiConfigManager.getSavedNetworkForScanDetailAndCache(scanDetail);
+            boolean untrustedScanResult = configuredNetwork == null || !configuredNetwork.trusted;
+
+            if (!untrustedNetworkAllowed && untrustedScanResult) {
+                continue;
+            }
+
+            // Track scan results for open wifi networks
+            if (configuredNetwork == null) {
+                if (ScanResultUtil.isScanResultForOpenNetwork(scanResult)) {
+                    scoreTracker.trackUntrustedCandidate(scanDetail);
+                }
+                continue;
+            }
+
+            // Ignore trusted and non-externally scored networks
+            if (configuredNetwork.trusted && !configuredNetwork.useExternalScores) {
+                continue;
+            }
+
+            // Ignore externally scored or ephemeral networks that have been disabled for selection
+            if (!configuredNetwork.getNetworkSelectionStatus().isNetworkEnabled()) {
+                debugLog("Ignoring disabled SSID: " + configuredNetwork.SSID);
+                continue;
+            }
+            if (mWifiConfigManager.isNonCarrierMergedNetworkTemporarilyDisabled(
+                    configuredNetwork)) {
+                debugLog("Ignoring non-carrier-merged SSID: " + configuredNetwork.SSID);
+                continue;
+            }
+
+            // score boosts for current network is done by the candidate scorer. Don't artificially
+            // boost the score in the nominator.
+            if (!configuredNetwork.trusted) {
+                scoreTracker.trackUntrustedCandidate(
+                        scanResult, configuredNetwork, false /* isCurrentNetwork */);
+            } else {
+                scoreTracker.trackExternallyScoredCandidate(
+                        scanResult, configuredNetwork, false /* isCurrentNetwork */);
+            }
+            onConnectableListener.onConnectable(scanDetail, configuredNetwork);
+        }
+        scoreTracker.getCandidateConfiguration(onConnectableListener);
+    }
+
+    /** Used to track the network with the highest score. */
+    class ScoreTracker {
+        private static final int EXTERNAL_SCORED_NONE = 0;
+        private static final int EXTERNAL_SCORED_SAVED_NETWORK = 1;
+        private static final int EXTERNAL_SCORED_UNTRUSTED_NETWORK = 2;
+
+        private int mBestCandidateType = EXTERNAL_SCORED_NONE;
+        private int mHighScore = WifiNetworkScoreCache.INVALID_NETWORK_SCORE;
+        private WifiConfiguration mEphemeralConfig;
+        private WifiConfiguration mSavedConfig;
+        private ScanResult mScanResultCandidate;
+        private ScanDetail mScanDetailCandidate;
+
+        /**
+         * Returns the available external network score or null if no score is available.
+         *
+         * @param scanResult The scan result of the network to score.
+         * @param isCurrentNetwork Flag which indicates whether this is the current network.
+         * @return A valid external score if one is available or NULL.
+         */
+        @Nullable
+        private Integer getNetworkScore(ScanResult scanResult, boolean isCurrentNetwork) {
+            if (mScoreCache.isScoredNetwork(scanResult)) {
+                int score = mScoreCache.getNetworkScore(scanResult, isCurrentNetwork);
+                if (DEBUG) {
+                    mLocalLog.log(WifiNetworkSelector.toScanId(scanResult) + " has score: "
+                            + score + " isCurrentNetwork network: " + isCurrentNetwork);
+                }
+                return score;
+            }
+            return null;
+        }
+
+        /** Track an untrusted {@link ScanDetail}. */
+        void trackUntrustedCandidate(ScanDetail scanDetail) {
+            ScanResult scanResult = scanDetail.getScanResult();
+            Integer score = getNetworkScore(scanResult, false /* isCurrentNetwork */);
+            if (score != null && score > mHighScore) {
+                mHighScore = score;
+                mScanResultCandidate = scanResult;
+                mScanDetailCandidate = scanDetail;
+                mBestCandidateType = EXTERNAL_SCORED_UNTRUSTED_NETWORK;
+                debugLog(WifiNetworkSelector.toScanId(scanResult)
+                        + " becomes the new untrusted candidate.");
+            }
+        }
+
+        /**
+         * Track an untrusted {@link ScanResult} that already has a corresponding
+         * ephemeral {@link WifiConfiguration}.
+         */
+        void trackUntrustedCandidate(
+                ScanResult scanResult, WifiConfiguration config, boolean isCurrentNetwork) {
+            Integer score = getNetworkScore(scanResult, isCurrentNetwork);
+            if (score != null && score > mHighScore) {
+                mHighScore = score;
+                mScanResultCandidate = scanResult;
+                mScanDetailCandidate = null;
+                mBestCandidateType = EXTERNAL_SCORED_UNTRUSTED_NETWORK;
+                mEphemeralConfig = config;
+                SecurityParams params = ScanResultMatchInfo.getBestMatchingSecurityParams(
+                        config, scanResult);
+                mWifiConfigManager.setNetworkCandidateScanResult(
+                        config.networkId, scanResult, 0, params);
+                debugLog(WifiNetworkSelector.toScanId(scanResult)
+                        + " becomes the new untrusted candidate.");
+            }
+        }
+
+        /** Tracks a saved network that has been marked with useExternalScores */
+        void trackExternallyScoredCandidate(
+                ScanResult scanResult, WifiConfiguration config, boolean isCurrentNetwork) {
+            // Always take the highest score. If there's a tie and an untrusted network is currently
+            // the best then pick the saved network.
+            Integer score = getNetworkScore(scanResult, isCurrentNetwork);
+            if (score != null
+                    && (score > mHighScore
+                    || (mBestCandidateType == EXTERNAL_SCORED_UNTRUSTED_NETWORK
+                    && score == mHighScore))) {
+                mHighScore = score;
+                mSavedConfig = config;
+                mScanResultCandidate = scanResult;
+                mScanDetailCandidate = null;
+                mBestCandidateType = EXTERNAL_SCORED_SAVED_NETWORK;
+                SecurityParams params = ScanResultMatchInfo.getBestMatchingSecurityParams(
+                        config, scanResult);
+                mWifiConfigManager.setNetworkCandidateScanResult(
+                        config.networkId, scanResult, 0, params);
+                debugLog(WifiNetworkSelector.toScanId(scanResult)
+                        + " becomes the new externally scored saved network candidate.");
+            }
+        }
+
+        /** Returns the best candidate network tracked by this {@link ScoreTracker}. */
+        @Nullable
+        WifiConfiguration getCandidateConfiguration(
+                @NonNull OnConnectableListener onConnectableListener) {
+            int candidateNetworkId = WifiConfiguration.INVALID_NETWORK_ID;
+            switch (mBestCandidateType) {
+                case ScoreTracker.EXTERNAL_SCORED_UNTRUSTED_NETWORK:
+                    if (mEphemeralConfig != null) {
+                        candidateNetworkId = mEphemeralConfig.networkId;
+                        mLocalLog.log(String.format("existing ephemeral candidate %s network ID:%d"
+                                        + ", meteredHint=%b",
+                                WifiNetworkSelector.toScanId(mScanResultCandidate),
+                                candidateNetworkId,
+                                mEphemeralConfig.meteredHint));
+                        break;
+                    }
+                    Pair<Integer, String> scorerUidAndPackage = getActiveScorerUidAndPackage();
+                    if (scorerUidAndPackage == null) {
+                        mLocalLog.log("Can't find active scorer uid and package");
+                        break;
+                    }
+
+                    mEphemeralConfig =
+                            ScanResultUtil.createNetworkFromScanResult(mScanResultCandidate);
+                    if (null == mEphemeralConfig) {
+                        mLocalLog.log("Failed to create ephemeral network from the scan result:"
+                                + " SSID=" + mScanResultCandidate.SSID
+                                + ", caps=" + mScanResultCandidate.capabilities);
+                        break;
+                    }
+                    // Mark this config as ephemeral so it isn't persisted.
+                    mEphemeralConfig.ephemeral = true;
+                    // Mark this network as untrusted.
+                    mEphemeralConfig.trusted = false;
+                    mEphemeralConfig.meteredHint = mScoreCache.getMeteredHint(mScanResultCandidate);
+                    NetworkUpdateResult result =
+                            mWifiConfigManager.addOrUpdateNetwork(mEphemeralConfig,
+                                    scorerUidAndPackage.first, scorerUidAndPackage.second);
+                    if (!result.isSuccess()) {
+                        mLocalLog.log("Failed to add ephemeral network");
+                        break;
+                    }
+                    if (!mWifiConfigManager.updateNetworkSelectionStatus(result.getNetworkId(),
+                            WifiConfiguration.NetworkSelectionStatus.DISABLED_NONE)) {
+                        mLocalLog.log("Failed to make ephemeral network selectable");
+                        break;
+                    }
+                    candidateNetworkId = result.getNetworkId();
+                    if (mScanDetailCandidate == null) {
+                        // This should never happen, but if it does, WNS will log a wtf.
+                        // A message here might help with the diagnosis.
+                        Log.e(TAG, "mScanDetailCandidate is null!");
+                    }
+                    SecurityParams params = ScanResultMatchInfo.getBestMatchingSecurityParams(
+                            mWifiConfigManager.getConfiguredNetwork(candidateNetworkId),
+                            mScanResultCandidate);
+                    mWifiConfigManager.setNetworkCandidateScanResult(candidateNetworkId,
+                            mScanResultCandidate, 0, params);
+                    mLocalLog.log(String.format("new ephemeral candidate %s network ID:%d, "
+                                                + "meteredHint=%b",
+                                        WifiNetworkSelector.toScanId(mScanResultCandidate),
+                                        candidateNetworkId,
+                                        mEphemeralConfig.meteredHint));
+                    break;
+                case ScoreTracker.EXTERNAL_SCORED_SAVED_NETWORK:
+                    candidateNetworkId = mSavedConfig.networkId;
+                    mLocalLog.log(String.format("new saved network candidate %s network ID:%d",
+                                        WifiNetworkSelector.toScanId(mScanResultCandidate),
+                                        candidateNetworkId));
+                    break;
+                case ScoreTracker.EXTERNAL_SCORED_NONE:
+                default:
+                    mLocalLog.log("ScoredNetworkNominator did not see any good candidates.");
+                    break;
+            }
+            WifiConfiguration ans = mWifiConfigManager.getConfiguredNetwork(
+                    candidateNetworkId);
+            if (ans != null && mScanDetailCandidate != null) {
+                // This is a newly created config, so we need to call onConnectable.
+                onConnectableListener.onConnectable(mScanDetailCandidate, ans);
+            }
+            return ans;
+        }
+    }
+
+    private void debugLog(String msg) {
+        if (DEBUG) {
+            mLocalLog.log(msg);
+        }
+    }
+
+    @Override
+    public @NominatorId int getId() {
+        return NOMINATOR_ID_SCORED;
+    }
+
+    @Override
+    public String getName() {
+        return TAG;
+    }
+}
diff --git a/service/java/com/android/server/wifi/ScoringParams.java b/service/java/com/android/server/wifi/ScoringParams.java
index 0f42f16..027a863 100644
--- a/service/java/com/android/server/wifi/ScoringParams.java
+++ b/service/java/com/android/server/wifi/ScoringParams.java
@@ -20,7 +20,6 @@
 import android.content.Context;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiInfo;
-import android.text.TextUtils;
 import android.util.Log;
 
 import com.android.internal.annotations.VisibleForTesting;
@@ -87,17 +86,12 @@
         /** CandidateScorer parameters */
         public int throughputBonusNumerator = 120;
         public int throughputBonusDenominator = 433;
-        public int throughputBonusNumeratorAfter800Mbps = 1;
-        public int throughputBonusDenominatorAfter800Mbps = 16;
-        public boolean enable6GhzBeaconRssiBoost = true;
-        public int throughputBonusLimit = 320;
+        public int throughputBonusLimit = 200;
         public int savedNetworkBonus = 500;
         public int unmeteredNetworkBonus = 1000;
         public int currentNetworkBonusMin = 16;
         public int currentNetworkBonusPercent = 20;
         public int secureNetworkBonus = 40;
-        public int band6GhzBonus = 0;
-        public int scoringBucketStepSize = 500;
         public int lastSelectionMinutes = 480;
         public int estimateRssiErrorMargin = 5;
         public static final int MIN_MINUTES = 1;
@@ -274,12 +268,6 @@
                 R.integer.config_wifiFrameworkThroughputBonusNumerator);
         mVal.throughputBonusDenominator = context.getResources().getInteger(
                 R.integer.config_wifiFrameworkThroughputBonusDenominator);
-        mVal.throughputBonusNumeratorAfter800Mbps = context.getResources().getInteger(
-                R.integer.config_wifiFrameworkThroughputBonusNumeratorAfter800Mbps);
-        mVal.throughputBonusDenominatorAfter800Mbps = context.getResources().getInteger(
-                R.integer.config_wifiFrameworkThroughputBonusDenominatorAfter800Mbps);
-        mVal.enable6GhzBeaconRssiBoost = context.getResources().getBoolean(
-                R.bool.config_wifiEnable6GhzBeaconRssiBoost);
         mVal.throughputBonusLimit = context.getResources().getInteger(
                 R.integer.config_wifiFrameworkThroughputBonusLimit);
         mVal.savedNetworkBonus = context.getResources().getInteger(
@@ -292,9 +280,6 @@
             R.integer.config_wifiFrameworkCurrentNetworkBonusPercent);
         mVal.secureNetworkBonus = context.getResources().getInteger(
                 R.integer.config_wifiFrameworkSecureNetworkBonus);
-        mVal.band6GhzBonus = context.getResources().getInteger(R.integer.config_wifiBand6GhzBonus);
-        mVal.scoringBucketStepSize = context.getResources().getInteger(
-                R.integer.config_wifiScoringBucketStepSize);
         mVal.lastSelectionMinutes = context.getResources().getInteger(
                 R.integer.config_wifiFrameworkLastSelectionMinutes);
         mVal.estimateRssiErrorMargin = context.getResources().getInteger(
@@ -320,7 +305,7 @@
      */
     @VisibleForTesting
     public boolean update(String kvList) {
-        if (TextUtils.isEmpty(kvList)) {
+        if (kvList == null || "".equals(kvList)) {
             return true;
         }
         if (!("," + kvList).matches(COMMA_KEY_VAL_STAR)) {
@@ -444,27 +429,6 @@
         return mVal.throughputBonusDenominator;
     }
 
-    /**
-     * Getter for throughput numerator after 800Mbps.
-     */
-    public int getThroughputBonusNumeratorAfter800Mbps() {
-        return mVal.throughputBonusNumeratorAfter800Mbps;
-    }
-
-    /**
-     * Getter for throughput denominator after 800Mbps.
-     */
-    public int getThroughputBonusDenominatorAfter800Mbps() {
-        return mVal.throughputBonusDenominatorAfter800Mbps;
-    }
-
-    /**
-     * Feature flag for boosting 6Ghz RSSI based on channel width.
-     */
-    public boolean is6GhzBeaconRssiBoostEnabled() {
-        return mVal.enable6GhzBeaconRssiBoost;
-    }
-
     /*
      * Returns the maximum bonus for the network selection candidate score
      * for the contribution of the selected score.
@@ -514,23 +478,6 @@
         return mVal.secureNetworkBonus;
     }
 
-    /**
-     * Returns the bonus given if the network belongs to the 6Ghz band.
-     */
-    public int getBand6GhzBonus() {
-        return mVal.band6GhzBonus;
-    }
-
-    /**
-     * Returns the expected amount of score to reach the next tier during candidate scoring. This
-     * value should be configured according to the value of parameters that determine the
-     * scoring buckets such as {@code config_wifiFrameworkSavedNetworkBonus} and
-     * {@code config_wifiFrameworkUnmeteredNetworkBonus}.
-     */
-    public int getScoringBucketStepSize() {
-        return mVal.scoringBucketStepSize;
-    }
-
     /*
      * Returns the duration in minutes for a recently selected network
      * to be strongly favored.
diff --git a/service/java/com/android/server/wifi/SelfRecovery.java b/service/java/com/android/server/wifi/SelfRecovery.java
index 8ef2b29..39686ef 100644
--- a/service/java/com/android/server/wifi/SelfRecovery.java
+++ b/service/java/com/android/server/wifi/SelfRecovery.java
@@ -58,19 +58,13 @@
             REASON_SUBSYSTEM_RESTART})
     public @interface RecoveryReason {}
 
-    /**
-     * State for self recovery.
-     */
-    private static final int STATE_NO_RECOVERY = 0;
-    private static final int STATE_DISABLE_WIFI = 1;
-    private static final int STATE_RESTART_WIFI = 2;
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"STATE_"}, value = {
-            STATE_NO_RECOVERY,
-            STATE_DISABLE_WIFI,
-            STATE_RESTART_WIFI})
-    private @interface RecoveryState {}
+    protected static final String[] REASON_STRINGS = {
+            "Last Resort Watchdog",  // REASON_LAST_RESORT_WATCHDOG
+            "WifiNative Failure",    // REASON_WIFINATIVE_FAILURE
+            "Sta Interface Down",    // REASON_STA_IFACE_DOWN
+            "API call (e.g. user)",  // REASON_API_CALL
+            "Subsystem Restart"      // REASON_SUBSYSTEM_RESTART
+    };
 
     private final Context mContext;
     private final ActiveModeWarden mActiveModeWarden;
@@ -79,74 +73,29 @@
     private final LinkedList<Long> mPastRestartTimes;
     private final WifiNative mWifiNative;
     private int mSelfRecoveryReason;
-    // Self recovery state
-    private @RecoveryState int mRecoveryState;
+    private boolean mDidWeTriggerSelfRecovery;
     private SubsystemRestartListenerInternal mSubsystemRestartListener;
 
-    /**
-     * Return the recovery reason code as string.
-     * @param reason the reason code
-     * @return the recovery reason as string
-     */
-    public static String getRecoveryReasonAsString(@RecoveryReason int reason) {
-        switch (reason) {
-            case REASON_LAST_RESORT_WATCHDOG:
-                return "Last Resort Watchdog";
-            case REASON_WIFINATIVE_FAILURE:
-                return "WifiNative Failure";
-            case REASON_STA_IFACE_DOWN:
-                return "Sta Interface Down";
-            case REASON_API_CALL:
-                return "API call (e.g. user)";
-            case REASON_SUBSYSTEM_RESTART:
-                return "Subsystem Restart";
-            default:
-                return "Unknown " + reason;
-        }
-    }
-
-    /**
-     * Invoked when self recovery completed.
-     */
-    public void onRecoveryCompleted() {
-        mRecoveryState = STATE_NO_RECOVERY;
-    }
-
-    /**
-     * Invoked when Wifi is stopped with all client mode managers removed.
-     */
-    public void onWifiStopped() {
-        if (mRecoveryState == STATE_DISABLE_WIFI) {
-            onRecoveryCompleted();
-        }
-    }
-
-    /**
-     * Returns true if recovery is currently in progress.
-     */
-    public boolean isRecoveryInProgress() {
-        // return true if in recovery progress
-        return mRecoveryState != STATE_NO_RECOVERY;
-    }
-
     private class SubsystemRestartListenerInternal
             implements HalDeviceManager.SubsystemRestartListener{
-        public void onSubsystemRestart(@RecoveryReason int reason) {
-            Log.e(TAG, "Restarting wifi for reason: " + getRecoveryReasonAsString(reason));
-            mActiveModeWarden.recoveryRestartWifi(reason,
-                    reason != REASON_LAST_RESORT_WATCHDOG && reason != REASON_API_CALL);
-        }
-
         @Override
         public void onSubsystemRestart() {
-            if (mRecoveryState == STATE_RESTART_WIFI) {
-                // If the wifi restart recovery is triggered then proceed
-                onSubsystemRestart(mSelfRecoveryReason);
-            } else {
+            String reasonString =  "";
+            if (!mDidWeTriggerSelfRecovery) {
                 // We did not trigger recovery, but looks like the firmware crashed?
-                mRecoveryState = STATE_RESTART_WIFI;
-                onSubsystemRestart(REASON_SUBSYSTEM_RESTART);
+                mSelfRecoveryReason = REASON_SUBSYSTEM_RESTART;
             }
+
+            if (mSelfRecoveryReason < REASON_STRINGS.length && mSelfRecoveryReason >= 0) {
+                reasonString = REASON_STRINGS[mSelfRecoveryReason];
+            }
+
+            Log.e(TAG, "Restarting wifi for reason: " + reasonString);
+            mActiveModeWarden.recoveryRestartWifi(mSelfRecoveryReason, reasonString,
+                    mSelfRecoveryReason != REASON_LAST_RESORT_WATCHDOG
+                     && mSelfRecoveryReason != REASON_API_CALL);
+
+            mDidWeTriggerSelfRecovery = false;
         }
     }
 
@@ -159,7 +108,7 @@
         mWifiNative = wifiNative;
         mSubsystemRestartListener = new SubsystemRestartListenerInternal();
         mWifiNative.registerSubsystemRestartListener(mSubsystemRestartListener);
-        mRecoveryState = STATE_NO_RECOVERY;
+        mDidWeTriggerSelfRecovery = false;
     }
 
     /**
@@ -183,18 +132,16 @@
         if (reason == REASON_STA_IFACE_DOWN) {
             Log.e(TAG, "STA interface down, disable wifi");
             mActiveModeWarden.recoveryDisableWifi();
-            mRecoveryState = STATE_DISABLE_WIFI;
             return;
         }
 
-        Log.e(TAG, "Triggering recovery for reason: " + getRecoveryReasonAsString(reason));
+        Log.e(TAG, "Triggering recovery for reason: " + REASON_STRINGS[reason]);
         if (reason == REASON_WIFINATIVE_FAILURE) {
             int maxRecoveriesPerHour = mContext.getResources().getInteger(
                     R.integer.config_wifiMaxNativeFailureSelfRecoveryPerHour);
             if (maxRecoveriesPerHour == 0) {
                 Log.e(TAG, "Recovery disabled. Disabling wifi");
                 mActiveModeWarden.recoveryDisableWifi();
-                mRecoveryState = STATE_DISABLE_WIFI;
                 return;
             }
             trimPastRestartTimes();
@@ -202,17 +149,16 @@
                 Log.e(TAG, "Already restarted wifi " + maxRecoveriesPerHour + " times in"
                         + " last 1 hour. Disabling wifi");
                 mActiveModeWarden.recoveryDisableWifi();
-                mRecoveryState = STATE_DISABLE_WIFI;
                 return;
             }
             mPastRestartTimes.add(mClock.getElapsedSinceBootMillis());
         }
 
         mSelfRecoveryReason = reason;
-        mRecoveryState = STATE_RESTART_WIFI;
+        mDidWeTriggerSelfRecovery = true;
         if (!mWifiNative.startSubsystemRestart()) {
             // HAL call failed, fallback to internal flow.
-            mSubsystemRestartListener.onSubsystemRestart(reason);
+            mSubsystemRestartListener.onSubsystemRestart();
         }
     }
 
diff --git a/service/java/com/android/server/wifi/SimRequiredNotifier.java b/service/java/com/android/server/wifi/SimRequiredNotifier.java
index 4c4aba5..69fe4c3 100644
--- a/service/java/com/android/server/wifi/SimRequiredNotifier.java
+++ b/service/java/com/android/server/wifi/SimRequiredNotifier.java
@@ -21,7 +21,6 @@
 import android.content.Intent;
 import android.graphics.drawable.Icon;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.provider.Settings;
 
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
diff --git a/service/java/com/android/server/wifi/SoftApBackupRestore.java b/service/java/com/android/server/wifi/SoftApBackupRestore.java
index 135afd0..59fbf46 100644
--- a/service/java/com/android/server/wifi/SoftApBackupRestore.java
+++ b/service/java/com/android/server/wifi/SoftApBackupRestore.java
@@ -16,7 +16,6 @@
 
 package com.android.server.wifi;
 
-import android.compat.Compatibility;
 import android.content.Context;
 import android.net.MacAddress;
 import android.net.wifi.SoftApConfiguration;
@@ -25,24 +24,16 @@
 import android.util.BackupUtils;
 import android.util.Log;
 import android.util.SparseIntArray;
-import android.util.Xml;
 
-import com.android.internal.util.FastXmlSerializer;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.util.ApConfigUtil;
 import com.android.server.wifi.util.SettingsMigrationDataHolder;
-import com.android.server.wifi.util.XmlUtil;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-import org.xmlpull.v1.XmlSerializer;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
-import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -61,14 +52,8 @@
     /**
      * Current backup data version.
      */
-    // Starting from SoftAp data backup version 9, framework support to back up configuration
-    // in XML format. This allows to restore the SoftAp configuration when the user downgrades
-    // the Android version. (From Any version >= 9 to version#9)
-    private static final int SUPPORTED_SAP_BACKUP_XML_DATA_VERSION = 9;
-    private static final int LAST_SAP_BACKUP_DATA_VERSION_IN_S = 8;
+    private static final int CURRENT_SAP_BACKUP_DATA_VERSION = 8;
     private static final int LAST_SAP_BACKUP_DATA_VERSION_IN_R = 7;
-    private static final String XML_TAG_DOCUMENT_HEADER = "SoftApBackupData";
-
 
     private static final int ETHER_ADDR_LEN = 6; // Byte array size of MacAddress
 
@@ -93,57 +78,44 @@
             Log.e(TAG, "Invalid configuration received");
             return new byte[0];
         }
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
         try {
-            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            final DataOutputStream out = new DataOutputStream(baos);
-            if (SdkLevel.isAtLeastT()) {
-                out.writeInt(SUPPORTED_SAP_BACKUP_XML_DATA_VERSION);
-                final XmlSerializer xmlOut = new FastXmlSerializer();
-                xmlOut.setOutput(baos, StandardCharsets.UTF_8.name());
-                XmlUtil.writeDocumentStart(xmlOut, XML_TAG_DOCUMENT_HEADER);
-
-                // Start writing the XML stream.
-                XmlUtil.SoftApConfigurationXmlUtil.writeSoftApConfigurationToXml(xmlOut, config);
-
-                XmlUtil.writeDocumentEnd(xmlOut, XML_TAG_DOCUMENT_HEADER);
-
+            DataOutputStream out = new DataOutputStream(baos);
+            if (SdkLevel.isAtLeastS()) {
+                out.writeInt(CURRENT_SAP_BACKUP_DATA_VERSION);
             } else {
-                if (SdkLevel.isAtLeastS()) {
-                    out.writeInt(LAST_SAP_BACKUP_DATA_VERSION_IN_S);
-                } else {
-                    out.writeInt(LAST_SAP_BACKUP_DATA_VERSION_IN_R);
-                }
-                BackupUtils.writeString(out, config.getSsid());
-                out.writeInt(config.getBand());
-                out.writeInt(config.getChannel());
-                BackupUtils.writeString(out, config.getPassphrase());
-                out.writeInt(config.getSecurityType());
-                out.writeBoolean(config.isHiddenSsid());
-                out.writeInt(config.getMaxNumberOfClients());
-                out.writeLong(config.getShutdownTimeoutMillis());
-                out.writeBoolean(config.isClientControlByUserEnabled());
-                writeMacAddressList(out, config.getBlockedClientList());
-                writeMacAddressList(out, config.getAllowedClientList());
-                out.writeBoolean(config.isAutoShutdownEnabled());
-                if (SdkLevel.isAtLeastS()) {
-                    out.writeBoolean(config.isBridgedModeOpportunisticShutdownEnabled());
-                    out.writeInt(config.getMacRandomizationSetting());
-                    SparseIntArray channels = config.getChannels();
-                    int numOfChannels = channels.size();
-                    out.writeInt(numOfChannels);
-                    for (int i = 0; i < numOfChannels; i++) {
-                        out.writeInt(channels.keyAt(i));
-                        out.writeInt(channels.valueAt(i));
-                    }
-                    out.writeBoolean(config.isIeee80211axEnabled());
-                }
+                out.writeInt(LAST_SAP_BACKUP_DATA_VERSION_IN_R);
             }
-            return baos.toByteArray();
-        } catch (IOException | XmlPullParserException e) {
-            Log.e(TAG, "Error retrieving the backup data from SoftApConfiguration: " +  config
-                    + ", exception " + e);
+            BackupUtils.writeString(out, config.getSsid());
+            out.writeInt(config.getBand());
+            out.writeInt(config.getChannel());
+            BackupUtils.writeString(out, config.getPassphrase());
+            out.writeInt(config.getSecurityType());
+            out.writeBoolean(config.isHiddenSsid());
+            out.writeInt(config.getMaxNumberOfClients());
+            out.writeLong(config.getShutdownTimeoutMillis());
+            out.writeBoolean(config.isClientControlByUserEnabled());
+            writeMacAddressList(out, config.getBlockedClientList());
+            writeMacAddressList(out, config.getAllowedClientList());
+            out.writeBoolean(config.isAutoShutdownEnabled());
+            if (SdkLevel.isAtLeastS()) {
+                out.writeBoolean(config.isBridgedModeOpportunisticShutdownEnabled());
+                out.writeInt(config.getMacRandomizationSetting());
+                SparseIntArray channels = config.getChannels();
+                int numOfChannels = channels.size();
+                out.writeInt(numOfChannels);
+                for (int i = 0; i < numOfChannels; i++) {
+                    out.writeInt(channels.keyAt(i));
+                    out.writeInt(channels.valueAt(i));
+                }
+                out.writeBoolean(config.isIeee80211axEnabled());
+            }
+
+        } catch (IOException io) {
+            Log.e(TAG, "Invalid configuration received, IOException " + io);
+            return new byte[0];
         }
-        return new byte[0];
+        return baos.toByteArray();
     }
 
     /**
@@ -161,26 +133,12 @@
         try {
             DataInputStream in = new DataInputStream(new ByteArrayInputStream(data));
             int version = in.readInt();
-            // Starting from T, frameworks support to downgrade restore configuration.
-            if ((!SdkLevel.isAtLeastT() && version > LAST_SAP_BACKUP_DATA_VERSION_IN_S)
-                    || version < 1) {
+            if (version < 1 || version > CURRENT_SAP_BACKUP_DATA_VERSION) {
                 throw new BackupUtils.BadVersionException("Unknown Backup Serialization Version");
             }
 
             if (version == 1) return null; // Version 1 is a bad dataset.
-            Log.i(TAG, "The backed-up version is " + version);
 
-            if (version >= SUPPORTED_SAP_BACKUP_XML_DATA_VERSION) {
-                final XmlPullParser xmlIn = Xml.newPullParser();
-                ByteArrayInputStream inputStream = new ByteArrayInputStream(data);
-                // The first 4 bytes are designed to store version
-                inputStream.skip(Integer.BYTES);
-                xmlIn.setInput(inputStream, StandardCharsets.UTF_8.name());
-                XmlUtil.gotoDocumentStart(xmlIn, XML_TAG_DOCUMENT_HEADER);
-                int rootTagDepth = xmlIn.getDepth();
-                return XmlUtil.SoftApConfigurationXmlUtil
-                        .parseFromXml(xmlIn, rootTagDepth, mSettingsMigrationDataHolder);
-            }
             configBuilder.setSsid(BackupUtils.readString(in));
 
             int band;
@@ -190,6 +148,7 @@
                 band = in.readInt();
             }
             int channel = in.readInt();
+
             if (channel == 0) {
                 configBuilder.setBand(band);
             } else {
@@ -207,17 +166,11 @@
             }
             if (version >= 5) {
                 configBuilder.setMaxNumberOfClients(in.readInt());
-                long shutDownMillis;
                 if (version >= 7) {
-                    shutDownMillis = in.readLong();
+                    configBuilder.setShutdownTimeoutMillis(in.readLong());
                 } else {
-                    shutDownMillis = Long.valueOf(in.readInt());
+                    configBuilder.setShutdownTimeoutMillis(Long.valueOf(in.readInt()));
                 }
-                if (shutDownMillis == 0 && Compatibility.isChangeEnabled(
-                        SoftApConfiguration.REMOVE_ZERO_FOR_TIMEOUT_SETTING)) {
-                    shutDownMillis = SoftApConfiguration.DEFAULT_TIMEOUT;
-                }
-                configBuilder.setShutdownTimeoutMillis(shutDownMillis);
                 configBuilder.setClientControlByUserEnabled(in.readBoolean());
                 int numberOfBlockedClient = in.readInt();
                 List<MacAddress> blockedList = new ArrayList<>(
@@ -251,12 +204,17 @@
                 configBuilder.setChannels(channels);
                 configBuilder.setIeee80211axEnabled(in.readBoolean());
             }
-            return configBuilder.build();
-        } catch (IOException | BackupUtils.BadVersionException
-                | IllegalArgumentException | XmlPullParserException e) {
-            Log.e(TAG, "Invalid backup data received, Exception: " + e);
+        } catch (IOException io) {
+            Log.e(TAG, "Invalid backup data received, IOException: " + io);
+            return null;
+        } catch (BackupUtils.BadVersionException badVersion) {
+            Log.e(TAG, "Invalid backup data received, BadVersionException: " + badVersion);
+            return null;
+        } catch (IllegalArgumentException ie) {
+            Log.e(TAG, "Invalid backup data received, IllegalArgumentException " + ie);
+            return null;
         }
-        return null;
+        return configBuilder.build();
     }
 
     private void writeMacAddressList(DataOutputStream out, List<MacAddress> macList)
diff --git a/service/java/com/android/server/wifi/SoftApManager.java b/service/java/com/android/server/wifi/SoftApManager.java
index a15ebae..6bd81be 100644
--- a/service/java/com/android/server/wifi/SoftApManager.java
+++ b/service/java/com/android/server/wifi/SoftApManager.java
@@ -25,11 +25,7 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.compat.Compatibility;
-import android.content.BroadcastReceiver;
-import android.content.Context;
 import android.content.Intent;
-import android.content.IntentFilter;
 import android.net.MacAddress;
 import android.net.wifi.ScanResult;
 import android.net.wifi.SoftApCapability;
@@ -37,11 +33,8 @@
 import android.net.wifi.SoftApInfo;
 import android.net.wifi.WifiAnnotations;
 import android.net.wifi.WifiClient;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
-import android.net.wifi.WifiSsid;
-import android.os.BatteryManager;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
@@ -59,7 +52,7 @@
 import com.android.internal.util.WakeupMessage;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.WifiNative.InterfaceCallback;
-import com.android.server.wifi.WifiNative.SoftApHalCallback;
+import com.android.server.wifi.WifiNative.SoftApListener;
 import com.android.server.wifi.coex.CoexManager;
 import com.android.server.wifi.coex.CoexManager.CoexListener;
 import com.android.server.wifi.util.ApConfigUtil;
@@ -69,6 +62,7 @@
 import java.io.PrintWriter;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -77,7 +71,6 @@
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
-import java.util.stream.Collectors;
 
 /**
  * Manage WiFi in AP mode.
@@ -88,7 +81,12 @@
 
     @VisibleForTesting
     public static final String SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG = TAG
-            + " Soft AP Send Message Timeout on ";
+            + " Soft AP Send Message Timeout";
+    @VisibleForTesting
+    public static final String SOFT_AP_SEND_MESSAGE_IDLE_IN_BRIDGED_MODE_TIMEOUT_TAG = TAG
+            + " Soft AP Send Message Bridged Mode Idle Timeout";
+
+
     private final WifiContext mContext;
     private final FrameworkFacade mFrameworkFacade;
     private final WifiNative mWifiNative;
@@ -97,7 +95,6 @@
     private final ClientModeImplMonitor mCmiMonitor;
     private final ActiveModeWarden mActiveModeWarden;
     private final SoftApNotifier mSoftApNotifier;
-    private final BatteryManager mBatteryManager;
 
     @VisibleForTesting
     static final long SOFT_AP_PENDING_DISCONNECTION_CHECK_DELAY_MS = 1000;
@@ -164,8 +161,6 @@
 
     private long mDefaultShutdownIdleInstanceInBridgedModeTimeoutMillis;
 
-    private final boolean mIsDisableShutDownBridgedModeIdleInstanceTimerWhenCharging;
-
     private static final SimpleDateFormat FORMATTER = new SimpleDateFormat("MM-dd HH:mm:ss.SSS");
 
     private WifiDiagnostics mWifiDiagnostics;
@@ -186,40 +181,24 @@
     @NonNull
     private Set<Integer> mSafeChannelFrequencyList = new HashSet<>();
 
-    private boolean mIsCharging = false;
-
-    /**
-     * A map stores shutdown timeouts for each Soft Ap instance.
-     * There are three timeout messages now.
-     * 1. <mApInterfaceName, timeout> which uses to monitor whole Soft AP interface.
-     * It works on single AP mode and bridged AP mode.
-     *
-     * 2. <instance_lower_band, timeout> which is used to shutdown the AP when there are no
-     * connected devices. It is scheduled only in bridged mode to move dual mode AP to single
-     * mode AP in lower band.
-     *
-     * 3. <instance_higher_band, timeout> which is used to shutdown the AP when there are no
-     * connected devices. It is scheduled only in bridged mode to move dual mode AP to single
-     * mode AP in higher band.
-     */
     @VisibleForTesting
-    public Map<String, WakeupMessage> mSoftApTimeoutMessageMap = new HashMap<>();
+    public WakeupMessage mSoftApTimeoutMessage;
+    @VisibleForTesting
+    public WakeupMessage mSoftApBridgedModeIdleInstanceTimeoutMessage;
+
+    // Internal flag which is used to avoid the timer re-schedule.
+    private boolean mIsBridgedModeIdleInstanceTimerActive = false;
 
     /**
      * Listener for soft AP events.
      */
-    private final SoftApHalCallback mSoftApHalCallback = new SoftApHalCallback() {
+    private final SoftApListener mSoftApListener = new SoftApListener() {
         @Override
         public void onFailure() {
             mStateMachine.sendMessage(SoftApStateMachine.CMD_FAILURE);
         }
 
         @Override
-        public void onInstanceFailure(String instanceName) {
-            mStateMachine.sendMessage(SoftApStateMachine.CMD_FAILURE, instanceName);
-        }
-
-        @Override
         public void onInfoChanged(String apIfaceInstance, int frequency,
                 @WifiAnnotations.Bandwidth int bandwidth,
                 @WifiAnnotations.WifiStandard int generation,
@@ -251,8 +230,15 @@
         }
     };
 
-    // This will only be null if SdkLevel is not at least S
-    @Nullable private final CoexListener mCoexListener;
+    private final CoexListener mCoexListener = new CoexListener() {
+        @Override
+        public void onCoexUnsafeChannelsChanged() {
+            if (mCurrentSoftApConfiguration == null) {
+                return;
+            }
+            mStateMachine.sendMessage(SoftApStateMachine.CMD_SAFE_CHANNEL_FREQUENCY_CHANGED);
+        }
+    };
 
     private void updateSafeChannelFrequencyList() {
         if (!SdkLevel.isAtLeastS() || mCurrentSoftApConfiguration == null) {
@@ -274,10 +260,7 @@
             mSafeChannelFrequencyList.removeAll(
                     ApConfigUtil.getUnsafeChannelFreqsFromCoex(mCoexManager));
         }
-        if (isBridgedMode() && mCurrentSoftApInfoMap.size() == 2) {
-            // Logging only for bridged use case since it only used to fallback to single AP mode.
-            Log.d(getTag(), "SafeChannelFrequencyList = " + mSafeChannelFrequencyList);
-        }
+        Log.d(getTag(), "SafeChannelFrequencyList = " + mSafeChannelFrequencyList);
     }
 
     private void configureInternalConfiguration() {
@@ -298,21 +281,13 @@
         /**
          * update configurations only which mentioned in WifiManager#setSoftApConfiguration
          */
-        long newShutdownTimeoutMillis = newConfig.getShutdownTimeoutMillis();
-        // Compatibility check is used for unit test only since the SoftApManager is created by
-        // the unit test thread (not the system_server) when running unit test. In other cases,
-        // the SoftApManager would run in system server(i.e. always bypasses the app compat check).
-        if (Compatibility.isChangeEnabled(SoftApConfiguration.REMOVE_ZERO_FOR_TIMEOUT_SETTING)
-                && newShutdownTimeoutMillis == 0) {
-            newShutdownTimeoutMillis = SoftApConfiguration.DEFAULT_TIMEOUT;
-        }
         SoftApConfiguration.Builder newConfigurBuilder =
                 new SoftApConfiguration.Builder(mCurrentSoftApConfiguration)
                 .setAllowedClientList(newConfig.getAllowedClientList())
                 .setBlockedClientList(newConfig.getBlockedClientList())
                 .setClientControlByUserEnabled(newConfig.isClientControlByUserEnabled())
                 .setMaxNumberOfClients(newConfig.getMaxNumberOfClients())
-                .setShutdownTimeoutMillis(newShutdownTimeoutMillis)
+                .setShutdownTimeoutMillis(newConfig.getShutdownTimeoutMillis())
                 .setAutoShutdownEnabled(newConfig.isAutoShutdownEnabled());
         if (SdkLevel.isAtLeastS()) {
             newConfigurBuilder.setBridgedModeOpportunisticShutdownEnabled(
@@ -328,7 +303,6 @@
             @NonNull FrameworkFacade framework,
             @NonNull WifiNative wifiNative,
             @NonNull CoexManager coexManager,
-            @NonNull BatteryManager batteryManager,
             String countryCode,
             @NonNull Listener<SoftApManager> listener,
             @NonNull WifiServiceImpl.SoftApCallbackInternal callback,
@@ -349,21 +323,6 @@
         mSoftApNotifier = softApNotifier;
         mWifiNative = wifiNative;
         mCoexManager = coexManager;
-        mBatteryManager = batteryManager;
-        if (SdkLevel.isAtLeastS()) {
-            mCoexListener = new CoexListener() {
-                @Override
-                public void onCoexUnsafeChannelsChanged() {
-                    if (mCurrentSoftApConfiguration == null) {
-                        return;
-                    }
-                    mStateMachine.sendMessage(
-                            SoftApStateMachine.CMD_SAFE_CHANNEL_FREQUENCY_CHANGED);
-                }
-            };
-        } else {
-            mCoexListener = null;
-        }
         mCountryCode = countryCode;
         mModeListener = listener;
         mSoftApCallback = callback;
@@ -396,10 +355,6 @@
         mDefaultShutdownIdleInstanceInBridgedModeTimeoutMillis = mContext.getResources().getInteger(
                 R.integer
                 .config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond);
-
-        mIsDisableShutDownBridgedModeIdleInstanceTimerWhenCharging = mContext.getResources()
-                .getBoolean(R.bool
-                .config_wifiFrameworkSoftApDisableBridgedModeShutdownIdleInstanceWhenCharging);
         mCmiMonitor = cmiMonitor;
         mActiveModeWarden = activeModeWarden;
         mCmiMonitor.registerListener(new ClientModeImplListener() {
@@ -433,19 +388,9 @@
         mStateMachine.sendMessage(SoftApStateMachine.CMD_STOP);
     }
 
-    private boolean isOweTransition() {
-        return (SdkLevel.isAtLeastT() && mCurrentSoftApConfiguration != null
-                && mCurrentSoftApConfiguration.getSecurityType()
-                        == SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION);
-    }
-
     private boolean isBridgedMode() {
         return (SdkLevel.isAtLeastS() && mCurrentSoftApConfiguration != null
-                && (mCurrentSoftApConfiguration.getBands().length > 1));
-    }
-
-    private boolean isBridgeRequired() {
-        return isBridgedMode() || isOweTransition();
+                && mCurrentSoftApConfiguration.getBands().length > 1);
     }
 
     private long getShutdownTimeoutMillis() {
@@ -453,30 +398,6 @@
         return timeout > 0 ? timeout : mDefaultShutdownTimeoutMillis;
     }
 
-    private long getShutdownIdleInstanceInBridgedModeTimeoutMillis() {
-        long timeout = mCurrentSoftApConfiguration
-                .getBridgedModeOpportunisticShutdownTimeoutMillisInternal();
-        return timeout > 0 ? timeout : mDefaultShutdownIdleInstanceInBridgedModeTimeoutMillis;
-    }
-
-    private String getHighestFrequencyInstance(Set<String> candidateInstances) {
-        int currentHighestFrequencyOnAP = 0;
-        String highestFrequencyInstance = null;
-        for (String instance : candidateInstances) {
-            SoftApInfo info = mCurrentSoftApInfoMap.get(instance);
-            if (info == null) {
-                Log.wtf(getTag(), "Invalid instance name, no way to get the frequency");
-                return "";
-            }
-            int frequencyOnInstance = info.getFrequency();
-            if (frequencyOnInstance > currentHighestFrequencyOnAP) {
-                currentHighestFrequencyOnAP = frequencyOnInstance;
-                highestFrequencyInstance = instance;
-            }
-        }
-        return highestFrequencyInstance;
-    }
-
     @Override
     @Nullable public SoftApRole getRole() {
         return mRole;
@@ -537,17 +458,6 @@
     }
 
     /**
-     * Retrieve the name of the Bridged AP iface instance to remove for a downgrade, or null if a
-     * downgrade is not possible.
-     */
-    public String getBridgedApDowngradeIfaceInstanceForRemoval() {
-        if (mCurrentSoftApInfoMap.size() <= 1) {
-            return null;
-        }
-        return getHighestFrequencyInstance(mCurrentSoftApInfoMap.keySet());
-    }
-
-    /**
      * Dump info about this softap manager.
      */
     @Override
@@ -561,17 +471,16 @@
         pw.println("mSoftApCountryCode: " + mCountryCode);
         pw.println("mOriginalModeConfiguration.targetMode: "
                 + mOriginalModeConfiguration.getTargetMode());
-        pw.println("mCurrentSoftApConfiguration: " + mCurrentSoftApConfiguration);
-        pw.println("mCurrentSoftApCapability: " + mCurrentSoftApCapability);
+        pw.println("mCurrentSoftApConfiguration.SSID: " + mCurrentSoftApConfiguration.getSsid());
+        pw.println("mCurrentSoftApConfiguration.mBand: " + mCurrentSoftApConfiguration.getBand());
+        pw.println("mCurrentSoftApConfiguration.hiddenSSID: "
+                + mCurrentSoftApConfiguration.isHiddenSsid());
         pw.println("getConnectedClientList().size(): " + getConnectedClientList().size());
         pw.println("mTimeoutEnabled: " + mTimeoutEnabled);
         pw.println("mBridgedModeOpportunisticsShutdownTimeoutEnabled: "
                 + mBridgedModeOpportunisticsShutdownTimeoutEnabled);
         pw.println("mCurrentSoftApInfoMap " + mCurrentSoftApInfoMap);
         pw.println("mStartTimestamp: " + mStartTimestamp);
-        pw.println("mSafeChannelFrequencyList: " + mSafeChannelFrequencyList.stream()
-                .map(Object::toString)
-                .collect(Collectors.joining(",")));
         mStateMachine.dump(fd, pw, args);
     }
 
@@ -633,8 +542,7 @@
 
         intent.putExtra(WifiManager.EXTRA_WIFI_AP_INTERFACE_NAME, mApInterfaceName);
         intent.putExtra(WifiManager.EXTRA_WIFI_AP_MODE, mOriginalModeConfiguration.getTargetMode());
-        mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
-                android.Manifest.permission.ACCESS_WIFI_STATE);
+        mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
     }
 
     private int setMacAddress() {
@@ -682,10 +590,9 @@
     private int setCountryCode() {
         int band = mCurrentSoftApConfiguration.getBand();
         if (TextUtils.isEmpty(mCountryCode)) {
-            if (band == SoftApConfiguration.BAND_5GHZ || band == SoftApConfiguration.BAND_6GHZ) {
-                // Country code is mandatory for 5GHz/6GHz band.
-                Log.e(getTag(), "Invalid country code, "
-                        + "required for setting up soft ap in band:" + band);
+            if (band == SoftApConfiguration.BAND_5GHZ) {
+                // Country code is mandatory for 5GHz band.
+                Log.e(getTag(), "Invalid country code, required for setting up soft ap in 5GHz");
                 return ERROR_GENERIC;
             }
             // Absence of country code is not fatal for 2Ghz & Any band options.
@@ -693,11 +600,11 @@
         }
         if (!mWifiNative.setApCountryCode(
                 mApInterfaceName, mCountryCode.toUpperCase(Locale.ROOT))) {
-            if (band == SoftApConfiguration.BAND_5GHZ || band == SoftApConfiguration.BAND_6GHZ) {
+            if (band == SoftApConfiguration.BAND_5GHZ) {
                 // Return an error if failed to set country code when AP is configured for
-                // 5GHz/6GHz band.
+                // 5GHz band.
                 Log.e(getTag(), "Failed to set country code, "
-                        + "required for setting up soft ap in band: " + band);
+                        + "required for setting up soft ap in 5GHz");
                 return ERROR_GENERIC;
             }
             // Failure to set country code is not fatal for other band options.
@@ -711,8 +618,8 @@
      * @return integer result code
      */
     private int startSoftAp() {
-        Log.d(getTag(), "startSoftAp: band " + mCurrentSoftApConfiguration.getBand()
-                + " iface " + mApInterfaceName + " country " + mCountryCode);
+        Log.d(getTag(), "band " + mCurrentSoftApConfiguration.getBand() + " iface "
+                + mApInterfaceName + " country " + mCountryCode);
 
         int result = setMacAddress();
         if (result != SUCCESS) {
@@ -728,9 +635,12 @@
         SoftApConfiguration.Builder localConfigBuilder =
                 new SoftApConfiguration.Builder(mCurrentSoftApConfiguration);
 
+        boolean acsEnabled = mCurrentSoftApCapability.areFeaturesSupported(
+                SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD);
+
         result = ApConfigUtil.updateApChannelConfig(
                 mWifiNative, mCoexManager, mContext.getResources(), mCountryCode,
-                localConfigBuilder, mCurrentSoftApConfiguration, mCurrentSoftApCapability);
+                localConfigBuilder, mCurrentSoftApConfiguration, acsEnabled);
         if (result != SUCCESS) {
             Log.e(getTag(), "Failed to update AP band and channel");
             return result;
@@ -750,7 +660,7 @@
         if (!mWifiNative.startSoftAp(mApInterfaceName,
                   localConfigBuilder.build(),
                   mOriginalModeConfiguration.getTargetMode() ==  WifiManager.IFACE_IP_MODE_TETHERED,
-                  mSoftApHalCallback)) {
+                  mSoftApListener)) {
             Log.e(getTag(), "Soft AP start failed");
             return ERROR_GENERIC;
         }
@@ -874,7 +784,6 @@
         public static final int CMD_SAFE_CHANNEL_FREQUENCY_CHANGED = 14;
         public static final int CMD_HANDLE_WIFI_CONNECTED = 15;
         public static final int CMD_UPDATE_COUNTRY_CODE = 16;
-        public static final int CMD_CHARGING_STATE_CHANGED = 17;
 
         private final State mIdleState = new IdleState();
         private final State mStartedState = new StartedState();
@@ -935,9 +844,8 @@
                         break;
                     case CMD_START:
                         mRequestorWs = (WorkSource) message.obj;
-                        WifiSsid wifiSsid = mCurrentSoftApConfiguration != null
-                                ? mCurrentSoftApConfiguration.getWifiSsid() : null;
-                        if (wifiSsid == null || wifiSsid.getBytes().length == 0) {
+                        if (mCurrentSoftApConfiguration == null
+                                || mCurrentSoftApConfiguration.getSsid() == null) {
                             Log.e(getTag(), "Unable to start soft AP without valid configuration");
                             updateApState(WifiManager.WIFI_AP_STATE_FAILED,
                                     WifiManager.WIFI_AP_STATE_DISABLED,
@@ -978,34 +886,15 @@
                                     isFallbackToSingleAp = true;
                                 }
                             }
-                            if (mWifiNative.isSoftApInstanceDiedHandlerSupported()
-                                    && !TextUtils.equals(mCountryCode,
-                                      mCurrentSoftApCapability.getCountryCode())) {
-                                Log.i(getTag(), "CountryCode changed, bypass the supported band"
-                                        + "capability check, mCountryCode = " + mCountryCode
-                                        + ", base country in SoftApCapability = "
-                                        + mCurrentSoftApCapability.getCountryCode());
-                            } else {
-                                for (int configuredBand : mCurrentSoftApConfiguration.getBands()) {
-                                    int availableBand = ApConfigUtil.removeUnavailableBands(
-                                            mCurrentSoftApCapability,
-                                            configuredBand, mCoexManager);
-                                    if (configuredBand != availableBand) {
-                                        isFallbackToSingleAp = true;
-                                    }
-                                    newSingleApBand |= availableBand;
+
+                            for (int configuredBand : mCurrentSoftApConfiguration.getBands()) {
+                                int availableBand = ApConfigUtil.removeUnavailableBands(
+                                        mCurrentSoftApCapability,
+                                        configuredBand, mCoexManager);
+                                if (configuredBand != availableBand) {
+                                    isFallbackToSingleAp = true;
                                 }
-                            }
-                            // Fall back to Single AP if it's not possible to create a Bridged AP.
-                            if (!mWifiNative.isItPossibleToCreateBridgedApIface(mRequestorWs)) {
-                                isFallbackToSingleAp = true;
-                            }
-                            // Fall back to single AP if creating a single AP does not require
-                            // destroying an existing iface, but creating a bridged AP does.
-                            if (mWifiNative.shouldDowngradeToSingleApForConcurrency(mRequestorWs)) {
-                                Log.d(getTag(), "Creating bridged AP will destroy an existing"
-                                        + " iface, but single AP will not.");
-                                isFallbackToSingleAp = true;
+                                newSingleApBand |= availableBand;
                             }
                             if (isFallbackToSingleAp) {
                                 newSingleApBand = ApConfigUtil.append24GToBandIf24GSupported(
@@ -1018,17 +907,9 @@
                                         .build();
                             }
                         }
-
-                        // Remove 6GHz from requested bands if security type is restricted
-                        // Note: 6GHz only band is already handled by initial validation
-                        mCurrentSoftApConfiguration =
-                                ApConfigUtil.remove6gBandForUnsupportedSecurity(
-                                    mCurrentSoftApConfiguration);
-
                         mApInterfaceName = mWifiNative.setupInterfaceForSoftApMode(
                                 mWifiNativeInterfaceCallback, mRequestorWs,
-                                mCurrentSoftApConfiguration.getBand(), isBridgeRequired(),
-                                SoftApManager.this);
+                                mCurrentSoftApConfiguration.getBand(), isBridgedMode());
                         if (TextUtils.isEmpty(mApInterfaceName)) {
                             Log.e(getTag(), "setup failure when creating ap interface.");
                             updateApState(WifiManager.WIFI_AP_STATE_FAILED,
@@ -1062,9 +943,13 @@
                         transitionTo(mStartedState);
                         break;
                     case CMD_UPDATE_CAPABILITY:
-                        SoftApCapability capability = (SoftApCapability) message.obj;
-                        mCurrentSoftApCapability = new SoftApCapability(capability);
-                        updateSafeChannelFrequencyList();
+                        // Capability should only changed by carrier requirement. Only apply to
+                        // Tether Mode
+                        if (mOriginalModeConfiguration.getTargetMode()
+                                ==  WifiManager.IFACE_IP_MODE_TETHERED) {
+                            SoftApCapability capability = (SoftApCapability) message.obj;
+                            mCurrentSoftApCapability = new SoftApCapability(capability);
+                        }
                         break;
                     case CMD_UPDATE_CONFIG:
                         SoftApConfiguration newConfig = (SoftApConfiguration) message.obj;
@@ -1089,54 +974,55 @@
         }
 
         private class StartedState extends State {
-            BroadcastReceiver mBatteryChargingReceiver = new BroadcastReceiver() {
-                @Override
-                public void onReceive(Context context, Intent intent) {
-                    String action = intent.getAction();
-                    if (action.equals(Intent.ACTION_POWER_CONNECTED)) {
-                        sendMessage(CMD_CHARGING_STATE_CHANGED, 1);
-                    } else if (action.equals(Intent.ACTION_POWER_DISCONNECTED)) {
-                        sendMessage(CMD_CHARGING_STATE_CHANGED, 0);
-                    }
-                }
-            };
-
-            /**
-             * Schedule timeout message depends on Soft Ap instance
-             *
-             * @param changedInstance the schedule should change on specific instance only.
-             *                        If changedInstance is mApInterfaceName, it means that
-             *                        we need to reschedule all of timeout message.
-             */
-            private void rescheduleTimeoutMessages(@NonNull String changedInstance) {
+            private void scheduleTimeoutMessages() {
+                // When SAP started, the mCurrentSoftApInfoMap is 0 because info does not update.
                 // Don't trigger bridged mode shutdown timeout when only one active instance
                 // In Dual AP, one instance may already be closed due to LTE coexistence or DFS
                 // restrictions or due to inactivity. i.e. mCurrentSoftApInfoMap.size() is 1)
-                if (isBridgedMode() &&  mCurrentSoftApInfoMap.size() == 2) {
-                    if (TextUtils.equals(mApInterfaceName, changedInstance)) {
-                        Set<String> instances = mCurrentSoftApInfoMap.keySet();
-                        String lowerFrequencyInstance = null;
-                        String HighestFrequencyInstance = getHighestFrequencyInstance(instances);
-                        // Schedule bridged mode timeout on all instances
-                        for (String instance : instances) {
-                            //  Make sure that we schedule the higher frequency instance first since
-                            //  the current shutdown design is shutdown higher band instance first
-                            //  when both of intstances are idle.
-                            if (TextUtils.equals(instance, HighestFrequencyInstance)) {
-                                rescheduleTimeoutMessageIfNeeded(instance);
-                            } else {
-                                lowerFrequencyInstance = instance;
-                            }
+                final int connectedClients = getConnectedClientList().size();
+                if (isBridgedMode() && mCurrentSoftApInfoMap.size() != 1) {
+                    if (mBridgedModeOpportunisticsShutdownTimeoutEnabled
+                            && (connectedClients == 0 || getIdleInstances().size() != 0)) {
+                        if (!mIsBridgedModeIdleInstanceTimerActive) {
+                            mSoftApBridgedModeIdleInstanceTimeoutMessage.schedule(SystemClock
+                                    .elapsedRealtime()
+                                    + mDefaultShutdownIdleInstanceInBridgedModeTimeoutMillis);
+                            mIsBridgedModeIdleInstanceTimerActive = true;
+                            Log.d(getTag(), "Bridged mode instance opportunistic timeout message"
+                                    + " scheduled, delay = "
+                                    + mDefaultShutdownIdleInstanceInBridgedModeTimeoutMillis);
                         }
-                        // Make sure that we schedule the lower frequency instance later.
-                        rescheduleTimeoutMessageIfNeeded(lowerFrequencyInstance);
                     } else {
-                        rescheduleTimeoutMessageIfNeeded(changedInstance);
+                        cancelBridgedModeIdleInstanceTimeoutMessage();
                     }
                 }
+                if (!mTimeoutEnabled || connectedClients != 0) {
+                    cancelTimeoutMessage();
+                    return;
+                }
+                long timeout = getShutdownTimeoutMillis();
+                mSoftApTimeoutMessage.schedule(SystemClock.elapsedRealtime()
+                        + timeout);
+                Log.d(getTag(), "Timeout message scheduled, delay = "
+                        + timeout);
+            }
 
-                // Always evaluate timeout schedule on tetheringInterface
-                rescheduleTimeoutMessageIfNeeded(mApInterfaceName);
+            private String getHighestFrequencyInstance(Set<String> candidateInstances) {
+                int currentHighestFrequencyOnAP = 0;
+                String highestFrequencyInstance = null;
+                for (String instance : candidateInstances) {
+                    SoftApInfo info = mCurrentSoftApInfoMap.get(instance);
+                    if (info == null) {
+                        Log.wtf(getTag(), "Invalid instance name, no way to get the frequency");
+                        return "";
+                    }
+                    int frequencyOnInstance = info.getFrequency();
+                    if (frequencyOnInstance > currentHighestFrequencyOnAP) {
+                        currentHighestFrequencyOnAP = frequencyOnInstance;
+                        highestFrequencyInstance = instance;
+                    }
+                }
+                return highestFrequencyInstance;
             }
 
             private void removeIfaceInstanceFromBridgedApIface(String instanceName) {
@@ -1154,48 +1040,26 @@
                 }
             }
 
-            /**
-             * Schedule the timeout message when timeout control is enabled and there is no client
-             * connect to the instance.
-             *
-             * @param instance The key of the {@code mSoftApTimeoutMessageMap},
-             *                 @see mSoftApTimeoutMessageMap for details.
-             */
-            private void rescheduleTimeoutMessageIfNeeded(String instance) {
-                final boolean isTetheringInterface =
-                        TextUtils.equals(mApInterfaceName, instance);
-                final boolean timeoutEnabled = isTetheringInterface ? mTimeoutEnabled
-                        : (mBridgedModeOpportunisticsShutdownTimeoutEnabled && !mIsCharging);
-                final int clientNumber = isTetheringInterface
-                        ? getConnectedClientList().size()
-                        : mConnectedClientWithApInfoMap.get(instance).size();
-                final long timeoutValue = isTetheringInterface
-                        ? getShutdownTimeoutMillis()
-                        : getShutdownIdleInstanceInBridgedModeTimeoutMillis();
-                Log.d(getTag(), "rescheduleTimeoutMessageIfNeeded " + instance + ", timeoutEnabled="
-                        + timeoutEnabled + ", isCharging" + mIsCharging + ", clientNumber="
-                        + clientNumber);
-                if (!timeoutEnabled || clientNumber != 0) {
-                    cancelTimeoutMessage(instance);
-                    return;
+            private Set<String> getIdleInstances() {
+                Set<String> idleInstances = new HashSet<String>();
+                for (String instance : mConnectedClientWithApInfoMap.keySet()) {
+                    if (mConnectedClientWithApInfoMap.getOrDefault(
+                            instance, Collections.emptyList()).size() == 0) {
+                        idleInstances.add(instance);
+                    }
                 }
-                scheduleTimeoutMessage(instance, timeoutValue);
+                return idleInstances;
             }
 
-            private void scheduleTimeoutMessage(String instance, long timeout) {
-                if (mSoftApTimeoutMessageMap.containsKey(instance)) {
-                    mSoftApTimeoutMessageMap.get(instance).schedule(
-                            SystemClock.elapsedRealtime() + timeout);
-                    Log.d(getTag(), "Timeout message scheduled, on " + instance + ", delay = "
-                            + timeout);
-                }
+            private void cancelTimeoutMessage() {
+                mSoftApTimeoutMessage.cancel();
+                Log.d(getTag(), "Timeout message canceled");
             }
 
-            private void cancelTimeoutMessage(String instance) {
-                if (mSoftApTimeoutMessageMap.containsKey(instance)) {
-                    mSoftApTimeoutMessageMap.get(instance).cancel();
-                    Log.d(getTag(), "Timeout message canceled on " + instance);
-                }
+            private void cancelBridgedModeIdleInstanceTimeoutMessage() {
+                mSoftApBridgedModeIdleInstanceTimeoutMessage.cancel();
+                mIsBridgedModeIdleInstanceTimerActive = false;
+                Log.d(getTag(), "Bridged mode idle instance timeout message canceled");
             }
 
             /**
@@ -1305,7 +1169,7 @@
 
                 if (mSoftApCallback != null) {
                     mSoftApCallback.onConnectedClientsOrInfoChanged(mCurrentSoftApInfoMap,
-                            mConnectedClientWithApInfoMap, isBridgeRequired());
+                            mConnectedClientWithApInfoMap, isBridgedMode());
                 } else {
                     Log.e(getTag(),
                             "SoftApCallback is null. Dropping ConnectedClientsChanged event.");
@@ -1317,7 +1181,7 @@
                         mOriginalModeConfiguration.getTargetMode(),
                         mCurrentSoftApInfoMap.get(apInstanceIdentifier));
 
-                rescheduleTimeoutMessages(apInstanceIdentifier);
+                scheduleTimeoutMessages();
             }
 
             /**
@@ -1330,7 +1194,7 @@
                     mCurrentSoftApInfoMap.clear();
                     mConnectedClientWithApInfoMap.clear();
                     mSoftApCallback.onConnectedClientsOrInfoChanged(mCurrentSoftApInfoMap,
-                            mConnectedClientWithApInfoMap, isBridgeRequired());
+                            mConnectedClientWithApInfoMap, isBridgedMode());
                     return;
                 }
                 String changedInstance = apInfo.getApInstanceIdentifier();
@@ -1339,16 +1203,15 @@
                         boolean isClientConnected =
                                 mConnectedClientWithApInfoMap.get(changedInstance).size() > 0;
                         mCurrentSoftApInfoMap.remove(changedInstance);
-                        mSoftApTimeoutMessageMap.remove(changedInstance);
                         mConnectedClientWithApInfoMap.remove(changedInstance);
                         mSoftApCallback.onConnectedClientsOrInfoChanged(mCurrentSoftApInfoMap,
-                                mConnectedClientWithApInfoMap, isBridgeRequired());
+                                mConnectedClientWithApInfoMap, isBridgedMode());
                         if (isClientConnected) {
                             mWifiMetrics.addSoftApNumAssociatedStationsChangedEvent(
                                     getConnectedClientList().size(), 0,
                                     mOriginalModeConfiguration.getTargetMode(), apInfo);
                         }
-                        if (isBridgeRequired()) {
+                        if (isBridgedMode()) {
                             mWifiMetrics.addSoftApInstanceDownEventInDualMode(
                                     mOriginalModeConfiguration.getTargetMode(), apInfo);
                         }
@@ -1365,33 +1228,16 @@
                             + " changed when client connected, it should NOT happen!!");
                 }
 
+                // Update the info when getting two infos in bridged mode.
+                // TODO: b/173999527. It may only one instance come up when starting bridged AP.
+                // Consider the handling with co-ex mechanism in bridged mode.
+                boolean waitForAnotherSoftApInfoInBridgedMode =
+                        isBridgedMode() && mCurrentSoftApInfoMap.size() == 0;
+
                 mCurrentSoftApInfoMap.put(changedInstance, new SoftApInfo(apInfo));
-                mSoftApCallback.onConnectedClientsOrInfoChanged(mCurrentSoftApInfoMap,
-                        mConnectedClientWithApInfoMap, isBridgeRequired());
-
-                boolean isNeedToScheduleTimeoutMessage = false;
-                if (!mSoftApTimeoutMessageMap.containsKey(mApInterfaceName)) {
-                    // First info update, create WakeupMessage for mApInterfaceName.
-                    mSoftApTimeoutMessageMap.put(mApInterfaceName, new WakeupMessage(
-                            mContext, mStateMachine.getHandler(),
-                            SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + mApInterfaceName,
-                            SoftApStateMachine.CMD_NO_ASSOCIATED_STATIONS_TIMEOUT));
-                    isNeedToScheduleTimeoutMessage = true;
-                }
-
-                if (isBridgedMode()
-                        && !mSoftApTimeoutMessageMap.containsKey(changedInstance)) {
-                    mSoftApTimeoutMessageMap.put(changedInstance,
-                            new WakeupMessage(mContext, mStateMachine.getHandler(),
-                            SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + changedInstance,
-                            SoftApStateMachine.CMD_NO_ASSOCIATED_STATIONS_TIMEOUT_ON_ONE_INSTANCE,
-                            0, 0, changedInstance));
-                    isNeedToScheduleTimeoutMessage = true;
-                }
-
-                // Trigger schedule after mCurrentSoftApInfoMap is updated.
-                if (isNeedToScheduleTimeoutMessage) {
-                    rescheduleTimeoutMessages(mApInterfaceName);
+                if (!waitForAnotherSoftApInfoInBridgedMode) {
+                    mSoftApCallback.onConnectedClientsOrInfoChanged(mCurrentSoftApInfoMap,
+                            mConnectedClientWithApInfoMap, isBridgedMode());
                 }
 
                 // ignore invalid freq and softap disable case for metrics
@@ -1399,7 +1245,7 @@
                         && apInfo.getBandwidth() != SoftApInfo.CHANNEL_WIDTH_INVALID) {
                     mWifiMetrics.addSoftApChannelSwitchedEvent(
                             new ArrayList<>(mCurrentSoftApInfoMap.values()),
-                            mOriginalModeConfiguration.getTargetMode(), isBridgeRequired());
+                            mOriginalModeConfiguration.getTargetMode(), isBridgedMode());
                     updateUserBandPreferenceViolationMetricsIfNeeded(apInfo);
                 }
             }
@@ -1420,7 +1266,7 @@
                     mConnectedClientWithApInfoMap.clear();
                     if (mSoftApCallback != null) {
                         mSoftApCallback.onConnectedClientsOrInfoChanged(mCurrentSoftApInfoMap,
-                                mConnectedClientWithApInfoMap, isBridgeRequired());
+                                mConnectedClientWithApInfoMap, isBridgedMode());
                     }
                 } else {
                     // the interface was up, but goes down
@@ -1428,12 +1274,12 @@
                 }
                 mWifiMetrics.addSoftApUpChangedEvent(isUp,
                         mOriginalModeConfiguration.getTargetMode(),
-                        mDefaultShutdownTimeoutMillis, isBridgeRequired());
+                        mDefaultShutdownTimeoutMillis, isBridgedMode());
                 if (isUp) {
                     mWifiMetrics.updateSoftApConfiguration(mCurrentSoftApConfiguration,
-                            mOriginalModeConfiguration.getTargetMode(), isBridgeRequired());
+                            mOriginalModeConfiguration.getTargetMode(), isBridgedMode());
                     mWifiMetrics.updateSoftApCapability(mCurrentSoftApCapability,
-                            mOriginalModeConfiguration.getTargetMode(), isBridgeRequired());
+                            mOriginalModeConfiguration.getTargetMode(), isBridgedMode());
                 }
             }
 
@@ -1444,21 +1290,22 @@
                 onUpChanged(mWifiNative.isInterfaceUp(mApInterfaceName));
 
                 Handler handler = mStateMachine.getHandler();
+                mSoftApTimeoutMessage = new WakeupMessage(mContext, handler,
+                        SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG,
+                        SoftApStateMachine.CMD_NO_ASSOCIATED_STATIONS_TIMEOUT);
+
+                mSoftApBridgedModeIdleInstanceTimeoutMessage = new WakeupMessage(mContext, handler,
+                        SOFT_AP_SEND_MESSAGE_IDLE_IN_BRIDGED_MODE_TIMEOUT_TAG,
+                        SoftApStateMachine.CMD_NO_ASSOCIATED_STATIONS_TIMEOUT_ON_ONE_INSTANCE);
                 if (SdkLevel.isAtLeastS()) {
                     mCoexManager.registerCoexListener(mCoexListener);
                 }
-                if (mIsDisableShutDownBridgedModeIdleInstanceTimerWhenCharging) {
-                    IntentFilter filter = new IntentFilter();
-                    filter.addAction(Intent.ACTION_POWER_CONNECTED);
-                    filter.addAction(Intent.ACTION_POWER_DISCONNECTED);
-                    mContext.registerReceiver(mBatteryChargingReceiver, filter);
-                    mIsCharging = mBatteryManager.isCharging();
-                }
                 mSarManager.setSapWifiState(WifiManager.WIFI_AP_STATE_ENABLED);
                 Log.d(getTag(), "Resetting connected clients on start");
                 mConnectedClientWithApInfoMap.clear();
                 mPendingDisconnectClients.clear();
                 mEverReportMetricsForMaxClient = false;
+                scheduleTimeoutMessages();
             }
 
             @Override
@@ -1482,22 +1329,18 @@
                     mConnectedClientWithApInfoMap.clear();
                     if (mSoftApCallback != null) {
                         mSoftApCallback.onConnectedClientsOrInfoChanged(mCurrentSoftApInfoMap,
-                                mConnectedClientWithApInfoMap, isBridgeRequired());
+                                mConnectedClientWithApInfoMap, isBridgedMode());
                     }
                 }
                 mPendingDisconnectClients.clear();
-                for (String key : mSoftApTimeoutMessageMap.keySet()) {
-                    cancelTimeoutMessage(key);
-                }
-                mSoftApTimeoutMessageMap.clear();
-                if (mIsDisableShutDownBridgedModeIdleInstanceTimerWhenCharging) {
-                    mContext.unregisterReceiver(mBatteryChargingReceiver);
-                }
+                cancelTimeoutMessage();
+                cancelBridgedModeIdleInstanceTimeoutMessage();
+
                 // Need this here since we are exiting |Started| state and won't handle any
                 // future CMD_INTERFACE_STATUS_CHANGED events after this point
                 mWifiMetrics.addSoftApUpChangedEvent(false,
                         mOriginalModeConfiguration.getTargetMode(),
-                        mDefaultShutdownTimeoutMillis, isBridgeRequired());
+                        mDefaultShutdownTimeoutMillis, isBridgedMode());
                 updateApState(WifiManager.WIFI_AP_STATE_DISABLED,
                         WifiManager.WIFI_AP_STATE_DISABLING, 0);
 
@@ -1512,7 +1355,7 @@
 
             private void updateUserBandPreferenceViolationMetricsIfNeeded(SoftApInfo apInfo) {
                 // The band preference violation only need to detect in single AP mode.
-                if (isBridgeRequired()) return;
+                if (isBridgedMode()) return;
                 int band = mCurrentSoftApConfiguration.getBand();
                 boolean bandPreferenceViolated =
                         (ScanResult.is24GHz(apInfo.getFrequency())
@@ -1600,10 +1443,9 @@
                         quitNow();
                         break;
                     case CMD_NO_ASSOCIATED_STATIONS_TIMEOUT_ON_ONE_INSTANCE:
-                        String idleInstance = (String) message.obj;
                         if (!isBridgedMode() || mCurrentSoftApInfoMap.size() != 2) {
                             Log.wtf(getTag(), "Ignore Bridged Mode Timeout message received"
-                                    + " in single AP state. Dropping it from " + idleInstance);
+                                    + " in single AP state. Dropping");
                             break;
                         }
                         if (!mBridgedModeOpportunisticsShutdownTimeoutEnabled) {
@@ -1611,8 +1453,14 @@
                                     + " while timeout is disabled. Dropping.");
                             break;
                         }
-                        Log.d(getTag(), "Instance idle timout on " + idleInstance);
-                        removeIfaceInstanceFromBridgedApIface(idleInstance);
+                        Set<String> idleInstances = getIdleInstances();
+                        if (idleInstances.size() == 0) {
+                            break;
+                        }
+                        Log.d(getTag(), "Instance idle timout, the number of the idle instances is "
+                                + idleInstances.size());
+                        removeIfaceInstanceFromBridgedApIface(
+                                getHighestFrequencyInstance(idleInstances));
                         break;
                     case CMD_INTERFACE_DESTROYED:
                         Log.d(getTag(), "Interface was cleanly destroyed.");
@@ -1622,16 +1470,6 @@
                         quitNow();
                         break;
                     case CMD_FAILURE:
-                        String instance = (String) message.obj;
-                        if (instance != null && isBridgedMode()
-                                && mCurrentSoftApInfoMap.size() >= 1) {
-                            Log.i(getTag(), "receive instanceFailure on " + instance);
-                            removeIfaceInstanceFromBridgedApIface(instance);
-                            // there is a available instance, keep AP on.
-                            if (mCurrentSoftApInfoMap.size() == 1) {
-                                break;
-                            }
-                        }
                         Log.w(getTag(), "hostapd failure, stop and report failure");
                         /* fall through */
                     case CMD_INTERFACE_DOWN:
@@ -1644,12 +1482,16 @@
                         quitNow();
                         break;
                     case CMD_UPDATE_CAPABILITY:
-                        SoftApCapability capability = (SoftApCapability) message.obj;
-                        mCurrentSoftApCapability = new SoftApCapability(capability);
-                        mWifiMetrics.updateSoftApCapability(mCurrentSoftApCapability,
-                                mOriginalModeConfiguration.getTargetMode(), isBridgeRequired());
-                        updateClientConnection();
-                        updateSafeChannelFrequencyList();
+                        // Capability should only changed by carrier requirement. Only apply to
+                        // Tether Mode
+                        if (mOriginalModeConfiguration.getTargetMode()
+                                ==  WifiManager.IFACE_IP_MODE_TETHERED) {
+                            SoftApCapability capability = (SoftApCapability) message.obj;
+                            mCurrentSoftApCapability = new SoftApCapability(capability);
+                            mWifiMetrics.updateSoftApCapability(mCurrentSoftApCapability,
+                                    mOriginalModeConfiguration.getTargetMode(), isBridgedMode());
+                            updateClientConnection();
+                        }
                         break;
                     case CMD_UPDATE_CONFIG:
                         SoftApConfiguration newConfig = (SoftApConfiguration) message.obj;
@@ -1663,7 +1505,7 @@
                                 Log.d(getTag(), "Max Client changed, reset to record the metrics");
                                 mEverReportMetricsForMaxClient = false;
                             }
-                            boolean needRescheduleTimeoutMessage =
+                            boolean needRescheduleTimer =
                                     mCurrentSoftApConfiguration.getShutdownTimeoutMillis()
                                     != newConfig.getShutdownTimeoutMillis()
                                     || mTimeoutEnabled != newConfig.isAutoShutdownEnabled()
@@ -1672,11 +1514,10 @@
                                     .isBridgedModeOpportunisticShutdownEnabledInternal();
                             updateChangeableConfiguration(newConfig);
                             updateClientConnection();
-                            if (needRescheduleTimeoutMessage) {
-                                for (String key : mSoftApTimeoutMessageMap.keySet()) {
-                                    cancelTimeoutMessage(key);
-                                }
-                                rescheduleTimeoutMessages(mApInterfaceName);
+                            if (needRescheduleTimer) {
+                                cancelTimeoutMessage();
+                                cancelBridgedModeIdleInstanceTimeoutMessage();
+                                scheduleTimeoutMessages();
                                 // Update SoftApInfo
                                 for (SoftApInfo info : mCurrentSoftApInfoMap.values()) {
                                     SoftApInfo newInfo = new SoftApInfo(info);
@@ -1687,8 +1528,7 @@
                             }
                             mWifiMetrics.updateSoftApConfiguration(
                                     mCurrentSoftApConfiguration,
-                                    mOriginalModeConfiguration.getTargetMode(),
-                                    isBridgeRequired());
+                                    mOriginalModeConfiguration.getTargetMode(), isBridgedMode());
                         } else {
                             Log.d(getTag(), "Ignore the config: " + newConfig
                                     + " update since it requires restart");
@@ -1738,14 +1578,14 @@
                                 getHighestFrequencyInstance(unavailableInstances));
                         break;
                     case CMD_HANDLE_WIFI_CONNECTED:
-                        if (!isBridgeRequired() || mCurrentSoftApInfoMap.size() != 2) {
+                        if (!isBridgedMode() || mCurrentSoftApInfoMap.size() != 2) {
                             Log.d(getTag(), "Ignore wifi connected in single AP state");
                             break;
                         }
                         WifiInfo wifiInfo = (WifiInfo) message.obj;
                         int wifiFreq = wifiInfo.getFrequency();
                         String targetShutDownInstance = "";
-                        if (wifiFreq > 0 && !mSafeChannelFrequencyList.contains(wifiFreq)) {
+                        if (!mSafeChannelFrequencyList.contains(wifiFreq)) {
                             Log.i(getTag(), "Wifi connected to freq:" + wifiFreq
                                     + " which is unavailable for SAP");
                             for (SoftApInfo sapInfo : mCurrentSoftApInfoMap.values()) {
@@ -1768,17 +1608,6 @@
                                     : targetShutDownInstance);
                         }
                         break;
-                    case CMD_CHARGING_STATE_CHANGED:
-                        boolean newIsCharging = (message.arg1 != 0);
-                        if (mIsCharging != newIsCharging) {
-                            mIsCharging = newIsCharging;
-                            if (mCurrentSoftApInfoMap.size() == 2) {
-                                for (String apInstance : mCurrentSoftApInfoMap.keySet()) {
-                                    rescheduleTimeoutMessageIfNeeded(apInstance);
-                                }
-                            }
-                        }
-                        break;
                     default:
                         return NOT_HANDLED;
                 }
diff --git a/service/java/com/android/server/wifi/SoftApNotifier.java b/service/java/com/android/server/wifi/SoftApNotifier.java
index f758150..c75eedd 100644
--- a/service/java/com/android/server/wifi/SoftApNotifier.java
+++ b/service/java/com/android/server/wifi/SoftApNotifier.java
@@ -20,7 +20,6 @@
 import android.app.PendingIntent;
 import android.content.Intent;
 import android.graphics.drawable.Icon;
-import android.net.wifi.WifiContext;
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
diff --git a/service/java/com/android/server/wifi/SoftApStoreData.java b/service/java/com/android/server/wifi/SoftApStoreData.java
index 475fad6..611bac7 100644
--- a/service/java/com/android/server/wifi/SoftApStoreData.java
+++ b/service/java/com/android/server/wifi/SoftApStoreData.java
@@ -18,8 +18,15 @@
 
 import android.annotation.Nullable;
 import android.content.Context;
+import android.net.MacAddress;
 import android.net.wifi.SoftApConfiguration;
+import android.net.wifi.WifiMigration;
+import android.text.TextUtils;
+import android.util.Log;
+import android.util.SparseIntArray;
 
+import com.android.modules.utils.build.SdkLevel;
+import com.android.server.wifi.util.ApConfigUtil;
 import com.android.server.wifi.util.SettingsMigrationDataHolder;
 import com.android.server.wifi.util.WifiConfigStoreEncryptionUtil;
 import com.android.server.wifi.util.XmlUtil;
@@ -29,6 +36,8 @@
 import org.xmlpull.v1.XmlSerializer;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * Store data for SoftAp
@@ -36,6 +45,28 @@
 public class SoftApStoreData implements WifiConfigStore.StoreData {
     private static final String TAG = "SoftApStoreData";
     private static final String XML_TAG_SECTION_HEADER_SOFTAP = "SoftAp";
+    private static final String XML_TAG_SSID = "SSID";
+    private static final String XML_TAG_BSSID = "Bssid";
+    private static final String XML_TAG_BAND = "Band";
+    private static final String XML_TAG_CHANNEL = "Channel";
+    private static final String XML_TAG_HIDDEN_SSID = "HiddenSSID";
+    private static final String XML_TAG_SECURITY_TYPE = "SecurityType";
+    private static final String XML_TAG_WPA2_PASSPHRASE = "Wpa2Passphrase";
+    private static final String XML_TAG_AP_BAND = "ApBand";
+    private static final String XML_TAG_PASSPHRASE = "Passphrase";
+    private static final String XML_TAG_MAX_NUMBER_OF_CLIENTS = "MaxNumberOfClients";
+    private static final String XML_TAG_AUTO_SHUTDOWN_ENABLED = "AutoShutdownEnabled";
+    private static final String XML_TAG_SHUTDOWN_TIMEOUT_MILLIS = "ShutdownTimeoutMillis";
+    private static final String XML_TAG_CLIENT_CONTROL_BY_USER = "ClientControlByUser";
+    private static final String XML_TAG_BLOCKED_CLIENT_LIST = "BlockedClientList";
+    private static final String XML_TAG_ALLOWED_CLIENT_LIST = "AllowedClientList";
+    private static final String XML_TAG_BRIDGED_MODE_OPPORTUNISTIC_SHUTDOWN_ENABLED =
+            "BridgedModeOpportunisticShutdownEnabled";
+    private static final String XML_TAG_MAC_RAMDOMIZATION_SETTING = "MacRandomizationSetting";
+    private static final String XML_TAG_BAND_CHANNEL_MAP = "BandChannelMap";
+    private static final String XML_TAG_80211_AX_ENABLED = "80211axEnabled";
+    private static final String XML_TAG_USER_CONFIGURATION = "UserConfiguration";
+
 
     private final Context mContext;
     private final SettingsMigrationDataHolder mSettingsMigrationDataHolder;
@@ -88,7 +119,54 @@
             throws XmlPullParserException, IOException {
         SoftApConfiguration softApConfig = mDataSource.toSerialize();
         if (softApConfig != null) {
-            XmlUtil.SoftApConfigurationXmlUtil.writeSoftApConfigurationToXml(out, softApConfig);
+            XmlUtil.writeNextValue(out, XML_TAG_SSID, softApConfig.getSsid());
+            if (softApConfig.getBssid() != null) {
+                XmlUtil.writeNextValue(out, XML_TAG_BSSID, softApConfig.getBssid().toString());
+            }
+            if (!SdkLevel.isAtLeastS()) {
+                // Band and channel change to store in Tag:BandChannelMap from S.
+                XmlUtil.writeNextValue(out, XML_TAG_AP_BAND, softApConfig.getBand());
+                XmlUtil.writeNextValue(out, XML_TAG_CHANNEL, softApConfig.getChannel());
+            }
+            XmlUtil.writeNextValue(out, XML_TAG_HIDDEN_SSID, softApConfig.isHiddenSsid());
+            XmlUtil.writeNextValue(out, XML_TAG_SECURITY_TYPE, softApConfig.getSecurityType());
+            if (softApConfig.getSecurityType() != SoftApConfiguration.SECURITY_TYPE_OPEN) {
+                XmlUtil.writeNextValue(out, XML_TAG_PASSPHRASE,
+                        softApConfig.getPassphrase());
+            }
+
+            XmlUtil.writeNextValue(out, XML_TAG_MAX_NUMBER_OF_CLIENTS,
+                    softApConfig.getMaxNumberOfClients());
+            XmlUtil.writeNextValue(out, XML_TAG_CLIENT_CONTROL_BY_USER,
+                    softApConfig.isClientControlByUserEnabled());
+            XmlUtil.writeNextValue(out, XML_TAG_AUTO_SHUTDOWN_ENABLED,
+                    softApConfig.isAutoShutdownEnabled());
+            XmlUtil.writeNextValue(out, XML_TAG_SHUTDOWN_TIMEOUT_MILLIS,
+                    softApConfig.getShutdownTimeoutMillis());
+            XmlUtil.writeNextSectionStart(out, XML_TAG_BLOCKED_CLIENT_LIST);
+            XmlUtil.SoftApConfigurationXmlUtil.writeClientListToXml(out,
+                    softApConfig.getBlockedClientList());
+            XmlUtil.writeNextSectionEnd(out, XML_TAG_BLOCKED_CLIENT_LIST);
+
+            XmlUtil.writeNextSectionStart(out, XML_TAG_ALLOWED_CLIENT_LIST);
+            XmlUtil.SoftApConfigurationXmlUtil.writeClientListToXml(out,
+                    softApConfig.getAllowedClientList());
+            XmlUtil.writeNextSectionEnd(out, XML_TAG_ALLOWED_CLIENT_LIST);
+            if (SdkLevel.isAtLeastS()) {
+                XmlUtil.writeNextValue(out, XML_TAG_BRIDGED_MODE_OPPORTUNISTIC_SHUTDOWN_ENABLED,
+                        softApConfig.isBridgedModeOpportunisticShutdownEnabled());
+                XmlUtil.writeNextValue(out, XML_TAG_MAC_RAMDOMIZATION_SETTING,
+                        softApConfig.getMacRandomizationSetting());
+
+                XmlUtil.writeNextSectionStart(out, XML_TAG_BAND_CHANNEL_MAP);
+                XmlUtil.SoftApConfigurationXmlUtil.writeChannelsToXml(out,
+                        softApConfig.getChannels());
+                XmlUtil.writeNextSectionEnd(out, XML_TAG_BAND_CHANNEL_MAP);
+                XmlUtil.writeNextValue(out, XML_TAG_80211_AX_ENABLED,
+                        softApConfig.isIeee80211axEnabled());
+                XmlUtil.writeNextValue(out, XML_TAG_USER_CONFIGURATION,
+                        softApConfig.isUserConfiguration());
+            }
         }
     }
 
@@ -101,12 +179,168 @@
         if (in == null) {
             return;
         }
+        SoftApConfiguration.Builder softApConfigBuilder = new SoftApConfiguration.Builder();
+        int securityType = SoftApConfiguration.SECURITY_TYPE_OPEN;
+        String passphrase = null;
+        String ssid = null;
+        String bssid = null;
+        // Note that, during deserializaion, we may read the old band encoding (XML_TAG_BAND)
+        // or the new band encoding (XML_TAG_AP_BAND) that is used after the introduction of the
+        // 6GHz band. If the old encoding is found, a conversion is done.
+        int channel = -1;
+        int apBand = -1;
+        boolean hasBandChannelMap = false;
+        List<MacAddress> blockedList = new ArrayList<>();
+        List<MacAddress> allowedList = new ArrayList<>();
+        boolean autoShutdownEnabledTagPresent = false;
+        try {
+            while (!XmlUtil.isNextSectionEnd(in, outerTagDepth)) {
+                if (in.getAttributeValue(null, "name") != null) {
+                    String[] valueName = new String[1];
+                    Object value = XmlUtil.readCurrentValue(in, valueName);
+                    if (TextUtils.isEmpty(valueName[0])) {
+                        throw new XmlPullParserException("Missing value name");
+                    }
+                    switch (valueName[0]) {
+                        case XML_TAG_SSID:
+                            ssid = (String) value;
+                            softApConfigBuilder.setSsid((String) value);
+                            break;
+                        case XML_TAG_BSSID:
+                            bssid = (String) value;
+                            softApConfigBuilder.setBssid(MacAddress.fromString(bssid));
+                            break;
+                        case XML_TAG_BAND:
+                            apBand = ApConfigUtil.convertWifiConfigBandToSoftApConfigBand(
+                                    (int) value);
+                            break;
+                        case XML_TAG_AP_BAND:
+                            apBand = (int) value;
+                            break;
+                        case XML_TAG_CHANNEL:
+                            channel = (int) value;
+                            break;
+                        case XML_TAG_HIDDEN_SSID:
+                            softApConfigBuilder.setHiddenSsid((boolean) value);
+                            break;
+                        case XML_TAG_SECURITY_TYPE:
+                            securityType = (int) value;
+                            break;
+                        case XML_TAG_WPA2_PASSPHRASE:
+                        case XML_TAG_PASSPHRASE:
+                            passphrase = (String) value;
+                            break;
+                        case XML_TAG_MAX_NUMBER_OF_CLIENTS:
+                            softApConfigBuilder.setMaxNumberOfClients((int) value);
+                            break;
+                        case XML_TAG_AUTO_SHUTDOWN_ENABLED:
+                            softApConfigBuilder.setAutoShutdownEnabled((boolean) value);
+                            autoShutdownEnabledTagPresent = true;
+                            break;
+                        case XML_TAG_SHUTDOWN_TIMEOUT_MILLIS:
+                            if (value instanceof Integer) {
+                                softApConfigBuilder
+                                        .setShutdownTimeoutMillis(Long.valueOf((int) value));
+                            } else if (value instanceof Long) {
+                                softApConfigBuilder.setShutdownTimeoutMillis((long) value);
+                            }
+                            break;
+                        case XML_TAG_CLIENT_CONTROL_BY_USER:
+                            softApConfigBuilder.setClientControlByUserEnabled((boolean) value);
+                            break;
+                        case XML_TAG_BRIDGED_MODE_OPPORTUNISTIC_SHUTDOWN_ENABLED:
+                            if (SdkLevel.isAtLeastS()) {
+                                softApConfigBuilder.setBridgedModeOpportunisticShutdownEnabled(
+                                        (boolean) value);
+                            }
+                            break;
+                        case XML_TAG_MAC_RAMDOMIZATION_SETTING:
+                            if (SdkLevel.isAtLeastS()) {
+                                softApConfigBuilder.setMacRandomizationSetting((int) value);
+                            }
+                            break;
+                        case XML_TAG_80211_AX_ENABLED:
+                            if (SdkLevel.isAtLeastS()) {
+                                softApConfigBuilder.setIeee80211axEnabled((boolean) value);
+                            }
+                            break;
+                        case XML_TAG_USER_CONFIGURATION:
+                            if (SdkLevel.isAtLeastS()) {
+                                softApConfigBuilder.setUserConfiguration((boolean) value);
+                            }
+                            break;
+                        default:
+                            Log.w(TAG, "Ignoring unknown value name " + valueName[0]);
+                            break;
+                    }
+                } else {
+                    String tagName = in.getName();
+                    List<MacAddress> parseredList;
+                    if (tagName == null) {
+                        throw new XmlPullParserException("Unexpected null tag found");
+                    }
+                    switch (tagName) {
+                        case XML_TAG_BLOCKED_CLIENT_LIST:
+                            parseredList =
+                                    XmlUtil.SoftApConfigurationXmlUtil.parseClientListFromXml(
+                                    in, outerTagDepth + 1);
+                            if (parseredList != null) blockedList = new ArrayList<>(parseredList);
+                            break;
+                        case XML_TAG_ALLOWED_CLIENT_LIST:
+                            parseredList =
+                                    XmlUtil.SoftApConfigurationXmlUtil.parseClientListFromXml(
+                                    in, outerTagDepth + 1);
+                            if (parseredList != null) allowedList = new ArrayList<>(parseredList);
+                            break;
+                        case XML_TAG_BAND_CHANNEL_MAP:
+                            if (SdkLevel.isAtLeastS()) {
+                                hasBandChannelMap = true;
+                                SparseIntArray channels = XmlUtil.SoftApConfigurationXmlUtil
+                                        .parseChannelsFromXml(in, outerTagDepth + 1);
+                                softApConfigBuilder.setChannels(channels);
+                            }
+                            break;
+                        default:
+                            Log.w(TAG, "Ignoring unknown tag found: " + tagName);
+                            break;
+                    }
+                }
+            }
+            softApConfigBuilder.setBlockedClientList(blockedList);
+            softApConfigBuilder.setAllowedClientList(allowedList);
+            if (!hasBandChannelMap) {
+                // Set channel and band
+                if (channel == 0) {
+                    softApConfigBuilder.setBand(apBand);
+                } else {
+                    softApConfigBuilder.setChannel(channel, apBand);
+                }
+            }
 
-        SoftApConfiguration softApConfig = XmlUtil.SoftApConfigurationXmlUtil.parseFromXml(
-                in, outerTagDepth, mSettingsMigrationDataHolder);
-        if (softApConfig != null) {
-            mDataSource.fromDeserialized(softApConfig);
+            // We should at-least have SSID restored from store.
+            if (ssid == null) {
+                Log.e(TAG, "Failed to parse SSID");
+                return;
+            }
+            if (securityType != SoftApConfiguration.SECURITY_TYPE_OPEN) {
+                softApConfigBuilder.setPassphrase(passphrase, securityType);
+            }
+            if (!autoShutdownEnabledTagPresent) {
+                // Migrate data out of settings.
+                WifiMigration.SettingsMigrationData migrationData =
+                        mSettingsMigrationDataHolder.retrieveData();
+                if (migrationData == null) {
+                    Log.e(TAG, "No migration data present");
+                } else {
+                    softApConfigBuilder.setAutoShutdownEnabled(
+                            migrationData.isSoftApTimeoutEnabled());
+                }
+            }
+        } catch (IllegalArgumentException e) {
+            Log.e(TAG, "Failed to parse configuration" + e);
+            return;
         }
+        mDataSource.fromDeserialized(softApConfigBuilder.setSsid(ssid).build());
     }
 
     @Override
diff --git a/service/java/com/android/server/wifi/SupplicantEventInfo.java b/service/java/com/android/server/wifi/SupplicantEventInfo.java
deleted file mode 100644
index f2c4fe1..0000000
--- a/service/java/com/android/server/wifi/SupplicantEventInfo.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import android.annotation.NonNull;
-import android.net.MacAddress;
-
-import com.android.server.wifi.SupplicantStaIfaceHal.SupplicantEventCode;
-
-import java.util.Objects;
-
-/**
- * Stores supplicant event information passed from WifiMonitor.
- */
-public class SupplicantEventInfo {
-    SupplicantEventInfo(@SupplicantEventCode int eventCode, @NonNull MacAddress bssid,
-            @NonNull String reasonString) {
-        this.eventCode = eventCode;
-        this.bssid = Objects.requireNonNull(bssid);
-        this.reasonString = Objects.requireNonNull(reasonString);
-    }
-
-    public final @SupplicantEventCode int eventCode;
-    @NonNull public final MacAddress bssid;
-    @NonNull public final String reasonString;
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(" eventCode: ").append(SupplicantStaIfaceHal
-                .supplicantEventCodeToString(eventCode));
-        sb.append(" bssid: ").append(bssid);
-        sb.append(" reasonString: ").append(reasonString);
-        return sb.toString();
-    }
-}
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackAidlImpl.java b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackAidlImpl.java
deleted file mode 100644
index 58d7f60..0000000
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackAidlImpl.java
+++ /dev/null
@@ -1,1190 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQP3GPPNetwork;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPDomName;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPIPAddrAvailability;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPNAIRealm;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPRoamingConsortium;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPVenueName;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPVenueUrl;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSConnCapability;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSFriendlyName;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSOSUProviders;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSWANMetrics;
-
-import android.annotation.NonNull;
-import android.content.Context;
-import android.hardware.wifi.supplicant.AnqpData;
-import android.hardware.wifi.supplicant.AssociationRejectionData;
-import android.hardware.wifi.supplicant.AuxiliarySupplicantEventCode;
-import android.hardware.wifi.supplicant.BssTmData;
-import android.hardware.wifi.supplicant.BssTmDataFlagsMask;
-import android.hardware.wifi.supplicant.BssTmStatusCode;
-import android.hardware.wifi.supplicant.BssidChangeReason;
-import android.hardware.wifi.supplicant.DppAkm;
-import android.hardware.wifi.supplicant.DppConnectionKeys;
-import android.hardware.wifi.supplicant.DppEventType;
-import android.hardware.wifi.supplicant.DppFailureCode;
-import android.hardware.wifi.supplicant.DppProgressCode;
-import android.hardware.wifi.supplicant.Hs20AnqpData;
-import android.hardware.wifi.supplicant.ISupplicantStaIfaceCallback;
-import android.hardware.wifi.supplicant.MboAssocDisallowedReasonCode;
-import android.hardware.wifi.supplicant.MboCellularDataConnectionPrefValue;
-import android.hardware.wifi.supplicant.MboTransitionReasonCode;
-import android.hardware.wifi.supplicant.QosPolicyData;
-import android.hardware.wifi.supplicant.StaIfaceCallbackState;
-import android.hardware.wifi.supplicant.StaIfaceReasonCode;
-import android.hardware.wifi.supplicant.StaIfaceStatusCode;
-import android.hardware.wifi.supplicant.WpsConfigError;
-import android.hardware.wifi.supplicant.WpsErrorIndication;
-import android.net.MacAddress;
-import android.net.wifi.SecurityParams;
-import android.net.wifi.SupplicantState;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiManager;
-import android.net.wifi.WifiSsid;
-import android.os.Process;
-import android.util.Log;
-
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyRequest;
-import com.android.server.wifi.SupplicantStaIfaceHal.SupplicantEventCode;
-import com.android.server.wifi.hotspot2.AnqpEvent;
-import com.android.server.wifi.hotspot2.IconEvent;
-import com.android.server.wifi.hotspot2.WnmData;
-import com.android.server.wifi.hotspot2.anqp.ANQPElement;
-import com.android.server.wifi.hotspot2.anqp.ANQPParser;
-import com.android.server.wifi.hotspot2.anqp.Constants;
-import com.android.server.wifi.util.NativeUtil;
-
-import java.io.IOException;
-import java.nio.BufferUnderflowException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-class SupplicantStaIfaceCallbackAidlImpl extends ISupplicantStaIfaceCallback.Stub {
-    private static final String TAG = "SupplicantStaIfaceCallbackAidlImpl";
-    private final SupplicantStaIfaceHalAidlImpl mStaIfaceHal;
-    private final String mIfaceName;
-    private final Context mContext;
-    private final WifiMonitor mWifiMonitor;
-    private final Object mLock;
-    // Used to help check for PSK password mismatch & EAP connection failure.
-    private int mStateBeforeDisconnect = StaIfaceCallbackState.INACTIVE;
-    private String mCurrentSsid = null;
-
-    SupplicantStaIfaceCallbackAidlImpl(@NonNull SupplicantStaIfaceHalAidlImpl staIfaceHal,
-            @NonNull String ifaceName, @NonNull Object lock,
-            @NonNull Context context, @NonNull WifiMonitor wifiMonitor) {
-        mStaIfaceHal = staIfaceHal;
-        mIfaceName = ifaceName;
-        mLock = lock;
-        mContext = context;
-        mWifiMonitor = wifiMonitor;
-    }
-
-    @Override
-    public void onNetworkAdded(int id) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onNetworkAdded id=" + id);
-        }
-    }
-
-    @Override
-    public void onNetworkRemoved(int id) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onNetworkRemoved id=" + id);
-            // Reset state since network has been removed.
-            mStateBeforeDisconnect = StaIfaceCallbackState.INACTIVE;
-        }
-    }
-
-    /**
-     * Converts the supplicant state received from AIDL to the equivalent framework state.
-     */
-    protected static SupplicantState supplicantAidlStateToFrameworkState(int state) {
-        switch (state) {
-            case StaIfaceCallbackState.DISCONNECTED:
-                return SupplicantState.DISCONNECTED;
-            case StaIfaceCallbackState.IFACE_DISABLED:
-                return SupplicantState.INTERFACE_DISABLED;
-            case StaIfaceCallbackState.INACTIVE:
-                return SupplicantState.INACTIVE;
-            case StaIfaceCallbackState.SCANNING:
-                return SupplicantState.SCANNING;
-            case StaIfaceCallbackState.AUTHENTICATING:
-                return SupplicantState.AUTHENTICATING;
-            case StaIfaceCallbackState.ASSOCIATING:
-                return SupplicantState.ASSOCIATING;
-            case StaIfaceCallbackState.ASSOCIATED:
-                return SupplicantState.ASSOCIATED;
-            case StaIfaceCallbackState.FOURWAY_HANDSHAKE:
-                return SupplicantState.FOUR_WAY_HANDSHAKE;
-            case StaIfaceCallbackState.GROUP_HANDSHAKE:
-                return SupplicantState.GROUP_HANDSHAKE;
-            case StaIfaceCallbackState.COMPLETED:
-                return SupplicantState.COMPLETED;
-            default:
-                throw new IllegalArgumentException("Invalid state: " + state);
-        }
-    }
-
-    @Override
-    public void onStateChanged(int newState, byte[/* 6 */] bssid, int id,
-            byte[] ssid, boolean filsHlpSent) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onStateChanged");
-            SupplicantState newSupplicantState =
-                    supplicantAidlStateToFrameworkState(newState);
-            WifiSsid wifiSsid = WifiSsid.fromBytes(ssid);
-            String bssidStr = NativeUtil.macAddressFromByteArray(bssid);
-            if (newState != StaIfaceCallbackState.DISCONNECTED) {
-                // onStateChanged(DISCONNECTED) may come before onDisconnected(), so add this
-                // cache to track the state before the disconnect.
-                mStateBeforeDisconnect = newState;
-            }
-
-            if (newState == StaIfaceCallbackState.ASSOCIATING
-                    || newState == StaIfaceCallbackState.ASSOCIATED
-                    || newState == StaIfaceCallbackState.COMPLETED) {
-                mStaIfaceHal.updateOnLinkedNetworkRoaming(mIfaceName, id, false);
-            }
-
-            if (newState == StaIfaceCallbackState.COMPLETED) {
-                mWifiMonitor.broadcastNetworkConnectionEvent(
-                        mIfaceName, mStaIfaceHal.getCurrentNetworkId(mIfaceName), filsHlpSent,
-                        wifiSsid, bssidStr);
-            } else if (newState == StaIfaceCallbackState.ASSOCIATING) {
-                mCurrentSsid = NativeUtil.encodeSsid(NativeUtil.byteArrayToArrayList(ssid));
-            }
-            mWifiMonitor.broadcastSupplicantStateChangeEvent(
-                    mIfaceName, mStaIfaceHal.getCurrentNetworkId(mIfaceName), wifiSsid,
-                    bssidStr, newSupplicantState);
-        }
-    }
-
-    /**
-     * Parses the provided payload into an ANQP element.
-     *
-     * @param infoID  Element type.
-     * @param payload Raw payload bytes.
-     * @return AnqpElement instance on success, null on failure.
-     */
-    private ANQPElement parseAnqpElement(Constants.ANQPElementType infoID, byte[] payload) {
-        synchronized (mLock) {
-            try {
-                return Constants.getANQPElementID(infoID) != null
-                        ? ANQPParser.parseElement(infoID, ByteBuffer.wrap(payload))
-                        : ANQPParser.parseHS20Element(infoID, ByteBuffer.wrap(payload));
-            } catch (IOException | BufferUnderflowException e) {
-                Log.e(TAG, "Failed parsing ANQP element payload: " + infoID, e);
-                return null;
-            }
-        }
-    }
-
-    /**
-     * Parse the ANQP element data and add to the provided elements map if successful.
-     *
-     * @param elementsMap Map to add the parsed out element to.
-     * @param infoID  Element type.
-     * @param payload Raw payload bytes.
-     */
-    private void addAnqpElementToMap(Map<Constants.ANQPElementType, ANQPElement> elementsMap,
-            Constants.ANQPElementType infoID, byte[] payload) {
-        synchronized (mLock) {
-            if (payload == null || payload.length == 0) {
-                return;
-            }
-            ANQPElement element = parseAnqpElement(infoID, payload);
-            if (element != null) {
-                elementsMap.put(infoID, element);
-            }
-        }
-    }
-
-    @Override
-    public void onAnqpQueryDone(byte[/* 6 */] bssid, AnqpData data, Hs20AnqpData hs20Data) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onAnqpQueryDone");
-            Map<Constants.ANQPElementType, ANQPElement> elementsMap = new HashMap<>();
-            addAnqpElementToMap(elementsMap, ANQPVenueName, data.venueName);
-            addAnqpElementToMap(elementsMap, ANQPRoamingConsortium, data.roamingConsortium);
-            addAnqpElementToMap(elementsMap, ANQPIPAddrAvailability, data.ipAddrTypeAvailability);
-            addAnqpElementToMap(elementsMap, ANQPNAIRealm, data.naiRealm);
-            addAnqpElementToMap(elementsMap, ANQP3GPPNetwork, data.anqp3gppCellularNetwork);
-            addAnqpElementToMap(elementsMap, ANQPDomName, data.domainName);
-            addAnqpElementToMap(elementsMap, ANQPVenueUrl, data.venueUrl);
-            addAnqpElementToMap(elementsMap, HSFriendlyName, hs20Data.operatorFriendlyName);
-            addAnqpElementToMap(elementsMap, HSWANMetrics, hs20Data.wanMetrics);
-            addAnqpElementToMap(elementsMap, HSConnCapability, hs20Data.connectionCapability);
-            addAnqpElementToMap(elementsMap, HSOSUProviders, hs20Data.osuProvidersList);
-            mWifiMonitor.broadcastAnqpDoneEvent(
-                    mIfaceName, new AnqpEvent(NativeUtil.macAddressToLong(bssid), elementsMap));
-        }
-    }
-
-    @Override
-    public void onHs20IconQueryDone(byte[/* 6 */] bssid, String fileName, byte[] data) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onHs20IconQueryDone");
-            mWifiMonitor.broadcastIconDoneEvent(
-                    mIfaceName,
-                    new IconEvent(NativeUtil.macAddressToLong(bssid), fileName, data.length, data));
-        }
-    }
-
-    @Override
-    public void onHs20SubscriptionRemediation(byte[/* 6 */] bssid, byte osuMethod, String url) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onHs20SubscriptionRemediation");
-            mWifiMonitor.broadcastWnmEvent(
-                    mIfaceName,
-                    WnmData.createRemediationEvent(NativeUtil.macAddressToLong(bssid), url,
-                            osuMethod));
-        }
-    }
-
-    @Override
-    public void onHs20DeauthImminentNotice(byte[/* 6 */] bssid, int reasonCode,
-            int reAuthDelayInSec, String url) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onHs20DeauthImminentNotice");
-            mWifiMonitor.broadcastWnmEvent(
-                    mIfaceName,
-                    WnmData.createDeauthImminentEvent(NativeUtil.macAddressToLong(bssid), url,
-                            reasonCode == WnmData.ESS, reAuthDelayInSec));
-        }
-    }
-
-    @Override
-    public void onDisconnected(byte[/* 6 */] bssid, boolean locallyGenerated, int reasonCode) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onDisconnected");
-            if (mStaIfaceHal.isVerboseLoggingEnabled()) {
-                Log.e(TAG, "onDisconnected state=" + mStateBeforeDisconnect
-                        + " locallyGenerated=" + locallyGenerated
-                        + " reasonCode=" + reasonCode);
-            }
-            WifiConfiguration curConfiguration =
-                    mStaIfaceHal.getCurrentNetworkLocalConfig(mIfaceName);
-            if (curConfiguration != null) {
-                if (mStateBeforeDisconnect == StaIfaceCallbackState.FOURWAY_HANDSHAKE
-                        && WifiConfigurationUtil.isConfigForPskNetwork(curConfiguration)
-                        && (!locallyGenerated || reasonCode
-                            != StaIfaceReasonCode.IE_IN_4WAY_DIFFERS)) {
-                    mWifiMonitor.broadcastAuthenticationFailureEvent(
-                            mIfaceName, WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1,
-                            mCurrentSsid, MacAddress.fromBytes(bssid));
-                } else if (mStateBeforeDisconnect == StaIfaceCallbackState.ASSOCIATED
-                        && WifiConfigurationUtil.isConfigForEapNetwork(curConfiguration)) {
-                    mWifiMonitor.broadcastAuthenticationFailureEvent(
-                            mIfaceName, WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE, -1,
-                            mCurrentSsid, MacAddress.fromBytes(bssid));
-                }
-            }
-            mWifiMonitor.broadcastNetworkDisconnectionEvent(
-                    mIfaceName, locallyGenerated, halToFrameworkReasonCode(reasonCode),
-                    mCurrentSsid, NativeUtil.macAddressFromByteArray(bssid));
-        }
-    }
-
-    private void handleAssocRejectEvent(AssocRejectEventInfo assocRejectInfo) {
-        boolean isWrongPwd = false;
-        WifiConfiguration curConfiguration = mStaIfaceHal.getCurrentNetworkLocalConfig(mIfaceName);
-        if (curConfiguration != null) {
-            if (!assocRejectInfo.timedOut) {
-                Log.d(TAG, "flush PMK cache due to association rejection for config id "
-                        + curConfiguration.networkId + ".");
-                mStaIfaceHal.removePmkCacheEntry(curConfiguration.networkId);
-            }
-            // Special handling for WPA3-Personal networks. If the password is
-            // incorrect, the AP will send association rejection, with status code 1
-            // (unspecified failure). In SAE networks, the password authentication
-            // is not related to the 4-way handshake. In this case, we will send an
-            // authentication failure event up.
-            if (assocRejectInfo.statusCode
-                    == SupplicantStaIfaceHal.StaIfaceStatusCode.UNSPECIFIED_FAILURE) {
-                // Network Selection status is guaranteed to be initialized
-                SecurityParams params = curConfiguration.getNetworkSelectionStatus()
-                        .getCandidateSecurityParams();
-                if (params != null
-                        && params.getSecurityType() == WifiConfiguration.SECURITY_TYPE_SAE) {
-                    // If this is ever connected, the password should be correct.
-                    isWrongPwd = !curConfiguration.getNetworkSelectionStatus().hasEverConnected();
-                    if (isWrongPwd) {
-                        mStaIfaceHal.logCallback("SAE incorrect password");
-                    } else {
-                        mStaIfaceHal.logCallback("SAE association rejection");
-                    }
-                }
-            } else if (assocRejectInfo.statusCode
-                    == SupplicantStaIfaceHal.StaIfaceStatusCode.CHALLENGE_FAIL
-                    && WifiConfigurationUtil.isConfigForWepNetwork(curConfiguration)) {
-                mStaIfaceHal.logCallback("WEP incorrect password");
-                isWrongPwd = true;
-            }
-        }
-
-        if (isWrongPwd) {
-            MacAddress bssidAsMacAddress;
-            try {
-                bssidAsMacAddress = MacAddress.fromString(assocRejectInfo.bssid);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Invalid bssid obtained from supplicant " + assocRejectInfo.bssid);
-                bssidAsMacAddress = WifiManager.ALL_ZEROS_MAC_ADDRESS;
-            }
-            mWifiMonitor.broadcastAuthenticationFailureEvent(
-                    mIfaceName, WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1,
-                    mCurrentSsid, bssidAsMacAddress);
-        }
-        mWifiMonitor.broadcastAssociationRejectionEvent(mIfaceName, assocRejectInfo);
-        mStateBeforeDisconnect = StaIfaceCallbackState.INACTIVE;
-    }
-
-    @Override
-    public void onAssociationRejected(AssociationRejectionData assocRejectData) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onAssociationRejected");
-            assocRejectData.statusCode = halToFrameworkStatusCode(assocRejectData.statusCode);
-            assocRejectData.mboAssocDisallowedReason = halToFrameworkMboAssocDisallowedReasonCode(
-                    assocRejectData.mboAssocDisallowedReason);
-            AssocRejectEventInfo assocRejectInfo = new AssocRejectEventInfo(assocRejectData);
-            handleAssocRejectEvent(assocRejectInfo);
-        }
-    }
-
-    @Override
-    public void onAuthenticationTimeout(byte[/* 6 */] bssid) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onAuthenticationTimeout");
-            mWifiMonitor.broadcastAuthenticationFailureEvent(
-                    mIfaceName, WifiManager.ERROR_AUTH_FAILURE_TIMEOUT, -1,
-                    mCurrentSsid, MacAddress.fromBytes(bssid));
-        }
-    }
-
-    @Override
-    public void onBssidChanged(byte reason, byte[/* 6 */] bssid) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onBssidChanged");
-            if (reason == BssidChangeReason.ASSOC_START) {
-                mWifiMonitor.broadcastTargetBssidEvent(
-                        mIfaceName, NativeUtil.macAddressFromByteArray(bssid));
-            } else if (reason == BssidChangeReason.ASSOC_COMPLETE) {
-                mWifiMonitor.broadcastAssociatedBssidEvent(
-                        mIfaceName, NativeUtil.macAddressFromByteArray(bssid));
-            }
-        }
-    }
-
-    @Override
-    public void onEapFailure(byte[/* 6 */] bssid, int errorCode) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onEapFailure");
-            try {
-                mWifiMonitor.broadcastAuthenticationFailureEvent(
-                        mIfaceName, WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE, errorCode,
-                        mCurrentSsid, MacAddress.fromBytes(bssid));
-            } catch (IllegalArgumentException e) {
-                Log.i(TAG, "Invalid bssid received");
-            }
-        }
-    }
-
-    @Override
-    public void onWpsEventSuccess() {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onWpsEventSuccess");
-            mWifiMonitor.broadcastWpsSuccessEvent(mIfaceName);
-        }
-    }
-
-    @Override
-    public void onWpsEventFail(byte[/* 6 */] bssid, int configError, int errorInd) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onWpsEventFail");
-            if (configError == WpsConfigError.MSG_TIMEOUT
-                    && errorInd == WpsErrorIndication.NO_ERROR) {
-                mWifiMonitor.broadcastWpsTimeoutEvent(mIfaceName);
-            } else {
-                mWifiMonitor.broadcastWpsFailEvent(mIfaceName, configError, errorInd);
-            }
-        }
-    }
-
-    @Override
-    public void onWpsEventPbcOverlap() {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onWpsEventPbcOverlap");
-            mWifiMonitor.broadcastWpsOverlapEvent(mIfaceName);
-        }
-    }
-
-    @Override
-    public void onExtRadioWorkStart(int id) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onExtRadioWorkStart");
-        }
-    }
-
-    @Override
-    public void onExtRadioWorkTimeout(int id) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onExtRadioWorkTimeout");
-        }
-    }
-
-    @Override
-    public void onDppSuccessConfigReceived(byte[] ssid, String password,
-            byte[] psk, int securityAkm, DppConnectionKeys keys) {
-        if (mStaIfaceHal.getDppCallback() == null) {
-            Log.e(TAG, "onDppSuccessConfigReceived callback is null");
-            return;
-        }
-
-        WifiConfiguration newWifiConfiguration = new WifiConfiguration();
-
-        // Set up SSID
-        WifiSsid wifiSsid = WifiSsid.fromBytes(ssid);
-        newWifiConfiguration.SSID = wifiSsid.toString();
-
-        // Set up password or PSK
-        if (password != null) {
-            newWifiConfiguration.preSharedKey = "\"" + password + "\"";
-        } else if (psk != null) {
-            newWifiConfiguration.preSharedKey = Arrays.toString(psk);
-        }
-
-        // Set up key management: SAE or PSK or DPP
-        if (securityAkm == DppAkm.SAE) {
-            newWifiConfiguration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_SAE);
-        } else if (securityAkm == DppAkm.PSK_SAE || securityAkm == DppAkm.PSK) {
-            newWifiConfiguration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
-        } else if (securityAkm == DppAkm.DPP) {
-            newWifiConfiguration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_DPP);
-        } else {
-            // No other AKMs are currently supported
-            onDppFailure(DppFailureCode.NOT_SUPPORTED, null, null, null);
-            return;
-        }
-
-        // Set DPP connection Keys for SECURITY_TYPE_DPP
-        if (keys != null && securityAkm == DppAkm.DPP) {
-            newWifiConfiguration.setDppConnectionKeys(keys.connector, keys.cSign,
-                    keys.netAccessKey);
-        }
-
-        // Set up default values
-        newWifiConfiguration.creatorName = mContext.getPackageManager()
-                .getNameForUid(Process.WIFI_UID);
-        newWifiConfiguration.status = WifiConfiguration.Status.ENABLED;
-
-        mStaIfaceHal.getDppCallback().onSuccessConfigReceived(newWifiConfiguration);
-    }
-
-    @Override
-    public void onDppSuccessConfigSent() {
-        if (mStaIfaceHal.getDppCallback() != null) {
-            mStaIfaceHal.getDppCallback().onSuccess(
-                    SupplicantStaIfaceHal.DppEventType.CONFIGURATION_SENT);
-        } else {
-            Log.e(TAG, "onSuccessConfigSent callback is null");
-        }
-    }
-
-    @Override
-    public void onDppProgress(int code) {
-        if (mStaIfaceHal.getDppCallback() != null) {
-            mStaIfaceHal.getDppCallback().onProgress(halToFrameworkDppProgressCode(code));
-        } else {
-            Log.e(TAG, "onDppProgress callback is null");
-        }
-    }
-
-    @Override
-    public void onDppFailure(int code, String ssid, String channelList, char[] bandList) {
-        if (mStaIfaceHal.getDppCallback() != null) {
-            int[] bandListArray = null;
-
-            // Convert char array to int array
-            if (bandList != null) {
-                bandListArray = new int[bandList.length];
-
-                for (int i = 0; i < bandList.length; i++) {
-                    bandListArray[i] = bandList[i];
-                }
-            }
-            mStaIfaceHal.getDppCallback().onFailure(
-                    halToFrameworkDppFailureCode(code), ssid, channelList, bandListArray);
-        } else {
-            Log.e(TAG, "onDppFailure callback is null");
-        }
-    }
-
-    @Override
-    public void onPmkCacheAdded(long expirationTimeInSec, byte[] serializedEntry) {
-        WifiConfiguration curConfig = mStaIfaceHal.getCurrentNetworkLocalConfig(mIfaceName);
-        if (curConfig == null) {
-            return;
-        }
-
-        SecurityParams params = curConfig.getNetworkSelectionStatus().getCandidateSecurityParams();
-        if (params == null || params.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)
-                || params.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)) {
-            return;
-        }
-
-        mStaIfaceHal.addPmkCacheEntry(mIfaceName, curConfig.networkId, expirationTimeInSec,
-                NativeUtil.byteArrayToArrayList(serializedEntry));
-        mStaIfaceHal.logCallback(
-                "onPmkCacheAdded: update pmk cache for config id "
-                        + curConfig.networkId + " on " + mIfaceName);
-    }
-
-    @Override
-    public void onDppSuccess(int code) {
-        if (mStaIfaceHal.getDppCallback() != null) {
-            mStaIfaceHal.getDppCallback().onSuccess(halToFrameworkDppEventType(code));
-        } else {
-            Log.e(TAG, "onDppSuccess callback is null");
-        }
-    }
-
-    private @MboOceConstants.BtmResponseStatus int halToFrameworkBtmResponseStatus(int status) {
-        switch (status) {
-            case BssTmStatusCode.ACCEPT:
-                return MboOceConstants.BTM_RESPONSE_STATUS_ACCEPT;
-            case BssTmStatusCode.REJECT_UNSPECIFIED:
-                return MboOceConstants.BTM_RESPONSE_STATUS_REJECT_UNSPECIFIED;
-            case BssTmStatusCode.REJECT_INSUFFICIENT_BEACON:
-                return MboOceConstants.BTM_RESPONSE_STATUS_REJECT_INSUFFICIENT_BEACON;
-            case BssTmStatusCode.REJECT_INSUFFICIENT_CAPABITY:
-                return MboOceConstants.BTM_RESPONSE_STATUS_REJECT_INSUFFICIENT_CAPABITY;
-            case BssTmStatusCode.REJECT_BSS_TERMINATION_UNDESIRED:
-                return MboOceConstants.BTM_RESPONSE_STATUS_REJECT_BSS_TERMINATION_UNDESIRED;
-            case BssTmStatusCode.REJECT_BSS_TERMINATION_DELAY_REQUEST:
-                return MboOceConstants.BTM_RESPONSE_STATUS_REJECT_BSS_TERMINATION_DELAY_REQUEST;
-            case BssTmStatusCode.REJECT_STA_CANDIDATE_LIST_PROVIDED:
-                return MboOceConstants.BTM_RESPONSE_STATUS_REJECT_STA_CANDIDATE_LIST_PROVIDED;
-            case BssTmStatusCode.REJECT_NO_SUITABLE_CANDIDATES:
-                return MboOceConstants.BTM_RESPONSE_STATUS_REJECT_NO_SUITABLE_CANDIDATES;
-            case BssTmStatusCode.REJECT_LEAVING_ESS:
-                return MboOceConstants.BTM_RESPONSE_STATUS_REJECT_LEAVING_ESS;
-            default:
-                return MboOceConstants.BTM_RESPONSE_STATUS_REJECT_RESERVED;
-        }
-    }
-
-    private int halToFrameworkBssTmDataFlagsMask(int flags) {
-        int tmDataflags = 0;
-        if ((flags & BssTmDataFlagsMask.WNM_MODE_PREFERRED_CANDIDATE_LIST_INCLUDED) != 0) {
-            tmDataflags |= MboOceConstants.BTM_DATA_FLAG_PREFERRED_CANDIDATE_LIST_INCLUDED;
-        }
-        if ((flags & BssTmDataFlagsMask.WNM_MODE_ABRIDGED) != 0) {
-            tmDataflags |= MboOceConstants.BTM_DATA_FLAG_MODE_ABRIDGED;
-        }
-        if ((flags & BssTmDataFlagsMask.WNM_MODE_DISASSOCIATION_IMMINENT) != 0) {
-            tmDataflags |= MboOceConstants.BTM_DATA_FLAG_DISASSOCIATION_IMMINENT;
-        }
-        if ((flags & BssTmDataFlagsMask.WNM_MODE_BSS_TERMINATION_INCLUDED) != 0) {
-            tmDataflags |= MboOceConstants.BTM_DATA_FLAG_BSS_TERMINATION_INCLUDED;
-        }
-        if ((flags & BssTmDataFlagsMask.WNM_MODE_ESS_DISASSOCIATION_IMMINENT) != 0) {
-            tmDataflags |= MboOceConstants.BTM_DATA_FLAG_ESS_DISASSOCIATION_IMMINENT;
-        }
-        if ((flags & BssTmDataFlagsMask.MBO_TRANSITION_REASON_CODE_INCLUDED) != 0) {
-            tmDataflags |= MboOceConstants.BTM_DATA_FLAG_MBO_TRANSITION_REASON_CODE_INCLUDED;
-        }
-        if ((flags & BssTmDataFlagsMask.MBO_ASSOC_RETRY_DELAY_INCLUDED) != 0) {
-            tmDataflags |= MboOceConstants.BTM_DATA_FLAG_MBO_ASSOC_RETRY_DELAY_INCLUDED;
-        }
-        if ((flags & BssTmDataFlagsMask.MBO_CELLULAR_DATA_CONNECTION_PREFERENCE_INCLUDED) != 0) {
-            tmDataflags |=
-                    MboOceConstants.BTM_DATA_FLAG_MBO_CELL_DATA_CONNECTION_PREFERENCE_INCLUDED;
-        }
-        return tmDataflags;
-    }
-
-    private @MboOceConstants.MboTransitionReason int halToFrameworkMboTransitionReason(
-            int reason) {
-        switch (reason) {
-            case MboTransitionReasonCode.UNSPECIFIED:
-                return MboOceConstants.MBO_TRANSITION_REASON_UNSPECIFIED;
-            case MboTransitionReasonCode.EXCESSIVE_FRAME_LOSS:
-                return MboOceConstants.MBO_TRANSITION_REASON_EXCESSIVE_FRAME_LOSS;
-            case MboTransitionReasonCode.EXCESSIVE_TRAFFIC_DELAY:
-                return MboOceConstants.MBO_TRANSITION_REASON_EXCESSIVE_TRAFFIC_DELAY;
-            case MboTransitionReasonCode.INSUFFICIENT_BANDWIDTH:
-                return MboOceConstants.MBO_TRANSITION_REASON_INSUFFICIENT_BANDWIDTH;
-            case MboTransitionReasonCode.LOAD_BALANCING:
-                return MboOceConstants.MBO_TRANSITION_REASON_LOAD_BALANCING;
-            case MboTransitionReasonCode.LOW_RSSI:
-                return MboOceConstants.MBO_TRANSITION_REASON_LOW_RSSI;
-            case MboTransitionReasonCode.RX_EXCESSIVE_RETRIES:
-                return MboOceConstants.MBO_TRANSITION_REASON_RX_EXCESSIVE_RETRIES;
-            case MboTransitionReasonCode.HIGH_INTERFERENCE:
-                return MboOceConstants.MBO_TRANSITION_REASON_HIGH_INTERFERENCE;
-            case MboTransitionReasonCode.GRAY_ZONE:
-                return MboOceConstants.MBO_TRANSITION_REASON_GRAY_ZONE;
-            default:
-                return MboOceConstants.MBO_TRANSITION_REASON_RESERVED;
-        }
-    }
-
-    private @MboOceConstants.MboTransitionReason int
-            halToFrameworkMboCellularDataConnectionPreference(int cellPref) {
-        switch (cellPref) {
-            case MboCellularDataConnectionPrefValue.EXCLUDED:
-                return MboOceConstants.MBO_CELLULAR_DATA_CONNECTION_EXCLUDED;
-            case MboCellularDataConnectionPrefValue.NOT_PREFERRED:
-                return MboOceConstants.MBO_CELLULAR_DATA_CONNECTION_NOT_PREFERRED;
-            case MboCellularDataConnectionPrefValue.PREFERRED:
-                return MboOceConstants.MBO_CELLULAR_DATA_CONNECTION_PREFERRED;
-            default:
-                return MboOceConstants.MBO_CELLULAR_DATA_CONNECTION_RESERVED;
-        }
-    }
-
-    private int halToFrameworkDppEventType(int eventType) {
-        switch(eventType) {
-            case DppEventType.CONFIGURATION_SENT:
-                return SupplicantStaIfaceHal.DppEventType.CONFIGURATION_SENT;
-            case DppEventType.CONFIGURATION_APPLIED:
-                return SupplicantStaIfaceHal.DppEventType.CONFIGURATION_APPLIED;
-            default:
-                Log.e(TAG, "Invalid DppEventType received");
-                return -1;
-        }
-    }
-
-    private int halToFrameworkDppProgressCode(int progressCode) {
-        switch(progressCode) {
-            case DppProgressCode.AUTHENTICATION_SUCCESS:
-                return SupplicantStaIfaceHal.DppProgressCode.AUTHENTICATION_SUCCESS;
-            case DppProgressCode.RESPONSE_PENDING:
-                return SupplicantStaIfaceHal.DppProgressCode.RESPONSE_PENDING;
-            case DppProgressCode.CONFIGURATION_SENT_WAITING_RESPONSE:
-                return SupplicantStaIfaceHal.DppProgressCode.CONFIGURATION_SENT_WAITING_RESPONSE;
-            case DppProgressCode.CONFIGURATION_ACCEPTED:
-                return SupplicantStaIfaceHal.DppProgressCode.CONFIGURATION_ACCEPTED;
-            default:
-                Log.e(TAG, "Invalid DppProgressCode received");
-                return -1;
-        }
-    }
-
-    private int halToFrameworkDppFailureCode(int failureCode) {
-        switch(failureCode) {
-            case DppFailureCode.INVALID_URI:
-                return SupplicantStaIfaceHal.DppFailureCode.INVALID_URI;
-            case DppFailureCode.AUTHENTICATION:
-                return SupplicantStaIfaceHal.DppFailureCode.AUTHENTICATION;
-            case DppFailureCode.NOT_COMPATIBLE:
-                return SupplicantStaIfaceHal.DppFailureCode.NOT_COMPATIBLE;
-            case DppFailureCode.CONFIGURATION:
-                return SupplicantStaIfaceHal.DppFailureCode.CONFIGURATION;
-            case DppFailureCode.BUSY:
-                return SupplicantStaIfaceHal.DppFailureCode.BUSY;
-            case DppFailureCode.TIMEOUT:
-                return SupplicantStaIfaceHal.DppFailureCode.TIMEOUT;
-            case DppFailureCode.FAILURE:
-                return SupplicantStaIfaceHal.DppFailureCode.FAILURE;
-            case DppFailureCode.NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.DppFailureCode.NOT_SUPPORTED;
-            case DppFailureCode.CONFIGURATION_REJECTED:
-                return SupplicantStaIfaceHal.DppFailureCode.CONFIGURATION_REJECTED;
-            case DppFailureCode.CANNOT_FIND_NETWORK:
-                return SupplicantStaIfaceHal.DppFailureCode.CANNOT_FIND_NETWORK;
-            case DppFailureCode.ENROLLEE_AUTHENTICATION:
-                return SupplicantStaIfaceHal.DppFailureCode.ENROLLEE_AUTHENTICATION;
-            case DppFailureCode.URI_GENERATION:
-                return SupplicantStaIfaceHal.DppFailureCode.URI_GENERATION;
-            default:
-                Log.e(TAG, "Invalid DppFailureCode received");
-                return -1;
-        }
-    }
-
-    private byte halToFrameworkMboAssocDisallowedReasonCode(byte reasonCode) {
-        switch (reasonCode) {
-            case MboAssocDisallowedReasonCode.RESERVED:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.RESERVED;
-            case MboAssocDisallowedReasonCode.UNSPECIFIED:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.UNSPECIFIED;
-            case MboAssocDisallowedReasonCode.MAX_NUM_STA_ASSOCIATED:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.MAX_NUM_STA_ASSOCIATED;
-            case MboAssocDisallowedReasonCode.AIR_INTERFACE_OVERLOADED:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.AIR_INTERFACE_OVERLOADED;
-            case MboAssocDisallowedReasonCode.AUTH_SERVER_OVERLOADED:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.AUTH_SERVER_OVERLOADED;
-            case MboAssocDisallowedReasonCode.INSUFFICIENT_RSSI:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.INSUFFICIENT_RSSI;
-            default:
-                Log.e(TAG, "Invalid MboAssocDisallowedReasonCode received");
-                return -1;
-        }
-    }
-
-    private int halToFrameworkReasonCode(int reason) {
-        switch (reason) {
-            case StaIfaceReasonCode.UNSPECIFIED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.UNSPECIFIED;
-            case StaIfaceReasonCode.PREV_AUTH_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.PREV_AUTH_NOT_VALID;
-            case StaIfaceReasonCode.DEAUTH_LEAVING:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.DEAUTH_LEAVING;
-            case StaIfaceReasonCode.DISASSOC_DUE_TO_INACTIVITY:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.DISASSOC_DUE_TO_INACTIVITY;
-            case StaIfaceReasonCode.DISASSOC_AP_BUSY:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.DISASSOC_AP_BUSY;
-            case StaIfaceReasonCode.CLASS2_FRAME_FROM_NONAUTH_STA:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.CLASS2_FRAME_FROM_NONAUTH_STA;
-            case StaIfaceReasonCode.CLASS3_FRAME_FROM_NONASSOC_STA:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.CLASS3_FRAME_FROM_NONASSOC_STA;
-            case StaIfaceReasonCode.DISASSOC_STA_HAS_LEFT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.DISASSOC_STA_HAS_LEFT;
-            case StaIfaceReasonCode.STA_REQ_ASSOC_WITHOUT_AUTH:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.STA_REQ_ASSOC_WITHOUT_AUTH;
-            case StaIfaceReasonCode.PWR_CAPABILITY_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.PWR_CAPABILITY_NOT_VALID;
-            case StaIfaceReasonCode.SUPPORTED_CHANNEL_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.SUPPORTED_CHANNEL_NOT_VALID;
-            case StaIfaceReasonCode.BSS_TRANSITION_DISASSOC:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.BSS_TRANSITION_DISASSOC;
-            case StaIfaceReasonCode.INVALID_IE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_IE;
-            case StaIfaceReasonCode.MICHAEL_MIC_FAILURE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MICHAEL_MIC_FAILURE;
-            case StaIfaceReasonCode.FOURWAY_HANDSHAKE_TIMEOUT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.FOURWAY_HANDSHAKE_TIMEOUT;
-            case StaIfaceReasonCode.GROUP_KEY_UPDATE_TIMEOUT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.GROUP_KEY_UPDATE_TIMEOUT;
-            case StaIfaceReasonCode.IE_IN_4WAY_DIFFERS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.IE_IN_4WAY_DIFFERS;
-            case StaIfaceReasonCode.GROUP_CIPHER_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.GROUP_CIPHER_NOT_VALID;
-            case StaIfaceReasonCode.PAIRWISE_CIPHER_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.PAIRWISE_CIPHER_NOT_VALID;
-            case StaIfaceReasonCode.AKMP_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.AKMP_NOT_VALID;
-            case StaIfaceReasonCode.UNSUPPORTED_RSN_IE_VERSION:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.UNSUPPORTED_RSN_IE_VERSION;
-            case StaIfaceReasonCode.INVALID_RSN_IE_CAPAB:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_RSN_IE_CAPAB;
-            case StaIfaceReasonCode.IEEE_802_1X_AUTH_FAILED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.IEEE_802_1X_AUTH_FAILED;
-            case StaIfaceReasonCode.CIPHER_SUITE_REJECTED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.CIPHER_SUITE_REJECTED;
-            case StaIfaceReasonCode.TDLS_TEARDOWN_UNREACHABLE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.TDLS_TEARDOWN_UNREACHABLE;
-            case StaIfaceReasonCode.TDLS_TEARDOWN_UNSPECIFIED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.TDLS_TEARDOWN_UNSPECIFIED;
-            case StaIfaceReasonCode.SSP_REQUESTED_DISASSOC:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.SSP_REQUESTED_DISASSOC;
-            case StaIfaceReasonCode.NO_SSP_ROAMING_AGREEMENT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.NO_SSP_ROAMING_AGREEMENT;
-            case StaIfaceReasonCode.BAD_CIPHER_OR_AKM:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.BAD_CIPHER_OR_AKM;
-            case StaIfaceReasonCode.NOT_AUTHORIZED_THIS_LOCATION:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.NOT_AUTHORIZED_THIS_LOCATION;
-            case StaIfaceReasonCode.SERVICE_CHANGE_PRECLUDES_TS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.SERVICE_CHANGE_PRECLUDES_TS;
-            case StaIfaceReasonCode.UNSPECIFIED_QOS_REASON:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.UNSPECIFIED_QOS_REASON;
-            case StaIfaceReasonCode.NOT_ENOUGH_BANDWIDTH:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.NOT_ENOUGH_BANDWIDTH;
-            case StaIfaceReasonCode.DISASSOC_LOW_ACK:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.DISASSOC_LOW_ACK;
-            case StaIfaceReasonCode.EXCEEDED_TXOP:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.EXCEEDED_TXOP;
-            case StaIfaceReasonCode.STA_LEAVING:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.STA_LEAVING;
-            case StaIfaceReasonCode.END_TS_BA_DLS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.END_TS_BA_DLS;
-            case StaIfaceReasonCode.UNKNOWN_TS_BA:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.UNKNOWN_TS_BA;
-            case StaIfaceReasonCode.TIMEOUT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.TIMEOUT;
-            case StaIfaceReasonCode.PEERKEY_MISMATCH:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.PEERKEY_MISMATCH;
-            case StaIfaceReasonCode.AUTHORIZED_ACCESS_LIMIT_REACHED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.AUTHORIZED_ACCESS_LIMIT_REACHED;
-            case StaIfaceReasonCode.EXTERNAL_SERVICE_REQUIREMENTS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.EXTERNAL_SERVICE_REQUIREMENTS;
-            case StaIfaceReasonCode.INVALID_FT_ACTION_FRAME_COUNT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_FT_ACTION_FRAME_COUNT;
-            case StaIfaceReasonCode.INVALID_PMKID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_PMKID;
-            case StaIfaceReasonCode.INVALID_MDE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_MDE;
-            case StaIfaceReasonCode.INVALID_FTE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_FTE;
-            case StaIfaceReasonCode.MESH_PEERING_CANCELLED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_PEERING_CANCELLED;
-            case StaIfaceReasonCode.MESH_MAX_PEERS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_MAX_PEERS;
-            case StaIfaceReasonCode.MESH_CONFIG_POLICY_VIOLATION:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_CONFIG_POLICY_VIOLATION;
-            case StaIfaceReasonCode.MESH_CLOSE_RCVD:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_CLOSE_RCVD;
-            case StaIfaceReasonCode.MESH_MAX_RETRIES:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_MAX_RETRIES;
-            case StaIfaceReasonCode.MESH_CONFIRM_TIMEOUT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_CONFIRM_TIMEOUT;
-            case StaIfaceReasonCode.MESH_INVALID_GTK:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_INVALID_GTK;
-            case StaIfaceReasonCode.MESH_INCONSISTENT_PARAMS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_INCONSISTENT_PARAMS;
-            case StaIfaceReasonCode.MESH_INVALID_SECURITY_CAP:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_INVALID_SECURITY_CAP;
-            case StaIfaceReasonCode.MESH_PATH_ERROR_NO_PROXY_INFO:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_PATH_ERROR_NO_PROXY_INFO;
-            case StaIfaceReasonCode.MESH_PATH_ERROR_NO_FORWARDING_INFO:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_PATH_ERROR_NO_FORWARDING_INFO;
-            case StaIfaceReasonCode.MESH_PATH_ERROR_DEST_UNREACHABLE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_PATH_ERROR_DEST_UNREACHABLE;
-            case StaIfaceReasonCode.MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS;
-            case StaIfaceReasonCode.MESH_CHANNEL_SWITCH_REGULATORY_REQ:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_CHANNEL_SWITCH_REGULATORY_REQ;
-            case StaIfaceReasonCode.MESH_CHANNEL_SWITCH_UNSPECIFIED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_CHANNEL_SWITCH_UNSPECIFIED;
-            default:
-                Log.e(TAG, "Invalid reason code received");
-                return -1;
-        }
-    }
-
-    protected static int halToFrameworkStatusCode(int reason) {
-        switch (reason) {
-            case StaIfaceStatusCode.SUCCESS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.SUCCESS;
-            case StaIfaceStatusCode.UNSPECIFIED_FAILURE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNSPECIFIED_FAILURE;
-            case StaIfaceStatusCode.TDLS_WAKEUP_ALTERNATE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TDLS_WAKEUP_ALTERNATE;
-            case StaIfaceStatusCode.TDLS_WAKEUP_REJECT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TDLS_WAKEUP_REJECT;
-            case StaIfaceStatusCode.SECURITY_DISABLED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.SECURITY_DISABLED;
-            case StaIfaceStatusCode.UNACCEPTABLE_LIFETIME:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNACCEPTABLE_LIFETIME;
-            case StaIfaceStatusCode.NOT_IN_SAME_BSS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.NOT_IN_SAME_BSS;
-            case StaIfaceStatusCode.CAPS_UNSUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.CAPS_UNSUPPORTED;
-            case StaIfaceStatusCode.REASSOC_NO_ASSOC:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REASSOC_NO_ASSOC;
-            case StaIfaceStatusCode.ASSOC_DENIED_UNSPEC:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_UNSPEC;
-            case StaIfaceStatusCode.NOT_SUPPORTED_AUTH_ALG:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.NOT_SUPPORTED_AUTH_ALG;
-            case StaIfaceStatusCode.UNKNOWN_AUTH_TRANSACTION:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNKNOWN_AUTH_TRANSACTION;
-            case StaIfaceStatusCode.CHALLENGE_FAIL:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.CHALLENGE_FAIL;
-            case StaIfaceStatusCode.AUTH_TIMEOUT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.AUTH_TIMEOUT;
-            case StaIfaceStatusCode.AP_UNABLE_TO_HANDLE_NEW_STA:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.AP_UNABLE_TO_HANDLE_NEW_STA;
-            case StaIfaceStatusCode.ASSOC_DENIED_RATES:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_RATES;
-            case StaIfaceStatusCode.ASSOC_DENIED_NOSHORT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_NOSHORT;
-            case StaIfaceStatusCode.SPEC_MGMT_REQUIRED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.SPEC_MGMT_REQUIRED;
-            case StaIfaceStatusCode.PWR_CAPABILITY_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.PWR_CAPABILITY_NOT_VALID;
-            case StaIfaceStatusCode.SUPPORTED_CHANNEL_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.SUPPORTED_CHANNEL_NOT_VALID;
-            case StaIfaceStatusCode.ASSOC_DENIED_NO_SHORT_SLOT_TIME:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_NO_SHORT_SLOT_TIME;
-            case StaIfaceStatusCode.ASSOC_DENIED_NO_HT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_NO_HT;
-            case StaIfaceStatusCode.R0KH_UNREACHABLE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.R0KH_UNREACHABLE;
-            case StaIfaceStatusCode.ASSOC_DENIED_NO_PCO:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_NO_PCO;
-            case StaIfaceStatusCode.ASSOC_REJECTED_TEMPORARILY:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_REJECTED_TEMPORARILY;
-            case StaIfaceStatusCode.ROBUST_MGMT_FRAME_POLICY_VIOLATION:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ROBUST_MGMT_FRAME_POLICY_VIOLATION;
-            case StaIfaceStatusCode.UNSPECIFIED_QOS_FAILURE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNSPECIFIED_QOS_FAILURE;
-            case StaIfaceStatusCode.DENIED_INSUFFICIENT_BANDWIDTH:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DENIED_INSUFFICIENT_BANDWIDTH;
-            case StaIfaceStatusCode.DENIED_POOR_CHANNEL_CONDITIONS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DENIED_POOR_CHANNEL_CONDITIONS;
-            case StaIfaceStatusCode.DENIED_QOS_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DENIED_QOS_NOT_SUPPORTED;
-            case StaIfaceStatusCode.REQUEST_DECLINED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQUEST_DECLINED;
-            case StaIfaceStatusCode.INVALID_PARAMETERS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_PARAMETERS;
-            case StaIfaceStatusCode.REJECTED_WITH_SUGGESTED_CHANGES:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REJECTED_WITH_SUGGESTED_CHANGES;
-            case StaIfaceStatusCode.INVALID_IE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_IE;
-            case StaIfaceStatusCode.GROUP_CIPHER_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.GROUP_CIPHER_NOT_VALID;
-            case StaIfaceStatusCode.PAIRWISE_CIPHER_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.PAIRWISE_CIPHER_NOT_VALID;
-            case StaIfaceStatusCode.AKMP_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.AKMP_NOT_VALID;
-            case StaIfaceStatusCode.UNSUPPORTED_RSN_IE_VERSION:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNSUPPORTED_RSN_IE_VERSION;
-            case StaIfaceStatusCode.INVALID_RSN_IE_CAPAB:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_RSN_IE_CAPAB;
-            case StaIfaceStatusCode.CIPHER_REJECTED_PER_POLICY:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.CIPHER_REJECTED_PER_POLICY;
-            case StaIfaceStatusCode.TS_NOT_CREATED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TS_NOT_CREATED;
-            case StaIfaceStatusCode.DIRECT_LINK_NOT_ALLOWED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DIRECT_LINK_NOT_ALLOWED;
-            case StaIfaceStatusCode.DEST_STA_NOT_PRESENT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DEST_STA_NOT_PRESENT;
-            case StaIfaceStatusCode.DEST_STA_NOT_QOS_STA:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DEST_STA_NOT_QOS_STA;
-            case StaIfaceStatusCode.ASSOC_DENIED_LISTEN_INT_TOO_LARGE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_LISTEN_INT_TOO_LARGE;
-            case StaIfaceStatusCode.INVALID_FT_ACTION_FRAME_COUNT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_FT_ACTION_FRAME_COUNT;
-            case StaIfaceStatusCode.INVALID_PMKID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_PMKID;
-            case StaIfaceStatusCode.INVALID_MDIE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_MDIE;
-            case StaIfaceStatusCode.INVALID_FTIE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_FTIE;
-            case StaIfaceStatusCode.REQUESTED_TCLAS_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQUESTED_TCLAS_NOT_SUPPORTED;
-            case StaIfaceStatusCode.INSUFFICIENT_TCLAS_PROCESSING_RESOURCES:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode
-                        .INSUFFICIENT_TCLAS_PROCESSING_RESOURCES;
-            case StaIfaceStatusCode.TRY_ANOTHER_BSS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TRY_ANOTHER_BSS;
-            case StaIfaceStatusCode.GAS_ADV_PROTO_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.GAS_ADV_PROTO_NOT_SUPPORTED;
-            case StaIfaceStatusCode.NO_OUTSTANDING_GAS_REQ:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.NO_OUTSTANDING_GAS_REQ;
-            case StaIfaceStatusCode.GAS_RESP_NOT_RECEIVED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.GAS_RESP_NOT_RECEIVED;
-            case StaIfaceStatusCode.STA_TIMED_OUT_WAITING_FOR_GAS_RESP:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.STA_TIMED_OUT_WAITING_FOR_GAS_RESP;
-            case StaIfaceStatusCode.GAS_RESP_LARGER_THAN_LIMIT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.GAS_RESP_LARGER_THAN_LIMIT;
-            case StaIfaceStatusCode.REQ_REFUSED_HOME:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQ_REFUSED_HOME;
-            case StaIfaceStatusCode.ADV_SRV_UNREACHABLE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ADV_SRV_UNREACHABLE;
-            case StaIfaceStatusCode.REQ_REFUSED_SSPN:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQ_REFUSED_SSPN;
-            case StaIfaceStatusCode.REQ_REFUSED_UNAUTH_ACCESS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQ_REFUSED_UNAUTH_ACCESS;
-            case StaIfaceStatusCode.INVALID_RSNIE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_RSNIE;
-            case StaIfaceStatusCode.U_APSD_COEX_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.U_APSD_COEX_NOT_SUPPORTED;
-            case StaIfaceStatusCode.U_APSD_COEX_MODE_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.U_APSD_COEX_MODE_NOT_SUPPORTED;
-            case StaIfaceStatusCode.BAD_INTERVAL_WITH_U_APSD_COEX:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.BAD_INTERVAL_WITH_U_APSD_COEX;
-            case StaIfaceStatusCode.ANTI_CLOGGING_TOKEN_REQ:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ANTI_CLOGGING_TOKEN_REQ;
-            case StaIfaceStatusCode.FINITE_CYCLIC_GROUP_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.FINITE_CYCLIC_GROUP_NOT_SUPPORTED;
-            case StaIfaceStatusCode.CANNOT_FIND_ALT_TBTT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.CANNOT_FIND_ALT_TBTT;
-            case StaIfaceStatusCode.TRANSMISSION_FAILURE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TRANSMISSION_FAILURE;
-            case StaIfaceStatusCode.REQ_TCLAS_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQ_TCLAS_NOT_SUPPORTED;
-            case StaIfaceStatusCode.TCLAS_RESOURCES_EXCHAUSTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TCLAS_RESOURCES_EXCHAUSTED;
-            case StaIfaceStatusCode.REJECTED_WITH_SUGGESTED_BSS_TRANSITION:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode
-                        .REJECTED_WITH_SUGGESTED_BSS_TRANSITION;
-            case StaIfaceStatusCode.REJECT_WITH_SCHEDULE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REJECT_WITH_SCHEDULE;
-            case StaIfaceStatusCode.REJECT_NO_WAKEUP_SPECIFIED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REJECT_NO_WAKEUP_SPECIFIED;
-            case StaIfaceStatusCode.SUCCESS_POWER_SAVE_MODE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.SUCCESS_POWER_SAVE_MODE;
-            case StaIfaceStatusCode.PENDING_ADMITTING_FST_SESSION:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.PENDING_ADMITTING_FST_SESSION;
-            case StaIfaceStatusCode.PERFORMING_FST_NOW:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.PERFORMING_FST_NOW;
-            case StaIfaceStatusCode.PENDING_GAP_IN_BA_WINDOW:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.PENDING_GAP_IN_BA_WINDOW;
-            case StaIfaceStatusCode.REJECT_U_PID_SETTING:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REJECT_U_PID_SETTING;
-            case StaIfaceStatusCode.REFUSED_EXTERNAL_REASON:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REFUSED_EXTERNAL_REASON;
-            case StaIfaceStatusCode.REFUSED_AP_OUT_OF_MEMORY:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REFUSED_AP_OUT_OF_MEMORY;
-            case StaIfaceStatusCode.REJECTED_EMERGENCY_SERVICE_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode
-                        .REJECTED_EMERGENCY_SERVICE_NOT_SUPPORTED;
-            case StaIfaceStatusCode.QUERY_RESP_OUTSTANDING:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.QUERY_RESP_OUTSTANDING;
-            case StaIfaceStatusCode.REJECT_DSE_BAND:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REJECT_DSE_BAND;
-            case StaIfaceStatusCode.TCLAS_PROCESSING_TERMINATED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TCLAS_PROCESSING_TERMINATED;
-            case StaIfaceStatusCode.TS_SCHEDULE_CONFLICT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TS_SCHEDULE_CONFLICT;
-            case StaIfaceStatusCode.DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode
-                        .DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL;
-            case StaIfaceStatusCode.MCCAOP_RESERVATION_CONFLICT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.MCCAOP_RESERVATION_CONFLICT;
-            case StaIfaceStatusCode.MAF_LIMIT_EXCEEDED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.MAF_LIMIT_EXCEEDED;
-            case StaIfaceStatusCode.MCCA_TRACK_LIMIT_EXCEEDED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.MCCA_TRACK_LIMIT_EXCEEDED;
-            case StaIfaceStatusCode.DENIED_DUE_TO_SPECTRUM_MANAGEMENT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DENIED_DUE_TO_SPECTRUM_MANAGEMENT;
-            case StaIfaceStatusCode.ASSOC_DENIED_NO_VHT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_NO_VHT;
-            case StaIfaceStatusCode.ENABLEMENT_DENIED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ENABLEMENT_DENIED;
-            case StaIfaceStatusCode.RESTRICTION_FROM_AUTHORIZED_GDB:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.RESTRICTION_FROM_AUTHORIZED_GDB;
-            case StaIfaceStatusCode.AUTHORIZATION_DEENABLED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.AUTHORIZATION_DEENABLED;
-            case StaIfaceStatusCode.FILS_AUTHENTICATION_FAILURE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.FILS_AUTHENTICATION_FAILURE;
-            case StaIfaceStatusCode.UNKNOWN_AUTHENTICATION_SERVER:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNKNOWN_AUTHENTICATION_SERVER;
-            default:
-                Log.e(TAG, "Invalid status code received");
-                return -1;
-        }
-    }
-
-    private static @SupplicantEventCode int halAuxiliaryEventToFrameworkSupplicantEventCode(
-            int eventCode) {
-        switch (eventCode) {
-            case AuxiliarySupplicantEventCode.EAP_METHOD_SELECTED:
-                return SupplicantStaIfaceHal.SUPPLICANT_EVENT_EAP_METHOD_SELECTED;
-            case AuxiliarySupplicantEventCode.SSID_TEMP_DISABLED:
-                return SupplicantStaIfaceHal.SUPPLICANT_EVENT_SSID_TEMP_DISABLED;
-            case AuxiliarySupplicantEventCode.OPEN_SSL_FAILURE:
-                return SupplicantStaIfaceHal.SUPPLICANT_EVENT_OPEN_SSL_FAILURE;
-            default:
-                Log.e(TAG, "Invalid auxiliary event code received");
-                return -1;
-        }
-    }
-
-    @Override
-    public void onBssTmHandlingDone(BssTmData tmData) {
-        MboOceController.BtmFrameData btmFrmData = new MboOceController.BtmFrameData();
-
-        btmFrmData.mStatus = halToFrameworkBtmResponseStatus(tmData.status);
-        btmFrmData.mBssTmDataFlagsMask = halToFrameworkBssTmDataFlagsMask(tmData.flags);
-        btmFrmData.mBlockListDurationMs = tmData.assocRetryDelayMs;
-        if ((tmData.flags & BssTmDataFlagsMask.MBO_TRANSITION_REASON_CODE_INCLUDED) != 0) {
-            btmFrmData.mTransitionReason = halToFrameworkMboTransitionReason(
-                    tmData.mboTransitionReason);
-        }
-        if ((tmData.flags
-                & BssTmDataFlagsMask.MBO_CELLULAR_DATA_CONNECTION_PREFERENCE_INCLUDED) != 0) {
-            btmFrmData.mCellPreference =
-                    halToFrameworkMboCellularDataConnectionPreference(tmData.mboCellPreference);
-        }
-        mStaIfaceHal.logCallback(
-                "onBssTmHandlingDone: Handle BTM handling event");
-        mWifiMonitor.broadcastBssTmHandlingDoneEvent(mIfaceName, btmFrmData);
-    }
-
-    @Override
-    public void onHs20TermsAndConditionsAcceptanceRequestedNotification(byte[/* 6 */] bssid,
-            String url) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onHs20TermsAndConditionsAcceptanceRequestedNotification");
-            mWifiMonitor.broadcastWnmEvent(mIfaceName,
-                    WnmData.createTermsAndConditionsAccetanceRequiredEvent(
-                            NativeUtil.macAddressToLong(bssid), url));
-        }
-    }
-
-    @Override
-    public void onNetworkNotFound(byte[] ssid) {
-        mStaIfaceHal.logCallback("onNetworkNotFoundNotification");
-        mWifiMonitor.broadcastNetworkNotFoundEvent(mIfaceName,
-                NativeUtil.encodeSsid(NativeUtil.byteArrayToArrayList(ssid)));
-    }
-
-    @Override
-    public void onQosPolicyReset() {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onQosPolicyReset");
-            mWifiMonitor.broadcastQosPolicyResetEvent(mIfaceName);
-        }
-    }
-
-    @Override
-    public void onQosPolicyRequest(int qosPolicyRequestId, QosPolicyData[] qosPolicyData) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onQosPolicyRequest");
-            // Convert QoS policies from HAL to framework representation.
-            List<QosPolicyRequest> frameworkQosPolicies = new ArrayList();
-            if (qosPolicyData != null) {
-                for (QosPolicyData halPolicy : qosPolicyData) {
-                    frameworkQosPolicies.add(
-                            SupplicantStaIfaceHalAidlImpl.halToFrameworkQosPolicy(halPolicy));
-                }
-            }
-            mWifiMonitor.broadcastQosPolicyRequestEvent(mIfaceName, qosPolicyRequestId,
-                    frameworkQosPolicies);
-        }
-    }
-
-    @Override
-    public void onAuxiliarySupplicantEvent(int eventCode, byte[] bssid,
-            String reasonString) {
-        synchronized (mLock) {
-            @SupplicantEventCode int supplicantEventCode =
-                    halAuxiliaryEventToFrameworkSupplicantEventCode(eventCode);
-            mStaIfaceHal.logCallback("onAuxiliarySupplicantEvent event=" + supplicantEventCode);
-            if (supplicantEventCode != -1) {
-                try {
-                    mWifiMonitor.broadcastAuxiliarySupplicantEvent(mIfaceName, supplicantEventCode,
-                            MacAddress.fromBytes(bssid), reasonString);
-                } catch (IllegalArgumentException e) {
-                    Log.i(TAG, "Invalid bssid received");
-                }
-            }
-        }
-    }
-
-    @Override
-    public String getInterfaceHash() {
-        return ISupplicantStaIfaceCallback.HASH;
-    }
-
-    @Override
-    public int getInterfaceVersion() {
-        return ISupplicantStaIfaceCallback.VERSION;
-    }
-}
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlImpl.java b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlImpl.java
deleted file mode 100644
index ffbdcce..0000000
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlImpl.java
+++ /dev/null
@@ -1,816 +0,0 @@
-/*
- * 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.server.wifi;
-
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQP3GPPNetwork;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPDomName;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPIPAddrAvailability;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPNAIRealm;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPRoamingConsortium;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPVenueName;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPVenueUrl;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSConnCapability;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSFriendlyName;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSOSUProviders;
-import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSWANMetrics;
-
-import android.annotation.NonNull;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback;
-import android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.MboAssocDisallowedReasonCode;
-import android.net.MacAddress;
-import android.net.wifi.SecurityParams;
-import android.net.wifi.SupplicantState;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiManager;
-import android.net.wifi.WifiSsid;
-import android.util.Log;
-
-import com.android.server.wifi.hotspot2.AnqpEvent;
-import com.android.server.wifi.hotspot2.IconEvent;
-import com.android.server.wifi.hotspot2.WnmData;
-import com.android.server.wifi.hotspot2.anqp.ANQPElement;
-import com.android.server.wifi.hotspot2.anqp.ANQPParser;
-import com.android.server.wifi.hotspot2.anqp.Constants;
-import com.android.server.wifi.util.NativeUtil;
-
-import java.io.IOException;
-import java.nio.BufferUnderflowException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-
-abstract class SupplicantStaIfaceCallbackHidlImpl extends ISupplicantStaIfaceCallback.Stub {
-    private static final String TAG = SupplicantStaIfaceCallbackHidlImpl.class.getSimpleName();
-    private final SupplicantStaIfaceHalHidlImpl mStaIfaceHal;
-    private final String mIfaceName;
-    private final Object mLock;
-    private final WifiMonitor mWifiMonitor;
-    // Used to help check for PSK password mismatch & EAP connection failure.
-    private int mStateBeforeDisconnect = State.INACTIVE;
-    private String mCurrentSsid = null;
-
-    SupplicantStaIfaceCallbackHidlImpl(@NonNull SupplicantStaIfaceHalHidlImpl staIfaceHal,
-            @NonNull String ifaceName,
-            @NonNull Object lock,
-            @NonNull WifiMonitor wifiMonitor) {
-        mStaIfaceHal = staIfaceHal;
-        mIfaceName = ifaceName;
-        mLock = lock;
-        mWifiMonitor = wifiMonitor;
-    }
-
-    /**
-     * Converts the supplicant state received from HIDL to the equivalent framework state.
-     */
-    protected static SupplicantState supplicantHidlStateToFrameworkState(int state) {
-        switch (state) {
-            case ISupplicantStaIfaceCallback.State.DISCONNECTED:
-                return SupplicantState.DISCONNECTED;
-            case ISupplicantStaIfaceCallback.State.IFACE_DISABLED:
-                return SupplicantState.INTERFACE_DISABLED;
-            case ISupplicantStaIfaceCallback.State.INACTIVE:
-                return SupplicantState.INACTIVE;
-            case ISupplicantStaIfaceCallback.State.SCANNING:
-                return SupplicantState.SCANNING;
-            case ISupplicantStaIfaceCallback.State.AUTHENTICATING:
-                return SupplicantState.AUTHENTICATING;
-            case ISupplicantStaIfaceCallback.State.ASSOCIATING:
-                return SupplicantState.ASSOCIATING;
-            case ISupplicantStaIfaceCallback.State.ASSOCIATED:
-                return SupplicantState.ASSOCIATED;
-            case ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE:
-                return SupplicantState.FOUR_WAY_HANDSHAKE;
-            case ISupplicantStaIfaceCallback.State.GROUP_HANDSHAKE:
-                return SupplicantState.GROUP_HANDSHAKE;
-            case ISupplicantStaIfaceCallback.State.COMPLETED:
-                return SupplicantState.COMPLETED;
-            default:
-                throw new IllegalArgumentException("Invalid state: " + state);
-        }
-    }
-
-
-    /**
-     * Parses the provided payload into an ANQP element.
-     *
-     * @param infoID  Element type.
-     * @param payload Raw payload bytes.
-     * @return AnqpElement instance on success, null on failure.
-     */
-    private ANQPElement parseAnqpElement(Constants.ANQPElementType infoID,
-                                         ArrayList<Byte> payload) {
-        synchronized (mLock) {
-            try {
-                return Constants.getANQPElementID(infoID) != null
-                        ? ANQPParser.parseElement(
-                        infoID, ByteBuffer.wrap(NativeUtil.byteArrayFromArrayList(payload)))
-                        : ANQPParser.parseHS20Element(
-                        infoID, ByteBuffer.wrap(NativeUtil.byteArrayFromArrayList(payload)));
-            } catch (IOException | BufferUnderflowException e) {
-                Log.e(TAG, "Failed parsing ANQP element payload: " + infoID, e);
-                return null;
-            }
-        }
-    }
-
-    /**
-     * Parse the ANQP element data and add to the provided elements map if successful.
-     *
-     * @param elementsMap Map to add the parsed out element to.
-     * @param infoID  Element type.
-     * @param payload Raw payload bytes.
-     */
-    private void addAnqpElementToMap(Map<Constants.ANQPElementType, ANQPElement> elementsMap,
-                                     Constants.ANQPElementType infoID,
-                                     ArrayList<Byte> payload) {
-        synchronized (mLock) {
-            if (payload == null || payload.isEmpty()) return;
-            ANQPElement element = parseAnqpElement(infoID, payload);
-            if (element != null) {
-                elementsMap.put(infoID, element);
-            }
-        }
-    }
-
-    @Override
-    public void onNetworkAdded(int id) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onNetworkAdded id=" + id);
-        }
-    }
-
-    @Override
-    public void onNetworkRemoved(int id) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onNetworkRemoved id=" + id);
-            // Reset state since network has been removed.
-            mStateBeforeDisconnect = State.INACTIVE;
-        }
-    }
-
-    /**
-     * Added to plumb the new {@code filsHlpSent} param from the V1.3 callback version.
-     */
-    public void onStateChanged(int newState, byte[/* 6 */] bssid, int id, ArrayList<Byte> ssid,
-            boolean filsHlpSent) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onStateChanged");
-            SupplicantState newSupplicantState =
-                    supplicantHidlStateToFrameworkState(newState);
-            WifiSsid wifiSsid =
-                    WifiSsid.fromBytes(NativeUtil.byteArrayFromArrayList(ssid));
-            String bssidStr = NativeUtil.macAddressFromByteArray(bssid);
-            if (newState != State.DISCONNECTED) {
-                // onStateChanged(DISCONNECTED) may come before onDisconnected(), so add this
-                // cache to track the state before the disconnect.
-                mStateBeforeDisconnect = newState;
-            }
-
-            if (newState == State.ASSOCIATING || newState == State.ASSOCIATED
-                    || newState == State.COMPLETED) {
-                mStaIfaceHal.updateOnLinkedNetworkRoaming(mIfaceName, id, false);
-            }
-
-            if (newState == State.COMPLETED) {
-                mWifiMonitor.broadcastNetworkConnectionEvent(
-                        mIfaceName, mStaIfaceHal.getCurrentNetworkId(mIfaceName), filsHlpSent,
-                        wifiSsid, bssidStr);
-            } else if (newState == State.ASSOCIATING) {
-                mCurrentSsid = NativeUtil.encodeSsid(ssid);
-            }
-            mWifiMonitor.broadcastSupplicantStateChangeEvent(
-                    mIfaceName, mStaIfaceHal.getCurrentNetworkId(mIfaceName), wifiSsid,
-                    bssidStr, newSupplicantState);
-        }
-    }
-
-    @Override
-    public void onStateChanged(int newState, byte[/* 6 */] bssid, int id, ArrayList<Byte> ssid) {
-        onStateChanged(newState, bssid, id, ssid, false);
-    }
-
-    public void onAnqpQueryDone(byte[/* 6 */] bssid,
-            ISupplicantStaIfaceCallback.AnqpData data,
-            ISupplicantStaIfaceCallback.Hs20AnqpData hs20Data,
-            android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.AnqpData dataV14) {
-        Map<Constants.ANQPElementType, ANQPElement> elementsMap = new HashMap<>();
-        addAnqpElementToMap(elementsMap, ANQPVenueName, data.venueName);
-        addAnqpElementToMap(elementsMap, ANQPRoamingConsortium, data.roamingConsortium);
-        addAnqpElementToMap(
-                elementsMap, ANQPIPAddrAvailability, data.ipAddrTypeAvailability);
-        addAnqpElementToMap(elementsMap, ANQPNAIRealm, data.naiRealm);
-        addAnqpElementToMap(elementsMap, ANQP3GPPNetwork, data.anqp3gppCellularNetwork);
-        addAnqpElementToMap(elementsMap, ANQPDomName, data.domainName);
-        if (dataV14 != null) {
-            addAnqpElementToMap(elementsMap, ANQPVenueUrl, dataV14.venueUrl);
-        }
-        addAnqpElementToMap(elementsMap, HSFriendlyName, hs20Data.operatorFriendlyName);
-        addAnqpElementToMap(elementsMap, HSWANMetrics, hs20Data.wanMetrics);
-        addAnqpElementToMap(elementsMap, HSConnCapability, hs20Data.connectionCapability);
-        addAnqpElementToMap(elementsMap, HSOSUProviders, hs20Data.osuProvidersList);
-        mWifiMonitor.broadcastAnqpDoneEvent(
-                mIfaceName, new AnqpEvent(NativeUtil.macAddressToLong(bssid), elementsMap));
-    }
-    @Override
-    public void onAnqpQueryDone(byte[/* 6 */] bssid,
-                                ISupplicantStaIfaceCallback.AnqpData data,
-                                ISupplicantStaIfaceCallback.Hs20AnqpData hs20Data) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onAnqpQueryDone");
-            onAnqpQueryDone(bssid, data, hs20Data, null /* v1.4 element */);
-        }
-    }
-
-    @Override
-    public void onHs20IconQueryDone(byte[/* 6 */] bssid, String fileName,
-                                    ArrayList<Byte> data) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onHs20IconQueryDone");
-            mWifiMonitor.broadcastIconDoneEvent(
-                    mIfaceName,
-                    new IconEvent(NativeUtil.macAddressToLong(bssid), fileName, data.size(),
-                            NativeUtil.byteArrayFromArrayList(data)));
-        }
-    }
-
-    @Override
-    public void onHs20SubscriptionRemediation(byte[/* 6 */] bssid, byte osuMethod, String url) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onHs20SubscriptionRemediation");
-            mWifiMonitor.broadcastWnmEvent(
-                    mIfaceName,
-                    WnmData.createRemediationEvent(NativeUtil.macAddressToLong(bssid), url,
-                            osuMethod));
-        }
-    }
-
-    @Override
-    public void onHs20DeauthImminentNotice(byte[/* 6 */] bssid, int reasonCode,
-                                           int reAuthDelayInSec, String url) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onHs20DeauthImminentNotice");
-            mWifiMonitor.broadcastWnmEvent(
-                    mIfaceName,
-                    WnmData.createDeauthImminentEvent(NativeUtil.macAddressToLong(bssid), url,
-                            reasonCode == WnmData.ESS, reAuthDelayInSec));
-        }
-    }
-
-    @Override
-    public void onDisconnected(byte[/* 6 */] bssid, boolean locallyGenerated, int reasonCode) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onDisconnected");
-            if (mStaIfaceHal.isVerboseLoggingEnabled()) {
-                Log.e(TAG, "onDisconnected state=" + mStateBeforeDisconnect
-                        + " locallyGenerated=" + locallyGenerated
-                        + " reasonCode=" + reasonCode);
-            }
-            WifiConfiguration curConfiguration =
-                    mStaIfaceHal.getCurrentNetworkLocalConfig(mIfaceName);
-            if (curConfiguration != null) {
-                if (mStateBeforeDisconnect == State.FOURWAY_HANDSHAKE
-                        && WifiConfigurationUtil.isConfigForPskNetwork(curConfiguration)
-                        && (!locallyGenerated || reasonCode != ReasonCode.IE_IN_4WAY_DIFFERS)) {
-                    mWifiMonitor.broadcastAuthenticationFailureEvent(
-                            mIfaceName, WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1,
-                            mCurrentSsid, MacAddress.fromBytes(bssid));
-                } else if (mStateBeforeDisconnect == State.ASSOCIATED
-                        && WifiConfigurationUtil.isConfigForEapNetwork(curConfiguration)) {
-                    mWifiMonitor.broadcastAuthenticationFailureEvent(
-                            mIfaceName, WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE, -1,
-                            mCurrentSsid, MacAddress.fromBytes(bssid));
-                }
-            }
-            mWifiMonitor.broadcastNetworkDisconnectionEvent(
-                    mIfaceName, locallyGenerated, halToFrameworkReasonCode(reasonCode),
-                    mCurrentSsid, NativeUtil.macAddressFromByteArray(bssid));
-        }
-    }
-
-    private void handleAssocRejectEvent(AssocRejectEventInfo assocRejectInfo) {
-        boolean isWrongPwd = false;
-        WifiConfiguration curConfiguration =
-                mStaIfaceHal.getCurrentNetworkLocalConfig(mIfaceName);
-        if (curConfiguration != null) {
-            if (!assocRejectInfo.timedOut) {
-                Log.d(TAG, "flush PMK cache due to association rejection for config id "
-                        + curConfiguration.networkId + ".");
-                mStaIfaceHal.removePmkCacheEntry(curConfiguration.networkId);
-            }
-            // Special handling for WPA3-Personal networks. If the password is
-            // incorrect, the AP will send association rejection, with status code 1
-            // (unspecified failure). In SAE networks, the password authentication
-            // is not related to the 4-way handshake. In this case, we will send an
-            // authentication failure event up.
-            if (assocRejectInfo.statusCode
-                    == SupplicantStaIfaceHal.StaIfaceStatusCode.UNSPECIFIED_FAILURE) {
-                // Network Selection status is guaranteed to be initialized
-                SecurityParams params = curConfiguration.getNetworkSelectionStatus()
-                        .getCandidateSecurityParams();
-                if (params != null
-                        && params.getSecurityType() == WifiConfiguration.SECURITY_TYPE_SAE) {
-                    // If this is ever connected, the password should be correct.
-                    isWrongPwd = !curConfiguration.getNetworkSelectionStatus().hasEverConnected();
-                    if (isWrongPwd) {
-                        mStaIfaceHal.logCallback("SAE incorrect password");
-                    } else {
-                        mStaIfaceHal.logCallback("SAE association rejection");
-                    }
-                }
-            } else if (assocRejectInfo.statusCode
-                    == SupplicantStaIfaceHal.StaIfaceStatusCode.CHALLENGE_FAIL
-                    && WifiConfigurationUtil.isConfigForWepNetwork(curConfiguration)) {
-                mStaIfaceHal.logCallback("WEP incorrect password");
-                isWrongPwd = true;
-            }
-        }
-
-        if (isWrongPwd) {
-            MacAddress bssidAsMacAddress;
-            try {
-                bssidAsMacAddress = MacAddress.fromString(assocRejectInfo.bssid);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Invalid bssid obtained from supplicant " + assocRejectInfo.bssid);
-                bssidAsMacAddress = WifiManager.ALL_ZEROS_MAC_ADDRESS;
-            }
-            mWifiMonitor.broadcastAuthenticationFailureEvent(
-                    mIfaceName, WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1,
-                    mCurrentSsid, bssidAsMacAddress);
-        }
-        mWifiMonitor.broadcastAssociationRejectionEvent(mIfaceName, assocRejectInfo);
-        mStateBeforeDisconnect = State.INACTIVE;
-    }
-
-    public void onAssociationRejected(android.hardware.wifi.supplicant.V1_4
-            .ISupplicantStaIfaceCallback.AssociationRejectionData assocRejectData) {
-        assocRejectData.statusCode = halToFrameworkStatusCode(assocRejectData.statusCode);
-        assocRejectData.mboAssocDisallowedReason = halToFrameworkMboAssocDisallowedReasonCode(
-                assocRejectData.mboAssocDisallowedReason);
-        AssocRejectEventInfo assocRejectInfo = new AssocRejectEventInfo(assocRejectData);
-        handleAssocRejectEvent(assocRejectInfo);
-    }
-
-    @Override
-    public void onAssociationRejected(byte[/* 6 */] bssid, int statusCode, boolean timedOut) {
-        synchronized (mLock) {
-            AssocRejectEventInfo assocRejectInfo = new AssocRejectEventInfo(
-                    mCurrentSsid,
-                    NativeUtil.macAddressFromByteArray(bssid),
-                    halToFrameworkStatusCode(statusCode), timedOut);
-            handleAssocRejectEvent(assocRejectInfo);
-        }
-    }
-
-    @Override
-    public void onAuthenticationTimeout(byte[/* 6 */] bssid) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onAuthenticationTimeout");
-            mWifiMonitor.broadcastAuthenticationFailureEvent(
-                    mIfaceName, WifiManager.ERROR_AUTH_FAILURE_TIMEOUT, -1,
-                    mCurrentSsid, MacAddress.fromBytes(bssid));
-        }
-    }
-
-    @Override
-    public void onBssidChanged(byte reason, byte[/* 6 */] bssid) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onBssidChanged");
-            if (reason == BssidChangeReason.ASSOC_START) {
-                mWifiMonitor.broadcastTargetBssidEvent(
-                        mIfaceName, NativeUtil.macAddressFromByteArray(bssid));
-            } else if (reason == BssidChangeReason.ASSOC_COMPLETE) {
-                mWifiMonitor.broadcastAssociatedBssidEvent(
-                        mIfaceName, NativeUtil.macAddressFromByteArray(bssid));
-            }
-        }
-    }
-
-    public void onEapFailure(int errorCode) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onEapFailure");
-            mWifiMonitor.broadcastAuthenticationFailureEvent(
-                    mIfaceName, WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE, errorCode, mCurrentSsid,
-                    MacAddress.BROADCAST_ADDRESS);
-            mStateBeforeDisconnect = State.INACTIVE;
-        }
-    }
-
-
-    @Override
-    public void onEapFailure() {
-        onEapFailure(-1);
-    }
-
-    @Override
-    public void onWpsEventSuccess() {
-        mStaIfaceHal.logCallback("onWpsEventSuccess");
-        synchronized (mLock) {
-            mWifiMonitor.broadcastWpsSuccessEvent(mIfaceName);
-        }
-    }
-
-    @Override
-    public void onWpsEventFail(byte[/* 6 */] bssid, short configError, short errorInd) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onWpsEventFail");
-            if (configError == WpsConfigError.MSG_TIMEOUT
-                    && errorInd == WpsErrorIndication.NO_ERROR) {
-                mWifiMonitor.broadcastWpsTimeoutEvent(mIfaceName);
-            } else {
-                mWifiMonitor.broadcastWpsFailEvent(mIfaceName, configError, errorInd);
-            }
-        }
-    }
-
-    @Override
-    public void onWpsEventPbcOverlap() {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onWpsEventPbcOverlap");
-            mWifiMonitor.broadcastWpsOverlapEvent(mIfaceName);
-        }
-    }
-
-    @Override
-    public void onExtRadioWorkStart(int id) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onExtRadioWorkStart");
-        }
-    }
-
-    @Override
-    public void onExtRadioWorkTimeout(int id) {
-        synchronized (mLock) {
-            mStaIfaceHal.logCallback("onExtRadioWorkTimeout");
-        }
-    }
-
-    private byte halToFrameworkMboAssocDisallowedReasonCode(byte reasonCode) {
-        switch (reasonCode) {
-            case MboAssocDisallowedReasonCode.RESERVED:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.RESERVED;
-            case MboAssocDisallowedReasonCode.UNSPECIFIED:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.UNSPECIFIED;
-            case MboAssocDisallowedReasonCode.MAX_NUM_STA_ASSOCIATED:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.MAX_NUM_STA_ASSOCIATED;
-            case MboAssocDisallowedReasonCode.AIR_INTERFACE_OVERLOADED:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.AIR_INTERFACE_OVERLOADED;
-            case MboAssocDisallowedReasonCode.AUTH_SERVER_OVERLOADED:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.AUTH_SERVER_OVERLOADED;
-            case MboAssocDisallowedReasonCode.INSUFFICIENT_RSSI:
-                return SupplicantStaIfaceHal.MboAssocDisallowedReasonCode.INSUFFICIENT_RSSI;
-            default:
-                Log.e(TAG, "Invalid MboAssocDisallowedReasonCode received");
-                return -1;
-        }
-    }
-
-    private int halToFrameworkReasonCode(int reason) {
-        switch (reason) {
-            case ReasonCode.UNSPECIFIED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.UNSPECIFIED;
-            case ReasonCode.PREV_AUTH_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.PREV_AUTH_NOT_VALID;
-            case ReasonCode.DEAUTH_LEAVING:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.DEAUTH_LEAVING;
-            case ReasonCode.DISASSOC_DUE_TO_INACTIVITY:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.DISASSOC_DUE_TO_INACTIVITY;
-            case ReasonCode.DISASSOC_AP_BUSY:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.DISASSOC_AP_BUSY;
-            case ReasonCode.CLASS2_FRAME_FROM_NONAUTH_STA:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.CLASS2_FRAME_FROM_NONAUTH_STA;
-            case ReasonCode.CLASS3_FRAME_FROM_NONASSOC_STA:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.CLASS3_FRAME_FROM_NONASSOC_STA;
-            case ReasonCode.DISASSOC_STA_HAS_LEFT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.DISASSOC_STA_HAS_LEFT;
-            case ReasonCode.STA_REQ_ASSOC_WITHOUT_AUTH:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.STA_REQ_ASSOC_WITHOUT_AUTH;
-            case ReasonCode.PWR_CAPABILITY_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.PWR_CAPABILITY_NOT_VALID;
-            case ReasonCode.SUPPORTED_CHANNEL_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.SUPPORTED_CHANNEL_NOT_VALID;
-            case ReasonCode.BSS_TRANSITION_DISASSOC:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.BSS_TRANSITION_DISASSOC;
-            case ReasonCode.INVALID_IE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_IE;
-            case ReasonCode.MICHAEL_MIC_FAILURE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MICHAEL_MIC_FAILURE;
-            case ReasonCode.FOURWAY_HANDSHAKE_TIMEOUT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.FOURWAY_HANDSHAKE_TIMEOUT;
-            case ReasonCode.GROUP_KEY_UPDATE_TIMEOUT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.GROUP_KEY_UPDATE_TIMEOUT;
-            case ReasonCode.IE_IN_4WAY_DIFFERS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.IE_IN_4WAY_DIFFERS;
-            case ReasonCode.GROUP_CIPHER_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.GROUP_CIPHER_NOT_VALID;
-            case ReasonCode.PAIRWISE_CIPHER_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.PAIRWISE_CIPHER_NOT_VALID;
-            case ReasonCode.AKMP_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.AKMP_NOT_VALID;
-            case ReasonCode.UNSUPPORTED_RSN_IE_VERSION:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.UNSUPPORTED_RSN_IE_VERSION;
-            case ReasonCode.INVALID_RSN_IE_CAPAB:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_RSN_IE_CAPAB;
-            case ReasonCode.IEEE_802_1X_AUTH_FAILED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.IEEE_802_1X_AUTH_FAILED;
-            case ReasonCode.CIPHER_SUITE_REJECTED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.CIPHER_SUITE_REJECTED;
-            case ReasonCode.TDLS_TEARDOWN_UNREACHABLE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.TDLS_TEARDOWN_UNREACHABLE;
-            case ReasonCode.TDLS_TEARDOWN_UNSPECIFIED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.TDLS_TEARDOWN_UNSPECIFIED;
-            case ReasonCode.SSP_REQUESTED_DISASSOC:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.SSP_REQUESTED_DISASSOC;
-            case ReasonCode.NO_SSP_ROAMING_AGREEMENT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.NO_SSP_ROAMING_AGREEMENT;
-            case ReasonCode.BAD_CIPHER_OR_AKM:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.BAD_CIPHER_OR_AKM;
-            case ReasonCode.NOT_AUTHORIZED_THIS_LOCATION:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.NOT_AUTHORIZED_THIS_LOCATION;
-            case ReasonCode.SERVICE_CHANGE_PRECLUDES_TS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.SERVICE_CHANGE_PRECLUDES_TS;
-            case ReasonCode.UNSPECIFIED_QOS_REASON:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.UNSPECIFIED_QOS_REASON;
-            case ReasonCode.NOT_ENOUGH_BANDWIDTH:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.NOT_ENOUGH_BANDWIDTH;
-            case ReasonCode.DISASSOC_LOW_ACK:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.DISASSOC_LOW_ACK;
-            case ReasonCode.EXCEEDED_TXOP:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.EXCEEDED_TXOP;
-            case ReasonCode.STA_LEAVING:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.STA_LEAVING;
-            case ReasonCode.END_TS_BA_DLS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.END_TS_BA_DLS;
-            case ReasonCode.UNKNOWN_TS_BA:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.UNKNOWN_TS_BA;
-            case ReasonCode.TIMEOUT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.TIMEOUT;
-            case ReasonCode.PEERKEY_MISMATCH:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.PEERKEY_MISMATCH;
-            case ReasonCode.AUTHORIZED_ACCESS_LIMIT_REACHED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.AUTHORIZED_ACCESS_LIMIT_REACHED;
-            case ReasonCode.EXTERNAL_SERVICE_REQUIREMENTS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.EXTERNAL_SERVICE_REQUIREMENTS;
-            case ReasonCode.INVALID_FT_ACTION_FRAME_COUNT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_FT_ACTION_FRAME_COUNT;
-            case ReasonCode.INVALID_PMKID:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_PMKID;
-            case ReasonCode.INVALID_MDE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_MDE;
-            case ReasonCode.INVALID_FTE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.INVALID_FTE;
-            case ReasonCode.MESH_PEERING_CANCELLED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_PEERING_CANCELLED;
-            case ReasonCode.MESH_MAX_PEERS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_MAX_PEERS;
-            case ReasonCode.MESH_CONFIG_POLICY_VIOLATION:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_CONFIG_POLICY_VIOLATION;
-            case ReasonCode.MESH_CLOSE_RCVD:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_CLOSE_RCVD;
-            case ReasonCode.MESH_MAX_RETRIES:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_MAX_RETRIES;
-            case ReasonCode.MESH_CONFIRM_TIMEOUT:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_CONFIRM_TIMEOUT;
-            case ReasonCode.MESH_INVALID_GTK:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_INVALID_GTK;
-            case ReasonCode.MESH_INCONSISTENT_PARAMS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_INCONSISTENT_PARAMS;
-            case ReasonCode.MESH_INVALID_SECURITY_CAP:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_INVALID_SECURITY_CAP;
-            case ReasonCode.MESH_PATH_ERROR_NO_PROXY_INFO:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_PATH_ERROR_NO_PROXY_INFO;
-            case ReasonCode.MESH_PATH_ERROR_NO_FORWARDING_INFO:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_PATH_ERROR_NO_FORWARDING_INFO;
-            case ReasonCode.MESH_PATH_ERROR_DEST_UNREACHABLE:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_PATH_ERROR_DEST_UNREACHABLE;
-            case ReasonCode.MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS;
-            case ReasonCode.MESH_CHANNEL_SWITCH_REGULATORY_REQ:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_CHANNEL_SWITCH_REGULATORY_REQ;
-            case ReasonCode.MESH_CHANNEL_SWITCH_UNSPECIFIED:
-                return SupplicantStaIfaceHal.StaIfaceReasonCode.MESH_CHANNEL_SWITCH_UNSPECIFIED;
-            default:
-                Log.e(TAG, "Invalid reason code received");
-                return -1;
-        }
-    }
-
-    protected static int halToFrameworkStatusCode(int reason) {
-        switch (reason) {
-            case StatusCode.SUCCESS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.SUCCESS;
-            case StatusCode.UNSPECIFIED_FAILURE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNSPECIFIED_FAILURE;
-            case StatusCode.TDLS_WAKEUP_ALTERNATE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TDLS_WAKEUP_ALTERNATE;
-            case StatusCode.TDLS_WAKEUP_REJECT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TDLS_WAKEUP_REJECT;
-            case StatusCode.SECURITY_DISABLED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.SECURITY_DISABLED;
-            case StatusCode.UNACCEPTABLE_LIFETIME:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNACCEPTABLE_LIFETIME;
-            case StatusCode.NOT_IN_SAME_BSS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.NOT_IN_SAME_BSS;
-            case StatusCode.CAPS_UNSUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.CAPS_UNSUPPORTED;
-            case StatusCode.REASSOC_NO_ASSOC:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REASSOC_NO_ASSOC;
-            case StatusCode.ASSOC_DENIED_UNSPEC:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_UNSPEC;
-            case StatusCode.NOT_SUPPORTED_AUTH_ALG:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.NOT_SUPPORTED_AUTH_ALG;
-            case StatusCode.UNKNOWN_AUTH_TRANSACTION:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNKNOWN_AUTH_TRANSACTION;
-            case StatusCode.CHALLENGE_FAIL:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.CHALLENGE_FAIL;
-            case StatusCode.AUTH_TIMEOUT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.AUTH_TIMEOUT;
-            case StatusCode.AP_UNABLE_TO_HANDLE_NEW_STA:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.AP_UNABLE_TO_HANDLE_NEW_STA;
-            case StatusCode.ASSOC_DENIED_RATES:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_RATES;
-            case StatusCode.ASSOC_DENIED_NOSHORT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_NOSHORT;
-            case StatusCode.SPEC_MGMT_REQUIRED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.SPEC_MGMT_REQUIRED;
-            case StatusCode.PWR_CAPABILITY_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.PWR_CAPABILITY_NOT_VALID;
-            case StatusCode.SUPPORTED_CHANNEL_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.SUPPORTED_CHANNEL_NOT_VALID;
-            case StatusCode.ASSOC_DENIED_NO_SHORT_SLOT_TIME:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_NO_SHORT_SLOT_TIME;
-            case StatusCode.ASSOC_DENIED_NO_HT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_NO_HT;
-            case StatusCode.R0KH_UNREACHABLE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.R0KH_UNREACHABLE;
-            case StatusCode.ASSOC_DENIED_NO_PCO:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_NO_PCO;
-            case StatusCode.ASSOC_REJECTED_TEMPORARILY:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_REJECTED_TEMPORARILY;
-            case StatusCode.ROBUST_MGMT_FRAME_POLICY_VIOLATION:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ROBUST_MGMT_FRAME_POLICY_VIOLATION;
-            case StatusCode.UNSPECIFIED_QOS_FAILURE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNSPECIFIED_QOS_FAILURE;
-            case StatusCode.DENIED_INSUFFICIENT_BANDWIDTH:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DENIED_INSUFFICIENT_BANDWIDTH;
-            case StatusCode.DENIED_POOR_CHANNEL_CONDITIONS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DENIED_POOR_CHANNEL_CONDITIONS;
-            case StatusCode.DENIED_QOS_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DENIED_QOS_NOT_SUPPORTED;
-            case StatusCode.REQUEST_DECLINED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQUEST_DECLINED;
-            case StatusCode.INVALID_PARAMETERS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_PARAMETERS;
-            case StatusCode.REJECTED_WITH_SUGGESTED_CHANGES:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REJECTED_WITH_SUGGESTED_CHANGES;
-            case StatusCode.INVALID_IE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_IE;
-            case StatusCode.GROUP_CIPHER_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.GROUP_CIPHER_NOT_VALID;
-            case StatusCode.PAIRWISE_CIPHER_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.PAIRWISE_CIPHER_NOT_VALID;
-            case StatusCode.AKMP_NOT_VALID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.AKMP_NOT_VALID;
-            case StatusCode.UNSUPPORTED_RSN_IE_VERSION:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNSUPPORTED_RSN_IE_VERSION;
-            case StatusCode.INVALID_RSN_IE_CAPAB:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_RSN_IE_CAPAB;
-            case StatusCode.CIPHER_REJECTED_PER_POLICY:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.CIPHER_REJECTED_PER_POLICY;
-            case StatusCode.TS_NOT_CREATED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TS_NOT_CREATED;
-            case StatusCode.DIRECT_LINK_NOT_ALLOWED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DIRECT_LINK_NOT_ALLOWED;
-            case StatusCode.DEST_STA_NOT_PRESENT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DEST_STA_NOT_PRESENT;
-            case StatusCode.DEST_STA_NOT_QOS_STA:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DEST_STA_NOT_QOS_STA;
-            case StatusCode.ASSOC_DENIED_LISTEN_INT_TOO_LARGE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_LISTEN_INT_TOO_LARGE;
-            case StatusCode.INVALID_FT_ACTION_FRAME_COUNT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_FT_ACTION_FRAME_COUNT;
-            case StatusCode.INVALID_PMKID:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_PMKID;
-            case StatusCode.INVALID_MDIE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_MDIE;
-            case StatusCode.INVALID_FTIE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_FTIE;
-            case StatusCode.REQUESTED_TCLAS_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQUESTED_TCLAS_NOT_SUPPORTED;
-            case StatusCode.INSUFFICIENT_TCLAS_PROCESSING_RESOURCES:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode
-                        .INSUFFICIENT_TCLAS_PROCESSING_RESOURCES;
-            case StatusCode.TRY_ANOTHER_BSS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TRY_ANOTHER_BSS;
-            case StatusCode.GAS_ADV_PROTO_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.GAS_ADV_PROTO_NOT_SUPPORTED;
-            case StatusCode.NO_OUTSTANDING_GAS_REQ:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.NO_OUTSTANDING_GAS_REQ;
-            case StatusCode.GAS_RESP_NOT_RECEIVED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.GAS_RESP_NOT_RECEIVED;
-            case StatusCode.STA_TIMED_OUT_WAITING_FOR_GAS_RESP:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.STA_TIMED_OUT_WAITING_FOR_GAS_RESP;
-            case StatusCode.GAS_RESP_LARGER_THAN_LIMIT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.GAS_RESP_LARGER_THAN_LIMIT;
-            case StatusCode.REQ_REFUSED_HOME:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQ_REFUSED_HOME;
-            case StatusCode.ADV_SRV_UNREACHABLE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ADV_SRV_UNREACHABLE;
-            case StatusCode.REQ_REFUSED_SSPN:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQ_REFUSED_SSPN;
-            case StatusCode.REQ_REFUSED_UNAUTH_ACCESS:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQ_REFUSED_UNAUTH_ACCESS;
-            case StatusCode.INVALID_RSNIE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.INVALID_RSNIE;
-            case StatusCode.U_APSD_COEX_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.U_APSD_COEX_NOT_SUPPORTED;
-            case StatusCode.U_APSD_COEX_MODE_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.U_APSD_COEX_MODE_NOT_SUPPORTED;
-            case StatusCode.BAD_INTERVAL_WITH_U_APSD_COEX:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.BAD_INTERVAL_WITH_U_APSD_COEX;
-            case StatusCode.ANTI_CLOGGING_TOKEN_REQ:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ANTI_CLOGGING_TOKEN_REQ;
-            case StatusCode.FINITE_CYCLIC_GROUP_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.FINITE_CYCLIC_GROUP_NOT_SUPPORTED;
-            case StatusCode.CANNOT_FIND_ALT_TBTT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.CANNOT_FIND_ALT_TBTT;
-            case StatusCode.TRANSMISSION_FAILURE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TRANSMISSION_FAILURE;
-            case StatusCode.REQ_TCLAS_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REQ_TCLAS_NOT_SUPPORTED;
-            case StatusCode.TCLAS_RESOURCES_EXCHAUSTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TCLAS_RESOURCES_EXCHAUSTED;
-            case StatusCode.REJECTED_WITH_SUGGESTED_BSS_TRANSITION:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode
-                        .REJECTED_WITH_SUGGESTED_BSS_TRANSITION;
-            case StatusCode.REJECT_WITH_SCHEDULE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REJECT_WITH_SCHEDULE;
-            case StatusCode.REJECT_NO_WAKEUP_SPECIFIED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REJECT_NO_WAKEUP_SPECIFIED;
-            case StatusCode.SUCCESS_POWER_SAVE_MODE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.SUCCESS_POWER_SAVE_MODE;
-            case StatusCode.PENDING_ADMITTING_FST_SESSION:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.PENDING_ADMITTING_FST_SESSION;
-            case StatusCode.PERFORMING_FST_NOW:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.PERFORMING_FST_NOW;
-            case StatusCode.PENDING_GAP_IN_BA_WINDOW:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.PENDING_GAP_IN_BA_WINDOW;
-            case StatusCode.REJECT_U_PID_SETTING:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REJECT_U_PID_SETTING;
-            case StatusCode.REFUSED_EXTERNAL_REASON:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REFUSED_EXTERNAL_REASON;
-            case StatusCode.REFUSED_AP_OUT_OF_MEMORY:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REFUSED_AP_OUT_OF_MEMORY;
-            case StatusCode.REJECTED_EMERGENCY_SERVICE_NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode
-                        .REJECTED_EMERGENCY_SERVICE_NOT_SUPPORTED;
-            case StatusCode.QUERY_RESP_OUTSTANDING:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.QUERY_RESP_OUTSTANDING;
-            case StatusCode.REJECT_DSE_BAND:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.REJECT_DSE_BAND;
-            case StatusCode.TCLAS_PROCESSING_TERMINATED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TCLAS_PROCESSING_TERMINATED;
-            case StatusCode.TS_SCHEDULE_CONFLICT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.TS_SCHEDULE_CONFLICT;
-            case StatusCode.DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode
-                        .DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL;
-            case StatusCode.MCCAOP_RESERVATION_CONFLICT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.MCCAOP_RESERVATION_CONFLICT;
-            case StatusCode.MAF_LIMIT_EXCEEDED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.MAF_LIMIT_EXCEEDED;
-            case StatusCode.MCCA_TRACK_LIMIT_EXCEEDED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.MCCA_TRACK_LIMIT_EXCEEDED;
-            case StatusCode.DENIED_DUE_TO_SPECTRUM_MANAGEMENT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.DENIED_DUE_TO_SPECTRUM_MANAGEMENT;
-            case StatusCode.ASSOC_DENIED_NO_VHT:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ASSOC_DENIED_NO_VHT;
-            case StatusCode.ENABLEMENT_DENIED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.ENABLEMENT_DENIED;
-            case StatusCode.RESTRICTION_FROM_AUTHORIZED_GDB:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.RESTRICTION_FROM_AUTHORIZED_GDB;
-            case StatusCode.AUTHORIZATION_DEENABLED:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.AUTHORIZATION_DEENABLED;
-            case StatusCode.FILS_AUTHENTICATION_FAILURE:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.FILS_AUTHENTICATION_FAILURE;
-            case StatusCode.UNKNOWN_AUTHENTICATION_SERVER:
-                return SupplicantStaIfaceHal.StaIfaceStatusCode.UNKNOWN_AUTHENTICATION_SERVER;
-            default:
-                Log.e(TAG, "Invalid status code received");
-                return -1;
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackImpl.java b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackImpl.java
new file mode 100644
index 0000000..55d83ce
--- /dev/null
+++ b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackImpl.java
@@ -0,0 +1,442 @@
+/*
+ * 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.server.wifi;
+
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQP3GPPNetwork;
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPDomName;
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPIPAddrAvailability;
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPNAIRealm;
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPRoamingConsortium;
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPVenueName;
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.ANQPVenueUrl;
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSConnCapability;
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSFriendlyName;
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSOSUProviders;
+import static com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType.HSWANMetrics;
+
+import android.annotation.NonNull;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback;
+import android.net.wifi.SecurityParams;
+import android.net.wifi.SupplicantState;
+import android.net.wifi.WifiConfiguration;
+import android.net.wifi.WifiManager;
+import android.net.wifi.WifiSsid;
+import android.util.Log;
+
+import com.android.server.wifi.hotspot2.AnqpEvent;
+import com.android.server.wifi.hotspot2.IconEvent;
+import com.android.server.wifi.hotspot2.WnmData;
+import com.android.server.wifi.hotspot2.anqp.ANQPElement;
+import com.android.server.wifi.hotspot2.anqp.ANQPParser;
+import com.android.server.wifi.hotspot2.anqp.Constants;
+import com.android.server.wifi.util.NativeUtil;
+
+import java.io.IOException;
+import java.nio.BufferUnderflowException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+abstract class SupplicantStaIfaceCallbackImpl extends ISupplicantStaIfaceCallback.Stub {
+    private static final String TAG = SupplicantStaIfaceCallbackImpl.class.getSimpleName();
+    private final SupplicantStaIfaceHal mStaIfaceHal;
+    private final String mIfaceName;
+    private final Object mLock;
+    private final WifiMonitor mWifiMonitor;
+    // Used to help check for PSK password mismatch & EAP connection failure.
+    private int mStateBeforeDisconnect = State.INACTIVE;
+    private String mCurrentSsid = null;
+
+    SupplicantStaIfaceCallbackImpl(@NonNull SupplicantStaIfaceHal staIfaceHal,
+            @NonNull String ifaceName,
+            @NonNull Object lock,
+            @NonNull WifiMonitor wifiMonitor) {
+        mStaIfaceHal = staIfaceHal;
+        mIfaceName = ifaceName;
+        mLock = lock;
+        mWifiMonitor = wifiMonitor;
+    }
+
+    /**
+     * Converts the supplicant state received from HIDL to the equivalent framework state.
+     */
+    protected static SupplicantState supplicantHidlStateToFrameworkState(int state) {
+        switch (state) {
+            case ISupplicantStaIfaceCallback.State.DISCONNECTED:
+                return SupplicantState.DISCONNECTED;
+            case ISupplicantStaIfaceCallback.State.IFACE_DISABLED:
+                return SupplicantState.INTERFACE_DISABLED;
+            case ISupplicantStaIfaceCallback.State.INACTIVE:
+                return SupplicantState.INACTIVE;
+            case ISupplicantStaIfaceCallback.State.SCANNING:
+                return SupplicantState.SCANNING;
+            case ISupplicantStaIfaceCallback.State.AUTHENTICATING:
+                return SupplicantState.AUTHENTICATING;
+            case ISupplicantStaIfaceCallback.State.ASSOCIATING:
+                return SupplicantState.ASSOCIATING;
+            case ISupplicantStaIfaceCallback.State.ASSOCIATED:
+                return SupplicantState.ASSOCIATED;
+            case ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE:
+                return SupplicantState.FOUR_WAY_HANDSHAKE;
+            case ISupplicantStaIfaceCallback.State.GROUP_HANDSHAKE:
+                return SupplicantState.GROUP_HANDSHAKE;
+            case ISupplicantStaIfaceCallback.State.COMPLETED:
+                return SupplicantState.COMPLETED;
+            default:
+                throw new IllegalArgumentException("Invalid state: " + state);
+        }
+    }
+
+
+    /**
+     * Parses the provided payload into an ANQP element.
+     *
+     * @param infoID  Element type.
+     * @param payload Raw payload bytes.
+     * @return AnqpElement instance on success, null on failure.
+     */
+    private ANQPElement parseAnqpElement(Constants.ANQPElementType infoID,
+                                         ArrayList<Byte> payload) {
+        synchronized (mLock) {
+            try {
+                return Constants.getANQPElementID(infoID) != null
+                        ? ANQPParser.parseElement(
+                        infoID, ByteBuffer.wrap(NativeUtil.byteArrayFromArrayList(payload)))
+                        : ANQPParser.parseHS20Element(
+                        infoID, ByteBuffer.wrap(NativeUtil.byteArrayFromArrayList(payload)));
+            } catch (IOException | BufferUnderflowException e) {
+                Log.e(TAG, "Failed parsing ANQP element payload: " + infoID, e);
+                return null;
+            }
+        }
+    }
+
+    /**
+     * Parse the ANQP element data and add to the provided elements map if successful.
+     *
+     * @param elementsMap Map to add the parsed out element to.
+     * @param infoID  Element type.
+     * @param payload Raw payload bytes.
+     */
+    private void addAnqpElementToMap(Map<Constants.ANQPElementType, ANQPElement> elementsMap,
+                                     Constants.ANQPElementType infoID,
+                                     ArrayList<Byte> payload) {
+        synchronized (mLock) {
+            if (payload == null || payload.isEmpty()) return;
+            ANQPElement element = parseAnqpElement(infoID, payload);
+            if (element != null) {
+                elementsMap.put(infoID, element);
+            }
+        }
+    }
+
+    @Override
+    public void onNetworkAdded(int id) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onNetworkAdded id=" + id);
+        }
+    }
+
+    @Override
+    public void onNetworkRemoved(int id) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onNetworkRemoved id=" + id);
+            // Reset state since network has been removed.
+            mStateBeforeDisconnect = State.INACTIVE;
+        }
+    }
+
+    /**
+     * Added to plumb the new {@code filsHlpSent} param from the V1.3 callback version.
+     */
+    public void onStateChanged(int newState, byte[/* 6 */] bssid, int id, ArrayList<Byte> ssid,
+            boolean filsHlpSent) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onStateChanged");
+            SupplicantState newSupplicantState =
+                    supplicantHidlStateToFrameworkState(newState);
+            WifiSsid wifiSsid =
+                    WifiSsid.createFromByteArray(NativeUtil.byteArrayFromArrayList(ssid));
+            String bssidStr = NativeUtil.macAddressFromByteArray(bssid);
+            if (newState != State.DISCONNECTED) {
+                // onStateChanged(DISCONNECTED) may come before onDisconnected(), so add this
+                // cache to track the state before the disconnect.
+                mStateBeforeDisconnect = newState;
+            }
+
+            if (newState == State.ASSOCIATING || newState == State.ASSOCIATED
+                    || newState == State.COMPLETED) {
+                mStaIfaceHal.updateOnLinkedNetworkRoaming(mIfaceName, id);
+            }
+
+            if (newState == State.COMPLETED) {
+                mWifiMonitor.broadcastNetworkConnectionEvent(
+                        mIfaceName, mStaIfaceHal.getCurrentNetworkId(mIfaceName), filsHlpSent,
+                        wifiSsid, bssidStr);
+            } else if (newState == State.ASSOCIATING) {
+                mCurrentSsid = NativeUtil.encodeSsid(ssid);
+            }
+            mWifiMonitor.broadcastSupplicantStateChangeEvent(
+                    mIfaceName, mStaIfaceHal.getCurrentNetworkId(mIfaceName), wifiSsid,
+                    bssidStr, newSupplicantState);
+        }
+    }
+
+    @Override
+    public void onStateChanged(int newState, byte[/* 6 */] bssid, int id, ArrayList<Byte> ssid) {
+        onStateChanged(newState, bssid, id, ssid, false);
+    }
+
+    public void onAnqpQueryDone(byte[/* 6 */] bssid,
+            ISupplicantStaIfaceCallback.AnqpData data,
+            ISupplicantStaIfaceCallback.Hs20AnqpData hs20Data,
+            android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.AnqpData dataV14) {
+        Map<Constants.ANQPElementType, ANQPElement> elementsMap = new HashMap<>();
+        addAnqpElementToMap(elementsMap, ANQPVenueName, data.venueName);
+        addAnqpElementToMap(elementsMap, ANQPRoamingConsortium, data.roamingConsortium);
+        addAnqpElementToMap(
+                elementsMap, ANQPIPAddrAvailability, data.ipAddrTypeAvailability);
+        addAnqpElementToMap(elementsMap, ANQPNAIRealm, data.naiRealm);
+        addAnqpElementToMap(elementsMap, ANQP3GPPNetwork, data.anqp3gppCellularNetwork);
+        addAnqpElementToMap(elementsMap, ANQPDomName, data.domainName);
+        if (dataV14 != null) {
+            addAnqpElementToMap(elementsMap, ANQPVenueUrl, dataV14.venueUrl);
+        }
+        addAnqpElementToMap(elementsMap, HSFriendlyName, hs20Data.operatorFriendlyName);
+        addAnqpElementToMap(elementsMap, HSWANMetrics, hs20Data.wanMetrics);
+        addAnqpElementToMap(elementsMap, HSConnCapability, hs20Data.connectionCapability);
+        addAnqpElementToMap(elementsMap, HSOSUProviders, hs20Data.osuProvidersList);
+        mWifiMonitor.broadcastAnqpDoneEvent(
+                mIfaceName, new AnqpEvent(NativeUtil.macAddressToLong(bssid), elementsMap));
+    }
+    @Override
+    public void onAnqpQueryDone(byte[/* 6 */] bssid,
+                                ISupplicantStaIfaceCallback.AnqpData data,
+                                ISupplicantStaIfaceCallback.Hs20AnqpData hs20Data) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onAnqpQueryDone");
+            onAnqpQueryDone(bssid, data, hs20Data, null /* v1.4 element */);
+        }
+    }
+
+    @Override
+    public void onHs20IconQueryDone(byte[/* 6 */] bssid, String fileName,
+                                    ArrayList<Byte> data) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onHs20IconQueryDone");
+            mWifiMonitor.broadcastIconDoneEvent(
+                    mIfaceName,
+                    new IconEvent(NativeUtil.macAddressToLong(bssid), fileName, data.size(),
+                            NativeUtil.byteArrayFromArrayList(data)));
+        }
+    }
+
+    @Override
+    public void onHs20SubscriptionRemediation(byte[/* 6 */] bssid, byte osuMethod, String url) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onHs20SubscriptionRemediation");
+            mWifiMonitor.broadcastWnmEvent(
+                    mIfaceName,
+                    WnmData.createRemediationEvent(NativeUtil.macAddressToLong(bssid), url,
+                            osuMethod));
+        }
+    }
+
+    @Override
+    public void onHs20DeauthImminentNotice(byte[/* 6 */] bssid, int reasonCode,
+                                           int reAuthDelayInSec, String url) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onHs20DeauthImminentNotice");
+            mWifiMonitor.broadcastWnmEvent(
+                    mIfaceName,
+                    WnmData.createDeauthImminentEvent(NativeUtil.macAddressToLong(bssid), url,
+                            reasonCode == WnmData.ESS, reAuthDelayInSec));
+        }
+    }
+
+    @Override
+    public void onDisconnected(byte[/* 6 */] bssid, boolean locallyGenerated, int reasonCode) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onDisconnected");
+            if (mStaIfaceHal.isVerboseLoggingEnabled()) {
+                Log.e(TAG, "onDisconnected state=" + mStateBeforeDisconnect
+                        + " locallyGenerated=" + locallyGenerated
+                        + " reasonCode=" + reasonCode);
+            }
+            WifiConfiguration curConfiguration =
+                    mStaIfaceHal.getCurrentNetworkLocalConfig(mIfaceName);
+            if (curConfiguration != null) {
+                if (mStateBeforeDisconnect == State.FOURWAY_HANDSHAKE
+                        && WifiConfigurationUtil.isConfigForPskNetwork(curConfiguration)
+                        && (!locallyGenerated || reasonCode != ReasonCode.IE_IN_4WAY_DIFFERS)) {
+                    mWifiMonitor.broadcastAuthenticationFailureEvent(
+                            mIfaceName, WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1);
+                } else if (mStateBeforeDisconnect == State.ASSOCIATED
+                        && WifiConfigurationUtil.isConfigForEapNetwork(curConfiguration)) {
+                    mWifiMonitor.broadcastAuthenticationFailureEvent(
+                            mIfaceName, WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE, -1);
+                }
+            }
+            mWifiMonitor.broadcastNetworkDisconnectionEvent(
+                    mIfaceName, locallyGenerated, reasonCode, mCurrentSsid,
+                    NativeUtil.macAddressFromByteArray(bssid));
+        }
+    }
+
+    private void handleAssocRejectEvent(AssocRejectEventInfo assocRejectInfo) {
+        boolean isWrongPwd = false;
+        WifiConfiguration curConfiguration =
+                mStaIfaceHal.getCurrentNetworkLocalConfig(mIfaceName);
+        if (curConfiguration != null) {
+            if (!assocRejectInfo.timedOut) {
+                Log.d(TAG, "flush PMK cache due to association rejection for config id "
+                        + curConfiguration.networkId + ".");
+                mStaIfaceHal.removePmkCacheEntry(curConfiguration.networkId);
+            }
+            // Special handling for WPA3-Personal networks. If the password is
+            // incorrect, the AP will send association rejection, with status code 1
+            // (unspecified failure). In SAE networks, the password authentication
+            // is not related to the 4-way handshake. In this case, we will send an
+            // authentication failure event up.
+            if (assocRejectInfo.statusCode == StatusCode.UNSPECIFIED_FAILURE) {
+                // Network Selection status is guaranteed to be initialized
+                SecurityParams params = curConfiguration.getNetworkSelectionStatus()
+                        .getCandidateSecurityParams();
+                if (params != null
+                        && params.getSecurityType() == WifiConfiguration.SECURITY_TYPE_SAE) {
+                    // If this is ever connected, the password should be correct.
+                    isWrongPwd = !curConfiguration.getNetworkSelectionStatus().hasEverConnected();
+                    if (isWrongPwd) {
+                        mStaIfaceHal.logCallback("SAE incorrect password");
+                    } else {
+                        mStaIfaceHal.logCallback("SAE association rejection");
+                    }
+                }
+            } else if (assocRejectInfo.statusCode == StatusCode.CHALLENGE_FAIL
+                    && WifiConfigurationUtil.isConfigForWepNetwork(curConfiguration)) {
+                mStaIfaceHal.logCallback("WEP incorrect password");
+                isWrongPwd = true;
+            }
+        }
+
+        if (isWrongPwd) {
+            mWifiMonitor.broadcastAuthenticationFailureEvent(
+                    mIfaceName, WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1);
+        }
+        mWifiMonitor.broadcastAssociationRejectionEvent(mIfaceName, assocRejectInfo);
+        mStateBeforeDisconnect = State.INACTIVE;
+    }
+
+    public void onAssociationRejected(android.hardware.wifi.supplicant.V1_4
+            .ISupplicantStaIfaceCallback.AssociationRejectionData assocRejectData) {
+        AssocRejectEventInfo assocRejectInfo = new AssocRejectEventInfo(assocRejectData);
+        handleAssocRejectEvent(assocRejectInfo);
+    }
+
+    @Override
+    public void onAssociationRejected(byte[/* 6 */] bssid, int statusCode, boolean timedOut) {
+        synchronized (mLock) {
+            AssocRejectEventInfo assocRejectInfo = new AssocRejectEventInfo(
+                    mCurrentSsid,
+                    NativeUtil.macAddressFromByteArray(bssid),
+                    statusCode, timedOut);
+            handleAssocRejectEvent(assocRejectInfo);
+        }
+    }
+
+    @Override
+    public void onAuthenticationTimeout(byte[/* 6 */] bssid) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onAuthenticationTimeout");
+            mWifiMonitor.broadcastAuthenticationFailureEvent(
+                    mIfaceName, WifiManager.ERROR_AUTH_FAILURE_TIMEOUT, -1);
+            mStateBeforeDisconnect = State.INACTIVE;
+        }
+    }
+
+    @Override
+    public void onBssidChanged(byte reason, byte[/* 6 */] bssid) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onBssidChanged");
+            if (reason == BssidChangeReason.ASSOC_START) {
+                mWifiMonitor.broadcastTargetBssidEvent(
+                        mIfaceName, NativeUtil.macAddressFromByteArray(bssid));
+            } else if (reason == BssidChangeReason.ASSOC_COMPLETE) {
+                mWifiMonitor.broadcastAssociatedBssidEvent(
+                        mIfaceName, NativeUtil.macAddressFromByteArray(bssid));
+            }
+        }
+    }
+
+    public void onEapFailure(int errorCode) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onEapFailure");
+            mWifiMonitor.broadcastAuthenticationFailureEvent(
+                    mIfaceName, WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE, errorCode);
+            mStateBeforeDisconnect = State.INACTIVE;
+        }
+    }
+
+
+    @Override
+    public void onEapFailure() {
+        onEapFailure(-1);
+    }
+
+    @Override
+    public void onWpsEventSuccess() {
+        mStaIfaceHal.logCallback("onWpsEventSuccess");
+        synchronized (mLock) {
+            mWifiMonitor.broadcastWpsSuccessEvent(mIfaceName);
+        }
+    }
+
+    @Override
+    public void onWpsEventFail(byte[/* 6 */] bssid, short configError, short errorInd) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onWpsEventFail");
+            if (configError == WpsConfigError.MSG_TIMEOUT
+                    && errorInd == WpsErrorIndication.NO_ERROR) {
+                mWifiMonitor.broadcastWpsTimeoutEvent(mIfaceName);
+            } else {
+                mWifiMonitor.broadcastWpsFailEvent(mIfaceName, configError, errorInd);
+            }
+        }
+    }
+
+    @Override
+    public void onWpsEventPbcOverlap() {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onWpsEventPbcOverlap");
+            mWifiMonitor.broadcastWpsOverlapEvent(mIfaceName);
+        }
+    }
+
+    @Override
+    public void onExtRadioWorkStart(int id) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onExtRadioWorkStart");
+        }
+    }
+
+    @Override
+    public void onExtRadioWorkTimeout(int id) {
+        synchronized (mLock) {
+            mStaIfaceHal.logCallback("onExtRadioWorkTimeout");
+        }
+    }
+}
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_1Impl.java b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_1Impl.java
similarity index 92%
rename from service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_1Impl.java
rename to service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_1Impl.java
index 75986d0..e2be24c 100644
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_1Impl.java
+++ b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_1Impl.java
@@ -17,19 +17,20 @@
 
 import android.annotation.NonNull;
 import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback;
+import android.net.wifi.WifiManager;
 
 import java.util.ArrayList;
 
-abstract class SupplicantStaIfaceCallbackHidlV1_1Impl extends
+abstract class SupplicantStaIfaceCallbackV1_1Impl extends
         android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback.Stub {
-    private static final String TAG = SupplicantStaIfaceCallbackHidlV1_1Impl.class.getSimpleName();
-    private final SupplicantStaIfaceHalHidlImpl mStaIfaceHal;
+    private static final String TAG = SupplicantStaIfaceCallbackV1_1Impl.class.getSimpleName();
+    private final SupplicantStaIfaceHal mStaIfaceHal;
     private final String mIfaceName;
     private final Object mLock;
     private final WifiMonitor mWifiMonitor;
-    private final SupplicantStaIfaceHalHidlImpl.SupplicantStaIfaceHalCallback mCallbackV10;
+    private final SupplicantStaIfaceHal.SupplicantStaIfaceHalCallback mCallbackV10;
 
-    SupplicantStaIfaceCallbackHidlV1_1Impl(@NonNull SupplicantStaIfaceHalHidlImpl staIfaceHal,
+    SupplicantStaIfaceCallbackV1_1Impl(@NonNull SupplicantStaIfaceHal staIfaceHal,
             @NonNull String ifaceName,
             @NonNull Object lock,
             @NonNull WifiMonitor wifiMonitor) {
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_2Impl.java b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_2Impl.java
similarity index 70%
rename from service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_2Impl.java
rename to service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_2Impl.java
index ef85271..f516489 100644
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_2Impl.java
+++ b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_2Impl.java
@@ -20,7 +20,7 @@
 import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback;
 import android.hardware.wifi.supplicant.V1_2.DppAkm;
 import android.hardware.wifi.supplicant.V1_2.DppFailureCode;
-import android.hardware.wifi.supplicant.V1_2.DppProgressCode;
+import android.hardware.wifi.supplicant.V1_3.DppSuccessCode;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiSsid;
 import android.os.Process;
@@ -30,15 +30,15 @@
 
 import java.util.ArrayList;
 
-abstract class SupplicantStaIfaceCallbackHidlV1_2Impl extends
+abstract class SupplicantStaIfaceCallbackV1_2Impl extends
         android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback.Stub {
-    private static final String TAG = SupplicantStaIfaceCallbackHidlV1_2Impl.class.getSimpleName();
-    private final SupplicantStaIfaceHalHidlImpl mStaIfaceHal;
+    private static final String TAG = SupplicantStaIfaceCallbackV1_2Impl.class.getSimpleName();
+    private final SupplicantStaIfaceHal mStaIfaceHal;
     private final String mIfaceName;
     private final Context mContext;
-    private final SupplicantStaIfaceHalHidlImpl.SupplicantStaIfaceHalCallbackV1_1 mCallbackV11;
+    private final SupplicantStaIfaceHal.SupplicantStaIfaceHalCallbackV1_1 mCallbackV11;
 
-    SupplicantStaIfaceCallbackHidlV1_2Impl(@NonNull SupplicantStaIfaceHalHidlImpl staIfaceHal,
+    SupplicantStaIfaceCallbackV1_2Impl(@NonNull SupplicantStaIfaceHal staIfaceHal,
             @NonNull String ifaceName,
             @NonNull Context context) {
         mStaIfaceHal = staIfaceHal;
@@ -167,9 +167,9 @@
 
         // Set up SSID
         WifiSsid wifiSsid =
-                WifiSsid.fromBytes(NativeUtil.byteArrayFromArrayList(ssid));
+                WifiSsid.createFromByteArray(NativeUtil.byteArrayFromArrayList(ssid));
 
-        newWifiConfiguration.SSID = wifiSsid.toString();
+        newWifiConfiguration.SSID = "\"" + wifiSsid.toString() + "\"";
 
         // Set up password or PSK
         if (password != null) {
@@ -200,74 +200,27 @@
     @Override
     public void onDppSuccessConfigSent() {
         if (mStaIfaceHal.getDppCallback() != null) {
-            mStaIfaceHal.getDppCallback().onSuccess(
-                    SupplicantStaIfaceHal.DppEventType.CONFIGURATION_SENT);
+            mStaIfaceHal.getDppCallback().onSuccess(DppSuccessCode.CONFIGURATION_SENT);
         } else {
             Log.e(TAG, "onSuccessConfigSent callback is null");
         }
     }
 
     @Override
-    public void onDppFailure(int code) {
-        // Convert HIDL to framework DppFailureCode, then continue with callback
-        onDppFailureInternal(halToFrameworkDppFailureCode(code));
-    }
-
-    protected void onDppFailureInternal(int frameworkCode) {
-        if (mStaIfaceHal.getDppCallback() != null) {
-            mStaIfaceHal.getDppCallback().onFailure(frameworkCode, null, null, null);
-        } else {
-            Log.e(TAG, "onDppFailure callback is null");
-        }
-    }
-
-    @Override
     public void onDppProgress(int code) {
-        // Convert HIDL to framework DppProgressCode, then continue with callback
-        onDppProgressInternal(halToFrameworkDppProgressCode(code));
-    }
-
-    protected void onDppProgressInternal(int frameworkCode) {
         if (mStaIfaceHal.getDppCallback() != null) {
-            mStaIfaceHal.getDppCallback().onProgress(frameworkCode);
+            mStaIfaceHal.getDppCallback().onProgress(code);
         } else {
             Log.e(TAG, "onDppProgress callback is null");
         }
     }
 
-    private int halToFrameworkDppProgressCode(int progressCode) {
-        switch(progressCode) {
-            case DppProgressCode.AUTHENTICATION_SUCCESS:
-                return SupplicantStaIfaceHal.DppProgressCode.AUTHENTICATION_SUCCESS;
-            case DppProgressCode.RESPONSE_PENDING:
-                return SupplicantStaIfaceHal.DppProgressCode.RESPONSE_PENDING;
-            default:
-                Log.e(TAG, "Invalid DppProgressCode received");
-                return -1;
-        }
-    }
-
-    private int halToFrameworkDppFailureCode(int failureCode) {
-        switch(failureCode) {
-            case DppFailureCode.INVALID_URI:
-                return SupplicantStaIfaceHal.DppFailureCode.INVALID_URI;
-            case DppFailureCode.AUTHENTICATION:
-                return SupplicantStaIfaceHal.DppFailureCode.AUTHENTICATION;
-            case DppFailureCode.NOT_COMPATIBLE:
-                return SupplicantStaIfaceHal.DppFailureCode.NOT_COMPATIBLE;
-            case DppFailureCode.CONFIGURATION:
-                return SupplicantStaIfaceHal.DppFailureCode.CONFIGURATION;
-            case DppFailureCode.BUSY:
-                return SupplicantStaIfaceHal.DppFailureCode.BUSY;
-            case DppFailureCode.TIMEOUT:
-                return SupplicantStaIfaceHal.DppFailureCode.TIMEOUT;
-            case DppFailureCode.FAILURE:
-                return SupplicantStaIfaceHal.DppFailureCode.FAILURE;
-            case DppFailureCode.NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.DppFailureCode.NOT_SUPPORTED;
-            default:
-                Log.e(TAG, "Invalid DppFailureCode received");
-                return -1;
+    @Override
+    public void onDppFailure(int code) {
+        if (mStaIfaceHal.getDppCallback() != null) {
+            mStaIfaceHal.getDppCallback().onFailure(code, null, null, null);
+        } else {
+            Log.e(TAG, "onDppFailure callback is null");
         }
     }
 }
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_3Impl.java b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_3Impl.java
similarity index 74%
rename from service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_3Impl.java
rename to service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_3Impl.java
index f5dbcf3..e578f8f 100644
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_3Impl.java
+++ b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_3Impl.java
@@ -18,24 +18,21 @@
 
 import android.annotation.NonNull;
 import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback;
-import android.hardware.wifi.supplicant.V1_3.DppFailureCode;
-import android.hardware.wifi.supplicant.V1_3.DppProgressCode;
-import android.hardware.wifi.supplicant.V1_3.DppSuccessCode;
 import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
 import android.util.Log;
 
 import java.util.ArrayList;
 
-abstract class SupplicantStaIfaceCallbackHidlV1_3Impl extends
+abstract class SupplicantStaIfaceCallbackV1_3Impl extends
         android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback.Stub {
-    private static final String TAG = SupplicantStaIfaceCallbackHidlV1_3Impl.class.getSimpleName();
-    private final SupplicantStaIfaceHalHidlImpl mStaIfaceHal;
+    private static final String TAG = SupplicantStaIfaceCallbackV1_3Impl.class.getSimpleName();
+    private final SupplicantStaIfaceHal mStaIfaceHal;
     private final String mIfaceName;
     private final WifiMonitor mWifiMonitor;
-    private final SupplicantStaIfaceHalHidlImpl.SupplicantStaIfaceHalCallbackV1_2 mCallbackV12;
+    private final SupplicantStaIfaceHal.SupplicantStaIfaceHalCallbackV1_2 mCallbackV12;
 
-    SupplicantStaIfaceCallbackHidlV1_3Impl(@NonNull SupplicantStaIfaceHalHidlImpl staIfaceHal,
+    SupplicantStaIfaceCallbackV1_3Impl(@NonNull SupplicantStaIfaceHal staIfaceHal,
             @NonNull String ifaceName,
             @NonNull WifiMonitor wifiMonitor) {
         mStaIfaceHal = staIfaceHal;
@@ -163,17 +160,12 @@
 
     @Override
     public void onDppProgress(int code) {
-        mCallbackV12.onDppProgressInternal(halToFrameworkDppProgressCode(code));
+        mCallbackV12.onDppProgress(code);
     }
 
     @Override
     public void onDppFailure(int code) {
-        // Convert HIDL to framework DppFailureCode, then continue with callback
-        onDppFailureInternal(halToFrameworkDppFailureCode(code));
-    }
-
-    protected void onDppFailureInternal(int frameworkCode) {
-        mCallbackV12.onDppFailureInternal(frameworkCode);
+        mCallbackV12.onDppFailure(code);
     }
 
     @Override
@@ -197,7 +189,7 @@
     @Override
     public void onDppProgress_1_3(int code) {
         if (mStaIfaceHal.getDppCallback() != null) {
-            mStaIfaceHal.getDppCallback().onProgress(halToFrameworkDppProgressCode(code));
+            mStaIfaceHal.getDppCallback().onProgress(code);
         } else {
             Log.e(TAG, "onDppProgress callback is null");
         }
@@ -206,12 +198,6 @@
     @Override
     public void onDppFailure_1_3(int code, String ssid, String channelList,
             ArrayList<Short> bandList) {
-        // Convert HIDL to framework DppFailureCode, then continue with callback
-        onDppFailureInternal_1_3(halToFrameworkDppFailureCode(code), ssid, channelList, bandList);
-    }
-
-    protected void onDppFailureInternal_1_3(int frameworkCode, String ssid, String channelList,
-            ArrayList<Short> bandList) {
         if (mStaIfaceHal.getDppCallback() != null) {
             int[] bandListArray = null;
 
@@ -223,8 +209,7 @@
                     bandListArray[i] = bandList.get(i).intValue();
                 }
             }
-            mStaIfaceHal.getDppCallback().onFailure(
-                    frameworkCode, ssid, channelList, bandListArray);
+            mStaIfaceHal.getDppCallback().onFailure(code, ssid, channelList, bandListArray);
         } else {
             Log.e(TAG, "onDppFailure callback is null");
         }
@@ -233,9 +218,9 @@
     @Override
     public void onDppSuccess(int code) {
         if (mStaIfaceHal.getDppCallback() != null) {
-            mStaIfaceHal.getDppCallback().onSuccess(halToFrameworkDppEventType(code));
+            mStaIfaceHal.getDppCallback().onSuccess(code);
         } else {
-            Log.e(TAG, "onDppSuccess callback is null");
+            Log.e(TAG, "onDppFailure callback is null");
         }
     }
 
@@ -355,64 +340,6 @@
         }
     }
 
-    private int halToFrameworkDppEventType(int dppSuccessCode) {
-        switch(dppSuccessCode) {
-            case DppSuccessCode.CONFIGURATION_SENT:
-                return SupplicantStaIfaceHal.DppEventType.CONFIGURATION_SENT;
-            case DppSuccessCode.CONFIGURATION_APPLIED:
-                return SupplicantStaIfaceHal.DppEventType.CONFIGURATION_APPLIED;
-            default:
-                Log.e(TAG, "Invalid DppEventType received");
-                return -1;
-        }
-    }
-
-    private int halToFrameworkDppFailureCode(int failureCode) {
-        switch(failureCode) {
-            case DppFailureCode.INVALID_URI:
-                return SupplicantStaIfaceHal.DppFailureCode.INVALID_URI;
-            case DppFailureCode.AUTHENTICATION:
-                return SupplicantStaIfaceHal.DppFailureCode.AUTHENTICATION;
-            case DppFailureCode.NOT_COMPATIBLE:
-                return SupplicantStaIfaceHal.DppFailureCode.NOT_COMPATIBLE;
-            case DppFailureCode.CONFIGURATION:
-                return SupplicantStaIfaceHal.DppFailureCode.CONFIGURATION;
-            case DppFailureCode.BUSY:
-                return SupplicantStaIfaceHal.DppFailureCode.BUSY;
-            case DppFailureCode.TIMEOUT:
-                return SupplicantStaIfaceHal.DppFailureCode.TIMEOUT;
-            case DppFailureCode.FAILURE:
-                return SupplicantStaIfaceHal.DppFailureCode.FAILURE;
-            case DppFailureCode.NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.DppFailureCode.NOT_SUPPORTED;
-            case DppFailureCode.CONFIGURATION_REJECTED:
-                return SupplicantStaIfaceHal.DppFailureCode.CONFIGURATION_REJECTED;
-            case DppFailureCode.CANNOT_FIND_NETWORK:
-                return SupplicantStaIfaceHal.DppFailureCode.CANNOT_FIND_NETWORK;
-            case DppFailureCode.ENROLLEE_AUTHENTICATION:
-                return SupplicantStaIfaceHal.DppFailureCode.ENROLLEE_AUTHENTICATION;
-            default:
-                Log.e(TAG, "Invalid DppFailureCode received");
-                return -1;
-        }
-    }
-
-    private int halToFrameworkDppProgressCode(int progressCode) {
-        switch(progressCode) {
-            case DppProgressCode.AUTHENTICATION_SUCCESS:
-                return SupplicantStaIfaceHal.DppProgressCode.AUTHENTICATION_SUCCESS;
-            case DppProgressCode.RESPONSE_PENDING:
-                return SupplicantStaIfaceHal.DppProgressCode.RESPONSE_PENDING;
-            case DppProgressCode.CONFIGURATION_SENT_WAITING_RESPONSE:
-                return SupplicantStaIfaceHal.DppProgressCode.CONFIGURATION_SENT_WAITING_RESPONSE;
-            case DppProgressCode.CONFIGURATION_ACCEPTED:
-                return SupplicantStaIfaceHal.DppProgressCode.CONFIGURATION_ACCEPTED;
-            default:
-                Log.e(TAG, "Invalid DppProgressCode received");
-                return -1;
-        }
-    }
-
     @Override
     public void onStateChanged_1_3(int newState, byte[/* 6 */] bssid, int id,
             ArrayList<Byte> ssid, boolean filsHlpSent) {
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_4Impl.java b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_4Impl.java
similarity index 74%
rename from service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_4Impl.java
rename to service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_4Impl.java
index 626d66e..6d62009 100644
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackHidlV1_4Impl.java
+++ b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_4Impl.java
@@ -17,25 +17,25 @@
 
 
 import android.annotation.NonNull;
-import android.hardware.wifi.supplicant.V1_4.DppFailureCode;
-import android.util.Log;
+import android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.AssociationRejectionData;
+import android.net.wifi.WifiManager;
 
 import com.android.server.wifi.hotspot2.WnmData;
 import com.android.server.wifi.util.NativeUtil;
 
 import java.util.ArrayList;
 
-abstract class SupplicantStaIfaceCallbackHidlV1_4Impl extends
+abstract class SupplicantStaIfaceCallbackV1_4Impl extends
         android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.Stub {
-    private static final String TAG = SupplicantStaIfaceCallbackHidlV1_4Impl.class.getSimpleName();
-    private final SupplicantStaIfaceHalHidlImpl mStaIfaceHal;
+    private static final String TAG = SupplicantStaIfaceCallbackV1_4Impl.class.getSimpleName();
+    private final SupplicantStaIfaceHal mStaIfaceHal;
     private final String mIfaceName;
     private final WifiMonitor mWifiMonitor;
     private final Object mLock;
-    private final SupplicantStaIfaceHalHidlImpl.SupplicantStaIfaceHalCallbackV1_3 mCallbackV13;
-    private final SupplicantStaIfaceHalHidlImpl.SupplicantStaIfaceHalCallback mCallbackV10;
+    private final SupplicantStaIfaceHal.SupplicantStaIfaceHalCallbackV1_3 mCallbackV13;
+    private final SupplicantStaIfaceHal.SupplicantStaIfaceHalCallback mCallbackV10;
 
-    SupplicantStaIfaceCallbackHidlV1_4Impl(@NonNull SupplicantStaIfaceHalHidlImpl staIfaceHal,
+    SupplicantStaIfaceCallbackV1_4Impl(@NonNull SupplicantStaIfaceHal staIfaceHal,
             @NonNull String ifaceName, @NonNull Object lock,
             @NonNull WifiMonitor wifiMonitor) {
         mStaIfaceHal = staIfaceHal;
@@ -142,7 +142,8 @@
 
     @Override
     public void onEapFailure_1_3(int code) {
-        mCallbackV13.onEapFailure_1_3(code);
+        mWifiMonitor.broadcastAuthenticationFailureEvent(
+                mIfaceName, WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE, code);
     }
 
     @Override
@@ -187,41 +188,9 @@
         mCallbackV13.onDppProgress(code);
     }
 
-    private int halToFrameworkDppFailureCode(int failureCode) {
-        switch(failureCode) {
-            case DppFailureCode.INVALID_URI:
-                return SupplicantStaIfaceHal.DppFailureCode.INVALID_URI;
-            case DppFailureCode.AUTHENTICATION:
-                return SupplicantStaIfaceHal.DppFailureCode.AUTHENTICATION;
-            case DppFailureCode.NOT_COMPATIBLE:
-                return SupplicantStaIfaceHal.DppFailureCode.NOT_COMPATIBLE;
-            case DppFailureCode.CONFIGURATION:
-                return SupplicantStaIfaceHal.DppFailureCode.CONFIGURATION;
-            case DppFailureCode.BUSY:
-                return SupplicantStaIfaceHal.DppFailureCode.BUSY;
-            case DppFailureCode.TIMEOUT:
-                return SupplicantStaIfaceHal.DppFailureCode.TIMEOUT;
-            case DppFailureCode.FAILURE:
-                return SupplicantStaIfaceHal.DppFailureCode.FAILURE;
-            case DppFailureCode.NOT_SUPPORTED:
-                return SupplicantStaIfaceHal.DppFailureCode.NOT_SUPPORTED;
-            case DppFailureCode.CONFIGURATION_REJECTED:
-                return SupplicantStaIfaceHal.DppFailureCode.CONFIGURATION_REJECTED;
-            case DppFailureCode.CANNOT_FIND_NETWORK:
-                return SupplicantStaIfaceHal.DppFailureCode.CANNOT_FIND_NETWORK;
-            case DppFailureCode.ENROLLEE_AUTHENTICATION:
-                return SupplicantStaIfaceHal.DppFailureCode.ENROLLEE_AUTHENTICATION;
-            case DppFailureCode.URI_GENERATION:
-                return SupplicantStaIfaceHal.DppFailureCode.URI_GENERATION;
-            default:
-                Log.e(TAG, "Invalid DppFailureCode received");
-                return -1;
-        }
-    }
-
     @Override
     public void onDppFailure(int code) {
-        mCallbackV13.onDppFailureInternal(halToFrameworkDppFailureCode(code));
+        mCallbackV13.onDppFailure(code);
     }
 
     @Override
@@ -237,8 +206,7 @@
     @Override
     public void onDppFailure_1_3(int code, String ssid, String channelList,
             ArrayList<Short> bandList) {
-        mCallbackV13.onDppFailureInternal_1_3(
-                halToFrameworkDppFailureCode(code), ssid, channelList, bandList);
+        mCallbackV13.onDppFailure_1_3(code, ssid, channelList, bandList);
     }
 
     @Override
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
index 2fd1f73..b8d8ce9 100644
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
+++ b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
@@ -15,749 +15,184 @@
  */
 package com.android.server.wifi;
 
-import android.annotation.IntDef;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_DECORATED_IDENTITY;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP_ENROLLEE_RESPONDER;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA256;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA384;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_MBO;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_OCE;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_PASSPOINT_TERMS_AND_CONDITIONS;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_SAE_PK;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_WAPI;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_WFD_R2;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SAE;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SUITE_B;
+
 import android.annotation.NonNull;
 import android.content.Context;
+import android.hardware.wifi.V1_0.WifiChannelWidthInMhz;
+import android.hardware.wifi.supplicant.V1_0.ISupplicant;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantIface;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantNetwork;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIface;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaNetwork;
+import android.hardware.wifi.supplicant.V1_0.IfaceType;
+import android.hardware.wifi.supplicant.V1_0.SupplicantStatus;
+import android.hardware.wifi.supplicant.V1_0.SupplicantStatusCode;
+import android.hardware.wifi.supplicant.V1_0.WpsConfigMethods;
+import android.hardware.wifi.supplicant.V1_3.ConnectionCapabilities;
+import android.hardware.wifi.supplicant.V1_3.WifiTechnology;
+import android.hardware.wifi.supplicant.V1_3.WpaDriverCapabilitiesMask;
+import android.hardware.wifi.supplicant.V1_4.LegacyMode;
+import android.hidl.manager.V1_0.IServiceManager;
+import android.hidl.manager.V1_0.IServiceNotification;
 import android.net.MacAddress;
+import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
+import android.net.wifi.WifiAnnotations.WifiStandard;
 import android.net.wifi.WifiConfiguration;
 import android.os.Handler;
+import android.os.IHwBinder.DeathRecipient;
+import android.os.RemoteException;
+import android.text.TextUtils;
 import android.util.Log;
-import android.util.Range;
+import android.util.Pair;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.wifi.WifiNative.DppEventCallback;
+import com.android.server.wifi.WifiNative.SupplicantDeathEventHandler;
+import com.android.server.wifi.util.GeneralUtil.Mutable;
+import com.android.server.wifi.util.NativeUtil;
 
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
 import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import javax.annotation.concurrent.ThreadSafe;
 
 /**
+ * Hal calls for bring up/shut down of the supplicant daemon and for
+ * sending requests to the supplicant daemon
  * To maintain thread-safety, the locking protocol is that every non-static method (regardless of
  * access level) acquires mLock.
  */
 @ThreadSafe
 public class SupplicantStaIfaceHal {
     private static final String TAG = "SupplicantStaIfaceHal";
+    @VisibleForTesting
+    public static final String HAL_INSTANCE_NAME = "default";
+    @VisibleForTesting
+    public static final long WAIT_FOR_DEATH_TIMEOUT_MS = 50L;
+    @VisibleForTesting
+    static final String PMK_CACHE_EXPIRATION_ALARM_TAG = "PMK_CACHE_EXPIRATION_TIMER";
+    /**
+     * Regex pattern for extracting the wps device type bytes.
+     * Matches a strings like the following: "<categ>-<OUI>-<subcateg>";
+     */
+    private static final Pattern WPS_DEVICE_TYPE_PATTERN =
+            Pattern.compile("^(\\d{1,2})-([0-9a-fA-F]{8})-(\\d{1,2})$");
+
     private final Object mLock = new Object();
+    private boolean mVerboseLoggingEnabled = false;
+
+    // Supplicant HAL interface objects
+    private IServiceManager mIServiceManager = null;
+    private ISupplicant mISupplicant;
+    private Map<String, ISupplicantStaIface> mISupplicantStaIfaces = new HashMap<>();
+    private Map<String, ISupplicantStaIfaceCallback> mISupplicantStaIfaceCallbacks =
+            new HashMap<>();
+    private Map<String, SupplicantStaNetworkHal> mCurrentNetworkRemoteHandles = new HashMap<>();
+    private Map<String, WifiConfiguration> mCurrentNetworkLocalConfigs = new HashMap<>();
+    private Map<String, List<Pair<SupplicantStaNetworkHal, WifiConfiguration>>>
+            mLinkedNetworkLocalAndRemoteConfigs = new HashMap<>();
+    @VisibleForTesting
+    Map<Integer, PmkCacheStoreData> mPmkCacheEntries = new HashMap<>();
+    private SupplicantDeathEventHandler mDeathEventHandler;
+    private ServiceManagerDeathRecipient mServiceManagerDeathRecipient;
+    private SupplicantDeathRecipient mSupplicantDeathRecipient;
+    // Death recipient cookie registered for current supplicant instance.
+    private long mDeathRecipientCookie = 0;
     private final Context mContext;
     private final WifiMonitor mWifiMonitor;
     private final FrameworkFacade mFrameworkFacade;
     private final Handler mEventHandler;
+    private DppEventCallback mDppCallback = null;
     private final Clock mClock;
     private final WifiMetrics mWifiMetrics;
     private final WifiGlobals mWifiGlobals;
 
-    // HAL interface object - might be implemented by HIDL or AIDL
-    private ISupplicantStaIfaceHal mStaIfaceHal;
-
-    // Common enums declared here to be independent from HIDL/AIDL.
-    // See HAL comments for more information on each.
-    protected static class DppAkm {
-        public static final int PSK = 0;
-        public static final int PSK_SAE = 1;
-        public static final int SAE = 2;
-        public static final int DPP = 3;
-    }
-
-    protected static class DppCurve {
-        public static final int PRIME256V1 = 0;
-        public static final int SECP384R1 = 1;
-        public static final int SECP521R1 = 2;
-        public static final int BRAINPOOLP256R1 = 3;
-        public static final int BRAINPOOLP384R1 = 4;
-        public static final int BRAINPOOLP512R1 = 5;
-    }
-
-    protected static class DppNetRole {
-        public static final int STA = 0;
-        public static final int AP = 1;
-    }
-
-    protected static class DppEventType {
-        public static final int CONFIGURATION_SENT = 0;
-        public static final int CONFIGURATION_APPLIED = 1;
-    }
-
-    protected static class DppFailureCode {
-        public static final int INVALID_URI = 0;
-        public static final int AUTHENTICATION = 1;
-        public static final int NOT_COMPATIBLE = 2;
-        public static final int CONFIGURATION = 3;
-        public static final int BUSY = 4;
-        public static final int TIMEOUT = 5;
-        public static final int FAILURE = 6;
-        public static final int NOT_SUPPORTED = 7;
-        public static final int CONFIGURATION_REJECTED = 8;
-        public static final int CANNOT_FIND_NETWORK = 9;
-        public static final int ENROLLEE_AUTHENTICATION = 10;
-        public static final int URI_GENERATION = 11;
-    }
-
-    protected static class DppProgressCode {
-        public static final int AUTHENTICATION_SUCCESS = 0;
-        public static final int RESPONSE_PENDING = 1;
-        public static final int CONFIGURATION_SENT_WAITING_RESPONSE = 2;
-        public static final int CONFIGURATION_ACCEPTED = 3;
-    }
-
-    protected static class MboAssocDisallowedReasonCode {
-        public static final byte RESERVED = 0;
-        public static final byte UNSPECIFIED = 1;
-        public static final byte MAX_NUM_STA_ASSOCIATED = 2;
-        public static final byte AIR_INTERFACE_OVERLOADED = 3;
-        public static final byte AUTH_SERVER_OVERLOADED = 4;
-        public static final byte INSUFFICIENT_RSSI = 5;
-    }
-
-    protected static class StaIfaceReasonCode {
-        public static final int UNSPECIFIED = 1;
-        public static final int PREV_AUTH_NOT_VALID = 2;
-        public static final int DEAUTH_LEAVING = 3;
-        public static final int DISASSOC_DUE_TO_INACTIVITY = 4;
-        public static final int DISASSOC_AP_BUSY = 5;
-        public static final int CLASS2_FRAME_FROM_NONAUTH_STA = 6;
-        public static final int CLASS3_FRAME_FROM_NONASSOC_STA = 7;
-        public static final int DISASSOC_STA_HAS_LEFT = 8;
-        public static final int STA_REQ_ASSOC_WITHOUT_AUTH = 9;
-        public static final int PWR_CAPABILITY_NOT_VALID = 10;
-        public static final int SUPPORTED_CHANNEL_NOT_VALID = 11;
-        public static final int BSS_TRANSITION_DISASSOC = 12;
-        public static final int INVALID_IE = 13;
-        public static final int MICHAEL_MIC_FAILURE = 14;
-        public static final int FOURWAY_HANDSHAKE_TIMEOUT = 15;
-        public static final int GROUP_KEY_UPDATE_TIMEOUT = 16;
-        public static final int IE_IN_4WAY_DIFFERS = 17;
-        public static final int GROUP_CIPHER_NOT_VALID = 18;
-        public static final int PAIRWISE_CIPHER_NOT_VALID = 19;
-        public static final int AKMP_NOT_VALID = 20;
-        public static final int UNSUPPORTED_RSN_IE_VERSION = 21;
-        public static final int INVALID_RSN_IE_CAPAB = 22;
-        public static final int IEEE_802_1X_AUTH_FAILED = 23;
-        public static final int CIPHER_SUITE_REJECTED = 24;
-        public static final int TDLS_TEARDOWN_UNREACHABLE = 25;
-        public static final int TDLS_TEARDOWN_UNSPECIFIED = 26;
-        public static final int SSP_REQUESTED_DISASSOC = 27;
-        public static final int NO_SSP_ROAMING_AGREEMENT = 28;
-        public static final int BAD_CIPHER_OR_AKM = 29;
-        public static final int NOT_AUTHORIZED_THIS_LOCATION = 30;
-        public static final int SERVICE_CHANGE_PRECLUDES_TS = 31;
-        public static final int UNSPECIFIED_QOS_REASON = 32;
-        public static final int NOT_ENOUGH_BANDWIDTH = 33;
-        public static final int DISASSOC_LOW_ACK = 34;
-        public static final int EXCEEDED_TXOP = 35;
-        public static final int STA_LEAVING = 36;
-        public static final int END_TS_BA_DLS = 37;
-        public static final int UNKNOWN_TS_BA = 38;
-        public static final int TIMEOUT = 39;
-        public static final int PEERKEY_MISMATCH = 45;
-        public static final int AUTHORIZED_ACCESS_LIMIT_REACHED = 46;
-        public static final int EXTERNAL_SERVICE_REQUIREMENTS = 47;
-        public static final int INVALID_FT_ACTION_FRAME_COUNT = 48;
-        public static final int INVALID_PMKID = 49;
-        public static final int INVALID_MDE = 50;
-        public static final int INVALID_FTE = 51;
-        public static final int MESH_PEERING_CANCELLED = 52;
-        public static final int MESH_MAX_PEERS = 53;
-        public static final int MESH_CONFIG_POLICY_VIOLATION = 54;
-        public static final int MESH_CLOSE_RCVD = 55;
-        public static final int MESH_MAX_RETRIES = 56;
-        public static final int MESH_CONFIRM_TIMEOUT = 57;
-        public static final int MESH_INVALID_GTK = 58;
-        public static final int MESH_INCONSISTENT_PARAMS = 59;
-        public static final int MESH_INVALID_SECURITY_CAP = 60;
-        public static final int MESH_PATH_ERROR_NO_PROXY_INFO = 61;
-        public static final int MESH_PATH_ERROR_NO_FORWARDING_INFO = 62;
-        public static final int MESH_PATH_ERROR_DEST_UNREACHABLE = 63;
-        public static final int MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS = 64;
-        public static final int MESH_CHANNEL_SWITCH_REGULATORY_REQ = 65;
-        public static final int MESH_CHANNEL_SWITCH_UNSPECIFIED = 66;
-
-        public static String toString(int code) {
-            switch(code) {
-                case UNSPECIFIED:
-                    return "UNSPECIFIED";
-                case PREV_AUTH_NOT_VALID:
-                    return "PREV_AUTH_NOT_VALID";
-                case DEAUTH_LEAVING:
-                    return "DEAUTH_LEAVING";
-                case DISASSOC_DUE_TO_INACTIVITY:
-                    return "DISASSOC_DUE_TO_INACTIVITY";
-                case DISASSOC_AP_BUSY:
-                    return "DISASSOC_AP_BUSY";
-                case CLASS2_FRAME_FROM_NONAUTH_STA:
-                    return "CLASS2_FRAME_FROM_NONAUTH_STA";
-                case CLASS3_FRAME_FROM_NONASSOC_STA:
-                    return "CLASS3_FRAME_FROM_NONASSOC_STA";
-                case DISASSOC_STA_HAS_LEFT:
-                    return "DISASSOC_STA_HAS_LEFT";
-                case STA_REQ_ASSOC_WITHOUT_AUTH:
-                    return "STA_REQ_ASSOC_WITHOUT_AUTH";
-                case PWR_CAPABILITY_NOT_VALID:
-                    return "PWR_CAPABILITY_NOT_VALID";
-                case SUPPORTED_CHANNEL_NOT_VALID:
-                    return "SUPPORTED_CHANNEL_NOT_VALID";
-                case BSS_TRANSITION_DISASSOC:
-                    return "BSS_TRANSITION_DISASSOC";
-                case INVALID_IE:
-                    return "INVALID_IE";
-                case MICHAEL_MIC_FAILURE:
-                    return "MICHAEL_MIC_FAILURE";
-                case FOURWAY_HANDSHAKE_TIMEOUT:
-                    return "FOURWAY_HANDSHAKE_TIMEOUT";
-                case GROUP_KEY_UPDATE_TIMEOUT:
-                    return "GROUP_KEY_UPDATE_TIMEOUT";
-                case IE_IN_4WAY_DIFFERS:
-                    return "IE_IN_4WAY_DIFFERS";
-                case GROUP_CIPHER_NOT_VALID:
-                    return "GROUP_CIPHER_NOT_VALID";
-                case PAIRWISE_CIPHER_NOT_VALID:
-                    return "PAIRWISE_CIPHER_NOT_VALID";
-                case AKMP_NOT_VALID:
-                    return "AKMP_NOT_VALID";
-                case UNSUPPORTED_RSN_IE_VERSION:
-                    return "UNSUPPORTED_RSN_IE_VERSION";
-                case INVALID_RSN_IE_CAPAB:
-                    return "INVALID_RSN_IE_CAPAB";
-                case IEEE_802_1X_AUTH_FAILED:
-                    return "IEEE_802_1X_AUTH_FAILED";
-                case CIPHER_SUITE_REJECTED:
-                    return "CIPHER_SUITE_REJECTED";
-                case TDLS_TEARDOWN_UNREACHABLE:
-                    return "TDLS_TEARDOWN_UNREACHABLE";
-                case TDLS_TEARDOWN_UNSPECIFIED:
-                    return "TDLS_TEARDOWN_UNSPECIFIED";
-                case SSP_REQUESTED_DISASSOC:
-                    return "SSP_REQUESTED_DISASSOC";
-                case NO_SSP_ROAMING_AGREEMENT:
-                    return "NO_SSP_ROAMING_AGREEMENT";
-                case BAD_CIPHER_OR_AKM:
-                    return "BAD_CIPHER_OR_AKM";
-                case NOT_AUTHORIZED_THIS_LOCATION:
-                    return "NOT_AUTHORIZED_THIS_LOCATION";
-                case SERVICE_CHANGE_PRECLUDES_TS:
-                    return "SERVICE_CHANGE_PRECLUDES_TS";
-                case UNSPECIFIED_QOS_REASON:
-                    return "UNSPECIFIED_QOS_REASON";
-                case NOT_ENOUGH_BANDWIDTH:
-                    return "NOT_ENOUGH_BANDWIDTH";
-                case DISASSOC_LOW_ACK:
-                    return "DISASSOC_LOW_ACK";
-                case EXCEEDED_TXOP:
-                    return "EXCEEDED_TXOP";
-                case STA_LEAVING:
-                    return "STA_LEAVING";
-                case END_TS_BA_DLS:
-                    return "END_TS_BA_DLS";
-                case UNKNOWN_TS_BA:
-                    return "UNKNOWN_TS_BA";
-                case TIMEOUT:
-                    return "TIMEOUT";
-                case PEERKEY_MISMATCH:
-                    return "PEERKEY_MISMATCH";
-                case AUTHORIZED_ACCESS_LIMIT_REACHED:
-                    return "AUTHORIZED_ACCESS_LIMIT_REACHED";
-                case EXTERNAL_SERVICE_REQUIREMENTS:
-                    return "EXTERNAL_SERVICE_REQUIREMENTS";
-                case INVALID_FT_ACTION_FRAME_COUNT:
-                    return "INVALID_FT_ACTION_FRAME_COUNT";
-                case INVALID_PMKID:
-                    return "INVALID_PMKID";
-                case INVALID_MDE:
-                    return "INVALID_MDE";
-                case INVALID_FTE:
-                    return "INVALID_FTE";
-                case MESH_PEERING_CANCELLED:
-                    return "MESH_PEERING_CANCELLED";
-                case MESH_MAX_PEERS:
-                    return "MESH_MAX_PEERS";
-                case MESH_CONFIG_POLICY_VIOLATION:
-                    return "MESH_CONFIG_POLICY_VIOLATION";
-                case MESH_CLOSE_RCVD:
-                    return "MESH_CLOSE_RCVD";
-                case MESH_MAX_RETRIES:
-                    return "MESH_MAX_RETRIES";
-                case MESH_CONFIRM_TIMEOUT:
-                    return "MESH_CONFIRM_TIMEOUT";
-                case MESH_INVALID_GTK:
-                    return "MESH_INVALID_GTK";
-                case MESH_INCONSISTENT_PARAMS:
-                    return "MESH_INCONSISTENT_PARAMS";
-                case MESH_INVALID_SECURITY_CAP:
-                    return "MESH_INVALID_SECURITY_CAP";
-                case MESH_PATH_ERROR_NO_PROXY_INFO:
-                    return "MESH_PATH_ERROR_NO_PROXY_INFO";
-                case MESH_PATH_ERROR_NO_FORWARDING_INFO:
-                    return "MESH_PATH_ERROR_NO_FORWARDING_INFO";
-                case MESH_PATH_ERROR_DEST_UNREACHABLE:
-                    return "MESH_PATH_ERROR_DEST_UNREACHABLE";
-                case MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS:
-                    return "MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS";
-                case MESH_CHANNEL_SWITCH_REGULATORY_REQ:
-                    return "MESH_CHANNEL_SWITCH_REGULATORY_REQ";
-                case MESH_CHANNEL_SWITCH_UNSPECIFIED:
-                    return "MESH_CHANNEL_SWITCH_UNSPECIFIED";
-                default:
-                    return "Unknown StaIfaceReasonCode: " + code;
-            }
-        }
-    }
-
-    protected static class StaIfaceStatusCode {
-        public static final int SUCCESS = 0;
-        public static final int UNSPECIFIED_FAILURE = 1;
-        public static final int TDLS_WAKEUP_ALTERNATE = 2;
-        public static final int TDLS_WAKEUP_REJECT = 3;
-        public static final int SECURITY_DISABLED = 5;
-        public static final int UNACCEPTABLE_LIFETIME = 6;
-        public static final int NOT_IN_SAME_BSS = 7;
-        public static final int CAPS_UNSUPPORTED = 10;
-        public static final int REASSOC_NO_ASSOC = 11;
-        public static final int ASSOC_DENIED_UNSPEC = 12;
-        public static final int NOT_SUPPORTED_AUTH_ALG = 13;
-        public static final int UNKNOWN_AUTH_TRANSACTION = 14;
-        public static final int CHALLENGE_FAIL = 15;
-        public static final int AUTH_TIMEOUT = 16;
-        public static final int AP_UNABLE_TO_HANDLE_NEW_STA = 17;
-        public static final int ASSOC_DENIED_RATES = 18;
-        public static final int ASSOC_DENIED_NOSHORT = 19;
-        public static final int SPEC_MGMT_REQUIRED = 22;
-        public static final int PWR_CAPABILITY_NOT_VALID = 23;
-        public static final int SUPPORTED_CHANNEL_NOT_VALID = 24;
-        public static final int ASSOC_DENIED_NO_SHORT_SLOT_TIME = 25;
-        public static final int ASSOC_DENIED_NO_HT = 27;
-        public static final int R0KH_UNREACHABLE = 28;
-        public static final int ASSOC_DENIED_NO_PCO = 29;
-        public static final int ASSOC_REJECTED_TEMPORARILY = 30;
-        public static final int ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31;
-        public static final int UNSPECIFIED_QOS_FAILURE = 32;
-        public static final int DENIED_INSUFFICIENT_BANDWIDTH = 33;
-        public static final int DENIED_POOR_CHANNEL_CONDITIONS = 34;
-        public static final int DENIED_QOS_NOT_SUPPORTED = 35;
-        public static final int REQUEST_DECLINED = 37;
-        public static final int INVALID_PARAMETERS = 38;
-        public static final int REJECTED_WITH_SUGGESTED_CHANGES = 39;
-        public static final int INVALID_IE = 40;
-        public static final int GROUP_CIPHER_NOT_VALID = 41;
-        public static final int PAIRWISE_CIPHER_NOT_VALID = 42;
-        public static final int AKMP_NOT_VALID = 43;
-        public static final int UNSUPPORTED_RSN_IE_VERSION = 44;
-        public static final int INVALID_RSN_IE_CAPAB = 45;
-        public static final int CIPHER_REJECTED_PER_POLICY = 46;
-        public static final int TS_NOT_CREATED = 47;
-        public static final int DIRECT_LINK_NOT_ALLOWED = 48;
-        public static final int DEST_STA_NOT_PRESENT = 49;
-        public static final int DEST_STA_NOT_QOS_STA = 50;
-        public static final int ASSOC_DENIED_LISTEN_INT_TOO_LARGE = 51;
-        public static final int INVALID_FT_ACTION_FRAME_COUNT = 52;
-        public static final int INVALID_PMKID = 53;
-        public static final int INVALID_MDIE = 54;
-        public static final int INVALID_FTIE = 55;
-        public static final int REQUESTED_TCLAS_NOT_SUPPORTED = 56;
-        public static final int INSUFFICIENT_TCLAS_PROCESSING_RESOURCES = 57;
-        public static final int TRY_ANOTHER_BSS = 58;
-        public static final int GAS_ADV_PROTO_NOT_SUPPORTED = 59;
-        public static final int NO_OUTSTANDING_GAS_REQ = 60;
-        public static final int GAS_RESP_NOT_RECEIVED = 61;
-        public static final int STA_TIMED_OUT_WAITING_FOR_GAS_RESP = 62;
-        public static final int GAS_RESP_LARGER_THAN_LIMIT = 63;
-        public static final int REQ_REFUSED_HOME = 64;
-        public static final int ADV_SRV_UNREACHABLE = 65;
-        public static final int REQ_REFUSED_SSPN = 67;
-        public static final int REQ_REFUSED_UNAUTH_ACCESS = 68;
-        public static final int INVALID_RSNIE = 72;
-        public static final int U_APSD_COEX_NOT_SUPPORTED = 73;
-        public static final int U_APSD_COEX_MODE_NOT_SUPPORTED = 74;
-        public static final int BAD_INTERVAL_WITH_U_APSD_COEX = 75;
-        public static final int ANTI_CLOGGING_TOKEN_REQ = 76;
-        public static final int FINITE_CYCLIC_GROUP_NOT_SUPPORTED = 77;
-        public static final int CANNOT_FIND_ALT_TBTT = 78;
-        public static final int TRANSMISSION_FAILURE = 79;
-        public static final int REQ_TCLAS_NOT_SUPPORTED = 80;
-        public static final int TCLAS_RESOURCES_EXCHAUSTED = 81;
-        public static final int REJECTED_WITH_SUGGESTED_BSS_TRANSITION = 82;
-        public static final int REJECT_WITH_SCHEDULE = 83;
-        public static final int REJECT_NO_WAKEUP_SPECIFIED = 84;
-        public static final int SUCCESS_POWER_SAVE_MODE = 85;
-        public static final int PENDING_ADMITTING_FST_SESSION = 86;
-        public static final int PERFORMING_FST_NOW = 87;
-        public static final int PENDING_GAP_IN_BA_WINDOW = 88;
-        public static final int REJECT_U_PID_SETTING = 89;
-        public static final int REFUSED_EXTERNAL_REASON = 92;
-        public static final int REFUSED_AP_OUT_OF_MEMORY = 93;
-        public static final int REJECTED_EMERGENCY_SERVICE_NOT_SUPPORTED = 94;
-        public static final int QUERY_RESP_OUTSTANDING = 95;
-        public static final int REJECT_DSE_BAND = 96;
-        public static final int TCLAS_PROCESSING_TERMINATED = 97;
-        public static final int TS_SCHEDULE_CONFLICT = 98;
-        public static final int DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL = 99;
-        public static final int MCCAOP_RESERVATION_CONFLICT = 100;
-        public static final int MAF_LIMIT_EXCEEDED = 101;
-        public static final int MCCA_TRACK_LIMIT_EXCEEDED = 102;
-        public static final int DENIED_DUE_TO_SPECTRUM_MANAGEMENT = 103;
-        public static final int ASSOC_DENIED_NO_VHT = 104;
-        public static final int ENABLEMENT_DENIED = 105;
-        public static final int RESTRICTION_FROM_AUTHORIZED_GDB = 106;
-        public static final int AUTHORIZATION_DEENABLED = 107;
-        public static final int FILS_AUTHENTICATION_FAILURE = 112;
-        public static final int UNKNOWN_AUTHENTICATION_SERVER = 113;
-
-        public static String toString(int code) {
-            switch(code) {
-                case SUCCESS:
-                    return "SUCCESS";
-                case UNSPECIFIED_FAILURE:
-                    return "UNSPECIFIED_FAILURE";
-                case TDLS_WAKEUP_ALTERNATE:
-                    return "TDLS_WAKEUP_ALTERNATE";
-                case TDLS_WAKEUP_REJECT:
-                    return "TDLS_WAKEUP_REJECT";
-                case SECURITY_DISABLED:
-                    return "SECURITY_DISABLED";
-                case UNACCEPTABLE_LIFETIME:
-                    return "UNACCEPTABLE_LIFETIME";
-                case NOT_IN_SAME_BSS:
-                    return "NOT_IN_SAME_BSS";
-                case CAPS_UNSUPPORTED:
-                    return "CAPS_UNSUPPORTED";
-                case REASSOC_NO_ASSOC:
-                    return "REASSOC_NO_ASSOC";
-                case ASSOC_DENIED_UNSPEC:
-                    return "ASSOC_DENIED_UNSPEC";
-                case NOT_SUPPORTED_AUTH_ALG:
-                    return "NOT_SUPPORTED_AUTH_ALG";
-                case UNKNOWN_AUTH_TRANSACTION:
-                    return "UNKNOWN_AUTH_TRANSACTION";
-                case CHALLENGE_FAIL:
-                    return "CHALLENGE_FAIL";
-                case AUTH_TIMEOUT:
-                    return "AUTH_TIMEOUT";
-                case AP_UNABLE_TO_HANDLE_NEW_STA:
-                    return "AP_UNABLE_TO_HANDLE_NEW_STA";
-                case ASSOC_DENIED_RATES:
-                    return "ASSOC_DENIED_RATES";
-                case ASSOC_DENIED_NOSHORT:
-                    return "ASSOC_DENIED_NOSHORT";
-                case SPEC_MGMT_REQUIRED:
-                    return "SPEC_MGMT_REQUIRED";
-                case PWR_CAPABILITY_NOT_VALID:
-                    return "PWR_CAPABILITY_NOT_VALID";
-                case SUPPORTED_CHANNEL_NOT_VALID:
-                    return "SUPPORTED_CHANNEL_NOT_VALID";
-                case ASSOC_DENIED_NO_SHORT_SLOT_TIME:
-                    return "ASSOC_DENIED_NO_SHORT_SLOT_TIME";
-                case ASSOC_DENIED_NO_HT:
-                    return "ASSOC_DENIED_NO_HT";
-                case R0KH_UNREACHABLE:
-                    return "R0KH_UNREACHABLE";
-                case ASSOC_DENIED_NO_PCO:
-                    return "ASSOC_DENIED_NO_PCO";
-                case ASSOC_REJECTED_TEMPORARILY:
-                    return "ASSOC_REJECTED_TEMPORARILY";
-                case ROBUST_MGMT_FRAME_POLICY_VIOLATION:
-                    return "ROBUST_MGMT_FRAME_POLICY_VIOLATION";
-                case UNSPECIFIED_QOS_FAILURE:
-                    return "UNSPECIFIED_QOS_FAILURE";
-                case DENIED_INSUFFICIENT_BANDWIDTH:
-                    return "DENIED_INSUFFICIENT_BANDWIDTH";
-                case DENIED_POOR_CHANNEL_CONDITIONS:
-                    return "DENIED_POOR_CHANNEL_CONDITIONS";
-                case DENIED_QOS_NOT_SUPPORTED:
-                    return "DENIED_QOS_NOT_SUPPORTED";
-                case REQUEST_DECLINED:
-                    return "REQUEST_DECLINED";
-                case INVALID_PARAMETERS:
-                    return "INVALID_PARAMETERS";
-                case REJECTED_WITH_SUGGESTED_CHANGES:
-                    return "REJECTED_WITH_SUGGESTED_CHANGES";
-                case INVALID_IE:
-                    return "INVALID_IE";
-                case GROUP_CIPHER_NOT_VALID:
-                    return "GROUP_CIPHER_NOT_VALID";
-                case PAIRWISE_CIPHER_NOT_VALID:
-                    return "PAIRWISE_CIPHER_NOT_VALID";
-                case AKMP_NOT_VALID:
-                    return "AKMP_NOT_VALID";
-                case UNSUPPORTED_RSN_IE_VERSION:
-                    return "UNSUPPORTED_RSN_IE_VERSION";
-                case INVALID_RSN_IE_CAPAB:
-                    return "INVALID_RSN_IE_CAPAB";
-                case CIPHER_REJECTED_PER_POLICY:
-                    return "CIPHER_REJECTED_PER_POLICY";
-                case TS_NOT_CREATED:
-                    return "TS_NOT_CREATED";
-                case DIRECT_LINK_NOT_ALLOWED:
-                    return "DIRECT_LINK_NOT_ALLOWED";
-                case DEST_STA_NOT_PRESENT:
-                    return "DEST_STA_NOT_PRESENT";
-                case DEST_STA_NOT_QOS_STA:
-                    return "DEST_STA_NOT_QOS_STA";
-                case ASSOC_DENIED_LISTEN_INT_TOO_LARGE:
-                    return "ASSOC_DENIED_LISTEN_INT_TOO_LARGE";
-                case INVALID_FT_ACTION_FRAME_COUNT:
-                    return "INVALID_FT_ACTION_FRAME_COUNT";
-                case INVALID_PMKID:
-                    return "INVALID_PMKID";
-                case INVALID_MDIE:
-                    return "INVALID_MDIE";
-                case INVALID_FTIE:
-                    return "INVALID_FTIE";
-                case REQUESTED_TCLAS_NOT_SUPPORTED:
-                    return "REQUESTED_TCLAS_NOT_SUPPORTED";
-                case INSUFFICIENT_TCLAS_PROCESSING_RESOURCES:
-                    return "INSUFFICIENT_TCLAS_PROCESSING_RESOURCES";
-                case TRY_ANOTHER_BSS:
-                    return "TRY_ANOTHER_BSS";
-                case GAS_ADV_PROTO_NOT_SUPPORTED:
-                    return "GAS_ADV_PROTO_NOT_SUPPORTED";
-                case NO_OUTSTANDING_GAS_REQ:
-                    return "NO_OUTSTANDING_GAS_REQ";
-                case GAS_RESP_NOT_RECEIVED:
-                    return "GAS_RESP_NOT_RECEIVED";
-                case STA_TIMED_OUT_WAITING_FOR_GAS_RESP:
-                    return "STA_TIMED_OUT_WAITING_FOR_GAS_RESP";
-                case GAS_RESP_LARGER_THAN_LIMIT:
-                    return "GAS_RESP_LARGER_THAN_LIMIT";
-                case REQ_REFUSED_HOME:
-                    return "REQ_REFUSED_HOME";
-                case ADV_SRV_UNREACHABLE:
-                    return "ADV_SRV_UNREACHABLE";
-                case REQ_REFUSED_SSPN:
-                    return "REQ_REFUSED_SSPN";
-                case REQ_REFUSED_UNAUTH_ACCESS:
-                    return "REQ_REFUSED_UNAUTH_ACCESS";
-                case INVALID_RSNIE:
-                    return "INVALID_RSNIE";
-                case U_APSD_COEX_NOT_SUPPORTED:
-                    return "U_APSD_COEX_NOT_SUPPORTED";
-                case U_APSD_COEX_MODE_NOT_SUPPORTED:
-                    return "U_APSD_COEX_MODE_NOT_SUPPORTED";
-                case BAD_INTERVAL_WITH_U_APSD_COEX:
-                    return "BAD_INTERVAL_WITH_U_APSD_COEX";
-                case ANTI_CLOGGING_TOKEN_REQ:
-                    return "ANTI_CLOGGING_TOKEN_REQ";
-                case FINITE_CYCLIC_GROUP_NOT_SUPPORTED:
-                    return "FINITE_CYCLIC_GROUP_NOT_SUPPORTED";
-                case CANNOT_FIND_ALT_TBTT:
-                    return "CANNOT_FIND_ALT_TBTT";
-                case TRANSMISSION_FAILURE:
-                    return "TRANSMISSION_FAILURE";
-                case REQ_TCLAS_NOT_SUPPORTED:
-                    return "REQ_TCLAS_NOT_SUPPORTED";
-                case TCLAS_RESOURCES_EXCHAUSTED:
-                    return "TCLAS_RESOURCES_EXCHAUSTED";
-                case REJECTED_WITH_SUGGESTED_BSS_TRANSITION:
-                    return "REJECTED_WITH_SUGGESTED_BSS_TRANSITION";
-                case REJECT_WITH_SCHEDULE:
-                    return "REJECT_WITH_SCHEDULE";
-                case REJECT_NO_WAKEUP_SPECIFIED:
-                    return "REJECT_NO_WAKEUP_SPECIFIED";
-                case SUCCESS_POWER_SAVE_MODE:
-                    return "SUCCESS_POWER_SAVE_MODE";
-                case PENDING_ADMITTING_FST_SESSION:
-                    return "PENDING_ADMITTING_FST_SESSION";
-                case PERFORMING_FST_NOW:
-                    return "PERFORMING_FST_NOW";
-                case PENDING_GAP_IN_BA_WINDOW:
-                    return "PENDING_GAP_IN_BA_WINDOW";
-                case REJECT_U_PID_SETTING:
-                    return "REJECT_U_PID_SETTING";
-                case REFUSED_EXTERNAL_REASON:
-                    return "REFUSED_EXTERNAL_REASON";
-                case REFUSED_AP_OUT_OF_MEMORY:
-                    return "REFUSED_AP_OUT_OF_MEMORY";
-                case REJECTED_EMERGENCY_SERVICE_NOT_SUPPORTED:
-                    return "REJECTED_EMERGENCY_SERVICE_NOT_SUPPORTED";
-                case QUERY_RESP_OUTSTANDING:
-                    return "QUERY_RESP_OUTSTANDING";
-                case REJECT_DSE_BAND:
-                    return "REJECT_DSE_BAND";
-                case TCLAS_PROCESSING_TERMINATED:
-                    return "TCLAS_PROCESSING_TERMINATED";
-                case TS_SCHEDULE_CONFLICT:
-                    return "TS_SCHEDULE_CONFLICT";
-                case DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL:
-                    return "DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL";
-                case MCCAOP_RESERVATION_CONFLICT:
-                    return "MCCAOP_RESERVATION_CONFLICT";
-                case MAF_LIMIT_EXCEEDED:
-                    return "MAF_LIMIT_EXCEEDED";
-                case MCCA_TRACK_LIMIT_EXCEEDED:
-                    return "MCCA_TRACK_LIMIT_EXCEEDED";
-                case DENIED_DUE_TO_SPECTRUM_MANAGEMENT:
-                    return "DENIED_DUE_TO_SPECTRUM_MANAGEMENT";
-                case ASSOC_DENIED_NO_VHT:
-                    return "ASSOC_DENIED_NO_VHT";
-                case ENABLEMENT_DENIED:
-                    return "ENABLEMENT_DENIED";
-                case RESTRICTION_FROM_AUTHORIZED_GDB:
-                    return "RESTRICTION_FROM_AUTHORIZED_GDB";
-                case AUTHORIZATION_DEENABLED:
-                    return "AUTHORIZATION_DEENABLED";
-                case FILS_AUTHENTICATION_FAILURE:
-                    return "FILS_AUTHENTICATION_FAILURE";
-                case UNKNOWN_AUTHENTICATION_SERVER:
-                    return "UNKNOWN_AUTHENTICATION_SERVER";
-                default:
-                    return "Unknown StaIfaceStatusCode: " + code;
-            }
-        }
-    }
-
-    protected static final int SUPPLICANT_EVENT_CONNECTED = 0;
-    protected static final int SUPPLICANT_EVENT_DISCONNECTED = 1;
-    protected static final int SUPPLICANT_EVENT_ASSOCIATING = 2;
-    protected static final int SUPPLICANT_EVENT_ASSOCIATED = 3;
-    protected static final int SUPPLICANT_EVENT_EAP_METHOD_SELECTED = 4;
-    protected static final int SUPPLICANT_EVENT_EAP_FAILURE = 5;
-    protected static final int SUPPLICANT_EVENT_SSID_TEMP_DISABLED = 6;
-    protected static final int SUPPLICANT_EVENT_OPEN_SSL_FAILURE = 7;
-
-    @IntDef(prefix = { "SUPPLICANT_EVENT_" }, value = {
-            SUPPLICANT_EVENT_CONNECTED,
-            SUPPLICANT_EVENT_DISCONNECTED,
-            SUPPLICANT_EVENT_ASSOCIATING,
-            SUPPLICANT_EVENT_ASSOCIATED,
-            SUPPLICANT_EVENT_EAP_METHOD_SELECTED,
-            SUPPLICANT_EVENT_EAP_FAILURE,
-            SUPPLICANT_EVENT_SSID_TEMP_DISABLED,
-            SUPPLICANT_EVENT_OPEN_SSL_FAILURE,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    protected @interface SupplicantEventCode {}
-
-    protected static String supplicantEventCodeToString(@SupplicantEventCode int eventCode) {
-        switch (eventCode) {
-            case SUPPLICANT_EVENT_CONNECTED:
-                return "CONNECTED";
-            case SUPPLICANT_EVENT_DISCONNECTED:
-                return "DISCONNECTED";
-            case SUPPLICANT_EVENT_ASSOCIATING:
-                return "ASSOCIATING";
-            case SUPPLICANT_EVENT_ASSOCIATED:
-                return "ASSOCIATED";
-            case SUPPLICANT_EVENT_EAP_METHOD_SELECTED:
-                return "EAP_METHOD_SELECTED";
-            case SUPPLICANT_EVENT_EAP_FAILURE:
-                return "EAP_FAILURE";
-            case SUPPLICANT_EVENT_SSID_TEMP_DISABLED:
-                return "SSID_TEMP_DISABLED";
-            case SUPPLICANT_EVENT_OPEN_SSL_FAILURE:
-                return "OPEN_SSL_FAILURE";
-            default:
-                return "Invalid SupplicantEventCode: " + eventCode;
-        }
-    }
-
-    protected static final int QOS_POLICY_REQUEST_ADD = 0;
-    protected static final int QOS_POLICY_REQUEST_REMOVE = 1;
-
-    @IntDef(prefix = { "QOS_POLICY_REQUEST_" }, value = {
-            QOS_POLICY_REQUEST_ADD,
-            QOS_POLICY_REQUEST_REMOVE
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    protected @interface QosPolicyRequestType {}
-
-    protected static class QosPolicyRequest {
-        public final byte policyId;
-        public final @QosPolicyRequestType int requestType;
-        public final byte dscp;
-        public final QosPolicyClassifierParams classifierParams;
-
-        public QosPolicyRequest(byte halPolicyId, @QosPolicyRequestType int halRequestType,
-                byte halDscp, @NonNull QosPolicyClassifierParams frameworkClassifierParams) {
-            policyId = halPolicyId;
-            dscp = halDscp;
-            requestType = halRequestType;
-            classifierParams = frameworkClassifierParams;
-        }
-
-        public boolean isAddRequest() {
-            return requestType == QOS_POLICY_REQUEST_ADD;
-        }
-
-        public boolean isRemoveRequest() {
-            return requestType == QOS_POLICY_REQUEST_REMOVE;
-        }
-
-        @Override
-        public String toString() {
-            return "policyId: " + policyId + ", isAddRequest: " + this.isAddRequest()
-                    + ", isRemoveRequest: " + this.isRemoveRequest() + ", dscp: " + dscp
-                    + ", classifierParams: {" + classifierParams + "}";
-        }
-    }
-
-    protected static class QosPolicyClassifierParams {
-        public InetAddress srcIp = null;
-        public InetAddress dstIp = null;
-        public Range dstPortRange = null;
-        public final int srcPort;
-        public final int protocol;
-
-        public final boolean hasSrcIp;
-        public final boolean hasDstIp;
-        public boolean isValid = true;
-
-        public QosPolicyClassifierParams(boolean halHasSrcIp, byte[] halSrcIp, boolean halHasDstIp,
-                byte[] halDstIp, int halSrcPort, @NonNull int[] halDstPortRange,
-                int halProtocol) {
-            srcPort = halSrcPort;
-            protocol = halProtocol;
-
-            hasSrcIp = halHasSrcIp;
-            if (hasSrcIp) {
-                try {
-                    srcIp = InetAddress.getByAddress(halSrcIp);
-                } catch (UnknownHostException e) {
-                    isValid = false;
+    private final IServiceNotification mServiceNotificationCallback =
+            new IServiceNotification.Stub() {
+        public void onRegistration(String fqName, String name, boolean preexisting) {
+            synchronized (mLock) {
+                if (mVerboseLoggingEnabled) {
+                    Log.i(TAG, "IServiceNotification.onRegistration for: " + fqName
+                            + ", " + name + " preexisting=" + preexisting);
+                }
+                if (!initSupplicantService()) {
+                    Log.e(TAG, "initalizing ISupplicant failed.");
+                    supplicantServiceDiedHandler(mDeathRecipientCookie);
+                } else {
+                    Log.i(TAG, "Completed initialization of ISupplicant.");
                 }
             }
-
-            hasDstIp = halHasDstIp;
-            if (hasDstIp) {
-                try {
-                    dstIp = InetAddress.getByAddress(halDstIp);
-                } catch (UnknownHostException e) {
-                    isValid = false;
-                }
-            }
-
-            if (halDstPortRange[0] > halDstPortRange[1]) {
-                isValid = false;
-            } else {
-                dstPortRange = new Range(halDstPortRange[0], halDstPortRange[1]);
-            }
         }
-
+    };
+    private class ServiceManagerDeathRecipient implements DeathRecipient {
         @Override
-        public String toString() {
-            return "isValid: " + isValid + ", hasSrcIp: " + hasSrcIp + ", hasDstIp: " + hasDstIp
-                    + ", srcIp: " + srcIp + ", dstIp: " + dstIp + ", dstPortRange: " + dstPortRange
-                    + ", srcPort: " + srcPort + ", protocol: " + protocol;
+        public void serviceDied(long cookie) {
+            mEventHandler.post(() -> {
+                synchronized (mLock) {
+                    Log.w(TAG, "IServiceManager died: cookie=" + cookie);
+                    supplicantServiceDiedHandler(mDeathRecipientCookie);
+                    mIServiceManager = null; // Will need to register a new ServiceNotification
+                }
+            });
+        }
+    }
+    private class SupplicantDeathRecipient implements DeathRecipient {
+        @Override
+        public void serviceDied(long cookie) {
+            mEventHandler.post(() -> {
+                synchronized (mLock) {
+                    Log.w(TAG, "ISupplicant died: cookie=" + cookie);
+                    supplicantServiceDiedHandler(cookie);
+                }
+            });
         }
     }
 
-    protected static class QosPolicyStatus {
-        public final int policyId;
-        public final int dscpPolicyStatus;
+    @VisibleForTesting
+    static class PmkCacheStoreData {
+        public long expirationTimeInSec;
+        public ArrayList<Byte> data;
+        public MacAddress macAddress;
 
-        public QosPolicyStatus(int id, int status) {
-            policyId = id;
-            dscpPolicyStatus = status;
+        PmkCacheStoreData(long timeInSec, ArrayList<Byte> serializedData, MacAddress macAddress) {
+            expirationTimeInSec = timeInSec;
+            data = serializedData;
+            this.macAddress = macAddress;
         }
     }
 
     public SupplicantStaIfaceHal(Context context, WifiMonitor monitor,
-            FrameworkFacade frameworkFacade, Handler handler,
-            Clock clock, WifiMetrics wifiMetrics,
-            WifiGlobals wifiGlobals) {
+                                 FrameworkFacade frameworkFacade, Handler handler,
+                                 Clock clock, WifiMetrics wifiMetrics,
+                                 WifiGlobals wifiGlobals) {
         mContext = context;
         mWifiMonitor = monitor;
         mFrameworkFacade = frameworkFacade;
@@ -765,39 +200,38 @@
         mClock = clock;
         mWifiMetrics = wifiMetrics;
         mWifiGlobals = wifiGlobals;
-        mStaIfaceHal = createStaIfaceHalMockable();
-        if (mStaIfaceHal == null) {
-            Log.wtf(TAG, "Failed to get internal ISupplicantStaIfaceHal instance.");
-        }
+
+        mServiceManagerDeathRecipient = new ServiceManagerDeathRecipient();
+        mSupplicantDeathRecipient = new SupplicantDeathRecipient();
     }
 
     /**
      * Enable/Disable verbose logging.
-     * @param verboseEnabled Verbose flag set in overlay XML.
-     * @param halVerboseEnabled Verbose flag set by the user.
+     *
+     * @param enable true to enable, false to disable.
      */
-    void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
+    void enableVerboseLogging(boolean enable) {
         synchronized (mLock) {
-            if (mStaIfaceHal != null) {
-                mStaIfaceHal.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-            }
+            mVerboseLoggingEnabled = enable;
         }
     }
 
-    /**
-     * Initialize the STA Iface HAL. Creates the internal ISupplicantStaIfaceHal
-     * object and calls its initialize method.
-     *
-     * @return true if the initialization succeeded
-     */
-    public boolean initialize() {
+    protected boolean isVerboseLoggingEnabled() {
+        return mVerboseLoggingEnabled;
+    }
+
+    private boolean linkToServiceManagerDeath() {
         synchronized (mLock) {
-            if (mStaIfaceHal == null) {
-                Log.wtf(TAG, "Internal ISupplicantStaIfaceHal instance does not exist.");
-                return false;
-            }
-            if (!mStaIfaceHal.initialize()) {
-                Log.e(TAG, "Failed to init ISupplicantStaIfaceHal, stopping startup.");
+            if (mIServiceManager == null) return false;
+            try {
+                if (!mIServiceManager.linkToDeath(mServiceManagerDeathRecipient, 0)) {
+                    Log.wtf(TAG, "Error on linkToDeath on IServiceManager");
+                    supplicantServiceDiedHandler(mDeathRecipientCookie);
+                    mIServiceManager = null; // Will need to register a new ServiceNotification
+                    return false;
+                }
+            } catch (RemoteException e) {
+                Log.e(TAG, "IServiceManager.linkToDeath exception", e);
                 return false;
             }
             return true;
@@ -805,28 +239,206 @@
     }
 
     /**
-     * Wrapper function to create the ISupplicantStaIfaceHal object.
-     * Created to be mockable in unit tests.
+     * Registers a service notification for the ISupplicant service, which triggers initialization
+     * of the ISupplicantStaIface
+     * @return true if the service notification was successfully registered
      */
-    @VisibleForTesting
-    protected ISupplicantStaIfaceHal createStaIfaceHalMockable() {
+    public boolean initialize() {
         synchronized (mLock) {
-            // Prefer AIDL implementation if service is declared.
-            if (SupplicantStaIfaceHalAidlImpl.serviceDeclared()) {
-                Log.i(TAG, "Initializing SupplicantStaIfaceHal using AIDL implementation.");
-                return new SupplicantStaIfaceHalAidlImpl(mContext, mWifiMonitor,
-                        mEventHandler, mClock, mWifiMetrics, mWifiGlobals);
-
-            } else if (SupplicantStaIfaceHalHidlImpl.serviceDeclared()) {
-                Log.i(TAG, "Initializing SupplicantStaIfaceHal using HIDL implementation.");
-                return new SupplicantStaIfaceHalHidlImpl(mContext, mWifiMonitor, mFrameworkFacade,
-                        mEventHandler, mClock, mWifiMetrics, mWifiGlobals);
+            if (mVerboseLoggingEnabled) {
+                Log.i(TAG, "Registering ISupplicant service ready callback.");
             }
-            Log.e(TAG, "No HIDL or AIDL service available for SupplicantStaIfaceHal.");
-            return null;
+            mISupplicant = null;
+            mISupplicantStaIfaces.clear();
+            if (mIServiceManager != null) {
+                // Already have an IServiceManager and serviceNotification registered, don't
+                // don't register another.
+                return true;
+            }
+            try {
+                mIServiceManager = getServiceManagerMockable();
+                if (mIServiceManager == null) {
+                    Log.e(TAG, "Failed to get HIDL Service Manager");
+                    return false;
+                }
+                if (!linkToServiceManagerDeath()) {
+                    return false;
+                }
+                /* TODO(b/33639391) : Use the new ISupplicant.registerForNotifications() once it
+                   exists */
+                if (!mIServiceManager.registerForNotifications(
+                        ISupplicant.kInterfaceName, "", mServiceNotificationCallback)) {
+                    Log.e(TAG, "Failed to register for notifications to "
+                            + ISupplicant.kInterfaceName);
+                    mIServiceManager = null; // Will need to register a new ServiceNotification
+                    return false;
+                }
+            } catch (RemoteException e) {
+                Log.e(TAG, "Exception while trying to register a listener for ISupplicant service: "
+                        + e);
+                supplicantServiceDiedHandler(mDeathRecipientCookie);
+            }
+            return true;
         }
     }
 
+    private boolean linkToSupplicantDeath(
+            DeathRecipient deathRecipient, long cookie) {
+        synchronized (mLock) {
+            if (mISupplicant == null) return false;
+            try {
+                if (!mISupplicant.linkToDeath(deathRecipient, cookie)) {
+                    Log.wtf(TAG, "Error on linkToDeath on ISupplicant");
+                    supplicantServiceDiedHandler(mDeathRecipientCookie);
+                    return false;
+                }
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicant.linkToDeath exception", e);
+                return false;
+            }
+            return true;
+        }
+    }
+
+    private boolean initSupplicantService() {
+        synchronized (mLock) {
+            try {
+                mISupplicant = getSupplicantMockable();
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicant.getService exception: " + e);
+                return false;
+            } catch (NoSuchElementException e) {
+                Log.e(TAG, "ISupplicant.getService exception: " + e);
+                return false;
+            }
+            if (mISupplicant == null) {
+                Log.e(TAG, "Got null ISupplicant service. Stopping supplicant HIDL startup");
+                return false;
+            }
+            if (!linkToSupplicantDeath(mSupplicantDeathRecipient, ++mDeathRecipientCookie)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    protected int getCurrentNetworkId(@NonNull String ifaceName) {
+        synchronized (mLock) {
+            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
+            if (currentConfig == null) {
+                return WifiConfiguration.INVALID_NETWORK_ID;
+            }
+            return currentConfig.networkId;
+        }
+    }
+
+    private boolean trySetupStaIfaceV1_4(@NonNull String ifaceName,
+            @NonNull ISupplicantStaIface iface)  throws RemoteException {
+        if (!isV1_4()) return false;
+
+        SupplicantStaIfaceHalCallbackV1_4 callbackV14 =
+                new SupplicantStaIfaceHalCallbackV1_4(ifaceName);
+        if (!registerCallbackV1_4(getStaIfaceMockableV1_4(iface), callbackV14)) {
+            throw new RemoteException("Init StaIface V1_4 failed.");
+        }
+        /* keep this in a store to avoid recycling by garbage collector. */
+        mISupplicantStaIfaceCallbacks.put(ifaceName, callbackV14);
+        return true;
+    }
+
+    private boolean trySetupStaIfaceV1_3(@NonNull String ifaceName,
+            @NonNull ISupplicantStaIface iface)  throws RemoteException {
+        if (!isV1_3()) return false;
+
+        /* try newer version first. */
+        if (trySetupStaIfaceV1_4(ifaceName, iface)) {
+            logd("Newer HAL is found, skip V1_3 remaining init flow.");
+            return true;
+        }
+        SupplicantStaIfaceHalCallbackV1_3 callbackV13 =
+                new SupplicantStaIfaceHalCallbackV1_3(ifaceName);
+        if (!registerCallbackV1_3(getStaIfaceMockableV1_3(iface), callbackV13)) {
+            throw new RemoteException("Init StaIface V1_3 failed.");
+        }
+        /* keep this in a store to avoid recycling by garbage collector. */
+        mISupplicantStaIfaceCallbacks.put(ifaceName, callbackV13);
+        return true;
+    }
+
+    private boolean trySetupStaIfaceV1_2(@NonNull String ifaceName,
+            @NonNull ISupplicantStaIface iface) throws RemoteException {
+        if (!isV1_2()) return false;
+
+        /* try newer version first. */
+        if (trySetupStaIfaceV1_3(ifaceName, iface)) {
+            logd("Newer HAL is found, skip V1_2 remaining init flow.");
+            return true;
+        }
+
+        SupplicantStaIfaceHalCallbackV1_2 callbackV12 =
+                new SupplicantStaIfaceHalCallbackV1_2(ifaceName);
+        if (!registerCallbackV1_2(getStaIfaceMockableV1_2(iface), callbackV12)) {
+            throw new RemoteException("Init StaIface V1_2 failed.");
+        }
+        /* keep this in a store to avoid recycling by garbage collector. */
+        mISupplicantStaIfaceCallbacks.put(ifaceName, callbackV12);
+        return true;
+    }
+
+    private boolean trySetupStaIfaceV1_1(@NonNull String ifaceName,
+            @NonNull ISupplicantStaIface iface) throws RemoteException {
+        if (!isV1_1()) return false;
+
+        /* try newer version first. */
+        if (trySetupStaIfaceV1_2(ifaceName, iface)) {
+            logd("Newer HAL is found, skip V1_1 remaining init flow.");
+            return true;
+        }
+
+        SupplicantStaIfaceHalCallbackV1_1 callbackV11 =
+                new SupplicantStaIfaceHalCallbackV1_1(ifaceName);
+        if (!registerCallbackV1_1(getStaIfaceMockableV1_1(iface), callbackV11)) {
+            throw new RemoteException("Init StaIface V1_1 failed.");
+        }
+        /* keep this in a store to avoid recycling by garbage collector. */
+        mISupplicantStaIfaceCallbacks.put(ifaceName, callbackV11);
+        return true;
+    }
+
+    /**
+     * Helper function to set up StaIface with different HAL version.
+     *
+     * This helper function would try newer version recursively.
+     * Once the latest version is found, it would register the callback
+     * of the latest version and skip unnecessary older HAL init flow.
+     *
+     * New version callback will be extended from the older one, as a result,
+     * older callback is always created regardless of the latest version.
+     *
+     * Uprev steps:
+     * 1. add new helper function trySetupStaIfaceV1_Y.
+     * 2. call newly added function in trySetupStaIfaceV1_X (X should be Y-1).
+     */
+    private ISupplicantStaIface setupStaIface(@NonNull String ifaceName,
+            @NonNull ISupplicantIface ifaceHwBinder) throws RemoteException {
+        /* Prepare base type for later cast. */
+        ISupplicantStaIface iface = getStaIfaceMockable(ifaceHwBinder);
+
+        /* try newer version first. */
+        if (trySetupStaIfaceV1_1(ifaceName, iface)) {
+            logd("Newer HAL is found, skip V1_0 remaining init flow.");
+            return iface;
+        }
+
+        SupplicantStaIfaceHalCallback callback = new SupplicantStaIfaceHalCallback(ifaceName);
+        if (!registerCallback(iface, callback)) {
+            throw new RemoteException("Init StaIface V1_0 failed.");
+        }
+        /* keep this in a store to avoid recycling by garbage collector. */
+        mISupplicantStaIfaceCallbacks.put(ifaceName, callback);
+        return iface;
+    }
+
     /**
      * Setup a STA interface for the specified iface name.
      *
@@ -834,12 +446,123 @@
      * @return true on success, false otherwise.
      */
     public boolean setupIface(@NonNull String ifaceName) {
+        final String methodStr = "setupIface";
+        if (checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr) != null) return false;
+        ISupplicantIface ifaceHwBinder;
+
+        if (isV1_1()) {
+            ifaceHwBinder = addIfaceV1_1(ifaceName);
+        } else {
+            ifaceHwBinder = getIfaceV1_0(ifaceName);
+        }
+        if (ifaceHwBinder == null) {
+            Log.e(TAG, "setupIface got null iface");
+            return false;
+        }
+
+        try {
+            ISupplicantStaIface iface = setupStaIface(ifaceName, ifaceHwBinder);
+            mISupplicantStaIfaces.put(ifaceName, iface);
+        } catch (RemoteException e) {
+            loge("setup StaIface failed: " + e.toString());
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Get a STA interface for the specified iface name.
+     *
+     * @param ifaceName Name of the interface.
+     * @return true on success, false otherwise.
+     */
+    private ISupplicantIface getIfaceV1_0(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "setupIface";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (mISupplicant == null) {
+                return null;
             }
-            return mStaIfaceHal.setupIface(ifaceName);
+
+            /** List all supplicant Ifaces */
+            final ArrayList<ISupplicant.IfaceInfo> supplicantIfaces = new ArrayList<>();
+            try {
+                mISupplicant.listInterfaces((SupplicantStatus status,
+                                             ArrayList<ISupplicant.IfaceInfo> ifaces) -> {
+                    if (status.code != SupplicantStatusCode.SUCCESS) {
+                        Log.e(TAG, "Getting Supplicant Interfaces failed: " + status.code);
+                        return;
+                    }
+                    supplicantIfaces.addAll(ifaces);
+                });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicant.listInterfaces exception: " + e);
+                handleRemoteException(e, "listInterfaces");
+                return null;
+            }
+            if (supplicantIfaces.size() == 0) {
+                Log.e(TAG, "Got zero HIDL supplicant ifaces. Stopping supplicant HIDL startup.");
+                return null;
+            }
+            Mutable<ISupplicantIface> supplicantIface = new Mutable<>();
+            for (ISupplicant.IfaceInfo ifaceInfo : supplicantIfaces) {
+                if (ifaceInfo.type == IfaceType.STA && ifaceName.equals(ifaceInfo.name)) {
+                    try {
+                        mISupplicant.getInterface(ifaceInfo,
+                                (SupplicantStatus status, ISupplicantIface iface) -> {
+                                    if (status.code != SupplicantStatusCode.SUCCESS) {
+                                        Log.e(TAG, "Failed to get ISupplicantIface " + status.code);
+                                        return;
+                                    }
+                                    supplicantIface.value = iface;
+                                });
+                    } catch (RemoteException e) {
+                        Log.e(TAG, "ISupplicant.getInterface exception: " + e);
+                        handleRemoteException(e, "getInterface");
+                        return null;
+                    }
+                    break;
+                }
+            }
+            return supplicantIface.value;
+        }
+    }
+
+    /**
+     * Create a STA interface for the specified iface name.
+     *
+     * @param ifaceName Name of the interface.
+     * @return true on success, false otherwise.
+     */
+    private ISupplicantIface addIfaceV1_1(@NonNull String ifaceName) {
+        synchronized (mLock) {
+            ISupplicant.IfaceInfo ifaceInfo = new ISupplicant.IfaceInfo();
+            ifaceInfo.name = ifaceName;
+            ifaceInfo.type = IfaceType.STA;
+            Mutable<ISupplicantIface> supplicantIface = new Mutable<>();
+            try {
+                getSupplicantMockableV1_1().addInterface(ifaceInfo,
+                        (SupplicantStatus status, ISupplicantIface iface) -> {
+                            if (status.code != SupplicantStatusCode.SUCCESS
+                                    && status.code != SupplicantStatusCode.FAILURE_IFACE_EXISTS) {
+                                Log.e(TAG, "Failed to create ISupplicantIface " + status.code);
+                                return;
+                            }
+                            supplicantIface.value = iface;
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicant.addInterface exception: " + e);
+                handleRemoteException(e, "addInterface");
+                return null;
+            } catch (NoSuchElementException e) {
+                Log.e(TAG, "ISupplicant.addInterface exception: " + e);
+                handleNoSuchElementException(e, "addInterface");
+                return null;
+            } catch (IllegalArgumentException e) {
+                handleIllegalArgumentException(e, "addInterface");
+                Log.e(TAG, "ISupplicant.addInterface exception: " + e);
+                return null;
+            }
+            return supplicantIface.value;
         }
     }
 
@@ -851,11 +574,50 @@
      */
     public boolean teardownIface(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "teardownIface";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "teardownIface";
+            if (checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr) == null) return false;
+            if (isV1_1()) {
+                if (!removeIfaceV1_1(ifaceName)) {
+                    Log.e(TAG, "Failed to remove iface = " + ifaceName);
+                    return false;
+                }
             }
-            return mStaIfaceHal.teardownIface(ifaceName);
+            if (mISupplicantStaIfaces.remove(ifaceName) == null) {
+                Log.e(TAG, "Trying to teardown unknown inteface");
+                return false;
+            }
+            mISupplicantStaIfaceCallbacks.remove(ifaceName);
+            return true;
+        }
+    }
+
+    /**
+     * Remove a STA interface for the specified iface name.
+     *
+     * @param ifaceName Name of the interface.
+     * @return true on success, false otherwise.
+     */
+    private boolean removeIfaceV1_1(@NonNull String ifaceName) {
+        synchronized (mLock) {
+            try {
+                ISupplicant.IfaceInfo ifaceInfo = new ISupplicant.IfaceInfo();
+                ifaceInfo.name = ifaceName;
+                ifaceInfo.type = IfaceType.STA;
+                SupplicantStatus status = getSupplicantMockableV1_1().removeInterface(ifaceInfo);
+                if (status.code != SupplicantStatusCode.SUCCESS) {
+                    Log.e(TAG, "Failed to remove iface " + status.code);
+                    return false;
+                }
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicant.removeInterface exception: " + e);
+                handleRemoteException(e, "removeInterface");
+                return false;
+            } catch (NoSuchElementException e) {
+                Log.e(TAG, "ISupplicant.removeInterface exception: " + e);
+                handleNoSuchElementException(e, "removeInterface");
+                return false;
+            }
+            return true;
         }
     }
 
@@ -863,14 +625,12 @@
      * Registers a death notification for supplicant.
      * @return Returns true on success.
      */
-    public boolean registerDeathHandler(@NonNull WifiNative.SupplicantDeathEventHandler handler) {
-        synchronized (mLock) {
-            String methodStr = "registerDeathHandler";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.registerDeathHandler(handler);
+    public boolean registerDeathHandler(@NonNull SupplicantDeathEventHandler handler) {
+        if (mDeathEventHandler != null) {
+            Log.e(TAG, "Death handler already present");
         }
+        mDeathEventHandler = handler;
+        return true;
     }
 
     /**
@@ -878,38 +638,76 @@
      * @return Returns true on success.
      */
     public boolean deregisterDeathHandler() {
+        if (mDeathEventHandler == null) {
+            Log.e(TAG, "No Death handler present");
+        }
+        mDeathEventHandler = null;
+        return true;
+    }
+
+
+    private void clearState() {
         synchronized (mLock) {
-            String methodStr = "deregisterDeathHandler";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            mISupplicant = null;
+            mISupplicantStaIfaces.clear();
+            mCurrentNetworkLocalConfigs.clear();
+            mCurrentNetworkRemoteHandles.clear();
+            mLinkedNetworkLocalAndRemoteConfigs.clear();
+        }
+    }
+
+    private void supplicantServiceDiedHandler(long cookie) {
+        synchronized (mLock) {
+            if (mDeathRecipientCookie != cookie) {
+                Log.i(TAG, "Ignoring stale death recipient notification");
+                return;
             }
-            return mStaIfaceHal.deregisterDeathHandler();
+            clearState();
+            if (mDeathEventHandler != null) {
+                mDeathEventHandler.onDeath();
+            }
         }
     }
 
     /**
-     * Signals whether initialization started successfully.
+     * Signals whether Initialization completed successfully.
      */
     public boolean isInitializationStarted() {
         synchronized (mLock) {
-            String methodStr = "isInitializationStarted";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.isInitializationStarted();
+            return mIServiceManager != null;
         }
     }
 
     /**
-     * Signals whether initialization completed successfully.
+     * Signals whether Initialization completed successfully.
      */
     public boolean isInitializationComplete() {
         synchronized (mLock) {
-            String methodStr = "isInitializationComplete";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            return mISupplicant != null;
+        }
+    }
+
+
+    /**
+     * Start the supplicant daemon for V1_1 service.
+     *
+     * @return true on success, false otherwise.
+     */
+    private boolean startDaemon_V1_1() {
+        synchronized (mLock) {
+            try {
+                // This should startup supplicant daemon using the lazy start HAL mechanism.
+                getSupplicantMockableV1_1();
+            } catch (RemoteException e) {
+                Log.e(TAG, "Exception while trying to start supplicant: "
+                        + e);
+                supplicantServiceDiedHandler(mDeathRecipientCookie);
+                return false;
+            } catch (NoSuchElementException e) {
+                // We're starting the daemon, so expect |NoSuchElementException|.
+                Log.d(TAG, "Successfully triggered start of supplicant using HIDL");
             }
-            return mStaIfaceHal.isInitializationComplete();
+            return true;
         }
     }
 
@@ -920,25 +718,267 @@
      */
     public boolean startDaemon() {
         synchronized (mLock) {
-            String methodStr = "startDaemon";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (isV1_1()) {
+                Log.i(TAG, "Starting supplicant using HIDL");
+                return startDaemon_V1_1();
+            } else {
+                Log.i(TAG, "Starting supplicant using init");
+                return mFrameworkFacade.startSupplicant();
             }
-            return mStaIfaceHal.startDaemon();
         }
     }
 
     /**
-     * Terminate the supplicant daemon & wait for its death.
+     * Terminate the supplicant daemon for V1_1 service.
+     */
+    private void terminate_V1_1() {
+        synchronized (mLock) {
+            final String methodStr = "terminate";
+            if (!checkSupplicantAndLogFailure(methodStr)) return;
+            try {
+                getSupplicantMockableV1_1().terminate();
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+            } catch (NoSuchElementException e) {
+                handleNoSuchElementException(e, methodStr);
+            }
+        }
+    }
+
+    /**
+     * Terminate the supplicant daemon & wait for it's death.
      */
     public void terminate() {
         synchronized (mLock) {
-            String methodStr = "terminate";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return;
+            // Register for a new death listener to block until supplicant is dead.
+            final long waitForDeathCookie = new Random().nextLong();
+            final CountDownLatch waitForDeathLatch = new CountDownLatch(1);
+            linkToSupplicantDeath((cookie) -> {
+                Log.d(TAG, "ISupplicant died: cookie=" + cookie);
+                if (cookie != waitForDeathCookie) return;
+                supplicantServiceDiedHandler(mDeathRecipientCookie);
+                waitForDeathLatch.countDown();
+            }, waitForDeathCookie);
+
+            if (isV1_1()) {
+                Log.i(TAG, "Terminating supplicant using HIDL");
+                terminate_V1_1();
+            } else {
+                Log.i(TAG, "Terminating supplicant using init");
+                mFrameworkFacade.stopSupplicant();
             }
-            mStaIfaceHal.terminate();
+
+            // Now wait for death listener callback to confirm that it's dead.
+            try {
+                if (!waitForDeathLatch.await(WAIT_FOR_DEATH_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
+                    Log.w(TAG, "Timed out waiting for confirmation of supplicant death");
+                }
+            } catch (InterruptedException e) {
+                Log.w(TAG, "Failed to wait for supplicant death");
+            }
+        }
+    }
+
+    /**
+     * Wrapper functions to access static HAL methods, created to be mockable in unit tests
+     */
+    protected IServiceManager getServiceManagerMockable() throws RemoteException {
+        synchronized (mLock) {
+            return IServiceManager.getService();
+        }
+    }
+
+    protected ISupplicant getSupplicantMockable() throws RemoteException, NoSuchElementException {
+        synchronized (mLock) {
+            ISupplicant iSupplicant = ISupplicant.getService();
+            if (iSupplicant == null) {
+                throw new NoSuchElementException("Cannot get root service.");
+            }
+            return iSupplicant;
+        }
+    }
+
+    protected android.hardware.wifi.supplicant.V1_1.ISupplicant getSupplicantMockableV1_1()
+            throws RemoteException, NoSuchElementException {
+        synchronized (mLock) {
+            android.hardware.wifi.supplicant.V1_1.ISupplicant iSupplicantDerived =
+                    android.hardware.wifi.supplicant.V1_1.ISupplicant.castFrom(
+                            getSupplicantMockable());
+            if (iSupplicantDerived == null) {
+                throw new NoSuchElementException("Cannot cast to V1.1 service.");
+            }
+            return iSupplicantDerived;
+        }
+    }
+
+    protected android.hardware.wifi.supplicant.V1_2.ISupplicant getSupplicantMockableV1_2()
+            throws RemoteException, NoSuchElementException {
+        synchronized (mLock) {
+            android.hardware.wifi.supplicant.V1_2.ISupplicant iSupplicantDerived =
+                    android.hardware.wifi.supplicant.V1_2.ISupplicant.castFrom(
+                            getSupplicantMockable());
+            if (iSupplicantDerived == null) {
+                throw new NoSuchElementException("Cannot cast to V1.1 service.");
+            }
+            return iSupplicantDerived;
+        }
+    }
+
+    protected ISupplicantStaIface getStaIfaceMockable(ISupplicantIface iface) {
+        synchronized (mLock) {
+            return ISupplicantStaIface.asInterface(iface.asBinder());
+        }
+    }
+
+    protected android.hardware.wifi.supplicant.V1_1.ISupplicantStaIface
+            getStaIfaceMockableV1_1(ISupplicantIface iface) {
+        synchronized (mLock) {
+            return android.hardware.wifi.supplicant.V1_1.ISupplicantStaIface
+                    .asInterface(iface.asBinder());
+        }
+    }
+
+    protected android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
+            getStaIfaceMockableV1_2(ISupplicantIface iface) {
+        synchronized (mLock) {
+            return android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
+                    .asInterface(iface.asBinder());
+        }
+    }
+
+    protected android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+            getStaIfaceMockableV1_3(ISupplicantIface iface) {
+        synchronized (mLock) {
+            return android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                    .asInterface(iface.asBinder());
+        }
+    }
+
+    protected android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
+            getStaIfaceMockableV1_4(ISupplicantIface iface) {
+        synchronized (mLock) {
+            return android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
+                    .asInterface(iface.asBinder());
+        }
+    }
+
+    /**
+     * Uses the IServiceManager to check if the device is running V1_1 of the HAL from the VINTF for
+     * the device.
+     * @return true if supported, false otherwise.
+     */
+    private boolean isV1_1() {
+        return checkHalVersionByInterfaceName(
+                android.hardware.wifi.supplicant.V1_1.ISupplicant.kInterfaceName);
+    }
+
+    /**
+     * Uses the IServiceManager to check if the device is running V1_2 of the HAL from the VINTF for
+     * the device.
+     * @return true if supported, false otherwise.
+     */
+    private boolean isV1_2() {
+        return checkHalVersionByInterfaceName(
+                android.hardware.wifi.supplicant.V1_2.ISupplicant.kInterfaceName);
+    }
+
+    /**
+     * Uses the IServiceManager to check if the device is running V1_3 of the HAL from the VINTF for
+     * the device.
+     * @return true if supported, false otherwise.
+     */
+    private boolean isV1_3() {
+        return checkHalVersionByInterfaceName(
+                android.hardware.wifi.supplicant.V1_3.ISupplicant.kInterfaceName);
+    }
+
+    /**
+     * Uses the IServiceManager to check if the device is running V1_4 of the HAL from the VINTF for
+     * the device.
+     * @return true if supported, false otherwise.
+     */
+    private boolean isV1_4() {
+        return checkHalVersionByInterfaceName(
+                android.hardware.wifi.supplicant.V1_4.ISupplicant.kInterfaceName);
+    }
+
+    private boolean checkHalVersionByInterfaceName(String interfaceName) {
+        if (interfaceName == null) {
+            return false;
+        }
+        synchronized (mLock) {
+            if (mIServiceManager == null) {
+                Log.e(TAG, "checkHalVersionByInterfaceName: called but mServiceManager is null");
+                return false;
+            }
+            try {
+                return (mIServiceManager.getTransport(
+                        interfaceName,
+                        HAL_INSTANCE_NAME)
+                        != IServiceManager.Transport.EMPTY);
+            } catch (RemoteException e) {
+                Log.e(TAG, "Exception while operating on IServiceManager: " + e);
+                handleRemoteException(e, "getTransport");
+                return false;
+            }
+        }
+    }
+
+    /**
+     * Helper method to look up the network object for the specified iface.
+     */
+    private ISupplicantStaIface getStaIface(@NonNull String ifaceName) {
+        return mISupplicantStaIfaces.get(ifaceName);
+    }
+
+    /**
+     * Helper method to look up the network object for the specified iface.
+     */
+    private SupplicantStaNetworkHal getCurrentNetworkRemoteHandle(@NonNull String ifaceName) {
+        return mCurrentNetworkRemoteHandles.get(ifaceName);
+    }
+
+    /**
+     * Helper method to look up the network config for the specified iface.
+     */
+    protected WifiConfiguration getCurrentNetworkLocalConfig(@NonNull String ifaceName) {
+        return mCurrentNetworkLocalConfigs.get(ifaceName);
+    }
+
+    /**
+     * Add a network configuration to wpa_supplicant.
+     *
+     * @param config Config corresponding to the network.
+     * @return a Pair object including SupplicantStaNetworkHal and WifiConfiguration objects
+     * for the current network.
+     */
+    private Pair<SupplicantStaNetworkHal, WifiConfiguration>
+            addNetworkAndSaveConfig(@NonNull String ifaceName, WifiConfiguration config) {
+        synchronized (mLock) {
+            logi("addSupplicantStaNetwork via HIDL");
+            if (config == null) {
+                loge("Cannot add NULL network!");
+                return null;
+            }
+            SupplicantStaNetworkHal network = addNetwork(ifaceName);
+            if (network == null) {
+                loge("Failed to add a network!");
+                return null;
+            }
+            boolean saveSuccess = false;
+            try {
+                saveSuccess = network.saveWifiConfiguration(config);
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Exception while saving config params: " + config, e);
+            }
+            if (!saveSuccess) {
+                loge("Failed to save variables for: " + config.getProfileKey());
+                if (!removeAllNetworks(ifaceName)) {
+                    loge("Failed to remove all networks on failure.");
+                }
+                return null;
+            }
+            return new Pair(network, new WifiConfiguration(config));
         }
     }
 
@@ -955,11 +995,68 @@
      */
     public boolean connectToNetwork(@NonNull String ifaceName, @NonNull WifiConfiguration config) {
         synchronized (mLock) {
-            String methodStr = "connectToNetwork";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            logd("connectToNetwork " + config.getProfileKey());
+            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
+            if (WifiConfigurationUtil.isSameNetwork(config, currentConfig)) {
+                String networkSelectionBSSID = config.getNetworkSelectionStatus()
+                        .getNetworkSelectionBSSID();
+                String networkSelectionBSSIDCurrent =
+                        currentConfig.getNetworkSelectionStatus().getNetworkSelectionBSSID();
+                if (Objects.equals(networkSelectionBSSID, networkSelectionBSSIDCurrent)) {
+                    logd("Network is already saved, will not trigger remove and add operation.");
+                } else {
+                    logd("Network is already saved, but need to update BSSID.");
+                    if (!setCurrentNetworkBssid(
+                            ifaceName,
+                            config.getNetworkSelectionStatus().getNetworkSelectionBSSID())) {
+                        loge("Failed to set current network BSSID.");
+                        return false;
+                    }
+                    mCurrentNetworkLocalConfigs.put(ifaceName, new WifiConfiguration(config));
+                }
+            } else {
+                mCurrentNetworkRemoteHandles.remove(ifaceName);
+                mCurrentNetworkLocalConfigs.remove(ifaceName);
+                mLinkedNetworkLocalAndRemoteConfigs.remove(ifaceName);
+                if (!removeAllNetworks(ifaceName)) {
+                    loge("Failed to remove existing networks");
+                    return false;
+                }
+                Pair<SupplicantStaNetworkHal, WifiConfiguration> pair =
+                        addNetworkAndSaveConfig(ifaceName, config);
+                if (pair == null) {
+                    loge("Failed to add/save network configuration: " + config
+                            .getProfileKey());
+                    return false;
+                }
+                mCurrentNetworkRemoteHandles.put(ifaceName, pair.first);
+                mCurrentNetworkLocalConfigs.put(ifaceName, pair.second);
             }
-            return mStaIfaceHal.connectToNetwork(ifaceName, config);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(ifaceName, "connectToNetwork");
+            if (networkHandle == null) {
+                loge("No valid remote network handle for network configuration: "
+                        + config.getProfileKey());
+                return false;
+            }
+
+            SecurityParams params = config.getNetworkSelectionStatus()
+                    .getCandidateSecurityParams();
+            PmkCacheStoreData pmkData = mPmkCacheEntries.get(config.networkId);
+            if (pmkData != null && params != null
+                    && !params.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)
+                    && pmkData.expirationTimeInSec > mClock.getElapsedSinceBootMillis() / 1000) {
+                logi("Set PMK cache for config id " + config.networkId);
+                if (networkHandle.setPmkCache(pmkData.data)) {
+                    mWifiMetrics.setConnectionPmkCache(ifaceName, true);
+                }
+            }
+
+            if (!networkHandle.select()) {
+                loge("Failed to select network configuration: " + config.getProfileKey());
+                return false;
+            }
+            return true;
         }
     }
 
@@ -967,6 +1064,11 @@
      * Initiates roaming to the already configured network in wpa_supplicant. If the network
      * configuration provided does not match the already configured network, then this triggers
      * a new connection attempt (instead of roam).
+     * 1. First check if we're attempting to connect to a linked network, and select the existing
+     *    supplicant network if there is one.
+     * 2.
+     * 3. Set the new bssid for the network in wpa_supplicant.
+     * 4. Trigger reassociate command to wpa_supplicant.
      *
      * @param ifaceName Name of the interface.
      * @param config WifiConfiguration parameters for the provided network.
@@ -974,44 +1076,64 @@
      */
     public boolean roamToNetwork(@NonNull String ifaceName, WifiConfiguration config) {
         synchronized (mLock) {
-            String methodStr = "roamToNetwork";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (updateOnLinkedNetworkRoaming(ifaceName, config.networkId)) {
+                SupplicantStaNetworkHal networkHandle = getCurrentNetworkRemoteHandle(ifaceName);
+                if (networkHandle == null) {
+                    loge("Roaming config matches a linked config, but a linked network handle was"
+                            + " not found.");
+                    return false;
+                }
+                return networkHandle.select();
             }
-            return mStaIfaceHal.roamToNetwork(ifaceName, config);
+            if (getCurrentNetworkId(ifaceName) != config.networkId) {
+                Log.w(TAG, "Cannot roam to a different network, initiate new connection. "
+                        + "Current network ID: " + getCurrentNetworkId(ifaceName));
+                return connectToNetwork(ifaceName, config);
+            }
+            String bssid = config.getNetworkSelectionStatus().getNetworkSelectionBSSID();
+            logd("roamToNetwork" + config.getProfileKey() + " (bssid " + bssid + ")");
+
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(ifaceName, "roamToNetwork");
+            if (networkHandle == null || !networkHandle.setBssid(bssid)) {
+                loge("Failed to set new bssid on network: " + config.getProfileKey());
+                return false;
+            }
+            if (!reassociate(ifaceName)) {
+                loge("Failed to trigger reassociate");
+                return false;
+            }
+            return true;
         }
     }
 
     /**
      * Clean HAL cached data for |networkId| in the framework.
      *
-     * @param networkId Network id of the network to be removed from supplicant.
+     * @param networkId network id of the network to be removed from supplicant.
      */
     public void removeNetworkCachedData(int networkId) {
         synchronized (mLock) {
-            String methodStr = "removeNetworkCachedData";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return;
-            }
-            mStaIfaceHal.removeNetworkCachedData(networkId);
+            logd("Remove cached HAL data for config id " + networkId);
+            removePmkCacheEntry(networkId);
         }
     }
 
     /**
      * Clear HAL cached data if MAC address is changed.
      *
-     * @param networkId Network id of the network to be checked.
-     * @param curMacAddress Current MAC address
+     * @param networkId network id of the network to be checked.
+     * @param curMacAddress current MAC address
      */
     public void removeNetworkCachedDataIfNeeded(int networkId, MacAddress curMacAddress) {
         synchronized (mLock) {
-            String methodStr = "removeNetworkCachedDataIfNeeded";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return;
-            }
-            mStaIfaceHal.removeNetworkCachedDataIfNeeded(networkId, curMacAddress);
+            PmkCacheStoreData pmkData = mPmkCacheEntries.get(networkId);
+
+            if (pmkData == null) return;
+
+            if (curMacAddress.equals(pmkData.macAddress)) return;
+
+            removeNetworkCachedData(networkId);
         }
     }
 
@@ -1022,11 +1144,23 @@
      */
     public boolean removeAllNetworks(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "removeAllNetworks";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            ArrayList<Integer> networks = listNetworks(ifaceName);
+            if (networks == null) {
+                Log.e(TAG, "removeAllNetworks failed, got null networks");
+                return false;
             }
-            return mStaIfaceHal.removeAllNetworks(ifaceName);
+            for (int id : networks) {
+                if (!removeNetwork(ifaceName, id)) {
+                    Log.e(TAG, "removeAllNetworks failed to remove network: " + id);
+                    return false;
+                }
+            }
+            // Reset current network info.  Probably not needed once we add support to remove/reset
+            // current network on receiving disconnection event from supplicant (b/32898136).
+            mCurrentNetworkRemoteHandles.remove(ifaceName);
+            mCurrentNetworkLocalConfigs.remove(ifaceName);
+            mLinkedNetworkLocalAndRemoteConfigs.remove(ifaceName);
+            return true;
         }
     }
 
@@ -1037,11 +1171,10 @@
      */
     public boolean disableCurrentNetwork(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "disableCurrentNetwork";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.disableCurrentNetwork(ifaceName);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(ifaceName, "disableCurrentNetwork");
+            if (networkHandle == null) return false;
+            return networkHandle.disable();
         }
     }
 
@@ -1054,11 +1187,10 @@
      */
     public boolean setCurrentNetworkBssid(@NonNull String ifaceName, String bssidStr) {
         synchronized (mLock) {
-            String methodStr = "setCurrentNetworkBssid";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.setCurrentNetworkBssid(ifaceName, bssidStr);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(ifaceName, "setCurrentNetworkBssid");
+            if (networkHandle == null) return false;
+            return networkHandle.setBssid(bssidStr);
         }
     }
 
@@ -1070,12 +1202,11 @@
      */
     public String getCurrentNetworkWpsNfcConfigurationToken(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "getCurrentNetworkWpsNfcConfigurationToken";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return null;
-            }
-            return mStaIfaceHal.getCurrentNetworkWpsNfcConfigurationToken(ifaceName);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(
+                            ifaceName, "getCurrentNetworkWpsNfcConfigurationToken");
+            if (networkHandle == null) return null;
+            return networkHandle.getWpsNfcConfigurationToken();
         }
     }
 
@@ -1087,12 +1218,11 @@
      */
     public String getCurrentNetworkEapAnonymousIdentity(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "getCurrentNetworkEapAnonymousIdentity";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return null;
-            }
-            return mStaIfaceHal.getCurrentNetworkEapAnonymousIdentity(ifaceName);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(
+                            ifaceName, "getCurrentNetworkEapAnonymousIdentity");
+            if (networkHandle == null) return null;
+            return networkHandle.fetchEapAnonymousIdentity();
         }
     }
 
@@ -1100,19 +1230,18 @@
      * Send the eap identity response for the currently configured network.
      *
      * @param ifaceName Name of the interface.
-     * @param identity Identity used for EAP-Identity
-     * @param encryptedIdentity Encrypted identity used for EAP-AKA/EAP-SIM
+     * @param identity identity used for EAP-Identity
+     * @param encryptedIdentity encrypted identity used for EAP-AKA/EAP-SIM
      * @return true if succeeds, false otherwise.
      */
     public boolean sendCurrentNetworkEapIdentityResponse(
             @NonNull String ifaceName, @NonNull String identity, String encryptedIdentity) {
         synchronized (mLock) {
-            String methodStr = "sendCurrentNetworkEapIdentityResponse";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.sendCurrentNetworkEapIdentityResponse(
-                    ifaceName, identity, encryptedIdentity);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(
+                            ifaceName, "sendCurrentNetworkEapIdentityResponse");
+            if (networkHandle == null) return false;
+            return networkHandle.sendNetworkEapIdentityResponse(identity, encryptedIdentity);
         }
     }
 
@@ -1126,11 +1255,11 @@
     public boolean sendCurrentNetworkEapSimGsmAuthResponse(
             @NonNull String ifaceName, String paramsStr) {
         synchronized (mLock) {
-            String methodStr = "sendCurrentNetworkEapSimGsmAuthResponse";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.sendCurrentNetworkEapSimGsmAuthResponse(ifaceName, paramsStr);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(
+                            ifaceName, "sendCurrentNetworkEapSimGsmAuthResponse");
+            if (networkHandle == null) return false;
+            return networkHandle.sendNetworkEapSimGsmAuthResponse(paramsStr);
         }
     }
 
@@ -1142,11 +1271,11 @@
      */
     public boolean sendCurrentNetworkEapSimGsmAuthFailure(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "sendCurrentNetworkEapSimGsmAuthFailure";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.sendCurrentNetworkEapSimGsmAuthFailure(ifaceName);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(
+                            ifaceName, "sendCurrentNetworkEapSimGsmAuthFailure");
+            if (networkHandle == null) return false;
+            return networkHandle.sendNetworkEapSimGsmAuthFailure();
         }
     }
 
@@ -1160,11 +1289,11 @@
     public boolean sendCurrentNetworkEapSimUmtsAuthResponse(
             @NonNull String ifaceName, String paramsStr) {
         synchronized (mLock) {
-            String methodStr = "sendCurrentNetworkEapSimUmtsAuthResponse";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.sendCurrentNetworkEapSimUmtsAuthResponse(ifaceName, paramsStr);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(
+                            ifaceName, "sendCurrentNetworkEapSimUmtsAuthResponse");
+            if (networkHandle == null) return false;
+            return networkHandle.sendNetworkEapSimUmtsAuthResponse(paramsStr);
         }
     }
 
@@ -1178,11 +1307,11 @@
     public boolean sendCurrentNetworkEapSimUmtsAutsResponse(
             @NonNull String ifaceName, String paramsStr) {
         synchronized (mLock) {
-            String methodStr = "sendCurrentNetworkEapSimUmtsAutsResponse";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.sendCurrentNetworkEapSimUmtsAutsResponse(ifaceName, paramsStr);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(
+                            ifaceName, "sendCurrentNetworkEapSimUmtsAutsResponse");
+            if (networkHandle == null) return false;
+            return networkHandle.sendNetworkEapSimUmtsAutsResponse(paramsStr);
         }
     }
 
@@ -1194,11 +1323,220 @@
      */
     public boolean sendCurrentNetworkEapSimUmtsAuthFailure(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "sendCurrentNetworkEapSimUmtsAuthFailure";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            SupplicantStaNetworkHal networkHandle =
+                    checkSupplicantStaNetworkAndLogFailure(
+                            ifaceName, "sendCurrentNetworkEapSimUmtsAuthFailure");
+            if (networkHandle == null) return false;
+            return networkHandle.sendNetworkEapSimUmtsAuthFailure();
+        }
+    }
+
+    /**
+     * Adds a new network.
+     *
+     * @return The ISupplicantNetwork object for the new network, or null if the call fails
+     */
+    private SupplicantStaNetworkHal addNetwork(@NonNull String ifaceName) {
+        synchronized (mLock) {
+            final String methodStr = "addNetwork";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return null;
+            Mutable<ISupplicantNetwork> newNetwork = new Mutable<>();
+            try {
+                iface.addNetwork((SupplicantStatus status,
+                        ISupplicantNetwork network) -> {
+                    if (checkStatusAndLogFailure(status, methodStr)) {
+                        newNetwork.value = network;
+                    }
+                });
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
             }
-            return mStaIfaceHal.sendCurrentNetworkEapSimUmtsAuthFailure(ifaceName);
+            if (newNetwork.value != null) {
+                return getStaNetworkMockable(
+                        ifaceName,
+                        ISupplicantStaNetwork.asInterface(newNetwork.value.asBinder()));
+            } else {
+                return null;
+            }
+        }
+    }
+
+    /**
+     * Remove network from supplicant with network Id
+     *
+     * @return true if request is sent successfully, false otherwise.
+     */
+    private boolean removeNetwork(@NonNull String ifaceName, int id) {
+        synchronized (mLock) {
+            final String methodStr = "removeNetwork";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.removeNetwork(id);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
+        }
+    }
+
+    /**
+     * Use this to mock the creation of SupplicantStaNetworkHal instance.
+     *
+     * @param ifaceName Name of the interface.
+     * @param iSupplicantStaNetwork ISupplicantStaNetwork instance retrieved from HIDL.
+     * @return The ISupplicantNetwork object for the given SupplicantNetworkId int, returns null if
+     * the call fails
+     */
+    protected SupplicantStaNetworkHal getStaNetworkMockable(
+            @NonNull String ifaceName, ISupplicantStaNetwork iSupplicantStaNetwork) {
+        synchronized (mLock) {
+            SupplicantStaNetworkHal network =
+                    new SupplicantStaNetworkHal(iSupplicantStaNetwork, ifaceName, mContext,
+                            mWifiMonitor, mWifiGlobals, getAdvancedCapabilities(ifaceName));
+            if (network != null) {
+                network.enableVerboseLogging(mVerboseLoggingEnabled);
+            }
+            return network;
+        }
+    }
+
+    /**
+     * @return The ISupplicantNetwork object for the given SupplicantNetworkId int, returns null if
+     * the call fails
+     */
+    private SupplicantStaNetworkHal getNetwork(@NonNull String ifaceName, int id) {
+        synchronized (mLock) {
+            final String methodStr = "getNetwork";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return null;
+            Mutable<ISupplicantNetwork> gotNetwork = new Mutable<>();
+            try {
+                iface.getNetwork(id, (SupplicantStatus status, ISupplicantNetwork network) -> {
+                    if (checkStatusAndLogFailure(status, methodStr)) {
+                        gotNetwork.value = network;
+                    }
+                });
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+            }
+            if (gotNetwork.value != null) {
+                return getStaNetworkMockable(
+                        ifaceName,
+                        ISupplicantStaNetwork.asInterface(gotNetwork.value.asBinder()));
+            } else {
+                return null;
+            }
+        }
+    }
+
+    /** See ISupplicantStaNetwork.hal for documentation */
+    private boolean registerCallback(
+            ISupplicantStaIface iface, ISupplicantStaIfaceCallback callback) {
+        synchronized (mLock) {
+            final String methodStr = "registerCallback";
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status =  iface.registerCallback(callback);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
+        }
+    }
+
+    private boolean registerCallbackV1_1(
+            android.hardware.wifi.supplicant.V1_1.ISupplicantStaIface iface,
+            android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback callback) {
+        synchronized (mLock) {
+            String methodStr = "registerCallback_1_1";
+
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status =  iface.registerCallback_1_1(callback);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
+        }
+    }
+
+    private boolean registerCallbackV1_2(
+            android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface iface,
+            android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback callback) {
+        synchronized (mLock) {
+            String methodStr = "registerCallback_1_2";
+
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status =  iface.registerCallback_1_2(callback);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
+        }
+    }
+
+    private boolean registerCallbackV1_3(
+            android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface iface,
+            android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback callback) {
+        synchronized (mLock) {
+            String methodStr = "registerCallback_1_3";
+
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status =  iface.registerCallback_1_3(callback);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
+        }
+    }
+
+    private boolean registerCallbackV1_4(
+            android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface iface,
+            android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback callback) {
+        synchronized (mLock) {
+            String methodStr = "registerCallback_1_4";
+
+            if (iface == null) return false;
+            try {
+                android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
+                        iface.registerCallback_1_4(callback);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
+        }
+    }
+
+    /**
+     * @return a list of SupplicantNetworkID ints for all networks controlled by supplicant, returns
+     * null if the call fails
+     */
+    private java.util.ArrayList<Integer> listNetworks(@NonNull String ifaceName) {
+        synchronized (mLock) {
+            final String methodStr = "listNetworks";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return null;
+            Mutable<ArrayList<Integer>> networkIdList = new Mutable<>();
+            try {
+                iface.listNetworks((SupplicantStatus status, ArrayList<Integer> networkIds) -> {
+                    if (checkStatusAndLogFailure(status, methodStr)) {
+                        networkIdList.value = networkIds;
+                    }
+                });
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+            }
+            return networkIdList.value;
         }
     }
 
@@ -1206,16 +1544,21 @@
      * Set WPS device name.
      *
      * @param ifaceName Name of the interface.
-     * @param deviceName String to be set.
+     * @param name String to be set.
      * @return true if request is sent successfully, false otherwise.
      */
-    public boolean setWpsDeviceName(@NonNull String ifaceName, String deviceName) {
+    public boolean setWpsDeviceName(@NonNull String ifaceName, String name) {
         synchronized (mLock) {
-            String methodStr = "setWpsDeviceName";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "setWpsDeviceName";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setWpsDeviceName(name);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setWpsDeviceName(ifaceName, deviceName);
         }
     }
 
@@ -1228,11 +1571,41 @@
      */
     public boolean setWpsDeviceType(@NonNull String ifaceName, String typeStr) {
         synchronized (mLock) {
-            String methodStr = "setWpsDeviceType";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            try {
+                Matcher match = WPS_DEVICE_TYPE_PATTERN.matcher(typeStr);
+                if (!match.find() || match.groupCount() != 3) {
+                    Log.e(TAG, "Malformed WPS device type " + typeStr);
+                    return false;
+                }
+                short categ = Short.parseShort(match.group(1));
+                byte[] oui = NativeUtil.hexStringToByteArray(match.group(2));
+                short subCateg = Short.parseShort(match.group(3));
+
+                byte[] bytes = new byte[8];
+                ByteBuffer byteBuffer = ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
+                byteBuffer.putShort(categ);
+                byteBuffer.put(oui);
+                byteBuffer.putShort(subCateg);
+                return setWpsDeviceType(ifaceName, bytes);
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + typeStr, e);
+                return false;
             }
-            return mStaIfaceHal.setWpsDeviceType(ifaceName, typeStr);
+        }
+    }
+
+    private boolean setWpsDeviceType(@NonNull String ifaceName, byte[/* 8 */] type) {
+        synchronized (mLock) {
+            final String methodStr = "setWpsDeviceType";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setWpsDeviceType(type);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1245,11 +1618,16 @@
      */
     public boolean setWpsManufacturer(@NonNull String ifaceName, String manufacturer) {
         synchronized (mLock) {
-            String methodStr = "setWpsManufacturer";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "setWpsManufacturer";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setWpsManufacturer(manufacturer);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setWpsManufacturer(ifaceName, manufacturer);
         }
     }
 
@@ -1262,11 +1640,16 @@
      */
     public boolean setWpsModelName(@NonNull String ifaceName, String modelName) {
         synchronized (mLock) {
-            String methodStr = "setWpsModelName";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "setWpsModelName";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setWpsModelName(modelName);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setWpsModelName(ifaceName, modelName);
         }
     }
 
@@ -1279,11 +1662,16 @@
      */
     public boolean setWpsModelNumber(@NonNull String ifaceName, String modelNumber) {
         synchronized (mLock) {
-            String methodStr = "setWpsModelNumber";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "setWpsModelNumber";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setWpsModelNumber(modelNumber);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setWpsModelNumber(ifaceName, modelNumber);
         }
     }
 
@@ -1296,11 +1684,16 @@
      */
     public boolean setWpsSerialNumber(@NonNull String ifaceName, String serialNumber) {
         synchronized (mLock) {
-            String methodStr = "setWpsSerialNumber";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "setWpsSerialNumber";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setWpsSerialNumber(serialNumber);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setWpsSerialNumber(ifaceName, serialNumber);
         }
     }
 
@@ -1313,11 +1706,27 @@
      */
     public boolean setWpsConfigMethods(@NonNull String ifaceName, String configMethodsStr) {
         synchronized (mLock) {
-            String methodStr = "setWpsConfigMethods";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            short configMethodsMask = 0;
+            String[] configMethodsStrArr = configMethodsStr.split("\\s+");
+            for (int i = 0; i < configMethodsStrArr.length; i++) {
+                configMethodsMask |= stringToWpsConfigMethod(configMethodsStrArr[i]);
             }
-            return mStaIfaceHal.setWpsConfigMethods(ifaceName, configMethodsStr);
+            return setWpsConfigMethods(ifaceName, configMethodsMask);
+        }
+    }
+
+    private boolean setWpsConfigMethods(@NonNull String ifaceName, short configMethods) {
+        synchronized (mLock) {
+            final String methodStr = "setWpsConfigMethods";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setWpsConfigMethods(configMethods);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1329,11 +1738,16 @@
      */
     public boolean reassociate(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "reassociate";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "reassociate";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.reassociate();
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.reassociate(ifaceName);
         }
     }
 
@@ -1345,11 +1759,16 @@
      */
     public boolean reconnect(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "reconnect";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "reconnect";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.reconnect();
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.reconnect(ifaceName);
         }
     }
 
@@ -1361,11 +1780,16 @@
      */
     public boolean disconnect(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "disconnect";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "disconnect";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.disconnect();
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.disconnect(ifaceName);
         }
     }
 
@@ -1378,11 +1802,16 @@
      */
     public boolean setPowerSave(@NonNull String ifaceName, boolean enable) {
         synchronized (mLock) {
-            String methodStr = "setPowerSave";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "setPowerSave";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setPowerSave(enable);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setPowerSave(ifaceName, enable);
         }
     }
 
@@ -1395,11 +1824,28 @@
      */
     public boolean initiateTdlsDiscover(@NonNull String ifaceName, String macAddress) {
         synchronized (mLock) {
-            String methodStr = "initiateTdlsDiscover";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            try {
+                return initiateTdlsDiscover(
+                        ifaceName, NativeUtil.macAddressToByteArray(macAddress));
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + macAddress, e);
+                return false;
             }
-            return mStaIfaceHal.initiateTdlsDiscover(ifaceName, macAddress);
+        }
+    }
+    /** See ISupplicantStaIface.hal for documentation */
+    private boolean initiateTdlsDiscover(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
+        synchronized (mLock) {
+            final String methodStr = "initiateTdlsDiscover";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.initiateTdlsDiscover(macAddress);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1412,11 +1858,27 @@
      */
     public boolean initiateTdlsSetup(@NonNull String ifaceName, String macAddress) {
         synchronized (mLock) {
-            String methodStr = "initiateTdlsSetup";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            try {
+                return initiateTdlsSetup(ifaceName, NativeUtil.macAddressToByteArray(macAddress));
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + macAddress, e);
+                return false;
             }
-            return mStaIfaceHal.initiateTdlsSetup(ifaceName, macAddress);
+        }
+    }
+    /** See ISupplicantStaIface.hal for documentation */
+    private boolean initiateTdlsSetup(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
+        synchronized (mLock) {
+            final String methodStr = "initiateTdlsSetup";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.initiateTdlsSetup(macAddress);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1428,11 +1890,29 @@
      */
     public boolean initiateTdlsTeardown(@NonNull String ifaceName, String macAddress) {
         synchronized (mLock) {
-            String methodStr = "initiateTdlsTeardown";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            try {
+                return initiateTdlsTeardown(
+                        ifaceName, NativeUtil.macAddressToByteArray(macAddress));
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + macAddress, e);
+                return false;
             }
-            return mStaIfaceHal.initiateTdlsTeardown(ifaceName, macAddress);
+        }
+    }
+
+    /** See ISupplicantStaIface.hal for documentation */
+    private boolean initiateTdlsTeardown(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
+        synchronized (mLock) {
+            final String methodStr = "initiateTdlsTeardown";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.initiateTdlsTeardown(macAddress);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1446,14 +1926,35 @@
      * @return true if request is sent successfully, false otherwise.
      */
     public boolean initiateAnqpQuery(@NonNull String ifaceName, String bssid,
-            ArrayList<Short> infoElements,
-            ArrayList<Integer> hs20SubTypes) {
+                                     ArrayList<Short> infoElements,
+                                     ArrayList<Integer> hs20SubTypes) {
         synchronized (mLock) {
-            String methodStr = "initiateAnqpQuery";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            try {
+                return initiateAnqpQuery(
+                        ifaceName,
+                        NativeUtil.macAddressToByteArray(bssid), infoElements, hs20SubTypes);
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + bssid, e);
+                return false;
             }
-            return mStaIfaceHal.initiateAnqpQuery(ifaceName, bssid, infoElements, hs20SubTypes);
+        }
+    }
+
+    /** See ISupplicantStaIface.hal for documentation */
+    private boolean initiateAnqpQuery(@NonNull String ifaceName, byte[/* 6 */] macAddress,
+            java.util.ArrayList<Short> infoElements, java.util.ArrayList<Integer> subTypes) {
+        synchronized (mLock) {
+            final String methodStr = "initiateAnqpQuery";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.initiateAnqpQuery(
+                        macAddress, infoElements, subTypes);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1466,11 +1967,42 @@
      */
     public boolean initiateVenueUrlAnqpQuery(@NonNull String ifaceName, String bssid) {
         synchronized (mLock) {
-            String methodStr = "initiateVenueUrlAnqpQuery";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            try {
+                return initiateVenueUrlAnqpQuery(
+                        ifaceName, NativeUtil.macAddressToByteArray(bssid));
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + bssid, e);
+                return false;
             }
-            return mStaIfaceHal.initiateVenueUrlAnqpQuery(ifaceName, bssid);
+        }
+    }
+
+    /** See ISupplicantStaIface.hal for documentation */
+    private boolean initiateVenueUrlAnqpQuery(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
+        synchronized (mLock) {
+            final String methodStr = "initiateVenueUrlAnqpQuery";
+            if (!isV1_4()) {
+                Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
+                return false;
+            }
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            // Get a v1.4 supplicant STA Interface
+            android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
+                    getStaIfaceMockableV1_4(iface);
+
+            if (staIfaceV14 == null) {
+                Log.e(TAG, methodStr
+                        + ": SupplicantStaIface is null, cannot initiate Venue URL ANQP request");
+                return false;
+            }
+            try {
+                android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
+                        staIfaceV14.initiateVenueUrlAnqpQuery(macAddress);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1484,28 +2016,56 @@
      */
     public boolean initiateHs20IconQuery(@NonNull String ifaceName, String bssid, String fileName) {
         synchronized (mLock) {
-            String methodStr = "initiateHs20IconQuery";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            try {
+                return initiateHs20IconQuery(
+                        ifaceName, NativeUtil.macAddressToByteArray(bssid), fileName);
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + bssid, e);
+                return false;
             }
-            return mStaIfaceHal.initiateHs20IconQuery(ifaceName, bssid, fileName);
+        }
+    }
+
+    /** See ISupplicantStaIface.hal for documentation */
+    private boolean initiateHs20IconQuery(@NonNull String ifaceName,
+                                          byte[/* 6 */] macAddress, String fileName) {
+        synchronized (mLock) {
+            final String methodStr = "initiateHs20IconQuery";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.initiateHs20IconQuery(macAddress, fileName);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
     /**
-     * Gets MAC address from the supplicant.
+     * Makes a callback to HIDL to getMacAddress from supplicant
      *
      * @param ifaceName Name of the interface.
      * @return string containing the MAC address, or null on a failed call
      */
     public String getMacAddress(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "getMacAddress";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return null;
+            final String methodStr = "getMacAddress";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return null;
+            Mutable<String> gotMac = new Mutable<>();
+            try {
+                iface.getMacAddress((SupplicantStatus status,
+                        byte[/* 6 */] macAddr) -> {
+                    if (checkStatusAndLogFailure(status, methodStr)) {
+                        gotMac.value = NativeUtil.macAddressFromByteArray(macAddr);
+                    }
+                });
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
             }
-            return mStaIfaceHal.getMacAddress(ifaceName);
+            return gotMac.value;
         }
     }
 
@@ -1517,11 +2077,16 @@
      */
     public boolean startRxFilter(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "startRxFilter";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "startRxFilter";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.startRxFilter();
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.startRxFilter(ifaceName);
         }
     }
 
@@ -1533,11 +2098,16 @@
      */
     public boolean stopRxFilter(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "stopRxFilter";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "stopRxFilter";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.stopRxFilter();
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.stopRxFilter(ifaceName);
         }
     }
 
@@ -1551,11 +2121,34 @@
      */
     public boolean addRxFilter(@NonNull String ifaceName, int type) {
         synchronized (mLock) {
-            String methodStr = "addRxFilter";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            byte halType;
+            switch (type) {
+                case WifiNative.RX_FILTER_TYPE_V4_MULTICAST:
+                    halType = ISupplicantStaIface.RxFilterType.V4_MULTICAST;
+                    break;
+                case WifiNative.RX_FILTER_TYPE_V6_MULTICAST:
+                    halType = ISupplicantStaIface.RxFilterType.V6_MULTICAST;
+                    break;
+                default:
+                    Log.e(TAG, "Invalid Rx Filter type: " + type);
+                    return false;
             }
-            return mStaIfaceHal.addRxFilter(ifaceName, type);
+            return addRxFilter(ifaceName, halType);
+        }
+    }
+
+    private boolean addRxFilter(@NonNull String ifaceName, byte type) {
+        synchronized (mLock) {
+            final String methodStr = "addRxFilter";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.addRxFilter(type);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1569,16 +2162,39 @@
      */
     public boolean removeRxFilter(@NonNull String ifaceName, int type) {
         synchronized (mLock) {
-            String methodStr = "removeRxFilter";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            byte halType;
+            switch (type) {
+                case WifiNative.RX_FILTER_TYPE_V4_MULTICAST:
+                    halType = ISupplicantStaIface.RxFilterType.V4_MULTICAST;
+                    break;
+                case WifiNative.RX_FILTER_TYPE_V6_MULTICAST:
+                    halType = ISupplicantStaIface.RxFilterType.V6_MULTICAST;
+                    break;
+                default:
+                    Log.e(TAG, "Invalid Rx Filter type: " + type);
+                    return false;
             }
-            return mStaIfaceHal.removeRxFilter(ifaceName, type);
+            return removeRxFilter(ifaceName, halType);
+        }
+    }
+
+    private boolean removeRxFilter(@NonNull String ifaceName, byte type) {
+        synchronized (mLock) {
+            final String methodStr = "removeRxFilter";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.removeRxFilter(type);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
     /**
-     * Set Bt coexistence mode.
+     * Set Bt co existense mode.
      *
      * @param ifaceName Name of the interface.
      * @param mode one of the above {@link WifiNative#BLUETOOTH_COEXISTENCE_MODE_DISABLED},
@@ -1588,11 +2204,37 @@
      */
     public boolean setBtCoexistenceMode(@NonNull String ifaceName, int mode) {
         synchronized (mLock) {
-            String methodStr = "setBtCoexistenceMode";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            byte halMode;
+            switch (mode) {
+                case WifiNative.BLUETOOTH_COEXISTENCE_MODE_ENABLED:
+                    halMode = ISupplicantStaIface.BtCoexistenceMode.ENABLED;
+                    break;
+                case WifiNative.BLUETOOTH_COEXISTENCE_MODE_DISABLED:
+                    halMode = ISupplicantStaIface.BtCoexistenceMode.DISABLED;
+                    break;
+                case WifiNative.BLUETOOTH_COEXISTENCE_MODE_SENSE:
+                    halMode = ISupplicantStaIface.BtCoexistenceMode.SENSE;
+                    break;
+                default:
+                    Log.e(TAG, "Invalid Bt Coex mode: " + mode);
+                    return false;
             }
-            return mStaIfaceHal.setBtCoexistenceMode(ifaceName, mode);
+            return setBtCoexistenceMode(ifaceName, halMode);
+        }
+    }
+
+    private boolean setBtCoexistenceMode(@NonNull String ifaceName, byte mode) {
+        synchronized (mLock) {
+            final String methodStr = "setBtCoexistenceMode";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setBtCoexistenceMode(mode);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1604,11 +2246,17 @@
      */
     public boolean setBtCoexistenceScanModeEnabled(@NonNull String ifaceName, boolean enable) {
         synchronized (mLock) {
-            String methodStr = "setBtCoexistenceScanModeEnabled";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "setBtCoexistenceScanModeEnabled";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status =
+                        iface.setBtCoexistenceScanModeEnabled(enable);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setBtCoexistenceScanModeEnabled(ifaceName, enable);
         }
     }
 
@@ -1621,11 +2269,16 @@
      */
     public boolean setSuspendModeEnabled(@NonNull String ifaceName, boolean enable) {
         synchronized (mLock) {
-            String methodStr = "setSuspendModeEnabled";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "setSuspendModeEnabled";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setSuspendModeEnabled(enable);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setSuspendModeEnabled(ifaceName, enable);
         }
     }
 
@@ -1638,11 +2291,26 @@
      */
     public boolean setCountryCode(@NonNull String ifaceName, String codeStr) {
         synchronized (mLock) {
-            String methodStr = "setCountryCode";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (TextUtils.isEmpty(codeStr)) return false;
+            byte[] countryCodeBytes = NativeUtil.stringToByteArray(codeStr);
+            if (countryCodeBytes.length != 2) return false;
+            return setCountryCode(ifaceName, countryCodeBytes);
+        }
+    }
+
+    /** See ISupplicantStaIface.hal for documentation */
+    private boolean setCountryCode(@NonNull String ifaceName, byte[/* 2 */] code) {
+        synchronized (mLock) {
+            final String methodStr = "setCountryCode";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setCountryCode(code);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setCountryCode(ifaceName, codeStr);
         }
     }
 
@@ -1654,11 +2322,34 @@
      */
     public boolean flushAllHlp(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "flushAllHlp";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "filsHlpFlushRequest";
+            if (isV1_3()) {
+                ISupplicantStaIface iface =
+                        checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+                if (iface == null) {
+                    return false;
+                }
+
+                // Get a v1.3 supplicant STA Interface
+                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
+                        getStaIfaceMockableV1_3(iface);
+
+                if (staIfaceV13 == null) {
+                    Log.e(TAG, methodStr
+                            + ": ISupplicantStaIface is null, cannot flushAllHlp");
+                    return false;
+                }
+                try {
+                    SupplicantStatus status = staIfaceV13.filsHlpFlushRequest();
+                    return checkStatusAndLogFailure(status, methodStr);
+                } catch (RemoteException e) {
+                    handleRemoteException(e, methodStr);
+                    return false;
+                }
+            } else {
+                Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
+                return false;
             }
-            return mStaIfaceHal.flushAllHlp(ifaceName);
         }
     }
 
@@ -1672,14 +2363,39 @@
      */
     public boolean addHlpReq(@NonNull String ifaceName, byte [] dst, byte [] hlpPacket) {
         synchronized (mLock) {
-            String methodStr = "addHlpReq";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "filsHlpAddRequest";
+            if (isV1_3()) {
+                ISupplicantStaIface iface =
+                        checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+                if (iface == null) {
+                    return false;
+                }
+
+                // Get a v1.3 supplicant STA Interface
+                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
+                        getStaIfaceMockableV1_3(iface);
+
+                if (staIfaceV13 == null) {
+                    Log.e(TAG, methodStr
+                            + ": ISupplicantStaIface is null, cannot addHlpReq");
+                    return false;
+                }
+                try {
+                    ArrayList<Byte> payload = NativeUtil.byteArrayToArrayList(hlpPacket);
+                    SupplicantStatus status = staIfaceV13.filsHlpAddRequest(dst, payload);
+                    return checkStatusAndLogFailure(status, methodStr);
+                } catch (RemoteException e) {
+                    handleRemoteException(e, methodStr);
+                    return false;
+                }
+            } else {
+                Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
+                return false;
             }
-            return mStaIfaceHal.addHlpReq(ifaceName, dst, hlpPacket);
         }
     }
 
+
     /**
      * Start WPS pin registrar operation with the specified peer and pin.
      *
@@ -1690,11 +2406,30 @@
      */
     public boolean startWpsRegistrar(@NonNull String ifaceName, String bssidStr, String pin) {
         synchronized (mLock) {
-            String methodStr = "startWpsRegistrar";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (TextUtils.isEmpty(bssidStr) || TextUtils.isEmpty(pin)) return false;
+            try {
+                return startWpsRegistrar(
+                        ifaceName, NativeUtil.macAddressToByteArray(bssidStr), pin);
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + bssidStr, e);
+                return false;
             }
-            return mStaIfaceHal.startWpsRegistrar(ifaceName, bssidStr, pin);
+        }
+    }
+
+    /** See ISupplicantStaIface.hal for documentation */
+    private boolean startWpsRegistrar(@NonNull String ifaceName, byte[/* 6 */] bssid, String pin) {
+        synchronized (mLock) {
+            final String methodStr = "startWpsRegistrar";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.startWpsRegistrar(bssid, pin);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1707,11 +2442,28 @@
      */
     public boolean startWpsPbc(@NonNull String ifaceName, String bssidStr) {
         synchronized (mLock) {
-            String methodStr = "startWpsPbc";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            try {
+                return startWpsPbc(ifaceName, NativeUtil.macAddressToByteArray(bssidStr));
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + bssidStr, e);
+                return false;
             }
-            return mStaIfaceHal.startWpsPbc(ifaceName, bssidStr);
+        }
+    }
+
+    /** See ISupplicantStaIface.hal for documentation */
+    private boolean startWpsPbc(@NonNull String ifaceName, byte[/* 6 */] bssid) {
+        synchronized (mLock) {
+            final String methodStr = "startWpsPbc";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.startWpsPbc(bssid);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
         }
     }
 
@@ -1723,12 +2475,18 @@
      * @return true if request is sent successfully, false otherwise.
      */
     public boolean startWpsPinKeypad(@NonNull String ifaceName, String pin) {
+        if (TextUtils.isEmpty(pin)) return false;
         synchronized (mLock) {
-            String methodStr = "startWpsPinKeypad";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "startWpsPinKeypad";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.startWpsPinKeypad(pin);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.startWpsPinKeypad(ifaceName, pin);
         }
     }
 
@@ -1741,12 +2499,33 @@
      */
     public String startWpsPinDisplay(@NonNull String ifaceName, String bssidStr) {
         synchronized (mLock) {
-            String methodStr = "startWpsPinDisplay";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
+            try {
+                return startWpsPinDisplay(ifaceName, NativeUtil.macAddressToByteArray(bssidStr));
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + bssidStr, e);
                 return null;
             }
-            return mStaIfaceHal.startWpsPinDisplay(ifaceName, bssidStr);
+        }
+    }
+
+    /** See ISupplicantStaIface.hal for documentation */
+    private String startWpsPinDisplay(@NonNull String ifaceName, byte[/* 6 */] bssid) {
+        synchronized (mLock) {
+            final String methodStr = "startWpsPinDisplay";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return null;
+            final Mutable<String> gotPin = new Mutable<>();
+            try {
+                iface.startWpsPinDisplay(bssid,
+                        (SupplicantStatus status, String pin) -> {
+                            if (checkStatusAndLogFailure(status, methodStr)) {
+                                gotPin.value = pin;
+                            }
+                        });
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+            }
+            return gotPin.value;
         }
     }
 
@@ -1758,11 +2537,16 @@
      */
     public boolean cancelWps(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "cancelWps";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "cancelWps";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.cancelWps();
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.cancelWps(ifaceName);
         }
     }
 
@@ -1775,29 +2559,32 @@
      */
     public boolean setExternalSim(@NonNull String ifaceName, boolean useExternalSim) {
         synchronized (mLock) {
-            String methodStr = "setExternalSim";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "setExternalSim";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.setExternalSim(useExternalSim);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setExternalSim(ifaceName, useExternalSim);
         }
     }
 
-    /**
-     * Enable/Disable auto reconnect to networks.
-     * Use this to prevent wpa_supplicant from trying to connect to networks
-     * on its own.
-     *
-     * @param enable true to enable, false to disable.
-     * @return true if no exceptions occurred, false otherwise
-     */
+    /** See ISupplicant.hal for documentation */
     public boolean enableAutoReconnect(@NonNull String ifaceName, boolean enable) {
         synchronized (mLock) {
-            String methodStr = "enableAutoReconnect";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            final String methodStr = "enableAutoReconnect";
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) return false;
+            try {
+                SupplicantStatus status = iface.enableAutoReconnect(enable);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.enableAutoReconnect(ifaceName, enable);
         }
     }
 
@@ -1809,11 +2596,27 @@
      */
     public boolean setLogLevel(boolean turnOnVerbose) {
         synchronized (mLock) {
-            String methodStr = "setLogLevel";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            int logLevel = turnOnVerbose
+                    ? ISupplicant.DebugLevel.DEBUG
+                    : ISupplicant.DebugLevel.INFO;
+            return setDebugParams(logLevel, false,
+                    turnOnVerbose && mWifiGlobals.getShowKeyVerboseLoggingModeEnabled());
+        }
+    }
+
+    /** See ISupplicant.hal for documentation */
+    private boolean setDebugParams(int level, boolean showTimestamp, boolean showKeys) {
+        synchronized (mLock) {
+            final String methodStr = "setDebugParams";
+            if (!checkSupplicantAndLogFailure(methodStr)) return false;
+            try {
+                SupplicantStatus status =
+                        mISupplicant.setDebugParams(level, showTimestamp, showKeys);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
             }
-            return mStaIfaceHal.setLogLevel(turnOnVerbose);
         }
     }
 
@@ -1826,14 +2629,289 @@
      */
     public boolean setConcurrencyPriority(boolean isStaHigherPriority) {
         synchronized (mLock) {
-            String methodStr = "setConcurrencyPriority";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (isStaHigherPriority) {
+                return setConcurrencyPriority(IfaceType.STA);
+            } else {
+                return setConcurrencyPriority(IfaceType.P2P);
             }
-            return mStaIfaceHal.setConcurrencyPriority(isStaHigherPriority);
         }
     }
 
+    /** See ISupplicant.hal for documentation */
+    private boolean setConcurrencyPriority(int type) {
+        synchronized (mLock) {
+            final String methodStr = "setConcurrencyPriority";
+            if (!checkSupplicantAndLogFailure(methodStr)) return false;
+            try {
+                SupplicantStatus status = mISupplicant.setConcurrencyPriority(type);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+                return false;
+            }
+        }
+    }
+
+    /**
+     * Returns false if Supplicant is null, and logs failure to call methodStr
+     */
+    private boolean checkSupplicantAndLogFailure(final String methodStr) {
+        synchronized (mLock) {
+            if (mISupplicant == null) {
+                Log.e(TAG, "Can't call " + methodStr + ", ISupplicant is null");
+                return false;
+            }
+            return true;
+        }
+    }
+
+    /**
+     * Returns false if SupplicantStaIface is null, and logs failure to call methodStr
+     */
+    private ISupplicantStaIface checkSupplicantStaIfaceAndLogFailure(
+            @NonNull String ifaceName, final String methodStr) {
+        synchronized (mLock) {
+            ISupplicantStaIface iface = getStaIface(ifaceName);
+            if (iface == null) {
+                Log.e(TAG, "Can't call " + methodStr + ", ISupplicantStaIface is null for iface="
+                        + ifaceName);
+                return null;
+            }
+            return iface;
+        }
+    }
+
+    /**
+     * Returns false if SupplicantStaNetwork is null, and logs failure to call methodStr
+     */
+    private SupplicantStaNetworkHal checkSupplicantStaNetworkAndLogFailure(
+            @NonNull String ifaceName, final String methodStr) {
+        synchronized (mLock) {
+            SupplicantStaNetworkHal networkHal = getCurrentNetworkRemoteHandle(ifaceName);
+            if (networkHal == null) {
+                Log.e(TAG, "Can't call " + methodStr + ", SupplicantStaNetwork is null");
+                return null;
+            }
+            return networkHal;
+        }
+    }
+
+    /**
+     * Returns true if provided status code is SUCCESS, logs debug message and returns false
+     * otherwise
+     */
+    private boolean checkStatusAndLogFailure(SupplicantStatus status,
+            final String methodStr) {
+        synchronized (mLock) {
+            if (status == null || status.code != SupplicantStatusCode.SUCCESS) {
+                Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed: " + status);
+                return false;
+            } else {
+                if (mVerboseLoggingEnabled) {
+                    Log.d(TAG, "ISupplicantStaIface." + methodStr + " succeeded");
+                }
+                return true;
+            }
+        }
+    }
+
+    /**
+     * Returns true if provided status code is SUCCESS, logs debug message and returns false
+     * otherwise
+     */
+    private boolean checkStatusAndLogFailure(
+            android.hardware.wifi.supplicant.V1_4.SupplicantStatus status,
+            final String methodStr) {
+        synchronized (mLock) {
+            if (status == null
+                    || status.code
+                    != android.hardware.wifi.supplicant.V1_4.SupplicantStatusCode.SUCCESS) {
+                Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed: " + status);
+                return false;
+            } else {
+                if (mVerboseLoggingEnabled) {
+                    Log.d(TAG, "ISupplicantStaIface." + methodStr + " succeeded");
+                }
+                return true;
+            }
+        }
+    }
+
+    /**
+     * Helper function to log callbacks.
+     */
+    protected void logCallback(final String methodStr) {
+        synchronized (mLock) {
+            if (mVerboseLoggingEnabled) {
+                Log.d(TAG, "ISupplicantStaIfaceCallback." + methodStr + " received");
+            }
+        }
+    }
+
+    private void handleNoSuchElementException(NoSuchElementException e, String methodStr) {
+        synchronized (mLock) {
+            clearState();
+            Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed with exception", e);
+        }
+    }
+
+    private void handleRemoteException(RemoteException e, String methodStr) {
+        synchronized (mLock) {
+            clearState();
+            Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed with exception", e);
+        }
+    }
+
+    private void handleIllegalArgumentException(IllegalArgumentException e, String methodStr) {
+        synchronized (mLock) {
+            clearState();
+            Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed with exception", e);
+        }
+    }
+
+    /**
+     * Converts the Wps config method string to the equivalent enum value.
+     */
+    private static short stringToWpsConfigMethod(String configMethod) {
+        switch (configMethod) {
+            case "usba":
+                return WpsConfigMethods.USBA;
+            case "ethernet":
+                return WpsConfigMethods.ETHERNET;
+            case "label":
+                return WpsConfigMethods.LABEL;
+            case "display":
+                return WpsConfigMethods.DISPLAY;
+            case "int_nfc_token":
+                return WpsConfigMethods.INT_NFC_TOKEN;
+            case "ext_nfc_token":
+                return WpsConfigMethods.EXT_NFC_TOKEN;
+            case "nfc_interface":
+                return WpsConfigMethods.NFC_INTERFACE;
+            case "push_button":
+                return WpsConfigMethods.PUSHBUTTON;
+            case "keypad":
+                return WpsConfigMethods.KEYPAD;
+            case "virtual_push_button":
+                return WpsConfigMethods.VIRT_PUSHBUTTON;
+            case "physical_push_button":
+                return WpsConfigMethods.PHY_PUSHBUTTON;
+            case "p2ps":
+                return WpsConfigMethods.P2PS;
+            case "virtual_display":
+                return WpsConfigMethods.VIRT_DISPLAY;
+            case "physical_display":
+                return WpsConfigMethods.PHY_DISPLAY;
+            default:
+                throw new IllegalArgumentException(
+                        "Invalid WPS config method: " + configMethod);
+        }
+    }
+
+    protected class SupplicantStaIfaceHalCallback extends SupplicantStaIfaceCallbackImpl {
+        SupplicantStaIfaceHalCallback(@NonNull String ifaceName) {
+            super(SupplicantStaIfaceHal.this, ifaceName, new Object(), mWifiMonitor);
+        }
+    }
+
+    protected class SupplicantStaIfaceHalCallbackV1_1 extends SupplicantStaIfaceCallbackV1_1Impl {
+        SupplicantStaIfaceHalCallbackV1_1(@NonNull String ifaceName) {
+            super(SupplicantStaIfaceHal.this, ifaceName, new Object(), mWifiMonitor);
+        }
+    }
+
+    protected class SupplicantStaIfaceHalCallbackV1_2 extends SupplicantStaIfaceCallbackV1_2Impl {
+        SupplicantStaIfaceHalCallbackV1_2(@NonNull String ifaceName) {
+            super(SupplicantStaIfaceHal.this, ifaceName, mContext);
+        }
+    }
+
+    protected class SupplicantStaIfaceHalCallbackV1_3 extends SupplicantStaIfaceCallbackV1_3Impl {
+        SupplicantStaIfaceHalCallbackV1_3(@NonNull String ifaceName) {
+            super(SupplicantStaIfaceHal.this, ifaceName, mWifiMonitor);
+        }
+    }
+
+    protected class SupplicantStaIfaceHalCallbackV1_4 extends SupplicantStaIfaceCallbackV1_4Impl {
+        SupplicantStaIfaceHalCallbackV1_4(@NonNull String ifaceName) {
+            super(SupplicantStaIfaceHal.this, ifaceName, new Object(), mWifiMonitor);
+        }
+    }
+
+    protected void addPmkCacheEntry(
+            String ifaceName,
+            int networkId, long expirationTimeInSec, ArrayList<Byte> serializedEntry) {
+        String macAddressStr = getMacAddress(ifaceName);
+        if (macAddressStr == null) {
+            Log.w(TAG, "Omit PMK cache due to no valid MAC address on " + ifaceName);
+            return;
+        }
+        try {
+            MacAddress macAddress = MacAddress.fromString(macAddressStr);
+            mPmkCacheEntries.put(networkId,
+                    new PmkCacheStoreData(expirationTimeInSec, serializedEntry, macAddress));
+            updatePmkCacheExpiration();
+        } catch (IllegalArgumentException ex) {
+            Log.w(TAG, "Invalid MAC address string " + macAddressStr);
+        }
+    }
+
+    protected void removePmkCacheEntry(int networkId) {
+        if (mPmkCacheEntries.remove(networkId) != null) {
+            updatePmkCacheExpiration();
+        }
+    }
+
+    private void updatePmkCacheExpiration() {
+        synchronized (mLock) {
+            mEventHandler.removeCallbacksAndMessages(PMK_CACHE_EXPIRATION_ALARM_TAG);
+
+            long elapseTimeInSecond = mClock.getElapsedSinceBootMillis() / 1000;
+            long nextUpdateTimeInSecond = Long.MAX_VALUE;
+            logd("Update PMK cache expiration at " + elapseTimeInSecond);
+
+            Iterator<Map.Entry<Integer, PmkCacheStoreData>> iter =
+                    mPmkCacheEntries.entrySet().iterator();
+            while (iter.hasNext()) {
+                Map.Entry<Integer, PmkCacheStoreData> entry = iter.next();
+                if (entry.getValue().expirationTimeInSec <= elapseTimeInSecond) {
+                    logd("Config " + entry.getKey() + " PMK is expired.");
+                    iter.remove();
+                } else if (entry.getValue().expirationTimeInSec <= 0) {
+                    logd("Config " + entry.getKey() + " PMK expiration time is invalid.");
+                    iter.remove();
+                } else if (nextUpdateTimeInSecond > entry.getValue().expirationTimeInSec) {
+                    nextUpdateTimeInSecond = entry.getValue().expirationTimeInSec;
+                }
+            }
+
+            // No need to arrange next update since there is no valid PMK in the cache.
+            if (nextUpdateTimeInSecond == Long.MAX_VALUE) {
+                return;
+            }
+
+            logd("PMK cache next expiration time: " + nextUpdateTimeInSecond);
+            long delayedTimeInMs = (nextUpdateTimeInSecond - elapseTimeInSecond) * 1000;
+            mEventHandler.postDelayed(
+                    () -> {
+                        updatePmkCacheExpiration();
+                    },
+                    PMK_CACHE_EXPIRATION_ALARM_TAG,
+                    (delayedTimeInMs > 0) ? delayedTimeInMs : 0);
+        }
+    }
+
+    private static void logd(String s) {
+        Log.d(TAG, s);
+    }
+
+    private static void logi(String s) {
+        Log.i(TAG, s);
+    }
+
+    private static void loge(String s) {
+        Log.e(TAG, s);
+    }
 
     /**
      * Returns a bitmask of advanced capabilities: WPA3 SAE/SUITE B and OWE
@@ -1842,17 +2920,236 @@
      * - WIFI_FEATURE_WPA3_SUITE_B
      * - WIFI_FEATURE_OWE
      *
+     *  This is a v1.2+ HAL feature.
      *  On error, or if these features are not supported, 0 is returned.
      */
     public long getAdvancedCapabilities(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            String methodStr = "getAdvancedCapabilities";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
+        final String methodStr = "getAdvancedCapabilities";
+
+        long advancedCapabilities = 0;
+        int keyMgmtCapabilities = getKeyMgmtCapabilities(ifaceName);
+
+        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
+                .KeyMgmtMask.SAE) != 0) {
+            advancedCapabilities |= WIFI_FEATURE_WPA3_SAE;
+
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": SAE supported");
+            }
+        }
+
+        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
+                .KeyMgmtMask.SUITE_B_192) != 0) {
+            advancedCapabilities |= WIFI_FEATURE_WPA3_SUITE_B;
+
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": SUITE_B supported");
+            }
+        }
+
+        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
+                .KeyMgmtMask.OWE) != 0) {
+            advancedCapabilities |= WIFI_FEATURE_OWE;
+
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": OWE supported");
+            }
+        }
+
+        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
+                .KeyMgmtMask.DPP) != 0) {
+            advancedCapabilities |= WIFI_FEATURE_DPP;
+
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": DPP supported");
+            }
+            if (isV1_4()) {
+                advancedCapabilities |= WIFI_FEATURE_DPP_ENROLLEE_RESPONDER;
+                if (mVerboseLoggingEnabled) {
+                    Log.v(TAG, methodStr + ": DPP ENROLLEE RESPONDER supported");
+                }
+            }
+        }
+
+        if (isV1_4()) {
+            advancedCapabilities |= WIFI_FEATURE_PASSPOINT_TERMS_AND_CONDITIONS
+                    | WIFI_FEATURE_DECORATED_IDENTITY;
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": Passpoint T&C supported");
+                Log.v(TAG, methodStr + ": RFC 7542 decorated identity supported");
+            }
+        }
+
+        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_3.ISupplicantStaNetwork
+                .KeyMgmtMask.WAPI_PSK) != 0) {
+            advancedCapabilities |= WIFI_FEATURE_WAPI;
+
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": WAPI supported");
+            }
+        }
+
+        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_3.ISupplicantStaNetwork
+                .KeyMgmtMask.FILS_SHA256) != 0) {
+            advancedCapabilities |= WIFI_FEATURE_FILS_SHA256;
+
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": FILS_SHA256 supported");
+            }
+        }
+        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_3.ISupplicantStaNetwork
+                .KeyMgmtMask.FILS_SHA384) != 0) {
+            advancedCapabilities |= WIFI_FEATURE_FILS_SHA384;
+
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": FILS_SHA384 supported");
+            }
+        }
+
+        if (mVerboseLoggingEnabled) {
+            Log.v(TAG, methodStr + ": Capability flags = " + keyMgmtCapabilities);
+        }
+
+        return advancedCapabilities;
+    }
+
+    private int getKeyMgmtCapabilities_1_3(@NonNull String ifaceName) {
+        final String methodStr = "getKeyMgmtCapabilities_1_3";
+        Mutable<Integer> keyMgmtMask = new Mutable<>(0);
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+        if (iface == null) {
+            return 0;
+        }
+
+        // Get a v1.3 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
+                getStaIfaceMockableV1_3(iface);
+        if (staIfaceV13 == null) {
+            Log.e(TAG, methodStr
+                    + ": ISupplicantStaIface V1.3 is null, cannot get advanced capabilities");
+            return 0;
+        }
+
+        try {
+            // Support for new key management types; WAPI_PSK, WAPI_CERT
+            // Requires HAL v1.3 or higher
+            staIfaceV13.getKeyMgmtCapabilities_1_3(
+                    (SupplicantStatus statusInternal, int keyMgmtMaskInternal) -> {
+                        if (statusInternal.code == SupplicantStatusCode.SUCCESS) {
+                            keyMgmtMask.value = keyMgmtMaskInternal;
+                        }
+                        checkStatusAndLogFailure(statusInternal, methodStr);
+                    });
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+        return keyMgmtMask.value;
+    }
+
+    private int getKeyMgmtCapabilities(@NonNull String ifaceName) {
+        final String methodStr = "getKeyMgmtCapabilities";
+        Mutable<Boolean> status = new Mutable<>(false);
+        Mutable<Integer> keyMgmtMask = new Mutable<>(0);
+
+        if (isV1_3()) {
+            keyMgmtMask.value = getKeyMgmtCapabilities_1_3(ifaceName);
+        } else if (isV1_2()) {
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) {
                 return 0;
             }
-            return mStaIfaceHal.getAdvancedCapabilities(ifaceName);
+
+            // Get a v1.2 supplicant STA Interface
+            android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
+                    getStaIfaceMockableV1_2(iface);
+
+            if (staIfaceV12 == null) {
+                Log.e(TAG, methodStr
+                        + ": ISupplicantStaIface is null, cannot get advanced capabilities");
+                return 0;
+            }
+
+            try {
+                // Support for new key management types; SAE, SUITE_B, OWE
+                // Requires HAL v1.2 or higher
+                staIfaceV12.getKeyMgmtCapabilities(
+                        (SupplicantStatus statusInternal, int keyMgmtMaskInternal) -> {
+                            status.value = statusInternal.code == SupplicantStatusCode.SUCCESS;
+                            if (status.value) {
+                                keyMgmtMask.value = keyMgmtMaskInternal;
+                            }
+                            checkStatusAndLogFailure(statusInternal, methodStr);
+                        });
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+            }
+        } else {
+            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
         }
+
+        // 0 is returned in case of an error
+        return keyMgmtMask.value;
+    }
+
+    private Mutable<Integer> getWpaDriverCapabilities_1_4(@NonNull String ifaceName) {
+        final String methodStr = "getWpaDriverCapabilities_1_4";
+        Mutable<Integer> drvCapabilitiesMask = new Mutable<>(0);
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+
+        if (null == iface) return drvCapabilitiesMask;
+
+        android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
+                getStaIfaceMockableV1_4(iface);
+        if (null == staIfaceV14) {
+            Log.e(TAG, methodStr
+                    + ": SupplicantStaIface is null, cannot get wpa driver features");
+            return drvCapabilitiesMask;
+        }
+
+        try {
+            staIfaceV14.getWpaDriverCapabilities_1_4(
+                    (android.hardware.wifi.supplicant.V1_4.SupplicantStatus statusInternal,
+                            int drvCapabilities) -> {
+                        if (statusInternal.code
+                                == android.hardware.wifi.supplicant.V1_4
+                                .SupplicantStatusCode.SUCCESS) {
+                            drvCapabilitiesMask.value = drvCapabilities;
+                        }
+                        checkStatusAndLogFailure(statusInternal, methodStr);
+                    });
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+        return drvCapabilitiesMask;
+    }
+
+    private Mutable<Integer> getWpaDriverCapabilities_1_3(@NonNull String ifaceName) {
+        final String methodStr = "getWpaDriverCapabilities_1_3";
+        Mutable<Integer> drvCapabilitiesMask = new Mutable<>(0);
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+
+        if (null == iface) return drvCapabilitiesMask;
+
+        android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
+                getStaIfaceMockableV1_3(iface);
+        if (null == staIfaceV13) {
+            Log.e(TAG, methodStr
+                    + ": SupplicantStaIface is null, cannot get wpa driver features");
+            return drvCapabilitiesMask;
+        }
+
+        try {
+            staIfaceV13.getWpaDriverCapabilities(
+                    (SupplicantStatus statusInternal, int drvCapabilities) -> {
+                        if (statusInternal.code == SupplicantStatusCode.SUCCESS) {
+                            drvCapabilitiesMask.value = drvCapabilities;
+                        }
+                        checkStatusAndLogFailure(statusInternal, methodStr);
+                    });
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+        return drvCapabilitiesMask;
     }
 
     /**
@@ -1862,201 +3159,531 @@
      * @return bitmask defined by WifiManager.WIFI_FEATURE_*.
      */
     public long getWpaDriverFeatureSet(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            String methodStr = "getWpaDriverFeatureSet";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return 0;
+        final String methodStr = "getWpaDriverFeatureSet";
+        Mutable<Integer> drvCapabilitiesMask = new Mutable<>(0);
+        long featureSet = 0;
+
+        if (isV1_4()) {
+            drvCapabilitiesMask = getWpaDriverCapabilities_1_4(ifaceName);
+        } else if (isV1_3()) {
+            drvCapabilitiesMask = getWpaDriverCapabilities_1_3(ifaceName);
+        } else {
+            Log.i(TAG, "Method " + methodStr + " is not supported in existing HAL");
+            return 0;
+        }
+
+        if ((drvCapabilitiesMask.value & WpaDriverCapabilitiesMask.MBO) != 0) {
+            featureSet |= WIFI_FEATURE_MBO;
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": MBO supported");
             }
-            return mStaIfaceHal.getWpaDriverFeatureSet(ifaceName);
+            if ((drvCapabilitiesMask.value
+                    & WpaDriverCapabilitiesMask.OCE) != 0) {
+                featureSet |= WIFI_FEATURE_OCE;
+                if (mVerboseLoggingEnabled) {
+                    Log.v(TAG, methodStr + ": OCE supported");
+                }
+            }
+        }
+
+        if ((drvCapabilitiesMask.value
+                & android.hardware.wifi.supplicant.V1_4.WpaDriverCapabilitiesMask.SAE_PK) != 0) {
+            featureSet |= WIFI_FEATURE_SAE_PK;
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": SAE-PK supported");
+            }
+        }
+
+        if ((drvCapabilitiesMask.value
+                & android.hardware.wifi.supplicant.V1_4.WpaDriverCapabilitiesMask.WFD_R2) != 0) {
+            featureSet |= WIFI_FEATURE_WFD_R2;
+            if (mVerboseLoggingEnabled) {
+                Log.v(TAG, methodStr + ": WFD-R2 supported");
+            }
+        }
+
+        return featureSet;
+    }
+
+    private @WifiStandard int getWifiStandard(int technology) {
+        switch(technology) {
+            case WifiTechnology.HE:
+                return ScanResult.WIFI_STANDARD_11AX;
+            case WifiTechnology.VHT:
+                return ScanResult.WIFI_STANDARD_11AC;
+            case WifiTechnology.HT:
+                return ScanResult.WIFI_STANDARD_11N;
+            case WifiTechnology.LEGACY:
+                return ScanResult.WIFI_STANDARD_LEGACY;
+            default:
+                return ScanResult.WIFI_STANDARD_UNKNOWN;
+        }
+    }
+
+    private int getChannelBandwidth(int channelBandwidth) {
+        switch(channelBandwidth) {
+            case WifiChannelWidthInMhz.WIDTH_20:
+                return ScanResult.CHANNEL_WIDTH_20MHZ;
+            case WifiChannelWidthInMhz.WIDTH_40:
+                return ScanResult.CHANNEL_WIDTH_40MHZ;
+            case WifiChannelWidthInMhz.WIDTH_80:
+                return ScanResult.CHANNEL_WIDTH_80MHZ;
+            case WifiChannelWidthInMhz.WIDTH_160:
+                return ScanResult.CHANNEL_WIDTH_160MHZ;
+            case WifiChannelWidthInMhz.WIDTH_80P80:
+                return ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
+            default:
+                return ScanResult.CHANNEL_WIDTH_20MHZ;
         }
     }
 
     /**
      * Returns connection capabilities of the current network
      *
+     *  This is a v1.3+ HAL feature.
      * @param ifaceName Name of the interface.
      * @return connection capabilities of the current network
      */
     public WifiNative.ConnectionCapabilities getConnectionCapabilities(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            String methodStr = "getConnectionCapabilities";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return new WifiNative.ConnectionCapabilities();
-            }
-            return mStaIfaceHal.getConnectionCapabilities(ifaceName);
+        final String methodStr = "getConnectionCapabilities";
+        WifiNative.ConnectionCapabilities capOut = new WifiNative.ConnectionCapabilities();
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+        if (iface == null) {
+            return capOut;
         }
+        if (isV1_4()) {
+            return getConnectionCapabilities_1_4(iface);
+        } else if (isV1_3()) {
+            return getConnectionCapabilities_1_3(iface);
+        } else {
+            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
+        }
+        return capOut;
     }
 
-    /**
-     * Returns connection MLO links info
-     *
-     * @param ifaceName Name of the interface.
-     * @return connection MLO links info
-     */
-    public WifiNative.ConnectionMloLinksInfo getConnectionMloLinksInfo(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            String methodStr = "getConnectionMloLinksInfo";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return null;
-            }
-            return mStaIfaceHal.getConnectionMloLinksInfo(ifaceName);
+    private WifiNative.ConnectionCapabilities getConnectionCapabilities_1_3(
+            @NonNull ISupplicantStaIface iface) {
+        final String methodStr = "getConnectionCapabilities_1_3";
+        WifiNative.ConnectionCapabilities capOut = new WifiNative.ConnectionCapabilities();
+
+        // Get a v1.3 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
+                getStaIfaceMockableV1_3(iface);
+
+        if (staIfaceV13 == null) {
+            Log.e(TAG, methodStr
+                    + ": SupplicantStaIface is null, cannot get Connection Capabilities");
+            return capOut;
         }
+
+        try {
+            staIfaceV13.getConnectionCapabilities(
+                    (SupplicantStatus statusInternal, ConnectionCapabilities cap) -> {
+                        if (statusInternal.code == SupplicantStatusCode.SUCCESS) {
+                            capOut.wifiStandard = getWifiStandard(cap.technology);
+                            capOut.channelBandwidth = getChannelBandwidth(
+                                    cap.channelBandwidth);
+                            capOut.maxNumberTxSpatialStreams = cap.maxNumberTxSpatialStreams;
+                            capOut.maxNumberRxSpatialStreams = cap.maxNumberRxSpatialStreams;
+                        }
+                        checkStatusAndLogFailure(statusInternal, methodStr);
+                    });
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+        return capOut;
     }
 
+    private WifiNative.ConnectionCapabilities getConnectionCapabilities_1_4(
+            @NonNull ISupplicantStaIface iface) {
+        final String methodStr = "getConnectionCapabilities_1_4";
+        WifiNative.ConnectionCapabilities capOut = new WifiNative.ConnectionCapabilities();
+        // Get a v1.4 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
+                getStaIfaceMockableV1_4(iface);
+
+        if (staIfaceV14 == null) {
+            Log.e(TAG, methodStr
+                    + ": SupplicantStaIface is null, cannot get Connection Capabilities");
+            return capOut;
+        }
+
+        try {
+            staIfaceV14.getConnectionCapabilities_1_4(
+                    (android.hardware.wifi.supplicant.V1_4.SupplicantStatus statusInternal,
+                            android.hardware.wifi.supplicant.V1_4.ConnectionCapabilities cap)
+                            -> {
+                        if (statusInternal.code == SupplicantStatusCode.SUCCESS) {
+                            capOut.wifiStandard = getWifiStandard(cap.V1_3.technology);
+                            capOut.channelBandwidth = getChannelBandwidth(
+                                    cap.V1_3.channelBandwidth);
+                            capOut.is11bMode = (cap.legacyMode == LegacyMode.B_MODE);
+                            capOut.maxNumberTxSpatialStreams = cap.V1_3.maxNumberTxSpatialStreams;
+                            capOut.maxNumberRxSpatialStreams = cap.V1_3.maxNumberRxSpatialStreams;
+                        }
+                        checkStatusAndLogFailure(statusInternal, methodStr);
+                    });
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+        return capOut;
+    }
     /**
      * Adds a DPP peer URI to the URI list.
      *
-     * Returns an ID to be used later to refer to this URI (>0).
-     * On error, or if these features are not supported, -1 is returned.
+     *  This is a v1.2+ HAL feature.
+     *  Returns an ID to be used later to refer to this URI (>0).
+     *  On error, or if these features are not supported, -1 is returned.
      */
     public int addDppPeerUri(@NonNull String ifaceName, @NonNull String uri) {
-        synchronized (mLock) {
-            String methodStr = "addDppPeerUri";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return -1;
-            }
-            return mStaIfaceHal.addDppPeerUri(ifaceName, uri);
+        final String methodStr = "addDppPeerUri";
+        Mutable<Boolean> status = new Mutable<>(false);
+        Mutable<Integer> bootstrapId = new Mutable<>(-1);
+
+        if (!isV1_2()) {
+            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
+            return -1;
         }
+
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+        if (iface == null) {
+            return -1;
+        }
+
+        // Get a v1.2 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
+                getStaIfaceMockableV1_2(iface);
+
+        if (staIfaceV12 == null) {
+            Log.e(TAG, methodStr + ": ISupplicantStaIface is null");
+            return -1;
+        }
+
+        try {
+            // Support for DPP (Easy connect)
+            // Requires HAL v1.2 or higher
+            staIfaceV12.addDppPeerUri(uri,
+                    (SupplicantStatus statusInternal, int bootstrapIdInternal) -> {
+                        status.value = statusInternal.code == SupplicantStatusCode.SUCCESS;
+                        if (status.value) {
+                            bootstrapId.value = bootstrapIdInternal;
+                        }
+                        checkStatusAndLogFailure(statusInternal, methodStr);
+                    });
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+            return -1;
+        }
+
+        return bootstrapId.value;
     }
 
     /**
      * Removes a DPP URI to the URI list given an ID.
      *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
+     *  This is a v1.2+ HAL feature.
+     *  Returns true when operation is successful
+     *  On error, or if these features are not supported, false is returned.
      */
-    public boolean removeDppUri(@NonNull String ifaceName, int bootstrapId) {
-        synchronized (mLock) {
-            String methodStr = "removeDppUri";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.removeDppUri(ifaceName, bootstrapId);
+    public boolean removeDppUri(@NonNull String ifaceName, int bootstrapId)  {
+        final String methodStr = "removeDppUri";
+
+        if (!isV1_2()) {
+            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
+            return false;
         }
+
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+        if (iface == null) {
+            return false;
+        }
+
+        // Get a v1.2 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
+                getStaIfaceMockableV1_2(iface);
+
+        if (staIfaceV12 == null) {
+            Log.e(TAG, methodStr + ": ISupplicantStaIface is null");
+            return false;
+        }
+
+        try {
+            // Support for DPP (Easy connect)
+            // Requires HAL v1.2 or higher
+            SupplicantStatus status = staIfaceV12.removeDppUri(bootstrapId);
+            return checkStatusAndLogFailure(status, methodStr);
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+
+        return false;
     }
 
     /**
      * Stops/aborts DPP Initiator request
      *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
+     *  This is a v1.2+ HAL feature.
+     *  Returns true when operation is successful
+     *  On error, or if these features are not supported, false is returned.
      */
-    public boolean stopDppInitiator(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            String methodStr = "stopDppInitiator";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.stopDppInitiator(ifaceName);
+    public boolean stopDppInitiator(@NonNull String ifaceName)  {
+        final String methodStr = "stopDppInitiator";
+
+        if (!isV1_2()) {
+            return false;
         }
+
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+        if (iface == null) {
+            return false;
+        }
+
+        // Get a v1.2 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
+                getStaIfaceMockableV1_2(iface);
+
+        if (staIfaceV12 == null) {
+            Log.e(TAG, methodStr + ": ISupplicantStaIface is null");
+            return false;
+        }
+
+        try {
+            // Support for DPP (Easy connect)
+            // Requires HAL v1.2 or higher
+            SupplicantStatus status = staIfaceV12.stopDppInitiator();
+            return checkStatusAndLogFailure(status, methodStr);
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+
+        return false;
     }
 
     /**
      * Starts DPP Configurator-Initiator request
      *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
+     *  This is a v1.2+ HAL feature.
+     *  Returns true when operation is successful
+     *  On error, or if these features are not supported, false is returned.
      */
     public boolean startDppConfiguratorInitiator(@NonNull String ifaceName, int peerBootstrapId,
             int ownBootstrapId, @NonNull String ssid, String password, String psk,
-            int netRole, int securityAkm, byte[] privEcKey) {
-        synchronized (mLock) {
-            String methodStr = "startDppConfiguratorInitiator";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.startDppConfiguratorInitiator(ifaceName, peerBootstrapId,
-                    ownBootstrapId, ssid, password, psk, netRole, securityAkm, privEcKey);
+            int netRole, int securityAkm)  {
+        final String methodStr = "startDppConfiguratorInitiator";
+
+        if (!isV1_2()) {
+            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
+            return false;
         }
+
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+        if (iface == null) {
+            return false;
+        }
+
+        // Get a v1.2 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
+                getStaIfaceMockableV1_2(iface);
+
+        if (staIfaceV12 == null) {
+            Log.e(TAG, methodStr + ": ISupplicantStaIface is null");
+            return false;
+        }
+
+        try {
+            // Support for DPP (Easy connect)
+            // Requires HAL v1.2 or higher
+            SupplicantStatus status = staIfaceV12.startDppConfiguratorInitiator(peerBootstrapId,
+                    ownBootstrapId, ssid, password != null ? password : "", psk != null ? psk : "",
+                    netRole, securityAkm);
+            return checkStatusAndLogFailure(status, methodStr);
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+
+        return false;
     }
 
     /**
      * Starts DPP Enrollee-Initiator request
      *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
+     *  This is a v1.2+ HAL feature.
+     *  Returns true when operation is successful
+     *  On error, or if these features are not supported, false is returned.
      */
     public boolean startDppEnrolleeInitiator(@NonNull String ifaceName, int peerBootstrapId,
-            int ownBootstrapId) {
-        synchronized (mLock) {
-            String methodStr = "startDppEnrolleeInitiator";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.startDppEnrolleeInitiator(
-                    ifaceName, peerBootstrapId, ownBootstrapId);
+            int ownBootstrapId)  {
+        final String methodStr = "startDppEnrolleeInitiator";
+
+        if (!isV1_2()) {
+            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
+            return false;
         }
+
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+        if (iface == null) {
+            return false;
+        }
+
+        // Get a v1.2 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
+                getStaIfaceMockableV1_2(iface);
+
+        if (staIfaceV12 == null) {
+            Log.e(TAG, methodStr + ": ISupplicantStaIface is null");
+            return false;
+        }
+
+        try {
+            // Support for DPP (Easy connect)
+            // Requires HAL v1.2 or higher
+            SupplicantStatus status = staIfaceV12.startDppEnrolleeInitiator(peerBootstrapId,
+                    ownBootstrapId);
+            return checkStatusAndLogFailure(status, methodStr);
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+
+        return false;
     }
 
     /**
-     * Generate a DPP QR code based on boot strap info
+     * Generate a DPP QR code based boot strap info
      *
-     * Returns DppBootstrapQrCodeInfo
+     *  This is a v1.4+ HAL feature.
+     *  Returns DppResponderBootstrapInfo;
      */
     public WifiNative.DppBootstrapQrCodeInfo generateDppBootstrapInfoForResponder(
             @NonNull String ifaceName, String macAddress, @NonNull String deviceInfo,
             int dppCurve) {
-        synchronized (mLock) {
-            String methodStr = "generateDppBootstrapInfoForResponder";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return new WifiNative.DppBootstrapQrCodeInfo();
-            }
-            return mStaIfaceHal.generateDppBootstrapInfoForResponder(
-                    ifaceName, macAddress, deviceInfo, dppCurve);
+        final String methodStr = "generateDppBootstrapInfoForResponder";
+        Mutable<Boolean> status = new Mutable<>(false);
+        WifiNative.DppBootstrapQrCodeInfo bootstrapInfoOut =
+                new WifiNative.DppBootstrapQrCodeInfo();
+
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+        if (iface == null) {
+            return bootstrapInfoOut;
         }
+
+        // Get a v1.4 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
+                getStaIfaceMockableV1_4(iface);
+
+        if (staIfaceV14 == null) {
+            Log.e(TAG, methodStr + ": SupplicantStaIface V1.4 is null");
+            return bootstrapInfoOut;
+        }
+
+        try {
+            // Support for DPP Responder
+            // Requires HAL v1.4 or higher
+            staIfaceV14.generateDppBootstrapInfoForResponder(
+                    NativeUtil.macAddressToByteArray(macAddress), deviceInfo, dppCurve,
+                    (android.hardware.wifi.supplicant.V1_4.SupplicantStatus statusInternal,
+                            android.hardware.wifi.supplicant.V1_4
+                            .DppResponderBootstrapInfo info) -> {
+                        if (statusInternal.code == SupplicantStatusCode.SUCCESS) {
+                            bootstrapInfoOut.bootstrapId = info.bootstrapId;
+                            bootstrapInfoOut.listenChannel = info.listenChannel;
+                            bootstrapInfoOut.uri = info.uri;
+                        }
+                        checkStatusAndLogFailure(statusInternal, methodStr);
+                    });
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+            return bootstrapInfoOut;
+        }
+
+        return bootstrapInfoOut;
     }
 
     /**
      * Starts DPP Enrollee-Responder request
      *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
+     *  This is a v1.4+ HAL feature.
+     *  Returns true when operation is successful
+     *  On error, or if these features are not supported, false is returned.
      */
     public boolean startDppEnrolleeResponder(@NonNull String ifaceName, int listenChannel) {
-        synchronized (mLock) {
-            String methodStr = "startDppEnrolleeResponder";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.startDppEnrolleeResponder(ifaceName, listenChannel);
+        final String methodStr = "startDppEnrolleeResponder";
+
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+        if (iface == null) {
+            return false;
         }
+
+        // Get a v1.4 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
+                getStaIfaceMockableV1_4(iface);
+
+        if (staIfaceV14 == null) {
+            Log.e(TAG, methodStr + ": ISupplicantStaIface V1.4 is null");
+            return false;
+        }
+
+        try {
+            // Support for DPP Responder
+            // Requires HAL v1.4 or higher
+            android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
+                    staIfaceV14.startDppEnrolleeResponder(listenChannel);
+            return checkStatusAndLogFailure(status, methodStr);
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+
+        return false;
     }
 
     /**
      * Stops/aborts DPP Responder request.
      *
-     * Returns true when operation is successful
-     * On error, or if these features are not supported, false is returned.
+     *  This is a v1.4+ HAL feature.
+     *  Returns true when operation is successful
+     *  On error, or if these features are not supported, false is returned.
      */
-    public boolean stopDppResponder(@NonNull String ifaceName, int ownBootstrapId) {
-        synchronized (mLock) {
-            String methodStr = "stopDppResponder";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.stopDppResponder(ifaceName, ownBootstrapId);
+    public boolean stopDppResponder(@NonNull String ifaceName, int ownBootstrapId)  {
+        final String methodStr = "stopDppResponder";
+
+        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+        if (iface == null) {
+            return false;
         }
+
+        // Get a v1.4 supplicant STA Interface
+        android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
+                getStaIfaceMockableV1_4(iface);
+
+        if (staIfaceV14 == null) {
+            Log.e(TAG, methodStr + ": ISupplicantStaIface V1.4 is null");
+            return false;
+        }
+
+        try {
+            // Support for DPP Responder
+            // Requires HAL v1.4 or higher
+            android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
+                    staIfaceV14.stopDppResponder(ownBootstrapId);
+            return checkStatusAndLogFailure(status, methodStr);
+        } catch (RemoteException e) {
+            handleRemoteException(e, methodStr);
+        }
+
+        return false;
     }
 
+
     /**
      * Register callbacks for DPP events.
      *
      * @param dppCallback DPP callback object.
      */
-    public void registerDppCallback(WifiNative.DppEventCallback dppCallback) {
-        synchronized (mLock) {
-            String methodStr = "registerDppCallback";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return;
-            }
-            mStaIfaceHal.registerDppCallback(dppCallback);
-        }
+    public void registerDppCallback(DppEventCallback dppCallback) {
+        mDppCallback = dppCallback;
+    }
+
+    protected DppEventCallback getDppCallback() {
+        return mDppCallback;
     }
 
     /**
@@ -2064,34 +3691,38 @@
      *
      * @param ifaceName Name of the interface.
      * @param available true means cellular data available, false otherwise.
-     * Returns true when operation is successful
+     * @return None.
      */
     public boolean setMboCellularDataStatus(@NonNull String ifaceName, boolean available) {
-        synchronized (mLock) {
-            String methodStr = "setMboCellularDataStatus";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mStaIfaceHal.setMboCellularDataStatus(ifaceName, available);
-        }
-    }
+        final String methodStr = "setMboCellularDataStatus";
 
-    /**
-     * Set whether the network-centric QoS policy feature is enabled or not for this interface.
-     *
-     * @param ifaceName name of the interface.
-     * @param isEnabled true if feature is enabled, false otherwise.
-     * @return true if operation is successful, false otherwise.
-     */
-    public boolean setNetworkCentricQosPolicyFeatureEnabled(@NonNull String ifaceName,
-            boolean isEnabled) {
-        synchronized (mLock) {
-            String methodStr = "setNetworkCentricQosPolicyFeatureEnabled";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+        if (isV1_3()) {
+            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
+            if (iface == null) {
+                return false;
             }
-            return mStaIfaceHal.setNetworkCentricQosPolicyFeatureEnabled(ifaceName, isEnabled);
+
+            // Get a v1.3 supplicant STA Interface
+            android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
+                    getStaIfaceMockableV1_3(iface);
+            if (staIfaceV13 == null) {
+                Log.e(TAG, methodStr
+                        + ": SupplicantStaIface is null, cannot update cell status");
+                return false;
+            }
+
+            try {
+                SupplicantStatus status = staIfaceV13.setMboCellularDataStatus(available);
+                return checkStatusAndLogFailure(status, methodStr);
+            } catch (RemoteException e) {
+                handleRemoteException(e, methodStr);
+            }
+        } else {
+            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
+            return false;
         }
+
+        return false;
     }
 
     /**
@@ -2099,22 +3730,28 @@
      * if we have.
      *
      * @param ifaceName Name of the interface.
-     * @param newNetworkId Network id of the new network we've roamed to. If fromFramework is
-     *                     {@code true}, this will be a framework network id. Otherwise, this will
-     *                     be a remote network id.
-     * @param fromFramework {@code true} if the network id is a framework network id, {@code false}
-                            if the network id is a remote network id.
+     * @param newNetworkId network id of the network we've roamed to.
      * @return true if we've roamed to a linked network, false if not.
      */
-    public boolean updateOnLinkedNetworkRoaming(
-            @NonNull String ifaceName, int newNetworkId, boolean fromFramework) {
+    public boolean updateOnLinkedNetworkRoaming(@NonNull String ifaceName, int newNetworkId) {
         synchronized (mLock) {
-            String methodStr = "updateOnLinkedNetworkRoaming";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            SupplicantStaNetworkHal networkHal = getCurrentNetworkRemoteHandle(ifaceName);
+            List<Pair<SupplicantStaNetworkHal, WifiConfiguration>> linkedNetworkHandles =
+                    mLinkedNetworkLocalAndRemoteConfigs.get(ifaceName);
+            if (linkedNetworkHandles == null || networkHal == null
+                    || networkHal.getNetworkId() == newNetworkId) {
+                return false;
             }
-            return mStaIfaceHal.updateOnLinkedNetworkRoaming(
-                    ifaceName, newNetworkId, fromFramework);
+            for (Pair<SupplicantStaNetworkHal, WifiConfiguration> pair : linkedNetworkHandles) {
+                if (pair.first.getNetworkId() != newNetworkId) {
+                    continue;
+                }
+                Log.i(TAG, "Roamed to linked network, make linked network as current network");
+                mCurrentNetworkRemoteHandles.put(ifaceName, pair.first);
+                mCurrentNetworkLocalConfigs.put(ifaceName, pair.second);
+                return true;
+            }
+            return false;
         }
     }
 
@@ -2122,107 +3759,82 @@
      * Updates the linked networks for the current network and sends them to the supplicant.
      *
      * @param ifaceName Name of the interface.
-     * @param networkId Network id of the network to link the configurations to.
+     * @param networkId network id of the network to link the configurations to.
      * @param linkedConfigurations Map of config profile key to config for linking.
      * @return true if networks were successfully linked, false otherwise.
      */
     public boolean updateLinkedNetworks(@NonNull String ifaceName, int networkId,
-            Map<String, WifiConfiguration> linkedConfigurations) {
+                           Map<String, WifiConfiguration> linkedConfigurations) {
         synchronized (mLock) {
-            String methodStr = "updateLinkedNetworks";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
+            SupplicantStaNetworkHal currentHandle = getCurrentNetworkRemoteHandle(ifaceName);
+
+            if (currentConfig == null || currentHandle == null) {
+                Log.e(TAG, "current network not configured yet.");
+                return false;
             }
-            return mStaIfaceHal.updateLinkedNetworks(ifaceName, networkId, linkedConfigurations);
+
+            if (networkId != currentConfig.networkId) {
+                Log.e(TAG, "current network id is not matching");
+                return false;
+            }
+
+            if (!removeAllNetworksExcept(ifaceName, networkId)) {
+                Log.e(TAG, "couldn't remove non-current supplicant networks");
+                return false;
+            }
+
+            mLinkedNetworkLocalAndRemoteConfigs.remove(ifaceName);
+
+            if (linkedConfigurations == null || linkedConfigurations.size() == 0) {
+                Log.i(TAG, "cleared linked networks");
+                return true;
+            }
+
+            List<Pair<SupplicantStaNetworkHal, WifiConfiguration>> linkedNetworkHandles =
+                    new ArrayList<>();
+            linkedNetworkHandles.add(new Pair(currentHandle, currentConfig));
+            for (String linkedNetwork : linkedConfigurations.keySet()) {
+                Log.i(TAG, "add linked network: " + linkedNetwork);
+                Pair<SupplicantStaNetworkHal, WifiConfiguration> pair =
+                        addNetworkAndSaveConfig(ifaceName, linkedConfigurations.get(linkedNetwork));
+                if (pair == null) {
+                    Log.e(TAG, "failed to add/save linked network: " + linkedNetwork);
+                    return false;
+                }
+                pair.first.enable(true);
+                linkedNetworkHandles.add(pair);
+            }
+
+            mLinkedNetworkLocalAndRemoteConfigs.put(ifaceName, linkedNetworkHandles);
+
+            return true;
         }
     }
 
     /**
-     * Gets the security params of the current network associated with this interface
+     * Remove all networks except the supplied network ID from supplicant
      *
      * @param ifaceName Name of the interface
-     * @return Security params of the current network associated with the interface
+     * @param networkId network id to keep
      */
-    public SecurityParams getCurrentNetworkSecurityParams(@NonNull String ifaceName) {
+    private boolean removeAllNetworksExcept(@NonNull String ifaceName, int networkId) {
         synchronized (mLock) {
-            String methodStr = "getCurrentNetworkSecurityParams";
-            if (mStaIfaceHal == null) {
-                handleNullHal(methodStr);
-                return null;
+            List<Integer> networks = listNetworks(ifaceName);
+            if (networks == null) {
+                Log.e(TAG, "removeAllNetworksExcept failed, got null networks");
+                return false;
             }
-            return mStaIfaceHal.getCurrentNetworkSecurityParams(ifaceName);
-        }
-    }
-
-    /**
-     * Sends a QoS policy response.
-     *
-     * @param ifaceName Name of the interface.
-     * @param qosPolicyRequestId Dialog token to identify the request.
-     * @param morePolicies Flag to indicate more QoS policies can be accommodated.
-     * @param qosPolicyStatusList List of framework QosPolicyStatus objects.
-     * @return true if response is sent successfully, false otherwise.
-     */
-    public boolean sendQosPolicyResponse(String ifaceName, int qosPolicyRequestId,
-            boolean morePolicies, @NonNull List<QosPolicyStatus> qosPolicyStatusList) {
-        String methodStr = "sendQosPolicyResponse";
-        if (mStaIfaceHal == null) {
-            handleNullHal(methodStr);
-            return false;
-        }
-        return mStaIfaceHal.sendQosPolicyResponse(ifaceName, qosPolicyRequestId,
-                morePolicies, qosPolicyStatusList);
-    }
-
-    /**
-     * Indicates the removal of all active QoS policies configured by the AP.
-     *
-     * @param ifaceName Name of the interface.
-     */
-    public boolean removeAllQosPolicies(String ifaceName) {
-        String methodStr = "removeAllQosPolicies";
-        if (mStaIfaceHal == null) {
-            return handleNullHal(methodStr);
-        }
-        return mStaIfaceHal.removeAllQosPolicies(ifaceName);
-    }
-
-    /**
-     * Generate DPP credential for network access
-     *
-     * @param ifaceName Name of the interface.
-     * @param ssid ssid of the network
-     * @param privEcKey Private EC Key for DPP Configurator
-     * Returns true when operation is successful. On error, false is returned.
-     */
-    public boolean generateSelfDppConfiguration(@NonNull String ifaceName, @NonNull String ssid,
-            byte[] privEcKey) {
-        synchronized (mLock) {
-            String methodStr = "generateSelfDppConfiguration";
-            if (mStaIfaceHal == null) {
-                return handleNullHal(methodStr);
+            for (int id : networks) {
+                if (networkId == id) {
+                    continue;
+                }
+                if (!removeNetwork(ifaceName, id)) {
+                    Log.e(TAG, "removeAllNetworksExcept failed to remove network: " + id);
+                    return false;
+                }
             }
-            return mStaIfaceHal.generateSelfDppConfiguration(ifaceName, ssid, privEcKey);
+            return true;
         }
     }
-
-    /**
-     * This set anonymous identity to supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @param anonymousIdentity the anonymouns identity.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean setEapAnonymousIdentity(@NonNull String ifaceName, String anonymousIdentity) {
-        String methodStr = "setEapAnonymousIdentity";
-        if (mStaIfaceHal == null) {
-            return handleNullHal(methodStr);
-        }
-        return mStaIfaceHal.setEapAnonymousIdentity(ifaceName, anonymousIdentity);
-    }
-
-    private boolean handleNullHal(String methodStr) {
-        Log.e(TAG, "Cannot call " + methodStr + " because HAL object is null.");
-        return false;
-    }
 }
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceHalAidlImpl.java b/service/java/com/android/server/wifi/SupplicantStaIfaceHalAidlImpl.java
deleted file mode 100644
index 0c358da..0000000
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceHalAidlImpl.java
+++ /dev/null
@@ -1,3350 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DECORATED_IDENTITY;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP_ENROLLEE_RESPONDER;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA256;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA384;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_MBO;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_OCE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_PASSPOINT_TERMS_AND_CONDITIONS;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_SAE_PK;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WAPI;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WFD_R2;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SAE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SUITE_B;
-
-import android.annotation.NonNull;
-import android.content.Context;
-import android.hardware.wifi.V1_6.WifiChannelWidthInMhz;
-import android.hardware.wifi.supplicant.BtCoexistenceMode;
-import android.hardware.wifi.supplicant.ConnectionCapabilities;
-import android.hardware.wifi.supplicant.DebugLevel;
-import android.hardware.wifi.supplicant.DppAkm;
-import android.hardware.wifi.supplicant.DppCurve;
-import android.hardware.wifi.supplicant.DppNetRole;
-import android.hardware.wifi.supplicant.DppResponderBootstrapInfo;
-import android.hardware.wifi.supplicant.ISupplicant;
-import android.hardware.wifi.supplicant.ISupplicantStaIface;
-import android.hardware.wifi.supplicant.ISupplicantStaIfaceCallback;
-import android.hardware.wifi.supplicant.ISupplicantStaNetwork;
-import android.hardware.wifi.supplicant.IfaceInfo;
-import android.hardware.wifi.supplicant.IfaceType;
-import android.hardware.wifi.supplicant.KeyMgmtMask;
-import android.hardware.wifi.supplicant.LegacyMode;
-import android.hardware.wifi.supplicant.MloLinksInfo;
-import android.hardware.wifi.supplicant.QosPolicyClassifierParams;
-import android.hardware.wifi.supplicant.QosPolicyClassifierParamsMask;
-import android.hardware.wifi.supplicant.QosPolicyData;
-import android.hardware.wifi.supplicant.QosPolicyRequestType;
-import android.hardware.wifi.supplicant.QosPolicyStatus;
-import android.hardware.wifi.supplicant.QosPolicyStatusCode;
-import android.hardware.wifi.supplicant.RxFilterType;
-import android.hardware.wifi.supplicant.WifiTechnology;
-import android.hardware.wifi.supplicant.WpaDriverCapabilitiesMask;
-import android.hardware.wifi.supplicant.WpsConfigMethods;
-import android.net.DscpPolicy;
-import android.net.MacAddress;
-import android.net.NetworkAgent;
-import android.net.wifi.ScanResult;
-import android.net.wifi.SecurityParams;
-import android.net.wifi.WifiAnnotations;
-import android.net.wifi.WifiConfiguration;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.IBinder.DeathRecipient;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.ServiceSpecificException;
-import android.text.TextUtils;
-import android.util.Log;
-import android.util.Pair;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.util.NativeUtil;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Objects;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * HAL calls to set up/tear down the supplicant daemon and make requests
- * related to station mode. Uses the AIDL supplicant interface.
- * To maintain thread-safety, the locking protocol is that every non-static method (regardless of
- * access level) acquires mLock.
- */
-public class SupplicantStaIfaceHalAidlImpl implements ISupplicantStaIfaceHal {
-    private static final String TAG = "SupplicantStaIfaceHalAidlImpl";
-    @VisibleForTesting
-    private static final String HAL_INSTANCE_NAME = ISupplicant.DESCRIPTOR + "/default";
-
-    /**
-     * Regex pattern for extracting the wps device type bytes.
-     * Matches a strings like the following: "<categ>-<OUI>-<subcateg>";
-     */
-    private static final Pattern WPS_DEVICE_TYPE_PATTERN =
-            Pattern.compile("^(\\d{1,2})-([0-9a-fA-F]{8})-(\\d{1,2})$");
-
-    private static final int MIN_PORT_NUM = 0;
-    private static final int MAX_PORT_NUM = 65535;
-
-    private final Object mLock = new Object();
-    private boolean mVerboseLoggingEnabled = false;
-    private boolean mVerboseHalLoggingEnabled = false;
-    private boolean mServiceDeclared = false;
-
-    // Supplicant HAL interface objects
-    private ISupplicant mISupplicant = null;
-    private Map<String, ISupplicantStaIface> mISupplicantStaIfaces = new HashMap<>();
-    private Map<String, ISupplicantStaIfaceCallback>
-            mISupplicantStaIfaceCallbacks = new HashMap<>();
-    private Map<String, SupplicantStaNetworkHalAidlImpl>
-            mCurrentNetworkRemoteHandles = new HashMap<>();
-    private Map<String, WifiConfiguration> mCurrentNetworkLocalConfigs = new HashMap<>();
-    private Map<String, List<Pair<SupplicantStaNetworkHalAidlImpl, WifiConfiguration>>>
-            mLinkedNetworkLocalAndRemoteConfigs = new HashMap<>();
-    @VisibleForTesting
-    PmkCacheManager mPmkCacheManager;
-    private WifiNative.SupplicantDeathEventHandler mDeathEventHandler;
-    private SupplicantDeathRecipient mSupplicantDeathRecipient;
-    private final Context mContext;
-    private final WifiMonitor mWifiMonitor;
-    private final Handler mEventHandler;
-    private WifiNative.DppEventCallback mDppCallback = null;
-    private final Clock mClock;
-    private final WifiMetrics mWifiMetrics;
-    private final WifiGlobals mWifiGlobals;
-
-    private class SupplicantDeathRecipient implements DeathRecipient {
-        @Override
-        public void binderDied() {
-            mEventHandler.post(() -> {
-                synchronized (mLock) {
-                    Log.w(TAG, "ISupplicant binder died.");
-                    supplicantServiceDiedHandler();
-                }
-            });
-        }
-    }
-
-    /**
-     * Linked to supplicant service death on call to terminate()
-     */
-    private class TerminateDeathRecipient implements DeathRecipient {
-        @Override
-        public void binderDied() {
-            mEventHandler.post(() -> {
-                synchronized (mLock) {
-                    Log.w(TAG, "ISupplicant was killed by terminate()");
-                    // nothing more to be done here
-                }
-            });
-        }
-    }
-
-    public SupplicantStaIfaceHalAidlImpl(Context context, WifiMonitor monitor, Handler handler,
-            Clock clock, WifiMetrics wifiMetrics, WifiGlobals wifiGlobals) {
-        mContext = context;
-        mWifiMonitor = monitor;
-        mEventHandler = handler;
-        mClock = clock;
-        mWifiMetrics = wifiMetrics;
-        mWifiGlobals = wifiGlobals;
-        mSupplicantDeathRecipient = new SupplicantDeathRecipient();
-        mPmkCacheManager = new PmkCacheManager(mClock, mEventHandler);
-    }
-
-    /**
-     * Enable/Disable verbose logging.
-     *
-     * @param verboseEnabled Verbose flag set in overlay XML.
-     * @param halVerboseEnabled Verbose flag set by the user.
-     */
-    public void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        synchronized (mLock) {
-            mVerboseLoggingEnabled = verboseEnabled;
-            mVerboseHalLoggingEnabled = halVerboseEnabled;
-            setLogLevel(mVerboseHalLoggingEnabled);
-        }
-    }
-
-    protected boolean isVerboseLoggingEnabled() {
-        synchronized (mLock) {
-            return mVerboseLoggingEnabled;
-        }
-    }
-
-    /**
-     * Checks whether the ISupplicant service is declared, and therefore should be available.
-     *
-     * @return true if the ISupplicant service is declared
-     */
-    public boolean initialize() {
-        synchronized (mLock) {
-            if (mISupplicant != null) {
-                Log.i(TAG, "Service is already initialized, skipping initialize method");
-                return true;
-            }
-            if (mVerboseLoggingEnabled) {
-                Log.i(TAG, "Checking for ISupplicant service.");
-            }
-            mISupplicantStaIfaces.clear();
-            mServiceDeclared = serviceDeclared();
-            return mServiceDeclared;
-        }
-    }
-
-    protected int getCurrentNetworkId(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
-            if (currentConfig == null) {
-                return WifiConfiguration.INVALID_NETWORK_ID;
-            }
-            return currentConfig.networkId;
-        }
-    }
-
-    /**
-     * Setup a STA interface for the specified iface name.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    public boolean setupIface(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            if (getStaIface(ifaceName) != null) {
-                Log.e(TAG, "Iface " + ifaceName + " already exists.");
-                return false;
-            }
-
-            ISupplicantStaIface iface = addIface(ifaceName);
-            if (iface == null) {
-                Log.e(TAG, "Unable to add iface " + ifaceName);
-                return false;
-            }
-
-            ISupplicantStaIfaceCallback callback = new SupplicantStaIfaceCallbackAidlImpl(
-                    SupplicantStaIfaceHalAidlImpl.this, ifaceName,
-                    new Object(), mContext, mWifiMonitor);
-            if (registerCallback(iface, callback)) {
-                mISupplicantStaIfaces.put(ifaceName, iface);
-                // Keep callback in a store to avoid recycling by garbage collector
-                mISupplicantStaIfaceCallbacks.put(ifaceName, callback);
-                return true;
-            } else {
-                Log.e(TAG, "Unable to register callback for iface " + ifaceName);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Create a STA interface for the specified iface name.
-     *
-     * @param ifaceName Name of the interface.
-     * @return ISupplicantStaIface object on success, null otherwise.
-     */
-    private ISupplicantStaIface addIface(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            String methodStr = "addIface";
-            if (!checkSupplicantAndLogFailure(methodStr)) {
-                return null;
-            }
-            try {
-                return mISupplicant.addStaInterface(ifaceName);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (NoSuchElementException | IllegalArgumentException e) {
-                Log.e(TAG, "Encountered exception at addIface: ", e);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Teardown a STA interface for the specified iface name.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    public boolean teardownIface(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "teardownIface";
-            if (checkStaIfaceAndLogFailure(ifaceName, methodStr) == null) {
-                return false;
-            }
-            if (!checkSupplicantAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            try {
-                IfaceInfo ifaceInfo = new IfaceInfo();
-                ifaceInfo.name = ifaceName;
-                ifaceInfo.type = IfaceType.STA;
-                mISupplicant.removeInterface(ifaceInfo);
-                mISupplicantStaIfaces.remove(ifaceName);
-                mISupplicantStaIfaceCallbacks.remove(ifaceName);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (NoSuchElementException e) {
-                Log.e(TAG, "Encountered exception at teardownIface: ", e);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Registers a death notification for supplicant.
-     * @return Returns true on success.
-     */
-    public boolean registerDeathHandler(@NonNull WifiNative.SupplicantDeathEventHandler handler) {
-        synchronized (mLock) {
-            if (mDeathEventHandler != null) {
-                Log.e(TAG, "Death handler already present");
-            }
-            mDeathEventHandler = handler;
-            return true;
-        }
-    }
-
-    /**
-     * Deregisters a death notification for supplicant.
-     * @return Returns true on success.
-     */
-    public boolean deregisterDeathHandler() {
-        synchronized (mLock) {
-            if (mDeathEventHandler == null) {
-                Log.e(TAG, "No Death handler present");
-            }
-            mDeathEventHandler = null;
-            return true;
-        }
-    }
-
-    /**
-     * Signals whether initialization started successfully.
-     */
-    public boolean isInitializationStarted() {
-        synchronized (mLock) {
-            return mServiceDeclared;
-        }
-    }
-
-    /**
-     * Signals whether initialization completed successfully.
-     */
-    public boolean isInitializationComplete() {
-        synchronized (mLock) {
-            return mISupplicant != null;
-        }
-    }
-
-    /**
-     * Indicates whether the AIDL service is declared
-     */
-    public static boolean serviceDeclared() {
-        // Service Manager API ServiceManager#isDeclared supported after T.
-        if (!SdkLevel.isAtLeastT()) {
-            return false;
-        }
-        return ServiceManager.isDeclared(HAL_INSTANCE_NAME);
-    }
-
-    private void clearState() {
-        synchronized (mLock) {
-            mISupplicant = null;
-            mISupplicantStaIfaces.clear();
-            mCurrentNetworkLocalConfigs.clear();
-            mCurrentNetworkRemoteHandles.clear();
-            mLinkedNetworkLocalAndRemoteConfigs.clear();
-        }
-    }
-
-    private void supplicantServiceDiedHandler() {
-        synchronized (mLock) {
-            clearState();
-            if (mDeathEventHandler != null) {
-                mDeathEventHandler.onDeath();
-            }
-        }
-    }
-
-    /**
-     * Start the supplicant daemon.
-     *
-     * @return true on success, false otherwise.
-     */
-    public boolean startDaemon() {
-        final String methodStr = "startDaemon";
-        if (mISupplicant != null) {
-            Log.i(TAG, "Service is already initialized, skipping " + methodStr);
-            return true;
-        }
-
-        mISupplicant = getSupplicantMockable();
-        if (mISupplicant == null) {
-            Log.e(TAG, "Unable to obtain ISupplicant binder.");
-            return false;
-        }
-        Log.i(TAG, "Obtained ISupplicant binder.");
-
-        try {
-            IBinder serviceBinder = getServiceBinderMockable();
-            if (serviceBinder == null) {
-                return false;
-            }
-            serviceBinder.linkToDeath(mSupplicantDeathRecipient, /* flags= */  0);
-            return true;
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-            return false;
-        }
-    }
-
-    /**
-     * Terminate the supplicant daemon & wait for its death.
-     */
-    public void terminate() {
-        synchronized (mLock) {
-            final String methodStr = "terminate";
-            if (!checkSupplicantAndLogFailure(methodStr)) {
-                return;
-            }
-            try {
-                // Register a new death listener to confirm that terminate() killed supplicant
-                IBinder serviceBinder = getServiceBinderMockable();
-                if (serviceBinder == null) {
-                    return;
-                }
-                serviceBinder.linkToDeath(new TerminateDeathRecipient(), /* flags= */ 0);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Unable to register death recipient.");
-                handleRemoteException(e, methodStr);
-                return;
-            }
-
-            try {
-                mISupplicant.terminate();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            }
-        }
-    }
-
-    /**
-     * Wrapper functions to access HAL objects, created to be mockable in unit tests
-     */
-    @VisibleForTesting
-    protected ISupplicant getSupplicantMockable() {
-        synchronized (mLock) {
-            try {
-                return ISupplicant.Stub.asInterface(
-                        ServiceManager.waitForDeclaredService(HAL_INSTANCE_NAME));
-            } catch (Exception e) {
-                Log.e(TAG, "Unable to get ISupplicant service, " + e);
-                return null;
-            }
-        }
-    }
-
-    @VisibleForTesting
-    protected IBinder getServiceBinderMockable() {
-        synchronized (mLock) {
-            if (mISupplicant == null) {
-                return null;
-            }
-            return mISupplicant.asBinder();
-        }
-    }
-
-    /**
-     * Helper method to look up the specified iface.
-     */
-    private ISupplicantStaIface getStaIface(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            return mISupplicantStaIfaces.get(ifaceName);
-        }
-    }
-
-    /**
-     * Helper method to look up the network object for the specified iface.
-     */
-    private SupplicantStaNetworkHalAidlImpl getCurrentNetworkRemoteHandle(
-            @NonNull String ifaceName) {
-        synchronized (mLock) {
-            return mCurrentNetworkRemoteHandles.get(ifaceName);
-        }
-    }
-
-    /**
-     * Helper method to look up the network config for the specified iface.
-     */
-    protected WifiConfiguration getCurrentNetworkLocalConfig(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            return mCurrentNetworkLocalConfigs.get(ifaceName);
-        }
-    }
-
-    /**
-     * Add a network configuration to wpa_supplicant.
-     *
-     * @param config Config corresponding to the network.
-     * @return a Pair object including SupplicantStaNetworkHal and WifiConfiguration objects
-     * for the current network.
-     */
-    private Pair<SupplicantStaNetworkHalAidlImpl, WifiConfiguration>
-            addNetworkAndSaveConfig(@NonNull String ifaceName, WifiConfiguration config) {
-        synchronized (mLock) {
-            if (config == null) {
-                Log.e(TAG, "Cannot add null network.");
-                return null;
-            }
-            SupplicantStaNetworkHalAidlImpl network = addNetwork(ifaceName);
-            if (network == null) {
-                Log.e(TAG, "Failed to add network.");
-                return null;
-            }
-            boolean saveSuccess = false;
-            try {
-                saveSuccess = network.saveWifiConfiguration(config);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Exception while saving config params: " + config, e);
-            }
-            if (!saveSuccess) {
-                Log.e(TAG, "Failed to save variables for: " + config.getProfileKey());
-                if (!removeAllNetworks(ifaceName)) {
-                    Log.e(TAG, "Failed to remove all networks on failure.");
-                }
-                return null;
-            }
-            return new Pair(network, new WifiConfiguration(config));
-        }
-    }
-
-    /**
-     * Add the provided network configuration to wpa_supplicant and initiate connection to it.
-     * This method does the following:
-     * 1. If |config| is different to the current supplicant network, removes all supplicant
-     * networks and saves |config|.
-     * 2. Select the new network in wpa_supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @param config WifiConfiguration parameters for the provided network.
-     * @return true if it succeeds, false otherwise
-     */
-    public boolean connectToNetwork(@NonNull String ifaceName, @NonNull WifiConfiguration config) {
-        synchronized (mLock) {
-            Log.d(TAG, "connectToNetwork " + config.getProfileKey());
-            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
-            if (WifiConfigurationUtil.isSameNetwork(config, currentConfig)) {
-                String networkSelectionBSSID = config.getNetworkSelectionStatus()
-                        .getNetworkSelectionBSSID();
-                String networkSelectionBSSIDCurrent = currentConfig.getNetworkSelectionStatus()
-                        .getNetworkSelectionBSSID();
-                if (Objects.equals(networkSelectionBSSID, networkSelectionBSSIDCurrent)) {
-                    Log.d(TAG, "Network is already saved, will not trigger remove and add.");
-                } else {
-                    Log.d(TAG, "Network is already saved, but need to update BSSID.");
-                    if (!setCurrentNetworkBssid(
-                            ifaceName,
-                            config.getNetworkSelectionStatus().getNetworkSelectionBSSID())) {
-                        Log.e(TAG, "Failed to set current network BSSID.");
-                        return false;
-                    }
-                    mCurrentNetworkLocalConfigs.put(ifaceName, new WifiConfiguration(config));
-                }
-            } else {
-                mCurrentNetworkRemoteHandles.remove(ifaceName);
-                mCurrentNetworkLocalConfigs.remove(ifaceName);
-                mLinkedNetworkLocalAndRemoteConfigs.remove(ifaceName);
-                if (!removeAllNetworks(ifaceName)) {
-                    Log.e(TAG, "Failed to remove existing networks");
-                    return false;
-                }
-                Pair<SupplicantStaNetworkHalAidlImpl, WifiConfiguration> pair =
-                        addNetworkAndSaveConfig(ifaceName, config);
-                if (pair == null) {
-                    Log.e(TAG, "Failed to add/save network configuration: " + config
-                            .getProfileKey());
-                    return false;
-                }
-                mCurrentNetworkRemoteHandles.put(ifaceName, pair.first);
-                mCurrentNetworkLocalConfigs.put(ifaceName, pair.second);
-            }
-
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(ifaceName, "connectToNetwork");
-            if (networkHandle == null) {
-                Log.e(TAG, "No valid remote network handle for network configuration: "
-                        + config.getProfileKey());
-                return false;
-            }
-
-            SecurityParams params = config.getNetworkSelectionStatus()
-                    .getCandidateSecurityParams();
-            if (params != null && !(params.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)
-                    || params.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP))) {
-                List<ArrayList<Byte>> pmkDataList = mPmkCacheManager.get(config.networkId);
-                if (pmkDataList != null) {
-                    Log.i(TAG, "Set PMK cache for config id " + config.networkId);
-                    pmkDataList.forEach(pmkData -> {
-                        if (networkHandle.setPmkCache(NativeUtil.byteArrayFromArrayList(pmkData))) {
-                            mWifiMetrics.setConnectionPmkCache(ifaceName, true);
-                        }
-                    });
-                }
-            }
-
-            if (!networkHandle.select()) {
-                Log.e(TAG, "Failed to select network configuration: " + config.getProfileKey());
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Initiates roaming to the already configured network in wpa_supplicant. If the network
-     * configuration provided does not match the already configured network, then this triggers
-     * a new connection attempt (instead of roam).
-     * 1. First check if we're attempting to connect to a linked network, and select the existing
-     *    supplicant network if there is one.
-     * 2. Set the new bssid for the network in wpa_supplicant.
-     * 3. Trigger reassociate command to wpa_supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @param config WifiConfiguration parameters for the provided network.
-     * @return {@code true} if it succeeds, {@code false} otherwise
-     */
-    public boolean roamToNetwork(@NonNull String ifaceName, WifiConfiguration config) {
-        synchronized (mLock) {
-            if (updateOnLinkedNetworkRoaming(ifaceName, config.networkId, true)) {
-                SupplicantStaNetworkHalAidlImpl networkHandle =
-                        getCurrentNetworkRemoteHandle(ifaceName);
-                if (networkHandle == null) {
-                    Log.e(TAG, "Roaming config matches a linked config, "
-                            + "but a linked network handle was not found.");
-                    return false;
-                }
-                return networkHandle.select();
-            }
-            if (getCurrentNetworkId(ifaceName) != config.networkId) {
-                Log.w(TAG, "Cannot roam to a different network, initiate new connection. "
-                        + "Current network ID: " + getCurrentNetworkId(ifaceName));
-                return connectToNetwork(ifaceName, config);
-            }
-            String bssid = config.getNetworkSelectionStatus().getNetworkSelectionBSSID();
-            Log.d(TAG, "roamToNetwork" + config.getProfileKey() + " (bssid " + bssid + ")");
-
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(ifaceName, "roamToNetwork");
-            if (networkHandle == null || !networkHandle.setBssid(bssid)) {
-                Log.e(TAG, "Failed to set new bssid on network: " + config.getProfileKey());
-                return false;
-            }
-            if (!reassociate(ifaceName)) {
-                Log.e(TAG, "Failed to trigger reassociate");
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Clean HAL cached data for |networkId| in the framework.
-     *
-     * @param networkId network id of the network to be removed from supplicant.
-     */
-    public void removeNetworkCachedData(int networkId) {
-        synchronized (mLock) {
-            Log.d(TAG, "Remove cached HAL data for config id " + networkId);
-            removePmkCacheEntry(networkId);
-        }
-    }
-
-
-    /**
-     * Clear HAL cached data if MAC address is changed.
-     *
-     * @param networkId network id of the network to be checked.
-     * @param curMacAddress current MAC address
-     */
-    public void removeNetworkCachedDataIfNeeded(int networkId, MacAddress curMacAddress) {
-        synchronized (mLock) {
-            mPmkCacheManager.remove(networkId, curMacAddress);
-        }
-    }
-
-    /**
-     * Remove all networks from supplicant
-     *
-     * @param ifaceName Name of the interface.
-     */
-    public boolean removeAllNetworks(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            int[] networks = listNetworks(ifaceName);
-            if (networks == null) {
-                Log.e(TAG, "removeAllNetworks failed, got null networks");
-                return false;
-            }
-            for (int id : networks) {
-                if (!removeNetwork(ifaceName, id)) {
-                    Log.e(TAG, "removeAllNetworks failed to remove network: " + id);
-                    return false;
-                }
-            }
-            // Reset current network info.
-            mCurrentNetworkRemoteHandles.remove(ifaceName);
-            mCurrentNetworkLocalConfigs.remove(ifaceName);
-            mLinkedNetworkLocalAndRemoteConfigs.remove(ifaceName);
-            return true;
-        }
-    }
-
-    /**
-     * Disable the current network in supplicant
-     *
-     * @param ifaceName Name of the interface.
-     */
-    public boolean disableCurrentNetwork(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(ifaceName, "disableCurrentNetwork");
-            if (networkHandle == null) {
-                return false;
-            }
-            return networkHandle.disable();
-        }
-    }
-
-    /**
-     * Set the currently configured network's bssid.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr Bssid to set in the form of "XX:XX:XX:XX:XX:XX"
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean setCurrentNetworkBssid(@NonNull String ifaceName, String bssidStr) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(ifaceName, "setCurrentNetworkBssid");
-            if (networkHandle == null) {
-                return false;
-            }
-            return networkHandle.setBssid(bssidStr);
-        }
-    }
-
-    /**
-     * Get the currently configured network's WPS NFC token.
-     *
-     * @param ifaceName Name of the interface.
-     * @return Hex string corresponding to the WPS NFC token.
-     */
-    public String getCurrentNetworkWpsNfcConfigurationToken(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(
-                            ifaceName, "getCurrentNetworkWpsNfcConfigurationToken");
-            if (networkHandle == null) {
-                return null;
-            }
-            return networkHandle.getWpsNfcConfigurationToken();
-        }
-    }
-
-    /**
-     * Get the eap anonymous identity for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return anonymous identity string if succeeds, null otherwise.
-     */
-    public String getCurrentNetworkEapAnonymousIdentity(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(
-                            ifaceName, "getCurrentNetworkEapAnonymousIdentity");
-            if (networkHandle == null) {
-                return null;
-            }
-            return networkHandle.fetchEapAnonymousIdentity();
-        }
-    }
-
-    /**
-     * Send the eap identity response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param identity identity used for EAP-Identity
-     * @param encryptedIdentity encrypted identity used for EAP-AKA/EAP-SIM
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapIdentityResponse(
-            @NonNull String ifaceName, @NonNull String identity, String encryptedIdentity) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapIdentityResponse");
-            if (networkHandle == null) {
-                return false;
-            }
-            return networkHandle.sendNetworkEapIdentityResponse(identity, encryptedIdentity);
-        }
-    }
-
-    /**
-     * Send the eap sim gsm auth response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param paramsStr String to send.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapSimGsmAuthResponse(
-            @NonNull String ifaceName, String paramsStr) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapSimGsmAuthResponse");
-            if (networkHandle == null) {
-                return false;
-            }
-            return networkHandle.sendNetworkEapSimGsmAuthResponse(paramsStr);
-        }
-    }
-
-    /**
-     * Send the eap sim gsm auth failure for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapSimGsmAuthFailure(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapSimGsmAuthFailure");
-            if (networkHandle == null) {
-                return false;
-            }
-            return networkHandle.sendNetworkEapSimGsmAuthFailure();
-        }
-    }
-
-    /**
-     * Send the eap sim umts auth response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param paramsStr String to send.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapSimUmtsAuthResponse(
-            @NonNull String ifaceName, String paramsStr) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapSimUmtsAuthResponse");
-            if (networkHandle == null) {
-                return false;
-            }
-            return networkHandle.sendNetworkEapSimUmtsAuthResponse(paramsStr);
-        }
-    }
-
-    /**
-     * Send the eap sim umts auts response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param paramsStr String to send.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapSimUmtsAutsResponse(
-            @NonNull String ifaceName, String paramsStr) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapSimUmtsAutsResponse");
-            if (networkHandle == null) {
-                return false;
-            }
-            return networkHandle.sendNetworkEapSimUmtsAutsResponse(paramsStr);
-        }
-    }
-
-    /**
-     * Send the eap sim umts auth failure for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapSimUmtsAuthFailure(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapSimUmtsAuthFailure");
-            if (networkHandle == null) {
-                return false;
-            }
-            return networkHandle.sendNetworkEapSimUmtsAuthFailure();
-        }
-    }
-
-    /**
-     * Adds a new network.
-     *
-     * @return SupplicantStaNetworkHalAidlImpl object for the new network, or null if the call fails
-     */
-    private SupplicantStaNetworkHalAidlImpl addNetwork(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "addNetwork";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return null;
-            }
-            try {
-                ISupplicantStaNetwork network = iface.addNetwork();
-                // Get framework wrapper around the AIDL network object
-                return getStaNetworkHalMockable(ifaceName, network);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Remove network with specified network Id from supplicant.
-     *
-     * @return true if request is sent successfully, false otherwise.
-     */
-    private boolean removeNetwork(@NonNull String ifaceName, int id) {
-        synchronized (mLock) {
-            final String methodStr = "removeNetwork";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.removeNetwork(id);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Creates a SupplicantStaNetworkHal wrapper around an AIDL ISupplicantStaNetwork object.
-     * Declared mockable for use in unit tests.
-     *
-     * @param ifaceName Name of the interface.
-     * @param network ISupplicantStaNetwork instance retrieved from AIDL.
-     * @return SupplicantStaNetworkHal object for the given network, or null if
-     * the call fails
-     */
-    protected SupplicantStaNetworkHalAidlImpl getStaNetworkHalMockable(
-            @NonNull String ifaceName, ISupplicantStaNetwork network) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkWrapper =
-                    new SupplicantStaNetworkHalAidlImpl(network, ifaceName, mContext,
-                            mWifiMonitor, mWifiGlobals, getAdvancedCapabilities(ifaceName));
-            if (networkWrapper != null) {
-                networkWrapper.enableVerboseLogging(
-                        mVerboseLoggingEnabled, mVerboseHalLoggingEnabled);
-            }
-            return networkWrapper;
-        }
-    }
-
-    private boolean registerCallback(
-            ISupplicantStaIface iface, ISupplicantStaIfaceCallback callback) {
-        synchronized (mLock) {
-            String methodStr = "registerCallback";
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.registerCallback(callback);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get list of id's of all networks controlled by supplicant.
-     *
-     * @return list of network id's, null if failed
-     */
-    private int[] listNetworks(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "listNetworks";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return null;
-            }
-            try {
-                return iface.listNetworks();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Set WPS device name.
-     *
-     * @param ifaceName Name of the interface.
-     * @param name String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsDeviceName(@NonNull String ifaceName, String name) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsDeviceName";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setWpsDeviceName(name);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set WPS device type.
-     *
-     * @param ifaceName Name of the interface.
-     * @param typeStr Type specified as a string. Used format: <categ>-<OUI>-<subcateg>
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsDeviceType(@NonNull String ifaceName, String typeStr) {
-        synchronized (mLock) {
-            try {
-                Matcher match = WPS_DEVICE_TYPE_PATTERN.matcher(typeStr);
-                if (!match.find() || match.groupCount() != 3) {
-                    Log.e(TAG, "Malformed WPS device type " + typeStr);
-                    return false;
-                }
-                short categ = Short.parseShort(match.group(1));
-                byte[] oui = NativeUtil.hexStringToByteArray(match.group(2));
-                short subCateg = Short.parseShort(match.group(3));
-
-                byte[] bytes = new byte[8];
-                ByteBuffer byteBuffer = ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
-                byteBuffer.putShort(categ);
-                byteBuffer.put(oui);
-                byteBuffer.putShort(subCateg);
-                return setWpsDeviceType(ifaceName, bytes);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + typeStr, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean setWpsDeviceType(@NonNull String ifaceName, byte[/* 8 */] type) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsDeviceType";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setWpsDeviceType(type);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set WPS manufacturer.
-     *
-     * @param ifaceName Name of the interface.
-     * @param manufacturer String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsManufacturer(@NonNull String ifaceName, String manufacturer) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsManufacturer";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setWpsManufacturer(manufacturer);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set WPS model name.
-     *
-     * @param ifaceName Name of the interface.
-     * @param modelName String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsModelName(@NonNull String ifaceName, String modelName) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsModelName";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setWpsModelName(modelName);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set WPS model number.
-     *
-     * @param ifaceName Name of the interface.
-     * @param modelNumber String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsModelNumber(@NonNull String ifaceName, String modelNumber) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsModelNumber";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setWpsModelNumber(modelNumber);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set WPS serial number.
-     *
-     * @param ifaceName Name of the interface.
-     * @param serialNumber String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsSerialNumber(@NonNull String ifaceName, String serialNumber) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsSerialNumber";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setWpsSerialNumber(serialNumber);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set WPS config methods
-     *
-     * @param ifaceName Name of the interface.
-     * @param configMethodsStr List of config methods.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsConfigMethods(@NonNull String ifaceName, String configMethodsStr) {
-        synchronized (mLock) {
-            int configMethodsMask = 0;
-            String[] configMethodsStrArr = configMethodsStr.split("\\s+");
-            for (int i = 0; i < configMethodsStrArr.length; i++) {
-                configMethodsMask |= stringToWpsConfigMethod(configMethodsStrArr[i]);
-            }
-            return setWpsConfigMethods(ifaceName, configMethodsMask);
-        }
-    }
-
-    private boolean setWpsConfigMethods(@NonNull String ifaceName, int configMethods) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsConfigMethods";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setWpsConfigMethods(configMethods);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Trigger a reassociation even if the iface is currently connected.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean reassociate(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "reassociate";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.reassociate();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Trigger a reconnection if the iface is disconnected.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean reconnect(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "reconnect";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.reconnect();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-
-    /**
-     * Trigger a disconnection from the currently connected network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean disconnect(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "disconnect";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.disconnect();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Enable or disable power save mode.
-     *
-     * @param ifaceName Name of the interface.
-     * @param enable true to enable, false to disable.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setPowerSave(@NonNull String ifaceName, boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setPowerSave";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setPowerSave(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Initiate TDLS discover with the specified AP.
-     *
-     * @param ifaceName Name of the interface.
-     * @param macAddress MAC Address of the AP.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateTdlsDiscover(@NonNull String ifaceName, String macAddress) {
-        synchronized (mLock) {
-            try {
-                return initiateTdlsDiscover(
-                        ifaceName, NativeUtil.macAddressToByteArray(macAddress));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + macAddress, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean initiateTdlsDiscover(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
-        synchronized (mLock) {
-            final String methodStr = "initiateTdlsDiscover";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.initiateTdlsDiscover(macAddress);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Initiate TDLS setup with the specified AP.
-     *
-     * @param ifaceName Name of the interface.
-     * @param macAddress MAC Address of the AP.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateTdlsSetup(@NonNull String ifaceName, String macAddress) {
-        synchronized (mLock) {
-            try {
-                return initiateTdlsSetup(ifaceName, NativeUtil.macAddressToByteArray(macAddress));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + macAddress, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean initiateTdlsSetup(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
-        synchronized (mLock) {
-            final String methodStr = "initiateTdlsSetup";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.initiateTdlsSetup(macAddress);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Initiate TDLS teardown with the specified AP.
-     *
-     * @param ifaceName Name of the interface.
-     * @param macAddress MAC Address of the AP.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateTdlsTeardown(@NonNull String ifaceName, String macAddress) {
-        synchronized (mLock) {
-            try {
-                return initiateTdlsTeardown(
-                        ifaceName, NativeUtil.macAddressToByteArray(macAddress));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + macAddress, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean initiateTdlsTeardown(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
-        synchronized (mLock) {
-            final String methodStr = "initiateTdlsTeardown";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.initiateTdlsTeardown(macAddress);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Request the specified ANQP elements |elements| from the specified AP |bssid|.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssid BSSID of the AP
-     * @param infoElements ANQP elements to be queried. Refer to ISupplicantStaIface.AnqpInfoId.
-     * @param hs20SubTypes HS subtypes to be queried. Refer to ISupplicantStaIface.Hs20AnqpSubTypes.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateAnqpQuery(@NonNull String ifaceName, String bssid,
-            ArrayList<Short> infoElements,
-            ArrayList<Integer> hs20SubTypes) {
-        synchronized (mLock) {
-            try {
-                int[] infoElementsCast = new int[infoElements.size()];
-                int[] hs20SubTypesCast = new int[hs20SubTypes.size()];
-                for (int i = 0; i < infoElements.size(); i++) {
-                    infoElementsCast[i] = infoElements.get(i);
-                }
-                for (int i = 0; i < hs20SubTypes.size(); i++) {
-                    hs20SubTypesCast[i] = hs20SubTypes.get(i);
-                }
-                return initiateAnqpQuery(
-                        ifaceName,
-                        NativeUtil.macAddressToByteArray(bssid),
-                        infoElementsCast, hs20SubTypesCast);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssid, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean initiateAnqpQuery(@NonNull String ifaceName, byte[/* 6 */] macAddress,
-            int[] infoElements, int[] subTypes) {
-        synchronized (mLock) {
-            final String methodStr = "initiateAnqpQuery";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.initiateAnqpQuery(macAddress, infoElements, subTypes);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Request Venue URL ANQP element from the specified AP |bssid|.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssid BSSID of the AP
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateVenueUrlAnqpQuery(@NonNull String ifaceName, String bssid) {
-        synchronized (mLock) {
-            try {
-                return initiateVenueUrlAnqpQuery(
-                        ifaceName, NativeUtil.macAddressToByteArray(bssid));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssid, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean initiateVenueUrlAnqpQuery(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
-        synchronized (mLock) {
-            final String methodStr = "initiateVenueUrlAnqpQuery";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.initiateVenueUrlAnqpQuery(macAddress);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Request the specified ANQP ICON from the specified AP |bssid|.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssid BSSID of the AP
-     * @param fileName Name of the file to request.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateHs20IconQuery(@NonNull String ifaceName, String bssid, String fileName) {
-        synchronized (mLock) {
-            try {
-                return initiateHs20IconQuery(
-                        ifaceName, NativeUtil.macAddressToByteArray(bssid), fileName);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssid, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean initiateHs20IconQuery(@NonNull String ifaceName,
-            byte[/* 6 */] macAddress, String fileName) {
-        synchronized (mLock) {
-            final String methodStr = "initiateHs20IconQuery";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.initiateHs20IconQuery(macAddress, fileName);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Gets MAC Address from the supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @return string containing the MAC address, or null on a failed call
-     */
-    public String getMacAddress(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "getMacAddress";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return null;
-            }
-            try {
-                byte[] macAddr = iface.getMacAddress();
-                return NativeUtil.macAddressFromByteArray(macAddr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Invalid MAC address value", e);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Start using the added RX filters.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean startRxFilter(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "startRxFilter";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.startRxFilter();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Stop using the added RX filters.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean stopRxFilter(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "stopRxFilter";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.stopRxFilter();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Add an RX filter.
-     *
-     * @param ifaceName Name of the interface.
-     * @param type one of {@link WifiNative#RX_FILTER_TYPE_V4_MULTICAST}
-     *        {@link WifiNative#RX_FILTER_TYPE_V6_MULTICAST} values.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean addRxFilter(@NonNull String ifaceName, int type) {
-        synchronized (mLock) {
-            byte halType;
-            switch (type) {
-                case WifiNative.RX_FILTER_TYPE_V4_MULTICAST:
-                    halType = RxFilterType.V4_MULTICAST;
-                    break;
-                case WifiNative.RX_FILTER_TYPE_V6_MULTICAST:
-                    halType = RxFilterType.V6_MULTICAST;
-                    break;
-                default:
-                    Log.e(TAG, "Invalid Rx Filter type: " + type);
-                    return false;
-            }
-            return addRxFilter(ifaceName, halType);
-        }
-    }
-
-    private boolean addRxFilter(@NonNull String ifaceName, byte type) {
-        synchronized (mLock) {
-            final String methodStr = "addRxFilter";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.addRxFilter(type);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Remove an RX filter.
-     *
-     * @param ifaceName Name of the interface.
-     * @param type one of {@link WifiNative#RX_FILTER_TYPE_V4_MULTICAST}
-     *        {@link WifiNative#RX_FILTER_TYPE_V6_MULTICAST} values.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean removeRxFilter(@NonNull String ifaceName, int type) {
-        synchronized (mLock) {
-            byte halType;
-            switch (type) {
-                case WifiNative.RX_FILTER_TYPE_V4_MULTICAST:
-                    halType = RxFilterType.V4_MULTICAST;
-                    break;
-                case WifiNative.RX_FILTER_TYPE_V6_MULTICAST:
-                    halType = RxFilterType.V6_MULTICAST;
-                    break;
-                default:
-                    Log.e(TAG, "Invalid Rx Filter type: " + type);
-                    return false;
-            }
-            return removeRxFilter(ifaceName, halType);
-        }
-    }
-
-    private boolean removeRxFilter(@NonNull String ifaceName, byte type) {
-        synchronized (mLock) {
-            final String methodStr = "removeRxFilter";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.removeRxFilter(type);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set Bt co existense mode.
-     *
-     * @param ifaceName Name of the interface.
-     * @param mode one of the above {@link WifiNative#BLUETOOTH_COEXISTENCE_MODE_DISABLED},
-     *             {@link WifiNative#BLUETOOTH_COEXISTENCE_MODE_ENABLED} or
-     *             {@link WifiNative#BLUETOOTH_COEXISTENCE_MODE_SENSE}.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setBtCoexistenceMode(@NonNull String ifaceName, int mode) {
-        synchronized (mLock) {
-            byte halMode;
-            switch (mode) {
-                case WifiNative.BLUETOOTH_COEXISTENCE_MODE_ENABLED:
-                    halMode = BtCoexistenceMode.ENABLED;
-                    break;
-                case WifiNative.BLUETOOTH_COEXISTENCE_MODE_DISABLED:
-                    halMode = BtCoexistenceMode.DISABLED;
-                    break;
-                case WifiNative.BLUETOOTH_COEXISTENCE_MODE_SENSE:
-                    halMode = BtCoexistenceMode.SENSE;
-                    break;
-                default:
-                    Log.e(TAG, "Invalid Bt Coex mode: " + mode);
-                    return false;
-            }
-            return setBtCoexistenceMode(ifaceName, halMode);
-        }
-    }
-
-    private boolean setBtCoexistenceMode(@NonNull String ifaceName, byte mode) {
-        synchronized (mLock) {
-            final String methodStr = "setBtCoexistenceMode";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setBtCoexistenceMode(mode);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /** Enable or disable BT coexistence mode.
-     *
-     * @param ifaceName Name of the interface.
-     * @param enable true to enable, false to disable.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setBtCoexistenceScanModeEnabled(@NonNull String ifaceName, boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setBtCoexistenceScanModeEnabled";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setBtCoexistenceScanModeEnabled(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Enable or disable suspend mode optimizations.
-     *
-     * @param ifaceName Name of the interface.
-     * @param enable true to enable, false otherwise.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setSuspendModeEnabled(@NonNull String ifaceName, boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setSuspendModeEnabled";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setSuspendModeEnabled(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set country code.
-     *
-     * @param ifaceName Name of the interface.
-     * @param codeStr 2 byte ASCII string. For ex: US, CA.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setCountryCode(@NonNull String ifaceName, String codeStr) {
-        synchronized (mLock) {
-            if (TextUtils.isEmpty(codeStr)) {
-                return false;
-            }
-            byte[] countryCodeBytes = NativeUtil.stringToByteArray(codeStr);
-            if (countryCodeBytes.length != 2) {
-                return false;
-            }
-            return setCountryCode(ifaceName, countryCodeBytes);
-        }
-    }
-
-    private boolean setCountryCode(@NonNull String ifaceName, byte[/* 2 */] code) {
-        synchronized (mLock) {
-            final String methodStr = "setCountryCode";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setCountryCode(code);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Flush all previously configured HLPs.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean flushAllHlp(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "filsHlpFlushRequest";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.filsHlpFlushRequest();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set FILS HLP packet.
-     *
-     * @param ifaceName Name of the interface.
-     * @param dst Destination MAC address.
-     * @param hlpPacket Hlp Packet data in hex.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean addHlpReq(@NonNull String ifaceName, byte[] dst, byte[] hlpPacket) {
-        synchronized (mLock) {
-            final String methodStr = "filsHlpAddRequest";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.filsHlpAddRequest(dst, hlpPacket);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Start WPS pin registrar operation with the specified peer and pin.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr BSSID of the peer.
-     * @param pin Pin to be used.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean startWpsRegistrar(@NonNull String ifaceName, String bssidStr, String pin) {
-        synchronized (mLock) {
-            if (TextUtils.isEmpty(bssidStr) || TextUtils.isEmpty(pin)) {
-                return false;
-            }
-            try {
-                return startWpsRegistrar(
-                        ifaceName, NativeUtil.macAddressToByteArray(bssidStr), pin);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssidStr, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean startWpsRegistrar(@NonNull String ifaceName, byte[/* 6 */] bssid, String pin) {
-        synchronized (mLock) {
-            final String methodStr = "startWpsRegistrar";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.startWpsRegistrar(bssid, pin);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Start WPS pin display operation with the specified peer.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr BSSID of the peer. Use empty bssid to indicate wildcard.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean startWpsPbc(@NonNull String ifaceName, String bssidStr) {
-        synchronized (mLock) {
-            try {
-                return startWpsPbc(ifaceName, NativeUtil.macAddressToByteArray(bssidStr));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssidStr, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean startWpsPbc(@NonNull String ifaceName, byte[/* 6 */] bssid) {
-        synchronized (mLock) {
-            final String methodStr = "startWpsPbc";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.startWpsPbc(bssid);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Start WPS pin keypad operation with the specified pin.
-     *
-     * @param ifaceName Name of the interface.
-     * @param pin Pin to be used.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean startWpsPinKeypad(@NonNull String ifaceName, String pin) {
-        if (TextUtils.isEmpty(pin)) {
-            return false;
-        }
-        synchronized (mLock) {
-            final String methodStr = "startWpsPinKeypad";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.startWpsPinKeypad(pin);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Start WPS pin display operation with the specified peer.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr BSSID of the peer. Use empty bssid to indicate wildcard.
-     * @return new pin generated on success, null otherwise.
-     */
-    public String startWpsPinDisplay(@NonNull String ifaceName, String bssidStr) {
-        synchronized (mLock) {
-            try {
-                return startWpsPinDisplay(ifaceName, NativeUtil.macAddressToByteArray(bssidStr));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssidStr, e);
-                return null;
-            }
-        }
-    }
-
-    private String startWpsPinDisplay(@NonNull String ifaceName, byte[/* 6 */] bssid) {
-        synchronized (mLock) {
-            final String methodStr = "startWpsPinDisplay";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return null;
-            }
-            try {
-                return iface.startWpsPinDisplay(bssid);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Cancels any ongoing WPS requests.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean cancelWps(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "cancelWps";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.cancelWps();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Sets whether to use external sim for SIM/USIM processing.
-     *
-     * @param ifaceName Name of the interface.
-     * @param useExternalSim true to enable, false otherwise.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setExternalSim(@NonNull String ifaceName, boolean useExternalSim) {
-        synchronized (mLock) {
-            final String methodStr = "setExternalSim";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setExternalSim(useExternalSim);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Enable/Disable auto reconnect to networks.
-     * Use this to prevent wpa_supplicant from trying to connect to networks
-     * on its own.
-     *
-     * @param enable true to enable, false to disable.
-     * @return true if no exceptions occurred, false otherwise
-     */
-    public boolean enableAutoReconnect(@NonNull String ifaceName, boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "enableAutoReconnect";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.enableAutoReconnect(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set the debug log level for wpa_supplicant
-     *
-     * @param turnOnVerbose Whether to turn on verbose logging or not.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setLogLevel(boolean turnOnVerbose) {
-        synchronized (mLock) {
-            int logLevel = turnOnVerbose
-                    ? DebugLevel.DEBUG
-                    : DebugLevel.INFO;
-            return setDebugParams(logLevel, false,
-                    turnOnVerbose && mWifiGlobals.getShowKeyVerboseLoggingModeEnabled());
-        }
-    }
-
-    /**
-     * Set debug parameters for the ISupplicant service.
-     *
-     * @param level Debug logging level for the supplicant.
-     *        (one of |DebugLevel| values).
-     * @param showTimestamp Determines whether to show timestamps in logs or not.
-     * @param showKeys Determines whether to show keys in debug logs or not.
-     *        CAUTION: Do not set this param in production code!
-     * @return true if no exceptions occurred, false otherwise
-     */
-    private boolean setDebugParams(int level, boolean showTimestamp, boolean showKeys) {
-        synchronized (mLock) {
-            final String methodStr = "setDebugParams";
-            if (!checkSupplicantAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicant.setDebugParams(level, showTimestamp, showKeys);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set concurrency priority between P2P & STA operations.
-     *
-     * @param isStaHigherPriority Set to true to prefer STA over P2P during concurrency operations,
-     *                            false otherwise.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setConcurrencyPriority(boolean isStaHigherPriority) {
-        synchronized (mLock) {
-            if (isStaHigherPriority) {
-                return setConcurrencyPriority(IfaceType.STA);
-            } else {
-                return setConcurrencyPriority(IfaceType.P2P);
-            }
-        }
-    }
-
-    private boolean setConcurrencyPriority(int type) {
-        synchronized (mLock) {
-            final String methodStr = "setConcurrencyPriority";
-            if (!checkSupplicantAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicant.setConcurrencyPriority(type);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Returns false if mISupplicant is null and logs failure message
-     */
-    private boolean checkSupplicantAndLogFailure(final String methodStr) {
-        synchronized (mLock) {
-            if (mISupplicant == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", ISupplicant is null");
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Returns specified STA iface if it exists. Otherwise, logs error and returns null.
-     */
-    private ISupplicantStaIface checkStaIfaceAndLogFailure(
-            @NonNull String ifaceName, final String methodStr) {
-        synchronized (mLock) {
-            ISupplicantStaIface iface = getStaIface(ifaceName);
-            if (iface == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", ISupplicantStaIface is null for "
-                        + "iface=" + ifaceName);
-                return null;
-            }
-            return iface;
-        }
-    }
-
-    /**
-     * Returns network belonging to the specified STA iface if it exists.
-     * Otherwise, logs error and returns null.
-     */
-    private SupplicantStaNetworkHalAidlImpl checkStaNetworkAndLogFailure(
-            @NonNull String ifaceName, final String methodStr) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    getCurrentNetworkRemoteHandle(ifaceName);
-            if (networkHandle == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", SupplicantStaNetwork for iface="
-                        + ifaceName + " is null.");
-                return null;
-            }
-            return networkHandle;
-        }
-    }
-
-    /**
-     * Helper function to log callback events
-     */
-    protected void logCallback(final String methodStr) {
-        synchronized (mLock) {
-            if (mVerboseLoggingEnabled) {
-                Log.d(TAG, "ISupplicantStaIfaceCallback." + methodStr + " received");
-            }
-        }
-    }
-
-    private void handleRemoteException(RemoteException e, String methodStr) {
-        synchronized (mLock) {
-            clearState();
-            Log.e(TAG,
-                    "ISupplicantStaIface." + methodStr + " failed with remote exception: ", e);
-        }
-    }
-
-    private void handleServiceSpecificException(ServiceSpecificException e, String methodStr) {
-        synchronized (mLock) {
-            Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed with "
-                    + "service specific exception: ", e);
-        }
-    }
-
-    /**
-     * Converts the Wps config method string to the equivalent enum value.
-     */
-    private static int stringToWpsConfigMethod(String configMethod) {
-        switch (configMethod) {
-            case "usba":
-                return WpsConfigMethods.USBA;
-            case "ethernet":
-                return WpsConfigMethods.ETHERNET;
-            case "label":
-                return WpsConfigMethods.LABEL;
-            case "display":
-                return WpsConfigMethods.DISPLAY;
-            case "int_nfc_token":
-                return WpsConfigMethods.INT_NFC_TOKEN;
-            case "ext_nfc_token":
-                return WpsConfigMethods.EXT_NFC_TOKEN;
-            case "nfc_interface":
-                return WpsConfigMethods.NFC_INTERFACE;
-            case "push_button":
-                return WpsConfigMethods.PUSHBUTTON;
-            case "keypad":
-                return WpsConfigMethods.KEYPAD;
-            case "virtual_push_button":
-                return WpsConfigMethods.VIRT_PUSHBUTTON;
-            case "physical_push_button":
-                return WpsConfigMethods.PHY_PUSHBUTTON;
-            case "p2ps":
-                return WpsConfigMethods.P2PS;
-            case "virtual_display":
-                return WpsConfigMethods.VIRT_DISPLAY;
-            case "physical_display":
-                return WpsConfigMethods.PHY_DISPLAY;
-            default:
-                throw new IllegalArgumentException(
-                        "Invalid WPS config method: " + configMethod);
-        }
-    }
-
-    protected void addPmkCacheEntry(
-            String ifaceName, int networkId,
-            long expirationTimeInSec, ArrayList<Byte> serializedEntry) {
-        synchronized (mLock) {
-            String macAddressStr = getMacAddress(ifaceName);
-            try {
-                if (!mPmkCacheManager.add(MacAddress.fromString(macAddressStr),
-                        networkId, expirationTimeInSec, serializedEntry)) {
-                    Log.w(TAG, "Cannot add PMK cache for " + ifaceName);
-                }
-            } catch (IllegalArgumentException ex) {
-                Log.w(TAG, "Cannot add PMK cache: " + ex);
-            }
-        }
-    }
-
-    protected void removePmkCacheEntry(int networkId) {
-        synchronized (mLock) {
-            mPmkCacheManager.remove(networkId);
-        }
-    }
-
-    /**
-     * Returns a bitmask of advanced capabilities: WPA3 SAE/SUITE B and OWE
-     * Bitmask used is:
-     * - WIFI_FEATURE_WPA3_SAE
-     * - WIFI_FEATURE_WPA3_SUITE_B
-     * - WIFI_FEATURE_OWE
-     *
-     *  @return true if successful, false otherwise.
-     */
-    public long getAdvancedCapabilities(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "getAdvancedCapabilities";
-            long advancedCapabilities = 0;
-            int keyMgmtCapabilities = getKeyMgmtCapabilities(ifaceName);
-
-            advancedCapabilities |= WIFI_FEATURE_PASSPOINT_TERMS_AND_CONDITIONS
-                    | WIFI_FEATURE_DECORATED_IDENTITY;
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": Passpoint T&C supported");
-                Log.v(TAG, methodStr + ": RFC 7542 decorated identity supported");
-            }
-
-            if ((keyMgmtCapabilities & KeyMgmtMask.SAE) != 0) {
-                advancedCapabilities |= WIFI_FEATURE_WPA3_SAE;
-
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": SAE supported");
-                }
-            }
-
-            if ((keyMgmtCapabilities & KeyMgmtMask.SUITE_B_192) != 0) {
-                advancedCapabilities |= WIFI_FEATURE_WPA3_SUITE_B;
-
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": SUITE_B supported");
-                }
-            }
-
-            if ((keyMgmtCapabilities & KeyMgmtMask.OWE) != 0) {
-                advancedCapabilities |= WIFI_FEATURE_OWE;
-
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": OWE supported");
-                }
-            }
-
-            if ((keyMgmtCapabilities & KeyMgmtMask.DPP) != 0) {
-                advancedCapabilities |= WIFI_FEATURE_DPP
-                        | WIFI_FEATURE_DPP_ENROLLEE_RESPONDER;
-
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": DPP supported");
-                    Log.v(TAG, methodStr + ": DPP ENROLLEE RESPONDER supported");
-                }
-            }
-
-            if ((keyMgmtCapabilities & KeyMgmtMask.WAPI_PSK) != 0) {
-                advancedCapabilities |= WIFI_FEATURE_WAPI;
-
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": WAPI supported");
-                }
-            }
-
-            if ((keyMgmtCapabilities & KeyMgmtMask.FILS_SHA256) != 0) {
-                advancedCapabilities |= WIFI_FEATURE_FILS_SHA256;
-
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": FILS_SHA256 supported");
-                }
-            }
-
-            if ((keyMgmtCapabilities & KeyMgmtMask.FILS_SHA384) != 0) {
-                advancedCapabilities |= WIFI_FEATURE_FILS_SHA384;
-
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": FILS_SHA384 supported");
-                }
-            }
-
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": Capability flags = " + keyMgmtCapabilities);
-            }
-
-            return advancedCapabilities;
-        }
-    }
-
-    private int getKeyMgmtCapabilities(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "getKeyMgmtCapabilities";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return 0;
-            }
-            try {
-                return iface.getKeyMgmtCapabilities();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return 0;
-        }
-    }
-
-    /**
-     * Get the driver supported features through supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @return bitmask defined by WifiManager.WIFI_FEATURE_*.
-     */
-    public long getWpaDriverFeatureSet(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "getWpaDriverFeatureSet";
-            int drvCapabilitiesMask = getWpaDriverCapabilities(ifaceName);
-            long featureSet = 0;
-
-            if ((drvCapabilitiesMask & WpaDriverCapabilitiesMask.MBO) != 0) {
-                featureSet |= WIFI_FEATURE_MBO;
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": MBO supported");
-                }
-                if ((drvCapabilitiesMask & WpaDriverCapabilitiesMask.OCE) != 0) {
-                    featureSet |= WIFI_FEATURE_OCE;
-                    if (mVerboseLoggingEnabled) {
-                        Log.v(TAG, methodStr + ": OCE supported");
-                    }
-                }
-            }
-
-            if ((drvCapabilitiesMask & WpaDriverCapabilitiesMask.SAE_PK) != 0) {
-                featureSet |= WIFI_FEATURE_SAE_PK;
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": SAE-PK supported");
-                }
-            }
-
-            if ((drvCapabilitiesMask & WpaDriverCapabilitiesMask.WFD_R2) != 0) {
-                featureSet |= WIFI_FEATURE_WFD_R2;
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": WFD-R2 supported");
-                }
-            }
-
-            if ((drvCapabilitiesMask
-                    & WpaDriverCapabilitiesMask.TRUST_ON_FIRST_USE) != 0) {
-                featureSet |= WIFI_FEATURE_TRUST_ON_FIRST_USE;
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": Trust-On-First-Use supported");
-                }
-            }
-
-            return featureSet;
-        }
-    }
-
-    private int getWpaDriverCapabilities(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "getWpaDriverCapabilities";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return 0;
-            }
-            try {
-                return iface.getWpaDriverCapabilities();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return 0;
-        }
-    }
-
-    private @WifiAnnotations.WifiStandard int getWifiStandard(int technology) {
-        switch(technology) {
-            case WifiTechnology.EHT:
-                return ScanResult.WIFI_STANDARD_11BE;
-            case WifiTechnology.HE:
-                return ScanResult.WIFI_STANDARD_11AX;
-            case WifiTechnology.VHT:
-                return ScanResult.WIFI_STANDARD_11AC;
-            case WifiTechnology.HT:
-                return ScanResult.WIFI_STANDARD_11N;
-            case WifiTechnology.LEGACY:
-                return ScanResult.WIFI_STANDARD_LEGACY;
-            default:
-                return ScanResult.WIFI_STANDARD_UNKNOWN;
-        }
-    }
-
-    private int getChannelBandwidth(int channelBandwidth) {
-        switch(channelBandwidth) {
-            case WifiChannelWidthInMhz.WIDTH_20:
-                return ScanResult.CHANNEL_WIDTH_20MHZ;
-            case WifiChannelWidthInMhz.WIDTH_40:
-                return ScanResult.CHANNEL_WIDTH_40MHZ;
-            case WifiChannelWidthInMhz.WIDTH_80:
-                return ScanResult.CHANNEL_WIDTH_80MHZ;
-            case WifiChannelWidthInMhz.WIDTH_160:
-                return ScanResult.CHANNEL_WIDTH_160MHZ;
-            case WifiChannelWidthInMhz.WIDTH_80P80:
-                return ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
-            case WifiChannelWidthInMhz.WIDTH_320:
-                return ScanResult.CHANNEL_WIDTH_320MHZ;
-            default:
-                return ScanResult.CHANNEL_WIDTH_20MHZ;
-        }
-    }
-
-    private int frameworkToAidlDppAkm(int dppAkm) {
-        switch(dppAkm) {
-            case SupplicantStaIfaceHal.DppAkm.PSK:
-                return DppAkm.PSK;
-            case SupplicantStaIfaceHal.DppAkm.PSK_SAE:
-                return DppAkm.PSK_SAE;
-            case SupplicantStaIfaceHal.DppAkm.SAE:
-                return DppAkm.SAE;
-            case SupplicantStaIfaceHal.DppAkm.DPP:
-                return DppAkm.DPP;
-            default:
-                Log.e(TAG, "Invalid DppAkm received");
-                return -1;
-        }
-    }
-
-    private int frameworkToAidlDppCurve(int dppCurve) {
-        switch(dppCurve) {
-            case SupplicantStaIfaceHal.DppCurve.PRIME256V1:
-                return DppCurve.PRIME256V1;
-            case SupplicantStaIfaceHal.DppCurve.SECP384R1:
-                return DppCurve.SECP384R1;
-            case SupplicantStaIfaceHal.DppCurve.SECP521R1:
-                return DppCurve.SECP521R1;
-            case SupplicantStaIfaceHal.DppCurve.BRAINPOOLP256R1:
-                return DppCurve.BRAINPOOLP256R1;
-            case SupplicantStaIfaceHal.DppCurve.BRAINPOOLP384R1:
-                return DppCurve.BRAINPOOLP384R1;
-            case SupplicantStaIfaceHal.DppCurve.BRAINPOOLP512R1:
-                return DppCurve.BRAINPOOLP512R1;
-            default:
-                Log.e(TAG, "Invalid DppCurve received");
-                return -1;
-        }
-    }
-
-    private int frameworkToAidlDppNetRole(int dppNetRole) {
-        switch(dppNetRole) {
-            case SupplicantStaIfaceHal.DppNetRole.STA:
-                return DppNetRole.STA;
-            case SupplicantStaIfaceHal.DppNetRole.AP:
-                return DppNetRole.AP;
-            default:
-                Log.e(TAG, "Invalid DppNetRole received");
-                return -1;
-        }
-    }
-
-    protected byte dscpPolicyToAidlQosPolicyStatusCode(int status) {
-        switch (status) {
-            case NetworkAgent.DSCP_POLICY_STATUS_SUCCESS:
-            case NetworkAgent.DSCP_POLICY_STATUS_DELETED:
-                return QosPolicyStatusCode.QOS_POLICY_SUCCESS;
-            case NetworkAgent.DSCP_POLICY_STATUS_REQUEST_DECLINED:
-                return QosPolicyStatusCode.QOS_POLICY_REQUEST_DECLINED;
-            case NetworkAgent.DSCP_POLICY_STATUS_REQUESTED_CLASSIFIER_NOT_SUPPORTED:
-                return QosPolicyStatusCode.QOS_POLICY_CLASSIFIER_NOT_SUPPORTED;
-            case NetworkAgent.DSCP_POLICY_STATUS_INSUFFICIENT_PROCESSING_RESOURCES:
-                return QosPolicyStatusCode.QOS_POLICY_INSUFFICIENT_RESOURCES;
-            default:
-                Log.e(TAG, "Invalid DSCP policy failure code received: " + status);
-                return QosPolicyStatusCode.QOS_POLICY_REQUEST_DECLINED;
-        }
-    }
-
-    protected static int halToFrameworkQosPolicyRequestType(byte requestType) {
-        switch (requestType) {
-            case QosPolicyRequestType.QOS_POLICY_ADD:
-                return SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD;
-            case QosPolicyRequestType.QOS_POLICY_REMOVE:
-                return SupplicantStaIfaceHal.QOS_POLICY_REQUEST_REMOVE;
-            default:
-                Log.e(TAG, "Invalid QosPolicyRequestType received: " + requestType);
-                return -1;
-        }
-    }
-
-    private static boolean qosClassifierParamHasValue(int classifierParamMask, int paramBit) {
-        return (classifierParamMask & paramBit) != 0;
-    }
-
-    /**
-     * Convert from a HAL QosPolicyData object to a framework QosPolicy object.
-     */
-    public static SupplicantStaIfaceHal.QosPolicyRequest halToFrameworkQosPolicy(
-            QosPolicyData halQosPolicy) {
-        QosPolicyClassifierParams classifierParams = halQosPolicy.classifierParams;
-        int classifierParamMask = classifierParams.classifierParamMask;
-
-        byte[] srcIp = null;
-        byte[] dstIp = null;
-        int srcPort = DscpPolicy.SOURCE_PORT_ANY;
-        int[] dstPortRange = new int[]{MIN_PORT_NUM, MAX_PORT_NUM};
-        int protocol = DscpPolicy.PROTOCOL_ANY;
-        boolean hasSrcIp = false;
-        boolean hasDstIp = false;
-
-        if (qosClassifierParamHasValue(classifierParamMask, QosPolicyClassifierParamsMask.SRC_IP)) {
-            hasSrcIp = true;
-            srcIp = classifierParams.srcIp;
-        }
-        if (qosClassifierParamHasValue(classifierParamMask, QosPolicyClassifierParamsMask.DST_IP)) {
-            hasDstIp = true;
-            dstIp = classifierParams.dstIp;
-        }
-        if (qosClassifierParamHasValue(classifierParamMask,
-                QosPolicyClassifierParamsMask.SRC_PORT)) {
-            srcPort = classifierParams.srcPort;
-        }
-        if (qosClassifierParamHasValue(classifierParamMask,
-                QosPolicyClassifierParamsMask.DST_PORT_RANGE)) {
-            dstPortRange[0] = classifierParams.dstPortRange.startPort;
-            dstPortRange[1] = classifierParams.dstPortRange.endPort;
-        }
-        if (qosClassifierParamHasValue(classifierParamMask,
-                QosPolicyClassifierParamsMask.PROTOCOL_NEXT_HEADER)) {
-            protocol = classifierParams.protocolNextHdr;
-        }
-
-        return new SupplicantStaIfaceHal.QosPolicyRequest(halQosPolicy.policyId,
-                halToFrameworkQosPolicyRequestType(halQosPolicy.requestType), halQosPolicy.dscp,
-                new SupplicantStaIfaceHal.QosPolicyClassifierParams(
-                        hasSrcIp, srcIp, hasDstIp, dstIp, srcPort, dstPortRange, protocol));
-    }
-
-    /**
-     * Returns connection capabilities of the current network
-     *
-     * @param ifaceName Name of the interface.
-     * @return connection capabilities of the current network
-     */
-    public WifiNative.ConnectionCapabilities getConnectionCapabilities(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "getConnectionCapabilities";
-            WifiNative.ConnectionCapabilities capOut = new WifiNative.ConnectionCapabilities();
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return capOut;
-            }
-            try {
-                ConnectionCapabilities cap = iface.getConnectionCapabilities();
-                capOut.wifiStandard = getWifiStandard(cap.technology);
-                capOut.channelBandwidth = getChannelBandwidth(cap.channelBandwidth);
-                capOut.is11bMode = (cap.legacyMode == LegacyMode.B_MODE);
-                capOut.maxNumberTxSpatialStreams = cap.maxNumberTxSpatialStreams;
-                capOut.maxNumberRxSpatialStreams = cap.maxNumberRxSpatialStreams;
-                return capOut;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return capOut;
-        }
-    }
-
-    /**
-     * Returns connection MLO links info
-     *
-     * @param ifaceName Name of the interface.
-     * @return connection MLO links info
-     */
-    public WifiNative.ConnectionMloLinksInfo getConnectionMloLinksInfo(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "getConnectionMloLinksInfo";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return null;
-            }
-            try {
-                MloLinksInfo halInfo = iface.getConnectionMloLinksInfo();
-                if (halInfo == null) {
-                    return null;
-                }
-
-                WifiNative.ConnectionMloLinksInfo nativeInfo =
-                        new WifiNative.ConnectionMloLinksInfo();
-
-                nativeInfo.links = new WifiNative.ConnectionMloLink[halInfo.links.length];
-
-                for (int i = 0; i < halInfo.links.length; i++) {
-                    nativeInfo.links[i].linkId = halInfo.links[i].linkId;
-                    nativeInfo.links[i].staMacAddress = MacAddress.fromBytes(
-                            halInfo.links[i].staLinkMacAddress);
-                }
-                return nativeInfo;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Invalid STA Mac Address received from HAL");
-                return null;
-            }
-
-            return null;
-        }
-    }
-
-    /**
-     * Adds a DPP peer URI to the URI list.
-     *
-     * Returns an ID to be used later to refer to this URI (>0).
-     * On error, -1 is returned.
-     */
-    public int addDppPeerUri(@NonNull String ifaceName, @NonNull String uri) {
-        synchronized (mLock) {
-            final String methodStr = "addDppPeerUri";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return -1;
-            }
-            try {
-                return iface.addDppPeerUri(uri);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return -1;
-        }
-    }
-
-    /**
-     * Removes a DPP URI to the URI list given an ID.
-     *
-     * Returns true when operation is successful
-     * On error, false is returned.
-     */
-    public boolean removeDppUri(@NonNull String ifaceName, int bootstrapId)  {
-        synchronized (mLock) {
-            final String methodStr = "removeDppUri";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.removeDppUri(bootstrapId);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Stops/aborts DPP Initiator request
-     *
-     * Returns true when operation is successful
-     * On error, false is returned.
-     */
-    public boolean stopDppInitiator(@NonNull String ifaceName)  {
-        synchronized (mLock) {
-            final String methodStr = "stopDppInitiator";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.stopDppInitiator();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Starts DPP Configurator-Initiator request
-     *
-     * Returns true when operation is successful
-     * On error, false is returned.
-     */
-    public boolean startDppConfiguratorInitiator(@NonNull String ifaceName, int peerBootstrapId,
-            int ownBootstrapId, @NonNull String ssid, String password, String psk,
-            int netRole, int securityAkm, byte[] privEcKey)  {
-        synchronized (mLock) {
-            final String methodStr = "startDppConfiguratorInitiator";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                byte[] key = iface.startDppConfiguratorInitiator(peerBootstrapId, ownBootstrapId,
-                        ssid, password != null ? password : "", psk != null ? psk : "",
-                        frameworkToAidlDppNetRole(netRole), frameworkToAidlDppAkm(securityAkm),
-                        privEcKey != null ? privEcKey : new byte[] {});
-                if (key != null && key.length > 0 && mDppCallback != null) {
-                    mDppCallback.onDppConfiguratorKeyUpdate(key);
-                }
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Starts DPP Enrollee-Initiator request
-     *
-     * Returns true when operation is successful
-     * On error, false is returned.
-     */
-    public boolean startDppEnrolleeInitiator(@NonNull String ifaceName, int peerBootstrapId,
-            int ownBootstrapId)  {
-        synchronized (mLock) {
-            final String methodStr = "startDppEnrolleeInitiator";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.startDppEnrolleeInitiator(peerBootstrapId, ownBootstrapId);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Generate a DPP QR code based boot strap info
-     *
-     * Returns DppResponderBootstrapInfo;
-     */
-    public WifiNative.DppBootstrapQrCodeInfo generateDppBootstrapInfoForResponder(
-            @NonNull String ifaceName, String macAddress, @NonNull String deviceInfo,
-            int dppCurve) {
-        synchronized (mLock) {
-            final String methodStr = "generateDppBootstrapInfoForResponder";
-            WifiNative.DppBootstrapQrCodeInfo bootstrapInfoOut =
-                    new WifiNative.DppBootstrapQrCodeInfo();
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return bootstrapInfoOut;
-            }
-            try {
-                DppResponderBootstrapInfo info = iface.generateDppBootstrapInfoForResponder(
-                        NativeUtil.macAddressToByteArray(macAddress), deviceInfo,
-                        frameworkToAidlDppCurve(dppCurve));
-                bootstrapInfoOut.bootstrapId = info.bootstrapId;
-                bootstrapInfoOut.listenChannel = info.listenChannel;
-                bootstrapInfoOut.uri = info.uri;
-                return bootstrapInfoOut;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return bootstrapInfoOut;
-        }
-    }
-
-    /**
-     * Starts DPP Enrollee-Responder request
-     *
-     * Returns true when operation is successful
-     * On error, false is returned.
-     */
-    public boolean startDppEnrolleeResponder(@NonNull String ifaceName, int listenChannel) {
-        synchronized (mLock) {
-            final String methodStr = "startDppEnrolleeResponder";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.startDppEnrolleeResponder(listenChannel);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Stops/aborts DPP Responder request.
-     *
-     * Returns true when operation is successful
-     * On error, false is returned.
-     */
-    public boolean stopDppResponder(@NonNull String ifaceName, int ownBootstrapId)  {
-        synchronized (mLock) {
-            final String methodStr = "stopDppResponder";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.stopDppResponder(ownBootstrapId);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Register callbacks for DPP events.
-     *
-     * @param dppCallback DPP callback object.
-     */
-    public void registerDppCallback(WifiNative.DppEventCallback dppCallback) {
-        synchronized (mLock) {
-            mDppCallback = dppCallback;
-        }
-    }
-
-    protected WifiNative.DppEventCallback getDppCallback() {
-        synchronized (mLock) {
-            return mDppCallback;
-        }
-    }
-
-    /**
-     * Set MBO cellular data availability.
-     *
-     * @param ifaceName Name of the interface.
-     * @param available true means cellular data available, false otherwise.
-     * @return true is operation is successful, false otherwise.
-     */
-    public boolean setMboCellularDataStatus(@NonNull String ifaceName, boolean available) {
-        synchronized (mLock) {
-            final String methodStr = "setMboCellularDataStatus";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setMboCellularDataStatus(available);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set whether the network-centric QoS policy feature is enabled or not for this interface.
-     *
-     * @param ifaceName name of the interface.
-     * @param isEnabled true if feature is enabled, false otherwise.
-     * @return true if operation is successful, false otherwise.
-     */
-    public boolean setNetworkCentricQosPolicyFeatureEnabled(@NonNull String ifaceName,
-            boolean isEnabled) {
-        synchronized (mLock) {
-            String methodStr = "setNetworkCentricQosPolicyFeatureEnabled";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.setQosPolicyFeatureEnabled(isEnabled);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Check if we've roamed to a linked network and make the linked network the current network
-     * if we have.
-     *
-     * @param ifaceName Name of the interface.
-     * @param newNetworkId Network id of the new network we've roamed to. If fromFramework is
-     *                     {@code true}, this will be a framework network id. Otherwise, this will
-     *                     be a remote network id.
-     * @param fromFramework {@code true} if the network id is a framework network id, {@code false}
-                            if the network id is a remote network id.
-     * @return true if we've roamed to a linked network, false if not.
-     */
-    public boolean updateOnLinkedNetworkRoaming(
-            @NonNull String ifaceName, int newNetworkId, boolean fromFramework) {
-        synchronized (mLock) {
-            List<Pair<SupplicantStaNetworkHalAidlImpl, WifiConfiguration>> linkedNetworkHandles =
-                    mLinkedNetworkLocalAndRemoteConfigs.get(ifaceName);
-            SupplicantStaNetworkHalAidlImpl currentHandle =
-                    getCurrentNetworkRemoteHandle(ifaceName);
-            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
-            if (linkedNetworkHandles == null || currentHandle == null || currentConfig == null) {
-                return false;
-            }
-            if (fromFramework ? currentConfig.networkId == newNetworkId
-                    : currentHandle.getNetworkId() == newNetworkId) {
-                return false;
-            }
-            for (Pair<SupplicantStaNetworkHalAidlImpl, WifiConfiguration> pair
-                    : linkedNetworkHandles) {
-                if (fromFramework ? pair.second.networkId == newNetworkId
-                        : pair.first.getNetworkId() == newNetworkId) {
-                    Log.i(TAG, "Roamed to linked network, make linked network as current network");
-                    mCurrentNetworkRemoteHandles.put(ifaceName, pair.first);
-                    mCurrentNetworkLocalConfigs.put(ifaceName, pair.second);
-                    return true;
-                }
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Updates the linked networks for the current network and sends them to the supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @param networkId Network id of the network to link the configurations to.
-     * @param linkedConfigurations Map of config profile key to config for linking.
-     * @return true if networks were successfully linked, false otherwise.
-     */
-    public boolean updateLinkedNetworks(@NonNull String ifaceName, int networkId,
-            Map<String, WifiConfiguration> linkedConfigurations) {
-        synchronized (mLock) {
-            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
-            SupplicantStaNetworkHalAidlImpl currentHandle =
-                    getCurrentNetworkRemoteHandle(ifaceName);
-
-            if (currentConfig == null || currentHandle == null) {
-                Log.e(TAG, "current network not configured yet.");
-                return false;
-            }
-
-            if (networkId != currentConfig.networkId) {
-                Log.e(TAG, "current config network id is not matching");
-                return false;
-            }
-
-            final int remoteNetworkId = currentHandle.getNetworkId();
-            if (remoteNetworkId == -1) {
-                Log.e(TAG, "current handle getNetworkId failed");
-                return false;
-            }
-
-            if (!removeAllNetworksExcept(ifaceName, remoteNetworkId)) {
-                Log.e(TAG, "couldn't remove non-current supplicant networks");
-                return false;
-            }
-
-            mLinkedNetworkLocalAndRemoteConfigs.remove(ifaceName);
-
-            if (linkedConfigurations == null || linkedConfigurations.size() == 0) {
-                Log.i(TAG, "cleared linked networks");
-                return true;
-            }
-
-            List<Pair<SupplicantStaNetworkHalAidlImpl, WifiConfiguration>> linkedNetworkHandles =
-                    new ArrayList<>();
-            linkedNetworkHandles.add(new Pair(currentHandle, currentConfig));
-            for (String linkedNetwork : linkedConfigurations.keySet()) {
-                Log.i(TAG, "add linked network: " + linkedNetwork);
-                Pair<SupplicantStaNetworkHalAidlImpl, WifiConfiguration> pair =
-                        addNetworkAndSaveConfig(ifaceName, linkedConfigurations.get(linkedNetwork));
-                if (pair == null) {
-                    Log.e(TAG, "failed to add/save linked network: " + linkedNetwork);
-                    return false;
-                }
-                pair.first.enable(true);
-                linkedNetworkHandles.add(pair);
-            }
-
-            mLinkedNetworkLocalAndRemoteConfigs.put(ifaceName, linkedNetworkHandles);
-
-            return true;
-        }
-    }
-
-    /**
-     * Remove all networks except the supplied network ID from supplicant
-     *
-     * @param ifaceName Name of the interface
-     * @param networkId network id to keep
-     */
-    private boolean removeAllNetworksExcept(@NonNull String ifaceName, int networkId) {
-        synchronized (mLock) {
-            int[] networks = listNetworks(ifaceName);
-            if (networks == null) {
-                Log.e(TAG, "removeAllNetworksExcept failed, got null networks");
-                return false;
-            }
-            for (int id : networks) {
-                if (networkId == id) {
-                    continue;
-                }
-                if (!removeNetwork(ifaceName, id)) {
-                    Log.e(TAG, "removeAllNetworksExcept failed to remove network: " + id);
-                    return false;
-                }
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Gets the security params of the current network associated with this interface
-     *
-     * @param ifaceName Name of the interface
-     * @return Security params of the current network associated with the interface
-     */
-    public SecurityParams getCurrentNetworkSecurityParams(@NonNull String ifaceName) {
-        WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
-
-        if (currentConfig == null) {
-            return null;
-        }
-
-        return currentConfig.getNetworkSelectionStatus().getCandidateSecurityParams();
-    }
-
-    /**
-     * Sends a QoS policy response.
-     *
-     * @param ifaceName Name of the interface.
-     * @param qosPolicyRequestId Dialog token to identify the request.
-     * @param morePolicies Flag to indicate more QoS policies can be accommodated.
-     * @param qosPolicyStatusList List of framework QosPolicyStatus objects.
-     * @return true if response is sent successfully, false otherwise.
-     */
-    public boolean sendQosPolicyResponse(String ifaceName, int qosPolicyRequestId,
-            boolean morePolicies,
-            @NonNull List<SupplicantStaIfaceHal.QosPolicyStatus> qosPolicyStatusList) {
-        synchronized (mLock) {
-            final String methodStr = "sendQosPolicyResponse";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-
-            int index = 0;
-            QosPolicyStatus[] halPolicyStatusList = new QosPolicyStatus[qosPolicyStatusList.size()];
-            for (SupplicantStaIfaceHal.QosPolicyStatus frameworkPolicyStatus
-                    : qosPolicyStatusList) {
-                if (frameworkPolicyStatus == null) {
-                    return false;
-                }
-                QosPolicyStatus halPolicyStatus = new QosPolicyStatus();
-                halPolicyStatus.policyId = (byte) frameworkPolicyStatus.policyId;
-                halPolicyStatus.status = dscpPolicyToAidlQosPolicyStatusCode(
-                        frameworkPolicyStatus.dscpPolicyStatus);
-                halPolicyStatusList[index] = halPolicyStatus;
-                index++;
-            }
-
-            try {
-                iface.sendQosPolicyResponse(qosPolicyRequestId, morePolicies, halPolicyStatusList);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Indicates the removal of all active QoS policies configured by the AP.
-     *
-     * @param ifaceName Name of the interface.
-     */
-    public boolean removeAllQosPolicies(String ifaceName) {
-        final String methodStr = "removeAllQosPolicies";
-        ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return false;
-        }
-
-        try {
-            iface.removeAllQosPolicies();
-            return true;
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        } catch (ServiceSpecificException e) {
-            handleServiceSpecificException(e, methodStr);
-        }
-        return false;
-    }
-
-    /**
-     * Generate DPP credential for network access
-     *
-     * @param ifaceName Name of the interface.
-     * @param ssid ssid of the network
-     * @param privEcKey Private EC Key for DPP Configurator
-     * Returns true when operation is successful. On error, false is returned.
-     */
-    public boolean generateSelfDppConfiguration(@NonNull String ifaceName, @NonNull String ssid,
-            byte[] privEcKey) {
-        synchronized (mLock) {
-            final String methodStr = "generateSelfDppConfiguration";
-            ISupplicantStaIface iface = checkStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-            try {
-                iface.generateSelfDppConfiguration(
-                        NativeUtil.removeEnclosingQuotes(ssid), privEcKey);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set the currently configured network's anonymous identity.
-     *
-     * @param ifaceName Name of the interface.
-     * @param anonymousIdentity the anonymouns identity.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean setEapAnonymousIdentity(@NonNull String ifaceName, String anonymousIdentity) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalAidlImpl networkHandle =
-                    checkStaNetworkAndLogFailure(ifaceName, "setEapAnonymousIdentity");
-            if (networkHandle == null) return false;
-            if (anonymousIdentity == null) return false;
-            return networkHandle.setEapAnonymousIdentity(anonymousIdentity.getBytes());
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceHalHidlImpl.java b/service/java/com/android/server/wifi/SupplicantStaIfaceHalHidlImpl.java
deleted file mode 100644
index a1aeb9e..0000000
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceHalHidlImpl.java
+++ /dev/null
@@ -1,3977 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DECORATED_IDENTITY;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP_ENROLLEE_RESPONDER;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA256;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA384;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_MBO;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_OCE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_PASSPOINT_TERMS_AND_CONDITIONS;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_SAE_PK;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WAPI;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WFD_R2;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SAE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SUITE_B;
-
-import android.annotation.NonNull;
-import android.content.Context;
-import android.hardware.wifi.V1_0.WifiChannelWidthInMhz;
-import android.hardware.wifi.supplicant.V1_0.ISupplicant;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantIface;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantNetwork;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIface;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantStaNetwork;
-import android.hardware.wifi.supplicant.V1_0.IfaceType;
-import android.hardware.wifi.supplicant.V1_0.SupplicantStatus;
-import android.hardware.wifi.supplicant.V1_0.SupplicantStatusCode;
-import android.hardware.wifi.supplicant.V1_0.WpsConfigMethods;
-import android.hardware.wifi.supplicant.V1_2.DppAkm;
-import android.hardware.wifi.supplicant.V1_2.DppNetRole;
-import android.hardware.wifi.supplicant.V1_3.ConnectionCapabilities;
-import android.hardware.wifi.supplicant.V1_3.WifiTechnology;
-import android.hardware.wifi.supplicant.V1_3.WpaDriverCapabilitiesMask;
-import android.hardware.wifi.supplicant.V1_4.DppCurve;
-import android.hardware.wifi.supplicant.V1_4.LegacyMode;
-import android.hidl.manager.V1_0.IServiceManager;
-import android.hidl.manager.V1_0.IServiceNotification;
-import android.net.MacAddress;
-import android.net.wifi.ScanResult;
-import android.net.wifi.SecurityParams;
-import android.net.wifi.WifiAnnotations.WifiStandard;
-import android.net.wifi.WifiConfiguration;
-import android.os.Handler;
-import android.os.IHwBinder.DeathRecipient;
-import android.os.RemoteException;
-import android.text.TextUtils;
-import android.util.Log;
-import android.util.Pair;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wifi.WifiNative.DppEventCallback;
-import com.android.server.wifi.WifiNative.SupplicantDeathEventHandler;
-import com.android.server.wifi.util.GeneralUtil.Mutable;
-import com.android.server.wifi.util.NativeUtil;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Objects;
-import java.util.Random;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.annotation.concurrent.ThreadSafe;
-
-/**
- * Hal calls for bring up/shut down of the supplicant daemon and for
- * sending requests to the supplicant daemon
- * To maintain thread-safety, the locking protocol is that every non-static method (regardless of
- * access level) acquires mLock.
- */
-@ThreadSafe
-public class SupplicantStaIfaceHalHidlImpl implements ISupplicantStaIfaceHal {
-    private static final String TAG = "SupplicantStaIfaceHalHidlImp";
-    @VisibleForTesting
-    public static final String HAL_INSTANCE_NAME = "default";
-    @VisibleForTesting
-    public static final long WAIT_FOR_DEATH_TIMEOUT_MS = 50L;
-    /**
-     * Regex pattern for extracting the wps device type bytes.
-     * Matches a strings like the following: "<categ>-<OUI>-<subcateg>";
-     */
-    private static final Pattern WPS_DEVICE_TYPE_PATTERN =
-            Pattern.compile("^(\\d{1,2})-([0-9a-fA-F]{8})-(\\d{1,2})$");
-
-    private final Object mLock = new Object();
-    private boolean mVerboseLoggingEnabled = false;
-    private boolean mVerboseHalLoggingEnabled = false;
-
-    // Supplicant HAL interface objects
-    private IServiceManager mIServiceManager = null;
-    private ISupplicant mISupplicant;
-    private Map<String, ISupplicantStaIface> mISupplicantStaIfaces = new HashMap<>();
-    private Map<String, ISupplicantStaIfaceCallback> mISupplicantStaIfaceCallbacks =
-            new HashMap<>();
-    private Map<String, SupplicantStaNetworkHalHidlImpl> mCurrentNetworkRemoteHandles =
-            new HashMap<>();
-    private Map<String, WifiConfiguration> mCurrentNetworkLocalConfigs = new HashMap<>();
-    private Map<String, List<Pair<SupplicantStaNetworkHalHidlImpl, WifiConfiguration>>>
-            mLinkedNetworkLocalAndRemoteConfigs = new HashMap<>();
-    @VisibleForTesting
-    PmkCacheManager mPmkCacheManager;
-    private SupplicantDeathEventHandler mDeathEventHandler;
-    private ServiceManagerDeathRecipient mServiceManagerDeathRecipient;
-    private SupplicantDeathRecipient mSupplicantDeathRecipient;
-    // Death recipient cookie registered for current supplicant instance.
-    private long mDeathRecipientCookie = 0;
-    private final Context mContext;
-    private final WifiMonitor mWifiMonitor;
-    private final FrameworkFacade mFrameworkFacade;
-    private final Handler mEventHandler;
-    private DppEventCallback mDppCallback = null;
-    private final Clock mClock;
-    private final WifiMetrics mWifiMetrics;
-    private final WifiGlobals mWifiGlobals;
-
-    private final IServiceNotification mServiceNotificationCallback =
-            new IServiceNotification.Stub() {
-                public void onRegistration(String fqName, String name, boolean preexisting) {
-                    synchronized (mLock) {
-                        if (mVerboseLoggingEnabled) {
-                            Log.i(TAG, "IServiceNotification.onRegistration for: " + fqName
-                                    + ", " + name + " preexisting=" + preexisting);
-                        }
-                        if (!initSupplicantService()) {
-                            Log.e(TAG, "Initializing ISupplicant failed.");
-                            supplicantServiceDiedHandler(mDeathRecipientCookie);
-                        } else {
-                            Log.i(TAG, "Completed initialization of ISupplicant.");
-                        }
-                    }
-                }
-            };
-    private class ServiceManagerDeathRecipient implements DeathRecipient {
-        @Override
-        public void serviceDied(long cookie) {
-            mEventHandler.post(() -> {
-                synchronized (mLock) {
-                    Log.w(TAG, "IServiceManager died: cookie=" + cookie);
-                    supplicantServiceDiedHandler(mDeathRecipientCookie);
-                    mIServiceManager = null; // Will need to register a new ServiceNotification
-                }
-            });
-        }
-    }
-    private class SupplicantDeathRecipient implements DeathRecipient {
-        @Override
-        public void serviceDied(long cookie) {
-            mEventHandler.post(() -> {
-                synchronized (mLock) {
-                    Log.w(TAG, "ISupplicant died: cookie=" + cookie);
-                    supplicantServiceDiedHandler(cookie);
-                }
-            });
-        }
-    }
-
-    public SupplicantStaIfaceHalHidlImpl(Context context, WifiMonitor monitor,
-            FrameworkFacade frameworkFacade, Handler handler,
-            Clock clock, WifiMetrics wifiMetrics,
-            WifiGlobals wifiGlobals) {
-        mContext = context;
-        mWifiMonitor = monitor;
-        mFrameworkFacade = frameworkFacade;
-        mEventHandler = handler;
-        mClock = clock;
-        mWifiMetrics = wifiMetrics;
-        mWifiGlobals = wifiGlobals;
-
-        mServiceManagerDeathRecipient = new ServiceManagerDeathRecipient();
-        mSupplicantDeathRecipient = new SupplicantDeathRecipient();
-        mPmkCacheManager = new PmkCacheManager(mClock, mEventHandler);
-    }
-
-    /**
-     * Enable/Disable verbose logging.
-     * @param verboseEnabled Verbose flag set in overlay XML.
-     * @param halVerboseEnabled Verbose flag set by the user.
-     */
-    public void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        synchronized (mLock) {
-            mVerboseLoggingEnabled = verboseEnabled;
-            mVerboseHalLoggingEnabled = halVerboseEnabled;
-            setLogLevel(mVerboseHalLoggingEnabled);
-        }
-    }
-
-    protected boolean isVerboseLoggingEnabled() {
-        return mVerboseLoggingEnabled;
-    }
-
-    private boolean linkToServiceManagerDeath() {
-        synchronized (mLock) {
-            if (mIServiceManager == null) return false;
-            try {
-                if (!mIServiceManager.linkToDeath(mServiceManagerDeathRecipient, 0)) {
-                    Log.wtf(TAG, "Error on linkToDeath on IServiceManager");
-                    supplicantServiceDiedHandler(mDeathRecipientCookie);
-                    mIServiceManager = null; // Will need to register a new ServiceNotification
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "IServiceManager.linkToDeath exception", e);
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Registers a service notification for the ISupplicant service, which triggers initialization
-     * of the ISupplicantStaIface
-     * @return true if the service notification was successfully registered
-     */
-    public boolean initialize() {
-        synchronized (mLock) {
-            if (mVerboseLoggingEnabled) {
-                Log.i(TAG, "Registering ISupplicant service ready callback.");
-            }
-            mISupplicant = null;
-            mISupplicantStaIfaces.clear();
-            if (mIServiceManager != null) {
-                // Already have an IServiceManager and serviceNotification registered, don't
-                // don't register another.
-                return true;
-            }
-            try {
-                mIServiceManager = getServiceManagerMockable();
-                if (mIServiceManager == null) {
-                    Log.e(TAG, "Failed to get HIDL Service Manager");
-                    return false;
-                }
-                if (!linkToServiceManagerDeath()) {
-                    return false;
-                }
-                /* TODO(b/33639391) : Use the new ISupplicant.registerForNotifications() once it
-                   exists */
-                if (!mIServiceManager.registerForNotifications(
-                        ISupplicant.kInterfaceName, "", mServiceNotificationCallback)) {
-                    Log.e(TAG, "Failed to register for notifications to "
-                            + ISupplicant.kInterfaceName);
-                    mIServiceManager = null; // Will need to register a new ServiceNotification
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "Exception while trying to register a listener for "
-                        + "ISupplicant service: " + e);
-                supplicantServiceDiedHandler(mDeathRecipientCookie);
-            }
-            return true;
-        }
-    }
-
-    private boolean linkToSupplicantDeath(
-            DeathRecipient deathRecipient, long cookie) {
-        synchronized (mLock) {
-            if (mISupplicant == null) return false;
-            try {
-                if (!mISupplicant.linkToDeath(deathRecipient, cookie)) {
-                    Log.wtf(TAG, "Error on linkToDeath on ISupplicant");
-                    supplicantServiceDiedHandler(mDeathRecipientCookie);
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicant.linkToDeath exception", e);
-                return false;
-            }
-            return true;
-        }
-    }
-
-    private boolean initSupplicantService() {
-        synchronized (mLock) {
-            try {
-                mISupplicant = getSupplicantMockable();
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicant.getService exception: " + e);
-                return false;
-            } catch (NoSuchElementException e) {
-                Log.e(TAG, "ISupplicant.getService exception: " + e);
-                return false;
-            }
-            if (mISupplicant == null) {
-                Log.e(TAG, "Got null ISupplicant service. Stopping supplicant HIDL startup");
-                return false;
-            }
-            if (!linkToSupplicantDeath(mSupplicantDeathRecipient, ++mDeathRecipientCookie)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    protected int getCurrentNetworkId(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
-            if (currentConfig == null) {
-                return WifiConfiguration.INVALID_NETWORK_ID;
-            }
-            return currentConfig.networkId;
-        }
-    }
-
-    private boolean trySetupStaIfaceV1_4(@NonNull String ifaceName,
-            @NonNull ISupplicantStaIface iface)  throws RemoteException {
-        if (!isV1_4()) return false;
-
-        SupplicantStaIfaceHalCallbackV1_4 callbackV14 =
-                new SupplicantStaIfaceHalCallbackV1_4(ifaceName);
-        if (!registerCallbackV1_4(getStaIfaceMockableV1_4(iface), callbackV14)) {
-            throw new RemoteException("Init StaIface V1_4 failed.");
-        }
-        /* keep this in a store to avoid recycling by garbage collector. */
-        mISupplicantStaIfaceCallbacks.put(ifaceName, callbackV14);
-        return true;
-    }
-
-    private boolean trySetupStaIfaceV1_3(@NonNull String ifaceName,
-            @NonNull ISupplicantStaIface iface)  throws RemoteException {
-        if (!isV1_3()) return false;
-
-        /* try newer version first. */
-        if (trySetupStaIfaceV1_4(ifaceName, iface)) {
-            logd("Newer HAL is found, skip V1_3 remaining init flow.");
-            return true;
-        }
-        SupplicantStaIfaceHalCallbackV1_3 callbackV13 =
-                new SupplicantStaIfaceHalCallbackV1_3(ifaceName);
-        if (!registerCallbackV1_3(getStaIfaceMockableV1_3(iface), callbackV13)) {
-            throw new RemoteException("Init StaIface V1_3 failed.");
-        }
-        /* keep this in a store to avoid recycling by garbage collector. */
-        mISupplicantStaIfaceCallbacks.put(ifaceName, callbackV13);
-        return true;
-    }
-
-    private boolean trySetupStaIfaceV1_2(@NonNull String ifaceName,
-            @NonNull ISupplicantStaIface iface) throws RemoteException {
-        if (!isV1_2()) return false;
-
-        /* try newer version first. */
-        if (trySetupStaIfaceV1_3(ifaceName, iface)) {
-            logd("Newer HAL is found, skip V1_2 remaining init flow.");
-            return true;
-        }
-
-        SupplicantStaIfaceHalCallbackV1_2 callbackV12 =
-                new SupplicantStaIfaceHalCallbackV1_2(ifaceName);
-        if (!registerCallbackV1_2(getStaIfaceMockableV1_2(iface), callbackV12)) {
-            throw new RemoteException("Init StaIface V1_2 failed.");
-        }
-        /* keep this in a store to avoid recycling by garbage collector. */
-        mISupplicantStaIfaceCallbacks.put(ifaceName, callbackV12);
-        return true;
-    }
-
-    private boolean trySetupStaIfaceV1_1(@NonNull String ifaceName,
-            @NonNull ISupplicantStaIface iface) throws RemoteException {
-        if (!isV1_1()) return false;
-
-        /* try newer version first. */
-        if (trySetupStaIfaceV1_2(ifaceName, iface)) {
-            logd("Newer HAL is found, skip V1_1 remaining init flow.");
-            return true;
-        }
-
-        SupplicantStaIfaceHalCallbackV1_1 callbackV11 =
-                new SupplicantStaIfaceHalCallbackV1_1(ifaceName);
-        if (!registerCallbackV1_1(getStaIfaceMockableV1_1(iface), callbackV11)) {
-            throw new RemoteException("Init StaIface V1_1 failed.");
-        }
-        /* keep this in a store to avoid recycling by garbage collector. */
-        mISupplicantStaIfaceCallbacks.put(ifaceName, callbackV11);
-        return true;
-    }
-
-    /**
-     * Helper function to set up StaIface with different HAL version.
-     *
-     * This helper function would try newer version recursively.
-     * Once the latest version is found, it would register the callback
-     * of the latest version and skip unnecessary older HAL init flow.
-     *
-     * New version callback will be extended from the older one, as a result,
-     * older callback is always created regardless of the latest version.
-     *
-     * Uprev steps:
-     * 1. add new helper function trySetupStaIfaceV1_Y.
-     * 2. call newly added function in trySetupStaIfaceV1_X (X should be Y-1).
-     */
-    private ISupplicantStaIface setupStaIface(@NonNull String ifaceName,
-            @NonNull ISupplicantIface ifaceHwBinder) throws RemoteException {
-        /* Prepare base type for later cast. */
-        ISupplicantStaIface iface = getStaIfaceMockable(ifaceHwBinder);
-
-        /* try newer version first. */
-        if (trySetupStaIfaceV1_1(ifaceName, iface)) {
-            logd("Newer HAL is found, skip V1_0 remaining init flow.");
-            return iface;
-        }
-
-        SupplicantStaIfaceHalCallback callback = new SupplicantStaIfaceHalCallback(ifaceName);
-        if (!registerCallback(iface, callback)) {
-            throw new RemoteException("Init StaIface V1_0 failed.");
-        }
-        /* keep this in a store to avoid recycling by garbage collector. */
-        mISupplicantStaIfaceCallbacks.put(ifaceName, callback);
-        return iface;
-    }
-
-    /**
-     * Setup a STA interface for the specified iface name.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    public boolean setupIface(@NonNull String ifaceName) {
-        final String methodStr = "setupIface";
-        if (checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr) != null) return false;
-        ISupplicantIface ifaceHwBinder;
-
-        if (isV1_1()) {
-            ifaceHwBinder = addIfaceV1_1(ifaceName);
-        } else {
-            ifaceHwBinder = getIfaceV1_0(ifaceName);
-        }
-        if (ifaceHwBinder == null) {
-            Log.e(TAG, "setupIface got null iface");
-            return false;
-        }
-
-        try {
-            ISupplicantStaIface iface = setupStaIface(ifaceName, ifaceHwBinder);
-            mISupplicantStaIfaces.put(ifaceName, iface);
-        } catch (RemoteException e) {
-            loge("setup StaIface failed: " + e.toString());
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Get a STA interface for the specified iface name.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    private ISupplicantIface getIfaceV1_0(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            if (mISupplicant == null) {
-                return null;
-            }
-
-            /** List all supplicant Ifaces */
-            final ArrayList<ISupplicant.IfaceInfo> supplicantIfaces = new ArrayList<>();
-            try {
-                mISupplicant.listInterfaces((SupplicantStatus status,
-                        ArrayList<ISupplicant.IfaceInfo> ifaces) -> {
-                    if (status.code != SupplicantStatusCode.SUCCESS) {
-                        Log.e(TAG, "Getting Supplicant Interfaces failed: " + status.code);
-                        return;
-                    }
-                    supplicantIfaces.addAll(ifaces);
-                });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicant.listInterfaces exception: " + e);
-                handleRemoteException(e, "listInterfaces");
-                return null;
-            }
-            if (supplicantIfaces.size() == 0) {
-                Log.e(TAG, "Got zero HIDL supplicant ifaces. Stopping supplicant HIDL startup.");
-                return null;
-            }
-            Mutable<ISupplicantIface> supplicantIface = new Mutable<>();
-            for (ISupplicant.IfaceInfo ifaceInfo : supplicantIfaces) {
-                if (ifaceInfo.type == IfaceType.STA
-                        && TextUtils.equals(ifaceName, ifaceInfo.name)) {
-                    try {
-                        mISupplicant.getInterface(ifaceInfo,
-                                (SupplicantStatus status, ISupplicantIface iface) -> {
-                                    if (status.code != SupplicantStatusCode.SUCCESS) {
-                                        Log.e(TAG, "Fail to get ISupplicantIface " + status.code);
-                                        return;
-                                    }
-                                    supplicantIface.value = iface;
-                                });
-                    } catch (RemoteException e) {
-                        Log.e(TAG, "ISupplicant.getInterface exception: " + e);
-                        handleRemoteException(e, "getInterface");
-                        return null;
-                    }
-                    break;
-                }
-            }
-            return supplicantIface.value;
-        }
-    }
-
-    /**
-     * Create a STA interface for the specified iface name.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    private ISupplicantIface addIfaceV1_1(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            ISupplicant.IfaceInfo ifaceInfo = new ISupplicant.IfaceInfo();
-            ifaceInfo.name = ifaceName;
-            ifaceInfo.type = IfaceType.STA;
-            Mutable<ISupplicantIface> supplicantIface = new Mutable<>();
-            try {
-                getSupplicantMockableV1_1().addInterface(ifaceInfo,
-                        (SupplicantStatus status, ISupplicantIface iface) -> {
-                            if (status.code != SupplicantStatusCode.SUCCESS
-                                    && status.code != SupplicantStatusCode.FAILURE_IFACE_EXISTS) {
-                                Log.e(TAG, "Failed to create ISupplicantIface " + status.code);
-                                return;
-                            }
-                            supplicantIface.value = iface;
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicant.addInterface exception: " + e);
-                handleRemoteException(e, "addInterface");
-                return null;
-            } catch (NoSuchElementException e) {
-                Log.e(TAG, "ISupplicant.addInterface exception: " + e);
-                handleNoSuchElementException(e, "addInterface");
-                return null;
-            } catch (IllegalArgumentException e) {
-                handleIllegalArgumentException(e, "addInterface");
-                Log.e(TAG, "ISupplicant.addInterface exception: " + e);
-                return null;
-            }
-            return supplicantIface.value;
-        }
-    }
-
-    /**
-     * Teardown a STA interface for the specified iface name.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    public boolean teardownIface(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "teardownIface";
-            if (checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr) == null) return false;
-            if (isV1_1()) {
-                if (!removeIfaceV1_1(ifaceName)) {
-                    Log.e(TAG, "Failed to remove iface = " + ifaceName);
-                    return false;
-                }
-            }
-            if (mISupplicantStaIfaces.remove(ifaceName) == null) {
-                Log.e(TAG, "Trying to teardown unknown interface");
-                return false;
-            }
-            mISupplicantStaIfaceCallbacks.remove(ifaceName);
-            return true;
-        }
-    }
-
-    /**
-     * Remove a STA interface for the specified iface name.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    private boolean removeIfaceV1_1(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            try {
-                ISupplicant.IfaceInfo ifaceInfo = new ISupplicant.IfaceInfo();
-                ifaceInfo.name = ifaceName;
-                ifaceInfo.type = IfaceType.STA;
-                SupplicantStatus status = getSupplicantMockableV1_1().removeInterface(ifaceInfo);
-                if (status.code != SupplicantStatusCode.SUCCESS) {
-                    Log.e(TAG, "Failed to remove iface " + status.code);
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicant.removeInterface exception: " + e);
-                handleRemoteException(e, "removeInterface");
-                return false;
-            } catch (NoSuchElementException e) {
-                Log.e(TAG, "ISupplicant.removeInterface exception: " + e);
-                handleNoSuchElementException(e, "removeInterface");
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Registers a death notification for supplicant.
-     * @return Returns true on success.
-     */
-    public boolean registerDeathHandler(@NonNull SupplicantDeathEventHandler handler) {
-        if (mDeathEventHandler != null) {
-            Log.e(TAG, "Death handler already present");
-        }
-        mDeathEventHandler = handler;
-        return true;
-    }
-
-    /**
-     * Deregisters a death notification for supplicant.
-     * @return Returns true on success.
-     */
-    public boolean deregisterDeathHandler() {
-        if (mDeathEventHandler == null) {
-            Log.e(TAG, "No Death handler present");
-        }
-        mDeathEventHandler = null;
-        return true;
-    }
-
-
-    private void clearState() {
-        synchronized (mLock) {
-            mISupplicant = null;
-            mISupplicantStaIfaces.clear();
-            mCurrentNetworkLocalConfigs.clear();
-            mCurrentNetworkRemoteHandles.clear();
-            mLinkedNetworkLocalAndRemoteConfigs.clear();
-        }
-    }
-
-    private void supplicantServiceDiedHandler(long cookie) {
-        synchronized (mLock) {
-            if (mDeathRecipientCookie != cookie) {
-                Log.i(TAG, "Ignoring stale death recipient notification");
-                return;
-            }
-            clearState();
-            if (mDeathEventHandler != null) {
-                mDeathEventHandler.onDeath();
-            }
-        }
-    }
-
-    /**
-     * Signals whether Initialization completed successfully.
-     */
-    public boolean isInitializationStarted() {
-        synchronized (mLock) {
-            return mIServiceManager != null;
-        }
-    }
-
-    /**
-     * Signals whether Initialization completed successfully.
-     */
-    public boolean isInitializationComplete() {
-        synchronized (mLock) {
-            return mISupplicant != null;
-        }
-    }
-
-
-    /**
-     * Start the supplicant daemon for V1_1 service.
-     *
-     * @return true on success, false otherwise.
-     */
-    private boolean startDaemon_V1_1() {
-        synchronized (mLock) {
-            try {
-                // This should startup supplicant daemon using the lazy start HAL mechanism.
-                getSupplicantMockableV1_1();
-            } catch (RemoteException e) {
-                Log.e(TAG, "Exception while trying to start supplicant: "
-                        + e);
-                supplicantServiceDiedHandler(mDeathRecipientCookie);
-                return false;
-            } catch (NoSuchElementException e) {
-                // We're starting the daemon, so expect |NoSuchElementException|.
-                Log.d(TAG, "Successfully triggered start of supplicant using HIDL");
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Start the supplicant daemon.
-     *
-     * @return true on success, false otherwise.
-     */
-    public boolean startDaemon() {
-        synchronized (mLock) {
-            if (isV1_1()) {
-                Log.i(TAG, "Starting supplicant using HIDL");
-                return startDaemon_V1_1();
-            } else {
-                Log.i(TAG, "Starting supplicant using init");
-                return mFrameworkFacade.startSupplicant();
-            }
-        }
-    }
-
-    /**
-     * Terminate the supplicant daemon for V1_1 service.
-     */
-    private void terminate_V1_1() {
-        synchronized (mLock) {
-            final String methodStr = "terminate";
-            if (!checkSupplicantAndLogFailure(methodStr)) return;
-            try {
-                getSupplicantMockableV1_1().terminate();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (NoSuchElementException e) {
-                handleNoSuchElementException(e, methodStr);
-            }
-        }
-    }
-
-    /**
-     * Terminate the supplicant daemon & wait for it's death.
-     */
-    public void terminate() {
-        synchronized (mLock) {
-            // Register for a new death listener to block until supplicant is dead.
-            final long waitForDeathCookie = new Random().nextLong();
-            final CountDownLatch waitForDeathLatch = new CountDownLatch(1);
-            linkToSupplicantDeath((cookie) -> {
-                mEventHandler.post(() -> {
-                    Log.d(TAG, "ISupplicant died: cookie=" + cookie);
-                    if (cookie != waitForDeathCookie) return;
-                    supplicantServiceDiedHandler(mDeathRecipientCookie);
-                    waitForDeathLatch.countDown();
-                });
-            }, waitForDeathCookie);
-
-            if (isV1_1()) {
-                Log.i(TAG, "Terminating supplicant using HIDL");
-                terminate_V1_1();
-            } else {
-                Log.i(TAG, "Terminating supplicant using init");
-                mFrameworkFacade.stopSupplicant();
-            }
-
-            // Now wait for death listener callback to confirm that it's dead.
-            try {
-                if (!waitForDeathLatch.await(WAIT_FOR_DEATH_TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
-                    Log.w(TAG, "Timed out waiting for confirmation of supplicant death");
-                }
-            } catch (InterruptedException e) {
-                Log.w(TAG, "Failed to wait for supplicant death");
-            }
-        }
-    }
-
-    /**
-     * Indicates whether the HIDL service is declared. Uses the IServiceManager to check
-     * if the device is running a version >= V1_0 of the HAL from the VINTF for the device.
-     */
-    public static boolean serviceDeclared() {
-        try {
-            IServiceManager serviceManager = IServiceManager.getService();
-            String interfaceName = android.hardware.wifi.supplicant.V1_0.ISupplicant.kInterfaceName;
-            if (serviceManager.getTransport(interfaceName, HAL_INSTANCE_NAME)
-                    != IServiceManager.Transport.EMPTY) {
-                return true;
-            }
-            return false;
-        } catch (RemoteException e) {
-            Log.e(TAG, "Unable to check for existence of HIDL service.");
-            return false;
-        }
-    }
-
-    /**
-     * Wrapper functions to access static HAL methods, created to be mockable in unit tests
-     */
-    protected IServiceManager getServiceManagerMockable() throws RemoteException {
-        synchronized (mLock) {
-            return IServiceManager.getService();
-        }
-    }
-
-    protected ISupplicant getSupplicantMockable() throws RemoteException, NoSuchElementException {
-        synchronized (mLock) {
-            ISupplicant iSupplicant = ISupplicant.getService();
-            if (iSupplicant == null) {
-                throw new NoSuchElementException("Cannot get root service.");
-            }
-            return iSupplicant;
-        }
-    }
-
-    protected android.hardware.wifi.supplicant.V1_1.ISupplicant getSupplicantMockableV1_1()
-            throws RemoteException, NoSuchElementException {
-        synchronized (mLock) {
-            android.hardware.wifi.supplicant.V1_1.ISupplicant iSupplicantDerived =
-                    android.hardware.wifi.supplicant.V1_1.ISupplicant.castFrom(
-                            getSupplicantMockable());
-            if (iSupplicantDerived == null) {
-                throw new NoSuchElementException("Cannot cast to V1.1 service.");
-            }
-            return iSupplicantDerived;
-        }
-    }
-
-    protected android.hardware.wifi.supplicant.V1_2.ISupplicant getSupplicantMockableV1_2()
-            throws RemoteException, NoSuchElementException {
-        synchronized (mLock) {
-            android.hardware.wifi.supplicant.V1_2.ISupplicant iSupplicantDerived =
-                    android.hardware.wifi.supplicant.V1_2.ISupplicant.castFrom(
-                            getSupplicantMockable());
-            if (iSupplicantDerived == null) {
-                throw new NoSuchElementException("Cannot cast to V1.1 service.");
-            }
-            return iSupplicantDerived;
-        }
-    }
-
-    protected ISupplicantStaIface getStaIfaceMockable(ISupplicantIface iface) {
-        synchronized (mLock) {
-            return ISupplicantStaIface.asInterface(iface.asBinder());
-        }
-    }
-
-    protected android.hardware.wifi.supplicant.V1_1.ISupplicantStaIface
-            getStaIfaceMockableV1_1(ISupplicantIface iface) {
-        synchronized (mLock) {
-            return android.hardware.wifi.supplicant.V1_1.ISupplicantStaIface
-                    .asInterface(iface.asBinder());
-        }
-    }
-
-    protected android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
-            getStaIfaceMockableV1_2(ISupplicantIface iface) {
-        synchronized (mLock) {
-            return android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
-                    .asInterface(iface.asBinder());
-        }
-    }
-
-    protected android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-            getStaIfaceMockableV1_3(ISupplicantIface iface) {
-        synchronized (mLock) {
-            return android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                    .asInterface(iface.asBinder());
-        }
-    }
-
-    protected android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
-            getStaIfaceMockableV1_4(ISupplicantIface iface) {
-        synchronized (mLock) {
-            return android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
-                    .asInterface(iface.asBinder());
-        }
-    }
-
-    /**
-     * Uses the IServiceManager to check if the device is running V1_1 of the HAL from the VINTF for
-     * the device.
-     * @return true if supported, false otherwise.
-     */
-    private boolean isV1_1() {
-        return checkHalVersionByInterfaceName(
-                android.hardware.wifi.supplicant.V1_1.ISupplicant.kInterfaceName);
-    }
-
-    /**
-     * Uses the IServiceManager to check if the device is running V1_2 of the HAL from the VINTF for
-     * the device.
-     * @return true if supported, false otherwise.
-     */
-    private boolean isV1_2() {
-        return checkHalVersionByInterfaceName(
-                android.hardware.wifi.supplicant.V1_2.ISupplicant.kInterfaceName);
-    }
-
-    /**
-     * Uses the IServiceManager to check if the device is running V1_3 of the HAL from the VINTF for
-     * the device.
-     * @return true if supported, false otherwise.
-     */
-    private boolean isV1_3() {
-        return checkHalVersionByInterfaceName(
-                android.hardware.wifi.supplicant.V1_3.ISupplicant.kInterfaceName);
-    }
-
-    /**
-     * Uses the IServiceManager to check if the device is running V1_4 of the HAL from the VINTF for
-     * the device.
-     * @return true if supported, false otherwise.
-     */
-    private boolean isV1_4() {
-        return checkHalVersionByInterfaceName(
-                android.hardware.wifi.supplicant.V1_4.ISupplicant.kInterfaceName);
-    }
-
-    private boolean checkHalVersionByInterfaceName(String interfaceName) {
-        if (interfaceName == null) {
-            return false;
-        }
-        synchronized (mLock) {
-            if (mIServiceManager == null) {
-                Log.e(TAG, "checkHalVersionByInterfaceName: called but "
-                        + "mServiceManager is null");
-                return false;
-            }
-            try {
-                return (mIServiceManager.getTransport(
-                        interfaceName,
-                        HAL_INSTANCE_NAME)
-                        != IServiceManager.Transport.EMPTY);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Exception while operating on IServiceManager: " + e);
-                handleRemoteException(e, "getTransport");
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Helper method to look up the network object for the specified iface.
-     */
-    private ISupplicantStaIface getStaIface(@NonNull String ifaceName) {
-        return mISupplicantStaIfaces.get(ifaceName);
-    }
-
-    /**
-     * Helper method to look up the network object for the specified iface.
-     */
-    private SupplicantStaNetworkHalHidlImpl getCurrentNetworkRemoteHandle(
-            @NonNull String ifaceName) {
-        return mCurrentNetworkRemoteHandles.get(ifaceName);
-    }
-
-    /**
-     * Helper method to look up the network config for the specified iface.
-     */
-    protected WifiConfiguration getCurrentNetworkLocalConfig(@NonNull String ifaceName) {
-        return mCurrentNetworkLocalConfigs.get(ifaceName);
-    }
-
-    /**
-     * Add a network configuration to wpa_supplicant.
-     *
-     * @param config Config corresponding to the network.
-     * @return a Pair object including SupplicantStaNetworkHal and WifiConfiguration objects
-     * for the current network.
-     */
-    private Pair<SupplicantStaNetworkHalHidlImpl, WifiConfiguration>
-            addNetworkAndSaveConfig(@NonNull String ifaceName, WifiConfiguration config) {
-        synchronized (mLock) {
-            logi("addSupplicantStaNetwork via HIDL");
-            if (config == null) {
-                loge("Cannot add NULL network!");
-                return null;
-            }
-            SupplicantStaNetworkHalHidlImpl network = addNetwork(ifaceName);
-            if (network == null) {
-                loge("Failed to add a network!");
-                return null;
-            }
-            boolean saveSuccess = false;
-            try {
-                saveSuccess = network.saveWifiConfiguration(config);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Exception while saving config params: " + config, e);
-            }
-            if (!saveSuccess) {
-                loge("Failed to save variables for: " + config.getProfileKey());
-                if (!removeAllNetworks(ifaceName)) {
-                    loge("Failed to remove all networks on failure.");
-                }
-                return null;
-            }
-            return new Pair(network, new WifiConfiguration(config));
-        }
-    }
-
-    /**
-     * Add the provided network configuration to wpa_supplicant and initiate connection to it.
-     * This method does the following:
-     * 1. If |config| is different to the current supplicant network, removes all supplicant
-     * networks and saves |config|.
-     * 2. Select the new network in wpa_supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @param config WifiConfiguration parameters for the provided network.
-     * @return {@code true} if it succeeds, {@code false} otherwise
-     */
-    public boolean connectToNetwork(@NonNull String ifaceName, @NonNull WifiConfiguration config) {
-        synchronized (mLock) {
-            logd("connectToNetwork " + config.getProfileKey());
-            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
-            if (WifiConfigurationUtil.isSameNetwork(config, currentConfig)) {
-                String networkSelectionBSSID = config.getNetworkSelectionStatus()
-                        .getNetworkSelectionBSSID();
-                String networkSelectionBSSIDCurrent =
-                        currentConfig.getNetworkSelectionStatus().getNetworkSelectionBSSID();
-                if (Objects.equals(networkSelectionBSSID, networkSelectionBSSIDCurrent)) {
-                    logd("Network is already saved, will not trigger remove and add operation.");
-                } else {
-                    logd("Network is already saved, but need to update BSSID.");
-                    if (!setCurrentNetworkBssid(
-                            ifaceName,
-                            config.getNetworkSelectionStatus().getNetworkSelectionBSSID())) {
-                        loge("Failed to set current network BSSID.");
-                        return false;
-                    }
-                    mCurrentNetworkLocalConfigs.put(ifaceName, new WifiConfiguration(config));
-                }
-            } else {
-                mCurrentNetworkRemoteHandles.remove(ifaceName);
-                mCurrentNetworkLocalConfigs.remove(ifaceName);
-                mLinkedNetworkLocalAndRemoteConfigs.remove(ifaceName);
-                if (!removeAllNetworks(ifaceName)) {
-                    loge("Failed to remove existing networks");
-                    return false;
-                }
-                Pair<SupplicantStaNetworkHalHidlImpl, WifiConfiguration> pair =
-                        addNetworkAndSaveConfig(ifaceName, config);
-                if (pair == null) {
-                    loge("Failed to add/save network configuration: " + config
-                            .getProfileKey());
-                    return false;
-                }
-                mCurrentNetworkRemoteHandles.put(ifaceName, pair.first);
-                mCurrentNetworkLocalConfigs.put(ifaceName, pair.second);
-            }
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(ifaceName, "connectToNetwork");
-            if (networkHandle == null) {
-                loge("No valid remote network handle for network configuration: "
-                        + config.getProfileKey());
-                return false;
-            }
-
-            SecurityParams params = config.getNetworkSelectionStatus()
-                    .getCandidateSecurityParams();
-            if (params != null && !params.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)) {
-                List<ArrayList<Byte>> pmkDataList = mPmkCacheManager.get(config.networkId);
-                if (pmkDataList != null) {
-                    logi("Set PMK cache for config id " + config.networkId);
-                    pmkDataList.forEach(pmkData -> {
-                        if (networkHandle.setPmkCache(pmkData)) {
-                            mWifiMetrics.setConnectionPmkCache(ifaceName, true);
-                        }
-                    });
-                }
-            }
-
-            if (!networkHandle.select()) {
-                loge("Failed to select network configuration: " + config.getProfileKey());
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Initiates roaming to the already configured network in wpa_supplicant. If the network
-     * configuration provided does not match the already configured network, then this triggers
-     * a new connection attempt (instead of roam).
-     * 1. First check if we're attempting to connect to a linked network, and select the existing
-     *    supplicant network if there is one.
-     * 2. Set the new bssid for the network in wpa_supplicant.
-     * 3. Trigger reassociate command to wpa_supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @param config WifiConfiguration parameters for the provided network.
-     * @return {@code true} if it succeeds, {@code false} otherwise
-     */
-    public boolean roamToNetwork(@NonNull String ifaceName, WifiConfiguration config) {
-        synchronized (mLock) {
-            if (updateOnLinkedNetworkRoaming(ifaceName, config.networkId, true)) {
-                SupplicantStaNetworkHalHidlImpl networkHandle =
-                        getCurrentNetworkRemoteHandle(ifaceName);
-                if (networkHandle == null) {
-                    loge("Roaming config matches a linked config, but a linked network handle was"
-                            + " not found.");
-                    return false;
-                }
-                return networkHandle.select();
-            }
-            if (getCurrentNetworkId(ifaceName) != config.networkId) {
-                Log.w(TAG, "Cannot roam to a different network, initiate new connection. "
-                        + "Current network ID: " + getCurrentNetworkId(ifaceName));
-                return connectToNetwork(ifaceName, config);
-            }
-            String bssid = config.getNetworkSelectionStatus().getNetworkSelectionBSSID();
-            logd("roamToNetwork" + config.getProfileKey() + " (bssid " + bssid + ")");
-
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(ifaceName, "roamToNetwork");
-            if (networkHandle == null || !networkHandle.setBssid(bssid)) {
-                loge("Failed to set new bssid on network: " + config.getProfileKey());
-                return false;
-            }
-            if (!reassociate(ifaceName)) {
-                loge("Failed to trigger reassociate");
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Clean HAL cached data for |networkId| in the framework.
-     *
-     * @param networkId network id of the network to be removed from supplicant.
-     */
-    public void removeNetworkCachedData(int networkId) {
-        synchronized (mLock) {
-            logd("Remove cached HAL data for config id " + networkId);
-            removePmkCacheEntry(networkId);
-        }
-    }
-
-    /**
-     * Clear HAL cached data if MAC address is changed.
-     *
-     * @param networkId network id of the network to be checked.
-     * @param curMacAddress current MAC address
-     */
-    public void removeNetworkCachedDataIfNeeded(int networkId, MacAddress curMacAddress) {
-        synchronized (mLock) {
-            mPmkCacheManager.remove(networkId, curMacAddress);
-        }
-    }
-
-    /**
-     * Remove all networks from supplicant
-     *
-     * @param ifaceName Name of the interface.
-     */
-    public boolean removeAllNetworks(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            ArrayList<Integer> networks = listNetworks(ifaceName);
-            if (networks == null) {
-                Log.e(TAG, "removeAllNetworks failed, got null networks");
-                return false;
-            }
-            for (int id : networks) {
-                if (!removeNetwork(ifaceName, id)) {
-                    Log.e(TAG, "removeAllNetworks failed to remove network: " + id);
-                    return false;
-                }
-            }
-            // Reset current network info.
-            mCurrentNetworkRemoteHandles.remove(ifaceName);
-            mCurrentNetworkLocalConfigs.remove(ifaceName);
-            mLinkedNetworkLocalAndRemoteConfigs.remove(ifaceName);
-            return true;
-        }
-    }
-
-    /**
-     * Disable the current network in supplicant
-     *
-     * @param ifaceName Name of the interface.
-     */
-    public boolean disableCurrentNetwork(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(ifaceName, "disableCurrentNetwork");
-            if (networkHandle == null) return false;
-            return networkHandle.disable();
-        }
-    }
-
-    /**
-     * Set the currently configured network's bssid.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr Bssid to set in the form of "XX:XX:XX:XX:XX:XX"
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean setCurrentNetworkBssid(@NonNull String ifaceName, String bssidStr) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(ifaceName, "setCurrentNetworkBssid");
-            if (networkHandle == null) return false;
-            return networkHandle.setBssid(bssidStr);
-        }
-    }
-
-    /**
-     * Get the currently configured network's WPS NFC token.
-     *
-     * @param ifaceName Name of the interface.
-     * @return Hex string corresponding to the WPS NFC token.
-     */
-    public String getCurrentNetworkWpsNfcConfigurationToken(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(
-                            ifaceName, "getCurrentNetworkWpsNfcConfigurationToken");
-            if (networkHandle == null) return null;
-            return networkHandle.getWpsNfcConfigurationToken();
-        }
-    }
-
-    /**
-     * Get the eap anonymous identity for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return anonymous identity string if succeeds, null otherwise.
-     */
-    public String getCurrentNetworkEapAnonymousIdentity(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(
-                            ifaceName, "getCurrentNetworkEapAnonymousIdentity");
-            if (networkHandle == null) return null;
-            return networkHandle.fetchEapAnonymousIdentity();
-        }
-    }
-
-    /**
-     * Send the eap identity response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param identity identity used for EAP-Identity
-     * @param encryptedIdentity encrypted identity used for EAP-AKA/EAP-SIM
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapIdentityResponse(
-            @NonNull String ifaceName, @NonNull String identity, String encryptedIdentity) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapIdentityResponse");
-            if (networkHandle == null) return false;
-            return networkHandle.sendNetworkEapIdentityResponse(identity, encryptedIdentity);
-        }
-    }
-
-    /**
-     * Send the eap sim gsm auth response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param paramsStr String to send.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapSimGsmAuthResponse(
-            @NonNull String ifaceName, String paramsStr) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapSimGsmAuthResponse");
-            if (networkHandle == null) return false;
-            return networkHandle.sendNetworkEapSimGsmAuthResponse(paramsStr);
-        }
-    }
-
-    /**
-     * Send the eap sim gsm auth failure for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapSimGsmAuthFailure(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapSimGsmAuthFailure");
-            if (networkHandle == null) return false;
-            return networkHandle.sendNetworkEapSimGsmAuthFailure();
-        }
-    }
-
-    /**
-     * Send the eap sim umts auth response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param paramsStr String to send.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapSimUmtsAuthResponse(
-            @NonNull String ifaceName, String paramsStr) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapSimUmtsAuthResponse");
-            if (networkHandle == null) return false;
-            return networkHandle.sendNetworkEapSimUmtsAuthResponse(paramsStr);
-        }
-    }
-
-    /**
-     * Send the eap sim umts auts response for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @param paramsStr String to send.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapSimUmtsAutsResponse(
-            @NonNull String ifaceName, String paramsStr) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapSimUmtsAutsResponse");
-            if (networkHandle == null) return false;
-            return networkHandle.sendNetworkEapSimUmtsAutsResponse(paramsStr);
-        }
-    }
-
-    /**
-     * Send the eap sim umts auth failure for the currently configured network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendCurrentNetworkEapSimUmtsAuthFailure(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(
-                            ifaceName, "sendCurrentNetworkEapSimUmtsAuthFailure");
-            if (networkHandle == null) return false;
-            return networkHandle.sendNetworkEapSimUmtsAuthFailure();
-        }
-    }
-
-    /**
-     * Adds a new network.
-     *
-     * @return The ISupplicantNetwork object for the new network, or null if the call fails
-     */
-    private SupplicantStaNetworkHalHidlImpl addNetwork(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "addNetwork";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return null;
-            Mutable<ISupplicantNetwork> newNetwork = new Mutable<>();
-            try {
-                iface.addNetwork((SupplicantStatus status,
-                        ISupplicantNetwork network) -> {
-                    if (checkStatusAndLogFailure(status, methodStr)) {
-                        newNetwork.value = network;
-                    }
-                });
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            }
-            if (newNetwork.value != null) {
-                return getStaNetworkMockable(
-                        ifaceName,
-                        ISupplicantStaNetwork.asInterface(newNetwork.value.asBinder()));
-            } else {
-                return null;
-            }
-        }
-    }
-
-    /**
-     * Remove network from supplicant with network Id
-     *
-     * @return true if request is sent successfully, false otherwise.
-     */
-    private boolean removeNetwork(@NonNull String ifaceName, int id) {
-        synchronized (mLock) {
-            final String methodStr = "removeNetwork";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.removeNetwork(id);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Use this to mock the creation of SupplicantStaNetworkHal instance.
-     *
-     * @param ifaceName Name of the interface.
-     * @param iSupplicantStaNetwork ISupplicantStaNetwork instance retrieved from HIDL.
-     * @return The ISupplicantNetwork object for the given SupplicantNetworkId int, returns null if
-     * the call fails
-     */
-    protected SupplicantStaNetworkHalHidlImpl getStaNetworkMockable(
-            @NonNull String ifaceName, ISupplicantStaNetwork iSupplicantStaNetwork) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl network =
-                    new SupplicantStaNetworkHalHidlImpl(iSupplicantStaNetwork, ifaceName, mContext,
-                            mWifiMonitor, mWifiGlobals, getAdvancedCapabilities(ifaceName));
-            if (network != null) {
-                network.enableVerboseLogging(mVerboseLoggingEnabled, mVerboseHalLoggingEnabled);
-            }
-            return network;
-        }
-    }
-
-    /**
-     * @return The ISupplicantNetwork object for the given SupplicantNetworkId int, returns null if
-     * the call fails
-     */
-    private SupplicantStaNetworkHalHidlImpl getNetwork(@NonNull String ifaceName, int id) {
-        synchronized (mLock) {
-            final String methodStr = "getNetwork";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return null;
-            Mutable<ISupplicantNetwork> gotNetwork = new Mutable<>();
-            try {
-                iface.getNetwork(id, (SupplicantStatus status, ISupplicantNetwork network) -> {
-                    if (checkStatusAndLogFailure(status, methodStr)) {
-                        gotNetwork.value = network;
-                    }
-                });
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            }
-            if (gotNetwork.value != null) {
-                return getStaNetworkMockable(
-                        ifaceName,
-                        ISupplicantStaNetwork.asInterface(gotNetwork.value.asBinder()));
-            } else {
-                return null;
-            }
-        }
-    }
-
-    /** See ISupplicantStaNetwork.hal for documentation */
-    private boolean registerCallback(
-            ISupplicantStaIface iface, ISupplicantStaIfaceCallback callback) {
-        synchronized (mLock) {
-            final String methodStr = "registerCallback";
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status =  iface.registerCallback(callback);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    private boolean registerCallbackV1_1(
-            android.hardware.wifi.supplicant.V1_1.ISupplicantStaIface iface,
-            android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback callback) {
-        synchronized (mLock) {
-            String methodStr = "registerCallback_1_1";
-
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status =  iface.registerCallback_1_1(callback);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    private boolean registerCallbackV1_2(
-            android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface iface,
-            android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback callback) {
-        synchronized (mLock) {
-            String methodStr = "registerCallback_1_2";
-
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status =  iface.registerCallback_1_2(callback);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    private boolean registerCallbackV1_3(
-            android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface iface,
-            android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback callback) {
-        synchronized (mLock) {
-            String methodStr = "registerCallback_1_3";
-
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status =  iface.registerCallback_1_3(callback);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    private boolean registerCallbackV1_4(
-            android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface iface,
-            android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback callback) {
-        synchronized (mLock) {
-            String methodStr = "registerCallback_1_4";
-
-            if (iface == null) return false;
-            try {
-                android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
-                        iface.registerCallback_1_4(callback);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * @return a list of SupplicantNetworkID ints for all networks controlled by supplicant, returns
-     * null if the call fails
-     */
-    private java.util.ArrayList<Integer> listNetworks(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "listNetworks";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return null;
-            Mutable<ArrayList<Integer>> networkIdList = new Mutable<>();
-            try {
-                iface.listNetworks((SupplicantStatus status, ArrayList<Integer> networkIds) -> {
-                    if (checkStatusAndLogFailure(status, methodStr)) {
-                        networkIdList.value = networkIds;
-                    }
-                });
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            }
-            return networkIdList.value;
-        }
-    }
-
-    /**
-     * Set WPS device name.
-     *
-     * @param ifaceName Name of the interface.
-     * @param name String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsDeviceName(@NonNull String ifaceName, String name) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsDeviceName";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setWpsDeviceName(name);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set WPS device type.
-     *
-     * @param ifaceName Name of the interface.
-     * @param typeStr Type specified as a string. Used format: <categ>-<OUI>-<subcateg>
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsDeviceType(@NonNull String ifaceName, String typeStr) {
-        synchronized (mLock) {
-            try {
-                Matcher match = WPS_DEVICE_TYPE_PATTERN.matcher(typeStr);
-                if (!match.find() || match.groupCount() != 3) {
-                    Log.e(TAG, "Malformed WPS device type " + typeStr);
-                    return false;
-                }
-                short categ = Short.parseShort(match.group(1));
-                byte[] oui = NativeUtil.hexStringToByteArray(match.group(2));
-                short subCateg = Short.parseShort(match.group(3));
-
-                byte[] bytes = new byte[8];
-                ByteBuffer byteBuffer = ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
-                byteBuffer.putShort(categ);
-                byteBuffer.put(oui);
-                byteBuffer.putShort(subCateg);
-                return setWpsDeviceType(ifaceName, bytes);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + typeStr, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean setWpsDeviceType(@NonNull String ifaceName, byte[/* 8 */] type) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsDeviceType";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setWpsDeviceType(type);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set WPS manufacturer.
-     *
-     * @param ifaceName Name of the interface.
-     * @param manufacturer String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsManufacturer(@NonNull String ifaceName, String manufacturer) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsManufacturer";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setWpsManufacturer(manufacturer);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set WPS model name.
-     *
-     * @param ifaceName Name of the interface.
-     * @param modelName String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsModelName(@NonNull String ifaceName, String modelName) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsModelName";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setWpsModelName(modelName);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set WPS model number.
-     *
-     * @param ifaceName Name of the interface.
-     * @param modelNumber String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsModelNumber(@NonNull String ifaceName, String modelNumber) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsModelNumber";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setWpsModelNumber(modelNumber);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set WPS serial number.
-     *
-     * @param ifaceName Name of the interface.
-     * @param serialNumber String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsSerialNumber(@NonNull String ifaceName, String serialNumber) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsSerialNumber";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setWpsSerialNumber(serialNumber);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set WPS config methods
-     *
-     * @param ifaceName Name of the interface.
-     * @param configMethodsStr List of config methods.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsConfigMethods(@NonNull String ifaceName, String configMethodsStr) {
-        synchronized (mLock) {
-            short configMethodsMask = 0;
-            String[] configMethodsStrArr = configMethodsStr.split("\\s+");
-            for (int i = 0; i < configMethodsStrArr.length; i++) {
-                configMethodsMask |= stringToWpsConfigMethod(configMethodsStrArr[i]);
-            }
-            return setWpsConfigMethods(ifaceName, configMethodsMask);
-        }
-    }
-
-    private boolean setWpsConfigMethods(@NonNull String ifaceName, short configMethods) {
-        synchronized (mLock) {
-            final String methodStr = "setWpsConfigMethods";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setWpsConfigMethods(configMethods);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Trigger a reassociation even if the iface is currently connected.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean reassociate(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "reassociate";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.reassociate();
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Trigger a reconnection if the iface is disconnected.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean reconnect(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "reconnect";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.reconnect();
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Trigger a disconnection from the currently connected network.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean disconnect(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "disconnect";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.disconnect();
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Enable or disable power save mode.
-     *
-     * @param ifaceName Name of the interface.
-     * @param enable true to enable, false to disable.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setPowerSave(@NonNull String ifaceName, boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setPowerSave";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setPowerSave(enable);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Initiate TDLS discover with the specified AP.
-     *
-     * @param ifaceName Name of the interface.
-     * @param macAddress MAC Address of the AP.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateTdlsDiscover(@NonNull String ifaceName, String macAddress) {
-        synchronized (mLock) {
-            try {
-                return initiateTdlsDiscover(
-                        ifaceName, NativeUtil.macAddressToByteArray(macAddress));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + macAddress, e);
-                return false;
-            }
-        }
-    }
-    /** See ISupplicantStaIface.hal for documentation */
-    private boolean initiateTdlsDiscover(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
-        synchronized (mLock) {
-            final String methodStr = "initiateTdlsDiscover";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.initiateTdlsDiscover(macAddress);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Initiate TDLS setup with the specified AP.
-     *
-     * @param ifaceName Name of the interface.
-     * @param macAddress MAC Address of the AP.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateTdlsSetup(@NonNull String ifaceName, String macAddress) {
-        synchronized (mLock) {
-            try {
-                return initiateTdlsSetup(ifaceName, NativeUtil.macAddressToByteArray(macAddress));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + macAddress, e);
-                return false;
-            }
-        }
-    }
-    /** See ISupplicantStaIface.hal for documentation */
-    private boolean initiateTdlsSetup(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
-        synchronized (mLock) {
-            final String methodStr = "initiateTdlsSetup";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.initiateTdlsSetup(macAddress);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Initiate TDLS teardown with the specified AP.
-     * @param ifaceName Name of the interface.
-     * @param macAddress MAC Address of the AP.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateTdlsTeardown(@NonNull String ifaceName, String macAddress) {
-        synchronized (mLock) {
-            try {
-                return initiateTdlsTeardown(
-                        ifaceName, NativeUtil.macAddressToByteArray(macAddress));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + macAddress, e);
-                return false;
-            }
-        }
-    }
-
-    /** See ISupplicantStaIface.hal for documentation */
-    private boolean initiateTdlsTeardown(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
-        synchronized (mLock) {
-            final String methodStr = "initiateTdlsTeardown";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.initiateTdlsTeardown(macAddress);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Request the specified ANQP elements |elements| from the specified AP |bssid|.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssid BSSID of the AP
-     * @param infoElements ANQP elements to be queried. Refer to ISupplicantStaIface.AnqpInfoId.
-     * @param hs20SubTypes HS subtypes to be queried. Refer to ISupplicantStaIface.Hs20AnqpSubTypes.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateAnqpQuery(@NonNull String ifaceName, String bssid,
-            ArrayList<Short> infoElements,
-            ArrayList<Integer> hs20SubTypes) {
-        synchronized (mLock) {
-            try {
-                return initiateAnqpQuery(
-                        ifaceName,
-                        NativeUtil.macAddressToByteArray(bssid), infoElements, hs20SubTypes);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssid, e);
-                return false;
-            }
-        }
-    }
-
-    /** See ISupplicantStaIface.hal for documentation */
-    private boolean initiateAnqpQuery(@NonNull String ifaceName, byte[/* 6 */] macAddress,
-            java.util.ArrayList<Short> infoElements, java.util.ArrayList<Integer> subTypes) {
-        synchronized (mLock) {
-            final String methodStr = "initiateAnqpQuery";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.initiateAnqpQuery(
-                        macAddress, infoElements, subTypes);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Request Venue URL ANQP element from the specified AP |bssid|.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssid BSSID of the AP
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateVenueUrlAnqpQuery(@NonNull String ifaceName, String bssid) {
-        synchronized (mLock) {
-            try {
-                return initiateVenueUrlAnqpQuery(
-                        ifaceName, NativeUtil.macAddressToByteArray(bssid));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssid, e);
-                return false;
-            }
-        }
-    }
-
-    /** See ISupplicantStaIface.hal for documentation */
-    private boolean initiateVenueUrlAnqpQuery(@NonNull String ifaceName, byte[/* 6 */] macAddress) {
-        synchronized (mLock) {
-            final String methodStr = "initiateVenueUrlAnqpQuery";
-            if (!isV1_4()) {
-                Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
-                return false;
-            }
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            // Get a v1.4 supplicant STA Interface
-            android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
-                    getStaIfaceMockableV1_4(iface);
-
-            if (staIfaceV14 == null) {
-                Log.e(TAG, methodStr
-                        + ": SupplicantStaIface is null, cannot initiate Venue URL ANQP request");
-                return false;
-            }
-            try {
-                android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
-                        staIfaceV14.initiateVenueUrlAnqpQuery(macAddress);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Request the specified ANQP ICON from the specified AP |bssid|.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssid BSSID of the AP
-     * @param fileName Name of the file to request.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean initiateHs20IconQuery(@NonNull String ifaceName, String bssid, String fileName) {
-        synchronized (mLock) {
-            try {
-                return initiateHs20IconQuery(
-                        ifaceName, NativeUtil.macAddressToByteArray(bssid), fileName);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssid, e);
-                return false;
-            }
-        }
-    }
-
-    /** See ISupplicantStaIface.hal for documentation */
-    private boolean initiateHs20IconQuery(@NonNull String ifaceName,
-            byte[/* 6 */] macAddress, String fileName) {
-        synchronized (mLock) {
-            final String methodStr = "initiateHs20IconQuery";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.initiateHs20IconQuery(macAddress, fileName);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Makes a callback to HIDL to getMacAddress from supplicant
-     *
-     * @param ifaceName Name of the interface.
-     * @return string containing the MAC address, or null on a failed call
-     */
-    public String getMacAddress(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "getMacAddress";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return null;
-            Mutable<String> gotMac = new Mutable<>();
-            try {
-                iface.getMacAddress((SupplicantStatus status,
-                        byte[/* 6 */] macAddr) -> {
-                    if (checkStatusAndLogFailure(status, methodStr)) {
-                        gotMac.value = NativeUtil.macAddressFromByteArray(macAddr);
-                    }
-                });
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            }
-            return gotMac.value;
-        }
-    }
-
-    /**
-     * Start using the added RX filters.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean startRxFilter(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "startRxFilter";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.startRxFilter();
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Stop using the added RX filters.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean stopRxFilter(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "stopRxFilter";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.stopRxFilter();
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Add an RX filter.
-     *
-     * @param ifaceName Name of the interface.
-     * @param type one of {@link WifiNative#RX_FILTER_TYPE_V4_MULTICAST}
-     *        {@link WifiNative#RX_FILTER_TYPE_V6_MULTICAST} values.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean addRxFilter(@NonNull String ifaceName, int type) {
-        synchronized (mLock) {
-            byte halType;
-            switch (type) {
-                case WifiNative.RX_FILTER_TYPE_V4_MULTICAST:
-                    halType = ISupplicantStaIface.RxFilterType.V4_MULTICAST;
-                    break;
-                case WifiNative.RX_FILTER_TYPE_V6_MULTICAST:
-                    halType = ISupplicantStaIface.RxFilterType.V6_MULTICAST;
-                    break;
-                default:
-                    Log.e(TAG, "Invalid Rx Filter type: " + type);
-                    return false;
-            }
-            return addRxFilter(ifaceName, halType);
-        }
-    }
-
-    private boolean addRxFilter(@NonNull String ifaceName, byte type) {
-        synchronized (mLock) {
-            final String methodStr = "addRxFilter";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.addRxFilter(type);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Remove an RX filter.
-     *
-     * @param ifaceName Name of the interface.
-     * @param type one of {@link WifiNative#RX_FILTER_TYPE_V4_MULTICAST}
-     *        {@link WifiNative#RX_FILTER_TYPE_V6_MULTICAST} values.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean removeRxFilter(@NonNull String ifaceName, int type) {
-        synchronized (mLock) {
-            byte halType;
-            switch (type) {
-                case WifiNative.RX_FILTER_TYPE_V4_MULTICAST:
-                    halType = ISupplicantStaIface.RxFilterType.V4_MULTICAST;
-                    break;
-                case WifiNative.RX_FILTER_TYPE_V6_MULTICAST:
-                    halType = ISupplicantStaIface.RxFilterType.V6_MULTICAST;
-                    break;
-                default:
-                    Log.e(TAG, "Invalid Rx Filter type: " + type);
-                    return false;
-            }
-            return removeRxFilter(ifaceName, halType);
-        }
-    }
-
-    private boolean removeRxFilter(@NonNull String ifaceName, byte type) {
-        synchronized (mLock) {
-            final String methodStr = "removeRxFilter";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.removeRxFilter(type);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set Bt co existense mode.
-     *
-     * @param ifaceName Name of the interface.
-     * @param mode one of the above {@link WifiNative#BLUETOOTH_COEXISTENCE_MODE_DISABLED},
-     *             {@link WifiNative#BLUETOOTH_COEXISTENCE_MODE_ENABLED} or
-     *             {@link WifiNative#BLUETOOTH_COEXISTENCE_MODE_SENSE}.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setBtCoexistenceMode(@NonNull String ifaceName, int mode) {
-        synchronized (mLock) {
-            byte halMode;
-            switch (mode) {
-                case WifiNative.BLUETOOTH_COEXISTENCE_MODE_ENABLED:
-                    halMode = ISupplicantStaIface.BtCoexistenceMode.ENABLED;
-                    break;
-                case WifiNative.BLUETOOTH_COEXISTENCE_MODE_DISABLED:
-                    halMode = ISupplicantStaIface.BtCoexistenceMode.DISABLED;
-                    break;
-                case WifiNative.BLUETOOTH_COEXISTENCE_MODE_SENSE:
-                    halMode = ISupplicantStaIface.BtCoexistenceMode.SENSE;
-                    break;
-                default:
-                    Log.e(TAG, "Invalid Bt Coex mode: " + mode);
-                    return false;
-            }
-            return setBtCoexistenceMode(ifaceName, halMode);
-        }
-    }
-
-    private boolean setBtCoexistenceMode(@NonNull String ifaceName, byte mode) {
-        synchronized (mLock) {
-            final String methodStr = "setBtCoexistenceMode";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setBtCoexistenceMode(mode);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /** Enable or disable BT coexistence mode.
-     *
-     * @param ifaceName Name of the interface.
-     * @param enable true to enable, false to disable.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setBtCoexistenceScanModeEnabled(@NonNull String ifaceName, boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setBtCoexistenceScanModeEnabled";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status =
-                        iface.setBtCoexistenceScanModeEnabled(enable);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Enable or disable suspend mode optimizations.
-     *
-     * @param ifaceName Name of the interface.
-     * @param enable true to enable, false otherwise.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setSuspendModeEnabled(@NonNull String ifaceName, boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setSuspendModeEnabled";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setSuspendModeEnabled(enable);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set country code.
-     *
-     * @param ifaceName Name of the interface.
-     * @param codeStr 2 byte ASCII string. For ex: US, CA.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setCountryCode(@NonNull String ifaceName, String codeStr) {
-        synchronized (mLock) {
-            if (TextUtils.isEmpty(codeStr)) return false;
-            byte[] countryCodeBytes = NativeUtil.stringToByteArray(codeStr);
-            if (countryCodeBytes.length != 2) return false;
-            return setCountryCode(ifaceName, countryCodeBytes);
-        }
-    }
-
-    /** See ISupplicantStaIface.hal for documentation */
-    private boolean setCountryCode(@NonNull String ifaceName, byte[/* 2 */] code) {
-        synchronized (mLock) {
-            final String methodStr = "setCountryCode";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setCountryCode(code);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Flush all previously configured HLPs.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean flushAllHlp(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "filsHlpFlushRequest";
-            if (isV1_3()) {
-                ISupplicantStaIface iface =
-                        checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-                if (iface == null) {
-                    return false;
-                }
-
-                // Get a v1.3 supplicant STA Interface
-                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
-                        getStaIfaceMockableV1_3(iface);
-
-                if (staIfaceV13 == null) {
-                    Log.e(TAG, methodStr
-                            + ": ISupplicantStaIface is null, cannot flushAllHlp");
-                    return false;
-                }
-                try {
-                    SupplicantStatus status = staIfaceV13.filsHlpFlushRequest();
-                    return checkStatusAndLogFailure(status, methodStr);
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                    return false;
-                }
-            } else {
-                Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set FILS HLP packet.
-     *
-     * @param ifaceName Name of the interface.
-     * @param dst Destination MAC address.
-     * @param hlpPacket Hlp Packet data in hex.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean addHlpReq(@NonNull String ifaceName, byte [] dst, byte [] hlpPacket) {
-        synchronized (mLock) {
-            final String methodStr = "filsHlpAddRequest";
-            if (isV1_3()) {
-                ISupplicantStaIface iface =
-                        checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-                if (iface == null) {
-                    return false;
-                }
-
-                // Get a v1.3 supplicant STA Interface
-                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
-                        getStaIfaceMockableV1_3(iface);
-
-                if (staIfaceV13 == null) {
-                    Log.e(TAG, methodStr
-                            + ": ISupplicantStaIface is null, cannot addHlpReq");
-                    return false;
-                }
-                try {
-                    ArrayList<Byte> payload = NativeUtil.byteArrayToArrayList(hlpPacket);
-                    SupplicantStatus status = staIfaceV13.filsHlpAddRequest(dst, payload);
-                    return checkStatusAndLogFailure(status, methodStr);
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                    return false;
-                }
-            } else {
-                Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
-                return false;
-            }
-        }
-    }
-
-
-    /**
-     * Start WPS pin registrar operation with the specified peer and pin.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr BSSID of the peer.
-     * @param pin Pin to be used.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean startWpsRegistrar(@NonNull String ifaceName, String bssidStr, String pin) {
-        synchronized (mLock) {
-            if (TextUtils.isEmpty(bssidStr) || TextUtils.isEmpty(pin)) return false;
-            try {
-                return startWpsRegistrar(
-                        ifaceName, NativeUtil.macAddressToByteArray(bssidStr), pin);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssidStr, e);
-                return false;
-            }
-        }
-    }
-
-    /** See ISupplicantStaIface.hal for documentation */
-    private boolean startWpsRegistrar(@NonNull String ifaceName, byte[/* 6 */] bssid, String pin) {
-        synchronized (mLock) {
-            final String methodStr = "startWpsRegistrar";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.startWpsRegistrar(bssid, pin);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Start WPS pin display operation with the specified peer.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr BSSID of the peer. Use empty bssid to indicate wildcard.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean startWpsPbc(@NonNull String ifaceName, String bssidStr) {
-        synchronized (mLock) {
-            try {
-                return startWpsPbc(ifaceName, NativeUtil.macAddressToByteArray(bssidStr));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssidStr, e);
-                return false;
-            }
-        }
-    }
-
-    /** See ISupplicantStaIface.hal for documentation */
-    private boolean startWpsPbc(@NonNull String ifaceName, byte[/* 6 */] bssid) {
-        synchronized (mLock) {
-            final String methodStr = "startWpsPbc";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.startWpsPbc(bssid);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Start WPS pin keypad operation with the specified pin.
-     *
-     * @param ifaceName Name of the interface.
-     * @param pin Pin to be used.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean startWpsPinKeypad(@NonNull String ifaceName, String pin) {
-        if (TextUtils.isEmpty(pin)) return false;
-        synchronized (mLock) {
-            final String methodStr = "startWpsPinKeypad";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.startWpsPinKeypad(pin);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Start WPS pin display operation with the specified peer.
-     *
-     * @param ifaceName Name of the interface.
-     * @param bssidStr BSSID of the peer. Use empty bssid to indicate wildcard.
-     * @return new pin generated on success, null otherwise.
-     */
-    public String startWpsPinDisplay(@NonNull String ifaceName, String bssidStr) {
-        synchronized (mLock) {
-            try {
-                return startWpsPinDisplay(ifaceName, NativeUtil.macAddressToByteArray(bssidStr));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssidStr, e);
-                return null;
-            }
-        }
-    }
-
-    /** See ISupplicantStaIface.hal for documentation */
-    private String startWpsPinDisplay(@NonNull String ifaceName, byte[/* 6 */] bssid) {
-        synchronized (mLock) {
-            final String methodStr = "startWpsPinDisplay";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return null;
-            final Mutable<String> gotPin = new Mutable<>();
-            try {
-                iface.startWpsPinDisplay(bssid,
-                        (SupplicantStatus status, String pin) -> {
-                            if (checkStatusAndLogFailure(status, methodStr)) {
-                                gotPin.value = pin;
-                            }
-                        });
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            }
-            return gotPin.value;
-        }
-    }
-
-    /**
-     * Cancels any ongoing WPS requests.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean cancelWps(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "cancelWps";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.cancelWps();
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Sets whether to use external sim for SIM/USIM processing.
-     *
-     * @param ifaceName Name of the interface.
-     * @param useExternalSim true to enable, false otherwise.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setExternalSim(@NonNull String ifaceName, boolean useExternalSim) {
-        synchronized (mLock) {
-            final String methodStr = "setExternalSim";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.setExternalSim(useExternalSim);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /** See ISupplicant.hal for documentation */
-    public boolean enableAutoReconnect(@NonNull String ifaceName, boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "enableAutoReconnect";
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) return false;
-            try {
-                SupplicantStatus status = iface.enableAutoReconnect(enable);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set the debug log level for wpa_supplicant
-     *
-     * @param turnOnVerbose Whether to turn on verbose logging or not.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setLogLevel(boolean turnOnVerbose) {
-        synchronized (mLock) {
-            int logLevel = turnOnVerbose
-                    ? ISupplicant.DebugLevel.DEBUG
-                    : ISupplicant.DebugLevel.INFO;
-            return setDebugParams(logLevel, false,
-                    turnOnVerbose && mWifiGlobals.getShowKeyVerboseLoggingModeEnabled());
-        }
-    }
-
-    /** See ISupplicant.hal for documentation */
-    private boolean setDebugParams(int level, boolean showTimestamp, boolean showKeys) {
-        synchronized (mLock) {
-            final String methodStr = "setDebugParams";
-            if (!checkSupplicantAndLogFailure(methodStr)) return false;
-            try {
-                SupplicantStatus status =
-                        mISupplicant.setDebugParams(level, showTimestamp, showKeys);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Set concurrency priority between P2P & STA operations.
-     *
-     * @param isStaHigherPriority Set to true to prefer STA over P2P during concurrency operations,
-     *                            false otherwise.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setConcurrencyPriority(boolean isStaHigherPriority) {
-        synchronized (mLock) {
-            if (isStaHigherPriority) {
-                return setConcurrencyPriority(IfaceType.STA);
-            } else {
-                return setConcurrencyPriority(IfaceType.P2P);
-            }
-        }
-    }
-
-    /** See ISupplicant.hal for documentation */
-    private boolean setConcurrencyPriority(int type) {
-        synchronized (mLock) {
-            final String methodStr = "setConcurrencyPriority";
-            if (!checkSupplicantAndLogFailure(methodStr)) return false;
-            try {
-                SupplicantStatus status = mISupplicant.setConcurrencyPriority(type);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Returns false if Supplicant is null, and logs failure to call methodStr
-     */
-    private boolean checkSupplicantAndLogFailure(final String methodStr) {
-        synchronized (mLock) {
-            if (mISupplicant == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", ISupplicant is null");
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Returns false if SupplicantStaIface is null, and logs failure to call methodStr
-     */
-    private ISupplicantStaIface checkSupplicantStaIfaceAndLogFailure(
-            @NonNull String ifaceName, final String methodStr) {
-        synchronized (mLock) {
-            ISupplicantStaIface iface = getStaIface(ifaceName);
-            if (iface == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", ISupplicantStaIface is null for iface="
-                        + ifaceName);
-                return null;
-            }
-            return iface;
-        }
-    }
-
-    /**
-     * Returns false if SupplicantStaNetwork is null, and logs failure to call methodStr
-     */
-    private SupplicantStaNetworkHalHidlImpl checkSupplicantStaNetworkAndLogFailure(
-            @NonNull String ifaceName, final String methodStr) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHal = getCurrentNetworkRemoteHandle(ifaceName);
-            if (networkHal == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", SupplicantStaNetwork is null");
-                return null;
-            }
-            return networkHal;
-        }
-    }
-
-    /**
-     * Returns true if provided status code is SUCCESS, logs debug message and returns false
-     * otherwise
-     */
-    private boolean checkStatusAndLogFailure(SupplicantStatus status,
-            final String methodStr) {
-        synchronized (mLock) {
-            if (status == null || status.code != SupplicantStatusCode.SUCCESS) {
-                Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed: " + status);
-                return false;
-            } else {
-                if (mVerboseLoggingEnabled) {
-                    Log.d(TAG, "ISupplicantStaIface." + methodStr + " succeeded");
-                }
-                return true;
-            }
-        }
-    }
-
-    /**
-     * Returns true if provided status code is SUCCESS, logs debug message and returns false
-     * otherwise
-     */
-    private boolean checkStatusAndLogFailure(
-            android.hardware.wifi.supplicant.V1_4.SupplicantStatus status,
-            final String methodStr) {
-        synchronized (mLock) {
-            if (status == null
-                    || status.code
-                    != android.hardware.wifi.supplicant.V1_4.SupplicantStatusCode.SUCCESS) {
-                Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed: " + status);
-                return false;
-            } else {
-                if (mVerboseLoggingEnabled) {
-                    Log.d(TAG, "ISupplicantStaIface." + methodStr + " succeeded");
-                }
-                return true;
-            }
-        }
-    }
-
-    /**
-     * Helper function to log callbacks.
-     */
-    protected void logCallback(final String methodStr) {
-        synchronized (mLock) {
-            if (mVerboseLoggingEnabled) {
-                Log.d(TAG, "ISupplicantStaIfaceCallback." + methodStr + " received");
-            }
-        }
-    }
-
-    private void handleNoSuchElementException(NoSuchElementException e, String methodStr) {
-        synchronized (mLock) {
-            clearState();
-            Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed with exception", e);
-        }
-    }
-
-    private void handleRemoteException(RemoteException e, String methodStr) {
-        synchronized (mLock) {
-            clearState();
-            Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed with exception", e);
-        }
-    }
-
-    private void handleIllegalArgumentException(IllegalArgumentException e, String methodStr) {
-        synchronized (mLock) {
-            clearState();
-            Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed with exception", e);
-        }
-    }
-
-    /**
-     * Converts the Wps config method string to the equivalent enum value.
-     */
-    private static short stringToWpsConfigMethod(String configMethod) {
-        switch (configMethod) {
-            case "usba":
-                return WpsConfigMethods.USBA;
-            case "ethernet":
-                return WpsConfigMethods.ETHERNET;
-            case "label":
-                return WpsConfigMethods.LABEL;
-            case "display":
-                return WpsConfigMethods.DISPLAY;
-            case "int_nfc_token":
-                return WpsConfigMethods.INT_NFC_TOKEN;
-            case "ext_nfc_token":
-                return WpsConfigMethods.EXT_NFC_TOKEN;
-            case "nfc_interface":
-                return WpsConfigMethods.NFC_INTERFACE;
-            case "push_button":
-                return WpsConfigMethods.PUSHBUTTON;
-            case "keypad":
-                return WpsConfigMethods.KEYPAD;
-            case "virtual_push_button":
-                return WpsConfigMethods.VIRT_PUSHBUTTON;
-            case "physical_push_button":
-                return WpsConfigMethods.PHY_PUSHBUTTON;
-            case "p2ps":
-                return WpsConfigMethods.P2PS;
-            case "virtual_display":
-                return WpsConfigMethods.VIRT_DISPLAY;
-            case "physical_display":
-                return WpsConfigMethods.PHY_DISPLAY;
-            default:
-                throw new IllegalArgumentException(
-                        "Invalid WPS config method: " + configMethod);
-        }
-    }
-
-    protected class SupplicantStaIfaceHalCallback extends SupplicantStaIfaceCallbackHidlImpl {
-        SupplicantStaIfaceHalCallback(@NonNull String ifaceName) {
-            super(SupplicantStaIfaceHalHidlImpl.this, ifaceName, new Object(), mWifiMonitor);
-        }
-    }
-
-    protected class SupplicantStaIfaceHalCallbackV1_1 extends
-            SupplicantStaIfaceCallbackHidlV1_1Impl {
-        SupplicantStaIfaceHalCallbackV1_1(@NonNull String ifaceName) {
-            super(SupplicantStaIfaceHalHidlImpl.this, ifaceName, new Object(), mWifiMonitor);
-        }
-    }
-
-    protected class SupplicantStaIfaceHalCallbackV1_2 extends
-            SupplicantStaIfaceCallbackHidlV1_2Impl {
-        SupplicantStaIfaceHalCallbackV1_2(@NonNull String ifaceName) {
-            super(SupplicantStaIfaceHalHidlImpl.this, ifaceName, mContext);
-        }
-    }
-
-    protected class SupplicantStaIfaceHalCallbackV1_3 extends
-            SupplicantStaIfaceCallbackHidlV1_3Impl {
-        SupplicantStaIfaceHalCallbackV1_3(@NonNull String ifaceName) {
-            super(SupplicantStaIfaceHalHidlImpl.this, ifaceName, mWifiMonitor);
-        }
-    }
-
-    protected class SupplicantStaIfaceHalCallbackV1_4 extends
-            SupplicantStaIfaceCallbackHidlV1_4Impl {
-        SupplicantStaIfaceHalCallbackV1_4(@NonNull String ifaceName) {
-            super(SupplicantStaIfaceHalHidlImpl.this, ifaceName, new Object(), mWifiMonitor);
-        }
-    }
-
-    protected void addPmkCacheEntry(
-            String ifaceName,
-            int networkId, long expirationTimeInSec, ArrayList<Byte> serializedEntry) {
-        String macAddressStr = getMacAddress(ifaceName);
-        try {
-            if (!mPmkCacheManager.add(MacAddress.fromString(macAddressStr),
-                    networkId, expirationTimeInSec, serializedEntry)) {
-                Log.w(TAG, "Cannot add PMK cache for " + ifaceName);
-            }
-        } catch (IllegalArgumentException ex) {
-            Log.w(TAG, "Cannot add PMK cache: " + ex);
-        }
-    }
-
-    protected void removePmkCacheEntry(int networkId) {
-        mPmkCacheManager.remove(networkId);
-    }
-
-    private static void logd(String s) {
-        Log.d(TAG, s);
-    }
-
-    private static void logi(String s) {
-        Log.i(TAG, s);
-    }
-
-    private static void loge(String s) {
-        Log.e(TAG, s);
-    }
-
-    /**
-     * Returns a bitmask of advanced capabilities: WPA3 SAE/SUITE B and OWE
-     * Bitmask used is:
-     * - WIFI_FEATURE_WPA3_SAE
-     * - WIFI_FEATURE_WPA3_SUITE_B
-     * - WIFI_FEATURE_OWE
-     *
-     *  This is a v1.2+ HAL feature.
-     *  On error, or if these features are not supported, 0 is returned.
-     */
-    public long getAdvancedCapabilities(@NonNull String ifaceName) {
-        final String methodStr = "getAdvancedCapabilities";
-
-        long advancedCapabilities = 0;
-        int keyMgmtCapabilities = getKeyMgmtCapabilities(ifaceName);
-
-        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
-                .KeyMgmtMask.SAE) != 0) {
-            advancedCapabilities |= WIFI_FEATURE_WPA3_SAE;
-
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": SAE supported");
-            }
-        }
-
-        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
-                .KeyMgmtMask.SUITE_B_192) != 0) {
-            advancedCapabilities |= WIFI_FEATURE_WPA3_SUITE_B;
-
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": SUITE_B supported");
-            }
-        }
-
-        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
-                .KeyMgmtMask.OWE) != 0) {
-            advancedCapabilities |= WIFI_FEATURE_OWE;
-
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": OWE supported");
-            }
-        }
-
-        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
-                .KeyMgmtMask.DPP) != 0) {
-            advancedCapabilities |= WIFI_FEATURE_DPP;
-
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": DPP supported");
-            }
-            if (isV1_4()) {
-                advancedCapabilities |= WIFI_FEATURE_DPP_ENROLLEE_RESPONDER;
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": DPP ENROLLEE RESPONDER supported");
-                }
-            }
-        }
-
-        if (isV1_4()) {
-            advancedCapabilities |= WIFI_FEATURE_PASSPOINT_TERMS_AND_CONDITIONS
-                    | WIFI_FEATURE_DECORATED_IDENTITY;
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": Passpoint T&C supported");
-                Log.v(TAG, methodStr + ": RFC 7542 decorated identity supported");
-            }
-        }
-
-        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_3.ISupplicantStaNetwork
-                .KeyMgmtMask.WAPI_PSK) != 0) {
-            advancedCapabilities |= WIFI_FEATURE_WAPI;
-
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": WAPI supported");
-            }
-        }
-
-        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_3.ISupplicantStaNetwork
-                .KeyMgmtMask.FILS_SHA256) != 0) {
-            advancedCapabilities |= WIFI_FEATURE_FILS_SHA256;
-
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": FILS_SHA256 supported");
-            }
-        }
-        if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_3.ISupplicantStaNetwork
-                .KeyMgmtMask.FILS_SHA384) != 0) {
-            advancedCapabilities |= WIFI_FEATURE_FILS_SHA384;
-
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": FILS_SHA384 supported");
-            }
-        }
-
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, methodStr + ": Capability flags = " + keyMgmtCapabilities);
-        }
-
-        return advancedCapabilities;
-    }
-
-    private int getKeyMgmtCapabilities_1_3(@NonNull String ifaceName) {
-        final String methodStr = "getKeyMgmtCapabilities_1_3";
-        Mutable<Integer> keyMgmtMask = new Mutable<>(0);
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return 0;
-        }
-
-        // Get a v1.3 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
-                getStaIfaceMockableV1_3(iface);
-        if (staIfaceV13 == null) {
-            Log.e(TAG, methodStr
-                    + ": ISupplicantStaIface V1.3 is null, cannot get advanced capabilities");
-            return 0;
-        }
-
-        try {
-            // Support for new key management types; WAPI_PSK, WAPI_CERT
-            // Requires HAL v1.3 or higher
-            staIfaceV13.getKeyMgmtCapabilities_1_3(
-                    (SupplicantStatus statusInternal, int keyMgmtMaskInternal) -> {
-                        if (statusInternal.code == SupplicantStatusCode.SUCCESS) {
-                            keyMgmtMask.value = keyMgmtMaskInternal;
-                        }
-                        checkStatusAndLogFailure(statusInternal, methodStr);
-                    });
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-        return keyMgmtMask.value;
-    }
-
-    private int getKeyMgmtCapabilities(@NonNull String ifaceName) {
-        final String methodStr = "getKeyMgmtCapabilities";
-        Mutable<Boolean> status = new Mutable<>(false);
-        Mutable<Integer> keyMgmtMask = new Mutable<>(0);
-
-        if (isV1_3()) {
-            keyMgmtMask.value = getKeyMgmtCapabilities_1_3(ifaceName);
-        } else if (isV1_2()) {
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return 0;
-            }
-
-            // Get a v1.2 supplicant STA Interface
-            android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
-                    getStaIfaceMockableV1_2(iface);
-
-            if (staIfaceV12 == null) {
-                Log.e(TAG, methodStr
-                        + ": ISupplicantStaIface is null, cannot get advanced capabilities");
-                return 0;
-            }
-
-            try {
-                // Support for new key management types; SAE, SUITE_B, OWE
-                // Requires HAL v1.2 or higher
-                staIfaceV12.getKeyMgmtCapabilities(
-                        (SupplicantStatus statusInternal, int keyMgmtMaskInternal) -> {
-                            status.value = statusInternal.code == SupplicantStatusCode.SUCCESS;
-                            if (status.value) {
-                                keyMgmtMask.value = keyMgmtMaskInternal;
-                            }
-                            checkStatusAndLogFailure(statusInternal, methodStr);
-                        });
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            }
-        } else {
-            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
-        }
-
-        // 0 is returned in case of an error
-        return keyMgmtMask.value;
-    }
-
-    private Mutable<Integer> getWpaDriverCapabilities_1_4(@NonNull String ifaceName) {
-        final String methodStr = "getWpaDriverCapabilities_1_4";
-        Mutable<Integer> drvCapabilitiesMask = new Mutable<>(0);
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-
-        if (null == iface) return drvCapabilitiesMask;
-
-        android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
-                getStaIfaceMockableV1_4(iface);
-        if (null == staIfaceV14) {
-            Log.e(TAG, methodStr
-                    + ": SupplicantStaIface is null, cannot get wpa driver features");
-            return drvCapabilitiesMask;
-        }
-
-        try {
-            staIfaceV14.getWpaDriverCapabilities_1_4(
-                    (android.hardware.wifi.supplicant.V1_4.SupplicantStatus statusInternal,
-                            int drvCapabilities) -> {
-                        if (statusInternal.code
-                                == android.hardware.wifi.supplicant.V1_4
-                                .SupplicantStatusCode.SUCCESS) {
-                            drvCapabilitiesMask.value = drvCapabilities;
-                        }
-                        checkStatusAndLogFailure(statusInternal, methodStr);
-                    });
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-        return drvCapabilitiesMask;
-    }
-
-    private Mutable<Integer> getWpaDriverCapabilities_1_3(@NonNull String ifaceName) {
-        final String methodStr = "getWpaDriverCapabilities_1_3";
-        Mutable<Integer> drvCapabilitiesMask = new Mutable<>(0);
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-
-        if (null == iface) return drvCapabilitiesMask;
-
-        android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
-                getStaIfaceMockableV1_3(iface);
-        if (null == staIfaceV13) {
-            Log.e(TAG, methodStr
-                    + ": SupplicantStaIface is null, cannot get wpa driver features");
-            return drvCapabilitiesMask;
-        }
-
-        try {
-            staIfaceV13.getWpaDriverCapabilities(
-                    (SupplicantStatus statusInternal, int drvCapabilities) -> {
-                        if (statusInternal.code == SupplicantStatusCode.SUCCESS) {
-                            drvCapabilitiesMask.value = drvCapabilities;
-                        }
-                        checkStatusAndLogFailure(statusInternal, methodStr);
-                    });
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-        return drvCapabilitiesMask;
-    }
-
-    /**
-     * Get the driver supported features through supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @return bitmask defined by WifiManager.WIFI_FEATURE_*.
-     */
-    public long getWpaDriverFeatureSet(@NonNull String ifaceName) {
-        final String methodStr = "getWpaDriverFeatureSet";
-        Mutable<Integer> drvCapabilitiesMask = new Mutable<>(0);
-        long featureSet = 0;
-
-        if (isV1_4()) {
-            drvCapabilitiesMask = getWpaDriverCapabilities_1_4(ifaceName);
-        } else if (isV1_3()) {
-            drvCapabilitiesMask = getWpaDriverCapabilities_1_3(ifaceName);
-        } else {
-            Log.i(TAG, "Method " + methodStr + " is not supported in existing HAL");
-            return 0;
-        }
-
-        if ((drvCapabilitiesMask.value & WpaDriverCapabilitiesMask.MBO) != 0) {
-            featureSet |= WIFI_FEATURE_MBO;
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": MBO supported");
-            }
-            if ((drvCapabilitiesMask.value
-                    & WpaDriverCapabilitiesMask.OCE) != 0) {
-                featureSet |= WIFI_FEATURE_OCE;
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, methodStr + ": OCE supported");
-                }
-            }
-        }
-
-        if ((drvCapabilitiesMask.value
-                & android.hardware.wifi.supplicant.V1_4.WpaDriverCapabilitiesMask.SAE_PK) != 0) {
-            featureSet |= WIFI_FEATURE_SAE_PK;
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": SAE-PK supported");
-            }
-        }
-
-        if ((drvCapabilitiesMask.value
-                & android.hardware.wifi.supplicant.V1_4.WpaDriverCapabilitiesMask.WFD_R2) != 0) {
-            featureSet |= WIFI_FEATURE_WFD_R2;
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, methodStr + ": WFD-R2 supported");
-            }
-        }
-
-        return featureSet;
-    }
-
-    private @WifiStandard int getWifiStandard(int technology) {
-        switch(technology) {
-            case WifiTechnology.HE:
-                return ScanResult.WIFI_STANDARD_11AX;
-            case WifiTechnology.VHT:
-                return ScanResult.WIFI_STANDARD_11AC;
-            case WifiTechnology.HT:
-                return ScanResult.WIFI_STANDARD_11N;
-            case WifiTechnology.LEGACY:
-                return ScanResult.WIFI_STANDARD_LEGACY;
-            default:
-                return ScanResult.WIFI_STANDARD_UNKNOWN;
-        }
-    }
-
-    private int getChannelBandwidth(int channelBandwidth) {
-        switch(channelBandwidth) {
-            case WifiChannelWidthInMhz.WIDTH_20:
-                return ScanResult.CHANNEL_WIDTH_20MHZ;
-            case WifiChannelWidthInMhz.WIDTH_40:
-                return ScanResult.CHANNEL_WIDTH_40MHZ;
-            case WifiChannelWidthInMhz.WIDTH_80:
-                return ScanResult.CHANNEL_WIDTH_80MHZ;
-            case WifiChannelWidthInMhz.WIDTH_160:
-                return ScanResult.CHANNEL_WIDTH_160MHZ;
-            case WifiChannelWidthInMhz.WIDTH_80P80:
-                return ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
-            default:
-                return ScanResult.CHANNEL_WIDTH_20MHZ;
-        }
-    }
-
-    private int frameworkToHidlDppAkm(int dppAkm) {
-        switch(dppAkm) {
-            case SupplicantStaIfaceHal.DppAkm.PSK:
-                return DppAkm.PSK;
-            case SupplicantStaIfaceHal.DppAkm.PSK_SAE:
-                return DppAkm.PSK_SAE;
-            case SupplicantStaIfaceHal.DppAkm.SAE:
-                return DppAkm.SAE;
-            case SupplicantStaIfaceHal.DppAkm.DPP:
-                return DppAkm.DPP;
-            default:
-                Log.e(TAG, "Invalid DppAkm received");
-                return -1;
-        }
-    }
-
-    private int frameworkToHidlDppCurve(int dppCurve) {
-        switch(dppCurve) {
-            case SupplicantStaIfaceHal.DppCurve.PRIME256V1:
-                return DppCurve.PRIME256V1;
-            case SupplicantStaIfaceHal.DppCurve.SECP384R1:
-                return DppCurve.SECP384R1;
-            case SupplicantStaIfaceHal.DppCurve.SECP521R1:
-                return DppCurve.SECP521R1;
-            case SupplicantStaIfaceHal.DppCurve.BRAINPOOLP256R1:
-                return DppCurve.BRAINPOOLP256R1;
-            case SupplicantStaIfaceHal.DppCurve.BRAINPOOLP384R1:
-                return DppCurve.BRAINPOOLP384R1;
-            case SupplicantStaIfaceHal.DppCurve.BRAINPOOLP512R1:
-                return DppCurve.BRAINPOOLP512R1;
-            default:
-                Log.e(TAG, "Invalid DppAkm received");
-                return -1;
-        }
-    }
-
-    private int frameworkToHidlDppNetRole(int dppNetRole) {
-        switch(dppNetRole) {
-            case SupplicantStaIfaceHal.DppNetRole.STA:
-                return DppNetRole.STA;
-            case SupplicantStaIfaceHal.DppNetRole.AP:
-                return DppNetRole.AP;
-            default:
-                Log.e(TAG, "Invalid DppNetRole received");
-                return -1;
-        }
-    }
-
-    /**
-     * Returns connection capabilities of the current network
-     *
-     *  This is a v1.3+ HAL feature.
-     * @param ifaceName Name of the interface.
-     * @return connection capabilities of the current network
-     */
-    public WifiNative.ConnectionCapabilities getConnectionCapabilities(@NonNull String ifaceName) {
-        final String methodStr = "getConnectionCapabilities";
-        WifiNative.ConnectionCapabilities capOut = new WifiNative.ConnectionCapabilities();
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return capOut;
-        }
-        if (isV1_4()) {
-            return getConnectionCapabilities_1_4(iface);
-        } else if (isV1_3()) {
-            return getConnectionCapabilities_1_3(iface);
-        } else {
-            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
-        }
-        return capOut;
-    }
-
-    /**
-     * Returns connection MLO links info
-     *
-     * @param ifaceName Name of the interface.
-     * @return null since this method is not supported on Hidl
-     */
-    public WifiNative.ConnectionMloLinksInfo getConnectionMloLinksInfo(@NonNull String ifaceName) {
-        return null;
-    }
-
-    private WifiNative.ConnectionCapabilities getConnectionCapabilities_1_3(
-            @NonNull ISupplicantStaIface iface) {
-        final String methodStr = "getConnectionCapabilities_1_3";
-        WifiNative.ConnectionCapabilities capOut = new WifiNative.ConnectionCapabilities();
-
-        // Get a v1.3 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
-                getStaIfaceMockableV1_3(iface);
-
-        if (staIfaceV13 == null) {
-            Log.e(TAG, methodStr
-                    + ": SupplicantStaIface is null, cannot get Connection Capabilities");
-            return capOut;
-        }
-
-        try {
-            staIfaceV13.getConnectionCapabilities(
-                    (SupplicantStatus statusInternal, ConnectionCapabilities cap) -> {
-                        if (statusInternal.code == SupplicantStatusCode.SUCCESS) {
-                            capOut.wifiStandard = getWifiStandard(cap.technology);
-                            capOut.channelBandwidth = getChannelBandwidth(
-                                    cap.channelBandwidth);
-                            capOut.maxNumberTxSpatialStreams = cap.maxNumberTxSpatialStreams;
-                            capOut.maxNumberRxSpatialStreams = cap.maxNumberRxSpatialStreams;
-                        }
-                        checkStatusAndLogFailure(statusInternal, methodStr);
-                    });
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-        return capOut;
-    }
-
-    private WifiNative.ConnectionCapabilities getConnectionCapabilities_1_4(
-            @NonNull ISupplicantStaIface iface) {
-        final String methodStr = "getConnectionCapabilities_1_4";
-        WifiNative.ConnectionCapabilities capOut = new WifiNative.ConnectionCapabilities();
-        // Get a v1.4 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
-                getStaIfaceMockableV1_4(iface);
-
-        if (staIfaceV14 == null) {
-            Log.e(TAG, methodStr
-                    + ": SupplicantStaIface is null, cannot get Connection Capabilities");
-            return capOut;
-        }
-
-        try {
-            staIfaceV14.getConnectionCapabilities_1_4(
-                    (android.hardware.wifi.supplicant.V1_4.SupplicantStatus statusInternal,
-                            android.hardware.wifi.supplicant.V1_4.ConnectionCapabilities cap)
-                            -> {
-                        if (statusInternal.code == SupplicantStatusCode.SUCCESS) {
-                            capOut.wifiStandard = getWifiStandard(cap.V1_3.technology);
-                            capOut.channelBandwidth = getChannelBandwidth(
-                                    cap.V1_3.channelBandwidth);
-                            capOut.is11bMode = (cap.legacyMode == LegacyMode.B_MODE);
-                            capOut.maxNumberTxSpatialStreams = cap.V1_3.maxNumberTxSpatialStreams;
-                            capOut.maxNumberRxSpatialStreams = cap.V1_3.maxNumberRxSpatialStreams;
-                        }
-                        checkStatusAndLogFailure(statusInternal, methodStr);
-                    });
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-        return capOut;
-    }
-    /**
-     * Adds a DPP peer URI to the URI list.
-     *
-     *  This is a v1.2+ HAL feature.
-     *  Returns an ID to be used later to refer to this URI (>0).
-     *  On error, or if these features are not supported, -1 is returned.
-     */
-    public int addDppPeerUri(@NonNull String ifaceName, @NonNull String uri) {
-        final String methodStr = "addDppPeerUri";
-        Mutable<Boolean> status = new Mutable<>(false);
-        Mutable<Integer> bootstrapId = new Mutable<>(-1);
-
-        if (!isV1_2()) {
-            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
-            return -1;
-        }
-
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return -1;
-        }
-
-        // Get a v1.2 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
-                getStaIfaceMockableV1_2(iface);
-
-        if (staIfaceV12 == null) {
-            Log.e(TAG, methodStr + ": ISupplicantStaIface is null");
-            return -1;
-        }
-
-        try {
-            // Support for DPP (Easy connect)
-            // Requires HAL v1.2 or higher
-            staIfaceV12.addDppPeerUri(uri,
-                    (SupplicantStatus statusInternal, int bootstrapIdInternal) -> {
-                        status.value = statusInternal.code == SupplicantStatusCode.SUCCESS;
-                        if (status.value) {
-                            bootstrapId.value = bootstrapIdInternal;
-                        }
-                        checkStatusAndLogFailure(statusInternal, methodStr);
-                    });
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-            return -1;
-        }
-
-        return bootstrapId.value;
-    }
-
-    /**
-     * Removes a DPP URI to the URI list given an ID.
-     *
-     *  This is a v1.2+ HAL feature.
-     *  Returns true when operation is successful
-     *  On error, or if these features are not supported, false is returned.
-     */
-    public boolean removeDppUri(@NonNull String ifaceName, int bootstrapId)  {
-        final String methodStr = "removeDppUri";
-
-        if (!isV1_2()) {
-            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
-            return false;
-        }
-
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return false;
-        }
-
-        // Get a v1.2 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
-                getStaIfaceMockableV1_2(iface);
-
-        if (staIfaceV12 == null) {
-            Log.e(TAG, methodStr + ": ISupplicantStaIface is null");
-            return false;
-        }
-
-        try {
-            // Support for DPP (Easy connect)
-            // Requires HAL v1.2 or higher
-            SupplicantStatus status = staIfaceV12.removeDppUri(bootstrapId);
-            return checkStatusAndLogFailure(status, methodStr);
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-
-        return false;
-    }
-
-    /**
-     * Stops/aborts DPP Initiator request
-     *
-     *  This is a v1.2+ HAL feature.
-     *  Returns true when operation is successful
-     *  On error, or if these features are not supported, false is returned.
-     */
-    public boolean stopDppInitiator(@NonNull String ifaceName)  {
-        final String methodStr = "stopDppInitiator";
-
-        if (!isV1_2()) {
-            return false;
-        }
-
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return false;
-        }
-
-        // Get a v1.2 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
-                getStaIfaceMockableV1_2(iface);
-
-        if (staIfaceV12 == null) {
-            Log.e(TAG, methodStr + ": ISupplicantStaIface is null");
-            return false;
-        }
-
-        try {
-            // Support for DPP (Easy connect)
-            // Requires HAL v1.2 or higher
-            SupplicantStatus status = staIfaceV12.stopDppInitiator();
-            return checkStatusAndLogFailure(status, methodStr);
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-
-        return false;
-    }
-
-    /**
-     * Starts DPP Configurator-Initiator request
-     *
-     *  This is a v1.2+ HAL feature.
-     *  Returns true when operation is successful
-     *  On error, or if these features are not supported, false is returned.
-     */
-    public boolean startDppConfiguratorInitiator(@NonNull String ifaceName, int peerBootstrapId,
-            int ownBootstrapId, @NonNull String ssid, String password, String psk,
-            int netRole, int securityAkm, byte[] privEckey)  {
-        final String methodStr = "startDppConfiguratorInitiator";
-
-        if (!isV1_2()) {
-            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
-            return false;
-        }
-
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return false;
-        }
-
-        // Get a v1.2 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
-                getStaIfaceMockableV1_2(iface);
-
-        if (staIfaceV12 == null) {
-            Log.e(TAG, methodStr + ": ISupplicantStaIface is null");
-            return false;
-        }
-
-        try {
-            // Support for DPP (Easy connect)
-            // Requires HAL v1.2 or higher
-            SupplicantStatus status = staIfaceV12.startDppConfiguratorInitiator(peerBootstrapId,
-                    ownBootstrapId, ssid, password != null ? password : "", psk != null ? psk : "",
-                    frameworkToHidlDppNetRole(netRole), frameworkToHidlDppAkm(securityAkm));
-            return checkStatusAndLogFailure(status, methodStr);
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-
-        return false;
-    }
-
-    /**
-     * Starts DPP Enrollee-Initiator request
-     *
-     *  This is a v1.2+ HAL feature.
-     *  Returns true when operation is successful
-     *  On error, or if these features are not supported, false is returned.
-     */
-    public boolean startDppEnrolleeInitiator(@NonNull String ifaceName, int peerBootstrapId,
-            int ownBootstrapId)  {
-        final String methodStr = "startDppEnrolleeInitiator";
-
-        if (!isV1_2()) {
-            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
-            return false;
-        }
-
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return false;
-        }
-
-        // Get a v1.2 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface staIfaceV12 =
-                getStaIfaceMockableV1_2(iface);
-
-        if (staIfaceV12 == null) {
-            Log.e(TAG, methodStr + ": ISupplicantStaIface is null");
-            return false;
-        }
-
-        try {
-            // Support for DPP (Easy connect)
-            // Requires HAL v1.2 or higher
-            SupplicantStatus status = staIfaceV12.startDppEnrolleeInitiator(peerBootstrapId,
-                    ownBootstrapId);
-            return checkStatusAndLogFailure(status, methodStr);
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-
-        return false;
-    }
-
-    /**
-     * Generate a DPP QR code based boot strap info
-     *
-     *  This is a v1.4+ HAL feature.
-     *  Returns DppResponderBootstrapInfo;
-     */
-    public WifiNative.DppBootstrapQrCodeInfo generateDppBootstrapInfoForResponder(
-            @NonNull String ifaceName, String macAddress, @NonNull String deviceInfo,
-            int dppCurve) {
-        final String methodStr = "generateDppBootstrapInfoForResponder";
-        Mutable<Boolean> status = new Mutable<>(false);
-        WifiNative.DppBootstrapQrCodeInfo bootstrapInfoOut =
-                new WifiNative.DppBootstrapQrCodeInfo();
-
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return bootstrapInfoOut;
-        }
-
-        // Get a v1.4 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
-                getStaIfaceMockableV1_4(iface);
-
-        if (staIfaceV14 == null) {
-            Log.e(TAG, methodStr + ": SupplicantStaIface V1.4 is null");
-            return bootstrapInfoOut;
-        }
-
-        try {
-            // Support for DPP Responder
-            // Requires HAL v1.4 or higher
-            staIfaceV14.generateDppBootstrapInfoForResponder(
-                    NativeUtil.macAddressToByteArray(macAddress), deviceInfo,
-                    frameworkToHidlDppCurve(dppCurve),
-                    (android.hardware.wifi.supplicant.V1_4.SupplicantStatus statusInternal,
-                            android.hardware.wifi.supplicant.V1_4
-                                    .DppResponderBootstrapInfo info) -> {
-                        if (statusInternal.code == SupplicantStatusCode.SUCCESS) {
-                            bootstrapInfoOut.bootstrapId = info.bootstrapId;
-                            bootstrapInfoOut.listenChannel = info.listenChannel;
-                            bootstrapInfoOut.uri = info.uri;
-                        }
-                        checkStatusAndLogFailure(statusInternal, methodStr);
-                    });
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-            return bootstrapInfoOut;
-        }
-
-        return bootstrapInfoOut;
-    }
-
-    /**
-     * Starts DPP Enrollee-Responder request
-     *
-     *  This is a v1.4+ HAL feature.
-     *  Returns true when operation is successful
-     *  On error, or if these features are not supported, false is returned.
-     */
-    public boolean startDppEnrolleeResponder(@NonNull String ifaceName, int listenChannel) {
-        final String methodStr = "startDppEnrolleeResponder";
-
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return false;
-        }
-
-        // Get a v1.4 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
-                getStaIfaceMockableV1_4(iface);
-
-        if (staIfaceV14 == null) {
-            Log.e(TAG, methodStr + ": ISupplicantStaIface V1.4 is null");
-            return false;
-        }
-
-        try {
-            // Support for DPP Responder
-            // Requires HAL v1.4 or higher
-            android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
-                    staIfaceV14.startDppEnrolleeResponder(listenChannel);
-            return checkStatusAndLogFailure(status, methodStr);
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-
-        return false;
-    }
-
-    /**
-     * Stops/aborts DPP Responder request.
-     *
-     *  This is a v1.4+ HAL feature.
-     *  Returns true when operation is successful
-     *  On error, or if these features are not supported, false is returned.
-     */
-    public boolean stopDppResponder(@NonNull String ifaceName, int ownBootstrapId)  {
-        final String methodStr = "stopDppResponder";
-
-        ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-        if (iface == null) {
-            return false;
-        }
-
-        // Get a v1.4 supplicant STA Interface
-        android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface staIfaceV14 =
-                getStaIfaceMockableV1_4(iface);
-
-        if (staIfaceV14 == null) {
-            Log.e(TAG, methodStr + ": ISupplicantStaIface V1.4 is null");
-            return false;
-        }
-
-        try {
-            // Support for DPP Responder
-            // Requires HAL v1.4 or higher
-            android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
-                    staIfaceV14.stopDppResponder(ownBootstrapId);
-            return checkStatusAndLogFailure(status, methodStr);
-        } catch (RemoteException e) {
-            handleRemoteException(e, methodStr);
-        }
-
-        return false;
-    }
-
-
-    /**
-     * Register callbacks for DPP events.
-     *
-     * @param dppCallback DPP callback object.
-     */
-    public void registerDppCallback(DppEventCallback dppCallback) {
-        mDppCallback = dppCallback;
-    }
-
-    protected DppEventCallback getDppCallback() {
-        return mDppCallback;
-    }
-
-    /**
-     * Set MBO cellular data availability.
-     *
-     * @param ifaceName Name of the interface.
-     * @param available true means cellular data available, false otherwise.
-     * @return None.
-     */
-    public boolean setMboCellularDataStatus(@NonNull String ifaceName, boolean available) {
-        final String methodStr = "setMboCellularDataStatus";
-
-        if (isV1_3()) {
-            ISupplicantStaIface iface = checkSupplicantStaIfaceAndLogFailure(ifaceName, methodStr);
-            if (iface == null) {
-                return false;
-            }
-
-            // Get a v1.3 supplicant STA Interface
-            android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface staIfaceV13 =
-                    getStaIfaceMockableV1_3(iface);
-            if (staIfaceV13 == null) {
-                Log.e(TAG, methodStr
-                        + ": SupplicantStaIface is null, cannot update cell status");
-                return false;
-            }
-
-            try {
-                SupplicantStatus status = staIfaceV13.setMboCellularDataStatus(available);
-                return checkStatusAndLogFailure(status, methodStr);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            }
-        } else {
-            Log.e(TAG, "Method " + methodStr + " is not supported in existing HAL");
-            return false;
-        }
-
-        return false;
-    }
-
-    /**
-     * Check if we've roamed to a linked network and make the linked network the current network
-     * if we have.
-     *
-     * @param ifaceName Name of the interface.
-     * @param newNetworkId Network id of the new network we've roamed to. If fromFramework is
-     *                     {@code true}, this will be a framework network id. Otherwise, this will
-     *                     be a remote network id.
-     * @param fromFramework {@code true} if the network id is a framework network id, {@code false}
-                            if the network id is a remote network id.
-     * @return true if we've roamed to a linked network, false if not.
-     */
-    public boolean updateOnLinkedNetworkRoaming(
-            @NonNull String ifaceName, int newNetworkId, boolean fromFramework) {
-        synchronized (mLock) {
-            List<Pair<SupplicantStaNetworkHalHidlImpl, WifiConfiguration>> linkedNetworkHandles =
-                    mLinkedNetworkLocalAndRemoteConfigs.get(ifaceName);
-            SupplicantStaNetworkHalHidlImpl currentHandle =
-                    getCurrentNetworkRemoteHandle(ifaceName);
-            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
-            if (linkedNetworkHandles == null || currentHandle == null || currentConfig == null) {
-                return false;
-            }
-            if (fromFramework ? currentConfig.networkId == newNetworkId
-                    : currentHandle.getNetworkId() == newNetworkId) {
-                return false;
-            }
-            for (Pair<SupplicantStaNetworkHalHidlImpl, WifiConfiguration> pair
-                    : linkedNetworkHandles) {
-                if (fromFramework ? pair.second.networkId == newNetworkId
-                        : pair.first.getNetworkId() == newNetworkId) {
-                    Log.i(TAG, "Roamed to linked network, "
-                            + "make linked network as current network");
-                    mCurrentNetworkRemoteHandles.put(ifaceName, pair.first);
-                    mCurrentNetworkLocalConfigs.put(ifaceName, pair.second);
-                    return true;
-                }
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Updates the linked networks for the current network and sends them to the supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @param networkId network id of the network to link the configurations to.
-     * @param linkedConfigurations Map of config profile key to config for linking.
-     * @return true if networks were successfully linked, false otherwise.
-     */
-    public boolean updateLinkedNetworks(@NonNull String ifaceName, int networkId,
-            Map<String, WifiConfiguration> linkedConfigurations) {
-        synchronized (mLock) {
-            WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
-            SupplicantStaNetworkHalHidlImpl currentHandle =
-                    getCurrentNetworkRemoteHandle(ifaceName);
-
-            if (currentConfig == null || currentHandle == null) {
-                Log.e(TAG, "current network not configured yet.");
-                return false;
-            }
-
-            if (networkId != currentConfig.networkId) {
-                Log.e(TAG, "current config network id is not matching");
-                return false;
-            }
-
-            final int remoteNetworkId = currentHandle.getNetworkId();
-            if (remoteNetworkId == -1) {
-                Log.e(TAG, "current handle getNetworkId failed");
-                return false;
-            }
-
-            if (!removeAllNetworksExcept(ifaceName, remoteNetworkId)) {
-                Log.e(TAG, "couldn't remove non-current supplicant networks");
-                return false;
-            }
-
-            mLinkedNetworkLocalAndRemoteConfigs.remove(ifaceName);
-
-            if (linkedConfigurations == null || linkedConfigurations.size() == 0) {
-                Log.i(TAG, "cleared linked networks");
-                return true;
-            }
-
-            List<Pair<SupplicantStaNetworkHalHidlImpl, WifiConfiguration>> linkedNetworkHandles =
-                    new ArrayList<>();
-            linkedNetworkHandles.add(new Pair(currentHandle, currentConfig));
-            for (String linkedNetwork : linkedConfigurations.keySet()) {
-                Log.i(TAG, "add linked network: " + linkedNetwork);
-                Pair<SupplicantStaNetworkHalHidlImpl, WifiConfiguration> pair =
-                        addNetworkAndSaveConfig(ifaceName, linkedConfigurations.get(linkedNetwork));
-                if (pair == null) {
-                    Log.e(TAG, "failed to add/save linked network: " + linkedNetwork);
-                    return false;
-                }
-                pair.first.enable(true);
-                linkedNetworkHandles.add(pair);
-            }
-
-            mLinkedNetworkLocalAndRemoteConfigs.put(ifaceName, linkedNetworkHandles);
-
-            return true;
-        }
-    }
-
-    /**
-     * Remove all networks except the supplied network ID from supplicant
-     *
-     * @param ifaceName Name of the interface
-     * @param networkId network id to keep
-     */
-    private boolean removeAllNetworksExcept(@NonNull String ifaceName, int networkId) {
-        synchronized (mLock) {
-            List<Integer> networks = listNetworks(ifaceName);
-            if (networks == null) {
-                Log.e(TAG, "removeAllNetworksExcept failed, got null networks");
-                return false;
-            }
-            for (int id : networks) {
-                if (networkId == id) {
-                    continue;
-                }
-                if (!removeNetwork(ifaceName, id)) {
-                    Log.e(TAG, "removeAllNetworksExcept failed to remove network: " + id);
-                    return false;
-                }
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Gets the security params of the current network associated with this interface
-     *
-     * @param ifaceName Name of the interface
-     * @return Security params of the current network associated with the interface
-     */
-    public SecurityParams getCurrentNetworkSecurityParams(@NonNull String ifaceName) {
-        WifiConfiguration currentConfig = getCurrentNetworkLocalConfig(ifaceName);
-
-        if (currentConfig == null) {
-            return null;
-        }
-
-        return currentConfig.getNetworkSelectionStatus().getCandidateSecurityParams();
-    }
-
-    /**
-     * Set whether the network-centric QoS policy feature is enabled or not for this interface.
-     *
-     * @param ifaceName name of the interface.
-     * @param isEnabled true if feature is enabled, false otherwise.
-     * @return true without action since this is not a supported feature.
-     */
-    public boolean setNetworkCentricQosPolicyFeatureEnabled(@NonNull String ifaceName,
-            boolean isEnabled) {
-        return false;
-    }
-
-    /**
-     * Sends a QoS policy response.
-     *
-     * @param ifaceName Name of the interface.
-     * @param qosPolicyRequestId Dialog token to identify the request.
-     * @param morePolicies Flag to indicate more QoS policies can be accommodated.
-     * @param qosPolicyStatusList List of framework QosPolicyStatus objects.
-     * @return true if response is sent successfully, false otherwise.
-     */
-    public boolean sendQosPolicyResponse(String ifaceName, int qosPolicyRequestId,
-            boolean morePolicies,
-            @NonNull List<SupplicantStaIfaceHal.QosPolicyStatus> qosPolicyStatusList) {
-        Log.e(TAG, "sendQosPolicyResponse is not supported by the HIDL HAL");
-        return false;
-    }
-
-    /**
-     * Indicates the removal of all active QoS policies configured by the AP.
-     *
-     * @param ifaceName Name of the interface.
-     */
-    public boolean removeAllQosPolicies(String ifaceName) {
-        Log.e(TAG, "removeAllQosPolicies is not supported by the HIDL HAL");
-        return false;
-    }
-
-    /**
-     * Generate DPP credential for network access
-     *
-     * @param ifaceName Name of the interface.
-     * @param ssid ssid of the network
-     * @param privEcKey Private EC Key for DPP Configurator
-     * Returns false. Not Supported throuh HIDL
-     */
-    public boolean generateSelfDppConfiguration(@NonNull String ifaceName, @NonNull String ssid,
-            byte[] privEcKey) {
-        Log.d(TAG, "generateSelfDppConfiguration is not supported");
-        return false;
-    }
-
-    /**
-     * Set the currently configured network's anonymous identity.
-     *
-     * @param ifaceName Name of the interface.
-     * @param anonymousIdentity the anonymouns identity.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean setEapAnonymousIdentity(@NonNull String ifaceName, String anonymousIdentity) {
-        synchronized (mLock) {
-            SupplicantStaNetworkHalHidlImpl networkHandle =
-                    checkSupplicantStaNetworkAndLogFailure(ifaceName, "setEapAnonymousIdentity");
-            if (networkHandle == null) return false;
-            try {
-                return networkHandle.setEapAnonymousIdentity(
-                        NativeUtil.stringToByteArrayList(anonymousIdentity));
-            } catch (IllegalArgumentException ex) {
-                return false;
-            }
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackAidlImpl.java b/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackAidlImpl.java
deleted file mode 100644
index c8d9ff9..0000000
--- a/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackAidlImpl.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import android.annotation.NonNull;
-import android.hardware.wifi.supplicant.GsmRand;
-import android.hardware.wifi.supplicant.ISupplicantStaNetworkCallback;
-import android.hardware.wifi.supplicant.NetworkRequestEapSimGsmAuthParams;
-import android.hardware.wifi.supplicant.NetworkRequestEapSimUmtsAuthParams;
-import android.hardware.wifi.supplicant.TransitionDisableIndication;
-
-import com.android.server.wifi.util.NativeUtil;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.CharacterCodingException;
-import java.nio.charset.CharsetDecoder;
-import java.nio.charset.StandardCharsets;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-
-class SupplicantStaNetworkCallbackAidlImpl extends ISupplicantStaNetworkCallback.Stub {
-    private static final String TAG = "SupplicantStaNetworkCallbackAidlImpl";
-    private final SupplicantStaNetworkHalAidlImpl mNetworkHal;
-    /**
-     * Current configured network's framework network id.
-     */
-    private final int mFrameworkNetworkId;
-    /**
-     * Current configured network's ssid.
-     */
-    private final String mSsid;
-    private final String mIfaceName;
-    private final WifiMonitor mWifiMonitor;
-    private final Object mLock;
-
-    SupplicantStaNetworkCallbackAidlImpl(
-            @NonNull SupplicantStaNetworkHalAidlImpl networkHal,
-            int frameworkNetworkId, @NonNull String ssid,
-            @NonNull String ifaceName, @NonNull Object lock, @NonNull WifiMonitor wifiMonitor) {
-        mNetworkHal = networkHal;
-        mFrameworkNetworkId = frameworkNetworkId;
-        mSsid = ssid;
-        mIfaceName = ifaceName;
-        mLock = lock;
-        mWifiMonitor = wifiMonitor;
-    }
-
-    @Override
-    public void onNetworkEapSimGsmAuthRequest(NetworkRequestEapSimGsmAuthParams params) {
-        synchronized (mLock) {
-            mNetworkHal.logCallback("onNetworkEapSimGsmAuthRequest");
-            String[] data = new String[params.rands.length];
-            int i = 0;
-            for (GsmRand rand : params.rands) {
-                data[i++] = NativeUtil.hexStringFromByteArray(rand.data);
-            }
-            mWifiMonitor.broadcastNetworkGsmAuthRequestEvent(
-                    mIfaceName, mFrameworkNetworkId, mSsid, data);
-        }
-    }
-
-    @Override
-    public void onNetworkEapSimUmtsAuthRequest(NetworkRequestEapSimUmtsAuthParams params) {
-        synchronized (mLock) {
-            mNetworkHal.logCallback("onNetworkEapSimUmtsAuthRequest");
-            String randHex = NativeUtil.hexStringFromByteArray(params.rand);
-            String autnHex = NativeUtil.hexStringFromByteArray(params.autn);
-            String[] data = {randHex, autnHex};
-            mWifiMonitor.broadcastNetworkUmtsAuthRequestEvent(
-                    mIfaceName, mFrameworkNetworkId, mSsid, data);
-        }
-    }
-
-    @Override
-    public void onNetworkEapIdentityRequest() {
-        synchronized (mLock) {
-            mNetworkHal.logCallback("onNetworkEapIdentityRequest");
-            mWifiMonitor.broadcastNetworkIdentityRequestEvent(
-                    mIfaceName, mFrameworkNetworkId, mSsid);
-        }
-    }
-
-    @Override
-    public void onTransitionDisable(int indicationBits) {
-        synchronized (mLock) {
-            mNetworkHal.logCallback("onTransitionDisable");
-            int frameworkBits = 0;
-            if ((indicationBits & TransitionDisableIndication.USE_WPA3_PERSONAL) != 0) {
-                frameworkBits |= WifiMonitor.TDI_USE_WPA3_PERSONAL;
-            }
-            if ((indicationBits & TransitionDisableIndication.USE_SAE_PK) != 0) {
-                frameworkBits |= WifiMonitor.TDI_USE_SAE_PK;
-            }
-            if ((indicationBits & TransitionDisableIndication.USE_WPA3_ENTERPRISE) != 0) {
-                frameworkBits |= WifiMonitor.TDI_USE_WPA3_ENTERPRISE;
-            }
-            if ((indicationBits & TransitionDisableIndication.USE_ENHANCED_OPEN) != 0) {
-                frameworkBits |= WifiMonitor.TDI_USE_ENHANCED_OPEN;
-            }
-            if (frameworkBits == 0) {
-                return;
-            }
-
-            mWifiMonitor.broadcastTransitionDisableEvent(
-                    mIfaceName, mFrameworkNetworkId, frameworkBits);
-        }
-    }
-
-    private String byteArrayToString(byte[] byteArray) {
-        // Not a valid bytes for a string
-        if (byteArray == null) return null;
-        CharsetDecoder decoder = StandardCharsets.UTF_8.newDecoder();
-        try {
-            CharBuffer decoded = decoder.decode(ByteBuffer.wrap(byteArray));
-            return decoded.toString();
-        } catch (CharacterCodingException cce) {
-        }
-        return null;
-    }
-
-    @Override
-    public void onServerCertificateAvailable(
-            int depth,
-            byte[] subjectBytes,
-            byte[] certHashBytes,
-            byte[] certBytes) {
-        synchronized (mLock) {
-            // OpenSSL default maximum depth is 100.
-            if (depth < 0 || depth > 100) {
-                mNetworkHal.logCallback("onServerCertificateAvailable: invalid depth " + depth);
-                return;
-            }
-            if (null == subjectBytes) {
-                mNetworkHal.logCallback("onServerCertificateAvailable: subject is null.");
-                return;
-            }
-            if (null == certHashBytes) {
-                mNetworkHal.logCallback("onServerCertificateAvailable: cert hash is null.");
-                return;
-            }
-            if (null == certBytes) {
-                mNetworkHal.logCallback("onServerCertificateAvailable: cert is null.");
-                return;
-            }
-
-            mNetworkHal.logCallback("onServerCertificateAvailable: "
-                    + " depth=" + depth
-                    + " subjectBytes size=" + subjectBytes.length
-                    + " certHashBytes size=" + certHashBytes.length
-                    + " certBytes size=" + certBytes.length);
-
-            if (0 == certHashBytes.length) return;
-            if (0 == certBytes.length) return;
-
-            String subject = byteArrayToString(subjectBytes);
-            if (null == subject) {
-                mNetworkHal.logCallback(
-                        "onServerCertificateAvailable: cannot convert subject bytes to string.");
-                return;
-            }
-            String certHash = byteArrayToString(certHashBytes);
-            if (null == subject) {
-                mNetworkHal.logCallback(
-                        "onServerCertificateAvailable: cannot convert cert hash bytes to string.");
-                return;
-            }
-            X509Certificate cert = null;
-            try {
-                CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
-                InputStream in = new ByteArrayInputStream(certBytes);
-                cert = (X509Certificate) certFactory.generateCertificate(in);
-            } catch (CertificateException e) {
-                cert = null;
-                mNetworkHal.logCallback(
-                        "onServerCertificateAvailable: "
-                        + "Failed to get instance for CertificateFactory: " + e);
-            } catch (IllegalArgumentException e) {
-                cert = null;
-                mNetworkHal.logCallback(
-                        "onServerCertificateAvailable: Failed to decode the data: " + e);
-            }
-            if (null == cert) {
-                mNetworkHal.logCallback(
-                        "onServerCertificateAvailable: Failed to read certificate.");
-                return;
-            }
-
-            mNetworkHal.logCallback("onServerCertificateAvailable:"
-                    + " depth=" + depth
-                    + " subject=" + subject
-                    + " certHash=" + certHash
-                    + " cert=" + cert);
-            mWifiMonitor.broadcastCertificationEvent(
-                    mIfaceName, mFrameworkNetworkId, mSsid, depth, cert);
-        }
-    }
-
-    @Override
-    public String getInterfaceHash() {
-        return ISupplicantStaNetworkCallback.HASH;
-    }
-
-    @Override
-    public int getInterfaceVersion() {
-        return ISupplicantStaNetworkCallback.VERSION;
-    }
-}
diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackHidlImpl.java b/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackImpl.java
similarity index 91%
rename from service/java/com/android/server/wifi/SupplicantStaNetworkCallbackHidlImpl.java
rename to service/java/com/android/server/wifi/SupplicantStaNetworkCallbackImpl.java
index 73e0327..68cb888 100644
--- a/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackHidlImpl.java
+++ b/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackImpl.java
@@ -20,8 +20,8 @@
 
 import com.android.server.wifi.util.NativeUtil;
 
-class SupplicantStaNetworkCallbackHidlImpl extends ISupplicantStaNetworkCallback.Stub {
-    private final SupplicantStaNetworkHalHidlImpl mNetworkHal;
+class SupplicantStaNetworkCallbackImpl extends ISupplicantStaNetworkCallback.Stub {
+    private final SupplicantStaNetworkHal mNetworkHal;
 
     /**
      * Current configured network's framework network id.
@@ -38,8 +38,8 @@
 
     private final WifiMonitor mWifiMonitor;
 
-    SupplicantStaNetworkCallbackHidlImpl(
-            @NonNull SupplicantStaNetworkHalHidlImpl networkHal,
+    SupplicantStaNetworkCallbackImpl(
+            @NonNull SupplicantStaNetworkHal networkHal,
             int frameworkNetworkId, String ssid,
             @NonNull String ifaceName, @NonNull Object lock, @NonNull WifiMonitor wifiMonitor) {
         mNetworkHal = networkHal;
diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackHidlV1_4Impl.java b/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackV1_4Impl.java
similarity index 87%
rename from service/java/com/android/server/wifi/SupplicantStaNetworkCallbackHidlV1_4Impl.java
rename to service/java/com/android/server/wifi/SupplicantStaNetworkCallbackV1_4Impl.java
index 26759f8..bbb08c4 100644
--- a/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackHidlV1_4Impl.java
+++ b/service/java/com/android/server/wifi/SupplicantStaNetworkCallbackV1_4Impl.java
@@ -17,9 +17,10 @@
 
 import android.annotation.NonNull;
 import android.hardware.wifi.supplicant.V1_4.ISupplicantStaNetworkCallback;
+import android.hardware.wifi.supplicant.V1_4.ISupplicantStaNetworkCallback.TransitionDisableIndication;
 
-class SupplicantStaNetworkCallbackHidlV1_4Impl extends ISupplicantStaNetworkCallback.Stub {
-    private final SupplicantStaNetworkHalHidlImpl mNetworkHal;
+class SupplicantStaNetworkCallbackV1_4Impl extends ISupplicantStaNetworkCallback.Stub {
+    private final SupplicantStaNetworkHal mNetworkHal;
 
     /**
      * Current configured network's framework network id.
@@ -36,10 +37,10 @@
 
     private final Object mLock;
 
-    private SupplicantStaNetworkHalHidlImpl.SupplicantStaNetworkHalCallback mCallbackV10;
+    private SupplicantStaNetworkHal.SupplicantStaNetworkHalCallback mCallbackV10;
 
-    SupplicantStaNetworkCallbackHidlV1_4Impl(
-            @NonNull SupplicantStaNetworkHalHidlImpl networkHal,
+    SupplicantStaNetworkCallbackV1_4Impl(
+            @NonNull SupplicantStaNetworkHal networkHal,
             int frameworkNetworkId, @NonNull String ssid,
             @NonNull String ifaceName, @NonNull Object lock, @NonNull WifiMonitor wifiMonitor) {
         mNetworkHal = networkHal;
diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkHalHidlImpl.java b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
similarity index 98%
rename from service/java/com/android/server/wifi/SupplicantStaNetworkHalHidlImpl.java
rename to service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
index d26e2a9..717edbb 100644
--- a/service/java/com/android/server/wifi/SupplicantStaNetworkHalHidlImpl.java
+++ b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
@@ -61,7 +61,7 @@
  * access level) acquires mLock.
  */
 @ThreadSafe
-public class SupplicantStaNetworkHalHidlImpl {
+public class SupplicantStaNetworkHal {
     private static final String TAG = "SupplicantStaNetworkHal";
     @VisibleForTesting
     public static final String ID_STRING_KEY_FQDN = "fqdn";
@@ -135,7 +135,7 @@
     private String mWapiCertSuite;
     private long mAdvanceKeyMgmtFeatures;
 
-    SupplicantStaNetworkHalHidlImpl(ISupplicantStaNetwork iSupplicantStaNetwork, String ifaceName,
+    SupplicantStaNetworkHal(ISupplicantStaNetwork iSupplicantStaNetwork, String ifaceName,
             Context context, WifiMonitor monitor, WifiGlobals wifiGlobals,
             long advanceKeyMgmtFeature) {
         mISupplicantStaNetwork = iSupplicantStaNetwork;
@@ -151,9 +151,9 @@
      *
      * @param enable true to enable, false to disable.
      */
-    void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
+    void enableVerboseLogging(boolean enable) {
         synchronized (mLock) {
-            mVerboseLoggingEnabled = verboseEnabled;
+            mVerboseLoggingEnabled = enable;
         }
     }
 
@@ -306,10 +306,8 @@
             }
             Log.d(TAG, "The target security params: " + securityParams);
 
-            boolean isRequirePmf = getOptimalPmfSettingForConfig(config,
-                    securityParams.isRequirePmf());
             /** RequirePMF */
-            if (!setRequirePmf(isRequirePmf)) {
+            if (!setRequirePmf(securityParams.isRequirePmf())) {
                 Log.e(TAG, config.SSID + ": failed to set requirePMF: " + config.requirePmf);
                 return false;
             }
@@ -827,6 +825,7 @@
 
     /**
      * Maps WifiConfiguration Key Management BitSet to Supplicant HIDL bitmask int
+     * TODO(b/32571829): Update mapping when fast transition keys are added
      *
      * @return bitmask int describing the allowed Key Management schemes, readable by the Supplicant
      * HIDL hal
@@ -1933,7 +1932,7 @@
     }
 
     /** See ISupplicantStaNetwork.hal for documentation */
-    public boolean setEapAnonymousIdentity(java.util.ArrayList<Byte> identity) {
+    private boolean setEapAnonymousIdentity(java.util.ArrayList<Byte> identity) {
         synchronized (mLock) {
             final String methodStr = "setEapAnonymousIdentity";
             if (!checkISupplicantStaNetworkAndLogFailure(methodStr)) return false;
@@ -2338,13 +2337,13 @@
                 Mutable<Boolean> statusOk = new Mutable<>(false);
                 iSupplicantStaNetworkV13.getProto_1_3(
                         (SupplicantStatus status, int protoMaskValue) -> {
-                            statusOk.value = status.code == SupplicantStatusCode.SUCCESS;
-                            if (statusOk.value) {
-                                this.mProtoMask = protoMaskValue;
-                            } else {
-                                checkStatusAndLogFailure(status, methodStr);
-                            }
-                    });
+                    statusOk.value = status.code == SupplicantStatusCode.SUCCESS;
+                    if (statusOk.value) {
+                        this.mProtoMask = protoMaskValue;
+                    } else {
+                        checkStatusAndLogFailure(status, methodStr);
+                    }
+                });
                 return statusOk.value;
             } catch (RemoteException e) {
                 handleRemoteException(e, methodStr);
@@ -3217,8 +3216,6 @@
                     }
                     ISupplicantStaNetwork.NetworkResponseEapSimGsmAuthParams param =
                             new ISupplicantStaNetwork.NetworkResponseEapSimGsmAuthParams();
-                    param.kc = new byte[8];
-                    param.sres = new byte[4];
                     byte[] kc = NativeUtil.hexStringToByteArray(match.group(1));
                     if (kc == null || kc.length != param.kc.length) {
                         Log.e(TAG, "Invalid kc value: " + match.group(1));
@@ -3404,7 +3401,7 @@
      * service, null otherwise.
      */
     protected android.hardware.wifi.supplicant.V1_1.ISupplicantStaNetwork
-            getSupplicantStaNetworkForV1_1Mockable() {
+    getSupplicantStaNetworkForV1_1Mockable() {
         if (mISupplicantStaNetwork == null) return null;
         return android.hardware.wifi.supplicant.V1_1.ISupplicantStaNetwork.castFrom(
                 mISupplicantStaNetwork);
@@ -3823,29 +3820,6 @@
     }
 
     /**
-     * Update PMF requirement if auto-upgrade offload is supported.
-     *
-     * If SAE auto-upgrade offload is supported and this config enables
-     * both PSK and SAE, do not set PMF requirement to
-     * mandatory to allow the device to roam between PSK and SAE BSSes.
-     * wpa_supplicant will set PMF requirement to optional by default.
-     */
-    private boolean getOptimalPmfSettingForConfig(WifiConfiguration config,
-            boolean isPmfRequiredFromSelectedSecurityParams) {
-        if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)
-                && config.getSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK).isEnabled()
-                && config.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE)
-                && config.getSecurityParams(WifiConfiguration.SECURITY_TYPE_SAE).isEnabled()
-                && mWifiGlobals.isWpa3SaeUpgradeOffloadEnabled()) {
-            if (mVerboseLoggingEnabled) {
-                Log.d(TAG, "Keep optional PMF for SAE auto-upgrade offload.");
-            }
-            return false;
-        }
-        return isPmfRequiredFromSelectedSecurityParams;
-    }
-
-    /**
      * Adds both PSK and SAE AKM if auto-upgrade offload is supported.
      */
     private BitSet addPskSaeUpgradableTypeFlagsIfSupported(
@@ -3931,17 +3905,17 @@
     }
 
     protected class SupplicantStaNetworkHalCallbackV1_4
-            extends SupplicantStaNetworkCallbackHidlV1_4Impl {
+            extends SupplicantStaNetworkCallbackV1_4Impl {
         SupplicantStaNetworkHalCallbackV1_4(int frameworkNetworkId, String ssid) {
-            super(SupplicantStaNetworkHalHidlImpl.this,
+            super(SupplicantStaNetworkHal.this,
                     frameworkNetworkId, ssid,
                     mIfaceName, mLock, mWifiMonitor);
         }
     }
 
-    protected class SupplicantStaNetworkHalCallback extends SupplicantStaNetworkCallbackHidlImpl {
+    protected class SupplicantStaNetworkHalCallback extends SupplicantStaNetworkCallbackImpl {
         SupplicantStaNetworkHalCallback(int frameworkNetworkId, String ssid) {
-            super(SupplicantStaNetworkHalHidlImpl.this,
+            super(SupplicantStaNetworkHal.this,
                     frameworkNetworkId, ssid,
                     mIfaceName, mLock, mWifiMonitor);
         }
diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkHalAidlImpl.java b/service/java/com/android/server/wifi/SupplicantStaNetworkHalAidlImpl.java
deleted file mode 100644
index b1a7b01..0000000
--- a/service/java/com/android/server/wifi/SupplicantStaNetworkHalAidlImpl.java
+++ /dev/null
@@ -1,3702 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import android.content.Context;
-import android.hardware.wifi.supplicant.AuthAlgMask;
-import android.hardware.wifi.supplicant.DppConnectionKeys;
-import android.hardware.wifi.supplicant.EapMethod;
-import android.hardware.wifi.supplicant.EapPhase2Method;
-import android.hardware.wifi.supplicant.GroupCipherMask;
-import android.hardware.wifi.supplicant.GroupMgmtCipherMask;
-import android.hardware.wifi.supplicant.ISupplicantStaNetwork;
-import android.hardware.wifi.supplicant.ISupplicantStaNetworkCallback;
-import android.hardware.wifi.supplicant.KeyMgmtMask;
-import android.hardware.wifi.supplicant.NetworkResponseEapSimGsmAuthParams;
-import android.hardware.wifi.supplicant.NetworkResponseEapSimUmtsAuthParams;
-import android.hardware.wifi.supplicant.OcspType;
-import android.hardware.wifi.supplicant.PairwiseCipherMask;
-import android.hardware.wifi.supplicant.ProtoMask;
-import android.hardware.wifi.supplicant.SaeH2eMode;
-import android.net.wifi.SecurityParams;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiEnterpriseConfig;
-import android.net.wifi.WifiManager;
-import android.os.RemoteException;
-import android.os.ServiceSpecificException;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wifi.util.ArrayUtils;
-import com.android.server.wifi.util.NativeUtil;
-import com.android.wifi.resources.R;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.annotation.concurrent.ThreadSafe;
-
-/**
- * Wrapper class for ISupplicantStaNetwork HAL calls. Gets and sets supplicant sta network variables
- * and interacts with networks.
- * Public fields should be treated as invalid until their 'get' method is called, which will set the
- * value if it returns true
- * To maintain thread-safety, the locking protocol is that every non-static method (regardless of
- * access level) acquires mLock.
- */
-@ThreadSafe
-public class SupplicantStaNetworkHalAidlImpl {
-    private static final String TAG = "SupplicantStaNetworkHalAidlImpl";
-    @VisibleForTesting
-    public static final String ID_STRING_KEY_FQDN = "fqdn";
-    @VisibleForTesting
-    public static final String ID_STRING_KEY_CREATOR_UID = "creatorUid";
-    @VisibleForTesting
-    public static final String ID_STRING_KEY_CONFIG_KEY = "configKey";
-
-    /**
-     * Regex pattern for extracting the GSM sim authentication response params from a string.
-     * Matches a strings like the following: "[:<kc_value>:<sres_value>]";
-     */
-    private static final Pattern GSM_AUTH_RESPONSE_PARAMS_PATTERN =
-            Pattern.compile(":([0-9a-fA-F]+):([0-9a-fA-F]+)");
-    /**
-     * Regex pattern for extracting the UMTS sim authentication response params from a string.
-     * Matches a strings like the following: ":<ik_value>:<ck_value>:<res_value>";
-     */
-    private static final Pattern UMTS_AUTH_RESPONSE_PARAMS_PATTERN =
-            Pattern.compile("^:([0-9a-fA-F]+):([0-9a-fA-F]+):([0-9a-fA-F]+)$");
-    /**
-     * Regex pattern for extracting the UMTS sim auts response params from a string.
-     * Matches a strings like the following: ":<auts_value>";
-     */
-    private static final Pattern UMTS_AUTS_RESPONSE_PARAMS_PATTERN =
-            Pattern.compile("^:([0-9a-fA-F]+)$");
-
-    private final Object mLock = new Object();
-    private final Context mContext;
-    private final String mIfaceName;
-    private final WifiMonitor mWifiMonitor;
-    private final WifiGlobals mWifiGlobals;
-    private ISupplicantStaNetwork mISupplicantStaNetwork;
-    private ISupplicantStaNetworkCallback mISupplicantStaNetworkCallback;
-
-    private boolean mVerboseLoggingEnabled = false;
-    // Network variables read from wpa_supplicant.
-    private int mNetworkId;
-    private byte[] mSsid;
-    private byte[/* 6 */] mBssid;
-    private boolean mScanSsid;
-    private int mKeyMgmtMask;
-    private int mProtoMask;
-    private int mAuthAlgMask;
-    private int mGroupCipherMask;
-    private int mPairwiseCipherMask;
-    private int mGroupMgmtCipherMask;
-    private String mPskPassphrase;
-    private String mSaePassword;
-    private String mSaePasswordId;
-    private byte[] mPsk;
-    private byte[] mWepKey;
-    private int mWepTxKeyIdx;
-    private boolean mRequirePmf;
-    private String mIdStr;
-    private int mEapMethod;
-    private int mEapPhase2Method;
-    private byte[] mEapIdentity;
-    private byte[] mEapAnonymousIdentity;
-    private byte[] mEapPassword;
-    private String mEapCACert;
-    private String mEapCAPath;
-    private String mEapClientCert;
-    private String mEapPrivateKeyId;
-    private String mEapSubjectMatch;
-    private String mEapAltSubjectMatch;
-    private boolean mEapEngine;
-    private String mEapEngineID;
-    private String mEapDomainSuffixMatch;
-    private @WifiEnterpriseConfig.Ocsp int mOcsp;
-    private String mWapiCertSuite;
-    private long mAdvanceKeyMgmtFeatures;
-
-    SupplicantStaNetworkHalAidlImpl(ISupplicantStaNetwork staNetwork, String ifaceName,
-            Context context, WifiMonitor monitor, WifiGlobals wifiGlobals,
-            long advanceKeyMgmtFeature) {
-        mISupplicantStaNetwork = staNetwork;
-        mContext = context;
-        mIfaceName = ifaceName;
-        mWifiMonitor = monitor;
-        mWifiGlobals = wifiGlobals;
-        mAdvanceKeyMgmtFeatures = advanceKeyMgmtFeature;
-    }
-
-    /**
-     * Enable/Disable verbose logging.
-     *
-     * @param enable true to enable, false to disable.
-     */
-    void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        synchronized (mLock) {
-            mVerboseLoggingEnabled = verboseEnabled;
-        }
-    }
-
-    /**
-     * Read network variables from wpa_supplicant into the provided WifiConfiguration object.
-     *
-     * @param config WifiConfiguration object to be populated.
-     * @param networkExtras Map of network extras parsed from wpa_supplicant.
-     * @return true if succeeds, false otherwise.
-     * @throws IllegalArgumentException on malformed configuration params.
-     */
-    @VisibleForTesting
-    public boolean loadWifiConfiguration(WifiConfiguration config,
-            Map<String, String> networkExtras) throws IllegalArgumentException {
-        synchronized (mLock) {
-            if (config == null) {
-                return false;
-            }
-            /** SSID */
-            config.SSID = null;
-            if (getSsid() && !ArrayUtils.isEmpty(mSsid)) {
-                config.SSID = NativeUtil.encodeSsid(NativeUtil.byteArrayToArrayList(mSsid));
-            } else {
-                Log.e(TAG, "failed to read ssid");
-                return false;
-            }
-            /** Network Id */
-            config.networkId = -1;
-            if (getId()) {
-                config.networkId = mNetworkId;
-            } else {
-                Log.e(TAG, "getId failed");
-                return false;
-            }
-            /** BSSID */
-            config.getNetworkSelectionStatus().setNetworkSelectionBSSID(null);
-            if (getBssid() && !ArrayUtils.isEmpty(mBssid)) {
-                config.getNetworkSelectionStatus().setNetworkSelectionBSSID(
-                        NativeUtil.macAddressFromByteArray(mBssid));
-            }
-            /** Scan SSID (Is Hidden Network?) */
-            config.hiddenSSID = false;
-            if (getScanSsid()) {
-                config.hiddenSSID = mScanSsid;
-            }
-            /** Require PMF*/
-            config.requirePmf = false;
-            if (getRequirePmf()) {
-                config.requirePmf = mRequirePmf;
-            }
-            /** WEP keys **/
-            config.wepTxKeyIndex = -1;
-            if (getWepTxKeyIdx()) {
-                config.wepTxKeyIndex = mWepTxKeyIdx;
-            }
-            for (int i = 0; i < 4; i++) {
-                config.wepKeys[i] = null;
-                if (getWepKey(i) && !ArrayUtils.isEmpty(mWepKey)) {
-                    config.wepKeys[i] = NativeUtil.bytesToHexOrQuotedString(
-                            NativeUtil.byteArrayToArrayList(mWepKey));
-                }
-            }
-
-            /** allowedKeyManagement */
-            if (getKeyMgmt()) {
-                BitSet keyMgmtMask = supplicantToWifiConfigurationKeyMgmtMask(mKeyMgmtMask);
-                keyMgmtMask = removeFastTransitionFlags(keyMgmtMask);
-                keyMgmtMask = removeSha256KeyMgmtFlags(keyMgmtMask);
-                keyMgmtMask = removePskSaeUpgradableTypeFlags(keyMgmtMask);
-                config.setSecurityParams(keyMgmtMask);
-                config.enableFils(
-                        keyMgmtMask.get(WifiConfiguration.KeyMgmt.FILS_SHA256),
-                        keyMgmtMask.get(WifiConfiguration.KeyMgmt.FILS_SHA384));
-            }
-
-            // supplicant only have one valid security type, it won't be a disbled params.
-            SecurityParams securityParams = config.getDefaultSecurityParams();
-
-            /** PSK passphrase */
-            config.preSharedKey = null;
-            if (getPskPassphrase() && !TextUtils.isEmpty(mPskPassphrase)) {
-                if (securityParams.isSecurityType(WifiConfiguration.SECURITY_TYPE_WAPI_PSK)) {
-                    config.preSharedKey = mPskPassphrase;
-                } else {
-                    config.preSharedKey = NativeUtil.addEnclosingQuotes(mPskPassphrase);
-                }
-            } else if (getPsk() && !ArrayUtils.isEmpty(mPsk)) {
-                config.preSharedKey = NativeUtil.hexStringFromByteArray(mPsk);
-            } /* Do not read SAE password */
-
-            /** metadata: idstr */
-            if (getIdStr() && !TextUtils.isEmpty(mIdStr)) {
-                Map<String, String> metadata = parseNetworkExtra(mIdStr);
-                networkExtras.putAll(metadata);
-            } else {
-                Log.w(TAG, "getIdStr failed or empty");
-            }
-
-            /** WAPI Cert Suite */
-            if (securityParams.isSecurityType(WifiConfiguration.SECURITY_TYPE_WAPI_CERT)) {
-                if (config.enterpriseConfig == null) {
-                    return false;
-                }
-                config.enterpriseConfig.setEapMethod(
-                        WifiEnterpriseConfig.Eap.WAPI_CERT);
-                /** WAPI Certificate Suite. */
-                if (getWapiCertSuite() && !TextUtils.isEmpty(mWapiCertSuite)) {
-                    config.enterpriseConfig.setWapiCertSuite(mWapiCertSuite);
-                }
-                return true;
-            }
-            return loadWifiEnterpriseConfig(config.SSID, config.enterpriseConfig);
-        }
-    }
-
-    /**
-     * Read network variables from the provided WifiConfiguration object into wpa_supplicant.
-     *
-     * @param config WifiConfiguration object to be saved.
-     * @return true if succeeds, false otherwise.
-     * @throws IllegalArgumentException on malformed configuration params.
-     */
-    public boolean saveWifiConfiguration(WifiConfiguration config) throws IllegalArgumentException {
-        synchronized (mLock) {
-            if (config == null) {
-                return false;
-            }
-            /** SSID */
-            if (config.SSID != null) {
-                if (!setSsid(NativeUtil.byteArrayFromArrayList(
-                        NativeUtil.decodeSsid(config.SSID)))) {
-                    Log.e(TAG, "failed to set SSID: " + config.SSID);
-                    return false;
-                }
-            }
-            /** BSSID */
-            String bssidStr = config.getNetworkSelectionStatus().getNetworkSelectionBSSID();
-            if (bssidStr != null) {
-                byte[] bssid = NativeUtil.macAddressToByteArray(bssidStr);
-                if (!setBssid(bssid)) {
-                    Log.e(TAG, "failed to set BSSID: " + bssidStr);
-                    return false;
-                }
-            }
-            /** HiddenSSID */
-            if (!setScanSsid(config.hiddenSSID)) {
-                Log.e(TAG, config.SSID + ": failed to set hiddenSSID: " + config.hiddenSSID);
-                return false;
-            }
-
-            SecurityParams securityParams = config.getNetworkSelectionStatus()
-                    .getCandidateSecurityParams();
-            if (securityParams == null) {
-                Log.wtf(TAG, "No available security params.");
-                return false;
-            }
-            Log.d(TAG, "The target security params: " + securityParams);
-
-            boolean isRequirePmf = getOptimalPmfSettingForConfig(config,
-                    securityParams.isRequirePmf());
-            /** RequirePMF */
-            if (!setRequirePmf(isRequirePmf)) {
-                Log.e(TAG, config.SSID + ": failed to set requirePMF: " + config.requirePmf);
-                return false;
-            }
-            /** Key Management Scheme */
-            BitSet allowedKeyManagement = securityParams.getAllowedKeyManagement();
-            if (allowedKeyManagement.cardinality() != 0) {
-                // Add FT flags if supported.
-                BitSet keyMgmtMask = addFastTransitionFlags(allowedKeyManagement);
-                // Add SHA256 key management flags.
-                keyMgmtMask = addSha256KeyMgmtFlags(keyMgmtMask);
-                // Add upgradable type key management flags for PSK/SAE.
-                keyMgmtMask = addPskSaeUpgradableTypeFlagsIfSupported(config, keyMgmtMask);
-                if (!setKeyMgmt(wifiConfigurationToSupplicantKeyMgmtMask(keyMgmtMask))) {
-                    Log.e(TAG, "failed to set Key Management");
-                    return false;
-                }
-                // Check and set SuiteB configurations.
-                if (keyMgmtMask.get(WifiConfiguration.KeyMgmt.SUITE_B_192)
-                        && !saveSuiteBConfig(config)) {
-                    Log.e(TAG, "failed to set Suite-B-192 configuration");
-                    return false;
-                }
-                // Check and set DPP Connection keys
-                if (keyMgmtMask.get(WifiConfiguration.KeyMgmt.DPP)
-                        && !saveDppConnectionConfig(config)) {
-                    Log.e(TAG, "failed to set DPP connection params");
-                    return false;
-                }
-            }
-            /** Security Protocol */
-            BitSet allowedProtocols = securityParams.getAllowedProtocols();
-            if (allowedProtocols.cardinality() != 0
-                    && !setProto(wifiConfigurationToSupplicantProtoMask(allowedProtocols))) {
-                Log.e(TAG, "failed to set Security Protocol");
-                return false;
-            }
-            /** Auth Algorithm */
-            BitSet allowedAuthAlgorithms = securityParams.getAllowedAuthAlgorithms();
-            if (allowedAuthAlgorithms.cardinality() != 0
-                    && !setAuthAlg(wifiConfigurationToSupplicantAuthAlgMask(
-                    allowedAuthAlgorithms))) {
-                Log.e(TAG, "failed to set AuthAlgorithm");
-                return false;
-            }
-            /** Group Cipher */
-            BitSet allowedGroupCiphers = securityParams.getAllowedGroupCiphers();
-            if (allowedGroupCiphers.cardinality() != 0
-                    && (!setGroupCipher(wifiConfigurationToSupplicantGroupCipherMask(
-                    allowedGroupCiphers)))) {
-                Log.e(TAG, "failed to set Group Cipher");
-                return false;
-            }
-            /** Pairwise Cipher*/
-            BitSet allowedPairwiseCiphers = securityParams.getAllowedPairwiseCiphers();
-            if (allowedPairwiseCiphers.cardinality() != 0
-                    && !setPairwiseCipher(wifiConfigurationToSupplicantPairwiseCipherMask(
-                    allowedPairwiseCiphers))) {
-                Log.e(TAG, "failed to set PairwiseCipher");
-                return false;
-            }
-            /** Pre Shared Key */
-            // For PSK, this can either be quoted ASCII passphrase or hex string for raw psk.
-            // For SAE, password must be a quoted ASCII string
-            if (config.preSharedKey != null) {
-                if (securityParams.isSecurityType(WifiConfiguration.SECURITY_TYPE_WAPI_PSK)) {
-                    if (!setPskPassphrase(config.preSharedKey)) {
-                        Log.e(TAG, "failed to set wapi psk passphrase");
-                        return false;
-                    }
-                } else if (config.preSharedKey.startsWith("\"")) {
-                    if (securityParams.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE)) {
-                        /* WPA3 case, field is SAE Password */
-                        if (!setSaePassword(
-                                NativeUtil.removeEnclosingQuotes(config.preSharedKey))) {
-                            Log.e(TAG, "failed to set sae password");
-                            return false;
-                        }
-                    } else {
-                        if (!setPskPassphrase(
-                                NativeUtil.removeEnclosingQuotes(config.preSharedKey))) {
-                            Log.e(TAG, "failed to set psk passphrase");
-                            return false;
-                        }
-                    }
-                } else {
-                    if (securityParams.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE)) {
-                        return false;
-                    }
-                    if (!setPsk(NativeUtil.hexStringToByteArray(config.preSharedKey))) {
-                        Log.e(TAG, "failed to set psk");
-                        return false;
-                    }
-                }
-            }
-            /** Wep Keys */
-            boolean hasSetKey = false;
-            if (config.wepKeys != null) {
-                for (int i = 0; i < config.wepKeys.length; i++) {
-                    if (config.wepKeys[i] != null) {
-                        if (!setWepKey(i, NativeUtil.byteArrayFromArrayList(
-                                NativeUtil.hexOrQuotedStringToBytes(config.wepKeys[i])))) {
-                            Log.e(TAG, "failed to set wep_key " + i);
-                            return false;
-                        }
-                        hasSetKey = true;
-                    }
-                }
-            }
-            /** Wep Tx Key Idx */
-            if (hasSetKey) {
-                if (!setWepTxKeyIdx(config.wepTxKeyIndex)) {
-                    Log.e(TAG, "failed to set wep_tx_keyidx: " + config.wepTxKeyIndex);
-                    return false;
-                }
-            }
-            /** metadata: FQDN + ConfigKey + CreatorUid */
-            final Map<String, String> metadata = new HashMap<String, String>();
-            if (config.isPasspoint()) {
-                metadata.put(ID_STRING_KEY_FQDN, config.FQDN);
-                /** Selected RCOI */
-                if (!setSelectedRcoi(config.enterpriseConfig.getSelectedRcoi())) {
-                    Log.e(TAG, "failed to set selected RCOI");
-                    return false;
-                }
-            }
-            metadata.put(ID_STRING_KEY_CONFIG_KEY, config.getProfileKey());
-            metadata.put(ID_STRING_KEY_CREATOR_UID, Integer.toString(config.creatorUid));
-            if (!setIdStr(createNetworkExtra(metadata))) {
-                Log.e(TAG, "failed to set id string");
-                return false;
-            }
-            /** UpdateIdentifier */
-            if (config.updateIdentifier != null
-                    && !setUpdateIdentifier(Integer.parseInt(config.updateIdentifier))) {
-                Log.e(TAG, "failed to set update identifier");
-                return false;
-            }
-            /** SAE configuration */
-            if (securityParams.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE)) {
-                /**
-                 * Hash-to-Element preference.
-                 * For devices that don't support H2E, H2E mode will be permanently disabled.
-                 * Devices that support H2E will enable both legacy and H2E mode by default,
-                 * and will connect to SAE networks with H2E if possible, unless H2E only
-                 * mode is enabled, and then the device will not connect to SAE networks in
-                 * legacy mode.
-                 */
-                if (!mWifiGlobals.isWpa3SaeH2eSupported() && securityParams.isSaeH2eOnlyMode()) {
-                    Log.e(TAG, "This device does not support SAE H2E.");
-                    return false;
-                }
-                byte mode = mWifiGlobals.isWpa3SaeH2eSupported()
-                        ? SaeH2eMode.H2E_OPTIONAL
-                        : SaeH2eMode.DISABLED;
-                if (securityParams.isSaeH2eOnlyMode()) {
-                    mode = SaeH2eMode.H2E_MANDATORY;
-                }
-                if (!setSaeH2eMode(mode)) {
-                    Log.e(TAG, "failed to set H2E preference.");
-                    return false;
-                }
-            }
-            // Finish here if no EAP config to set
-            if (config.enterpriseConfig != null
-                    && config.enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.NONE) {
-                if (config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.WAPI_CERT) {
-                    /** WAPI certificate suite name*/
-                    String param = config.enterpriseConfig
-                            .getFieldValue(WifiEnterpriseConfig.WAPI_CERT_SUITE_KEY);
-                    if (!TextUtils.isEmpty(param) && !setWapiCertSuite(param)) {
-                        Log.e(TAG, config.SSID + ": failed to set WAPI certificate suite: "
-                                + param);
-                        return false;
-                    }
-                    return true;
-                } else if (!saveWifiEnterpriseConfig(config.SSID, config.enterpriseConfig)) {
-                    return false;
-                }
-            }
-
-            // Now that the network is configured fully, start listening for callback events.
-            return registerNewCallback(config.networkId, config.SSID);
-        }
-    }
-
-    /**
-     * Read network variables from wpa_supplicant into the provided WifiEnterpriseConfig object.
-     *
-     * @param ssid      SSID of the network. (Used for logging purposes only)
-     * @param eapConfig WifiEnterpriseConfig object to be populated.
-     * @return true if succeeds, false otherwise.
-     */
-    private boolean loadWifiEnterpriseConfig(String ssid, WifiEnterpriseConfig eapConfig) {
-        synchronized (mLock) {
-            if (eapConfig == null) {
-                return false;
-            }
-            /** EAP method */
-            if (getEapMethod()) {
-                eapConfig.setEapMethod(supplicantToWifiConfigurationEapMethod(mEapMethod));
-            } else {
-                // Invalid eap method could be because it's not an enterprise config.
-                Log.e(TAG, "Failed to get eap method. Assuming not an enterprise network");
-                return true;
-            }
-            /** EAP Phase 2 method */
-            if (getEapPhase2Method()) {
-                eapConfig.setPhase2Method(
-                        supplicantToWifiConfigurationEapPhase2Method(mEapPhase2Method));
-            } else {
-                // We cannot have an invalid eap phase 2 method. Return failure.
-                Log.e(TAG, "Failed to get eap phase2 method");
-                return false;
-            }
-            /** EAP Identity */
-            if (getEapIdentity() && !ArrayUtils.isEmpty(mEapIdentity)) {
-                eapConfig.setFieldValue(
-                        WifiEnterpriseConfig.IDENTITY_KEY,
-                        NativeUtil.stringFromByteArray(mEapIdentity));
-            }
-            /** EAP Anonymous Identity */
-            if (getEapAnonymousIdentity() && !ArrayUtils.isEmpty(mEapAnonymousIdentity)) {
-                eapConfig.setFieldValue(
-                        WifiEnterpriseConfig.ANON_IDENTITY_KEY,
-                        NativeUtil.stringFromByteArray(mEapAnonymousIdentity));
-            }
-            /** EAP Password */
-            if (getEapPassword() && !ArrayUtils.isEmpty(mEapPassword)) {
-                eapConfig.setFieldValue(
-                        WifiEnterpriseConfig.PASSWORD_KEY,
-                        NativeUtil.stringFromByteArray(mEapPassword));
-            }
-            /** EAP Client Cert */
-            if (getEapClientCert() && !TextUtils.isEmpty(mEapClientCert)) {
-                eapConfig.setFieldValue(WifiEnterpriseConfig.CLIENT_CERT_KEY, mEapClientCert);
-            }
-            /** EAP CA Cert */
-            if (getEapCACert() && !TextUtils.isEmpty(mEapCACert)) {
-                eapConfig.setFieldValue(WifiEnterpriseConfig.CA_CERT_KEY, mEapCACert);
-            }
-            /** EAP OCSP type */
-            if (getOcsp()) {
-                eapConfig.setOcsp(mOcsp);
-            }
-            /** EAP Subject Match */
-            if (getEapSubjectMatch() && !TextUtils.isEmpty(mEapSubjectMatch)) {
-                eapConfig.setFieldValue(WifiEnterpriseConfig.SUBJECT_MATCH_KEY, mEapSubjectMatch);
-            }
-            /** EAP Engine ID */
-            if (getEapEngineId() && !TextUtils.isEmpty(mEapEngineID)) {
-                eapConfig.setFieldValue(WifiEnterpriseConfig.ENGINE_ID_KEY, mEapEngineID);
-            }
-            /** EAP Engine. Set this only if the engine id is non null. */
-            if (getEapEngine() && !TextUtils.isEmpty(mEapEngineID)) {
-                eapConfig.setFieldValue(
-                        WifiEnterpriseConfig.ENGINE_KEY,
-                        mEapEngine
-                                ? WifiEnterpriseConfig.ENGINE_ENABLE
-                                : WifiEnterpriseConfig.ENGINE_DISABLE);
-            }
-            /** EAP Private Key */
-            if (getEapPrivateKeyId() && !TextUtils.isEmpty(mEapPrivateKeyId)) {
-                eapConfig.setFieldValue(WifiEnterpriseConfig.PRIVATE_KEY_ID_KEY, mEapPrivateKeyId);
-            }
-            /** EAP Alt Subject Match */
-            if (getEapAltSubjectMatch() && !TextUtils.isEmpty(mEapAltSubjectMatch)) {
-                eapConfig.setFieldValue(
-                        WifiEnterpriseConfig.ALTSUBJECT_MATCH_KEY, mEapAltSubjectMatch);
-            }
-            /** EAP Domain Suffix Match */
-            if (getEapDomainSuffixMatch() && !TextUtils.isEmpty(mEapDomainSuffixMatch)) {
-                eapConfig.setFieldValue(
-                        WifiEnterpriseConfig.DOM_SUFFIX_MATCH_KEY, mEapDomainSuffixMatch);
-            }
-            /** EAP CA Path*/
-            if (getEapCAPath() && !TextUtils.isEmpty(mEapCAPath)) {
-                eapConfig.setFieldValue(WifiEnterpriseConfig.CA_PATH_KEY, mEapCAPath);
-            }
-            return true;
-        }
-    }
-
-    /**
-     * save network variables from the provided dpp configuration to wpa_supplicant.
-     *
-     * @param config wificonfiguration object to be saved
-     * @return true if succeeds, false otherwise.
-     */
-    private boolean saveDppConnectionConfig(WifiConfiguration config) {
-        synchronized (mLock) {
-            final String methodStr = "setDppKeys";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                DppConnectionKeys keys = new DppConnectionKeys();
-                keys.connector = config.getDppConnector();
-                keys.cSign = config.getDppCSignKey();
-                keys.netAccessKey = config.getDppNetAccessKey();
-                mISupplicantStaNetwork.setDppKeys(keys);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Save network variables from the provided SuiteB configuration to wpa_supplicant.
-     *
-     * @param config WifiConfiguration object to be saved
-     * @return true if succeeds, false otherwise.
-     */
-    private boolean saveSuiteBConfig(WifiConfiguration config) {
-        synchronized (mLock) {
-            SecurityParams securityParams = config.getNetworkSelectionStatus()
-                    .getCandidateSecurityParams();
-            if (securityParams == null) {
-                Log.wtf(TAG, "No available security params.");
-                return false;
-            }
-
-            /** Group Cipher **/
-            BitSet allowedGroupCiphers = securityParams.getAllowedGroupCiphers();
-            if (allowedGroupCiphers.cardinality() != 0
-                    && !setGroupCipher(wifiConfigurationToSupplicantGroupCipherMask(
-                    allowedGroupCiphers))) {
-                Log.e(TAG, "Failed to set Group Cipher");
-                return false;
-            }
-            /** Pairwise Cipher*/
-            BitSet allowedPairwiseCiphers = securityParams.getAllowedPairwiseCiphers();
-            if (allowedPairwiseCiphers.cardinality() != 0
-                    && !setPairwiseCipher(wifiConfigurationToSupplicantPairwiseCipherMask(
-                    allowedPairwiseCiphers))) {
-                Log.e(TAG, "Failed to set PairwiseCipher");
-                return false;
-            }
-            /** GroupMgmt Cipher */
-            BitSet allowedGroupManagementCiphers =
-                    securityParams.getAllowedGroupManagementCiphers();
-            if (allowedGroupManagementCiphers.cardinality() != 0
-                    && !setGroupMgmtCipher(wifiConfigurationToSupplicantGroupMgmtCipherMask(
-                    allowedGroupManagementCiphers))) {
-                Log.e(TAG, "Failed to set GroupMgmtCipher");
-                return false;
-            }
-
-            BitSet allowedSuiteBCiphers = securityParams.getAllowedSuiteBCiphers();
-            if (allowedSuiteBCiphers.get(WifiConfiguration.SuiteBCipher.ECDHE_RSA)) {
-                if (!enableTlsSuiteBEapPhase1Param(true)) {
-                    Log.e(TAG, "Failed to set TLSSuiteB");
-                    return false;
-                }
-            } else if (allowedSuiteBCiphers.get(WifiConfiguration.SuiteBCipher.ECDHE_ECDSA)) {
-                if (!enableSuiteBEapOpenSslCiphers()) {
-                    Log.e(TAG, "Failed to set OpensslCipher");
-                    return false;
-                }
-            }
-
-            return true;
-        }
-    }
-
-    /**
-     * Save network variables from the provided WifiEnterpriseConfig object to wpa_supplicant.
-     *
-     * @param ssid SSID of the network. (Used for logging purposes only)
-     * @param eapConfig WifiEnterpriseConfig object to be saved.
-     * @return true if succeeds, false otherwise.
-     */
-    private boolean saveWifiEnterpriseConfig(String ssid, WifiEnterpriseConfig eapConfig) {
-        synchronized (mLock) {
-            if (eapConfig == null) {
-                return false;
-            }
-            /** EAP method */
-            if (!setEapMethod(wifiConfigurationToSupplicantEapMethod(eapConfig.getEapMethod()))) {
-                Log.e(TAG, ssid + ": failed to set eap method: " + eapConfig.getEapMethod());
-                return false;
-            }
-            /** EAP Phase 2 method */
-            if (!setEapPhase2Method(wifiConfigurationToSupplicantEapPhase2Method(
-                    eapConfig.getPhase2Method()))) {
-                Log.e(TAG, ssid + ": failed to set eap phase 2 method: "
-                        + eapConfig.getPhase2Method());
-                return false;
-            }
-            String eapParam = null;
-            /** EAP Identity */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.IDENTITY_KEY);
-            if (!TextUtils.isEmpty(eapParam)
-                    && !setEapIdentity(NativeUtil.stringToByteArray(eapParam))) {
-                Log.e(TAG, ssid + ": failed to set eap identity: " + eapParam);
-                return false;
-            }
-            /** EAP Anonymous Identity */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.ANON_IDENTITY_KEY);
-            if (!TextUtils.isEmpty(eapParam)) {
-                String decoratedUsernamePrefix =
-                        eapConfig.getFieldValue(WifiEnterpriseConfig.DECORATED_IDENTITY_PREFIX_KEY);
-                if (!TextUtils.isEmpty(decoratedUsernamePrefix)) {
-                    eapParam = decoratedUsernamePrefix + eapParam;
-                }
-                if (!setEapAnonymousIdentity(NativeUtil.stringToByteArray(eapParam))) {
-                    Log.e(TAG, ssid + ": failed to set eap anonymous identity: " + eapParam);
-                    return false;
-                }
-            }
-            /** EAP Password */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.PASSWORD_KEY);
-            if (!TextUtils.isEmpty(eapParam)
-                    && !setEapPassword(NativeUtil.stringToByteArray(eapParam))) {
-                Log.e(TAG, ssid + ": failed to set eap password");
-                return false;
-            }
-            /** EAP Client Cert */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.CLIENT_CERT_KEY);
-            if (!TextUtils.isEmpty(eapParam) && !setEapClientCert(eapParam)) {
-                Log.e(TAG, ssid + ": failed to set eap client cert: " + eapParam);
-                return false;
-            }
-            /** EAP CA Cert */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.CA_CERT_KEY);
-            if (!TextUtils.isEmpty(eapParam) && !setEapCACert(eapParam)) {
-                Log.e(TAG, ssid + ": failed to set eap ca cert: " + eapParam);
-                return false;
-            }
-            /** EAP Subject Match */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.SUBJECT_MATCH_KEY);
-            if (!TextUtils.isEmpty(eapParam) && !setEapSubjectMatch(eapParam)) {
-                Log.e(TAG, ssid + ": failed to set eap subject match: " + eapParam);
-                return false;
-            }
-            /** EAP Engine ID */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.ENGINE_ID_KEY);
-            if (!TextUtils.isEmpty(eapParam) && !setEapEngineID(eapParam)) {
-                Log.e(TAG, ssid + ": failed to set eap engine id: " + eapParam);
-                return false;
-            }
-            /** EAP Engine */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.ENGINE_KEY);
-            if (!TextUtils.isEmpty(eapParam) && !setEapEngine(
-                    eapParam.equals(WifiEnterpriseConfig.ENGINE_ENABLE) ? true : false)) {
-                Log.e(TAG, ssid + ": failed to set eap engine: " + eapParam);
-                return false;
-            }
-            /** EAP Private Key */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.PRIVATE_KEY_ID_KEY);
-            if (!TextUtils.isEmpty(eapParam) && !setEapPrivateKeyId(eapParam)) {
-                Log.e(TAG, ssid + ": failed to set eap private key: " + eapParam);
-                return false;
-            }
-            /** EAP Alt Subject Match */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.ALTSUBJECT_MATCH_KEY);
-            if (!TextUtils.isEmpty(eapParam) && !setEapAltSubjectMatch(eapParam)) {
-                Log.e(TAG, ssid + ": failed to set eap alt subject match: " + eapParam);
-                return false;
-            }
-            /** EAP Domain Suffix Match */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.DOM_SUFFIX_MATCH_KEY);
-            if (!TextUtils.isEmpty(eapParam) && !setEapDomainSuffixMatch(eapParam)) {
-                Log.e(TAG, ssid + ": failed to set eap domain suffix match: " + eapParam);
-                return false;
-            }
-            /** EAP CA Path*/
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.CA_PATH_KEY);
-            if (!TextUtils.isEmpty(eapParam) && !setEapCAPath(eapParam)) {
-                Log.e(TAG, ssid + ": failed to set eap ca path: " + eapParam);
-                return false;
-            }
-            /** EAP Proactive Key Caching */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.OPP_KEY_CACHING);
-            if (!TextUtils.isEmpty(eapParam)
-                    && !setEapProactiveKeyCaching(eapParam.equals("1") ? true : false)) {
-                Log.e(TAG, ssid + ": failed to set proactive key caching: " + eapParam);
-                return false;
-            }
-            /** OCSP (Online Certificate Status Protocol) */
-            if (!setOcsp(eapConfig.getOcsp())) {
-                Log.e(TAG, "failed to set ocsp");
-                return false;
-            }
-            /** EAP ERP */
-            eapParam = eapConfig.getFieldValue(WifiEnterpriseConfig.EAP_ERP);
-            if (!TextUtils.isEmpty(eapParam) && eapParam.equals("1")) {
-                if (!setEapErp(true)) {
-                    Log.e(TAG, ssid + ": failed to set eap erp");
-                    return false;
-                }
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Maps WifiConfiguration Key Management BitSet to Supplicant AIDL bitmask int
-     *
-     * @return bitmask int describing the allowed Key Management schemes, readable by the Supplicant
-     * AIDL hal
-     */
-    private static int wifiConfigurationToSupplicantKeyMgmtMask(BitSet keyMgmt) {
-        int mask = 0;
-        for (int bit = keyMgmt.nextSetBit(0); bit != -1;
-                bit = keyMgmt.nextSetBit(bit + 1)) {
-            switch (bit) {
-                case WifiConfiguration.KeyMgmt.NONE:
-                    mask |= KeyMgmtMask.NONE;
-                    break;
-                case WifiConfiguration.KeyMgmt.WPA_PSK:
-                    mask |= KeyMgmtMask.WPA_PSK;
-                    break;
-                case WifiConfiguration.KeyMgmt.WPA_EAP:
-                    mask |= KeyMgmtMask.WPA_EAP;
-                    break;
-                case WifiConfiguration.KeyMgmt.IEEE8021X:
-                    mask |= KeyMgmtMask.IEEE8021X;
-                    break;
-                case WifiConfiguration.KeyMgmt.OSEN:
-                    mask |= KeyMgmtMask.OSEN;
-                    break;
-                case WifiConfiguration.KeyMgmt.FT_PSK:
-                    mask |= KeyMgmtMask.FT_PSK;
-                    break;
-                case WifiConfiguration.KeyMgmt.FT_EAP:
-                    mask |= KeyMgmtMask.FT_EAP;
-                    break;
-                case WifiConfiguration.KeyMgmt.OWE:
-                    mask |= KeyMgmtMask.OWE;
-                    break;
-                case WifiConfiguration.KeyMgmt.SAE:
-                    mask |= KeyMgmtMask.SAE;
-                    break;
-                case WifiConfiguration.KeyMgmt.SUITE_B_192:
-                    mask |= KeyMgmtMask.SUITE_B_192;
-                    break;
-                case WifiConfiguration.KeyMgmt.WPA_PSK_SHA256:
-                    mask |= KeyMgmtMask.WPA_PSK_SHA256;
-                    break;
-                case WifiConfiguration.KeyMgmt.WPA_EAP_SHA256:
-                    mask |= KeyMgmtMask.WPA_EAP_SHA256;
-                    break;
-                case WifiConfiguration.KeyMgmt.WAPI_PSK:
-                    mask |= KeyMgmtMask.WAPI_PSK;
-                    break;
-                case WifiConfiguration.KeyMgmt.WAPI_CERT:
-                    mask |= KeyMgmtMask.WAPI_CERT;
-                    break;
-                case WifiConfiguration.KeyMgmt.FILS_SHA256:
-                    mask |= KeyMgmtMask.FILS_SHA256;
-                    break;
-                case WifiConfiguration.KeyMgmt.FILS_SHA384:
-                    mask |= KeyMgmtMask.FILS_SHA384;
-                    break;
-                case WifiConfiguration.KeyMgmt.DPP:
-                    mask |= KeyMgmtMask.DPP;
-                    break;
-                case WifiConfiguration.KeyMgmt.WPA2_PSK: // This should never happen
-                default:
-                    throw new IllegalArgumentException(
-                            "Invalid protoMask bit in keyMgmt: " + bit);
-            }
-        }
-        return mask;
-    }
-
-    private static int wifiConfigurationToSupplicantProtoMask(BitSet protoMask) {
-        int mask = 0;
-        for (int bit = protoMask.nextSetBit(0); bit != -1;
-                bit = protoMask.nextSetBit(bit + 1)) {
-            switch (bit) {
-                case WifiConfiguration.Protocol.WPA:
-                    mask |= ProtoMask.WPA;
-                    break;
-                case WifiConfiguration.Protocol.RSN:
-                    mask |= ProtoMask.RSN;
-                    break;
-                case WifiConfiguration.Protocol.OSEN:
-                    mask |= ProtoMask.OSEN;
-                    break;
-                case WifiConfiguration.Protocol.WAPI:
-                    mask |= ProtoMask.WAPI;
-                    break;
-                default:
-                    throw new IllegalArgumentException(
-                            "Invalid protoMask bit in wificonfig: " + bit);
-            }
-        }
-        return mask;
-    }
-
-    private static int wifiConfigurationToSupplicantAuthAlgMask(BitSet authAlgMask) {
-        int mask = 0;
-        for (int bit = authAlgMask.nextSetBit(0); bit != -1;
-                bit = authAlgMask.nextSetBit(bit + 1)) {
-            switch (bit) {
-                case WifiConfiguration.AuthAlgorithm.OPEN:
-                    mask |= AuthAlgMask.OPEN;
-                    break;
-                case WifiConfiguration.AuthAlgorithm.SHARED:
-                    mask |= AuthAlgMask.SHARED;
-                    break;
-                case WifiConfiguration.AuthAlgorithm.LEAP:
-                    mask |= AuthAlgMask.LEAP;
-                    break;
-                case WifiConfiguration.AuthAlgorithm.SAE:
-                    mask |= AuthAlgMask.SAE;
-                    break;
-                default:
-                    throw new IllegalArgumentException(
-                            "Invalid authAlgMask bit in wificonfig: " + bit);
-            }
-        }
-        return mask;
-    }
-
-    private int wifiConfigurationToSupplicantGroupCipherMask(BitSet groupCipherMask) {
-        synchronized (mLock) {
-            int mask = 0;
-            for (int bit = groupCipherMask.nextSetBit(0); bit != -1; bit =
-                    groupCipherMask.nextSetBit(bit + 1)) {
-                switch (bit) {
-                    case WifiConfiguration.GroupCipher.WEP40:
-                        mask |= GroupCipherMask.WEP40;
-                        break;
-                    case WifiConfiguration.GroupCipher.WEP104:
-                        mask |= GroupCipherMask.WEP104;
-                        break;
-                    case WifiConfiguration.GroupCipher.TKIP:
-                        mask |= GroupCipherMask.TKIP;
-                        break;
-                    case WifiConfiguration.GroupCipher.CCMP:
-                        mask |= GroupCipherMask.CCMP;
-                        break;
-                    case WifiConfiguration.GroupCipher.GTK_NOT_USED:
-                        mask |= GroupCipherMask.GTK_NOT_USED;
-                        break;
-                    case WifiConfiguration.GroupCipher.GCMP_256:
-                        if (0 == (mAdvanceKeyMgmtFeatures
-                                & WifiManager.WIFI_FEATURE_WPA3_SUITE_B)) {
-                            Log.d(TAG, "Ignore unsupported GCMP_256 cipher.");
-                            break;
-                        }
-                        mask |= GroupCipherMask.GCMP_256;
-                        break;
-                    case WifiConfiguration.GroupCipher.SMS4:
-                        mask |= GroupCipherMask.SMS4;
-                        break;
-                    case WifiConfiguration.GroupCipher.GCMP_128:
-                        mask |= GroupCipherMask.GCMP_128;
-                        break;
-                    default:
-                        throw new IllegalArgumentException(
-                                "Invalid GroupCipherMask bit in wificonfig: " + bit);
-                }
-            }
-            return mask;
-        }
-    }
-
-    private static int wifiConfigurationToSupplicantGroupMgmtCipherMask(BitSet
-            groupMgmtCipherMask) {
-        int mask = 0;
-
-        for (int bit = groupMgmtCipherMask.nextSetBit(0); bit != -1; bit =
-                groupMgmtCipherMask.nextSetBit(bit + 1)) {
-            switch (bit) {
-                case WifiConfiguration.GroupMgmtCipher.BIP_CMAC_256:
-                    mask |= GroupMgmtCipherMask.BIP_CMAC_256;
-                    break;
-                case WifiConfiguration.GroupMgmtCipher.BIP_GMAC_128:
-                    mask |= GroupMgmtCipherMask.BIP_GMAC_128;
-                    break;
-                case WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256:
-                    mask |= GroupMgmtCipherMask.BIP_GMAC_256;
-                    break;
-                default:
-                    throw new IllegalArgumentException(
-                            "Invalid GroupMgmtCipherMask bit in wificonfig: " + bit);
-            }
-        }
-        return mask;
-    }
-
-    private int wifiConfigurationToSupplicantPairwiseCipherMask(BitSet pairwiseCipherMask) {
-        synchronized (mLock) {
-            int mask = 0;
-            for (int bit = pairwiseCipherMask.nextSetBit(0); bit != -1;
-                    bit = pairwiseCipherMask.nextSetBit(bit + 1)) {
-                switch (bit) {
-                    case WifiConfiguration.PairwiseCipher.NONE:
-                        mask |= PairwiseCipherMask.NONE;
-                        break;
-                    case WifiConfiguration.PairwiseCipher.TKIP:
-                        mask |= PairwiseCipherMask.TKIP;
-                        break;
-                    case WifiConfiguration.PairwiseCipher.CCMP:
-                        mask |= PairwiseCipherMask.CCMP;
-                        break;
-                    case WifiConfiguration.PairwiseCipher.GCMP_256:
-                        if (0 == (mAdvanceKeyMgmtFeatures
-                                & WifiManager.WIFI_FEATURE_WPA3_SUITE_B)) {
-                            Log.d(TAG, "Ignore unsupporting GCMP_256 cipher.");
-                            break;
-                        }
-                        mask |= PairwiseCipherMask.GCMP_256;
-                        break;
-                    case WifiConfiguration.PairwiseCipher.SMS4:
-                        mask |= PairwiseCipherMask.SMS4;
-                        break;
-                    case WifiConfiguration.PairwiseCipher.GCMP_128:
-                        mask |= PairwiseCipherMask.GCMP_128;
-                        break;
-                    default:
-                        throw new IllegalArgumentException(
-                                "Invalid pairwiseCipherMask bit in wificonfig: " + bit);
-                }
-            }
-            return mask;
-        }
-    }
-
-    private static int supplicantToWifiConfigurationEapMethod(int value) {
-        switch (value) {
-            case EapMethod.PEAP:
-                return WifiEnterpriseConfig.Eap.PEAP;
-            case EapMethod.TLS:
-                return WifiEnterpriseConfig.Eap.TLS;
-            case EapMethod.TTLS:
-                return WifiEnterpriseConfig.Eap.TTLS;
-            case EapMethod.PWD:
-                return WifiEnterpriseConfig.Eap.PWD;
-            case EapMethod.SIM:
-                return WifiEnterpriseConfig.Eap.SIM;
-            case EapMethod.AKA:
-                return WifiEnterpriseConfig.Eap.AKA;
-            case EapMethod.AKA_PRIME:
-                return WifiEnterpriseConfig.Eap.AKA_PRIME;
-            case EapMethod.WFA_UNAUTH_TLS:
-                return WifiEnterpriseConfig.Eap.UNAUTH_TLS;
-            // WifiEnterpriseConfig.Eap.NONE:
-            default:
-                Log.e(TAG, "invalid eap method value from supplicant: " + value);
-                return -1;
-        }
-    }
-
-    private static int supplicantToWifiConfigurationEapPhase2Method(int value) {
-        switch (value) {
-            case EapPhase2Method.NONE:
-                return WifiEnterpriseConfig.Phase2.NONE;
-            case EapPhase2Method.PAP:
-                return WifiEnterpriseConfig.Phase2.PAP;
-            case EapPhase2Method.MSPAP:
-                return WifiEnterpriseConfig.Phase2.MSCHAP;
-            case EapPhase2Method.MSPAPV2:
-                return WifiEnterpriseConfig.Phase2.MSCHAPV2;
-            case EapPhase2Method.GTC:
-                return WifiEnterpriseConfig.Phase2.GTC;
-            case EapPhase2Method.SIM:
-                return WifiEnterpriseConfig.Phase2.SIM;
-            case EapPhase2Method.AKA:
-                return WifiEnterpriseConfig.Phase2.AKA;
-            case EapPhase2Method.AKA_PRIME:
-                return WifiEnterpriseConfig.Phase2.AKA_PRIME;
-            default:
-                Log.e(TAG, "Invalid eap phase2 method value from supplicant: " + value);
-                return -1;
-        }
-    }
-
-    private static int supplicantMaskValueToWifiConfigurationBitSet(int supplicantMask,
-            int supplicantValue, BitSet bitset, int bitSetPosition) {
-        bitset.set(bitSetPosition, (supplicantMask & supplicantValue) == supplicantValue);
-        int modifiedSupplicantMask = supplicantMask & ~supplicantValue;
-        return modifiedSupplicantMask;
-    }
-
-    private static BitSet supplicantToWifiConfigurationKeyMgmtMask(int mask) {
-        BitSet bitset = new BitSet();
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.NONE, bitset,
-                WifiConfiguration.KeyMgmt.NONE);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.WPA_PSK, bitset,
-                WifiConfiguration.KeyMgmt.WPA_PSK);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.WPA_EAP, bitset,
-                WifiConfiguration.KeyMgmt.WPA_EAP);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.IEEE8021X, bitset,
-                WifiConfiguration.KeyMgmt.IEEE8021X);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.OSEN, bitset,
-                WifiConfiguration.KeyMgmt.OSEN);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.FT_PSK, bitset,
-                WifiConfiguration.KeyMgmt.FT_PSK);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.FT_EAP, bitset,
-                WifiConfiguration.KeyMgmt.FT_EAP);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.SAE,
-                bitset, WifiConfiguration.KeyMgmt.SAE);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.OWE,
-                bitset, WifiConfiguration.KeyMgmt.OWE);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.SUITE_B_192,
-                bitset, WifiConfiguration.KeyMgmt.SUITE_B_192);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.WPA_PSK_SHA256,
-                bitset, WifiConfiguration.KeyMgmt.WPA_PSK_SHA256);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.WPA_EAP_SHA256,
-                bitset, WifiConfiguration.KeyMgmt.WPA_EAP_SHA256);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.WAPI_PSK,
-                bitset, WifiConfiguration.KeyMgmt.WAPI_PSK);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.WAPI_CERT,
-                bitset, WifiConfiguration.KeyMgmt.WAPI_CERT);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.FILS_SHA256,
-                bitset, WifiConfiguration.KeyMgmt.FILS_SHA256);
-        mask = supplicantMaskValueToWifiConfigurationBitSet(
-                mask, KeyMgmtMask.FILS_SHA384,
-                bitset, WifiConfiguration.KeyMgmt.FILS_SHA384);
-        if (mask != 0) {
-            throw new IllegalArgumentException(
-                    "invalid key mgmt mask from supplicant: " + mask);
-        }
-        return bitset;
-    }
-
-    private static int wifiConfigurationToSupplicantEapMethod(int value) {
-        switch (value) {
-            case WifiEnterpriseConfig.Eap.PEAP:
-                return EapMethod.PEAP;
-            case WifiEnterpriseConfig.Eap.TLS:
-                return EapMethod.TLS;
-            case WifiEnterpriseConfig.Eap.TTLS:
-                return EapMethod.TTLS;
-            case WifiEnterpriseConfig.Eap.PWD:
-                return EapMethod.PWD;
-            case WifiEnterpriseConfig.Eap.SIM:
-                return EapMethod.SIM;
-            case WifiEnterpriseConfig.Eap.AKA:
-                return EapMethod.AKA;
-            case WifiEnterpriseConfig.Eap.AKA_PRIME:
-                return EapMethod.AKA_PRIME;
-            case WifiEnterpriseConfig.Eap.UNAUTH_TLS:
-                return EapMethod.WFA_UNAUTH_TLS;
-            // WifiEnterpriseConfig.Eap.NONE:
-            default:
-                Log.e(TAG, "Invalid eap method value from WifiConfiguration: " + value);
-                return -1;
-        }
-    }
-
-    private static int wifiConfigurationToSupplicantEapPhase2Method(int value) {
-        switch (value) {
-            case WifiEnterpriseConfig.Phase2.NONE:
-                return EapPhase2Method.NONE;
-            case WifiEnterpriseConfig.Phase2.PAP:
-                return EapPhase2Method.PAP;
-            case WifiEnterpriseConfig.Phase2.MSCHAP:
-                return EapPhase2Method.MSPAP;
-            case WifiEnterpriseConfig.Phase2.MSCHAPV2:
-                return EapPhase2Method.MSPAPV2;
-            case WifiEnterpriseConfig.Phase2.GTC:
-                return EapPhase2Method.GTC;
-            case WifiEnterpriseConfig.Phase2.SIM:
-                return EapPhase2Method.SIM;
-            case WifiEnterpriseConfig.Phase2.AKA:
-                return EapPhase2Method.AKA;
-            case WifiEnterpriseConfig.Phase2.AKA_PRIME:
-                return EapPhase2Method.AKA_PRIME;
-            default:
-                Log.e(TAG, "Invalid eap phase2 method value from WifiConfiguration: " + value);
-                return -1;
-        }
-    }
-
-    /**
-     * Retrieves the ID allocated to this network by the supplicant.
-     * Result is stored in mNetworkId.
-     *
-     * This is not the |SSID| of the network, but an internal identifier for
-     * this network used by the supplicant.
-     *
-     * @return true if ID was retrieved, false otherwise
-     */
-    private boolean getId() {
-        synchronized (mLock) {
-            final String methodStr = "getId";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mNetworkId = mISupplicantStaNetwork.getId();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /** Get current network id */
-    public int getNetworkId() {
-        synchronized (mLock) {
-            if (!getId()) {
-                return -1;
-            }
-            return mNetworkId;
-        }
-    }
-
-    private boolean registerCallback(ISupplicantStaNetworkCallback callback) {
-        synchronized (mLock) {
-            final String methodStr = "registerCallback";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.registerCallback(callback);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    private boolean registerNewCallback(int networkId, String ssid) {
-        synchronized (mLock) {
-            ISupplicantStaNetworkCallback callback =
-                    new SupplicantStaNetworkCallbackAidlImpl(
-                            SupplicantStaNetworkHalAidlImpl.this,
-                            networkId, ssid, mIfaceName, mLock, mWifiMonitor);
-            if (!registerCallback(callback)) {
-                Log.e(TAG, "Failed to register callback.");
-                return false;
-            }
-            mISupplicantStaNetworkCallback = callback;
-            return true;
-        }
-    }
-
-    /**
-     * Set SSID for this network.
-     *
-     * @param ssid Value to set.
-     *        Max length of |ParamSizeLimits.SSID_MAX_LEN_IN_BYTES|.
-     * @return true if successful, false otherwise
-     */
-    private boolean setSsid(byte[] ssid) {
-        synchronized (mLock) {
-            final String methodStr = "setSsid";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setSsid(ssid);
-                Log.i(TAG, "Successfully set SSID");
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set the BSSID for this network.
-     *
-     * @param bssidStr MAC address in "XX:XX:XX:XX:XX:XX" form or "any" to reset the mac address.
-     * @return true if it succeeds, false otherwise.
-     */
-    public boolean setBssid(String bssidStr) {
-        synchronized (mLock) {
-            try {
-                return setBssid(NativeUtil.macAddressToByteArray(bssidStr));
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + bssidStr, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean setBssid(byte[/* 6 */] bssid) {
-        synchronized (mLock) {
-            final String methodStr = "setBssid";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setBssid(bssid);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set whether to send probe requests for this network (hidden).
-     *
-     * @param enable true to set, false otherwise.
-     * @return true if successful, false otherwise
-     */
-    private boolean setScanSsid(boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setScanSsid";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setScanSsid(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set key management mask for the network.
-     *
-     * @param keyMgmtMask value to set.
-     *        Combination of |KeyMgmtMask| values.
-     * @return true if successful, false otherwise
-     */
-    private boolean setKeyMgmt(int keyMgmtMask) {
-        synchronized (mLock) {
-            final String methodStr = "setKeyMgmt";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setKeyMgmt(keyMgmtMask);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set proto mask for the network.
-     *
-     * @param protoMask value to set.
-     *        Combination of |ProtoMask| values.
-     * @return true if successful, false otherwise
-     */
-    private boolean setProto(int protoMask) {
-        synchronized (mLock) {
-            final String methodStr = "setProto";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setProto(protoMask);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set auth alg mask for the network.
-     *
-     * @param authAlgMask value to set.
-     *        Combination of |ProtoMask| values.
-     * @return true if successful, false otherwise
-     */
-    private boolean setAuthAlg(int authAlgMask) {
-        synchronized (mLock) {
-            final String methodStr = "setAuthAlg";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setAuthAlg(authAlgMask);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set group cipher mask for the network.
-     *
-     * @param groupCipherMask value to set.
-     *        Combination of |ProtoMask| values.
-     * @return true if successful, false otherwise
-     */
-    private boolean setGroupCipher(int groupCipherMask) {
-        synchronized (mLock) {
-            final String methodStr = "setGroupCipher";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setGroupCipher(groupCipherMask);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Enable TLS Suite-B in EAP Phase1
-     *
-     * @param enable Set to true to enable TLS Suite-B in EAP phase1
-     * @return true if successful, false otherwise
-     */
-    private boolean enableTlsSuiteBEapPhase1Param(boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setEapPhase1Params";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.enableTlsSuiteBEapPhase1Param(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP OpenSSL Suite-B-192 ciphers for WPA3-Enterprise
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean enableSuiteBEapOpenSslCiphers() {
-        synchronized (mLock) {
-            final String methodStr = "setEapOpenSslCiphers";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.enableSuiteBEapOpenSslCiphers();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set pairwise cipher mask for the network.
-     *
-     * @param pairwiseCipherMask value to set.
-     *        Combination of |ProtoMask| values.
-     * @return true if successful, false otherwise
-     */
-    private boolean setPairwiseCipher(int pairwiseCipherMask) {
-        synchronized (mLock) {
-            final String methodStr = "setPairwiseCipher";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setPairwiseCipher(pairwiseCipherMask);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set group management cipher mask for the network.
-     *
-     * @param groupMgmtCipherMask value to set.
-     *        Combination of |GroupMgmtCipherMask| values.
-     * @return true if successful, false otherwise
-     */
-    private boolean setGroupMgmtCipher(int groupMgmtCipherMask) {
-        synchronized (mLock) {
-            final String methodStr = "setGroupMgmtCipher";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setGroupMgmtCipher(groupMgmtCipherMask);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set passphrase for WPA_PSK network.
-     *
-     * @param psk value to set.
-     *        Length of value must be between
-     *        |ParamSizeLimits.PSK_PASSPHRASE_MIN_LEN_IN_BYTES| and
-     *        |ParamSizeLimits.PSK_PASSPHRASE_MAX_LEN_IN_BYTES|.
-     * @return true if successful, false otherwise
-     */
-    private boolean setPskPassphrase(String psk) {
-        synchronized (mLock) {
-            final String methodStr = "setPskPassphrase";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setPskPassphrase(psk);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set raw psk for WPA_PSK network.
-     *
-     * @param psk value to set as specified in IEEE 802.11i-2004 standard.
-     *        This is the calculated using 'wpa_passphrase <ssid> [passphrase]'
-     * @return true if successful, false otherwise
-     */
-    private boolean setPsk(byte[] psk) {
-        synchronized (mLock) {
-            final String methodStr = "setPsk";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setPsk(psk);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ArrayIndexOutOfBoundsException e) {
-                Log.e(TAG, "ISupplicantStaNetwork." + methodStr + " failed: " + e);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set WEP key for WEP network.
-     *
-     * @param keyIdx Index of wep key to set.
-     *        Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
-     * @param wepKey value to set.
-     *        Length of each key must be either
-     *        |ParamSizeLimits.WEP40_KEY_LEN_IN_BYTES| or
-     *        |ParamSizeLimits.WEP104_KEY_LEN_IN_BYTES|.
-     * @return true if successful, false otherwise
-     */
-    private boolean setWepKey(int keyIdx, byte[] wepKey) {
-        synchronized (mLock) {
-            final String methodStr = "setWepKey";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setWepKey(keyIdx, wepKey);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set default Tx key index for WEP network.
-     *
-     * @param keyIdx value to set.
-     *        Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
-     * @return true if successful, false otherwise
-     */
-    private boolean setWepTxKeyIdx(int keyIdx) {
-        synchronized (mLock) {
-            final String methodStr = "setWepTxKeyIdx";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setWepTxKeyIdx(keyIdx);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set whether RequirePmf is enabled for this network.
-     *
-     * @param enable true to set, false otherwise.
-     * @return true if successful, false otherwise
-     */
-    private boolean setRequirePmf(boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setRequirePmf";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setRequirePmf(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set PPS MO ID for this network.
-     * (Hotspot 2.0 PerProviderSubscription/UpdateIdentifier)
-     *
-     * @param identifier ID value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setUpdateIdentifier(int identifier) {
-        synchronized (mLock) {
-            final String methodStr = "setUpdateIdentifier";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setUpdateIdentifier(identifier);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set WAPI certificate suite name for this network.
-     *
-     * @param certSuite value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setWapiCertSuite(String certSuite) {
-        synchronized (mLock) {
-            final String methodStr = "setWapiCertSuite";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setWapiCertSuite(certSuite);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP Method for this network.
-     *
-     * @param method value to be set.
-     *        Must be one of |EapMethod| values.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapMethod(int method) {
-        synchronized (mLock) {
-            final String methodStr = "setEapMethod";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapMethod(method);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP Phase2 Method for this network.
-     *
-     * EAP method needs to be set for this to work.
-     *
-     * @param method value to set.
-     *        Must be one of |EapPhase2Method| values.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapPhase2Method(int method) {
-        synchronized (mLock) {
-            final String methodStr = "setEapPhase2Method";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapPhase2Method(method);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP Identity for this network.
-     *
-     * @param identity value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapIdentity(byte[] identity) {
-        synchronized (mLock) {
-            final String methodStr = "setEapIdentity";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapIdentity(identity);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP Anonymous Identity for this network.
-     *
-     * @param identity value to set.
-     * @return true if successful, false otherwise
-     */
-    public boolean setEapAnonymousIdentity(byte[] identity) {
-        synchronized (mLock) {
-            final String methodStr = "setEapAnonymousIdentity";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapAnonymousIdentity(identity);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP Password for this network.
-     *
-     * @param password value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapPassword(byte[] password) {
-        synchronized (mLock) {
-            final String methodStr = "setEapPassword";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapPassword(password);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP CA certificate file path for this network.
-     *
-     * @param path value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapCACert(String path) {
-        synchronized (mLock) {
-            final String methodStr = "setEapCACert";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapCACert(path);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP CA certificate directory path for this network.
-     *
-     * @param path value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapCAPath(String path) {
-        synchronized (mLock) {
-            final String methodStr = "setEapCAPath";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapCAPath(path);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP Client certificate file path for this network.
-     *
-     * @param path value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapClientCert(String path) {
-        synchronized (mLock) {
-            final String methodStr = "setEapClientCert";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapClientCert(path);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP private key Id for this network.
-     * This is used if private key operations for EAP-TLS are performed
-     * using a smartcard.
-     *
-     * @param id value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapPrivateKeyId(String id) {
-        synchronized (mLock) {
-            final String methodStr = "setEapPrivateKeyId";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapPrivateKeyId(id);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP subject match for this network.
-     *
-     * @param match value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapSubjectMatch(String match) {
-        synchronized (mLock) {
-            final String methodStr = "setEapSubjectMatch";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapSubjectMatch(match);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP Alt subject match for this network.
-     *
-     * @param match value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapAltSubjectMatch(String match) {
-        synchronized (mLock) {
-            final String methodStr = "setEapAltSubjectMatch";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapAltSubjectMatch(match);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Enable EAP Open SSL Engine for this network.
-     *
-     * @param enable true to set, false otherwise.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapEngine(boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setEapEngine";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapEngine(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP Open SSL Engine ID for this network.
-     *
-     * @param id value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapEngineID(String id) {
-        synchronized (mLock) {
-            final String methodStr = "setEapEngineID";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapEngineID(id);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set EAP Domain suffix match for this network.
-     *
-     * @param match value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapDomainSuffixMatch(String match) {
-        synchronized (mLock) {
-            final String methodStr = "setEapDomainSuffixMatch";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapDomainSuffixMatch(match);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * This field can be used to enable proactive key caching which is also
-     * known as opportunistic PMKSA caching for WPA2. This is disabled (0)
-     * by default unless default value is changed with the global okc=1
-     * parameter.
-     *
-     * Proactive key caching is used to make supplicant assume that the APs
-     * are using the same PMK and generate PMKSA cache entries without
-     * doing RSN pre-authentication. This requires support from the AP side
-     * and is normally used with wireless switches that co-locate the
-     * authenticator.
-     *
-     * @param enable true to set, false otherwise.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapProactiveKeyCaching(boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setEapProactiveKeyCaching";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setProactiveKeyCaching(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set ID string for this network.
-     * Network identifier string for external scripts.
-     *
-     * @param idString ID string value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setIdStr(String idString) {
-        synchronized (mLock) {
-            final String methodStr = "setIdStr";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setIdStr(idString);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set SAE password for WPA3-Personal
-     *
-     * @param saePassword string with the above option
-     * @return true if successful, false otherwise
-     */
-    private boolean setSaePassword(String saePassword) {
-        synchronized (mLock) {
-            final String methodStr = "setSaePassword";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setSaePassword(saePassword);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Enable Extensible Authentication (EAP) - Re-authentication Protocol (ERP) for this network.
-     *
-     * @param enable true to set, false otherwise.
-     * @return true if successful, false otherwise
-     */
-    private boolean setEapErp(boolean enable) {
-        synchronized (mLock) {
-            final String methodStr = "setEapErp";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setEapErp(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get SSID for this network. Result is stored in mSsid.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getSsid() {
-        synchronized (mLock) {
-            final String methodStr = "getSsid";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mSsid = mISupplicantStaNetwork.getSsid();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get the BSSID set for this network. Result is stored in mBssid.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getBssid() {
-        synchronized (mLock) {
-            final String methodStr = "getBssid";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mBssid = mISupplicantStaNetwork.getBssid();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get whether Probe Requests are being sent for this network (hidden).
-     * Result is stored in mScanSsid.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getScanSsid() {
-        synchronized (mLock) {
-            final String methodStr = "getScanSsid";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mScanSsid = mISupplicantStaNetwork.getScanSsid();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get the key mgmt mask set for the network. Result is stored in mKeyMgmtMask.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getKeyMgmt() {
-        synchronized (mLock) {
-            final String methodStr = "getKeyMgmt";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mKeyMgmtMask = mISupplicantStaNetwork.getKeyMgmt();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get the proto mask set for the network. Result is stored in mProtoMask.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getProto() {
-        synchronized (mLock) {
-            final String methodStr = "getProto";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mProtoMask = mISupplicantStaNetwork.getProto();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get the auth alg mask set for the network. Result is stored in mAuthAlgMask.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getAuthAlg() {
-        synchronized (mLock) {
-            final String methodStr = "getAuthAlg";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mAuthAlgMask = mISupplicantStaNetwork.getAuthAlg();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get the group cipher mask set for the network. Result is stored in mGroupCipherMask.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getGroupCipher() {
-        synchronized (mLock) {
-            final String methodStr = "getGroupCipher";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mGroupCipherMask = mISupplicantStaNetwork.getGroupCipher();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get the pairwise cipher mask set for the network. Result is stored in mPairwiseCipherMask.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getPairwiseCipher() {
-        synchronized (mLock) {
-            final String methodStr = "getPairwiseCipher";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mPairwiseCipherMask = mISupplicantStaNetwork.getPairwiseCipher();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-
-    }
-
-    /**
-     * Get the group management cipher mask set for the network. Result is stored in
-     * mGroupMgmtCipherMask.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getGroupMgmtCipher() {
-        synchronized (mLock) {
-            final String methodStr = "getGroupMgmtCipher";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mGroupMgmtCipherMask = mISupplicantStaNetwork.getGroupMgmtCipher();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get passphrase for WPA_PSK network. Result is stored in mPskPassphrase if retrieved.
-     * Must return a failure if network has no passphrase set (use |getPsk| if
-     * network was configured with raw psk instead).
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getPskPassphrase() {
-        synchronized (mLock) {
-            final String methodStr = "getPskPassphrase";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mPskPassphrase = mISupplicantStaNetwork.getPskPassphrase();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get SAE password for WPA3-Personal. Result is stored in mSaePassword.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getSaePassword() {
-        synchronized (mLock) {
-            final String methodStr = "getSaePassword";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mSaePassword = mISupplicantStaNetwork.getSaePassword();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get raw psk for WPA_PSK network. Result is stored in mPsk.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getPsk() {
-        synchronized (mLock) {
-            final String methodStr = "getPsk";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mPsk = mISupplicantStaNetwork.getPsk();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get WEP key for WEP network. Result is stored in mWepKey.
-     *
-     * @param keyIdx Index of wep key to be fetched.
-     *        Max of |WEP_KEYS_MAX_NUM|.
-     * @return true if successful, false otherwise
-     */
-    private boolean getWepKey(int keyIdx) {
-        synchronized (mLock) {
-            final String methodStr = "keyIdx";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mWepKey = mISupplicantStaNetwork.getWepKey(keyIdx);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get default Tx key index for WEP network. Result is stored in mWepTxKeyIdx.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getWepTxKeyIdx() {
-        synchronized (mLock) {
-            final String methodStr = "getWepTxKeyIdx";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mWepTxKeyIdx = mISupplicantStaNetwork.getWepTxKeyIdx();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get whether RequirePmf is enabled for this network. Result is stored in mWepTxKeyIdx.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getRequirePmf() {
-        synchronized (mLock) {
-            final String methodStr = "getRequirePmf";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mRequirePmf = mISupplicantStaNetwork.getRequirePmf();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get WAPI certificate suite name set for this network. Result is stored in mWapiCertSuite.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getWapiCertSuite() {
-        synchronized (mLock) {
-            final String methodStr = "getWapiCertSuite";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mWapiCertSuite = mISupplicantStaNetwork.getWapiCertSuite();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP Method set for this network. Result is stored in mEapMethod.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapMethod() {
-        synchronized (mLock) {
-            final String methodStr = "getEapMethod";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapMethod = mISupplicantStaNetwork.getEapMethod();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP Phase2 Method set for this network. Result is stored in mEapPhase2Method.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapPhase2Method() {
-        synchronized (mLock) {
-            final String methodStr = "getEapPhase2Method";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapPhase2Method = mISupplicantStaNetwork.getEapPhase2Method();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP Identity set for this network. Result is stored in mEapIdentity.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapIdentity() {
-        synchronized (mLock) {
-            final String methodStr = "getEapIdentity";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapIdentity = mISupplicantStaNetwork.getEapIdentity();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP Anonymous Identity set for this network. Result is stored in mEapAnonymousIdentity.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapAnonymousIdentity() {
-        synchronized (mLock) {
-            final String methodStr = "getEapAnonymousIdentity";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapAnonymousIdentity = mISupplicantStaNetwork.getEapAnonymousIdentity();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Wrapper method for getEapAnonymousIdentity(). Gets the anonymous identity
-     * from supplicant and returns it as a string.
-     *
-     * @return anonymous identity string if successful, null otherwise.
-     */
-    public String fetchEapAnonymousIdentity() {
-        synchronized (mLock) {
-            if (!getEapAnonymousIdentity()) {
-                return null;
-            }
-            return NativeUtil.stringFromByteArray(mEapAnonymousIdentity);
-        }
-    }
-
-    /**
-     * Get EAP Password set for this network. Result is stored in mEapPassword.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapPassword() {
-        synchronized (mLock) {
-            final String methodStr = "getEapPassword";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapPassword = mISupplicantStaNetwork.getEapPassword();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP CA certificate file path set for this network. Result is stored in mEapCACert.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapCACert() {
-        synchronized (mLock) {
-            final String methodStr = "getEapCACert";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapCACert = mISupplicantStaNetwork.getEapCACert();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP CA certificate directory path set for this network. Result is stored in mEapCAPath.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapCAPath() {
-        synchronized (mLock) {
-            final String methodStr = "getEapCAPath";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapCAPath = mISupplicantStaNetwork.getEapCAPath();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP Client certificate file path set for this network.
-     * Result is stored in mEapClientCert.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapClientCert() {
-        synchronized (mLock) {
-            final String methodStr = "getEapClientCert";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapClientCert = mISupplicantStaNetwork.getEapClientCert();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP private key Id set for this network. Result is stored in mEapPrivateKeyId.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapPrivateKeyId() {
-        synchronized (mLock) {
-            final String methodStr = "getEapPrivateKeyId";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapPrivateKeyId = mISupplicantStaNetwork.getEapPrivateKeyId();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP subject match set for this network. Result is stored in mEapSubjectMatch.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapSubjectMatch() {
-        synchronized (mLock) {
-            final String methodStr = "getEapSubjectMatch";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapSubjectMatch = mISupplicantStaNetwork.getEapSubjectMatch();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP Alt subject match set for this network. Result is stored in mEapAltSubjectMatch.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapAltSubjectMatch() {
-        synchronized (mLock) {
-            final String methodStr = "getEapAltSubjectMatch";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapAltSubjectMatch = mISupplicantStaNetwork.getEapAltSubjectMatch();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get whether EAP Open SSL Engine is enabled for this network. Result is stored in mEapEngine.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapEngine() {
-        synchronized (mLock) {
-            final String methodStr = "getEapEngine";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapEngine = mISupplicantStaNetwork.getEapEngine();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP Open SSL Engine ID set for this network. Result is stored in mEapEngineID.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapEngineId() {
-        synchronized (mLock) {
-            final String methodStr = "getEapEngineId";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapEngineID = mISupplicantStaNetwork.getEapEngineId();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get EAP Domain suffix match set for this network. Result is stored in mEapDomainSuffixMatch.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getEapDomainSuffixMatch() {
-        synchronized (mLock) {
-            final String methodStr = "getEapDomainSuffixMatch";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mEapDomainSuffixMatch = mISupplicantStaNetwork.getEapDomainSuffixMatch();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get ID string set for this network. Network identifier string for external scripts.
-     * Result is stored in mIdStr.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getIdStr() {
-        synchronized (mLock) {
-            final String methodStr = "getIdStr";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mIdStr = mISupplicantStaNetwork.getIdStr();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Enable the network for connection purposes.
-     *
-     * This must trigger a connection to the network if:
-     * a) |noConnect| is false, and
-     * b) This is the only network configured, and
-     * c) Is visible in the current scan results.
-     *
-     * @param noConnect Only enable the network, don't trigger a connect.
-     * @return true if successful, false otherwise
-     */
-    public boolean enable(boolean noConnect) {
-        synchronized (mLock) {
-            final String methodStr = "enable";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.enable(noConnect);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Disable the network for connection purposes.
-     * This must trigger a disconnection from the network, if currently
-     * connected to this one.
-     *
-     * @return true if successful, false otherwise
-     */
-    public boolean disable() {
-        synchronized (mLock) {
-            final String methodStr = "disable";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.disable();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Trigger a connection to this network.
-     *
-     * @return true if it succeeds, false otherwise.
-     */
-    public boolean select() {
-        synchronized (mLock) {
-            final String methodStr = "select";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.select();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Send GSM auth response.
-     *
-     * @param paramsStr Response params as a string.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendNetworkEapSimGsmAuthResponse(String paramsStr) {
-        synchronized (mLock) {
-            try {
-                Matcher match = GSM_AUTH_RESPONSE_PARAMS_PATTERN.matcher(paramsStr);
-                ArrayList<NetworkResponseEapSimGsmAuthParams> params = new ArrayList<>();
-                while (match.find()) {
-                    if (match.groupCount() != 2) {
-                        Log.e(TAG, "Malformed gsm auth response params: " + paramsStr);
-                        return false;
-                    }
-                    NetworkResponseEapSimGsmAuthParams param =
-                            new NetworkResponseEapSimGsmAuthParams();
-                    param.kc = new byte[8];
-                    param.sres = new byte[4];
-                    byte[] kc = NativeUtil.hexStringToByteArray(match.group(1));
-                    if (kc == null || kc.length != param.kc.length) {
-                        Log.e(TAG, "Invalid kc value: " + match.group(1));
-                        return false;
-                    }
-                    byte[] sres = NativeUtil.hexStringToByteArray(match.group(2));
-                    if (sres == null || sres.length != param.sres.length) {
-                        Log.e(TAG, "Invalid sres value: " + match.group(2));
-                        return false;
-                    }
-                    System.arraycopy(kc, 0, param.kc, 0, param.kc.length);
-                    System.arraycopy(sres, 0, param.sres, 0, param.sres.length);
-                    params.add(param);
-                }
-                // The number of kc/sres pairs can either be 2 or 3 depending on the request.
-                if (params.size() > 3 || params.size() < 2) {
-                    Log.e(TAG, "Malformed gsm auth response params: " + paramsStr);
-                    return false;
-                }
-                NetworkResponseEapSimGsmAuthParams[] paramsArr =
-                        new NetworkResponseEapSimGsmAuthParams[params.size()];
-                for (int i = 0; i < params.size(); i++) {
-                    paramsArr[i] = params.get(i);
-                }
-                return sendNetworkEapSimGsmAuthResponse(paramsArr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + paramsStr, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean sendNetworkEapSimGsmAuthResponse(
-            NetworkResponseEapSimGsmAuthParams[] params) {
-        synchronized (mLock) {
-            final String methodStr = "sendNetworkEapSimGsmAuthResponse";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.sendNetworkEapSimGsmAuthResponse(params);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Send GSM auth failure.
-     *
-     * @return true if successful, false otherwise
-     */
-    public boolean sendNetworkEapSimGsmAuthFailure() {
-        synchronized (mLock) {
-            final String methodStr = "sendNetworkEapSimGsmAuthFailure";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.sendNetworkEapSimGsmAuthFailure();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Send UMTS auth response.
-     *
-     * @param paramsStr Response params as a string.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendNetworkEapSimUmtsAuthResponse(String paramsStr) {
-        synchronized (mLock) {
-            try {
-                Matcher match = UMTS_AUTH_RESPONSE_PARAMS_PATTERN.matcher(paramsStr);
-                if (!match.find() || match.groupCount() != 3) {
-                    Log.e(TAG, "Malformed umts auth response params: " + paramsStr);
-                    return false;
-                }
-                NetworkResponseEapSimUmtsAuthParams params =
-                        new NetworkResponseEapSimUmtsAuthParams();
-                params.ik = new byte[16];
-                params.ck = new byte[16];
-                byte[] ik = NativeUtil.hexStringToByteArray(match.group(1));
-                if (ik == null || ik.length != params.ik.length) {
-                    Log.e(TAG, "Invalid ik value: " + match.group(1));
-                    return false;
-                }
-                byte[] ck = NativeUtil.hexStringToByteArray(match.group(2));
-                if (ck == null || ck.length != params.ck.length) {
-                    Log.e(TAG, "Invalid ck value: " + match.group(2));
-                    return false;
-                }
-                byte[] res = NativeUtil.hexStringToByteArray(match.group(3));
-                if (res == null || res.length == 0) {
-                    Log.e(TAG, "Invalid res value: " + match.group(3));
-                    return false;
-                }
-                params.res = new byte[res.length];
-                System.arraycopy(ik, 0, params.ik, 0, params.ik.length);
-                System.arraycopy(ck, 0, params.ck, 0, params.ck.length);
-                System.arraycopy(res, 0, params.res, 0, params.res.length);
-                return sendNetworkEapSimUmtsAuthResponse(params);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + paramsStr, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean sendNetworkEapSimUmtsAuthResponse(
-            NetworkResponseEapSimUmtsAuthParams params) {
-        synchronized (mLock) {
-            final String methodStr = "sendNetworkEapSimUmtsAuthResponse";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.sendNetworkEapSimUmtsAuthResponse(params);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Send UMTS auts response.
-     *
-     * @param paramsStr Response params as a string.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendNetworkEapSimUmtsAutsResponse(String paramsStr) {
-        synchronized (mLock) {
-            try {
-                Matcher match = UMTS_AUTS_RESPONSE_PARAMS_PATTERN.matcher(paramsStr);
-                if (!match.find() || match.groupCount() != 1) {
-                    Log.e(TAG, "Malformed umts auts response params: " + paramsStr);
-                    return false;
-                }
-                byte[] auts = NativeUtil.hexStringToByteArray(match.group(1));
-                if (auts == null || auts.length != 14) {
-                    Log.e(TAG, "Invalid auts value: " + match.group(1));
-                    return false;
-                }
-                return sendNetworkEapSimUmtsAutsResponse(auts);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + paramsStr, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean sendNetworkEapSimUmtsAutsResponse(byte[/* 14 */] auts) {
-        synchronized (mLock) {
-            final String methodStr = "sendNetworkEapSimUmtsAutsResponse";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.sendNetworkEapSimUmtsAutsResponse(auts);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Send UMTS auth failure.
-     *
-     * @return true if successful, false otherwise
-     */
-    public boolean sendNetworkEapSimUmtsAuthFailure() {
-        synchronized (mLock) {
-            final String methodStr = "sendNetworkEapSimUmtsAuthFailure";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.sendNetworkEapSimUmtsAuthFailure();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Send eap identity response.
-     *
-     * @param identityStr identity used for EAP-Identity
-     * @param encryptedIdentityStr encrypted identity used for EAP-AKA/EAP-SIM
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean sendNetworkEapIdentityResponse(String identityStr,
-            String encryptedIdentityStr) {
-        synchronized (mLock) {
-            try {
-                byte[] unencryptedIdentity = NativeUtil.stringToByteArray(identityStr);
-                byte[] encryptedIdentity = new byte[0];
-                if (!TextUtils.isEmpty(encryptedIdentityStr)) {
-                    encryptedIdentity = NativeUtil.stringToByteArray(encryptedIdentityStr);
-                }
-                return sendNetworkEapIdentityResponse(unencryptedIdentity, encryptedIdentity);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + identityStr + "," + encryptedIdentityStr, e);
-                return false;
-            }
-        }
-    }
-
-    private boolean sendNetworkEapIdentityResponse(byte[] unencryptedIdentity,
-            byte[] encryptedIdentity) {
-        synchronized (mLock) {
-            final String methodStr = "sendNetworkEapIdentityResponse";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.sendNetworkEapIdentityResponse(
-                        unencryptedIdentity, encryptedIdentity);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set OCSP (Online Certificate Status Protocol) type for this network.
-     *
-     * @param ocsp value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setOcsp(@WifiEnterpriseConfig.Ocsp int ocsp) {
-        synchronized (mLock) {
-            final String methodStr = "setOcsp";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            int halOcspValue = OcspType.NONE;
-            switch (ocsp) {
-                case WifiEnterpriseConfig.OCSP_REQUEST_CERT_STATUS:
-                    halOcspValue = OcspType.REQUEST_CERT_STATUS;
-                    break;
-                case WifiEnterpriseConfig.OCSP_REQUIRE_CERT_STATUS:
-                    halOcspValue = OcspType.REQUIRE_CERT_STATUS;
-                    break;
-                case WifiEnterpriseConfig.OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS:
-                    halOcspValue = OcspType.REQUIRE_ALL_CERTS_STATUS;
-                    break;
-            }
-
-            try {
-                mISupplicantStaNetwork.setOcsp(halOcspValue);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get OCSP (Online Certificate Status Protocol) type for this network. Value stored in mOcsp.
-     *
-     * @return true if successful, false otherwise
-     */
-    private boolean getOcsp() {
-        synchronized (mLock) {
-            final String methodStr = "getOcsp";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            try {
-                int halOcspValue = mISupplicantStaNetwork.getOcsp();
-                mOcsp = WifiEnterpriseConfig.OCSP_NONE;
-                switch (halOcspValue) {
-                    case OcspType.REQUEST_CERT_STATUS:
-                        mOcsp = WifiEnterpriseConfig.OCSP_REQUEST_CERT_STATUS;
-                        break;
-                    case OcspType.REQUIRE_CERT_STATUS:
-                        mOcsp = WifiEnterpriseConfig.OCSP_REQUIRE_CERT_STATUS;
-                        break;
-                    case OcspType.REQUIRE_ALL_CERTS_STATUS:
-                        mOcsp = WifiEnterpriseConfig.OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS;
-                        break;
-                    default:
-                        Log.e(TAG, "Invalid HAL OCSP value " + halOcspValue);
-                        break;
-                }
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Add a pairwise master key (PMK) into supplicant PMK cache.
-     *
-     * @param serializedEntry is serialized PMK cache entry, the content is
-     *              opaque for the framework and depends on the native implementation.
-     * @return true if successful, false otherwise
-     */
-    public boolean setPmkCache(byte[] serializedEntry) {
-        synchronized (mLock) {
-            final String methodStr = "setPmkCache";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setPmkCache(serializedEntry);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set SAE H2E (Hash-to-Element) mode.
-     *
-     * @param mode SAE H2E supporting mode.
-     * @return true if successful, false otherwise
-     */
-    private boolean setSaeH2eMode(byte mode) {
-        synchronized (mLock) {
-            final String methodStr = "setSaeH2eMode";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantStaNetwork.setSaeH2eMode(mode);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Retrieve the NFC token for this network.
-     *
-     * @return Hex string corresponding to the NFC token or null for failure.
-     */
-    public String getWpsNfcConfigurationToken() {
-        synchronized (mLock) {
-            byte[] token = getWpsNfcConfigurationTokenInternal();
-            if (token == null) {
-                return null;
-            }
-            return NativeUtil.hexStringFromByteArray(token);
-        }
-    }
-
-    private byte[] getWpsNfcConfigurationTokenInternal() {
-        synchronized (mLock) {
-            final String methodStr = "getWpsNfcConfigurationToken";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return null;
-            }
-            try {
-                return mISupplicantStaNetwork.getWpsNfcConfigurationToken();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    private String getTag() {
-        synchronized (mLock) {
-            return TAG + "[" + mIfaceName + "]";
-        }
-    }
-
-    /**
-     * Helper function to log callbacks.
-     */
-    protected void logCallback(final String methodStr) {
-        synchronized (mLock) {
-            if (mVerboseLoggingEnabled) {
-                Log.d(TAG, "ISupplicantStaNetworkCallback." + methodStr + " received");
-            }
-        }
-    }
-
-    /**
-     * Returns false if mISupplicantStaNetwork is null, and logs failure containing methodStr
-     */
-    private boolean checkStaNetworkAndLogFailure(final String methodStr) {
-        synchronized (mLock) {
-            if (mISupplicantStaNetwork == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", ISupplicantStaNetwork is null");
-                return false;
-            }
-            return true;
-        }
-    }
-
-    private void handleRemoteException(RemoteException e, String methodStr) {
-        synchronized (mLock) {
-            mISupplicantStaNetwork = null;
-            Log.e(TAG,
-                    "ISupplicantStaNetwork." + methodStr + " failed with remote exception: ", e);
-        }
-    }
-
-    private void handleServiceSpecificException(ServiceSpecificException e, String methodStr) {
-        synchronized (mLock) {
-            Log.e(TAG, "ISupplicantStaNetwork." + methodStr + " failed with "
-                    + "service specific exception: ", e);
-        }
-    }
-
-    /**
-     * Adds FT flags for networks if the device supports it.
-     */
-    private BitSet addFastTransitionFlags(BitSet keyManagementFlags) {
-        synchronized (mLock) {
-            if (!mContext.getResources().getBoolean(
-                    R.bool.config_wifi_fast_bss_transition_enabled)) {
-                return keyManagementFlags;
-            }
-            BitSet modifiedFlags = (BitSet) keyManagementFlags.clone();
-            if (keyManagementFlags.get(WifiConfiguration.KeyMgmt.WPA_PSK)) {
-                modifiedFlags.set(WifiConfiguration.KeyMgmt.FT_PSK);
-            }
-            if (keyManagementFlags.get(WifiConfiguration.KeyMgmt.WPA_EAP)) {
-                modifiedFlags.set(WifiConfiguration.KeyMgmt.FT_EAP);
-            }
-            return modifiedFlags;
-        }
-    }
-
-    /**
-     * Removes FT flags for networks if the device supports it.
-     */
-    private BitSet removeFastTransitionFlags(BitSet keyManagementFlags) {
-        synchronized (mLock) {
-            BitSet modifiedFlags = (BitSet) keyManagementFlags.clone();
-            modifiedFlags.clear(WifiConfiguration.KeyMgmt.FT_PSK);
-            modifiedFlags.clear(WifiConfiguration.KeyMgmt.FT_EAP);
-            return modifiedFlags;
-        }
-    }
-
-    /**
-     * Adds SHA256 key management flags for networks.
-     */
-    private BitSet addSha256KeyMgmtFlags(BitSet keyManagementFlags) {
-        synchronized (mLock) {
-            BitSet modifiedFlags = (BitSet) keyManagementFlags.clone();
-            if (keyManagementFlags.get(WifiConfiguration.KeyMgmt.WPA_PSK)) {
-                modifiedFlags.set(WifiConfiguration.KeyMgmt.WPA_PSK_SHA256);
-            }
-            if (keyManagementFlags.get(WifiConfiguration.KeyMgmt.WPA_EAP)) {
-                modifiedFlags.set(WifiConfiguration.KeyMgmt.WPA_EAP_SHA256);
-            }
-            return modifiedFlags;
-        }
-    }
-
-    /**
-     * Removes SHA256 key management flags for networks.
-     */
-    private BitSet removeSha256KeyMgmtFlags(BitSet keyManagementFlags) {
-        synchronized (mLock) {
-            BitSet modifiedFlags = (BitSet) keyManagementFlags.clone();
-            modifiedFlags.clear(WifiConfiguration.KeyMgmt.WPA_PSK_SHA256);
-            modifiedFlags.clear(WifiConfiguration.KeyMgmt.WPA_EAP_SHA256);
-            return modifiedFlags;
-        }
-    }
-
-    /**
-     * Update PMF requirement if auto-upgrade offload is supported.
-     *
-     * If SAE auto-upgrade offload is supported and this config enables
-     * both PSK and SAE, do not set PMF requirement to
-     * mandatory to allow the device to roam between PSK and SAE BSSes.
-     * wpa_supplicant will set PMF requirement to optional by default.
-     */
-    private boolean getOptimalPmfSettingForConfig(WifiConfiguration config,
-            boolean isPmfRequiredFromSelectedSecurityParams) {
-        if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)
-                && config.getSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK).isEnabled()
-                && config.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE)
-                && config.getSecurityParams(WifiConfiguration.SECURITY_TYPE_SAE).isEnabled()
-                && mWifiGlobals.isWpa3SaeUpgradeOffloadEnabled()) {
-            if (mVerboseLoggingEnabled) {
-                Log.d(TAG, "Keep optional PMF for SAE auto-upgrade offload.");
-            }
-            return false;
-        }
-        return isPmfRequiredFromSelectedSecurityParams;
-    }
-
-    /**
-     * Adds both PSK and SAE AKM if auto-upgrade offload is supported.
-     */
-    private BitSet addPskSaeUpgradableTypeFlagsIfSupported(
-            WifiConfiguration config, BitSet keyManagementFlags) {
-        synchronized (mLock) {
-            if (!config.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)
-                    || !config.getSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK).isEnabled()
-                    || !mWifiGlobals.isWpa3SaeUpgradeOffloadEnabled()) {
-                return keyManagementFlags;
-            }
-
-            BitSet modifiedFlags = (BitSet) keyManagementFlags.clone();
-            modifiedFlags.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-            modifiedFlags.set(WifiConfiguration.KeyMgmt.SAE);
-            return modifiedFlags;
-        }
-    }
-
-    /**
-     * Removes SAE AKM when PSK and SAE AKM are both set, it only happens when
-     * auto-upgrade offload is supported.
-     */
-    private BitSet removePskSaeUpgradableTypeFlags(BitSet keyManagementFlags) {
-        if (!keyManagementFlags.get(WifiConfiguration.KeyMgmt.WPA_PSK)
-                || !keyManagementFlags.get(WifiConfiguration.KeyMgmt.SAE)) {
-            return keyManagementFlags;
-        }
-        BitSet modifiedFlags = (BitSet) keyManagementFlags.clone();
-        modifiedFlags.clear(WifiConfiguration.KeyMgmt.SAE);
-        return modifiedFlags;
-    }
-
-    /**
-     * Creates the JSON encoded network extra using the map of string key, value pairs.
-     */
-    public static String createNetworkExtra(Map<String, String> values) {
-        final String encoded;
-        try {
-            encoded = URLEncoder.encode(new JSONObject(values).toString(), "UTF-8");
-        } catch (NullPointerException e) {
-            Log.e(TAG, "Unable to serialize networkExtra: " + e.toString());
-            return null;
-        } catch (UnsupportedEncodingException e) {
-            Log.e(TAG, "Unable to serialize networkExtra: " + e.toString());
-            return null;
-        }
-        return encoded;
-    }
-
-    /**
-     * Parse the network extra JSON encoded string to a map of string key, value pairs.
-     */
-    public static Map<String, String> parseNetworkExtra(String encoded) {
-        if (TextUtils.isEmpty(encoded)) {
-            return null;
-        }
-        try {
-            // This method reads a JSON dictionary that was written by setNetworkExtra(). However,
-            // on devices that upgraded from Marshmallow, it may encounter a legacy value instead -
-            // an FQDN stored as a plain string. If such a value is encountered, the JSONObject
-            // constructor will thrown a JSONException and the method will return null.
-            final JSONObject json = new JSONObject(URLDecoder.decode(encoded, "UTF-8"));
-            final Map<String, String> values = new HashMap<>();
-            final Iterator<?> it = json.keys();
-            while (it.hasNext()) {
-                final String key = (String) it.next();
-                final Object value = json.get(key);
-                if (value instanceof String) {
-                    values.put(key, (String) value);
-                }
-            }
-            return values;
-        } catch (UnsupportedEncodingException e) {
-            Log.e(TAG, "Unable to deserialize networkExtra: " + e.toString());
-            return null;
-        } catch (JSONException e) {
-            // This is not necessarily an error. This exception will also occur if we encounter a
-            // legacy FQDN stored as a plain string. We want to return null in this case as no JSON
-            // dictionary of extras was found.
-            return null;
-        }
-    }
-
-    /**
-     * Returns a big-endian representation of {@code rcoi} in an 3 or 5-element byte array.
-     */
-    private static byte[] rcoiToByteArray(long rcoi) {
-        // An RCOI is either 3- or 5-octet array, IEEE Std 802.11, section 9.4.1.31: Organization
-        // Identifier field
-        int arraySize = 3;
-        rcoi &= 0xffffffffffL;
-        if ((rcoi & 0xffff000000L) != 0) {
-            // This is a 5-octet RCOI
-            arraySize = 5;
-        }
-
-        byte[] result = new byte[arraySize];
-        for (int i = arraySize - 1; i >= 0; i--) {
-            result[i] = (byte) (rcoi & 0xffL);
-            rcoi >>= 8;
-        }
-        return result;
-    }
-
-    /**
-     * Set the selected RCOI for this Passpoint network.
-     *
-     * @param selectedRcoi value to set.
-     * @return true if successful, false otherwise
-     */
-    private boolean setSelectedRcoi(long selectedRcoi) {
-        if (selectedRcoi == 0) {
-            // Nothing to set
-            return true;
-        }
-        synchronized (mLock) {
-            final String methodStr = "setSelectedRcoi";
-            if (!checkStaNetworkAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            try {
-                mISupplicantStaNetwork
-                        .setRoamingConsortiumSelection(rcoiToByteArray(selectedRcoi));
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/ThroughputPredictor.java b/service/java/com/android/server/wifi/ThroughputPredictor.java
index 0dcc582..ff5d10d 100644
--- a/service/java/com/android/server/wifi/ThroughputPredictor.java
+++ b/service/java/com/android/server/wifi/ThroughputPredictor.java
@@ -55,11 +55,10 @@
     private static final int NUM_TONE_PER_SYM_11AC_40MHZ = 108;
     private static final int NUM_TONE_PER_SYM_11AC_80MHZ = 234;
     private static final int NUM_TONE_PER_SYM_11AC_160MHZ = 468;
-    private static final int NUM_TONE_PER_SYM_11AX_BE_20MHZ = 234;
-    private static final int NUM_TONE_PER_SYM_11AX_BE_40MHZ = 468;
-    private static final int NUM_TONE_PER_SYM_11AX_BE_80MHZ = 980;
-    private static final int NUM_TONE_PER_SYM_11AX_BE_160MHZ = 1960;
-    private static final int NUM_TONE_PER_SYM_11BE_320MHZ = 1960 * 2;
+    private static final int NUM_TONE_PER_SYM_11AX_20MHZ = 234;
+    private static final int NUM_TONE_PER_SYM_11AX_40MHZ = 468;
+    private static final int NUM_TONE_PER_SYM_11AX_80MHZ = 980;
+    private static final int NUM_TONE_PER_SYM_11AX_160MHZ = 1960;
 
     // 11ag OFDM symbol duration in ns
     private static final int SYM_DURATION_LEGACY_NS = 4000;
@@ -67,8 +66,8 @@
     private static final int SYM_DURATION_11N_NS = 3600;
     // 11ac OFDM symbol duration in ns with 0.4us guard interval
     private static final int SYM_DURATION_11AC_NS = 3600;
-    // 11ax/be OFDM symbol duration in ns with 0.8us guard interval
-    private static final int SYM_DURATION_11AX_BE_NS = 13600;
+    // 11ax OFDM symbol duration in ns with 0.8us guard interval
+    private static final int SYM_DURATION_11AX_NS = 13600;
     private static final int MICRO_TO_NANO_RATIO = 1000;
 
     // The scaling factor for integer representation of bitPerTone and MAX_BITS_PER_TONE_XXX
@@ -81,8 +80,6 @@
             (int) Math.round((8 * 5.0 * BIT_PER_TONE_SCALE) / 6.0);
     private static final int MAX_BITS_PER_TONE_11AX =
             (int) Math.round((10 * 5.0 * BIT_PER_TONE_SCALE) / 6.0);
-    private static final int MAX_BITS_PER_TONE_11BE =
-            (int) Math.round((12 * 5.0 * BIT_PER_TONE_SCALE) / 6.0);
 
     // snrDb-to-bitPerTone lookup table (LUT) used at low SNR
     // snr = Math.pow(10.0, snrDb / 10.0);
@@ -98,7 +95,6 @@
     // A fudge factor to represent HW implementation margin in dB.
     // Predicted throughput matches pretty well with OTA throughput with this fudge factor.
     private static final int SNR_MARGIN_DB = 16;
-    private static final int MAX_NUM_SPATIAL_STREAM_11BE = 16;
     private static final int MAX_NUM_SPATIAL_STREAM_11AX = 8;
     private static final int MAX_NUM_SPATIAL_STREAM_11AC = 8;
     private static final int MAX_NUM_SPATIAL_STREAM_11N = 4;
@@ -127,8 +123,8 @@
      */
     public int predictMaxTxThroughput(@NonNull WifiNative.ConnectionCapabilities capabilities) {
         return predictThroughputInternal(capabilities.wifiStandard, capabilities.is11bMode,
-                capabilities.channelBandwidth, WifiInfo.MAX_RSSI,
-                capabilities.maxNumberTxSpatialStreams, MIN_CHANNEL_UTILIZATION, 0);
+                capabilities.channelBandwidth,
+                WifiInfo.MAX_RSSI, capabilities.maxNumberTxSpatialStreams, MIN_CHANNEL_UTILIZATION);
     }
 
     /**
@@ -138,8 +134,8 @@
      */
     public int predictMaxRxThroughput(@NonNull WifiNative.ConnectionCapabilities capabilities) {
         return predictThroughputInternal(capabilities.wifiStandard, capabilities.is11bMode,
-                capabilities.channelBandwidth, WifiInfo.MAX_RSSI,
-                capabilities.maxNumberRxSpatialStreams, MIN_CHANNEL_UTILIZATION, 0);
+                capabilities.channelBandwidth,
+                WifiInfo.MAX_RSSI, capabilities.maxNumberRxSpatialStreams, MIN_CHANNEL_UTILIZATION);
     }
 
     /**
@@ -151,8 +147,8 @@
         int channelUtilizationFinal = getValidChannelUtilization(frequency,
                 INVALID, channelUtilization, false);
         return predictThroughputInternal(capabilities.wifiStandard, capabilities.is11bMode,
-                capabilities.channelBandwidth, rssiDbm, capabilities.maxNumberTxSpatialStreams,
-                channelUtilizationFinal, frequency);
+                capabilities.channelBandwidth,
+                rssiDbm, capabilities.maxNumberTxSpatialStreams, channelUtilizationFinal);
     }
 
     /**
@@ -164,8 +160,8 @@
         int channelUtilizationFinal = getValidChannelUtilization(frequency,
                 INVALID, channelUtilization, false);
         return predictThroughputInternal(capabilities.wifiStandard, capabilities.is11bMode,
-                capabilities.channelBandwidth, rssiDbm, capabilities.maxNumberRxSpatialStreams,
-                channelUtilizationFinal, frequency);
+                capabilities.channelBandwidth,
+                rssiDbm, capabilities.maxNumberRxSpatialStreams, channelUtilizationFinal);
     }
 
     /**
@@ -206,12 +202,6 @@
         // Get minimum standard support between device and AP
         int wifiStandard;
         switch (wifiStandardAp) {
-            case ScanResult.WIFI_STANDARD_11BE:
-                if (deviceCapabilities.isWifiStandardSupported(ScanResult.WIFI_STANDARD_11BE)) {
-                    wifiStandard = ScanResult.WIFI_STANDARD_11BE;
-                    break;
-                }
-                //FALL THROUGH
             case ScanResult.WIFI_STANDARD_11AX:
                 if (deviceCapabilities.isWifiStandardSupported(ScanResult.WIFI_STANDARD_11AX)) {
                     wifiStandard = ScanResult.WIFI_STANDARD_11AX;
@@ -237,12 +227,6 @@
         // Calculate channel width
         int channelWidth;
         switch (channelWidthAp) {
-            case ScanResult.CHANNEL_WIDTH_320MHZ:
-                if (deviceCapabilities.isChannelWidthSupported(ScanResult.CHANNEL_WIDTH_320MHZ)) {
-                    channelWidth = ScanResult.CHANNEL_WIDTH_320MHZ;
-                    break;
-                }
-                // FALL THROUGH
             case ScanResult.CHANNEL_WIDTH_160MHZ:
                 if (deviceCapabilities.isChannelWidthSupported(ScanResult.CHANNEL_WIDTH_160MHZ)) {
                     channelWidth = ScanResult.CHANNEL_WIDTH_160MHZ;
@@ -279,12 +263,11 @@
                 isBluetoothConnected);
 
         return predictThroughputInternal(wifiStandard, false/* is11bMode */, channelWidth,
-                rssiDbm, maxNumSpatialStream, channelUtilization, frequency);
+                rssiDbm, maxNumSpatialStream, channelUtilization);
     }
 
     private int predictThroughputInternal(@WifiStandard int wifiStandard, boolean is11bMode,
-            int channelWidth, int rssiDbm, int maxNumSpatialStream,  int channelUtilization,
-            int frequency) {
+            int channelWidth, int rssiDbm, int maxNumSpatialStream,  int channelUtilization) {
 
         // channel bandwidth in MHz = 20MHz * (2 ^ channelWidthFactor);
         int channelWidthFactor;
@@ -295,7 +278,9 @@
             Log.e(TAG, "maxNumSpatialStream < 1 due to wrong implementation. Overridden to 1");
             maxNumSpatialStream = 1;
         }
-        if (wifiStandard == ScanResult.WIFI_STANDARD_LEGACY) {
+        if (wifiStandard == ScanResult.WIFI_STANDARD_UNKNOWN) {
+            return WifiInfo.LINK_SPEED_UNKNOWN;
+        } else if (wifiStandard == ScanResult.WIFI_STANDARD_LEGACY) {
             // For simplicity, use legacy OFDM parameters to predict 11b rate
             numTonePerSym = NUM_TONE_PER_SYM_LEGACY;
             channelWidthFactor = 0;
@@ -330,68 +315,24 @@
             maxNumSpatialStream = Math.min(maxNumSpatialStream, MAX_NUM_SPATIAL_STREAM_11AC);
             maxBitsPerTone = MAX_BITS_PER_TONE_11AC;
             symDurationNs = SYM_DURATION_11AC_NS;
-        } else if (wifiStandard == ScanResult.WIFI_STANDARD_11AX) {
+        } else { // ScanResult.WIFI_STANDARD_11AX
             if (channelWidth == ScanResult.CHANNEL_WIDTH_20MHZ) {
-                numTonePerSym = NUM_TONE_PER_SYM_11AX_BE_20MHZ;
+                numTonePerSym = NUM_TONE_PER_SYM_11AX_20MHZ;
                 channelWidthFactor = 0;
             } else if (channelWidth == ScanResult.CHANNEL_WIDTH_40MHZ) {
-                numTonePerSym = NUM_TONE_PER_SYM_11AX_BE_40MHZ;
+                numTonePerSym = NUM_TONE_PER_SYM_11AX_40MHZ;
                 channelWidthFactor = 1;
             } else if (channelWidth == ScanResult.CHANNEL_WIDTH_80MHZ) {
-                numTonePerSym = NUM_TONE_PER_SYM_11AX_BE_80MHZ;
+                numTonePerSym = NUM_TONE_PER_SYM_11AX_80MHZ;
                 channelWidthFactor = 2;
             } else {
-                numTonePerSym = NUM_TONE_PER_SYM_11AX_BE_160MHZ;
+                numTonePerSym = NUM_TONE_PER_SYM_11AX_160MHZ;
                 channelWidthFactor = 3;
             }
             maxNumSpatialStream = Math.min(maxNumSpatialStream, MAX_NUM_SPATIAL_STREAM_11AX);
             maxBitsPerTone = MAX_BITS_PER_TONE_11AX;
-            symDurationNs = SYM_DURATION_11AX_BE_NS;
-        } else if (wifiStandard == ScanResult.WIFI_STANDARD_11BE) {
-            if (channelWidth == ScanResult.CHANNEL_WIDTH_20MHZ) {
-                numTonePerSym = NUM_TONE_PER_SYM_11AX_BE_20MHZ;
-                channelWidthFactor = 0;
-            } else if (channelWidth == ScanResult.CHANNEL_WIDTH_40MHZ) {
-                numTonePerSym = NUM_TONE_PER_SYM_11AX_BE_40MHZ;
-                channelWidthFactor = 1;
-            } else if (channelWidth == ScanResult.CHANNEL_WIDTH_80MHZ) {
-                numTonePerSym = NUM_TONE_PER_SYM_11AX_BE_80MHZ;
-                channelWidthFactor = 2;
-            } else if (channelWidth == ScanResult.CHANNEL_WIDTH_160MHZ) {
-                numTonePerSym = NUM_TONE_PER_SYM_11AX_BE_160MHZ;
-                channelWidthFactor = 3;
-            } else {
-                numTonePerSym = NUM_TONE_PER_SYM_11BE_320MHZ;
-                channelWidthFactor = 4;
-            }
-            maxNumSpatialStream = Math.min(maxNumSpatialStream, MAX_NUM_SPATIAL_STREAM_11BE);
-            maxBitsPerTone = MAX_BITS_PER_TONE_11BE;
-            symDurationNs = SYM_DURATION_11AX_BE_NS;
-        } else {
-            return WifiInfo.LINK_SPEED_UNKNOWN;
+            symDurationNs = SYM_DURATION_11AX_NS;
         }
-
-        // 6Ghz RSSI boost
-        if (mContext.getResources().getBoolean(R.bool.config_wifiEnable6GhzBeaconRssiBoost)
-                && ScanResult.is6GHz(frequency)) {
-            switch (channelWidth) {
-                case ScanResult.CHANNEL_WIDTH_40MHZ:
-                    rssiDbm += 3;
-                    break;
-                case ScanResult.CHANNEL_WIDTH_80MHZ:
-                    rssiDbm += 6;
-                    break;
-                case ScanResult.CHANNEL_WIDTH_160MHZ:
-                    rssiDbm += 9;
-                    break;
-                case ScanResult.CHANNEL_WIDTH_320MHZ:
-                    rssiDbm += 12;
-                    break;
-                default:
-                    // do nothing
-            }
-        }
-
         // noiseFloorDbBoost = 10 * log10 * (2 ^ channelWidthFactor)
         int noiseFloorDbBoost = TWO_IN_DB * channelWidthFactor;
         int noiseFloorDbm = NOISE_FLOOR_20MHZ_DBM + noiseFloorDbBoost + SNR_MARGIN_DB;
diff --git a/service/java/com/android/server/wifi/ThroughputScorer.java b/service/java/com/android/server/wifi/ThroughputScorer.java
index ab2511f..139ca72 100644
--- a/service/java/com/android/server/wifi/ThroughputScorer.java
+++ b/service/java/com/android/server/wifi/ThroughputScorer.java
@@ -19,7 +19,6 @@
 import static com.android.server.wifi.WifiNetworkSelector.NetworkNominator.NOMINATOR_ID_SCORED;
 
 import android.annotation.NonNull;
-import android.net.wifi.ScanResult;
 import android.util.Log;
 
 import com.android.server.wifi.WifiCandidates.Candidate;
@@ -32,8 +31,7 @@
  */
 final class ThroughputScorer implements WifiCandidates.CandidateScorer {
     private static final String TAG = "ThroughputScorer";
-    private boolean mVerboseLoggingEnabled = false;
-
+    private static final boolean DBG = false;
     /**
      * This should match WifiNetworkSelector.experimentIdFromIdentifier(getIdentifier())
      * when using the default ScoringParams.
@@ -82,18 +80,15 @@
     }
 
     /**
-     * Enable (or disable) verbose logging for ThroughputScorer
-     */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
-    }
-
-    /**
      * Calculates an individual candidate's score.
      */
     private ScoredCandidate scoreCandidate(Candidate candidate, boolean currentNetworkHasInternet) {
-        int rssiBaseScore = calculateRssiScore(candidate);
+        int rssiSaturationThreshold = mScoringParams.getSufficientRssi(candidate.getFrequency());
+        int rssi = Math.min(candidate.getScanRssi(), rssiSaturationThreshold);
+        int rssiBaseScore = (rssi + RSSI_SCORE_OFFSET) * RSSI_SCORE_SLOPE_IS_4;
+
         int throughputBonusScore = calculateThroughputBonusScore(candidate);
+
         int rssiAndThroughputScore = rssiBaseScore + throughputBonusScore;
 
         boolean unExpectedNoInternet = candidate.hasNoInternetAccess()
@@ -101,8 +96,6 @@
         int currentNetworkBonusMin = mScoringParams.getCurrentNetworkBonusMin();
         int currentNetworkBonus = Math.max(currentNetworkBonusMin, rssiAndThroughputScore
                 * mScoringParams.getCurrentNetworkBonusPercent() / 100);
-        int bandSpecificBonus = ScanResult.is6GHz(candidate.getFrequency())
-                ? mScoringParams.getBand6GhzBonus() : 0;
         int currentNetworkBoost = (candidate.isCurrentNetwork() && !unExpectedNoInternet)
                 ? currentNetworkBonus : 0;
 
@@ -117,10 +110,9 @@
         int savedNetworkAward = candidate.isEphemeral() ? 0 : mScoringParams.getSavedNetworkBonus();
 
         int trustedAward = TRUSTED_AWARD;
-        if (!candidate.isTrusted() || candidate.isRestricted()) {
-            // Saved networks are not untrusted or restricted, but clear anyway
-            savedNetworkAward = 0;
-            unmeteredAward = 0; // Ignore metered for untrusted and restricted networks
+        if (!candidate.isTrusted()) {
+            savedNetworkAward = 0; // Saved networks are not untrusted, but clear anyway
+            unmeteredAward = 0; // Ignore metered for untrusted networks
             if (candidate.isCarrierOrPrivileged()) {
                 trustedAward = HALF_TRUSTED_AWARD;
             } else if (candidate.getNominatorId() == NOMINATOR_ID_SCORED) {
@@ -148,19 +140,9 @@
             notOemPrivateAward = 0;
         }
 
-        // These scores determine which scoring bucket the candidate falls into. The scoring buckets
-        // should not overlap so candidate in a higher bucket should always win against candidate in
-        // a lower bucket.
-        // Note: securityAward can be configured per carrier requirement to adjust the priority
-        // bucket of non-open network.
-        int scoreToDetermineBucket = unmeteredAward + savedNetworkAward + trustedAward
-                + notOemPaidAward + notOemPrivateAward + securityAward;
-        // Within the same scoring bucket, ties are broken by the following bonus scores. The sum
-        // of these scores should be capped to the buket step size to prevent overlapping bucket.
-        int scoreWithinBucket = rssiBaseScore + throughputBonusScore + currentNetworkBoost
-                + bandSpecificBonus;
-        int score = scoreToDetermineBucket
-                + Math.min(mScoringParams.getScoringBucketStepSize(), scoreWithinBucket);
+        int score = rssiBaseScore + throughputBonusScore
+                + currentNetworkBoost + securityAward + unmeteredAward + savedNetworkAward
+                + trustedAward + notOemPaidAward + notOemPrivateAward;
 
         // do not select a network that has no internet when the current network has internet.
         if (currentNetworkHasInternet && !candidate.isCurrentNetwork() && unExpectedNoInternet) {
@@ -173,10 +155,8 @@
             score = TOP_TIER_BASE_SCORE + rssiBaseScore + throughputBonusScore;
         }
 
-        if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "Score for candidate: SSID: " + candidate.getKey().matchInfo.networkSsid
-                    + " BSSID: " + candidate.getKey().bssid
-                    + " rssiScore: " + rssiBaseScore
+        if (DBG) {
+            Log.d(TAG, " rssiScore: " + rssiBaseScore
                     + " throughputScore: " + throughputBonusScore
                     + " currentNetworkBoost: " + currentNetworkBoost
                     + " securityAward: " + securityAward
@@ -195,44 +175,10 @@
                 USE_USER_CONNECT_CHOICE, candidate);
     }
 
-    private int calculateRssiScore(Candidate candidate) {
-        int rssiSaturationThreshold = mScoringParams.getSufficientRssi(candidate.getFrequency());
-        int rssi = candidate.getScanRssi();
-        if (mScoringParams.is6GhzBeaconRssiBoostEnabled()
-                && ScanResult.is6GHz(candidate.getFrequency())) {
-            switch (candidate.getChannelWidth()) {
-                case ScanResult.CHANNEL_WIDTH_40MHZ:
-                    rssi += 3;
-                    break;
-                case ScanResult.CHANNEL_WIDTH_80MHZ:
-                    rssi += 6;
-                    break;
-                case ScanResult.CHANNEL_WIDTH_160MHZ:
-                    rssi += 9;
-                    break;
-                case ScanResult.CHANNEL_WIDTH_320MHZ:
-                    rssi += 12;
-                    break;
-                default:
-                    // do nothing
-            }
-        }
-
-        rssi = Math.min(rssi, rssiSaturationThreshold);
-        return (rssi + RSSI_SCORE_OFFSET) * RSSI_SCORE_SLOPE_IS_4;
-    }
-
     private int calculateThroughputBonusScore(Candidate candidate) {
-        int throughput = candidate.getPredictedThroughputMbps();
-        int throughputUpTo800Mbps = Math.min(800, throughput);
-        int throughputMoreThan800Mbps = Math.max(0, throughput - 800);
-
-        int throughputScoreRaw = (throughputUpTo800Mbps
+        int throughputScoreRaw = candidate.getPredictedThroughputMbps()
                 * mScoringParams.getThroughputBonusNumerator()
-                / mScoringParams.getThroughputBonusDenominator())
-                + (throughputMoreThan800Mbps
-                * mScoringParams.getThroughputBonusNumeratorAfter800Mbps()
-                / mScoringParams.getThroughputBonusDenominatorAfter800Mbps());
+                / mScoringParams.getThroughputBonusDenominator();
         return Math.min(throughputScoreRaw, mScoringParams.getThroughputBonusLimit());
     }
 
diff --git a/service/java/com/android/server/wifi/UntrustedWifiNetworkFactory.java b/service/java/com/android/server/wifi/UntrustedWifiNetworkFactory.java
index d7dda70..133210b 100644
--- a/service/java/com/android/server/wifi/UntrustedWifiNetworkFactory.java
+++ b/service/java/com/android/server/wifi/UntrustedWifiNetworkFactory.java
@@ -27,7 +27,8 @@
 import java.io.PrintWriter;
 
 /**
- * Network factory to handle untrusted wifi network requests.
+ * Network factory to handle untrusted (used for {@link ScoredNetworkNominator}) wifi network
+ * requests.
  */
 public class UntrustedWifiNetworkFactory extends NetworkFactory {
     private static final String TAG = "UntrustedWifiNetworkFactory";
diff --git a/service/java/com/android/server/wifi/VelocityBasedConnectedScore.java b/service/java/com/android/server/wifi/VelocityBasedConnectedScore.java
index f1e583c..38f1ee1 100644
--- a/service/java/com/android/server/wifi/VelocityBasedConnectedScore.java
+++ b/service/java/com/android/server/wifi/VelocityBasedConnectedScore.java
@@ -176,9 +176,7 @@
      */
     @Override
     public int generateScore() {
-        final int transitionScore = isPrimary() ? WIFI_TRANSITION_SCORE
-                : WIFI_SECONDARY_TRANSITION_SCORE;
-        if (mFilter.mx == null) return transitionScore + 1;
+        if (mFilter.mx == null) return WIFI_TRANSITION_SCORE + 1;
         double badRssi = getAdjustedRssiThreshold();
         double horizonSeconds = mScoringParams.getHorizonSeconds();
         Matrix x = new Matrix(mFilter.mx);
@@ -189,7 +187,7 @@
         if (forecastRssi > filteredRssi) {
             forecastRssi = filteredRssi; // Be pessimistic about predicting an actual increase
         }
-        int score = (int) (Math.round(forecastRssi) - badRssi) + transitionScore;
+        int score = (int) (Math.round(forecastRssi) - badRssi) + WIFI_TRANSITION_SCORE;
         return score;
     }
 }
diff --git a/service/java/com/android/server/wifi/WakeupController.java b/service/java/com/android/server/wifi/WakeupController.java
index d1d0cab..ac5287d 100644
--- a/service/java/com/android/server/wifi/WakeupController.java
+++ b/service/java/com/android/server/wifi/WakeupController.java
@@ -23,12 +23,12 @@
 import android.net.wifi.WifiNetworkSuggestion;
 import android.net.wifi.WifiScanner;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.os.Process;
 import android.provider.Settings;
 import android.util.Log;
 
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.HandlerExecutor;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
@@ -328,8 +328,8 @@
     }
 
     /** Sets verbose logging flag based on verbose level. */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
+    public void enableVerboseLogging(int verbose) {
+        mVerboseLoggingEnabled = verbose > 0;
         mWakeupLock.enableVerboseLogging(mVerboseLoggingEnabled);
     }
 
diff --git a/service/java/com/android/server/wifi/WakeupNotificationFactory.java b/service/java/com/android/server/wifi/WakeupNotificationFactory.java
index 728fa86..0187009 100644
--- a/service/java/com/android/server/wifi/WakeupNotificationFactory.java
+++ b/service/java/com/android/server/wifi/WakeupNotificationFactory.java
@@ -20,7 +20,6 @@
 import android.app.PendingIntent;
 import android.content.Intent;
 import android.graphics.drawable.Icon;
-import android.net.wifi.WifiContext;
 
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
 import com.android.wifi.resources.R;
diff --git a/service/java/com/android/server/wifi/WakeupOnboarding.java b/service/java/com/android/server/wifi/WakeupOnboarding.java
index a8ea874..c7fc717 100644
--- a/service/java/com/android/server/wifi/WakeupOnboarding.java
+++ b/service/java/com/android/server/wifi/WakeupOnboarding.java
@@ -24,7 +24,6 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.net.wifi.WifiContext;
 import android.os.Handler;
 import android.os.SystemClock;
 import android.provider.Settings;
diff --git a/service/java/com/android/server/wifi/WifiApConfigStore.java b/service/java/com/android/server/wifi/WifiApConfigStore.java
index 3144bba..4e756d4 100644
--- a/service/java/com/android/server/wifi/WifiApConfigStore.java
+++ b/service/java/com/android/server/wifi/WifiApConfigStore.java
@@ -16,21 +16,12 @@
 
 package com.android.server.wifi;
 
-import static android.net.wifi.SoftApConfiguration.SECURITY_TYPE_WPA2_PSK;
-import static android.net.wifi.SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION;
-import static android.net.wifi.SoftApConfiguration.SECURITY_TYPE_WPA3_SAE;
-import static android.net.wifi.SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION;
-
 import android.annotation.NonNull;
-import android.compat.Compatibility;
 import android.content.Context;
 import android.content.IntentFilter;
-import android.content.pm.PackageManager;
 import android.net.MacAddress;
-import android.net.wifi.SoftApCapability;
 import android.net.wifi.SoftApConfiguration;
 import android.net.wifi.SoftApConfiguration.BandType;
-import android.net.wifi.WifiSsid;
 import android.os.Handler;
 import android.os.Process;
 import android.text.TextUtils;
@@ -41,7 +32,6 @@
 import com.android.modules.utils.build.SdkLevel;
 import com.android.net.module.util.MacAddressUtils;
 import com.android.server.wifi.util.ApConfigUtil;
-import com.android.server.wifi.util.ArrayUtils;
 import com.android.wifi.resources.R;
 
 import java.nio.charset.CharsetEncoder;
@@ -68,11 +58,13 @@
     private static final int RAND_SSID_INT_MAX = 9999;
 
     @VisibleForTesting
-    static final int SAE_ASCII_MIN_LEN = 1;
+    static final int SSID_MIN_LEN = 1;
     @VisibleForTesting
-    static final int PSK_ASCII_MIN_LEN = 8;
+    static final int SSID_MAX_LEN = 32;
     @VisibleForTesting
-    static final int PSK_SAE_ASCII_MAX_LEN = 63;
+    static final int PSK_MIN_LEN = 8;
+    @VisibleForTesting
+    static final int PSK_MAX_LEN = 63;
 
     private SoftApConfiguration mPersistentWifiApConfig = null;
 
@@ -87,7 +79,6 @@
     private boolean mForceApChannel = false;
     private int mForcedApBand;
     private int mForcedApChannel;
-    private final boolean mIsAutoAppendLowerBandEnabled;
 
     /**
      * Module to interact with the wifi config store.
@@ -100,9 +91,6 @@
         }
 
         public void fromDeserialized(SoftApConfiguration config) {
-            if (config.getPersistentRandomizedMacAddress() == null) {
-                config = updatePersistentRandomizedMacAddress(config);
-            }
             mPersistentWifiApConfig = new SoftApConfiguration.Builder(config).build();
         }
 
@@ -137,8 +125,6 @@
         IntentFilter filter = new IntentFilter();
         filter.addAction(ACTION_HOTSPOT_CONFIG_USER_TAPPED_CONTENT);
         mMacAddressUtil = wifiInjector.getMacAddressUtil();
-        mIsAutoAppendLowerBandEnabled = mContext.getResources().getBoolean(
-                R.bool.config_wifiSoftapAutoAppendLowerBandsToBandConfigurationEnabled);
     }
 
     /**
@@ -148,8 +134,7 @@
         if (mPersistentWifiApConfig == null) {
             /* Use default configuration. */
             Log.d(TAG, "Fallback to use default AP configuration");
-            persistConfigAndTriggerBackupManagerProxy(
-                    updatePersistentRandomizedMacAddress(getDefaultApConfiguration()));
+            persistConfigAndTriggerBackupManagerProxy(getDefaultApConfiguration());
         }
         SoftApConfiguration sanitizedPersistentconfig =
                 sanitizePersistentApConfig(mPersistentWifiApConfig);
@@ -157,7 +142,6 @@
             Log.d(TAG, "persisted config was converted, need to resave it");
             persistConfigAndTriggerBackupManagerProxy(sanitizedPersistentconfig);
         }
-
         if (mForceApChannel) {
             Log.d(TAG, "getApConfiguration: Band force to " + mForcedApBand
                     + ", and channel force to " + mForcedApChannel);
@@ -183,8 +167,7 @@
             config = sanitizePersistentApConfig(config);
         }
         persistConfigAndTriggerBackupManagerProxy(
-                new SoftApConfiguration.Builder(updatePersistentRandomizedMacAddress(config))
-                    .setUserConfiguration(true).build());
+                new SoftApConfiguration.Builder(config).setUserConfiguration(true).build());
     }
 
     /**
@@ -194,8 +177,7 @@
     public SoftApConfiguration upgradeSoftApConfiguration(@NonNull SoftApConfiguration config) {
         SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder(config);
         if (SdkLevel.isAtLeastS() && ApConfigUtil.isBridgedModeSupported(mContext)
-                && config.getBands().length == 1 && mContext.getResources().getBoolean(
-                        R.bool.config_wifiSoftapAutoUpgradeToBridgedConfigWhenSupported)) {
+                && config.getBands().length == 1) {
             int[] dual_bands = new int[] {
                     SoftApConfiguration.BAND_2GHZ,
                     SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ};
@@ -246,11 +228,11 @@
         }
 
         if (!ApConfigUtil.isWpa3SaeSupported(mContext) && (config.getSecurityType()
-                == SECURITY_TYPE_WPA3_SAE
+                == SoftApConfiguration.SECURITY_TYPE_WPA3_SAE
                 || config.getSecurityType()
-                == SECURITY_TYPE_WPA3_SAE_TRANSITION)) {
+                == SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION)) {
             configBuilder.setPassphrase(generatePassword(),
-                    SECURITY_TYPE_WPA2_PSK);
+                    SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
             Log.i(TAG, "Device doesn't support WPA3-SAE, reset config to WPA2");
         }
 
@@ -297,13 +279,8 @@
 
         if (mContext.getResources().getBoolean(
                 R.bool.config_wifiSoftapResetAutoShutdownTimerConfig)
-                && config.getShutdownTimeoutMillis() > 0) {
-            if (Compatibility.isChangeEnabled(
-                    SoftApConfiguration.REMOVE_ZERO_FOR_TIMEOUT_SETTING)) {
-                configBuilder.setShutdownTimeoutMillis(SoftApConfiguration.DEFAULT_TIMEOUT);
-            } else {
-                configBuilder.setShutdownTimeoutMillis(0);
-            }
+                && config.getShutdownTimeoutMillis() != 0) {
+            configBuilder.setShutdownTimeoutMillis(0);
             Log.i(TAG, "Reset SAP auto shutdown configuration");
         }
 
@@ -322,35 +299,32 @@
         SoftApConfiguration.Builder convertedConfigBuilder =
                 new SoftApConfiguration.Builder(config);
         int[] bands = config.getBands();
-        SparseIntArray newChannels = new SparseIntArray();
         // The bands length should always 1 in R. Adding SdkLevel.isAtLeastS for lint check only.
-        for (int i = 0; i < bands.length; i++) {
-            int channel = SdkLevel.isAtLeastS()
-                    ? config.getChannels().valueAt(i) : config.getChannel();
-            int newBand = bands[i];
-            if (channel == 0 && mIsAutoAppendLowerBandEnabled
-                    && ApConfigUtil.isBandSupported(newBand, mContext)) {
-                // some countries are unable to support 5GHz only operation, always allow for 2GHz
-                // when config doesn't force channel
-                if ((newBand & SoftApConfiguration.BAND_2GHZ) == 0) {
-                    newBand = ApConfigUtil.append24GToBandIf24GSupported(newBand, mContext);
-                }
-                // If the 6G configuration doesn't includes 5G band (2.4G have appended because
-                // countries reason), it will cause that driver can't switch channel from 6G to
-                // 5G/2.4G when coexistence happened (For instance: wifi connected to 2.4G or 5G
-                // channel). Always append 5G into band configuration when configured band includes
-                // 6G.
-                if ((newBand & SoftApConfiguration.BAND_6GHZ) != 0
-                        && (newBand & SoftApConfiguration.BAND_5GHZ) == 0) {
-                    newBand = ApConfigUtil.append5GToBandIf5GSupported(newBand, mContext);
+        if (bands.length > 1 && SdkLevel.isAtLeastS()) {
+            // Consider 2.4G instance may be shutdown, i.e. only left 5G instance. If the 5G
+            // configuration is 5G band only, it will cause that driver can't switch channel from
+            // 5G to 2.4G when coexistence happene. Always append 2.4G into band configuration to
+            // allow driver handle coexistence case after 2.4G instance shutdown.
+            SparseIntArray newChannels = new SparseIntArray();
+            for (int i = 0; i < bands.length; i++) {
+                int channel = config.getChannels().valueAt(i);
+                if (channel == 0 && (bands[i] & SoftApConfiguration.BAND_2GHZ) == 0
+                        && ApConfigUtil.isBandSupported(bands[i], mContext)) {
+                    newChannels.put(ApConfigUtil.append24GToBandIf24GSupported(bands[i], mContext),
+                            0);
+                } else {
+                    newChannels.put(bands[i], channel);
                 }
             }
-            newChannels.put(newBand, channel);
-        }
-        if (SdkLevel.isAtLeastS()) {
             convertedConfigBuilder.setChannels(newChannels);
-        } else if (bands.length > 0 && newChannels.valueAt(0) == 0) {
-            convertedConfigBuilder.setBand(newChannels.keyAt(0));
+        } else if (config.getChannel() == 0 && (bands[0] & SoftApConfiguration.BAND_2GHZ) == 0) {
+            // some countries are unable to support 5GHz only operation, always allow for 2GHz when
+            // config doesn't force channel
+            if (ApConfigUtil.isBandSupported(bands[0], mContext)) {
+                Log.i(TAG, "Supplied ap config band without 2.4G, add allowing for 2.4GHz");
+                convertedConfigBuilder.setBand(
+                        ApConfigUtil.append24GToBandIf24GSupported(bands[0], mContext));
+            }
         }
         return convertedConfigBuilder.build();
     }
@@ -376,10 +350,10 @@
                 R.string.wifi_tether_configure_ssid_default) + "_" + getRandomIntForDefaultSsid());
         if (ApConfigUtil.isWpa3SaeSupported(mContext)) {
             configBuilder.setPassphrase(generatePassword(),
-                    SECURITY_TYPE_WPA3_SAE_TRANSITION);
+                    SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION);
         } else {
             configBuilder.setPassphrase(generatePassword(),
-                    SECURITY_TYPE_WPA2_PSK);
+                    SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
         }
 
         // It is new overlay configuration, it should always false in R. Add SdkLevel.isAtLeastS for
@@ -415,70 +389,47 @@
                 + getRandomIntForDefaultSsid();
     }
 
-    private static boolean hasAutomotiveFeature(Context context) {
-        return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE);
-    }
-
     /**
      * Generate a temporary WPA2 based configuration for use by the local only hotspot.
      * This config is not persisted and will not be stored by the WifiApConfigStore.
      */
-    public SoftApConfiguration generateLocalOnlyHotspotConfig(@NonNull Context context,
-            @Nullable SoftApConfiguration customConfig, @NonNull SoftApCapability capability) {
+    public SoftApConfiguration generateLocalOnlyHotspotConfig(Context context, int apBand,
+            @Nullable SoftApConfiguration customConfig) {
         SoftApConfiguration.Builder configBuilder;
         if (customConfig != null) {
             configBuilder = new SoftApConfiguration.Builder(customConfig);
-            // Make sure that we use available band on old build.
-            if (!SdkLevel.isAtLeastT()
-                    && !isBandsSupported(customConfig.getBands(), context)) {
-                configBuilder.setBand(generateDefaultBand(context));
-            }
         } else {
             configBuilder = new SoftApConfiguration.Builder();
-            // Make sure the default band configuration is supported.
-            configBuilder.setBand(generateDefaultBand(context));
             // Default to disable the auto shutdown
             configBuilder.setAutoShutdownEnabled(false);
-            if (ApConfigUtil.isWpa3SaeSupported(context)) {
-                configBuilder.setPassphrase(generatePassword(),
-                        SECURITY_TYPE_WPA3_SAE_TRANSITION);
-            } else {
-                configBuilder.setPassphrase(generatePassword(),
-                        SECURITY_TYPE_WPA2_PSK);
-            }
-            // Update default MAC randomization setting to NONE when feature doesn't support it or
-            // It was disabled in tethered mode.
-            if (!ApConfigUtil.isApMacRandomizationSupported(context)
-                    || (mPersistentWifiApConfig != null
-                    && mPersistentWifiApConfig.getMacRandomizationSettingInternal()
-                           == SoftApConfiguration.RANDOMIZATION_NONE)) {
-                if (SdkLevel.isAtLeastS()) {
-                    configBuilder.setMacRandomizationSetting(
-                            SoftApConfiguration.RANDOMIZATION_NONE);
-                }
-            }
         }
 
-        // Automotive mode can force the LOHS to specific bands
-        if (hasAutomotiveFeature(context)) {
-            if (context.getResources().getBoolean(R.bool.config_wifiLocalOnlyHotspot6ghz)
-                    && ApConfigUtil.isBandSupported(SoftApConfiguration.BAND_6GHZ, mContext)
-                    && !ArrayUtils.isEmpty(capability
-                          .getSupportedChannelList(SoftApConfiguration.BAND_6GHZ))) {
-                configBuilder.setBand(SoftApConfiguration.BAND_6GHZ);
-            } else if (context.getResources().getBoolean(
-                        R.bool.config_wifi_local_only_hotspot_5ghz)
-                    && ApConfigUtil.isBandSupported(SoftApConfiguration.BAND_5GHZ, mContext)
-                    && !ArrayUtils.isEmpty(capability
-                          .getSupportedChannelList(SoftApConfiguration.BAND_5GHZ))) {
-                configBuilder.setBand(SoftApConfiguration.BAND_5GHZ);
-            }
-        }
+        configBuilder.setBand(apBand);
+
         if (customConfig == null || customConfig.getSsid() == null) {
             configBuilder.setSsid(generateLohsSsid(context));
         }
+        if (customConfig == null) {
+            if (ApConfigUtil.isWpa3SaeSupported(context)) {
+                configBuilder.setPassphrase(generatePassword(),
+                        SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION);
+            } else {
+                configBuilder.setPassphrase(generatePassword(),
+                        SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
+            }
+        }
 
-        return updatePersistentRandomizedMacAddress(configBuilder.build());
+        // Update default MAC randomization setting to NONE when feature doesn't support it or
+        // It was disabled in tethered mode.
+        if (!ApConfigUtil.isApMacRandomizationSupported(context) || (mPersistentWifiApConfig != null
+                && mPersistentWifiApConfig.getMacRandomizationSettingInternal()
+                == SoftApConfiguration.RANDOMIZATION_NONE)) {
+            if (SdkLevel.isAtLeastS()) {
+                configBuilder.setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE);
+            }
+        }
+
+        return configBuilder.build();
     }
 
     /**
@@ -487,48 +438,58 @@
      */
     SoftApConfiguration randomizeBssidIfUnset(Context context, SoftApConfiguration config) {
         SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder(config);
-        if (config.getBssid() == null && ApConfigUtil.isApMacRandomizationSupported(mContext)
-                && config.getMacRandomizationSettingInternal()
-                    != SoftApConfiguration.RANDOMIZATION_NONE) {
-            MacAddress macAddress = null;
+        if (config.getBssid() == null && ApConfigUtil.isApMacRandomizationSupported(mContext)) {
             if (config.getMacRandomizationSettingInternal()
-                    == SoftApConfiguration.RANDOMIZATION_PERSISTENT) {
-                macAddress = config.getPersistentRandomizedMacAddress();
-                if (macAddress == null) {
-                    WifiSsid ssid = config.getWifiSsid();
-                    macAddress = mMacAddressUtil.calculatePersistentMac(
-                            ssid != null ? ssid.toString() : null,
-                            mMacAddressUtil.obtainMacRandHashFunctionForSap(Process.WIFI_UID));
-                    if (macAddress == null) {
-                        Log.e(TAG, "Failed to calculate MAC from SSID. "
-                                + "Generating new random MAC instead.");
-                    }
-                }
+                    == SoftApConfiguration.RANDOMIZATION_NONE) {
+                return configBuilder.build();
             }
+
+            MacAddress macAddress = mMacAddressUtil.calculatePersistentMac(config.getSsid(),
+                    mMacAddressUtil.obtainMacRandHashFunctionForSap(Process.WIFI_UID));
             if (macAddress == null) {
+                Log.e(TAG, "Failed to calculate MAC from SSID. "
+                        + "Generating new random MAC instead.");
                 macAddress = MacAddressUtils.createRandomUnicastAddress();
             }
             configBuilder.setBssid(macAddress);
-            if (macAddress != null && SdkLevel.isAtLeastS()) {
-                configBuilder.setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE);
-            }
         }
         return configBuilder.build();
     }
 
     /**
-     * Verify provided preSharedKey in ap config for WPA2_PSK/WPA3_SAE (Transition) network
-     * meets requirements.
+     * Verify provided SSID for existence, length and conversion to bytes
+     *
+     * @param ssid String ssid name
+     * @return boolean indicating ssid met requirements
      */
-    private static boolean validateApConfigAsciiPreSharedKey(
-            @SoftApConfiguration.SecurityType int securityType, String preSharedKey) {
-        final int sharedKeyLen = preSharedKey.length();
-        final int keyMinLen = securityType == SECURITY_TYPE_WPA3_SAE
-                ? SAE_ASCII_MIN_LEN : PSK_ASCII_MIN_LEN;
-        if (sharedKeyLen < keyMinLen || sharedKeyLen > PSK_SAE_ASCII_MAX_LEN) {
-            Log.d(TAG, "softap network password string size must be at least " + keyMinLen
-                    + " and no more than " + PSK_SAE_ASCII_MAX_LEN + " when type is "
-                    + securityType);
+    private static boolean validateApConfigSsid(String ssid) {
+        if (TextUtils.isEmpty(ssid)) {
+            Log.d(TAG, "SSID for softap configuration must be set.");
+            return false;
+        }
+
+        try {
+            byte[] ssid_bytes = ssid.getBytes(StandardCharsets.UTF_8);
+
+            if (ssid_bytes.length < SSID_MIN_LEN || ssid_bytes.length > SSID_MAX_LEN) {
+                Log.d(TAG, "softap SSID is defined as UTF-8 and it must be at least "
+                        + SSID_MIN_LEN + " byte and not more than " + SSID_MAX_LEN + " bytes");
+                return false;
+            }
+        } catch (IllegalArgumentException e) {
+            Log.e(TAG, "softap config SSID verification failed: malformed string " + ssid);
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Verify provided preSharedKey in ap config for WPA2_PSK network meets requirements.
+     */
+    private static boolean validateApConfigPreSharedKey(String preSharedKey) {
+        if (preSharedKey.length() < PSK_MIN_LEN || preSharedKey.length() > PSK_MAX_LEN) {
+            Log.d(TAG, "softap network password string size must be at least " + PSK_MIN_LEN
+                    + " and no more than " + PSK_MAX_LEN);
             return false;
         }
 
@@ -544,8 +505,8 @@
     /**
      * Validate a SoftApConfiguration is properly configured for use by SoftApManager.
      *
-     * This method checks for consistency between security settings (if it requires a password, was
-     * one provided?).
+     * This method checks the length of the SSID and for consistency between security settings (if
+     * it requires a password, was one provided?).
      *
      * @param apConfig {@link SoftApConfiguration} to use for softap mode
      * @param isPrivileged indicate the caller can pass some fields check or not
@@ -555,9 +516,8 @@
     static boolean validateApWifiConfiguration(@NonNull SoftApConfiguration apConfig,
             boolean isPrivileged, Context context) {
         // first check the SSID
-        WifiSsid ssid = apConfig.getWifiSsid();
-        if (ssid == null || ssid.getBytes().length == 0) {
-            Log.d(TAG, "SSID for softap configuration cannot be null or 0 length.");
+        if (!validateApConfigSsid(apConfig.getSsid())) {
+            // failed SSID verificiation checks
             return false;
         }
 
@@ -578,15 +538,15 @@
             return false;
         }
 
-        if (ApConfigUtil.isNonPasswordAP(authType)) {
+        if (authType == SoftApConfiguration.SECURITY_TYPE_OPEN) {
             // open networks should not have a password
             if (hasPreSharedKey) {
                 Log.d(TAG, "open softap network should not have a password");
                 return false;
             }
-        } else if (authType == SECURITY_TYPE_WPA2_PSK
-                || authType == SECURITY_TYPE_WPA3_SAE_TRANSITION
-                || authType == SECURITY_TYPE_WPA3_SAE) {
+        } else if (authType == SoftApConfiguration.SECURITY_TYPE_WPA2_PSK
+                || authType == SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION
+                || authType == SoftApConfiguration.SECURITY_TYPE_WPA3_SAE) {
             // this is a config that should have a password - check that first
             if (!hasPreSharedKey) {
                 Log.d(TAG, "softap network password must be set");
@@ -600,10 +560,12 @@
                     Log.d(TAG, "passphrase not ASCII encodable");
                     return false;
                 }
-                if (!validateApConfigAsciiPreSharedKey(authType, preSharedKey)) {
-                    // failed preSharedKey checks for WPA2 and WPA3 SAE (Transition) mode.
-                    return false;
-                }
+            }
+
+            if (authType != SoftApConfiguration.SECURITY_TYPE_WPA3_SAE
+                    && !validateApConfigPreSharedKey(preSharedKey)) {
+                // failed preSharedKey checks for WPA2 and WPA3 SAE Transition mode.
+                return false;
             }
         } else {
             // this is not a supported security type
@@ -611,27 +573,12 @@
             return false;
         }
 
-        if (!isBandsSupported(apConfig.getBands(), context)) {
-            return false;
-        }
-
-        if (ApConfigUtil.isSecurityTypeRestrictedFor6gBand(authType)) {
-            for (int band : apConfig.getBands()) {
-                // Only return failure if requested band is limitted to 6GHz only
-                if (band == SoftApConfiguration.BAND_6GHZ) {
-                    Log.d(TAG, "security type is not allowed for softap in 6GHz band");
-                    return false;
-                }
-            }
-        }
-
-        if (SdkLevel.isAtLeastT()
-                && authType == SECURITY_TYPE_WPA3_OWE_TRANSITION) {
-            if (!ApConfigUtil.isBridgedModeSupported(context)) {
-                Log.d(TAG, "softap owe transition needs bridge mode support");
+        if (SdkLevel.isAtLeastS()) {
+            if (!isBandsSupported(apConfig.getBands(), context)) {
                 return false;
-            } else if (apConfig.getBands().length > 1) {
-                Log.d(TAG, "softap owe transition must use single band");
+            }
+        } else {
+            if (!ApConfigUtil.isBandSupported(apConfig.getBand(), context)) {
                 return false;
             }
         }
@@ -696,24 +643,4 @@
     public void disableForceSoftApBandOrChannel() {
         mForceApChannel = false;
     }
-
-    private SoftApConfiguration updatePersistentRandomizedMacAddress(SoftApConfiguration config) {
-        // Update randomized MacAddress
-        WifiSsid ssid = config.getWifiSsid();
-        MacAddress randomizedMacAddress = mMacAddressUtil.calculatePersistentMac(
-                ssid != null ? ssid.toString() : null,
-                mMacAddressUtil.obtainMacRandHashFunctionForSap(Process.WIFI_UID));
-        if (randomizedMacAddress != null) {
-            return new SoftApConfiguration.Builder(config)
-                    .setRandomizedMacAddress(randomizedMacAddress).build();
-        }
-
-        if (config.getPersistentRandomizedMacAddress() != null) {
-            return config;
-        }
-
-        randomizedMacAddress = MacAddressUtils.createRandomUnicastAddress();
-        return new SoftApConfiguration.Builder(config)
-                .setRandomizedMacAddress(randomizedMacAddress).build();
-    }
 }
diff --git a/service/java/com/android/server/wifi/WifiBackupRestore.java b/service/java/com/android/server/wifi/WifiBackupRestore.java
index e8e4c27..ab46bb6 100644
--- a/service/java/com/android/server/wifi/WifiBackupRestore.java
+++ b/service/java/com/android/server/wifi/WifiBackupRestore.java
@@ -218,15 +218,6 @@
                         + configuration.getKey());
                 continue;
             }
-            // Skip if user has never connected due to wrong password.
-            if (!configuration.getNetworkSelectionStatus().hasEverConnected()) {
-                int disableReason = configuration.getNetworkSelectionStatus()
-                        .getNetworkSelectionDisableReason();
-                if (disableReason
-                        == WifiConfiguration.NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD) {
-                    continue;
-                }
-            }
             // Write this configuration data now.
             XmlUtil.writeNextSectionStart(out, XML_TAG_SECTION_HEADER_NETWORK);
             writeNetworkConfigurationToXml(out, configuration);
@@ -424,8 +415,8 @@
      *
      * @param verbose verbosity level.
      */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
+    public void enableVerboseLogging(int verbose) {
+        mVerboseLoggingEnabled = (verbose > 0);
         if (!mVerboseLoggingEnabled) {
             mDebugLastBackupDataRetrieved = null;
             mDebugLastBackupDataRestored = null;
@@ -714,14 +705,14 @@
                             mParsedIdStrLine.substring(mParsedIdStrLine.indexOf('=') + 1);
                     if (idString != null) {
                         Map<String, String> extras =
-                                SupplicantStaNetworkHalHidlImpl.parseNetworkExtra(
+                                SupplicantStaNetworkHal.parseNetworkExtra(
                                         NativeUtil.removeEnclosingQuotes(idString));
                         if (extras == null) {
                             Log.e(TAG, "Error parsing network extras, ignoring network.");
                             return null;
                         }
                         String configKey = extras.get(
-                                SupplicantStaNetworkHalHidlImpl.ID_STRING_KEY_CONFIG_KEY);
+                                SupplicantStaNetworkHal.ID_STRING_KEY_CONFIG_KEY);
                         // No ConfigKey was passed but we need it for validating the parsed
                         // network so we stop the restore.
                         if (configKey == null) {
@@ -738,7 +729,7 @@
                         // these networks were created by system apps.
                         int creatorUid =
                                 Integer.parseInt(extras.get(
-                                        SupplicantStaNetworkHalHidlImpl.ID_STRING_KEY_CREATOR_UID));
+                                        SupplicantStaNetworkHal.ID_STRING_KEY_CREATOR_UID));
                         if (creatorUid >= Process.FIRST_APPLICATION_UID) {
                             Log.d(TAG, "Ignoring network from non-system app: "
                                     + configuration.getKey());
diff --git a/service/java/com/android/server/wifi/WifiBlocklistMonitor.java b/service/java/com/android/server/wifi/WifiBlocklistMonitor.java
index ea217e9..7a389eb 100644
--- a/service/java/com/android/server/wifi/WifiBlocklistMonitor.java
+++ b/service/java/com/android/server/wifi/WifiBlocklistMonitor.java
@@ -26,7 +26,7 @@
 import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
 import android.net.wifi.WifiConfiguration.NetworkSelectionStatus.DisableReasonInfo;
 import android.net.wifi.WifiConfiguration.NetworkSelectionStatus.NetworkSelectionDisableReason;
-import android.net.wifi.WifiSsid;
+import android.net.wifi.WifiManager;
 import android.util.ArrayMap;
 import android.util.ArraySet;
 import android.util.LocalLog;
@@ -34,8 +34,6 @@
 import android.util.SparseArray;
 
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wifi.util.StringUtil;
-import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.wifi.resources.R;
 
 import java.io.FileDescriptor;
@@ -85,10 +83,8 @@
     public static final int REASON_FRAMEWORK_DISCONNECT_CONNECTED_SCORE = 11;
     // Non-local disconnection in the middle of connecting state
     public static final int REASON_NONLOCAL_DISCONNECT_CONNECTING = 12;
-    // Connection attempt aborted by the watchdog because the AP didn't respond.
-    public static final int REASON_FAILURE_NO_RESPONSE = 13;
     // Constant being used to keep track of how many failure reasons there are.
-    public static final int NUMBER_REASON_CODES = 14;
+    public static final int NUMBER_REASON_CODES = 13;
     public static final int INVALID_REASON = -1;
 
     @IntDef(prefix = { "REASON_" }, value = {
@@ -104,8 +100,7 @@
             REASON_FRAMEWORK_DISCONNECT_MBO_OCE,
             REASON_FRAMEWORK_DISCONNECT_FAST_RECONNECT,
             REASON_FRAMEWORK_DISCONNECT_CONNECTED_SCORE,
-            REASON_NONLOCAL_DISCONNECT_CONNECTING,
-            REASON_FAILURE_NO_RESPONSE
+            REASON_NONLOCAL_DISCONNECT_CONNECTING
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface FailureReason {}
@@ -129,7 +124,6 @@
     private final WifiScoreCard mWifiScoreCard;
     private final ScoringParams mScoringParams;
     private final WifiMetrics mWifiMetrics;
-    private final WifiPermissionsUtil mWifiPermissionsUtil;
     private final Map<Integer, BssidDisableReason> mBssidDisableReasons =
             buildBssidDisableReasons();
     private final SparseArray<DisableReasonInfo> mDisableReasonInfo;
@@ -144,7 +138,6 @@
 
     // Map of ssid to Allowlist SSIDs
     private Map<String, List<String>> mSsidAllowlistMap = new ArrayMap<>();
-    private Set<WifiSsid> mSsidsAllowlistForNetworkSelection = new ArraySet<>();
 
     /**
      * Verbose logging flag. Toggled by developer options.
@@ -182,8 +175,6 @@
         // to true once it is covered in SSID blocklist.
         result.put(REASON_NONLOCAL_DISCONNECT_CONNECTING, new BssidDisableReason(
                 "REASON_NONLOCAL_DISCONNECT_CONNECTING", true, false));
-        result.put(REASON_FAILURE_NO_RESPONSE, new BssidDisableReason(
-                "REASON_FAILURE_NO_RESPONSE", true, true));
         return result;
     }
 
@@ -205,8 +196,7 @@
      */
     WifiBlocklistMonitor(Context context, WifiConnectivityHelper connectivityHelper,
             WifiLastResortWatchdog wifiLastResortWatchdog, Clock clock, LocalLog localLog,
-            WifiScoreCard wifiScoreCard, ScoringParams scoringParams, WifiMetrics wifiMetrics,
-            WifiPermissionsUtil wifiPermissionsUtil) {
+            WifiScoreCard wifiScoreCard, ScoringParams scoringParams, WifiMetrics wifiMetrics) {
         mContext = context;
         mConnectivityHelper = connectivityHelper;
         mWifiLastResortWatchdog = wifiLastResortWatchdog;
@@ -216,7 +206,6 @@
         mScoringParams = scoringParams;
         mDisableReasonInfo = DISABLE_REASON_INFOS.clone();
         mWifiMetrics = wifiMetrics;
-        mWifiPermissionsUtil = wifiPermissionsUtil;
         loadCustomConfigsForDisableReasonInfos();
     }
 
@@ -291,43 +280,16 @@
         return status;
     }
 
-    /**
-     * Set a list of SSIDs that will always be enabled for network selection.
-     */
-    public void setSsidsAllowlist(@NonNull List<WifiSsid> ssids) {
-        mSsidsAllowlistForNetworkSelection = new ArraySet<>(ssids);
-    }
-
-    /**
-     * Get the list of SSIDs that will always be enabled for network selection.
-     */
-    public List<WifiSsid> getSsidsAllowlist() {
-        return new ArrayList<>(mSsidsAllowlistForNetworkSelection);
-    }
-
-    private boolean isValidNetworkAndFailureReasonForBssidBlocking(String bssid,
-            WifiConfiguration config, @FailureReason int reasonCode) {
-        if (bssid == null || config == null
+    private boolean isValidNetworkAndFailureReason(String bssid, String ssid,
+            @FailureReason int reasonCode) {
+        if (bssid == null || ssid == null || WifiManager.UNKNOWN_SSID.equals(ssid)
                 || bssid.equals(ClientModeImpl.SUPPLICANT_BSSID_ANY)
                 || reasonCode < 0 || reasonCode >= NUMBER_REASON_CODES) {
-            Log.e(TAG, "Invalid input: BSSID=" + bssid + ", config=" + config
+            Log.e(TAG, "Invalid input: BSSID=" + bssid + ", SSID=" + ssid
                     + ", reasonCode=" + reasonCode);
             return false;
         }
-        return !isConfigExemptFromBlocklist(config);
-    }
-
-    private boolean isConfigExemptFromBlocklist(@NonNull WifiConfiguration config) {
-        try {
-            // Only enterprise owned configs that are in the doNoBlocklist are exempt from
-            // blocklisting.
-            WifiSsid wifiSsid = WifiSsid.fromString(config.SSID);
-            return mSsidsAllowlistForNetworkSelection.contains(wifiSsid)
-                    && mWifiPermissionsUtil.isAdmin(config.creatorUid, config.creatorName);
-        } catch (IllegalArgumentException e) {
-            Log.e(TAG, "Failed to convert raw ssid=" + config.SSID + " to WifiSsid");
-            return false;
-        }
+        return true;
     }
 
     private boolean shouldWaitForWatchdogToTriggerFirst(String bssid,
@@ -343,21 +305,20 @@
      * This is meant to be used by features that need wifi to avoid a BSSID for a certain duration,
      * and thus will not increase the failure streak counters.
      * @param bssid identifies the AP to block.
-     * @param config identifies the WifiConfiguration.
+     * @param ssid identifies the SSID the AP belongs to.
      * @param durationMs duration in millis to block.
      * @param blockReason reason for blocking the BSSID.
      * @param rssi the latest RSSI observed.
      */
-    public void blockBssidForDurationMs(@NonNull String bssid, WifiConfiguration config,
+    public void blockBssidForDurationMs(@NonNull String bssid, @NonNull String ssid,
             long durationMs, @FailureReason int blockReason, int rssi) {
-        if (durationMs <= 0 || !isValidNetworkAndFailureReasonForBssidBlocking(
-                bssid, config, blockReason)) {
-            Log.e(TAG, "Invalid input: BSSID=" + bssid + ", config=" + config
+        if (durationMs <= 0 || !isValidNetworkAndFailureReason(bssid, ssid, blockReason)) {
+            Log.e(TAG, "Invalid input: BSSID=" + bssid + ", SSID=" + ssid
                     + ", durationMs=" + durationMs + ", blockReason=" + blockReason
                     + ", rssi=" + rssi);
             return;
         }
-        BssidStatus status = getOrCreateBssidStatus(bssid, config.SSID);
+        BssidStatus status = getOrCreateBssidStatus(bssid, ssid);
         if (status.isInBlocklist
                 && status.blocklistEndTimeMs - mClock.getWallClockMillis() > durationMs) {
             // Return because this BSSID is already being blocked for a longer time.
@@ -411,9 +372,6 @@
         FAILURE_COUNT_DISABLE_THRESHOLD[REASON_NONLOCAL_DISCONNECT_CONNECTING] =
                 mContext.getResources().getInteger(R.integer
                         .config_wifiBssidBlocklistMonitorNonlocalDisconnectConnectingThreshold);
-        FAILURE_COUNT_DISABLE_THRESHOLD[REASON_FAILURE_NO_RESPONSE] =
-                mContext.getResources().getInteger(R.integer
-                        .config_wifiBssidBlocklistMonitorNoResponseThreshold);
         mFailureCountDisableThresholdArrayInitialized = true;
         return FAILURE_COUNT_DISABLE_THRESHOLD[reasonCode];
     }
@@ -455,12 +413,11 @@
      * Note a failure event on a bssid and perform appropriate actions.
      * @return True if the blocklist has been modified.
      */
-    public boolean handleBssidConnectionFailure(String bssid, WifiConfiguration config,
+    public boolean handleBssidConnectionFailure(String bssid, String ssid,
             @FailureReason int reasonCode, int rssi) {
-        if (!isValidNetworkAndFailureReasonForBssidBlocking(bssid, config, reasonCode)) {
+        if (!isValidNetworkAndFailureReason(bssid, ssid, reasonCode)) {
             return false;
         }
-        String ssid = config.SSID;
         BssidDisableReason bssidDisableReason = mBssidDisableReasons.get(reasonCode);
         if (bssidDisableReason == null) {
             Log.e(TAG, "Bssid disable reason not found. ReasonCode=" + reasonCode);
@@ -511,7 +468,6 @@
         mWifiScoreCard.resetBssidBlocklistStreak(ssid, bssid, REASON_AUTHENTICATION_FAILURE);
         mWifiScoreCard.resetBssidBlocklistStreak(ssid, bssid,
                 REASON_NONLOCAL_DISCONNECT_CONNECTING);
-        mWifiScoreCard.resetBssidBlocklistStreak(ssid, bssid, REASON_FAILURE_NO_RESPONSE);
 
         long connectionTime = mClock.getWallClockMillis();
         long prevConnectionTime = mWifiScoreCard.setBssidConnectionTimestampMs(
@@ -534,7 +490,6 @@
         status.failureCount[REASON_ASSOCIATION_TIMEOUT] = 0;
         status.failureCount[REASON_AUTHENTICATION_FAILURE] = 0;
         status.failureCount[REASON_NONLOCAL_DISCONNECT_CONNECTING] = 0;
-        status.failureCount[REASON_FAILURE_NO_RESPONSE] = 0;
         if (connectionTime - prevConnectionTime > ABNORMAL_DISCONNECT_RESET_TIME_MS) {
             status.failureCount[REASON_ABNORMAL_DISCONNECT] = 0;
         }
@@ -686,13 +641,11 @@
     /**
      * Attempts to re-enable BSSIDs that likely experienced failures due to low RSSI.
      * @param scanDetails
-     * @return the list of ScanDetails for which BSSIDs were re-enabled.
      */
-    public @NonNull List<ScanDetail> tryEnablingBlockedBssids(List<ScanDetail> scanDetails) {
+    public void tryEnablingBlockedBssids(List<ScanDetail> scanDetails) {
         if (scanDetails == null) {
-            return Collections.EMPTY_LIST;
+            return;
         }
-        List<ScanDetail> results = new ArrayList<>();
         for (ScanDetail scanDetail : scanDetails) {
             ScanResult scanResult = scanDetail.getScanResult();
             if (scanResult == null) {
@@ -704,20 +657,13 @@
                 continue;
             }
             int sufficientRssi = mScoringParams.getSufficientRssi(scanResult.frequency);
-            int goodRssi = mScoringParams.getGoodRssi(scanResult.frequency);
-            boolean rssiMinDiffAchieved = scanResult.level - status.lastRssi
-                    >= MIN_RSSI_DIFF_TO_UNBLOCK_BSSID;
-            boolean sufficientRssiBreached =
-                    status.lastRssi < sufficientRssi && scanResult.level >= sufficientRssi;
-            boolean goodRssiBreached = status.lastRssi < goodRssi && scanResult.level >= goodRssi;
-            if (rssiMinDiffAchieved && (sufficientRssiBreached || goodRssiBreached)) {
+            if (status.lastRssi < sufficientRssi && scanResult.level >= sufficientRssi
+                    && scanResult.level - status.lastRssi >= MIN_RSSI_DIFF_TO_UNBLOCK_BSSID) {
                 mBssidBlocklistMonitorLogger.logBssidUnblocked(
                         status, "rssi significantly improved");
                 mBssidStatusMap.remove(status.bssid);
-                results.add(scanDetail);
             }
         }
-        return results;
     }
 
     private boolean isLowRssiSensitiveFailure(int blockReason) {
@@ -847,9 +793,10 @@
 
         private StringBuilder createStringBuilderWithLogTime() {
             StringBuilder sb = new StringBuilder();
-            Calendar c = Calendar.getInstance();
-            c.setTimeInMillis(mClock.getWallClockMillis());
-            sb.append("logTime=").append(StringUtil.calendarToString(c));
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTimeInMillis(mClock.getWallClockMillis());
+            sb.append("logTimeMs=" + String.format("%tm-%td %tH:%tM:%tS.%tL", calendar, calendar,
+                    calendar, calendar, calendar, calendar));
             return sb;
         }
 
@@ -870,10 +817,6 @@
             for (String line : mLogBuffer) {
                 pw.println(line);
             }
-            pw.println("List of SSIDs to never block:");
-            for (WifiSsid ssid : mSsidsAllowlistForNetworkSelection) {
-                pw.println(ssid.toString());
-            }
             pw.println("WifiBlocklistMonitor - Bssid blocklist logs end ----");
         }
     }
@@ -931,11 +874,15 @@
             if (isInBlocklist) {
                 sb.append(", blockReason=" + getFailureReasonString(blockReason));
                 sb.append(", lastRssi=" + lastRssi);
-                Calendar c = Calendar.getInstance();
-                c.setTimeInMillis(blocklistStartTimeMs);
-                sb.append(", blocklistStartTime=").append(StringUtil.calendarToString(c));
-                c.setTimeInMillis(blocklistEndTimeMs);
-                sb.append(", blocklistEndTime=").append(StringUtil.calendarToString(c));
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTimeInMillis(blocklistStartTimeMs);
+                sb.append(", blocklistStartTimeMs="
+                        + String.format("%tm-%td %tH:%tM:%tS.%tL", calendar, calendar,
+                        calendar, calendar, calendar, calendar));
+                calendar.setTimeInMillis(blocklistEndTimeMs);
+                sb.append(", blocklistEndTimeMs="
+                        + String.format("%tm-%td %tH:%tM:%tS.%tL", calendar, calendar,
+                        calendar, calendar, calendar, calendar));
             }
             return sb.toString();
         }
@@ -1042,12 +989,6 @@
         }
         NetworkSelectionStatus networkStatus = config.getNetworkSelectionStatus();
         if (reason != NetworkSelectionStatus.DISABLED_NONE) {
-            // Do not disable if in the exception list
-            if (reason != NetworkSelectionStatus.DISABLED_BY_WIFI_MANAGER
-                    && isConfigExemptFromBlocklist(config)) {
-                return false;
-            }
-
             // Do not update SSID blocklist with information if this is the only
             // SSID be observed. By ignoring it we will cause additional failures
             // which will trigger Watchdog.
diff --git a/service/java/com/android/server/wifi/WifiCandidates.java b/service/java/com/android/server/wifi/WifiCandidates.java
index f32d3a2..5f17369 100644
--- a/service/java/com/android/server/wifi/WifiCandidates.java
+++ b/service/java/com/android/server/wifi/WifiCandidates.java
@@ -22,7 +22,6 @@
 import android.net.MacAddress;
 import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
-import android.net.wifi.WifiAnnotations;
 import android.net.wifi.WifiConfiguration;
 import android.util.ArrayMap;
 
@@ -100,10 +99,6 @@
          */
         boolean isOemPrivate();
         /**
-         * Returns true for a secondary network with internet.
-         */
-        boolean isSecondaryInternet();
-        /**
          * Returns true if suggestion came from a carrier or privileged app.
          */
         boolean isCarrierOrPrivileged();
@@ -153,11 +148,6 @@
          * Gets the scan frequency.
          */
         int getFrequency();
-
-        /**
-         * Gets the channel width.
-         */
-        @WifiAnnotations.ChannelWidth int getChannelWidth();
         /**
          * Gets the predicted throughput in Mbps.
          */
@@ -170,11 +160,6 @@
          * Gets statistics from the scorecard.
          */
         @Nullable WifiScoreCardProto.Signal getEventStatistics(WifiScoreCardProto.Event event);
-
-        /**
-         * Returns true for a restricted network.
-         */
-        boolean isRestricted();
     }
 
     /**
@@ -185,7 +170,6 @@
         private final @WifiNetworkSelector.NetworkNominator.NominatorId int mNominatorId;
         private final int mScanRssi;
         private final int mFrequency;
-        private final int mChannelWidth;
         private final double mLastSelectionWeight;
         private final WifiScoreCard.PerBssid mPerBssid; // For accessing the scorecard entry
         private final boolean mIsCurrentNetwork;
@@ -197,10 +181,8 @@
         private final boolean mPasspoint;
         private final boolean mEphemeral;
         private final boolean mTrusted;
-        private final boolean mRestricted;
         private final boolean mOemPaid;
         private final boolean mOemPrivate;
-        private final boolean mSecondaryInternet;
         private final boolean mCarrierOrPrivileged;
         private final int mPredictedThroughputMbps;
         private final int mEstimatedPercentInternetAvailability;
@@ -210,7 +192,6 @@
                 @WifiNetworkSelector.NetworkNominator.NominatorId int nominatorId,
                 int scanRssi,
                 int frequency,
-                int channelWidth,
                 double lastSelectionWeight,
                 boolean isCurrentNetwork,
                 boolean isCurrentBssid,
@@ -221,7 +202,6 @@
             this.mNominatorId = nominatorId;
             this.mScanRssi = scanRssi;
             this.mFrequency = frequency;
-            this.mChannelWidth = channelWidth;
             this.mPerBssid = perBssid;
             this.mLastSelectionWeight = lastSelectionWeight;
             this.mIsCurrentNetwork = isCurrentNetwork;
@@ -235,12 +215,10 @@
             this.mTrusted = config.trusted;
             this.mOemPaid = config.oemPaid;
             this.mOemPrivate = config.oemPrivate;
-            this.mSecondaryInternet = config.dbsSecondaryInternet;
             this.mCarrierOrPrivileged = isCarrierOrPrivileged;
             this.mPredictedThroughputMbps = predictedThroughputMbps;
             this.mEstimatedPercentInternetAvailability = perBssid == null ? 50 :
                     perBssid.estimatePercentInternetAvailability();
-            this.mRestricted = config.restricted;
         }
 
         @Override
@@ -274,11 +252,6 @@
         }
 
         @Override
-        public boolean isRestricted() {
-            return mRestricted;
-        }
-
-        @Override
         public boolean isOemPaid() {
             return mOemPaid;
         }
@@ -289,11 +262,6 @@
         }
 
         @Override
-        public boolean isSecondaryInternet() {
-            return mSecondaryInternet;
-        }
-
-        @Override
         public boolean isCarrierOrPrivileged() {
             return mCarrierOrPrivileged;
         }
@@ -344,11 +312,6 @@
         }
 
         @Override
-        public int getChannelWidth() {
-            return mChannelWidth;
-        }
-
-        @Override
         public int getPredictedThroughputMbps() {
             return mPredictedThroughputMbps;
         }
@@ -383,7 +346,6 @@
                     + "config = " + getNetworkConfigId() + ", "
                     + "bssid = " + key.bssid + ", "
                     + "freq = " + getFrequency() + ", "
-                    + "channelWidth = " + getChannelWidth() + ", "
                     + "rssi = " + getScanRssi() + ", "
                     + "Mbps = " + getPredictedThroughputMbps() + ", "
                     + "nominator = " + getNominatorId() + ", "
@@ -393,10 +355,8 @@
                     + (isCurrentNetwork() ? "current, " : "")
                     + (isEphemeral() ? "ephemeral" : "saved") + ", "
                     + (isTrusted() ? "trusted, " : "")
-                    + (isRestricted() ? "restricted, " : "")
                     + (isOemPaid() ? "oemPaid, " : "")
                     + (isOemPrivate() ? "oemPrivate, " : "")
-                    + (isSecondaryInternet() ? "secondaryInternet, " : "")
                     + (isCarrierOrPrivileged() ? "priv, " : "")
                     + (isMetered() ? "metered, " : "")
                     + (hasNoInternetAccess() ? "noInternet, " : "")
@@ -534,7 +494,6 @@
         return add(key, config, nominatorId,
                 scanDetail.getScanResult().level,
                 scanDetail.getScanResult().frequency,
-                scanDetail.getScanResult().channelWidth,
                 lastSelectionWeightBetweenZeroAndOne,
                 isMetered,
                 false,
@@ -567,7 +526,6 @@
             @WifiNetworkSelector.NetworkNominator.NominatorId int nominatorId,
             int scanRssi,
             int frequency,
-            @WifiAnnotations.ChannelWidth int channelWidth,
             double lastSelectionWeightBetweenZeroAndOne,
             boolean isMetered,
             boolean isCarrierOrPrivileged,
@@ -588,7 +546,6 @@
         CandidateImpl candidate = new CandidateImpl(key, config, perBssid, nominatorId,
                 scanRssi,
                 frequency,
-                channelWidth,
                 Math.min(Math.max(lastSelectionWeightBetweenZeroAndOne, 0.0), 1.0),
                 config.networkId == mCurrentNetworkId,
                 key.bssid.equals(mCurrentBssid),
diff --git a/service/java/com/android/server/wifi/WifiCarrierInfoManager.java b/service/java/com/android/server/wifi/WifiCarrierInfoManager.java
index f1ea3c7..f17dc72 100644
--- a/service/java/com/android/server/wifi/WifiCarrierInfoManager.java
+++ b/service/java/com/android/server/wifi/WifiCarrierInfoManager.java
@@ -20,6 +20,7 @@
 
 import android.annotation.IntDef;
 import android.annotation.NonNull;
+import android.app.AlertDialog;
 import android.app.Notification;
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
@@ -28,11 +29,11 @@
 import android.content.IntentFilter;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.res.Resources;
 import android.database.ContentObserver;
 import android.graphics.drawable.Icon;
 import android.net.Uri;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
@@ -40,7 +41,7 @@
 import android.net.wifi.hotspot2.pps.Credential;
 import android.os.Build;
 import android.os.Handler;
-import android.os.ParcelUuid;
+import android.os.HandlerExecutor;
 import android.os.PersistableBundle;
 import android.os.UserHandle;
 import android.telephony.CarrierConfigManager;
@@ -55,12 +56,12 @@
 import android.util.Pair;
 import android.util.SparseArray;
 import android.util.SparseBooleanArray;
+import android.view.WindowManager;
 
 import androidx.annotation.RequiresApi;
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
-import com.android.modules.utils.HandlerExecutor;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.wifi.resources.R;
 
@@ -72,13 +73,9 @@
 import java.security.NoSuchAlgorithmException;
 import java.security.PublicKey;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
-import java.util.stream.Collectors;
 
 import javax.annotation.Nullable;
 import javax.crypto.BadPaddingException;
@@ -169,6 +166,7 @@
     private final WifiContext mContext;
     private final Handler mHandler;
     private final WifiInjector mWifiInjector;
+    private final Resources mResources;
     private final TelephonyManager mTelephonyManager;
     private final SubscriptionManager mSubscriptionManager;
     private final WifiNotificationManager mNotificationManager;
@@ -200,10 +198,6 @@
     private final List<OnCarrierOffloadDisabledListener> mOnCarrierOffloadDisabledListeners =
             new ArrayList<>();
     private final SparseArray<SimInfo> mSubIdToSimInfoSparseArray = new SparseArray<>();
-    private final Map<ParcelUuid, List<Integer>> mSubscriptionGroupMap = new HashMap<>();
-    private List<WifiCarrierPrivilegeCallback> mCarrierPrivilegeCallbacks;
-    private final SparseArray<Set<String>> mCarrierPrivilegedPackagesBySimSlot =
-            new SparseArray<>();
 
     private List<SubscriptionInfo> mActiveSubInfos = null;
 
@@ -453,46 +447,9 @@
         public void onSubscriptionsChanged() {
             mActiveSubInfos = mSubscriptionManager.getActiveSubscriptionInfoList();
             mSubIdToSimInfoSparseArray.clear();
-            mSubscriptionGroupMap.clear();
             if (mVerboseLogEnabled) {
                 Log.v(TAG, "active subscription changes: " + mActiveSubInfos);
             }
-            if (SdkLevel.isAtLeastT()) {
-                for (int simSlot = 0; simSlot < mTelephonyManager.getActiveModemCount();
-                        simSlot++) {
-                    if (!mCarrierPrivilegedPackagesBySimSlot.contains(simSlot)) {
-                        WifiCarrierPrivilegeCallback callback =
-                                new WifiCarrierPrivilegeCallback(simSlot);
-                        mTelephonyManager.registerCarrierPrivilegesCallback(simSlot,
-                                new HandlerExecutor(mHandler), callback);
-                        mCarrierPrivilegedPackagesBySimSlot.append(simSlot,
-                                Collections.emptySet());
-                        mCarrierPrivilegeCallbacks.add(callback);
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Listener for carrier privilege changes.
-     */
-    @VisibleForTesting
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public final class WifiCarrierPrivilegeCallback implements
-            TelephonyManager.CarrierPrivilegesCallback {
-        private int mSimSlot = -1;
-
-        public WifiCarrierPrivilegeCallback(int simSlot) {
-            mSimSlot = simSlot;
-        }
-
-        @Override
-        public void onCarrierPrivilegesChanged(
-                @androidx.annotation.NonNull Set<String> privilegedPackageNames,
-                @androidx.annotation.NonNull Set<Integer> privilegedUids) {
-            mCarrierPrivilegedPackagesBySimSlot.put(mSimSlot, privilegedPackageNames);
-            resetCarrierPrivilegedApps();
         }
     }
 
@@ -514,6 +471,7 @@
             @NonNull Clock clock) {
         mTelephonyManager = telephonyManager;
         mContext = context;
+        mResources = mContext.getResources();
         mWifiInjector = wifiInjector;
         mHandler = handler;
         mSubscriptionManager = subscriptionManager;
@@ -558,16 +516,13 @@
                         mHandler.post(() -> onCarrierConfigChanged(context));
                     }
                 });
-        if (SdkLevel.isAtLeastT()) {
-            mCarrierPrivilegeCallbacks = new ArrayList<>();
-        }
     }
 
     /**
      * Enable/disable verbose logging.
      */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLogEnabled = verboseEnabled;
+    public void enableVerboseLogging(int verbose) {
+        mVerboseLogEnabled = verbose > 0;
     }
 
     void onUnlockedUserSwitching(int currentUserId) {
@@ -637,7 +592,7 @@
             return false;
         }
         for (String curSsid : macRandDisabledSsids) {
-            if (TextUtils.equals(sanitizedSsid, curSsid)) {
+            if (sanitizedSsid.equals(curSsid)) {
                 return true;
             }
         }
@@ -748,9 +703,6 @@
         if (config.subscriptionId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
             return config.subscriptionId;
         }
-        if (config.getSubscriptionGroup() != null) {
-            return getActiveSubscriptionIdInGroup(config.getSubscriptionGroup());
-        }
         if (config.isPasspoint()) {
             return getMatchingSubId(config.carrierId);
         } else {
@@ -1612,23 +1564,8 @@
         pw.println("mSubIdToSimInfoSparseArray=" + mSubIdToSimInfoSparseArray);
         pw.println("mActiveSubInfos=" + mActiveSubInfos);
         pw.println("mCachedCarrierConfigPerSubId=" + mCachedCarrierConfigPerSubId);
-        pw.println("mCarrierPrivilegedPackagesBySimSlot=[ ");
-        for (int i = 0; i < mCarrierPrivilegedPackagesBySimSlot.size(); i++) {
-            pw.println(mCarrierPrivilegedPackagesBySimSlot.valueAt(i));
-        }
-        pw.println("]");
     }
 
-    private void resetCarrierPrivilegedApps() {
-        Set<String> packageNames = new HashSet<>();
-        for (int i = 0; i < mCarrierPrivilegedPackagesBySimSlot.size(); i++) {
-            packageNames.addAll(mCarrierPrivilegedPackagesBySimSlot.valueAt(i));
-        }
-        mWifiInjector.getWifiNetworkSuggestionsManager().updateCarrierPrivilegedApps(packageNames);
-    }
-
-
-
     /**
      * Get the carrier ID {@link TelephonyManager#getSimCarrierId()} of the carrier which give
      * target package carrier privileges.
@@ -1758,7 +1695,7 @@
         }
         Notification.Action userAllowAppNotificationAction =
                 new Notification.Action.Builder(null,
-                        mContext.getResources().getText(R.string
+                        mResources.getText(R.string
                                 .wifi_suggestion_action_allow_imsi_privacy_exemption_carrier),
                         getPrivateBroadcast(NOTIFICATION_USER_ALLOWED_CARRIER_INTENT_ACTION,
                                 Pair.create(EXTRA_CARRIER_NAME, carrierName),
@@ -1766,7 +1703,7 @@
                         .build();
         Notification.Action userDisallowAppNotificationAction =
                 new Notification.Action.Builder(null,
-                        mContext.getResources().getText(R.string
+                        mResources.getText(R.string
                                 .wifi_suggestion_action_disallow_imsi_privacy_exemption_carrier),
                         getPrivateBroadcast(NOTIFICATION_USER_DISALLOWED_CARRIER_INTENT_ACTION,
                                 Pair.create(EXTRA_CARRIER_NAME, carrierName),
@@ -1777,12 +1714,12 @@
                 mContext, WifiService.NOTIFICATION_NETWORK_STATUS)
                 .setSmallIcon(Icon.createWithResource(mContext.getWifiOverlayApkPkgName(),
                         com.android.wifi.resources.R.drawable.stat_notify_wifi_in_range))
-                .setTicker(mContext.getResources().getString(
+                .setTicker(mResources.getString(
                         R.string.wifi_suggestion_imsi_privacy_title, carrierName))
-                .setContentTitle(mContext.getResources().getString(
+                .setContentTitle(mResources.getString(
                         R.string.wifi_suggestion_imsi_privacy_title, carrierName))
                 .setStyle(new Notification.BigTextStyle()
-                        .bigText(mContext.getResources().getString(
+                        .bigText(mResources.getString(
                                 R.string.wifi_suggestion_imsi_privacy_content)))
                 .setContentIntent(getPrivateBroadcast(NOTIFICATION_USER_CLICKED_INTENT_ACTION,
                         Pair.create(EXTRA_CARRIER_NAME, carrierName),
@@ -1792,9 +1729,8 @@
                         Pair.create(EXTRA_CARRIER_ID, carrierId)))
                 .setShowWhen(false)
                 .setLocalOnly(true)
-                .setColor(mContext.getResources()
-                        .getColor(android.R.color.system_notification_accent_color,
-                                mContext.getTheme()))
+                .setColor(mResources.getColor(android.R.color.system_notification_accent_color,
+                        mContext.getTheme()))
                 .addAction(userDisallowAppNotificationAction)
                 .addAction(userAllowAppNotificationAction)
                 .setTimeoutAfter(NOTIFICATION_EXPIRY_MILLS)
@@ -1810,40 +1746,32 @@
     private void sendImsiPrivacyConfirmationDialog(@NonNull String carrierName, int carrierId) {
         mWifiMetrics.addUserApprovalCarrierUiReaction(ACTION_USER_ALLOWED_CARRIER,
                 mIsLastUserApprovalUiDialog);
-        mWifiInjector.getWifiDialogManager().createSimpleDialog(
-                mContext.getResources().getString(
-                        R.string.wifi_suggestion_imsi_privacy_exemption_confirmation_title),
-                mContext.getResources().getString(
+        AlertDialog dialog = mFrameworkFacade.makeAlertDialogBuilder(mContext)
+                .setTitle(mResources.getString(
+                        R.string.wifi_suggestion_imsi_privacy_exemption_confirmation_title))
+                .setMessage(mResources.getString(
                         R.string.wifi_suggestion_imsi_privacy_exemption_confirmation_content,
-                        carrierName),
-                mContext.getResources().getString(
+                        carrierName))
+                .setPositiveButton(mResources.getText(
                         R.string.wifi_suggestion_action_allow_imsi_privacy_exemption_confirmation),
-                mContext.getResources().getString(R.string
-                        .wifi_suggestion_action_disallow_imsi_privacy_exemption_confirmation),
-                null /* neutralButtonText */,
-                new WifiDialogManager.SimpleDialogCallback() {
-                    @Override
-                    public void onPositiveButtonClicked() {
-                        handleUserAllowCarrierExemptionAction(carrierName, carrierId);
-                    }
-
-                    @Override
-                    public void onNegativeButtonClicked() {
-                        handleUserDisallowCarrierExemptionAction(carrierName, carrierId);
-                    }
-
-                    @Override
-                    public void onNeutralButtonClicked() {
-                        // Not used.
-                        handleUserDismissAction();
-                    }
-
-                    @Override
-                    public void onCancelled() {
-                        handleUserDismissAction();
-                    }
-                },
-                new WifiThreadRunner(mHandler)).launchDialog();
+                        (d, which) -> mHandler.post(
+                                () -> handleUserAllowCarrierExemptionAction(
+                                        carrierName, carrierId)))
+                .setNegativeButton(mResources.getText(
+                        R.string.wifi_suggestion_action_disallow_imsi_privacy_exemption_confirmation),
+                        (d, which) -> mHandler.post(
+                                () -> handleUserDisallowCarrierExemptionAction(
+                                        carrierName, carrierId)))
+                .setOnDismissListener(
+                        (d) -> mHandler.post(this::handleUserDismissAction))
+                .setOnCancelListener(
+                        (d) -> mHandler.post(this::handleUserDismissAction))
+                .create();
+        dialog.setCanceledOnTouchOutside(false);
+        dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+        dialog.getWindow().addSystemFlags(
+                WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS);
+        dialog.show();
         mIsLastUserApprovalUiDialog = true;
     }
 
@@ -1979,19 +1907,12 @@
         mMergedCarrierNetworkOffloadMap.clear();
         mUnmergedCarrierNetworkOffloadMap.clear();
         mUserDataEnabled.clear();
-        mCarrierPrivilegedPackagesBySimSlot.clear();
         if (SdkLevel.isAtLeastS()) {
             for (UserDataEnabledChangedListener listener : mUserDataEnabledListenerList) {
                 listener.unregisterListener();
             }
             mUserDataEnabledListenerList.clear();
         }
-        if (SdkLevel.isAtLeastT()) {
-            for (WifiCarrierPrivilegeCallback callback : mCarrierPrivilegeCallbacks) {
-                mTelephonyManager.unregisterCarrierPrivilegesCallback(callback);
-            }
-            mCarrierPrivilegeCallbacks.clear();
-        }
         resetNotification();
         saveToStore();
     }
@@ -2055,53 +1976,4 @@
         }
         return bundle.getBoolean(CarrierConfigManager.ENABLE_EAP_METHOD_PREFIX_BOOL);
     }
-
-    private @NonNull List<Integer> getSubscriptionsInGroup(@NonNull ParcelUuid groupUuid) {
-        if (groupUuid == null) {
-            return Collections.emptyList();
-        }
-        if (mSubscriptionGroupMap.containsKey(groupUuid)) {
-            return mSubscriptionGroupMap.get(groupUuid);
-        }
-        List<Integer> subIdList = mSubscriptionManager.getSubscriptionsInGroup(groupUuid)
-                .stream()
-                .map(SubscriptionInfo::getSubscriptionId)
-                .collect(Collectors.toList());
-        mSubscriptionGroupMap.put(groupUuid, subIdList);
-        return subIdList;
-    }
-
-    /**
-     * Get an active subscription id in this Subscription Group. If multiple subscriptions are
-     * active, will return default data subscription id if possible, otherwise an arbitrary one.
-     * @param groupUuid UUID of the Subscription group
-     * @return SubscriptionId which is active.
-     */
-    public int getActiveSubscriptionIdInGroup(@NonNull ParcelUuid groupUuid) {
-        if (groupUuid == null) {
-            return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
-        }
-        int activeSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
-        int dataSubId = SubscriptionManager.getDefaultDataSubscriptionId();
-        for (int subId : getSubscriptionsInGroup(groupUuid)) {
-            if (isSimReady(subId)) {
-                if (subId == dataSubId) {
-                    return subId;
-                }
-                activeSubId = subId;
-            }
-        }
-        return activeSubId;
-    }
-
-    /**
-     * Get the packages name of the apps current have carrier privilege.
-     */
-    public Set<String> getCurrentCarrierPrivilegedPackages() {
-        Set<String> packages = new HashSet<>();
-        for (int i = 0; i < mCarrierPrivilegedPackagesBySimSlot.size(); i++) {
-            packages.addAll(mCarrierPrivilegedPackagesBySimSlot.valueAt(i));
-        }
-        return packages;
-    }
 }
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index ce62f88..32baa8e 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -16,8 +16,6 @@
 
 package com.android.server.wifi;
 
-import static android.net.wifi.WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE;
-
 import android.Manifest;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -26,7 +24,6 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ApplicationInfo;
-import android.net.DhcpOption;
 import android.net.IpConfiguration;
 import android.net.MacAddress;
 import android.net.ProxyInfo;
@@ -39,7 +36,6 @@
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiScanner;
-import android.net.wifi.WifiSsid;
 import android.os.Process;
 import android.os.UserHandle;
 import android.os.UserManager;
@@ -56,7 +52,6 @@
 import com.android.net.module.util.MacAddressUtils;
 import com.android.server.wifi.hotspot2.PasspointManager;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.UserActionEvent;
-import com.android.server.wifi.util.CertificateSubjectInfo;
 import com.android.server.wifi.util.LruConnectionTracker;
 import com.android.server.wifi.util.MissingCounterTimerLockList;
 import com.android.server.wifi.util.WifiPermissionsUtil;
@@ -67,10 +62,7 @@
 import java.io.FileDescriptor;
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.security.cert.CertificateParsingException;
-import java.security.cert.X509Certificate;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
@@ -78,7 +70,6 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Objects;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -162,15 +153,6 @@
          * @param choiceKey The network profile key of the user connect choice that was removed.
          */
         default void onConnectChoiceRemoved(String choiceKey){ }
-
-        /**
-         * Invoke when security params changed, especially when NetworkTransitionDisable event
-         * received
-         * @param oldConfig The original WifiConfiguration
-         * @param securityParams the updated securityParams
-         */
-        default void onSecurityParamsUpdate(@NonNull WifiConfiguration oldConfig,
-                List<SecurityParams> securityParams) { }
     }
     /**
      * Max size of scan details to cache in {@link #mScanDetailCaches}.
@@ -210,11 +192,11 @@
      * 4 hours.
      */
     @VisibleForTesting
-    protected static final long NON_PERSISTENT_MAC_WAIT_AFTER_DISCONNECT_MS = 4 * 60 * 60 * 1000;
+    protected static final long ENHANCED_MAC_WAIT_AFTER_DISCONNECT_MS = 4 * 60 * 60 * 1000;
     @VisibleForTesting
-    protected static final long NON_PERSISTENT_MAC_REFRESH_MS_MIN = 30 * 60 * 1000; // 30 minutes
+    protected static final long ENHANCED_MAC_REFRESH_MS_MIN = 30 * 60 * 1000; // 30 minutes
     @VisibleForTesting
-    protected static final long NON_PERSISTENT_MAC_REFRESH_MS_MAX = 24 * 60 * 60 * 1000; // 24 hours
+    protected static final long ENHANCED_MAC_REFRESH_MS_MAX = 24 * 60 * 60 * 1000; // 24 hours
 
     private static final MacAddress DEFAULT_MAC_ADDRESS =
             MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS);
@@ -230,8 +212,8 @@
     @VisibleForTesting
     public static final int SCAN_RESULT_MISSING_COUNT_THRESHOLD = 1;
     @VisibleForTesting
-    protected static final String NON_PERSISTENT_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG =
-            "non_persistent_mac_randomization_force_enabled";
+    protected static final String ENHANCED_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG =
+            "enhanced_mac_randomization_force_enabled";
     private static final int NON_CARRIER_MERGED_NETWORKS_SCAN_CACHE_QUERY_DURATION_MS =
             10 * 60 * 1000; // 10 minutes
 
@@ -266,7 +248,6 @@
      * List of external dependencies for WifiConfigManager.
      */
     private final Context mContext;
-    private final WifiInjector mWifiInjector;
     private final Clock mClock;
     private final UserManager mUserManager;
     private final BackupManagerProxy mBackupManagerProxy;
@@ -366,62 +347,42 @@
     private final NetworkListUserStoreData mNetworkListUserStoreData;
     private final RandomizedMacStoreData mRandomizedMacStoreData;
 
-    private static class NetworkIdentifier {
-        private WifiSsid mSsid;
-        private byte[] mOui;
-        NetworkIdentifier(WifiSsid ssid, byte[] oui) {
-            mSsid = ssid;
-            mOui = oui;
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(mSsid, Arrays.hashCode(mOui));
-        }
-
-        @Override
-        public boolean equals(Object otherObj) {
-            if (this == otherObj) {
-                return true;
-            } else if (!(otherObj instanceof NetworkIdentifier)) {
-                return false;
-            }
-            NetworkIdentifier other = (NetworkIdentifier) otherObj;
-            return Objects.equals(mSsid, other.mSsid) && Arrays.equals(mOui, other.mOui);
-        }
-    }
-    private final Map<NetworkIdentifier, List<DhcpOption>> mCustomDhcpOptions = new HashMap<>();
-
     /**
      * Create new instance of WifiConfigManager.
      */
     WifiConfigManager(
             Context context,
+            Clock clock,
+            UserManager userManager,
+            WifiCarrierInfoManager wifiCarrierInfoManager,
             WifiKeyStore wifiKeyStore,
             WifiConfigStore wifiConfigStore,
+            WifiPermissionsUtil wifiPermissionsUtil,
+            MacAddressUtil macAddressUtil,
+            WifiMetrics wifiMetrics,
+            WifiBlocklistMonitor wifiBlocklistMonitor,
+            WifiLastResortWatchdog wifiLastResortWatchdog,
             NetworkListSharedStoreData networkListSharedStoreData,
             NetworkListUserStoreData networkListUserStoreData,
             RandomizedMacStoreData randomizedMacStoreData,
+            FrameworkFacade frameworkFacade,
+            DeviceConfigFacade deviceConfigFacade,
+            WifiScoreCard wifiScoreCard,
             LruConnectionTracker lruConnectionTracker,
-            WifiInjector wifiInjector) {
+            BuildProperties buildProperties) {
         mContext = context;
-        mWifiInjector = wifiInjector;
-        mClock = wifiInjector.getClock();
-        mUserManager = wifiInjector.getUserManager();
-        mWifiCarrierInfoManager = wifiInjector.getWifiCarrierInfoManager();
-        mWifiMetrics = wifiInjector.getWifiMetrics();
-        mWifiBlocklistMonitor = wifiInjector.getWifiBlocklistMonitor();
-        mWifiLastResortWatchdog = wifiInjector.getWifiLastResortWatchdog();
-        mWifiScoreCard = wifiInjector.getWifiScoreCard();
-        mWifiPermissionsUtil = wifiInjector.getWifiPermissionsUtil();
-        mFrameworkFacade = wifiInjector.getFrameworkFacade();
-        mDeviceConfigFacade = wifiInjector.getDeviceConfigFacade();
-        mMacAddressUtil = wifiInjector.getMacAddressUtil();
-        mBuildProperties = wifiInjector.getBuildProperties();
-
+        mClock = clock;
+        mUserManager = userManager;
         mBackupManagerProxy = new BackupManagerProxy();
+        mWifiCarrierInfoManager = wifiCarrierInfoManager;
         mWifiKeyStore = wifiKeyStore;
         mWifiConfigStore = wifiConfigStore;
+        mWifiPermissionsUtil = wifiPermissionsUtil;
+        mWifiMetrics = wifiMetrics;
+        mWifiBlocklistMonitor = wifiBlocklistMonitor;
+        mWifiLastResortWatchdog = wifiLastResortWatchdog;
+        mWifiScoreCard = wifiScoreCard;
+
         mConfiguredNetworks = new ConfigurationMap(mWifiPermissionsUtil);
         mScanDetailCaches = new HashMap<>(16, 0.75f);
         mUserTemporarilyDisabledList =
@@ -438,9 +399,14 @@
         mWifiConfigStore.registerStoreData(mNetworkListUserStoreData);
         mWifiConfigStore.registerStoreData(mRandomizedMacStoreData);
 
+        mFrameworkFacade = frameworkFacade;
+        mDeviceConfigFacade = deviceConfigFacade;
+
         mLocalLog = new LocalLog(
                 context.getSystemService(ActivityManager.class).isLowRamDevice() ? 128 : 256);
+        mMacAddressUtil = macAddressUtil;
         mLruConnectionTracker = lruConnectionTracker;
+        mBuildProperties = buildProperties;
     }
 
     /**
@@ -454,30 +420,24 @@
     }
 
     /**
-     * Determine if the framework should perform non-persistent MAC randomization when connecting
+     * Determine if the framework should perform enhanced MAC randomization when connecting
      * to the SSID or FQDN in the input WifiConfiguration.
      * @param config
      * @return
      */
-    public boolean shouldUseNonPersistentRandomization(WifiConfiguration config) {
-        // If this is the secondary STA for multi internet for DBS AP, use non persistent mac
-        // randomization, as the primary and secondary STAs could connect to the same SSID.
-        if (isMacRandomizationSupported() && config.dbsSecondaryInternet) {
-            return true;
-        }
-
+    public boolean shouldUseEnhancedRandomization(WifiConfiguration config) {
         if (!isMacRandomizationSupported()
                 || config.macRandomizationSetting == WifiConfiguration.RANDOMIZATION_NONE) {
             return false;
         }
 
-        // Use non-persistent randomization if it's forced on by dev option
+        // Use enhanced randomization if it's forced on by dev option
         if (mFrameworkFacade.getIntegerSetting(mContext,
-                NON_PERSISTENT_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG, 0) == 1) {
+                ENHANCED_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG, 0) == 1) {
             return true;
         }
 
-        // use non-persistent or persistent randomization if configured to do so.
+        // use enhanced or persistent randomization if configured to do so.
         if (config.macRandomizationSetting == WifiConfiguration.RANDOMIZATION_NON_PERSISTENT) {
             return true;
         }
@@ -489,37 +449,37 @@
         if (config.getIpConfiguration().getIpAssignment() == IpConfiguration.IpAssignment.STATIC) {
             return false;
         }
-        if (config.isOpenNetwork() && shouldEnableNonPersistentRandomizationOnOpenNetwork(config)) {
+        if (config.isOpenNetwork() && shouldEnableEnhancedRandomizationOnOpenNetwork(config)) {
             return true;
         }
         if (config.isPasspoint()) {
-            return isNetworkOptInForNonPersistentRandomization(config.FQDN);
+            return isNetworkOptInForEnhancedRandomization(config.FQDN);
         } else {
-            return isNetworkOptInForNonPersistentRandomization(config.SSID);
+            return isNetworkOptInForEnhancedRandomization(config.SSID);
         }
     }
 
-    private boolean shouldEnableNonPersistentRandomizationOnOpenNetwork(WifiConfiguration config) {
-        if (!mDeviceConfigFacade.allowNonPersistentMacRandomizationOnOpenSsids()
+    private boolean shouldEnableEnhancedRandomizationOnOpenNetwork(WifiConfiguration config) {
+        if (!mDeviceConfigFacade.allowEnhancedMacRandomizationOnOpenSsids()
                 && !mContext.getResources().getBoolean(
-                        R.bool.config_wifiAllowNonPersistentMacRandomizationOnOpenSsids)) {
+                        R.bool.config_wifiAllowEnhancedMacRandomizationOnOpenSsids)) {
             return false;
         }
         return config.getNetworkSelectionStatus().hasEverConnected()
                 && config.getNetworkSelectionStatus().hasNeverDetectedCaptivePortal();
     }
 
-    private boolean isNetworkOptInForNonPersistentRandomization(String ssidOrFqdn) {
+    private boolean isNetworkOptInForEnhancedRandomization(String ssidOrFqdn) {
         Set<String> perDeviceSsidBlocklist = new ArraySet<>(mContext.getResources().getStringArray(
-                R.array.config_wifi_non_persistent_randomization_ssid_blocklist));
-        if (mDeviceConfigFacade.getNonPersistentMacRandomizationSsidBlocklist().contains(ssidOrFqdn)
+                R.array.config_wifi_aggressive_randomization_ssid_blocklist));
+        if (mDeviceConfigFacade.getAggressiveMacRandomizationSsidBlocklist().contains(ssidOrFqdn)
                 || perDeviceSsidBlocklist.contains(ssidOrFqdn)) {
             return false;
         }
         Set<String> perDeviceSsidAllowlist = new ArraySet<>(mContext.getResources().getStringArray(
-                R.array.config_wifi_non_persistent_randomization_ssid_allowlist));
-        return mDeviceConfigFacade.getNonPersistentMacRandomizationSsidAllowlist()
-                .contains(ssidOrFqdn) || perDeviceSsidAllowlist.contains(ssidOrFqdn);
+                R.array.config_wifi_aggressive_randomization_ssid_allowlist));
+        return mDeviceConfigFacade.getAggressiveMacRandomizationSsidAllowlist().contains(ssidOrFqdn)
+                || perDeviceSsidAllowlist.contains(ssidOrFqdn);
     }
 
     @VisibleForTesting
@@ -583,8 +543,8 @@
             return;
         }
         long expireDurationMs = (dhcpLeaseSeconds & 0xffffffffL) * 1000;
-        expireDurationMs = Math.max(NON_PERSISTENT_MAC_REFRESH_MS_MIN, expireDurationMs);
-        expireDurationMs = Math.min(NON_PERSISTENT_MAC_REFRESH_MS_MAX, expireDurationMs);
+        expireDurationMs = Math.max(ENHANCED_MAC_REFRESH_MS_MIN, expireDurationMs);
+        expireDurationMs = Math.min(ENHANCED_MAC_REFRESH_MS_MAX, expireDurationMs);
         internalConfig.randomizedMacExpirationTimeMs = mClock.getWallClockMillis()
                 + expireDurationMs;
     }
@@ -612,7 +572,7 @@
     }
 
     /**
-     * This method is called before connecting to a network that has non-persistent randomization
+     * This method is called before connecting to a network that has "enhanced randomization"
      * enabled, and will re-randomize the MAC address if needed.
      * @param config the WifiConfiguration to make the update
      * @return the updated MacAddress
@@ -620,7 +580,7 @@
     private MacAddress updateRandomizedMacIfNeeded(WifiConfiguration config) {
         boolean shouldUpdateMac = config.randomizedMacExpirationTimeMs
                 < mClock.getWallClockMillis() || mClock.getWallClockMillis()
-                - config.randomizedMacLastModifiedTimeMs >= NON_PERSISTENT_MAC_REFRESH_MS_MAX;
+                - config.randomizedMacLastModifiedTimeMs >= ENHANCED_MAC_REFRESH_MS_MAX;
         if (!shouldUpdateMac) {
             return config.getRandomizedMacAddress();
         }
@@ -632,12 +592,12 @@
     /**
      * Returns the randomized MAC address that should be used for this WifiConfiguration.
      * This API may return a randomized MAC different from the persistent randomized MAC if
-     * the WifiConfiguration is configured for non-persistent MAC randomization.
+     * the WifiConfiguration is configured for enhanced MAC randomization.
      * @param config
      * @return MacAddress
      */
     public MacAddress getRandomizedMacAndUpdateIfNeeded(WifiConfiguration config) {
-        MacAddress mac = shouldUseNonPersistentRandomization(config)
+        MacAddress mac = shouldUseEnhancedRandomization(config)
                 ? updateRandomizedMacIfNeeded(config)
                 : setRandomizedMacToPersistentMac(config);
         return mac;
@@ -694,15 +654,10 @@
      * @param maskPasswords Mask passwords or not.
      * @param targetUid Target UID for MAC address reading: -1 = mask all, 0 = mask none, >0 =
      *                  mask all but the targetUid (carrier app).
-     * @return Copy of the WifiConfiguration object, or a default WifiConfiguration if the input
-     *         is null.
+     * @return Copy of the WifiConfiguration object.
      */
-    private @NonNull WifiConfiguration createExternalWifiConfiguration(
-            @NonNull WifiConfiguration configuration, boolean maskPasswords, int targetUid) {
-        if (configuration == null) {
-            Log.wtf(TAG, "Unexpected null configuration in createExternalWifiConfiguration");
-            return new WifiConfiguration();
-        }
+    private WifiConfiguration createExternalWifiConfiguration(
+            WifiConfiguration configuration, boolean maskPasswords, int targetUid) {
         WifiConfiguration network = new WifiConfiguration(configuration);
         if (maskPasswords) {
             maskPasswordsInWifiConfiguration(network);
@@ -790,7 +745,7 @@
      * @param networkId networkId of the requested network.
      * @return WifiConfiguration object if found, null otherwise.
      */
-    public @Nullable WifiConfiguration getConfiguredNetwork(int networkId) {
+    public WifiConfiguration getConfiguredNetwork(int networkId) {
         WifiConfiguration config = getInternalConfiguredNetwork(networkId);
         if (config == null) {
             return null;
@@ -807,7 +762,7 @@
      * @param configKey configKey of the requested network.
      * @return WifiConfiguration object if found, null otherwise.
      */
-    public @Nullable WifiConfiguration getConfiguredNetwork(String configKey) {
+    public WifiConfiguration getConfiguredNetwork(String configKey) {
         WifiConfiguration config = getInternalConfiguredNetwork(configKey);
         if (config == null) {
             return null;
@@ -827,7 +782,7 @@
      * @param networkId networkId of the requested network.
      * @return WifiConfiguration object if found, null otherwise.
      */
-    public @Nullable WifiConfiguration getConfiguredNetworkWithPassword(int networkId) {
+    public WifiConfiguration getConfiguredNetworkWithPassword(int networkId) {
         WifiConfiguration config = getInternalConfiguredNetwork(networkId);
         if (config == null) {
             return null;
@@ -847,7 +802,7 @@
      * @param networkId networkId of the requested network.
      * @return Copy of WifiConfiguration object if found, null otherwise.
      */
-    public @Nullable WifiConfiguration getConfiguredNetworkWithoutMasking(int networkId) {
+    public WifiConfiguration getConfiguredNetworkWithoutMasking(int networkId) {
         WifiConfiguration config = getInternalConfiguredNetwork(networkId);
         if (config == null) {
             return null;
@@ -863,8 +818,8 @@
         return mConfiguredNetworks.valuesForCurrentUser();
     }
 
-    private @Nullable WifiConfiguration getInternalConfiguredNetworkByUpgradableType(
-            @NonNull WifiConfiguration config) {
+    private WifiConfiguration getInternalConfiguredNetworkByUpgradableType(
+            WifiConfiguration config) {
         WifiConfiguration internalConfig = null;
         int securityType = config.getDefaultSecurityParams().getSecurityType();
         WifiConfiguration possibleExistingConfig = new WifiConfiguration(config);
@@ -903,8 +858,7 @@
      * This first attempts to find the network using the provided network ID in configuration,
      * else it attempts to find a matching configuration using the configKey.
      */
-    private @Nullable WifiConfiguration getInternalConfiguredNetwork(
-            @NonNull WifiConfiguration config) {
+    private WifiConfiguration getInternalConfiguredNetwork(WifiConfiguration config) {
         WifiConfiguration internalConfig = mConfiguredNetworks.getForCurrentUser(config.networkId);
         if (internalConfig != null) {
             return internalConfig;
@@ -927,7 +881,7 @@
      * Helper method to retrieve the internal WifiConfiguration object corresponding to the
      * provided network ID in our database.
      */
-    private @Nullable WifiConfiguration getInternalConfiguredNetwork(int networkId) {
+    private WifiConfiguration getInternalConfiguredNetwork(int networkId) {
         if (networkId == WifiConfiguration.INVALID_NETWORK_ID) {
             return null;
         }
@@ -942,7 +896,7 @@
      * Helper method to retrieve the internal WifiConfiguration object corresponding to the
      * provided configKey in our database.
      */
-    private @Nullable WifiConfiguration getInternalConfiguredNetwork(String configKey) {
+    private WifiConfiguration getInternalConfiguredNetwork(String configKey) {
         WifiConfiguration internalConfig =
                 mConfiguredNetworks.getByConfigKeyForCurrentUser(configKey);
         if (internalConfig == null) {
@@ -980,6 +934,12 @@
      */
     private boolean canModifyNetwork(WifiConfiguration config, int uid,
             @Nullable String packageName) {
+        // System internals can always update networks; they're typically only
+        // making meteredHint or meteredOverride changes
+        if (uid == Process.SYSTEM_UID) {
+            return true;
+        }
+
         // Passpoint configurations are generated and managed by PasspointManager. They can be
         // added by either PasspointNetworkNominator (for auto connection) or Settings app
         // (for manual connection), and need to be removed once the connection is completed.
@@ -1001,22 +961,20 @@
         // isDeviceOwner(uid) method), but it would require changing  many methods to pass the
         // package name around (for example, all methods called by
         // WifiServiceImpl.triggerConnectAndReturnStatus(netId, callingUid)
-        final boolean isOrganizationOwnedDeviceAdmin =
-                mWifiPermissionsUtil.isOrganizationOwnedDeviceAdmin(uid, packageName);
+        final boolean isDeviceOwner = packageName == null
+                ? mWifiPermissionsUtil.isDeviceOwner(uid)
+                : mWifiPermissionsUtil.isDeviceOwner(uid, packageName);
 
-        // If |uid| corresponds to the device owner or the profile owner of an organization owned
-        // device, allow all modifications.
-        if (isOrganizationOwnedDeviceAdmin) {
+        // If |uid| corresponds to the device owner, allow all modifications.
+        if (isDeviceOwner) {
             return true;
         }
 
         final boolean isCreator = (config.creatorUid == uid);
 
-        // WiFi config lockdown related logic. At this point we know uid is NOT a Device Owner
-        // or a Profile Owner of an organization owned device.
+        // WiFi config lockdown related logic. At this point we know uid is NOT a Device Owner.
         final boolean isConfigEligibleForLockdown =
-                mWifiPermissionsUtil.isOrganizationOwnedDeviceAdmin(config.creatorUid,
-                        config.creatorName);
+                mWifiPermissionsUtil.isDeviceOwner(config.creatorUid, config.creatorName);
         if (!isConfigEligibleForLockdown) {
             // App that created the network or settings app (i.e user) has permission to
             // modify the network.
@@ -1032,6 +990,7 @@
                 // If not locked down, settings app (i.e user) has permission to modify the network.
                 && (mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
                 || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid));
+
     }
 
     private void mergeSecurityParamsListWithInternalWifiConfiguration(
@@ -1068,25 +1027,6 @@
         }
     }
 
-    private void mergeDppSecurityParamsWithInternalWifiConfiguration(
-            WifiConfiguration internalConfig, WifiConfiguration externalConfig) {
-        // Do not update for non-DPP network
-        if (!externalConfig.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)) {
-            return;
-        }
-
-        if (externalConfig.getDppConnector().length != 0
-                && externalConfig.getDppCSignKey().length != 0
-                && externalConfig.getDppNetAccessKey().length != 0) {
-            internalConfig.setDppConnectionKeys(externalConfig.getDppConnector(),
-                    externalConfig.getDppCSignKey(), externalConfig.getDppNetAccessKey());
-        }
-
-        if (externalConfig.getDppPrivateEcKey().length != 0) {
-            internalConfig.setDppConfigurator(externalConfig.getDppPrivateEcKey());
-        }
-    }
-
     /**
      * Copy over public elements from an external WifiConfiguration object to the internal
      * configuration object if element has been set in the provided external WifiConfiguration.
@@ -1144,7 +1084,6 @@
         }
 
         mergeSecurityParamsListWithInternalWifiConfiguration(internalConfig, externalConfig);
-        mergeDppSecurityParamsWithInternalWifiConfiguration(internalConfig, externalConfig);
 
         // Copy over the |IpConfiguration| parameters if set.
         if (externalConfig.getIpConfiguration() != null) {
@@ -1166,7 +1105,6 @@
             }
         }
 
-        internalConfig.allowAutojoin = externalConfig.allowAutojoin;
         // Copy over the |WifiEnterpriseConfig| parameters if set.
         if (externalConfig.enterpriseConfig != null) {
             internalConfig.enterpriseConfig.copyFromExternal(
@@ -1180,22 +1118,17 @@
         internalConfig.trusted = externalConfig.trusted;
         internalConfig.oemPaid = externalConfig.oemPaid;
         internalConfig.oemPrivate = externalConfig.oemPrivate;
-        internalConfig.dbsSecondaryInternet = externalConfig.dbsSecondaryInternet;
         internalConfig.carrierMerged = externalConfig.carrierMerged;
-        internalConfig.restricted = externalConfig.restricted;
 
         // Copy over macRandomizationSetting
         internalConfig.macRandomizationSetting = externalConfig.macRandomizationSetting;
         internalConfig.carrierId = externalConfig.carrierId;
         internalConfig.isHomeProviderNetwork = externalConfig.isHomeProviderNetwork;
         internalConfig.subscriptionId = externalConfig.subscriptionId;
-        internalConfig.setSubscriptionGroup(externalConfig.getSubscriptionGroup());
         internalConfig.getNetworkSelectionStatus()
                 .setConnectChoice(externalConfig.getNetworkSelectionStatus().getConnectChoice());
         internalConfig.getNetworkSelectionStatus().setConnectChoiceRssi(
                 externalConfig.getNetworkSelectionStatus().getConnectChoiceRssi());
-        internalConfig.setBssidAllowlist(externalConfig.getBssidAllowlistInternal());
-        internalConfig.setRepeaterEnabled(externalConfig.isRepeaterEnabled());
     }
 
     /**
@@ -1270,14 +1203,12 @@
      *
      * @param internalConfig WifiConfiguration object in our internal map.
      * @param externalConfig WifiConfiguration object provided from the external API.
-     * @param overrideCreator when this set to true, will overrider the creator to the current
-     *                        modifier.
      * @return Copy of existing WifiConfiguration object with parameters merged from the provided
      * configuration.
      */
-    private @NonNull WifiConfiguration updateExistingInternalWifiConfigurationFromExternal(
-            @NonNull WifiConfiguration internalConfig, @NonNull WifiConfiguration externalConfig,
-            int uid, @Nullable String packageName, boolean overrideCreator) {
+    private WifiConfiguration updateExistingInternalWifiConfigurationFromExternal(
+            WifiConfiguration internalConfig, WifiConfiguration externalConfig, int uid,
+            @Nullable String packageName) {
         WifiConfiguration newInternalConfig = new WifiConfiguration(internalConfig);
 
         // Copy over all the public elements from the provided configuration.
@@ -1289,10 +1220,6 @@
                 packageName != null ? packageName : mContext.getPackageManager().getNameForUid(uid);
         newInternalConfig.lastUpdated = mClock.getWallClockMillis();
         newInternalConfig.numRebootsSinceLastUse = 0;
-        if (overrideCreator) {
-            newInternalConfig.creatorName = newInternalConfig.lastUpdateName;
-            newInternalConfig.creatorUid = uid;
-        }
         return newInternalConfig;
     }
 
@@ -1323,33 +1250,22 @@
      * @param config provided WifiConfiguration object.
      * @param uid UID of the app requesting the network addition/modification.
      * @param packageName Package name of the app requesting the network addition/modification.
-     * @param overrideCreator when this set to true, will overrider the creator to the current
-     *                        modifier.
      * @return NetworkUpdateResult object representing status of the update.
-     *         WifiConfiguration object representing the existing configuration matching
-     *         the new config, or null if none matches.
      */
-    private @NonNull Pair<NetworkUpdateResult, WifiConfiguration> addOrUpdateNetworkInternal(
-            @NonNull WifiConfiguration config, int uid, @Nullable String packageName,
-            boolean overrideCreator) {
+    private NetworkUpdateResult addOrUpdateNetworkInternal(WifiConfiguration config, int uid,
+                                                           @Nullable String packageName) {
         if (mVerboseLoggingEnabled) {
             Log.v(TAG, "Adding/Updating network " + config.getPrintableSsid());
         }
         WifiConfiguration newInternalConfig = null;
 
-        long supportedFeatures = mWifiInjector.getActiveModeWarden()
-                .getPrimaryClientModeManager().getSupportedFeatures();
-
         // First check if we already have a network with the provided network id or configKey.
         WifiConfiguration existingInternalConfig = getInternalConfiguredNetwork(config);
         // No existing network found. So, potentially a network add.
         if (existingInternalConfig == null) {
-            if (!WifiConfigurationUtil.validate(config, supportedFeatures,
-                    WifiConfigurationUtil.VALIDATE_FOR_ADD)) {
+            if (!WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD)) {
                 Log.e(TAG, "Cannot add network with invalid config");
-                return new Pair<>(
-                        new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                        existingInternalConfig);
+                return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
             }
             newInternalConfig =
                     createNewInternalWifiConfigurationFromExternal(config, uid, packageName);
@@ -1362,19 +1278,15 @@
         // Existing network found. So, a network update.
         if (existingInternalConfig != null) {
             if (!WifiConfigurationUtil.validate(
-                    config, supportedFeatures, WifiConfigurationUtil.VALIDATE_FOR_UPDATE)) {
+                    config, WifiConfigurationUtil.VALIDATE_FOR_UPDATE)) {
                 Log.e(TAG, "Cannot update network with invalid config");
-                return new Pair<>(
-                        new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                        existingInternalConfig);
+                return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
             }
             // Check for the app's permission before we let it update this network.
             if (!canModifyNetwork(existingInternalConfig, uid, packageName)) {
                 Log.e(TAG, "UID " + uid + " does not have permission to update configuration "
                         + config.getProfileKey());
-                return new Pair<>(
-                        new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                        existingInternalConfig);
+                return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
             }
             if (mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
                     && !config.isPasspoint()) {
@@ -1382,13 +1294,11 @@
             }
             newInternalConfig =
                     updateExistingInternalWifiConfigurationFromExternal(
-                            existingInternalConfig, config, uid, packageName, overrideCreator);
+                            existingInternalConfig, config, uid, packageName);
         }
 
         if (!WifiConfigurationUtil.addUpgradableSecurityTypeIfNecessary(newInternalConfig)) {
-            return new Pair<>(
-                    new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                    existingInternalConfig);
+            return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
         }
 
         // Only add networks with proxy settings if the user has permission to
@@ -1397,40 +1307,19 @@
             Log.e(TAG, "UID " + uid + " does not have permission to modify proxy Settings "
                     + config.getProfileKey() + ". Must have NETWORK_SETTINGS,"
                     + " or be device or profile owner.");
-            return new Pair<>(
-                    new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                    existingInternalConfig);
-        }
-
-        // Only allow changes in Repeater Enabled flag if the user has permission to
-        if (WifiConfigurationUtil.hasRepeaterEnabledChanged(
-                existingInternalConfig, newInternalConfig)
-                && !mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)) {
-            Log.e(TAG, "UID " + uid
-                    + " does not have permission to modify Repeater Enabled Settings "
-                    + " , or add a network with Repeater Enabled set to true "
-                    + config.getProfileKey() + ". Must have NETWORK_SETTINGS.");
-            return new Pair<>(
-                    new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                    existingInternalConfig);
+            return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
         }
 
         if (WifiConfigurationUtil.hasMacRandomizationSettingsChanged(existingInternalConfig,
                 newInternalConfig) && !mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
                 && !mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid)
                 && !(newInternalConfig.isPasspoint() && uid == newInternalConfig.creatorUid)
-                && !config.fromWifiNetworkSuggestion
-                && !mWifiPermissionsUtil.isDeviceInDemoMode(mContext)
-                && !(mWifiPermissionsUtil.isAdmin(uid, packageName)
-                && uid == newInternalConfig.creatorUid)) {
+                && !config.fromWifiNetworkSuggestion) {
             Log.e(TAG, "UID " + uid + " does not have permission to modify MAC randomization "
                     + "Settings " + config.getProfileKey() + ". Must have "
-                    + "NETWORK_SETTINGS or NETWORK_SETUP_WIZARD or be in Demo Mode "
-                    + "or be the creator adding or updating a passpoint network "
-                    + "or be an admin updating their own network.");
-            return new Pair<>(
-                    new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                    existingInternalConfig);
+                    + "NETWORK_SETTINGS or NETWORK_SETUP_WIZARD or be the creator adding or "
+                    + "updating a passpoint network.");
+            return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
         }
 
         // Update the keys for saved enterprise networks. For Passpoint, the certificates
@@ -1438,33 +1327,7 @@
         // network the certificates and keys are installed at the time the suggestion is added
         if (!config.isPasspoint() && !config.fromWifiNetworkSuggestion && config.isEnterprise()) {
             if (!(mWifiKeyStore.updateNetworkKeys(newInternalConfig, existingInternalConfig))) {
-                return new Pair<>(
-                        new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                        existingInternalConfig);
-            }
-        }
-
-        // Validate an Enterprise network with Trust On First Use.
-        if (config.isEnterprise() && config.enterpriseConfig.isTrustOnFirstUseEnabled()) {
-            if ((supportedFeatures & WIFI_FEATURE_TRUST_ON_FIRST_USE) == 0) {
-                Log.e(TAG, "Trust On First Use could not be set "
-                        + "when Trust On First Use is not supported.");
-                return new Pair<>(
-                        new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                        existingInternalConfig);
-            }
-            if (!config.enterpriseConfig.isEapMethodServerCertUsed()) {
-                Log.e(TAG, "Trust On First Use could not be set "
-                        + "when the server certificate is not used.");
-                return new Pair<>(
-                        new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                        existingInternalConfig);
-            } else if (config.enterpriseConfig.hasCaCertificate()) {
-                Log.e(TAG, "Trust On First Use could not be set "
-                        + "when Root CA certificate is set.");
-                return new Pair<>(
-                        new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                        existingInternalConfig);
+                return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
             }
         }
 
@@ -1484,11 +1347,6 @@
             newInternalConfig.getNetworkSelectionStatus().setHasEverConnected(false);
         }
 
-        // Ensure that the user approve flag is set to false for a new network.
-        if (newNetwork && config.isEnterprise()) {
-            config.enterpriseConfig.setUserApproveNoCaCert(false);
-        }
-
         // Add it to our internal map. This will replace any existing network configuration for
         // updates.
         try {
@@ -1498,16 +1356,12 @@
             mConfiguredNetworks.put(newInternalConfig);
         } catch (IllegalArgumentException e) {
             Log.e(TAG, "Failed to add network to config map", e);
-            return new Pair<>(
-                    new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                    existingInternalConfig);
+            return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
         }
         if (removeExcessNetworks()) {
             if (mConfiguredNetworks.getForAllUsers(newInternalConfig.networkId) == null) {
                 Log.e(TAG, "Cannot add network because number of configured networks is maxed.");
-                return new Pair<>(
-                        new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID),
-                        existingInternalConfig);
+                return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
             }
         }
 
@@ -1533,7 +1387,7 @@
                 + " configKey=" + newInternalConfig.getProfileKey()
                 + " uid=" + Integer.toString(newInternalConfig.creatorUid)
                 + " name=" + newInternalConfig.creatorName);
-        return new Pair<>(result, existingInternalConfig);
+        return result;
     }
 
     /**
@@ -1544,12 +1398,10 @@
      * @param config provided WifiConfiguration object.
      * @param uid UID of the app requesting the network addition/modification.
      * @param packageName Package name of the app requesting the network addition/modification.
-     * @param overrideCreator when this set to true, will overrider the creator to the current
-     *                        modifier.
      * @return NetworkUpdateResult object representing status of the update.
      */
     public NetworkUpdateResult addOrUpdateNetwork(WifiConfiguration config, int uid,
-            @Nullable String packageName, boolean overrideCreator) {
+                                                  @Nullable String packageName) {
         if (!mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(uid)) {
             Log.e(TAG, "UID " + uid + " not visible to the current user");
             return new NetworkUpdateResult(WifiConfiguration.INVALID_NETWORK_ID);
@@ -1575,10 +1427,7 @@
             }
         }
 
-        Pair<NetworkUpdateResult, WifiConfiguration> resultPair = addOrUpdateNetworkInternal(
-                config, uid, packageName, overrideCreator);
-        NetworkUpdateResult result = resultPair.first;
-        existingConfig = resultPair.second;
+        NetworkUpdateResult result = addOrUpdateNetworkInternal(config, uid, packageName);
         if (!result.isSuccess()) {
             Log.e(TAG, "Failed to add/update network " + config.getPrintableSsid());
             return result;
@@ -1616,7 +1465,7 @@
      * @return NetworkUpdateResult object representing status of the update.
      */
     public NetworkUpdateResult addOrUpdateNetwork(WifiConfiguration config, int uid) {
-        return addOrUpdateNetwork(config, uid, null, false);
+        return addOrUpdateNetwork(config, uid, null);
     }
 
     /**
@@ -1660,8 +1509,9 @@
         List<WifiConfiguration> configsToDelete = savedNetworks
                 .stream()
                 .sorted(Comparator.comparing((WifiConfiguration config) -> config.carrierId
-                        != TelephonyManager.UNKNOWN_CARRIER_ID)
-                        .thenComparing((WifiConfiguration config) -> config.isCurrentlyConnected)
+                        == TelephonyManager.UNKNOWN_CARRIER_ID)
+                        .thenComparing((WifiConfiguration config) -> config.status
+                                == WifiConfiguration.Status.CURRENT)
                         .thenComparing((WifiConfiguration config) -> config.getDeletionPriority())
                         .thenComparing((WifiConfiguration config) -> -config.numRebootsSinceLastUse)
                         .thenComparing((WifiConfiguration config) ->
@@ -1959,7 +1809,7 @@
         return updateNetworkSelectionStatus(config, reason);
     }
 
-    private boolean updateNetworkSelectionStatus(@NonNull WifiConfiguration config, int reason) {
+    private boolean updateNetworkSelectionStatus(WifiConfiguration config, int reason) {
         int prevNetworkSelectionStatus = config.getNetworkSelectionStatus()
                 .getNetworkSelectionStatus();
         if (!mWifiBlocklistMonitor.updateNetworkSelectionStatus(config, reason)) {
@@ -1975,7 +1825,7 @@
         return true;
     }
 
-    private void sendNetworkSelectionStatusChangedUpdate(@NonNull WifiConfiguration config,
+    private void sendNetworkSelectionStatusChangedUpdate(WifiConfiguration config,
             int newNetworkSelectionStatus, int disableReason) {
         switch (newNetworkSelectionStatus) {
             case NetworkSelectionStatus.NETWORK_SELECTION_ENABLED:
@@ -2045,11 +1895,10 @@
      * @param disableOthers Whether to disable all other networks or not. This is used to indicate
      *                      that the app requested connection to a specific network.
      * @param uid           uid of the app requesting the update.
-     * @param packageName   Package name of calling apps
      * @return true if it succeeds, false otherwise
      */
     public boolean enableNetwork(int networkId, boolean disableOthers, int uid,
-                                 @NonNull String packageName) {
+                                 String packageName) {
         if (mVerboseLoggingEnabled) {
             Log.v(TAG, "Enabling network " + networkId + " (disableOthers " + disableOthers + ")");
         }
@@ -2068,8 +1917,7 @@
             setLastSelectedNetwork(networkId);
         }
         if (!canModifyNetwork(config, uid, packageName)) {
-            Log.e(TAG, "UID " + uid +  " package " + packageName
-                    + " does not have permission to update configuration "
+            Log.e(TAG, "UID " + uid + " does not have permission to update configuration "
                     + config.getProfileKey());
             return false;
         }
@@ -2088,13 +1936,12 @@
      * @param uid       uid of the app requesting the update.
      * @return true if it succeeds, false otherwise
      */
-    public boolean disableNetwork(int networkId, int uid, @NonNull String packageName) {
+    public boolean disableNetwork(int networkId, int uid, String packageName) {
         if (mVerboseLoggingEnabled) {
             Log.v(TAG, "Disabling network " + networkId);
         }
         if (!mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(uid)) {
-            Log.e(TAG, "UID " + uid + " package " + packageName
-                    + " not visible to the current user");
+            Log.e(TAG, "UID " + uid + " not visible to the current user");
             return false;
         }
         WifiConfiguration config = getInternalConfiguredNetwork(networkId);
@@ -2107,8 +1954,7 @@
             clearLastSelectedNetwork();
         }
         if (!canModifyNetwork(config, uid, packageName)) {
-            Log.e(TAG, "UID " + uid + " package " + packageName
-                    + " does not have permission to update configuration "
+            Log.e(TAG, "UID " + uid + " does not have permission to update configuration "
                     + config.getProfileKey());
             return false;
         }
@@ -2182,8 +2028,7 @@
      * 2. Increment |numAssociation| counter.
      * 3. Clear the disable reason counters in the associated |NetworkSelectionStatus|.
      * 4. Set the hasEverConnected| flag in the associated |NetworkSelectionStatus|.
-     * 5. Set the status of network to |CURRENT|.
-     * 6. Set the |isCurrentlyConnected| flag to true.
+     * 5. Sets the status of network as |CURRENT|.
      *
      * @param networkId network ID corresponding to the network.
      * @param shouldSetUserConnectChoice setup user connect choice on this network.
@@ -2213,7 +2058,6 @@
         config.getNetworkSelectionStatus().clearDisableReasonCounter();
         config.getNetworkSelectionStatus().setHasEverConnected(true);
         setNetworkStatus(config, WifiConfiguration.Status.CURRENT);
-        config.isCurrentlyConnected = true;
         saveToStore(false);
         return true;
     }
@@ -2233,9 +2077,8 @@
      * Updates a network configuration after disconnection from it.
      *
      * This method updates the following WifiConfiguration elements:
-     * 1. Set the |lastDisconnected| timestamp.
-     * 2. Set the status of network back to |ENABLED|.
-     * 3. Set the |isCurrentlyConnected| flag to false.
+     * 1. Set the |lastDisConnected| timestamp.
+     * 2. Sets the status of network back to |ENABLED|.
      *
      * @param networkId network ID corresponding to the network.
      * @return true if the network was found, false otherwise.
@@ -2250,13 +2093,12 @@
         }
         config.lastDisconnected = mClock.getWallClockMillis();
         config.randomizedMacExpirationTimeMs = Math.max(config.randomizedMacExpirationTimeMs,
-                config.lastDisconnected + NON_PERSISTENT_MAC_WAIT_AFTER_DISCONNECT_MS);
+                config.lastDisconnected + ENHANCED_MAC_WAIT_AFTER_DISCONNECT_MS);
         // If the network hasn't been disabled, mark it back as
         // enabled after disconnection.
         if (config.status == WifiConfiguration.Status.CURRENT) {
             setNetworkStatus(config, WifiConfiguration.Status.ENABLED);
         }
-        config.isCurrentlyConnected = false;
         saveToStore(false);
         return true;
     }
@@ -2336,27 +2178,6 @@
     }
 
     /**
-     * Set the {@link NetworkSelectionStatus#mLastUsedSecurityParams}.
-     *
-     * @param networkId  network ID corresponding to the network.
-     * @param params     Security params for this candidate.
-     * @return true if the network was found, false otherwise.
-     */
-    public boolean setNetworkLastUsedSecurityParams(int networkId, SecurityParams params) {
-        WifiConfiguration config = getInternalConfiguredNetwork(networkId);
-        if (config == null) {
-            Log.e(TAG, "Cannot find network for " + networkId);
-            return false;
-        }
-        config.getNetworkSelectionStatus().setLastUsedSecurityParams(params);
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "Update last used security param for " + config.getProfileKey()
-                    + " with security type " + params.getSecurityType());
-        }
-        return true;
-    }
-
-    /**
      * Iterate through all the saved networks and remove the provided configuration from the
      * {@link NetworkSelectionStatus#mConnectChoice} from them.
      *
@@ -2869,11 +2690,9 @@
      * So, re-sort the network list based on the frequency of connection to those networks
      * and whether it was last seen in the scan results.
      *
-     * @param autoJoinOnly retrieve hidden network autojoin enabled only.
-     * @return list of hidden networks in the order of priority.
+     * @return list of networks in the order of priority.
      */
-    public List<WifiScanner.ScanSettings.HiddenNetwork> retrieveHiddenNetworkList(
-            boolean autoJoinOnly) {
+    public List<WifiScanner.ScanSettings.HiddenNetwork> retrieveHiddenNetworkList() {
         List<WifiScanner.ScanSettings.HiddenNetwork> hiddenList = new ArrayList<>();
         List<WifiConfiguration> networks = getConfiguredNetworks();
         // Remove any non hidden networks.
@@ -2881,9 +2700,7 @@
         networks.sort(mScanListComparator);
         // The most frequently connected network has the highest priority now.
         for (WifiConfiguration config : networks) {
-            if (!autoJoinOnly || config.allowAutojoin) {
-                hiddenList.add(new WifiScanner.ScanSettings.HiddenNetwork(config.SSID));
-            }
+            hiddenList.add(new WifiScanner.ScanSettings.HiddenNetwork(config.SSID));
         }
         return hiddenList;
     }
@@ -3080,12 +2897,10 @@
     }
 
     /**
-     * Clear all ephemeral carrier networks from the app without carrier privilege, which leads to
-     * a disconnection.
-     * Disconnection and removing networks installed by privileged apps is handled by will be
-     * cleaned when privilege revokes.
+     * Clear all ephemeral carrier networks, make the subscriptionId update during the next network
+     * selection.
      */
-    public void removeEphemeralCarrierNetworks(Set<String> carrierPrivilegedPackages) {
+    public void removeEphemeralCarrierNetworks() {
         if (mVerboseLoggingEnabled) localLog("removeEphemeralCarrierNetwork");
         WifiConfiguration[] copiedConfigs =
                 mConfiguredNetworks.valuesForAllUsers().toArray(new WifiConfiguration[0]);
@@ -3094,9 +2909,6 @@
                     || config.subscriptionId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
                 continue;
             }
-            if (carrierPrivilegedPackages.contains(config.creatorName)) {
-                continue;
-            }
             removeNetwork(config.networkId, config.creatorUid, config.creatorName);
         }
     }
@@ -3285,13 +3097,9 @@
     private void loadInternalDataFromSharedStore(
             List<WifiConfiguration> configurations,
             Map<String, String> macAddressMapping) {
-
-        long supportedFeatures = mWifiInjector.getActiveModeWarden()
-                .getPrimaryClientModeManager().getSupportedFeatures();
-
         for (WifiConfiguration configuration : configurations) {
             if (!WifiConfigurationUtil.validate(
-                    configuration, supportedFeatures, WifiConfigurationUtil.VALIDATE_FOR_ADD)) {
+                    configuration, WifiConfigurationUtil.VALIDATE_FOR_ADD)) {
                 Log.e(TAG, "Skipping malformed network from shared store: " + configuration);
                 continue;
             }
@@ -3305,6 +3113,7 @@
             }
 
             configuration.networkId = mNextNetworkId++;
+            WifiConfigurationUtil.addUpgradableSecurityTypeIfNecessary(configuration);
             if (mVerboseLoggingEnabled) {
                 Log.v(TAG, "Adding network from shared store "
                         + configuration.getProfileKey());
@@ -3325,12 +3134,9 @@
      * @param configurations list of configurations retrieved from store.
      */
     private void loadInternalDataFromUserStore(List<WifiConfiguration> configurations) {
-        long supportedFeatures = mWifiInjector.getActiveModeWarden()
-                .getPrimaryClientModeManager().getSupportedFeatures();
-
         for (WifiConfiguration configuration : configurations) {
             if (!WifiConfigurationUtil.validate(
-                    configuration, supportedFeatures, WifiConfigurationUtil.VALIDATE_FOR_ADD)) {
+                    configuration, WifiConfigurationUtil.VALIDATE_FOR_ADD)) {
                 Log.e(TAG, "Skipping malformed network from user store: " + configuration);
                 continue;
             }
@@ -3344,6 +3150,7 @@
             }
 
             configuration.networkId = mNextNetworkId++;
+            WifiConfigurationUtil.addUpgradableSecurityTypeIfNecessary(configuration);
             if (mVerboseLoggingEnabled) {
                 Log.v(TAG, "Adding network from user store "
                         + configuration.getProfileKey());
@@ -3362,11 +3169,11 @@
 
     /**
      * Initializes the randomized MAC address for an internal WifiConfiguration depending on
-     * whether it should use non-persistent randomization.
+     * whether it should use enhanced randomization.
      * @param config
      */
     private void initRandomizedMacForInternalConfig(WifiConfiguration internalConfig) {
-        MacAddress randomizedMac = shouldUseNonPersistentRandomization(internalConfig)
+        MacAddress randomizedMac = shouldUseEnhancedRandomization(internalConfig)
                 ? MacAddressUtils.createRandomUnicastAddress()
                 : getPersistentMacAddress(internalConfig);
         if (randomizedMac != null) {
@@ -3627,15 +3434,16 @@
      * Returns true if the given uid has permission to add, update or remove proxy settings
      */
     private boolean canModifyProxySettings(int uid, String packageName) {
-        final boolean isAdmin = mWifiPermissionsUtil.isAdmin(uid, packageName);
+        final boolean isDeviceOwner = mWifiPermissionsUtil.isDeviceOwner(uid, packageName);
+        final boolean isProfileOwner = mWifiPermissionsUtil.isProfileOwner(uid, packageName);
         final boolean hasNetworkSettingsPermission =
                 mWifiPermissionsUtil.checkNetworkSettingsPermission(uid);
         final boolean hasNetworkSetupWizardPermission =
                 mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid);
         final boolean hasNetworkManagedProvisioningPermission =
                 mWifiPermissionsUtil.checkNetworkManagedProvisioningPermission(uid);
-        // If |uid| corresponds to the admin, allow all modifications.
-        if (isAdmin || hasNetworkSettingsPermission
+        // If |uid| corresponds to the device owner, allow all modifications.
+        if (isProfileOwner || isDeviceOwner || hasNetworkSettingsPermission
                 || hasNetworkSetupWizardPermission || hasNetworkManagedProvisioningPermission) {
             return true;
         }
@@ -3643,7 +3451,8 @@
             Log.v(TAG, "UID: " + uid + " cannot modify WifiConfiguration proxy settings."
                     + " hasNetworkSettings=" + hasNetworkSettingsPermission
                     + " hasNetworkSetupWizard=" + hasNetworkSetupWizardPermission
-                    + " Admin=" + isAdmin);
+                    + " DeviceOwner=" + isDeviceOwner
+                    + " ProfileOwner=" + isProfileOwner);
         }
         return false;
     }
@@ -3651,22 +3460,14 @@
     /**
      * Add the network update event listener
      */
-    public void addOnNetworkUpdateListener(@NonNull OnNetworkUpdateListener listener) {
-        if (listener == null) {
-            Log.wtf(TAG, "addOnNetworkUpdateListener: listener must not be null");
-            return;
-        }
+    public void addOnNetworkUpdateListener(OnNetworkUpdateListener listener) {
         mListeners.add(listener);
     }
 
     /**
      * Remove the network update event listener
      */
-    public void removeOnNetworkUpdateListener(@NonNull OnNetworkUpdateListener listener) {
-        if (listener == null) {
-            Log.wtf(TAG, "removeOnNetworkUpdateListener: listener must not be null");
-            return;
-        }
+    public void removeOnNetworkUpdateListener(OnNetworkUpdateListener listener) {
         mListeners.remove(listener);
     }
 
@@ -3779,7 +3580,7 @@
     /**
      * This maintains the legacy user connect choice state in the config store
      */
-    public boolean setLegacyUserConnectChoice(@NonNull final WifiConfiguration selected,
+    private boolean setLegacyUserConnectChoice(@NonNull final WifiConfiguration selected,
             int rssi) {
         boolean change = false;
         Collection<WifiConfiguration> configuredNetworks = getInternalConfiguredNetworks();
@@ -3823,18 +3624,17 @@
     }
 
     /** Update WifiConfigManager before connecting to a network. */
-    public void updateBeforeConnect(int networkId, int callingUid, @NonNull String packageName) {
+    public void updateBeforeConnect(int networkId, int callingUid) {
         userEnabledNetwork(networkId);
         if (!enableNetwork(networkId, true, callingUid, null)
                 || !updateLastConnectUid(networkId, callingUid)) {
-            Log.i(TAG, "connect Allowing uid " + callingUid + " packageName " + packageName
+            Log.i(TAG, "connect Allowing uid " + callingUid
                     + " with insufficient permissions to connect=" + networkId);
         }
     }
 
     /** See {@link WifiManager#save(WifiConfiguration, WifiManager.ActionListener)} */
-    public NetworkUpdateResult updateBeforeSaveNetwork(WifiConfiguration config, int callingUid,
-            @NonNull String packageName) {
+    public NetworkUpdateResult updateBeforeSaveNetwork(WifiConfiguration config, int callingUid) {
         NetworkUpdateResult result = addOrUpdateNetwork(config, callingUid);
         if (!result.isSuccess()) {
             Log.e(TAG, "saveNetwork adding/updating config=" + config + " failed");
@@ -3878,7 +3678,8 @@
      * @param indicationBit transition disable indication bits.
      * @return true if the network was found, false otherwise.
      */
-    public boolean updateNetworkTransitionDisable(int networkId,
+    public boolean updateNetworkTransitionDisable(
+            int networkId,
             @WifiMonitor.TransitionDisableIndication int indicationBit) {
         localLog("updateNetworkTransitionDisable: network ID=" + networkId
                 + " indication: " + indicationBit);
@@ -3887,33 +3688,21 @@
             Log.e(TAG, "Cannot find network for " + networkId);
             return false;
         }
-        WifiConfiguration copy = new WifiConfiguration(config);
-        boolean changed = false;
         if (0 != (indicationBit & WifiMonitor.TDI_USE_WPA3_PERSONAL)
                 && config.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE)) {
             config.setSecurityParamsEnabled(WifiConfiguration.SECURITY_TYPE_PSK, false);
-            changed = true;
         }
         if (0 != (indicationBit & WifiMonitor.TDI_USE_SAE_PK)) {
             config.enableSaePkOnlyMode(true);
-            changed = true;
         }
         if (0 != (indicationBit & WifiMonitor.TDI_USE_WPA3_ENTERPRISE)
                 && config.isSecurityType(WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE)) {
             config.setSecurityParamsEnabled(WifiConfiguration.SECURITY_TYPE_EAP, false);
-            changed = true;
         }
         if (0 != (indicationBit & WifiMonitor.TDI_USE_ENHANCED_OPEN)
                 && config.isSecurityType(WifiConfiguration.SECURITY_TYPE_OWE)) {
             config.setSecurityParamsEnabled(WifiConfiguration.SECURITY_TYPE_OPEN, false);
-            changed = true;
         }
-        if (changed) {
-            for (OnNetworkUpdateListener listener : mListeners) {
-                listener.onSecurityParamsUpdate(copy, config.getSecurityParamsList());
-            }
-        }
-
         return true;
     }
 
@@ -3967,16 +3756,7 @@
             return null;
         }
         for (String configKey : linkedConfigurations.keySet()) {
-            WifiConfiguration linkConfig = getConfiguredNetworkWithoutMasking(configKey);
-            if (linkConfig == null
-                    || !linkConfig.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)) {
-                continue;
-            }
-
-            linkConfig.getNetworkSelectionStatus().setCandidateSecurityParams(
-                    SecurityParams.createSecurityParamsBySecurityType(
-                            WifiConfiguration.SECURITY_TYPE_PSK));
-            linkedNetworks.put(configKey, linkConfig);
+            linkedNetworks.put(configKey, getConfiguredNetworkWithoutMasking(configKey));
         }
         return linkedNetworks;
     }
@@ -4012,210 +3792,4 @@
         internalConfig.setSecurityParamsIsAddedByAutoUpgrade(securityType, isAddedByAutoUpgrade);
         saveToStore(true);
     }
-
-    private static final int SUBJECT_ALTERNATIVE_NAMES_EMAIL = 1;
-    private static final int SUBJECT_ALTERNATIVE_NAMES_DNS = 2;
-    private static final int SUBJECT_ALTERNATIVE_NAMES_URI = 6;
-    /** altSubjectMatch only matches EMAIL, DNS, and URI. */
-    private static String getAltSubjectMatchFromAltSubjectName(X509Certificate cert) {
-        Collection<List<?>> col = null;
-        try {
-            col = cert.getSubjectAlternativeNames();
-        } catch (CertificateParsingException ex) {
-            col = null;
-        }
-
-        if (null == col) return null;
-        if (0 == col.size()) return null;
-
-        List<String> altSubjectNameList = new ArrayList<>();
-        for (List<?> item: col) {
-            if (2 != item.size()) continue;
-            if (!(item.get(0) instanceof Integer)) continue;
-            if (!(item.get(1) instanceof String)) continue;
-
-            StringBuilder sb = new StringBuilder();
-            int type = (Integer) item.get(0);
-            if (SUBJECT_ALTERNATIVE_NAMES_EMAIL == type) {
-                sb.append("EMAIL:");
-            } else if (SUBJECT_ALTERNATIVE_NAMES_DNS == type) {
-                sb.append("DNS:");
-            } else if (SUBJECT_ALTERNATIVE_NAMES_URI == type) {
-                sb.append("URI:");
-            } else {
-                Log.d(TAG, "Ignore type " + type + " for altSubjectMatch");
-                continue;
-            }
-            sb.append((String) item.get(1));
-            altSubjectNameList.add(sb.toString());
-        }
-        if (altSubjectNameList.size() > 0) {
-            // wpa_supplicant uses ';' as the separator.
-            return String.join(";", altSubjectNameList);
-        }
-        return null;
-    }
-
-    /**
-     * This method updates the Root CA certifiate and the domain name of the
-     * server in the internal network.
-     *
-     * @param networkId networkId corresponding to the network to be updated.
-     * @param caCert Root CA certificate to be updated.
-     * @param serverCert Server certificate to be updated.
-     * @return true if updating Root CA certificate successfully; otherwise, false.
-     */
-    public boolean updateCaCertificate(int networkId, @NonNull X509Certificate caCert,
-            @NonNull X509Certificate serverCert) {
-        WifiConfiguration internalConfig = getInternalConfiguredNetwork(networkId);
-        if (internalConfig == null) {
-            Log.e(TAG, "No network for network ID " + networkId);
-            return false;
-        }
-        if (!internalConfig.isEnterprise()) {
-            Log.e(TAG, "Network " + networkId + " is not an Enterprise network");
-            return false;
-        }
-        if (!internalConfig.enterpriseConfig.isEapMethodServerCertUsed()) {
-            Log.e(TAG, "Network " + networkId + " does not need verifying server cert");
-            return false;
-        }
-        if (null == caCert) {
-            Log.e(TAG, "Root CA cert is null");
-            return false;
-        }
-        if (null == serverCert) {
-            Log.e(TAG, "Server cert is null");
-            return false;
-        }
-        CertificateSubjectInfo serverCertInfo = CertificateSubjectInfo.parse(
-                serverCert.getSubjectDN().getName());
-        if (null == serverCertInfo) {
-            Log.e(TAG, "Invalid Server CA cert subject");
-            return false;
-        }
-
-        WifiConfiguration newConfig = new WifiConfiguration(internalConfig);
-        try {
-            if (newConfig.enterpriseConfig.isTrustOnFirstUseEnabled()) {
-                newConfig.enterpriseConfig.setCaCertificateForTrustOnFirstUse(caCert);
-                // setCaCertificate will mark that this CA certifiate should be removed on
-                // removing this configuration.
-                newConfig.enterpriseConfig.enableTrustOnFirstUse(false);
-            } else {
-                newConfig.enterpriseConfig.setCaCertificate(caCert);
-            }
-        } catch (IllegalArgumentException ex) {
-            Log.e(TAG, "Failed to set CA cert: " + caCert);
-            return false;
-        }
-
-        // If there is a subject alternative name, it should be matched first.
-        String altSubjectNames = getAltSubjectMatchFromAltSubjectName(serverCert);
-        if (!TextUtils.isEmpty(altSubjectNames)) {
-            if (mVerboseLoggingEnabled) {
-                Log.d(TAG, "Set altSubjectMatch to " + altSubjectNames);
-            }
-            newConfig.enterpriseConfig.setAltSubjectMatch(altSubjectNames);
-        } else {
-            if (mVerboseLoggingEnabled) {
-                Log.d(TAG, "Set domainSuffixMatch to " + serverCertInfo.commonName);
-            }
-            newConfig.enterpriseConfig.setDomainSuffixMatch(serverCertInfo.commonName);
-        }
-        newConfig.enterpriseConfig.setUserApproveNoCaCert(false);
-        // Trigger an update to install CA certifiate and the corresponding configuration.
-        NetworkUpdateResult result = addOrUpdateNetwork(newConfig, internalConfig.creatorUid);
-        if (!result.isSuccess()) {
-            Log.e(TAG, "Failed to install CA cert for network " + internalConfig.SSID);
-            mFrameworkFacade.showToast(mContext, mContext.getResources().getString(
-                    R.string.wifi_ca_cert_failed_to_install_ca_cert));
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * This method updates Trust On First Use flag according to
-     * Trust On First Use support and No-Ca-Cert Approval.
-     */
-    public void updateTrustOnFirstUseFlag(boolean enableTrustOnFirstUse) {
-        getInternalConfiguredNetworks().stream()
-                .filter(config -> config.isEnterprise())
-                .filter(config -> config.enterpriseConfig.isEapMethodServerCertUsed())
-                .filter(config -> !config.enterpriseConfig.hasCaCertificate())
-                .forEach(config ->
-                        config.enterpriseConfig.enableTrustOnFirstUse(enableTrustOnFirstUse));
-    }
-
-    /**
-     * This method updates that a network could has no CA cert as a user approves it.
-     *
-     * @param networkId networkId corresponding to the network to be updated.
-     * @param approved true for the approval; otherwise, false.
-     */
-    public void setUserApproveNoCaCert(int networkId, boolean approved) {
-        WifiConfiguration internalConfig = getInternalConfiguredNetwork(networkId);
-        if (internalConfig == null) return;
-        if (!internalConfig.isEnterprise()) return;
-        if (!internalConfig.enterpriseConfig.isEapMethodServerCertUsed()) return;
-        internalConfig.enterpriseConfig.setUserApproveNoCaCert(approved);
-    }
-
-    /**
-     * This method updates that a network uses Trust On First Use.
-     *
-     * @param networkId networkId corresponding to the network to be updated.
-     * @param enable true to enable Trust On First Use; otherwise, disable Trust On First Use.
-     */
-    public void enableTrustOnFirstUse(int networkId, boolean enable) {
-        WifiConfiguration internalConfig = getInternalConfiguredNetwork(networkId);
-        if (internalConfig == null) return;
-        if (!internalConfig.isEnterprise()) return;
-        if (!internalConfig.enterpriseConfig.isEapMethodServerCertUsed()) return;
-        internalConfig.enterpriseConfig.enableTrustOnFirstUse(enable);
-    }
-
-    /**
-     * Add custom DHCP options.
-     *
-     * @param ssid the network SSID.
-     * @param oui the 3-byte OUI.
-     * @param options the list of DHCP options.
-     */
-    public void addCustomDhcpOptions(@NonNull WifiSsid ssid, @NonNull byte[] oui,
-            @NonNull List<DhcpOption> options) {
-        mCustomDhcpOptions.put(new NetworkIdentifier(ssid, oui), options);
-    }
-
-    /**
-     * Remove custom DHCP options.
-     *
-     * @param ssid the network SSID.
-     * @param oui the 3-byte OUI.
-     */
-    public void removeCustomDhcpOptions(@NonNull WifiSsid ssid, @NonNull byte[] oui) {
-        mCustomDhcpOptions.remove(new NetworkIdentifier(ssid, oui));
-    }
-
-    /**
-     * Get custom DHCP options.
-     *
-     * @param ssid the network SSID.
-     * @param ouiList the list of OUIs.
-     *
-     * @return null if no entry in the map is keyed by the SSID and any OUI in the list.
-     *         all the DHCP options keyed by the SSID and the OUIs in the list.
-     */
-    public List<DhcpOption> getCustomDhcpOptions(@NonNull WifiSsid ssid,
-            @NonNull List<byte[]> ouiList) {
-        Set<DhcpOption> results = new HashSet<>();
-        for (byte[] oui : ouiList) {
-            List<DhcpOption> options = mCustomDhcpOptions.get(new NetworkIdentifier(ssid, oui));
-            if (options != null) {
-                results.addAll(options);
-            }
-        }
-        return new ArrayList<>(results);
-    }
 }
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java
index 7495201..34b148e 100644
--- a/service/java/com/android/server/wifi/WifiConfigStore.java
+++ b/service/java/com/android/server/wifi/WifiConfigStore.java
@@ -24,7 +24,6 @@
 import android.app.AlarmManager;
 import android.content.Context;
 import android.net.wifi.WifiMigration;
-import android.net.wifi.util.Environment;
 import android.os.Handler;
 import android.os.UserHandle;
 import android.util.AtomicFile;
@@ -36,6 +35,7 @@
 import com.android.internal.util.FastXmlSerializer;
 import com.android.internal.util.Preconditions;
 import com.android.server.wifi.util.EncryptedData;
+import com.android.server.wifi.util.Environment;
 import com.android.server.wifi.util.FileUtils;
 import com.android.server.wifi.util.WifiConfigStoreEncryptionUtil;
 import com.android.server.wifi.util.XmlUtil;
diff --git a/service/java/com/android/server/wifi/WifiConfigurationUtil.java b/service/java/com/android/server/wifi/WifiConfigurationUtil.java
index 907ca72..20625a1 100644
--- a/service/java/com/android/server/wifi/WifiConfigurationUtil.java
+++ b/service/java/com/android/server/wifi/WifiConfigurationUtil.java
@@ -218,24 +218,6 @@
 
     /**
      * Compare existing and new WifiConfiguration objects after a network update and return if
-     * Repeater Enabled flag has changed or not. In case the there is no existing WifiConfiguration,
-     * checks if Repeater Enabled flag has changed from the default value of false.
-     *
-     * @param existingConfig Existing WifiConfiguration object corresponding to the network.
-     * @param newConfig      New WifiConfiguration object corresponding to the network.
-     * @return true if RepeaterEnabled flag has changed, or if there is no existing config, and
-     * the flag is set to true, false otherwise.
-     */
-    public static boolean hasRepeaterEnabledChanged(WifiConfiguration existingConfig,
-            WifiConfiguration newConfig) {
-        if (existingConfig == null) {
-            return newConfig.isRepeaterEnabled();
-        }
-        return (newConfig.isRepeaterEnabled() != existingConfig.isRepeaterEnabled());
-    }
-
-    /**
-     * Compare existing and new WifiConfiguration objects after a network update and return if
      * MAC randomization setting has changed or not.
      * @param existingConfig Existing WifiConfiguration object corresponding to the network.
      * @param newConfig      New WifiConfiguration object corresponding to the network.
@@ -267,11 +249,8 @@
                 return true;
             }
             if (existingEnterpriseConfig.isAuthenticationSimBased()) {
-                // The anonymous identity will be decorated with 3gpp realm in the service.
-                if (!TextUtils.equals(existingEnterpriseConfig.getAnonymousIdentity(),
-                        newEnterpriseConfig.getAnonymousIdentity())) {
-                    return true;
-                }
+                // No other credential changes for SIM based methods.
+                // The SIM card is the credential.
                 return false;
             }
             if (existingEnterpriseConfig.getPhase2Method()
@@ -686,15 +665,13 @@
      * 9. {@link WifiConfiguration#getIpConfiguration()}
      *
      * @param config {@link WifiConfiguration} received from an external application.
-     * @param supportedFeatureSet bitmask for supported features using {@code WIFI_FEATURE_}
      * @param isAdd {@link #VALIDATE_FOR_ADD} to indicate a network config received for an add,
      *              {@link #VALIDATE_FOR_UPDATE} for a network config received for an update.
      *              These 2 cases need to be handled differently because the config received for an
      *              update could contain only the fields that are being changed.
      * @return true if the parameters are valid, false otherwise.
      */
-    public static boolean validate(WifiConfiguration config, long supportedFeatureSet,
-            boolean isAdd) {
+    public static boolean validate(WifiConfiguration config, boolean isAdd) {
         if (!validateSsid(config.SSID, isAdd)) {
             return false;
         }
@@ -720,11 +697,7 @@
                 && !validatePassword(config.preSharedKey, isAdd, true)) {
             return false;
         }
-        if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)
-                && (supportedFeatureSet & WifiManager.WIFI_FEATURE_DPP_AKM) == 0) {
-            Log.e(TAG, "DPP AKM is not supported");
-            return false;
-        }
+
         if (!validateEnterpriseConfig(config, isAdd)) {
             return false;
         }
@@ -787,12 +760,7 @@
         return false;
     }
 
-    /**
-     * Check if the network specifier matches all networks.
-     * @param specifier The network specifier
-     * @return true if it matches all networks.
-     */
-    public static boolean isMatchAllNetworkSpecifier(WifiNetworkSpecifier specifier) {
+    private static boolean isMatchAllNetworkSpecifier(WifiNetworkSpecifier specifier) {
         PatternMatcher ssidPatternMatcher = specifier.ssidPatternMatcher;
         Pair<MacAddress, MacAddress> bssidPatternMatcher = specifier.bssidPatternMatcher;
         if (ssidPatternMatcher.match(MATCH_EMPTY_SSID_PATTERN_PATH)
diff --git a/service/java/com/android/server/wifi/WifiConnectivityManager.java b/service/java/com/android/server/wifi/WifiConnectivityManager.java
index 39df9f9..a609053 100644
--- a/service/java/com/android/server/wifi/WifiConnectivityManager.java
+++ b/service/java/com/android/server/wifi/WifiConnectivityManager.java
@@ -22,8 +22,6 @@
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_LONG_LIVED;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_TRANSIENT;
 import static com.android.server.wifi.ClientModeImpl.WIFI_WORK_SOURCE;
-import static com.android.server.wifi.WifiMetrics.ConnectionEvent.FAILURE_AUTHENTICATION_FAILURE;
-import static com.android.server.wifi.proto.nano.WifiMetricsProto.ConnectionEvent.AUTH_FAILURE_EAP_FAILURE;
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -33,10 +31,8 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.net.MacAddress;
-import android.net.wifi.IPnoScanResultsCallback;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiManager.DeviceMobilityState;
@@ -44,24 +40,21 @@
 import android.net.wifi.WifiScanner;
 import android.net.wifi.WifiScanner.PnoSettings;
 import android.net.wifi.WifiScanner.ScanSettings;
-import android.net.wifi.WifiSsid;
 import android.net.wifi.hotspot2.PasspointConfiguration;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.Handler;
-import android.os.IBinder;
+import android.os.HandlerExecutor;
 import android.os.PowerManager;
 import android.os.Process;
 import android.os.WorkSource;
-import android.text.TextUtils;
 import android.util.ArrayMap;
-import android.util.ArraySet;
 import android.util.LocalLog;
 import android.util.Log;
 
+import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.HandlerExecutor;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.hotspot2.PasspointManager;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.wifi.resources.R;
 
 import java.io.FileDescriptor;
@@ -121,8 +114,6 @@
     private static final int TEMP_BSSID_BLOCK_DURATION = 10 * 1000; // 10 seconds
     // Maximum age of frequencies last seen to be included in pno scans. (30 days)
     private static final long MAX_PNO_SCAN_FREQUENCY_AGE_MS = (long) 1000 * 3600 * 24 * 30;
-    // Do not restart PNO scan if network changes happen more than once within this duration.
-    private static final long NETWORK_CHANGE_TRIGGER_PNO_THROTTLE_MS = 3000; // 3 seconds
     private static final int POWER_SAVE_SCAN_INTERVAL_MULTIPLIER = 2;
     // ClientModeManager has a bunch of states. From the
     // WifiConnectivityManager's perspective it only cares
@@ -155,7 +146,6 @@
     private final WifiMetrics mWifiMetrics;
     private final AlarmManager mAlarmManager;
     private final Handler mEventHandler;
-    private final ExternalPnoScanRequestManager mExternalPnoScanRequestManager;
     private final Clock mClock;
     private final ScoringParams mScoringParams;
     private final LocalLog mLocalLog;
@@ -172,10 +162,8 @@
     private final PowerManager mPowerManager;
     private final DeviceConfigFacade mDeviceConfigFacade;
     private final ActiveModeWarden mActiveModeWarden;
-    private final FrameworkFacade mFrameworkFacade;
 
     private WifiScanner mScanner;
-    private final MultiInternetManager mMultiInternetManager;
     private boolean mDbg = false;
     private boolean mVerboseLoggingEnabled = false;
     private boolean mWifiEnabled = false;
@@ -186,14 +174,10 @@
     private int mInitialScanState = INITIAL_SCAN_STATE_COMPLETE;
     private boolean mAutoJoinEnabledExternal = true; // enabled by default
     private boolean mUntrustedConnectionAllowed = false;
-    private Set<Integer> mRestrictedConnectionAllowedUids = new ArraySet<>();
     private boolean mOemPaidConnectionAllowed = false;
     private boolean mOemPrivateConnectionAllowed = false;
-    @MultiInternetManager.MultiInternetState
-    private int mMultiInternetConnectionState = MultiInternetManager.MULTI_INTERNET_STATE_NONE;
     private WorkSource mOemPaidConnectionRequestorWs = null;
     private WorkSource mOemPrivateConnectionRequestorWs = null;
-    private WorkSource mMultiInternetConnectionRequestorWs = null;
     private boolean mTrustedConnectionAllowed = false;
     private boolean mSpecificNetworkRequestInProgress = false;
     private int mScanRestartCount = 0;
@@ -202,14 +186,10 @@
     private long mLastPeriodicSingleScanTimeStamp = RESET_TIME_STAMP;
     private long mLastNetworkSelectionTimeStamp = RESET_TIME_STAMP;
     private boolean mPnoScanStarted = false;
-    private Object mDelayedPnoScanToken = new Object();
-    private boolean mDelayedPnoScanPending = false;
     private boolean mPeriodicScanTimerSet = false;
     private Object mPeriodicScanTimerToken = new Object();
-    private Object mDelayedStartPeriodicScanToken = new Object();
     private boolean mDelayedPartialScanTimerSet = false;
     private boolean mWatchdogScanTimerSet = false;
-    private boolean mIsLocationModeEnabled;
 
     // Used for Initial Scan metrics
     private boolean mFailedInitialPartialScan = false;
@@ -218,29 +198,19 @@
     // Device configs
     private boolean mWaitForFullBandScanResults = false;
 
-    // scan schedule and scan type override set via WifiManager#setScreenOnScanSchedule
-    private int[] mExternalSingleScanScheduleSec;
-    private int[] mExternalSingleScanType;
-
-    private int mNextScreenOnConnectivityScanDelayMs = 0;
-
-    // Scanning Schedules for screen-on periodic scan
+    // Scanning Schedules
     // Default schedule used in case of invalid configuration
     private static final int[] DEFAULT_SCANNING_SCHEDULE_SEC = {20, 40, 80, 160};
     private int[] mConnectedSingleScanScheduleSec;
     private int[] mDisconnectedSingleScanScheduleSec;
     private int[] mConnectedSingleSavedNetworkSingleScanScheduleSec;
-    // Scanning types for screen-on periodic scan. Should have one to one mapping with the scan
-    // schedules.
-    private static final int[] DEFAULT_SCANNING_TYPE = {WifiScanner.SCAN_TYPE_HIGH_ACCURACY};
-    private int[] mConnectedSingleScanType;
-    private int[] mDisconnectedSingleScanType;
-    private int[] mConnectedSingleSavedNetworkSingleScanType;
-
     private List<WifiCandidates.Candidate> mLatestCandidates = null;
     private long mLatestCandidatesTimestampMs = 0;
+
+    private final Object mLock = new Object();
+
+    @GuardedBy("mLock")
     private int[] mCurrentSingleScanScheduleSec;
-    private int[] mCurrentSingleScanType;
 
     private int mCurrentSingleScanScheduleIndex;
     // Cached WifiCandidates used in high mobility state to avoid connecting to APs that are
@@ -283,7 +253,7 @@
 
         @Override
         public void onAlarm() {
-            startSingleScan(mIsFullBandScan, WIFI_WORK_SOURCE, WifiScanner.SCAN_TYPE_HIGH_ACCURACY);
+            startSingleScan(mIsFullBandScan, WIFI_WORK_SOURCE);
         }
     }
 
@@ -357,130 +327,6 @@
     }
 
     /**
-     * Helper method to consolidate handling of scan results when multi internet is enabled.
-     */
-    private boolean handleConnectToMultiInternetConnectionInternal(
-            List<WifiCandidates.Candidate> candidates,
-            @NonNull String listenerName,
-            @NonNull HandleScanResultsListener handleScanResultsListener) {
-        final ConcreteClientModeManager primaryCcm = mActiveModeWarden
-                .getPrimaryClientModeManagerNullable();
-        if (primaryCcm == null || !primaryCcm.isConnected()) {
-            // The second internet can only be connected after the primary network connected.
-            // Firmware can choose the best BSSID when connecting the primary CMM, so we must
-            // wait until the primary network was connected so the secondary can choose a BSSID on
-            // a different band with the primary.
-            return false;
-        }
-        final WifiInfo primaryInfo = primaryCcm.syncRequestConnectionInfo();
-        final int primaryBand = ScanResult.toBand(primaryInfo.getFrequency());
-
-        List<WifiCandidates.Candidate> secondaryCmmCandidates;
-        if (mMultiInternetManager.isStaConcurrencyForMultiInternetMultiApAllowed()) {
-            // Any candidate has different band with primary will be considered.
-            // As a BSSID can not exist in both bands it will not choose the same BSSID as primary.
-            secondaryCmmCandidates = candidates.stream().filter(
-                    c -> ScanResult.toBand(c.getFrequency()) != primaryBand)
-                .collect(Collectors.toList());
-        } else {
-            // Only allow the candidates have the same SSID as the primary.
-            secondaryCmmCandidates = candidates.stream().filter(c -> {
-                return ScanResult.toBand(c.getFrequency()) != primaryBand
-                        && TextUtils.equals(c.getKey().matchInfo.networkSsid, primaryInfo.getSSID())
-                        && c.getKey().networkId == primaryInfo.getNetworkId()
-                        && c.getKey().securityType == primaryInfo.getCurrentSecurityType();
-            }).collect(Collectors.toList());
-        }
-        // Perform network selection among secondary candidates. Create a new copy. Do not allow
-        // user choice override.
-        final WifiConfiguration secondaryCmmCandidate =
-                mNetworkSelector.selectNetwork(secondaryCmmCandidates,
-                false /* overrideEnabled */);
-
-        // No secondary cmm for internet selected, fallback to legacy flow.
-        if (secondaryCmmCandidate == null
-                || secondaryCmmCandidate.getNetworkSelectionStatus().getCandidate() == null) {
-            // TODO: Consider to check secondaryCmmCandidate.secondaryInternet as well, so user
-            // can specify the secondaryInternet from WifiConfiguration.
-            localLog(listenerName + ": No secondary cmm candidate");
-            return false;
-        }
-        localLog(listenerName + ":secondaryCmmCandidate "
-                + secondaryCmmCandidate.getNetworkSelectionStatus().getCandidate().SSID + " / "
-                + secondaryCmmCandidate.getNetworkSelectionStatus().getCandidate().BSSID);
-
-        // At this point secondaryCmmCandidate must be multi internet.
-        final WorkSource secondaryRequestorWs = mMultiInternetConnectionRequestorWs;
-        if (secondaryRequestorWs == null) {
-            localLog(listenerName + ": Requestor worksource is null in long live STA use-case,"
-                    + "  falling back to single client mode manager flow.");
-            return false;
-        }
-
-        final String targetBssid2 = secondaryCmmCandidate.getNetworkSelectionStatus()
-                .getCandidate().BSSID;
-        localLog(listenerName + " targetBssid2 " + targetBssid2 + " primary cmm connected to bssid "
-                + primaryCcm.getConnectedBssid());
-        // For secondary STA of multi internet connection, when ROLE_CLIENT_SECONDARY_LONG_LIVED
-        // is used, specify the target BSSID explicitly to avoid firmware choosing same BSSID
-        // as primary STA.
-        // TODO: Use new STA+STA user case DUAL_STA_NON_TRANSIENT_SECONDARY and remove the BSSID
-        // if roaming is supported on secondary.
-        String bssidToConnect = null;
-        if (!mConnectivityHelper.isFirmwareRoamingSupported()) {
-            bssidToConnect = targetBssid2;
-        }
-        // Request for a new client mode manager to spin up concurrent connection
-        mActiveModeWarden.requestSecondaryLongLivedClientModeManager(
-                (cm) -> {
-                    if (cm == null) {
-                        localLog(listenerName + ": Secondary client mode manager request returned "
-                                + "null, aborting (wifi off?)");
-                        handleScanResultsWithNoCandidate(handleScanResultsListener);
-                        return;
-                    }
-                    // We did not end up getting the secondary client mode manager for some reason
-                    // or get a wrong secondary role, fallback to legacy flow to connect primary.
-                    if (cm.getRole() != ROLE_CLIENT_SECONDARY_LONG_LIVED) {
-                        localLog(listenerName + ": Secondary client mode manager request returned"
-                                + cm.getRole().toString()
-                                + " ,falling back to single client mode manager flow.");
-                        return;
-                    }
-                    if (!(cm instanceof ConcreteClientModeManager)) {
-                        localLog(listenerName + ": Secondary client mode manager request returned"
-                                + " not for concrete client mode manager, falling back to single"
-                                + " client mode manager flow.");
-                        return;
-                    }
-                    // Set the concrete client mode manager to secondary internet usage.
-                    ConcreteClientModeManager ccm = (ConcreteClientModeManager) cm;
-                    ccm.setSecondaryInternet(true);
-                    // Check if secondary candidate is the same SSID and network Id with primary.
-                    final boolean isDbsAp = TextUtils.equals(primaryInfo.getSSID(),
-                            secondaryCmmCandidate.SSID) && (primaryInfo.getNetworkId()
-                            == secondaryCmmCandidate.networkId);
-                    ccm.setSecondaryInternetDbsAp(isDbsAp);
-                    localLog(listenerName + ": WNS candidate(secondary)-"
-                            + secondaryCmmCandidate.SSID + " / "
-                            + secondaryCmmCandidate.getNetworkSelectionStatus()
-                            .getCandidate().BSSID + " isDbsAp " + isDbsAp);
-                    // Secondary candidate cannot be null (otherwise we would have switched to
-                    // legacy flow above). Use the explicit bssid for network connection.
-                    WifiConfiguration targetNetwork = new WifiConfiguration(secondaryCmmCandidate);
-                    targetNetwork.dbsSecondaryInternet = isDbsAp;
-                    targetNetwork.ephemeral = true;
-                    targetNetwork.BSSID = targetBssid2; // specify the BSSID to disable roaming.
-                    connectToNetworkUsingCmmWithoutMbb(cm, targetNetwork);
-
-                    handleScanResultsWithCandidate(handleScanResultsListener);
-                }, secondaryRequestorWs,
-                secondaryCmmCandidate.SSID,
-                bssidToConnect);
-        return true;
-    }
-
-    /**
      * Handles 'onResult' callbacks for the Periodic, Single & Pno ScanListener.
      * Executes selection of potential network candidates, initiation of connection attempt to that
      * network.
@@ -524,33 +370,14 @@
             if (oemPaidOrOemPrivateRequestorWs != null
                     && mActiveModeWarden.canRequestMoreClientModeManagersInRole(
                             oemPaidOrOemPrivateRequestorWs,
-                            ROLE_CLIENT_SECONDARY_LONG_LIVED, false)) {
+                            ROLE_CLIENT_SECONDARY_LONG_LIVED)) {
                 // Add a placeholder CMM state to ensure network selection is performed for a
                 // potential second STA creation.
                 cmmStates.add(new WifiNetworkSelector.ClientModeManagerState());
-                hasExistingSecondaryCmm = true;
             }
         }
-        // If secondary cmm has not been created and need to connect secondary internet
-        if (!hasExistingSecondaryCmm && isMultiInternetConnectionRequested()) {
-            if (mMultiInternetConnectionRequestorWs == null) {
-                Log.e(TAG, "mMultiInternetConnectionRequestorWs is null!");
-            } else if (mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                    mMultiInternetConnectionRequestorWs, ROLE_CLIENT_SECONDARY_LONG_LIVED, false)) {
-                cmmStates.add(new WifiNetworkSelector.ClientModeManagerState());
-            }
-        }
-
         // Check if any blocklisted BSSIDs can be freed.
-        List<ScanDetail> enabledDetails =
-                mWifiBlocklistMonitor.tryEnablingBlockedBssids(scanDetails);
-        for (ScanDetail scanDetail : enabledDetails) {
-            WifiConfiguration config = mConfigManager.getSavedNetworkForScanDetail(scanDetail);
-            if (config != null) {
-                mConfigManager.updateNetworkSelectionStatus(config.networkId,
-                        WifiConfiguration.NetworkSelectionStatus.DISABLED_NONE);
-            }
-        }
+        mWifiBlocklistMonitor.tryEnablingBlockedBssids(scanDetails);
         Set<String> bssidBlocklist = mWifiBlocklistMonitor.updateAndGetBssidBlocklistForSsids(
                 connectedSsids);
         updateUserDisabledList(scanDetails);
@@ -561,8 +388,7 @@
 
         List<WifiCandidates.Candidate> candidates = mNetworkSelector.getCandidatesFromScan(
                 scanDetails, bssidBlocklist, cmmStates, mUntrustedConnectionAllowed,
-                mOemPaidConnectionAllowed, mOemPrivateConnectionAllowed,
-                mRestrictedConnectionAllowedUids, isMultiInternetConnectionRequested());
+                mOemPaidConnectionAllowed, mOemPrivateConnectionAllowed);
         mLatestCandidates = candidates;
         mLatestCandidatesTimestampMs = mClock.getElapsedSinceBootMillis();
 
@@ -603,17 +429,6 @@
             }
             // intentional fallthrough: No oem paid/private suggestions, fallback to legacy flow.
         }
-
-        // We have a dual internet network request and device supports STA + STA, check if there
-        // are secondary network candidate.
-        if (hasMultiInternetConnection() && mMultiInternetManager.hasPendingConnectionRequests()) {
-            if (handleConnectToMultiInternetConnectionInternal(candidates,
-                    listenerName, handleScanResultsListener)) {
-                return;
-            }
-            // intentional fallthrough: No multi internet connections, fallback to legacy flow.
-        }
-
         handleCandidatesFromScanResultsForPrimaryCmmUsingMbbIfAvailable(
                 listenerName, candidates, handleScanResultsListener);
     }
@@ -627,7 +442,7 @@
             @NonNull List<WifiCandidates.Candidate> primaryCmmCandidates,
             @NonNull List<WifiCandidates.Candidate> secondaryCmmCandidates,
             @NonNull HandleScanResultsListener handleScanResultsListener) {
-        // Perform network selection among secondary candidates. Create a new copy.
+        // Perform network selection among secondary candidates.
         WifiConfiguration secondaryCmmCandidate =
                 mNetworkSelector.selectNetwork(secondaryCmmCandidates);
         // No oem paid/private selected, fallback to legacy flow (should never happen!).
@@ -645,7 +460,6 @@
         String secondaryCmmCandidateBssid =
                 secondaryCmmCandidate.getNetworkSelectionStatus().getCandidate().BSSID;
 
-
         // At this point secondaryCmmCandidate must be either oemPaid, oemPrivate, or both.
         // OEM_PAID takes precedence over OEM_PRIVATE, so attribute to OEM_PAID requesting app.
         WorkSource secondaryRequestorWs = secondaryCmmCandidate.oemPaid
@@ -697,7 +511,7 @@
                     }
 
                     localLog(listenerName + ":  WNS candidate(secondary)-"
-                            + secondaryCmmCandidate.SSID + " / " + secondaryCmmCandidateBssid);
+                            + secondaryCmmCandidate.SSID);
                     // Secndary candidate cannot be null (otherwise we would have switched to legacy
                     // flow above)
                     connectToNetworkUsingCmmWithoutMbb(cm, secondaryCmmCandidate);
@@ -785,7 +599,7 @@
         List<String> results = new ArrayList<>();
         List<ScanResult> passpointAp = new ArrayList<>();
         for (ScanDetail scanDetail : scanDetails) {
-            results.add(ScanResultUtil.createQuotedSsid(scanDetail.getScanResult().SSID));
+            results.add(ScanResultUtil.createQuotedSSID(scanDetail.getScanResult().SSID));
             if (!scanDetail.getScanResult().isPasspointNetwork()) {
                 continue;
             }
@@ -948,7 +762,7 @@
                 return;
             }
 
-            mScanDetails.add(new ScanDetail(fullScanResult));
+            mScanDetails.add(ScanResultUtil.toScanDetail(fullScanResult));
         }
     }
 
@@ -1074,7 +888,7 @@
                     localLog("Skipping scan result with null information elements");
                     continue;
                 }
-                mScanDetails.add(new ScanDetail(result));
+                mScanDetails.add(ScanResultUtil.toScanDetail(result));
             }
 
             // Create a new list to avoid looping call trigger concurrent exception.
@@ -1100,9 +914,6 @@
                             resetLowRssiNetworkRetryDelay();
                         }
                     });
-            if (mIsLocationModeEnabled) {
-                mExternalPnoScanRequestManager.onPnoNetworkFound(results);
-            }
         }
     }
 
@@ -1177,30 +988,6 @@
     }
 
     /**
-     * Triggered when {@link MultiInternetWifiNetworkFactory} has a pending network request.
-     */
-    private class InternalMultiInternetConnectionStatusListener
-            implements MultiInternetManager.ConnectionStatusListener {
-        @Override
-        public void onStatusChange(@MultiInternetManager.MultiInternetState int state,
-                WorkSource requestorWs) {
-            localLog("setMultiInternetConnectionState: state=" + state + ", requestorWs="
-                    + requestorWs);
-
-            if (mMultiInternetConnectionState != state) {
-                mMultiInternetConnectionState = state;
-                mMultiInternetConnectionRequestorWs = requestorWs;
-                checkAllStatesAndEnableAutoJoin();
-            }
-        }
-
-        @Override
-        public void onStartScan(WorkSource requestorWs) {
-            forceConnectivityScan(requestorWs);
-        }
-    }
-
-    /**
      * WifiConnectivityManager constructor
      */
     WifiConnectivityManager(
@@ -1220,12 +1007,9 @@
             WifiBlocklistMonitor wifiBlocklistMonitor,
             WifiChannelUtilization wifiChannelUtilization,
             PasspointManager passpointManager,
-            MultiInternetManager multiInternetManager,
             DeviceConfigFacade deviceConfigFacade,
             ActiveModeWarden activeModeWarden,
-            FrameworkFacade frameworkFacade,
-            WifiGlobals wifiGlobals,
-            ExternalPnoScanRequestManager externalPnoScanRequestManager) {
+            WifiGlobals wifiGlobals) {
         mContext = context;
         mScoringParams = scoringParams;
         mConfigManager = configManager;
@@ -1242,15 +1026,12 @@
         mWifiBlocklistMonitor = wifiBlocklistMonitor;
         mWifiChannelUtilization = wifiChannelUtilization;
         mPasspointManager = passpointManager;
-        mMultiInternetManager = multiInternetManager;
         mDeviceConfigFacade = deviceConfigFacade;
         mActiveModeWarden = activeModeWarden;
-        mFrameworkFacade = frameworkFacade;
         mWifiGlobals = wifiGlobals;
 
         mAlarmManager = context.getSystemService(AlarmManager.class);
         mPowerManager = mContext.getSystemService(PowerManager.class);
-        mExternalPnoScanRequestManager = externalPnoScanRequestManager;
 
         // Listen for screen state change events.
         // TODO: We should probably add a shared broadcast receiver in the wifi stack which
@@ -1274,14 +1055,11 @@
         handleScreenStateChanged(mPowerManager.isInteractive());
 
         // Listen to WifiConfigManager network update events
-        mEventHandler.postAtFrontOfQueue(() ->
-                mConfigManager.addOnNetworkUpdateListener(new OnNetworkUpdateListener()));
+        mConfigManager.addOnNetworkUpdateListener(new OnNetworkUpdateListener());
         // Listen to WifiNetworkSuggestionsManager suggestion update events
         mWifiNetworkSuggestionsManager.addOnSuggestionUpdateListener(
                 new OnSuggestionUpdateListener());
         mActiveModeWarden.registerModeChangeCallback(new ModeChangeCallback());
-        mMultiInternetManager.setConnectionStatusListener(
-                new InternalMultiInternetConnectionStatusListener());
     }
 
     @NonNull
@@ -1294,6 +1072,40 @@
         return mActiveModeWarden.getPrimaryClientModeManager();
     }
 
+    /** Initialize single scanning schedules, and validate them */
+    private int[] initializeScanningSchedule(int state) {
+        int[] scheduleSec;
+
+        if (state == WIFI_STATE_CONNECTED) {
+            scheduleSec = mContext.getResources().getIntArray(
+                    R.array.config_wifiConnectedScanIntervalScheduleSec);
+        } else if (state == WIFI_STATE_DISCONNECTED) {
+            scheduleSec = mContext.getResources().getIntArray(
+                    R.array.config_wifiDisconnectedScanIntervalScheduleSec);
+        } else {
+            scheduleSec = null;
+        }
+
+        boolean invalidConfig = false;
+        if (scheduleSec == null || scheduleSec.length == 0) {
+            invalidConfig = true;
+        } else {
+            for (int val : scheduleSec) {
+                if (val <= 0) {
+                    invalidConfig = true;
+                    break;
+                }
+            }
+        }
+        if (!invalidConfig) {
+            return scheduleSec;
+        }
+
+        Log.e(TAG, "Configuration for wifi scanning schedule is mis-configured,"
+                + "using default schedule");
+        return DEFAULT_SCANNING_SCHEDULE_SEC;
+    }
+
     /**
      * This checks the connection attempt rate and recommends whether the connection attempt
      * should be skipped or not. This attempts to rate limit the rate of connections to
@@ -1602,15 +1414,6 @@
         if (!shouldConnect()) {
             return;
         }
-        if (mContext.getResources().getBoolean(R.bool.config_wifiUseHalApiToDisableFwRoaming)) {
-            // If network with specified BSSID, disable roaming. Otherwise enable the roaming.
-            boolean enableRoaming = targetNetwork.BSSID == null
-                    || targetNetwork.BSSID.equals(ClientModeImpl.SUPPLICANT_BSSID_ANY);
-            if (!clientModeManager.enableRoaming(enableRoaming)) {
-                Log.w(TAG, "Failed to change roaming to "
-                        + (enableRoaming ? "enabled" : "disabled"));
-            }
-        }
         clientModeManager.startConnectToNetwork(
                 targetNetwork.networkId, Process.WIFI_UID, targetBssid);
     }
@@ -1706,18 +1509,18 @@
      * Add the channels into the channel set with a size limit.
      * If maxCount equals to 0, will add all available channels into the set.
      * @param channelSet Target set for adding channel to.
-     * @param ssid Identifies the network to obtain from WifiScoreCard.
+     * @param config Network for query channel from WifiScoreCard
      * @param maxCount Size limit of the set. If equals to 0, means no limit.
      * @param ageInMillis Only consider channel info whose timestamps are younger than this value.
      * @return True if all available channels for this network are added, otherwise false.
      */
     private boolean addChannelFromWifiScoreCard(@NonNull Set<Integer> channelSet,
-            @NonNull String ssid, int maxCount, long ageInMillis) {
-        WifiScoreCard.PerNetwork network = mWifiScoreCard.lookupNetwork(ssid);
+            @NonNull WifiConfiguration config, int maxCount, long ageInMillis) {
+        WifiScoreCard.PerNetwork network = mWifiScoreCard.lookupNetwork(config.SSID);
         for (Integer channel : network.getFrequencies(ageInMillis)) {
             if (maxCount > 0 && channelSet.size() >= maxCount) {
                 localLog("addChannelFromWifiScoreCard: size limit reached for network:"
-                        + ssid);
+                        + config.SSID);
                 return false;
             }
             channelSet.add(channel);
@@ -1743,7 +1546,7 @@
             channelSet.add(wifiInfo.getFrequency());
         }
         // Then get channels for the network.
-        addChannelFromWifiScoreCard(channelSet, config.SSID, maxNumActiveChannelsForPartialScans,
+        addChannelFromWifiScoreCard(channelSet, config, maxNumActiveChannelsForPartialScans,
                 CHANNEL_LIST_AGE_MS);
         return channelSet;
     }
@@ -1764,7 +1567,7 @@
         Set<Integer> channelSet = new HashSet<>();
 
         for (WifiConfiguration config : networks) {
-            if (!addChannelFromWifiScoreCard(channelSet, config.SSID, maxCount, ageInMillis)) {
+            if (!addChannelFromWifiScoreCard(channelSet, config, maxCount, ageInMillis)) {
                 return channelSet;
             }
         }
@@ -1781,7 +1584,7 @@
             localLog("start a single scan from watchdogHandler");
 
             scheduleWatchdogTimer();
-            startSingleScan(true, WIFI_WORK_SOURCE, WifiScanner.SCAN_TYPE_HIGH_ACCURACY);
+            startSingleScan(true, WIFI_WORK_SOURCE);
         }
     }
 
@@ -1793,23 +1596,10 @@
                 startConnectivityScan(false);
             }
         } else {
-            // Trigger a delayed PNO scan to avoid frequent PNO scan restart since it's possible
-            // that many networks could be added back to back.
-            if (mDelayedPnoScanPending) {
-                localLog("PNO scan throttled for frequent Saved networks / suggestions update.");
-                return;
-            }
             // Update the PNO scan network list when screen is off. Here we
             // rely on startConnectivityScan() to perform all the checks and clean up.
-            localLog("Saved networks / suggestions update will restart pno scan in "
-                    + NETWORK_CHANGE_TRIGGER_PNO_THROTTLE_MS + "ms");
-            mDelayedPnoScanPending = true;
-            mEventHandler.postDelayed(
-                    () -> {
-                        mDelayedPnoScanPending = false;
-                        startConnectivityScan(false);
-                    },
-                    mDelayedPnoScanToken, NETWORK_CHANGE_TRIGGER_PNO_THROTTLE_MS);
+            localLog("Saved networks / suggestions updated impacting pno scan");
+            startConnectivityScan(false);
         }
     }
 
@@ -1852,10 +1642,7 @@
         // 2) link is good, internet status is acceptable
         //    and it is a short time since last network selection
         // 3) There is active stream such that scan will be likely disruptive
-        // 4) There is no multi internet connection request pending
         if (mWifiState == WIFI_STATE_CONNECTED
-                // If multi internet is connecting, then we do need the scan.
-                && !isMultiInternetConnectionRequested()
                 && (mNetworkSelector.isNetworkSufficient(wifiInfo)
                 || isGoodLinkAndAcceptableInternetAndShortTimeSinceLastNetworkSelection
                 || mNetworkSelector.hasActiveStream(wifiInfo))) {
@@ -1876,8 +1663,7 @@
 
             if (mWifiState == WIFI_STATE_DISCONNECTED
                     && mInitialScanState == INITIAL_SCAN_STATE_START) {
-                startSingleScan(false, WIFI_WORK_SOURCE,
-                        getScheduledSingleScanType(mCurrentSingleScanScheduleIndex));
+                startSingleScan(false, WIFI_WORK_SOURCE);
 
                 // Note, initial partial scan may fail due to lack of channel history
                 // Hence, we verify state before changing to AWIATING_RESPONSE
@@ -1886,8 +1672,7 @@
                     mWifiMetrics.incrementInitialPartialScanCount();
                 }
             } else {
-                startSingleScan(isFullBandScan, WIFI_WORK_SOURCE,
-                        getScheduledSingleScanType(mCurrentSingleScanScheduleIndex));
+                startSingleScan(isFullBandScan, WIFI_WORK_SOURCE);
             }
             schedulePeriodicScanTimer(
                     getScheduledSingleScanIntervalMs(mCurrentSingleScanScheduleIndex));
@@ -1901,35 +1686,22 @@
         }
     }
 
-    // Returns the scan type based on current scan schedule and index.
-    private int getScheduledSingleScanType(int index) {
-        int[] scanType = mExternalSingleScanType == null ? mCurrentSingleScanType
-                : mExternalSingleScanType;
-        if (scanType == null) {
-            Log.e(TAG, "Invalid attempt to get schedule scan type. Type array is null ");
-            return DEFAULT_SCANNING_TYPE[0];
-        }
-        if (index >= scanType.length) {
-            index = scanType.length - 1;
-        }
-        return scanType[index];
-    }
-
     // Retrieve a value from single scanning schedule in ms
     private int getScheduledSingleScanIntervalMs(int index) {
-        int[] schedule = mExternalSingleScanScheduleSec == null ? mCurrentSingleScanScheduleSec
-                : mExternalSingleScanScheduleSec;
-        if (schedule == null) {
-            Log.e(TAG, "Invalid attempt to get schedule interval, Schedule array is null ");
+        synchronized (mLock) {
+            if (mCurrentSingleScanScheduleSec == null) {
+                Log.e(TAG, "Invalid attempt to get schedule interval, Schedule array is null ");
 
-            // Use a default value
-            return DEFAULT_SCANNING_SCHEDULE_SEC[0] * 1000;
-        }
+                // Use a default value
+                return DEFAULT_SCANNING_SCHEDULE_SEC[0] * 1000;
+            }
 
-        if (index >= schedule.length) {
-            index = schedule.length - 1;
+            if (index >= mCurrentSingleScanScheduleSec.length) {
+                index = mCurrentSingleScanScheduleSec.length - 1;
+            }
+            return getScanIntervalWithPowerSaveMultiplier(
+                    mCurrentSingleScanScheduleSec[index] * 1000);
         }
-        return getScanIntervalWithPowerSaveMultiplier(schedule[index] * 1000);
     }
 
     private int getScanIntervalWithPowerSaveMultiplier(int interval) {
@@ -1942,17 +1714,16 @@
 
     // Set the single scanning schedule
     private void setSingleScanningSchedule(int[] scheduleSec) {
-        mCurrentSingleScanScheduleSec = scheduleSec;
-    }
-
-    // Set the single scanning schedule
-    private void setSingleScanningType(int[] scanType) {
-        mCurrentSingleScanType = scanType;
+        synchronized (mLock) {
+            mCurrentSingleScanScheduleSec = scheduleSec;
+        }
     }
 
     // Get the single scanning schedule
     private int[] getSingleScanningSchedule() {
-        return mCurrentSingleScanScheduleSec;
+        synchronized (mLock) {
+            return mCurrentSingleScanScheduleSec;
+        }
     }
 
     // Update the single scanning schedule if needed, and return true if update occurs
@@ -1969,14 +1740,12 @@
 
         if (mCurrentSingleScanScheduleSec == mConnectedSingleScanScheduleSec
                 && shouldUseSingleSavedNetworkSchedule) {
-            setSingleScanningSchedule(mConnectedSingleSavedNetworkSingleScanScheduleSec);
-            setSingleScanningType(mConnectedSingleSavedNetworkSingleScanType);
+            mCurrentSingleScanScheduleSec = mConnectedSingleSavedNetworkSingleScanScheduleSec;
             return true;
         }
         if (mCurrentSingleScanScheduleSec == mConnectedSingleSavedNetworkSingleScanScheduleSec
                 && !shouldUseSingleSavedNetworkSchedule) {
-            setSingleScanningSchedule(mConnectedSingleScanScheduleSec);
-            setSingleScanningType(mConnectedSingleScanType);
+            mCurrentSingleScanScheduleSec = mConnectedSingleScanScheduleSec;
             return true;
         }
         return false;
@@ -2000,8 +1769,7 @@
     }
 
     // Start a single scan
-    private void startForcedSingleScan(boolean isFullBandScan, WorkSource workSource,
-            int scanType) {
+    private void startForcedSingleScan(boolean isFullBandScan, WorkSource workSource) {
         mPnoScanListener.resetLowRssiNetworkRetryDelay();
 
         ScanSettings settings = new ScanSettings();
@@ -2014,7 +1782,7 @@
                 mInitialPartialScanChannelCount = settings.channels.length;
             }
         }
-        settings.type = scanType;
+        settings.type = WifiScanner.SCAN_TYPE_HIGH_ACCURACY; // always do high accuracy scans.
         settings.band = getScanBand(isFullBandScan);
         // Only enable RNR for full scans since we already have a known channel list for
         // partial scan. We do not want to enable RNR for partial scan since it could end up
@@ -2031,10 +1799,9 @@
         settings.numBssidsPerScan = 0;
         settings.hiddenNetworks.clear();
         // retrieve the list of hidden network SSIDs from saved network to scan for
-        settings.hiddenNetworks.addAll(mConfigManager.retrieveHiddenNetworkList(true));
+        settings.hiddenNetworks.addAll(mConfigManager.retrieveHiddenNetworkList());
         // retrieve the list of hidden network SSIDs from Network suggestion to scan for
-        settings.hiddenNetworks.addAll(
-                mWifiNetworkSuggestionsManager.retrieveHiddenNetworkList(true));
+        settings.hiddenNetworks.addAll(mWifiNetworkSuggestionsManager.retrieveHiddenNetworkList());
 
         SingleScanListener singleScanListener =
                 new SingleScanListener(isFullBandScan);
@@ -2043,11 +1810,11 @@
         mWifiMetrics.incrementConnectivityOneshotScanCount();
     }
 
-    private void startSingleScan(boolean isFullBandScan, WorkSource workSource, int scanType) {
+    private void startSingleScan(boolean isFullBandScan, WorkSource workSource) {
         if (!mWifiEnabled || !mAutoJoinEnabled) {
             return;
         }
-        startForcedSingleScan(isFullBandScan, workSource, scanType);
+        startForcedSingleScan(isFullBandScan, workSource);
     }
 
     // Start a periodic scan when screen is on
@@ -2085,21 +1852,6 @@
     }
 
     /**
-     * Sets the external scan schedule and scan type.
-     */
-    public void setExternalScreenOnScanSchedule(int[] scanScheduleSeconds, int[] scanType) {
-        mExternalSingleScanScheduleSec = scanScheduleSeconds;
-        mExternalSingleScanType = scanType;
-    }
-
-    /**
-     * Sets the next screen-on connectivity scan delay in milliseconds.
-     */
-    public void setOneShotScreenOnConnectivityScanDelayMillis(int delayMs) {
-        mNextScreenOnConnectivityScanDelayMs = delayMs;
-    }
-
-    /**
      * Pass device mobility state to WifiChannelUtilization and
      * alter the PNO scan interval based on the current device mobility state.
      * If the device is stationary, it will likely not find many new Wifi networks. Thus, increase
@@ -2177,10 +1929,8 @@
     private @NonNull List<WifiConfiguration> getAllScanOptimizationNetworks() {
         List<WifiConfiguration> networks = mConfigManager.getSavedNetworks(-1);
         networks.addAll(mWifiNetworkSuggestionsManager.getAllScanOptimizationSuggestionNetworks());
-        // remove all saved but never connected, auto-join disabled, or network selection disabled
-        // networks.
+        // remove all auto-join disabled or network selection disabled network.
         networks.removeIf(config -> !config.allowAutojoin
-                || (!config.ephemeral && !config.getNetworkSelectionStatus().hasEverConnected())
                 || !config.getNetworkSelectionStatus().isNetworkEnabled()
                 || mConfigManager.isNetworkTemporarilyDisabledByUser(
                         config.isPasspoint() ? config.FQDN : config.SSID));
@@ -2188,55 +1938,13 @@
     }
 
     /**
-     * Sets whether global location mode is enabled.
-     */
-    public void setLocationModeEnabled(boolean enabled) {
-        mIsLocationModeEnabled = enabled;
-    }
-
-    /**
-     * Sets a external PNO scan request
-     */
-    public void setExternalPnoScanRequest(int uid, @NonNull String packageName,
-            @NonNull IBinder binder, @NonNull IPnoScanResultsCallback callback,
-            @NonNull List<WifiSsid> ssids, @NonNull int[] frequencies) {
-        if (mExternalPnoScanRequestManager.setRequest(
-                uid, packageName, binder, callback, ssids, frequencies)) {
-            if (mPnoScanStarted) {
-                Log.d(TAG, "Restarting PNO Scan with external requested SSIDs");
-                stopPnoScan();
-                startDisconnectedPnoScan();
-            } else if (mWifiState == WIFI_STATE_DISCONNECTED) {
-                Log.d(TAG, "Starting PNO Scan with external requested SSIDs");
-                startDisconnectedPnoScan();
-            }
-        }
-    }
-
-    /**
-     * Clears the external PNO scan request.
-     */
-    public void clearExternalPnoScanRequest(int uid) {
-        if (mExternalPnoScanRequestManager.removeRequest(uid)) {
-            Log.d(TAG, "Restarting PNO Scan after removing external requested SSIDs");
-            stopPnoScan();
-            startDisconnectedPnoScan();
-        }
-    }
-
-
-    /**
      * Retrieve the PnoNetworks from Saved and suggestion non-passpoint network.
      */
     @VisibleForTesting
     public List<PnoSettings.PnoNetwork> retrievePnoNetworkList() {
         List<WifiConfiguration> networks = getAllScanOptimizationNetworks();
-        Set<String> externalRequestedPnoSsids = mIsLocationModeEnabled
-                ? mExternalPnoScanRequestManager.getExternalPnoScanSsids() : Collections.EMPTY_SET;
-        Set<Integer> externalRequestedPnoFrequencies = mIsLocationModeEnabled
-                ? mExternalPnoScanRequestManager.getExternalPnoScanFrequencies()
-                : Collections.EMPTY_SET;
-        if (networks.isEmpty() && externalRequestedPnoSsids.isEmpty()) {
+
+        if (networks.isEmpty()) {
             return Collections.EMPTY_LIST;
         }
         Collections.sort(networks, mConfigManager.getScanListComparator());
@@ -2244,38 +1952,20 @@
                 .getBoolean(R.bool.config_wifiPnoFrequencyCullingEnabled);
 
         List<PnoSettings.PnoNetwork> pnoList = new ArrayList<>();
-        Set<String> pnoSet = new HashSet<>();
-
-        // Add any externally requested SSIDs to PNO scan list
-        for (String ssid : externalRequestedPnoSsids) {
-            if (pnoSet.contains(ssid)) {
-                continue;
-            }
-            WifiScanner.PnoSettings.PnoNetwork pnoNetwork = new PnoSettings.PnoNetwork(ssid);
-            pnoList.add(pnoNetwork);
-            pnoSet.add(ssid);
-            if (!pnoFrequencyCullingEnabled) {
-                continue;
-            }
-            Set<Integer> channelList = new HashSet<>();
-            addChannelFromWifiScoreCard(channelList, ssid, 0,
-                    MAX_PNO_SCAN_FREQUENCY_AGE_MS);
-            channelList.addAll(externalRequestedPnoFrequencies);
-            pnoNetwork.frequencies = channelList.stream().mapToInt(Integer::intValue).toArray();
-        }
+        Set<WifiScanner.PnoSettings.PnoNetwork> pnoSet = new HashSet<>();
         for (WifiConfiguration config : networks) {
-            if (pnoSet.contains(config.SSID)) {
-                continue;
-            }
             WifiScanner.PnoSettings.PnoNetwork pnoNetwork =
                     WifiConfigurationUtil.createPnoNetwork(config);
+            if (pnoSet.contains(pnoNetwork)) {
+                continue;
+            }
             pnoList.add(pnoNetwork);
-            pnoSet.add(config.SSID);
+            pnoSet.add(pnoNetwork);
             if (!pnoFrequencyCullingEnabled) {
                 continue;
             }
             Set<Integer> channelList = new HashSet<>();
-            addChannelFromWifiScoreCard(channelList, config.SSID, 0,
+            addChannelFromWifiScoreCard(channelList, config, 0,
                     MAX_PNO_SCAN_FREQUENCY_AGE_MS);
             pnoNetwork.frequencies = channelList.stream().mapToInt(Integer::intValue).toArray();
         }
@@ -2338,7 +2028,9 @@
         localLog("schedulePeriodicScanTimer intervalMs " + intervalMs);
         mPeriodicScanTimerSet = true;
         mEventHandler.postDelayed(() -> {
-            mPeriodicScanTimerSet = false;
+            synchronized (mLock) {
+                mPeriodicScanTimerSet = false;
+            }
             // Schedule the next timer and start a single scan if screen is on.
             if (mScreenOn) {
                 startPeriodicSingleScan();
@@ -2437,21 +2129,6 @@
 
         mOpenNetworkNotifier.handleScreenStateChanged(screenOn);
 
-        if (mScreenOn) {
-            // cancel any queued PNO scans since the screen is turned on.
-            mDelayedPnoScanPending = false;
-            mEventHandler.removeCallbacksAndMessages(mDelayedPnoScanToken);
-
-            if (mNextScreenOnConnectivityScanDelayMs > 0) {
-                mEventHandler.postDelayed(() -> {
-                    startConnectivityScan(SCAN_ON_SCHEDULE);
-                }, mDelayedStartPeriodicScanToken, mNextScreenOnConnectivityScanDelayMs);
-                mNextScreenOnConnectivityScanDelayMs = 0;
-                return;
-            }
-        } else {
-            mEventHandler.removeCallbacksAndMessages(mDelayedStartPeriodicScanToken);
-        }
         startConnectivityScan(SCAN_ON_SCHEDULE);
     }
 
@@ -2527,116 +2204,19 @@
         return (config != null && config.networkId == currentNetworkId);
     }
 
-    /**
-     * Helper method to load a overlay resource for periodic scan schedule.
-     * @param id of the overlay
-     * @param defaultValue default value to return if config is invalid.
-     * @param resName resource name for logging
-     */
-    private int[] loadScanScheduleArrayFromOverlay(int id, int[] defaultValue, String resName) {
-        int[] result = loadIntArrayFromOverlay(id);
-        if (result == null) {
-            // resource is empty
-            Log.w(TAG, resName + " is not configured! Using default scan schedule");
-            return defaultValue;
-        }
-        if (!isValidScheduleArray(result)) {
-            // invalid schedule
-            Log.e(TAG, resName + " is misconfigured! Using default scan schedule");
-            return defaultValue;
-        }
-        return result;
-    }
-
-    /**
-     * Helper method to load a overlay resource for periodic scan schedule.
-     * @param id of the overlay
-     * @param defaultValue default value to return if config is invalid.
-     * @param resName resource name for logging
-     */
-    private int[] loadScanTypeArrayFromOverlay(int id, int[] defaultValue, String resName) {
-        int[] result = loadIntArrayFromOverlay(id);
-        if (result == null) {
-            // resource is empty
-            Log.w(TAG, resName + " is not configured! Using default scan types");
-            return defaultValue;
-        }
-        if (!isValidScanTypeArray(result)) {
-            // invalid schedule
-            Log.e(TAG, resName + " is misconfigured! Using default scan types");
-            return defaultValue;
-        }
-        return result;
-    }
-
-    /**
-     * Helper method to load a int[] from an overlay resource.
-     * @param id of the overlay
-     */
-    private int[] loadIntArrayFromOverlay(int id) {
-        int[] result = mContext.getResources().getIntArray(id);
-        if (result == null || result.length == 0) {
+    private int[] initSingleSavedNetworkSchedule() {
+        int[] schedule = mContext.getResources().getIntArray(
+                    R.array.config_wifiSingleSavedNetworkConnectedScanIntervalScheduleSec);
+        if (schedule == null || schedule.length == 0) {
             return null;
         }
-        return result;
-    }
 
-    private boolean isValidScheduleArray(@NonNull int[] schedule) {
         for (int val : schedule) {
-            if (val < 1) {
-                return false;
+            if (val <= 0) {
+                return null;
             }
         }
-        return true;
-    }
-
-    private boolean isValidScanTypeArray(@NonNull int[] scanTypes) {
-        for (int val : scanTypes) {
-            if (val < 0 || val > WifiScanner.SCAN_TYPE_MAX) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    private void loadScanSchedulesAndScanTypesIfNeeded() {
-        // initialize scan schedule and scan type for connected scan.
-        if (mConnectedSingleScanScheduleSec == null) {
-            mConnectedSingleScanScheduleSec = loadScanScheduleArrayFromOverlay(
-                    R.array.config_wifiConnectedScanIntervalScheduleSec,
-                    DEFAULT_SCANNING_SCHEDULE_SEC, "mConnectedSingleScanScheduleSec");
-        }
-        if (mConnectedSingleScanType == null) {
-            mConnectedSingleScanType = loadScanTypeArrayFromOverlay(
-                    R.array.config_wifiConnectedScanType,
-                    DEFAULT_SCANNING_TYPE, "mConnectedSingleScanType");
-        }
-
-        // initialize scan schedule and scan type for disconnected scan.
-        if (mDisconnectedSingleScanScheduleSec == null) {
-            mDisconnectedSingleScanScheduleSec = loadScanScheduleArrayFromOverlay(
-                    R.array.config_wifiDisconnectedScanIntervalScheduleSec,
-                    DEFAULT_SCANNING_SCHEDULE_SEC, "mDisconnectedSingleScanScheduleSec");
-        }
-        if (mDisconnectedSingleScanType == null) {
-            mDisconnectedSingleScanType = loadScanTypeArrayFromOverlay(
-                    R.array.config_wifiDisconnectedScanType,
-                    DEFAULT_SCANNING_TYPE, "mDisconnectedSingleScanType");
-        }
-
-        // initialize scan schedule and scan type for connected scan when no other networks are
-        // available.
-        if (mConnectedSingleSavedNetworkSingleScanScheduleSec == null) {
-            mConnectedSingleSavedNetworkSingleScanScheduleSec = loadScanScheduleArrayFromOverlay(
-                    R.array.config_wifiSingleSavedNetworkConnectedScanIntervalScheduleSec,
-                    mConnectedSingleScanScheduleSec,
-                    "mConnectedSingleSavedNetworkSingleScanScheduleSec");
-        }
-        if (mConnectedSingleSavedNetworkSingleScanType == null) {
-            mConnectedSingleSavedNetworkSingleScanType = loadScanTypeArrayFromOverlay(
-                    R.array.config_wifiSingleSavedNetworkConnectedScanType,
-                    mConnectedSingleScanType, "mConnectedSingleSavedNetworkSingleScanType");
-        }
+        return schedule;
     }
 
     /**
@@ -2652,7 +2232,21 @@
             return;
         }
         localLog("handleConnectionStateChanged: state=" + stateToString(state));
-        loadScanSchedulesAndScanTypesIfNeeded();
+
+        if (mConnectedSingleScanScheduleSec == null) {
+            mConnectedSingleScanScheduleSec = initializeScanningSchedule(WIFI_STATE_CONNECTED);
+        }
+        if (mDisconnectedSingleScanScheduleSec == null) {
+            mDisconnectedSingleScanScheduleSec =
+                    initializeScanningSchedule(WIFI_STATE_DISCONNECTED);
+        }
+        if (mConnectedSingleSavedNetworkSingleScanScheduleSec == null) {
+            mConnectedSingleSavedNetworkSingleScanScheduleSec =
+                    initSingleSavedNetworkSchedule();
+            if (mConnectedSingleSavedNetworkSingleScanScheduleSec == null) {
+                mConnectedSingleSavedNetworkSingleScanScheduleSec = mConnectedSingleScanScheduleSec;
+            }
+        }
 
         mWifiState = state;
 
@@ -2662,24 +2256,19 @@
             scheduleWatchdogTimer();
             // Switch to the disconnected scanning schedule
             setSingleScanningSchedule(mDisconnectedSingleScanScheduleSec);
-            setSingleScanningType(mDisconnectedSingleScanType);
             startConnectivityScan(SCAN_IMMEDIATELY);
         } else if (mWifiState == WIFI_STATE_CONNECTED) {
-            cancelWatchdogScan();
             if (useSingleSavedNetworkSchedule()) {
                 // Switch to Single-Saved-Network connected schedule
                 setSingleScanningSchedule(mConnectedSingleSavedNetworkSingleScanScheduleSec);
-                setSingleScanningType(mConnectedSingleSavedNetworkSingleScanType);
             } else {
                 // Switch to connected single scanning schedule
                 setSingleScanningSchedule(mConnectedSingleScanScheduleSec);
-                setSingleScanningType(mConnectedSingleScanType);
             }
             startConnectivityScan(SCAN_ON_SCHEDULE);
         } else {
             // Intermediate state, no applicable single scanning schedule
             setSingleScanningSchedule(null);
-            setSingleScanningType(null);
             startConnectivityScan(SCAN_ON_SCHEDULE);
         }
     }
@@ -2688,13 +2277,11 @@
      * Handler when a WiFi connection attempt ended.
      *
      * @param failureCode {@link WifiMetrics.ConnectionEvent} failure code.
-     * @param failureReason {@link WifiMetricsProto.ConnectionEvent} Level2FailureReason
      * @param bssid the failed network.
-     * @param config identifies the failed network.
+     * @param ssid identifies the failed network.
      */
     public void handleConnectionAttemptEnded(@NonNull ClientModeManager clientModeManager,
-            int failureCode, int failureReason, @NonNull String bssid,
-            @NonNull WifiConfiguration config) {
+            int failureCode, @NonNull String bssid, @NonNull String ssid) {
         List<ClientModeManager> internetConnectivityCmms =
                 mActiveModeWarden.getInternetConnectivityClientModeManagers();
         if (!internetConnectivityCmms.contains(clientModeManager)) {
@@ -2704,22 +2291,22 @@
         }
         WifiInfo wifiInfo = getPrimaryWifiInfo();
         if (failureCode == WifiMetrics.ConnectionEvent.FAILURE_NONE) {
-            String ssidUnquoted = WifiInfo.removeDoubleQuotes(wifiInfo.getSSID());
+            String ssidUnquoted = (wifiInfo.getWifiSsid() == null)
+                    ? null
+                    : wifiInfo.getWifiSsid().toString();
             mOpenNetworkNotifier.handleWifiConnected(ssidUnquoted);
         } else {
             mOpenNetworkNotifier.handleConnectionFailure();
             // Only attempt to reconnect when connection on the primary CMM fails, since MBB
             // CMM will be destroyed after the connection failure.
             if (clientModeManager.getRole() == ROLE_CLIENT_PRIMARY) {
-                retryConnectionOnLatestCandidates(clientModeManager, bssid, config,
-                        failureCode == FAILURE_AUTHENTICATION_FAILURE
-                                && failureReason == AUTH_FAILURE_EAP_FAILURE);
+                retryConnectionOnLatestCandidates(clientModeManager, bssid, ssid);
             }
         }
     }
 
     private void retryConnectionOnLatestCandidates(@NonNull ClientModeManager clientModeManager,
-            String bssid, @NonNull WifiConfiguration configuration, boolean ignoreSameNetwork) {
+            String bssid, String ssid) {
         try {
             if (mLatestCandidates == null || mLatestCandidates.size() == 0
                     || mClock.getElapsedSinceBootMillis() - mLatestCandidatesTimestampMs
@@ -2728,16 +2315,9 @@
                 return;
             }
             MacAddress macAddress = MacAddress.fromString(bssid);
-            ScanResultMatchInfo scanResultMatchInfo =
-                    ScanResultMatchInfo.fromWifiConfiguration(configuration);
             int prevNumCandidates = mLatestCandidates.size();
             mLatestCandidates = mLatestCandidates.stream()
                     .filter(candidate -> {
-                        // filter out the same network if needed
-                        if (ignoreSameNetwork && scanResultMatchInfo.matchForNetworkSelection(
-                                candidate.getKey().matchInfo) != null) {
-                            return false;
-                        }
                         // filter out the candidate with the BSSID that just failed
                         if (macAddress.equals(candidate.getKey().bssid)) {
                             return false;
@@ -2757,7 +2337,7 @@
                 localLog("Automatic retry on the next best WNS candidate-" + candidate.SSID);
                 // Make sure that the failed BSSID is blocked for at least TEMP_BSSID_BLOCK_DURATION
                 // to prevent the supplicant from trying it again.
-                mWifiBlocklistMonitor.blockBssidForDurationMs(bssid, configuration,
+                mWifiBlocklistMonitor.blockBssidForDurationMs(bssid, ssid,
                         TEMP_BSSID_BLOCK_DURATION,
                         WifiBlocklistMonitor.REASON_FRAMEWORK_DISCONNECT_FAST_RECONNECT, 0);
                 triggerConnectToNetworkUsingCmm(clientModeManager, candidate,
@@ -2789,8 +2369,7 @@
         // External triggers to disable always trumps any internal state.
         setAutoJoinEnabled(mAutoJoinEnabledExternal
                 && (mUntrustedConnectionAllowed || mOemPaidConnectionAllowed
-                || mOemPrivateConnectionAllowed || mTrustedConnectionAllowed
-                || mRestrictedConnectionAllowedUids.size() != 0 || hasMultiInternetConnection())
+                || mOemPrivateConnectionAllowed || mTrustedConnectionAllowed)
                 && !mSpecificNetworkRequestInProgress);
         startConnectivityScan(SCAN_IMMEDIATELY);
     }
@@ -2820,36 +2399,6 @@
     }
 
     /**
-     * Triggered when {@link RestrictedWifiNetworkFactory} has a new pending restricted network
-     * request.
-     * @param uid the uid of the latest requestor
-     */
-    public void addRestrictionConnectionAllowedUid(int uid) {
-        localLog("addRestrictionConnectionAllowedUid: allowedUid=" + uid);
-
-        int size = mRestrictedConnectionAllowedUids.size();
-        mRestrictedConnectionAllowedUids.add(uid);
-        if (size == 0) {
-            checkAllStatesAndEnableAutoJoin();
-        }
-    }
-
-    /**
-     * Triggered when {@link RestrictedWifiNetworkFactory} release a restricted network request.
-     * @param uid the uid of the latest released requestor
-     */
-    public void removeRestrictionConnectionAllowedUid(int uid) {
-        localLog("removeRestrictionConnectionAllowedUid: allowedUid=" + uid);
-
-        mRestrictedConnectionAllowedUids.remove(uid);
-        if (mRestrictedConnectionAllowedUids.size() == 0) {
-            checkAllStatesAndEnableAutoJoin();
-        }
-    }
-
-
-
-    /**
      * Triggered when {@link OemPaidWifiNetworkFactory} has a pending network request.
      */
     public void setOemPaidConnectionAllowed(boolean allowed, WorkSource requestorWs) {
@@ -2912,7 +2461,7 @@
 
         clearConnectionAttemptTimeStamps();
         mWaitForFullBandScanResults = true;
-        startForcedSingleScan(true, workSource, WifiScanner.SCAN_TYPE_HIGH_ACCURACY);
+        startForcedSingleScan(true, workSource);
     }
 
     /**
@@ -3021,32 +2570,6 @@
         }
     }
 
-    /**
-     * Return whether auto join is on/off
-     */
-    public boolean getAutoJoinEnabledExternal() {
-        return mAutoJoinEnabledExternal;
-    }
-
-    /**
-     * Check if multi internet connection exists.
-     *
-     * @return true if multi internet connection exists.
-     */
-    public boolean hasMultiInternetConnection() {
-        return mMultiInternetConnectionState != MultiInternetManager.MULTI_INTERNET_STATE_NONE;
-    }
-
-    /**
-     * Check if multi internet connection is requested.
-     *
-     * @return true if multi internet connection is requested.
-     */
-    public boolean isMultiInternetConnectionRequested() {
-        return mMultiInternetConnectionState
-                == MultiInternetManager.MULTI_INTERNET_STATE_CONNECTION_REQUESTED;
-    }
-
     @VisibleForTesting
     int getLowRssiNetworkRetryDelay() {
         return mPnoScanListener.getLowRssiNetworkRetryDelay();
@@ -3063,12 +2586,9 @@
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.println("Dump of WifiConnectivityManager");
         pw.println("WifiConnectivityManager - Log Begin ----");
-        pw.println("mIsLocationModeEnabled: " + mIsLocationModeEnabled);
         mLocalLog.dump(fd, pw, args);
         pw.println("WifiConnectivityManager - Log End ----");
-        pw.println(TAG + ": mMultiInternetConnectionState " + mMultiInternetConnectionState);
         mOpenNetworkNotifier.dump(fd, pw, args);
         mWifiBlocklistMonitor.dump(fd, pw, args);
-        mExternalPnoScanRequestManager.dump(fd, pw, args);
     }
 }
diff --git a/framework/java/android/net/wifi/WifiContext.java b/service/java/com/android/server/wifi/WifiContext.java
similarity index 68%
rename from framework/java/android/net/wifi/WifiContext.java
rename to service/java/com/android/server/wifi/WifiContext.java
index fa6f68a..cac0bdc 100644
--- a/framework/java/android/net/wifi/WifiContext.java
+++ b/service/java/com/android/server/wifi/WifiContext.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * 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.
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package android.net.wifi;
+package com.android.server.wifi;
 
 import android.annotation.NonNull;
 import android.content.Context;
@@ -24,10 +24,9 @@
 import android.content.pm.ResolveInfo;
 import android.content.res.AssetManager;
 import android.content.res.Resources;
-import android.net.wifi.util.Environment;
 import android.util.Log;
 
-import androidx.annotation.Nullable;
+import com.android.server.wifi.util.Environment;
 
 import java.util.List;
 import java.util.stream.Collectors;
@@ -35,23 +34,17 @@
 /**
  * Wrapper for context to override getResources method. Resources for wifi mainline jar needs to be
  * fetched from the resources APK.
- *
- * @hide
  */
 public class WifiContext extends ContextWrapper {
     private static final String TAG = "WifiContext";
     /** Intent action that is used to identify ServiceWifiResources.apk */
     private static final String ACTION_RESOURCES_APK =
             "com.android.server.wifi.intent.action.SERVICE_WIFI_RESOURCES_APK";
-    /** Intent action that is used to identify WifiDialog.apk */
-    private static final String ACTION_WIFI_DIALOG_APK =
-            "com.android.server.wifi.intent.action.WIFI_DIALOG_APK";
 
     /** Since service-wifi runs within system_server, its package name is "android". */
     private static final String SERVICE_WIFI_PACKAGE_NAME = "android";
 
     private String mWifiOverlayApkPkgName;
-    private String mWifiDialogApkPkgName;
 
     // Cached resources from the resources APK.
     private AssetManager mWifiAssetsFromApk;
@@ -63,71 +56,44 @@
     }
 
     /** Get the package name of ServiceWifiResources.apk */
-    public @Nullable String getWifiOverlayApkPkgName() {
+    public String getWifiOverlayApkPkgName() {
         if (mWifiOverlayApkPkgName != null) {
             return mWifiOverlayApkPkgName;
         }
-        mWifiOverlayApkPkgName = getApkPkgNameForAction(ACTION_RESOURCES_APK);
-        if (mWifiOverlayApkPkgName == null) {
-            // Resource APK not loaded yet, print a stack trace to see where this is called from
-            Log.e(TAG, "Attempted to fetch resources before Wifi Resources APK is loaded!",
-                    new IllegalStateException());
-            return null;
-        }
-        Log.i(TAG, "Found Wifi Resources APK at: " + mWifiOverlayApkPkgName);
-        return mWifiOverlayApkPkgName;
-    }
 
-    /** Get the package name of WifiDialog.apk */
-    public @Nullable String getWifiDialogApkPkgName() {
-        if (mWifiDialogApkPkgName != null) {
-            return mWifiDialogApkPkgName;
-        }
-        mWifiDialogApkPkgName = getApkPkgNameForAction(ACTION_WIFI_DIALOG_APK);
-        if (mWifiDialogApkPkgName == null) {
-            // WifiDialog APK not loaded yet, print a stack trace to see where this is called from
-            Log.e(TAG, "Attempted to fetch WifiDialog apk before it is loaded!",
-                    new IllegalStateException());
-            return null;
-        }
-        Log.i(TAG, "Found Wifi Dialog APK at: " + mWifiDialogApkPkgName);
-        return mWifiDialogApkPkgName;
-    }
-
-    /** Gets the package name of the apk responding to the given intent action */
-    private String getApkPkgNameForAction(@NonNull String action) {
         List<ResolveInfo> resolveInfos = getPackageManager().queryIntentActivities(
-                new Intent(action),
+                new Intent(ACTION_RESOURCES_APK),
                 PackageManager.MATCH_SYSTEM_ONLY);
-        Log.i(TAG, "Got resolveInfos for " + action + ": " + resolveInfos);
 
         // remove apps that don't live in the Wifi apex
         resolveInfos.removeIf(info ->
                 !Environment.isAppInWifiApex(info.activityInfo.applicationInfo));
 
         if (resolveInfos.isEmpty()) {
+            // Resource APK not loaded yet, print a stack trace to see where this is called from
+            Log.e(TAG, "Attempted to fetch resources before Wifi Resources APK is loaded!",
+                    new IllegalStateException());
             return null;
         }
 
         if (resolveInfos.size() > 1) {
             // multiple apps found, log a warning, but continue
-            Log.w(TAG, "Found > 1 APK that can resolve " + action + ": "
+            Log.w(TAG, "Found > 1 APK that can resolve Wifi Resources APK intent: "
                     + resolveInfos.stream()
-                    .map(info -> info.activityInfo.applicationInfo.packageName)
-                    .collect(Collectors.joining(", ")));
+                            .map(info -> info.activityInfo.applicationInfo.packageName)
+                            .collect(Collectors.joining(", ")));
         }
 
         // Assume the first ResolveInfo is the one we're looking for
         ResolveInfo info = resolveInfos.get(0);
-        return info.activityInfo.applicationInfo.packageName;
+        mWifiOverlayApkPkgName = info.activityInfo.applicationInfo.packageName;
+        Log.i(TAG, "Found Wifi Resources APK at: " + mWifiOverlayApkPkgName);
+        return mWifiOverlayApkPkgName;
     }
 
     private Context getResourcesApkContext() {
         try {
-            String packageName = getWifiOverlayApkPkgName();
-            if (packageName != null) {
-                return createPackageContext(packageName, 0);
-            }
+            return createPackageContext(getWifiOverlayApkPkgName(), 0);
         } catch (PackageManager.NameNotFoundException e) {
             Log.wtf(TAG, "Failed to load resources", e);
         }
@@ -190,11 +156,4 @@
         mWifiResourcesFromApk = null;
         mWifiThemeFromApk = null;
     }
-
-    /**
-     * Returns an instance of WifiStringResourceWrapper with the given subId and carrierId.
-     */
-    public WifiStringResourceWrapper getStringResourceWrapper(int subId, int carrierId) {
-        return new WifiStringResourceWrapper(this, subId, carrierId);
-    }
 }
diff --git a/service/java/com/android/server/wifi/WifiCountryCode.java b/service/java/com/android/server/wifi/WifiCountryCode.java
index 6f40191..46c4e41 100644
--- a/service/java/com/android/server/wifi/WifiCountryCode.java
+++ b/service/java/com/android/server/wifi/WifiCountryCode.java
@@ -28,8 +28,8 @@
 import android.util.ArrayMap;
 import android.util.Log;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.util.ApConfigUtil;
 import com.android.wifi.resources.R;
 
 import java.io.FileDescriptor;
@@ -53,7 +53,7 @@
     private static final String BOOT_DEFAULT_WIFI_COUNTRY_CODE = "ro.boot.wificountrycode";
     private static final int PKT_COUNT_HIGH_PKT_PER_SEC = 16;
     private static final int DISCONNECT_WIFI_COUNT_MAX = 1;
-    private final String mWorldModeCountryCode;
+    private static final String COUNTRY_CODE_WORLD = "00";
     private final Context mContext;
     private final TelephonyManager mTelephonyManager;
     private final ActiveModeWarden mActiveModeWarden;
@@ -79,39 +79,30 @@
     private String mTelephonyCountryCode = null;
     private String mOverrideCountryCode = null;
     private String mDriverCountryCode = null;
-    private String mLastActiveDriverCountryCode = null;
-    private long mDriverCountryCodeUpdatedTimestamp = 0;
+    private String mReceivedDriverCountryCode = null;
     private String mTelephonyCountryTimestamp = null;
-    private String mAllCmmReadyTimestamp = null;
+    private String mDriverCountryTimestamp = null;
+    private String mReadyTimestamp = null;
     private int mDisconnectWifiToForceUpdateCount = 0;
 
     private class ModeChangeCallbackInternal implements ActiveModeWarden.ModeChangeCallback {
         @Override
         public void onActiveModeManagerAdded(@NonNull ActiveModeManager activeModeManager) {
-            if (activeModeManager.getRole() instanceof ActiveModeManager.ClientRole) {
+            if (activeModeManager.getRole() instanceof ActiveModeManager.ClientRole
+                    || activeModeManager instanceof SoftApManager) {
                 // Add this CMM for tracking. Interface is up and HAL is initialized at this point.
                 // If this device runs the 1.5 HAL version, use the IWifiChip.setCountryCode()
                 // to set the country code.
                 mAmmToReadyForChangeMap.put(activeModeManager, true);
                 evaluateAllCmmStateAndApplyIfAllReady();
-            } else if (activeModeManager instanceof SoftApManager) {
-                // Put SoftApManager ready for consistence behavior in mAmmToReadyForChangeMap.
-                // No need to trigger CC change because SoftApManager takes CC when starting up.
-                mAmmToReadyForChangeMap.put(activeModeManager, true);
             }
         }
 
         @Override
         public void onActiveModeManagerRemoved(@NonNull ActiveModeManager activeModeManager) {
             if (mAmmToReadyForChangeMap.remove(activeModeManager) != null) {
-                if (activeModeManager instanceof ActiveModeManager.ClientRole) {
-                    // Remove this CMM from tracking.
-                    evaluateAllCmmStateAndApplyIfAllReady();
-                }
-            }
-            if (mAmmToReadyForChangeMap.size() == 0) {
-                handleCountryCodeChanged(null);
-                Log.i(TAG, "No active mode, call onDriverCountryCodeChanged with Null");
+                // Remove this CMM from tracking.
+                evaluateAllCmmStateAndApplyIfAllReady();
             }
         }
 
@@ -155,29 +146,22 @@
     private class CountryChangeListenerInternal implements ChangeListener {
         @Override
         public void onDriverCountryCodeChanged(String country) {
-            if (TextUtils.equals(country, mLastActiveDriverCountryCode)) {
+            if (TextUtils.equals(country, mReceivedDriverCountryCode)) {
                 return;
             }
             Log.i(TAG, "Receive onDriverCountryCodeChanged " + country);
-            if (isDriverSupportedRegChangedEvent()) {
-                // CC doesn't notify listener after sending to the driver, notify the listener
-                // after we received CC changed event.
-                handleCountryCodeChanged(country);
-            }
+            mReceivedDriverCountryCode = country;
+            updateDriverCountryCodeAndNotifyListener(country);
         }
 
         @Override
         public void onSetCountryCodeSucceeded(String country) {
             Log.i(TAG, "Receive onSetCountryCodeSucceeded " + country);
-            // The country code callback might not be triggered even if the driver supports reg
-            // changed event when the maintained country code in the driver is same as set one.
-            // So notify the country code changed event to listener when the set one is same as
-            // last active one.
-            if (!SdkLevel.isAtLeastT() || !isDriverSupportedRegChangedEvent()
-                    || TextUtils.equals(country, mLastActiveDriverCountryCode)) {
-                mWifiNative.countryCodeChanged(country);
-                handleCountryCodeChanged(country);
+            // The driver country code updated, don't need to trigger again.
+            if (TextUtils.equals(country, mReceivedDriverCountryCode)) {
+                return;
             }
+            updateDriverCountryCodeAndNotifyListener(country);
         }
     }
 
@@ -197,9 +181,6 @@
         clientModeImplMonitor.registerListener(new ClientModeListenerInternal());
         mWifiNative.registerCountryCodeEventListener(new CountryChangeListenerInternal());
 
-        mWorldModeCountryCode = mContext.getResources()
-                .getString(R.string.config_wifiDriverWorldModeCountryCode);
-
         Log.d(TAG, "Default country code from system property "
                 + BOOT_DEFAULT_WIFI_COUNTRY_CODE + " is " + getOemDefaultCountryCode());
     }
@@ -228,11 +209,6 @@
      */
     public interface ChangeListener {
         /**
-         * Called when receiving new country code change pending.
-         */
-        default void onCountryCodeChangePending(@NonNull String countryCode) {};
-
-        /**
          * Called when receiving country code changed from driver.
          */
         void onDriverCountryCodeChanged(String countryCode);
@@ -248,17 +224,11 @@
         default void onSetCountryCodeSucceeded(String country) {}
     }
 
-
     /**
      * Register Country code changed listener.
      */
     public void registerListener(@NonNull ChangeListener listener) {
         mListeners.add(listener);
-        /**
-         * Always called with mDriverCountryCode even if the SDK version is lower than T.
-         * Reason: Before android S, the purpose of the internal listener is updating the supported
-         * channels, it always depends on mDriverCountryCode.
-         */
         if (mDriverCountryCode != null) {
             listener.onDriverCountryCodeChanged(mDriverCountryCode);
         }
@@ -286,17 +256,9 @@
      *
      * @return true if there are active CMM's and all are ready for country code change.
      */
-    private boolean isAllCmmReady() {
-        boolean isAnyCmmExist = false;
-        for (ActiveModeManager am : mAmmToReadyForChangeMap.keySet()) {
-            if (am instanceof ConcreteClientModeManager) {
-                isAnyCmmExist = true;
-                if (!mAmmToReadyForChangeMap.get(am)) {
-                    return false;
-                }
-            }
-        }
-        return isAnyCmmExist;
+    private boolean isReady() {
+        return !mAmmToReadyForChangeMap.isEmpty()
+                && mAmmToReadyForChangeMap.values().stream().allMatch(r -> r);
     }
 
     /**
@@ -304,12 +266,12 @@
      */
     private void evaluateAllCmmStateAndApplyIfAllReady() {
         Log.d(TAG, "evaluateAllCmmStateAndApplyIfAllReady: " + mAmmToReadyForChangeMap);
-        if (isAllCmmReady()) {
-            mAllCmmReadyTimestamp = FORMATTER.format(new Date(System.currentTimeMillis()));
+        if (isReady()) {
+            mReadyTimestamp = FORMATTER.format(new Date(System.currentTimeMillis()));
             // We are ready to set country code now.
             // We need to post pending country code request.
             initializeTelephonyCountryCodeIfNeeded();
-            updateCountryCode(true);
+            updateCountryCode();
         }
     }
 
@@ -325,12 +287,15 @@
                     + "the received country code is empty");
             return;
         }
-        // Support 00 map to device world mode country code
-        if (TextUtils.equals("00", countryCode)) {
-            countryCode = mWorldModeCountryCode;
-        }
         mOverrideCountryCode = countryCode.toUpperCase(Locale.US);
-        updateCountryCode(false);
+
+        // If wpa_supplicant is ready we set the country code now, otherwise it will be
+        // set once wpa_supplicant is ready.
+        if (isReady()) {
+            updateCountryCode();
+        } else {
+            Log.d(TAG, "skip update supplicant not ready yet");
+        }
     }
 
     /**
@@ -338,7 +303,14 @@
      */
     public synchronized void clearOverrideCountryCode() {
         mOverrideCountryCode = null;
-        updateCountryCode(false);
+
+        // If wpa_supplicant is ready we set the country code now, otherwise it will be
+        // set once wpa_supplicant is ready.
+        if (isReady()) {
+            updateCountryCode();
+        } else {
+            Log.d(TAG, "skip update supplicant not ready yet");
+        }
     }
 
     private void setTelephonyCountryCode(String countryCode) {
@@ -362,7 +334,7 @@
      * @param countryCode The country code intended to set.
      * This is supposed to be from Telephony service.
      * otherwise we think it is from other applications.
-     * @return Returns true if the country code passed in is acceptable and passed to the driver.
+     * @return Returns true if the country code passed in is acceptable.
      */
     public boolean setTelephonyCountryCodeAndUpdate(String countryCode) {
         if (TextUtils.isEmpty(countryCode)
@@ -371,16 +343,20 @@
                     + "an available CC from default active SIM");
             return false;
         }
-        // We do not check if the country code (CC) equals the current one because
-        // 1. Wpa supplicant may silently modify the country code.
-        // 2. If Wifi restarted therefore wpa_supplicant also restarted,
         setTelephonyCountryCode(countryCode);
         if (mOverrideCountryCode != null) {
-            Log.d(TAG, "Skip Telephony CC update due to override country code set");
+            Log.d(TAG, "Skip Telephony Country code update due to override country code set");
             return false;
         }
+        // If wpa_supplicant is ready we set the country code now, otherwise it will be
+        // set once wpa_supplicant is ready.
+        if (isReady()) {
+            updateCountryCode();
+        } else {
+            Log.d(TAG, "skip update supplicant not ready yet");
+            disconnectWifiToForceUpdateIfNeeded();
+        }
 
-        updateCountryCode(false);
         return true;
     }
 
@@ -399,8 +375,7 @@
     }
 
     private boolean shouldDisconnectWifiToForceUpdate() {
-        if (mTelephonyCountryCode == null
-                || mTelephonyCountryCode.equals(mDriverCountryCode)) {
+        if (mTelephonyCountryCode == null || mTelephonyCountryCode.equals(mDriverCountryCode)) {
             return false;
         }
 
@@ -409,7 +384,7 @@
         }
 
         if (mDriverCountryCode != null
-                && !mDriverCountryCode.equalsIgnoreCase(mWorldModeCountryCode)) {
+                && !mDriverCountryCode.equalsIgnoreCase(COUNTRY_CODE_WORLD)) {
             return false;
         }
 
@@ -428,13 +403,16 @@
     }
 
     /**
-     * Method to get the received driver Country Code that being used in driver.
+     * Method to get the Country Code that was sent to wpa_supplicant.
      *
-     * @return Returns the local copy of the received driver Country Code or null if
-     * there is no Country Code was received from driver or no any active mode.
+     * @return Returns the local copy of the Country Code that was sent to the driver upon
+     * setReadyForChange(true).
+     * If wpa_supplicant was never started, this may be null even if Telephony reported a valid
+     * country code.
+     * Returns null if no Country Code was sent to driver.
      */
-    @Nullable
-    public synchronized String getCurrentDriverCountryCode() {
+    @VisibleForTesting
+    public synchronized String getCountryCodeSentToDriver() {
         return mDriverCountryCode;
     }
 
@@ -464,7 +442,14 @@
         mSettingsConfigStore.put(WIFI_DEFAULT_COUNTRY_CODE,
                 countryCode.toUpperCase(Locale.US));
         Log.i(TAG, "Default country code updated in config store: " + countryCode);
-        updateCountryCode(false);
+
+        // If wpa_supplicant is ready we set the country code now, otherwise it will be
+        // set once wpa_supplicant is ready.
+        if (isReady()) {
+            updateCountryCode();
+        } else {
+            Log.d(TAG, "skip update supplicant not ready yet");
+        }
     }
 
     /**
@@ -477,27 +462,18 @@
         pw.println("DefaultCountryCode(system property): " + getOemDefaultCountryCode());
         pw.println("DefaultCountryCode(config store): "
                 + mSettingsConfigStore.get(WIFI_DEFAULT_COUNTRY_CODE));
+        pw.println("mDriverCountryCode: " + mDriverCountryCode);
         pw.println("mTelephonyCountryCode: " + mTelephonyCountryCode);
         pw.println("mTelephonyCountryTimestamp: " + mTelephonyCountryTimestamp);
         pw.println("mOverrideCountryCode: " + mOverrideCountryCode);
-        pw.println("mAllCmmReadyTimestamp: " + mAllCmmReadyTimestamp);
-        pw.println("isAllCmmReady: " + isAllCmmReady());
+        pw.println("mDriverCountryTimestamp: " + mDriverCountryTimestamp);
+        pw.println("mReadyTimestamp: " + mReadyTimestamp);
+        pw.println("isReady: " + isReady());
         pw.println("mAmmToReadyForChangeMap: " + mAmmToReadyForChangeMap);
         pw.println("mDisconnectWifiToForceUpdateCount: " + mDisconnectWifiToForceUpdateCount);
-        pw.println("mDriverCountryCode: " + mDriverCountryCode);
-        pw.println("mDriverCountryCodeUpdatedTimestamp: "
-                + (mDriverCountryCodeUpdatedTimestamp != 0
-                ? FORMATTER.format(new Date(mDriverCountryCodeUpdatedTimestamp)) : "N/A"));
-        pw.println("isDriverSupportedRegChangedEvent: "
-                + isDriverSupportedRegChangedEvent());
     }
 
-    private boolean isDriverSupportedRegChangedEvent() {
-        return mContext.getResources().getBoolean(
-                R.bool.config_wifiDriverSupportedNl80211RegChangedEvent);
-    }
-
-    private void updateCountryCode(boolean isClientModeOnly) {
+    private void updateCountryCode() {
         String country = pickCountryCode();
         Log.d(TAG, "updateCountryCode to " + country);
 
@@ -507,7 +483,7 @@
         // 2. If Wifi restarted therefore wpa_supplicant also restarted,
         // the country code could be reset to '00' by wpa_supplicant.
         if (country != null) {
-            setCountryCodeNative(country, isClientModeOnly);
+            setCountryCodeNative(country);
         }
         // We do not set country code if there is no candidate. This is reasonable
         // because wpa_supplicant usually starts with an international safe country
@@ -521,29 +497,15 @@
         if (mTelephonyCountryCode != null) {
             return mTelephonyCountryCode;
         }
-        if (mDriverCountryCode != null) {
-            // Returns driver country code since it may be different to WIFI_DEFAULT_COUNTRY_CODE
-            // when driver supported 802.11d.
-            return mDriverCountryCode;
-        }
         return mSettingsConfigStore.get(WIFI_DEFAULT_COUNTRY_CODE);
     }
 
-    private boolean setCountryCodeNative(String country, boolean isClientModeOnly) {
+    private boolean setCountryCodeNative(String country) {
         Set<ActiveModeManager> amms = mAmmToReadyForChangeMap.keySet();
         boolean isConcreteClientModeManagerUpdated = false;
         boolean anyAmmConfigured = false;
-        boolean isAllCmmReady = isAllCmmReady();
-        if (!isAllCmmReady) {
-            Log.d(TAG, "skip update supplicant not ready yet");
-            disconnectWifiToForceUpdateIfNeeded();
-        }
-        boolean isCountryCodeChanged = !TextUtils.equals(mDriverCountryCode, country);
-        Log.d(TAG, "setCountryCodeNative: " + country + ", isClientModeOnly: " + isClientModeOnly
-                + "mDriverCountryCode: " + mDriverCountryCode);
         for (ActiveModeManager am : amms) {
-            if (isAllCmmReady && !isConcreteClientModeManagerUpdated
-                    && am instanceof ConcreteClientModeManager) {
+            if (!isConcreteClientModeManagerUpdated && am instanceof ConcreteClientModeManager) {
                 // Set the country code using one of the active mode managers. Since
                 // country code is a chip level global setting, it can be set as long
                 // as there is at least one active interface to communicate to Wifi chip
@@ -556,78 +518,35 @@
                     anyAmmConfigured = true;
                     // Start from S, frameworks support country code callback from wificond,
                     // move "notify the lister" to CountryChangeListenerInternal.
-                    if (!SdkLevel.isAtLeastS() && !isDriverSupportedRegChangedEvent()) {
-                        handleCountryCodeChanged(country);
+                    if (!SdkLevel.isAtLeastS()) {
+                        updateDriverCountryCodeAndNotifyListener(country);
                     }
                 }
-            } else if (!isClientModeOnly && am instanceof SoftApManager) {
+            } else if (am instanceof SoftApManager) {
+                // The API:updateCountryCode in SoftApManager is asynchronous, it requires a new
+                // callback support in S to trigger "updateDriverCountryCodeAndNotifyListener" for
+                // the new S API: SoftApCapability#getSupportedChannelList(band).
+                // It requires:
+                // 1. a new overlay configuration which is introduced from S.
+                // 2. wificond support in S for S API: SoftApCapability#getSupportedChannelList
+                // Any case if device supported to set country code in R,
+                // the new S API: SoftApCapability#getSupportedChannelList(band) still doesn't work
+                // normally in R build when wifi disabled.
                 SoftApManager sm = (SoftApManager) am;
-                if (mDriverCountryCode == null || !isCountryCodeChanged) {
-                    // Ignore SoftApManager init country code case or country code didn't be
-                    // changed case.
-                    continue;
-                }
-                // Restart SAP only when 1. overlay enabled 2. CC is not world mode.
-                if (ApConfigUtil.isSoftApRestartRequiredWhenCountryCodeChanged(mContext)
-                        && !mDriverCountryCode.equalsIgnoreCase(mWorldModeCountryCode)) {
-                    Log.i(TAG, "restart SoftAp required because country code changed to "
-                            + country);
-                    SoftApModeConfiguration modeConfig = sm.getSoftApModeConfiguration();
-                    mActiveModeWarden.stopSoftAp(modeConfig.getTargetMode());
-                    mActiveModeWarden.startSoftAp(modeConfig, sm.getRequestorWs());
+                if (!sm.updateCountryCode(country)) {
+                    Log.d(TAG, "Can't set country code (SoftApManager) to "
+                            + country + " (Device doesn't support it)");
                 } else {
-                    // The API:updateCountryCode in SoftApManager is asynchronous, it requires a
-                    // new callback support in S to trigger "notifyListener" for
-                    // the new S API: SoftApCapability#getSupportedChannelList(band).
-                    // It requires:
-                    // 1. a new overlay configuration which is introduced from S.
-                    // 2. wificond support in S for S API: SoftApCapability#getSupportedChannelList
-                    // Any case if device supported to set country code in R,
-                    // the new S API: SoftApCapability#getSupportedChannelList(band) still doesn't
-                    // work normally in R build when wifi disabled.
-                    if (!sm.updateCountryCode(country)) {
-                        Log.d(TAG, "Can't set country code (SoftApManager) to "
-                                + country + " when SAP on (Device doesn't support runtime update)");
-                    } else {
-                        anyAmmConfigured = true;
-                    }
-                }
-            }
-        }
-        if (!anyAmmConfigured) {
-            for (ChangeListener listener : mListeners) {
-                if (country != null) {
-                    listener.onCountryCodeChangePending(country);
+                    anyAmmConfigured = true;
                 }
             }
         }
         return anyAmmConfigured;
     }
 
-    private void handleCountryCodeChanged(String country) {
-        if (!TextUtils.equals(mDriverCountryCode, country)) {
-            mDriverCountryCodeUpdatedTimestamp = System.currentTimeMillis();
-            mDriverCountryCode = country;
-            if (country !=  null) {
-                mLastActiveDriverCountryCode = country;
-            }
-            notifyListener(country);
-        }
-    }
-
-
-    /**
-     * Notify the listeners. There are two kind of listeners
-     * 1. external listener, they only care what is country code which driver is using now.
-     * 2. internal listener, frameworks also only care what is country code which driver is using
-     * now because it requires to update supported channels with new country code.
-     *
-     * Note: Call this API only after confirming the CC is used in driver.
-     *
-     * @param country the country code is used in driver or null when driver is non-active.
-     */
-    private void notifyListener(@Nullable String country) {
-        mActiveModeWarden.updateClientScanModeAfterCountryCodeUpdate(country);
+    private void updateDriverCountryCodeAndNotifyListener(String country) {
+        mDriverCountryTimestamp = FORMATTER.format(new Date(System.currentTimeMillis()));
+        mDriverCountryCode = country;
         for (ChangeListener listener : mListeners) {
             listener.onDriverCountryCodeChanged(country);
         }
diff --git a/service/java/com/android/server/wifi/WifiDataStall.java b/service/java/com/android/server/wifi/WifiDataStall.java
index 0828a1c..125acbd 100644
--- a/service/java/com/android/server/wifi/WifiDataStall.java
+++ b/service/java/com/android/server/wifi/WifiDataStall.java
@@ -25,12 +25,12 @@
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager.DeviceMobilityState;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.telephony.PhoneStateListener;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
 import android.util.Log;
 
-import com.android.modules.utils.HandlerExecutor;
 import com.android.server.wifi.ActiveModeWarden.PrimaryClientModeManagerChangedCallback;
 import com.android.server.wifi.WifiNative.ConnectionCapabilities;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiIsUnusableEvent;
@@ -61,6 +61,7 @@
     // Maximum time margin between two link layer stats for connection duration update
     public static final int MAX_TIME_MARGIN_LAST_TWO_POLLS_MS = 200;
 
+    private final FrameworkFacade mFacade;
     private final DeviceConfigFacade mDeviceConfigFacade;
     private final WifiMetrics mWifiMetrics;
     private final Context mContext;
@@ -147,10 +148,11 @@
         }
     }
 
-    public WifiDataStall(WifiMetrics wifiMetrics, Context context,
+    public WifiDataStall(FrameworkFacade facade, WifiMetrics wifiMetrics, Context context,
             DeviceConfigFacade deviceConfigFacade, WifiChannelUtilization wifiChannelUtilization,
             Clock clock, Handler handler, ThroughputPredictor throughputPredictor,
             ActiveModeWarden activeModeWarden, ClientModeImplMonitor clientModeImplMonitor) {
+        mFacade = facade;
         mDeviceConfigFacade = deviceConfigFacade;
         mWifiMetrics = wifiMetrics;
         mContext = context;
@@ -321,8 +323,7 @@
             @NonNull ConnectionCapabilities connectionCapabilities,
             @Nullable WifiLinkLayerStats oldStats,
             @Nullable WifiLinkLayerStats newStats,
-            @NonNull WifiInfo wifiInfo,
-            long txBytes, long rxBytes) {
+            @NonNull WifiInfo wifiInfo) {
         int currFrequency = wifiInfo.getFrequency();
         mWifiChannelUtilization.refreshChannelStatsAndChannelUtilization(newStats, currFrequency);
         int ccaLevel = mWifiChannelUtilization.getUtilizationRatio(currFrequency);
@@ -425,7 +426,7 @@
         mWifiMetrics.incrementThroughputKbpsCount(mTxTputKbps, mRxTputKbps, currFrequency);
 
         mIsThroughputSufficient = isThroughputSufficientInternal(mTxTputKbps, mRxTputKbps,
-                isTxTrafficHigh, isRxTrafficHigh, timeDeltaLastTwoPollsMs, txBytes, rxBytes);
+                isTxTrafficHigh, isRxTrafficHigh, timeDeltaLastTwoPollsMs);
 
         int maxTimeDeltaMs = mContext.getResources().getInteger(
                 R.integer.config_wifiPollRssiIntervalMilliseconds)
@@ -522,8 +523,9 @@
     }
 
     private boolean isThroughputSufficientInternal(int l2TxTputKbps, int l2RxTputKbps,
-            boolean isTxTrafficHigh, boolean isRxTrafficHigh, int timeDeltaLastTwoPollsMs,
-            long txBytes, long rxBytes) {
+            boolean isTxTrafficHigh, boolean isRxTrafficHigh, int timeDeltaLastTwoPollsMs) {
+        long txBytes = mFacade.getTotalTxBytes() - mFacade.getMobileTxBytes();
+        long rxBytes = mFacade.getTotalRxBytes() - mFacade.getMobileRxBytes();
         if (timeDeltaLastTwoPollsMs > MAX_MS_DELTA_FOR_DATA_STALL
                 || mLastTxBytes == 0 || mLastRxBytes == 0) {
             mLastTxBytes = txBytes;
diff --git a/service/java/com/android/server/wifi/WifiDiagnostics.java b/service/java/com/android/server/wifi/WifiDiagnostics.java
index 99f7e38..7a0977c 100644
--- a/service/java/com/android/server/wifi/WifiDiagnostics.java
+++ b/service/java/com/android/server/wifi/WifiDiagnostics.java
@@ -100,7 +100,6 @@
     public static final int REPORT_REASON_WIFINATIVE_FAILURE        = 8;
     public static final int REPORT_REASON_REACHABILITY_LOST         = 9;
     public static final int REPORT_REASON_FATAL_FW_ALERT            = 10;
-    public static final int REPORT_REASON_REACHABILITY_FAILURE      = 11;
 
     /** number of bug reports to hold */
     public static final int MAX_BUG_REPORTS                         = 4;
@@ -143,7 +142,7 @@
     private final Clock mClock;
     private final Handler mWorkerThreadHandler;
 
-    private int mHalLogLevel = VERBOSE_NO_LOG;
+    private int mLogLevel = VERBOSE_NO_LOG;
     private boolean mIsLoggingEventHandlerRegistered;
     private WifiNative.RingBufferStatus[] mRingBuffers;
     private WifiNative.RingBufferStatus mPerPacketRingBuffer;
@@ -241,7 +240,7 @@
         if (!mActiveInterfaces.isEmpty()) {
             return;
         }
-        if (mHalLogLevel != VERBOSE_NO_LOG) {
+        if (mLogLevel != VERBOSE_NO_LOG) {
             stopLoggingAllBuffers();
             mRingBuffers = null;
         }
@@ -279,7 +278,7 @@
     public void captureBugReportData(int reason) {
         final boolean verbose;
         synchronized (this) {
-            verbose = isHalVerboseLoggingEnabled();
+            verbose = isVerboseLoggingEnabled();
         }
         BugReport report = captureBugreport(reason, verbose);
         synchronized (this) {
@@ -303,7 +302,7 @@
         mWorkerThreadHandler.post(() -> {
             final boolean verbose;
             synchronized (this) {
-                verbose = isHalVerboseLoggingEnabled();
+                verbose = isVerboseLoggingEnabled();
             }
             // This is very slow, don't put this inside `synchronized(this)`!
             BugReport report = captureBugreport(errorCode, verbose);
@@ -401,8 +400,8 @@
 
             Calendar c = Calendar.getInstance();
             c.setTimeInMillis(systemTimeMs);
-            builder.append("system time = ")
-                    .append(StringUtil.calendarToString(c)).append("\n");
+            builder.append("system time = ").append(
+                    String.format("%tm-%td %tH:%tM:%tS.%tL", c, c, c, c, c, c)).append("\n");
 
             long kernelTimeMs = kernelTimeNanos/(1000*1000);
             builder.append("kernel time = ").append(kernelTimeMs/1000).append(".").append
@@ -539,17 +538,16 @@
      *
      * @param verbose - with the obvious interpretation
      */
-    public synchronized void enableVerboseLogging(boolean verboseEnabled,
-            boolean halVerboseEnabled) {
+    public synchronized void enableVerboseLogging(boolean verboseEnabled) {
         final int ringBufferByteLimitSmall = mContext.getResources().getInteger(
                 R.integer.config_wifi_logger_ring_buffer_default_size_limit_kb) * 1024;
         final int ringBufferByteLimitLarge = mContext.getResources().getInteger(
                 R.integer.config_wifi_logger_ring_buffer_verbose_size_limit_kb) * 1024;
-        if (halVerboseEnabled) {
-            mHalLogLevel = VERBOSE_LOG_WITH_WAKEUP;
+        if (verboseEnabled) {
+            mLogLevel = VERBOSE_LOG_WITH_WAKEUP;
             mMaxRingBufferSizeBytes = ringBufferByteLimitLarge;
         } else {
-            mHalLogLevel = VERBOSE_NORMAL_LOG;
+            mLogLevel = VERBOSE_NORMAL_LOG;
             mMaxRingBufferSizeBytes = enableVerboseLoggingForDogfood()
                     ? ringBufferByteLimitLarge : ringBufferByteLimitSmall;
         }
@@ -560,8 +558,8 @@
         }
     }
 
-    private boolean isHalVerboseLoggingEnabled() {
-        return mHalLogLevel > VERBOSE_NORMAL_LOG;
+    private boolean isVerboseLoggingEnabled() {
+        return mLogLevel > VERBOSE_NORMAL_LOG;
     }
 
     private void clearVerboseLogs() {
@@ -603,7 +601,7 @@
     }
 
     private void startLoggingRingBuffers() {
-        if (!isHalVerboseLoggingEnabled()) {
+        if (!isVerboseLoggingEnabled()) {
             clearVerboseLogs();
         }
         if (mRingBuffers == null) {
@@ -640,11 +638,11 @@
 
     private boolean startLoggingRingBuffer(WifiNative.RingBufferStatus buffer) {
 
-        int minInterval = MinWakeupIntervals[mHalLogLevel];
-        int minDataSize = MinBufferSizes[mHalLogLevel];
+        int minInterval = MinWakeupIntervals[mLogLevel];
+        int minDataSize = MinBufferSizes[mLogLevel];
 
-        if (!mWifiNative.startLoggingRingBuffer(
-                mHalLogLevel, 0, minInterval, minDataSize, buffer.name)) {
+        if (mWifiNative.startLoggingRingBuffer(
+                mLogLevel, 0, minInterval, minDataSize, buffer.name) == false) {
             if (DBG) mLog.warn("Could not start logging ring %").c(buffer.name).flush();
             return false;
         }
@@ -653,7 +651,7 @@
     }
 
     private boolean stopLoggingRingBuffer(WifiNative.RingBufferStatus buffer) {
-        if (!mWifiNative.startLoggingRingBuffer(0, 0, 0, 0, buffer.name)) {
+        if (mWifiNative.startLoggingRingBuffer(0, 0, 0, 0, buffer.name) == false) {
             if (DBG) mLog.warn("Could not stop logging ring %").c(buffer.name).flush();
         }
         return true;
@@ -790,9 +788,9 @@
     /** This method is thread safe */
     private ArrayList<String> getLogcat(String logcatSections, int maxLines) {
         ArrayList<String> lines = new ArrayList<>(maxLines);
-        Process process = null;
         try {
-            process = mJavaRuntime.exec("logcat -b " + logcatSections + " -t " + maxLines);
+            Process process = mJavaRuntime.exec(
+                    String.format("logcat -b %s -t %d", logcatSections, maxLines));
             readLogcatStreamLinesWithTimeout(
                     new BufferedReader(new InputStreamReader(process.getInputStream())), lines);
             readLogcatStreamLinesWithTimeout(
@@ -800,10 +798,6 @@
             process.waitFor(LOGCAT_PROC_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
         } catch (InterruptedException|IOException e) {
             mLog.dump("Exception while capturing logcat: %").c(e.toString()).flush();
-        } finally {
-            if (process != null) {
-                process.destroy();
-            }
         }
         return lines;
     }
@@ -846,9 +840,9 @@
 
     private void dumpPacketFates(PrintWriter pw) {
         dumpPacketFatesInternal(pw, "Last failed connection fates", mPacketFatesForLastFailure,
-                isHalVerboseLoggingEnabled());
+                isVerboseLoggingEnabled());
         for (PacketFates fates : fetchPacketFatesForAllClientIfaces()) {
-            dumpPacketFatesInternal(pw, "Latest fates", fates, isHalVerboseLoggingEnabled());
+            dumpPacketFatesInternal(pw, "Latest fates", fates, isVerboseLoggingEnabled());
         }
     }
 
diff --git a/service/java/com/android/server/wifi/WifiDialogManager.java b/service/java/com/android/server/wifi/WifiDialogManager.java
deleted file mode 100644
index 6832999..0000000
--- a/service/java/com/android/server/wifi/WifiDialogManager.java
+++ /dev/null
@@ -1,686 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import android.app.ActivityOptions;
-import android.content.Intent;
-import android.net.wifi.WifiContext;
-import android.net.wifi.WifiManager;
-import android.os.UserHandle;
-import android.util.ArraySet;
-import android.util.Log;
-import android.util.SparseArray;
-import android.view.Display;
-
-import androidx.annotation.AnyThread;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.VisibleForTesting;
-
-import com.android.modules.utils.build.SdkLevel;
-
-import java.util.Set;
-
-import javax.annotation.concurrent.ThreadSafe;
-
-/**
- * Class to manage launching dialogs via WifiDialog and returning the user reply.
- * All methods run on the main Wi-Fi thread runner except those annotated with @AnyThread, which can
- * run on any thread.
- */
-public class WifiDialogManager {
-    private static final String TAG = "WifiDialogManager";
-    @VisibleForTesting
-    static final String WIFI_DIALOG_ACTIVITY_CLASSNAME =
-            "com.android.wifi.dialog.WifiDialogActivity";
-
-    private boolean mVerboseLoggingEnabled;
-
-    private int mNextDialogId = 0;
-    private final Set<Integer> mActiveDialogIds = new ArraySet<>();
-    private final @NonNull SparseArray<DialogHandleInternal> mActiveDialogHandles =
-            new SparseArray<>();
-
-    private final @NonNull WifiContext mContext;
-    private final @NonNull WifiThreadRunner mWifiThreadRunner;
-
-    /**
-     * Constructs a WifiDialogManager
-     *
-     * @param context          Main Wi-Fi context.
-     * @param wifiThreadRunner Main Wi-Fi thread runner.
-     */
-    public WifiDialogManager(
-            @NonNull WifiContext context,
-            @NonNull WifiThreadRunner wifiThreadRunner) {
-        mContext = context;
-        mWifiThreadRunner = wifiThreadRunner;
-    }
-
-    /**
-     * Enables verbose logging.
-     */
-    public void enableVerboseLogging(boolean enabled) {
-        mVerboseLoggingEnabled = enabled;
-    }
-
-    private int getNextDialogId() {
-        if (mActiveDialogIds.isEmpty() || mNextDialogId == WifiManager.INVALID_DIALOG_ID) {
-            mNextDialogId = 0;
-        }
-        return mNextDialogId++;
-    }
-
-    private @Nullable Intent getBaseLaunchIntent(@WifiManager.DialogType int dialogType) {
-        Intent intent = new Intent(WifiManager.ACTION_LAUNCH_DIALOG)
-                .putExtra(WifiManager.EXTRA_DIALOG_TYPE, dialogType)
-                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-        String wifiDialogApkPkgName = mContext.getWifiDialogApkPkgName();
-        if (wifiDialogApkPkgName == null) {
-            Log.w(TAG, "Could not get WifiDialog APK package name!");
-            return null;
-        }
-        intent.setClassName(wifiDialogApkPkgName, WIFI_DIALOG_ACTIVITY_CLASSNAME);
-        return intent;
-    }
-
-    private @Nullable Intent getDismissIntent(int dialogId) {
-        Intent intent = new Intent(WifiManager.ACTION_DISMISS_DIALOG);
-        intent.putExtra(WifiManager.EXTRA_DIALOG_ID, dialogId);
-        String wifiDialogApkPkgName = mContext.getWifiDialogApkPkgName();
-        if (wifiDialogApkPkgName == null) {
-            Log.w(TAG, "Could not get WifiDialog APK package name!");
-            return null;
-        }
-        intent.setClassName(wifiDialogApkPkgName, WIFI_DIALOG_ACTIVITY_CLASSNAME);
-        return intent;
-    }
-
-    /**
-     * Handle for launching and dismissing a dialog from any thread.
-     */
-    @ThreadSafe
-    public class DialogHandle {
-        DialogHandleInternal mInternalHandle;
-        private DialogHandle(DialogHandleInternal internalHandle) {
-            mInternalHandle = internalHandle;
-        }
-
-        /**
-         * Launches the dialog.
-         */
-        @AnyThread
-        public void launchDialog() {
-            mWifiThreadRunner.post(() -> mInternalHandle.launchDialog(0));
-        }
-
-        /**
-         * Launches the dialog with a timeout before it is auto-cancelled.
-         * @param timeoutMs timeout in milliseconds before the dialog is auto-cancelled. A value <=0
-         *                  indicates no timeout.
-         */
-        @AnyThread
-        public void launchDialog(long timeoutMs) {
-            mWifiThreadRunner.post(() -> mInternalHandle.launchDialog(timeoutMs));
-
-        }
-
-        /**
-         * Dismisses the dialog. Dialogs will automatically be dismissed once the user replies, but
-         * this method may be used to dismiss unanswered dialogs that are no longer needed.
-         */
-        @AnyThread
-        public void dismissDialog() {
-            mWifiThreadRunner.post(() -> mInternalHandle.dismissDialog());
-        }
-    }
-
-    /**
-     * Internal handle for launching and dismissing a dialog on the main Wi-Fi thread runner.
-     * @see {@link DialogHandle}
-     */
-    private class DialogHandleInternal {
-        private int mDialogId = WifiManager.INVALID_DIALOG_ID;
-        private final @NonNull Intent mIntent;
-        private Runnable mTimeoutRunnable;
-        private final int mDisplayId;
-
-        DialogHandleInternal(@NonNull Intent intent, int displayId)
-                throws IllegalArgumentException {
-            if (intent == null) {
-                throw new IllegalArgumentException("Intent cannot be null!");
-            }
-            mDisplayId = displayId;
-            mIntent = intent;
-        }
-
-        /**
-         * @see {@link DialogHandle#launchDialog(long)}
-         */
-        void launchDialog(long timeoutMs) {
-            if (mDialogId != WifiManager.INVALID_DIALOG_ID) {
-                // Dialog is already active, ignore.
-                return;
-            }
-            registerDialog();
-            mIntent.putExtra(WifiManager.EXTRA_DIALOG_ID, mDialogId);
-            boolean launched = false;
-            if (SdkLevel.isAtLeastT() && mDisplayId != Display.DEFAULT_DISPLAY) {
-                try {
-                    mContext.startActivityAsUser(mIntent,
-                            ActivityOptions.makeBasic().setLaunchDisplayId(mDisplayId).toBundle(),
-                            UserHandle.CURRENT);
-                    launched = true;
-                } catch (Exception e) {
-                    Log.e(TAG, "Error startActivityAsUser - " + e);
-                }
-            }
-            if (!launched) {
-                mContext.startActivityAsUser(mIntent, UserHandle.CURRENT);
-            }
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "Launching dialog with id=" + mDialogId);
-            }
-            if (timeoutMs > 0) {
-                mTimeoutRunnable = () -> onTimeout();
-                mWifiThreadRunner.postDelayed(mTimeoutRunnable, timeoutMs);
-            }
-        }
-
-        /**
-         * Callback to run when the dialog times out.
-         */
-        void onTimeout() {
-            dismissDialog();
-        }
-
-        /**
-         * @see {@link DialogHandle#dismissDialog()}
-         */
-        void dismissDialog() {
-            if (mDialogId == WifiManager.INVALID_DIALOG_ID) {
-                // Dialog is not active, ignore.
-                return;
-            }
-            Intent dismissIntent = getDismissIntent(mDialogId);
-            if (dismissIntent == null) {
-                Log.e(TAG, "Could not create intent for dismissing dialog with id: "
-                        + mDialogId);
-                return;
-            }
-            mContext.startActivityAsUser(dismissIntent, UserHandle.CURRENT);
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "Dismissing dialog with id=" + mDialogId);
-            }
-            unregisterDialog();
-        }
-
-        /**
-         * Assigns a dialog id to the dialog and registers it as an active dialog.
-         */
-        void registerDialog() {
-            if (mDialogId != WifiManager.INVALID_DIALOG_ID) {
-                // Already registered.
-                return;
-            }
-            mDialogId = getNextDialogId();
-            mActiveDialogIds.add(mDialogId);
-            mActiveDialogHandles.put(mDialogId, this);
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "Registered dialog with id=" + mDialogId);
-            }
-        }
-
-        /**
-         * Unregisters the dialog as an active dialog and removes its dialog id.
-         * This should be called after a dialog is replied to or dismissed.
-         */
-        void unregisterDialog() {
-            if (mDialogId == WifiManager.INVALID_DIALOG_ID) {
-                // Already unregistered.
-                return;
-            }
-            if (mTimeoutRunnable != null) {
-                mWifiThreadRunner.removeCallbacks(mTimeoutRunnable);
-            }
-            mTimeoutRunnable = null;
-            mActiveDialogIds.remove(mDialogId);
-            mActiveDialogHandles.remove(mDialogId);
-            mDialogId = WifiManager.INVALID_DIALOG_ID;
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "Unregistered dialog with id=" + mDialogId);
-            }
-        }
-    }
-
-    private class SimpleDialogHandle extends DialogHandleInternal {
-        private @NonNull SimpleDialogCallback mCallback;
-        private @NonNull WifiThreadRunner mCallbackThreadRunner;
-
-        SimpleDialogHandle(
-                final String title,
-                final String message,
-                final String messageUrl,
-                final int messageUrlStart,
-                final int messageUrlEnd,
-                final String positiveButtonText,
-                final String negativeButtonText,
-                final String neutralButtonText,
-                @NonNull SimpleDialogCallback callback,
-                @NonNull WifiThreadRunner callbackThreadRunner) throws IllegalArgumentException {
-            super(getBaseLaunchIntent(WifiManager.DIALOG_TYPE_SIMPLE)
-                    .putExtra(WifiManager.EXTRA_DIALOG_TITLE, title)
-                    .putExtra(WifiManager.EXTRA_DIALOG_MESSAGE, message)
-                    .putExtra(WifiManager.EXTRA_DIALOG_MESSAGE_URL, messageUrl)
-                    .putExtra(WifiManager.EXTRA_DIALOG_MESSAGE_URL_START, messageUrlStart)
-                    .putExtra(WifiManager.EXTRA_DIALOG_MESSAGE_URL_END, messageUrlEnd)
-                    .putExtra(WifiManager.EXTRA_DIALOG_POSITIVE_BUTTON_TEXT, positiveButtonText)
-                    .putExtra(WifiManager.EXTRA_DIALOG_NEGATIVE_BUTTON_TEXT, negativeButtonText)
-                    .putExtra(WifiManager.EXTRA_DIALOG_NEUTRAL_BUTTON_TEXT, neutralButtonText),
-                    Display.DEFAULT_DISPLAY);
-            if (messageUrl != null) {
-                if (message == null) {
-                    throw new IllegalArgumentException("Cannot set span for null message!");
-                }
-                if (messageUrlStart < 0) {
-                    throw new IllegalArgumentException("Span start cannot be less than 0!");
-                }
-                if (messageUrlEnd > message.length()) {
-                    throw new IllegalArgumentException("Span end index " + messageUrlEnd
-                            + " cannot be greater than message length " + message.length() + "!");
-                }
-            }
-            if (callback == null) {
-                throw new IllegalArgumentException("Callback cannot be null!");
-            }
-            if (callbackThreadRunner == null) {
-                throw new IllegalArgumentException("Callback thread runner cannot be null!");
-            }
-            mCallback = callback;
-            mCallbackThreadRunner = callbackThreadRunner;
-        }
-
-        void notifyOnPositiveButtonClicked() {
-            mCallbackThreadRunner.post(() -> mCallback.onPositiveButtonClicked());
-            unregisterDialog();
-        }
-
-        void notifyOnNegativeButtonClicked() {
-            mCallbackThreadRunner.post(() -> mCallback.onNegativeButtonClicked());
-            unregisterDialog();
-        }
-
-        void notifyOnNeutralButtonClicked() {
-            mCallbackThreadRunner.post(() -> mCallback.onNeutralButtonClicked());
-            unregisterDialog();
-        }
-
-        void notifyOnCancelled() {
-            mCallbackThreadRunner.post(() -> mCallback.onCancelled());
-            unregisterDialog();
-        }
-
-        @Override
-        void onTimeout() {
-            dismissDialog();
-            notifyOnCancelled();
-        }
-    }
-
-    /**
-     * Callback for receiving simple dialog responses.
-     */
-    public interface SimpleDialogCallback {
-        /**
-         * The positive button was clicked.
-         */
-        void onPositiveButtonClicked();
-
-        /**
-         * The negative button was clicked.
-         */
-        void onNegativeButtonClicked();
-
-        /**
-         * The neutral button was clicked.
-         */
-        void onNeutralButtonClicked();
-
-        /**
-         * The dialog was cancelled (back button or home button or timeout).
-         */
-        void onCancelled();
-    }
-
-    /**
-     * Creates a simple dialog with optional title, message, and positive/negative/neutral buttons.
-     *
-     * @param title                Title of the dialog.
-     * @param message              Message of the dialog.
-     * @param positiveButtonText   Text of the positive button or {@code null} for no button.
-     * @param negativeButtonText   Text of the negative button or {@code null} for no button.
-     * @param neutralButtonText    Text of the neutral button or {@code null} for no button.
-     * @param callback             Callback to receive the dialog response.
-     * @param callbackThreadRunner WifiThreadRunner to run the callback on.
-     * @return DialogHandle        Handle for the dialog, or {@code null} if no dialog could
-     *                             be created.
-     */
-    @AnyThread
-    @Nullable
-    public DialogHandle createSimpleDialog(
-            @Nullable String title,
-            @Nullable String message,
-            @Nullable String positiveButtonText,
-            @Nullable String negativeButtonText,
-            @Nullable String neutralButtonText,
-            @NonNull SimpleDialogCallback callback,
-            @NonNull WifiThreadRunner callbackThreadRunner) {
-        try {
-            return new DialogHandle(
-                    new SimpleDialogHandle(
-                            title,
-                            message,
-                            null /* messageUrl */,
-                            0 /* messageUrlStart */,
-                            0 /* messageUrlEnd */,
-                            positiveButtonText,
-                            negativeButtonText,
-                            neutralButtonText,
-                            callback,
-                            callbackThreadRunner)
-            );
-        } catch (IllegalArgumentException e) {
-            Log.e(TAG, "Could not create DialogHandle for simple dialog: " + e);
-            return null;
-        }
-    }
-
-    /**
-     * Creates a simple dialog with a URL embedded in the message.
-     *
-     * @param title                Title of the dialog.
-     * @param message              Message of the dialog.
-     * @param messageUrl           URL to embed in the message. If non-null, then message must also
-     *                             be non-null.
-     * @param messageUrlStart      Start index (inclusive) of the URL in the message. Must be
-     *                             non-negative.
-     * @param messageUrlEnd        End index (exclusive) of the URL in the message. Must be less
-     *                             than the length of message.
-     * @param positiveButtonText   Text of the positive button or {@code null} for no button.
-     * @param negativeButtonText   Text of the negative button or {@code null} for no button.
-     * @param neutralButtonText    Text of the neutral button or {@code null} for no button.
-     * @param callback             Callback to receive the dialog response.
-     * @param callbackThreadRunner WifiThreadRunner to run the callback on.
-     * @return DialogHandle        Handle for the dialog, or {@code null} if no dialog could
-     *                             be created.
-     */
-    @AnyThread
-    @Nullable
-    public DialogHandle createSimpleDialogWithUrl(
-            @Nullable String title,
-            @Nullable String message,
-            @Nullable String messageUrl,
-            int messageUrlStart,
-            int messageUrlEnd,
-            @Nullable String positiveButtonText,
-            @Nullable String negativeButtonText,
-            @Nullable String neutralButtonText,
-            @NonNull SimpleDialogCallback callback,
-            @NonNull WifiThreadRunner callbackThreadRunner) {
-        try {
-            return new DialogHandle(
-                    new SimpleDialogHandle(
-                            title,
-                            message,
-                            messageUrl,
-                            messageUrlStart,
-                            messageUrlEnd,
-                            positiveButtonText,
-                            negativeButtonText,
-                            neutralButtonText,
-                            callback,
-                            callbackThreadRunner)
-            );
-        } catch (IllegalArgumentException e) {
-            Log.e(TAG, "Could not create DialogHandle for simple dialog: " + e);
-            return null;
-        }
-    }
-
-    /**
-     * Returns the reply to a simple dialog to the callback of matching dialogId.
-     * @param dialogId id of the replying dialog.
-     * @param reply    reply of the dialog.
-     */
-    public void replyToSimpleDialog(int dialogId, @WifiManager.DialogReply int reply) {
-        if (mVerboseLoggingEnabled) {
-            Log.i(TAG, "Response received for simple dialog. id=" + dialogId + " reply=" + reply);
-        }
-        DialogHandleInternal internalHandle = mActiveDialogHandles.get(dialogId);
-        if (internalHandle == null) {
-            if (mVerboseLoggingEnabled) {
-                Log.w(TAG, "No matching dialog handle for simple dialog id=" + dialogId);
-            }
-            return;
-        }
-        if (!(internalHandle instanceof SimpleDialogHandle)) {
-            if (mVerboseLoggingEnabled) {
-                Log.w(TAG, "Dialog handle with id " + dialogId + " is not for a simple dialog.");
-            }
-            return;
-        }
-        switch (reply) {
-            case WifiManager.DIALOG_REPLY_POSITIVE:
-                ((SimpleDialogHandle) internalHandle).notifyOnPositiveButtonClicked();
-                break;
-            case WifiManager.DIALOG_REPLY_NEGATIVE:
-                ((SimpleDialogHandle) internalHandle).notifyOnNegativeButtonClicked();
-                break;
-            case WifiManager.DIALOG_REPLY_NEUTRAL:
-                ((SimpleDialogHandle) internalHandle).notifyOnNeutralButtonClicked();
-                break;
-            case WifiManager.DIALOG_REPLY_CANCELLED:
-                ((SimpleDialogHandle) internalHandle).notifyOnCancelled();
-                break;
-            default:
-                if (mVerboseLoggingEnabled) {
-                    Log.w(TAG, "Received invalid reply=" + reply);
-                }
-        }
-    }
-
-    private class P2pInvitationReceivedDialogHandle extends DialogHandleInternal {
-        private @NonNull P2pInvitationReceivedDialogCallback mCallback;
-        private @NonNull WifiThreadRunner mCallbackThreadRunner;
-
-        P2pInvitationReceivedDialogHandle(
-                final @NonNull String deviceName,
-                final boolean isPinRequested,
-                @Nullable String displayPin,
-                int displayId,
-                @NonNull P2pInvitationReceivedDialogCallback callback,
-                @NonNull WifiThreadRunner callbackThreadRunner) throws IllegalArgumentException {
-            super(getBaseLaunchIntent(WifiManager.DIALOG_TYPE_P2P_INVITATION_RECEIVED)
-                    .putExtra(WifiManager.EXTRA_P2P_DEVICE_NAME, deviceName)
-                    .putExtra(WifiManager.EXTRA_P2P_PIN_REQUESTED, isPinRequested)
-                    .putExtra(WifiManager.EXTRA_P2P_DISPLAY_PIN, displayPin), displayId);
-            if (deviceName == null) {
-                throw new IllegalArgumentException("Device name cannot be null!");
-            }
-            if (callback == null) {
-                throw new IllegalArgumentException("Callback cannot be null!");
-            }
-            if (callbackThreadRunner == null) {
-                throw new IllegalArgumentException("Callback thread runner cannot be null!");
-            }
-            mCallback = callback;
-            mCallbackThreadRunner = callbackThreadRunner;
-        }
-
-        void notifyOnAccepted(@Nullable String optionalPin) {
-            mCallbackThreadRunner.post(() -> mCallback.onAccepted(optionalPin));
-            unregisterDialog();
-        }
-
-        void notifyOnDeclined() {
-            mCallbackThreadRunner.post(() -> mCallback.onDeclined());
-            unregisterDialog();
-        }
-
-        @Override
-        void onTimeout() {
-            dismissDialog();
-            notifyOnDeclined();
-        }
-    }
-
-    /**
-     * Callback for receiving P2P Invitation Received dialog responses.
-     */
-    public interface P2pInvitationReceivedDialogCallback {
-        /**
-         * Invitation was accepted.
-         *
-         * @param optionalPin Optional PIN if a PIN was requested, or {@code null} otherwise.
-         */
-        void onAccepted(@Nullable String optionalPin);
-
-        /**
-         * Invitation was declined or cancelled (back button or home button or timeout).
-         */
-        void onDeclined();
-    }
-
-    /**
-     * Creates a P2P Invitation Received dialog.
-     *
-     * @param deviceName           Name of the device sending the invitation.
-     * @param isPinRequested       True if a PIN was requested and a PIN input UI should be shown.
-     * @param displayPin           Display PIN, or {@code null} if no PIN should be displayed
-     * @param displayId            The ID of the Display on which to place the dialog
-     *                             (Display.DEFAULT_DISPLAY
-     *                             refers to the default display)
-     * @param callback             Callback to receive the dialog response.
-     * @param callbackThreadRunner WifiThreadRunner to run the callback on.
-     * @return DialogHandle        Handle for the dialog, or {@code null} if no dialog could
-     *                             be created.
-     */
-    @AnyThread
-    public DialogHandle createP2pInvitationReceivedDialog(
-            @NonNull String deviceName,
-            boolean isPinRequested,
-            @Nullable String displayPin,
-            int displayId,
-            @NonNull P2pInvitationReceivedDialogCallback callback,
-            @NonNull WifiThreadRunner callbackThreadRunner) {
-        try {
-            return new DialogHandle(
-                    new P2pInvitationReceivedDialogHandle(
-                            deviceName,
-                            isPinRequested,
-                            displayPin,
-                            displayId,
-                            callback,
-                            callbackThreadRunner)
-            );
-        } catch (IllegalArgumentException e) {
-            Log.e(TAG, "Could not create DialogHandle for P2P Invitation Received dialog: " + e);
-            return null;
-        }
-    }
-
-    /**
-     * Returns the reply to a P2P Invitation Received dialog to the callback of matching dialogId.
-     * Note: Must be invoked only from the main Wi-Fi thread.
-     *
-     * @param dialogId    id of the replying dialog.
-     * @param accepted    Whether the invitation was accepted.
-     * @param optionalPin PIN of the reply, or {@code null} if none was supplied.
-     */
-    public void replyToP2pInvitationReceivedDialog(
-            int dialogId,
-            boolean accepted,
-            @Nullable String optionalPin) {
-        if (mVerboseLoggingEnabled) {
-            Log.i(TAG, "Response received for P2P Invitation Received dialog."
-                    + " id=" + dialogId
-                    + " accepted=" + accepted
-                    + " pin=" + optionalPin);
-        }
-        DialogHandleInternal internalHandle = mActiveDialogHandles.get(dialogId);
-        if (internalHandle == null) {
-            if (mVerboseLoggingEnabled) {
-                Log.w(TAG, "No matching dialog handle for P2P Invitation Received dialog"
-                        + " id=" + dialogId);
-            }
-            return;
-        }
-        if (!(internalHandle instanceof P2pInvitationReceivedDialogHandle)) {
-            if (mVerboseLoggingEnabled) {
-                Log.w(TAG, "Dialog handle with id " + dialogId
-                        + " is not for a P2P Invitation Received dialog.");
-            }
-            return;
-        }
-        if (accepted) {
-            ((P2pInvitationReceivedDialogHandle) internalHandle).notifyOnAccepted(optionalPin);
-        } else {
-            ((P2pInvitationReceivedDialogHandle) internalHandle).notifyOnDeclined();
-        }
-    }
-
-    private class P2pInvitationSentDialogHandle extends DialogHandleInternal {
-        P2pInvitationSentDialogHandle(
-                final @NonNull String deviceName,
-                final @NonNull String displayPin,
-                int displayId) throws IllegalArgumentException {
-            super(getBaseLaunchIntent(WifiManager.DIALOG_TYPE_P2P_INVITATION_SENT)
-                    .putExtra(WifiManager.EXTRA_P2P_DEVICE_NAME, deviceName)
-                    .putExtra(WifiManager.EXTRA_P2P_DISPLAY_PIN, displayPin),
-                    displayId);
-            if (deviceName == null) {
-                throw new IllegalArgumentException("Device name cannot be null!");
-            }
-            if (displayPin == null) {
-                throw new IllegalArgumentException("Display PIN cannot be null!");
-            }
-        }
-    }
-
-    /**
-     * Creates a P2P Invitation Sent dialog.
-     *
-     * @param deviceName           Name of the device the invitation was sent to.
-     * @param displayPin           display PIN
-     * @param displayId            display ID
-     * @return DialogHandle        Handle for the dialog, or {@code null} if no dialog could
-     *                             be created.
-     */
-    @AnyThread
-    public DialogHandle createP2pInvitationSentDialog(
-            @NonNull String deviceName,
-            @Nullable String displayPin,
-            int displayId) {
-        try {
-            return new DialogHandle(new P2pInvitationSentDialogHandle(deviceName, displayPin,
-                    displayId));
-        } catch (IllegalArgumentException e) {
-            Log.e(TAG, "Could not create DialogHandle for P2P Invitation Sent dialog: " + e);
-            return null;
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/WifiGlobals.java b/service/java/com/android/server/wifi/WifiGlobals.java
index 85cc4b6..a503b68 100644
--- a/service/java/com/android/server/wifi/WifiGlobals.java
+++ b/service/java/com/android/server/wifi/WifiGlobals.java
@@ -62,12 +62,8 @@
     private final int mP2pDeviceNamePostfixNumDigits;
     // This is read from the overlay, cache it after boot up.
     private final int mClientModeImplNumLogRecs;
-    // This is read from the overlay, cache it after boot up.
-    private final boolean mSaveFactoryMacToConfigStoreEnabled;
     private final int mWifiLowConnectedScoreThresholdToTriggerScanForMbb;
     private final int mWifiLowConnectedScoreScanPeriodSeconds;
-    // This is read from the overlay, cache it after boot up.
-    private final boolean mWifiAllowInsecureEnterpriseConfiguration;
 
     // This is set by WifiManager#setVerboseLoggingEnabled(int).
     private boolean mIsShowKeyVerboseLoggingModeEnabled = false;
@@ -92,14 +88,10 @@
                 .getInteger(R.integer.config_wifiP2pDeviceNamePostfixNumDigits);
         mClientModeImplNumLogRecs = mContext.getResources()
                 .getInteger(R.integer.config_wifiClientModeImplNumLogRecs);
-        mSaveFactoryMacToConfigStoreEnabled = mContext.getResources()
-                .getBoolean(R.bool.config_wifiSaveFactoryMacToWifiConfigStore);
         mWifiLowConnectedScoreThresholdToTriggerScanForMbb = mContext.getResources().getInteger(
                 R.integer.config_wifiLowConnectedScoreThresholdToTriggerScanForMbb);
         mWifiLowConnectedScoreScanPeriodSeconds = mContext.getResources().getInteger(
                 R.integer.config_wifiLowConnectedScoreScanPeriodSeconds);
-        mWifiAllowInsecureEnterpriseConfiguration = mContext.getResources().getBoolean(
-                R.bool.config_wifiAllowInsecureEnterpriseConfigurationsForSettingsAndSUW);
     }
 
     /** Get the interval between RSSI polls, in milliseconds. */
@@ -242,11 +234,6 @@
         return mClientModeImplNumLogRecs;
     }
 
-    /** Get whether to use the saved factory MAC address when available **/
-    public boolean isSaveFactoryMacToConfigStoreEnabled() {
-        return mSaveFactoryMacToConfigStoreEnabled;
-    }
-
     /** Get the low score threshold to do scan for MBB when external scorer is not used. **/
     public int getWifiLowConnectedScoreThresholdToTriggerScanForMbb() {
         return mWifiLowConnectedScoreThresholdToTriggerScanForMbb;
@@ -257,11 +244,6 @@
         return mWifiLowConnectedScoreScanPeriodSeconds;
     }
 
-    /** Get whether or not insecure enterprise configuration is allowed. */
-    public boolean isInsecureEnterpriseConfigurationAllowed() {
-        return mWifiAllowInsecureEnterpriseConfiguration;
-    }
-
     /** Dump method for debugging */
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.println("Dump of WifiGlobals");
@@ -276,14 +258,11 @@
         pw.println("mP2pDeviceNamePrefix=" + mP2pDeviceNamePrefix);
         pw.println("mP2pDeviceNamePostfixNumDigits=" + mP2pDeviceNamePostfixNumDigits);
         pw.println("mClientModeImplNumLogRecs=" + mClientModeImplNumLogRecs);
-        pw.println("mSaveFactoryMacToConfigStoreEnabled=" + mSaveFactoryMacToConfigStoreEnabled);
         pw.println("mWifiLowConnectedScoreThresholdToTriggerScanForMbb="
                 + mWifiLowConnectedScoreThresholdToTriggerScanForMbb);
         pw.println("mWifiLowConnectedScoreScanPeriodSeconds="
                 + mWifiLowConnectedScoreScanPeriodSeconds);
         pw.println("mIsUsingExternalScorer="
                 + mIsUsingExternalScorer);
-        pw.println("mWifiAllowInsecureEnterpriseConfiguratio"
-                + mWifiAllowInsecureEnterpriseConfiguration);
     }
 }
diff --git a/service/java/com/android/server/wifi/WifiHealthMonitor.java b/service/java/com/android/server/wifi/WifiHealthMonitor.java
index 8c56b12..011099a 100644
--- a/service/java/com/android/server/wifi/WifiHealthMonitor.java
+++ b/service/java/com/android/server/wifi/WifiHealthMonitor.java
@@ -45,6 +45,7 @@
 import com.android.server.wifi.proto.WifiStatsLog;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.HealthMonitorFailureStats;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.HealthMonitorMetrics;
+import com.android.server.wifi.util.ScanResultUtil;
 
 import com.google.protobuf.InvalidProtocolBufferException;
 
@@ -163,9 +164,8 @@
         mDeviceConfigFacade = deviceConfigFacade;
         mActiveModeWarden = activeModeWarden;
         mWifiSystemInfoStats = new WifiSystemInfoStats(l2KeySeed);
+        mWifiConfigManager.addOnNetworkUpdateListener(new OnNetworkUpdateListener());
         mActiveModeWarden.registerModeChangeCallback(new ModeChangeCallback());
-        mHandler.postAtFrontOfQueue(() -> mWifiConfigManager
-                .addOnNetworkUpdateListener(new OnNetworkUpdateListener()));
     }
 
     /**
@@ -1094,7 +1094,7 @@
             if (!mWifiEnabled) {
                 return;
             }
-            mScanDetails.add(new ScanDetail(fullScanResult));
+            mScanDetails.add(ScanResultUtil.toScanDetail(fullScanResult));
         }
     }
 }
diff --git a/service/java/com/android/server/wifi/WifiInjector.java b/service/java/com/android/server/wifi/WifiInjector.java
index 4dcbed9..63f194f 100644
--- a/service/java/com/android/server/wifi/WifiInjector.java
+++ b/service/java/com/android/server/wifi/WifiInjector.java
@@ -21,20 +21,20 @@
 import android.app.ActivityManager;
 import android.app.AlarmManager;
 import android.app.AppOpsManager;
-import android.app.BroadcastOptions;
 import android.content.Context;
 import android.net.IpMemoryStore;
 import android.net.LinkProperties;
 import android.net.MatchAllNetworkSpecifier;
 import android.net.NetworkAgentConfig;
 import android.net.NetworkCapabilities;
+import android.net.NetworkKey;
 import android.net.NetworkProvider;
-import android.net.wifi.WifiContext;
+import android.net.NetworkScoreManager;
 import android.net.wifi.WifiScanner;
 import android.net.wifi.nl80211.WifiNl80211Manager;
-import android.os.BatteryManager;
 import android.os.BatteryStatsManager;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.os.HandlerThread;
 import android.os.Looper;
 import android.os.Process;
@@ -69,9 +69,6 @@
 import com.android.server.wifi.util.WorkSourceHelper;
 import com.android.wifi.resources.R;
 
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
 import java.security.KeyStore;
 import java.security.KeyStoreException;
 import java.security.NoSuchProviderException;
@@ -130,11 +127,6 @@
     private static final NetworkCapabilities OEM_NETWORK_CAPABILITIES_FILTER =
             makeOemNetworkCapatibilitiesFilter();
 
-    private static final NetworkCapabilities RESTRICTED_NETWORK_CAPABILITIES_FILTER =
-            makeBaseNetworkCapatibilitiesFilterBuilder()
-                    .removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED)
-                    .build();
-
 
     static WifiInjector sWifiInjector = null;
 
@@ -181,10 +173,12 @@
     private final WifiConfigManager mWifiConfigManager;
     private final WifiConnectivityHelper mWifiConnectivityHelper;
     private final LocalLog mConnectivityLocalLog;
-    private final ThroughputScorer mThroughputScorer;
     private final WifiNetworkSelector mWifiNetworkSelector;
     private final SavedNetworkNominator mSavedNetworkNominator;
     private final NetworkSuggestionNominator mNetworkSuggestionNominator;
+    private final ScoredNetworkNominator mScoredNetworkNominator;
+    private final WifiNetworkScoreCache mWifiNetworkScoreCache;
+    private final NetworkScoreManager mNetworkScoreManager;
     private final ClientModeManagerBroadcastQueue mBroadcastQueue;
     private WifiScanner mWifiScanner;
     private final WifiPermissionsWrapper mWifiPermissionsWrapper;
@@ -223,14 +217,11 @@
     private final SettingsMigrationDataHolder mSettingsMigrationDataHolder;
     private final LruConnectionTracker mLruConnectionTracker;
     private final WifiConnectivityManager mWifiConnectivityManager;
-    private final ExternalPnoScanRequestManager mExternalPnoScanRequestManager;
     private final ConnectHelper mConnectHelper;
     private final ConnectionFailureNotifier mConnectionFailureNotifier;
     private final WifiNetworkFactory mWifiNetworkFactory;
     private final UntrustedWifiNetworkFactory mUntrustedWifiNetworkFactory;
     private final OemWifiNetworkFactory mOemWifiNetworkFactory;
-    private final RestrictedWifiNetworkFactory mRestrictedWifiNetworkFactory;
-    private final MultiInternetWifiNetworkFactory mMultiInternetWifiNetworkFactory;
     private final WifiP2pConnection mWifiP2pConnection;
     private final WifiGlobals mWifiGlobals;
     private final SimRequiredNotifier mSimRequiredNotifier;
@@ -238,13 +229,10 @@
     private final AdaptiveConnectivityEnabledSettingObserver
             mAdaptiveConnectivityEnabledSettingObserver;
     private final MakeBeforeBreakManager mMakeBeforeBreakManager;
-    private final MultiInternetManager mMultiInternetManager;
     private final ClientModeImplMonitor mCmiMonitor = new ClientModeImplMonitor();
     private final ExternalScoreUpdateObserverProxy mExternalScoreUpdateObserverProxy;
     private final WifiNotificationManager mWifiNotificationManager;
     private final LastCallerInfoManager mLastCallerInfoManager;
-    private final InterfaceConflictManager mInterfaceConflictManager;
-    @NonNull private final WifiDialogManager mWifiDialogManager;
 
     public WifiInjector(WifiContext context) {
         if (context == null) {
@@ -277,6 +265,11 @@
                 mContext, mFrameworkFacade);
         mBatteryStats = context.getSystemService(BatteryStatsManager.class);
         mWifiPermissionsWrapper = new WifiPermissionsWrapper(mContext);
+        mNetworkScoreManager = mContext.getSystemService(NetworkScoreManager.class);
+        mWifiNetworkScoreCache = new WifiNetworkScoreCache(mContext);
+        mNetworkScoreManager.registerNetworkScoreCallback(NetworkKey.TYPE_WIFI,
+                NetworkScoreManager.SCORE_FILTER_NONE,
+                new HandlerExecutor(wifiHandler), mWifiNetworkScoreCache);
         mUserManager = mContext.getSystemService(UserManager.class);
         mWifiPermissionsUtil = new WifiPermissionsUtil(mWifiPermissionsWrapper, mContext,
                 mUserManager, this);
@@ -284,7 +277,6 @@
         mSoftApBackupRestore = new SoftApBackupRestore(mContext, mSettingsMigrationDataHolder);
         mWifiStateTracker = new WifiStateTracker(mBatteryStats);
         mWifiThreadRunner = new WifiThreadRunner(wifiHandler);
-        mWifiDialogManager = new WifiDialogManager(mContext, mWifiThreadRunner);
         mWifiP2pServiceHandlerThread = new HandlerThread("WifiP2pService");
         mWifiP2pServiceHandlerThread.start();
         mPasspointProvisionerHandlerThread =
@@ -303,9 +295,7 @@
                 new AdaptiveConnectivityEnabledSettingObserver(wifiHandler, mWifiMetrics,
                         mFrameworkFacade, mContext);
         // Modules interacting with Native.
-        mHalDeviceManager = new HalDeviceManager(mContext, mClock, this, wifiHandler);
-        mInterfaceConflictManager = new InterfaceConflictManager(mContext, mFrameworkFacade,
-                mHalDeviceManager, mWifiThreadRunner, mWifiDialogManager);
+        mHalDeviceManager = new HalDeviceManager(mClock, this, wifiHandler);
         mWifiVendorHal = new WifiVendorHal(mContext, mHalDeviceManager, wifiHandler, mWifiGlobals);
         mSupplicantStaIfaceHal = new SupplicantStaIfaceHal(
                 mContext, mWifiMonitor, mFrameworkFacade, wifiHandler, mClock, mWifiMetrics,
@@ -318,7 +308,7 @@
                 mWifiMonitor, mPropertyService, mWifiMetrics,
                 wifiHandler, new Random(), mBuildProperties, this);
         mWifiP2pMonitor = new WifiP2pMonitor();
-        mSupplicantP2pIfaceHal = new SupplicantP2pIfaceHal(mWifiP2pMonitor, mWifiGlobals);
+        mSupplicantP2pIfaceHal = new SupplicantP2pIfaceHal(mWifiP2pMonitor);
         mWifiP2pNative = new WifiP2pNative(mWifiCondManager, mWifiNative,
                 mWifiVendorHal, mSupplicantP2pIfaceHal, mHalDeviceManager, mPropertyService);
         SubscriptionManager subscriptionManager =
@@ -350,7 +340,7 @@
                 mWifiConfigStore, wifiHandler, mWifiMetrics, mClock);
         String l2KeySeed = Secure.getString(mContext.getContentResolver(), Secure.ANDROID_ID);
         mWifiScoreCard = new WifiScoreCard(mClock, l2KeySeed, mDeviceConfigFacade,
-                mContext);
+                mFrameworkFacade, mContext);
         mWifiMetrics.setWifiScoreCard(mWifiScoreCard);
         mLruConnectionTracker = new LruConnectionTracker(MAX_RECENTLY_CONNECTED_NETWORK,
                 mContext);
@@ -371,14 +361,17 @@
         mWifiBlocklistMonitor = new WifiBlocklistMonitor(mContext, mWifiConnectivityHelper,
                 mWifiLastResortWatchdog, mClock, new LocalLog(
                 mContext.getSystemService(ActivityManager.class).isLowRamDevice() ? 128 : 256),
-                mWifiScoreCard, mScoringParams, mWifiMetrics, mWifiPermissionsUtil);
+                mWifiScoreCard, mScoringParams, mWifiMetrics);
         mWifiMetrics.setWifiBlocklistMonitor(mWifiBlocklistMonitor);
         // Config Manager
-        mWifiConfigManager = new WifiConfigManager(mContext, mWifiKeyStore, mWifiConfigStore,
+        mWifiConfigManager = new WifiConfigManager(mContext, mClock,
+                mUserManager, mWifiCarrierInfoManager,
+                mWifiKeyStore, mWifiConfigStore, mWifiPermissionsUtil,
+                mMacAddressUtil, mWifiMetrics, mWifiBlocklistMonitor, mWifiLastResortWatchdog,
                 new NetworkListSharedStoreData(mContext),
                 new NetworkListUserStoreData(mContext),
-                new RandomizedMacStoreData(),
-                mLruConnectionTracker, this);
+                new RandomizedMacStoreData(), mFrameworkFacade, mDeviceConfigFacade,
+                mWifiScoreCard, mLruConnectionTracker, mBuildProperties);
         mSettingsConfigStore = new WifiSettingsConfigStore(context, wifiHandler,
                 mSettingsMigrationDataHolder, mWifiConfigManager, mWifiConfigStore);
         mSettingsStore = new WifiSettingsStore(mContext, mSettingsConfigStore);
@@ -404,8 +397,8 @@
         mWifiNetworkSelector.registerCandidateScorer(scoreCardBasedScorer);
         BubbleFunScorer bubbleFunScorer = new BubbleFunScorer(mScoringParams);
         mWifiNetworkSelector.registerCandidateScorer(bubbleFunScorer);
-        mThroughputScorer = new ThroughputScorer(mScoringParams);
-        mWifiNetworkSelector.registerCandidateScorer(mThroughputScorer);
+        ThroughputScorer throughputScorer = new ThroughputScorer(mScoringParams);
+        mWifiNetworkSelector.registerCandidateScorer(throughputScorer);
         mWifiMetrics.setWifiNetworkSelector(mWifiNetworkSelector);
         mWifiNetworkSuggestionsManager = new WifiNetworkSuggestionsManager(mContext, wifiHandler,
                 this, mWifiPermissionsUtil, mWifiConfigManager, mWifiConfigStore, mWifiMetrics,
@@ -413,11 +406,11 @@
                 mClock);
         mPasspointManager = new PasspointManager(mContext, this,
                 wifiHandler, mWifiNative, mWifiKeyStore, mClock, new PasspointObjectFactory(),
-                mWifiConfigManager, mWifiConfigStore, mSettingsStore, mWifiMetrics,
-                mWifiCarrierInfoManager, mMacAddressUtil, mWifiPermissionsUtil);
+                mWifiConfigManager, mWifiConfigStore, mWifiMetrics, mWifiCarrierInfoManager,
+                mMacAddressUtil, mWifiPermissionsUtil);
         PasspointNetworkNominateHelper nominateHelper =
                 new PasspointNetworkNominateHelper(mPasspointManager, mWifiConfigManager,
-                        mConnectivityLocalLog, mWifiCarrierInfoManager, mContext.getResources());
+                        mConnectivityLocalLog);
         mPasspointManager.setPasspointNetworkNominateHelper(nominateHelper);
         mSavedNetworkNominator = new SavedNetworkNominator(
                 mWifiConfigManager, nominateHelper, mConnectivityLocalLog, mWifiCarrierInfoManager,
@@ -425,6 +418,10 @@
         mNetworkSuggestionNominator = new NetworkSuggestionNominator(mWifiNetworkSuggestionsManager,
                 mWifiConfigManager, nominateHelper, mConnectivityLocalLog, mWifiCarrierInfoManager,
                 mWifiMetrics);
+        mScoredNetworkNominator = new ScoredNetworkNominator(mContext, wifiHandler,
+                mFrameworkFacade, mNetworkScoreManager, mContext.getPackageManager(),
+                mWifiConfigManager, mConnectivityLocalLog,
+                mWifiNetworkScoreCache, mWifiPermissionsUtil);
 
         mWifiMetrics.setPasspointManager(mPasspointManager);
         WifiChannelUtilization wifiChannelUtilizationConnected =
@@ -445,7 +442,7 @@
         mWifiHealthMonitor = new WifiHealthMonitor(mContext, this, mClock, mWifiConfigManager,
             mWifiScoreCard, wifiHandler, mWifiNative, l2KeySeed, mDeviceConfigFacade,
             mActiveModeWarden);
-        mWifiDataStall = new WifiDataStall(mWifiMetrics, mContext,
+        mWifiDataStall = new WifiDataStall(mFrameworkFacade, mWifiMetrics, mContext,
                 mDeviceConfigFacade, wifiChannelUtilizationConnected, mClock, wifiHandler,
                 mThroughputPredictor, mActiveModeWarden, mCmiMonitor);
         mWifiMetrics.setWifiDataStall(mWifiDataStall);
@@ -459,36 +456,30 @@
                 wifiLooper, mFrameworkFacade, mClock, mWifiMetrics,
                 mWifiConfigManager, mWifiConfigStore, mConnectHelper,
                 new ConnectToNetworkNotificationBuilder(mContext, mFrameworkFacade),
-                mMakeBeforeBreakManager, mWifiNotificationManager, mWifiPermissionsUtil);
-        mMultiInternetManager = new MultiInternetManager(mActiveModeWarden, mFrameworkFacade,
-                mContext, mCmiMonitor, mSettingsStore, wifiHandler, mClock);
-        mExternalPnoScanRequestManager = new ExternalPnoScanRequestManager(wifiHandler, mContext);
+                mMakeBeforeBreakManager, mWifiNotificationManager);
         mWifiConnectivityManager = new WifiConnectivityManager(
                 mContext, mScoringParams, mWifiConfigManager,
                 mWifiNetworkSuggestionsManager, mWifiNetworkSelector,
                 mWifiConnectivityHelper, mWifiLastResortWatchdog, mOpenNetworkNotifier,
                 mWifiMetrics, wifiHandler,
                 mClock, mConnectivityLocalLog, mWifiScoreCard, mWifiBlocklistMonitor,
-                mWifiChannelUtilizationScan, mPasspointManager, mMultiInternetManager,
-                mDeviceConfigFacade, mActiveModeWarden, mFrameworkFacade, mWifiGlobals,
-                mExternalPnoScanRequestManager);
+                mWifiChannelUtilizationScan, mPasspointManager, mDeviceConfigFacade,
+                mActiveModeWarden, mWifiGlobals);
         mMboOceController = new MboOceController(makeTelephonyManager(), mActiveModeWarden);
         mCountryCode = new WifiCountryCode(mContext, mActiveModeWarden,
                 mCmiMonitor, mWifiNative, mSettingsConfigStore);
         mConnectionFailureNotifier = new ConnectionFailureNotifier(
                 mContext, mFrameworkFacade, mWifiConfigManager,
                 mWifiConnectivityManager, wifiHandler,
-                mWifiNotificationManager, mConnectionFailureNotificationBuilder,
-                mWifiDialogManager);
+                mWifiNotificationManager, mConnectionFailureNotificationBuilder);
         mWifiNetworkFactory = new WifiNetworkFactory(
                 wifiLooper, mContext, REGULAR_NETWORK_CAPABILITIES_FILTER,
                 (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE),
                 (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE),
                 (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE),
                 mClock, this, mWifiConnectivityManager, mWifiConfigManager,
-                mWifiConfigStore, mWifiPermissionsUtil, mWifiMetrics, mWifiNative,
-                mActiveModeWarden, mConnectHelper, mCmiMonitor, mFrameworkFacade,
-                mMultiInternetManager);
+                mWifiConfigStore, mWifiPermissionsUtil, mWifiMetrics, mActiveModeWarden,
+                mConnectHelper, mCmiMonitor);
         // We can't filter untrusted network in the capabilities filter because a trusted
         // network would still satisfy a request that accepts untrusted ones.
         // We need a second network factory for untrusted network requests because we need a
@@ -499,14 +490,6 @@
         mOemWifiNetworkFactory = new OemWifiNetworkFactory(
                 wifiLooper, mContext, OEM_NETWORK_CAPABILITIES_FILTER,
                 mWifiConnectivityManager);
-        mRestrictedWifiNetworkFactory = new RestrictedWifiNetworkFactory(
-                wifiLooper, mContext, RESTRICTED_NETWORK_CAPABILITIES_FILTER,
-                mWifiConnectivityManager);
-        mMultiInternetWifiNetworkFactory = new MultiInternetWifiNetworkFactory(
-                wifiLooper, mContext, REGULAR_NETWORK_CAPABILITIES_FILTER,
-                mFrameworkFacade, mContext.getSystemService(AlarmManager.class),
-                mWifiPermissionsUtil, mMultiInternetManager, mWifiConnectivityManager,
-                mConnectivityLocalLog);
         mWifiScanAlwaysAvailableSettingsCompatibility =
                 new WifiScanAlwaysAvailableSettingsCompatibility(mContext, wifiHandler,
                         mSettingsStore, mActiveModeWarden, mFrameworkFacade);
@@ -525,12 +508,12 @@
         mLockManager = new WifiLockManager(mContext, mBatteryStats, mActiveModeWarden,
                 mFrameworkFacade, wifiHandler, mClock, mWifiMetrics);
         mSelfRecovery = new SelfRecovery(mContext, mActiveModeWarden, mClock, mWifiNative);
-        mWifiMulticastLockManager = new WifiMulticastLockManager(mActiveModeWarden, mBatteryStats,
-                wifiLooper);
+        mWifiMulticastLockManager = new WifiMulticastLockManager(mActiveModeWarden, mBatteryStats);
 
         // Register the various network Nominators with the network selector.
         mWifiNetworkSelector.registerNetworkNominator(mSavedNetworkNominator);
         mWifiNetworkSelector.registerNetworkNominator(mNetworkSuggestionNominator);
+        mWifiNetworkSelector.registerNetworkNominator(mScoredNetworkNominator);
 
         mSimRequiredNotifier = new SimRequiredNotifier(mContext, mFrameworkFacade,
                 mWifiNotificationManager);
@@ -555,43 +538,41 @@
      * Enable verbose logging in Injector objects. Called from the WifiServiceImpl (based on
      * binder call).
      */
-    public void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        Log.i(TAG, "enableVerboseLogging " + verboseEnabled + " hal " + halVerboseEnabled);
-        mWifiLastResortWatchdog.enableVerboseLogging(verboseEnabled);
-        mWifiBackupRestore.enableVerboseLogging(verboseEnabled);
-        mHalDeviceManager.enableVerboseLogging(verboseEnabled);
-        mScanRequestProxy.enableVerboseLogging(verboseEnabled);
-        mInterfaceConflictManager.enableVerboseLogging(verboseEnabled);
-        mWakeupController.enableVerboseLogging(verboseEnabled);
-        mWifiNetworkSuggestionsManager.enableVerboseLogging(verboseEnabled);
-        LogcatLog.enableVerboseLogging(verboseEnabled);
-        mDppManager.enableVerboseLogging(verboseEnabled);
-        mWifiCarrierInfoManager.enableVerboseLogging(verboseEnabled);
-        mCountryCode.enableVerboseLogging(verboseEnabled);
-        mWifiDiagnostics.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-        mWifiMonitor.enableVerboseLogging(verboseEnabled);
-        mWifiNative.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-        mWifiConfigManager.enableVerboseLogging(verboseEnabled);
-        mPasspointManager.enableVerboseLogging(verboseEnabled);
-        mWifiNetworkFactory.enableVerboseLogging(verboseEnabled);
-        mLinkProbeManager.enableVerboseLogging(verboseEnabled);
-        mMboOceController.enableVerboseLogging(verboseEnabled);
-        mWifiScoreCard.enableVerboseLogging(verboseEnabled);
-        mWifiHealthMonitor.enableVerboseLogging(verboseEnabled);
-        mThroughputPredictor.enableVerboseLogging(verboseEnabled);
-        mWifiDataStall.enableVerboseLogging(verboseEnabled);
-        mWifiConnectivityManager.enableVerboseLogging(verboseEnabled);
-        mThroughputScorer.enableVerboseLogging(verboseEnabled);
-        mWifiNetworkSelector.enableVerboseLogging(verboseEnabled);
-        mMakeBeforeBreakManager.setVerboseLoggingEnabled(verboseEnabled);
-        mMultiInternetManager.setVerboseLoggingEnabled(verboseEnabled);
-        mBroadcastQueue.setVerboseLoggingEnabled(verboseEnabled);
+    public void enableVerboseLogging(int verbose) {
+        mWifiLastResortWatchdog.enableVerboseLogging(verbose);
+        mWifiBackupRestore.enableVerboseLogging(verbose);
+        mHalDeviceManager.enableVerboseLogging(verbose);
+        mScanRequestProxy.enableVerboseLogging(verbose);
+        mWakeupController.enableVerboseLogging(verbose);
+        mWifiNetworkSuggestionsManager.enableVerboseLogging(verbose);
+        LogcatLog.enableVerboseLogging(verbose);
+        mDppManager.enableVerboseLogging(verbose);
+        mWifiCarrierInfoManager.enableVerboseLogging(verbose);
+
+        boolean verboseBool = verbose > 0;
+        Log.i(TAG, "enableVerboseLogging(" + verbose + "): " + verboseBool);
+        mCountryCode.enableVerboseLogging(verboseBool);
+        mWifiDiagnostics.enableVerboseLogging(verboseBool);
+        mWifiMonitor.enableVerboseLogging(verboseBool);
+        mWifiNative.enableVerboseLogging(verboseBool);
+        mWifiConfigManager.enableVerboseLogging(verboseBool);
+        mPasspointManager.enableVerboseLogging(verboseBool);
+        mWifiNetworkFactory.enableVerboseLogging(verboseBool);
+        mLinkProbeManager.enableVerboseLogging(verboseBool);
+        mMboOceController.enableVerboseLogging(verboseBool);
+        mWifiScoreCard.enableVerboseLogging(verboseBool);
+        mWifiHealthMonitor.enableVerboseLogging(verboseBool);
+        mThroughputPredictor.enableVerboseLogging(verboseBool);
+        mWifiDataStall.enableVerboseLogging(verboseBool);
+        mWifiConnectivityManager.enableVerboseLogging(verboseBool);
+        mWifiNetworkSelector.enableVerboseLogging(verboseBool);
+        mMakeBeforeBreakManager.setVerboseLoggingEnabled(verboseBool);
+        mBroadcastQueue.setVerboseLoggingEnabled(verboseBool);
         if (SdkLevel.isAtLeastS()) {
-            mCoexManager.enableVerboseLogging(verboseEnabled);
+            mCoexManager.enableVerboseLogging(verboseBool);
         }
-        mWifiPermissionsUtil.enableVerboseLogging(verboseEnabled);
-        mWifiDialogManager.enableVerboseLogging(verboseEnabled);
-        mExternalPnoScanRequestManager.enableVerboseLogging(verboseEnabled);
+        mWifiPermissionsWrapper.enableVerboseLogging(verboseBool);
+        mWifiPermissionsUtil.enableVerboseLogging(verboseBool);
     }
 
     public UserManager getUserManager() {
@@ -709,13 +690,6 @@
         return mContext.getSystemService(TelephonyManager.class);
     }
 
-    /**
-     * Returns BatteryManager service
-     */
-    public BatteryManager makeBatteryManager() {
-        return mContext.getSystemService(BatteryManager.class);
-    }
-
     public WifiCarrierInfoManager getWifiCarrierInfoManager() {
         return mWifiCarrierInfoManager;
     }
@@ -725,17 +699,6 @@
     }
 
     /**
-     * Create a WifiShellCommand.
-     *
-     * @param wifiService WifiServiceImpl object shell commands get sent to.
-     * @return an instance of WifiShellCommand
-     */
-    public WifiShellCommand makeWifiShellCommand(WifiServiceImpl wifiService) {
-        return new WifiShellCommand(this, wifiService, mContext,
-                mWifiGlobals, mWifiThreadRunner);
-    }
-
-    /**
      * Create a SoftApManager.
      *
      * @param config SoftApModeConfiguration object holding the config and mode
@@ -749,12 +712,11 @@
             @NonNull ActiveModeManager.SoftApRole role,
             boolean verboseLoggingEnabled) {
         return new SoftApManager(mContext, mWifiHandlerThread.getLooper(),
-                mFrameworkFacade, mWifiNative, mCoexManager, makeBatteryManager(),
-                mCountryCode.getCountryCode(), listener, callback, mWifiApConfigStore,
-                config, mWifiMetrics, mSarManager, mWifiDiagnostics,
-                new SoftApNotifier(mContext, mFrameworkFacade, mWifiNotificationManager),
-                mCmiMonitor, mActiveModeWarden, mClock.getElapsedSinceBootMillis(),
-                requestorWs, role, verboseLoggingEnabled);
+                mFrameworkFacade, mWifiNative, mCoexManager, mCountryCode.getCountryCode(),
+                listener, callback, mWifiApConfigStore, config, mWifiMetrics, mSarManager,
+                mWifiDiagnostics, new SoftApNotifier(mContext, mFrameworkFacade,
+                mWifiNotificationManager), mCmiMonitor, mActiveModeWarden,
+                mClock.getElapsedSinceBootMillis(), requestorWs, role, verboseLoggingEnabled);
     }
 
     /**
@@ -779,8 +741,8 @@
                 mDeviceConfigFacade, mScanRequestProxy, wifiInfo, mWifiConnectivityManager,
                 mWifiBlocklistMonitor, mConnectionFailureNotifier,
                 REGULAR_NETWORK_CAPABILITIES_FILTER, mWifiNetworkFactory,
-                mUntrustedWifiNetworkFactory, mOemWifiNetworkFactory, mRestrictedWifiNetworkFactory,
-                mMultiInternetManager, mWifiLastResortWatchdog, mWakeupController,
+                mUntrustedWifiNetworkFactory, mOemWifiNetworkFactory,
+                mWifiLastResortWatchdog, mWakeupController,
                 mLockManager, mFrameworkFacade, mWifiHandlerThread.getLooper(),
                 mWifiNative, new WrongPasswordNotifier(mContext, mFrameworkFacade,
                 mWifiNotificationManager),
@@ -793,10 +755,10 @@
                         mWifiNative, mWifiBlocklistMonitor, mWifiThreadRunner, mWifiScoreCard,
                         mDeviceConfigFacade, mContext, mAdaptiveConnectivityEnabledSettingObserver,
                         ifaceName, mExternalScoreUpdateObserverProxy, mSettingsStore, mWifiGlobals,
-                        mActiveModeWarden, mWifiConnectivityManager, mWifiConfigManager),
+                        mActiveModeWarden, mWifiConnectivityManager),
                 mWifiP2pConnection, mWifiGlobals, ifaceName, clientModeManager,
                 mCmiMonitor, mBroadcastQueue, mWifiNetworkSelector, makeTelephonyManager(),
-                this, mSettingsConfigStore, verboseLoggingEnabled, mWifiNotificationManager);
+                this, mSettingsConfigStore, verboseLoggingEnabled);
     }
 
     public WifiNetworkAgent makeWifiNetworkAgent(
@@ -1001,6 +963,10 @@
         return mWifiThreadRunner;
     }
 
+    public WifiNetworkScoreCache getWifiNetworkScoreCache() {
+        return mWifiNetworkScoreCache;
+    }
+
     public NetdWrapper makeNetdWrapper() {
         if (mNetdWrapper == null) {
             mNetdWrapper = new NetdWrapper(mContext, new Handler(mWifiHandlerThread.getLooper()));
@@ -1049,14 +1015,6 @@
         return mOemWifiNetworkFactory;
     }
 
-    public RestrictedWifiNetworkFactory getRestrictedWifiNetworkFactory() {
-        return mRestrictedWifiNetworkFactory;
-    }
-
-    public MultiInternetWifiNetworkFactory getMultiInternetWifiNetworkFactory() {
-        return mMultiInternetWifiNetworkFactory;
-    }
-
     public WifiDiagnostics getWifiDiagnostics() {
         return mWifiDiagnostics;
     }
@@ -1078,8 +1036,7 @@
      */
     public WorkSourceHelper makeWsHelper(@NonNull WorkSource ws) {
         return new WorkSourceHelper(ws, mWifiPermissionsUtil,
-                mContext.getSystemService(ActivityManager.class), mContext.getPackageManager(),
-                mContext.getResources());
+                mContext.getSystemService(ActivityManager.class), mContext.getPackageManager());
     }
 
     public AdaptiveConnectivityEnabledSettingObserver
@@ -1087,13 +1044,6 @@
         return mAdaptiveConnectivityEnabledSettingObserver;
     }
 
-    /**
-     * Creates a BroadcastOptions.
-     */
-    public BroadcastOptions makeBroadcastOptions() {
-        return BroadcastOptions.makeBasic();
-    }
-
     public MakeBeforeBreakManager getMakeBeforeBreakManager() {
         return mMakeBeforeBreakManager;
     }
@@ -1106,19 +1056,10 @@
         return mWifiNotificationManager;
     }
 
-    public InterfaceConflictManager getInterfaceConflictManager() {
-        return mInterfaceConflictManager;
-    }
-
     public LastCallerInfoManager getLastCallerInfoManager() {
         return mLastCallerInfoManager;
     }
 
-    @NonNull
-    public WifiDialogManager getWifiDialogManager() {
-        return mWifiDialogManager;
-    }
-
     public BuildProperties getBuildProperties() {
         return mBuildProperties;
     }
@@ -1130,20 +1071,4 @@
     public LinkProbeManager getLinkProbeManager() {
         return mLinkProbeManager;
     }
-
-    public MultiInternetManager getMultiInternetManager() {
-        return mMultiInternetManager;
-    }
-
-    public WifiContext getContext() {
-        return mContext;
-    }
-
-    /**
-     * Creates a BufferedReader for the given filename. Useful for unit tests that depend on IO.
-     */
-    @NonNull
-    public BufferedReader createBufferedReader(String filename) throws FileNotFoundException {
-        return new BufferedReader(new FileReader(filename));
-    }
 }
diff --git a/service/java/com/android/server/wifi/WifiKeyStore.java b/service/java/com/android/server/wifi/WifiKeyStore.java
index 503001e..4846586 100644
--- a/service/java/com/android/server/wifi/WifiKeyStore.java
+++ b/service/java/com/android/server/wifi/WifiKeyStore.java
@@ -125,7 +125,7 @@
         if (caCertificates != null) {
             caCertificateAliases = new ArrayList<>();
             for (int i = 0; i < caCertificates.length; i++) {
-                String caAlias = alias + "_" + i;
+                String caAlias = String.format("%s_%d", alias, i);
 
                 oldCaCertificatesToRemove.remove(caAlias);
                 if (!putCaCertInKeyStore(caAlias, caCertificates[i])) {
@@ -140,7 +140,7 @@
             }
         }
         // If alias changed, remove the old one.
-        if (!TextUtils.equals(alias, existingAlias)) {
+        if (!alias.equals(existingAlias)) {
             if (existingConfig != null && existingConfig.isAppInstalledDeviceKeyAndCert()) {
                 // Remove old private keys.
                 removeEntryFromKeyStore(existingAlias);
@@ -404,7 +404,7 @@
         // support for both RSA and ECDSA, and for STAs it mandates ECDSA and optionally
         // RSA. In order to be compatible with all WPA3-Enterprise 192-bit deployments,
         // we are supporting both types here.
-        if (TextUtils.equals(sigAlgOid, "1.2.840.113549.1.1.12")) {
+        if (sigAlgOid.equals("1.2.840.113549.1.1.12")) {
             // sha384WithRSAEncryption
             if (x509Certificate.getPublicKey() instanceof RSAPublicKey) {
                 final RSAPublicKey rsaPublicKey = (RSAPublicKey) x509Certificate.getPublicKey();
@@ -418,7 +418,7 @@
                     }
                 }
             }
-        } else if (TextUtils.equals(sigAlgOid, "1.2.840.10045.4.3.3")) {
+        } else if (sigAlgOid.equals("1.2.840.10045.4.3.3")) {
             // ecdsa-with-SHA384
             if (x509Certificate.getPublicKey() instanceof ECPublicKey) {
                 final ECPublicKey ecPublicKey = (ECPublicKey) x509Certificate.getPublicKey();
diff --git a/service/java/com/android/server/wifi/WifiLastResortWatchdog.java b/service/java/com/android/server/wifi/WifiLastResortWatchdog.java
index 5a27899..46b3e50 100644
--- a/service/java/com/android/server/wifi/WifiLastResortWatchdog.java
+++ b/service/java/com/android/server/wifi/WifiLastResortWatchdog.java
@@ -759,8 +759,8 @@
     }
 
     /** Enable/disable verbose logging. */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
+    public void enableVerboseLogging(int verbose) {
+        mVerboseLoggingEnabled = verbose > 0;
     }
 
     @VisibleForTesting
diff --git a/service/java/com/android/server/wifi/WifiLockManager.java b/service/java/com/android/server/wifi/WifiLockManager.java
index 4e9cd9d..f0d693a 100644
--- a/service/java/com/android/server/wifi/WifiLockManager.java
+++ b/service/java/com/android/server/wifi/WifiLockManager.java
@@ -16,7 +16,10 @@
 
 package com.android.server.wifi;
 
+import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_PRIMARY;
+
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.app.ActivityManager;
 import android.content.BroadcastReceiver;
 import android.content.Context;
@@ -31,7 +34,6 @@
 import android.os.RemoteException;
 import android.os.WorkSource;
 import android.os.WorkSource.WorkChain;
-import android.text.TextUtils;
 import android.util.Log;
 import android.util.Pair;
 import android.util.SparseArray;
@@ -111,9 +113,9 @@
                     @Override
                     public void onReceive(Context context, Intent intent) {
                         String action = intent.getAction();
-                        if (TextUtils.equals(action, Intent.ACTION_SCREEN_ON)) {
+                        if (action.equals(Intent.ACTION_SCREEN_ON)) {
                             handleScreenStateChanged(true);
-                        } else if (TextUtils.equals(action, Intent.ACTION_SCREEN_OFF)) {
+                        } else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
                             handleScreenStateChanged(false);
                         }
                     }
@@ -122,6 +124,9 @@
 
         // Register for UID fg/bg transitions
         registerUidImportanceTransitions();
+
+        mActiveModeWarden.registerPrimaryClientModeManagerChangedCallback(
+                new PrimaryClientModeManagerChangedCallback());
     }
 
     // Check for conditions to activate high-perf lock
@@ -378,18 +383,16 @@
      */
     public void updateWifiClientConnected(
             ClientModeManager clientModeManager, boolean isConnected) {
-        boolean hasAtLeastOneConnection = isConnected
-                || mActiveModeWarden.getClientModeManagers().stream().anyMatch(
-                        cmm -> cmm.isConnected());
-        if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "updateWifiClientConnected hasAtLeastOneConnection="
-                    + hasAtLeastOneConnection);
+        // ignore if not primary
+        if (clientModeManager.getRole() != ROLE_CLIENT_PRIMARY) {
+            return;
         }
-        if (mWifiConnected == hasAtLeastOneConnection) {
+
+        if (mWifiConnected == isConnected) {
             // No need to take action
             return;
         }
-        mWifiConnected = hasAtLeastOneConnection;
+        mWifiConnected = isConnected;
 
         // Adjust blaming for UIDs in foreground carrying low latency locks
         if (canActivateLowLatencyLock(IGNORE_WIFI_STATE_MASK)) {
@@ -603,8 +606,7 @@
     private boolean resetCurrentMode(@NonNull ClientModeManager clientModeManager) {
         switch (mCurrentOpMode) {
             case WifiManager.WIFI_MODE_FULL_HIGH_PERF:
-                if (!clientModeManager.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                        true)) {
+                if (!clientModeManager.setPowerSave(true)) {
                     Log.e(TAG, "Failed to reset the OpMode from hi-perf to Normal");
                     return false;
                 }
@@ -639,8 +641,7 @@
     private boolean setNewMode(@NonNull ClientModeManager clientModeManager, int newLockMode) {
         switch (newLockMode) {
             case WifiManager.WIFI_MODE_FULL_HIGH_PERF:
-                if (!clientModeManager.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                        false)) {
+                if (!clientModeManager.setPowerSave(false)) {
                     Log.e(TAG, "Failed to set the OpMode to hi-perf");
                     return false;
                 }
@@ -694,6 +695,27 @@
         return setNewMode(primaryManager, newLockMode);
     }
 
+    private class PrimaryClientModeManagerChangedCallback
+            implements ActiveModeWarden.PrimaryClientModeManagerChangedCallback {
+
+        @Override
+        public void onChange(
+                @Nullable ConcreteClientModeManager prevPrimaryClientModeManager,
+                @Nullable ConcreteClientModeManager newPrimaryClientModeManager) {
+            // reset wifi lock on previous primary
+            if (prevPrimaryClientModeManager != null) {
+                resetCurrentMode(prevPrimaryClientModeManager);
+            }
+            // set wifi lock on new primary
+            if (newPrimaryClientModeManager != null) {
+                mWifiConnected = newPrimaryClientModeManager.isConnected();
+                setNewMode(newPrimaryClientModeManager, getStrongestLockMode());
+            } else {
+                mWifiConnected = false;
+            }
+        }
+    }
+
     /** Returns the cached low latency mode support value, or tries to fetch it if not yet known. */
     private int getLowLatencyModeSupport() {
         if (mLatencyModeSupport != LOW_LATENCY_SUPPORT_UNDEFINED) {
@@ -728,8 +750,7 @@
                 return false;
             }
 
-            if (!clientModeManager.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                    !enabled)) {
+            if (!clientModeManager.setPowerSave(!enabled)) {
                 Log.e(TAG, "Failed to set power save mode");
                 // Revert the low latency mode
                 clientModeManager.setLowLatencyMode(!enabled);
@@ -737,8 +758,7 @@
             }
         } else if (lowLatencySupport == LOW_LATENCY_NOT_SUPPORTED) {
             // Only set power save mode
-            if (!clientModeManager.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                    !enabled)) {
+            if (!clientModeManager.setPowerSave(!enabled)) {
                 Log.e(TAG, "Failed to set power save mode");
                 return false;
             }
@@ -837,8 +857,12 @@
         }
     }
 
-    protected void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
+    protected void enableVerboseLogging(int verbose) {
+        if (verbose > 0) {
+            mVerboseLoggingEnabled = true;
+        } else {
+            mVerboseLoggingEnabled = false;
+        }
     }
 
     private class WifiLock implements IBinder.DeathRecipient {
@@ -881,7 +905,7 @@
         }
 
         public void binderDied() {
-            mHandler.post(() -> releaseLock(mBinder));
+            releaseLock(mBinder);
         }
 
         public void unlinkDeathRecipient() {
diff --git a/service/java/com/android/server/wifi/WifiMetrics.java b/service/java/com/android/server/wifi/WifiMetrics.java
index 8fd8877..3affdef 100644
--- a/service/java/com/android/server/wifi/WifiMetrics.java
+++ b/service/java/com/android/server/wifi/WifiMetrics.java
@@ -30,6 +30,7 @@
 import android.content.IntentFilter;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback;
 import android.net.wifi.EAPConstants;
 import android.net.wifi.IOnWifiUsabilityStatsListener;
 import android.net.wifi.ScanResult;
@@ -48,7 +49,6 @@
 import android.net.wifi.hotspot2.ProvisioningCallback;
 import android.net.wifi.hotspot2.ProvisioningCallback.OsuFailure;
 import android.net.wifi.nl80211.WifiNl80211Manager;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
@@ -70,8 +70,6 @@
 import android.util.SparseIntArray;
 
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wifi.SupplicantStaIfaceHal.StaIfaceReasonCode;
-import com.android.server.wifi.SupplicantStaIfaceHal.StaIfaceStatusCode;
 import com.android.server.wifi.aware.WifiAwareMetrics;
 import com.android.server.wifi.hotspot2.ANQPNetworkKey;
 import com.android.server.wifi.hotspot2.NetworkDetail;
@@ -128,7 +126,7 @@
 import com.android.server.wifi.util.IntHistogram;
 import com.android.server.wifi.util.MetricsUtils;
 import com.android.server.wifi.util.ObjectCounter;
-import com.android.server.wifi.util.StringUtil;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.wifi.resources.R;
 
 import org.json.JSONArray;
@@ -946,7 +944,7 @@
             StringBuilder sb = new StringBuilder();
             Calendar c = Calendar.getInstance();
             c.setTimeInMillis(mWallClockTimeMs);
-            sb.append(StringUtil.calendarToString(c));
+            sb.append(String.format("%tm-%td %tH:%tM:%tS.%tL", c, c, c, c, c, c));
             String eventType = "UNKNOWN";
             switch (mUserActionEvent.eventType) {
                 case UserActionEvent.EVENT_FORGET_WIFI:
@@ -1066,8 +1064,6 @@
         public static final int FAILURE_ASSOCIATION_TIMED_OUT = 11;
         // NETWORK_NOT_FOUND
         public static final int FAILURE_NETWORK_NOT_FOUND = 12;
-        // Connection attempt aborted by the watchdog because the AP didn't respond.
-        public static final int FAILURE_NO_RESPONSE = 13;
 
         RouterFingerPrint mRouterFingerPrint;
         private String mConfigSsid;
@@ -1094,11 +1090,8 @@
             Calendar c = Calendar.getInstance();
             synchronized (mLock) {
                 c.setTimeInMillis(mConnectionEvent.startTimeMillis);
-                if (mConnectionEvent.startTimeMillis == 0) {
-                    sb.append("            <null>");
-                } else {
-                    sb.append(StringUtil.calendarToString(c));
-                }
+                sb.append(mConnectionEvent.startTimeMillis == 0 ? "            <null>" :
+                        String.format("%tm-%td %tH:%tM:%tS.%tL", c, c, c, c, c, c));
                 sb.append(", SSID=");
                 sb.append(mConfigSsid);
                 sb.append(", BSSID=");
@@ -1165,9 +1158,6 @@
                     case FAILURE_NETWORK_NOT_FOUND:
                         sb.append("FAILURE_NETWORK_NOT_FOUND");
                         break;
-                    case FAILURE_NO_RESPONSE:
-                        sb.append("FAILURE_NO_RESPONSE");
-                        break;
                     default:
                         sb.append("UNKNOWN");
                         break;
@@ -1247,8 +1237,8 @@
                         sb.append("NOMINATOR_OPEN_NETWORK_AVAILABLE");
                         break;
                     default:
-                        sb.append("UnrecognizedNominator(" + mConnectionEvent.connectionNominator
-                                + ")");
+                        sb.append(String.format("UnrecognizedNominator(%d)",
+                                mConnectionEvent.connectionNominator));
                 }
                 sb.append(", networkSelectorExperimentId=");
                 sb.append(mConnectionEvent.networkSelectorExperimentId);
@@ -1852,7 +1842,7 @@
                         config.macRandomizationSetting
                         != WifiConfiguration.RANDOMIZATION_NONE;
                 currentConnectionEvent.mConnectionEvent.useAggressiveMac =
-                        mWifiConfigManager.shouldUseNonPersistentRandomization(config);
+                        mWifiConfigManager.shouldUseEnhancedRandomization(config);
                 currentConnectionEvent.mConnectionEvent.connectionNominator =
                         mNetworkIdToNominatorId.get(config.networkId,
                                 WifiMetricsProto.ConnectionEvent.NOMINATOR_UNKNOWN);
@@ -2101,7 +2091,6 @@
         }
     }
 
-    // TODO(b/177341879): Add failure type ConnectionEvent.FAILURE_NO_RESPONSE into Westworld.
     private int getConnectionResultFailureCode(int level2FailureCode, int level2FailureReason) {
         switch (level2FailureCode) {
             case ConnectionEvent.FAILURE_NONE:
@@ -2125,8 +2114,11 @@
                 return WifiStatsLog.WIFI_CONNECTION_RESULT_REPORTED__FAILURE_CODE__FAILURE_NETWORK_DISCONNECTION;
             case ConnectionEvent.FAILURE_ROAM_TIMEOUT:
                 return WifiStatsLog.WIFI_CONNECTION_RESULT_REPORTED__FAILURE_CODE__FAILURE_ROAM_TIMEOUT;
-            default:
+            case ConnectionEvent.FAILURE_NEW_CONNECTION_ATTEMPT:
+            case ConnectionEvent.FAILURE_REDUNDANT_CONNECTION_ATTEMPT:
                 return -1;
+            default:
+                return WifiStatsLog.WIFI_CONNECTION_RESULT_REPORTED__FAILURE_CODE__FAILURE_UNKNOWN;
         }
     }
 
@@ -2229,9 +2221,9 @@
     }
 
     /**
-     * Developer options toggle value for non-persistent MAC randomization.
+     * Developer options toggle value for enhanced MAC randomization.
      */
-    public void setNonPersistentMacRandomizationForceEnabled(boolean enabled) {
+    public void setEnhancedMacRandomizationForceEnabled(boolean enabled) {
         synchronized (mLock) {
             mWifiLogProto.isEnhancedMacRandomizationForceEnabled = enabled;
         }
@@ -3192,91 +3184,91 @@
     /**
      * Increment number of times the HAL crashed.
      */
-    public synchronized void incrementNumHalCrashes() {
-        mWifiLogProto.numHalCrashes++;
-        WifiStatsLog.write(WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__HAL_CRASH);
+    public void incrementNumHalCrashes() {
+        synchronized (mLock) {
+            mWifiLogProto.numHalCrashes++;
+        }
     }
 
     /**
      * Increment number of times the Wificond crashed.
      */
-    public synchronized void incrementNumWificondCrashes() {
-        mWifiLogProto.numWificondCrashes++;
-        WifiStatsLog.write(WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__WIFICOND_CRASH);
+    public void incrementNumWificondCrashes() {
+        synchronized (mLock) {
+            mWifiLogProto.numWificondCrashes++;
+        }
     }
 
     /**
      * Increment number of times the supplicant crashed.
      */
-    public synchronized void incrementNumSupplicantCrashes() {
-        mWifiLogProto.numSupplicantCrashes++;
-        WifiStatsLog.write(WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__SUPPLICANT_CRASH);
+    public void incrementNumSupplicantCrashes() {
+        synchronized (mLock) {
+            mWifiLogProto.numSupplicantCrashes++;
+        }
     }
 
     /**
      * Increment number of times the hostapd crashed.
      */
-    public synchronized void incrementNumHostapdCrashes() {
-        mWifiLogProto.numHostapdCrashes++;
-        WifiStatsLog.write(WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__HOSTAPD_CRASH);
+    public void incrementNumHostapdCrashes() {
+        synchronized (mLock) {
+            mWifiLogProto.numHostapdCrashes++;
+        }
     }
 
     /**
      * Increment number of times the wifi on failed due to an error in HAL.
      */
-    public synchronized void incrementNumSetupClientInterfaceFailureDueToHal() {
-        mWifiLogProto.numSetupClientInterfaceFailureDueToHal++;
-        WifiStatsLog.write(WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__CLIENT_FAILURE_HAL);
+    public void incrementNumSetupClientInterfaceFailureDueToHal() {
+        synchronized (mLock) {
+            mWifiLogProto.numSetupClientInterfaceFailureDueToHal++;
+        }
     }
 
     /**
      * Increment number of times the wifi on failed due to an error in wificond.
      */
-    public synchronized void incrementNumSetupClientInterfaceFailureDueToWificond() {
-        mWifiLogProto.numSetupClientInterfaceFailureDueToWificond++;
-        WifiStatsLog.write(WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__CLIENT_FAILURE_WIFICOND);
+    public void incrementNumSetupClientInterfaceFailureDueToWificond() {
+        synchronized (mLock) {
+            mWifiLogProto.numSetupClientInterfaceFailureDueToWificond++;
+        }
     }
 
     /**
      * Increment number of times the wifi on failed due to an error in supplicant.
      */
-    public synchronized void incrementNumSetupClientInterfaceFailureDueToSupplicant() {
-        mWifiLogProto.numSetupClientInterfaceFailureDueToSupplicant++;
-        WifiStatsLog.write(WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__CLIENT_FAILURE_SUPPLICANT);
+    public void incrementNumSetupClientInterfaceFailureDueToSupplicant() {
+        synchronized (mLock) {
+            mWifiLogProto.numSetupClientInterfaceFailureDueToSupplicant++;
+        }
     }
 
     /**
      * Increment number of times the SoftAp on failed due to an error in HAL.
      */
-    public synchronized void incrementNumSetupSoftApInterfaceFailureDueToHal() {
-        mWifiLogProto.numSetupSoftApInterfaceFailureDueToHal++;
-        WifiStatsLog.write(WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__SOFT_AP_FAILURE_HAL);
+    public void incrementNumSetupSoftApInterfaceFailureDueToHal() {
+        synchronized (mLock) {
+            mWifiLogProto.numSetupSoftApInterfaceFailureDueToHal++;
+        }
     }
 
     /**
      * Increment number of times the SoftAp on failed due to an error in wificond.
      */
-    public synchronized void incrementNumSetupSoftApInterfaceFailureDueToWificond() {
-        mWifiLogProto.numSetupSoftApInterfaceFailureDueToWificond++;
-        WifiStatsLog.write(WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__SOFT_AP_FAILURE_WIFICOND);
+    public void incrementNumSetupSoftApInterfaceFailureDueToWificond() {
+        synchronized (mLock) {
+            mWifiLogProto.numSetupSoftApInterfaceFailureDueToWificond++;
+        }
     }
 
     /**
      * Increment number of times the SoftAp on failed due to an error in hostapd.
      */
-    public synchronized void incrementNumSetupSoftApInterfaceFailureDueToHostapd() {
-        mWifiLogProto.numSetupSoftApInterfaceFailureDueToHostapd++;
-        WifiStatsLog.write(WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__SOFT_AP_FAILURE_HOSTAPD);
+    public void incrementNumSetupSoftApInterfaceFailureDueToHostapd() {
+        synchronized (mLock) {
+            mWifiLogProto.numSetupSoftApInterfaceFailureDueToHostapd++;
+        }
     }
 
     /**
@@ -3667,6 +3659,7 @@
             if (args != null && args.length > 0 && PROTO_DUMP_ARG.equals(args[0])) {
                 // Dump serialized WifiLog proto
                 consolidateProto();
+
                 byte[] wifiMetricsProto = WifiMetricsProto.WifiLog.toByteArray(mWifiLogProto);
                 String metricsProtoDump = Base64.encodeToString(wifiMetricsProto, Base64.DEFAULT);
                 if (args.length > 1 && CLEAN_DUMP_ARG.equals(args[1])) {
@@ -5397,9 +5390,7 @@
                 break;
             case WifiMonitor.AUTHENTICATION_FAILURE_EVENT:
                 event.type = StaEvent.TYPE_AUTHENTICATION_FAILURE_EVENT;
-                AuthenticationFailureEventInfo authenticationFailureEventInfo =
-                        (AuthenticationFailureEventInfo) msg.obj;
-                switch (authenticationFailureEventInfo.reasonCode) {
+                switch (msg.arg1) {
                     case WifiManager.ERROR_AUTH_FAILURE_NONE:
                         event.authFailureReason = StaEvent.AUTH_FAILURE_NONE;
                         break;
@@ -5677,7 +5668,7 @@
                 sb.append("ASSOCIATION_REJECTION_EVENT")
                         .append(" timedOut=").append(event.associationTimedOut)
                         .append(" status=").append(event.status).append(":")
-                        .append(StaIfaceStatusCode.toString(event.status));
+                        .append(ISupplicantStaIfaceCallback.StatusCode.toString(event.status));
                 break;
             case StaEvent.TYPE_AUTHENTICATION_FAILURE_EVENT:
                 sb.append("AUTHENTICATION_FAILURE_EVENT reason=").append(event.authFailureReason)
@@ -5690,7 +5681,7 @@
                 sb.append("NETWORK_DISCONNECTION_EVENT")
                         .append(" local_gen=").append(event.localGen)
                         .append(" reason=").append(event.reason).append(":")
-                        .append(StaIfaceReasonCode.toString(
+                        .append(ISupplicantStaIfaceCallback.ReasonCode.toString(
                                 (event.reason >= 0 ? event.reason : -1 * event.reason)));
                 break;
             case StaEvent.TYPE_CMD_ASSOCIATED_BSSID:
diff --git a/service/java/com/android/server/wifi/WifiMonitor.java b/service/java/com/android/server/wifi/WifiMonitor.java
index 0fdb69b..5a69591 100644
--- a/service/java/com/android/server/wifi/WifiMonitor.java
+++ b/service/java/com/android/server/wifi/WifiMonitor.java
@@ -17,7 +17,6 @@
 package com.android.server.wifi;
 
 import android.annotation.IntDef;
-import android.net.MacAddress;
 import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiManager;
@@ -31,8 +30,6 @@
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.Protocol;
 import com.android.server.wifi.MboOceController.BtmFrameData;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyRequest;
-import com.android.server.wifi.SupplicantStaIfaceHal.SupplicantEventCode;
 import com.android.server.wifi.WifiCarrierInfoManager.SimAuthRequestData;
 import com.android.server.wifi.hotspot2.AnqpEvent;
 import com.android.server.wifi.hotspot2.IconEvent;
@@ -40,9 +37,7 @@
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
-import java.security.cert.X509Certificate;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -109,15 +104,6 @@
     /* Transition Disable Indication */
     public static final int TRANSITION_DISABLE_INDICATION        = BASE + 72;
 
-    /* Trust On First Use Root CA Certification */
-    public static final int TOFU_ROOT_CA_CERTIFICATE             = BASE + 73;
-
-    /* Auxiliary supplicant event */
-    public static final int AUXILIARY_SUPPLICANT_EVENT           = BASE + 74;
-
-    /* Quality of Service (QoS) events */
-    public static final int QOS_POLICY_RESET_EVENT               = BASE + 75;
-    public static final int QOS_POLICY_REQUEST_EVENT             = BASE + 76;
 
     /* WPS config errrors */
     private static final int CONFIG_MULTIPLE_PBC_DETECTED = 12;
@@ -341,8 +327,7 @@
                 break;
         }
         //For all other errors, return a generic internal error
-        sendMessage(iface, WPS_FAIL_EVENT, WifiManager.ActionListener.FAILURE_INTERNAL_ERROR,
-                reason);
+        sendMessage(iface, WPS_FAIL_EVENT, WifiManager.ERROR, reason);
     }
 
    /**
@@ -510,10 +495,8 @@
      * @param errorCode Error code associated with the authentication failure event.
      *               A value of -1 is used when no error code is reported.
      */
-    public void broadcastAuthenticationFailureEvent(String iface, int reason, int errorCode,
-            String ssid, MacAddress bssid) {
-        sendMessage(iface, AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(ssid, bssid, reason, errorCode));
+    public void broadcastAuthenticationFailureEvent(String iface, int reason, int errorCode) {
+        sendMessage(iface, AUTHENTICATION_FAILURE_EVENT, reason, errorCode);
     }
 
     /**
@@ -611,56 +594,4 @@
     public void broadcastNetworkNotFoundEvent(String iface, String ssid) {
         sendMessage(iface, NETWORK_NOT_FOUND_EVENT, ssid);
     }
-
-    /**
-     * Broadcast the certification event which takes place during TOFU process.
-     *
-     * @param iface Name of iface on which this occurred.
-     * @param networkId ID of the network in wpa_supplicant.
-     * @param ssid SSID of the network.
-     * @param depth the depth of this cert in the chain, 0 is the leaf, i.e. the server cert.
-     * @param cert the certificate data.
-     */
-    public void broadcastCertificationEvent(String iface, int networkId, String ssid,
-            int depth, X509Certificate cert) {
-        sendMessage(iface, TOFU_ROOT_CA_CERTIFICATE, networkId, depth, cert);
-    }
-
-    /**
-     * Broadcast an auxiliary supplicant event to all handlers registered for this event.
-     *
-     * @param iface Name of iface on which this occurred.
-     * @param eventCode SupplicantEventCode for the event that occurred.
-     * @param bssid BSSID of the network.
-     * @param reasonString Optional string containing more information about why the
-     *                     event occurred.
-     */
-    public void broadcastAuxiliarySupplicantEvent(String iface, @SupplicantEventCode int eventCode,
-            MacAddress bssid, String reasonString) {
-        sendMessage(iface, AUXILIARY_SUPPLICANT_EVENT, 0, 0,
-                new SupplicantEventInfo(eventCode, bssid, reasonString));
-    }
-
-    /**
-     * Broadcast the QoS policy reset event to all the handlers
-     * registered for this event.
-     *
-     * @param iface Name of iface on which this occurred.
-     */
-    public void broadcastQosPolicyResetEvent(String iface) {
-        sendMessage(iface, QOS_POLICY_RESET_EVENT);
-    }
-
-    /**
-     * Broadcast the QoS policy request event to all the handlers
-     * registered for this event.
-     *
-     * @param iface Name of iface on which this occurred.
-     * @param qosPolicyRequestId Dialog token to identify the request.
-     * @param qosPolicyData List of QoS policies requested by the AP.
-     */
-    public void broadcastQosPolicyRequestEvent(String iface, int qosPolicyRequestId,
-            List<QosPolicyRequest> qosPolicyData) {
-        sendMessage(iface, QOS_POLICY_REQUEST_EVENT, qosPolicyRequestId, 0, qosPolicyData);
-    }
 }
diff --git a/service/java/com/android/server/wifi/WifiMulticastLockManager.java b/service/java/com/android/server/wifi/WifiMulticastLockManager.java
index b0b7a7c..c88cfae 100644
--- a/service/java/com/android/server/wifi/WifiMulticastLockManager.java
+++ b/service/java/com/android/server/wifi/WifiMulticastLockManager.java
@@ -19,9 +19,7 @@
 import android.annotation.Nullable;
 import android.os.BatteryStatsManager;
 import android.os.Binder;
-import android.os.Handler;
 import android.os.IBinder;
-import android.os.Looper;
 import android.os.RemoteException;
 import android.os.WorkSource;
 import android.util.Log;
@@ -41,7 +39,6 @@
     private final List<Multicaster> mMulticasters = new ArrayList<>();
     private int mMulticastEnabled = 0;
     private int mMulticastDisabled = 0;
-    private final Handler mHandler;
     private boolean mVerboseLoggingEnabled = false;
     private final BatteryStatsManager mBatteryStats;
     private final ActiveModeWarden mActiveModeWarden;
@@ -57,11 +54,9 @@
 
     public WifiMulticastLockManager(
             ActiveModeWarden activeModeWarden,
-            BatteryStatsManager batteryStats,
-            Looper looper) {
+            BatteryStatsManager batteryStats) {
         mBatteryStats = batteryStats;
         mActiveModeWarden = activeModeWarden;
-        mHandler = new Handler(looper);
 
         mActiveModeWarden.registerPrimaryClientModeManagerChangedCallback(
                 new PrimaryClientModeManagerChangedCallback());
@@ -85,15 +80,13 @@
 
         @Override
         public void binderDied() {
-            mHandler.post(() -> {
-                Log.e(TAG, "Multicaster binderDied");
-                synchronized (mMulticasters) {
-                    int i = mMulticasters.indexOf(this);
-                    if (i != -1) {
-                        removeMulticasterLocked(i, mUid, mTag);
-                    }
+            Log.e(TAG, "Multicaster binderDied");
+            synchronized (mMulticasters) {
+                int i = mMulticasters.indexOf(this);
+                if (i != -1) {
+                    removeMulticasterLocked(i, mUid, mTag);
                 }
-            });
+            }
         }
 
         void unlinkDeathRecipient() {
@@ -123,8 +116,8 @@
         }
     }
 
-    protected void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
+    protected void enableVerboseLogging(int verbose) {
+        mVerboseLoggingEnabled = verbose > 0;
     }
 
     /** Start filtering if  no multicasters exist. */
diff --git a/service/java/com/android/server/wifi/WifiNative.java b/service/java/com/android/server/wifi/WifiNative.java
index 33332fe..33746bc 100644
--- a/service/java/com/android/server/wifi/WifiNative.java
+++ b/service/java/com/android/server/wifi/WifiNative.java
@@ -18,11 +18,6 @@
 
 import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
 
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP_BRIDGE;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_STA;
-import static com.android.server.wifi.WifiSettingsConfigStore.WIFI_NATIVE_SUPPORTED_FEATURES;
-
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
@@ -31,13 +26,10 @@
 import android.net.apf.ApfCapabilities;
 import android.net.wifi.CoexUnsafeChannel;
 import android.net.wifi.ScanResult;
-import android.net.wifi.SecurityParams;
 import android.net.wifi.SoftApConfiguration;
 import android.net.wifi.WifiAnnotations;
 import android.net.wifi.WifiAvailableChannel;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
-import android.net.wifi.WifiManager;
 import android.net.wifi.WifiScanner;
 import android.net.wifi.WifiSsid;
 import android.net.wifi.nl80211.DeviceWiphyCapabilities;
@@ -52,19 +44,16 @@
 import android.text.TextUtils;
 import android.util.ArraySet;
 import android.util.Log;
-import android.util.SparseArray;
 
 import com.android.internal.annotations.Immutable;
 import com.android.internal.util.HexDump;
 import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyStatus;
 import com.android.server.wifi.hotspot2.NetworkDetail;
 import com.android.server.wifi.util.FrameParser;
 import com.android.server.wifi.util.InformationElementUtil;
 import com.android.server.wifi.util.NativeUtil;
 import com.android.server.wifi.util.NetdWrapper;
 import com.android.server.wifi.util.NetdWrapper.NetdEventObserver;
-import com.android.wifi.resources.R;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
@@ -106,7 +95,6 @@
     private final Random mRandom;
     private final BuildProperties mBuildProperties;
     private final WifiInjector mWifiInjector;
-    private final WifiContext mContext;
     private NetdWrapper mNetdWrapper;
     private boolean mVerboseLoggingEnabled = false;
     private boolean mIsEnhancedOpenSupported = false;
@@ -115,7 +103,6 @@
     private CountryCodeChangeListenerInternal mCountryCodeChangeListener;
     private boolean mUseFakeScanDetails;
     private final ArrayList<ScanDetail> mFakeScanDetails = new ArrayList<>();
-    private long mCachedFeatureSet;
 
     public WifiNative(WifiVendorHal vendorHal,
                       SupplicantStaIfaceHal staIfaceHal, HostapdHal hostapdHal,
@@ -134,51 +121,50 @@
         mRandom = random;
         mBuildProperties = buildProperties;
         mWifiInjector = wifiInjector;
-        mContext = wifiInjector.getContext();
     }
 
     /**
      * Enable verbose logging for all sub modules.
      */
-    public void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        Log.d(TAG, "enableVerboseLogging " + verboseEnabled + " hal " + halVerboseEnabled);
-        mVerboseLoggingEnabled = verboseEnabled;
-        mWifiCondManager.enableVerboseLogging(verboseEnabled);
-        mSupplicantStaIfaceHal.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-        mHostapdHal.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-        mWifiVendorHal.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-        mIfaceMgr.enableVerboseLogging(verboseEnabled);
+    public void enableVerboseLogging(boolean verbose) {
+        mVerboseLoggingEnabled = verbose;
+        setSupplicantLogLevel(mVerboseLoggingEnabled);
+        mWifiCondManager.enableVerboseLogging(mVerboseLoggingEnabled);
+        mSupplicantStaIfaceHal.enableVerboseLogging(mVerboseLoggingEnabled);
+        mHostapdHal.enableVerboseLogging(mVerboseLoggingEnabled);
+        mWifiVendorHal.enableVerboseLogging(mVerboseLoggingEnabled);
+        mIfaceMgr.enableVerboseLogging(mVerboseLoggingEnabled);
     }
 
     /**
      * Callbacks for SoftAp interface.
      */
-    public class SoftApHalCallbackFromWificond implements WifiNl80211Manager.SoftApCallback {
+    public class SoftApListenerFromWificond implements WifiNl80211Manager.SoftApCallback {
         // placeholder for now - provide a shell so that clients don't use a
         // WifiNl80211Manager-specific API.
         private String mIfaceName;
-        private SoftApHalCallback mSoftApHalCallback;
+        private SoftApListener mSoftApListener;
 
-        SoftApHalCallbackFromWificond(String ifaceName,
-                SoftApHalCallback softApHalCallback) {
+        SoftApListenerFromWificond(String ifaceName,
+                SoftApListener softApListener) {
             mIfaceName = ifaceName;
-            mSoftApHalCallback = softApHalCallback;
+            mSoftApListener = softApListener;
         }
 
         @Override
         public void onFailure() {
-            mSoftApHalCallback.onFailure();
+            mSoftApListener.onFailure();
         }
 
         @Override
         public void onSoftApChannelSwitched(int frequency, int bandwidth) {
-            mSoftApHalCallback.onInfoChanged(mIfaceName, frequency, bandwidth,
+            mSoftApListener.onInfoChanged(mIfaceName, frequency, bandwidth,
                     ScanResult.WIFI_STANDARD_UNKNOWN, null);
         }
 
         @Override
         public void onConnectedClientsChanged(NativeWifiClient client, boolean isConnected) {
-            mSoftApHalCallback.onConnectedClientsChanged(mIfaceName,
+            mSoftApListener.onConnectedClientsChanged(mIfaceName,
                     client.getMacAddress(), isConnected);
         }
     }
@@ -210,18 +196,13 @@
     /**
      * Callbacks for SoftAp instance.
      */
-    public interface SoftApHalCallback {
+    public interface SoftApListener {
         /**
          * Invoked when there is a fatal failure and the SoftAp is shutdown.
          */
         void onFailure();
 
         /**
-         * Invoked when there is a fatal happen in specific instance only.
-         */
-        default void onInstanceFailure(String instanceName) {}
-
-        /**
          * Invoked when a channel switch event happens - i.e. the SoftAp is moved to a different
          * channel. Also called on initial registration.
          *
@@ -974,13 +955,12 @@
      * teardown any existing iface.
      */
     private String createApIface(@NonNull Iface iface, @NonNull WorkSource requestorWs,
-            @SoftApConfiguration.BandType int band, boolean isBridged,
-            @NonNull SoftApManager softApManager) {
+            @SoftApConfiguration.BandType int band, boolean isBridged) {
         synchronized (mLock) {
             if (mWifiVendorHal.isVendorHalSupported()) {
                 return mWifiVendorHal.createApIface(
                         new InterfaceDestoyedListenerInternal(iface.id), requestorWs,
-                        band, isBridged, softApManager);
+                        band, isBridged);
             } else {
                 Log.i(TAG, "Vendor Hal not supported, ignoring createApIface.");
                 return handleIfaceCreationWhenVendorHalNotSupported(iface);
@@ -1221,14 +1201,6 @@
                 mWifiMetrics.incrementNumSetupClientInterfaceFailureDueToSupplicant();
                 return null;
             }
-            if (mContext.getResources().getBoolean(
-                    R.bool.config_wifiNetworkCentricQosPolicyFeatureEnabled)) {
-                if (!mSupplicantStaIfaceHal.setNetworkCentricQosPolicyFeatureEnabled(
-                        iface.name, true)) {
-                    Log.e(TAG, "Failed to set QoS policy feature enabled for iface " + iface.name);
-                    return null;
-                }
-            }
             iface.networkObserver = new NetworkObserverInternal(iface.id);
             if (!registerNetworkObserver(iface.networkObserver)) {
                 Log.e(TAG, "Failed to register network observer on " + iface);
@@ -1239,12 +1211,10 @@
             // Just to avoid any race conditions with interface state change callbacks,
             // update the interface state before we exit.
             onInterfaceStateChanged(iface, isInterfaceUp(iface.name));
-            mWifiVendorHal.enableLinkLayerStats(iface.name);
             initializeNwParamsForClientInterface(iface.name);
             Log.i(TAG, "Successfully setup " + iface);
 
             iface.featureSet = getSupportedFeatureSetInternal(iface.name);
-            saveCompleteFeatureSetInConfigStoreIfNecessary(iface.featureSet);
             mIsEnhancedOpenSupported = (iface.featureSet & WIFI_FEATURE_OWE) != 0;
             return iface.name;
         }
@@ -1299,7 +1269,6 @@
             // Just to avoid any race conditions with interface state change callbacks,
             // update the interface state before we exit.
             onInterfaceStateChanged(iface, isInterfaceUp(iface.name));
-            mWifiVendorHal.enableLinkLayerStats(iface.name);
             Log.i(TAG, "Successfully setup " + iface);
 
             iface.featureSet = getSupportedFeatureSetInternal(iface.name);
@@ -1316,13 +1285,11 @@
      * @param interfaceCallback Associated callback for notifying status changes for the iface.
      * @param requestorWs Requestor worksource.
      * @param isBridged Whether or not AP interface is a bridge interface.
-     * @param softApManager SoftApManager of the request.
      * @return Returns the name of the allocated interface, will be null on failure.
      */
     public String setupInterfaceForSoftApMode(
             @NonNull InterfaceCallback interfaceCallback, @NonNull WorkSource requestorWs,
-            @SoftApConfiguration.BandType int band, boolean isBridged,
-            @NonNull SoftApManager softApManager) {
+            @SoftApConfiguration.BandType int band, boolean isBridged) {
         synchronized (mLock) {
             if (!startHal()) {
                 Log.e(TAG, "Failed to start Hal");
@@ -1340,7 +1307,7 @@
                 return null;
             }
             iface.externalListener = interfaceCallback;
-            iface.name = createApIface(iface, requestorWs, band, isBridged, softApManager);
+            iface.name = createApIface(iface, requestorWs, band, isBridged);
             if (TextUtils.isEmpty(iface.name)) {
                 Log.e(TAG, "Failed to create AP iface in vendor HAL");
                 mIfaceMgr.removeIface(iface.id);
@@ -1464,17 +1431,8 @@
                 mWifiMetrics.incrementNumSetupClientInterfaceFailureDueToSupplicant();
                 return false;
             }
-            if (mContext.getResources().getBoolean(
-                    R.bool.config_wifiNetworkCentricQosPolicyFeatureEnabled)) {
-                if (!mSupplicantStaIfaceHal.setNetworkCentricQosPolicyFeatureEnabled(
-                        iface.name, true)) {
-                    Log.e(TAG, "Failed to set QoS policy feature enabled for iface " + iface.name);
-                    return false;
-                }
-            }
             iface.type = Iface.IFACE_TYPE_STA_FOR_CONNECTIVITY;
             iface.featureSet = getSupportedFeatureSetInternal(iface.name);
-            saveCompleteFeatureSetInConfigStoreIfNecessary(iface.featureSet);
             mIsEnhancedOpenSupported = (iface.featureSet & WIFI_FEATURE_OWE) != 0;
             Log.i(TAG, "Successfully switched to connectivity mode on iface=" + iface);
             return true;
@@ -1684,15 +1642,18 @@
     public ArrayList<ScanDetail> getScanResults(@NonNull String ifaceName) {
         if (mUseFakeScanDetails) {
             synchronized (mFakeScanDetails) {
-                ArrayList<ScanDetail> copyList = new ArrayList<>();
+                ArrayList<ScanDetail> copy = new ArrayList<>();
                 for (ScanDetail sd: mFakeScanDetails) {
-                    ScanDetail copy = new ScanDetail(sd);
-                    copy.getScanResult().ifaceName = ifaceName;
+                    sd.getScanResult().ifaceName = ifaceName;
                     // otherwise the fake will be too old
-                    copy.getScanResult().timestamp = SystemClock.elapsedRealtime() * 1000;
-                    copyList.add(copy);
+                    sd.getScanResult().timestamp = SystemClock.elapsedRealtime() * 1000;
+
+                    // clone the ScanResult (which was updated above) so that each call gets a
+                    // unique timestamp
+                    copy.add(new ScanDetail(new ScanResult(sd.getScanResult()),
+                            sd.getNetworkDetail()));
                 }
-                return copyList;
+                return copy;
             }
         }
         return convertNativeScanResults(ifaceName, mWifiCondManager.getScanResults(
@@ -1750,23 +1711,11 @@
                 WifiNl80211Manager.SCAN_TYPE_PNO_SCAN));
     }
 
-    /**
-     * Get the max number of SSIDs that the driver supports per scan.
-     * @param ifaceName Name of the interface.
-     */
-    public int getMaxSsidsPerScan(@NonNull String ifaceName) {
-        if (SdkLevel.isAtLeastT()) {
-            return mWifiCondManager.getMaxSsidsPerScan(ifaceName);
-        } else {
-            return -1;
-        }
-    }
-
     private ArrayList<ScanDetail> convertNativeScanResults(@NonNull String ifaceName,
             List<NativeScanResult> nativeResults) {
         ArrayList<ScanDetail> results = new ArrayList<>();
         for (NativeScanResult result : nativeResults) {
-            WifiSsid wifiSsid = WifiSsid.fromBytes(result.getSsid());
+            WifiSsid wifiSsid = WifiSsid.createFromByteArray(result.getSsid());
             MacAddress bssidMac = result.getBssid();
             if (bssidMac == null) {
                 Log.e(TAG, "Invalid MAC (BSSID) for SSID " + wifiSsid);
@@ -1805,12 +1754,6 @@
                 scanResult.radioChainInfos[idx].level = nativeRadioChainInfo.getLevelDbm();
                 idx++;
             }
-
-            // Fill MLO Attributes
-            scanResult.setApMldMacAddress(networkDetail.getMldMacAddress());
-            scanResult.setApMloLinkId(networkDetail.getMloLinkId());
-            scanResult.setAffiliatedMloLinks(networkDetail.getAffiliatedMloLinks());
-
             results.add(scanDetail);
         }
         if (mVerboseLoggingEnabled) {
@@ -1833,8 +1776,6 @@
                 return ScanResult.WIFI_STANDARD_11AC;
             case InformationElementUtil.WifiMode.MODE_11AX:
                 return ScanResult.WIFI_STANDARD_11AX;
-            case InformationElementUtil.WifiMode.MODE_11BE:
-                return ScanResult.WIFI_STANDARD_11BE;
             case InformationElementUtil.WifiMode.MODE_UNDEFINED:
             default:
                 return ScanResult.WIFI_STANDARD_UNKNOWN;
@@ -2020,28 +1961,28 @@
      * @param ifaceName Name of the interface.
      * @param config Configuration to use for the soft ap created.
      * @param isMetered Indicates the network is metered or not.
-     * @param callback Callback for AP events.
+     * @param listener Callback for AP events.
      * @return true on success, false otherwise.
      */
     public boolean startSoftAp(
             @NonNull String ifaceName, SoftApConfiguration config, boolean isMetered,
-            SoftApHalCallback callback) {
+            SoftApListener listener) {
         if (mHostapdHal.isApInfoCallbackSupported()) {
-            if (!mHostapdHal.registerApCallback(ifaceName, callback)) {
-                Log.e(TAG, "Failed to register ap hal event callback");
+            if (!mHostapdHal.registerApCallback(ifaceName, listener)) {
+                Log.e(TAG, "Failed to register ap listener");
                 return false;
             }
         } else {
-            SoftApHalCallbackFromWificond softApHalCallbackFromWificond =
-                    new SoftApHalCallbackFromWificond(ifaceName, callback);
+            SoftApListenerFromWificond softApListenerFromWificond =
+                    new SoftApListenerFromWificond(ifaceName, listener);
             if (!mWifiCondManager.registerApCallback(ifaceName,
-                    Runnable::run, softApHalCallbackFromWificond)) {
-                Log.e(TAG, "Failed to register ap hal event callback from wificond");
+                    Runnable::run, softApListenerFromWificond)) {
+                Log.e(TAG, "Failed to register ap listener from wificond");
                 return false;
             }
         }
 
-        if (!mHostapdHal.addAccessPoint(ifaceName, config, isMetered, callback::onFailure)) {
+        if (!mHostapdHal.addAccessPoint(ifaceName, config, isMetered, listener::onFailure)) {
             Log.e(TAG, "Failed to add acccess point");
             mWifiMetrics.incrementNumSetupSoftApInterfaceFailureDueToHostapd();
             return false;
@@ -2879,9 +2820,9 @@
      */
     public boolean startDppConfiguratorInitiator(@NonNull String ifaceName, int peerBootstrapId,
             int ownBootstrapId, @NonNull String ssid, String password, String psk,
-            int netRole, int securityAkm, byte[] privEcKey)  {
+            int netRole, int securityAkm)  {
         return mSupplicantStaIfaceHal.startDppConfiguratorInitiator(ifaceName, peerBootstrapId,
-                ownBootstrapId, ssid, password, psk, netRole, securityAkm, privEcKey);
+                ownBootstrapId, ssid, password, psk, netRole, securityAkm);
     }
 
     /**
@@ -2933,13 +2874,6 @@
          * @param bandList List of bands the Enrollee supports.
          */
         void onFailure(int dppStatusCode, String ssid, String channelList, int[] bandList);
-
-        /**
-         * DPP Configurator Private keys update.
-         *
-         * @param key Configurator's private EC key.
-         */
-        void onDppConfiguratorKeyUpdate(byte[] key);
     }
 
     /**
@@ -3061,13 +2995,6 @@
         return mWifiVendorHal.isHalStarted();
     }
 
-    /**
-     * Tests whether the HAL is supported or not
-     */
-    public boolean isHalSupported() {
-        return mWifiVendorHal.isVendorHalSupported();
-    }
-
     // TODO: Change variable names to camel style.
     public static class ScanCapabilities {
         public int  max_scan_cache_size;
@@ -3336,26 +3263,13 @@
             @WifiAvailableChannel.Filter int filter) {
         return mWifiVendorHal.getUsableChannels(band, mode, filter);
     }
-    /**
-     * Returns whether the device supports the requested
-     * {@link HalDeviceManager.HdmIfaceTypeForCreation} combo.
-     */
-    public boolean canDeviceSupportCreateTypeCombo(SparseArray<Integer> combo) {
-        synchronized (mLock) {
-            return mWifiVendorHal.canDeviceSupportCreateTypeCombo(combo);
-        }
-    }
 
     /**
      * Returns whether STA + AP concurrency is supported or not.
      */
     public boolean isStaApConcurrencySupported() {
         synchronized (mLock) {
-            return mWifiVendorHal.canDeviceSupportCreateTypeCombo(
-                    new SparseArray<Integer>() {{
-                            put(HDM_CREATE_IFACE_STA, 1);
-                            put(HDM_CREATE_IFACE_AP, 1);
-                    }});
+            return mWifiVendorHal.isStaApConcurrencySupported();
         }
     }
 
@@ -3364,10 +3278,7 @@
      */
     public boolean isStaStaConcurrencySupported() {
         synchronized (mLock) {
-            return mWifiVendorHal.canDeviceSupportCreateTypeCombo(
-                    new SparseArray<Integer>() {{
-                            put(HDM_CREATE_IFACE_STA, 2);
-                    }});
+            return mWifiVendorHal.isStaStaConcurrencySupported();
         }
     }
 
@@ -3376,58 +3287,15 @@
      */
     public boolean isItPossibleToCreateApIface(@NonNull WorkSource requestorWs) {
         synchronized (mLock) {
-            if (!isHalStarted()) {
-                return canDeviceSupportCreateTypeCombo(
-                        new SparseArray<Integer>() {{
-                            put(HDM_CREATE_IFACE_AP, 1);
-                        }});
-            }
             return mWifiVendorHal.isItPossibleToCreateApIface(requestorWs);
         }
     }
 
     /**
-     * Returns whether a new AP iface can be created or not.
-     */
-    public boolean isItPossibleToCreateBridgedApIface(@NonNull WorkSource requestorWs) {
-        synchronized (mLock) {
-            if (!isHalStarted()) {
-                return canDeviceSupportCreateTypeCombo(
-                        new SparseArray<Integer>() {{
-                            put(HDM_CREATE_IFACE_AP_BRIDGE, 1);
-                        }});
-            }
-            return mWifiVendorHal.isItPossibleToCreateBridgedApIface(requestorWs);
-        }
-    }
-
-    /**
-     * Returns whether creating a single AP does not require destroying an existing iface, but
-     * creating a bridged AP does.
-     */
-    public boolean shouldDowngradeToSingleApForConcurrency(@NonNull WorkSource requestorWs) {
-        synchronized (mLock) {
-            if (!mWifiVendorHal.isHalStarted()) {
-                return false;
-            }
-            return !mWifiVendorHal.canDeviceSupportAdditionalIface(HDM_CREATE_IFACE_AP_BRIDGE,
-                    requestorWs)
-                    && mWifiVendorHal.canDeviceSupportAdditionalIface(HDM_CREATE_IFACE_AP,
-                    requestorWs);
-        }
-    }
-
-    /**
      * Returns whether a new STA iface can be created or not.
      */
     public boolean isItPossibleToCreateStaIface(@NonNull WorkSource requestorWs) {
         synchronized (mLock) {
-            if (!isHalStarted()) {
-                return canDeviceSupportCreateTypeCombo(
-                        new SparseArray<Integer>() {{
-                            put(HDM_CREATE_IFACE_STA, 1);
-                        }});
-            }
             return mWifiVendorHal.isItPossibleToCreateStaIface(requestorWs);
         }
     }
@@ -3472,22 +3340,15 @@
      * @param ifaceName Name of the interface.
      * @return bitmask defined by WifiManager.WIFI_FEATURE_*
      */
-    public long getSupportedFeatureSet(String ifaceName) {
+    public long getSupportedFeatureSet(@NonNull String ifaceName) {
         synchronized (mLock) {
-            long featureSet = 0;
-            // First get the complete feature set stored in config store when supplicant was
-            // started
-            featureSet = getCompleteFeatureSetFromConfigStore();
-            // Include the feature set saved in interface class. This is to make sure that
-            // framework is returning the feature set for SoftAp only products and multi-chip
-            // products.
-            if (ifaceName != null) {
-                Iface iface = mIfaceMgr.getIface(ifaceName);
-                if (iface != null) {
-                    featureSet |= iface.featureSet;
-                }
+            Iface iface = mIfaceMgr.getIface(ifaceName);
+            if (iface == null) {
+                Log.e(TAG, "Could not get Iface object for interface " + ifaceName);
+                return 0;
             }
-            return featureSet;
+
+            return iface.featureSet;
         }
     }
 
@@ -3498,18 +3359,9 @@
      * @return bitmask defined by WifiManager.WIFI_FEATURE_*
      */
     private long getSupportedFeatureSetInternal(@NonNull String ifaceName) {
-        long featureSet = mSupplicantStaIfaceHal.getAdvancedCapabilities(ifaceName)
+        return mSupplicantStaIfaceHal.getAdvancedCapabilities(ifaceName)
                 | mWifiVendorHal.getSupportedFeatureSet(ifaceName)
                 | mSupplicantStaIfaceHal.getWpaDriverFeatureSet(ifaceName);
-        if (SdkLevel.isAtLeastT()) {
-            if (((featureSet & WifiManager.WIFI_FEATURE_DPP) != 0)
-                    && mContext.getResources().getBoolean(R.bool.config_wifiDppAkmSupported)) {
-                // Set if DPP is filled by supplicant and DPP AKM is enabled by overlay.
-                featureSet |= WifiManager.WIFI_FEATURE_DPP_AKM;
-                Log.v(TAG, ": DPP AKM supported");
-            }
-        }
-        return featureSet;
     }
 
     /**
@@ -3541,39 +3393,6 @@
     }
 
     /**
-     * Class to represent a connection MLO Link
-     */
-    public static class ConnectionMloLink {
-        public int linkId;
-        public MacAddress staMacAddress;
-
-        ConnectionMloLink() {
-            // Nothing for now
-        };
-    }
-
-    /**
-     * Class to represent the MLO links info for a connection that is collected after association
-     */
-    public static class ConnectionMloLinksInfo {
-        public ConnectionMloLink[] links;
-
-        ConnectionMloLinksInfo() {
-            // Nothing for now
-        }
-    }
-
-    /**
-     * Returns connection MLO Links Info.
-     *
-     * @param ifaceName Name of the interface.
-     * @return connection MLO Links Info
-     */
-    public ConnectionMloLinksInfo getConnectionMloLinksInfo(@NonNull String ifaceName) {
-        return mSupplicantStaIfaceHal.getConnectionMloLinksInfo(ifaceName);
-    }
-
-    /**
      * Get the APF (Android Packet Filter) capabilities of the device
      * @param ifaceName Name of the interface.
      */
@@ -3772,15 +3591,6 @@
         return mWifiVendorHal.getDriverStateDump();
     }
 
-    /**
-     * Dump information about the internal state
-     *
-     * @param pw PrintWriter to write dump to
-     */
-    protected void dump(PrintWriter pw) {
-        mHostapdHal.dump(pw);
-    }
-
     //---------------------------------------------------------------------------------
     /* Packet fate API */
 
@@ -4321,112 +4131,4 @@
             mCountryCodeChangeListener.setChangeListener(listener);
         }
     }
-
-    /**
-     * Gets the security params of the current network associated with this interface
-     *
-     * @param ifaceName Name of the interface
-     * @return Security params of the current network associated with the interface
-     */
-    public SecurityParams getCurrentNetworkSecurityParams(@NonNull String ifaceName) {
-        return mSupplicantStaIfaceHal.getCurrentNetworkSecurityParams(ifaceName);
-    }
-
-    /**
-     * Sends a QoS policy response.
-     *
-     * @param ifaceName Name of the interface.
-     * @param qosPolicyRequestId Dialog token to identify the request.
-     * @param morePolicies Flag to indicate more QoS policies can be accommodated.
-     * @param qosPolicyStatusList List of framework QosPolicyStatus objects.
-     * @return true if response is sent successfully, false otherwise.
-     */
-    public boolean sendQosPolicyResponse(String ifaceName, int qosPolicyRequestId,
-            boolean morePolicies, @NonNull List<QosPolicyStatus> qosPolicyStatusList) {
-        return mSupplicantStaIfaceHal.sendQosPolicyResponse(ifaceName, qosPolicyRequestId,
-                morePolicies, qosPolicyStatusList);
-    }
-
-    /**
-     * Indicates the removal of all active QoS policies configured by the AP.
-     *
-     * @param ifaceName Name of the interface.
-     */
-    public boolean removeAllQosPolicies(String ifaceName) {
-        return mSupplicantStaIfaceHal.removeAllQosPolicies(ifaceName);
-    }
-
-    /**
-     * Generate DPP credential for network access
-     *
-     * @param ifaceName Name of the interface.
-     * @param ssid ssid of the network
-     * @param privEcKey Private EC Key for DPP Configurator
-     * Returns true when operation is successful. On error, false is returned.
-     */
-    public boolean generateSelfDppConfiguration(@NonNull String ifaceName, @NonNull String ssid,
-            byte[] privEcKey) {
-        return mSupplicantStaIfaceHal.generateSelfDppConfiguration(ifaceName, ssid, privEcKey);
-    }
-
-    /**
-     * This set anonymous identity to supplicant.
-     *
-     * @param ifaceName Name of the interface.
-     * @param anonymousIdentity the anonymouns identity.
-     * @return true if succeeds, false otherwise.
-     */
-    public boolean setEapAnonymousIdentity(@NonNull String ifaceName, String anonymousIdentity) {
-        if (null == anonymousIdentity) {
-            Log.e(TAG, "Cannot set null anonymous identity.");
-            return false;
-        }
-        return mSupplicantStaIfaceHal.setEapAnonymousIdentity(ifaceName, anonymousIdentity);
-    }
-
-    /**
-     * Notify wificond daemon of country code have changed.
-     */
-    public void countryCodeChanged(String countryCode) {
-        if (SdkLevel.isAtLeastT()) {
-            try {
-                mWifiCondManager.notifyCountryCodeChanged(countryCode);
-            } catch (RuntimeException re) {
-                Log.e(TAG, "Fail to notify wificond country code changed to " + countryCode
-                        + "because exception happened:" + re);
-            }
-        }
-    }
-
-    /**
-     * Save the complete list of features retrieved from WiFi HAL and Supplicant HAL in
-     * config store.
-     */
-    private void saveCompleteFeatureSetInConfigStoreIfNecessary(long featureSet) {
-        long cachedFeatureSet = getCompleteFeatureSetFromConfigStore();
-        if (cachedFeatureSet != featureSet) {
-            mCachedFeatureSet = featureSet;
-            mWifiInjector.getSettingsConfigStore()
-                    .put(WIFI_NATIVE_SUPPORTED_FEATURES, mCachedFeatureSet);
-            Log.i(TAG, "Supported features is updated in config store: " + mCachedFeatureSet);
-        }
-    }
-
-    /**
-     * Get the feature set from cache/config store
-     */
-    private long getCompleteFeatureSetFromConfigStore() {
-        if (mCachedFeatureSet == 0) {
-            mCachedFeatureSet = mWifiInjector.getSettingsConfigStore()
-                    .get(WIFI_NATIVE_SUPPORTED_FEATURES);
-        }
-        return mCachedFeatureSet;
-    }
-
-    /**
-     * Returns whether or not the hostapd HAL supports reporting single instance died event.
-     */
-    public boolean isSoftApInstanceDiedHandlerSupported() {
-        return mHostapdHal.isSoftApInstanceDiedHandlerSupported();
-    }
 }
diff --git a/service/java/com/android/server/wifi/WifiNetworkAgent.java b/service/java/com/android/server/wifi/WifiNetworkAgent.java
index 64b424b..b20387a 100644
--- a/service/java/com/android/server/wifi/WifiNetworkAgent.java
+++ b/service/java/com/android/server/wifi/WifiNetworkAgent.java
@@ -46,7 +46,6 @@
         void onRemoveKeepalivePacketFilter(int slot);
         void onSignalStrengthThresholdsUpdated(@NonNull int[] thresholds);
         void onAutomaticReconnectDisabled();
-        void onDscpPolicyStatusUpdated(int policyId, int status);
     }
 
     private final Callback mCallback;
@@ -128,11 +127,6 @@
         mCallback.onAutomaticReconnectDisabled();
     }
 
-    @Override
-    public void onDscpPolicyStatusUpdated(int policyId, int status) {
-        mCallback.onDscpPolicyStatusUpdated(policyId, status);
-    }
-
     @NonNull
     public Callback getCallback() {
         return mCallback;
diff --git a/service/java/com/android/server/wifi/WifiNetworkFactory.java b/service/java/com/android/server/wifi/WifiNetworkFactory.java
index 5d88be4..e125e94 100644
--- a/service/java/com/android/server/wifi/WifiNetworkFactory.java
+++ b/service/java/com/android/server/wifi/WifiNetworkFactory.java
@@ -47,12 +47,10 @@
 import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiConfiguration.SecurityType;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiNetworkSpecifier;
 import android.net.wifi.WifiScanner;
-import android.net.wifi.util.ScanResultUtil;
-import android.os.Build;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.os.Looper;
 import android.os.PatternMatcher;
 import android.os.PowerManager;
@@ -62,15 +60,13 @@
 import android.os.UserHandle;
 import android.os.WorkSource;
 import android.text.TextUtils;
-import android.util.ArraySet;
 import android.util.Log;
 import android.util.Pair;
 
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.HandlerExecutor;
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.proto.nano.WifiMetricsProto;
 import com.android.server.wifi.util.ActionListenerWrapper;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.wifi.resources.R;
 
@@ -78,7 +74,6 @@
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -121,7 +116,7 @@
     @VisibleForTesting
     public static final int NUM_OF_ACCESS_POINT_LIMIT_PER_APP = 50;
 
-    private final WifiContext mContext;
+    private final Context mContext;
     private final ActivityManager mActivityManager;
     private final AlarmManager mAlarmManager;
     private final AppOpsManager mAppOpsManager;
@@ -133,7 +128,6 @@
     private final WifiConfigStore mWifiConfigStore;
     private final WifiPermissionsUtil mWifiPermissionsUtil;
     private final WifiMetrics mWifiMetrics;
-    private final WifiNative mWifiNative;
     private final ActiveModeWarden mActiveModeWarden;
     private final WifiScanner.ScanSettings mScanSettings;
     private final NetworkFactoryScanListener mScanListener;
@@ -141,8 +135,6 @@
     private final ConnectionTimeoutAlarmListener mConnectionTimeoutAlarmListener;
     private final ConnectHelper mConnectHelper;
     private final ClientModeImplMonitor mClientModeImplMonitor;
-    private final FrameworkFacade mFacade;
-    private final MultiInternetManager mMultiInternetManager;
     private RemoteCallbackList<INetworkRequestMatchCallback> mRegisteredCallbacks;
     // Store all user approved access points for apps.
     @VisibleForTesting
@@ -160,12 +152,10 @@
     // successfully connect to the network, we transition that request to "connected".
     @Nullable private NetworkRequest mActiveSpecificNetworkRequest;
     @Nullable private WifiNetworkSpecifier mActiveSpecificNetworkRequestSpecifier;
-    private boolean mSkipUserDialogue;
     // Request corresponding to the the network that the device is currently connected to.
     @Nullable private NetworkRequest mConnectedSpecificNetworkRequest;
     @Nullable private WifiNetworkSpecifier mConnectedSpecificNetworkRequestSpecifier;
     @Nullable private WifiConfiguration mUserSelectedNetwork;
-    private Set<Integer> mConnectedUids = new ArraySet<>();
     private int mUserSelectedNetworkConnectRetryCount;
     // Map of bssid to latest scan results for all scan results matching a request. Will be
     //  - null, if there are no active requests.
@@ -272,7 +262,7 @@
                 Log.v(TAG, "Received " + scanResults.length + " scan results");
             }
             handleScanResults(scanResults);
-            if (!mSkipUserDialogue && mActiveMatchedScanResults != null) {
+            if (mActiveMatchedScanResults != null) {
                 sendNetworkRequestMatchCallbacksForActiveRequest(
                         mActiveMatchedScanResults.values());
             }
@@ -324,12 +314,11 @@
         @Override
         public void select(WifiConfiguration wifiConfiguration) {
             mHandler.post(() -> {
-                Log.i(TAG, "select configuration " + wifiConfiguration);
                 if (mActiveSpecificNetworkRequest != mNetworkRequest) {
                     Log.e(TAG, "Stale callback select received");
                     return;
                 }
-                handleConnectToNetworkUserSelection(wifiConfiguration, true);
+                handleConnectToNetworkUserSelection(wifiConfiguration);
             });
         }
 
@@ -520,7 +509,7 @@
         }
     }
 
-    public WifiNetworkFactory(Looper looper, WifiContext context, NetworkCapabilities nc,
+    public WifiNetworkFactory(Looper looper, Context context, NetworkCapabilities nc,
             ActivityManager activityManager, AlarmManager alarmManager,
             AppOpsManager appOpsManager,
             Clock clock, WifiInjector wifiInjector,
@@ -529,12 +518,9 @@
             WifiConfigStore configStore,
             WifiPermissionsUtil wifiPermissionsUtil,
             WifiMetrics wifiMetrics,
-            WifiNative wifiNative,
             ActiveModeWarden activeModeWarden,
             ConnectHelper connectHelper,
-            ClientModeImplMonitor clientModeImplMonitor,
-            FrameworkFacade facade,
-            MultiInternetManager multiInternetManager) {
+            ClientModeImplMonitor clientModeImplMonitor) {
         super(looper, context, TAG, nc);
         mContext = context;
         mActivityManager = activityManager;
@@ -548,7 +534,6 @@
         mWifiConfigStore = configStore;
         mWifiPermissionsUtil = wifiPermissionsUtil;
         mWifiMetrics = wifiMetrics;
-        mWifiNative = wifiNative;
         mActiveModeWarden = activeModeWarden;
         mConnectHelper = connectHelper;
         mClientModeImplMonitor = clientModeImplMonitor;
@@ -561,8 +546,6 @@
         mPeriodicScanTimerListener = new PeriodicScanAlarmListener();
         mConnectionTimeoutAlarmListener = new ConnectionTimeoutAlarmListener();
         mUserApprovedAccessPointMap = new HashMap<>();
-        mFacade = facade;
-        mMultiInternetManager = multiInternetManager;
 
         IntentFilter filter = new IntentFilter();
         filter.addAction(Intent.ACTION_SCREEN_ON);
@@ -666,14 +649,9 @@
             return true;
         }
         // Request from fg app can override any existing requests.
-        if (mFacade.isRequestFromForegroundApp(mContext, newRequest.getRequestorPackageName())) {
-            return true;
-        }
+        if (isRequestFromForegroundApp(newRequest.getRequestorPackageName())) return true;
         // Request from fg service can override only if the existing request is not from a fg app.
-        if (!mFacade.isRequestFromForegroundApp(mContext,
-                existingRequest.getRequestorPackageName())) {
-            return true;
-        }
+        if (!isRequestFromForegroundApp(existingRequest.getRequestorPackageName())) return true;
         Log.e(TAG, "Already processing request from a foreground app "
                 + existingRequest.getRequestorPackageName() + ". Rejecting request from "
                 + newRequest.getRequestorPackageName());
@@ -681,7 +659,6 @@
     }
 
     boolean isRequestWithWifiNetworkSpecifierValid(NetworkRequest networkRequest) {
-        WifiNetworkSpecifier wns = (WifiNetworkSpecifier) networkRequest.getNetworkSpecifier();
         // Request cannot have internet capability since such a request can never be fulfilled.
         // (NetworkAgent for connection with WifiNetworkSpecifier will not have internet capability)
         if (networkRequest.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)) {
@@ -706,7 +683,7 @@
                     + networkRequest.getRequestorPackageName() + ". Rejecting", e);
             return false;
         }
-
+        WifiNetworkSpecifier wns = (WifiNetworkSpecifier) networkRequest.getNetworkSpecifier();
         if (wns.getBand() != ScanResult.UNSPECIFIED) {
             Log.e(TAG, "Requesting specific frequency bands is not yet supported. Rejecting");
             return false;
@@ -734,14 +711,8 @@
                 Log.e(TAG, "Unsupported network specifier: " + ns + ". Rejecting");
                 return false;
             }
-            // MultiInternet Request to be handled by MultiInternetWifiNetworkFactory.
-            if (mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled()
-                    && MultiInternetWifiNetworkFactory.isWifiMultiInternetRequest(networkRequest)) {
-                return false;
-            }
             // Invalid request with wifi network specifier.
             if (!isRequestWithWifiNetworkSpecifierValid(networkRequest)) {
-                Log.e(TAG, "Invalid network specifier: " + ns + ". Rejecting");
                 releaseRequestAsUnfulfillableByAnyFactory(networkRequest);
                 return false;
             }
@@ -753,7 +724,7 @@
             // Only allow specific wifi network request from foreground app/service.
             if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(
                     networkRequest.getRequestorUid())
-                    && !mFacade.isRequestFromForegroundAppOrService(mContext,
+                    && !isRequestFromForegroundAppOrService(
                     networkRequest.getRequestorPackageName())) {
                 Log.e(TAG, "Request not from foreground app or service."
                         + " Rejecting request from " + networkRequest.getRequestorPackageName());
@@ -780,8 +751,7 @@
             }
             if (mVerboseLoggingEnabled) {
                 Log.v(TAG, "Accepted network request with specifier from fg "
-                        + (mFacade.isRequestFromForegroundApp(mContext,
-                                networkRequest.getRequestorPackageName())
+                        + (isRequestFromForegroundApp(networkRequest.getRequestorPackageName())
                         ? "app" : "service"));
             }
         }
@@ -811,14 +781,8 @@
                 Log.e(TAG, "Unsupported network specifier: " + ns + ". Ignoring");
                 return;
             }
-            // MultiInternet Request to be handled by MultiInternetWifiNetworkFactory.
-            if (mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled()
-                    && MultiInternetWifiNetworkFactory.isWifiMultiInternetRequest(networkRequest)) {
-                return;
-            }
             // Invalid request with wifi network specifier.
             if (!isRequestWithWifiNetworkSpecifierValid(networkRequest)) {
-                Log.e(TAG, "Invalid network specifier: " + ns + ". Rejecting");
                 releaseRequestAsUnfulfillableByAnyFactory(networkRequest);
                 return;
             }
@@ -842,29 +806,13 @@
             mActiveSpecificNetworkRequest = networkRequest;
             WifiNetworkSpecifier wns = (WifiNetworkSpecifier) ns;
             mActiveSpecificNetworkRequestSpecifier = new WifiNetworkSpecifier(
-                    wns.ssidPatternMatcher, wns.bssidPatternMatcher, wns.getBand(),
+                    wns.ssidPatternMatcher, wns.bssidPatternMatcher, ScanResult.UNSPECIFIED,
                     wns.wifiConfiguration);
-            mSkipUserDialogue = false;
             mWifiMetrics.incrementNetworkRequestApiNumRequest();
 
-            // special case for STA+STA: since we are not allowed to replace the primary STA we
-            // should check if we are able to get an interface for a secondary STA. If not - we
-            // want to escalate and display the dialog to the user EVEN if we have a normal bypass
-            // (normal == user approved before, if the app has full UI bypass we won't override it)
-            boolean revokeNormalBypass = false;
-            if (mContext.getResources().getBoolean(
-                    R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled)
-                    && !mWifiPermissionsUtil.isTargetSdkLessThan(
-                    mActiveSpecificNetworkRequest.getRequestorPackageName(), Build.VERSION_CODES.S,
-                    mActiveSpecificNetworkRequest.getRequestorUid())
-                    && mClientModeManager == null) {
-                revokeNormalBypass = !mWifiNative.isItPossibleToCreateStaIface(
-                        new WorkSource(mActiveSpecificNetworkRequest.getRequestorUid(),
-                                mActiveSpecificNetworkRequest.getRequestorPackageName()));
-            }
-
-
-            if (!triggerConnectIfUserApprovedMatchFound(revokeNormalBypass)) {
+            if (!triggerConnectIfUserApprovedMatchFound()) {
+                // Start UI to let the user grant/disallow this request from the app.
+                startUi();
                 // Didn't find an approved match, send the matching results to UI and trigger
                 // periodic scans for finding a network in the request.
                 // Fetch the latest cached scan results to speed up network matching.
@@ -873,13 +821,9 @@
                     Log.v(TAG, "Using cached " + cachedScanResults.length + " scan results");
                 }
                 handleScanResults(cachedScanResults);
-                // Start UI to let the user grant/disallow this request from the app.
-                if (!mSkipUserDialogue) {
-                    startUi();
-                    if (mActiveMatchedScanResults != null) {
-                        sendNetworkRequestMatchCallbacksForActiveRequest(
-                                mActiveMatchedScanResults.values());
-                    }
+                if (mActiveMatchedScanResults != null) {
+                    sendNetworkRequestMatchCallbacksForActiveRequest(
+                            mActiveMatchedScanResults.values());
                 }
                 startPeriodicScans();
             }
@@ -968,32 +912,6 @@
         return Pair.create(Process.INVALID_UID, "");
     }
 
-    /**
-     * Return the uids of the specific network request being processed if connected to the requested
-     * network.
-     *
-     * @param connectedNetwork WifiConfiguration corresponding to the connected network.
-     * @return Set of uids which request this network
-     */
-    public Set<Integer> getSpecificNetworkRequestUids(
-            @NonNull WifiConfiguration connectedNetwork, @NonNull String connectedBssid) {
-        if (mUserSelectedNetwork == null || connectedNetwork == null) {
-            return Collections.emptySet();
-        }
-        if (!isUserSelectedNetwork(connectedNetwork, connectedBssid)) {
-            Log.w(TAG, "Connected to unknown network " + connectedNetwork + ":" + connectedBssid
-                    + ". Ignoring...");
-            return Collections.emptySet();
-        }
-        if (mConnectedSpecificNetworkRequestSpecifier != null) {
-            return mConnectedUids;
-        }
-        if (mActiveSpecificNetworkRequestSpecifier != null) {
-            return Set.of(mActiveSpecificNetworkRequest.getRequestorUid());
-        }
-        return Collections.emptySet();
-    }
-
     // Helper method to add the provided network configuration to WifiConfigManager, if it does not
     // already exist & return the allocated network ID. This ID will be used in the CONNECT_NETWORK
     // request to ClientModeImpl.
@@ -1012,7 +930,7 @@
         NetworkUpdateResult networkUpdateResult =
                 mWifiConfigManager.addOrUpdateNetwork(
                         network, mActiveSpecificNetworkRequest.getRequestorUid(),
-                        mActiveSpecificNetworkRequest.getRequestorPackageName(), false);
+                        mActiveSpecificNetworkRequest.getRequestorPackageName());
         if (mVerboseLoggingEnabled) {
             Log.v(TAG, "Added network to config manager " + networkUpdateResult.getNetworkId());
         }
@@ -1073,15 +991,13 @@
                 mClientModeManager,
                 new NetworkUpdateResult(networkId),
                 new ActionListenerWrapper(listener),
-                mActiveSpecificNetworkRequest.getRequestorUid(),
-                mActiveSpecificNetworkRequest.getRequestorPackageName());
+                mActiveSpecificNetworkRequest.getRequestorUid());
 
         // Post an alarm to handle connection timeout.
         scheduleConnectionTimeout();
     }
 
-    private void handleConnectToNetworkUserSelectionInternal(WifiConfiguration network,
-            boolean didUserSeeUi) {
+    private void handleConnectToNetworkUserSelectionInternal(WifiConfiguration network) {
         // Copy over the credentials from the app's request and then copy the ssid from user
         // selection.
         WifiConfiguration networkToConnect =
@@ -1110,18 +1026,15 @@
         mUserSelectedNetwork = networkToConnect;
 
         // Request a new CMM for the connection processing.
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG,
-                    "Requesting new ClientModeManager instance - didUserSeeUi = " + didUserSeeUi);
-        }
-        WorkSource ws = new WorkSource(mActiveSpecificNetworkRequest.getRequestorUid(),
-                mActiveSpecificNetworkRequest.getRequestorPackageName());
-        mActiveModeWarden.requestLocalOnlyClientModeManager(new ClientModeManagerRequestListener(),
-                ws, networkToConnect.SSID, networkToConnect.BSSID, didUserSeeUi);
+        if (mVerboseLoggingEnabled) Log.v(TAG, "Requesting new ClientModeManager instance");
+        mActiveModeWarden.requestLocalOnlyClientModeManager(
+                new ClientModeManagerRequestListener(),
+                new WorkSource(mActiveSpecificNetworkRequest.getRequestorUid(),
+                        mActiveSpecificNetworkRequest.getRequestorPackageName()),
+                networkToConnect.SSID, networkToConnect.BSSID);
     }
 
-    private void handleConnectToNetworkUserSelection(WifiConfiguration network,
-            boolean didUserSeeUi) {
+    private void handleConnectToNetworkUserSelection(WifiConfiguration network) {
         Log.d(TAG, "User initiated connect to network: " + network.SSID);
 
         // Cancel the ongoing scans after user selection.
@@ -1129,7 +1042,7 @@
         mIsPeriodicScanEnabled = false;
 
         // Trigger connection attempts.
-        handleConnectToNetworkUserSelectionInternal(network, didUserSeeUi);
+        handleConnectToNetworkUserSelectionInternal(network);
 
         // Add the network to the approved access point map for the app.
         addNetworkToUserApprovedAccessPointMap(mUserSelectedNetwork);
@@ -1182,9 +1095,20 @@
             return;
         }
         Log.d(TAG, "Connected to network " + mUserSelectedNetwork);
-
+        if (mRegisteredCallbacks != null) {
+            int itemCount = mRegisteredCallbacks.beginBroadcast();
+            for (int i = 0; i < itemCount; i++) {
+                try {
+                    mRegisteredCallbacks.getBroadcastItem(i).onUserSelectionConnectSuccess(
+                            mUserSelectedNetwork);
+                } catch (RemoteException e) {
+                    Log.e(TAG, "Unable to invoke network request connect failure callback ", e);
+                }
+            }
+            mRegisteredCallbacks.finishBroadcast();
+        }
         // transition the request from "active" to "connected".
-        setupForConnectedRequest(true);
+        setupForConnectedRequest();
     }
 
     /**
@@ -1245,7 +1169,6 @@
 
     // Common helper method for start/end of active request processing.
     private void cleanupActiveRequest() {
-        if (mVerboseLoggingEnabled) Log.v(TAG, "cleanupActiveRequest");
         // Send the abort to the UI for the current active request.
         if (mRegisteredCallbacks != null) {
             int itemCount = mRegisteredCallbacks.beginBroadcast();
@@ -1268,7 +1191,6 @@
         // Reset the active network request.
         mActiveSpecificNetworkRequest = null;
         mActiveSpecificNetworkRequestSpecifier = null;
-        mSkipUserDialogue = false;
         mUserSelectedNetwork = null;
         mUserSelectedNetworkConnectRetryCount = 0;
         mIsPeriodicScanEnabled = false;
@@ -1318,39 +1240,13 @@
     }
 
     // Invoked at the start of new connected request processing.
-    private void setupForConnectedRequest(boolean newConnection) {
-        if (mRegisteredCallbacks != null) {
-            int itemCount = mRegisteredCallbacks.beginBroadcast();
-            for (int i = 0; i < itemCount; i++) {
-                try {
-                    mRegisteredCallbacks.getBroadcastItem(i).onUserSelectionConnectSuccess(
-                            mUserSelectedNetwork);
-                } catch (RemoteException e) {
-                    Log.e(TAG, "Unable to invoke network request connect failure callback ", e);
-                }
-            }
-            mRegisteredCallbacks.finishBroadcast();
-        }
-        if (newConnection) {
-            mConnectedSpecificNetworkRequest = mActiveSpecificNetworkRequest;
-            mConnectedSpecificNetworkRequestSpecifier = mActiveSpecificNetworkRequestSpecifier;
-            mConnectedUids.clear();
-        }
-        if (mActiveSpecificNetworkRequest.getRequestorUid() == 0) {
-            // For shell test call from root
-            mConnectedUids.add(Process.SYSTEM_UID);
-        } else {
-            mConnectedUids.add(mActiveSpecificNetworkRequest.getRequestorUid());
-        }
+    private void setupForConnectedRequest() {
+        mConnectedSpecificNetworkRequest = mActiveSpecificNetworkRequest;
+        mConnectedSpecificNetworkRequestSpecifier = mActiveSpecificNetworkRequestSpecifier;
         mActiveSpecificNetworkRequest = null;
         mActiveSpecificNetworkRequestSpecifier = null;
-        mSkipUserDialogue = false;
         mActiveMatchedScanResults = null;
         mPendingConnectionSuccess = false;
-        if (!newConnection) {
-            mClientModeManager.updateCapabilities();
-            return;
-        }
         // Cancel connection timeout alarm.
         cancelConnectionTimeout();
 
@@ -1380,7 +1276,6 @@
         disconnectAndRemoveNetworkFromWifiConfigManager(mUserSelectedNetwork);
         mConnectedSpecificNetworkRequest = null;
         mConnectedSpecificNetworkRequestSpecifier = null;
-        mConnectedUids.clear();
 
         if (mConnectionStartTimeMillis != -1) {
             int connectionDurationSec = toIntExact(TimeUnit.MILLISECONDS.toSeconds(
@@ -1408,6 +1303,32 @@
     }
 
     /**
+     * Check if the request comes from foreground app/service.
+     */
+    private boolean isRequestFromForegroundAppOrService(@NonNull String requestorPackageName) {
+        try {
+            return mActivityManager.getPackageImportance(requestorPackageName)
+                    <= ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND_SERVICE;
+        } catch (SecurityException e) {
+            Log.e(TAG, "Failed to check the app state", e);
+            return false;
+        }
+    }
+
+    /**
+     * Check if the request comes from foreground app.
+     */
+    private boolean isRequestFromForegroundApp(@NonNull String requestorPackageName) {
+        try {
+            return mActivityManager.getPackageImportance(requestorPackageName)
+                    <= ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND;
+        } catch (SecurityException e) {
+            Log.e(TAG, "Failed to check the app state", e);
+            return false;
+        }
+    }
+
+    /**
      * Helper method to populate WifiScanner handle. This is done lazily because
      * WifiScanningService is started after WifiService.
      */
@@ -1426,21 +1347,6 @@
                     + "retrieval..");
             return;
         }
-        // TODO(230795804): remove the car mode check when we can smooth switch the ownership of the
-        //  network and attribute to the right App with correct package name.
-        if (SdkLevel.isAtLeastS() && ActiveModeWarden
-                .isClientModeManagerConnectedOrConnectingToBssid(mClientModeManager,
-                mUserSelectedNetwork.SSID, mUserSelectedNetwork.BSSID)
-                && mConnectedSpecificNetworkRequest != null
-                && !WifiConfigurationUtil.hasCredentialChanged(
-                        mConnectedSpecificNetworkRequestSpecifier.wifiConfiguration,
-                mActiveSpecificNetworkRequestSpecifier.wifiConfiguration)
-                && !mWifiPermissionsUtil.checkEnterCarModePrioritized(
-                        mActiveSpecificNetworkRequest.getRequestorUid())) {
-            // Already connected to the same network.
-            setupForConnectedRequest(false);
-            return;
-        }
 
         // If using primary STA, disable Auto-join so that NetworkFactory can take control of the
         // network connection.
@@ -1698,32 +1604,15 @@
         if (approvedAccessPoints == null) return false;
         AccessPoint accessPoint =
                 new AccessPoint(ssid, bssid, networkType);
-        if (approvedAccessPoints.contains(accessPoint)) {
-            // keep the most recently used AP in the end
-            approvedAccessPoints.remove(accessPoint);
-            approvedAccessPoints.add(accessPoint);
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "Found " + bssid
-                        + " in internal user approved access point for " + requestorPackageName);
-            }
-            return true;
+        if (!approvedAccessPoints.contains(accessPoint)) return false;
+        // keep the most recently used AP in the end
+        approvedAccessPoints.remove(accessPoint);
+        approvedAccessPoints.add(accessPoint);
+        if (mVerboseLoggingEnabled) {
+            Log.v(TAG, "Found " + bssid
+                    + " in internal user approved access point for " + requestorPackageName);
         }
-        // AP does not match, but check if SSID + security type match
-        if (networkType == WifiConfiguration.SECURITY_TYPE_OPEN
-                || networkType == WifiConfiguration.SECURITY_TYPE_OWE) {
-            // require exact BSSID match for open networks
-            return false;
-        }
-        // Only require SSID and SecurityType match for non-open networks.
-        if (approvedAccessPoints.stream()
-                .anyMatch((ap) -> ap.ssid.equals(ssid) && ap.networkType == networkType)) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "Found SSID=" + ssid
-                        + " in internal user approved access point for " + requestorPackageName);
-            }
-            return true;
-        }
-        return false;
+        return true;
     }
 
     private boolean isAccessPointApprovedInCompanionDeviceManager(
@@ -1745,7 +1634,7 @@
     }
 
     private boolean isAccessPointApprovedForActiveRequest(@NonNull String ssid,
-            @NonNull MacAddress bssid, @SecurityType int networkType, boolean revokeNormalBypass) {
+            @NonNull MacAddress bssid, @SecurityType int networkType) {
         String requestorPackageName = mActiveSpecificNetworkRequest.getRequestorPackageName();
         UserHandle requestorUserHandle =
                 UserHandle.getUserHandleForUid(mActiveSpecificNetworkRequest.getRequestorUid());
@@ -1755,7 +1644,7 @@
             return true;
         }
         // Check if access point is approved in internal approval list next.
-        if (!revokeNormalBypass && isAccessPointApprovedInInternalApprovalList(
+        if (isAccessPointApprovedInInternalApprovalList(
                 ssid, bssid, networkType, requestorPackageName)) {
             return true;
         }
@@ -1819,14 +1708,9 @@
      *
      * @return true if a pre-approved network was found for connection, false otherwise.
      */
-    private boolean triggerConnectIfUserApprovedMatchFound(boolean revokeNormalBypass) {
+    private boolean triggerConnectIfUserApprovedMatchFound() {
         if (mActiveSpecificNetworkRequestSpecifier == null) return false;
-        boolean requestForSingleAccessPoint = isActiveRequestForSingleAccessPoint();
-        if (!requestForSingleAccessPoint && !isActiveRequestForSingleNetwork()) {
-            Log.i(TAG, "ActiveRequest not for single access point or network.");
-            return false;
-        }
-
+        if (!isActiveRequestForSingleAccessPoint()) return false;
         String ssid = mActiveSpecificNetworkRequestSpecifier.ssidPatternMatcher.getPath();
         MacAddress bssid = mActiveSpecificNetworkRequestSpecifier.bssidPatternMatcher.first;
         SecurityParams params =
@@ -1835,31 +1719,22 @@
                                 .getFirstAvailableSecurityParams();
         if (null == params) return false;
         int networkType = params.getSecurityType();
-
-        if (!isAccessPointApprovedForActiveRequest(ssid, bssid, networkType, revokeNormalBypass)
+        if (!isAccessPointApprovedForActiveRequest(ssid, bssid, networkType)
                 || mWifiConfigManager.isNetworkTemporarilyDisabledByUser(
-                ScanResultUtil.createQuotedSsid(ssid))) {
+                ScanResultUtil.createQuotedSSID(ssid))) {
             if (mVerboseLoggingEnabled) {
                 Log.v(TAG, "No approved access point found");
             }
             return false;
         }
-        if (requestForSingleAccessPoint) {
-            Log.v(TAG, "Approved access point found in matching scan results. "
-                    + "Triggering connect " + ssid + "/" + bssid);
-            // Request is for a single AP which is already approved. Connect directly.
-            WifiConfiguration config = mActiveSpecificNetworkRequestSpecifier.wifiConfiguration;
-            config.SSID = "\"" + ssid + "\"";
-            config.BSSID = bssid.toString();
-            handleConnectToNetworkUserSelectionInternal(config, false);
-            mWifiMetrics.incrementNetworkRequestApiNumUserApprovalBypass();
-            return true;
-        }
-        // request is for a single network (but not a particular AP) that's already approved.
-        // Scanning is still needed to select the best BSSID, but allow skipping the UI.
-        Log.v(TAG, "Approved network found. Allowing user dialogue to get bypassed.");
-        mSkipUserDialogue = true;
-        return false;
+        Log.v(TAG, "Approved access point found in matching scan results. "
+                + "Triggering connect " + ssid + "/" + bssid);
+        WifiConfiguration config = mActiveSpecificNetworkRequestSpecifier.wifiConfiguration;
+        config.SSID = "\"" + ssid + "\"";
+        config.BSSID = bssid.toString();
+        handleConnectToNetworkUserSelectionInternal(config);
+        mWifiMetrics.incrementNetworkRequestApiNumUserApprovalBypass();
+        return true;
     }
 
     /**
@@ -1889,16 +1764,6 @@
         mActiveMatchedScanResults.entrySet().removeIf(
                 e -> ((currentTimeInMillis - (e.getValue().timestamp / 1000))
                         >= CACHED_SCAN_RESULTS_MAX_AGE_IN_MILLIS));
-        if (!mActiveMatchedScanResults.isEmpty() && mSkipUserDialogue) {
-            WifiConfiguration config = mActiveSpecificNetworkRequestSpecifier.wifiConfiguration;
-            config.SSID = "\""
-                    + mActiveSpecificNetworkRequestSpecifier.ssidPatternMatcher.getPath() + "\"";
-            config.BSSID = findBestBssidFromActiveMatchedScanResultsForNetwork(
-                    ScanResultMatchInfo.fromWifiConfiguration(config));
-            Log.v(TAG, "Bypassing user dialog for connection to SSID="
-                    + config.SSID + ", BSSID=" + config.BSSID);
-            handleConnectToNetworkUserSelection(config, false);
-        }
     }
 
     /**
diff --git a/service/java/com/android/server/wifi/WifiNetworkScoreCache.java b/service/java/com/android/server/wifi/WifiNetworkScoreCache.java
new file mode 100644
index 0000000..6bb3708
--- /dev/null
+++ b/service/java/com/android/server/wifi/WifiNetworkScoreCache.java
@@ -0,0 +1,315 @@
+/*
+ * 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.server.wifi;
+
+import android.Manifest.permission;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.Context;
+import android.net.NetworkKey;
+import android.net.NetworkScoreManager;
+import android.net.ScoredNetwork;
+import android.net.wifi.ScanResult;
+import android.os.Handler;
+import android.os.Process;
+import android.util.Log;
+import android.util.LruCache;
+
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.util.Preconditions;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * {@link NetworkScoreManager.NetworkScoreCallback} implementation for Wifi Networks.
+ *
+ * Note: This is a copy of WifiNetworkScoreCache for internal usage by the wifi stack. This extends
+ * the formal API: {@link NetworkScoreManager.NetworkScoreCallback}
+ */
+public class WifiNetworkScoreCache extends NetworkScoreManager.NetworkScoreCallback {
+    private static final String TAG = "WifiNetworkScoreCache";
+    private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
+
+    // A Network scorer returns a score in the range [-128, +127]
+    // We treat the lowest possible score as though there were no score, effectively allowing the
+    // scorer to provide an RSSI threshold below which a network should not be used.
+    public static final int INVALID_NETWORK_SCORE = Byte.MIN_VALUE;
+
+    /** Default number entries to be stored in the {@link LruCache}. */
+    private static final int DEFAULT_MAX_CACHE_SIZE = 100;
+
+    // See {@link #CacheListener}.
+    @Nullable
+    @GuardedBy("mLock")
+    private CacheListener mListener;
+
+    private final Context mContext;
+    private final Object mLock = new Object();
+
+    // The key is of the form "<ssid>"<bssid>
+    // TODO: What about SSIDs that can't be encoded as UTF-8?
+    @GuardedBy("mLock")
+    private final LruCache<String, ScoredNetwork> mCache;
+
+    public WifiNetworkScoreCache(Context context) {
+        this(context, null /* listener */);
+    }
+
+    /**
+     * Instantiates a WifiNetworkScoreCache.
+     *
+     * @param context Application context
+     * @param listener CacheListener for cache updates
+     */
+    public WifiNetworkScoreCache(Context context, @Nullable CacheListener listener) {
+        this(context, listener, DEFAULT_MAX_CACHE_SIZE);
+    }
+
+    public WifiNetworkScoreCache(
+            Context context, @Nullable CacheListener listener, int maxCacheSize) {
+        mContext = context.getApplicationContext();
+        mListener = listener;
+        mCache = new LruCache<>(maxCacheSize);
+    }
+
+    @Override
+    public final void onScoresUpdated(Collection<ScoredNetwork> networks) {
+        if (networks == null || networks.isEmpty()) {
+            return;
+        }
+        if (DBG) {
+            Log.d(TAG, "updateScores list size=" + networks.size());
+        }
+
+        boolean changed = false;
+
+        synchronized (mLock) {
+            for (ScoredNetwork network : networks) {
+                String networkKey = buildNetworkKey(network);
+                if (networkKey == null) {
+                    if (DBG) {
+                        Log.d(TAG, "Failed to build network key for ScoredNetwork" + network);
+                    }
+                    continue;
+                }
+                mCache.put(networkKey, network);
+                changed = true;
+            }
+
+            if (mListener != null && changed) {
+                mListener.post(new ArrayList<>(networks));
+            }
+        }
+    }
+
+    @Override
+    public final void onScoresInvalidated() {
+        synchronized (mLock) {
+            mCache.evictAll();
+        }
+    }
+
+    /**
+     * Returns whether there is any score info for the given ScanResult.
+     *
+     * This includes null-score info, so it should only be used when determining whether to request
+     * scores from the network scorer.
+     */
+    public boolean isScoredNetwork(ScanResult result) {
+        return getScoredNetwork(result) != null;
+    }
+
+    /**
+     * Returns whether there is a non-null score curve for the given ScanResult.
+     *
+     * A null score curve has special meaning - we should never connect to an ephemeral network if
+     * the score curve is null.
+     */
+    public boolean hasScoreCurve(ScanResult result) {
+        ScoredNetwork network = getScoredNetwork(result);
+        return network != null && network.rssiCurve != null;
+    }
+
+    private int getNetworkScore(ScanResult result) {
+        int score = INVALID_NETWORK_SCORE;
+
+        ScoredNetwork network = getScoredNetwork(result);
+        if (network != null && network.rssiCurve != null) {
+            score = network.rssiCurve.lookupScore(result.level);
+            if (DBG) {
+                Log.d(TAG, "getNetworkScore found scored network " + network.networkKey
+                        + " score " + Integer.toString(score)
+                        + " RSSI " + result.level);
+            }
+        }
+        return score;
+    }
+
+    /**
+     * Returns the ScoredNetwork metered hint for a given ScanResult.
+     *
+     * If there is no ScoredNetwork associated with the ScanResult then false will be returned.
+     */
+    public boolean getMeteredHint(ScanResult result) {
+        ScoredNetwork network = getScoredNetwork(result);
+        return network != null && network.meteredHint;
+    }
+
+    /**
+     * Get network score for the provided ScanResult.
+     */
+    public int getNetworkScore(ScanResult result, boolean isActiveNetwork) {
+        int score = INVALID_NETWORK_SCORE;
+
+        ScoredNetwork network = getScoredNetwork(result);
+        if (network != null && network.rssiCurve != null) {
+            score = network.rssiCurve.lookupScore(result.level, isActiveNetwork);
+            if (DBG) {
+                Log.d(TAG, "getNetworkScore found scored network " + network.networkKey
+                        + " score " + Integer.toString(score)
+                        + " RSSI " + result.level
+                        + " isActiveNetwork " + isActiveNetwork);
+            }
+        }
+        return score;
+    }
+
+    @Nullable
+    private ScoredNetwork getScoredNetwork(ScanResult result) {
+        String key = buildNetworkKey(result);
+        if (key == null) return null;
+
+        synchronized (mLock) {
+            ScoredNetwork network = mCache.get(key);
+            return network;
+        }
+    }
+
+    /** Returns the ScoredNetwork for the given key. */
+    @Nullable
+    public ScoredNetwork getScoredNetwork(NetworkKey networkKey) {
+        String key = buildNetworkKey(networkKey);
+        if (key == null) {
+            if (DBG) {
+                Log.d(TAG, "Could not build key string for Network Key: " + networkKey);
+            }
+            return null;
+        }
+        synchronized (mLock) {
+            return mCache.get(key);
+        }
+    }
+
+    private String buildNetworkKey(ScoredNetwork network) {
+        if (network == null) {
+            return null;
+        }
+        return buildNetworkKey(network.networkKey);
+    }
+
+    private String buildNetworkKey(NetworkKey networkKey) {
+        if (networkKey == null) {
+            return null;
+        }
+        if (networkKey.wifiKey == null) return null;
+        if (networkKey.type == NetworkKey.TYPE_WIFI) {
+            String key = networkKey.wifiKey.ssid;
+            if (key == null) return null;
+            if (networkKey.wifiKey.bssid != null) {
+                key = key + networkKey.wifiKey.bssid;
+            }
+            return key;
+        }
+        return null;
+    }
+
+    private String buildNetworkKey(ScanResult result) {
+        if (result == null || result.SSID == null) {
+            return null;
+        }
+        StringBuilder key = new StringBuilder("\"");
+        key.append(result.SSID);
+        key.append("\"");
+        if (result.BSSID != null) {
+            key.append(result.BSSID);
+        }
+        return key.toString();
+    }
+
+    /**
+     * This is directly invoked from within Wifi-Service (on it's instance of this class), hence
+     * avoid making the WifiManager.getScanResults() call to avoid a deadlock.
+     */
+    public final void dumpWithLatestScanResults(
+            FileDescriptor fd, PrintWriter writer, String[] args,
+            List<ScanResult> latestScanResults) {
+        mContext.enforceCallingOrSelfPermission(permission.DUMP, TAG);
+        String header = String.format("WifiNetworkScoreCache (%s/%d)",
+                mContext.getPackageName(), Process.myUid());
+        writer.println(header);
+        writer.println("  All score curves:");
+        synchronized (mLock) {
+            for (ScoredNetwork score : mCache.snapshot().values()) {
+                writer.println("    " + score);
+            }
+            writer.println("  Network scores for latest ScanResults:");
+            for (ScanResult scanResult : latestScanResults) {
+                writer.println(
+                        "    " + buildNetworkKey(scanResult) + ": " + getNetworkScore(scanResult));
+            }
+        }
+    }
+
+    /** Listener for updates to the cache inside WifiNetworkScoreCache. */
+    public abstract static class CacheListener {
+        private Handler mHandler;
+
+        /**
+         * Constructor for CacheListener.
+         *
+         * @param handler the Handler on which to invoke the {@link #networkCacheUpdated} method.
+         *          This cannot be null.
+         */
+        public CacheListener(@NonNull Handler handler) {
+            Preconditions.checkNotNull(handler);
+            mHandler = handler;
+        }
+
+        /** Invokes the {@link #networkCacheUpdated(List<ScoredNetwork>)} method on the handler. */
+        void post(List<ScoredNetwork> updatedNetworks) {
+            mHandler.post(new Runnable() {
+                @Override
+                public void run() {
+                    networkCacheUpdated(updatedNetworks);
+                }
+            });
+        }
+
+        /**
+         * Invoked whenever the cache is updated.
+         *
+         * <p>Clearing the cache does not invoke this method.
+         *
+         * @param updatedNetworks the networks that were updated
+         */
+        public abstract void networkCacheUpdated(List<ScoredNetwork> updatedNetworks);
+    }
+}
diff --git a/service/java/com/android/server/wifi/WifiNetworkSelector.java b/service/java/com/android/server/wifi/WifiNetworkSelector.java
index b78f321..f1debca 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSelector.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSelector.java
@@ -21,9 +21,6 @@
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.annotation.SuppressLint;
-import android.app.admin.DevicePolicyManager;
-import android.app.admin.WifiSsidPolicy;
 import android.content.Context;
 import android.net.MacAddress;
 import android.net.wifi.ScanResult;
@@ -31,8 +28,6 @@
 import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiSsid;
-import android.net.wifi.util.ScanResultUtil;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
 import android.util.ArrayMap;
@@ -43,18 +38,16 @@
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.Preconditions;
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.hotspot2.NetworkDetail;
 import com.android.server.wifi.proto.nano.WifiMetricsProto;
 import com.android.server.wifi.util.InformationElementUtil.BssLoad;
-import com.android.server.wifi.util.WifiPermissionsUtil;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.wifi.resources.R;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -165,17 +158,16 @@
 
         /**
          * Evaluate all the networks from the scan results.
+         *
          * @param scanDetails              a list of scan details constructed from the scan results
          * @param untrustedNetworkAllowed  a flag to indicate if untrusted networks are allowed
          * @param oemPaidNetworkAllowed    a flag to indicate if oem paid networks are allowed
          * @param oemPrivateNetworkAllowed a flag to indicate if oem private networks are allowed
-         * @param restrictedNetworkAllowedUids a set of Uids are allowed for restricted network
          * @param onConnectableListener    callback to record all of the connectable networks
          */
         void nominateNetworks(List<ScanDetail> scanDetails,
                 boolean untrustedNetworkAllowed, boolean oemPaidNetworkAllowed,
-                boolean oemPrivateNetworkAllowed, Set<Integer> restrictedNetworkAllowedUids,
-                OnConnectableListener onConnectableListener);
+                boolean oemPrivateNetworkAllowed, OnConnectableListener onConnectableListener);
 
         /**
          * Callback for recording connectable candidates
@@ -305,12 +297,6 @@
             return false;
         }
 
-        // Metered networks costs the user data, so this is insufficient.
-        if (network.meteredOverride == WifiConfiguration.METERED_OVERRIDE_METERED) {
-            localLog("Current network is metered");
-            return false;
-        }
-
         // Network without internet access is not sufficient, unless expected
         if (!hasInternetOrExpectNoInternet(wifiInfo)) {
             localLog("Current network has [" + network.numNoInternetAccessReports
@@ -391,7 +377,7 @@
      */
     public static String toScanId(@Nullable ScanResult scanResult) {
         return scanResult == null ? "NULL"
-                : scanResult.SSID + ":" + scanResult.BSSID;
+                : String.format("%s:%s", scanResult.SSID, scanResult.BSSID);
     }
 
     /**
@@ -412,7 +398,6 @@
         return (scanResult.level < mScoringParams.getEntryRssi(scanResult.frequency));
     }
 
-    @SuppressLint("NewApi")
     private List<ScanDetail> filterScanResults(List<ScanDetail> scanDetails,
             Set<String> bssidBlocklist, List<ClientModeManagerState> cmmStates) {
         List<ScanDetail> validScanDetails = new ArrayList<>();
@@ -420,36 +405,12 @@
         StringBuffer blockedBssid = new StringBuffer();
         StringBuffer lowRssi = new StringBuffer();
         StringBuffer mboAssociationDisallowedBssid = new StringBuffer();
-        StringBuffer adminRestrictedSsid = new StringBuffer();
         List<String> currentBssids = cmmStates.stream()
                 .map(cmmState -> cmmState.wifiInfo.getBSSID())
                 .collect(Collectors.toList());
         Set<String> scanResultPresentForCurrentBssids = new ArraySet<>();
-
-        int adminMinimumSecurityLevel = 0;
-        boolean adminSsidRestrictionSet = false;
-        Set<WifiSsid> adminSsidAllowlist = new ArraySet<>();
-        Set<WifiSsid> admindSsidDenylist = new ArraySet<>();
-
         int numBssidFiltered = 0;
 
-        DevicePolicyManager devicePolicyManager =
-                WifiPermissionsUtil.retrieveDevicePolicyManagerFromContext(mContext);
-
-        if (devicePolicyManager != null && SdkLevel.isAtLeastT()) {
-            adminMinimumSecurityLevel =
-                    devicePolicyManager.getMinimumRequiredWifiSecurityLevel();
-            WifiSsidPolicy policy = devicePolicyManager.getWifiSsidPolicy();
-            if (policy != null) {
-                adminSsidRestrictionSet = true;
-                if (policy.getPolicyType() == WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_ALLOWLIST) {
-                    adminSsidAllowlist = policy.getSsids();
-                } else {
-                    admindSsidDenylist = policy.getSsids();
-                }
-            }
-        }
-
         for (ScanDetail scanDetail : scanDetails) {
             ScanResult scanResult = scanDetail.getScanResult();
 
@@ -501,44 +462,6 @@
                 }
             }
 
-            // Skip network that does not meet the admin set SSID restriction
-            if (adminSsidRestrictionSet) {
-                WifiSsid ssid = scanResult.getWifiSsid();
-                // Allowlist policy set but network is not present in the list
-                if (!adminSsidAllowlist.isEmpty() && !adminSsidAllowlist.contains(ssid)) {
-                    adminRestrictedSsid.append(scanId).append(" / ");
-                    continue;
-                }
-                // Denylist policy set but network is present in the list
-                if (!admindSsidDenylist.isEmpty() && admindSsidDenylist.contains(ssid)) {
-                    adminRestrictedSsid.append(scanId).append(" / ");
-                    continue;
-                }
-            }
-
-            // Skip network that does not meet the admin set minimum security level restriction
-            if (adminMinimumSecurityLevel != 0) {
-                boolean securityRestrictionPassed = false;
-                @WifiInfo.SecurityType int[] securityTypes = scanResult.getSecurityTypes();
-                for (int type : securityTypes) {
-                    int securityLevel = WifiInfo.convertSecurityTypeToDpmWifiSecurity(type);
-
-                    // Skip unknown security type since security level cannot be determined.
-                    // If all the security types are unknown when the minimum security level
-                    // restriction is set, the scan result is ignored.
-                    if (securityLevel == WifiInfo.DPM_SECURITY_TYPE_UNKNOWN) continue;
-
-                    if (adminMinimumSecurityLevel <= securityLevel) {
-                        securityRestrictionPassed = true;
-                        break;
-                    }
-                }
-                if (!securityRestrictionPassed) {
-                    adminRestrictedSsid.append(scanId).append(" / ");
-                    continue;
-                }
-            }
-
             validScanDetails.add(scanDetail);
         }
         mWifiMetrics.incrementNetworkSelectionFilteredBssidCount(numBssidFiltered);
@@ -576,10 +499,6 @@
                     + mboAssociationDisallowedBssid);
         }
 
-        if (adminRestrictedSsid.length() != 0) {
-            localLog("Networks filtered out due to admin restrictions: " + adminRestrictedSsid);
-        }
-
         return validScanDetails;
     }
 
@@ -716,23 +635,12 @@
         WifiConfiguration originalCandidate = candidate;
         ScanResult scanResultCandidate = candidate.getNetworkSelectionStatus().getCandidate();
 
-        Set<String> seenNetworks = new HashSet<>();
-        seenNetworks.add(candidate.getProfileKey());
-
         while (tempConfig.getNetworkSelectionStatus().getConnectChoice() != null) {
             String key = tempConfig.getNetworkSelectionStatus().getConnectChoice();
             int userSelectedRssi = tempConfig.getNetworkSelectionStatus().getConnectChoiceRssi();
             tempConfig = mWifiConfigManager.getConfiguredNetwork(key);
 
             if (tempConfig != null) {
-                if (seenNetworks.contains(tempConfig.getProfileKey())) {
-                    Log.wtf(TAG, "user connected network is a loop, use candidate:"
-                            + candidate);
-                    mWifiConfigManager.setLegacyUserConnectChoice(candidate,
-                            candidate.getNetworkSelectionStatus().getCandidate().level);
-                    break;
-                }
-                seenNetworks.add(tempConfig.getProfileKey());
                 WifiConfiguration.NetworkSelectionStatus tempStatus =
                         tempConfig.getNetworkSelectionStatus();
                 boolean noInternetButInternetIsExpected = !tempConfig.isNoInternetAccessExpected()
@@ -902,16 +810,12 @@
      * @param untrustedNetworkAllowed  True if untrusted networks are allowed for connection
      * @param oemPaidNetworkAllowed    True if oem paid networks are allowed for connection
      * @param oemPrivateNetworkAllowed True if oem private networks are allowed for connection
-     * @param restrictedNetworkAllowedUids a set of Uids are allowed for restricted network
-     * @param multiInternetNetworkAllowed True if multi internet networks are allowed for
-     *                                    connection.
      * @return list of valid Candidate(s)
      */
     public List<WifiCandidates.Candidate> getCandidatesFromScan(
             @NonNull List<ScanDetail> scanDetails, @NonNull Set<String> bssidBlocklist,
             @NonNull List<ClientModeManagerState> cmmStates, boolean untrustedNetworkAllowed,
-            boolean oemPaidNetworkAllowed, boolean oemPrivateNetworkAllowed,
-            Set<Integer> restrictedNetworkAllowedUids, boolean multiInternetNetworkAllowed) {
+            boolean oemPaidNetworkAllowed, boolean oemPrivateNetworkAllowed) {
         mFilteredNetworks.clear();
         mConnectableNetworks.clear();
         if (scanDetails.size() == 0) {
@@ -927,8 +831,10 @@
             registeredNominator.update(scanDetails);
         }
 
+        updateCandidatesSecurityParams(scanDetails);
+
         // Shall we start network selection at all?
-        if (!multiInternetNetworkAllowed && !isNetworkSelectionNeeded(scanDetails, cmmStates)) {
+        if (!isNetworkSelectionNeeded(scanDetails, cmmStates)) {
             return null;
         }
 
@@ -952,7 +858,7 @@
                 // will be replaced.
                 MacAddress bssid = MacAddress.fromString(currentBssid);
                 SecurityParams params = currentNetwork.getNetworkSelectionStatus()
-                        .getLastUsedSecurityParams();
+                        .getCandidateSecurityParams();
                 if (null == params) {
                     localLog("No known candidate security params for current network.");
                     continue;
@@ -967,7 +873,6 @@
                         NetworkNominator.NOMINATOR_ID_CURRENT,
                         cmmState.wifiInfo.getRssi(),
                         cmmState.wifiInfo.getFrequency(),
-                        ScanResult.CHANNEL_WIDTH_20MHZ, // channel width not available in WifiInfo
                         calculateLastSelectionWeight(currentNetwork.networkId),
                         WifiConfiguration.isMetered(currentNetwork, cmmState.wifiInfo),
                         isFromCarrierOrPrivilegedApp(currentNetwork),
@@ -983,7 +888,7 @@
             registeredNominator.nominateNetworks(
                     new ArrayList<>(mFilteredNetworks),
                     untrustedNetworkAllowed, oemPaidNetworkAllowed, oemPrivateNetworkAllowed,
-                    restrictedNetworkAllowedUids, (scanDetail, config) -> {
+                    (scanDetail, config) -> {
                         WifiCandidates.Key key = wifiCandidates.keyFromScanDetailAndConfig(
                                 scanDetail, config);
                         if (key != null) {
@@ -999,7 +904,6 @@
                                     registeredNominator.getId(),
                                     scanDetail.getScanResult().level,
                                     scanDetail.getScanResult().frequency,
-                                    scanDetail.getScanResult().channelWidth,
                                     calculateLastSelectionWeight(config.networkId),
                                     metered,
                                     isFromCarrierOrPrivilegedApp(config),
@@ -1022,47 +926,6 @@
     }
 
     /**
-     * Add all results as candidates for the user selected network and let network selection
-     * chooses the proper one for the user selected network.
-     * @param config                  The configuration for the user selected network.
-     * @param scanDetails              List of ScanDetail for the user selected network.
-     * @return list of valid Candidate(s)
-     */
-    public List<WifiCandidates.Candidate> getCandidatesForUserSelection(
-            WifiConfiguration config, @NonNull List<ScanDetail> scanDetails) {
-        if (scanDetails.size() == 0) {
-            if (mVerboseLoggingEnabled) {
-                Log.d(TAG, "No scan result for the user selected network.");
-                return null;
-            }
-        }
-
-        mConnectableNetworks.clear();
-        WifiCandidates wifiCandidates = new WifiCandidates(mWifiScoreCard, mContext);
-        for (ScanDetail scanDetail: scanDetails) {
-            WifiCandidates.Key key = wifiCandidates.keyFromScanDetailAndConfig(
-                    scanDetail, config);
-            if (null == key) continue;
-
-            boolean added = wifiCandidates.add(key, config,
-                    WifiNetworkSelector.NetworkNominator.NOMINATOR_ID_CURRENT,
-                    scanDetail.getScanResult().level,
-                    scanDetail.getScanResult().frequency,
-                    scanDetail.getScanResult().channelWidth,
-                    0.0 /* lastSelectionWeightBetweenZeroAndOne */,
-                    false /* isMetered */,
-                    WifiNetworkSelector.isFromCarrierOrPrivilegedApp(config),
-                    predictThroughput(scanDetail));
-            if (!added) continue;
-
-            mConnectableNetworks.add(Pair.create(scanDetail, config));
-            mWifiConfigManager.updateScanDetailForNetwork(
-                    config.networkId, scanDetail);
-        }
-        return wifiCandidates.getCandidates();
-    }
-
-    /**
      * For transition networks with only legacy networks,
      * remove auto-upgrade type to use the legacy type to
      * avoid roaming issues between two types.
@@ -1139,7 +1002,7 @@
                 && configWithPassword.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE)
                 && !configWithPassword.preSharedKey.startsWith("\"")
                 && configWithPassword.preSharedKey.length() == 64
-                && configWithPassword.preSharedKey.matches("[0-9A-Fa-f]{64}")) {
+                && configWithPassword.preSharedKey.matches(String.format("[0-9A-Fa-f]{%d}", 64))) {
             localLog("Remove SAE type for " + configWithPassword.SSID + " with 64-octet Hex PSK.");
             scanResultParamsList
                     .removeIf(p -> p.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE));
@@ -1167,7 +1030,7 @@
      * @param network the target network.
      * @param scanDetail the target scan detail.
      */
-    private void updateNetworkCandidateSecurityParams(
+    public void updateNetworkCandidateSecurityParams(
             WifiConfiguration network, ScanDetail scanDetail) {
         if (network == null) return;
         if (scanDetail == null) return;
@@ -1196,19 +1059,6 @@
      */
     @Nullable
     public WifiConfiguration selectNetwork(@NonNull List<WifiCandidates.Candidate> candidates) {
-        return selectNetwork(candidates, true);
-    }
-
-    /**
-     * Using the registered Scorers, choose the best network from the list of Candidate(s).
-     * The ScanDetailCache is also updated here.
-     * @param candidates - Candidates to perferm network selection on.
-     * @param overrideEnabled If it is allowed to override candidate with User Connect Choice.
-     * @return WifiConfiguration - the selected network, or null.
-     */
-    @Nullable
-    public WifiConfiguration selectNetwork(@NonNull List<WifiCandidates.Candidate> candidates,
-            boolean overrideEnabled) {
         if (candidates == null || candidates.size() == 0) {
             return null;
         }
@@ -1284,7 +1134,7 @@
         // Get a fresh copy of WifiConfiguration reflecting any scan result updates
         WifiConfiguration selectedNetwork =
                 mWifiConfigManager.getConfiguredNetwork(selectedNetworkId);
-        if (selectedNetwork != null && legacyOverrideWanted && overrideEnabled) {
+        if (selectedNetwork != null && legacyOverrideWanted) {
             selectedNetwork = overrideCandidateWithUserConnectChoice(selectedNetwork);
         }
         if (selectedNetwork != null) {
@@ -1319,8 +1169,7 @@
         }
         if (config.isPasspoint()) {
             config.SSID = choice.candidateKey.matchInfo.networkSsid;
-            mWifiConfigManager.addOrUpdateNetwork(config, config.creatorUid, config.creatorName,
-                    false);
+            mWifiConfigManager.addOrUpdateNetwork(config, config.creatorUid, config.creatorName);
         }
     }
 
@@ -1433,13 +1282,7 @@
         }
     }
 
-    /**
-     * Indicate whether or not a configuration is from carrier or privileged app.
-     *
-     * @param config The network configuration
-     * @return true if this configuration is from carrier or privileged app; false otherwise.
-     */
-    public static boolean isFromCarrierOrPrivilegedApp(WifiConfiguration config) {
+    private static boolean isFromCarrierOrPrivilegedApp(WifiConfiguration config) {
         if (config.fromWifiNetworkSuggestion
                 && config.carrierId != TelephonyManager.UNKNOWN_CARRIER_ID) {
             // Privileged carrier suggestion
@@ -1494,4 +1337,12 @@
         mWifiGlobals = wifiGlobals;
         mScanRequestProxy = scanRequestProxy;
     }
+
+    private void updateCandidatesSecurityParams(List<ScanDetail> scanDetails) {
+        for (ScanDetail scanDetail : scanDetails) {
+            WifiConfiguration network =
+                    mWifiConfigManager.getSavedNetworkForScanDetail(scanDetail);
+            updateNetworkCandidateSecurityParams(network, scanDetail);
+        }
+    }
 }
diff --git a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
index 5e27d34..b4c9a3e 100644
--- a/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
+++ b/service/java/com/android/server/wifi/WifiNetworkSuggestionsManager.java
@@ -18,14 +18,13 @@
 
 import static android.app.AppOpsManager.MODE_IGNORED;
 import static android.app.AppOpsManager.OPSTR_CHANGE_WIFI_STATE;
-import static android.net.wifi.WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT;
-import static android.net.wifi.WifiManager.ACTION_REMOVE_SUGGESTION_LINGER;
 
 import android.annotation.IntDef;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.SuppressLint;
 import android.app.ActivityManager;
+import android.app.AlertDialog;
 import android.app.AppOpsManager;
 import android.app.Notification;
 import android.app.PendingIntent;
@@ -33,15 +32,16 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
 import android.content.res.Resources;
 import android.graphics.drawable.Icon;
 import android.net.MacAddress;
+import android.net.NetworkScoreManager;
 import android.net.wifi.ISuggestionConnectionStatusListener;
 import android.net.wifi.ISuggestionUserApprovalStatusListener;
 import android.net.wifi.ScanResult;
-import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiNetworkSuggestion;
@@ -51,7 +51,6 @@
 import android.os.Process;
 import android.os.RemoteCallbackList;
 import android.os.RemoteException;
-import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
@@ -60,6 +59,7 @@
 import android.util.ArraySet;
 import android.util.Log;
 import android.util.Pair;
+import android.view.WindowManager;
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
@@ -144,22 +144,14 @@
      */
     private static final long NOTIFICATION_UPDATE_DELAY_MILLS = 10 * 60 * 1000;
 
-    /**
-     * Modifiable only for testing.
-     */
-    private static final String LINGER_DELAY_PROPERTY = "persist.netmon.linger";
-    /**
-     * Default to 30s linger time-out. Should be same as ConnectivityService#DEFAULT_LINGER_DELAY_MS
-     */
-    @VisibleForTesting
-    public static final int DEFAULT_LINGER_DELAY_MS = 30_000;
-
     private final WifiContext mContext;
     private final Resources mResources;
     private final Handler mHandler;
     private final AppOpsManager mAppOps;
     private final ActivityManager mActivityManager;
     private final WifiNotificationManager mNotificationManager;
+    private final NetworkScoreManager mNetworkScoreManager;
+    private final PackageManager mPackageManager;
     private final WifiPermissionsUtil mWifiPermissionsUtil;
     private final WifiConfigManager mWifiConfigManager;
     private final WifiMetrics mWifiMetrics;
@@ -173,22 +165,14 @@
 
     private class OnNetworkUpdateListener implements
             WifiConfigManager.OnNetworkUpdateListener {
-
         @Override
         public void onConnectChoiceSet(@NonNull List<WifiConfiguration> networks,
                 String choiceKey, int rssi) {
-            onUserConnectChoiceSetForSuggestion(networks, choiceKey, rssi);
+            onUserConnectChoiceSet(networks, choiceKey, rssi);
         }
-
         @Override
         public void onConnectChoiceRemoved(String choiceKey) {
-            onUserConnectChoiceRemoveForSuggestion(choiceKey);
-        }
-
-        @Override
-        public void onSecurityParamsUpdate(WifiConfiguration configuration,
-                List<SecurityParams> securityParams) {
-            onSecurityParamsUpdateForSuggestion(configuration, securityParams);
+            onUserConnectChoiceRemove(choiceKey);
         }
     }
 
@@ -255,8 +239,19 @@
         /**
          * Returns true if this app has the necessary approvals to place network suggestions.
          */
-        private boolean isApproved() {
-            return hasUserApproved || carrierId != TelephonyManager.UNKNOWN_CARRIER_ID;
+        private boolean isApproved(@Nullable String activeScorerPkg) {
+            return hasUserApproved || isExemptFromUserApproval(activeScorerPkg);
+        }
+
+        /**
+         * Returns true if this app can suggest networks without user approval.
+         */
+        private boolean isExemptFromUserApproval(@Nullable String activeScorerPkg) {
+            final boolean isCarrierPrivileged = carrierId != TelephonyManager.UNKNOWN_CARRIER_ID;
+            if (isCarrierPrivileged) {
+                return true;
+            }
+            return packageName.equals(activeScorerPkg);
         }
 
         // This is only needed for comparison in unit tests.
@@ -364,7 +359,6 @@
         public WifiConfiguration createInternalWifiConfiguration(
                 @Nullable WifiCarrierInfoManager carrierInfoManager) {
             WifiConfiguration config = new WifiConfiguration(wns.getWifiConfiguration());
-            config.shared = false;
             config.allowAutojoin = isAutojoinEnabled;
             if (config.enterpriseConfig
                     != null && config.enterpriseConfig.isAuthenticationSimBased()) {
@@ -660,6 +654,8 @@
         mHandler = handler;
         mAppOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
         mActivityManager = context.getSystemService(ActivityManager.class);
+        mNetworkScoreManager = context.getSystemService(NetworkScoreManager.class);
+        mPackageManager = context.getPackageManager();
         mWifiInjector = wifiInjector;
         mFrameworkFacade = mWifiInjector.getFrameworkFacade();
         mWifiPermissionsUtil = wifiPermissionsUtil;
@@ -685,15 +681,15 @@
 
         mContext.registerReceiver(mBroadcastReceiver, mIntentFilter, null, handler);
         mLruConnectionTracker = lruConnectionTracker;
-        mHandler.postAtFrontOfQueue(() -> mWifiConfigManager.addOnNetworkUpdateListener(
-                new WifiNetworkSuggestionsManager.OnNetworkUpdateListener()));
+        mWifiConfigManager.addOnNetworkUpdateListener(
+                new WifiNetworkSuggestionsManager.OnNetworkUpdateListener());
     }
 
     /**
      * Enable verbose logging.
      */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
+    public void enableVerboseLogging(int verbose) {
+        mVerboseLoggingEnabled = verbose > 0;
     }
 
     private void saveToStore() {
@@ -736,7 +732,7 @@
     }
 
     private void removeFromScanResultMatchInfoMapAndRemoveRelatedScoreCard(
-            @NonNull ExtendedWifiNetworkSuggestion extNetworkSuggestion, boolean removeScoreCard) {
+            @NonNull ExtendedWifiNetworkSuggestion extNetworkSuggestion) {
         ScanResultMatchInfo scanResultMatchInfo =
                 ScanResultMatchInfo.fromWifiConfiguration(
                         extNetworkSuggestion.wns.wifiConfiguration);
@@ -759,9 +755,7 @@
             if (extNetworkSuggestionsForScanResultMatchInfo.isEmpty()) {
                 mActiveScanResultMatchInfoWithBssid.remove(lookupPair);
                 if (!mActiveScanResultMatchInfoWithNoBssid.containsKey(scanResultMatchInfo)) {
-                    if (removeScoreCard) {
-                        removeNetworkFromScoreCard(extNetworkSuggestion.wns.wifiConfiguration);
-                    }
+                    removeNetworkFromScoreCard(extNetworkSuggestion.wns.wifiConfiguration);
                     mLruConnectionTracker.removeNetwork(
                             extNetworkSuggestion.wns.wifiConfiguration);
                 }
@@ -779,9 +773,7 @@
             // Remove the set from map if empty.
             if (extNetworkSuggestionsForScanResultMatchInfo.isEmpty()) {
                 mActiveScanResultMatchInfoWithNoBssid.remove(scanResultMatchInfo);
-                if (removeScoreCard) {
-                    removeNetworkFromScoreCard(extNetworkSuggestion.wns.wifiConfiguration);
-                }
+                removeNetworkFromScoreCard(extNetworkSuggestion.wns.wifiConfiguration);
                 mLruConnectionTracker.removeNetwork(
                         extNetworkSuggestion.wns.wifiConfiguration);
             }
@@ -871,7 +863,7 @@
             return;
         }
         NetworkUpdateResult result = mWifiConfigManager.addOrUpdateNetwork(
-                newConfig, uid, packageName, false);
+                newConfig, uid, packageName);
         if (!result.isSuccess()) {
             Log.e(TAG, "Failed to update config in WifiConfigManager");
             return;
@@ -879,6 +871,7 @@
         if (mVerboseLoggingEnabled) {
             Log.v(TAG, "Updated config in WifiConfigManager");
         }
+        mWifiConfigManager.allowAutojoin(result.getNetworkId(), newConfig.allowAutojoin);
     }
 
     /**
@@ -921,6 +914,7 @@
             }
         }
 
+        final String activeScorerPackage = mNetworkScoreManager.getActiveScorerPackage();
         PerAppInfo perAppInfo = mActiveNetworkSuggestionsPerApp.get(packageName);
         if (perAppInfo == null) {
             perAppInfo = new PerAppInfo(uid, packageName, featureId);
@@ -940,6 +934,12 @@
                 perAppInfo.setCarrierId(carrierId);
                 mWifiMetrics.incrementNetworkSuggestionApiUsageNumOfAppInType(
                         APP_TYPE_CARRIER_PRIVILEGED);
+            } else if (perAppInfo.packageName.equals(activeScorerPackage)) {
+                Log.i(TAG, "Exempting the active scorer app");
+                // nothing more to do, user approval related checks are done at network selection
+                // time (which also takes care of any dynamic changes in active scorer).
+                mWifiMetrics.incrementNetworkSuggestionApiUsageNumOfAppInType(
+                        APP_TYPE_NON_PRIVILEGED);
             } else {
                 if (isSuggestionFromForegroundApp(packageName)) {
                     sendUserApprovalDialog(packageName, uid);
@@ -997,7 +997,7 @@
             }
             // If network has no IMSI protection and user didn't approve exemption, make it initial
             // auto join disabled
-            if (isSimBasedPhase1Suggestion(ewns)) {
+            if (isSimBasedSuggestion(ewns)) {
                 int subId = mWifiCarrierInfoManager
                         .getMatchingSubId(getCarrierIdFromSuggestion(ewns));
                 if (!(mWifiCarrierInfoManager.requiresImsiEncryption(subId)
@@ -1054,11 +1054,10 @@
         return ewns.wns.passpointConfiguration.getCarrierId();
     }
 
-    private boolean isSimBasedPhase1Suggestion(ExtendedWifiNetworkSuggestion ewns) {
+    private boolean isSimBasedSuggestion(ExtendedWifiNetworkSuggestion ewns) {
         if (ewns.wns.passpointConfiguration == null) {
             return ewns.wns.wifiConfiguration.enterpriseConfig != null
-                    && ewns.wns.wifiConfiguration.enterpriseConfig.isAuthenticationSimBased()
-                    && !ewns.wns.wifiConfiguration.enterpriseConfig.isEapMethodServerCertUsed();
+                    && ewns.wns.wifiConfiguration.enterpriseConfig.isAuthenticationSimBased();
         } else {
             return ewns.wns.passpointConfiguration.getCredential().getSimCredential() != null;
         }
@@ -1078,24 +1077,13 @@
         if (!checkNetworkSuggestionsNoNulls(networkSuggestions)) {
             return false;
         }
-
-        long supportedFeatures = mWifiInjector.getActiveModeWarden()
-                .getPrimaryClientModeManager().getSupportedFeatures();
-
         for (WifiNetworkSuggestion wns : networkSuggestions) {
             if (wns.passpointConfiguration == null) {
                 WifiConfiguration config = wns.wifiConfiguration;
-                if (!WifiConfigurationUtil.validate(config, supportedFeatures,
+                if (!WifiConfigurationUtil.validate(config,
                         WifiConfigurationUtil.VALIDATE_FOR_ADD)) {
                     return false;
                 }
-                if (config.macRandomizationSetting != WifiConfiguration.RANDOMIZATION_PERSISTENT
-                        && config.macRandomizationSetting
-                        != WifiConfiguration.RANDOMIZATION_NON_PERSISTENT) {
-                    Log.w(TAG, "MAC randomization setting is invalid. Automatically setting"
-                            + " config to use persistent random MAC address.");
-                    config.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_PERSISTENT;
-                }
                 if (config.isEnterprise()) {
                     final WifiEnterpriseConfig enterpriseConfig = config.enterpriseConfig;
                     if (enterpriseConfig.isEapMethodServerCertUsed()
@@ -1114,13 +1102,6 @@
                 if (!wns.passpointConfiguration.validate()) {
                     return false;
                 }
-                if (!wns.passpointConfiguration.isMacRandomizationEnabled()) {
-                    Log.w(TAG, "MAC randomization must be enabled on Passpoint suggestion."
-                            + " Defaulting to use persistent MAC randomization for invalid"
-                            + " configuration.");
-                    wns.passpointConfiguration.setMacRandomizationEnabled(true);
-                    wns.passpointConfiguration.setNonPersistentMacRandomizationEnabled(false);
-                }
             }
             if (!isAppWorkingAsCrossCarrierProvider(packageName)
                     && !isValidCarrierMergedNetworkSuggestion(wns)) {
@@ -1151,19 +1132,6 @@
                     return false;
                 }
             }
-            if (!SdkLevel.isAtLeastT()) {
-                if (wns.wifiConfiguration.getSubscriptionGroup() != null) {
-                    Log.e(TAG, "Setting subscription group is only allowed from Android T.");
-                    return false;
-                }
-            }
-            if (wns.wifiConfiguration.getSubscriptionGroup() != null
-                    && wns.wifiConfiguration.subscriptionId
-                    != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
-                Log.e(TAG, "Setting both subscription group and subscription id are not "
-                        + "allowed.");
-                return false;
-            }
         }
         return true;
     }
@@ -1181,8 +1149,7 @@
             // Carrier merged network must be metered.
             return false;
         }
-        if (wns.wifiConfiguration.subscriptionId == SubscriptionManager.INVALID_SUBSCRIPTION_ID
-                && wns.wifiConfiguration.getSubscriptionGroup() == null) {
+        if (wns.wifiConfiguration.subscriptionId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
             // Carrier merged network must have a valid subscription Id.
             return false;
         }
@@ -1202,7 +1169,7 @@
             WifiConfiguration wifiConfiguration = suggestion.wifiConfiguration;
             PasspointConfiguration passpointConfiguration = suggestion.passpointConfiguration;
             if (wifiConfiguration.carrierMerged && !areCarrierMergedSuggestionsAllowed(
-                    wifiConfiguration, packageName)) {
+                    wifiConfiguration.subscriptionId, packageName)) {
                 // Carrier must be explicitly configured as merged carrier offload enabled
                 return false;
             }
@@ -1210,19 +1177,27 @@
                     ==  TelephonyManager.UNKNOWN_CARRIER_ID) {
                 // If an app doesn't have carrier privileges or carrier provisioning permission,
                 // suggests SIM-based network, sets CarrierId and sets SubscriptionId are illegal.
-                if (wifiConfiguration.carrierId != TelephonyManager.UNKNOWN_CARRIER_ID) {
-                    return false;
-                }
-                if (wifiConfiguration.subscriptionId
-                        != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
-                    return false;
-                }
                 if (passpointConfiguration == null) {
+                    if (wifiConfiguration.carrierId != TelephonyManager.UNKNOWN_CARRIER_ID) {
+                        return false;
+                    }
+                    if (wifiConfiguration.subscriptionId
+                            != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
+                        return false;
+                    }
                     if (wifiConfiguration.enterpriseConfig != null
                             && wifiConfiguration.enterpriseConfig.isAuthenticationSimBased()) {
                         return false;
                     }
                 } else {
+                    if (passpointConfiguration.getCarrierId()
+                            != TelephonyManager.UNKNOWN_CARRIER_ID) {
+                        return false;
+                    }
+                    if (passpointConfiguration.getSubscriptionId()
+                            != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
+                        return false;
+                    }
                     if (passpointConfiguration.getCredential() != null
                             && passpointConfiguration.getCredential().getSimCredential() != null) {
                         return false;
@@ -1231,13 +1206,8 @@
             } else {
                 int carrierId = isCrossCarrierProvisioner ? wifiConfiguration.carrierId
                         : provisionerCarrierId;
-                int subId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
-                if (wifiConfiguration.getSubscriptionGroup() != null) {
-                    subId = mWifiCarrierInfoManager.getActiveSubscriptionIdInGroup(
-                            wifiConfiguration.getSubscriptionGroup());
-                } else {
-                    subId = wifiConfiguration.subscriptionId;
-                }
+                int subId = passpointConfiguration == null ? wifiConfiguration.subscriptionId
+                        : passpointConfiguration.getSubscriptionId();
                 if (!mWifiCarrierInfoManager
                         .isSubIdMatchingCarrierId(subId, carrierId)) {
                     Log.e(TAG, "Subscription ID doesn't match the carrier. CarrierId:"
@@ -1267,7 +1237,7 @@
     private void removeInternal(
             @NonNull Collection<ExtendedWifiNetworkSuggestion> extNetworkSuggestions,
             @NonNull String packageName,
-            @NonNull PerAppInfo perAppInfo, @WifiManager.ActionAfterRemovingSuggestion int action) {
+            @NonNull PerAppInfo perAppInfo) {
         // Get internal suggestions
         Set<ExtendedWifiNetworkSuggestion> removingExtSuggestions =
                 new HashSet<>(perAppInfo.extNetworkSuggestions.values());
@@ -1288,70 +1258,40 @@
             stopTrackingAppOpsChange(packageName);
         }
         // Clear the cache.
-        WifiConfiguration connected = mWifiInjector.getActiveModeWarden()
-                .getPrimaryClientModeManager().getConnectedWifiConfiguration();
         List<WifiNetworkSuggestion> removingSuggestions = new ArrayList<>();
         for (ExtendedWifiNetworkSuggestion ewns : removingExtSuggestions) {
-            removeNetworkSuggestionCache(ewns);
-            removingSuggestions.add(ewns.wns);
-            WifiConfiguration removing = ewns
-                    .createInternalWifiConfiguration(mWifiCarrierInfoManager);
-            WifiConfiguration cached = mWifiConfigManager.getConfiguredNetwork(
-                    removing.getProfileKey());
-            if (connected != null && cached != null && cached.networkId == connected.networkId
-                    && action == ACTION_REMOVE_SUGGESTION_LINGER) {
-                mWifiInjector.getActiveModeWarden().getPrimaryClientModeManager()
-                        .setShouldReduceNetworkScore(true);
-                // Execute when linger time out clean up the cache in WifiConfigManager.
-                mHandler.postDelayed(() -> removeSuggestionFromWifiConfigManager(ewns),
-                        getLingerDelayMs());
+            if (ewns.wns.passpointConfiguration != null) {
+                // Clear the Passpoint config.
+                mWifiInjector.getPasspointManager().removeProvider(
+                        ewns.perAppInfo.uid,
+                        false,
+                        ewns.wns.passpointConfiguration.getUniqueId(), null);
+                removeFromPassPointInfoMap(ewns);
             } else {
-                // Remove the config from WifiConfigManager. If current connected suggestion is
-                // remove, would trigger a disconnect.
-                mWifiConfigManager.removeSuggestionConfiguredNetwork(removing);
+                if (ewns.wns.wifiConfiguration.isEnterprise()) {
+                    mWifiKeyStore.removeKeys(ewns.wns.wifiConfiguration.enterpriseConfig);
+                }
+                removeFromScanResultMatchInfoMapAndRemoveRelatedScoreCard(ewns);
+                mWifiConfigManager.removeConnectChoiceFromAllNetworks(ewns
+                        .createInternalWifiConfiguration(mWifiCarrierInfoManager)
+                        .getProfileKey());
             }
+            removingSuggestions.add(ewns.wns);
+            // Remove the config from WifiConfigManager. If current connected suggestion is remove,
+            // would trigger a disconnect.
+            mWifiConfigManager.removeSuggestionConfiguredNetwork(
+                    ewns.createInternalWifiConfiguration(mWifiCarrierInfoManager));
         }
         for (OnSuggestionUpdateListener listener : mListeners) {
             listener.onSuggestionsRemoved(removingSuggestions);
         }
     }
 
-    private void removeNetworkSuggestionCache(ExtendedWifiNetworkSuggestion ewns) {
-        if (ewns.wns.passpointConfiguration != null) {
-            // Clear the Passpoint config.
-            mWifiInjector.getPasspointManager().removeProvider(
-                    ewns.perAppInfo.uid,
-                    false,
-                    ewns.wns.passpointConfiguration.getUniqueId(), null);
-            removeFromPassPointInfoMap(ewns);
-        } else {
-            if (ewns.wns.wifiConfiguration.isEnterprise()) {
-                mWifiKeyStore.removeKeys(ewns.wns.wifiConfiguration.enterpriseConfig);
-            }
-            removeFromScanResultMatchInfoMapAndRemoveRelatedScoreCard(ewns, true);
-            mWifiConfigManager.removeConnectChoiceFromAllNetworks(ewns
-                    .createInternalWifiConfiguration(mWifiCarrierInfoManager)
-                    .getProfileKey());
-        }
-    }
-
-    private void removeSuggestionFromWifiConfigManager(
-            ExtendedWifiNetworkSuggestion extendedWifiNetworkSuggestion) {
-        PerAppInfo perAppInfo = extendedWifiNetworkSuggestion.perAppInfo;
-        if (perAppInfo.extNetworkSuggestions.containsValue(extendedWifiNetworkSuggestion)) {
-            // If the suggestion is added by app again, do not remove it from WifiConfigManager.
-            return;
-        }
-        mWifiConfigManager.removeSuggestionConfiguredNetwork(extendedWifiNetworkSuggestion
-                .createInternalWifiConfiguration(mWifiCarrierInfoManager));
-    }
-
     /**
      * Remove the provided list of network suggestions from the corresponding app's active list.
      */
     public @WifiManager.NetworkSuggestionsStatusCode int remove(
-            List<WifiNetworkSuggestion> networkSuggestions, int uid, String packageName,
-            @WifiManager.ActionAfterRemovingSuggestion int action) {
+            List<WifiNetworkSuggestion> networkSuggestions, int uid, String packageName) {
         if (!mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(uid)) {
             Log.e(TAG, "UID " + uid + " not visible to the current user");
             return WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL;
@@ -1390,7 +1330,7 @@
                     + ". Network suggestions not found in active network suggestions");
             return WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID;
         }
-        removeInternal(extNetworkSuggestions, packageName, perAppInfo, action);
+        removeInternal(extNetworkSuggestions, packageName, perAppInfo);
         saveToStore();
         mWifiMetrics.incrementNetworkSuggestionApiNumModification();
         mWifiMetrics.noteNetworkSuggestionApiListSizeHistogram(getAllMaxSizes());
@@ -1403,7 +1343,7 @@
     public void removeApp(@NonNull String packageName) {
         PerAppInfo perAppInfo = mActiveNetworkSuggestionsPerApp.get(packageName);
         if (perAppInfo == null) return;
-        removeInternal(List.of(), packageName, perAppInfo, ACTION_REMOVE_SUGGESTION_DISCONNECT);
+        removeInternal(List.of(), packageName, perAppInfo);
         // Remove the package fully from the internal database.
         mActiveNetworkSuggestionsPerApp.remove(packageName);
         RemoteCallbackList<ISuggestionConnectionStatusListener> listenerTracker =
@@ -1445,8 +1385,7 @@
                 mActiveNetworkSuggestionsPerApp.entrySet().iterator();
         while (iter.hasNext()) {
             Map.Entry<String, PerAppInfo> entry = iter.next();
-            removeInternal(List.of(), entry.getKey(), entry.getValue(),
-                    ACTION_REMOVE_SUGGESTION_DISCONNECT);
+            removeInternal(List.of(), entry.getKey(), entry.getValue());
             iter.remove();
         }
         mSuggestionStatusListenerPerApp.clear();
@@ -1489,7 +1428,7 @@
     private void restoreInitialAutojoinForCarrierId(int carrierId) {
         for (PerAppInfo appInfo : mActiveNetworkSuggestionsPerApp.values()) {
             for (ExtendedWifiNetworkSuggestion ewns : appInfo.extNetworkSuggestions.values()) {
-                if (!(isSimBasedPhase1Suggestion(ewns)
+                if (!(isSimBasedSuggestion(ewns)
                         && getCarrierIdFromSuggestion(ewns) == carrierId)) {
                     continue;
                 }
@@ -1529,9 +1468,10 @@
      * Returns a set of all network suggestions across all apps that have been approved by user.
      */
     public Set<WifiNetworkSuggestion> getAllApprovedNetworkSuggestions() {
+        final String activeScorerPackage = mNetworkScoreManager.getActiveScorerPackage();
         return mActiveNetworkSuggestionsPerApp.values()
                 .stream()
-                .filter(e -> e.isApproved())
+                .filter(e -> e.isApproved(activeScorerPackage))
                 .flatMap(e -> convertToWnsSet(e.extNetworkSuggestions.values())
                         .stream())
                 .collect(Collectors.toSet());
@@ -1542,8 +1482,9 @@
      */
     public List<WifiConfiguration> getAllScanOptimizationSuggestionNetworks() {
         List<WifiConfiguration> networks = new ArrayList<>();
+        final String activeScorerPackage = mNetworkScoreManager.getActiveScorerPackage();
         for (PerAppInfo info : mActiveNetworkSuggestionsPerApp.values()) {
-            if (!info.isApproved()) {
+            if (!info.isApproved(activeScorerPackage)) {
                 continue;
             }
             for (ExtendedWifiNetworkSuggestion ewns : info.extNetworkSuggestions.values()) {
@@ -1579,6 +1520,19 @@
                 PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
     }
 
+    private @NonNull CharSequence getAppName(@NonNull String packageName, int uid) {
+        ApplicationInfo applicationInfo = null;
+        try {
+            applicationInfo = mContext.getPackageManager().getApplicationInfoAsUser(
+                packageName, 0, UserHandle.getUserHandleForUid(uid));
+        } catch (PackageManager.NameNotFoundException e) {
+            Log.e(TAG, "Failed to find app name for " + packageName);
+            return "";
+        }
+        CharSequence appName = mPackageManager.getApplicationLabel(applicationInfo);
+        return (appName != null) ? appName : "";
+    }
+
     /**
      * Check if the request came from foreground app.
      */
@@ -1593,36 +1547,28 @@
     }
 
     private void sendUserApprovalDialog(@NonNull String packageName, int uid) {
-        CharSequence appName = mFrameworkFacade.getAppName(mContext, packageName, uid);
-        mWifiInjector.getWifiDialogManager().createSimpleDialog(
-                mResources.getString(R.string.wifi_suggestion_title),
-                mResources.getString(R.string.wifi_suggestion_content, appName),
-                mResources.getString(R.string.wifi_suggestion_action_allow_app),
-                mResources.getString(R.string.wifi_suggestion_action_disallow_app),
-                null /* neutralButtonText */,
-                new WifiDialogManager.SimpleDialogCallback() {
-                    @Override
-                    public void onPositiveButtonClicked() {
-                        handleUserAllowAction(uid, packageName);
-                    }
-
-                    @Override
-                    public void onNegativeButtonClicked() {
-                        handleUserDisallowAction(uid, packageName);
-                    }
-
-                    @Override
-                    public void onNeutralButtonClicked() {
-                        // Not used.
-                        handleUserDismissAction();
-                    }
-
-                    @Override
-                    public void onCancelled() {
-                        handleUserDismissAction();
-                    }
-                },
-                new WifiThreadRunner(mHandler)).launchDialog();
+        CharSequence appName = getAppName(packageName, uid);
+        AlertDialog dialog = mFrameworkFacade.makeAlertDialogBuilder(mContext)
+                .setTitle(mResources.getString(R.string.wifi_suggestion_title))
+                .setMessage(mResources.getString(R.string.wifi_suggestion_content, appName))
+                .setPositiveButton(
+                        mResources.getText(R.string.wifi_suggestion_action_allow_app),
+                        (d, which) -> mHandler.post(
+                                () -> handleUserAllowAction(uid, packageName)))
+                .setNegativeButton(
+                        mResources.getText(R.string.wifi_suggestion_action_disallow_app),
+                        (d, which) -> mHandler.post(
+                                () -> handleUserDisallowAction(uid, packageName)))
+                .setOnDismissListener(
+                        (d) -> mHandler.post(() -> handleUserDismissAction()))
+                .setOnCancelListener(
+                        (d) -> mHandler.post(() -> handleUserDismissAction()))
+                .create();
+        dialog.setCanceledOnTouchOutside(false);
+        dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+        dialog.getWindow().addSystemFlags(
+                WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS);
+        dialog.show();
         mIsLastUserApprovalUiDialog = true;
     }
 
@@ -1642,7 +1588,7 @@
                                 Pair.create(EXTRA_UID, uid)))
                         .build();
 
-        CharSequence appName = mFrameworkFacade.getAppName(mContext, packageName, uid);
+        CharSequence appName = getAppName(packageName, uid);
         Notification notification = mFrameworkFacade.makeNotificationBuilder(
                 mContext, WifiService.NOTIFICATION_NETWORK_STATUS)
                 .setSmallIcon(Icon.createWithResource(mContext.getWifiOverlayApkPkgName(),
@@ -1733,18 +1679,19 @@
         if (extNetworkSuggestions == null) {
             return Set.of();
         }
+        final String activeScorerPackage = mNetworkScoreManager.getActiveScorerPackage();
         Set<ExtendedWifiNetworkSuggestion> approvedExtNetworkSuggestions = new HashSet<>();
         for (ExtendedWifiNetworkSuggestion ewns : extNetworkSuggestions) {
-            if (!ewns.perAppInfo.isApproved()) {
+            if (!ewns.perAppInfo.isApproved(activeScorerPackage)) {
                 sendUserApprovalNotificationIfNotApproved(ewns.perAppInfo.packageName,
                         ewns.perAppInfo.uid);
                 continue;
             }
             if (ewns.wns.wifiConfiguration.carrierMerged && !areCarrierMergedSuggestionsAllowed(
-                    ewns.wns.wifiConfiguration, ewns.perAppInfo.packageName)) {
+                    ewns.wns.wifiConfiguration.subscriptionId, ewns.perAppInfo.packageName)) {
                 continue;
             }
-            if (isSimBasedPhase1Suggestion(ewns)) {
+            if (isSimBasedSuggestion(ewns)) {
                 mWifiCarrierInfoManager.sendImsiProtectionExemptionNotificationIfRequired(
                         getCarrierIdFromSuggestion(ewns));
             }
@@ -1783,18 +1730,19 @@
         if (extNetworkSuggestions == null) {
             return Set.of();
         }
+        final String activeScorerPackage = mNetworkScoreManager.getActiveScorerPackage();
         Set<ExtendedWifiNetworkSuggestion> approvedExtNetworkSuggestions = new HashSet<>();
         for (ExtendedWifiNetworkSuggestion ewns : extNetworkSuggestions) {
-            if (!ewns.perAppInfo.isApproved()) {
+            if (!ewns.perAppInfo.isApproved(activeScorerPackage)) {
                 sendUserApprovalNotificationIfNotApproved(ewns.perAppInfo.packageName,
                         ewns.perAppInfo.uid);
                 continue;
             }
             if (ewns.wns.wifiConfiguration.carrierMerged && !areCarrierMergedSuggestionsAllowed(
-                    ewns.wns.wifiConfiguration, ewns.perAppInfo.packageName)) {
+                    ewns.wns.wifiConfiguration.subscriptionId, ewns.perAppInfo.packageName)) {
                 continue;
             }
-            if (isSimBasedPhase1Suggestion(ewns)) {
+            if (isSimBasedSuggestion(ewns)) {
                 mWifiCarrierInfoManager.sendImsiProtectionExemptionNotificationIfRequired(
                         getCarrierIdFromSuggestion(ewns));
             }
@@ -1833,10 +1781,11 @@
         if (extNetworkSuggestions == null || extNetworkSuggestions.isEmpty()) {
             return null;
         }
+        final String activeScorerPackage = mNetworkScoreManager.getActiveScorerPackage();
         Set<ExtendedWifiNetworkSuggestion> approvedExtNetworkSuggestions =
                 extNetworkSuggestions
                         .stream()
-                        .filter(n -> n.perAppInfo.isApproved())
+                        .filter(n -> n.perAppInfo.isApproved(activeScorerPackage))
                         .collect(Collectors.toSet());
         if (approvedExtNetworkSuggestions.isEmpty()) {
             return null;
@@ -1902,7 +1851,7 @@
                     continue;
                 }
                 if (config.carrierMerged && !areCarrierMergedSuggestionsAllowed(
-                        config, ewns.perAppInfo.packageName)) {
+                        config.subscriptionId, ewns.perAppInfo.packageName)) {
                     continue;
                 }
                 WifiConfiguration wCmWifiConfig = wifiConfigMap.get(config.getProfileKey());
@@ -1950,17 +1899,14 @@
     /**
      * Get hidden network from active network suggestions.
      * Todo(): Now limit by a fixed number, maybe we can try rotation?
-     * @param autoJoinOnly retrieve hidden network autojoin enabled only.
-     * @return list of HiddenNetwork
+     * @return set of WifiConfigurations
      */
-    public List<WifiScanner.ScanSettings.HiddenNetwork> retrieveHiddenNetworkList(
-            boolean autoJoinOnly) {
+    public List<WifiScanner.ScanSettings.HiddenNetwork> retrieveHiddenNetworkList() {
         List<WifiScanner.ScanSettings.HiddenNetwork> hiddenNetworks = new ArrayList<>();
         for (PerAppInfo appInfo : mActiveNetworkSuggestionsPerApp.values()) {
             if (!appInfo.hasUserApproved) continue;
             for (ExtendedWifiNetworkSuggestion ewns : appInfo.extNetworkSuggestions.values()) {
                 if (!ewns.wns.wifiConfiguration.hiddenSSID) continue;
-                if (autoJoinOnly && !ewns.isAutojoinEnabled) continue;
                 hiddenNetworks.add(
                         new WifiScanner.ScanSettings.HiddenNetwork(
                                 ewns.wns.wifiConfiguration.SSID));
@@ -2301,10 +2247,7 @@
      * If app changes from privileged to not privileged, remove all suggestions and reset state.
      * If app changes from not privileges to privileged, set target carrier id for all suggestions.
      */
-    public void updateCarrierPrivilegedApps() {
-        if (SdkLevel.isAtLeastT()) {
-            return;
-        }
+    public void resetCarrierPrivilegedApps() {
         Log.w(TAG, "SIM state is changed!");
         Iterator<Map.Entry<String, PerAppInfo>> iter =
                 mActiveNetworkSuggestionsPerApp.entrySet().iterator();
@@ -2317,8 +2260,7 @@
             }
             if (carrierId == TelephonyManager.UNKNOWN_CARRIER_ID) {
                 Log.i(TAG, "Carrier privilege revoked for " + appInfo.packageName);
-                removeInternal(List.of(), appInfo.packageName, appInfo,
-                        ACTION_REMOVE_SUGGESTION_DISCONNECT);
+                removeInternal(List.of(), appInfo.packageName, appInfo);
                 iter.remove();
                 continue;
             }
@@ -2332,56 +2274,6 @@
     }
 
     /**
-     * When carrier privileged packages list changes, handle the apps which privileged state changed
-     * - If app changes from privileged to not privileged, remove all suggestions and reset state
-     * - If app changes from not privileges to privileged, set target carrier id for all suggestions
-     */
-    public void updateCarrierPrivilegedApps(Set<String> privilegedApps) {
-        if (!SdkLevel.isAtLeastT()) {
-            return;
-        }
-        if (mVerboseLoggingEnabled) {
-            StringBuilder stringBuilder = new StringBuilder();
-            stringBuilder.append("Carrier privileged packages changed, privileged apps=[");
-            for (String packagesName : privilegedApps) {
-                stringBuilder.append(packagesName).append(", ");
-            }
-            stringBuilder.append("]");
-            Log.d(TAG, stringBuilder.toString());
-        }
-        Iterator<Map.Entry<String, PerAppInfo>> iter =
-                mActiveNetworkSuggestionsPerApp.entrySet().iterator();
-        while (iter.hasNext()) {
-            PerAppInfo appInfo = iter.next().getValue();
-            if (privilegedApps.contains(appInfo.packageName)) {
-                if (appInfo.carrierId != TelephonyManager.UNKNOWN_CARRIER_ID) {
-                    // Already privileged before, no change.
-                    continue;
-                }
-                // for (newly) privileged packages: update carrier ID
-                int carrierId = mWifiCarrierInfoManager
-                        .getCarrierIdForPackageWithCarrierPrivileges(appInfo.packageName);
-                Log.i(TAG, "Carrier privilege granted for " + appInfo.packageName);
-                appInfo.carrierId = carrierId;
-                for (ExtendedWifiNetworkSuggestion ewns : appInfo.extNetworkSuggestions.values()) {
-                    ewns.wns.wifiConfiguration.carrierId = carrierId;
-                }
-                continue;
-            }
-            if (appInfo.carrierId == TelephonyManager.UNKNOWN_CARRIER_ID) {
-                // Apps never got privileged, no change.
-                continue;
-            }
-            // Carrier privilege revoked, remove.
-            Log.i(TAG, "Carrier privilege revoked for " + appInfo.packageName);
-            removeInternal(List.of(), appInfo.packageName, appInfo,
-                    ACTION_REMOVE_SUGGESTION_DISCONNECT);
-            iter.remove();
-        }
-        saveToStore();
-    }
-
-    /**
      * Resets all sim networks state.
      */
     public void resetSimNetworkSuggestions() {
@@ -2657,8 +2549,8 @@
         return extendedWifiNetworkSuggestion.wns.wifiConfiguration.isOpenNetwork();
     }
 
-    private void onUserConnectChoiceSetForSuggestion(Collection<WifiConfiguration> networks,
-            String choiceKey, int rssi) {
+    private void onUserConnectChoiceSet(Collection<WifiConfiguration> networks, String choiceKey,
+            int rssi) {
         Set<String> networkKeys = networks.stream()
                 .filter(config -> config.fromWifiNetworkSuggestion)
                 .map(WifiConfiguration::getProfileKey)
@@ -2680,7 +2572,7 @@
         saveToStore();
     }
 
-    private void onUserConnectChoiceRemoveForSuggestion(String choiceKey) {
+    private void onUserConnectChoiceRemove(String choiceKey) {
         mActiveNetworkSuggestionsPerApp.values().stream()
                 .flatMap(e -> e.extNetworkSuggestions.values().stream())
                 .filter(ewns -> TextUtils.equals(ewns.connectChoice, choiceKey))
@@ -2713,16 +2605,10 @@
         listenersTracker.finishBroadcast();
     }
 
-    private boolean areCarrierMergedSuggestionsAllowed(WifiConfiguration config,
-            String packageName) {
+    private boolean areCarrierMergedSuggestionsAllowed(int subId, String packageName) {
         if (isAppWorkingAsCrossCarrierProvider(packageName)) {
             return true;
         }
-        int subId = config.subscriptionId;
-        if (config.getSubscriptionGroup() != null) {
-            subId = mWifiCarrierInfoManager.getActiveSubscriptionIdInGroup(
-                    config.getSubscriptionGroup());
-        }
 
         return mWifiCarrierInfoManager.areMergedCarrierWifiNetworksAllowed(subId);
     }
@@ -2733,6 +2619,7 @@
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.println("Dump of WifiNetworkSuggestionsManager");
         pw.println("WifiNetworkSuggestionsManager - Networks Begin ----");
+        final String activeScorerPackage = mNetworkScoreManager.getActiveScorerPackage();
         for (Map.Entry<String, PerAppInfo> networkSuggestionsEntry
                 : mActiveNetworkSuggestionsPerApp.entrySet()) {
             pw.println("Package Name: " + networkSuggestionsEntry.getKey());
@@ -2740,6 +2627,7 @@
             pw.println("Has user approved: " + appInfo.hasUserApproved);
             pw.println("Has carrier privileges: "
                     + (appInfo.carrierId != TelephonyManager.UNKNOWN_CARRIER_ID));
+            pw.println("Is active scorer: " + appInfo.packageName.equals(activeScorerPackage));
             for (ExtendedWifiNetworkSuggestion extNetworkSuggestion
                     : appInfo.extNetworkSuggestions.values()) {
                 pw.println("Network: " + extNetworkSuggestion);
@@ -2752,26 +2640,4 @@
         mNotificationManager.cancel(SystemMessage.NOTE_NETWORK_SUGGESTION_AVAILABLE);
         mNotificationUpdateTime = 0;
     }
-
-    private int getLingerDelayMs() {
-        return SystemProperties.getInt(LINGER_DELAY_PROPERTY, DEFAULT_LINGER_DELAY_MS);
-    }
-
-    private void onSecurityParamsUpdateForSuggestion(WifiConfiguration config,
-            List<SecurityParams> securityParams) {
-        Set<ExtendedWifiNetworkSuggestion> matchingExtendedWifiNetworkSuggestions =
-                        getNetworkSuggestionsForWifiConfiguration(config, config.BSSID);
-        if (matchingExtendedWifiNetworkSuggestions.isEmpty()) {
-            if (mVerboseLoggingEnabled) {
-                Log.w(TAG, "onSecurityParamsUpdateForSuggestion: no network matches: " + config);
-            }
-            return;
-        }
-        for (ExtendedWifiNetworkSuggestion ewns : matchingExtendedWifiNetworkSuggestions) {
-            removeFromScanResultMatchInfoMapAndRemoveRelatedScoreCard(ewns, false);
-            ewns.wns.wifiConfiguration.setSecurityParams(securityParams);
-            addToScanResultMatchInfoMap(ewns);
-        }
-        saveToStore();
-    }
 }
diff --git a/service/java/com/android/server/wifi/WifiNotificationManager.java b/service/java/com/android/server/wifi/WifiNotificationManager.java
index ba9365c..32d48fb 100644
--- a/service/java/com/android/server/wifi/WifiNotificationManager.java
+++ b/service/java/com/android/server/wifi/WifiNotificationManager.java
@@ -20,7 +20,6 @@
 import static com.android.server.wifi.WifiService.NOTIFICATION_NETWORK_AVAILABLE;
 import static com.android.server.wifi.WifiService.NOTIFICATION_NETWORK_STATUS;
 
-import android.annotation.SuppressLint;
 import android.app.Notification;
 import android.app.NotificationChannel;
 import android.app.NotificationManager;
@@ -62,8 +61,6 @@
     /**
      * Update to the notification manager fot current user and create notification channels.
      */
-    // TODO(b/193460475): Remove when tooling supports APIS moving from SystemApi to public
-    @SuppressLint("NewApi")
     public void createNotificationChannels() {
         if (mNotificationManager != null) {
             // Cancel all active notification from Wi-Fi Stack.
diff --git a/service/java/com/android/server/wifi/WifiScoreCard.java b/service/java/com/android/server/wifi/WifiScoreCard.java
index 0bede6d..493f339 100644
--- a/service/java/com/android/server/wifi/WifiScoreCard.java
+++ b/service/java/com/android/server/wifi/WifiScoreCard.java
@@ -127,6 +127,7 @@
     private final String mL2KeySeed;
     private MemoryStore mMemoryStore;
     private final DeviceConfigFacade mDeviceConfigFacade;
+    private final FrameworkFacade mFrameworkFacade;
     private final Context mContext;
     private final LocalLog mLocalLog = new LocalLog(256);
     private final long[][][] mL2ErrorAccPercent =
@@ -274,13 +275,14 @@
      * @param l2KeySeed is for making our L2Keys usable only on this device
      */
     public WifiScoreCard(Clock clock, String l2KeySeed, DeviceConfigFacade deviceConfigFacade,
-            Context context) {
+            FrameworkFacade frameworkFacade, Context context) {
         mClock = clock;
         mContext = context;
         mL2KeySeed = l2KeySeed;
         mPlaceholderPerBssid = new PerBssid("", MacAddress.fromString(DEFAULT_MAC_ADDRESS));
         mPlaceholderPerNetwork = new PerNetwork("");
         mDeviceConfigFacade = deviceConfigFacade;
+        mFrameworkFacade = frameworkFacade;
     }
 
     /**
@@ -1131,10 +1133,8 @@
                             case WifiBlocklistMonitor.REASON_NONLOCAL_DISCONNECT_CONNECTING:
                                 mRecentStats.incrementCount(CNT_DISCONNECTION_NONLOCAL_CONNECTING);
                                 break;
-                            case WifiBlocklistMonitor.REASON_WRONG_PASSWORD:
-                                mRecentStats.incrementCount(CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE);
-                                break;
                             case WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA:
+                            case WifiBlocklistMonitor.REASON_WRONG_PASSWORD:
                             case WifiBlocklistMonitor.REASON_DHCP_FAILURE:
                             default:
                                 break;
@@ -1145,7 +1145,6 @@
                 case IP_CONFIGURATION_SUCCESS:
                     // Reset CNT_CONSECUTIVE_CONNECTION_FAILURE since L3 is also connected
                     mRecentStats.clearCount(CNT_CONSECUTIVE_CONNECTION_FAILURE);
-                    mRecentStats.clearCount(CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE);
                     changed = true;
                     logd(this.toString());
                     break;
@@ -1281,9 +1280,11 @@
          * Update link bandwidth estimates based on TrafficStats byte counts and radio on time
          */
         void updateLinkBandwidth(WifiLinkLayerStats oldStats, WifiLinkLayerStats newStats,
-                ExtendedWifiInfo wifiInfo, long txBytes, long rxBytes) {
+                ExtendedWifiInfo wifiInfo) {
             mBandwidthSampleValid[LINK_TX] = false;
             mBandwidthSampleValid[LINK_RX] = false;
+            long txBytes = mFrameworkFacade.getTotalTxBytes() - mFrameworkFacade.getMobileTxBytes();
+            long rxBytes = mFrameworkFacade.getTotalRxBytes() - mFrameworkFacade.getMobileRxBytes();
             // Sometimes TrafficStats byte counts return invalid values
             // Ignore next two polls if it happens
             boolean trafficValid = txBytes >= mLastTxBytes && rxBytes >= mLastRxBytes;
@@ -1910,9 +1911,8 @@
     public static final int CNT_DISCONNECTION = 8;
     public static final int CNT_CONSECUTIVE_CONNECTION_FAILURE = 9;
     public static final int CNT_DISCONNECTION_NONLOCAL_CONNECTING = 10;
-    public static final int CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE = 11;
     // Constant being used to keep track of how many counter there are.
-    public static final int NUMBER_CONNECTION_CNT_CODE = 12;
+    public static final int NUMBER_CONNECTION_CNT_CODE = 11;
     private static final String[] CONNECTION_CNT_NAME = {
         " ConnectAttempt: ",
         " ConnectFailure: ",
@@ -1924,8 +1924,7 @@
         " DisconnectNonlocal: ",
         " Disconnect: ",
         " ConsecutiveConnectFailure: ",
-        " ConnectFailureDiscon: ",
-        " ConsecutiveWrongPassword: "
+        " ConnectFailureDiscon: "
     };
 
     @IntDef(prefix = { "CNT_" }, value = {
@@ -1939,8 +1938,7 @@
         CNT_DISCONNECTION_NONLOCAL,
         CNT_DISCONNECTION,
         CNT_CONSECUTIVE_CONNECTION_FAILURE,
-        CNT_DISCONNECTION_NONLOCAL_CONNECTING,
-        CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE
+        CNT_DISCONNECTION_NONLOCAL_CONNECTING
     })
     @Retention(RetentionPolicy.SOURCE)
     public @interface ConnectionCountCode {}
diff --git a/service/java/com/android/server/wifi/WifiScoreReport.java b/service/java/com/android/server/wifi/WifiScoreReport.java
index 28a6d51..d9a3aff 100644
--- a/service/java/com/android/server/wifi/WifiScoreReport.java
+++ b/service/java/com/android/server/wifi/WifiScoreReport.java
@@ -24,7 +24,6 @@
 import android.net.NetworkCapabilities;
 import android.net.NetworkScore;
 import android.net.wifi.IWifiConnectedNetworkScorer;
-import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiConnectedSessionInfo;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
@@ -39,13 +38,14 @@
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.ActiveModeManager.ClientRole;
-import com.android.server.wifi.util.StringUtil;
 import com.android.wifi.resources.R;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
-import java.util.Calendar;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.LinkedList;
+import java.util.Locale;
 
 /**
  * Class used to calculate scores for connected wifi networks and report it to the associated
@@ -120,9 +120,7 @@
     private final WifiGlobals mWifiGlobals;
     private final ActiveModeWarden mActiveModeWarden;
     private final WifiConnectivityManager mWifiConnectivityManager;
-    private final WifiConfigManager mWifiConfigManager;
     private long mLastLowScoreScanTimestampMs = -1;
-    private WifiConfiguration mCurrentWifiConfiguration;
 
     /**
      * Callback from {@link ExternalScoreUpdateObserverProxy}
@@ -142,7 +140,6 @@
             long millis = mClock.getWallClockMillis();
             if (SdkLevel.isAtLeastS()) {
                 mLegacyIntScore = score;
-                // Only primary network can have external scorer.
                 updateWifiMetrics(millis, -1);
                 return;
             }
@@ -151,7 +148,7 @@
             //  removed when the WiFi mainline module is no longer updated on Android 11.
             if (score == WIFI_SCORE_TO_TERMINATE_CONNECTION_BLOCKLIST_BSSID) {
                 mWifiBlocklistMonitor.handleBssidConnectionFailure(mWifiInfoNoReset.getBSSID(),
-                        mCurrentWifiConfiguration,
+                        mWifiInfoNoReset.getSSID(),
                         WifiBlocklistMonitor.REASON_FRAMEWORK_DISCONNECT_CONNECTED_SCORE,
                         mWifiInfoNoReset.getRssi());
                 return;
@@ -317,7 +314,7 @@
             }
             if (mWifiInfoNoReset.getBSSID() != null) {
                 mWifiBlocklistMonitor.handleBssidConnectionFailure(mWifiInfoNoReset.getBSSID(),
-                        mCurrentWifiConfiguration,
+                        mWifiInfoNoReset.getSSID(),
                         WifiBlocklistMonitor.REASON_FRAMEWORK_DISCONNECT_CONNECTED_SCORE,
                         mWifiInfoNoReset.getRssi());
             }
@@ -512,8 +509,7 @@
             WifiSettingsStore wifiSettingsStore,
             WifiGlobals wifiGlobals,
             ActiveModeWarden activeModeWarden,
-            WifiConnectivityManager wifiConnectivityManager,
-            WifiConfigManager wifiConfigManager) {
+            WifiConnectivityManager wifiConnectivityManager) {
         mScoringParams = scoringParams;
         mClock = clock;
         mAdaptiveConnectivityEnabledSettingObserver = adaptiveConnectivityEnabledSettingObserver;
@@ -534,12 +530,6 @@
         mWifiGlobals = wifiGlobals;
         mActiveModeWarden = activeModeWarden;
         mWifiConnectivityManager = wifiConnectivityManager;
-        mWifiConfigManager = wifiConfigManager;
-    }
-
-    /** Returns whether this scores primary network based on the role */
-    private boolean isPrimary() {
-        return mCurrentRole != null && mCurrentRole == ActiveModeManager.ROLE_CLIENT_PRIMARY;
     }
 
     /**
@@ -547,11 +537,9 @@
      */
     public void reset() {
         mSessionNumber++;
-        mLegacyIntScore = isPrimary() ? ConnectedScore.WIFI_INITIAL_SCORE
-                : ConnectedScore.WIFI_SECONDARY_INITIAL_SCORE;
+        mLegacyIntScore = ConnectedScore.WIFI_INITIAL_SCORE;
         mIsUsable = true;
-        mLastKnownNudCheckScore = isPrimary() ? ConnectedScore.WIFI_TRANSITION_SCORE
-                : ConnectedScore.WIFI_SECONDARY_TRANSITION_SCORE;
+        mLastKnownNudCheckScore = ConnectedScore.WIFI_TRANSITION_SCORE;
         mAggressiveConnectedScore.reset();
         if (mVelocityBasedConnectedScore != null) {
             mVelocityBasedConnectedScore.reset();
@@ -596,21 +584,18 @@
         int s2 = mVelocityBasedConnectedScore.generateScore();
         score = s2;
 
-        final int transitionScore = isPrimary() ? ConnectedScore.WIFI_TRANSITION_SCORE
-                : ConnectedScore.WIFI_SECONDARY_TRANSITION_SCORE;
-        final int maxScore = isPrimary() ? ConnectedScore.WIFI_MAX_SCORE
-                : ConnectedScore.WIFI_MAX_SCORE - ConnectedScore.WIFI_SECONDARY_DELTA_SCORE;
-
-        if (mWifiInfo.getScore() > transitionScore && score <= transitionScore
+        if (mWifiInfo.getScore() > ConnectedScore.WIFI_TRANSITION_SCORE
+                && score <= ConnectedScore.WIFI_TRANSITION_SCORE
                 && mWifiInfo.getSuccessfulTxPacketsPerSecond()
                 >= mScoringParams.getYippeeSkippyPacketsPerSecond()
                 && mWifiInfo.getSuccessfulRxPacketsPerSecond()
                 >= mScoringParams.getYippeeSkippyPacketsPerSecond()
         ) {
-            score = transitionScore + 1;
+            score = ConnectedScore.WIFI_TRANSITION_SCORE + 1;
         }
 
-        if (mWifiInfo.getScore() > transitionScore && score <= transitionScore) {
+        if (mWifiInfo.getScore() > ConnectedScore.WIFI_TRANSITION_SCORE
+                && score <= ConnectedScore.WIFI_TRANSITION_SCORE) {
             // We don't want to trigger a downward breach unless the rssi is
             // below the entry threshold.  There is noise in the measured rssi, and
             // the kalman-filtered rssi is affected by the trend, so check them both.
@@ -619,13 +604,15 @@
             if (mVelocityBasedConnectedScore.getFilteredRssi() >= entry
                     || mWifiInfo.getRssi() >= entry) {
                 // Stay a notch above the transition score to reduce ambiguity.
-                score = transitionScore + 1;
+                score = ConnectedScore.WIFI_TRANSITION_SCORE + 1;
             }
         }
 
-        if (mWifiInfo.getScore() >= transitionScore && score < transitionScore) {
+        if (mWifiInfo.getScore() >= ConnectedScore.WIFI_TRANSITION_SCORE
+                && score < ConnectedScore.WIFI_TRANSITION_SCORE) {
             mLastDownwardBreachTimeMillis = millis;
-        } else if (mWifiInfo.getScore() < transitionScore && score >= transitionScore) {
+        } else if (mWifiInfo.getScore() < ConnectedScore.WIFI_TRANSITION_SCORE
+                && score >= ConnectedScore.WIFI_TRANSITION_SCORE) {
             // Staying at below transition score for a certain period of time
             // to prevent going back to wifi network again in a short time.
             long elapsedMillis = millis - mLastDownwardBreachTimeMillis;
@@ -634,8 +621,8 @@
             }
         }
         //sanitize boundaries
-        if (score > maxScore) {
-            score = maxScore;
+        if (score > ConnectedScore.WIFI_MAX_SCORE) {
+            score = ConnectedScore.WIFI_MAX_SCORE;
         }
         if (score < 0) {
             score = 0;
@@ -697,7 +684,7 @@
         int netId = getCurrentNetId();
 
         mAggressiveConnectedScore.updateUsingWifiInfo(mWifiInfo, now);
-        int s1 = ((AggressiveConnectedScore) mAggressiveConnectedScore).generateScore();
+        int s1 = mAggressiveConnectedScore.generateScore();
         logLinkMetrics(now, netId, s1, s2, mLegacyIntScore);
 
         if (mLegacyIntScore != mWifiInfo.getScore()) {
@@ -802,6 +789,7 @@
      */
     private void logLinkMetrics(long now, int netId, int s1, int s2, int score) {
         if (now < FIRST_REASONABLE_WALL_CLOCK) return;
+        double rssi = mWifiInfo.getRssi();
         double filteredRssi = -1;
         double rssiThreshold = -1;
         if (mWifiConnectedNetworkScorerHolder == null) {
@@ -821,20 +809,16 @@
         long totalBeaconRx = mWifiMetrics.getTotalBeaconRxCount();
         String s;
         try {
-            Calendar c = Calendar.getInstance();
-            c.setTimeInMillis(now);
-            // Date format: "%tm-%td %tH:%tM:%tS.%tL"
-            String timestamp = StringUtil.calendarToString(c);
-            s = timestamp + "," + mSessionNumber + "," + netId + "," + mWifiInfo.getRssi()
-                    + "," + StringUtil.doubleToString(filteredRssi, 1) + "," + rssiThreshold
-                    + "," + freq + "," + txLinkSpeed
-                    + "," + rxLinkSpeed + "," + txThroughputMbps
-                    + "," + rxThroughputMbps + "," + totalBeaconRx
-                    + "," + StringUtil.doubleToString(txSuccessRate, 2)
-                    + "," + StringUtil.doubleToString(txRetriesRate, 2)
-                    + "," + StringUtil.doubleToString(txBadRate, 2)
-                    + "," + StringUtil.doubleToString(rxSuccessRate, 2)
-                    + "," + mNudYes + "," + mNudCount + "," + s1 + "," + s2 + "," + score;
+            String timestamp = new SimpleDateFormat("MM-dd HH:mm:ss.SSS").format(new Date(now));
+            s = String.format(Locale.US, // Use US to avoid comma/decimal confusion
+                    "%s,%d,%d,%.1f,%.1f,%.1f,%d,%d,%d,%d,%d,%d,%.2f,%.2f,%.2f,%.2f,%d,%d,%d,%d,%d",
+                    timestamp, mSessionNumber, netId,
+                    rssi, filteredRssi, rssiThreshold, freq, txLinkSpeed, rxLinkSpeed,
+                    txThroughputMbps, rxThroughputMbps, totalBeaconRx,
+                    txSuccessRate, txRetriesRate, txBadRate, rxSuccessRate,
+                    mNudYes, mNudCount,
+                    s1, s2, score);
+
         } catch (Exception e) {
             Log.e(TAG, "format problem", e);
             return;
@@ -966,10 +950,7 @@
                     + " sessionId=" + sessionId);
             return;
         }
-        mCurrentWifiConfiguration = mWifiConfigManager.getConfiguredNetwork(
-                mWifiInfo.getNetworkId());
-        mWifiInfo.setScore(isPrimary() ? ConnectedScore.WIFI_MAX_SCORE
-                : ConnectedScore.WIFI_SECONDARY_MAX_SCORE);
+        mWifiInfo.setScore(ConnectedScore.WIFI_MAX_SCORE);
         mWifiConnectedNetworkScorerHolder.startSession(sessionId, mIsUserSelected);
         mWifiInfoNoReset.setBSSID(mWifiInfo.getBSSID());
         mWifiInfoNoReset.setSSID(mWifiInfo.getWifiSsid());
@@ -994,7 +975,7 @@
                 && ((millis - mLastScoreBreachLowTimeMillis)
                         >= MIN_TIME_TO_WAIT_BEFORE_BLOCKLIST_BSSID_MILLIS)) {
             mWifiBlocklistMonitor.handleBssidConnectionFailure(mWifiInfo.getBSSID(),
-                    mCurrentWifiConfiguration,
+                    mWifiInfo.getSSID(),
                     WifiBlocklistMonitor.REASON_FRAMEWORK_DISCONNECT_CONNECTED_SCORE,
                     mWifiInfo.getRssi());
             mLastScoreBreachLowTimeMillis = INVALID_WALL_CLOCK_MILLIS;
@@ -1087,8 +1068,6 @@
     /** Called when the owner {@link ConcreteClientModeManager}'s role changes. */
     public void onRoleChanged(@Nullable ClientRole role) {
         mCurrentRole = role;
-        if (mAggressiveConnectedScore != null) mAggressiveConnectedScore.onRoleChanged(role);
-        if (mVelocityBasedConnectedScore != null) mVelocityBasedConnectedScore.onRoleChanged(role);
         sendNetworkScore();
     }
 }
diff --git a/service/java/com/android/server/wifi/WifiService.java b/service/java/com/android/server/wifi/WifiService.java
index 31a0cd7..3ebbb98 100644
--- a/service/java/com/android/server/wifi/WifiService.java
+++ b/service/java/com/android/server/wifi/WifiService.java
@@ -17,7 +17,6 @@
 package com.android.server.wifi;
 
 import android.content.Context;
-import android.net.wifi.WifiContext;
 import android.util.Log;
 
 import com.android.server.SystemService;
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java
index 661265b..81db677 100644
--- a/service/java/com/android/server/wifi/WifiServiceImpl.java
+++ b/service/java/com/android/server/wifi/WifiServiceImpl.java
@@ -20,44 +20,27 @@
 import static android.content.pm.PackageManager.PERMISSION_GRANTED;
 import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.ERROR_GENERIC;
 import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.ERROR_NO_CHANNEL;
-import static android.net.wifi.WifiManager.PnoScanResultsCallback.REGISTER_PNO_CALLBACK_PNO_NOT_SUPPORTED;
 import static android.net.wifi.WifiManager.SAP_START_FAILURE_NO_CHANNEL;
 import static android.net.wifi.WifiManager.WIFI_AP_STATE_DISABLED;
 import static android.net.wifi.WifiManager.WIFI_AP_STATE_DISABLING;
 import static android.net.wifi.WifiManager.WIFI_AP_STATE_ENABLED;
 import static android.net.wifi.WifiManager.WIFI_AP_STATE_ENABLING;
 import static android.net.wifi.WifiManager.WIFI_AP_STATE_FAILED;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE;
-import static android.net.wifi.WifiManager.WIFI_INTERFACE_TYPE_AP;
-import static android.net.wifi.WifiManager.WIFI_INTERFACE_TYPE_AWARE;
-import static android.net.wifi.WifiManager.WIFI_INTERFACE_TYPE_DIRECT;
-import static android.net.wifi.WifiManager.WIFI_INTERFACE_TYPE_STA;
-import static android.net.wifi.WifiManager.WIFI_STATE_ENABLED;
 
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_LOCAL_ONLY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_LONG_LIVED;
-import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_TRANSIENT;
 import static com.android.server.wifi.ClientModeImpl.RESET_SIM_REASON_DEFAULT_DATA_SIM_CHANGED;
 import static com.android.server.wifi.ClientModeImpl.RESET_SIM_REASON_SIM_INSERTED;
 import static com.android.server.wifi.ClientModeImpl.RESET_SIM_REASON_SIM_REMOVED;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP_BRIDGE;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_NAN;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_P2P;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_STA;
 import static com.android.server.wifi.SelfRecovery.REASON_API_CALL;
 import static com.android.server.wifi.WifiSettingsConfigStore.WIFI_VERBOSE_LOGGING_ENABLED;
 
 import android.Manifest;
-import android.annotation.AnyThread;
 import android.annotation.CheckResult;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.AppOpsManager;
-import android.app.admin.DevicePolicyManager;
-import android.app.admin.WifiSsidPolicy;
 import android.bluetooth.BluetoothAdapter;
-import android.content.AttributionSource;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.Context;
@@ -67,32 +50,22 @@
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
-import android.content.res.Resources;
-import android.location.LocationManager;
 import android.net.DhcpInfo;
-import android.net.DhcpOption;
 import android.net.DhcpResultsParcelable;
 import android.net.InetAddresses;
-import android.net.MacAddress;
 import android.net.Network;
 import android.net.NetworkCapabilities;
 import android.net.NetworkStack;
 import android.net.Uri;
 import android.net.ip.IpClientUtil;
-import android.net.wifi.BaseWifiService;
 import android.net.wifi.CoexUnsafeChannel;
 import android.net.wifi.IActionListener;
-import android.net.wifi.IBooleanListener;
 import android.net.wifi.ICoexCallback;
 import android.net.wifi.IDppCallback;
-import android.net.wifi.IInterfaceCreationInfoCallback;
-import android.net.wifi.ILastCallerListener;
 import android.net.wifi.ILocalOnlyHotspotCallback;
 import android.net.wifi.INetworkRequestMatchCallback;
 import android.net.wifi.IOnWifiActivityEnergyInfoListener;
-import android.net.wifi.IOnWifiDriverCountryCodeChangedListener;
 import android.net.wifi.IOnWifiUsabilityStatsListener;
-import android.net.wifi.IPnoScanResultsCallback;
 import android.net.wifi.IScanResultsCallback;
 import android.net.wifi.ISoftApCallback;
 import android.net.wifi.ISubsystemRestartCallback;
@@ -109,7 +82,6 @@
 import android.net.wifi.WifiAvailableChannel;
 import android.net.wifi.WifiClient;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiManager.AddNetworkResult;
@@ -122,16 +94,14 @@
 import android.net.wifi.WifiManager.WifiApState;
 import android.net.wifi.WifiNetworkSuggestion;
 import android.net.wifi.WifiScanner;
-import android.net.wifi.WifiSsid;
 import android.net.wifi.hotspot2.IProvisioningCallback;
 import android.net.wifi.hotspot2.OsuProvider;
 import android.net.wifi.hotspot2.PasspointConfiguration;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.AsyncTask;
 import android.os.Binder;
 import android.os.Build;
-import android.os.Bundle;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.os.HandlerThread;
 import android.os.IBinder;
 import android.os.Looper;
@@ -152,15 +122,11 @@
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
 import android.util.Log;
-import android.util.Pair;
-import android.util.SparseArray;
-import android.util.SparseIntArray;
 
 import androidx.annotation.RequiresApi;
 
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.HandlerExecutor;
 import com.android.modules.utils.ParceledListSlice;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.net.module.util.Inet4AddressUtils;
@@ -173,6 +139,7 @@
 import com.android.server.wifi.util.GeneralUtil.Mutable;
 import com.android.server.wifi.util.LastCallerInfoManager;
 import com.android.server.wifi.util.RssiUtil;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.wifi.resources.R;
 
@@ -198,11 +165,9 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
-import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executor;
 import java.util.concurrent.TimeUnit;
-import java.util.function.BiConsumer;
 
 /**
  * WifiService handles remote WiFi operation requests by implementing
@@ -243,8 +208,6 @@
     private final CoexManager mCoexManager;
     private final WifiNetworkSuggestionsManager mWifiNetworkSuggestionsManager;
     private final WifiConfigManager mWifiConfigManager;
-    private final HalDeviceManager mHalDeviceManager;
-    private final WifiBlocklistMonitor mWifiBlocklistMonitor;
     private final PasspointManager mPasspointManager;
     private final WifiLog mLog;
     private final WifiConnectivityManager mWifiConnectivityManager;
@@ -268,12 +231,6 @@
 
     private final DefaultClientModeManager mDefaultClientModeManager;
 
-    @VisibleForTesting
-    public final CountryCodeTracker mCountryCodeTracker;
-    private final MultiInternetManager mMultiInternetManager;
-    private int mVerboseAlwaysOnLevel = -1;
-    private boolean mIsWifiServiceStarted = false;
-
     /**
      * Callback for use with LocalOnlyHotspot to unregister requesting applications upon death.
      */
@@ -305,8 +262,7 @@
                 Log.d(TAG, "OBSERVED active data subscription change, subId: " + subId);
                 mTetheredSoftApTracker.updateSoftApCapabilityWhenCarrierConfigChanged(subId);
                 mActiveModeWarden.updateSoftApCapability(
-                        mTetheredSoftApTracker.getSoftApCapability(),
-                        WifiManager.IFACE_IP_MODE_TETHERED);
+                        mTetheredSoftApTracker.getSoftApCapability());
             });
         }
     }
@@ -325,23 +281,16 @@
     private final SimRequiredNotifier mSimRequiredNotifier;
     private final MakeBeforeBreakManager mMakeBeforeBreakManager;
     private final LastCallerInfoManager mLastCallerInfoManager;
-    private final @NonNull WifiDialogManager mWifiDialogManager;
-    private final SparseArray<WifiDialogManager.DialogHandle> mWifiEnableRequestDialogHandles =
-            new SparseArray<>();
-
-    private boolean mWifiTetheringDisallowed;
-    private boolean mIsBootComplete;
-    private boolean mIsLocationModeEnabled;
 
     /**
      * The wrapper of SoftApCallback is used in WifiService internally.
      * see: {@code WifiManager.SoftApCallback}
      */
-    public abstract class SoftApCallbackInternal {
+    public interface SoftApCallbackInternal {
         /**
          * see: {@code WifiManager.SoftApCallback#onStateChanged(int, int)}
          */
-        void onStateChanged(@WifiApState int state, @SapStartFailure int failureReason) {}
+        default void onStateChanged(@WifiApState int state, @SapStartFailure int failureReason) {}
 
         /**
          * The callback which only is used in service internally and pass to WifiManager.
@@ -351,101 +300,19 @@
          * 3. onConnectedClientsChanged(SoftApInfo, List<WifiClient>)
          * 4. onConnectedClientsChanged(List<WifiClient>)
          */
-        void onConnectedClientsOrInfoChanged(Map<String, SoftApInfo> infos,
+        default void onConnectedClientsOrInfoChanged(Map<String, SoftApInfo> infos,
                 Map<String, List<WifiClient>> clients, boolean isBridged) {}
 
         /**
          * see: {@code WifiManager.SoftApCallback#onCapabilityChanged(SoftApCapability)}
          */
-        void onCapabilityChanged(@NonNull SoftApCapability softApCapability) {}
+        default void onCapabilityChanged(@NonNull SoftApCapability softApCapability) {}
 
         /**
          * see: {@code WifiManager.SoftApCallback#onBlockedClientConnecting(WifiClient, int)}
          */
-        void onBlockedClientConnecting(@NonNull WifiClient client,
+        default void onBlockedClientConnecting(@NonNull WifiClient client,
                 @SapClientBlockedReason int blockedReason) {}
-
-        /**
-         * Notify register the state of soft AP changed.
-         */
-        public void notifyRegisterOnStateChanged(RemoteCallbackList<ISoftApCallback> callbacks,
-                int state, int failureReason) {
-            int itemCount = callbacks.beginBroadcast();
-            for (int i = 0; i < itemCount; i++) {
-                try {
-                    callbacks.getBroadcastItem(i).onStateChanged(state,
-                            failureReason);
-                } catch (RemoteException e) {
-                    Log.e(TAG, "onStateChanged: remote exception -- " + e);
-                }
-            }
-            callbacks.finishBroadcast();
-        }
-
-
-       /**
-         * Notify register the connected clients to soft AP changed.
-         *
-         * @param clients connected clients to soft AP
-         */
-        public void notifyRegisterOnConnectedClientsOrInfoChanged(
-                RemoteCallbackList<ISoftApCallback> callbacks, Map<String, SoftApInfo> infos,
-                Map<String, List<WifiClient>> clients, boolean isBridged) {
-            int itemCount = callbacks.beginBroadcast();
-            for (int i = 0; i < itemCount; i++) {
-                try {
-                    callbacks.getBroadcastItem(i).onConnectedClientsOrInfoChanged(
-                            ApConfigUtil.deepCopyForSoftApInfoMap(infos),
-                            ApConfigUtil.deepCopyForWifiClientListMap(
-                                    clients), isBridged, false);
-                } catch (RemoteException e) {
-                    Log.e(TAG, "onConnectedClientsOrInfoChanged: remote exception -- " + e);
-                }
-            }
-            callbacks.finishBroadcast();
-        }
-
-        /**
-         * Notify register capability of softap changed.
-         *
-         * @param capability is the softap capability. {@link SoftApCapability}
-         */
-        public void notifyRegisterOnCapabilityChanged(RemoteCallbackList<ISoftApCallback> callbacks,
-                SoftApCapability capability) {
-            int itemCount = callbacks.beginBroadcast();
-            for (int i = 0; i < itemCount; i++) {
-                try {
-                    callbacks.getBroadcastItem(i).onCapabilityChanged(
-                            capability);
-                } catch (RemoteException e) {
-                    Log.e(TAG, "onCapabiliyChanged: remote exception -- " + e);
-                }
-            }
-            callbacks.finishBroadcast();
-        }
-
-        /**
-         * Notify register there was a client trying to connect but device blocked the client with
-         * specific reason.
-         *
-         * @param client the currently blocked client.
-         * @param blockedReason one of blocked reason from
-         * {@link WifiManager.SapClientBlockedReason}
-         */
-        public void notifyRegisterOnBlockedClientConnecting(
-                RemoteCallbackList<ISoftApCallback> callbacks, WifiClient client,
-                int blockedReason) {
-            int itemCount = callbacks.beginBroadcast();
-            for (int i = 0; i < itemCount; i++) {
-                try {
-                    callbacks.getBroadcastItem(i).onBlockedClientConnecting(client,
-                            blockedReason);
-                } catch (RemoteException e) {
-                    Log.e(TAG, "onBlockedClientConnecting: remote exception -- " + e);
-                }
-            }
-            callbacks.finishBroadcast();
-        }
     }
 
 
@@ -481,8 +348,6 @@
         mWifiThreadRunner = mWifiInjector.getWifiThreadRunner();
         mWifiHandlerThread = mWifiInjector.getWifiHandlerThread();
         mWifiConfigManager = mWifiInjector.getWifiConfigManager();
-        mHalDeviceManager = mWifiInjector.getHalDeviceManager();
-        mWifiBlocklistMonitor = mWifiInjector.getWifiBlocklistMonitor();
         mPasspointManager = mWifiInjector.getPasspointManager();
         mWifiScoreCard = mWifiInjector.getWifiScoreCard();
         mWifiHealthMonitor = wifiInjector.getWifiHealthMonitor();
@@ -498,20 +363,8 @@
         mWifiCarrierInfoManager = wifiInjector.getWifiCarrierInfoManager();
         mMakeBeforeBreakManager = mWifiInjector.getMakeBeforeBreakManager();
         mLastCallerInfoManager = mWifiInjector.getLastCallerInfoManager();
-        mWifiDialogManager = mWifiInjector.getWifiDialogManager();
         mBuildProperties = mWifiInjector.getBuildProperties();
         mDefaultClientModeManager = mWifiInjector.getDefaultClientModeManager();
-        mCountryCodeTracker = new CountryCodeTracker();
-        mWifiTetheringDisallowed = false;
-        mMultiInternetManager = mWifiInjector.getMultiInternetManager();
-    }
-
-    private int getVerboseAlwaysOnLevel() {
-        if (mVerboseAlwaysOnLevel == -1) {
-            mVerboseAlwaysOnLevel = mContext.getResources()
-                    .getInteger(R.integer.config_wifiVerboseLoggingAlwaysOnLevel);
-        }
-        return mVerboseAlwaysOnLevel;
     }
 
     /**
@@ -527,9 +380,6 @@
             if (!mWifiConfigManager.loadFromStore()) {
                 Log.e(TAG, "Failed to load from config store");
             }
-            if (!mWifiGlobals.isInsecureEnterpriseConfigurationAllowed()) {
-                mWifiConfigManager.updateTrustOnFirstUseFlag(isTrustOnFirstUseSupported());
-            }
             mWifiConfigManager.incrementNumRebootsSinceLastUse();
             // config store is read, check if verbose logging is enabled.
             enableVerboseLoggingInternal(
@@ -619,37 +469,6 @@
                     null,
                     new Handler(mWifiHandlerThread.getLooper()));
 
-            mContext.registerReceiver(
-                    new BroadcastReceiver() {
-                        @Override
-                        public void onReceive(Context context, Intent intent) {
-                            if (isVerboseLoggingEnabled()) {
-                                Log.v(TAG, "onReceive: MODE_CHANGED_ACTION: intent=" + intent);
-                            }
-                            updateLocationMode();
-                        }
-                    },
-                    new IntentFilter(LocationManager.MODE_CHANGED_ACTION),
-                    null,
-                    new Handler(mWifiHandlerThread.getLooper()));
-            updateLocationMode();
-
-            if (SdkLevel.isAtLeastT()) {
-                mContext.registerReceiver(
-                        new BroadcastReceiver() {
-                            @Override
-                            public void onReceive(Context context, Intent intent) {
-                                Log.d(TAG, "user restrictions changed");
-                                onUserRestrictionsChanged();
-                            }
-                        },
-                        new IntentFilter(UserManager.ACTION_USER_RESTRICTIONS_CHANGED),
-                        null,
-                        new Handler(mWifiHandlerThread.getLooper()));
-                mWifiTetheringDisallowed = mUserManager.getUserRestrictions()
-                        .getBoolean(UserManager.DISALLOW_WIFI_TETHERING);
-            }
-
             // Adding optimizations of only receiving broadcasts when wifi is enabled
             // can result in race conditions when apps toggle wifi in the background
             // without active user involvement. Always receive broadcasts.
@@ -659,34 +478,9 @@
             mActiveModeWarden.start();
             registerForCarrierConfigChange();
             mWifiInjector.getAdaptiveConnectivityEnabledSettingObserver().initialize();
-            mIsWifiServiceStarted = true;
         });
     }
 
-    private void updateLocationMode() {
-        mIsLocationModeEnabled = mWifiPermissionsUtil.isLocationModeEnabled();
-        mWifiConnectivityManager.setLocationModeEnabled(mIsLocationModeEnabled);
-    }
-
-
-    /**
-     * Find which user restrictions have changed and take corresponding actions
-     */
-    @VisibleForTesting
-    public void onUserRestrictionsChanged() {
-        final Bundle restrictions = mUserManager.getUserRestrictions();
-        final boolean newWifiTetheringDisallowed =
-                restrictions.getBoolean(UserManager.DISALLOW_WIFI_TETHERING);
-
-        if (newWifiTetheringDisallowed != mWifiTetheringDisallowed) {
-            if (newWifiTetheringDisallowed) {
-                mLog.info("stopSoftAp DISALLOW_WIFI_TETHERING set").flush();
-                stopSoftApInternal(WifiManager.IFACE_IP_MODE_TETHERED);
-            }
-            mWifiTetheringDisallowed = newWifiTetheringDisallowed;
-        }
-    }
-
     private void resetCarrierNetworks(@ClientModeImpl.ResetSimReason int resetReason) {
         Log.d(TAG, "resetting carrier networks since SIM was changed");
         if (resetReason == RESET_SIM_REASON_SIM_INSERTED) {
@@ -704,19 +498,15 @@
         for (ClientModeManager cmm : mActiveModeWarden.getClientModeManagers()) {
             cmm.resetSimAuthNetworks(resetReason);
         }
-        mWifiThreadRunner.post(mWifiNetworkSuggestionsManager::updateCarrierPrivilegedApps);
+        mWifiThreadRunner.post(mWifiNetworkSuggestionsManager::resetCarrierPrivilegedApps);
         if (resetReason == RESET_SIM_REASON_SIM_INSERTED) {
             // clear the blocklists in case any SIM based network were disabled due to the SIM
             // not being available.
             mWifiConfigManager.enableTemporaryDisabledNetworks();
             mWifiConnectivityManager.forceConnectivityScan(ClientModeImpl.WIFI_WORK_SOURCE);
         } else {
-            // Remove ephemeral carrier networks from Carrier unprivileged Apps, which will lead to
-            // a disconnection. Privileged App will handle by the
-            // mWifiNetworkSuggestionsManager#updateCarrierPrivilegedApps
-            mWifiThreadRunner.post(() -> mWifiConfigManager
-                    .removeEphemeralCarrierNetworks(mWifiCarrierInfoManager
-                            .getCurrentCarrierPrivilegedPackages()));
+            // Remove all ephemeral carrier networks keep subscriptionId update with SIM changes
+            mWifiThreadRunner.post(mWifiConfigManager::removeEphemeralCarrierNetworks);
         }
     }
 
@@ -736,7 +526,7 @@
                         @Override
                         public void onReceive(Context context, Intent intent) {
                             String action = intent.getAction();
-                            if (Intent.ACTION_USER_REMOVED.equals(action)) {
+                            if (action.equals(Intent.ACTION_USER_REMOVED)) {
                                 UserHandle userHandle =
                                         intent.getParcelableExtra(Intent.EXTRA_USER);
                                 if (userHandle == null) {
@@ -746,8 +536,8 @@
                                 }
                                 mWifiConfigManager
                                         .removeNetworksForUser(userHandle.getIdentifier());
-                            } else if (BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED
-                                    .equals(action)) {
+                            } else if (action.equals(
+                                    BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED)) {
                                 int state = intent.getIntExtra(
                                         BluetoothAdapter.EXTRA_CONNECTION_STATE,
                                         BluetoothAdapter.STATE_DISCONNECTED);
@@ -758,7 +548,7 @@
                                         mActiveModeWarden.getClientModeManagers()) {
                                     cmm.onBluetoothConnectionStateChanged();
                                 }
-                            } else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) {
+                            } else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
                                 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE,
                                         BluetoothAdapter.STATE_OFF);
                                 boolean isEnabled = state != BluetoothAdapter.STATE_OFF;
@@ -767,10 +557,10 @@
                                         mActiveModeWarden.getClientModeManagers()) {
                                     cmm.onBluetoothConnectionStateChanged();
                                 }
-                            } else if (PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED
-                                    .equals(action)) {
+                            } else if (action.equals(
+                                    PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED)) {
                                 handleIdleModeChanged();
-                            } else if (Intent.ACTION_SHUTDOWN.equals(action)) {
+                            } else if (action.equals(Intent.ACTION_SHUTDOWN)) {
                                 handleShutDown();
                             }
                         }
@@ -783,17 +573,12 @@
                     mWifiInjector.getPasspointProvisionerHandlerThread().getLooper());
             mWifiInjector.getWifiNetworkFactory().register();
             mWifiInjector.getUntrustedWifiNetworkFactory().register();
-            mWifiInjector.getRestrictedWifiNetworkFactory().register();
             mWifiInjector.getOemWifiNetworkFactory().register();
-            mWifiInjector.getMultiInternetWifiNetworkFactory().register();
             mWifiInjector.getWifiP2pConnection().handleBootCompleted();
-            // Start to listen country code change to avoid query supported channels causes boot
-            // time increased.
-            mCountryCode.registerListener(mCountryCodeTracker);
+            // Start to listen country code change.
+            mCountryCode.registerListener(new CountryCodeListenerProxy());
             mTetheredSoftApTracker.handleBootCompleted();
-            mLohsSoftApTracker.handleBootCompleted();
             mWifiInjector.getSarManager().handleBootCompleted();
-            mIsBootComplete = true;
         });
     }
 
@@ -827,9 +612,8 @@
         if (enforceChangePermission(packageName) != MODE_ALLOWED) {
             return false;
         }
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
 
+        int callingUid = Binder.getCallingUid();
         long ident = Binder.clearCallingIdentity();
         mLog.info("startScan uid=%").c(callingUid).flush();
         synchronized (this) {
@@ -962,15 +746,9 @@
                 pid, uid) == PackageManager.PERMISSION_GRANTED;
     }
 
-    private boolean checkManageDeviceAdminsPermission(int pid, int uid) {
-        return mContext.checkPermission(android.Manifest.permission.MANAGE_DEVICE_ADMINS,
-                pid, uid) == PackageManager.PERMISSION_GRANTED;
-    }
-
     /**
      * Helper method to check if the entity initiating the binder call has any of the signature only
-     * permissions. Not to be confused with the concept of privileged apps, which are system apps
-     * with allow-listed "privileged" permissions.
+     * permissions.
      */
     private boolean isPrivileged(int pid, int uid) {
         return checkNetworkSettingsPermission(pid, uid)
@@ -1086,56 +864,32 @@
         mWifiPermissionsUtil.enforceLocationPermission(pkgName, featureId, uid);
     }
 
-    private void enforceCoarseLocationPermission(@Nullable String pkgName,
-            @Nullable String featureId, int uid) {
-        mWifiPermissionsUtil.enforceCoarseLocationPermission(pkgName, featureId, uid);
-    }
-
     /**
      * Helper method to check if the app is allowed to access public API's deprecated in
      * {@link Build.VERSION_CODES#Q}.
      * Note: Invoke mAppOps.checkPackage(uid, packageName) before to ensure correct package name.
      */
     private boolean isTargetSdkLessThanQOrPrivileged(String packageName, int pid, int uid) {
-        return (mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q, uid)
-                && !isGuestUser())
+        return mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q, uid)
                 || isPrivileged(pid, uid)
-                || mWifiPermissionsUtil.isAdmin(uid, packageName)
+                || isDeviceOrProfileOwner(uid, packageName)
                 || mWifiPermissionsUtil.isSystem(packageName, uid)
                 // TODO(b/140540984): Remove this bypass.
                 || mWifiPermissionsUtil.checkSystemAlertWindowPermission(uid, packageName);
     }
 
-    private boolean isGuestUser() {
-        long ident = Binder.clearCallingIdentity();
-        try {
-            return mWifiPermissionsUtil.isGuestUser();
-        } finally {
-            Binder.restoreCallingIdentity(ident);
-        }
-    }
-
     /**
      * Helper method to check if the app is allowed to access public API's deprecated in
      * {@link Build.VERSION_CODES#R}.
      * Note: Invoke mAppOps.checkPackage(uid, packageName) before to ensure correct package name.
      */
     private boolean isTargetSdkLessThanROrPrivileged(String packageName, int pid, int uid) {
-        return (mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.R, uid)
-                && !isGuestUser())
+        return mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.R, uid)
                 || isPrivileged(pid, uid)
-                || mWifiPermissionsUtil.isAdmin(uid, packageName)
+                || isDeviceOrProfileOwner(uid, packageName)
                 || mWifiPermissionsUtil.isSystem(packageName, uid);
     }
 
-    private boolean isPlatformOrTargetSdkLessThanT(String packageName, int uid) {
-        if (!SdkLevel.isAtLeastT()) {
-            return true;
-        }
-        return mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.TIRAMISU,
-                uid);
-    }
-
     /**
      * Get the current primary ClientModeManager in a thread safe manner, but blocks on the main
      * Wifi thread.
@@ -1157,17 +911,13 @@
         if (enforceChangePermission(packageName) != MODE_ALLOWED) {
             return false;
         }
-        int callingUid = Binder.getCallingUid();
-        int callingPid = Binder.getCallingPid();
-        boolean isPrivileged = isPrivileged(callingPid, callingUid);
-        boolean isThirdParty = !isPrivileged
-                && !isDeviceOrProfileOwner(callingUid, packageName)
-                && !mWifiPermissionsUtil.isSystem(packageName, callingUid);
-        boolean isTargetSdkLessThanQ = mWifiPermissionsUtil.isTargetSdkLessThan(packageName,
-                Build.VERSION_CODES.Q, callingUid) && !isGuestUser();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
-        if (isThirdParty && !isTargetSdkLessThanQ) {
-            mLog.info("setWifiEnabled not allowed for uid=%").c(callingUid).flush();
+        boolean isPrivileged = isPrivileged(Binder.getCallingPid(), Binder.getCallingUid());
+        if (!isPrivileged && !isDeviceOrProfileOwner(Binder.getCallingUid(), packageName)
+                && !mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q,
+                  Binder.getCallingUid())
+                && !mWifiPermissionsUtil.isSystem(packageName, Binder.getCallingUid())) {
+            mLog.info("setWifiEnabled not allowed for uid=%")
+                    .c(Binder.getCallingUid()).flush();
             return false;
         }
         // If Airplane mode is enabled, only privileged apps are allowed to toggle Wifi
@@ -1182,62 +932,19 @@
             return false;
         }
 
-        // If user restriction is set, only DO/PO is allowed to toggle wifi
-        if (SdkLevel.isAtLeastT() && mUserManager.hasUserRestrictionForUser(
-                UserManager.DISALLOW_CHANGE_WIFI_STATE,
-                UserHandle.getUserHandleForUid(callingUid))
-                && !isDeviceOrProfileOwner(callingUid, packageName)) {
-            mLog.err("setWifiEnabled with user restriction: only DO/PO can toggle wifi").flush();
-            return false;
-        }
-
-        // Show a user-confirmation dialog for legacy third-party apps targeting less than Q.
-        if (enable && isTargetSdkLessThanQ && isThirdParty
-                && mContext.getResources().getBoolean(
-                R.bool.config_showConfirmationDialogForThirdPartyAppsEnablingWifi)) {
-            mLog.info("setWifiEnabled must show user confirmation dialog for uid=%").c(callingUid)
-                    .flush();
-            mWifiThreadRunner.post(() -> {
-                if (mActiveModeWarden.getWifiState()
-                        == WIFI_STATE_ENABLED) {
-                    // Wi-Fi already enabled; don't need to show dialog.
-                    return;
-                }
-                showWifiEnableRequestDialog(callingUid, callingPid, packageName);
-            });
-            return true;
-        }
-        setWifiEnabledInternal(packageName, enable, callingUid, callingPid, isPrivileged);
-        return true;
-    }
-
-    @AnyThread
-    private void setWifiEnabledInternal(String packageName, boolean enable,
-            int callingUid, int callingPid, boolean isPrivileged) {
-        mLog.info("setWifiEnabled package=% uid=% enable=% isPrivileged=%").c(packageName)
-                .c(callingUid).c(enable).c(isPrivileged).flush();
+        mLog.info("setWifiEnabled package=% uid=% enable=%").c(packageName)
+                .c(Binder.getCallingUid()).c(enable).flush();
         long ident = Binder.clearCallingIdentity();
         try {
             if (!mSettingsStore.handleWifiToggled(enable)) {
                 // Nothing to do if wifi cannot be toggled
-                return;
+                return true;
             }
         } finally {
             Binder.restoreCallingIdentity(ident);
         }
-        if (enable) {
-            // Clear out all outstanding wifi enable request dialogs.
-            mWifiThreadRunner.post(() -> {
-                for (int i = 0; i < mWifiEnableRequestDialogHandles.size(); i++) {
-                    mWifiEnableRequestDialogHandles.valueAt(i).dismissDialog();
-                }
-                mWifiEnableRequestDialogHandles.clear();
-            });
-        }
-        if (mWifiPermissionsUtil.checkNetworkSettingsPermission(callingUid)) {
+        if (mWifiPermissionsUtil.checkNetworkSettingsPermission(Binder.getCallingUid())) {
             if (enable) {
-                mWifiThreadRunner.post(
-                        () -> mWifiConnectivityManager.setAutoJoinEnabledExternal(true));
                 mWifiMetrics.logUserActionEvent(UserActionEvent.EVENT_TOGGLE_WIFI_ON);
             } else {
                 WifiInfo wifiInfo =
@@ -1247,62 +954,10 @@
             }
         }
         mWifiMetrics.incrementNumWifiToggles(isPrivileged, enable);
-        mActiveModeWarden.wifiToggled(new WorkSource(callingUid, packageName));
-        mLastCallerInfoManager.put(WifiManager.API_WIFI_ENABLED, Process.myTid(),
-                callingUid, callingPid, packageName, enable);
-    }
-
-    private void showWifiEnableRequestDialog(int uid, int pid, @NonNull String packageName) {
-        String appName;
-        try {
-            PackageManager pm = mContext.getPackageManager();
-            ApplicationInfo appInfo = pm.getApplicationInfo(packageName, 0);
-            appName = appInfo.loadLabel(pm).toString();
-        } catch (PackageManager.NameNotFoundException e) {
-            appName = packageName;
-        }
-        WifiDialogManager.SimpleDialogCallback dialogCallback =
-                new WifiDialogManager.SimpleDialogCallback() {
-                    @Override
-                    public void onPositiveButtonClicked() {
-                        mLog.info("setWifiEnabled dialog accepted for package=% uid=%")
-                                .c(packageName).c(uid).flush();
-                        mWifiEnableRequestDialogHandles.delete(uid);
-                        setWifiEnabledInternal(packageName, true, uid, pid, false);
-                    }
-
-                    @Override
-                    public void onNegativeButtonClicked() {
-                        mLog.info("setWifiEnabled dialog declined for package=% uid=%")
-                                .c(packageName).c(uid).flush();
-                        mWifiEnableRequestDialogHandles.delete(uid);
-                    }
-
-                    @Override
-                    public void onNeutralButtonClicked() {
-                        // Not used.
-                    }
-
-                    @Override
-                    public void onCancelled() {
-                        mLog.info("setWifiEnabled dialog cancelled for package=% uid=%")
-                                .c(packageName).c(uid).flush();
-                        mWifiEnableRequestDialogHandles.delete(uid);
-                    }
-                };
-        Resources res = mContext.getResources();
-        WifiDialogManager.DialogHandle dialogHandle = mWifiDialogManager.createSimpleDialog(
-                res.getString(R.string.wifi_enable_request_dialog_title, appName),
-                res.getString(R.string.wifi_enable_request_dialog_message),
-                res.getString(R.string.wifi_enable_request_dialog_positive_button),
-                res.getString(R.string.wifi_enable_request_dialog_negative_button),
-                null /* neutralButtonText */,
-                dialogCallback,
-                mWifiThreadRunner);
-        mWifiEnableRequestDialogHandles.put(uid, dialogHandle);
-        dialogHandle.launchDialog();
-        mLog.info("setWifiEnabled dialog launched for package=% uid=%").c(packageName)
-                .c(uid).flush();
+        mActiveModeWarden.wifiToggled(new WorkSource(Binder.getCallingUid(), packageName));
+        mLastCallerInfoManager.put(LastCallerInfoManager.WIFI_ENABLED, Process.myTid(),
+                Binder.getCallingUid(), Binder.getCallingPid(), packageName, enable);
+        return true;
     }
 
     @RequiresApi(Build.VERSION_CODES.S)
@@ -1373,7 +1028,7 @@
         if (isVerboseLoggingEnabled()) {
             mLog.info("getWifiEnabledState uid=%").c(Binder.getCallingUid()).flush();
         }
-        return mActiveModeWarden.getWifiState();
+        return getPrimaryClientModeManagerBlockingThreadSafe().syncGetWifiState();
     }
 
     /**
@@ -1487,35 +1142,6 @@
         mWifiThreadRunner.post(() -> mCoexManager.unregisterRemoteCoexCallback(callback));
     }
 
-    private Runnable mRecoverSoftApStateIfNeeded = new Runnable() {
-        @Override
-        public void run() {
-            mTetheredSoftApTracker.setFailedWhileEnabling();
-        }
-    };
-
-    private boolean checkSetEnablingIfAllowed() {
-        Boolean resultSetEnablingIfAllowed = mWifiThreadRunner.call(() -> {
-            if (mWifiThreadRunner.hasCallbacks(mRecoverSoftApStateIfNeeded)) {
-                Log.i(TAG, "An error happened, state is recovering, reject more requests");
-                return false;
-            }
-            return mTetheredSoftApTracker.setEnablingIfAllowed();
-        }, null);
-
-        if (resultSetEnablingIfAllowed == null) {
-            Log.i(TAG, "Timeout happened ! Recover SAP state if needed");
-            mWifiThreadRunner.removeCallbacks(mRecoverSoftApStateIfNeeded);
-            mWifiThreadRunner.post(mRecoverSoftApStateIfNeeded);
-            return false;
-        }
-
-        if (!resultSetEnablingIfAllowed) {
-            mLog.err("Tethering is already active or in recovering.").flush();
-        }
-        return resultSetEnablingIfAllowed;
-    }
-
     /**
      * see {@link android.net.wifi.WifiManager#startSoftAp(WifiConfiguration)}
      * @param wifiConfig SSID, security and channel details as part of WifiConfiguration
@@ -1526,10 +1152,8 @@
     public boolean startSoftAp(WifiConfiguration wifiConfig, String packageName) {
         // NETWORK_STACK is a signature only permission.
         enforceNetworkStackPermission();
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
 
-        mLog.info("startSoftAp uid=%").c(callingUid).flush();
+        mLog.info("startSoftAp uid=%").c(Binder.getCallingUid()).flush();
 
         SoftApConfiguration softApConfig = null;
         if (wifiConfig != null) {
@@ -1539,12 +1163,12 @@
             }
         }
 
-        // TODO: b/233363886, handle timeout in general way.
-        if (!checkSetEnablingIfAllowed()) {
+        if (!mTetheredSoftApTracker.setEnablingIfAllowed()) {
+            mLog.err("Tethering is already active.").flush();
             return false;
         }
 
-        WorkSource requestorWs = new WorkSource(callingUid, packageName);
+        WorkSource requestorWs = new WorkSource(Binder.getCallingUid(), packageName);
         if (!mWifiThreadRunner.call(
                 () -> mActiveModeWarden.canRequestMoreSoftApManagers(requestorWs), false)) {
             // Take down LOHS if it is up.
@@ -1557,8 +1181,8 @@
             mTetheredSoftApTracker.setFailedWhileEnabling();
             return false;
         }
-        mLastCallerInfoManager.put(WifiManager.API_SOFT_AP, Process.myTid(),
-                callingUid, Binder.getCallingPid(), packageName, true);
+        mLastCallerInfoManager.put(LastCallerInfoManager.SOFT_AP, Process.myTid(),
+                Binder.getCallingUid(), Binder.getCallingPid(), packageName, true);
         return true;
     }
 
@@ -1573,23 +1197,16 @@
             @NonNull String packageName) {
         // NETWORK_STACK is a signature only permission.
         enforceNetworkStackPermission();
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
 
-        // If user restriction is set, cannot start softap
-        if (mWifiTetheringDisallowed) {
-            mLog.err("startTetheredHotspot with user restriction: not permitted").flush();
+        mLog.info("startTetheredHotspot uid=%").c(Binder.getCallingUid()).flush();
+
+        if (!mWifiThreadRunner.call(
+                () -> mTetheredSoftApTracker.setEnablingIfAllowed(), false)) {
+            mLog.err("Tethering is already active.").flush();
             return false;
         }
 
-        mLog.info("startTetheredHotspot uid=%").c(callingUid).flush();
-
-        // TODO: b/233363886, handle timeout in general way.
-        if (!checkSetEnablingIfAllowed()) {
-            return false;
-        }
-
-        WorkSource requestorWs = new WorkSource(callingUid, packageName);
+        WorkSource requestorWs = new WorkSource(Binder.getCallingUid(), packageName);
         if (!mWifiThreadRunner.call(
                 () -> mActiveModeWarden.canRequestMoreSoftApManagers(requestorWs), false)) {
             // Take down LOHS if it is up.
@@ -1602,8 +1219,8 @@
             mTetheredSoftApTracker.setFailedWhileEnabling();
             return false;
         }
-        mLastCallerInfoManager.put(WifiManager.API_TETHERED_HOTSPOT, Process.myTid(),
-                callingUid, Binder.getCallingPid(), packageName, true);
+        mLastCallerInfoManager.put(LastCallerInfoManager.TETHERED_HOTSPOT, Process.myTid(),
+                Binder.getCallingUid(), Binder.getCallingPid(), packageName, true);
         return true;
     }
 
@@ -1647,7 +1264,7 @@
         mLog.info("stopSoftAp uid=%").c(Binder.getCallingUid()).flush();
 
         stopSoftApInternal(WifiManager.IFACE_IP_MODE_TETHERED);
-        mLastCallerInfoManager.put(WifiManager.API_SOFT_AP, Process.myTid(),
+        mLastCallerInfoManager.put(LastCallerInfoManager.SOFT_AP, Process.myTid(),
                 Binder.getCallingUid(), Binder.getCallingPid(), "<unknown>", false);
         return true;
     }
@@ -1669,110 +1286,15 @@
         mActiveModeWarden.stopSoftAp(mode);
     }
 
-    /**
-     * Internal class for tracking country code changed event.
-     */
-    @VisibleForTesting
-    public final class CountryCodeTracker implements WifiCountryCode.ChangeListener {
-        private final RemoteCallbackList<IOnWifiDriverCountryCodeChangedListener>
-                mRegisteredDriverCountryCodeListeners = new RemoteCallbackList<>();
-
-        /**
-        * Register Driver Country code changed listener.
-        * Note: Calling API only in handler thread.
-        *
-        * @param listener listener for the driver country code changed events.
-        */
-        public void registerDriverCountryCodeChangedListener(
-                @NonNull IOnWifiDriverCountryCodeChangedListener listener,
-                @NonNull WifiPermissionsUtil.CallerIdentity identity) {
-            boolean result = mRegisteredDriverCountryCodeListeners.register(listener, identity);
-            if (isVerboseLoggingEnabled()) {
-                Log.i(TAG, "registerDriverCountryCodeChangedListener, listener:" + listener
-                        + ", CallerIdentity=" + identity.toString() + ", result: " + result);
-            }
-        }
-
-
-        /**
-         * Unregister Driver Country code changed listener.
-         * Note: Calling API only in handler thread.
-         *
-         * @param listener listener to remove.
-         */
-        public void unregisterDriverCountryCodeChangedListener(
-                @NonNull IOnWifiDriverCountryCodeChangedListener listener) {
-            boolean result = mRegisteredDriverCountryCodeListeners.unregister(listener);
-            if (isVerboseLoggingEnabled()) {
-                Log.i(TAG, "unregisterDriverCountryCodeChangedListener, listener:" + listener
-                        + ", result:" + result);
-            }
-        }
-
+    private final class CountryCodeListenerProxy implements WifiCountryCode.ChangeListener {
         @Override
-        public void onCountryCodeChangePending(@NonNull String countryCode) {
+        public void onDriverCountryCodeChanged(String countryCode) {
             // post operation to handler thread
             mWifiThreadRunner.post(() -> {
-                if (mTetheredSoftApTracker != null) {
-                    mTetheredSoftApTracker.notifyNewCountryCodeChangePending(countryCode);
-                }
-                if (mLohsSoftApTracker != null) {
-                    mLohsSoftApTracker.notifyNewCountryCodeChangePending(countryCode);
-                }
-            });
-        }
-
-        @Override
-        public void onDriverCountryCodeChanged(@Nullable String countryCode) {
-            // post operation to handler thread
-            mWifiThreadRunner.post(() -> {
-                Log.i(TAG, "Receive onDriverCountryCodeChanged to " + countryCode
-                        + ", update available channel list");
-                // Update channel capability when country code is not null.
-                // Because the driver country code will reset to null when driver is non-active.
-                if (countryCode != null) {
-                    if (!TextUtils.equals(countryCode,
-                            mCountryCode.getCurrentDriverCountryCode())) {
-                        Log.e(TAG, "Country code not consistent! expect " + countryCode + " actual "
-                                + mCountryCode.getCurrentDriverCountryCode());
-                    }
-                    mTetheredSoftApTracker.updateAvailChannelListInSoftApCapability(countryCode);
-                    mLohsSoftApTracker.updateAvailChannelListInSoftApCapability(countryCode);
-                    mActiveModeWarden.updateSoftApCapability(
-                            mTetheredSoftApTracker.getSoftApCapability(),
-                            WifiManager.IFACE_IP_MODE_TETHERED);
-                    // TODO: b/197529327 trigger Lohs capability callback & update available
-                    // channels
-                    mActiveModeWarden.updateSoftApCapability(
-                            mLohsSoftApTracker.getSoftApCapability(),
-                            WifiManager.IFACE_IP_MODE_LOCAL_ONLY);
-                }
-                if (SdkLevel.isAtLeastT()) {
-                    int itemCount = mRegisteredDriverCountryCodeListeners.beginBroadcast();
-                    for (int i = 0; i < itemCount; i++) {
-                        try {
-                            WifiPermissionsUtil.CallerIdentity identity =
-                                    (WifiPermissionsUtil.CallerIdentity)
-                                    mRegisteredDriverCountryCodeListeners.getBroadcastCookie(i);
-                            if (!mWifiPermissionsUtil.checkCallersCoarseLocationPermission(
-                                    identity.getPackageName(), identity.getFeatureId(),
-                                    identity.getUid(), null)) {
-                                Log.i(TAG, "ReceiverIdentity=" + identity.toString()
-                                        + " doesn't have ACCESS_COARSE_LOCATION permission now");
-                                continue;
-                            }
-                            if (isVerboseLoggingEnabled()) {
-                                Log.i(TAG, "onDriverCountryCodeChanged, ReceiverIdentity="
-                                        + identity.toString());
-                            }
-                            mRegisteredDriverCountryCodeListeners.getBroadcastItem(i)
-                                    .onDriverCountryCodeChanged(countryCode);
-                        } catch (RemoteException e) {
-                            Log.e(TAG, "onDriverCountryCodeChanged: remote exception -- " + e);
-                        }
-                    }
-                    mRegisteredDriverCountryCodeListeners.finishBroadcast();
-                }
+                Log.i(TAG, "onDriverCountryCodeChanged " + countryCode);
+                mTetheredSoftApTracker.updateAvailChannelListInSoftApCapability();
+                mActiveModeWarden.updateSoftApCapability(
+                        mTetheredSoftApTracker.getSoftApCapability());
             });
         }
     }
@@ -1780,7 +1302,7 @@
     /**
      * SoftAp callback
      */
-    private class BaseSoftApTracker extends SoftApCallbackInternal {
+    private final class TetheredSoftApTracker implements SoftApCallbackInternal {
         /**
          * State of tethered SoftAP
          * One of:  {@link WifiManager#WIFI_AP_STATE_DISABLED},
@@ -1790,55 +1312,53 @@
          *          {@link WifiManager#WIFI_AP_STATE_FAILED}
          */
         private final Object mLock = new Object();
-        private int mSoftApState = WIFI_AP_STATE_DISABLED;
-        private Map<String, List<WifiClient>> mSoftApConnectedClientsMap = new HashMap();
-        private Map<String, SoftApInfo> mSoftApInfoMap = new HashMap();
+        private int mTetheredSoftApState = WIFI_AP_STATE_DISABLED;
+        private Map<String, List<WifiClient>> mTetheredSoftApConnectedClientsMap = new HashMap();
+        private Map<String, SoftApInfo> mTetheredSoftApInfoMap = new HashMap();
         private boolean mIsBridgedMode = false;
         // TODO: We need to maintain two capability. One for LTE + SAP and one for WIFI + SAP
-        protected SoftApCapability mSoftApCapability = null;
-        protected final RemoteCallbackList<ISoftApCallback> mRegisteredSoftApCallbacks =
-                new RemoteCallbackList<>();
+        private SoftApCapability mTetheredSoftApCapability = null;
+        private boolean mIsBootComplete = false;
+
+        public void handleBootCompleted() {
+            mIsBootComplete = true;
+            updateAvailChannelListInSoftApCapability();
+        }
 
         public int getState() {
             synchronized (mLock) {
-                return mSoftApState;
-            }
-        }
-
-        public void setState(int state) {
-            synchronized (mLock) {
-                mSoftApState = state;
+                return mTetheredSoftApState;
             }
         }
 
         public boolean setEnablingIfAllowed() {
             synchronized (mLock) {
-                if (mSoftApState != WIFI_AP_STATE_DISABLED
-                        && mSoftApState != WIFI_AP_STATE_FAILED) {
+                if (mTetheredSoftApState != WIFI_AP_STATE_DISABLED
+                        && mTetheredSoftApState != WIFI_AP_STATE_FAILED) {
                     return false;
                 }
-                mSoftApState = WIFI_AP_STATE_ENABLING;
+                mTetheredSoftApState = WIFI_AP_STATE_ENABLING;
                 return true;
             }
         }
 
         public void setFailedWhileEnabling() {
             synchronized (mLock) {
-                if (mSoftApState == WIFI_AP_STATE_ENABLING) {
-                    mSoftApState = WIFI_AP_STATE_FAILED;
+                if (mTetheredSoftApState == WIFI_AP_STATE_ENABLING) {
+                    mTetheredSoftApState = WIFI_AP_STATE_FAILED;
                 }
             }
         }
 
         public Map<String, List<WifiClient>> getConnectedClients() {
             synchronized (mLock) {
-                return mSoftApConnectedClientsMap;
+                return mTetheredSoftApConnectedClientsMap;
             }
         }
 
         public Map<String, SoftApInfo> getSoftApInfos() {
             synchronized (mLock) {
-                return mSoftApInfoMap;
+                return mTetheredSoftApInfoMap;
             }
         }
 
@@ -1848,57 +1368,98 @@
             }
         }
 
-        public void notifyNewCountryCodeChangePending(@NonNull String countryCode) {
-            // If country code not changed, no need to update.
-            if (mSoftApCapability != null && !TextUtils.equals(mSoftApCapability.getCountryCode(),
-                    countryCode)) {
-                // Country code changed when we can't update channels from HAL, invalidate the soft
-                // ap capability for supported channels.
-                SoftApCapability newSoftApCapability = new SoftApCapability(
-                        mSoftApCapability);
-                for (int b : SoftApConfiguration.BAND_TYPES) {
-                    newSoftApCapability.setSupportedChannelList(b, new int[0]);
-                }
-                // Notify the capability change
-                onCapabilityChanged(newSoftApCapability);
-            }
-        }
-
-        public void handleBootCompleted() {
-            updateAvailChannelListInSoftApCapability(mCountryCode.getCurrentDriverCountryCode());
-        }
-
         public SoftApCapability getSoftApCapability() {
             synchronized (mLock) {
-                if (mSoftApCapability == null) {
-                    mSoftApCapability = ApConfigUtil.updateCapabilityFromResource(mContext);
+                if (mTetheredSoftApCapability == null) {
+                    mTetheredSoftApCapability = ApConfigUtil.updateCapabilityFromResource(mContext);
                     // Default country code
-                    mSoftApCapability = updateSoftApCapabilityWithAvailableChannelList(
-                            mSoftApCapability, mCountryCode.getCountryCode());
+                    mTetheredSoftApCapability = updateSoftApCapabilityWithAvailableChannelList(
+                            mTetheredSoftApCapability);
                 }
-                return mSoftApCapability;
+                return mTetheredSoftApCapability;
             }
         }
 
         private SoftApCapability updateSoftApCapabilityWithAvailableChannelList(
-                @NonNull SoftApCapability softApCapability, @Nullable String countryCode) {
+                @NonNull SoftApCapability softApCapability) {
+            SoftApCapability newSoftApCapability = new SoftApCapability(softApCapability);
             if (!mIsBootComplete) {
-                // The available channel list is from wificond or HAL.
-                // It might be a failure or stuck during wificond or HAL init.
-                return softApCapability;
+                // The available channel list is from wificond.
+                // It might be a failure or stuck during wificond init.
+                return newSoftApCapability;
             }
-            if (mCountryCode.getCurrentDriverCountryCode() != null) {
-                mSoftApCapability.setCountryCode(countryCode);
+            List<Integer> supportedChannelList = null;
+            if (ApConfigUtil.isSoftAp24GhzSupported(mContext)) {
+                supportedChannelList = ApConfigUtil.getAvailableChannelFreqsForBand(
+                    SoftApConfiguration.BAND_2GHZ, mWifiNative, mContext.getResources(), false);
+                if (supportedChannelList != null) {
+                    newSoftApCapability.setSupportedChannelList(
+                            SoftApConfiguration.BAND_2GHZ,
+                            supportedChannelList.stream().mapToInt(Integer::intValue).toArray());
+                }
             }
-            return ApConfigUtil.updateSoftApCapabilityWithAvailableChannelList(
-                    softApCapability, mContext, mWifiNative);
+            if (ApConfigUtil.isSoftAp5GhzSupported(mContext)) {
+                supportedChannelList = ApConfigUtil.getAvailableChannelFreqsForBand(
+                        SoftApConfiguration.BAND_5GHZ, mWifiNative, mContext.getResources(), false);
+                if (supportedChannelList != null) {
+                    newSoftApCapability.setSupportedChannelList(
+                            SoftApConfiguration.BAND_5GHZ,
+                            supportedChannelList.stream().mapToInt(Integer::intValue).toArray());
+                }
+            }
+            if (ApConfigUtil.isSoftAp6GhzSupported(mContext)) {
+                supportedChannelList = ApConfigUtil.getAvailableChannelFreqsForBand(
+                        SoftApConfiguration.BAND_6GHZ, mWifiNative, mContext.getResources(), false);
+                if (supportedChannelList != null) {
+                    newSoftApCapability.setSupportedChannelList(
+                            SoftApConfiguration.BAND_6GHZ,
+                            supportedChannelList.stream().mapToInt(Integer::intValue).toArray());
+                }
+            }
+            if (ApConfigUtil.isSoftAp60GhzSupported(mContext)) {
+                supportedChannelList = ApConfigUtil.getAvailableChannelFreqsForBand(
+                        SoftApConfiguration.BAND_60GHZ, mWifiNative, mContext.getResources(),
+                        false);
+                if (supportedChannelList != null) {
+                    newSoftApCapability.setSupportedChannelList(
+                            SoftApConfiguration.BAND_60GHZ,
+                            supportedChannelList.stream().mapToInt(Integer::intValue).toArray());
+                }
+            }
+            return newSoftApCapability;
         }
 
-        public void updateAvailChannelListInSoftApCapability(@Nullable String countryCode) {
+        public void updateAvailChannelListInSoftApCapability() {
             onCapabilityChanged(updateSoftApCapabilityWithAvailableChannelList(
-                    getSoftApCapability(), countryCode));
+                    getSoftApCapability()));
         }
 
+        public void updateSoftApCapabilityWhenCarrierConfigChanged(int subId) {
+            CarrierConfigManager carrierConfigManager =
+                    mContext.getSystemService(CarrierConfigManager.class);
+            if (carrierConfigManager == null) return;
+            PersistableBundle carrierConfig = carrierConfigManager.getConfigForSubId(subId);
+            if (carrierConfig == null) return;
+            int carrierMaxClient = carrierConfig.getInt(
+                    CarrierConfigManager.Wifi.KEY_HOTSPOT_MAX_CLIENT_COUNT);
+            int finalSupportedClientNumber = mContext.getResources().getInteger(
+                    R.integer.config_wifiHardwareSoftapMaxClientCount);
+            if (carrierMaxClient > 0) {
+                finalSupportedClientNumber = Math.min(finalSupportedClientNumber,
+                        carrierMaxClient);
+            }
+            if (finalSupportedClientNumber == getSoftApCapability().getMaxSupportedClients()) {
+                return;
+            }
+            SoftApCapability newSoftApCapability = new SoftApCapability(mTetheredSoftApCapability);
+            newSoftApCapability.setMaxSupportedClients(
+                    finalSupportedClientNumber);
+            onCapabilityChanged(newSoftApCapability);
+        }
+
+        private final RemoteCallbackList<ISoftApCallback> mRegisteredSoftApCallbacks =
+                new RemoteCallbackList<>();
+
         public boolean registerSoftApCallback(ISoftApCallback callback) {
             return mRegisteredSoftApCallbacks.register(callback);
         }
@@ -1919,9 +1480,19 @@
         @Override
         public void onStateChanged(int state, int failureReason) {
             synchronized (mLock) {
-                mSoftApState = state;
+                mTetheredSoftApState = state;
             }
-            notifyRegisterOnStateChanged(mRegisteredSoftApCallbacks, state, failureReason);
+
+            int itemCount = mRegisteredSoftApCallbacks.beginBroadcast();
+            for (int i = 0; i < itemCount; i++) {
+                try {
+                    mRegisteredSoftApCallbacks.getBroadcastItem(i).onStateChanged(state,
+                            failureReason);
+                } catch (RemoteException e) {
+                    Log.e(TAG, "onStateChanged: remote exception -- " + e);
+                }
+            }
+            mRegisteredSoftApCallbacks.finishBroadcast();
         }
 
         /**
@@ -1938,12 +1509,22 @@
                     Log.d(TAG, "ShutDown bridged mode, clear isBridged cache in Service");
                     mIsBridgedMode = false;
                 }
-                mSoftApConnectedClientsMap =
+                mTetheredSoftApConnectedClientsMap =
                         ApConfigUtil.deepCopyForWifiClientListMap(clients);
-                mSoftApInfoMap = ApConfigUtil.deepCopyForSoftApInfoMap(infos);
+                mTetheredSoftApInfoMap = ApConfigUtil.deepCopyForSoftApInfoMap(infos);
             }
-            notifyRegisterOnConnectedClientsOrInfoChanged(mRegisteredSoftApCallbacks,
-                    infos, clients, isBridged);
+            int itemCount = mRegisteredSoftApCallbacks.beginBroadcast();
+            for (int i = 0; i < itemCount; i++) {
+                try {
+                    mRegisteredSoftApCallbacks.getBroadcastItem(i).onConnectedClientsOrInfoChanged(
+                            ApConfigUtil.deepCopyForSoftApInfoMap(mTetheredSoftApInfoMap),
+                            ApConfigUtil.deepCopyForWifiClientListMap(
+                                    mTetheredSoftApConnectedClientsMap), isBridged, false);
+                } catch (RemoteException e) {
+                    Log.e(TAG, "onConnectedClientsOrInfoChanged: remote exception -- " + e);
+                }
+            }
+            mRegisteredSoftApCallbacks.finishBroadcast();
         }
 
         /**
@@ -1954,13 +1535,21 @@
         @Override
         public void onCapabilityChanged(SoftApCapability capability) {
             synchronized (mLock) {
-                if (Objects.equals(capability, mSoftApCapability)) {
+                if (Objects.equals(capability, mTetheredSoftApCapability)) {
                     return;
                 }
-                mSoftApCapability = new SoftApCapability(capability);
+                mTetheredSoftApCapability = new SoftApCapability(capability);
             }
-            notifyRegisterOnCapabilityChanged(mRegisteredSoftApCallbacks,
-                    mSoftApCapability);
+            int itemCount = mRegisteredSoftApCallbacks.beginBroadcast();
+            for (int i = 0; i < itemCount; i++) {
+                try {
+                    mRegisteredSoftApCallbacks.getBroadcastItem(i).onCapabilityChanged(
+                            mTetheredSoftApCapability);
+                } catch (RemoteException e) {
+                    Log.e(TAG, "onCapabiliyChanged: remote exception -- " + e);
+                }
+            }
+            mRegisteredSoftApCallbacks.finishBroadcast();
         }
 
         /**
@@ -1972,41 +1561,23 @@
          */
         @Override
         public void onBlockedClientConnecting(WifiClient client, int blockedReason) {
-            notifyRegisterOnBlockedClientConnecting(mRegisteredSoftApCallbacks, client,
-                    blockedReason);
-        }
-    }
-
-    private final class TetheredSoftApTracker extends BaseSoftApTracker {
-        public void updateSoftApCapabilityWhenCarrierConfigChanged(int subId) {
-            CarrierConfigManager carrierConfigManager =
-                    mContext.getSystemService(CarrierConfigManager.class);
-            if (carrierConfigManager == null) return;
-            PersistableBundle carrierConfig = carrierConfigManager.getConfigForSubId(subId);
-            if (carrierConfig == null) return;
-            int carrierMaxClient = carrierConfig.getInt(
-                    CarrierConfigManager.Wifi.KEY_HOTSPOT_MAX_CLIENT_COUNT);
-            int finalSupportedClientNumber = mContext.getResources().getInteger(
-                    R.integer.config_wifiHardwareSoftapMaxClientCount);
-            if (carrierMaxClient > 0) {
-                finalSupportedClientNumber = Math.min(finalSupportedClientNumber,
-                        carrierMaxClient);
+            int itemCount = mRegisteredSoftApCallbacks.beginBroadcast();
+            for (int i = 0; i < itemCount; i++) {
+                try {
+                    mRegisteredSoftApCallbacks.getBroadcastItem(i).onBlockedClientConnecting(client,
+                            blockedReason);
+                } catch (RemoteException e) {
+                    Log.e(TAG, "onBlockedClientConnecting: remote exception -- " + e);
+                }
             }
-            if (finalSupportedClientNumber == getSoftApCapability().getMaxSupportedClients()) {
-                return;
-            }
-            SoftApCapability newSoftApCapability = new SoftApCapability(mSoftApCapability);
-            newSoftApCapability.setMaxSupportedClients(
-                    finalSupportedClientNumber);
-            onCapabilityChanged(newSoftApCapability);
+            mRegisteredSoftApCallbacks.finishBroadcast();
         }
-
     }
 
     /**
      * Implements LOHS behavior on top of the existing SoftAp API.
      */
-    private final class LohsSoftApTracker extends BaseSoftApTracker {
+    private final class LohsSoftApTracker implements SoftApCallbackInternal {
         @GuardedBy("mLocalOnlyHotspotRequests")
         private final HashMap<Integer, LocalOnlyHotspotRequestInfo>
                 mLocalOnlyHotspotRequests = new HashMap<>();
@@ -2025,9 +1596,29 @@
         @GuardedBy("mLocalOnlyHotspotRequests")
         private String mLohsInterfaceName;
 
+        /**
+         * State of local-only hotspot
+         * One of:  {@link WifiManager#WIFI_AP_STATE_DISABLED},
+         *          {@link WifiManager#WIFI_AP_STATE_DISABLING},
+         *          {@link WifiManager#WIFI_AP_STATE_ENABLED},
+         *          {@link WifiManager#WIFI_AP_STATE_ENABLING},
+         *          {@link WifiManager#WIFI_AP_STATE_FAILED}
+         */
+        @GuardedBy("mLocalOnlyHotspotRequests")
+        private int mLohsState = WIFI_AP_STATE_DISABLED;
+
         @GuardedBy("mLocalOnlyHotspotRequests")
         private int mLohsInterfaceMode = WifiManager.IFACE_IP_MODE_UNSPECIFIED;
 
+        private SoftApCapability mLohsSoftApCapability = null;
+
+        public SoftApCapability getSoftApCapability() {
+            if (mLohsSoftApCapability == null) {
+                mLohsSoftApCapability =  ApConfigUtil.updateCapabilityFromResource(mContext);
+            }
+            return mLohsSoftApCapability;
+        }
+
         public void updateInterfaceIpState(String ifaceName, int mode) {
             // update interface IP state related to local-only hotspot
             synchronized (mLocalOnlyHotspotRequests) {
@@ -2049,7 +1640,8 @@
                         sendHotspotStartedMessageToAllLOHSRequestInfoEntriesLocked();
                         break;
                     case WifiManager.IFACE_IP_MODE_TETHERED:
-                        if (TextUtils.equals(mLohsInterfaceName, ifaceName)) {
+                        if (mLohsInterfaceName != null
+                                && mLohsInterfaceName.equals(ifaceName)) {
                             /* This shouldn't happen except in a race, but if it does, tear down
                              * the LOHS and let tethering win.
                              *
@@ -2071,7 +1663,7 @@
                             sendHotspotFailedMessageToAllLOHSRequestInfoEntriesLocked(
                                     LocalOnlyHotspotCallback.ERROR_GENERIC);
                             stopSoftApInternal(WifiManager.IFACE_IP_MODE_UNSPECIFIED);
-                        } else if (TextUtils.equals(mLohsInterfaceName, ifaceName)) {
+                        } else if (ifaceName.equals(mLohsInterfaceName)) {
                             mLohsInterfaceName = null;
                             mLohsInterfaceMode = mode;
                             sendHotspotFailedMessageToAllLOHSRequestInfoEntriesLocked(
@@ -2183,18 +1775,28 @@
 
         @GuardedBy("mLocalOnlyHotspotRequests")
         private void startForFirstRequestLocked(LocalOnlyHotspotRequestInfo request) {
-            final SoftApCapability lohsCapability = mLohsSoftApTracker.getSoftApCapability();
+            int band = WifiApConfigStore.generateDefaultBand(mContext);
+
+            // For auto only
+            if (hasAutomotiveFeature(mContext)) {
+                if (mContext.getResources().getBoolean(R.bool.config_wifiLocalOnlyHotspot6ghz)
+                        && ApConfigUtil.isBandSupported(SoftApConfiguration.BAND_6GHZ, mContext)) {
+                    band = SoftApConfiguration.BAND_6GHZ;
+                } else if (mContext.getResources().getBoolean(
+                        R.bool.config_wifi_local_only_hotspot_5ghz)
+                        && ApConfigUtil.isBandSupported(SoftApConfiguration.BAND_5GHZ, mContext)) {
+                    band = SoftApConfiguration.BAND_5GHZ;
+                }
+            }
             SoftApConfiguration softApConfig = mWifiApConfigStore.generateLocalOnlyHotspotConfig(
-                    mContext, request.getCustomConfig(), lohsCapability);
+                    mContext, band, request.getCustomConfig());
 
             mActiveConfig = new SoftApModeConfiguration(
                     WifiManager.IFACE_IP_MODE_LOCAL_ONLY,
-                    softApConfig, lohsCapability);
+                    softApConfig, mLohsSoftApTracker.getSoftApCapability());
             mIsExclusive = (request.getCustomConfig() != null);
-            // Report the error if we got failure in startSoftApInternal
-            if (!startSoftApInternal(mActiveConfig, request.getWorkSource())) {
-                onStateChanged(WIFI_AP_STATE_FAILED, ERROR_GENERIC);
-            }
+
+            startSoftApInternal(mActiveConfig, request.getWorkSource());
         }
 
         /**
@@ -2272,7 +1874,7 @@
             // The AP state update from ClientModeImpl for softap
             synchronized (mLocalOnlyHotspotRequests) {
                 Log.d(TAG, "lohs.onStateChanged: currentState=" + state
-                        + " previousState=" + getState() + " errorCode= " + failureReason
+                        + " previousState=" + mLohsState + " errorCode= " + failureReason
                         + " ifaceName=" + mLohsInterfaceName);
 
                 // check if we have a failure - since it is possible (worst case scenario where
@@ -2307,8 +1909,7 @@
                             WifiManager.IFACE_IP_MODE_UNSPECIFIED);
                 }
                 // For enabling and enabled, just record the new state
-                setState(state);
-                notifyRegisterOnStateChanged(mRegisteredSoftApCallbacks, state, failureReason);
+                mLohsState = state;
             }
         }
     }
@@ -2416,7 +2017,6 @@
      * @param featureId The feature in the package
      * @param customConfig Custom configuration to be applied to the hotspot, or null for a shared
      *                     hotspot with framework-generated config.
-     * @param extras Bundle of extra information
      *
      * @return int return code for attempt to start LocalOnlyHotspot.
      *
@@ -2427,14 +2027,13 @@
      */
     @Override
     public int startLocalOnlyHotspot(ILocalOnlyHotspotCallback callback, String packageName,
-            String featureId, SoftApConfiguration customConfig, Bundle extras) {
+            String featureId, SoftApConfiguration customConfig) {
         // first check if the caller has permission to start a local only hotspot
         // need to check for WIFI_STATE_CHANGE and location permission
         final int uid = Binder.getCallingUid();
         final int pid = Binder.getCallingPid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
 
-        mLog.info("start lohs uid=% pid=%").c(uid).c(pid).flush();
+        mLog.info("start uid=% pid=%").c(uid).c(pid).flush();
 
         final WorkSource requestorWs;
         // Permission requirements are different with/without custom config.
@@ -2442,43 +2041,30 @@
             if (enforceChangePermission(packageName) != MODE_ALLOWED) {
                 return LocalOnlyHotspotCallback.ERROR_GENERIC;
             }
-            if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                enforceLocationPermission(packageName, featureId, uid);
-                long ident = Binder.clearCallingIdentity();
-                try {
-                    // also need to verify that Locations services are enabled.
-                    if (!mWifiPermissionsUtil.isLocationModeEnabled()) {
-                        throw new SecurityException("Location mode is not enabled.");
-                    }
-
-                } finally {
-                    Binder.restoreCallingIdentity(ident);
+            enforceLocationPermission(packageName, featureId, uid);
+            long ident = Binder.clearCallingIdentity();
+            try {
+                // also need to verify that Locations services are enabled.
+                if (!mWifiPermissionsUtil.isLocationModeEnabled()) {
+                    throw new SecurityException("Location mode is not enabled.");
                 }
-            } else {
-                mWifiPermissionsUtil.enforceNearbyDevicesPermission(
-                        extras.getParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE),
-                        false, TAG + " startLocalOnlyHotspot");
+                // TODO(b/162344695): Exception added for LOHS. This exception is need to avoid
+                // breaking existing LOHS behavior: LOHS AP iface is allowed to delete STA iface
+                // (even if LOHS app has lower priority than user toggled on STA iface). This does
+                // not fit in with the new context based concurrency priority in HalDeviceManager,
+                // but we cannot break existing API's. So, we artificially boost the priority of
+                // the request by "faking" the requestor context as settings app.
+                // We probably need some UI dialog to allow the user to grant the app's LOHS
+                // request. Once that UI dialog is added, we can get rid of this hack and use the UI
+                // to elevate the priority of LOHS request only if user approves the request to
+                // toggle wifi off for LOHS.
+                requestorWs = mFrameworkFacade.getSettingsWorkSource(mContext);
+            } finally {
+                Binder.restoreCallingIdentity(ident);
             }
-            // TODO(b/162344695): Exception added for LOHS. This exception is need to avoid
-            // breaking existing LOHS behavior: LOHS AP iface is allowed to delete STA iface
-            // (even if LOHS app has lower priority than user toggled on STA iface). This does
-            // not fit in with the new context based concurrency priority in HalDeviceManager,
-            // but we cannot break existing API's. So, we artificially boost the priority of
-            // the request by "faking" the requestor context as settings app.
-            // We probably need some UI dialog to allow the user to grant the app's LOHS
-            // request. Once that UI dialog is added, we can get rid of this hack and use the UI
-            // to elevate the priority of LOHS request only if user approves the request to
-            // toggle wifi off for LOHS.
-            requestorWs = mFrameworkFacade.getSettingsWorkSource(mContext);
         } else {
-            if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                if (!isSettingsOrSuw(Binder.getCallingPid(), Binder.getCallingUid())) {
-                    throw new SecurityException(TAG + ": Permission denied");
-                }
-            } else {
-                mWifiPermissionsUtil.enforceNearbyDevicesPermission(
-                        extras.getParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE),
-                        false, TAG + " startLocalOnlyHotspot");
+            if (!isSettingsOrSuw(Binder.getCallingPid(), Binder.getCallingUid())) {
+                throw new SecurityException(TAG + ": Permission denied");
             }
             // Already privileged, no need to fake.
             requestorWs = new WorkSource(uid, packageName);
@@ -2490,19 +2076,17 @@
             return LocalOnlyHotspotCallback.ERROR_TETHERING_DISALLOWED;
         }
 
-
         // the app should be in the foreground
         long ident = Binder.clearCallingIdentity();
         try {
             // also need to verify that Locations services are enabled.
-            // bypass shell with root uid
-            if (uid != Process.ROOT_UID
-                    && !mFrameworkFacade.isAppForeground(mContext, uid)) {
+            if (!mFrameworkFacade.isAppForeground(mContext, uid)) {
                 return LocalOnlyHotspotCallback.ERROR_INCOMPATIBLE_MODE;
             }
         } finally {
             Binder.restoreCallingIdentity(ident);
         }
+
         // check if we are currently tethering
         if (!mActiveModeWarden.canRequestMoreSoftApManagers(requestorWs)
                 && mTetheredSoftApTracker.getState() == WIFI_AP_STATE_ENABLED) {
@@ -2514,8 +2098,7 @@
 
         // now create the new LOHS request info object
         LocalOnlyHotspotRequestInfo request = new LocalOnlyHotspotRequestInfo(
-                mWifiHandlerThread.getLooper(), requestorWs, callback,
-                new LocalOnlyRequestorCallback(), customConfig);
+                requestorWs, callback, new LocalOnlyRequestorCallback(), customConfig);
 
         return mLohsSoftApTracker.start(pid, request);
     }
@@ -2536,70 +2119,8 @@
         final int pid = Binder.getCallingPid();
 
         mLog.info("stopLocalOnlyHotspot uid=% pid=%").c(uid).c(pid).flush();
-        // Force to disable lohs when caller is shell with root permission
-        if (uid == Process.ROOT_UID) {
-            mLohsSoftApTracker.stopAll();
-        } else {
-            mLohsSoftApTracker.stopByPid(pid);
-        }
-    }
 
-    @Override
-    public void registerLocalOnlyHotspotSoftApCallback(ISoftApCallback callback, Bundle extras) {
-        // verify arguments
-        if (callback == null) {
-            throw new IllegalArgumentException("Callback must not be null");
-        }
-
-        int uid = Binder.getCallingUid();
-        int pid = Binder.getCallingPid();
-        mWifiPermissionsUtil.enforceNearbyDevicesPermission(
-                extras.getParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE),
-                false, TAG + " registerLocalOnlyHotspotSoftApCallback");
-
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("registerSoftApCallback uid=%").c(Binder.getCallingUid()).flush();
-        }
-
-        // post operation to handler thread
-        mWifiThreadRunner.post(() -> {
-            if (!mLohsSoftApTracker.registerSoftApCallback(callback)) {
-                Log.e(TAG, "registerSoftApCallback: Failed to add callback");
-                return;
-            }
-            // Update the client about the current state immediately after registering the callback
-            try {
-                callback.onStateChanged(mLohsSoftApTracker.getState(), 0);
-                callback.onConnectedClientsOrInfoChanged(mLohsSoftApTracker.getSoftApInfos(),
-                        mLohsSoftApTracker.getConnectedClients(),
-                        mLohsSoftApTracker.getIsBridgedMode(), true);
-                callback.onCapabilityChanged(mLohsSoftApTracker.getSoftApCapability());
-            } catch (RemoteException e) {
-                Log.e(TAG, "registerSoftApCallback: remote exception -- " + e);
-            }
-        });
-    }
-
-    @Override
-    public void unregisterLocalOnlyHotspotSoftApCallback(ISoftApCallback callback, Bundle extras) {
-        // verify arguments
-        if (callback == null) {
-            throw new IllegalArgumentException("Callback must not be null");
-        }
-        int uid = Binder.getCallingUid();
-        int pid = Binder.getCallingPid();
-
-        mWifiPermissionsUtil.enforceNearbyDevicesPermission(
-                extras.getParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE),
-                false, TAG + " registerLocalOnlyHotspotSoftApCallback");
-
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("unregisterSoftApCallback uid=%").c(Binder.getCallingUid()).flush();
-        }
-
-        // post operation to handler thread
-        mWifiThreadRunner.post(() ->
-                mLohsSoftApTracker.unregisterSoftApCallback(callback));
+        mLohsSoftApTracker.stopByPid(pid);
     }
 
     /**
@@ -2698,7 +2219,6 @@
             return false;
         }
         int uid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
         // only allow Settings UI to write the stored SoftApConfig
         if (!mWifiPermissionsUtil.checkConfigOverridePermission(uid)) {
             // random apps should not be allowed to read the user specified config
@@ -2730,7 +2250,6 @@
     public boolean setSoftApConfiguration(
             @NonNull SoftApConfiguration softApConfig, @NonNull String packageName) {
         int uid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
         boolean privileged = mWifiPermissionsUtil.checkNetworkSettingsPermission(uid);
         if (!mWifiPermissionsUtil.checkConfigOverridePermission(uid)
                 && !privileged) {
@@ -2756,10 +2275,8 @@
     @Override
     public void setScanAlwaysAvailable(boolean isAvailable, String packageName) {
         enforceNetworkSettingsPermission();
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
         mLog.info("setScanAlwaysAvailable uid=% package=% isAvailable=%")
-                .c(callingUid)
+                .c(Binder.getCallingUid())
                 .c(packageName)
                 .c(isAvailable)
                 .flush();
@@ -2794,14 +2311,13 @@
         if (enforceChangePermission(packageName) != MODE_ALLOWED) {
             return false;
         }
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
         if (!isTargetSdkLessThanQOrPrivileged(
-                packageName, Binder.getCallingPid(), callingUid)) {
-            mLog.info("disconnect not allowed for uid=%").c(callingUid).flush();
+                packageName, Binder.getCallingPid(), Binder.getCallingUid())) {
+            mLog.info("disconnect not allowed for uid=%")
+                    .c(Binder.getCallingUid()).flush();
             return false;
         }
-        mLog.info("disconnect uid=%").c(callingUid).flush();
+        mLog.info("disconnect uid=%").c(Binder.getCallingUid()).flush();
         mWifiThreadRunner.post(() -> mActiveModeWarden.getPrimaryClientModeManager().disconnect());
         return true;
     }
@@ -2815,7 +2331,6 @@
             return false;
         }
         int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
         if (!isTargetSdkLessThanQOrPrivileged(packageName, Binder.getCallingPid(), callingUid)) {
             mLog.info("reconnect not allowed for uid=%").c(callingUid).flush();
             return false;
@@ -2836,14 +2351,13 @@
         if (enforceChangePermission(packageName) != MODE_ALLOWED) {
             return false;
         }
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
         if (!isTargetSdkLessThanQOrPrivileged(
-                packageName, Binder.getCallingPid(), callingUid)) {
-            mLog.info("reassociate not allowed for uid=%").c(callingUid).flush();
+                packageName, Binder.getCallingPid(), Binder.getCallingUid())) {
+            mLog.info("reassociate not allowed for uid=%")
+                    .c(Binder.getCallingUid()).flush();
             return false;
         }
-        mLog.info("reassociate uid=%").c(callingUid).flush();
+        mLog.info("reassociate uid=%").c(Binder.getCallingUid()).flush();
         mWifiThreadRunner.post(() -> mActiveModeWarden.getPrimaryClientModeManager().reassociate());
         return true;
     }
@@ -2996,10 +2510,10 @@
         }
 
         int targetConfigUid = Process.INVALID_UID; // don't expose any MAC addresses
-        if (isPrivileged) {
+        if (isPrivileged || isDeviceOrProfileOwner) {
             targetConfigUid = Process.WIFI_UID; // expose all MAC addresses
-        } else if (isCarrierApp || isDeviceOrProfileOwner) {
-            targetConfigUid = callingUid; // expose only those configs created by the calling App
+        } else if (isCarrierApp) {
+            targetConfigUid = callingUid; // expose only those configs created by the Carrier App
         }
         int finalTargetConfigUid = targetConfigUid;
         List<WifiConfiguration> configs = mWifiThreadRunner.call(
@@ -3025,42 +2539,24 @@
      *
      * @param packageName String name of the calling package
      * @param featureId The feature in the package
-     * @param extras - Bundle of extra information
      * @return the list of configured networks with real preSharedKey
      */
     @Override
     public ParceledListSlice<WifiConfiguration> getPrivilegedConfiguredNetworks(
-            String packageName, String featureId, Bundle extras) {
+            String packageName, String featureId) {
         enforceReadCredentialPermission();
         enforceAccessPermission();
         int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
-        if (isPlatformOrTargetSdkLessThanT(packageName, callingUid)) {
-            // For backward compatibility, do not check for nearby devices permission on pre-T
-            // SDK version or if the app targets pre-T.
-            long ident = Binder.clearCallingIdentity();
-            try {
-                mWifiPermissionsUtil.enforceCanAccessScanResults(packageName, featureId, callingUid,
-                        null);
-            } catch (SecurityException e) {
-                Log.w(TAG, "Permission violation - getPrivilegedConfiguredNetworks not allowed"
-                        + " for uid=" + callingUid + ", packageName=" + packageName + ", reason="
-                        + e);
-                return null;
-            } finally {
-                Binder.restoreCallingIdentity(ident);
-            }
-        } else {
-            try {
-                mWifiPermissionsUtil.enforceNearbyDevicesPermission(
-                        extras.getParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE),
-                        false, TAG + " getPrivilegedConfiguredNetworks");
-            } catch (SecurityException e) {
-                Log.w(TAG, "Permission violation - getPrivilegedConfiguredNetworks not allowed"
-                        + " for uid=" + callingUid + ", packageName=" + packageName + ", reason="
-                        + e);
-                return null;
-            }
+        long ident = Binder.clearCallingIdentity();
+        try {
+            mWifiPermissionsUtil.enforceCanAccessScanResults(packageName, featureId, callingUid,
+                    null);
+        } catch (SecurityException e) {
+            Log.w(TAG, "Permission violation - getPrivilegedConfiguredNetworks not allowed for"
+                    + " uid=" + callingUid + ", packageName=" + packageName + ", reason=" + e);
+            return null;
+        } finally {
+            Binder.restoreCallingIdentity(ident);
         }
         if (isVerboseLoggingEnabled()) {
             mLog.info("getPrivilegedConfiguredNetworks uid=%").c(callingUid).flush();
@@ -3073,116 +2569,6 @@
     }
 
     /**
-     * See {@link WifiManager#getPrivilegedConnectedNetwork()}
-     */
-    public WifiConfiguration getPrivilegedConnectedNetwork(String packageName, String featureId,
-            Bundle extras) {
-        enforceReadCredentialPermission();
-        enforceAccessPermission();
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
-        if (isPlatformOrTargetSdkLessThanT(packageName, callingUid)) {
-            mWifiPermissionsUtil.enforceCanAccessScanResults(packageName, featureId, callingUid,
-                    null);
-        } else {
-            mWifiPermissionsUtil.enforceNearbyDevicesPermission(
-                    extras.getParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE),
-                    true, TAG + " getPrivilegedConnectedNetwork");
-        }
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("getPrivilegedConnectedNetwork uid=%").c(callingUid).flush();
-        }
-
-        WifiInfo wifiInfo = mWifiThreadRunner.call(
-                () -> mActiveModeWarden.getPrimaryClientModeManager().syncRequestConnectionInfo(),
-                new WifiInfo());
-        int networkId = wifiInfo.getNetworkId();
-        if (networkId < 0) {
-            if (isVerboseLoggingEnabled()) {
-                mLog.info("getPrivilegedConnectedNetwork primary wifi not connected")
-                        .flush();
-            }
-            return null;
-        }
-        WifiConfiguration config = mWifiThreadRunner.call(
-                () -> mWifiConfigManager.getConfiguredNetworkWithPassword(networkId), null);
-        if (config == null) {
-            if (isVerboseLoggingEnabled()) {
-                mLog.info("getPrivilegedConnectedNetwork failed to get config").flush();
-            }
-            return null;
-        }
-        // mask out the randomized MAC address
-        config.setRandomizedMacAddress(MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS));
-        return config;
-    }
-
-    /**
-     * See {@link WifiManager#setScreenOnScanSchedule(List)}
-     */
-    @Override
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void setScreenOnScanSchedule(int[] scanScheduleSeconds, int[] scanType) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        if ((scanScheduleSeconds == null && scanType != null)
-                || (scanScheduleSeconds != null && scanType == null)) {
-            throw new IllegalArgumentException("scanSchedule and scanType should be either both"
-                    + " non-null or both null");
-        }
-        if (scanScheduleSeconds != null && scanScheduleSeconds.length < 1) {
-            throw new IllegalArgumentException("scanSchedule should have length > 0, or be null");
-        }
-        if (scanType != null) {
-            if (scanType.length < 1) {
-                throw new IllegalArgumentException("scanType should have length > 0, or be null");
-            }
-            for (int type : scanType) {
-                if (type < 0 || type > WifiScanner.SCAN_TYPE_MAX) {
-                    throw new IllegalArgumentException("scanType=" + type
-                            + " is not a valid value");
-                }
-            }
-        }
-        int uid = Binder.getCallingUid();
-        if (!mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(uid)
-                && !mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)) {
-            throw new SecurityException("Uid=" + uid + ", is not allowed to set scan schedule");
-        }
-        mLog.info("scanSchedule=% scanType=% uid=%").c(Arrays.toString(scanScheduleSeconds))
-                .c(Arrays.toString(scanType)).c(uid).flush();
-        mWifiThreadRunner.post(() -> mWifiConnectivityManager.setExternalScreenOnScanSchedule(
-                scanScheduleSeconds, scanType));
-        mLastCallerInfoManager.put(WifiManager.API_SET_SCAN_SCHEDULE, Process.myTid(),
-                uid, Binder.getCallingPid(), "<unknown>",
-                scanScheduleSeconds != null);
-    }
-
-    @Override
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void setOneShotScreenOnConnectivityScanDelayMillis(int delayMs) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        if (delayMs < 0) {
-            throw new IllegalArgumentException("delayMs should not be negative");
-        }
-        int uid = Binder.getCallingUid();
-        if (!mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(uid)
-                && !mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)) {
-            throw new SecurityException("Uid=" + uid + ", is not allowed to set screen-on scan "
-                    + "delay");
-        }
-        mLog.info("delayMs=% uid=%").c(delayMs).c(uid).flush();
-        mWifiThreadRunner.post(() ->
-                mWifiConnectivityManager.setOneShotScreenOnConnectivityScanDelayMillis(delayMs));
-        mLastCallerInfoManager.put(WifiManager.API_SET_ONE_SHOT_SCREEN_ON_CONNECTIVITY_SCAN_DELAY,
-                Process.myTid(), uid, Binder.getCallingPid(), "<unknown>",
-                delayMs > 0);
-    }
-
-    /**
      * Return a map of all matching configurations keys with corresponding scanResults (or an empty
      * map if none).
      *
@@ -3210,52 +2596,6 @@
     }
 
     /**
-     * See {@link WifiManager#setSsidsAllowlist(Set)}
-     */
-    @Override
-    public void setSsidsAllowlist(@NonNull String packageName, @NonNull List<WifiSsid> ssids) {
-        int uid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
-        boolean hasPermission = mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
-                || isDeviceOrProfileOwner(uid, packageName);
-        if (!hasPermission && SdkLevel.isAtLeastT()) {
-            // MANAGE_WIFI_NETWORK_SELECTION is a new permission added in T.
-            hasPermission = mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(uid);
-        }
-        if (!hasPermission) {
-            throw new SecurityException(TAG + "Uid " + uid + ": Permission denied");
-        }
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("setSsidsAllowlist uid=%").c(uid).flush();
-        }
-        mWifiThreadRunner.post(() ->
-                mWifiBlocklistMonitor.setSsidsAllowlist(ssids));
-    }
-
-    /**
-     * See {@link WifiManager#getSsidsAllowlist()}
-     */
-    @Override
-    public @NonNull List<WifiSsid> getSsidsAllowlist(String packageName) {
-        int uid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
-        boolean hasPermission = mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
-                || isDeviceOrProfileOwner(uid, packageName);
-        if (!hasPermission && SdkLevel.isAtLeastT()) {
-            // MANAGE_WIFI_NETWORK_SELECTION is a new permission added in T.
-            hasPermission = mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(uid);
-        }
-        if (!hasPermission) {
-            throw new SecurityException(TAG + " Uid " + uid + ": Permission denied");
-        }
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("getSsidsAllowlist uid=%").c(uid).flush();
-        }
-        return mWifiThreadRunner.call(
-                () -> mWifiBlocklistMonitor.getSsidsAllowlist(), Collections.EMPTY_LIST);
-    }
-
-    /**
      * Returns list of OSU (Online Sign-Up) providers associated with the given list of ScanResult.
      *
      * @param scanResults a list of ScanResult that has Passpoint APs.
@@ -3372,13 +2712,13 @@
         int uid = Binder.getCallingUid();
         mWifiPermissionsUtil.checkPackage(uid, packageName);
         boolean hasPermission = isPrivileged(pid, uid)
-                || mWifiPermissionsUtil.isAdmin(uid, packageName)
+                || isDeviceOrProfileOwner(uid, packageName)
                 || mWifiPermissionsUtil.isSystem(packageName, uid);
         if (!hasPermission) {
             throw new SecurityException("Caller is not a device owner, profile owner, system app,"
                     + " or privileged app");
         }
-        return addOrUpdateNetworkInternal(config, packageName, uid, packageName, false);
+        return addOrUpdateNetworkInternal(config, packageName, uid);
     }
 
     /**
@@ -3387,104 +2727,23 @@
      * network if the operation succeeds, or {@code -1} if it fails
      */
     @Override
-    public int addOrUpdateNetwork(WifiConfiguration config, String packageName, Bundle extras) {
-        int uidToUse = getMockableCallingUid();
-        String packageNameToUse = packageName;
-        boolean overrideCreator = false;
-
-        // if we're being called from the SYSTEM_UID then allow usage of the AttributionSource to
-        // reassign the WifiConfiguration to another app (reassignment == creatorUid)
-        if (SdkLevel.isAtLeastS() && UserHandle.getAppId(uidToUse) == Process.SYSTEM_UID) {
-            if (extras == null) {
-                throw new SecurityException("extras bundle is null");
-            }
-            AttributionSource as = extras.getParcelable(
-                    WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE);
-            if (as == null) {
-                throw new SecurityException("addOrUpdateNetwork attributionSource is null");
-            }
-
-            if (!as.checkCallingUid()) {
-                throw new SecurityException(
-                        "addOrUpdateNetwork invalid (checkCallingUid fails) attribution source="
-                                + as);
-            }
-
-            // an attribution chain is either of size 1: unregistered (valid by definition) or
-            // size >1: in which case all are validated.
-            if (as.getNext() != null) {
-                AttributionSource asIt = as;
-                AttributionSource asLast = as;
-                do {
-                    if (!asIt.isTrusted(mContext)) {
-                        throw new SecurityException(
-                                "addOrUpdateNetwork invalid (isTrusted fails) attribution source="
-                                        + asIt);
-                    }
-                    asIt = asIt.getNext();
-                    if (asIt != null) asLast = asIt;
-                } while (asIt != null);
-
-                // use the last AttributionSource in the chain - i.e. the original caller
-                uidToUse = asLast.getUid();
-                packageNameToUse = asLast.getPackageName();
-                if (config.networkId >= 0) {
-                    /**
-                     * only allow to override the creator by calling the
-                     * {@link WifiManager#updateNetwork(WifiConfiguration)}
-                     */
-                    overrideCreator = true;
-                }
-            }
-        }
-
+    public int addOrUpdateNetwork(WifiConfiguration config, String packageName) {
         if (enforceChangePermission(packageName) != MODE_ALLOWED) {
             return -1;
         }
-
         int callingUid = Binder.getCallingUid();
-        int callingPid = Binder.getCallingPid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
-        boolean isAdmin = mWifiPermissionsUtil.isAdmin(callingUid, packageName);
-        boolean isCamera = mWifiPermissionsUtil.checkCameraPermission(callingUid);
-        boolean isSystem = mWifiPermissionsUtil.isSystem(packageName, callingUid);
-        boolean isPrivileged = isPrivileged(callingPid, callingUid);
-
-        if (!isTargetSdkLessThanQOrPrivileged(packageName, callingPid, callingUid)) {
-            mLog.info("addOrUpdateNetwork not allowed for uid=%").c(callingUid).flush();
+        if (!isTargetSdkLessThanQOrPrivileged(
+                packageName, Binder.getCallingPid(), callingUid)) {
+            mLog.info("addOrUpdateNetwork not allowed for uid=%")
+                    .c(Binder.getCallingUid()).flush();
             return -1;
         }
-        if (mUserManager.hasUserRestrictionForUser(UserManager.DISALLOW_CONFIG_WIFI,
-                UserHandle.of(mWifiPermissionsUtil.getCurrentUser()))
-                && isCamera && !isAdmin) {
-            mLog.info("addOrUpdateNetwork not allowed for the camera apps and therefore the user "
-                    + "when DISALLOW_CONFIG_WIFI user restriction is set").flush();
-            return -1;
-        }
-        if (SdkLevel.isAtLeastT() && mUserManager.hasUserRestrictionForUser(
-                UserManager.DISALLOW_ADD_WIFI_CONFIG, UserHandle.getUserHandleForUid(callingUid))) {
-            if (mWifiPermissionsUtil.isTargetSdkLessThan(
-                    packageName, Build.VERSION_CODES.Q, callingUid)
-                    && !(isPrivileged || isAdmin || isSystem)) {
-                mLog.info("addOrUpdateNetwork not allowed for normal apps targeting SDK less than "
-                        + "Q when the DISALLOW_ADD_WIFI_CONFIG user restriction is set").flush();
-                return -1;
-            }
-            if (isCamera && !isAdmin) {
-                mLog.info("addOrUpdateNetwork not allowed for camera apps and therefore the user "
-                        + "when the DISALLOW_ADD_WIFI_CONFIG user restriction is set").flush();
-                return -1;
-            }
-        }
-
-        mLog.info("addOrUpdateNetwork uid=%").c(callingUid).flush();
-        return addOrUpdateNetworkInternal(config, packageName, uidToUse,
-                packageNameToUse, overrideCreator).networkId;
+        mLog.info("addOrUpdateNetwork uid=%").c(Binder.getCallingUid()).flush();
+        return addOrUpdateNetworkInternal(config, packageName, callingUid).networkId;
     }
 
     private @NonNull AddNetworkResult addOrUpdateNetworkInternal(WifiConfiguration config,
-            String packageName, int attributedCreatorUid, String attributedCreatorPackage,
-            boolean overrideCreator) {
+            String packageName, int callingUid) {
         if (config == null) {
             Log.e(TAG, "bad network configuration");
             return new AddNetworkResult(
@@ -3525,7 +2784,8 @@
 
         if (config.isEnterprise() && config.enterpriseConfig.isEapMethodServerCertUsed()
                 && !config.enterpriseConfig.isMandatoryParameterSetForServerCertValidation()) {
-            if (!(mWifiGlobals.isInsecureEnterpriseConfigurationAllowed()
+            if (!(mContext.getResources().getBoolean(
+                    R.bool.config_wifiAllowInsecureEnterpriseConfigurationsForSettingsAndSUW)
                     && isSettingsOrSuw(Binder.getCallingPid(), Binder.getCallingUid()))) {
                 Log.e(TAG, "Enterprise network configuration is missing either a Root CA "
                         + "or a domain name");
@@ -3542,8 +2802,8 @@
         // TODO: b/171981339, add more detailed failure reason into
         //  WifiConfigManager.NetworkUpdateResult, and plumb that reason up.
         int networkId =  mWifiThreadRunner.call(
-                () -> mWifiConfigManager.addOrUpdateNetwork(config, attributedCreatorUid,
-                        attributedCreatorPackage, overrideCreator).getNetworkId(),
+                () -> mWifiConfigManager.addOrUpdateNetwork(config, callingUid, packageName)
+                        .getNetworkId(),
                 WifiConfiguration.INVALID_NETWORK_ID);
         if (networkId >= 0) {
             return new AddNetworkResult(AddNetworkResult.STATUS_SUCCESS, networkId);
@@ -3577,13 +2837,13 @@
         if (enforceChangePermission(packageName) != MODE_ALLOWED) {
             return false;
         }
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
         if (!isTargetSdkLessThanQOrPrivileged(
-                packageName, Binder.getCallingPid(), callingUid)) {
-            mLog.info("removeNetwork not allowed for uid=%").c(callingUid).flush();
+                packageName, Binder.getCallingPid(), Binder.getCallingUid())) {
+            mLog.info("removeNetwork not allowed for uid=%")
+                    .c(Binder.getCallingUid()).flush();
             return false;
         }
+        int callingUid = Binder.getCallingUid();
         mLog.info("removeNetwork uid=%").c(callingUid).flush();
         return mWifiThreadRunner.call(
                 () -> mWifiConfigManager.removeNetwork(netId, callingUid, packageName), false);
@@ -3595,10 +2855,8 @@
             throw new SecurityException("Caller does not hold CHANGE_WIFI_STATE permission");
         }
         final int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
-        if (!mWifiPermissionsUtil.isOrganizationOwnedDeviceAdmin(callingUid, packageName)) {
-            throw new SecurityException("Caller is not device owner or profile owner "
-                    + "of an organization owned device");
+        if (!mWifiPermissionsUtil.isDeviceOwner(callingUid, packageName)) {
+            throw new SecurityException("Caller is not device owner");
         }
         return mWifiThreadRunner.call(
                 () -> mWifiConfigManager.removeNonCallerConfiguredNetwork(callingUid), false);
@@ -3610,8 +2868,7 @@
      * int, true)}
      * @return
      */
-    private boolean triggerConnectAndReturnStatus(int netId, int callingUid,
-            @NonNull String packageName) {
+    private boolean triggerConnectAndReturnStatus(int netId, int callingUid) {
         final CountDownLatch countDownLatch = new CountDownLatch(1);
         final Mutable<Boolean> success = new Mutable<>(false);
         IActionListener.Stub connectListener = new IActionListener.Stub() {
@@ -3631,7 +2888,7 @@
                         mConnectHelper.connectToNetwork(
                                 new NetworkUpdateResult(netId),
                                 new ActionListenerWrapper(connectListener),
-                                callingUid, packageName)
+                                callingUid)
                 )
         );
         // now wait for response.
@@ -3651,27 +2908,17 @@
      * @return {@code true} if the operation succeeded
      */
     @Override
-    public boolean enableNetwork(int netId, boolean disableOthers, @NonNull String packageName) {
+    public boolean enableNetwork(int netId, boolean disableOthers, String packageName) {
         if (enforceChangePermission(packageName) != MODE_ALLOWED) {
             return false;
         }
-        if (packageName == null) {
-            throw new IllegalArgumentException("packageName must not be null");
+        if (!isTargetSdkLessThanQOrPrivileged(
+                packageName, Binder.getCallingPid(), Binder.getCallingUid())) {
+            mLog.info("enableNetwork not allowed for uid=%")
+                    .c(Binder.getCallingUid()).flush();
+            return false;
         }
         int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
-        if (!isTargetSdkLessThanQOrPrivileged(
-                packageName, Binder.getCallingPid(), callingUid)) {
-            mLog.info("enableNetwork not allowed for uid=%").c(callingUid).flush();
-            return false;
-        }
-        WifiConfiguration configuration = mWifiConfigManager.getConfiguredNetwork(netId);
-        if (mWifiPermissionsUtil.isAdminRestrictedNetwork(configuration)) {
-            mLog.info("enableNetwork not allowed for admin restricted network Id=%")
-                    .c(netId).flush();
-            return false;
-        }
-
         // TODO b/33807876 Log netId
         mLog.info("enableNetwork uid=% disableOthers=%")
                 .c(callingUid)
@@ -3679,7 +2926,7 @@
 
         mWifiMetrics.incrementNumEnableNetworkCalls();
         if (disableOthers) {
-            return triggerConnectAndReturnStatus(netId, callingUid, packageName);
+            return triggerConnectAndReturnStatus(netId, callingUid);
         } else {
             return mWifiThreadRunner.call(
                     () -> mWifiConfigManager.enableNetwork(netId, false, callingUid, packageName),
@@ -3698,13 +2945,13 @@
         if (enforceChangePermission(packageName) != MODE_ALLOWED) {
             return false;
         }
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
         if (!isTargetSdkLessThanQOrPrivileged(
-                packageName, Binder.getCallingPid(), callingUid)) {
-            mLog.info("disableNetwork not allowed for uid=%").c(callingUid).flush();
+                packageName, Binder.getCallingPid(), Binder.getCallingUid())) {
+            mLog.info("disableNetwork not allowed for uid=%")
+                    .c(Binder.getCallingUid()).flush();
             return false;
         }
+        int callingUid = Binder.getCallingUid();
         mLog.info("disableNetwork uid=%").c(callingUid).flush();
         return mWifiThreadRunner.call(
                 () -> mWifiConfigManager.disableNetwork(netId, callingUid, packageName), false);
@@ -3740,19 +2987,6 @@
             // to join. Even if we are currently connected to the carrier-merged wifi, it's still
             // better to disconnect here because it's possible that carrier wifi offload is
             // disabled.
-            for (ClientModeManager clientModeManager : mActiveModeWarden.getClientModeManagers()) {
-                if (!(clientModeManager instanceof ConcreteClientModeManager)) {
-                    continue;
-                }
-                ConcreteClientModeManager cmm = (ConcreteClientModeManager) clientModeManager;
-                if ((cmm.getRole() == ROLE_CLIENT_SECONDARY_LONG_LIVED && cmm.isSecondaryInternet())
-                        || cmm.getRole() == ROLE_CLIENT_SECONDARY_TRANSIENT) {
-                    clientModeManager.disconnect();
-                }
-            }
-            // Disconnect the primary CMM last to avoid STA+STA features handling the
-            // primary STA disconnecting (such as promoting the secondary to primary), potentially
-            // resulting in messy and unexpected state transitions.
             mActiveModeWarden.getPrimaryClientModeManager().disconnect();
         });
     }
@@ -3782,44 +3016,16 @@
      */
     @Override
     public void allowAutojoinGlobal(boolean choice) {
+        enforceNetworkSettingsPermission();
+
         int callingUid = Binder.getCallingUid();
-        if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(callingUid)
-                && !mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(callingUid)
-                && !isDeviceOrProfileOwner(callingUid, mContext.getOpPackageName())) {
-            throw new SecurityException("Uid " + callingUid
-                    + " is not allowed to set wifi global autojoin");
-        }
         mLog.info("allowAutojoinGlobal=% uid=%").c(choice).c(callingUid).flush();
         mWifiThreadRunner.post(() -> mWifiConnectivityManager.setAutoJoinEnabledExternal(choice));
-        mLastCallerInfoManager.put(WifiManager.API_AUTOJOIN_GLOBAL, Process.myTid(),
+        mLastCallerInfoManager.put(LastCallerInfoManager.AUTOJOIN_GLOBAL, Process.myTid(),
                 callingUid, Binder.getCallingPid(), "<unknown>", choice);
     }
 
     /**
-     * See {@link WifiManager#queryAutojoinGlobal(Executor, Consumer)}
-     */
-    @Override
-    public void queryAutojoinGlobal(@NonNull IBooleanListener listener) {
-        if (listener == null) {
-            throw new IllegalArgumentException("listener should not be null");
-        }
-        int callingUid = Binder.getCallingUid();
-        if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(callingUid)
-                && !mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(callingUid)
-                && !isDeviceOrProfileOwner(callingUid, mContext.getOpPackageName())) {
-            throw new SecurityException("Uid " + callingUid
-                    + " is not allowed to get wifi global autojoin");
-        }
-        mWifiThreadRunner.post(() -> {
-            try {
-                listener.onResult(mWifiConnectivityManager.getAutoJoinEnabledExternal());
-            } catch (RemoteException e) {
-                Log.e(TAG, e.getMessage());
-            }
-        });
-    }
-
-    /**
      * See {@link android.net.wifi.WifiManager#allowAutojoin(int, boolean)}
      * @param netId the integer that identifies the network configuration
      * @param choice the user's choice to allow auto-join
@@ -3935,21 +3141,9 @@
      */
     private ClientModeManager getClientModeManagerIfSecondaryCmmRequestedByCallerPresent(
             int callingUid, @NonNull String callingPackageName) {
-        List<ConcreteClientModeManager> secondaryCmms = null;
-        ActiveModeManager.ClientConnectivityRole roleSecondaryLocalOnly =
-                ROLE_CLIENT_LOCAL_ONLY;
-        ActiveModeManager.ClientInternetConnectivityRole roleSecondaryLongLived =
-                ROLE_CLIENT_SECONDARY_LONG_LIVED;
-        try {
-            secondaryCmms = mActiveModeWarden.getClientModeManagersInRoles(
-                    roleSecondaryLocalOnly, roleSecondaryLongLived);
-        } catch (Exception e) {
-            // print debug info and then rethrow the exception
-            Log.e(TAG, "Failed to call getClientModeManagersInRoles on "
-                    + roleSecondaryLocalOnly + ", and " + roleSecondaryLongLived);
-            throw e;
-        }
-
+        List<ConcreteClientModeManager> secondaryCmms =
+                mActiveModeWarden.getClientModeManagersInRoles(
+                        ROLE_CLIENT_LOCAL_ONLY, ROLE_CLIENT_SECONDARY_LONG_LIVED);
         for (ConcreteClientModeManager cmm : secondaryCmms) {
             WorkSource reqWs = cmm.getRequestorWs();
             // If there are more than 1 secondary CMM for same app, return any one (should not
@@ -3968,14 +3162,12 @@
      * @return the Wi-Fi information, contained in {@link WifiInfo}.
      */
     @Override
-    public WifiInfo getConnectionInfo(@NonNull String callingPackage,
-            @Nullable String callingFeatureId) {
+    public WifiInfo getConnectionInfo(String callingPackage, String callingFeatureId) {
         enforceAccessPermission();
         int uid = Binder.getCallingUid();
         if (isVerboseLoggingEnabled()) {
             mLog.info("getConnectionInfo uid=%").c(uid).flush();
         }
-        mWifiPermissionsUtil.checkPackage(uid, callingPackage);
         long ident = Binder.clearCallingIdentity();
         try {
             WifiInfo wifiInfo = mWifiThreadRunner.call(
@@ -3990,8 +3182,7 @@
                 }
                 redactions &= ~NetworkCapabilities.REDACT_FOR_LOCAL_MAC_ADDRESS;
             }
-            if (mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
-                    || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid)) {
+            if (mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)) {
                 if (isVerboseLoggingEnabled()) {
                     Log.v(TAG, "Clearing REDACT_FOR_NETWORK_SETTINGS for " + callingPackage
                             + "(uid=" + uid + ")");
@@ -3999,12 +3190,12 @@
                 redactions &= ~NetworkCapabilities.REDACT_FOR_NETWORK_SETTINGS;
             }
             try {
-                mWifiPermissionsUtil.enforceCanAccessScanResults(callingPackage, callingFeatureId,
-                        uid, null);
                 if (isVerboseLoggingEnabled()) {
                     Log.v(TAG, "Clearing REDACT_FOR_ACCESS_FINE_LOCATION for " + callingPackage
                             + "(uid=" + uid + ")");
                 }
+                mWifiPermissionsUtil.enforceCanAccessScanResults(callingPackage, callingFeatureId,
+                        uid, null);
                 redactions &= ~NetworkCapabilities.REDACT_FOR_ACCESS_FINE_LOCATION;
             } catch (SecurityException ignored) {
                 if (isVerboseLoggingEnabled()) {
@@ -4098,18 +3289,10 @@
             return false;
         }
         int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
         if (!isTargetSdkLessThanROrPrivileged(
                 packageName, Binder.getCallingPid(), callingUid)) {
             mLog.info("addOrUpdatePasspointConfiguration not allowed for uid=%")
-                    .c(callingUid).flush();
-            return false;
-        }
-        if (SdkLevel.isAtLeastT() && mUserManager.hasUserRestrictionForUser(
-                UserManager.DISALLOW_ADD_WIFI_CONFIG, UserHandle.getUserHandleForUid(callingUid))
-                && !mWifiPermissionsUtil.isAdmin(callingUid, packageName)) {
-            mLog.info("addOrUpdatePasspointConfiguration only allowed for admin"
-                    + "when the DISALLOW_ADD_WIFI_CONFIG user restriction is set").flush();
+                    .c(Binder.getCallingUid()).flush();
             return false;
         }
         mLog.info("addorUpdatePasspointConfiguration uid=%").c(callingUid).flush();
@@ -4126,7 +3309,6 @@
      */
     @Override
     public boolean removePasspointConfiguration(String fqdn, String packageName) {
-        mWifiPermissionsUtil.checkPackage(Binder.getCallingUid(), packageName);
         return removePasspointConfigurationInternal(fqdn, null);
     }
 
@@ -4162,7 +3344,6 @@
     @Override
     public List<PasspointConfiguration> getPasspointConfigurations(String packageName) {
         final int uid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
         boolean privileged = false;
         if (mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
                 || mWifiPermissionsUtil.checkNetworkSetupWizardPermission(uid)) {
@@ -4202,84 +3383,6 @@
         return 0;
     }
 
-    /**
-     * see {@link android.net.wifi.WifiManager#addDriverCountryCodeChangedListener(
-     * WifiManager.OnDriverCountryCodeChangedListener)}
-     *
-     * @param listener country code listener to register
-     * @param packageName Package name of the calling app
-     * @param featureId The feature in the package
-     *
-     * @throws SecurityException if the caller does not have permission to register a callback
-     * @throws RemoteException if remote exception happens
-     * @throws IllegalArgumentException if the arguments are null or invalid
-     */
-    @Override
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void registerDriverCountryCodeChangedListener(@NonNull
-            IOnWifiDriverCountryCodeChangedListener listener, @Nullable String packageName,
-            @Nullable String featureId) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        // verify arguments
-        if (listener == null) {
-            throw new IllegalArgumentException("listener must not be null");
-        }
-        int uid = Binder.getCallingUid();
-        int pid = Binder.getCallingPid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
-        enforceCoarseLocationPermission(packageName, featureId, uid);
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("registerDriverCountryCodeChangedListener uid=%")
-                    .c(Binder.getCallingUid()).flush();
-        }
-
-        // post operation to handler thread
-        mWifiThreadRunner.post(() -> {
-            mCountryCodeTracker.registerDriverCountryCodeChangedListener(listener,
-                    new WifiPermissionsUtil.CallerIdentity(uid, pid, packageName, featureId));
-            // Update the client about the current driver country code immediately
-            // after registering.
-            try {
-                listener.onDriverCountryCodeChanged(mCountryCode.getCurrentDriverCountryCode());
-            } catch (RemoteException e) {
-                Log.e(TAG, "registerDriverCountryCodeChangedListener: remote exception -- " + e);
-            }
-        });
-    }
-
-    /**
-     * see {@link android.net.wifi.WifiManager#removeDriverCountryCodeChangedListener(Executor,
-     * WifiManager.OnDriverCountryCodeChangedListener)}
-     *
-     * @param listener country code listener to register
-     *
-     * @throws RemoteException if remote exception happens
-     * @throws IllegalArgumentException if the arguments are null or invalid
-     */
-    @Override
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void unregisterDriverCountryCodeChangedListener(@NonNull
-            IOnWifiDriverCountryCodeChangedListener listener) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        // verify arguments
-        if (listener == null) {
-            throw new IllegalArgumentException("listener must not be null");
-        }
-        int uid = Binder.getCallingUid();
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("unregisterDriverCountryCodeChangedListener uid=%")
-                    .c(Binder.getCallingUid()).flush();
-        }
-
-        // post operation to handler thread
-        mWifiThreadRunner.post(() ->
-                mCountryCodeTracker.unregisterDriverCountryCodeChangedListener(listener));
-    }
-
      /**
      * Get the country code
      * @return Get the best choice country code for wifi, regardless of if it was set or
@@ -4287,14 +3390,8 @@
      * Returns null when there is no country code available.
      */
     @Override
-    public String getCountryCode(String packageName, String featureId) {
-        int uid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
-        if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
-                && !mWifiPermissionsUtil.checkCallersCoarseLocationPermission(
-                        packageName, featureId, uid, "getCountryCode")) {
-            throw new SecurityException("Caller has no permission to get country code.");
-        }
+    public String getCountryCode() {
+        enforceNetworkSettingsPermission();
         if (isVerboseLoggingEnabled()) {
             mLog.info("getCountryCode uid=%").c(Binder.getCallingUid()).flush();
         }
@@ -4466,7 +3563,6 @@
     public DhcpInfo getDhcpInfo(@NonNull String packageName) {
         enforceAccessPermission();
         int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
         if (isVerboseLoggingEnabled()) {
             mLog.info("getDhcpInfo uid=%").c(callingUid).flush();
         }
@@ -4552,7 +3648,7 @@
                     String ip = tokens[0];
                     String mac = tokens[3];
 
-                    if (TextUtils.equals(remoteIpAddress, ip)) {
+                    if (remoteIpAddress.equals(ip)) {
                         macAddress = mac;
                         break;
                     }
@@ -4608,15 +3704,14 @@
     public void disableEphemeralNetwork(String network, String packageName) {
         mContext.enforceCallingOrSelfPermission(android.Manifest.permission.CHANGE_WIFI_STATE,
                 "WifiService");
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
-        if (!isPrivileged(Binder.getCallingPid(), callingUid)) {
-            mLog.info("disableEphemeralNetwork not allowed for uid=%").c(callingUid).flush();
+        if (!isPrivileged(Binder.getCallingPid(), Binder.getCallingUid())) {
+            mLog.info("disableEphemeralNetwork not allowed for uid=%")
+                    .c(Binder.getCallingUid()).flush();
             return;
         }
-        mLog.info("disableEphemeralNetwork uid=%").c(callingUid).flush();
+        mLog.info("disableEphemeralNetwork uid=%").c(Binder.getCallingUid()).flush();
         mWifiThreadRunner.post(() -> mWifiConfigManager.userTemporarilyDisabledNetwork(network,
-                callingUid));
+                Binder.getCallingUid()));
     }
 
     private void removeAppStateInternal(int uid, @NonNull String pkgName) {
@@ -4684,12 +3779,10 @@
                     public void onReceive(Context context, Intent intent) {
                         final int subId = SubscriptionManager.getActiveDataSubscriptionId();
                         Log.d(TAG, "ACTION_CARRIER_CONFIG_CHANGED, active subId: " + subId);
-                        // Tether mode only since carrier requirement only for tethered SoftAp.
                         mTetheredSoftApTracker
                                 .updateSoftApCapabilityWhenCarrierConfigChanged(subId);
                         mActiveModeWarden.updateSoftApCapability(
-                                mTetheredSoftApTracker.getSoftApCapability(),
-                                WifiManager.IFACE_IP_MODE_TETHERED);
+                                mTetheredSoftApTracker.getSoftApCapability());
                     }
                 },
                 filter,
@@ -4707,12 +3800,8 @@
     public int handleShellCommand(@NonNull ParcelFileDescriptor in,
             @NonNull ParcelFileDescriptor out, @NonNull ParcelFileDescriptor err,
             @NonNull String[] args) {
-        if (!mIsBootComplete) {
-            Log.w(TAG, "Received shell command when boot is not complete!");
-            return -1;
-        }
-
-        WifiShellCommand shellCommand =  mWifiInjector.makeWifiShellCommand(this);
+        WifiShellCommand shellCommand =  new WifiShellCommand(mWifiInjector, this, mContext,
+                mWifiGlobals, mWifiThreadRunner);
         return shellCommand.exec(this, in.getFileDescriptor(), out.getFileDescriptor(),
                 err.getFileDescriptor(), args);
     }
@@ -4724,10 +3813,10 @@
             mActiveModeWarden.updateMetrics();
             mPasspointManager.updateMetrics();
         });
-        boolean isNonPersistentMacRandEnabled = mFrameworkFacade.getIntegerSetting(mContext,
-                WifiConfigManager.NON_PERSISTENT_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG, 0)
-                == 1 ? true : false;
-        mWifiMetrics.setNonPersistentMacRandomizationForceEnabled(isNonPersistentMacRandEnabled);
+        boolean isEnhancedMacRandEnabled = mFrameworkFacade.getIntegerSetting(mContext,
+                WifiConfigManager.ENHANCED_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG, 0) == 1
+                ? true : false;
+        mWifiMetrics.setEnhancedMacRandomizationForceEnabled(isEnhancedMacRandEnabled);
         mWifiMetrics.setIsScanningAlwaysEnabled(
                 mSettingsStore.isScanAlwaysAvailableToggleEnabled());
         mWifiMetrics.setVerboseLoggingEnabled(isVerboseLoggingEnabled());
@@ -4743,94 +3832,93 @@
                     + ", uid=" + Binder.getCallingUid());
             return;
         }
-        if (!mIsWifiServiceStarted) {
-            pw.println("Wifi Service is not started. no dump available");
-            return;
-        }
-        mWifiThreadRunner.run(() -> {
-            String arg0 = args != null && args.length > 0 ? args[0] : null;
-            if (WifiMetrics.PROTO_DUMP_ARG.equals(arg0)) {
-                // WifiMetrics proto bytes were requested. Dump only these.
-                updateWifiMetrics();
-                mWifiMetrics.dump(fd, pw, args);
-            } else if (IpClientUtil.DUMP_ARG.equals(arg0)) {
-                // IpClient dump was requested. Pass it along and take no further action.
-                String[] ipClientArgs = new String[args.length - 1];
-                System.arraycopy(args, 1, ipClientArgs, 0, ipClientArgs.length);
-                mActiveModeWarden.getPrimaryClientModeManager().dumpIpClient(fd, pw, ipClientArgs);
-            } else if (WifiScoreReport.DUMP_ARG.equals(arg0)) {
-                mActiveModeWarden.getPrimaryClientModeManager().dumpWifiScoreReport(fd, pw, args);
-            } else if (WifiScoreCard.DUMP_ARG.equals(arg0)) {
-                WifiScoreCard wifiScoreCard = mWifiInjector.getWifiScoreCard();
-                String networkListBase64 = wifiScoreCard.getNetworkListBase64(true);
-                pw.println(networkListBase64);
-            } else {
-                pw.println("Verbose logging is " + (isVerboseLoggingEnabled() ? "on" : "off"));
-                pw.println("mVerboseLoggingLevel " + mVerboseLoggingLevel);
-                pw.println("Stay-awake conditions: " + mFacade.getIntegerSetting(
-                        mContext, Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0));
-                pw.println("mInIdleMode " + mInIdleMode);
-                pw.println("mScanPending " + mScanPending);
-                pw.println("SettingsStore:");
-                mSettingsStore.dump(fd, pw, args);
-                mActiveModeWarden.dump(fd, pw, args);
-                mMakeBeforeBreakManager.dump(fd, pw, args);
-                pw.println();
-                mWifiTrafficPoller.dump(fd, pw, args);
-                pw.println();
-                pw.println("Locks held:");
-                mWifiLockManager.dump(pw);
-                pw.println();
-                mWifiMulticastLockManager.dump(pw);
-                pw.println();
-                WifiScoreCard wifiScoreCard = mWifiInjector.getWifiScoreCard();
-                String networkListBase64 = wifiScoreCard.getNetworkListBase64(true);
-                pw.println("WifiScoreCard:");
-                pw.println(networkListBase64);
+        if (args != null && args.length > 0 && WifiMetrics.PROTO_DUMP_ARG.equals(args[0])) {
+            // WifiMetrics proto bytes were requested. Dump only these.
+            updateWifiMetrics();
+            mWifiMetrics.dump(fd, pw, args);
+        } else if (args != null && args.length > 0 && IpClientUtil.DUMP_ARG.equals(args[0])) {
+            // IpClient dump was requested. Pass it along and take no further action.
+            String[] ipClientArgs = new String[args.length - 1];
+            System.arraycopy(args, 1, ipClientArgs, 0, ipClientArgs.length);
+            mActiveModeWarden.getPrimaryClientModeManager().dumpIpClient(fd, pw, ipClientArgs);
+        } else if (args != null && args.length > 0 && WifiScoreReport.DUMP_ARG.equals(args[0])) {
+            mActiveModeWarden.getPrimaryClientModeManager().dumpWifiScoreReport(fd, pw, args);
+        } else if (args != null && args.length > 0 && WifiScoreCard.DUMP_ARG.equals(args[0])) {
+            WifiScoreCard wifiScoreCard = mWifiInjector.getWifiScoreCard();
+            String networkListBase64 = mWifiThreadRunner.call(() ->
+                    wifiScoreCard.getNetworkListBase64(true), "");
+            pw.println(networkListBase64);
+        } else {
+            pw.println("Verbose logging is " + (isVerboseLoggingEnabled() ? "on" : "off"));
+            pw.println("Stay-awake conditions: " +
+                    mFacade.getIntegerSetting(mContext,
+                            Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0));
+            pw.println("mInIdleMode " + mInIdleMode);
+            pw.println("mScanPending " + mScanPending);
+            pw.println("SettingsStore:");
+            mSettingsStore.dump(fd, pw, args);
+            mActiveModeWarden.dump(fd, pw, args);
+            mMakeBeforeBreakManager.dump(fd, pw, args);
+            pw.println();
+            mWifiTrafficPoller.dump(fd, pw, args);
+            pw.println();
+            pw.println("Locks held:");
+            mWifiLockManager.dump(pw);
+            pw.println();
+            mWifiMulticastLockManager.dump(pw);
+            pw.println();
+            WifiScoreCard wifiScoreCard = mWifiInjector.getWifiScoreCard();
+            String networkListBase64 = mWifiThreadRunner.call(() ->
+                    wifiScoreCard.getNetworkListBase64(true), "");
+            pw.println("WifiScoreCard:");
+            pw.println(networkListBase64);
 
-                updateWifiMetrics();
-                mWifiMetrics.dump(fd, pw, args);
+            updateWifiMetrics();
+            mWifiMetrics.dump(fd, pw, args);
 
-                pw.println();
-                mWifiNetworkSuggestionsManager.dump(fd, pw, args);
-                pw.println();
-                mWifiBackupRestore.dump(fd, pw, args);
-                pw.println();
-                pw.println("ScoringParams: " + mWifiInjector.getScoringParams());
-                pw.println();
+            pw.println();
+            mWifiThreadRunner.run(() -> mWifiNetworkSuggestionsManager.dump(fd, pw, args));
+            pw.println();
+            mWifiBackupRestore.dump(fd, pw, args);
+            pw.println();
+            pw.println("ScoringParams: " + mWifiInjector.getScoringParams());
+            pw.println();
+            mWifiThreadRunner.run(() -> {
+                mWifiInjector.getWifiNetworkScoreCache().dumpWithLatestScanResults(
+                        fd, pw, args, mScanRequestProxy.getScanResults());
                 mWifiInjector.getSettingsConfigStore().dump(fd, pw, args);
-                pw.println();
-                mCountryCode.dump(fd, pw, args);
-                mWifiInjector.getWifiNetworkFactory().dump(fd, pw, args);
-                mWifiInjector.getUntrustedWifiNetworkFactory().dump(fd, pw, args);
-                mWifiInjector.getOemWifiNetworkFactory().dump(fd, pw, args);
-                mWifiInjector.getRestrictedWifiNetworkFactory().dump(fd, pw, args);
-                mWifiInjector.getMultiInternetWifiNetworkFactory().dump(fd, pw, args);
-                pw.println("Wlan Wake Reasons:" + mWifiNative.getWlanWakeReasonCount());
-                pw.println();
-                mWifiConfigManager.dump(fd, pw, args);
-                pw.println();
-                mPasspointManager.dump(pw);
-                pw.println();
-                mWifiInjector.getWifiDiagnostics().captureBugReportData(
-                        WifiDiagnostics.REPORT_REASON_USER_ACTION);
-                mWifiInjector.getWifiDiagnostics().dump(fd, pw, args);
-                mWifiConnectivityManager.dump(fd, pw, args);
+            });
+            pw.println();
+            mCountryCode.dump(fd, pw, args);
+            mWifiInjector.getWifiNetworkFactory().dump(fd, pw, args);
+            mWifiInjector.getUntrustedWifiNetworkFactory().dump(fd, pw, args);
+            mWifiInjector.getOemWifiNetworkFactory().dump(fd, pw, args);
+            pw.println("Wlan Wake Reasons:" + mWifiNative.getWlanWakeReasonCount());
+            pw.println();
+            mWifiConfigManager.dump(fd, pw, args);
+            pw.println();
+            mPasspointManager.dump(pw);
+            pw.println();
+            mWifiInjector.getWifiDiagnostics().captureBugReportData(
+                    WifiDiagnostics.REPORT_REASON_USER_ACTION);
+            mWifiInjector.getWifiDiagnostics().dump(fd, pw, args);
+            mWifiConnectivityManager.dump(fd, pw, args);
+            mWifiThreadRunner.run(() -> {
                 mWifiHealthMonitor.dump(fd, pw, args);
+            });
+            mWifiThreadRunner.run(() -> {
                 mWifiScoreCard.dump(fd, pw, args);
-                mWifiInjector.getWakeupController().dump(fd, pw, args);
-                mWifiInjector.getWifiLastResortWatchdog().dump(fd, pw, args);
-                mWifiInjector.getAdaptiveConnectivityEnabledSettingObserver().dump(fd, pw, args);
-                mWifiInjector.getWifiGlobals().dump(fd, pw, args);
-                mWifiInjector.getSarManager().dump(fd, pw, args);
-                pw.println();
-                mLastCallerInfoManager.dump(pw);
-                pw.println();
-                mWifiInjector.getLinkProbeManager().dump(fd, pw, args);
-                pw.println();
-                mWifiNative.dump(pw);
-            }
-        });
+            });
+            mWifiInjector.getWakeupController().dump(fd, pw, args);
+            mWifiInjector.getWifiLastResortWatchdog().dump(fd, pw, args);
+            mWifiInjector.getAdaptiveConnectivityEnabledSettingObserver().dump(fd, pw, args);
+            mWifiInjector.getWifiGlobals().dump(fd, pw, args);
+            mWifiInjector.getSarManager().dump(fd, pw, args);
+            pw.println();
+            mLastCallerInfoManager.dump(pw);
+            pw.println();
+            mWifiInjector.getLinkProbeManager().dump(fd, pw, args);
+        }
     }
 
     @Override
@@ -4939,9 +4027,7 @@
     }
 
     private boolean isVerboseLoggingEnabled() {
-        return mFrameworkFacade
-                .isVerboseLoggingAlwaysOn(getVerboseAlwaysOnLevel(), mBuildProperties)
-                || WifiManager.VERBOSE_LOGGING_LEVEL_DISABLED != mVerboseLoggingLevel;
+        return WifiManager.VERBOSE_LOGGING_LEVEL_DISABLED != mVerboseLoggingLevel;
     }
 
     private void enableVerboseLoggingInternal(int verbose) {
@@ -4961,15 +4047,12 @@
             // Ensure the show key mode is disabled.
             mWifiGlobals.setShowKeyVerboseLoggingModeEnabled(false);
         }
-        final boolean verboseEnabled = isVerboseLoggingEnabled();
-        final boolean halVerboseEnabled =
-                WifiManager.VERBOSE_LOGGING_LEVEL_DISABLED != mVerboseLoggingLevel;
-        mActiveModeWarden.enableVerboseLogging(verboseEnabled);
-        mWifiLockManager.enableVerboseLogging(verboseEnabled);
-        mWifiMulticastLockManager.enableVerboseLogging(verboseEnabled);
-        mWifiInjector.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-        mWifiInjector.getSarManager().enableVerboseLogging(verboseEnabled);
-        ApConfigUtil.enableVerboseLogging(verboseEnabled);
+
+        mActiveModeWarden.enableVerboseLogging(isVerboseLoggingEnabled());
+        mWifiLockManager.enableVerboseLogging(verbose);
+        mWifiMulticastLockManager.enableVerboseLogging(verbose);
+        mWifiInjector.enableVerboseLogging(verbose);
+        mWifiInjector.getSarManager().enableVerboseLogging(verbose);
     }
 
     @Override
@@ -4996,24 +4079,22 @@
         if (enforceChangePermission(packageName) != MODE_ALLOWED) {
             return;
         }
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
-        mLog.info("factoryReset uid=%").c(callingUid).flush();
+        mLog.info("factoryReset uid=%").c(Binder.getCallingUid()).flush();
         if (mUserManager.hasUserRestrictionForUser(
                 UserManager.DISALLOW_NETWORK_RESET,
-                UserHandle.getUserHandleForUid(callingUid))) {
+                UserHandle.getUserHandleForUid(Binder.getCallingUid()))) {
             return;
         }
         if (!mUserManager.hasUserRestrictionForUser(
                 UserManager.DISALLOW_CONFIG_TETHERING,
-                UserHandle.getUserHandleForUid(callingUid))) {
+                UserHandle.getUserHandleForUid(Binder.getCallingUid()))) {
             // Turn mobile hotspot off
             stopSoftApInternal(WifiManager.IFACE_IP_MODE_UNSPECIFIED);
         }
 
         if (mUserManager.hasUserRestrictionForUser(
                 UserManager.DISALLOW_CONFIG_WIFI,
-                UserHandle.getUserHandleForUid(callingUid))) {
+                UserHandle.getUserHandleForUid(Binder.getCallingUid()))) {
             return;
         }
         // Delete all Wifi SSIDs
@@ -5108,64 +4189,34 @@
         return backupData;
     }
 
-    private final class NetworkUpdater implements Runnable {
-        private final int mCallingUid;
-        private final List<WifiConfiguration> mConfigurations;
-        private final int mStartIdx;
-        private final int mBatchNum;
-
-        NetworkUpdater(int callingUid, List<WifiConfiguration> configurations, int startIdx,
-                int batchNum) {
-            mCallingUid = callingUid;
-            mConfigurations = configurations;
-            mStartIdx = startIdx;
-            mBatchNum = batchNum;
-        }
-
-        @Override
-        public void run() {
-            final int nextStartIdx = Math.min(mStartIdx + mBatchNum, mConfigurations.size());
-            for (int i = mStartIdx; i < nextStartIdx; i++) {
-                WifiConfiguration configuration = mConfigurations.get(i);
-                int networkId =
-                        mWifiConfigManager.addOrUpdateNetwork(configuration, mCallingUid)
-                                .getNetworkId();
-                if (networkId == WifiConfiguration.INVALID_NETWORK_ID) {
-                    Log.e(TAG, "Restore network failed: "
-                            + configuration.getProfileKey());
-                } else {
-                    // Enable all networks restored.
-                    mWifiConfigManager.enableNetwork(networkId, false, mCallingUid, null);
-                    // Restore auto-join param.
-                    mWifiConfigManager.allowAutojoin(networkId, configuration.allowAutojoin);
-                }
-            }
-            if (nextStartIdx < mConfigurations.size()) {
-                mWifiThreadRunner.post(new NetworkUpdater(mCallingUid, mConfigurations,
-                        nextStartIdx, mBatchNum));
-            }
-            Log.d(TAG, "Restored backup data index " + nextStartIdx + " of total "
-                    + mConfigurations.size() + " configs ");
-        }
-    }
-
     /**
      * Helper method to restore networks retrieved from backup data.
      *
      * @param configurations list of WifiConfiguration objects parsed from the backup data.
      */
-    @VisibleForTesting
-    void restoreNetworks(List<WifiConfiguration> configurations) {
+    private void restoreNetworks(List<WifiConfiguration> configurations) {
         if (configurations == null) {
-            Log.w(TAG, "No wifi configuration to restore.");
+            Log.e(TAG, "Backup data parse failed");
             return;
         }
         int callingUid = Binder.getCallingUid();
-        if (configurations.isEmpty()) return;
-        final int batchNum = mContext.getResources().getInteger(
-                    R.integer.config_wifiConfigurationRestoreNetworksBatchNum);
-        mWifiThreadRunner.run(new NetworkUpdater(callingUid, configurations, 0,
-                batchNum > 0 ? batchNum : configurations.size()));
+        mWifiThreadRunner.run(
+                () -> {
+                    for (WifiConfiguration configuration : configurations) {
+                        int networkId =
+                                mWifiConfigManager.addOrUpdateNetwork(configuration, callingUid)
+                                        .getNetworkId();
+                        if (networkId == WifiConfiguration.INVALID_NETWORK_ID) {
+                            Log.e(TAG, "Restore network failed: "
+                                    + configuration.getProfileKey());
+                            continue;
+                        }
+                        // Enable all networks restored.
+                        mWifiConfigManager.enableNetwork(networkId, false, callingUid, null);
+                        // Restore auto-join param.
+                        mWifiConfigManager.allowAutojoin(networkId, configuration.allowAutojoin);
+                    }
+                });
     }
 
     /**
@@ -5178,7 +4229,10 @@
         enforceNetworkSettingsPermission();
         mLog.info("restoreBackupData uid=%").c(Binder.getCallingUid()).flush();
         Log.d(TAG, "Restoring backup data");
-        restoreNetworks(mWifiBackupRestore.retrieveConfigurationsFromBackupData(data));
+        List<WifiConfiguration> wifiConfigurations =
+                mWifiBackupRestore.retrieveConfigurationsFromBackupData(data);
+        restoreNetworks(wifiConfigurations);
+        Log.d(TAG, "Restored backup data");
     }
 
     /**
@@ -5231,8 +4285,11 @@
         enforceNetworkSettingsPermission();
         mLog.trace("restoreSupplicantBackupData uid=%").c(Binder.getCallingUid()).flush();
         Log.d(TAG, "Restoring supplicant backup data");
-        restoreNetworks(mWifiBackupRestore.retrieveConfigurationsFromSupplicantBackupData(
-                supplicantData, ipConfigData));
+        List<WifiConfiguration> wifiConfigurations =
+                mWifiBackupRestore.retrieveConfigurationsFromSupplicantBackupData(
+                        supplicantData, ipConfigData);
+        restoreNetworks(wifiConfigurations);
+        Log.d(TAG, "Restored supplicant backup data");
     }
 
     /**
@@ -5306,8 +4363,7 @@
 
     private long getSupportedFeaturesInternal() {
         long supportedFeatureSet = mWifiThreadRunner.call(
-                () -> mWifiNative.getSupportedFeatureSet(
-                        mActiveModeWarden.getPrimaryClientModeManager().getInterfaceName()),
+                () -> mActiveModeWarden.getPrimaryClientModeManager().getSupportedFeatures(),
                 0L);
         // Mask the feature set against system properties.
         boolean rttSupported = mContext.getPackageManager().hasSystemFeature(
@@ -5343,7 +4399,6 @@
                 supportedFeatureSet |= WifiManager.WIFI_FEATURE_STA_BRIDGED_AP;
             }
         }
-
         supportedFeatureSet |= mWifiThreadRunner.call(
                 () -> {
                     long concurrencyFeatureSet = 0L;
@@ -5359,15 +4414,15 @@
                     if (mActiveModeWarden.isStaStaConcurrencySupportedForRestrictedConnections()) {
                         concurrencyFeatureSet |= WifiManager.WIFI_FEATURE_ADDITIONAL_STA_RESTRICTED;
                     }
-                    if (mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()) {
-                        concurrencyFeatureSet |= WifiManager
-                                .WIFI_FEATURE_ADDITIONAL_STA_MULTI_INTERNET;
-                    }
                     return concurrencyFeatureSet;
                 }, 0L);
         return supportedFeatureSet;
     }
 
+    private static boolean hasAutomotiveFeature(Context context) {
+        return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE);
+    }
+
     /**
      * See
      * {@link WifiManager#registerNetworkRequestMatchCallback(
@@ -5431,29 +4486,10 @@
         if (enforceChangePermission(callingPackageName) != MODE_ALLOWED) {
             return WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_APP_DISALLOWED;
         }
-        int callingUid = Binder.getCallingUid();
-        int callingPid = Binder.getCallingPid();
-
-        if (SdkLevel.isAtLeastT()) {
-            boolean isUserRestrictionSet = mUserManager.hasUserRestrictionForUser(
-                    UserManager.DISALLOW_ADD_WIFI_CONFIG,
-                    UserHandle.getUserHandleForUid(callingUid));
-            boolean isCarrierApp = mWifiInjector.makeTelephonyManager()
-                    .checkCarrierPrivilegesForPackageAnyPhone(callingPackageName)
-                    == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
-            boolean hasPermission = !isUserRestrictionSet
-                    || isCarrierApp
-                    || isPrivileged(callingPid, callingUid)
-                    || mWifiPermissionsUtil.isSystem(callingPackageName, callingUid)
-                    || mWifiPermissionsUtil.isAdmin(callingUid, callingPackageName);
-            if (!hasPermission) {
-                return WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_RESTRICTED_BY_ADMIN;
-            }
-        }
-
         if (isVerboseLoggingEnabled()) {
-            mLog.info("addNetworkSuggestions uid=%").c(callingUid).flush();
+            mLog.info("addNetworkSuggestions uid=%").c(Binder.getCallingUid()).flush();
         }
+        int callingUid = Binder.getCallingUid();
 
         int success = mWifiThreadRunner.call(() -> mWifiNetworkSuggestionsManager.add(
                 networkSuggestions, callingUid, callingPackageName, callingFeatureId),
@@ -5474,23 +4510,18 @@
      */
     @Override
     public int removeNetworkSuggestions(
-            List<WifiNetworkSuggestion> networkSuggestions, String callingPackageName,
-            @WifiManager.ActionAfterRemovingSuggestion int action) {
+            List<WifiNetworkSuggestion> networkSuggestions, String callingPackageName) {
         if (enforceChangePermission(callingPackageName) != MODE_ALLOWED) {
             return WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_APP_DISALLOWED;
         }
         if (isVerboseLoggingEnabled()) {
             mLog.info("removeNetworkSuggestions uid=%").c(Binder.getCallingUid()).flush();
         }
-        if (action != WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT
-                && action != WifiManager.ACTION_REMOVE_SUGGESTION_LINGER) {
-            return WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID;
-        }
         int callingUid = Binder.getCallingUid();
 
         int success = mWifiThreadRunner.call(() -> mWifiNetworkSuggestionsManager.remove(
-                networkSuggestions, callingUid, callingPackageName,
-                action), WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL);
+                networkSuggestions, callingUid, callingPackageName),
+                WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL);
         if (success != WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS) {
             Log.e(TAG, "Failed to remove network suggestions");
         }
@@ -5601,7 +4632,6 @@
         final int uid = getMockableCallingUid();
 
         int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
         mAppOps.checkPackage(callingUid, packageName);
         if (!isSettingsOrSuw(Binder.getCallingPid(), callingUid)) {
             throw new SecurityException(TAG + ": Permission denied");
@@ -5874,21 +4904,16 @@
      * @param config New or existing config to add/update and connect to
      * @param netId Network ID of existing config to connect to if the supplied config is null
      * @param callback Listener to notify action result
-     * @param packageName Package name of the requesting App
      *
      * see: {@link WifiManager#connect(WifiConfiguration, WifiManager.ActionListener)}
      *      {@link WifiManager#connect(int, WifiManager.ActionListener)}
      */
     @Override
-    public void connect(WifiConfiguration config, int netId, @Nullable IActionListener callback,
-            @NonNull String packageName) {
+    public void connect(WifiConfiguration config, int netId, @Nullable IActionListener callback) {
         int uid = Binder.getCallingUid();
         if (!isPrivileged(Binder.getCallingPid(), uid)) {
             throw new SecurityException(TAG + ": Permission denied");
         }
-        if (packageName == null) {
-            throw new IllegalArgumentException("packageName must not be null");
-        }
         mLog.info("connect uid=%").c(uid).flush();
         mWifiThreadRunner.post(() -> {
             ActionListenerWrapper wrapper = new ActionListenerWrapper(callback);
@@ -5902,7 +4927,7 @@
                 result = mWifiConfigManager.addOrUpdateNetwork(config, uid);
                 if (!result.isSuccess()) {
                     Log.e(TAG, "connect adding/updating config=" + config + " failed");
-                    wrapper.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+                    wrapper.sendFailure(WifiManager.ERROR);
                     return;
                 }
                 broadcastWifiCredentialChanged(WifiManager.WIFI_CREDENTIAL_SAVED, config);
@@ -5916,12 +4941,7 @@
                     .getConfiguredNetwork(result.getNetworkId());
             if (configuration == null) {
                 Log.e(TAG, "connect to Invalid network Id=" + netId);
-                wrapper.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
-                return;
-            }
-            if (mWifiPermissionsUtil.isAdminRestrictedNetwork(configuration)) {
-                Log.e(TAG, "connect to network Id=" + netId + "restricted by admin");
-                wrapper.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+                wrapper.sendFailure(WifiManager.ERROR);
                 return;
             }
             if (configuration.enterpriseConfig != null
@@ -5930,14 +4950,14 @@
                 if (!mWifiCarrierInfoManager.isSimReady(subId)) {
                     Log.e(TAG, "connect to SIM-based config=" + configuration
                             + "while SIM is absent");
-                    wrapper.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+                    wrapper.sendFailure(WifiManager.ERROR);
                     return;
                 }
                 if (mWifiCarrierInfoManager.requiresImsiEncryption(subId)
                         && !mWifiCarrierInfoManager.isImsiEncryptionInfoAvailable(subId)) {
                     Log.e(TAG, "Imsi protection required but not available for Network="
                             + configuration);
-                    wrapper.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+                    wrapper.sendFailure(WifiManager.ERROR);
                     return;
                 }
             }
@@ -5970,7 +4990,7 @@
             }
 
             mMakeBeforeBreakManager.stopAllSecondaryTransientClientModeManagers(() ->
-                    mConnectHelper.connectToNetwork(result, wrapper, uid, packageName));
+                    mConnectHelper.connectToNetwork(result, wrapper, uid));
         });
     }
 
@@ -5979,31 +4999,27 @@
      * WifiManager.ActionListener)}
      */
     @Override
-    public void save(WifiConfiguration config, @Nullable IActionListener callback,
-            @NonNull String packageName) {
+    public void save(WifiConfiguration config, @Nullable IActionListener callback) {
         int uid = Binder.getCallingUid();
         if (!isPrivileged(Binder.getCallingPid(), uid)) {
             throw new SecurityException(TAG + ": Permission denied");
         }
-        if (packageName == null) {
-            throw new IllegalArgumentException("packageName must not be null");
-        }
         mLog.info("save uid=%").c(uid).flush();
         mWifiThreadRunner.post(() -> {
             ActionListenerWrapper wrapper = new ActionListenerWrapper(callback);
             NetworkUpdateResult result =
-                    mWifiConfigManager.updateBeforeSaveNetwork(config, uid, packageName);
+                    mWifiConfigManager.updateBeforeSaveNetwork(config, uid);
             if (result.isSuccess()) {
                 broadcastWifiCredentialChanged(WifiManager.WIFI_CREDENTIAL_SAVED, config);
                 mMakeBeforeBreakManager.stopAllSecondaryTransientClientModeManagers(() ->
                         mActiveModeWarden.getPrimaryClientModeManager()
-                                .saveNetwork(result, wrapper, uid, packageName));
+                                .saveNetwork(result, wrapper, uid));
                 if (mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)) {
                     mWifiMetrics.logUserActionEvent(
                             UserActionEvent.EVENT_ADD_OR_UPDATE_NETWORK, config.networkId);
                 }
             } else {
-                wrapper.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+                wrapper.sendFailure(WifiManager.ERROR);
             }
         });
     }
@@ -6032,7 +5048,7 @@
                 broadcastWifiCredentialChanged(WifiManager.WIFI_CREDENTIAL_FORGOT, config);
             } else {
                 Log.e(TAG, "Failed to remove network");
-                wrapper.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+                wrapper.sendFailure(WifiManager.ERROR);
             }
         });
     }
@@ -6100,7 +5116,6 @@
             @NonNull ISuggestionConnectionStatusListener listener, String packageName) {
         enforceAccessPermission();
         int uid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
         if (isVerboseLoggingEnabled()) {
             mLog.info("unregisterSuggestionConnectionStatusListener uid=%")
                     .c(uid).flush();
@@ -6116,109 +5131,6 @@
     }
 
     /**
-     * See {@link WifiManager#setExternalPnoScanRequest(List, int[], Executor,
-     * WifiManager.PnoScanResultsCallback)}.
-     */
-    @Override
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void setExternalPnoScanRequest(@NonNull IBinder binder,
-            @NonNull IPnoScanResultsCallback callback,
-            @NonNull List<WifiSsid> ssids, @NonNull int[] frequencies,
-            @NonNull String packageName, @NonNull String featureId) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException("SDK level too old");
-        }
-        if (binder == null) throw new IllegalArgumentException("binder cannot be null");
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        if (ssids == null || ssids.isEmpty()) throw new IllegalStateException(
-                "Ssids can't be null or empty");
-        if (ssids.size() > 2) {
-            throw new IllegalArgumentException("Ssid list can't be greater than 2");
-        }
-        if (frequencies == null) {
-            throw new IllegalArgumentException("frequencies should not be null");
-        }
-        if (frequencies.length > 10) {
-            throw new IllegalArgumentException("Length of frequencies must be smaller than 10");
-        }
-        int uid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
-        if (!mWifiPermissionsUtil.checkRequestCompanionProfileAutomotiveProjectionPermission(uid)
-                || !mWifiPermissionsUtil.checkCallersLocationPermission(packageName, featureId,
-                uid, false, null)) {
-            throw new SecurityException(TAG + " Caller uid " + uid + " has no permission");
-        }
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("setExternalPnoScanRequest uid=%").c(uid).flush();
-        }
-        mWifiThreadRunner.post(() -> {
-            try {
-                if (!isPnoSupported()) {
-                    callback.onRegisterFailed(REGISTER_PNO_CALLBACK_PNO_NOT_SUPPORTED);
-                    return;
-                }
-                mWifiConnectivityManager.setExternalPnoScanRequest(
-                        uid, packageName, binder, callback, ssids, frequencies);
-            } catch (RemoteException e) {
-                Log.e(TAG, e.getMessage());
-            }
-        });
-    }
-
-    /**
-     * See {@link WifiManager#clearExternalPnoScanRequest()}
-     */
-    @Override
-    public void clearExternalPnoScanRequest() {
-        int uid = Binder.getCallingUid();
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("setExternalPnoScanRequest uid=%").c(uid).flush();
-        }
-        mWifiThreadRunner.post(() -> {
-            mWifiConnectivityManager.clearExternalPnoScanRequest(uid);
-        });
-    }
-
-    /**
-     * See {@link WifiManager#getLastCallerInfoForApi(int, Executor, BiConsumer)}.
-     */
-    @Override
-    public void getLastCallerInfoForApi(int apiType, @NonNull ILastCallerListener listener) {
-        if (listener == null) {
-            throw new IllegalArgumentException("listener should not be null");
-        }
-        if (apiType < WifiManager.API_SCANNING_ENABLED || apiType > WifiManager.API_MAX) {
-            throw new IllegalArgumentException("Invalid apiType " + apiType);
-        }
-        int uid = Binder.getCallingUid();
-        if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)
-                && !mWifiPermissionsUtil.checkNetworkStackPermission(uid)
-                && !mWifiPermissionsUtil.checkMainlineNetworkStackPermission(uid)) {
-            throw new SecurityException("Caller uid " + uid + " has no permission");
-        }
-
-        if (isVerboseLoggingEnabled()) {
-            Log.v(TAG, "getLastCallerInfoForApi " + Binder.getCallingUid());
-        }
-        mWifiThreadRunner.post(() -> {
-            LastCallerInfoManager.LastCallerInfo lastCallerInfo =
-                    mLastCallerInfoManager.get(apiType);
-            try {
-                if (lastCallerInfo == null) {
-                    listener.onResult(null, false);
-                    return;
-                }
-                listener.onResult(lastCallerInfo.getPackageName(), lastCallerInfo.getToggleState());
-            } catch (RemoteException e) {
-                Log.e(TAG, e.getMessage());
-            }
-        });
-    }
-
-    /**
      * See {@link android.net.wifi.WifiManager#setWifiConnectedNetworkScorer(Executor,
      * WifiManager.WifiConnectedNetworkScorer)}
      *
@@ -6352,7 +5264,6 @@
         }
         final int uid = Binder.getCallingUid();
         enforceAccessPermission();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
         long callingIdentity = Binder.clearCallingIdentity();
         try {
             if (!mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(uid)) {
@@ -6379,7 +5290,6 @@
             ISuggestionUserApprovalStatusListener listener, String packageName) {
         enforceAccessPermission();
         int uid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, packageName);
         long callingIdentity = Binder.clearCallingIdentity();
         try {
             if (!mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(uid)) {
@@ -6463,13 +5373,8 @@
     public List<WifiAvailableChannel> getUsableChannels(@WifiScanner.WifiBand int band,
             @WifiAvailableChannel.OpMode int mode, @WifiAvailableChannel.Filter int filter) {
         // Location mode must be enabled
-        long ident = Binder.clearCallingIdentity();
-        try {
-            if (!mWifiPermissionsUtil.isLocationModeEnabled()) {
-                throw new SecurityException("Location mode is disabled for the device");
-            }
-        } finally {
-            Binder.restoreCallingIdentity(ident);
+        if (!mWifiPermissionsUtil.isLocationModeEnabled()) {
+            throw new SecurityException("Location mode is disabled for the device");
         }
         final int uid = Binder.getCallingUid();
         if (isVerboseLoggingEnabled()) {
@@ -6502,330 +5407,13 @@
      */
     @Override
     public void flushPasspointAnqpCache(@NonNull String packageName) {
-        int callingUid = Binder.getCallingUid();
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
+        mWifiPermissionsUtil.checkPackage(Binder.getCallingUid(), packageName);
 
-        if (!isDeviceOrProfileOwner(callingUid, packageName)) {
+        if (!isDeviceOrProfileOwner(Binder.getCallingUid(), packageName)) {
             enforceAnyPermissionOf(android.Manifest.permission.NETWORK_SETTINGS,
                     android.Manifest.permission.NETWORK_MANAGED_PROVISIONING,
                     android.Manifest.permission.NETWORK_CARRIER_PROVISIONING);
         }
         mWifiThreadRunner.post(mPasspointManager::clearAnqpRequestsAndFlushCache);
     }
-
-    /**
-     * See {@link android.net.wifi.WifiManager#isWifiPasspointEnabled()}.
-     */
-    @Override
-    public boolean isWifiPasspointEnabled() {
-        enforceAccessPermission();
-
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("isWifiPasspointEnabled uid=%").c(Binder.getCallingUid()).flush();
-        }
-        // Post operation to handler thread
-        return mWifiThreadRunner.call(() -> mPasspointManager.isWifiPasspointEnabled(), false);
-    }
-
-    /**
-     * See {@link android.net.wifi.WifiManager#setWifiPasspointEnabled()}.
-     */
-    @Override
-    public void setWifiPasspointEnabled(boolean enabled) {
-        int uid = Binder.getCallingUid();
-        int pid = Binder.getCallingPid();
-        if (!isSettingsOrSuw(pid, uid)) {
-            throw new SecurityException(TAG + ": Permission denied");
-        }
-
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("setWifiPasspointEnabled uid=% pid=% enable=%")
-                .c(uid).c(pid).c(enabled)
-                .flush();
-        }
-
-        // Post operation to handler thread
-        mWifiThreadRunner.post(() ->
-                mPasspointManager.setWifiPasspointEnabled(enabled)
-        );
-    }
-
-    private boolean isPnoSupported() {
-        return (getSupportedFeatures() & WifiManager.WIFI_FEATURE_PNO) != 0;
-    }
-
-    /**
-     * @return true if this device supports Trust On First Use
-     */
-    private boolean isTrustOnFirstUseSupported() {
-        return (getSupportedFeatures() & WIFI_FEATURE_TRUST_ON_FIRST_USE) != 0;
-    }
-
-    /**
-     * See {@link android.net.wifi.WifiManager#getStaConcurrencyForMultiInternetMode()}.
-     */
-    @Override
-    public @WifiManager.WifiMultiInternetMode int getStaConcurrencyForMultiInternetMode() {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        enforceAccessPermission();
-
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("getStaConcurrencyForMultiInternetMode uid=%")
-                    .c(Binder.getCallingUid()).flush();
-        }
-        // Post operation to handler thread
-        return mWifiThreadRunner.call(
-                () -> mMultiInternetManager.getStaConcurrencyForMultiInternetMode(),
-                WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED);
-    }
-
-    /**
-     * See {@link android.net.wifi.WifiManager#setStaConcurrencyForMultiInternetMode()}.
-     */
-    @Override
-    public boolean setStaConcurrencyForMultiInternetMode(
-            @WifiManager.WifiMultiInternetMode int mode) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        int uid = Binder.getCallingUid();
-        int pid = Binder.getCallingPid();
-        if (!isSettingsOrSuw(pid, uid)) {
-            throw new SecurityException(TAG + ": Permission denied");
-        }
-
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("setStaConcurrencyForMultiInternetMode uid=% pid=% mode=%")
-                .c(uid).c(pid).c(mode)
-                .flush();
-        }
-        // Post operation to handler thread
-        return mWifiThreadRunner.call(() ->
-                mMultiInternetManager.setStaConcurrencyForMultiInternetMode(mode), false);
-    }
-
-    /**
-     * See {@link android.net.wifi.WifiManager#notifyMinimumRequiredWifiSecurityLevelChanged(int)}.
-     */
-    @Override
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void notifyMinimumRequiredWifiSecurityLevelChanged(int adminMinimumSecurityLevel) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        if (!Arrays.asList(DevicePolicyManager.WIFI_SECURITY_OPEN,
-                DevicePolicyManager.WIFI_SECURITY_PERSONAL,
-                DevicePolicyManager.WIFI_SECURITY_ENTERPRISE_EAP,
-                DevicePolicyManager.WIFI_SECURITY_ENTERPRISE_192)
-                .contains(adminMinimumSecurityLevel)) {
-            throw new IllegalArgumentException("Input security level is invalid");
-        }
-        if (!checkManageDeviceAdminsPermission(Binder.getCallingPid(), Binder.getCallingUid())) {
-            throw new SecurityException("Caller does not have MANAGE_DEVICE_ADMINS permission");
-        }
-        mWifiThreadRunner.post(() -> {
-            for (ClientModeManager cmm : mActiveModeWarden.getClientModeManagers()) {
-                WifiInfo wifiInfo = cmm.syncRequestConnectionInfo();
-                if (wifiInfo == null) continue;
-
-                //check minimum security level restriction
-                int currentSecurityLevel = WifiInfo.convertSecurityTypeToDpmWifiSecurity(
-                        wifiInfo.getCurrentSecurityType());
-
-                // Unknown security type is permitted when security type restriction is not set
-                if (adminMinimumSecurityLevel == DevicePolicyManager.WIFI_SECURITY_OPEN
-                        && currentSecurityLevel == WifiInfo.DPM_SECURITY_TYPE_UNKNOWN) {
-                    continue;
-                }
-                if (adminMinimumSecurityLevel > currentSecurityLevel) {
-                    cmm.disconnect();
-                    mLog.info("disconnect admin restricted network").flush();
-                    continue;
-                }
-            }
-        });
-    }
-
-    /**
-     * See {@link android.net.wifi.WifiManager#notifyWifiSsidPolicyChanged(WifiSsidPolicy)}.
-     */
-    @Override
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void notifyWifiSsidPolicyChanged(int policyType, List<WifiSsid> ssids) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException();
-        }
-        if (ssids == null) {
-            throw new IllegalArgumentException("SSID list may not be null");
-        }
-        if (!checkManageDeviceAdminsPermission(Binder.getCallingPid(), Binder.getCallingUid())) {
-            throw new SecurityException("Caller does not have MANAGE_DEVICE_ADMINS permission");
-        }
-        mWifiThreadRunner.post(() -> {
-            for (ClientModeManager cmm : mActiveModeWarden.getClientModeManagers()) {
-                WifiInfo wifiInfo = cmm.syncRequestConnectionInfo();
-                if (wifiInfo == null) continue;
-
-                //skip SSID restriction check for Osu and Passpoint networks
-                if (wifiInfo.isOsuAp() || wifiInfo.isPasspointAp()) continue;
-
-                WifiSsid ssid = wifiInfo.getWifiSsid();
-
-                if (policyType == WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_ALLOWLIST
-                        && !ssids.contains(ssid)) {
-                    cmm.disconnect();
-                    mLog.info("disconnect admin restricted network").flush();
-                    continue;
-                }
-                if (policyType == WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_DENYLIST
-                        && ssids.contains(ssid)) {
-                    cmm.disconnect();
-                    mLog.info("disconnect admin restricted network").flush();
-                    continue;
-                }
-            }
-        });
-    }
-
-    /**
-     * See {@link WifiManager#replyToSimpleDialog(int, int)}
-     */
-    public void replyToSimpleDialog(int dialogId, @WifiManager.DialogReply int reply) {
-        int uid = Binder.getCallingUid();
-        int pid = Binder.getCallingPid();
-        mWifiPermissionsUtil.checkPackage(uid, mContext.getWifiDialogApkPkgName());
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("replyToSimpleDialog uid=% pid=%"
-                            + " dialogId=% reply=%")
-                    .c(uid).c(pid).c(dialogId).c(reply)
-                    .flush();
-        }
-        mWifiThreadRunner.post(() ->
-                mWifiDialogManager.replyToSimpleDialog(dialogId, reply));
-    }
-
-    /**
-     * See {@link WifiManager#replyToP2pInvitationReceivedDialog(int, boolean, String)}
-     */
-    @Override
-    public void replyToP2pInvitationReceivedDialog(
-            int dialogId, boolean accepted, @Nullable String optionalPin) {
-        int uid = Binder.getCallingUid();
-        int pid = Binder.getCallingPid();
-        mWifiPermissionsUtil.checkPackage(uid, mContext.getWifiDialogApkPkgName());
-        if (isVerboseLoggingEnabled()) {
-            mLog.info("replyToP2pInvitationReceivedDialog uid=% pid=%"
-                            + " dialogId=% accepted=% optionalPin=%")
-                    .c(uid).c(pid).c(dialogId).c(accepted).c(optionalPin)
-                    .flush();
-        }
-        mWifiThreadRunner.post(() ->
-                mWifiDialogManager.replyToP2pInvitationReceivedDialog(
-                        dialogId, accepted, optionalPin)
-        );
-    }
-
-    /**
-     * See {@link android.net.wifi.WifiManager#addCustomDhcpOptions}.
-     */
-    @Override
-    public void addCustomDhcpOptions(@NonNull WifiSsid ssid, @NonNull byte[] oui,
-            @NonNull List<DhcpOption> options) {
-        enforceAnyPermissionOf(android.Manifest.permission.NETWORK_SETTINGS,
-                android.Manifest.permission.OVERRIDE_WIFI_CONFIG);
-        mWifiThreadRunner.post(() -> mWifiConfigManager.addCustomDhcpOptions(ssid, oui, options));
-    }
-
-    /**
-     * See {@link android.net.wifi.WifiManager#removeCustomDhcpOptions}.
-     */
-    @Override
-    public void removeCustomDhcpOptions(@NonNull WifiSsid ssid, @NonNull byte[] oui) {
-        enforceAnyPermissionOf(android.Manifest.permission.NETWORK_SETTINGS,
-                android.Manifest.permission.OVERRIDE_WIFI_CONFIG);
-        mWifiThreadRunner.post(() -> mWifiConfigManager.removeCustomDhcpOptions(ssid, oui));
-    }
-
-    /**
-     * See {@link android.net.wifi.WifiManager#getOemPrivilegedWifiAdminPackages
-     */
-    @Override
-    public String[] getOemPrivilegedWifiAdminPackages() {
-        return mContext.getResources()
-                .getStringArray(R.array.config_oemPrivilegedWifiAdminPackages);
-    }
-
-    /**
-     * See {@link WifiManager#reportImpactToCreateIfaceRequest(int, boolean, Executor, BiConsumer)}.
-     */
-    @Override
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public void reportCreateInterfaceImpact(String packageName, int interfaceType,
-            boolean requireNewInterface, IInterfaceCreationInfoCallback callback) {
-        if (!SdkLevel.isAtLeastT()) {
-            throw new UnsupportedOperationException("SDK level too old");
-        }
-
-        final SparseIntArray hdmIfaceToWifiIfaceMap = new SparseIntArray() {{
-                put(HDM_CREATE_IFACE_STA, WIFI_INTERFACE_TYPE_STA);
-                put(HDM_CREATE_IFACE_AP, WIFI_INTERFACE_TYPE_AP);
-                put(HDM_CREATE_IFACE_AP_BRIDGE, WIFI_INTERFACE_TYPE_AP);
-                put(HDM_CREATE_IFACE_P2P, WIFI_INTERFACE_TYPE_DIRECT);
-                put(HDM_CREATE_IFACE_NAN, WIFI_INTERFACE_TYPE_AWARE);
-            }};
-        final SparseIntArray wifiIfaceToHdmIfaceMap = new SparseIntArray() {{
-                put(WIFI_INTERFACE_TYPE_STA, HDM_CREATE_IFACE_STA);
-                put(WIFI_INTERFACE_TYPE_AP, HDM_CREATE_IFACE_AP);
-                put(WIFI_INTERFACE_TYPE_AWARE, HDM_CREATE_IFACE_NAN);
-                put(WIFI_INTERFACE_TYPE_DIRECT, HDM_CREATE_IFACE_P2P);
-            }};
-
-        if (packageName == null) throw new IllegalArgumentException("Null packageName");
-        if (callback == null) throw new IllegalArgumentException("Null callback");
-        if (interfaceType != WIFI_INTERFACE_TYPE_STA && interfaceType != WIFI_INTERFACE_TYPE_AP
-                && interfaceType != WIFI_INTERFACE_TYPE_AWARE
-                && interfaceType != WIFI_INTERFACE_TYPE_DIRECT) {
-            throw new IllegalArgumentException("Invalid interfaceType");
-        }
-        enforceAccessPermission();
-        int callingUid = getMockableCallingUid();
-        if (!mWifiPermissionsUtil.checkManageWifiInterfacesPermission(callingUid)) {
-            throw new SecurityException(
-                    TAG + " Uid " + callingUid + " Missing MANAGE_WIFI_INTERFACES permission");
-        }
-        mWifiPermissionsUtil.checkPackage(callingUid, packageName);
-        mWifiThreadRunner.post(() -> {
-            List<Pair<Integer, WorkSource>> details =
-                    mHalDeviceManager.reportImpactToCreateIface(
-                            wifiIfaceToHdmIfaceMap.get(interfaceType), requireNewInterface,
-                            new WorkSource(callingUid, packageName));
-            try {
-                if (details == null) {
-                    callback.onResults(false, null, null);
-                } else {
-                    int[] interfaces = new int[details.size()];
-                    String[] packagesForInterfaces = new String[details.size()];
-                    int i = 0;
-                    for (Pair<Integer, WorkSource> detail: details) {
-                        interfaces[i] = hdmIfaceToWifiIfaceMap.get(detail.first);
-                        StringBuilder packages = new StringBuilder();
-                        for (int j = 0; j < detail.second.size(); ++j) {
-                            if (j != 0) packages.append(",");
-                            packages.append(detail.second.getPackageName(j));
-                            mContext.getPackageManager().makeUidVisible(callingUid,
-                                    detail.second.getUid(j));
-                        }
-                        packagesForInterfaces[i] = packages.toString();
-                        ++i;
-                    }
-                    callback.onResults(true, interfaces, packagesForInterfaces);
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG,
-                        "Failed calling back with results of isItPossibleToCreateInterface - " + e);
-            }
-        });
-    }
 }
diff --git a/service/java/com/android/server/wifi/WifiSettingsConfigStore.java b/service/java/com/android/server/wifi/WifiSettingsConfigStore.java
index 6c4c658..23d7f6c 100644
--- a/service/java/com/android/server/wifi/WifiSettingsConfigStore.java
+++ b/service/java/com/android/server/wifi/WifiSettingsConfigStore.java
@@ -19,7 +19,6 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.content.Context;
-import android.net.wifi.WifiManager;
 import android.net.wifi.WifiMigration;
 import android.os.Handler;
 import android.text.TextUtils;
@@ -90,19 +89,6 @@
             new Key<>("wifi_scoring_enabled", true);
 
     /**
-     * Whether Wifi Passpoint is enabled or not.
-     */
-    public static final Key<Boolean> WIFI_PASSPOINT_ENABLED =
-            new Key<>("wifi_passpoint_enabled", true);
-
-    /**
-     * Whether Wifi Multi Internet is enabled for multi ap, dbs or disabled.
-     */
-    public static final Key<Integer> WIFI_MULTI_INTERNET_MODE =
-            new Key<Integer>("wifi_multi_internet_mode",
-                    WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED);
-
-    /**
      * Store the STA factory MAC address retrieved from the driver on the first bootup.
      */
     public static final Key<String> WIFI_STA_FACTORY_MAC_ADDRESS =
@@ -114,17 +100,6 @@
     public static final Key<String> WIFI_DEFAULT_COUNTRY_CODE =
             new Key<>("wifi_default_country_code", WifiCountryCode.getOemDefaultCountryCode());
 
-    /**
-     * Store the supported features retrieved from WiFi HAL and Supplicant HAL
-     */
-    public static final Key<Long> WIFI_NATIVE_SUPPORTED_FEATURES =
-            new Key<>("wifi_native_supported_features", 0L);
-
-    /**
-     * Store the static chip info retrieved from WiFi HAL
-     */
-    public static final Key<String> WIFI_STATIC_CHIP_INFO = new Key<>("wifi_static_chip_info", "");
-
     /******** Wifi shared pref keys ***************/
 
     private final Context mContext;
diff --git a/service/java/com/android/server/wifi/WifiSettingsStore.java b/service/java/com/android/server/wifi/WifiSettingsStore.java
index 38b82a3..39fff7e 100644
--- a/service/java/com/android/server/wifi/WifiSettingsStore.java
+++ b/service/java/com/android/server/wifi/WifiSettingsStore.java
@@ -50,8 +50,11 @@
     }
 
     public synchronized boolean isWifiToggleEnabled() {
-        return mPersistWifiState == WIFI_ENABLED
-                || mPersistWifiState == WIFI_ENABLED_AIRPLANE_OVERRIDE;
+        if (mAirplaneModeOn) {
+            return mPersistWifiState == WIFI_ENABLED_AIRPLANE_OVERRIDE;
+        } else {
+            return mPersistWifiState != WIFI_DISABLED;
+        }
     }
 
     /**
@@ -74,14 +77,6 @@
         return getPersistedWifiScoringEnabled();
     }
 
-    public synchronized boolean isWifiPasspointEnabled() {
-        return getPersistedWifiPasspointEnabled();
-    }
-
-    public synchronized int getWifiMultiInternetMode() {
-        return getPersistedWifiMultiInternetMode();
-    }
-
     public synchronized boolean handleWifiToggled(boolean wifiEnabled) {
         // Can Wi-Fi be toggled in airplane mode ?
         if (mAirplaneModeOn && !isAirplaneToggleable()) {
@@ -104,17 +99,13 @@
         return true;
     }
 
-    synchronized boolean updateAirplaneModeTracker() {
+    synchronized boolean handleAirplaneModeToggled() {
         // Is Wi-Fi sensitive to airplane mode changes ?
         if (!isAirplaneSensitive()) {
             return false;
         }
 
         mAirplaneModeOn = getPersistedAirplaneModeOn();
-        return true;
-    }
-
-    synchronized void handleAirplaneModeToggled() {
         if (mAirplaneModeOn) {
             // Wifi disabled due to airplane on
             if (mPersistWifiState == WIFI_ENABLED) {
@@ -127,6 +118,7 @@
                 persistWifiState(WIFI_ENABLED);
             }
         }
+        return true;
     }
 
     synchronized void handleWifiScanAlwaysAvailableToggled(boolean isAvailable) {
@@ -138,27 +130,11 @@
         return true;
     }
 
-    /**
-     * Handle the Wifi Passpoint enable/disable status change.
-     */
-    public synchronized void handleWifiPasspointEnabled(boolean enabled) {
-        persistWifiPasspointEnabledState(enabled);
-    }
-
-    /**
-     * Handle the Wifi Multi Internet state change.
-     */
-    public synchronized void handleWifiMultiInternetMode(int mode) {
-        persistWifiMultiInternetMode(mode);
-    }
-
     void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.println("WifiState " + getPersistedWifiState());
         pw.println("AirplaneModeOn " + getPersistedAirplaneModeOn());
         pw.println("ScanAlwaysAvailable " + getPersistedScanAlwaysAvailable());
         pw.println("WifiScoringState " + getPersistedWifiScoringEnabled());
-        pw.println("WifiPasspointState " + getPersistedWifiPasspointEnabled());
-        pw.println("WifiMultiInternetMode " + getPersistedWifiMultiInternetMode());
     }
 
     private void persistWifiState(int state) {
@@ -177,16 +153,6 @@
                 WifiSettingsConfigStore.WIFI_SCORING_ENABLED, enabled);
     }
 
-    private void persistWifiPasspointEnabledState(boolean enabled) {
-        mSettingsConfigStore.put(
-                WifiSettingsConfigStore.WIFI_PASSPOINT_ENABLED, enabled);
-    }
-
-    private void persistWifiMultiInternetMode(int mode) {
-        mSettingsConfigStore.put(
-                WifiSettingsConfigStore.WIFI_MULTI_INTERNET_MODE, mode);
-    }
-
     /* Does Wi-Fi need to be disabled when airplane mode is on ? */
     private boolean isAirplaneSensitive() {
         String airplaneModeRadios = Settings.Global.getString(mContext.getContentResolver(),
@@ -227,14 +193,4 @@
         return mSettingsConfigStore.get(
                 WifiSettingsConfigStore.WIFI_SCORING_ENABLED);
     }
-
-    private boolean getPersistedWifiPasspointEnabled() {
-        return mSettingsConfigStore.get(
-                WifiSettingsConfigStore.WIFI_PASSPOINT_ENABLED);
-    }
-
-    private int getPersistedWifiMultiInternetMode() {
-        return mSettingsConfigStore.get(
-                WifiSettingsConfigStore.WIFI_MULTI_INTERNET_MODE);
-    }
 }
diff --git a/service/java/com/android/server/wifi/WifiShellCommand.java b/service/java/com/android/server/wifi/WifiShellCommand.java
index 367979f..425269b 100644
--- a/service/java/com/android/server/wifi/WifiShellCommand.java
+++ b/service/java/com/android/server/wifi/WifiShellCommand.java
@@ -22,33 +22,21 @@
 import static android.net.NetworkCapabilities.NET_CAPABILITY_TRUSTED;
 import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
 import static android.net.wifi.WifiConfiguration.METERED_OVERRIDE_METERED;
-import static android.net.wifi.WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT;
-import static android.net.wifi.WifiManager.ACTION_REMOVE_SUGGESTION_LINGER;
-import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.REQUEST_REGISTERED;
 import static android.net.wifi.WifiManager.WIFI_STATE_DISABLED;
 import static android.net.wifi.WifiManager.WIFI_STATE_ENABLED;
 
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP_BRIDGE;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_NAN;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_P2P;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_STA;
 import static com.android.server.wifi.SelfRecovery.REASON_API_CALL;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.hardware.display.DisplayManager;
 import android.net.ConnectivityManager;
 import android.net.MacAddress;
 import android.net.Network;
 import android.net.NetworkCapabilities;
 import android.net.NetworkRequest;
 import android.net.wifi.IActionListener;
-import android.net.wifi.IDppCallback;
-import android.net.wifi.ILocalOnlyHotspotCallback;
-import android.net.wifi.IPnoScanResultsCallback;
 import android.net.wifi.IScoreUpdateObserver;
 import android.net.wifi.ISoftApCallback;
 import android.net.wifi.IWifiConnectedNetworkScorer;
@@ -60,35 +48,24 @@
 import android.net.wifi.WifiClient;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiConnectedSessionInfo;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiNetworkSpecifier;
 import android.net.wifi.WifiNetworkSuggestion;
 import android.net.wifi.WifiScanner;
 import android.net.wifi.WifiSsid;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.Binder;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.PatternMatcher;
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.SystemClock;
-import android.os.WorkSource;
 import android.telephony.Annotation;
 import android.telephony.PhysicalChannelConfig;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
-import android.util.Log;
 import android.util.Pair;
-import android.util.SparseArray;
-import android.view.Display;
 
 import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.RequiresApi;
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.modules.utils.BasicShellCommandHandler;
@@ -100,8 +77,7 @@
 import com.android.server.wifi.hotspot2.NetworkDetail;
 import com.android.server.wifi.util.ApConfigUtil;
 import com.android.server.wifi.util.ArrayUtils;
-
-import libcore.util.HexEncoding;
+import com.android.server.wifi.util.ScanResultUtil;
 
 import java.io.PrintWriter;
 import java.nio.charset.StandardCharsets;
@@ -138,6 +114,8 @@
     // However, these do perform permission checks in the corresponding WifiService methods.
     private static final String[] NON_PRIVILEGED_COMMANDS = {
             "add-suggestion",
+            "add-network",
+            "connect-network",
             "forget-network",
             "get-country-code",
             "help",
@@ -153,17 +131,10 @@
             "set-scan-always-available",
             "set-verbose-logging",
             "set-wifi-enabled",
-            "set-passpoint-enabled",
-            "set-multi-internet-state",
             "start-scan",
             "start-softap",
             "status",
             "stop-softap",
-            "query-interface",
-            "interface-priority-interactive-mode",
-            "set-one-shot-screen-on-delay-ms",
-            "set-ipreach-disconnect",
-            "get-ipreach-disconnect",
     };
 
     private static final Map<String, Pair<NetworkRequest, ConnectivityManager.NetworkCallback>>
@@ -188,166 +159,6 @@
     private final WifiApConfigStore mWifiApConfigStore;
     private int mSapState = WifiManager.WIFI_STATE_UNKNOWN;
     private final ScanRequestProxy mScanRequestProxy;
-    private final @NonNull WifiDialogManager mWifiDialogManager;
-    private final HalDeviceManager mHalDeviceManager;
-    private final InterfaceConflictManager mInterfaceConflictManager;
-
-    private class SoftApCallbackProxy extends ISoftApCallback.Stub {
-        private final PrintWriter mPrintWriter;
-        private final CountDownLatch mCountDownLatch;
-
-        SoftApCallbackProxy(PrintWriter printWriter, CountDownLatch countDownLatch) {
-            mPrintWriter = printWriter;
-            mCountDownLatch = countDownLatch;
-        }
-
-        @Override
-        public void onStateChanged(int state, int failureReason) {
-            mPrintWriter.println("onStateChanged with state: " + state
-                    + " failure reason: " + failureReason);
-            mSapState = state;
-            if (state == WifiManager.WIFI_AP_STATE_ENABLED) {
-                mPrintWriter.println(" SAP is enabled successfully");
-                // Skip countDown() and wait for onInfoChanged() which has
-                // the confirmed softAp channel information
-            } else if (state == WifiManager.WIFI_AP_STATE_DISABLED) {
-                mPrintWriter.println(" SAP is disabled");
-            } else if (state == WifiManager.WIFI_AP_STATE_FAILED) {
-                mPrintWriter.println(" SAP failed to start");
-                mCountDownLatch.countDown();
-            }
-        }
-
-        @Override
-        public void onConnectedClientsOrInfoChanged(Map<String, SoftApInfo> infos,
-                Map<String, List<WifiClient>> clients, boolean isBridged,
-                boolean isRegistration) {
-            mPrintWriter.println("onConnectedClientsOrInfoChanged, infos: " + infos
-                    + ", clients: " + clients + ", isBridged: " + isBridged);
-            if (mSapState == WifiManager.WIFI_AP_STATE_ENABLED && infos.size() != 0) {
-                mCountDownLatch.countDown();
-            }
-        }
-
-        @Override
-        public void onCapabilityChanged(SoftApCapability capability) {
-            mPrintWriter.println("onCapabilityChanged " + capability);
-        }
-
-        @Override
-        public void onBlockedClientConnecting(WifiClient client, int reason) {
-        }
-    }
-
-    /**
-     * Used for shell command testing of DPP feature.
-     */
-    public static class DppCallbackProxy extends IDppCallback.Stub {
-        private final PrintWriter mPrintWriter;
-        private final CountDownLatch mCountDownLatch;
-        private static final int STATUS_SUCCESS = 0;
-        private static final int STATUS_PROGRESS = 1;
-        private static final int STATUS_FAILURE = 2;
-
-        DppCallbackProxy(PrintWriter printWriter, CountDownLatch countDownLatch) {
-            mPrintWriter = printWriter;
-            mCountDownLatch = countDownLatch;
-        }
-
-        @Override
-        public void onSuccessConfigReceived(int networkId) {
-            mPrintWriter.println("onSuccessConfigReceived. netId=" + networkId);
-            mCountDownLatch.countDown();
-        }
-
-        @Override
-        public void onSuccess(int status) {
-            mPrintWriter.println("onSuccess status=" + statusToString(STATUS_SUCCESS, status));
-            mCountDownLatch.countDown();
-        }
-
-        @Override
-        public void onFailure(int status, String ssid, String channelList, int[] bandArray) {
-            mPrintWriter.println("onFailure. status=" + statusToString(STATUS_FAILURE, status)
-                    + "ssid=" + ssid + "channelList=" + channelList);
-            mCountDownLatch.countDown();
-        }
-
-        @Override
-        public void onProgress(int status) {
-            mPrintWriter.println("onProgress status=" + statusToString(STATUS_PROGRESS, status));
-        }
-
-        @Override
-        public void onBootstrapUriGenerated(String uri) {
-            mPrintWriter.println("onBootstrapUriGenerated URI = " + uri);
-        }
-
-        private String statusToString(int type, int status) {
-            switch (type) {
-                case STATUS_SUCCESS: {
-                    switch (status) {
-                        case 0:
-                            return "CONFIGURATION_SENT";
-                        case 1:
-                            return "CONFIGURATION_APPLIED";
-                        default:
-                            return "Unknown success code";
-                    }
-                }
-                case STATUS_PROGRESS: {
-                    switch (status) {
-                        case 0:
-                            return "AUTHENTICATION_SUCCESS";
-                        case 1:
-                            return "RESPONSE_PENDING";
-                        case 2:
-                            return "CONFIGURATION_SENT_WAITING_RESPONSE";
-                        case 3:
-                            return "CONFIGURATION_ACCEPTED";
-                        default:
-                            return "Unknown progress code";
-                    }
-                }
-                case STATUS_FAILURE: {
-                    switch (status) {
-                        case -1:
-                            return "INVALID_URI";
-                        case -2:
-                            return "AUTHENTICATION";
-                        case -3:
-                            return "NOT_COMPATIBLE";
-                        case -4:
-                            return "CONFIGURATION";
-                        case -5:
-                            return "BUSY";
-                        case -6:
-                            return "TIMEOUT";
-                        case -7:
-                            return "GENERIC";
-                        case -8:
-                            return "NOT_SUPPORTED";
-                        case -9:
-                            return "INVALID_NETWORK";
-                        case -10:
-                            return "CANNOT_FIND_NETWORK";
-                        case -11:
-                            return "ENROLLEE_AUTHENTICATION";
-                        case -12:
-                            return "ENROLLEE_REJECTED_CONFIGURATION";
-                        case -13:
-                            return "URI_GENERATION";
-                        case -14:
-                            return "ENROLLEE_FAILED_TO_SCAN_NETWORK_CHANNEL";
-                        default:
-                            return "Unknown failure code";
-                    }
-                }
-                default :
-                    return "Unknown status type";
-            }
-        }
-    }
 
     /**
      * Used for shell command testing of scorer.
@@ -408,15 +219,12 @@
         mSelfRecovery = wifiInjector.getSelfRecovery();
         mWifiApConfigStore = wifiInjector.getWifiApConfigStore();
         mScanRequestProxy = wifiInjector.getScanRequestProxy();
-        mWifiDialogManager = wifiInjector.getWifiDialogManager();
-        mHalDeviceManager = wifiInjector.getHalDeviceManager();
-        mInterfaceConflictManager = wifiInjector.getInterfaceConflictManager();
     }
 
     @Override
     public int onCommand(String cmd) {
         // Treat no command as help command.
-        if (TextUtils.isEmpty(cmd)) {
+        if (cmd == null || cmd.equals("")) {
             cmd = "help";
         }
         // Explicit exclusion from root permission
@@ -428,6 +236,7 @@
                                 + "(or such command doesn't exist)");
             }
         }
+
         final PrintWriter pw = getOutPrintWriter();
         try {
             switch (cmd) {
@@ -624,122 +433,55 @@
                         return 0;
                     }
                 }
-                case "set-pno-request": {
-                    if (!SdkLevel.isAtLeastT()) {
-                        pw.println("This feature is only supported on SdkLevel T or later.");
-                        return -1;
-                    }
-                    String ssid = getNextArgRequired();
-                    int frequency = -1;
-                    WifiSsid wifiSsid = WifiSsid.fromString("\"" + ssid + "\"");
-                    String option = getNextOption();
-                    if (option != null) {
-                        if (option.equals("-f")) {
-                            frequency = Integer.parseInt(getNextArgRequired());
-                        } else {
-                            pw.println("Invalid argument to 'set-pno-request' "
-                                    + "- only allowed option is '-f'");
-                            return -1;
-                        }
-                    }
-                    int[] frequencies = frequency == -1 ? new int[0] : new int[] {frequency};
-                    IPnoScanResultsCallback.Stub callback = new IPnoScanResultsCallback.Stub() {
-                        @Override
-                        public void onScanResultsAvailable(List<ScanResult> scanResults) {
-                            Log.v(TAG, "PNO scan results available:");
-                            for (ScanResult result : scanResults) {
-                                Log.v(TAG, result.getWifiSsid().toString());
-                            }
-                        }
-                        @Override
-                        public void onRegisterSuccess() {
-                            Log.v(TAG, "PNO scan request register success");
-                        }
-
-                        @Override
-                        public void onRegisterFailed(int reason) {
-                            Log.v(TAG, "PNO scan request register failed reason=" + reason);
-                        }
-
-                        @Override
-                        public void onRemoved(int reason) {
-                            Log.v(TAG, "PNO scan request callback removed reason=" + reason);
-                        }
-                    };
-                    pw.println("requesting PNO scan for: " + wifiSsid);
-                    mWifiService.setExternalPnoScanRequest(new Binder(), callback,
-                            Arrays.asList(wifiSsid), frequencies, mContext.getOpPackageName(),
-                            mContext.getAttributionTag());
-                    return 0;
-                }
-                case "clear-pno-request": {
-                    if (!SdkLevel.isAtLeastT()) {
-                        pw.println("This feature is only supported on SdkLevel T or later.");
-                        return -1;
-                    }
-                    mWifiService.clearExternalPnoScanRequest();
-                    return 0;
-                }
-                case "start-lohs": {
-                    CountDownLatch countDownLatch = new CountDownLatch(2);
-                    SoftApConfiguration config = buildSoftApConfiguration(pw);
-                    ILocalOnlyHotspotCallback.Stub lohsCallback =
-                            new ILocalOnlyHotspotCallback.Stub() {
-                        @Override
-                        public void onHotspotStarted(SoftApConfiguration config) {
-                            pw.println("Lohs onStarted, config = " + config);
-                            countDownLatch.countDown();
-                        }
-
-                        @Override
-                        public void onHotspotStopped() {
-                            pw.println("Lohs onStopped");
-                            countDownLatch.countDown();
-                        }
-
-                        @Override
-                        public void onHotspotFailed(int reason) {
-                            pw.println("Lohs onFailed: " + reason);
-                            countDownLatch.countDown();
-                        }
-                    };
-                    SoftApCallbackProxy softApCallback =
-                            new SoftApCallbackProxy(pw, countDownLatch);
-                    Bundle extras = new Bundle();
-                    if (SdkLevel.isAtLeastS()) {
-                        extras.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                                mContext.getAttributionSource());
-                    }
-                    mWifiService.registerLocalOnlyHotspotSoftApCallback(softApCallback, extras);
-                    if (REQUEST_REGISTERED != mWifiService.startLocalOnlyHotspot(
-                              lohsCallback, SHELL_PACKAGE_NAME, null /* featureId */,
-                              config, extras)) {
-                        pw.println("Lohs failed to start. Please check config parameters");
-                    }
-                    // Wait for lohs to start and complete callback
-                    countDownLatch.await(10000, TimeUnit.MILLISECONDS);
-                    mWifiService.unregisterLocalOnlyHotspotSoftApCallback(softApCallback, extras);
-                    return 0;
-                }
                 case "start-softap": {
                     CountDownLatch countDownLatch = new CountDownLatch(1);
-                    SoftApConfiguration config = buildSoftApConfiguration(pw);
-                    SoftApCallbackProxy softApCallback =
-                            new SoftApCallbackProxy(pw, countDownLatch);
+                    ISoftApCallback.Stub softApCallback = new ISoftApCallback.Stub() {
+                        @Override
+                        public void onStateChanged(int state, int failureReason) {
+                            pw.println("onStateChanged with state: " + state
+                                    + " failure reason: " + failureReason);
+                            mSapState = state;
+                            if (state == WifiManager.WIFI_AP_STATE_ENABLED) {
+                                pw.println(" SAP is enabled successfully");
+                                // Skip countDown() and wait for onInfoChanged() which has
+                                // the confirmed softAp channel information
+                            } else if (state == WifiManager.WIFI_AP_STATE_DISABLED) {
+                                pw.println(" SAP is disabled");
+                            } else if (state == WifiManager.WIFI_AP_STATE_FAILED) {
+                                pw.println(" SAP failed to start");
+                                countDownLatch.countDown();
+                            }
+                        }
+
+                        @Override
+                        public void onConnectedClientsOrInfoChanged(Map<String, SoftApInfo> infos,
+                                Map<String, List<WifiClient>> clients, boolean isBridged,
+                                boolean isRegistration) {
+                            if (mSapState == WifiManager.WIFI_AP_STATE_ENABLED) {
+                                countDownLatch.countDown();
+                            }
+                        }
+
+                        @Override
+                        public void onCapabilityChanged(SoftApCapability capability) {
+                            pw.println("onCapabilityChanged " + capability);
+                        }
+
+                        @Override
+                        public void onBlockedClientConnecting(WifiClient client, int reason) {
+                        }
+
+                    };
                     mWifiService.registerSoftApCallback(softApCallback);
+                    SoftApConfiguration config = buildSoftApConfiguration(pw);
                     if (!mWifiService.startTetheredHotspot(config, SHELL_PACKAGE_NAME)) {
                         pw.println("Soft AP failed to start. Please check config parameters");
                     }
                     // Wait for softap to start and complete callback
-                    countDownLatch.await(10000, TimeUnit.MILLISECONDS);
+                    countDownLatch.await(3000, TimeUnit.MILLISECONDS);
                     mWifiService.unregisterSoftApCallback(softApCallback);
                     return 0;
                 }
-                case "stop-lohs": {
-                    mWifiService.stopLocalOnlyHotspot();
-                    pw.println("Lohs stopped successfully");
-                    return 0;
-                }
                 case "stop-softap": {
                     if (mWifiService.stopSoftAp()) {
                         pw.println("Soft AP stopped successfully");
@@ -789,16 +531,6 @@
                     mWifiService.setWifiEnabled(SHELL_PACKAGE_NAME, enabled);
                     return 0;
                 }
-                case "set-passpoint-enabled": {
-                    boolean enabled = getNextArgRequiredTrueOrFalse("enabled", "disabled");
-                    mWifiService.setWifiPasspointEnabled(enabled);
-                    return 0;
-                }
-                case "set-multi-internet-mode": {
-                    int mode = Integer.parseInt(getNextArgRequired());
-                    mWifiService.setStaConcurrencyForMultiInternetMode(mode);
-                    return 0;
-                }
                 case "set-scan-always-available": {
                     boolean enabled = getNextArgRequiredTrueOrFalse("enabled", "disabled");
                     mWifiService.setScanAlwaysAvailable(enabled, SHELL_PACKAGE_NAME);
@@ -876,7 +608,7 @@
                         }
                     };
                     WifiConfiguration config = buildWifiConfiguration(pw);
-                    mWifiService.connect(config, -1, actionListener, SHELL_PACKAGE_NAME);
+                    mWifiService.connect(config, -1, actionListener);
                     // wait for status.
                     countDownLatch.await(500, TimeUnit.MILLISECONDS);
                     setAutoJoin(pw, config.SSID, config.allowAutojoin);
@@ -898,7 +630,7 @@
                         }
                     };
                     WifiConfiguration config = buildWifiConfiguration(pw);
-                    mWifiService.save(config, actionListener, SHELL_PACKAGE_NAME);
+                    mWifiService.save(config, actionListener);
                     // wait for status.
                     countDownLatch.await(500, TimeUnit.MILLISECONDS);
                     setAutoJoin(pw, config.SSID, config.allowAutojoin);
@@ -1008,11 +740,6 @@
                 }
                 case "remove-suggestion": {
                     String ssid = getNextArgRequired();
-                    String action = getNextArg();
-                    int actionCode = ACTION_REMOVE_SUGGESTION_DISCONNECT;
-                    if (action != null && action.equals("lingering")) {
-                        actionCode = ACTION_REMOVE_SUGGESTION_LINGER;
-                    }
                     List<WifiNetworkSuggestion> suggestions =
                             mWifiService.getNetworkSuggestions(SHELL_PACKAGE_NAME);
                     WifiNetworkSuggestion suggestion = suggestions.stream()
@@ -1024,7 +751,7 @@
                         return -1;
                     }
                     mWifiService.removeNetworkSuggestions(
-                            Arrays.asList(suggestion), SHELL_PACKAGE_NAME, actionCode);
+                            Arrays.asList(suggestion), SHELL_PACKAGE_NAME);
                     // untrusted/oem-paid networks need a corresponding NetworkRequest.
                     if (suggestion.isUntrusted()
                             || (SdkLevel.isAtLeastS()
@@ -1042,8 +769,7 @@
                 }
                 case "remove-all-suggestions":
                     mWifiService.removeNetworkSuggestions(
-                            Collections.emptyList(), SHELL_PACKAGE_NAME,
-                            WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT);
+                            Collections.emptyList(), SHELL_PACKAGE_NAME);
                     return 0;
                 case "list-suggestions": {
                     List<WifiNetworkSuggestion> suggestions =
@@ -1065,13 +791,12 @@
                     return 0;
                 }
                 case "add-request": {
-                    Pair<String, NetworkRequest> result = buildNetworkRequest(pw);
-                    String ssid = result.first;
-                    NetworkRequest networkRequest = result.second;
+                    NetworkRequest networkRequest = buildNetworkRequest(pw);
                     ConnectivityManager.NetworkCallback networkCallback =
                             new ConnectivityManager.NetworkCallback();
                     pw.println("Adding request: " + networkRequest);
                     mConnectivityManager.requestNetwork(networkRequest, networkCallback);
+                    String ssid = getAllArgs()[1];
                     sActiveRequests.put(ssid, Pair.create(networkRequest, networkCallback));
                     return 0;
                 }
@@ -1210,11 +935,7 @@
                     return 0;
                 }
                 case "add-fake-scan": {
-                    String option = getNextOption();
-                    boolean isHex = (option != null && option.equals("-x"));
-                    WifiSsid wifiSsid = WifiSsid.fromBytes(isHex
-                            ? HexEncoding.decode(getNextArgRequired())
-                            : getNextArgRequired().getBytes(StandardCharsets.UTF_8));
+                    String ssid = getNextArgRequired();
                     String bssid = getNextArgRequired();
                     String capabilities = getNextArgRequired();
                     int frequency;
@@ -1244,11 +965,11 @@
                     ScanResult.InformationElement ieSSid = new ScanResult.InformationElement(
                             ScanResult.InformationElement.EID_SSID,
                             0,
-                            wifiSsid.getBytes());
+                            ssid.getBytes(StandardCharsets.UTF_8));
                     ScanResult.InformationElement[] ies =
                             new ScanResult.InformationElement[]{ieSSid};
                     ScanDetail sd = new ScanDetail(new NetworkDetail(bssid, ies, null, frequency),
-                            wifiSsid, bssid, capabilities, dbm,
+                            WifiSsid.createFromAsciiEncoded(ssid), bssid, capabilities, dbm,
                             frequency, SystemClock.elapsedRealtime() * 1000, ies, null, null);
                     mWifiNative.addFakeScanDetail(sd);
                     return 0;
@@ -1263,7 +984,7 @@
                 case "stop-faking-scans":
                     mWifiNative.stopFakingScanDetails();
                     return 0;
-                case "enable-scanning": {
+                case "enable-scanning":
                     boolean enabled = getNextArgRequiredTrueOrFalse("enabled", "disabled");
                     boolean hiddenEnabled = false;
                     String option = getNextOption();
@@ -1278,357 +999,6 @@
                     }
                     mScanRequestProxy.enableScanning(enabled, hiddenEnabled);
                     return 0;
-                }
-                case "launch-dialog-simple":
-                    String title = null;
-                    String message = null;
-                    String messageUrl = null;
-                    int messageUrlStart = 0;
-                    int messageUrlEnd = 0;
-                    String positiveButtonText = null;
-                    String negativeButtonText = null;
-                    String neutralButtonText = null;
-                    String dialogOption = getNextOption();
-                    boolean simpleTimeoutSpecified = false;
-                    long simpleTimeoutMs = 0;
-                    while (dialogOption != null) {
-                        switch (dialogOption) {
-                            case "-t":
-                                title = getNextArgRequired();
-                                break;
-                            case "-m":
-                                message = getNextArgRequired();
-                                break;
-                            case "-l":
-                                messageUrl = getNextArgRequired();
-                                messageUrlStart = Integer.valueOf(getNextArgRequired());
-                                messageUrlEnd = Integer.valueOf(getNextArgRequired());
-                                break;
-                            case "-y":
-                                positiveButtonText = getNextArgRequired();
-                                break;
-                            case "-n":
-                                negativeButtonText = getNextArgRequired();
-                                break;
-                            case "-x":
-                                neutralButtonText = getNextArgRequired();
-                                break;
-                            case "-c":
-                                simpleTimeoutMs = Integer.parseInt(getNextArgRequired());
-                                simpleTimeoutSpecified = true;
-                                break;
-                            default:
-                                pw.println("Ignoring unknown option " + dialogOption);
-                                break;
-                        }
-                        dialogOption = getNextOption();
-                    }
-                    ArrayBlockingQueue<String> simpleQueue = new ArrayBlockingQueue<>(1);
-                    WifiDialogManager.SimpleDialogCallback wifiEnableRequestCallback =
-                            new WifiDialogManager.SimpleDialogCallback() {
-                                @Override
-                                public void onPositiveButtonClicked() {
-                                    simpleQueue.offer("Positive button was clicked.");
-                                }
-
-                                @Override
-                                public void onNegativeButtonClicked() {
-                                    simpleQueue.offer("Negative button was clicked.");
-                                }
-
-                                @Override
-                                public void onNeutralButtonClicked() {
-                                    simpleQueue.offer("Neutral button was clicked.");
-                                }
-
-                                @Override
-                                public void onCancelled() {
-                                    simpleQueue.offer("Dialog was cancelled.");
-                                }
-                            };
-                    WifiDialogManager.DialogHandle simpleDialogHandle =
-                            mWifiDialogManager.createSimpleDialogWithUrl(
-                                    title,
-                                    message,
-                                    messageUrl,
-                                    messageUrlStart,
-                                    messageUrlEnd,
-                                    positiveButtonText,
-                                    negativeButtonText,
-                                    neutralButtonText,
-                                    wifiEnableRequestCallback,
-                                    mWifiThreadRunner);
-                    if (simpleTimeoutSpecified) {
-                        simpleDialogHandle.launchDialog(simpleTimeoutMs);
-                        pw.println("Launched dialog with " + simpleTimeoutMs + " millisecond"
-                                + " timeout. Waiting for user response...");
-                        pw.flush();
-                        String dialogResponse = simpleQueue.take();
-                        if (dialogResponse == null) {
-                            pw.println("No response received.");
-                        } else {
-                            pw.println(dialogResponse);
-                        }
-                    } else {
-                        simpleDialogHandle.launchDialog();
-                        pw.println("Launched dialog. Waiting up to 15 seconds for user response"
-                                + " before dismissing...");
-                        pw.flush();
-                        String dialogResponse = simpleQueue.poll(15, TimeUnit.SECONDS);
-                        if (dialogResponse == null) {
-                            pw.println("No response received. Dismissing dialog.");
-                            simpleDialogHandle.dismissDialog();
-                        } else {
-                            pw.println(dialogResponse);
-                        }
-                    }
-                    return 0;
-                case "launch-dialog-p2p-invitation-sent": {
-                    int displayId = Display.DEFAULT_DISPLAY;
-                    String deviceName = getNextArgRequired();
-                    String displayPin = getNextArgRequired();
-                    String cmdOption = getNextOption();
-                    if (cmdOption != null && cmdOption.equals("-i")) {
-                        String displayIdStr = getNextArgRequired();
-                        try {
-                            displayId = Integer.parseInt(displayIdStr);
-                        } catch (NumberFormatException e) {
-                            pw.println("Invalid <display-id> argument to "
-                                    + "'launch-dialog-p2p-invitation-sent' "
-                                    + "- must be an integer: "
-                                    + displayIdStr);
-                            return -1;
-                        }
-                        DisplayManager dm = mContext.getSystemService(DisplayManager.class);
-                        Display[] displays = dm.getDisplays();
-                        for (Display display : displays) {
-                            pw.println("Display: id=" + display.getDisplayId() + ", info="
-                                    + display.getDeviceProductInfo());
-                        }
-                    }
-                    mWifiDialogManager.createP2pInvitationSentDialog(deviceName, displayPin,
-                            displayId).launchDialog();
-                    pw.println("Launched dialog.");
-                    return 0;
-                }
-                case "launch-dialog-p2p-invitation-received": {
-                    String deviceName = getNextArgRequired();
-                    boolean isPinRequested = false;
-                    String displayPin = null;
-                    String pinOption = getNextOption();
-                    int displayId = Display.DEFAULT_DISPLAY;
-                    boolean p2pInvRecTimeoutSpecified = false;
-                    long p2pInvRecTimeout = 0;
-                    while (pinOption != null) {
-                        if (pinOption.equals("-p")) {
-                            isPinRequested = true;
-                        } else if (pinOption.equals("-d")) {
-                            displayPin = getNextArgRequired();
-                        } else if (pinOption.equals("-i")) {
-                            String displayIdStr = getNextArgRequired();
-                            try {
-                                displayId = Integer.parseInt(displayIdStr);
-                            } catch (NumberFormatException e) {
-                                pw.println("Invalid <display-id> argument to "
-                                        + "'launch-dialog-p2p-invitation-received' "
-                                        + "- must be an integer: "
-                                        + displayIdStr);
-                                return -1;
-                            }
-                            DisplayManager dm = mContext.getSystemService(DisplayManager.class);
-                            Display[] displays = dm.getDisplays();
-                            for (Display display : displays) {
-                                pw.println("Display: id=" + display.getDisplayId() + ", info="
-                                        + display.getDeviceProductInfo());
-                            }
-                        } else if (pinOption.equals("-c")) {
-                            p2pInvRecTimeout = Integer.parseInt(getNextArgRequired());
-                            p2pInvRecTimeoutSpecified = true;
-                        } else {
-                            pw.println("Ignoring unknown option " + pinOption);
-                        }
-                        pinOption = getNextOption();
-                    }
-                    ArrayBlockingQueue<String> p2pInvRecQueue = new ArrayBlockingQueue<>(1);
-                    WifiDialogManager.P2pInvitationReceivedDialogCallback callback =
-                            new WifiDialogManager.P2pInvitationReceivedDialogCallback() {
-                        @Override
-                        public void onAccepted(@Nullable String optionalPin) {
-                            p2pInvRecQueue.offer("Invitation accepted with optionalPin="
-                                    + optionalPin);
-                        }
-
-                        @Override
-                        public void onDeclined() {
-                            p2pInvRecQueue.offer("Invitation declined");
-                        }
-                    };
-                    WifiDialogManager.DialogHandle p2pInvitationReceivedDialogHandle =
-                            mWifiDialogManager.createP2pInvitationReceivedDialog(
-                                    deviceName,
-                                    isPinRequested,
-                                    displayPin,
-                                    displayId,
-                                    callback,
-                                    mWifiThreadRunner);
-                    if (p2pInvRecTimeoutSpecified) {
-                        p2pInvitationReceivedDialogHandle.launchDialog(p2pInvRecTimeout);
-                        pw.println("Launched dialog with " + p2pInvRecTimeout + " millisecond"
-                                + " timeout. Waiting for user response...");
-                        pw.flush();
-                        String dialogResponse = p2pInvRecQueue.take();
-                        if (dialogResponse == null) {
-                            pw.println("No response received.");
-                        } else {
-                            pw.println(dialogResponse);
-                        }
-                    } else {
-                        p2pInvitationReceivedDialogHandle.launchDialog();
-                        pw.println("Launched dialog. Waiting up to 15 seconds for user response"
-                                + " before dismissing...");
-                        pw.flush();
-                        String dialogResponse = p2pInvRecQueue.poll(15, TimeUnit.SECONDS);
-                        if (dialogResponse == null) {
-                            pw.println("No response received. Dismissing dialog.");
-                            p2pInvitationReceivedDialogHandle.dismissDialog();
-                        } else {
-                            pw.println(dialogResponse);
-                        }
-                    }
-                    return 0;
-                }
-                case "query-interface": {
-                    String uidArg = getNextArgRequired();
-                    int uid = 0;
-                    try {
-                        uid = Integer.parseInt(uidArg);
-                    } catch (NumberFormatException e) {
-                        pw.println(
-                                "Invalid UID specified, can't convert to an integer - " + uidArg);
-                        return -1;
-                    }
-                    String packageName = getNextArgRequired();
-
-                    String interfaceTypeArg = getNextArgRequired();
-                    int interfaceType;
-                    switch (interfaceTypeArg) {
-                        case "STA":
-                            interfaceType = HDM_CREATE_IFACE_STA;
-                            break;
-                        case "AP":
-                            interfaceType = HDM_CREATE_IFACE_AP;
-                            break;
-                        case "AWARE":
-                            interfaceType = HDM_CREATE_IFACE_NAN;
-                            break;
-                        case "DIRECT":
-                            interfaceType = HDM_CREATE_IFACE_P2P;
-                            break;
-                        default:
-                            pw.println("Invalid interface type - expected STA|AP|AWARE|DIRECT: "
-                                    + interfaceTypeArg);
-                            return -1;
-                    }
-                    boolean queryForNewInterface = false;
-                    String optArg = getNextArg();
-                    if (optArg != null) {
-                        if (TextUtils.equals("-new", optArg)) {
-                            queryForNewInterface = true;
-                        } else {
-                            pw.println("Unknown extra arg --- " + optArg);
-                            return -1;
-                        }
-                    }
-                    List<Pair<Integer, WorkSource>> details =
-                            mHalDeviceManager.reportImpactToCreateIface(interfaceType,
-                                    queryForNewInterface, new WorkSource(uid, packageName));
-                    final SparseArray<String> ifaceMap = new SparseArray<String>() {{
-                            put(HDM_CREATE_IFACE_STA, "STA");
-                            put(HDM_CREATE_IFACE_AP, "AP");
-                            put(HDM_CREATE_IFACE_AP_BRIDGE, "AP");
-                            put(HDM_CREATE_IFACE_P2P, "DIRECT");
-                            put(HDM_CREATE_IFACE_NAN, "AWARE");
-                        }};
-                    if (details == null) {
-                        pw.println("Can't create interface: " + interfaceTypeArg);
-                    } else if (details.size() == 0) {
-                        pw.println("Interface " + interfaceTypeArg
-                                + " can be created without destroying any other interfaces");
-                    } else {
-                        pw.println("Interface " + interfaceTypeArg
-                                + " can be created. Following interfaces will be destroyed:");
-                        for (Pair<Integer, WorkSource> detail : details) {
-                            pw.println("    Type=" + ifaceMap.get(detail.first) + ", WS="
-                                    + detail.second);
-                        }
-                    }
-                    return 0;
-                }
-                case "interface-priority-interactive-mode": {
-                    String flag = getNextArgRequired(); // enable|disable|default
-                    switch (flag) {
-                        case "enable":
-                            mInterfaceConflictManager.setUserApprovalNeededOverride(true, true);
-                            break;
-                        case "disable":
-                            mInterfaceConflictManager.setUserApprovalNeededOverride(true, false);
-                            break;
-                        case "default":
-                            mInterfaceConflictManager.setUserApprovalNeededOverride(
-                                    false, /* don't care */ false);
-                            break;
-                        default:
-                            pw.println(
-                                    "Invalid argument to `interface-priority-interactive-mode` - "
-                                            + flag);
-                            return -1;
-                    }
-                    return 0;
-                }
-                case "set-one-shot-screen-on-delay-ms": {
-                    if (!SdkLevel.isAtLeastT()) {
-                        pw.println("This feature is only supported on SdkLevel T or later.");
-                        return -1;
-                    }
-                    int delay = Integer.parseInt(getNextArgRequired());
-                    mWifiService.setOneShotScreenOnConnectivityScanDelayMillis(delay);
-                    return 0;
-                }
-                case "start-dpp-enrollee-responder": {
-                    CountDownLatch countDownLatch = new CountDownLatch(1);
-                    String option = getNextOption();
-                    String info = null;
-                    int curve = 0;
-                    while (option != null) {
-                        if (option.equals("-i")) {
-                            info = getNextArgRequired();
-                        } else if (option.equals("-c")) {
-                            curve = Integer.parseInt(getNextArgRequired());
-                        } else {
-                            pw.println("Ignoring unknown option " + option);
-                        }
-                        option = getNextOption();
-                    }
-                    mWifiService.startDppAsEnrolleeResponder(new Binder(), info, curve,
-                            new DppCallbackProxy(pw, countDownLatch));
-                    // Wait for DPP callback
-                    countDownLatch.await(10000, TimeUnit.MILLISECONDS);
-                    return 0;
-                }
-                case "start-dpp-configurator-initiator": {
-                    CountDownLatch countDownLatch = new CountDownLatch(1);
-                    int netId = Integer.parseInt(getNextArgRequired());
-                    int role = Integer.parseInt(getNextArgRequired());
-                    String enrolleeUri = getNextArgRequired();
-                    mWifiService.startDppAsConfiguratorInitiator(new Binder(), SHELL_PACKAGE_NAME,
-                            enrolleeUri, netId, role, new DppCallbackProxy(pw, countDownLatch));
-                    // Wait for DPP callback
-                    countDownLatch.await(10000, TimeUnit.MILLISECONDS);
-                    return 0;
-                }
-                case "stop-dpp":
-                    mWifiService.stopDppSession();
-                    return 0;
                 default:
                     return handleDefaultCommands(cmd);
             }
@@ -1659,8 +1029,6 @@
         String ssid = getNextArgRequired();
         String type = getNextArgRequired();
         WifiConfiguration configuration = new WifiConfiguration();
-        // Wrap the SSID in double quotes for UTF-8. The quotes may be removed if the SSID is in
-        // hexadecimal digits, specified by the [-x] option below.
         configuration.SSID = "\"" + ssid + "\"";
         if (TextUtils.equals(type, "wpa3")) {
             configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_SAE);
@@ -1672,16 +1040,12 @@
             configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OWE);
         } else if (TextUtils.equals(type, "open")) {
             configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OPEN);
-        } else if (TextUtils.equals(type, "dpp")) {
-            configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_DPP);
         } else {
             throw new IllegalArgumentException("Unknown network type " + type);
         }
         String option = getNextOption();
         while (option != null) {
-            if (option.equals("-x")) {
-                configuration.SSID = ssid;
-            } else if (option.equals("-m")) {
+            if (option.equals("-m")) {
                 configuration.meteredOverride = METERED_OVERRIDE_METERED;
             } else if (option.equals("-d")) {
                 configuration.allowAutojoin = false;
@@ -1718,10 +1082,10 @@
     }
 
     private SoftApConfiguration buildSoftApConfiguration(PrintWriter pw) {
-        String ssidStr = getNextArgRequired();
+        String ssid = getNextArgRequired();
         String type = getNextArgRequired();
         SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder();
-        configBuilder.setSsid(ssidStr);
+        configBuilder.setSsid(ssid);
         if (TextUtils.equals(type, "wpa2")) {
             configBuilder.setPassphrase(getNextArgRequired(),
                     SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
@@ -1733,12 +1097,6 @@
                     SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION);
         } else if (TextUtils.equals(type, "open")) {
             configBuilder.setPassphrase(null, SoftApConfiguration.SECURITY_TYPE_OPEN);
-        } else if (TextUtils.equals(type, "owe_transition")) {
-            configBuilder.setPassphrase(null,
-                    SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION);
-        } else if (TextUtils.equals(type, "owe")) {
-            configBuilder.setPassphrase(null,
-                    SoftApConfiguration.SECURITY_TYPE_WPA3_OWE);
         } else {
             throw new IllegalArgumentException("Unknown network type " + type);
         }
@@ -1767,8 +1125,6 @@
                 } else {
                     throw new IllegalArgumentException("Invalid band option " + preferredBand);
                 }
-            } else if (SdkLevel.isAtLeastT() && option.equals("-x")) {
-                configBuilder.setWifiSsid(WifiSsid.fromString(ssidStr));
             } else {
                 pw.println("Ignoring unknown option " + option);
             }
@@ -1865,75 +1221,39 @@
         return suggestion;
     }
 
-    private Pair<String, NetworkRequest> buildNetworkRequest(PrintWriter pw) {
-        String firstOpt = getNextOption();
-        boolean isGlob = "-g".equals(firstOpt);
-        boolean noSsid = "-s".equals(firstOpt);
-        String ssid = noSsid ? "NoSsid" : getNextArgRequired();
-        String type = noSsid ? null : getNextArgRequired();
+    private NetworkRequest buildNetworkRequest(PrintWriter pw) {
+        String ssid = getNextArgRequired();
+        String type = getNextArgRequired();
         WifiNetworkSpecifier.Builder specifierBuilder =
                 new WifiNetworkSpecifier.Builder();
-        if (isGlob) {
-            specifierBuilder.setSsidPattern(
-                    new PatternMatcher(ssid, PatternMatcher.PATTERN_ADVANCED_GLOB));
+        specifierBuilder.setSsid(ssid);
+        if (TextUtils.equals(type, "wpa3")) {
+            specifierBuilder.setWpa3Passphrase(getNextArgRequired());
+        } else if (TextUtils.equals(type, "wpa3_transition")) {
+            specifierBuilder.setWpa3Passphrase(getNextArgRequired());
+        } else if (TextUtils.equals(type, "wpa2")) {
+            specifierBuilder.setWpa2Passphrase(getNextArgRequired());
+        } else if (TextUtils.equals(type, "owe")) {
+            specifierBuilder.setIsEnhancedOpen(true);
+        } else if (TextUtils.equals(type, "open")) {
+            // nothing to do.
         } else {
-            if (ssid != null && !noSsid) specifierBuilder.setSsid(ssid);
-        }
-        if (type != null) {
-            if (TextUtils.equals(type, "wpa3")) {
-                specifierBuilder.setWpa3Passphrase(getNextArgRequired());
-            } else if (TextUtils.equals(type, "wpa3_transition")) {
-                specifierBuilder.setWpa3Passphrase(getNextArgRequired());
-            } else if (TextUtils.equals(type, "wpa2")) {
-                specifierBuilder.setWpa2Passphrase(getNextArgRequired());
-            } else if (TextUtils.equals(type, "owe")) {
-                specifierBuilder.setIsEnhancedOpen(true);
-            } else if (TextUtils.equals(type, "open")) {
-                // nothing to do.
-            } else {
-                throw new IllegalArgumentException("Unknown network type " + type);
-            }
+            throw new IllegalArgumentException("Unknown network type " + type);
         }
         String bssid = null;
         String option = getNextOption();
-        String ssidKey = ssid;
-        boolean nullBssid = false;
-        boolean hasInternet = false;
         while (option != null) {
             if (option.equals("-b")) {
                 bssid = getNextArgRequired();
-            } else if (option.equals("-n")) {
-                nullBssid = true;
-            } else if (option.equals("-d")) {
-                String band = getNextArgRequired();
-                ssidKey = ssidKey + "_" + band + "g";
-                if (band.equals("2")) {
-                    specifierBuilder.setBand(ScanResult.WIFI_BAND_24_GHZ);
-                } else if (band.equals("5")) {
-                    specifierBuilder.setBand(ScanResult.WIFI_BAND_5_GHZ);
-                } else if (band.equals("6")) {
-                    specifierBuilder.setBand(ScanResult.WIFI_BAND_6_GHZ);
-                } else if (band.equals("60")) {
-                    specifierBuilder.setBand(ScanResult.WIFI_BAND_60_GHZ);
-                } else {
-                    throw new IllegalArgumentException("Unknown band " + band);
-                }
-            } else if (option.equals("-i")) {
-                ssidKey = ssidKey + "_internet";
-                hasInternet = true;
             } else {
                 pw.println("Ignoring unknown option " + option);
             }
             option = getNextOption();
         }
-        if (bssid != null && nullBssid) {
-            throw new IllegalArgumentException("Invalid option combination: "
-                    + "Should not use both -b and -n at the same time.");
-        }
 
         // Permission approval bypass is only available to requests with both ssid & bssid set.
         // So, find scan result with the best rssi level to set in the request.
-        if (bssid == null && !nullBssid) {
+        if (bssid == null) {
             ScanResult matchingScanResult =
                     mWifiService.getScanResults(SHELL_PACKAGE_NAME, null)
                             .stream()
@@ -1946,19 +1266,14 @@
                 pw.println("No matching bssid found, request will need UI approval");
             }
         }
-        if (bssid != null && !nullBssid) specifierBuilder.setBssid(MacAddress.fromString(bssid));
-        NetworkRequest.Builder builder = new NetworkRequest.Builder()
-                .addTransportType(TRANSPORT_WIFI);
-        if (hasInternet) {
-            builder.addCapability(NET_CAPABILITY_INTERNET);
-        } else {
-            builder.removeCapability(NET_CAPABILITY_INTERNET);
-        }
-        return new Pair<String, NetworkRequest>(ssidKey,
-                builder.setNetworkSpecifier(specifierBuilder.build()).build());
+        if (bssid != null) specifierBuilder.setBssid(MacAddress.fromString(bssid));
+        return new NetworkRequest.Builder()
+                .addTransportType(TRANSPORT_WIFI)
+                .removeCapability(NET_CAPABILITY_INTERNET)
+                .setNetworkSpecifier(specifierBuilder.build())
+                .build();
     }
 
-    @RequiresApi(Build.VERSION_CODES.S)
     @NonNull
     private List<CoexUtils.CoexCellChannel> buildCoexCellChannels() {
         List<CoexUtils.CoexCellChannel> cellChannels = new ArrayList<>();
@@ -2013,13 +1328,8 @@
     private void setAutoJoin(PrintWriter pw, String ssid, boolean allowAutojoin) {
         // For suggestions, this will work only if the config has already been added
         // to WifiConfigManager.
-        Bundle extras = new Bundle();
-        if (SdkLevel.isAtLeastS()) {
-            extras.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                    mContext.getAttributionSource());
-        }
         WifiConfiguration retrievedConfig =
-                mWifiService.getPrivilegedConfiguredNetworks(SHELL_PACKAGE_NAME, null, extras)
+                mWifiService.getPrivilegedConfiguredNetworks(SHELL_PACKAGE_NAME, null)
                         .getList()
                         .stream()
                         .filter(n -> n.SSID.equals(ssid))
@@ -2180,6 +1490,42 @@
         pw.println("    Start a new scan");
         pw.println("  list-networks");
         pw.println("    Lists the saved networks");
+        pw.println("  connect-network <ssid> open|owe|wpa2|wpa3 [<passphrase>] [-m] [-d] "
+                + "[-b <bssid>] [-r auto|none|persistent|non_persistent]");
+        pw.println("    Connect to a network with provided params and add to saved networks list");
+        pw.println("    <ssid> - SSID of the network");
+        pw.println("    open|owe|wpa2|wpa3 - Security type of the network.");
+        pw.println("        - Use 'open' or 'owe' for networks with no passphrase");
+        pw.println("           - 'open' - Open networks (Most prevalent)");
+        pw.println("           - 'owe' - Enhanced open networks");
+        pw.println("        - Use 'wpa2' or 'wpa3' for networks with passphrase");
+        pw.println("           - 'wpa2' - WPA-2 PSK networks (Most prevalent)");
+        pw.println("           - 'wpa3' - WPA-3 PSK networks");
+        pw.println("    -m - Mark the network metered.");
+        pw.println("    -d - Mark the network autojoin disabled.");
+        pw.println("    -h - Mark the network hidden.");
+        pw.println("    -p - Mark the network private (not shared).");
+        pw.println("    -b <bssid> - Set specific BSSID.");
+        pw.println("    -r auto|none|persistent|non_persistent - MAC randomization scheme for the"
+                + " network");
+        pw.println("  add-network <ssid> open|owe|wpa2|wpa3 [<passphrase>] [-m] [-d] "
+                + "[-b <bssid>] [-r auto|none|persistent|non_persistent]");
+        pw.println("    Add/update saved network with provided params");
+        pw.println("    <ssid> - SSID of the network");
+        pw.println("    open|owe|wpa2|wpa3 - Security type of the network.");
+        pw.println("        - Use 'open' or 'owe' for networks with no passphrase");
+        pw.println("           - 'open' - Open networks (Most prevalent)");
+        pw.println("           - 'owe' - Enhanced open networks");
+        pw.println("        - Use 'wpa2' or 'wpa3' for networks with passphrase");
+        pw.println("           - 'wpa2' - WPA-2 PSK networks (Most prevalent)");
+        pw.println("           - 'wpa3' - WPA-3 PSK networks");
+        pw.println("    -m - Mark the network metered.");
+        pw.println("    -d - Mark the network autojoin disabled.");
+        pw.println("    -h - Mark the network hidden.");
+        pw.println("    -p - Mark the network private (not shared).");
+        pw.println("    -b <bssid> - Set specific BSSID.");
+        pw.println("    -r auto|none|persistent|non_persistent - MAC randomization scheme for the"
+                + " network");
         pw.println("  forget-network <networkId>");
         pw.println("    Remove the network mentioned by <networkId>");
         pw.println("        - Use list-networks to retrieve <networkId> for the network");
@@ -2221,10 +1567,8 @@
         pw.println("    -c <carrierId> - set carrier Id");
         pw.println("    -i <subscriptionId> - set subscription Id, if -a is used, "
                 + "this must be set");
-        pw.println("  remove-suggestion <ssid> [-l]");
+        pw.println("  remove-suggestion <ssid>");
         pw.println("    Remove a network suggestion with provided SSID of the network");
-        pw.println("    -l - Remove suggestion with lingering, if not set will disconnect "
-                + "immediately ");
         pw.println("  remove-all-suggestions");
         pw.println("    Removes all suggestions added via shell");
         pw.println("  list-suggestions");
@@ -2259,16 +1603,15 @@
         pw.println("  reset-connected-score");
         pw.println("    Turns on the default connected scorer.");
         pw.println("    Note: Will clear any external scorer set.");
-        pw.println("  start-softap <ssid> (open|wpa2|wpa3|wpa3_transition|owe|owe_transition) "
-                + "<passphrase> [-b 2|5|6|any|bridged]");
+        pw.println("  start-softap <ssid> (open|wpa2|wpa3|wpa3_transition) <passphrase> "
+                + "[-b 2|5|6|any]");
         pw.println("    Start softap with provided params");
         pw.println("    Note that the shell command doesn't activate internet tethering. In some "
                 + "devices, internet sharing is possible when Wi-Fi STA is also enabled and is"
                 + "associated to another AP with internet access.");
         pw.println("    <ssid> - SSID of the network");
-        pw.println("    open|wpa2|wpa3|wpa3_transition|owe|owe_transition - Security type of the "
-                + "network.");
-        pw.println("        - Use 'open', 'owe', 'owe_transition' for networks with no passphrase");
+        pw.println("    open|wpa2|wpa3|wpa3_transition - Security type of the network.");
+        pw.println("        - Use 'open' for networks with no passphrase");
         pw.println("        - Use 'wpa2', 'wpa3', 'wpa3_transition' for networks with passphrase");
         pw.println("    -b 2|5|6|any|bridged - select the preferred band.");
         pw.println("        - Use '2' to select 2.4GHz band as the preferred band");
@@ -2280,7 +1623,6 @@
         pw.println("    Note: If the band option is not provided, 2.4GHz is the preferred band.");
         pw.println("          The exact channel is auto-selected by FW unless overridden by "
                 + "force-softap-channel command");
-        pw.println("    -x - Specifies the SSID as hex digits instead of plain text (T and above)");
         pw.println("  stop-softap");
         pw.println("    Stop softap (hotspot)");
         pw.println("  pmksa-flush <networkId>");
@@ -2290,86 +1632,13 @@
         pw.println(
                 "    Reset the WiFi resources cache which will cause them to be reloaded next "
                         + "time they are accessed. Necessary if overlays are manually modified.");
-        pw.println("  launch-dialog-simple [-t <title>] [-m <message>]"
-                + " [-l <url> <url_start> <url_end>] [-y <positive_button_text>]"
-                + " [-n <negative_button_text>] [-x <neutral_button_text>] [-c <timeout_millis>]");
-        pw.println("    Launches a simple dialog and waits up to 15 seconds to"
-                + " print the response.");
-        pw.println("    -t - Title");
-        pw.println("    -m - Message");
-        pw.println("    -l - URL of the message, with the start and end index inside the message");
-        pw.println("    -y - Positive Button Text");
-        pw.println("    -n - Negative Button Text");
-        pw.println("    -x - Neutral Button Text");
-        pw.println("    -c - Optional timeout in milliseconds");
-        pw.println("  launch-dialog-p2p-invitation-sent <device_name> <pin> [-i <display_id>]");
-        pw.println("    Launches a P2P Invitation Sent dialog.");
-        pw.println("    <device_name> - Name of the device the invitation was sent to");
-        pw.println("    <pin> - PIN for the invited device to input");
-        pw.println("  launch-dialog-p2p-invitation-received <device_name> [-p] [-d <pin>] "
-                + "[-i <display_id>] [-c <timeout_millis>]");
-        pw.println("    Launches a P2P Invitation Received dialog and waits up to 15 seconds to"
-                + " print the response.");
-        pw.println("    <device_name> - Name of the device sending the invitation");
-        pw.println("    -p - Show PIN input");
-        pw.println("    -d - Display PIN <pin>");
-        pw.println("    -i - Display ID");
-        pw.println("    -c - Optional timeout in milliseconds");
-        pw.println("  query-interface <uid> <package_name> STA|AP|AWARE|DIRECT [-new]");
-        pw.println(
-                "    Query whether the specified could be created for the specified UID and "
-                        + "package name, and if so - what other interfaces would be destroyed");
-        pw.println("    -new - query for a new interfaces (otherwise an existing interface is ok");
-        pw.println("  interface-priority-interactive-mode enable|disable|default");
-        pw.println("    Enable or disable asking the user when there's an interface priority "
-                + "conflict, |default| implies using the device default behavior.");
-        pw.println("  set-one-shot-screen-on-delay-ms <delayMs>");
-        pw.println("    set the delay for the next screen-on connectivity scan in milliseconds.");
+    }
+
+    private void onHelpPrivileged(PrintWriter pw) {
         pw.println("  set-ipreach-disconnect enabled|disabled");
         pw.println("    Sets whether CMD_IP_REACHABILITY_LOST events should trigger disconnects.");
         pw.println("  get-ipreach-disconnect");
         pw.println("    Gets setting of CMD_IP_REACHABILITY_LOST events triggering disconnects.");
-    }
-
-    private void onHelpPrivileged(PrintWriter pw) {
-        pw.println("  connect-network <ssid> open|owe|wpa2|wpa3 [<passphrase>] [-x] [-m] [-d] "
-                + "[-b <bssid>] [-r auto|none|persistent|non_persistent]");
-        pw.println("    Connect to a network with provided params and add to saved networks list");
-        pw.println("    <ssid> - SSID of the network");
-        pw.println("    open|owe|wpa2|wpa3 - Security type of the network.");
-        pw.println("        - Use 'open' or 'owe' for networks with no passphrase");
-        pw.println("           - 'open' - Open networks (Most prevalent)");
-        pw.println("           - 'owe' - Enhanced open networks");
-        pw.println("        - Use 'wpa2' or 'wpa3' for networks with passphrase");
-        pw.println("           - 'wpa2' - WPA-2 PSK networks (Most prevalent)");
-        pw.println("           - 'wpa3' - WPA-3 PSK networks");
-        pw.println("    -x - Specifies the SSID as hex digits instead of plain text");
-        pw.println("    -m - Mark the network metered.");
-        pw.println("    -d - Mark the network autojoin disabled.");
-        pw.println("    -h - Mark the network hidden.");
-        pw.println("    -p - Mark the network private (not shared).");
-        pw.println("    -b <bssid> - Set specific BSSID.");
-        pw.println("    -r auto|none|persistent|non_persistent - MAC randomization scheme for the"
-                + " network");
-        pw.println("  add-network <ssid> open|owe|wpa2|wpa3 [<passphrase>] [-x] [-m] [-d] "
-                + "[-b <bssid>] [-r auto|none|persistent|non_persistent]");
-        pw.println("    Add/update saved network with provided params");
-        pw.println("    <ssid> - SSID of the network");
-        pw.println("    open|owe|wpa2|wpa3 - Security type of the network.");
-        pw.println("        - Use 'open' or 'owe' for networks with no passphrase");
-        pw.println("           - 'open' - Open networks (Most prevalent)");
-        pw.println("           - 'owe' - Enhanced open networks");
-        pw.println("        - Use 'wpa2' or 'wpa3' for networks with passphrase");
-        pw.println("           - 'wpa2' - WPA-2 PSK networks (Most prevalent)");
-        pw.println("           - 'wpa3' - WPA-3 PSK networks");
-        pw.println("    -x - Specifies the SSID as hex digits instead of plain text");
-        pw.println("    -m - Mark the network metered.");
-        pw.println("    -d - Mark the network autojoin disabled.");
-        pw.println("    -h - Mark the network hidden.");
-        pw.println("    -p - Mark the network private (not shared).");
-        pw.println("    -b <bssid> - Set specific BSSID.");
-        pw.println("    -r auto|none|persistent|non_persistent - MAC randomization scheme for the"
-                + " network");
         pw.println("  set-poll-rssi-interval-msecs <int>");
         pw.println("    Sets the interval between RSSI polls to <int> milliseconds.");
         pw.println("  get-poll-rssi-interval-msecs");
@@ -2401,7 +1670,6 @@
         pw.println("    or left for normal   operation.");
         pw.println("  force-country-code enabled <two-letter code> | disabled ");
         pw.println("    Sets country code to <two-letter code> or left for normal value");
-        pw.println("    or '00' for forcing to world mode country code");
         pw.println("  set-wifi-watchdog enabled|disabled");
         pw.println("    Sets whether wifi watchdog should trigger recovery");
         pw.println("  get-wifi-watchdog");
@@ -2414,13 +1682,11 @@
         pw.println("    each on a separate line.");
         pw.println("  settings-reset");
         pw.println("    Initiates wifi settings reset");
-        pw.println("  add-request [-g] [-i] [-n] [-s] <ssid> open|owe|wpa2|wpa3 [<passphrase>]"
-                + " [-b <bssid>] [-d <band=2|5|6|60>]");
+        pw.println("  add-request <ssid> open|owe|wpa2|wpa3 [<passphrase>] [-b <bssid>]");
         pw.println("    Add a network request with provided params");
         pw.println("    Use 'network-requests-set-user-approved android yes'"
                 +  " to pre-approve requests added via rooted shell (Not persisted)");
-        pw.println("    -g - Marks the following SSID as a glob pattern");
-        pw.println("    <ssid> - SSID of the network, or glob pattern if -g is present");
+        pw.println("    <ssid> - SSID of the network");
         pw.println("    open|owe|wpa2|wpa3 - Security type of the network.");
         pw.println("        - Use 'open' or 'owe' for networks with no passphrase");
         pw.println("           - 'open' - Open networks (Most prevalent)");
@@ -2429,11 +1695,6 @@
         pw.println("           - 'wpa2' - WPA-2 PSK networks (Most prevalent)");
         pw.println("           - 'wpa3' - WPA-3 PSK networks");
         pw.println("    -b <bssid> - Set specific BSSID.");
-        pw.println("    -i Set internet capability.");
-        pw.println("    -d Specify the band of access point: 2, 5, 6, or 60");
-        pw.println("    -s No SSID provided, to be chosen by network selection.");
-        pw.println("    -n - Prevent auto-selection of BSSID and force it to be null so that the "
-                + "request matches all BSSIDs.");
         pw.println("  remove-request <ssid>");
         pw.println("    Remove a network request with provided SSID of the network");
         pw.println("  remove-all-requests");
@@ -2473,7 +1734,7 @@
                 + "'add-fake-scan'), stop with 'stop-faking-scans'.");
         pw.println("  stop-faking-scans");
         pw.println("    Stop faking scan results - started with 'start-faking-scans'.");
-        pw.println("  add-fake-scan [-x] <ssid> <bssid> <capabilities> <frequency> <dbm>");
+        pw.println("  add-fake-scan <ssid> <bssid> <capabilities> <frequency> <dbm>");
         pw.println("    Add a fake scan result to be used when enabled via `start-faking-scans'.");
         pw.println("    Example WPA2: add-fake-scan fakeWpa2 80:01:02:03:04:05 "
                 + "\"[WPA2-PSK-CCMP][RSN-PSK-CCMP][ESS]\" 2412 -55");
@@ -2493,48 +1754,11 @@
                 "    Example Passpoint: add-fake-scan fakePasspoint 80:01:02:03:04:0B "
                         + "\"[WPA2-EAP/SHA1-CCMP][RSN-EAP/SHA1-CCMP][ESS][MFPR][MFPC]"
                         + "[PASSPOINT]\" 2412 -55");
-        pw.println("    -x - Specifies the SSID as hex digits instead of plain text");
         pw.println("  reset-fake-scans");
         pw.println("    Resets all fake scan results added by 'add-fake-scan'.");
         pw.println("  enable-scanning enabled|disabled [-h]");
         pw.println("    Sets whether all scanning should be enabled or disabled");
         pw.println("    -h - Enable scanning for hidden networks.");
-        pw.println("  set-passpoint-enabled enabled|disabled");
-        pw.println("    Sets whether Passpoint should be enabled or disabled");
-        pw.println("  start-lohs <ssid> (open|wpa2|wpa3|wpa3_transition|owe|owe_transition) "
-                + "<passphrase> [-b 2|5|6|any]");
-        pw.println("    Start local only softap (hotspot) with provided params");
-        pw.println("    <ssid> - SSID of the network");
-        pw.println("    open|wpa2|wpa3|wpa3_transition|owe|owe_transition - Security type of the "
-                + "network.");
-        pw.println("        - Use 'open', 'owe', 'owe_transition' for networks with no passphrase");
-        pw.println("        - Use 'wpa2', 'wpa3', 'wpa3_transition' for networks with passphrase");
-        pw.println("    -b 2|5|6|any|bridged - select the preferred band.");
-        pw.println("        - Use '2' to select 2.4GHz band as the preferred band");
-        pw.println("        - Use '5' to select 5GHz band as the preferred band");
-        pw.println("        - Use '6' to select 6GHz band as the preferred band");
-        pw.println("        - Use 'any' to indicate no band preference");
-        pw.println("        - Use 'bridged' to indicate bridged AP which enables APs on both "
-                + "2.4G + 5G");
-        pw.println("    Note: If the band option is not provided, 2.4GHz is the preferred band.");
-        pw.println("  stop-lohs");
-        pw.println("    Stop local only softap (hotspot)");
-        pw.println("  set-multi-internet-mode 0|1|2");
-        pw.println("    Sets Multi Internet use case mode. 0-disabled 1-dbs 2-multi ap");
-        pw.println("  set-pno-request <ssid> [-f <frequency>]");
-        pw.println("    Requests to include a non-quoted UTF-8 SSID in PNO scans");
-        pw.println("  clear-pno-request");
-        pw.println("    Clear the PNO scan request.");
-        pw.println("  start-dpp-enrollee-responder [-i <info>] [-c <curve>]");
-        pw.println("    Start DPP Enrollee responder mode.");
-        pw.println("    -i - Device Info to be used in DPP Bootstrapping URI");
-        pw.println("    -c - Cryptography Curve integer 1:p256v1, 2:s384r1, etc");
-        pw.println("  start-dpp-configurator-initiator <networkId> <netRole> <enrolleeURI>");
-        pw.println("    Start DPP Configurator Initiator mode.");
-        pw.println("    netRole - 0: STA, 1: AP");
-        pw.println("    enrolleeURI - Bootstrapping URI received from Enrollee");
-        pw.println("  stop-dpp");
-        pw.println("    Stop DPP session.");
     }
 
     @Override
diff --git a/service/java/com/android/server/wifi/WifiThreadRunner.java b/service/java/com/android/server/wifi/WifiThreadRunner.java
index 1009d94..64ec5b2 100644
--- a/service/java/com/android/server/wifi/WifiThreadRunner.java
+++ b/service/java/com/android/server/wifi/WifiThreadRunner.java
@@ -181,16 +181,6 @@
         mHandler.removeCallbacks(r);
     }
 
-    /**
-     * Check if there are any pending posts of messages with callback r in the message queue.
-     *
-     * @param r The Runnable that will be used to query.
-     * @return true if exists, otherwise false.
-     */
-    public final boolean hasCallbacks(@NonNull Runnable r) {
-        return mHandler.hasCallbacks(r);
-    }
-
     // Note: @hide methods copied from android.os.Handler
     /**
      * Runs the specified task synchronously.
diff --git a/service/java/com/android/server/wifi/WifiVendorHal.java b/service/java/com/android/server/wifi/WifiVendorHal.java
index 2547af6..81b881a 100644
--- a/service/java/com/android/server/wifi/WifiVendorHal.java
+++ b/service/java/com/android/server/wifi/WifiVendorHal.java
@@ -17,10 +17,6 @@
 
 import static android.net.wifi.CoexUnsafeChannel.POWER_CAP_NONE;
 
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP_BRIDGE;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_STA;
-
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.content.Context;
@@ -56,9 +52,12 @@
 import android.hardware.wifi.V1_0.WifiStatusCode;
 import android.hardware.wifi.V1_2.IWifiChipEventCallback.IfaceInfo;
 import android.hardware.wifi.V1_5.IWifiChip.MultiStaUseCase;
+import android.hardware.wifi.V1_5.IWifiChip.UsableChannelFilter;
+import android.hardware.wifi.V1_5.StaPeerInfo;
+import android.hardware.wifi.V1_5.StaRateStat;
 import android.hardware.wifi.V1_5.WifiBand;
 import android.hardware.wifi.V1_5.WifiIfaceMode;
-import android.hardware.wifi.V1_6.IWifiChip.UsableChannelFilter;
+import android.hardware.wifi.V1_5.WifiUsableChannel;
 import android.net.MacAddress;
 import android.net.apf.ApfCapabilities;
 import android.net.wifi.ScanResult;
@@ -122,9 +121,9 @@
      *
      * @param verbose - with the obvious interpretation
      */
-    public void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
+    public void enableVerboseLogging(boolean verbose) {
         synchronized (sLock) {
-            if (verboseEnabled) {
+            if (verbose) {
                 mVerboseLog = mLog;
                 enter("verbose=true").flush();
             } else {
@@ -372,6 +371,25 @@
     }
 
     /**
+     * Bring up the HIDL Vendor HAL and configure for AP (Access Point) mode
+     *
+     * @return true for success
+     */
+    public boolean startVendorHalAp() {
+        synchronized (sLock) {
+            if (!startVendorHal()) {
+                return false;
+            }
+            if (TextUtils.isEmpty(createApIface(null, null,
+                    SoftApConfiguration.BAND_2GHZ, false))) {
+                stopVendorHal();
+                return false;
+            }
+            return true;
+        }
+    }
+
+    /**
      * Bring up the HIDL Vendor HAL and configure for STA (Station) mode
      *
      * @return true for success
@@ -460,6 +478,7 @@
                 mLog.err("Failed to get wifi chip").flush();
                 return nullResult();
             }
+            enableLinkLayerStats(iface);
             mIWifiStaIfaces.put(ifaceName, iface);
             return ifaceName;
         }
@@ -545,19 +564,17 @@
      * @param requestorWs Requestor worksource.
      * @param band The requesting band for this AP interface.
      * @param isBridged Whether or not AP interface is a bridge interface.
-     * @param softApManager SoftApManager of the request.
      * @return iface name on success, null otherwise.
      */
     public String createApIface(@Nullable InterfaceDestroyedListener destroyedListener,
             @NonNull WorkSource requestorWs,
             @SoftApConfiguration.BandType int band,
-            boolean isBridged,
-            @NonNull SoftApManager softApManager) {
+            boolean isBridged) {
         synchronized (sLock) {
             IWifiApIface iface = mHalDeviceManager.createApIface(
                     getNecessaryCapabilitiesForSoftApMode(band),
                     new ApInterfaceDestroyedListenerInternal(destroyedListener), mHalEventHandler,
-                    requestorWs, isBridged, softApManager);
+                    requestorWs, isBridged);
             if (iface == null) {
                 mLog.err("Failed to create AP iface").flush();
                 return nullResult();
@@ -1106,9 +1123,7 @@
      * @return the statistics, or null if unable to do so
      */
     public WifiLinkLayerStats getWifiLinkLayerStats(@NonNull String ifaceName) {
-        if (getWifiStaIfaceForV1_6Mockable(ifaceName) != null) {
-            return getWifiLinkLayerStats_1_6_Internal(ifaceName);
-        } else if (getWifiStaIfaceForV1_5Mockable(ifaceName) != null) {
+        if (getWifiStaIfaceForV1_5Mockable(ifaceName) != null) {
             return getWifiLinkLayerStats_1_5_Internal(ifaceName);
         } else if (getWifiStaIfaceForV1_3Mockable(ifaceName) != null) {
             return getWifiLinkLayerStats_1_3_Internal(ifaceName);
@@ -1185,28 +1200,6 @@
         return stats;
     }
 
-    private WifiLinkLayerStats getWifiLinkLayerStats_1_6_Internal(@NonNull String ifaceName) {
-        class AnswerBox {
-            public android.hardware.wifi.V1_6.StaLinkLayerStats value = null;
-        }
-        AnswerBox answer = new AnswerBox();
-        synchronized (sLock) {
-            try {
-                android.hardware.wifi.V1_6.IWifiStaIface iface =
-                        getWifiStaIfaceForV1_6Mockable(ifaceName);
-                if (iface == null) return null;
-                iface.getLinkLayerStats_1_6((status, stats) -> {
-                    if (!ok(status)) return;
-                    answer.value = stats;
-                });
-            } catch (RemoteException e) {
-                handleRemoteException(e);
-                return null;
-            }
-        }
-        WifiLinkLayerStats stats = frameworkFromHalLinkLayerStats_1_6(answer.value);
-        return stats;
-    }
 
     /**
      * Makes the framework version of link layer stats from the hal version.
@@ -1252,21 +1245,6 @@
         return out;
     }
 
-    /**
-     * Makes the framework version of link layer stats from the hal version.
-     */
-    @VisibleForTesting
-    static WifiLinkLayerStats frameworkFromHalLinkLayerStats_1_6(
-            android.hardware.wifi.V1_6.StaLinkLayerStats stats) {
-        if (stats == null) return null;
-        WifiLinkLayerStats out = new WifiLinkLayerStats();
-        setIfaceStats_1_6(out, stats.iface);
-        setRadioStats_1_6(out, stats.radios);
-        setTimeStamp(out, stats.timeStampInMs);
-        out.version = WifiLinkLayerStats.V1_5; //TODO: Does the change justify moving to 1.6 ??
-        return out;
-    }
-
     private static void setIfaceStats(WifiLinkLayerStats stats, StaLinkLayerIfaceStats iface) {
         if (iface == null) return;
         stats.beacon_rx = iface.beaconRx;
@@ -1323,64 +1301,13 @@
         stats.peerInfo = new PeerInfo[iface.peers.size()];
         for (int i = 0; i < stats.peerInfo.length; i++) {
             PeerInfo peer = new PeerInfo();
-            android.hardware.wifi.V1_5.StaPeerInfo staPeerInfo = iface.peers.get(i);
+            StaPeerInfo staPeerInfo = iface.peers.get(i);
             peer.staCount = staPeerInfo.staCount;
             peer.chanUtil = staPeerInfo.chanUtil;
             RateStat[] rateStats = new RateStat[staPeerInfo.rateStats.size()];
             for (int j = 0; j < staPeerInfo.rateStats.size(); j++) {
                 rateStats[j] = new RateStat();
-                android.hardware.wifi.V1_5.StaRateStat staRateStat = staPeerInfo.rateStats.get(j);
-                rateStats[j].preamble = staRateStat.rateInfo.preamble;
-                rateStats[j].nss = staRateStat.rateInfo.nss;
-                rateStats[j].bw = staRateStat.rateInfo.bw;
-                rateStats[j].rateMcsIdx = staRateStat.rateInfo.rateMcsIdx;
-                rateStats[j].bitRateInKbps = staRateStat.rateInfo.bitRateInKbps;
-                rateStats[j].txMpdu = staRateStat.txMpdu;
-                rateStats[j].rxMpdu = staRateStat.rxMpdu;
-                rateStats[j].mpduLost = staRateStat.mpduLost;
-                rateStats[j].retries = staRateStat.retries;
-            }
-            peer.rateStats = rateStats;
-            stats.peerInfo[i] = peer;
-        }
-    }
-
-    private static void setIfaceStats_1_6(WifiLinkLayerStats stats,
-            android.hardware.wifi.V1_6.StaLinkLayerIfaceStats iface) {
-        if (iface == null) return;
-        setIfaceStats(stats, iface.V1_0);
-        stats.timeSliceDutyCycleInPercent = iface.timeSliceDutyCycleInPercent;
-        // WME Best Effort Access Category
-        stats.contentionTimeMinBeInUsec = iface.wmeBeContentionTimeStats.contentionTimeMinInUsec;
-        stats.contentionTimeMaxBeInUsec = iface.wmeBeContentionTimeStats.contentionTimeMaxInUsec;
-        stats.contentionTimeAvgBeInUsec = iface.wmeBeContentionTimeStats.contentionTimeAvgInUsec;
-        stats.contentionNumSamplesBe = iface.wmeBeContentionTimeStats.contentionNumSamples;
-        // WME Background Access Category
-        stats.contentionTimeMinBkInUsec = iface.wmeBkContentionTimeStats.contentionTimeMinInUsec;
-        stats.contentionTimeMaxBkInUsec = iface.wmeBkContentionTimeStats.contentionTimeMaxInUsec;
-        stats.contentionTimeAvgBkInUsec = iface.wmeBkContentionTimeStats.contentionTimeAvgInUsec;
-        stats.contentionNumSamplesBk = iface.wmeBkContentionTimeStats.contentionNumSamples;
-        // WME Video Access Category
-        stats.contentionTimeMinViInUsec = iface.wmeViContentionTimeStats.contentionTimeMinInUsec;
-        stats.contentionTimeMaxViInUsec = iface.wmeViContentionTimeStats.contentionTimeMaxInUsec;
-        stats.contentionTimeAvgViInUsec = iface.wmeViContentionTimeStats.contentionTimeAvgInUsec;
-        stats.contentionNumSamplesVi = iface.wmeViContentionTimeStats.contentionNumSamples;
-        // WME Voice Access Category
-        stats.contentionTimeMinVoInUsec = iface.wmeVoContentionTimeStats.contentionTimeMinInUsec;
-        stats.contentionTimeMaxVoInUsec = iface.wmeVoContentionTimeStats.contentionTimeMaxInUsec;
-        stats.contentionTimeAvgVoInUsec = iface.wmeVoContentionTimeStats.contentionTimeAvgInUsec;
-        stats.contentionNumSamplesVo = iface.wmeVoContentionTimeStats.contentionNumSamples;
-        // Peer information statistics
-        stats.peerInfo = new PeerInfo[iface.peers.size()];
-        for (int i = 0; i < stats.peerInfo.length; i++) {
-            PeerInfo peer = new PeerInfo();
-            android.hardware.wifi.V1_6.StaPeerInfo staPeerInfo = iface.peers.get(i);
-            peer.staCount = staPeerInfo.staCount;
-            peer.chanUtil = staPeerInfo.chanUtil;
-            RateStat[] rateStats = new RateStat[staPeerInfo.rateStats.size()];
-            for (int j = 0; j < staPeerInfo.rateStats.size(); j++) {
-                rateStats[j] = new RateStat();
-                android.hardware.wifi.V1_6.StaRateStat staRateStat = staPeerInfo.rateStats.get(j);
+                StaRateStat staRateStat = staPeerInfo.rateStats.get(j);
                 rateStats[j].preamble = staRateStat.rateInfo.preamble;
                 rateStats[j].nss = staRateStat.rateInfo.nss;
                 rateStats[j].bw = staRateStat.rateInfo.bw;
@@ -1415,9 +1342,9 @@
     }
 
     /**
-     * Set individual radio stats from the hal radio stats for V1_3
+     * Set individual radio stats from the hal radio stats
      */
-    private static void setFrameworkPerRadioStatsFromHidl_1_3(int radioId, RadioStat radio,
+    private static void setFrameworkPerRadioStatsFromHidl(int radioId, RadioStat radio,
             android.hardware.wifi.V1_3.StaLinkLayerRadioStats hidlRadioStats) {
         radio.radio_id = radioId;
         radio.on_time = hidlRadioStats.V1_0.onTimeInMs;
@@ -1441,37 +1368,10 @@
     }
 
     /**
-     * Set individual radio stats from the hal radio stats for V1_6
-     */
-    private static void setFrameworkPerRadioStatsFromHidl_1_6(RadioStat radio,
-            android.hardware.wifi.V1_6.StaLinkLayerRadioStats hidlRadioStats) {
-        radio.radio_id = hidlRadioStats.radioId;
-        radio.on_time = hidlRadioStats.V1_0.onTimeInMs;
-        radio.tx_time = hidlRadioStats.V1_0.txTimeInMs;
-        radio.rx_time = hidlRadioStats.V1_0.rxTimeInMs;
-        radio.on_time_scan = hidlRadioStats.V1_0.onTimeInMsForScan;
-        radio.on_time_nan_scan = hidlRadioStats.onTimeInMsForNanScan;
-        radio.on_time_background_scan = hidlRadioStats.onTimeInMsForBgScan;
-        radio.on_time_roam_scan = hidlRadioStats.onTimeInMsForRoamScan;
-        radio.on_time_pno_scan = hidlRadioStats.onTimeInMsForPnoScan;
-        radio.on_time_hs20_scan = hidlRadioStats.onTimeInMsForHs20Scan;
-        /* Copy list of channel stats */
-        for (android.hardware.wifi.V1_6.WifiChannelStats channelStats
-                : hidlRadioStats.channelStats) {
-            ChannelStats channelStatsEntry = new ChannelStats();
-            channelStatsEntry.frequency = channelStats.channel.centerFreq;
-            channelStatsEntry.radioOnTimeMs = channelStats.onTimeInMs;
-            channelStatsEntry.ccaBusyTimeMs = channelStats.ccaBusyTimeInMs;
-            radio.channelStatsMap.put(channelStats.channel.centerFreq, channelStatsEntry);
-        }
-    }
-
-    /**
      * If config_wifiLinkLayerAllRadiosStatsAggregationEnabled is set to true, aggregate
      * the radio stats from all the radios else process the stats from Radio 0 only.
-     * This method is for V1_3
      */
-    private static void aggregateFrameworkRadioStatsFromHidl_1_3(int radioIndex,
+    private static void aggregateFrameworkRadioStatsFromHidl(int radioIndex,
             WifiLinkLayerStats stats,
             android.hardware.wifi.V1_3.StaLinkLayerRadioStats hidlRadioStats) {
         if (!sContext.getResources()
@@ -1515,61 +1415,12 @@
         stats.numRadios++;
     }
 
-    /**
-     * If config_wifiLinkLayerAllRadiosStatsAggregationEnabled is set to true, aggregate
-     * the radio stats from all the radios else process the stats from Radio 0 only.
-     * This method is for V1_6
-     */
-    private static void aggregateFrameworkRadioStatsFromHidl_1_6(int radioIndex,
-            WifiLinkLayerStats stats,
-            android.hardware.wifi.V1_6.StaLinkLayerRadioStats hidlRadioStats) {
-        if (!sContext.getResources()
-                .getBoolean(R.bool.config_wifiLinkLayerAllRadiosStatsAggregationEnabled)
-                && radioIndex > 0) {
-            return;
-        }
-        // Aggregate the radio stats from all the radios
-        stats.on_time += hidlRadioStats.V1_0.onTimeInMs;
-        stats.tx_time += hidlRadioStats.V1_0.txTimeInMs;
-        // Aggregate tx_time_per_level based on the assumption that the length of
-        // txTimeInMsPerLevel is the same across all radios. So txTimeInMsPerLevel on other
-        // radios at array indices greater than the length of first radio will be dropped.
-        if (stats.tx_time_per_level == null) {
-            stats.tx_time_per_level = new int[hidlRadioStats.V1_0.txTimeInMsPerLevel.size()];
-        }
-        for (int i = 0; i < hidlRadioStats.V1_0.txTimeInMsPerLevel.size()
-                && i < stats.tx_time_per_level.length; i++) {
-            stats.tx_time_per_level[i] += hidlRadioStats.V1_0.txTimeInMsPerLevel.get(i);
-        }
-        stats.rx_time += hidlRadioStats.V1_0.rxTimeInMs;
-        stats.on_time_scan += hidlRadioStats.V1_0.onTimeInMsForScan;
-        stats.on_time_nan_scan += hidlRadioStats.onTimeInMsForNanScan;
-        stats.on_time_background_scan += hidlRadioStats.onTimeInMsForBgScan;
-        stats.on_time_roam_scan += hidlRadioStats.onTimeInMsForRoamScan;
-        stats.on_time_pno_scan += hidlRadioStats.onTimeInMsForPnoScan;
-        stats.on_time_hs20_scan += hidlRadioStats.onTimeInMsForHs20Scan;
-        /* Copy list of channel stats */
-        for (android.hardware.wifi.V1_6.WifiChannelStats channelStats
-                : hidlRadioStats.channelStats) {
-            ChannelStats channelStatsEntry =
-                    stats.channelStatsMap.get(channelStats.channel.centerFreq);
-            if (channelStatsEntry == null) {
-                channelStatsEntry = new ChannelStats();
-                channelStatsEntry.frequency = channelStats.channel.centerFreq;
-                stats.channelStatsMap.put(channelStats.channel.centerFreq, channelStatsEntry);
-            }
-            channelStatsEntry.radioOnTimeMs += channelStats.onTimeInMs;
-            channelStatsEntry.ccaBusyTimeMs += channelStats.ccaBusyTimeInMs;
-        }
-        stats.numRadios++;
-    }
-
     private static void setRadioStats_1_3(WifiLinkLayerStats stats,
             List<android.hardware.wifi.V1_3.StaLinkLayerRadioStats> radios) {
         if (radios == null) return;
         int radioIndex = 0;
         for (android.hardware.wifi.V1_3.StaLinkLayerRadioStats radioStats : radios) {
-            aggregateFrameworkRadioStatsFromHidl_1_3(radioIndex, stats, radioStats);
+            aggregateFrameworkRadioStatsFromHidl(radioIndex, stats, radioStats);
             radioIndex++;
         }
     }
@@ -1581,23 +1432,9 @@
         stats.radioStats = new RadioStat[radios.size()];
         for (android.hardware.wifi.V1_5.StaLinkLayerRadioStats radioStats : radios) {
             RadioStat radio = new RadioStat();
-            setFrameworkPerRadioStatsFromHidl_1_3(radioStats.radioId, radio, radioStats.V1_3);
+            setFrameworkPerRadioStatsFromHidl(radioStats.radioId, radio, radioStats.V1_3);
             stats.radioStats[radioIndex] = radio;
-            aggregateFrameworkRadioStatsFromHidl_1_3(radioIndex, stats, radioStats.V1_3);
-            radioIndex++;
-        }
-    }
-
-    private static void setRadioStats_1_6(WifiLinkLayerStats stats,
-            List<android.hardware.wifi.V1_6.StaLinkLayerRadioStats> radios) {
-        if (radios == null) return;
-        int radioIndex = 0;
-        stats.radioStats = new RadioStat[radios.size()];
-        for (android.hardware.wifi.V1_6.StaLinkLayerRadioStats radioStats : radios) {
-            RadioStat radio = new RadioStat();
-            setFrameworkPerRadioStatsFromHidl_1_6(radio, radioStats);
-            stats.radioStats[radioIndex] = radio;
-            aggregateFrameworkRadioStatsFromHidl_1_6(radioIndex, stats, radioStats);
+            aggregateFrameworkRadioStatsFromHidl(radioIndex, stats, radioStats.V1_3);
             radioIndex++;
         }
     }
@@ -1616,16 +1453,10 @@
      *
      * @param iface Iface object.
      */
-    public void enableLinkLayerStats(@NonNull String ifaceName) {
+    private void enableLinkLayerStats(IWifiStaIface iface) {
         synchronized (sLock) {
             try {
                 WifiStatus status;
-                IWifiStaIface iface = getStaIface(ifaceName);
-                if (iface == null) {
-                    mLog.err("STA iface object is NULL - Failed to enable link layer stats")
-                            .flush();
-                    return;
-                }
                 status = iface.enableLinkLayerStatsCollection(mLinkLayerStatsDebug);
                 if (!ok(status)) {
                     mLog.err("unable to enable link layer stats collection").flush();
@@ -3062,17 +2893,6 @@
     }
 
     /**
-     * Method to mock out the V1_6 IWifiChip retrieval in unit tests.
-     *
-     * @return 1.6 IWifiChip object if the device is running the 1.6 wifi hal service, null
-     * otherwise.
-     */
-    protected android.hardware.wifi.V1_6.IWifiChip getWifiChipForV1_6Mockable() {
-        if (mIWifiChip == null) return null;
-        return android.hardware.wifi.V1_6.IWifiChip.castFrom(mIWifiChip);
-    }
-
-    /**
      * Method to mock out the V1_2 IWifiStaIface retrieval in unit tests.
      *
      * @param ifaceName Name of the interface
@@ -3114,20 +2934,6 @@
         return android.hardware.wifi.V1_5.IWifiStaIface.castFrom(iface);
     }
 
-    /**
-     * Method to mock out the V1_6 IWifiStaIface retrieval in unit tests.
-     *
-     * @param ifaceName Name of the interface
-     * @return 1.6 IWifiStaIface object if the device is running the 1.6 wifi hal service, null
-     * otherwise.
-     */
-    protected android.hardware.wifi.V1_6.IWifiStaIface getWifiStaIfaceForV1_6Mockable(
-            @NonNull String ifaceName) {
-        IWifiStaIface iface = getStaIface(ifaceName);
-        if (iface == null) return null;
-        return android.hardware.wifi.V1_6.IWifiStaIface.castFrom(iface);
-    }
-
     protected android.hardware.wifi.V1_4.IWifiApIface getWifiApIfaceForV1_4Mockable(
             String ifaceName) {
         IWifiApIface iface = getApIface(ifaceName);
@@ -3390,35 +3196,13 @@
     }
 
     /**
-     * Returns whether the given HdmIfaceTypeForCreation combo is supported or not.
-     */
-    public boolean canDeviceSupportCreateTypeCombo(SparseArray<Integer> combo) {
-        synchronized (sLock) {
-            return mHalDeviceManager.canDeviceSupportCreateTypeCombo(combo);
-        }
-    }
-
-    /**
-     * Returns whether a new iface can be created without tearing down any existing ifaces.
-     */
-    public boolean canDeviceSupportAdditionalIface(
-            @HalDeviceManager.HdmIfaceTypeForCreation int createIfaceType,
-            @NonNull WorkSource requestorWs) {
-        synchronized (sLock) {
-            List<Pair<Integer, WorkSource>> creationImpact =
-                    mHalDeviceManager.reportImpactToCreateIface(createIfaceType, true, requestorWs);
-            return creationImpact != null && creationImpact.isEmpty();
-        }
-    }
-
-    /**
      * Returns whether STA + AP concurrency is supported or not.
      */
     public boolean isStaApConcurrencySupported() {
         synchronized (sLock) {
-            return mHalDeviceManager.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                    put(HDM_CREATE_IFACE_STA, 1);
-                    put(HDM_CREATE_IFACE_AP, 1);
+            return mHalDeviceManager.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                    put(IfaceType.STA, 1);
+                    put(IfaceType.AP, 1);
                 }});
         }
     }
@@ -3428,8 +3212,8 @@
      */
     public boolean isStaStaConcurrencySupported() {
         synchronized (sLock) {
-            return mHalDeviceManager.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                    put(HDM_CREATE_IFACE_STA, 2);
+            return mHalDeviceManager.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                    put(IfaceType.STA, 2);
                 }});
         }
     }
@@ -3439,17 +3223,7 @@
      */
     public boolean isItPossibleToCreateApIface(@NonNull WorkSource requestorWs) {
         synchronized (sLock) {
-            return mHalDeviceManager.isItPossibleToCreateIface(HDM_CREATE_IFACE_AP, requestorWs);
-        }
-    }
-
-    /**
-     * Returns whether a new AP iface can be created or not.
-     */
-    public boolean isItPossibleToCreateBridgedApIface(@NonNull WorkSource requestorWs) {
-        synchronized (sLock) {
-            return mHalDeviceManager.isItPossibleToCreateIface(
-                    HDM_CREATE_IFACE_AP_BRIDGE, requestorWs);
+            return mHalDeviceManager.isItPossibleToCreateIface(IfaceType.AP, requestorWs);
         }
     }
 
@@ -3458,7 +3232,7 @@
      */
     public boolean isItPossibleToCreateStaIface(@NonNull WorkSource requestorWs) {
         synchronized (sLock) {
-            return mHalDeviceManager.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, requestorWs);
+            return mHalDeviceManager.isItPossibleToCreateIface(IfaceType.STA, requestorWs);
         }
 
     }
@@ -3564,7 +3338,7 @@
         ScanResult frameworkScanResult = new ScanResult();
         frameworkScanResult.SSID = NativeUtil.encodeSsid(scanResult.ssid);
         frameworkScanResult.wifiSsid =
-                WifiSsid.fromBytes(NativeUtil.byteArrayFromArrayList(scanResult.ssid));
+                WifiSsid.createFromByteArray(NativeUtil.byteArrayFromArrayList(scanResult.ssid));
         frameworkScanResult.BSSID = NativeUtil.macAddressFromByteArray(scanResult.bssid);
         frameworkScanResult.level = scanResult.rssi;
         frameworkScanResult.frequency = scanResult.frequency;
@@ -4082,26 +3856,6 @@
         if ((filter & WifiAvailableChannel.FILTER_CELLULAR_COEXISTENCE) != 0) {
             halFilter |= UsableChannelFilter.CELLULAR_COEXISTENCE;
         }
-
-        return halFilter;
-    }
-
-    /**
-     * Convert framework's WifiAvailableChannel.FILTER_* to HAL's UsableChannelFilter 1.6.
-     */
-    private int frameworkToHalUsableFilter_1_6(@WifiAvailableChannel.Filter int filter) {
-        int halFilter = 0;  // O implies no additional filter other than regulatory (default)
-
-        if ((filter & WifiAvailableChannel.FILTER_CONCURRENCY) != 0) {
-            halFilter |= UsableChannelFilter.CONCURRENCY;
-        }
-        if ((filter & WifiAvailableChannel.FILTER_CELLULAR_COEXISTENCE) != 0) {
-            halFilter |= UsableChannelFilter.CELLULAR_COEXISTENCE;
-        }
-        if ((filter & WifiAvailableChannel.FILTER_NAN_INSTANT_MODE) != 0) {
-            halFilter |= UsableChannelFilter.NAN_INSTANT_MODE;
-        }
-
         return halFilter;
     }
 
@@ -4114,43 +3868,22 @@
             @WifiAvailableChannel.Filter int filter) {
         synchronized (sLock) {
             try {
-                android.hardware.wifi.V1_5.IWifiChip iWifiChipV15 = null;
-                android.hardware.wifi.V1_6.IWifiChip iWifiChipV16 = getWifiChipForV1_6Mockable();
-                if (iWifiChipV16 == null) {
-                    iWifiChipV15 = getWifiChipForV1_5Mockable();
-                    if (iWifiChipV15 == null) {
-                        return null;
-                    }
+                android.hardware.wifi.V1_5.IWifiChip iWifiChipV15 = getWifiChipForV1_5Mockable();
+                if (iWifiChipV15 == null) {
+                    return null;
                 }
-
                 Mutable<List<WifiAvailableChannel>> answer = new Mutable<>();
-
-                if (iWifiChipV16 != null) {
-                    iWifiChipV16.getUsableChannels_1_6(
-                            makeWifiBandFromFrameworkBand(band),
-                            frameworkToHalIfaceMode(mode),
-                            frameworkToHalUsableFilter_1_6(filter), (status, channels) -> {
-                                if (!ok(status)) return;
-                                answer.value = new ArrayList<>();
-                                for (android.hardware.wifi.V1_6.WifiUsableChannel ch : channels) {
-                                    answer.value.add(new WifiAvailableChannel(ch.channel,
-                                            frameworkFromHalIfaceMode(ch.ifaceModeMask)));
-                                }
-                            });
-                } else {
-                    iWifiChipV15.getUsableChannels(
-                            makeWifiBandFromFrameworkBand(band),
-                            frameworkToHalIfaceMode(mode),
-                            frameworkToHalUsableFilter(filter), (status, channels) -> {
-                                if (!ok(status)) return;
-                                answer.value = new ArrayList<>();
-                                for (android.hardware.wifi.V1_5.WifiUsableChannel ch : channels) {
-                                    answer.value.add(new WifiAvailableChannel(ch.channel,
-                                            frameworkFromHalIfaceMode(ch.ifaceModeMask)));
-                                }
-                            });
-                }
-
+                iWifiChipV15.getUsableChannels(
+                        makeWifiBandFromFrameworkBand(band),
+                        frameworkToHalIfaceMode(mode),
+                        frameworkToHalUsableFilter(filter), (status, channels) -> {
+                            if (!ok(status)) return;
+                            answer.value = new ArrayList<>();
+                            for (WifiUsableChannel ch : channels) {
+                                answer.value.add(new WifiAvailableChannel(ch.channel,
+                                        frameworkFromHalIfaceMode(ch.ifaceModeMask)));
+                            }
+                        });
                 return answer.value;
             } catch (RemoteException e) {
                 handleRemoteException(e);
diff --git a/service/java/com/android/server/wifi/WrongPasswordNotifier.java b/service/java/com/android/server/wifi/WrongPasswordNotifier.java
index 21311c8..a5c039b 100644
--- a/service/java/com/android/server/wifi/WrongPasswordNotifier.java
+++ b/service/java/com/android/server/wifi/WrongPasswordNotifier.java
@@ -20,15 +20,11 @@
 import android.app.PendingIntent;
 import android.content.Intent;
 import android.graphics.drawable.Icon;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
-import android.net.wifi.WifiSsid;
 import android.provider.Settings;
 
-import androidx.annotation.NonNull;
-
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
+import com.android.server.wifi.util.NativeUtil;
 
 /**
  * Responsible for notifying user for wrong password errors.
@@ -59,10 +55,10 @@
     /**
      * Invoked when a wrong password error for a Wi-Fi network is detected.
      *
-     * @param wifiConfiguration the network
+     * @param ssid The SSID of the Wi-Fi network
      */
-    public void onWrongPasswordError(@NonNull WifiConfiguration wifiConfiguration) {
-        showNotification(wifiConfiguration);
+    public void onWrongPasswordError(String ssid) {
+        showNotification(ssid);
         mWrongPasswordDetected = true;
     }
 
@@ -79,26 +75,14 @@
     /**
      * Display wrong password notification for a given Wi-Fi network (specified by its SSID).
      *
-     * @param wifiConfiguration the network
+     * @param ssid SSID of the Wi-FI network
      */
-    private void showNotification(@NonNull WifiConfiguration wifiConfiguration) {
-        CharSequence utf8Ssid = WifiSsid.fromString(wifiConfiguration.SSID).getUtf8Text();
-        if (utf8Ssid == null) {
-            // TODO(qal): Non-utf-8 SSIDs are currently not supported in Settings, and the intent
-            //            action will fail to open the password dialog for the correct network. In
-            //            addition, it is unclear which charset is appropriate for the non-utf-8
-            //            SSID. We may need to re-evaluate if we should support displaying non-utf-8
-            //            SSIDs from the framework or not. For now, fallback to the raw
-            //            WifiConfiguration.SSID so the user still gets a notification.
-            utf8Ssid = wifiConfiguration.SSID;
-        }
+    private void showNotification(String ssid) {
         String settingsPackage = mFrameworkFacade.getSettingsPackageName(mContext);
         if (settingsPackage == null) return;
         Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS)
                 .setPackage(settingsPackage)
-                .putExtra("wifi_start_connect_ssid", utf8Ssid.toString());
-        CharSequence title = mContext.getString(
-                com.android.wifi.resources.R.string.wifi_available_title_failed_to_connect);
+                .putExtra("wifi_start_connect_ssid", NativeUtil.removeEnclosingQuotes(ssid));
         Notification.Builder builder = mFrameworkFacade.makeNotificationBuilder(mContext,
                 WifiService.NOTIFICATION_NETWORK_ALERTS)
                 .setAutoCancel(true)
@@ -106,8 +90,9 @@
                 // TODO(zqiu): consider creating a new icon.
                 .setSmallIcon(Icon.createWithResource(mContext.getWifiOverlayApkPkgName(),
                         com.android.wifi.resources.R.drawable.stat_notify_wifi_in_range))
-                .setContentTitle(title)
-                .setContentText(utf8Ssid)
+                .setContentTitle(mContext.getString(
+                        com.android.wifi.resources.R.string.wifi_available_title_failed_to_connect))
+                .setContentText(ssid)
                 .setContentIntent(mFrameworkFacade.getActivity(
                         mContext, 0, intent,
                         PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE))
diff --git a/service/java/com/android/server/wifi/aware/Capabilities.java b/service/java/com/android/server/wifi/aware/Capabilities.java
index 62e5eb3..6c06945 100644
--- a/service/java/com/android/server/wifi/aware/Capabilities.java
+++ b/service/java/com/android/server/wifi/aware/Capabilities.java
@@ -16,6 +16,7 @@
 
 package com.android.server.wifi.aware;
 
+import android.hardware.wifi.V1_0.NanCipherSuiteType;
 import android.net.wifi.aware.Characteristics;
 import android.os.Bundle;
 
@@ -50,16 +51,26 @@
         bundle.putInt(Characteristics.KEY_MAX_SERVICE_SPECIFIC_INFO_LENGTH,
                 maxServiceSpecificInfoLen);
         bundle.putInt(Characteristics.KEY_MAX_MATCH_FILTER_LENGTH, maxMatchFilterLen);
-        bundle.putInt(Characteristics.KEY_SUPPORTED_CIPHER_SUITES, supportedCipherSuites);
+        bundle.putInt(Characteristics.KEY_SUPPORTED_CIPHER_SUITES,
+                toPublicCipherSuites(supportedCipherSuites));
         bundle.putBoolean(Characteristics.KEY_IS_INSTANT_COMMUNICATION_MODE_SUPPORTED,
                 isInstantCommunicationModeSupported);
-        bundle.putInt(Characteristics.KEY_MAX_NDP_NUMBER, maxNdpSessions);
-        bundle.putInt(Characteristics.KEY_MAX_NDI_NUMBER, maxNdiInterfaces);
-        bundle.putInt(Characteristics.KEY_MAX_PUBLISH_NUMBER, maxPublishes);
-        bundle.putInt(Characteristics.KEY_MAX_SUBSCRIBE_NUMBER, maxSubscribes);
         return new Characteristics(bundle);
     }
 
+    private int toPublicCipherSuites(int nativeCipherSuites) {
+        int publicCipherSuites = 0;
+
+        if ((nativeCipherSuites & NanCipherSuiteType.SHARED_KEY_128_MASK) != 0) {
+            publicCipherSuites |= Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128;
+        }
+        if ((nativeCipherSuites & NanCipherSuiteType.SHARED_KEY_256_MASK) != 0) {
+            publicCipherSuites |= Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256;
+        }
+
+        return publicCipherSuites;
+    }
+
     @Override
     public String toString() {
         return "Capabilities [maxConcurrentAwareClusters=" + maxConcurrentAwareClusters
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareClientState.java b/service/java/com/android/server/wifi/aware/WifiAwareClientState.java
index 9ba17de..e96ec30 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareClientState.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareClientState.java
@@ -16,18 +16,14 @@
 
 package com.android.server.wifi.aware;
 
-import static com.android.server.wifi.aware.WifiAwareStateManager.INSTANT_MODE_24GHZ;
-import static com.android.server.wifi.aware.WifiAwareStateManager.INSTANT_MODE_5GHZ;
-import static com.android.server.wifi.aware.WifiAwareStateManager.INSTANT_MODE_DISABLED;
-
 import android.annotation.Nullable;
 import android.app.AppOpsManager;
 import android.content.Context;
 import android.net.wifi.aware.ConfigRequest;
 import android.net.wifi.aware.IWifiAwareEventCallback;
 import android.net.wifi.util.HexEncoding;
-import android.os.Bundle;
 import android.os.RemoteException;
+import android.os.WorkSource;
 import android.util.Log;
 import android.util.SparseArray;
 
@@ -66,7 +62,6 @@
     private final @Nullable String mCallingFeatureId;
     private final boolean mNotifyIdentityChange;
     private final WifiPermissionsUtil mWifiPermissionsUtil;
-    private final Bundle mExtra;
 
     private final AppOpsManager mAppOps;
     private final long mCreationTime;
@@ -78,7 +73,7 @@
             String callingPackage, @Nullable String callingFeatureId,
             IWifiAwareEventCallback callback, ConfigRequest configRequest,
             boolean notifyIdentityChange, long creationTime,
-            WifiPermissionsUtil wifiPermissionsUtil, Bundle extra) {
+            WifiPermissionsUtil wifiPermissionsUtil) {
         mContext = context;
         mClientId = clientId;
         mUid = uid;
@@ -92,7 +87,6 @@
         mAppOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
         mCreationTime = creationTime;
         mWifiPermissionsUtil = wifiPermissionsUtil;
-        mExtra = extra;
     }
 
     /**
@@ -112,11 +106,6 @@
         }
         mSessions.clear();
         mConfigRequest = null;
-        try {
-            mCallback.onAttachTerminate();
-        } catch (RemoteException e1) {
-            Log.e(TAG, "Error on onSessionTerminate()");
-        }
     }
 
     public ConfigRequest getConfigRequest() {
@@ -147,9 +136,6 @@
         return mSessions;
     }
 
-    public Bundle getExtra() {
-        return mExtra;
-    }
     /**
      * Searches the discovery sessions of this client and returns the one
      * corresponding to the publish/subscribe ID. Used on callbacks from HAL to
@@ -311,25 +297,6 @@
     }
 
     /**
-     * Check the highest instant communication mode of the client.
-     * @param timeout Specify an interval when instant mode config timeout
-     * @return current instant mode one of the {@code INSTANT_MODE_*}
-     */
-    public int getInstantMode(long timeout) {
-        int instantMode = INSTANT_MODE_DISABLED;
-        for (int i = 0; i < mSessions.size(); ++i) {
-            int currentSession = mSessions.valueAt(i).getInstantMode(timeout);
-            if (currentSession == INSTANT_MODE_5GHZ) {
-                return INSTANT_MODE_5GHZ;
-            }
-            if (currentSession == INSTANT_MODE_24GHZ) {
-                instantMode = currentSession;
-            }
-        }
-        return instantMode;
-    }
-
-    /**
      * Dump the internal state of the class.
      */
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java b/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java
index 1ee2be8..68f4f71 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareDataPathStateManager.java
@@ -21,6 +21,7 @@
 import android.content.Context;
 import android.hardware.wifi.V1_0.NanDataPathChannelCfg;
 import android.hardware.wifi.V1_0.NanStatusType;
+import android.hardware.wifi.V1_2.NanDataPathChannelInfo;
 import android.net.ConnectivityManager;
 import android.net.IpPrefix;
 import android.net.LinkAddress;
@@ -37,11 +38,10 @@
 import android.net.RouteInfo;
 import android.net.wifi.aware.TlvBufferUtils;
 import android.net.wifi.aware.WifiAwareAgentNetworkSpecifier;
-import android.net.wifi.aware.WifiAwareChannelInfo;
-import android.net.wifi.aware.WifiAwareDataPathSecurityConfig;
 import android.net.wifi.aware.WifiAwareManager;
 import android.net.wifi.aware.WifiAwareNetworkInfo;
 import android.net.wifi.aware.WifiAwareNetworkSpecifier;
+import android.net.wifi.aware.WifiAwareUtils;
 import android.net.wifi.util.HexEncoding;
 import android.os.Build;
 import android.os.Handler;
@@ -75,7 +75,6 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Objects;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
@@ -186,9 +185,7 @@
     public int getNumOfNdps() {
         int numOfNdps = 0;
         for (AwareNetworkRequestInformation requestInformation : mNetworkRequestsCache.values()) {
-            if (requestInformation.state != AwareNetworkRequestInformation.STATE_TERMINATING) {
-                numOfNdps += requestInformation.ndpInfos.size();
-            }
+            numOfNdps += requestInformation.ndpInfos.size();
         }
         return numOfNdps;
     }
@@ -466,7 +463,7 @@
             if (VDBG) {
                 Log.v(TAG, "onDataPathRequest: network request cache = " + mNetworkRequestsCache);
             }
-            mMgr.respondToDataPathRequest(false, ndpId, "", null, false, null);
+            mMgr.respondToDataPathRequest(false, ndpId, "", null, null, null, false);
             return false;
         }
 
@@ -476,7 +473,7 @@
         if (nnri.interfaceName == null) {
             Log.w(TAG,
                     "onDataPathRequest: request " + networkSpecifier + " no interface available");
-            mMgr.respondToDataPathRequest(false, ndpId, "", null, false, null);
+            mMgr.respondToDataPathRequest(false, ndpId, "", null, null, null, false);
             mNetworkRequestsCache.remove(networkSpecifier);
             mNetworkFactory.letAppKnowThatRequestsAreUnavailable(nnri);
             return false;
@@ -489,11 +486,11 @@
         nnri.ndpInfos.put(ndpId, ndpInfo);
 
         nnri.state = AwareNetworkRequestInformation.STATE_IN_SETUP;
-        mMgr.respondToDataPathRequest(true, ndpId, nnri.interfaceName,
+        mMgr.respondToDataPathRequest(true, ndpId, nnri.interfaceName, nnri.networkSpecifier.pmk,
+                nnri.networkSpecifier.passphrase,
                 NetworkInformationData.buildTlv(nnri.networkSpecifier.port,
                         nnri.networkSpecifier.transportProtocol),
-                nnri.networkSpecifier.isOutOfBand(),
-                nnri.networkSpecifier.getWifiAwareDataPathSecurityConfig());
+                nnri.networkSpecifier.isOutOfBand());
 
         return true;
     }
@@ -573,7 +570,7 @@
      * @return False if has error, otherwise return true
      */
     public boolean onDataPathConfirm(int ndpId, byte[] mac, boolean accept,
-            int reason, byte[] message, List<WifiAwareChannelInfo> channelInfo) {
+            int reason, byte[] message, List<NanDataPathChannelInfo> channelInfo) {
         if (mDbg) {
             Log.v(TAG, "onDataPathConfirm: ndpId=" + ndpId + ", mac=" + String.valueOf(
                     HexEncoding.encode(mac)) + ", accept=" + accept + ", reason=" + reason
@@ -613,7 +610,7 @@
         if (accept) {
             ndpInfo.peerDataMac = mac;
             ndpInfo.state = NdpInfo.STATE_CONFIRMED;
-            ndpInfo.channelInfos = channelInfo;
+            ndpInfo.channelInfo = channelInfo;
             nnri.state = AwareNetworkRequestInformation.STATE_CONFIRMED;
             // NetworkAgent may already be created for accept any peer request, interface should be
             // ready in that case.
@@ -726,8 +723,7 @@
         if (nnri.networkAgent == null) {
             // Setup first NDP for new networkAgent.
             final WifiAwareNetworkInfo ni = new WifiAwareNetworkInfo(ndpInfo.peerIpv6,
-                    ndpInfo.peerPort, ndpInfo.peerTransportProtocol,
-                    ndpInfo.channelInfos);
+                    ndpInfo.peerPort, ndpInfo.peerTransportProtocol);
             ncBuilder.setTransportInfo(ni);
             if (VDBG) {
                 Log.v(TAG, "onDataPathConfirm: AwareNetworkInfo=" + ni);
@@ -803,7 +799,7 @@
      * NDP ids has been updated.
      */
     public void onDataPathSchedUpdate(byte[] peerMac, List<Integer> ndpIds,
-            List<WifiAwareChannelInfo> channelInfo) {
+            List<NanDataPathChannelInfo> channelInfo) {
         if (mDbg) {
             Log.v(TAG, "onDataPathSchedUpdate: peerMac=" + MacAddress.fromBytes(peerMac).toString()
                     + ", ndpIds=" + ndpIds + ", channelInfo=" + channelInfo);
@@ -824,7 +820,7 @@
                 continue;
             }
 
-            ndpInfo.channelInfos = channelInfo;
+            ndpInfo.channelInfo = channelInfo;
         }
     }
 
@@ -1018,20 +1014,11 @@
                     return;
                 }
 
-                int channel = selectChannelForRequest(nnri);
-                int channelRequestType = NanDataPathChannelCfg.CHANNEL_NOT_REQUESTED;
-                if (mContext.getResources().getBoolean(R.bool.config_wifiSupportChannelOnDataPath)
-                        && nnri.networkSpecifier.getChannelFrequencyMhz() != 0) {
-                    channel = nnri.networkSpecifier.getChannelFrequencyMhz();
-                    channelRequestType = nnri.networkSpecifier.isChannelRequired()
-                            ? NanDataPathChannelCfg.FORCE_CHANNEL_SETUP
-                            : NanDataPathChannelCfg.REQUEST_CHANNEL_SETUP;
-                }
                 mMgr.initiateDataPathSetup(networkSpecifier, nnri.specifiedPeerInstanceId,
-                        channelRequestType, channel,
+                        NanDataPathChannelCfg.CHANNEL_NOT_REQUESTED, selectChannelForRequest(nnri),
                         nnri.specifiedPeerDiscoveryMac, nnri.interfaceName,
-                        nnri.networkSpecifier.isOutOfBand(), null
-                );
+                        nnri.networkSpecifier.pmk, nnri.networkSpecifier.passphrase,
+                        nnri.networkSpecifier.isOutOfBand(), null);
                 nnri.state =
                         AwareNetworkRequestInformation.STATE_INITIATOR_WAIT_FOR_REQUEST_RESPONSE;
             } else {
@@ -1275,7 +1262,7 @@
         public int peerPort = 0; // uninitialized (invalid) value
         public int peerTransportProtocol = -1; // uninitialized (invalid) value
         public byte[] peerIpv6Override = null;
-        public List<WifiAwareChannelInfo> channelInfos;
+        public List<NanDataPathChannelInfo> channelInfo;
         public long startTimestamp = 0; // request is made (initiator) / get request (responder)
 
         NdpInfo(int ndpId) {
@@ -1298,7 +1285,7 @@
                     peerPort).append(", peerTransportProtocol=").append(
                     peerTransportProtocol).append(", startTimestamp=").append(
                     startTimestamp).append(", channelInfo=").append(
-                            channelInfos);
+                    channelInfo);
             sb.append("]");
             return sb.toString();
         }
@@ -1372,10 +1359,10 @@
                 return builder.setTransportInfo(new WifiAwareNetworkInfo()).build();
             }
             if (ndpInfos.valueAt(0).peerIpv6 != null) {
-                NdpInfo ndpInfo = ndpInfos.valueAt(0);
                 builder.setTransportInfo(
-                        new WifiAwareNetworkInfo(ndpInfo.peerIpv6, ndpInfo.peerPort,
-                                ndpInfo.peerTransportProtocol, ndpInfo.channelInfos));
+                        new WifiAwareNetworkInfo(ndpInfos.valueAt(0).peerIpv6,
+                                ndpInfos.valueAt(0).peerPort,
+                                ndpInfos.valueAt(0).peerTransportProtocol));
             }
             return builder.build();
         }
@@ -1384,9 +1371,8 @@
          * Returns a canonical descriptor for the network request.
          */
         CanonicalConnectionInfo getCanonicalDescriptor() {
-            return new CanonicalConnectionInfo(specifiedPeerDiscoveryMac,
-                    networkSpecifier.sessionId,
-                    networkSpecifier.getWifiAwareDataPathSecurityConfig());
+            return new CanonicalConnectionInfo(specifiedPeerDiscoveryMac, networkSpecifier.pmk,
+                    networkSpecifier.sessionId, networkSpecifier.passphrase);
         }
 
         static AwareNetworkRequestInformation processNetworkSpecifier(NetworkRequest request,
@@ -1462,8 +1448,7 @@
                             + " -- port/transportProtocol can only be specified on responder");
                     return null;
                 }
-                if (ns.getWifiAwareDataPathSecurityConfig() == null
-                        || !ns.getWifiAwareDataPathSecurityConfig().isValid()) {
+                if (TextUtils.isEmpty(ns.passphrase) && ns.pmk == null) {
                     Log.e(TAG, "processNetworkSpecifier: networkSpecifier=" + ns
                             + " -- port/transportProtocol can only be specified on secure ndp");
                     return null;
@@ -1526,13 +1511,17 @@
             }
 
             // validate passphrase & PMK (if provided)
-            if (ns.getWifiAwareDataPathSecurityConfig() != null
-                    && (!ns.getWifiAwareDataPathSecurityConfig().isValid()
-                    || (mgr.getCapabilities().supportedCipherSuites
-                    & ns.getWifiAwareDataPathSecurityConfig().getCipherSuite()) == 0)) {
+            if (!TextUtils.isEmpty(ns.passphrase)) { // non-null indicates usage
+                if (!WifiAwareUtils.validatePassphrase(ns.passphrase)) {
                     Log.e(TAG, "processNetworkSpecifier: networkSpecifier=" + ns.toString()
-                            + " -- invalid security config: ");
+                            + " -- invalid passphrase length: " + ns.passphrase.length());
                     return null;
+                }
+            }
+            if (ns.pmk != null && !WifiAwareUtils.validatePmk(ns.pmk)) { // non-null indicates usage
+                Log.e(TAG, "processNetworkSpecifier: networkSpecifier=" + ns.toString()
+                        + " -- invalid pmk length: " + ns.pmk.length);
+                return null;
             }
 
             // create container and populate
@@ -1578,32 +1567,41 @@
      * A canonical (unique) descriptor of the peer connection.
      */
     static class CanonicalConnectionInfo {
-        CanonicalConnectionInfo(byte[] peerDiscoveryMac, int sessionId,
-                WifiAwareDataPathSecurityConfig securityConfig) {
+        CanonicalConnectionInfo(byte[] peerDiscoveryMac, byte[] pmk, int sessionId,
+                String passphrase) {
             this.peerDiscoveryMac = peerDiscoveryMac;
+            this.pmk = pmk;
             this.sessionId = sessionId;
-            this.securityConfig = securityConfig;
+            this.passphrase = passphrase;
         }
 
         public final byte[] peerDiscoveryMac;
 
+        /*
+         * Security configuration matching:
+         * - open: pmk/passphrase = null
+         * - pmk: pmk != null, passphrase = null
+         * - passphrase: passphrase != null, sessionId used (==0 for OOB), pmk=null
+         */
+        public final byte[] pmk;
 
         public final int sessionId;
-        public final WifiAwareDataPathSecurityConfig securityConfig;
+        public final String passphrase;
 
         public boolean matches(CanonicalConnectionInfo other) {
             return Arrays.equals(peerDiscoveryMac, other.peerDiscoveryMac)
-                    && Objects.equals(securityConfig, other.securityConfig)
-                    && (securityConfig == null || sessionId == other.sessionId);
+                    && Arrays.equals(pmk, other.pmk)
+                    && TextUtils.equals(passphrase, other.passphrase)
+                    && (TextUtils.isEmpty(passphrase) || sessionId == other.sessionId);
         }
 
         @Override
         public String toString() {
             StringBuilder sb = new StringBuilder("CanonicalConnectionInfo: [");
             sb.append("peerDiscoveryMac=").append(peerDiscoveryMac == null ? ""
-                    : String.valueOf(HexEncoding.encode(peerDiscoveryMac)))
-                    .append(", security=").append(securityConfig == null ? "" : securityConfig)
-                    .append(", sessionId=").append(sessionId).append("]");
+                    : String.valueOf(HexEncoding.encode(peerDiscoveryMac))).append(", pmk=").append(
+                    pmk == null ? "" : "*").append(", sessionId=").append(sessionId).append(
+                    ", passphrase=").append(passphrase == null ? "" : "*").append("]");
             return sb.toString();
         }
     }
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareDiscoverySessionState.java b/service/java/com/android/server/wifi/aware/WifiAwareDiscoverySessionState.java
index 876f5c5..ffe0c25 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareDiscoverySessionState.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareDiscoverySessionState.java
@@ -16,18 +16,12 @@
 
 package com.android.server.wifi.aware;
 
-import static com.android.server.wifi.aware.WifiAwareStateManager.INSTANT_MODE_24GHZ;
-import static com.android.server.wifi.aware.WifiAwareStateManager.INSTANT_MODE_5GHZ;
-import static com.android.server.wifi.aware.WifiAwareStateManager.INSTANT_MODE_DISABLED;
-
 import android.hardware.wifi.V1_0.NanStatusType;
-import android.net.wifi.WifiScanner;
 import android.net.wifi.aware.IWifiAwareDiscoverySessionCallback;
 import android.net.wifi.aware.PublishConfig;
 import android.net.wifi.aware.SubscribeConfig;
 import android.net.wifi.util.HexEncoding;
 import android.os.RemoteException;
-import android.os.SystemClock;
 import android.util.Log;
 import android.util.SparseArray;
 
@@ -54,9 +48,6 @@
     private boolean mIsPublishSession;
     private boolean mIsRangingEnabled;
     private final long mCreationTime;
-    private long mUpdateTime;
-    private boolean mInstantModeEnabled;
-    private int mInstantModeBand;
 
     static class PeerInfo {
         PeerInfo(int instanceId, byte[] mac) {
@@ -79,8 +70,7 @@
 
     public WifiAwareDiscoverySessionState(WifiAwareNativeApi wifiAwareNativeApi, int sessionId,
             byte pubSubId, IWifiAwareDiscoverySessionCallback callback, boolean isPublishSession,
-            boolean isRangingEnabled, long creationTime, boolean instantModeEnabled,
-            int instantModeBand) {
+            boolean isRangingEnabled, long creationTime) {
         mWifiAwareNativeApi = wifiAwareNativeApi;
         mSessionId = sessionId;
         mPubSubId = pubSubId;
@@ -88,9 +78,6 @@
         mIsPublishSession = isPublishSession;
         mIsRangingEnabled = isRangingEnabled;
         mCreationTime = creationTime;
-        mUpdateTime = creationTime;
-        mInstantModeEnabled = instantModeEnabled;
-        mInstantModeBand = instantModeBand;
     }
 
     /**
@@ -120,29 +107,6 @@
         mIsRangingEnabled = enabled;
     }
 
-    public void setInstantModeEnabled(boolean enabled) {
-        mInstantModeEnabled = enabled;
-    }
-
-    public void setInstantModeBand(int band) {
-        mInstantModeBand = band;
-    }
-
-    /**
-     * Check the instant communication mode of the client.
-     * @param timeout Specify a interval when instant mode config timeout
-     * @return current instant mode one of the {@code INSTANT_MODE_*}
-     */
-    public int getInstantMode(long timeout) {
-        if (SystemClock.elapsedRealtime() - mUpdateTime > timeout || !mInstantModeEnabled) {
-            return INSTANT_MODE_DISABLED;
-        }
-        if (mInstantModeBand == WifiScanner.WIFI_BAND_5_GHZ) {
-            return INSTANT_MODE_5GHZ;
-        }
-        return INSTANT_MODE_24GHZ;
-    }
-
     public long getCreationTime() {
         return mCreationTime;
     }
@@ -208,7 +172,6 @@
             return false;
         }
 
-        mUpdateTime = SystemClock.elapsedRealtime();
         boolean success = mWifiAwareNativeApi.publish(transactionId, mPubSubId, config);
         if (!success) {
             try {
@@ -239,7 +202,6 @@
             return false;
         }
 
-        mUpdateTime = SystemClock.elapsedRealtime();
         boolean success = mWifiAwareNativeApi.subscribe(transactionId, mPubSubId, config);
         if (!success) {
             try {
@@ -294,30 +256,28 @@
      * Callback from HAL when a discovery occurs - i.e. when a match to an
      * active subscription request or to a solicited publish request occurs.
      * Propagates to client if registered.
-     *  @param requestorInstanceId The ID used to identify the peer in this
+     *
+     * @param requestorInstanceId The ID used to identify the peer in this
      *            matched session.
      * @param peerMac The MAC address of the peer. Never propagated to client
      *            due to privacy concerns.
      * @param serviceSpecificInfo Information from the discovery advertisement
- *            (usually not used in the match decisions).
+     *            (usually not used in the match decisions).
      * @param matchFilter The filter from the discovery advertisement (which was
-*            used in the match decision).
+     *            used in the match decision).
      * @param rangingIndication Bit mask indicating the type of ranging event triggered.
      * @param rangeMm The range to the peer in mm (valid if rangingIndication specifies ingress
-     * @param peerCiphersuite
-     * @param scid
+     *                or egress events - i.e. non-zero).
      */
     public void onMatch(int requestorInstanceId, byte[] peerMac, byte[] serviceSpecificInfo,
-            byte[] matchFilter, int rangingIndication, int rangeMm, int peerCiphersuite,
-            byte[] scid) {
+            byte[] matchFilter, int rangingIndication, int rangeMm) {
         int peerId = getPeerIdOrAddIfNew(requestorInstanceId, peerMac);
 
         try {
             if (rangingIndication == 0) {
-                mCallback.onMatch(peerId, serviceSpecificInfo, matchFilter, peerCiphersuite, scid);
+                mCallback.onMatch(peerId, serviceSpecificInfo, matchFilter);
             } else {
-                mCallback.onMatchWithDistance(peerId, serviceSpecificInfo, matchFilter, rangeMm,
-                        peerCiphersuite, scid);
+                mCallback.onMatchWithDistance(peerId, serviceSpecificInfo, matchFilter, rangeMm);
             }
         } catch (RemoteException e) {
             Log.w(TAG, "onMatch: RemoteException (FYI): " + e);
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareMetrics.java b/service/java/com/android/server/wifi/aware/WifiAwareMetrics.java
index bb1aa36..5cbf3a6 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareMetrics.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareMetrics.java
@@ -417,7 +417,8 @@
             }
 
             boolean sameApp = (anri.uid == uid) && TextUtils.equals(anri.packageName, packageName);
-            boolean isSecure = anri.networkSpecifier.getWifiAwareDataPathSecurityConfig() != null;
+            boolean isSecure = !TextUtils.isEmpty(anri.networkSpecifier.passphrase) || (
+                    anri.networkSpecifier.pmk != null && anri.networkSpecifier.pmk.length != 0);
 
             // in-app stats
             if (sameApp) {
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareNativeApi.java b/service/java/com/android/server/wifi/aware/WifiAwareNativeApi.java
index 5acb921..e132e45 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareNativeApi.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareNativeApi.java
@@ -16,14 +16,10 @@
 
 package com.android.server.wifi.aware;
 
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_128;
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_256;
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128;
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256;
-
 import android.hardware.wifi.V1_0.IWifiNanIface;
 import android.hardware.wifi.V1_0.NanBandIndex;
 import android.hardware.wifi.V1_0.NanBandSpecificConfig;
+import android.hardware.wifi.V1_0.NanCipherSuiteType;
 import android.hardware.wifi.V1_0.NanConfigRequest;
 import android.hardware.wifi.V1_0.NanDataPathSecurityType;
 import android.hardware.wifi.V1_0.NanEnableRequest;
@@ -37,15 +33,12 @@
 import android.hardware.wifi.V1_0.NanTxType;
 import android.hardware.wifi.V1_0.WifiStatus;
 import android.hardware.wifi.V1_0.WifiStatusCode;
-import android.hardware.wifi.V1_6.NanCipherSuiteType;
-import android.net.wifi.aware.AwareParams;
 import android.net.wifi.aware.ConfigRequest;
 import android.net.wifi.aware.PublishConfig;
 import android.net.wifi.aware.SubscribeConfig;
-import android.net.wifi.aware.WifiAwareDataPathSecurityConfig;
 import android.net.wifi.util.HexEncoding;
 import android.os.RemoteException;
-import android.util.ArrayMap;
+import android.text.TextUtils;
 import android.util.Log;
 import android.util.SparseIntArray;
 
@@ -90,6 +83,7 @@
         mDbg = verbose | VDBG;
     }
 
+
     private void recordTransactionId(int transactionId) {
         if (!VDBG) return;
 
@@ -131,15 +125,6 @@
         return android.hardware.wifi.V1_5.IWifiNanIface.castFrom(iface);
     }
 
-    /**
-     * (HIDL) Cast the input to a 1.6 NAN interface (possibly resulting in a null).
-     *
-     * Separate function so can be mocked in unit tests.
-     */
-    public android.hardware.wifi.V1_6.IWifiNanIface mockableCastTo_1_6(IWifiNanIface iface) {
-        return android.hardware.wifi.V1_6.IWifiNanIface.castFrom(iface);
-    }
-
     /*
      * Parameters settable through the shell command.
      * see wifi/1.0/types.hal NanBandSpecificConfig.discoveryWindowIntervalVal and
@@ -184,48 +169,8 @@
     /* package */ static final String PARAM_MAC_RANDOM_INTERVAL_SEC = "mac_random_interval_sec";
     private static final int PARAM_MAC_RANDOM_INTERVAL_SEC_DEFAULT = 1800; // 30 minutes
 
-    private final Map<String, Map<String, Integer>> mSettablePowerParameters = new HashMap<>();
-    private final Map<String, Integer> mSettableParameters = new HashMap<>();
-    private final Map<String, Integer> mExternalSetParams = new ArrayMap<>();
-
-    /**
-     * Accept using parameter from external to config the Aware
-     */
-    public void setAwareParams(AwareParams parameters) {
-        mExternalSetParams.clear();
-        if (parameters == null) {
-            return;
-        }
-        if (mDbg) {
-            Log.v(TAG, "setting Aware Parameters=" + parameters);
-        }
-        if (parameters.getDiscoveryWindowWakeInterval24Ghz() > 0
-                && parameters.getDiscoveryWindowWakeInterval24Ghz() <= 5) {
-            mExternalSetParams.put(PARAM_DW_24GHZ,
-                    parameters.getDiscoveryWindowWakeInterval24Ghz());
-        }
-        if (parameters.getDiscoveryWindowWakeInterval5Ghz() >= 0
-                && parameters.getDiscoveryWindowWakeInterval5Ghz() <= 5) {
-            mExternalSetParams.put(PARAM_DW_5GHZ, parameters.getDiscoveryWindowWakeInterval5Ghz());
-        }
-        if (parameters.getDiscoveryBeaconIntervalMillis() > 0) {
-            mExternalSetParams.put(PARAM_DISCOVERY_BEACON_INTERVAL_MS,
-                    parameters.getDiscoveryBeaconIntervalMillis());
-        }
-        if (parameters.getNumSpatialStreamsInDiscovery() > 0) {
-            mExternalSetParams.put(PARAM_NUM_SS_IN_DISCOVERY,
-                    parameters.getNumSpatialStreamsInDiscovery());
-        }
-        if (parameters.getMacRandomizationIntervalSeconds() > 0
-                && parameters.getMacRandomizationIntervalSeconds() <= 1800) {
-            mExternalSetParams.put(PARAM_MAC_RANDOM_INTERVAL_SEC,
-                    parameters.getMacRandomizationIntervalSeconds());
-        }
-        if (parameters.isDwEarlyTerminationEnabled()) {
-            mExternalSetParams.put(PARAM_ENABLE_DW_EARLY_TERM, 1);
-        }
-    }
-
+    private Map<String, Map<String, Integer>> mSettablePowerParameters = new HashMap<>();
+    private Map<String, Integer> mSettableParameters = new HashMap<>();
 
     /**
      * Interpreter of adb shell command 'adb shell wifiaware native_api ...'.
@@ -358,7 +303,6 @@
 
         mSettableParameters.put(PARAM_MAC_RANDOM_INTERVAL_SEC,
                 PARAM_MAC_RANDOM_INTERVAL_SEC_DEFAULT);
-        mExternalSetParams.clear();
     }
 
     @Override
@@ -427,20 +371,18 @@
      * @param isIdle PowerManager.isIdle
      * @param rangingEnabled Indicates whether or not enable ranging.
      * @param isInstantCommunicationEnabled Indicates whether or not enable instant communication
-     * @param instantModeChannel
+     *                                      mode.
      */
     public boolean enableAndConfigure(short transactionId, ConfigRequest configRequest,
             boolean notifyIdentityChange, boolean initialConfiguration, boolean isInteractive,
-            boolean isIdle, boolean rangingEnabled, boolean isInstantCommunicationEnabled,
-            int instantModeChannel) {
+            boolean isIdle, boolean rangingEnabled, boolean isInstantCommunicationEnabled) {
         if (mDbg) {
             Log.v(TAG, "enableAndConfigure: transactionId=" + transactionId + ", configRequest="
                     + configRequest + ", notifyIdentityChange=" + notifyIdentityChange
                     + ", initialConfiguration=" + initialConfiguration
                     + ", isInteractive=" + isInteractive + ", isIdle=" + isIdle
                     + ", isRangingEnabled=" + rangingEnabled
-                    + ", isInstantCommunicationEnabled=" + isInstantCommunicationEnabled
-                    + ", instantModeChannel=" + instantModeChannel);
+                    + ", isInstantCommunicationEnabled=" + isInstantCommunicationEnabled);
         }
         recordTransactionId(transactionId);
 
@@ -452,13 +394,10 @@
         android.hardware.wifi.V1_2.IWifiNanIface iface12 = mockableCastTo_1_2(iface);
         android.hardware.wifi.V1_4.IWifiNanIface iface14 = mockableCastTo_1_4(iface);
         android.hardware.wifi.V1_5.IWifiNanIface iface15 = mockableCastTo_1_5(iface);
-        android.hardware.wifi.V1_6.IWifiNanIface iface16 = mockableCastTo_1_6(iface);
         android.hardware.wifi.V1_2.NanConfigRequestSupplemental configSupplemental12 =
                 new android.hardware.wifi.V1_2.NanConfigRequestSupplemental();
         android.hardware.wifi.V1_5.NanConfigRequestSupplemental configSupplemental15 =
                 new android.hardware.wifi.V1_5.NanConfigRequestSupplemental();
-        android.hardware.wifi.V1_6.NanConfigRequestSupplemental configSupplemental16 =
-                new android.hardware.wifi.V1_6.NanConfigRequestSupplemental();
         if (iface12 != null || iface14 != null) {
             configSupplemental12.discoveryBeaconIntervalMs = 0;
             configSupplemental12.numberOfSpatialStreamsInDiscovery = 0;
@@ -470,10 +409,6 @@
             configSupplemental15.V1_2 = configSupplemental12;
             configSupplemental15.enableInstantCommunicationMode = isInstantCommunicationEnabled;
         }
-        if (iface16 != null) {
-            configSupplemental16.V1_5 = configSupplemental15;
-            configSupplemental16.instantModeChannel = instantModeChannel;
-        }
 
         NanBandSpecificConfig config24 = new NanBandSpecificConfig();
         config24.rssiClose = 60;
@@ -528,7 +463,7 @@
         try {
             WifiStatus status;
             if (initialConfiguration) {
-                if (iface14 != null || iface15 != null || iface16 != null) {
+                if (iface14 != null || iface15 != null) {
                     // translate framework to HIDL configuration (V_1.4)
                     android.hardware.wifi.V1_4.NanEnableRequest req =
                             new android.hardware.wifi.V1_4.NanEnableRequest();
@@ -548,9 +483,8 @@
                     req.configParams.includeSubscribeServiceIdsInBeacon = true;
                     req.configParams.numberOfSubscribeServiceIdsInBeacon = 0;
                     req.configParams.rssiWindowSize = 8;
-                    req.configParams.macAddressRandomizationIntervalSec =
-                            mExternalSetParams.getOrDefault(PARAM_MAC_RANDOM_INTERVAL_SEC,
-                                    mSettableParameters.get(PARAM_MAC_RANDOM_INTERVAL_SEC));
+                    req.configParams.macAddressRandomizationIntervalSec = mSettableParameters.get(
+                            PARAM_MAC_RANDOM_INTERVAL_SEC);
 
                     req.configParams.bandSpecificConfig[NanBandIndex.NAN_BAND_24GHZ] = config24;
                     req.configParams.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ] = config5;
@@ -585,10 +519,7 @@
                     updateConfigForPowerSettings14(req.configParams, configSupplemental12,
                             isInteractive, isIdle);
 
-                    if (iface16 != null) {
-                        status = iface16.enableRequest_1_6(transactionId, req,
-                                configSupplemental16);
-                    } else if (iface15 != null) {
+                    if (iface15 != null) {
                         status = iface15.enableRequest_1_5(transactionId, req,
                                 configSupplemental15);
                     } else {
@@ -612,9 +543,8 @@
                     req.configParams.includeSubscribeServiceIdsInBeacon = true;
                     req.configParams.numberOfSubscribeServiceIdsInBeacon = 0;
                     req.configParams.rssiWindowSize = 8;
-                    req.configParams.macAddressRandomizationIntervalSec =
-                            mExternalSetParams.getOrDefault(PARAM_MAC_RANDOM_INTERVAL_SEC,
-                                    mSettableParameters.get(PARAM_MAC_RANDOM_INTERVAL_SEC));
+                    req.configParams.macAddressRandomizationIntervalSec = mSettableParameters.get(
+                            PARAM_MAC_RANDOM_INTERVAL_SEC);
 
                     req.configParams.bandSpecificConfig[NanBandIndex.NAN_BAND_24GHZ] = config24;
                     req.configParams.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ] = config5;
@@ -650,7 +580,7 @@
                     }
                 }
             } else {
-                if (iface14 != null || iface15 != null || iface16 != null) {
+                if (iface14 != null || iface15 != null) {
                     android.hardware.wifi.V1_4.NanConfigRequest req =
                             new android.hardware.wifi.V1_4.NanConfigRequest();
                     req.masterPref = (byte) configRequest.mMasterPreference;
@@ -662,9 +592,8 @@
                     req.includeSubscribeServiceIdsInBeacon = true;
                     req.numberOfSubscribeServiceIdsInBeacon = 0;
                     req.rssiWindowSize = 8;
-                    req.macAddressRandomizationIntervalSec =
-                            mExternalSetParams.getOrDefault(PARAM_MAC_RANDOM_INTERVAL_SEC,
-                                    mSettableParameters.get(PARAM_MAC_RANDOM_INTERVAL_SEC));
+                    req.macAddressRandomizationIntervalSec = mSettableParameters.get(
+                            PARAM_MAC_RANDOM_INTERVAL_SEC);
 
                     req.bandSpecificConfig[NanBandIndex.NAN_BAND_24GHZ] = config24;
                     req.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ] = config5;
@@ -673,10 +602,7 @@
 
                     updateConfigForPowerSettings14(req, configSupplemental12,
                             isInteractive, isIdle);
-                    if (iface16 != null) {
-                        status = iface16.configRequest_1_6(transactionId, req,
-                                configSupplemental16);
-                    } else if (iface15 != null) {
+                    if (iface15 != null) {
                         status = iface15.configRequest_1_5(transactionId, req,
                                 configSupplemental15);
                     } else {
@@ -694,9 +620,8 @@
                     req.includeSubscribeServiceIdsInBeacon = true;
                     req.numberOfSubscribeServiceIdsInBeacon = 0;
                     req.rssiWindowSize = 8;
-                    req.macAddressRandomizationIntervalSec =
-                            mExternalSetParams.getOrDefault(PARAM_MAC_RANDOM_INTERVAL_SEC,
-                                    mSettableParameters.get(PARAM_MAC_RANDOM_INTERVAL_SEC));
+                    req.macAddressRandomizationIntervalSec = mSettableParameters.get(
+                            PARAM_MAC_RANDOM_INTERVAL_SEC);
 
                     req.bandSpecificConfig[NanBandIndex.NAN_BAND_24GHZ] = config24;
                     req.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ] = config5;
@@ -776,125 +701,45 @@
             return false;
         }
 
-        android.hardware.wifi.V1_6.IWifiNanIface iface16 = mockableCastTo_1_6(iface);
-        if (iface16 == null) {
-            NanPublishRequest req = new NanPublishRequest();
-            req.baseConfigs.sessionId = publishId;
-            req.baseConfigs.ttlSec = (short) publishConfig.mTtlSec;
-            req.baseConfigs.discoveryWindowPeriod = 1;
-            req.baseConfigs.discoveryCount = 0;
-            convertNativeByteArrayToArrayList(publishConfig.mServiceName,
-                    req.baseConfigs.serviceName);
-            req.baseConfigs.discoveryMatchIndicator = NanMatchAlg.MATCH_NEVER;
-            convertNativeByteArrayToArrayList(publishConfig.mServiceSpecificInfo,
-                    req.baseConfigs.serviceSpecificInfo);
-            convertNativeByteArrayToArrayList(publishConfig.mMatchFilter,
-                    publishConfig.mPublishType == PublishConfig.PUBLISH_TYPE_UNSOLICITED
-                            ? req.baseConfigs.txMatchFilter : req.baseConfigs.rxMatchFilter);
-            req.baseConfigs.useRssiThreshold = false;
-            req.baseConfigs.disableDiscoveryTerminationIndication =
-                    !publishConfig.mEnableTerminateNotification;
-            req.baseConfigs.disableMatchExpirationIndication = true;
-            req.baseConfigs.disableFollowupReceivedIndication = false;
+        NanPublishRequest req = new NanPublishRequest();
+        req.baseConfigs.sessionId = publishId;
+        req.baseConfigs.ttlSec = (short) publishConfig.mTtlSec;
+        req.baseConfigs.discoveryWindowPeriod = 1;
+        req.baseConfigs.discoveryCount = 0;
+        convertNativeByteArrayToArrayList(publishConfig.mServiceName, req.baseConfigs.serviceName);
+        req.baseConfigs.discoveryMatchIndicator = NanMatchAlg.MATCH_NEVER;
+        convertNativeByteArrayToArrayList(publishConfig.mServiceSpecificInfo,
+                req.baseConfigs.serviceSpecificInfo);
+        convertNativeByteArrayToArrayList(publishConfig.mMatchFilter,
+                publishConfig.mPublishType == PublishConfig.PUBLISH_TYPE_UNSOLICITED
+                        ? req.baseConfigs.txMatchFilter : req.baseConfigs.rxMatchFilter);
+        req.baseConfigs.useRssiThreshold = false;
+        req.baseConfigs.disableDiscoveryTerminationIndication =
+                !publishConfig.mEnableTerminateNotification;
+        req.baseConfigs.disableMatchExpirationIndication = true;
+        req.baseConfigs.disableFollowupReceivedIndication = false;
 
-            req.autoAcceptDataPathRequests = false;
+        req.autoAcceptDataPathRequests = false;
 
-            req.baseConfigs.rangingRequired = publishConfig.mEnableRanging;
+        req.baseConfigs.rangingRequired = publishConfig.mEnableRanging;
 
-            req.baseConfigs.securityConfig.securityType = NanDataPathSecurityType.OPEN;
-            WifiAwareDataPathSecurityConfig securityConfig = publishConfig.getSecurityConfig();
-            if (securityConfig != null) {
-                req.baseConfigs.securityConfig.cipherType = getHalCipherSuiteType(
-                        securityConfig.getCipherSuite());
-                if (securityConfig.getPmk() != null && securityConfig.getPmk().length != 0) {
-                    req.baseConfigs.securityConfig.securityType = NanDataPathSecurityType.PMK;
-                    copyArray(securityConfig.getPmk(), req.baseConfigs.securityConfig.pmk);
-                }
-                if (securityConfig.getPskPassphrase() != null
-                        && securityConfig.getPskPassphrase().length() != 0) {
-                    req.baseConfigs.securityConfig.securityType =
-                            NanDataPathSecurityType.PASSPHRASE;
-                    convertNativeByteArrayToArrayList(securityConfig.getPskPassphrase().getBytes(),
-                            req.baseConfigs.securityConfig.passphrase);
-                }
-            }
+        // TODO: configure security
+        req.baseConfigs.securityConfig.securityType = NanDataPathSecurityType.OPEN;
 
-            req.publishType = publishConfig.mPublishType;
-            req.txType = NanTxType.BROADCAST;
+        req.publishType = publishConfig.mPublishType;
+        req.txType = NanTxType.BROADCAST;
 
-            try {
-                WifiStatus status = iface.startPublishRequest(transactionId, req);
-                if (status.code == WifiStatusCode.SUCCESS) {
-                    return true;
-                } else {
-                    Log.e(TAG, "publish: error: " + statusString(status));
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "publish: exception: " + e);
+        try {
+            WifiStatus status = iface.startPublishRequest(transactionId, req);
+            if (status.code == WifiStatusCode.SUCCESS) {
+                return true;
+            } else {
+                Log.e(TAG, "publish: error: " + statusString(status));
                 return false;
             }
-        } else {
-            android.hardware.wifi.V1_6.NanPublishRequest req =
-                    new android.hardware.wifi.V1_6.NanPublishRequest();
-            req.baseConfigs.sessionId = publishId;
-            req.baseConfigs.ttlSec = (short) publishConfig.mTtlSec;
-            req.baseConfigs.discoveryWindowPeriod = 1;
-            req.baseConfigs.discoveryCount = 0;
-            convertNativeByteArrayToArrayList(publishConfig.mServiceName,
-                    req.baseConfigs.serviceName);
-            req.baseConfigs.discoveryMatchIndicator = NanMatchAlg.MATCH_NEVER;
-            convertNativeByteArrayToArrayList(publishConfig.mServiceSpecificInfo,
-                    req.baseConfigs.serviceSpecificInfo);
-            convertNativeByteArrayToArrayList(publishConfig.mMatchFilter,
-                    publishConfig.mPublishType == PublishConfig.PUBLISH_TYPE_UNSOLICITED
-                            ? req.baseConfigs.txMatchFilter : req.baseConfigs.rxMatchFilter);
-            req.baseConfigs.useRssiThreshold = false;
-            req.baseConfigs.disableDiscoveryTerminationIndication =
-                    !publishConfig.mEnableTerminateNotification;
-            req.baseConfigs.disableMatchExpirationIndication = true;
-            req.baseConfigs.disableFollowupReceivedIndication = false;
-
-            req.autoAcceptDataPathRequests = false;
-
-            req.baseConfigs.rangingRequired = publishConfig.mEnableRanging;
-
-            req.baseConfigs.securityConfig.securityType = NanDataPathSecurityType.OPEN;
-            WifiAwareDataPathSecurityConfig securityConfig = publishConfig.getSecurityConfig();
-            if (securityConfig != null) {
-                req.baseConfigs.securityConfig.cipherType = getHalCipherSuiteType(
-                        securityConfig.getCipherSuite());
-                if (securityConfig.getPmk() != null && securityConfig.getPmk().length != 0) {
-                    req.baseConfigs.securityConfig.securityType = NanDataPathSecurityType.PMK;
-                    copyArray(securityConfig.getPmk(), req.baseConfigs.securityConfig.pmk);
-                }
-                if (securityConfig.getPskPassphrase() != null
-                        && securityConfig.getPskPassphrase().length() != 0) {
-                    req.baseConfigs.securityConfig.securityType =
-                            NanDataPathSecurityType.PASSPHRASE;
-                    convertNativeByteArrayToArrayList(securityConfig.getPskPassphrase().getBytes(),
-                            req.baseConfigs.securityConfig.passphrase);
-                }
-                if (securityConfig.getPmkId() != null && securityConfig.getPmkId().length != 0) {
-                    copyArray(securityConfig.getPmkId(), req.baseConfigs.securityConfig.scid);
-                }
-            }
-
-            req.publishType = publishConfig.mPublishType;
-            req.txType = NanTxType.BROADCAST;
-
-            try {
-                WifiStatus status = iface16.startPublishRequest_1_6(transactionId, req);
-                if (status.code == WifiStatusCode.SUCCESS) {
-                    return true;
-                } else {
-                    Log.e(TAG, "publish: error: " + statusString(status));
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "publish: exception: " + e);
-                return false;
-            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "publish: exception: " + e);
+            return false;
         }
     }
 
@@ -1170,6 +1015,7 @@
     /**
      * Initiates setting up a data-path between device and peer. Security is provided by either
      * PMK or Passphrase (not both) - if both are null then an open (unencrypted) link is set up.
+     *
      * @param transactionId      Transaction ID for the transaction - used in the async callback to
      *                           match with the original request.
      * @param peerId             ID of the peer ID to associate the data path with. A value of 0
@@ -1180,21 +1026,22 @@
      * @param channel            The channel on which to set up the data-path.
      * @param peer               The MAC address of the peer to create a connection with.
      * @param interfaceName      The interface on which to create the data connection.
+     * @param pmk Pairwise master key (PMK - see IEEE 802.11i) for the data-path.
+     * @param passphrase  Passphrase for the data-path.
      * @param isOutOfBand Is the data-path out-of-band (i.e. without a corresponding Aware discovery
      *                    session).
      * @param appInfo Arbitrary binary blob transmitted to the peer.
      * @param capabilities The capabilities of the firmware.
-     * @param securityConfig Security config to encrypt the data-path
      */
     public boolean initiateDataPath(short transactionId, int peerId, int channelRequestType,
-            int channel, byte[] peer, String interfaceName,
-            boolean isOutOfBand, byte[] appInfo, Capabilities capabilities,
-            WifiAwareDataPathSecurityConfig securityConfig) {
+            int channel, byte[] peer, String interfaceName, byte[] pmk, String passphrase,
+            boolean isOutOfBand, byte[] appInfo, Capabilities capabilities) {
         if (mDbg) {
             Log.v(TAG, "initiateDataPath: transactionId=" + transactionId + ", peerId=" + peerId
                     + ", channelRequestType=" + channelRequestType + ", channel=" + channel
                     + ", peer=" + String.valueOf(HexEncoding.encode(peer)) + ", interfaceName="
-                    + interfaceName + ", securityConfig=" + securityConfig
+                    + interfaceName + ", pmk=" + ((pmk == null) ? "<null>" : "<*>")
+                    + ", passphrase=" + (TextUtils.isEmpty(passphrase) ? "<empty>" : "<*>")
                     + ", isOutOfBand=" + isOutOfBand + ", appInfo.length="
                     + ((appInfo == null) ? 0 : appInfo.length) + ", capabilities=" + capabilities);
         }
@@ -1211,126 +1058,71 @@
             return false;
         }
 
-        android.hardware.wifi.V1_6.IWifiNanIface iface16 = mockableCastTo_1_6(iface);
+        NanInitiateDataPathRequest req = new NanInitiateDataPathRequest();
+        req.peerId = peerId;
+        copyArray(peer, req.peerDiscMacAddr);
+        req.channelRequestType = channelRequestType;
+        req.channel = channel;
+        req.ifaceName = interfaceName;
+        req.securityConfig.securityType = NanDataPathSecurityType.OPEN;
+        if (pmk != null && pmk.length != 0) {
+            req.securityConfig.cipherType = getStrongestCipherSuiteType(
+                    capabilities.supportedCipherSuites);
+            req.securityConfig.securityType = NanDataPathSecurityType.PMK;
+            copyArray(pmk, req.securityConfig.pmk);
+        }
+        if (passphrase != null && passphrase.length() != 0) {
+            req.securityConfig.cipherType = getStrongestCipherSuiteType(
+                    capabilities.supportedCipherSuites);
+            req.securityConfig.securityType = NanDataPathSecurityType.PASSPHRASE;
+            convertNativeByteArrayToArrayList(passphrase.getBytes(), req.securityConfig.passphrase);
+        }
 
-        if (iface16 == null) {
-            NanInitiateDataPathRequest req = new NanInitiateDataPathRequest();
-            req.peerId = peerId;
-            copyArray(peer, req.peerDiscMacAddr);
-            req.channelRequestType = channelRequestType;
-            req.channel = channel;
-            req.ifaceName = interfaceName;
-            req.securityConfig.securityType = NanDataPathSecurityType.OPEN;
-            if (securityConfig != null) {
-                req.securityConfig.cipherType = getHalCipherSuiteType(
-                        securityConfig.getCipherSuite());
-                if (securityConfig.getPmk() != null && securityConfig.getPmk().length != 0) {
+        if (req.securityConfig.securityType != NanDataPathSecurityType.OPEN && isOutOfBand) {
+            convertNativeByteArrayToArrayList(
+                    SERVICE_NAME_FOR_OOB_DATA_PATH.getBytes(StandardCharsets.UTF_8),
+                    req.serviceNameOutOfBand);
+        }
+        convertNativeByteArrayToArrayList(appInfo, req.appInfo);
 
-                    req.securityConfig.securityType = NanDataPathSecurityType.PMK;
-                    copyArray(securityConfig.getPmk(), req.securityConfig.pmk);
-                }
-                if (securityConfig.getPskPassphrase() != null
-                        && securityConfig.getPskPassphrase().length() != 0) {
-                    req.securityConfig.securityType = NanDataPathSecurityType.PASSPHRASE;
-                    convertNativeByteArrayToArrayList(securityConfig.getPskPassphrase().getBytes(),
-                            req.securityConfig.passphrase);
-                }
-            }
-
-            if (req.securityConfig.securityType != NanDataPathSecurityType.OPEN && isOutOfBand) {
-                convertNativeByteArrayToArrayList(
-                        SERVICE_NAME_FOR_OOB_DATA_PATH.getBytes(StandardCharsets.UTF_8),
-                        req.serviceNameOutOfBand);
-            }
-            convertNativeByteArrayToArrayList(appInfo, req.appInfo);
-
-            try {
-                WifiStatus status = iface.initiateDataPathRequest(transactionId, req);
-                if (status.code == WifiStatusCode.SUCCESS) {
-                    return true;
-                } else {
-                    Log.e(TAG, "initiateDataPath: error: " + statusString(status));
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "initiateDataPath: exception: " + e);
+        try {
+            WifiStatus status = iface.initiateDataPathRequest(transactionId, req);
+            if (status.code == WifiStatusCode.SUCCESS) {
+                return true;
+            } else {
+                Log.e(TAG, "initiateDataPath: error: " + statusString(status));
                 return false;
             }
-        } else {
-            android.hardware.wifi.V1_6.NanInitiateDataPathRequest req =
-                    new android.hardware.wifi.V1_6.NanInitiateDataPathRequest();
-            req.peerId = peerId;
-            copyArray(peer, req.peerDiscMacAddr);
-            req.channelRequestType = channelRequestType;
-            req.channel = channel;
-            req.ifaceName = interfaceName;
-            req.securityConfig.securityType = NanDataPathSecurityType.OPEN;
-            if (securityConfig != null) {
-                req.securityConfig.cipherType = getHalCipherSuiteType(
-                        securityConfig.getCipherSuite());
-                if (securityConfig.getPmk() != null && securityConfig.getPmk().length != 0) {
-                    req.securityConfig.securityType = NanDataPathSecurityType.PMK;
-                    copyArray(securityConfig.getPmk(), req.securityConfig.pmk);
-                }
-                if (securityConfig.getPskPassphrase() != null
-                        && securityConfig.getPskPassphrase().length() != 0) {
-                    req.securityConfig.securityType = NanDataPathSecurityType.PASSPHRASE;
-                    convertNativeByteArrayToArrayList(securityConfig.getPskPassphrase().getBytes(),
-                            req.securityConfig.passphrase);
-                }
-                if (securityConfig.getPmkId() != null && securityConfig.getPmkId().length != 0) {
-                    copyArray(securityConfig.getPmkId(), req.securityConfig.scid);
-                }
-            }
-
-            if (req.securityConfig.securityType != NanDataPathSecurityType.OPEN && isOutOfBand) {
-                convertNativeByteArrayToArrayList(
-                        SERVICE_NAME_FOR_OOB_DATA_PATH.getBytes(StandardCharsets.UTF_8),
-                        req.serviceNameOutOfBand);
-            }
-            convertNativeByteArrayToArrayList(appInfo, req.appInfo);
-
-            try {
-                WifiStatus status = iface16.initiateDataPathRequest_1_6(transactionId, req);
-                if (status.code == WifiStatusCode.SUCCESS) {
-                    return true;
-                } else {
-                    Log.e(TAG, "initiateDataPath_1_6: error: " + statusString(status));
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "initiateDataPath_1_6: exception: " + e);
-                return false;
-            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "initiateDataPath: exception: " + e);
+            return false;
         }
     }
 
-
-
     /**
      * Responds to a data request from a peer. Security is provided by either PMK or Passphrase (not
      * both) - if both are null then an open (unencrypted) link is set up.
+     *
      * @param transactionId Transaction ID for the transaction - used in the async callback to
      *                      match with the original request.
      * @param accept Accept (true) or reject (false) the original call.
      * @param ndpId The NDP (Aware data path) ID. Obtained from the request callback.
      * @param interfaceName The interface on which the data path will be setup. Obtained from the
-*                      request callback.
+     *                      request callback.
+     * @param pmk Pairwise master key (PMK - see IEEE 802.11i) for the data-path.
+     * @param passphrase  Passphrase for the data-path.
      * @param appInfo Arbitrary binary blob transmitted to the peer.
      * @param isOutOfBand Is the data-path out-of-band (i.e. without a corresponding Aware discovery
-*                    session).
+     *                    session).
      * @param capabilities The capabilities of the firmware.
-     * @param securityConfig Security config to encrypt the data-path
      */
     public boolean respondToDataPathRequest(short transactionId, boolean accept, int ndpId,
-            String interfaceName, byte[] appInfo,
-            boolean isOutOfBand, Capabilities capabilities,
-            WifiAwareDataPathSecurityConfig securityConfig) {
+            String interfaceName, byte[] pmk, String passphrase, byte[] appInfo,
+            boolean isOutOfBand, Capabilities capabilities) {
         if (mDbg) {
             Log.v(TAG, "respondToDataPathRequest: transactionId=" + transactionId + ", accept="
                     + accept + ", int ndpId=" + ndpId + ", interfaceName=" + interfaceName
-                    + ", appInfo.length=" + ((appInfo == null) ? 0 : appInfo.length)
-                    + ", securityConfig" + securityConfig);
+                    + ", appInfo.length=" + ((appInfo == null) ? 0 : appInfo.length));
         }
         recordTransactionId(transactionId);
 
@@ -1341,99 +1133,46 @@
         }
 
         if (capabilities == null) {
-            Log.e(TAG, "respondToDataPathRequest: null capabilities");
+            Log.e(TAG, "initiateDataPath: null capabilities");
             return false;
         }
 
-        android.hardware.wifi.V1_6.IWifiNanIface iface16 = mockableCastTo_1_6(iface);
+        NanRespondToDataPathIndicationRequest req = new NanRespondToDataPathIndicationRequest();
+        req.acceptRequest = accept;
+        req.ndpInstanceId = ndpId;
+        req.ifaceName = interfaceName;
+        req.securityConfig.securityType = NanDataPathSecurityType.OPEN;
+        if (pmk != null && pmk.length != 0) {
+            req.securityConfig.cipherType = getStrongestCipherSuiteType(
+                    capabilities.supportedCipherSuites);
+            req.securityConfig.securityType = NanDataPathSecurityType.PMK;
+            copyArray(pmk, req.securityConfig.pmk);
+        }
+        if (passphrase != null && passphrase.length() != 0) {
+            req.securityConfig.cipherType = getStrongestCipherSuiteType(
+                    capabilities.supportedCipherSuites);
+            req.securityConfig.securityType = NanDataPathSecurityType.PASSPHRASE;
+            convertNativeByteArrayToArrayList(passphrase.getBytes(), req.securityConfig.passphrase);
+        }
 
-        if (iface16 == null) {
-            NanRespondToDataPathIndicationRequest req = new NanRespondToDataPathIndicationRequest();
-            req.acceptRequest = accept;
-            req.ndpInstanceId = ndpId;
-            req.ifaceName = interfaceName;
-            req.securityConfig.securityType = NanDataPathSecurityType.OPEN;
-            if (securityConfig != null) {
-                req.securityConfig.cipherType = getHalCipherSuiteType(
-                        securityConfig.getCipherSuite());
-                if (securityConfig.getPmk() != null && securityConfig.getPmk().length != 0) {
+        if (req.securityConfig.securityType != NanDataPathSecurityType.OPEN && isOutOfBand) {
+            convertNativeByteArrayToArrayList(
+                    SERVICE_NAME_FOR_OOB_DATA_PATH.getBytes(StandardCharsets.UTF_8),
+                    req.serviceNameOutOfBand);
+        }
+        convertNativeByteArrayToArrayList(appInfo, req.appInfo);
 
-                    req.securityConfig.securityType = NanDataPathSecurityType.PMK;
-                    copyArray(securityConfig.getPmk(), req.securityConfig.pmk);
-                }
-                if (securityConfig.getPskPassphrase() != null
-                        && securityConfig.getPskPassphrase().length() != 0) {
-                    req.securityConfig.securityType = NanDataPathSecurityType.PASSPHRASE;
-                    convertNativeByteArrayToArrayList(securityConfig.getPskPassphrase().getBytes(),
-                            req.securityConfig.passphrase);
-                }
-            }
-
-            if (req.securityConfig.securityType != NanDataPathSecurityType.OPEN && isOutOfBand) {
-                convertNativeByteArrayToArrayList(
-                        SERVICE_NAME_FOR_OOB_DATA_PATH.getBytes(StandardCharsets.UTF_8),
-                        req.serviceNameOutOfBand);
-            }
-            convertNativeByteArrayToArrayList(appInfo, req.appInfo);
-
-            try {
-                WifiStatus status = iface.respondToDataPathIndicationRequest(transactionId, req);
-                if (status.code == WifiStatusCode.SUCCESS) {
-                    return true;
-                } else {
-                    Log.e(TAG, "respondToDataPathRequest: error: " + statusString(status));
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "respondToDataPathRequest: exception: " + e);
+        try {
+            WifiStatus status = iface.respondToDataPathIndicationRequest(transactionId, req);
+            if (status.code == WifiStatusCode.SUCCESS) {
+                return true;
+            } else {
+                Log.e(TAG, "respondToDataPathRequest: error: " + statusString(status));
                 return false;
             }
-        } else {
-            android.hardware.wifi.V1_6.NanRespondToDataPathIndicationRequest req =
-                    new android.hardware.wifi.V1_6.NanRespondToDataPathIndicationRequest();
-            req.acceptRequest = accept;
-            req.ndpInstanceId = ndpId;
-            req.ifaceName = interfaceName;
-            req.securityConfig.securityType = NanDataPathSecurityType.OPEN;
-            if (securityConfig != null) {
-                req.securityConfig.cipherType = getHalCipherSuiteType(
-                        securityConfig.getCipherSuite());
-                if (securityConfig.getPmk() != null && securityConfig.getPmk().length != 0) {
-
-                    req.securityConfig.securityType = NanDataPathSecurityType.PMK;
-                    copyArray(securityConfig.getPmk(), req.securityConfig.pmk);
-                }
-                if (securityConfig.getPskPassphrase() != null
-                        && securityConfig.getPskPassphrase().length() != 0) {
-                    req.securityConfig.securityType = NanDataPathSecurityType.PASSPHRASE;
-                    convertNativeByteArrayToArrayList(securityConfig.getPskPassphrase().getBytes(),
-                            req.securityConfig.passphrase);
-                }
-                if (securityConfig.getPmkId() != null && securityConfig.getPmkId().length != 0) {
-                    copyArray(securityConfig.getPmkId(), req.securityConfig.scid);
-                }
-            }
-
-            if (req.securityConfig.securityType != NanDataPathSecurityType.OPEN && isOutOfBand) {
-                convertNativeByteArrayToArrayList(
-                        SERVICE_NAME_FOR_OOB_DATA_PATH.getBytes(StandardCharsets.UTF_8),
-                        req.serviceNameOutOfBand);
-            }
-            convertNativeByteArrayToArrayList(appInfo, req.appInfo);
-
-            try {
-                WifiStatus status = iface16
-                        .respondToDataPathIndicationRequest_1_6(transactionId, req);
-                if (status.code == WifiStatusCode.SUCCESS) {
-                    return true;
-                } else {
-                    Log.e(TAG, "respondToDataPathRequest_1_6: error: " + statusString(status));
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "respondToDataPathRequest_1_6: exception: " + e);
-                return false;
-            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "respondToDataPathRequest: exception: " + e);
+            return false;
         }
     }
 
@@ -1487,16 +1226,16 @@
         }
 
         updateSingleConfigForPowerSettings(req.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ],
-                getSettablePowerParameters(key, PARAM_DW_5GHZ));
+                mSettablePowerParameters.get(key).get(PARAM_DW_5GHZ));
         updateSingleConfigForPowerSettings(req.bandSpecificConfig[NanBandIndex.NAN_BAND_24GHZ],
-                getSettablePowerParameters(key, PARAM_DW_24GHZ));
+                mSettablePowerParameters.get(key).get(PARAM_DW_24GHZ));
 
-        configSupplemental12.discoveryBeaconIntervalMs = getSettablePowerParameters(key,
+        configSupplemental12.discoveryBeaconIntervalMs = mSettablePowerParameters.get(key).get(
                 PARAM_DISCOVERY_BEACON_INTERVAL_MS);
-        configSupplemental12.numberOfSpatialStreamsInDiscovery = getSettablePowerParameters(key,
-                PARAM_NUM_SS_IN_DISCOVERY);
-        configSupplemental12.enableDiscoveryWindowEarlyTermination = getSettablePowerParameters(key,
-                PARAM_ENABLE_DW_EARLY_TERM) != 0;
+        configSupplemental12.numberOfSpatialStreamsInDiscovery = mSettablePowerParameters.get(
+                key).get(PARAM_NUM_SS_IN_DISCOVERY);
+        configSupplemental12.enableDiscoveryWindowEarlyTermination = mSettablePowerParameters.get(
+                key).get(PARAM_ENABLE_DW_EARLY_TERM) != 0;
     }
 
     /**
@@ -1513,26 +1252,19 @@
         }
 
         updateSingleConfigForPowerSettings(req.bandSpecificConfig[NanBandIndex.NAN_BAND_5GHZ],
-                getSettablePowerParameters(key, PARAM_DW_5GHZ));
+                mSettablePowerParameters.get(key).get(PARAM_DW_5GHZ));
         updateSingleConfigForPowerSettings(req.bandSpecificConfig[NanBandIndex.NAN_BAND_24GHZ],
-                getSettablePowerParameters(key, PARAM_DW_24GHZ));
+                mSettablePowerParameters.get(key).get(PARAM_DW_24GHZ));
         updateSingleConfigForPowerSettings(req.bandSpecificConfig[
                 android.hardware.wifi.V1_4.NanBandIndex.NAN_BAND_6GHZ],
-                getSettablePowerParameters(key, PARAM_DW_6GHZ));
+                mSettablePowerParameters.get(key).get(PARAM_DW_6GHZ));
 
-        configSupplemental12.discoveryBeaconIntervalMs = getSettablePowerParameters(key,
+        configSupplemental12.discoveryBeaconIntervalMs = mSettablePowerParameters.get(key).get(
                 PARAM_DISCOVERY_BEACON_INTERVAL_MS);
-        configSupplemental12.numberOfSpatialStreamsInDiscovery = getSettablePowerParameters(key,
-                PARAM_NUM_SS_IN_DISCOVERY);
-        configSupplemental12.enableDiscoveryWindowEarlyTermination =
-                getSettablePowerParameters(key, PARAM_ENABLE_DW_EARLY_TERM) != 0;
-    }
-
-    private int getSettablePowerParameters(String state, String key) {
-        if (mExternalSetParams.containsKey(key)) {
-            return mExternalSetParams.get(key);
-        }
-        return mSettablePowerParameters.get(state).get(key);
+        configSupplemental12.numberOfSpatialStreamsInDiscovery = mSettablePowerParameters.get(
+                key).get(PARAM_NUM_SS_IN_DISCOVERY);
+        configSupplemental12.enableDiscoveryWindowEarlyTermination = mSettablePowerParameters.get(
+                key).get(PARAM_ENABLE_DW_EARLY_TERM) != 0;
     }
 
     private void updateSingleConfigForPowerSettings(NanBandSpecificConfig cfg, int override) {
@@ -1543,18 +1275,16 @@
     }
 
     /**
-     * Returns the HAL cipher suite.
+     * Returns the strongest supported cipher suite.
+     *
+     * Baseline is very simple: 256 > 128 > 0.
      */
-    private int getHalCipherSuiteType(int frameworkCipherSuites) {
-        switch (frameworkCipherSuites) {
-            case WIFI_AWARE_CIPHER_SUITE_NCS_SK_128:
-                return NanCipherSuiteType.SHARED_KEY_128_MASK;
-            case WIFI_AWARE_CIPHER_SUITE_NCS_SK_256:
-                return NanCipherSuiteType.SHARED_KEY_256_MASK;
-            case WIFI_AWARE_CIPHER_SUITE_NCS_PK_128:
-                return NanCipherSuiteType.PUBLIC_KEY_128_MASK;
-            case WIFI_AWARE_CIPHER_SUITE_NCS_PK_256:
-                return NanCipherSuiteType.PUBLIC_KEY_256_MASK;
+    private int getStrongestCipherSuiteType(int supportedCipherSuites) {
+        if ((supportedCipherSuites & NanCipherSuiteType.SHARED_KEY_256_MASK) != 0) {
+            return NanCipherSuiteType.SHARED_KEY_256_MASK;
+        }
+        if ((supportedCipherSuites & NanCipherSuiteType.SHARED_KEY_128_MASK) != 0) {
+            return NanCipherSuiteType.SHARED_KEY_128_MASK;
         }
         return NanCipherSuiteType.NONE;
     }
@@ -1609,7 +1339,6 @@
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         pw.println("WifiAwareNativeApi:");
         pw.println("  mSettableParameters: " + mSettableParameters);
-        pw.println("  mExternalSetParams" + mExternalSetParams);
         mHal.dump(fd, pw, args);
     }
 }
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java b/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java
index e422e62..1a13e0b 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareNativeCallback.java
@@ -24,15 +24,10 @@
 import android.hardware.wifi.V1_0.NanMatchInd;
 import android.hardware.wifi.V1_0.NanStatusType;
 import android.hardware.wifi.V1_0.WifiNanStatus;
+import android.hardware.wifi.V1_2.NanDataPathChannelInfo;
 import android.hardware.wifi.V1_2.NanDataPathScheduleUpdateInd;
-import android.hardware.wifi.V1_6.IWifiNanIfaceEventCallback;
-import android.hardware.wifi.V1_6.NanCipherSuiteType;
-import android.hardware.wifi.V1_6.WifiChannelWidthInMhz;
+import android.hardware.wifi.V1_5.IWifiNanIfaceEventCallback;
 import android.net.MacAddress;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiAnnotations;
-import android.net.wifi.aware.Characteristics;
-import android.net.wifi.aware.WifiAwareChannelInfo;
 import android.net.wifi.util.HexEncoding;
 import android.os.RemoteException;
 import android.util.Log;
@@ -49,7 +44,6 @@
 import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 
 /**
  * Manages the callbacks from Wi-Fi Aware HIDL (HAL).
@@ -61,7 +55,6 @@
 
     /* package */ boolean mIsHal12OrLater = false;
     /* package */ boolean mIsHal15OrLater = false;
-    /* package */ boolean mIsHal16OrLater = false;
 
     private final WifiAwareStateManager mWifiAwareStateManager;
 
@@ -94,7 +87,7 @@
     private static final int CB_EV_DATA_PATH_SCHED_UPDATE = 11;
 
     private SparseIntArray mCallbackCounter = new SparseIntArray();
-    private SparseArray<List<WifiAwareChannelInfo>> mChannelInfoPerNdp = new SparseArray<>();
+    private SparseArray<ArrayList<NanDataPathChannelInfo>> mChannelInfoPerNdp = new SparseArray<>();
 
     private void incrementCbCount(int callbackId) {
         mCallbackCounter.put(callbackId, mCallbackCounter.get(callbackId) + 1);
@@ -216,56 +209,7 @@
             Log.e(TAG, "notifyCapabilitiesResponse_1_5: error code=" + status.status + " ("
                     + status.description + ")");
         }
-    }
 
-    @Override
-    public void notifyCapabilitiesResponse_1_6(short id, WifiNanStatus status,
-            android.hardware.wifi.V1_6.NanCapabilities capabilities) throws RemoteException {
-        if (mDbg) {
-            Log.v(TAG, "notifyCapabilitiesResponse_1_6: id=" + id + ", status="
-                    + statusString(status) + ", capabilities=" + capabilities);
-        }
-
-        if (!mIsHal16OrLater) {
-            Log.wtf(TAG, "notifyCapabilitiesResponse_1_6 should not be called by a <1.6 HAL!");
-            return;
-        }
-
-        if (status.status == NanStatusType.SUCCESS) {
-            Capabilities frameworkCapabilities = toFrameworkCapability1_6(capabilities);
-
-            mWifiAwareStateManager.onCapabilitiesUpdateResponse(id, frameworkCapabilities);
-        } else {
-            Log.e(TAG, "notifyCapabilitiesResponse_1_6: error code=" + status.status + " ("
-                    + status.description + ")");
-        }
-    }
-
-    private Capabilities toFrameworkCapability1_6(
-            android.hardware.wifi.V1_6.NanCapabilities capabilities) {
-        Capabilities frameworkCapabilities = new Capabilities();
-        frameworkCapabilities.maxConcurrentAwareClusters = capabilities.maxConcurrentClusters;
-        frameworkCapabilities.maxPublishes = capabilities.maxPublishes;
-        frameworkCapabilities.maxSubscribes = capabilities.maxSubscribes;
-        frameworkCapabilities.maxServiceNameLen = capabilities.maxServiceNameLen;
-        frameworkCapabilities.maxMatchFilterLen = capabilities.maxMatchFilterLen;
-        frameworkCapabilities.maxTotalMatchFilterLen = capabilities.maxTotalMatchFilterLen;
-        frameworkCapabilities.maxServiceSpecificInfoLen =
-                capabilities.maxServiceSpecificInfoLen;
-        frameworkCapabilities.maxExtendedServiceSpecificInfoLen =
-                capabilities.maxExtendedServiceSpecificInfoLen;
-        frameworkCapabilities.maxNdiInterfaces = capabilities.maxNdiInterfaces;
-        frameworkCapabilities.maxNdpSessions = capabilities.maxNdpSessions;
-        frameworkCapabilities.maxAppInfoLen = capabilities.maxAppInfoLen;
-        frameworkCapabilities.maxQueuedTransmitMessages =
-                capabilities.maxQueuedTransmitFollowupMsgs;
-        frameworkCapabilities.maxSubscribeInterfaceAddresses =
-                capabilities.maxSubscribeInterfaceAddresses;
-        frameworkCapabilities.supportedCipherSuites = toPublicCipherSuites(
-                capabilities.supportedCipherSuites);
-        frameworkCapabilities.isInstantCommunicationModeSupported =
-                capabilities.instantCommunicationModeSupportFlag;
-        return frameworkCapabilities;
     }
 
     private Capabilities toFrameworkCapability10(
@@ -288,31 +232,11 @@
                 capabilities.maxQueuedTransmitFollowupMsgs;
         frameworkCapabilities.maxSubscribeInterfaceAddresses =
                 capabilities.maxSubscribeInterfaceAddresses;
-        frameworkCapabilities.supportedCipherSuites = toPublicCipherSuites(
-                capabilities.supportedCipherSuites);
+        frameworkCapabilities.supportedCipherSuites = capabilities.supportedCipherSuites;
         frameworkCapabilities.isInstantCommunicationModeSupported = false;
         return frameworkCapabilities;
     }
 
-    private int toPublicCipherSuites(int nativeCipherSuites) {
-        int publicCipherSuites = 0;
-
-        if ((nativeCipherSuites & NanCipherSuiteType.SHARED_KEY_128_MASK) != 0) {
-            publicCipherSuites |= Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128;
-        }
-        if ((nativeCipherSuites & NanCipherSuiteType.SHARED_KEY_256_MASK) != 0) {
-            publicCipherSuites |= Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256;
-        }
-        if ((nativeCipherSuites & NanCipherSuiteType.PUBLIC_KEY_128_MASK) != 0) {
-            publicCipherSuites |= Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_128;
-        }
-        if ((nativeCipherSuites & NanCipherSuiteType.PUBLIC_KEY_256_MASK) != 0) {
-            publicCipherSuites |= Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_PK_256;
-        }
-
-        return publicCipherSuites;
-    }
-
     @Override
     public void notifyEnableResponse(short id, WifiNanStatus status) {
         if (mDbg) Log.v(TAG, "notifyEnableResponse: id=" + id + ", status=" + statusString(status));
@@ -554,34 +478,7 @@
         mWifiAwareStateManager.onMatchNotification(event.discoverySessionId, event.peerId,
                 event.addr, convertArrayListToNativeByteArray(event.serviceSpecificInfo),
                 convertArrayListToNativeByteArray(event.matchFilter), event.rangingIndicationType,
-                event.rangingMeasurementInCm * 10, new byte[0], 0);
-    }
-
-    @Override
-    public void eventMatch_1_6(android.hardware.wifi.V1_6.NanMatchInd event) {
-        if (mDbg) {
-            Log.v(TAG, "eventMatch_1_6: discoverySessionId=" + event.discoverySessionId
-                    + ", peerId=" + event.peerId
-                    + ", addr=" + String.valueOf(HexEncoding.encode(event.addr))
-                    + ", serviceSpecificInfo=" + Arrays.toString(
-                    convertArrayListToNativeByteArray(event.serviceSpecificInfo)) + ", ssi.size()="
-                    + (event.serviceSpecificInfo == null ? 0 : event.serviceSpecificInfo.size())
-                    + ", matchFilter=" + Arrays.toString(
-                    convertArrayListToNativeByteArray(event.matchFilter)) + ", mf.size()=" + (
-                    event.matchFilter == null ? 0 : event.matchFilter.size())
-                    + ", rangingIndicationType=" + event.rangingIndicationType
-                    + ", rangingMeasurementInCm=" + event.rangingMeasurementInMm + ", "
-                    + "scid=" + Arrays.toString(convertArrayListToNativeByteArray(event.scid)));
-        }
-        incrementCbCount(CB_EV_MATCH);
-
-        // TODO: b/69428593 get rid of conversion once HAL moves from CM to MM
-        mWifiAwareStateManager.onMatchNotification(event.discoverySessionId, event.peerId,
-                event.addr, convertArrayListToNativeByteArray(event.serviceSpecificInfo),
-                convertArrayListToNativeByteArray(event.matchFilter), event.rangingIndicationType,
-                event.rangingMeasurementInMm,
-                convertArrayListToNativeByteArray(event.scid),
-                toPublicCipherSuites(event.peerCipherType));
+                event.rangingMeasurementInCm * 10);
     }
 
     @Override
@@ -670,42 +567,13 @@
             Log.wtf(TAG, "eventDataPathConfirm_1_2 should not be called by a <1.2 HAL!");
             return;
         }
-
-        List<WifiAwareChannelInfo> wifiAwareChannelInfos =
-                convertHalChannelInfo_1_2(event.channelInfo);
         incrementCbCount(CB_EV_DATA_PATH_CONFIRM);
-        mChannelInfoPerNdp.put(event.V1_0.ndpInstanceId, wifiAwareChannelInfos);
+        mChannelInfoPerNdp.put(event.V1_0.ndpInstanceId, event.channelInfo);
 
         mWifiAwareStateManager.onDataPathConfirmNotification(event.V1_0.ndpInstanceId,
                 event.V1_0.peerNdiMacAddr, event.V1_0.dataPathSetupSuccess,
                 event.V1_0.status.status, convertArrayListToNativeByteArray(event.V1_0.appInfo),
-                wifiAwareChannelInfos);
-    }
-
-    @Override
-    public void eventDataPathConfirm_1_6(android.hardware.wifi.V1_6.NanDataPathConfirmInd event) {
-        if (mDbg) {
-            Log.v(TAG, "eventDataPathConfirm_1_6: ndpInstanceId=" + event.V1_0.ndpInstanceId
-                    + ", peerNdiMacAddr=" + String.valueOf(
-                    HexEncoding.encode(event.V1_0.peerNdiMacAddr)) + ", dataPathSetupSuccess="
-                    + event.V1_0.dataPathSetupSuccess + ", reason=" + event.V1_0.status.status
-                    + ", appInfo.size()=" + event.V1_0.appInfo.size()
-                    + ", channelInfo" + event.channelInfo);
-        }
-        if (!mIsHal16OrLater) {
-            Log.wtf(TAG, "eventDataPathConfirm_1_6 should not be called by a <1.6 HAL!");
-            return;
-        }
-
-        List<WifiAwareChannelInfo> wifiAwareChannelInfos =
-                convertHalChannelInfo_1_6(event.channelInfo);
-        incrementCbCount(CB_EV_DATA_PATH_CONFIRM);
-        mChannelInfoPerNdp.put(event.V1_0.ndpInstanceId, wifiAwareChannelInfos);
-
-        mWifiAwareStateManager.onDataPathConfirmNotification(event.V1_0.ndpInstanceId,
-                event.V1_0.peerNdiMacAddr, event.V1_0.dataPathSetupSuccess,
-                event.V1_0.status.status, convertArrayListToNativeByteArray(event.V1_0.appInfo),
-                wifiAwareChannelInfos);
+                event.channelInfo);
     }
 
     @Override
@@ -719,40 +587,13 @@
             Log.wtf(TAG, "eventDataPathScheduleUpdate should not be called by a <1.2 HAL!");
             return;
         }
-
-        List<WifiAwareChannelInfo> wifiAwareChannelInfos =
-                convertHalChannelInfo_1_2(event.channelInfo);
         incrementCbCount(CB_EV_DATA_PATH_SCHED_UPDATE);
         for (int ndpInstanceId : event.ndpInstanceIds) {
-            mChannelInfoPerNdp.put(ndpInstanceId, wifiAwareChannelInfos);
+            mChannelInfoPerNdp.put(ndpInstanceId, event.channelInfo);
         }
 
         mWifiAwareStateManager.onDataPathScheduleUpdateNotification(event.peerDiscoveryAddress,
-                event.ndpInstanceIds, wifiAwareChannelInfos);
-    }
-
-    @Override
-    public void eventDataPathScheduleUpdate_1_6(
-            android.hardware.wifi.V1_6.NanDataPathScheduleUpdateInd event) {
-        if (mDbg) {
-            Log.v(TAG, "eventDataPathScheduleUpdate_1_6: peerMac="
-                    + MacAddress.fromBytes(event.peerDiscoveryAddress).toString()
-                    + ", ndpIds=" + event.ndpInstanceIds + ", channelInfo=" + event.channelInfo);
-        }
-        if (!mIsHal16OrLater) {
-            Log.wtf(TAG, "eventDataPathScheduleUpdate_1_6 should not be called by a <1.6 HAL!");
-            return;
-        }
-
-        List<WifiAwareChannelInfo> wifiAwareChannelInfos =
-                convertHalChannelInfo_1_6(event.channelInfo);
-        incrementCbCount(CB_EV_DATA_PATH_SCHED_UPDATE);
-        for (int ndpInstanceId : event.ndpInstanceIds) {
-            mChannelInfoPerNdp.put(ndpInstanceId, wifiAwareChannelInfos);
-        }
-
-        mWifiAwareStateManager.onDataPathScheduleUpdateNotification(event.peerDiscoveryAddress,
-                event.ndpInstanceIds, wifiAwareChannelInfos);
+                event.ndpInstanceIds, event.channelInfo);
     }
 
     @Override
@@ -822,11 +663,11 @@
         try {
             for (int i = 0; i < mChannelInfoPerNdp.size(); i++) {
                 JSONArray infoJsonArray = new JSONArray();
-                for (WifiAwareChannelInfo info : mChannelInfoPerNdp.valueAt(i)) {
+                for (NanDataPathChannelInfo info : mChannelInfoPerNdp.valueAt(i)) {
                     JSONObject j = new JSONObject();
-                    j.put("channelFreq", info.getChannelFrequencyMhz());
-                    j.put("channelBandwidth", info.getChannelBandwidth());
-                    j.put("numSpatialStreams", info.getSpatialStreamCount());
+                    j.put("channelFreq", info.channelFreq);
+                    j.put("channelBandwidth", info.channelBandwidth);
+                    j.put("numSpatialStreams", info.numSpatialStreams);
                     infoJsonArray.put(j);
                 }
                 channelInfoJson.put(Integer.toString(mChannelInfoPerNdp.keyAt(i)), infoJsonArray);
@@ -836,56 +677,4 @@
         }
         return channelInfoJson.toString();
     }
-
-    /**
-     * Convert HAL channelBandwidth to framework enum
-     */
-    private @WifiAnnotations.ChannelWidth int getChannelBandwidthFromHal(int channelBandwidth) {
-        switch(channelBandwidth) {
-            case WifiChannelWidthInMhz.WIDTH_40:
-                return ScanResult.CHANNEL_WIDTH_40MHZ;
-            case WifiChannelWidthInMhz.WIDTH_80:
-                return ScanResult.CHANNEL_WIDTH_80MHZ;
-            case WifiChannelWidthInMhz.WIDTH_160:
-                return ScanResult.CHANNEL_WIDTH_160MHZ;
-            case WifiChannelWidthInMhz.WIDTH_80P80:
-                return ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
-            case WifiChannelWidthInMhz.WIDTH_320:
-                return ScanResult.CHANNEL_WIDTH_320MHZ;
-            default:
-                return ScanResult.CHANNEL_WIDTH_20MHZ;
-        }
-    }
-    /**
-     * Convert HAL V1_2 NanDataPathChannelInfo to WifiAwareChannelInfo
-     */
-    private List<WifiAwareChannelInfo> convertHalChannelInfo_1_2(
-            List<android.hardware.wifi.V1_2.NanDataPathChannelInfo> channelInfos) {
-        List<WifiAwareChannelInfo> wifiAwareChannelInfos = new ArrayList<>();
-        if (channelInfos == null) {
-            return null;
-        }
-        for (android.hardware.wifi.V1_2.NanDataPathChannelInfo channelInfo : channelInfos) {
-            wifiAwareChannelInfos.add(new WifiAwareChannelInfo(channelInfo.channelFreq,
-                    getChannelBandwidthFromHal(channelInfo.channelBandwidth),
-                    channelInfo.numSpatialStreams));
-        }
-        return wifiAwareChannelInfos;
-    }
-    /**
-     * Convert HAL V1_6 NanDataPathChannelInfo to WifiAwareChannelInfo
-     */
-    private List<WifiAwareChannelInfo> convertHalChannelInfo_1_6(
-            List<android.hardware.wifi.V1_6.NanDataPathChannelInfo> channelInfos) {
-        List<WifiAwareChannelInfo> wifiAwareChannelInfos = new ArrayList<>();
-        if (channelInfos == null) {
-            return null;
-        }
-        for (android.hardware.wifi.V1_6.NanDataPathChannelInfo channelInfo : channelInfos) {
-            wifiAwareChannelInfos.add(new WifiAwareChannelInfo(channelInfo.channelFreq,
-                    getChannelBandwidthFromHal(channelInfo.channelBandwidth),
-                    channelInfo.numSpatialStreams));
-        }
-        return wifiAwareChannelInfos;
-    }
 }
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareNativeManager.java b/service/java/com/android/server/wifi/aware/WifiAwareNativeManager.java
index 4e874fd..ca68964 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareNativeManager.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareNativeManager.java
@@ -83,15 +83,6 @@
     }
 
     /**
-     * (HIDL) Cast the input to a 1.6 NAN interface (possibly resulting in a null).
-     *
-     * Separate function so can be mocked in unit tests.
-     */
-    public android.hardware.wifi.V1_6.IWifiNanIface mockableCastTo_1_6(IWifiNanIface iface) {
-        return android.hardware.wifi.V1_6.IWifiNanIface.castFrom(iface);
-    }
-
-    /**
      * Initialize the class - intended for late initialization.
      *
      * @param handler Handler on which to execute interface available callbacks.
@@ -109,7 +100,7 @@
                         if (mHalDeviceManager.isStarted()) {
                             mWifiAwareStateManager.tryToGetAwareCapability();
                         } else {
-                            awareIsDown(false);
+                            awareIsDown();
                         }
                     }
                 }, mHandler);
@@ -145,7 +136,7 @@
             }
             if (mHalDeviceManager == null) {
                 Log.e(TAG, "tryToGetAware: mHalDeviceManager is null!?");
-                awareIsDown(false);
+                awareIsDown();
                 return;
             }
 
@@ -154,21 +145,15 @@
                     mHandler, requestorWs);
             if (iface == null) {
                 Log.e(TAG, "Was not able to obtain an IWifiNanIface (even though enabled!?)");
-                awareIsDown(true);
+                awareIsDown();
             } else {
                 if (mDbg) Log.v(TAG, "Obtained an IWifiNanIface");
 
                 try {
                     android.hardware.wifi.V1_2.IWifiNanIface iface12 = mockableCastTo_1_2(iface);
                     android.hardware.wifi.V1_5.IWifiNanIface iface15 = mockableCastTo_1_5(iface);
-                    android.hardware.wifi.V1_6.IWifiNanIface iface16 = mockableCastTo_1_6(iface);
                     WifiStatus status;
-                    if (iface16 != null) {
-                        mWifiAwareNativeCallback.mIsHal12OrLater = true;
-                        mWifiAwareNativeCallback.mIsHal15OrLater = true;
-                        mWifiAwareNativeCallback.mIsHal16OrLater = true;
-                        status = iface16.registerEventCallback_1_6(mWifiAwareNativeCallback);
-                    } else if (iface15 != null) {
+                    if (iface15 != null) {
                         mWifiAwareNativeCallback.mIsHal12OrLater = true;
                         mWifiAwareNativeCallback.mIsHal15OrLater = true;
                         status = iface15.registerEventCallback_1_5(mWifiAwareNativeCallback);
@@ -182,12 +167,12 @@
                         Log.e(TAG, "IWifiNanIface.registerEventCallback error: " + statusString(
                                 status));
                         mHalDeviceManager.removeIface(iface);
-                        awareIsDown(false);
+                        awareIsDown();
                         return;
                     }
                 } catch (RemoteException e) {
                     Log.e(TAG, "IWifiNanIface.registerEventCallback exception: " + e);
-                    awareIsDown(false);
+                    awareIsDown();
                     return;
                 }
                 mWifiNanIface = iface;
@@ -241,7 +226,7 @@
             }
             if (mHalDeviceManager == null) {
                 Log.e(TAG, "tryToGetAware: mHalDeviceManager is null!?");
-                awareIsDown(false);
+                awareIsDown();
                 return false;
             }
 
@@ -249,7 +234,7 @@
         }
     }
 
-    private void awareIsDown(boolean markAsAvailable) {
+    private void awareIsDown() {
         synchronized (mLock) {
             if (mDbg) {
                 Log.d(TAG, "awareIsDown: mWifiNanIface=" + mWifiNanIface + ", mReferenceCount ="
@@ -257,7 +242,7 @@
             }
             mWifiNanIface = null;
             mReferenceCount = 0;
-            mWifiAwareStateManager.disableUsage(markAsAvailable);
+            mWifiAwareStateManager.disableUsage(true);
         }
     }
 
@@ -272,7 +257,7 @@
                         + active);
             }
             if (active && mWifiNanIface != null) {
-                awareIsDown(true);
+                awareIsDown();
             } // else: we released it locally so no need to disable usage
         }
     }
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareService.java b/service/java/com/android/server/wifi/aware/WifiAwareService.java
index 75bb17f..2389b9c 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareService.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareService.java
@@ -17,12 +17,12 @@
 package com.android.server.wifi.aware;
 
 import android.content.Context;
-import android.net.wifi.WifiContext;
 import android.os.HandlerThread;
 import android.util.Log;
 
 import com.android.server.SystemService;
 import com.android.server.wifi.HalDeviceManager;
+import com.android.server.wifi.WifiContext;
 import com.android.server.wifi.WifiInjector;
 
 /**
@@ -55,7 +55,7 @@
 
             HalDeviceManager halDeviceManager = wifiInjector.getHalDeviceManager();
 
-            WifiAwareStateManager wifiAwareStateManager = new WifiAwareStateManager(wifiInjector);
+            WifiAwareStateManager wifiAwareStateManager = new WifiAwareStateManager();
             WifiAwareNativeCallback wifiAwareNativeCallback = new WifiAwareNativeCallback(
                     wifiAwareStateManager);
             WifiAwareNativeManager wifiAwareNativeManager = new WifiAwareNativeManager(
@@ -73,7 +73,7 @@
                     wifiInjector.getWifiPermissionsUtil(),
                     wifiInjector.getWifiPermissionsWrapper(), wifiInjector.getSettingsConfigStore(),
                     wifiAwareNativeManager, wifiAwareNativeApi, wifiAwareNativeCallback,
-                    wifiInjector.makeNetdWrapper(), wifiInjector.getInterfaceConflictManager());
+                    wifiInjector.makeNetdWrapper());
         } else if (phase == SystemService.PHASE_BOOT_COMPLETED) {
             mImpl.startLate();
         }
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareServiceImpl.java b/service/java/com/android/server/wifi/aware/WifiAwareServiceImpl.java
index f2b046d..48fbee6 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareServiceImpl.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareServiceImpl.java
@@ -24,8 +24,6 @@
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.hardware.wifi.V1_0.NanStatusType;
-import android.net.wifi.WifiManager;
-import android.net.wifi.aware.AwareParams;
 import android.net.wifi.aware.AwareResources;
 import android.net.wifi.aware.Characteristics;
 import android.net.wifi.aware.ConfigRequest;
@@ -37,21 +35,16 @@
 import android.net.wifi.aware.PublishConfig;
 import android.net.wifi.aware.SubscribeConfig;
 import android.os.Binder;
-import android.os.Build;
-import android.os.Bundle;
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.IBinder;
 import android.os.ParcelFileDescriptor;
-import android.os.Process;
 import android.os.RemoteException;
 import android.util.Log;
 import android.util.SparseArray;
 import android.util.SparseIntArray;
 
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.Clock;
-import com.android.server.wifi.InterfaceConflictManager;
 import com.android.server.wifi.WifiSettingsConfigStore;
 import com.android.server.wifi.util.NetdWrapper;
 import com.android.server.wifi.util.WifiPermissionsUtil;
@@ -59,6 +52,7 @@
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
+import java.util.List;
 
 /**
  * Implementation of the IWifiAwareManager AIDL interface. Performs validity
@@ -105,8 +99,7 @@
             WifiPermissionsUtil wifiPermissionsUtil, WifiPermissionsWrapper permissionsWrapper,
             WifiSettingsConfigStore settingsConfigStore,
             WifiAwareNativeManager wifiAwareNativeManager, WifiAwareNativeApi wifiAwareNativeApi,
-            WifiAwareNativeCallback wifiAwareNativeCallback, NetdWrapper netdWrapper,
-            InterfaceConflictManager interfaceConflictManager) {
+            WifiAwareNativeCallback wifiAwareNativeCallback, NetdWrapper netdWrapper) {
         Log.i(TAG, "Starting Wi-Fi Aware service");
 
         mWifiPermissionsUtil = wifiPermissionsUtil;
@@ -116,8 +109,7 @@
 
         mHandler.post(() -> {
             mStateManager.start(mContext, handlerThread.getLooper(), awareMetrics,
-                    wifiPermissionsUtil, permissionsWrapper, new Clock(), netdWrapper,
-                    interfaceConflictManager);
+                    wifiPermissionsUtil, permissionsWrapper, new Clock(), netdWrapper);
 
             settingsConfigStore.registerChangeListener(
                     WIFI_VERBOSE_LOGGING_ENABLED,
@@ -177,56 +169,35 @@
     @Override
     public boolean isDeviceAttached() {
         enforceAccessPermission();
-        return mStateManager.isDeviceAttached();
+        return mDeathRecipientsByClientId.size() != 0;
     }
 
     @Override
     public void enableInstantCommunicationMode(String callingPackage, boolean enable) {
-        enforceChangePermission();
-        int uid = getMockableCallingUid();
-        if (uid != Process.SHELL_UID && uid != Process.ROOT_UID) {
-            mWifiPermissionsUtil.checkPackage(uid, callingPackage);
-            if (!mWifiPermissionsUtil.isSystem(callingPackage, uid)
-                    && !mWifiPermissionsUtil.checkConfigOverridePermission(uid)) {
-                Log.i(TAG, "enableInstantCommunicationMode not allowed for uid=" + uid);
-                return;
-            }
+        if (!mWifiPermissionsUtil.isSystem(callingPackage, Binder.getCallingUid())) {
+            Log.i(TAG, "enableInstantCommunicationMode not allowed for uid="
+                    + Binder.getCallingUid());
+            return;
         }
+        enforceChangePermission();
         mStateManager.enableInstantCommunicationMode(enable);
     }
 
     @Override
     public boolean isInstantCommunicationModeEnabled() {
         enforceAccessPermission();
-        return mStateManager.isInstantCommModeGlobalEnable();
-    }
-
-    @Override
-    public boolean isSetChannelOnDataPathSupported() {
-        enforceAccessPermission();
-        return mStateManager.isSetChannelOnDataPathSupported();
-    }
-
-    @Override
-    public void setAwareParams(AwareParams params) {
-        enforceChangePermission();
-        int uid = getMockableCallingUid();
-        if (!mWifiPermissionsUtil.checkConfigOverridePermission(uid)) {
-            throw new SecurityException("App not allowed to update Aware parameters "
-                    + "(uid = " + uid + ")");
-        }
-        mStateManager.setAwareParams(params);
+        return mStateManager.isInstantCommunicationModeEnabled();
     }
 
     @Override
     public void connect(final IBinder binder, String callingPackage, String callingFeatureId,
             IWifiAwareEventCallback callback, ConfigRequest configRequest,
-            boolean notifyOnIdentityChanged, Bundle extras) {
+            boolean notifyOnIdentityChanged) {
         enforceAccessPermission();
         enforceChangePermission();
 
         final int uid = getMockableCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, callingPackage);
+        mAppOps.checkPackage(uid, callingPackage);
 
         if (callback == null) {
             throw new IllegalArgumentException("Callback must not be null");
@@ -235,13 +206,8 @@
             throw new IllegalArgumentException("Binder must not be null");
         }
 
-        if (extras == null) {
-            throw new IllegalArgumentException("extras bundle must not be null");
-        }
-
         if (notifyOnIdentityChanged) {
-            enforceNearbyOrLocationPermission(callingPackage, callingFeatureId,
-                    getMockableCallingUid(), extras, "Wifi Aware attach");
+            enforceLocationPermission(callingPackage, callingFeatureId, getMockableCallingUid());
         }
 
         if (configRequest != null) {
@@ -297,7 +263,7 @@
         }
 
         mStateManager.connect(clientId, uid, pid, callingPackage, callingFeatureId, callback,
-                configRequest, notifyOnIdentityChanged, extras);
+                configRequest, notifyOnIdentityChanged);
     }
 
     @Override
@@ -342,16 +308,14 @@
 
     @Override
     public void publish(String callingPackage, String callingFeatureId, int clientId,
-            PublishConfig publishConfig, IWifiAwareDiscoverySessionCallback callback,
-            Bundle extras) {
+            PublishConfig publishConfig, IWifiAwareDiscoverySessionCallback callback) {
         enforceAccessPermission();
         enforceChangePermission();
 
         int uid = getMockableCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, callingPackage);
+        mAppOps.checkPackage(uid, callingPackage);
 
-        enforceNearbyOrLocationPermission(callingPackage, callingFeatureId,
-                getMockableCallingUid(), extras, "Wifi Aware publish");
+        enforceLocationPermission(callingPackage, callingFeatureId, getMockableCallingUid());
 
         if (callback == null) {
             throw new IllegalArgumentException("Callback must not be null");
@@ -360,8 +324,7 @@
             throw new IllegalArgumentException("PublishConfig must not be null");
         }
         publishConfig.assertValid(mStateManager.getCharacteristics(),
-                mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_RTT)
-        );
+                mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_RTT));
 
         enforceClientValidity(uid, clientId);
         if (mDbg) {
@@ -381,8 +344,7 @@
             throw new IllegalArgumentException("PublishConfig must not be null");
         }
         publishConfig.assertValid(mStateManager.getCharacteristics(),
-                mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_RTT)
-        );
+                mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_RTT));
 
         int uid = getMockableCallingUid();
         enforceClientValidity(uid, clientId);
@@ -396,16 +358,14 @@
 
     @Override
     public void subscribe(String callingPackage, String callingFeatureId, int clientId,
-            SubscribeConfig subscribeConfig, IWifiAwareDiscoverySessionCallback callback,
-            Bundle extras) {
+            SubscribeConfig subscribeConfig, IWifiAwareDiscoverySessionCallback callback) {
         enforceAccessPermission();
         enforceChangePermission();
 
         int uid = getMockableCallingUid();
-        mWifiPermissionsUtil.checkPackage(uid, callingPackage);
+        mAppOps.checkPackage(uid, callingPackage);
 
-        enforceNearbyOrLocationPermission(callingPackage, callingFeatureId,
-                getMockableCallingUid(), extras, "Wifi Aware subscribe");
+        enforceLocationPermission(callingPackage, callingFeatureId, getMockableCallingUid());
 
         if (callback == null) {
             throw new IllegalArgumentException("Callback must not be null");
@@ -414,8 +374,7 @@
             throw new IllegalArgumentException("SubscribeConfig must not be null");
         }
         subscribeConfig.assertValid(mStateManager.getCharacteristics(),
-                mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_RTT)
-        );
+                mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_RTT));
 
         enforceClientValidity(uid, clientId);
         if (mDbg) {
@@ -435,8 +394,7 @@
             throw new IllegalArgumentException("SubscribeConfig must not be null");
         }
         subscribeConfig.assertValid(mStateManager.getCharacteristics(),
-                mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_RTT)
-        );
+                mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_RTT));
 
         int uid = getMockableCallingUid();
         enforceClientValidity(uid, clientId);
@@ -481,7 +439,7 @@
     }
 
     @Override
-    public void requestMacAddresses(int uid, int[] peerIds, IWifiAwareMacAddressProvider callback) {
+    public void requestMacAddresses(int uid, List peerIds, IWifiAwareMacAddressProvider callback) {
         enforceNetworkStackPermission();
 
         mStateManager.requestMacAddresses(uid, peerIds, callback);
@@ -531,17 +489,9 @@
         mContext.enforceCallingOrSelfPermission(android.Manifest.permission.CHANGE_WIFI_STATE, TAG);
     }
 
-    private void enforceNearbyOrLocationPermission(String callingPackage, String callingFeatureId,
-            int uid, Bundle extras, String message) {
-        if (!SdkLevel.isAtLeastT() || mWifiPermissionsUtil.isTargetSdkLessThan(callingPackage,
-                Build.VERSION_CODES.TIRAMISU,
-                uid)) {
-            mWifiPermissionsUtil.enforceLocationPermission(callingPackage, callingFeatureId, uid);
-        } else {
-            mWifiPermissionsUtil.enforceNearbyDevicesPermission(extras.getParcelable(
-                    WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE), true, message);
-        }
-
+    private void enforceLocationPermission(String callingPackage, String callingFeatureId,
+            int uid) {
+        mWifiPermissionsUtil.enforceLocationPermission(callingPackage, callingFeatureId, uid);
     }
 
     private void enforceNetworkStackPermission() {
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareStateManager.java b/service/java/com/android/server/wifi/aware/WifiAwareStateManager.java
index d35d000..ff20e2e 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareStateManager.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareStateManager.java
@@ -16,9 +16,6 @@
 
 package com.android.server.wifi.aware;
 
-import static android.Manifest.permission.ACCESS_WIFI_STATE;
-import static android.net.wifi.WifiAvailableChannel.OP_MODE_WIFI_AWARE;
-
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.content.BroadcastReceiver;
@@ -27,28 +24,21 @@
 import android.content.IntentFilter;
 import android.hardware.wifi.V1_0.NanStatusType;
 import android.hardware.wifi.V1_0.WifiStatusCode;
+import android.hardware.wifi.V1_2.NanDataPathChannelInfo;
 import android.location.LocationManager;
-import android.net.MacAddress;
-import android.net.wifi.WifiAvailableChannel;
 import android.net.wifi.WifiManager;
-import android.net.wifi.WifiScanner;
-import android.net.wifi.aware.AwareParams;
 import android.net.wifi.aware.AwareResources;
 import android.net.wifi.aware.Characteristics;
 import android.net.wifi.aware.ConfigRequest;
 import android.net.wifi.aware.IWifiAwareDiscoverySessionCallback;
 import android.net.wifi.aware.IWifiAwareEventCallback;
 import android.net.wifi.aware.IWifiAwareMacAddressProvider;
-import android.net.wifi.aware.MacAddrMapping;
 import android.net.wifi.aware.PublishConfig;
 import android.net.wifi.aware.SubscribeConfig;
-import android.net.wifi.aware.WifiAwareChannelInfo;
-import android.net.wifi.aware.WifiAwareDataPathSecurityConfig;
 import android.net.wifi.aware.WifiAwareManager;
 import android.net.wifi.aware.WifiAwareNetworkSpecifier;
 import android.net.wifi.util.HexEncoding;
 import android.os.Bundle;
-import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
 import android.os.PowerManager;
@@ -68,17 +58,11 @@
 import com.android.internal.util.StateMachine;
 import com.android.internal.util.WakeupMessage;
 import com.android.modules.utils.BasicShellCommandHandler;
-import com.android.modules.utils.HandlerExecutor;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.Clock;
-import com.android.server.wifi.HalDeviceManager;
-import com.android.server.wifi.InterfaceConflictManager;
-import com.android.server.wifi.WifiInjector;
 import com.android.server.wifi.util.NetdWrapper;
-import com.android.server.wifi.util.WaitingState;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.server.wifi.util.WifiPermissionsWrapper;
-import com.android.wifi.resources.R;
 
 import org.json.JSONException;
 import org.json.JSONObject;
@@ -111,10 +95,6 @@
     public static final String HAL_DATA_PATH_CONFIRM_TIMEOUT_TAG =
             TAG + " HAL Data Path Confirm Timeout";
 
-    public static final int INSTANT_MODE_DISABLED = 0;
-    public static final int INSTANT_MODE_24GHZ = 1;
-    public static final int INSTANT_MODE_5GHZ = 3;
-
     /*
      * State machine message types. There are sub-types for the messages (except for TIMEOUTs).
      * Format:
@@ -218,15 +198,13 @@
     private static final String MESSAGE_BUNDLE_KEY_SENT_MESSAGE = "send_message";
     private static final String MESSAGE_BUNDLE_KEY_MESSAGE_ARRIVAL_SEQ = "message_arrival_seq";
     private static final String MESSAGE_BUNDLE_KEY_NOTIFY_IDENTITY_CHANGE = "notify_identity_chg";
-    private static final String MESSAGE_BUNDLE_KEY_SCID = "scid";
-    private static final String MESSAGE_BUNDLE_KEY_CIPHER_SUITE = "cipher_suite";
+    private static final String MESSAGE_BUNDLE_KEY_PMK = "pmk";
+    private static final String MESSAGE_BUNDLE_KEY_PASSPHRASE = "passphrase";
     private static final String MESSAGE_BUNDLE_KEY_OOB = "out_of_band";
     private static final String MESSAGE_RANGING_INDICATION = "ranging_indication";
     private static final String MESSAGE_RANGE_MM = "range_mm";
     private static final String MESSAGE_BUNDLE_KEY_NDP_IDS = "ndp_ids";
     private static final String MESSAGE_BUNDLE_KEY_APP_INFO = "app_info";
-    private static final String MESSAGE_BUNDLE_KEY_ACCEPT_STATE = "accept_state";
-    private static final String MESSAGE_BUNDLE_KEY_ATTRIBUTION_SOURCE = "attribution_source";
 
     private WifiAwareNativeApi mWifiAwareNativeApi;
     private WifiAwareNativeManager mWifiAwareNativeManager;
@@ -249,21 +227,13 @@
     public WifiAwareDataPathStateManager mDataPathMgr;
     private PowerManager mPowerManager;
     private LocationManager mLocationManager;
-    private InterfaceConflictManager mInterfaceConflictMgr;
     private WifiManager mWifiManager;
-    private Handler mHandler;
-    private final WifiInjector mWifiInjector;
 
     private final SparseArray<WifiAwareClientState> mClients = new SparseArray<>();
     private ConfigRequest mCurrentAwareConfiguration = null;
     private boolean mCurrentIdentityNotification = false;
     private boolean mCurrentRangingEnabled = false;
-    private boolean mInstantCommModeGlobalEnable = false;
-    private int mInstantCommModeClientRequest = INSTANT_MODE_DISABLED;
-    private static final int AWARE_BAND_2_INSTANT_COMMUNICATION_CHANNEL_FREQ = 2437; // Channel 6
-    private int mAwareBand5InstantCommunicationChannelFreq = -1; // -1 is not set, 0 is unsupported.
-    private static final int AWARE_BAND_5_INSTANT_COMMUNICATION_CHANNEL_FREQ_CHANNEL_149 = 5745;
-    private static final int AWARE_BAND_5_INSTANT_COMMUNICATION_CHANNEL_FREQ_CHANNEL_44 = 5220;
+    private boolean mIsInstantCommunicationModeEnabled = false;
 
     private static final byte[] ALL_ZERO_MAC = new byte[] {0, 0, 0, 0, 0, 0};
     private byte[] mCurrentDiscoveryInterfaceMac = ALL_ZERO_MAC;
@@ -271,8 +241,7 @@
     // condition.
     private boolean mAwareIsDisabling = false;
 
-    public WifiAwareStateManager(WifiInjector wifiInjector) {
-        mWifiInjector = wifiInjector;
+    public WifiAwareStateManager() {
         onReset();
     }
 
@@ -412,29 +381,6 @@
                     return -1;
                 }
             }
-            case "get_instant_communication_channel": {
-                String arg = parentShell.getNextArgRequired();
-                int band;
-                if (TextUtils.equals(arg, "2G")) {
-                    band = WifiScanner.WIFI_BAND_24_GHZ;
-                } else if (TextUtils.equals(arg, "5G")) {
-                    band = WifiScanner.WIFI_BAND_5_GHZ;
-                } else {
-                    pw_err.println("Unknown band -- " + arg);
-                    return -1;
-                }
-                List<WifiAvailableChannel> channels = mWifiInjector.getWifiThreadRunner().call(
-                        () -> mWifiInjector.getWifiNative().getUsableChannels(band,
-                                OP_MODE_WIFI_AWARE,
-                                WifiAvailableChannel.FILTER_NAN_INSTANT_MODE), null);
-                StringBuilder out = new StringBuilder();
-                for (WifiAvailableChannel channel : channels) {
-                    out.append(channel.toString());
-                    out.append(", ");
-                }
-                pw_out.println(out.toString());
-                return 0;
-            }
             default:
                 pw_err.println("Unknown 'wifiaware state_mgr <cmd>'");
         }
@@ -463,8 +409,6 @@
         pw.println(
                 "    allow_ndp_any true|false: configure whether Responders can be specified to "
                         + "accept requests from ANY requestor (null peer spec)");
-        pw.println(" get_instant_communication_channel 2G|5G: get instant communication mode "
-                + "channel available for the target band");
     }
 
     /**
@@ -475,17 +419,15 @@
      */
     public void start(Context context, Looper looper, WifiAwareMetrics awareMetrics,
             WifiPermissionsUtil wifiPermissionsUtil, WifiPermissionsWrapper permissionsWrapper,
-            Clock clock, NetdWrapper netdWrapper, InterfaceConflictManager interfaceConflictMgr) {
+            Clock clock, NetdWrapper netdWrapper) {
         Log.i(TAG, "start()");
 
         mContext = context;
         mAwareMetrics = awareMetrics;
         mWifiPermissionsUtil = wifiPermissionsUtil;
-        mInterfaceConflictMgr = interfaceConflictMgr;
         mSm = new WifiAwareStateMachine(TAG, looper);
         mSm.setDbg(VDBG);
         mSm.start();
-        mHandler = new Handler(looper);
 
         mDataPathMgr = new WifiAwareDataPathStateManager(this, clock);
         mDataPathMgr.start(mContext, mSm.getHandler().getLooper(), awareMetrics,
@@ -532,11 +474,7 @@
                 if (wifiPermissionsUtil.isLocationModeEnabled()) {
                     enableUsage();
                 } else {
-                    if (SdkLevel.isAtLeastT()) {
-                        handleLocationModeDisabled();
-                    } else {
-                        disableUsage(false);
-                    }
+                    disableUsage(false);
                 }
             }
         }, intentFilter);
@@ -558,21 +496,6 @@
         }, intentFilter);
     }
 
-    private class CountryCodeChangeCallback implements
-            WifiManager.ActiveCountryCodeChangedCallback {
-
-        @Override
-        public void onActiveCountryCodeChanged(@androidx.annotation.NonNull String countryCode) {
-            mAwareBand5InstantCommunicationChannelFreq = -1;
-            reconfigure();
-        }
-
-        @Override
-        public void onCountryCodeInactive() {
-            // Ignore.
-        }
-    }
-
     /**
      * Initialize the late-initialization sub-services: depend on other services already existing.
      */
@@ -662,13 +585,6 @@
         return mCharacteristics;
     }
 
-    /**
-     * Check if there is any active attach session
-     */
-    public boolean isDeviceAttached() {
-        return mClients != null && mClients.size() > 0;
-    }
-
     /*
      * Cross-service API: synchronized but independent of state machine
      */
@@ -676,11 +592,11 @@
     /**
      * Translate (and return in the callback) the peerId to its MAC address representation.
      */
-    public void requestMacAddresses(int uid, int[] peerIds,
+    public void requestMacAddresses(int uid, List<Integer> peerIds,
             IWifiAwareMacAddressProvider callback) {
         mSm.getHandler().post(() -> {
             if (VDBG) Log.v(TAG, "requestMacAddresses: uid=" + uid + ", peerIds=" + peerIds);
-            Map<Integer, MacAddrMapping> peerIdToMacMap = new HashMap<>();
+            Map<Integer, byte[]> peerIdToMacMap = new HashMap<>();
             for (int i = 0; i < mClients.size(); ++i) {
                 WifiAwareClientState client = mClients.valueAt(i);
                 if (client.getUid() != uid) {
@@ -695,27 +611,15 @@
                         WifiAwareDiscoverySessionState.PeerInfo peerInfo = session.getPeerInfo(
                                 peerId);
                         if (peerInfo != null) {
-                            MacAddrMapping mapping = new MacAddrMapping();
-                            mapping.peerId = peerId;
-                            mapping.macAddress = peerInfo.mMac;
-                            peerIdToMacMap.put(peerId, mapping);
+                            peerIdToMacMap.put(peerId, peerInfo.mMac);
                         }
                     }
                 }
             }
 
             try {
-                MacAddrMapping[] peerIdToMacList = peerIdToMacMap.values()
-                        .toArray(new MacAddrMapping[0]);
-                if (mDbg) {
-                    Log.v(TAG, "requestMacAddresses: peerIdToMacList begin");
-                    for (MacAddrMapping mapping : peerIdToMacList) {
-                        Log.v(TAG, "    " + mapping.peerId + ": "
-                                + MacAddress.fromBytes(mapping.macAddress));
-                    }
-                    Log.v(TAG, "requestMacAddresses: peerIdToMacList end");
-                }
-                callback.macAddress(peerIdToMacList);
+                if (mDbg) Log.v(TAG, "requestMacAddresses: peerIdToMacMap=" + peerIdToMacMap);
+                callback.macAddress(peerIdToMacMap);
             } catch (RemoteException e) {
                 Log.e(TAG, "requestMacAddress (sync): exception on callback -- " + e);
 
@@ -775,8 +679,8 @@
             }
             return;
         }
-        boolean changed = mInstantCommModeGlobalEnable != enabled;
-        mInstantCommModeGlobalEnable = enabled;
+        boolean changed = mIsInstantCommunicationModeEnabled != enabled;
+        mIsInstantCommunicationModeEnabled = enabled;
         if (!changed) {
             return;
         }
@@ -787,28 +691,8 @@
      * Get if instant communication mode is currently enabled.
      * @return true if enabled, false otherwise.
      */
-    public boolean isInstantCommModeGlobalEnable() {
-        return mInstantCommModeGlobalEnable;
-    }
-
-    /**
-     * Get if set channel on data-path request is supported.
-     * @return true if supported, false otherwise.
-     */
-    public boolean isSetChannelOnDataPathSupported() {
-        return mContext.getResources()
-                .getBoolean(R.bool.config_wifiSupportChannelOnDataPath);
-    }
-
-    /**
-     * Accept using parameter from external to config the Aware,
-     * @see WifiAwareManager#setAwareParams(AwareParams)
-     */
-    public void setAwareParams(AwareParams parameters) {
-        mHandler.post(() -> {
-            mWifiAwareNativeApi.setAwareParams(parameters);
-            reconfigure();
-        });
+    public boolean isInstantCommunicationModeEnabled() {
+        return mIsInstantCommunicationModeEnabled;
     }
 
     /**
@@ -816,7 +700,7 @@
      */
     public void connect(int clientId, int uid, int pid, String callingPackage,
             @Nullable String callingFeatureId, IWifiAwareEventCallback callback,
-            ConfigRequest configRequest, boolean notifyOnIdentityChanged, Bundle extra) {
+            ConfigRequest configRequest, boolean notifyOnIdentityChanged) {
         Message msg = mSm.obtainMessage(MESSAGE_TYPE_COMMAND);
         msg.arg1 = COMMAND_TYPE_CONNECT;
         msg.arg2 = clientId;
@@ -828,7 +712,6 @@
         msg.getData().putString(MESSAGE_BUNDLE_KEY_CALLING_FEATURE_ID, callingFeatureId);
         msg.getData().putBoolean(MESSAGE_BUNDLE_KEY_NOTIFY_IDENTITY_CHANGE,
                 notifyOnIdentityChanged);
-        msg.getData().putBundle(MESSAGE_BUNDLE_KEY_ATTRIBUTION_SOURCE, extra);
         mSm.sendMessage(msg);
     }
 
@@ -957,7 +840,7 @@
             if (mDbg) Log.d(TAG, "enableUsage(): while device is in IDLE mode - ignoring");
             return;
         }
-        if (!SdkLevel.isAtLeastT() && !mWifiPermissionsUtil.isLocationModeEnabled()) {
+        if (!mWifiPermissionsUtil.isLocationModeEnabled()) {
             if (mDbg) Log.d(TAG, "enableUsage(): while location is disabled - ignoring");
             return;
         }
@@ -1034,8 +917,8 @@
      * Command to initiate a data-path (executed by the initiator).
      */
     public void initiateDataPathSetup(WifiAwareNetworkSpecifier networkSpecifier, int peerId,
-            int channelRequestType, int channel, byte[] peer, String interfaceName,
-            boolean isOutOfBand, byte[] appInfo) {
+            int channelRequestType, int channel, byte[] peer, String interfaceName, byte[] pmk,
+            String passphrase, boolean isOutOfBand, byte[] appInfo) {
         Message msg = mSm.obtainMessage(MESSAGE_TYPE_COMMAND);
         msg.arg1 = COMMAND_TYPE_INITIATE_DATA_PATH_SETUP;
         msg.obj = networkSpecifier;
@@ -1044,6 +927,8 @@
         msg.getData().putInt(MESSAGE_BUNDLE_KEY_CHANNEL, channel);
         msg.getData().putByteArray(MESSAGE_BUNDLE_KEY_MAC_ADDRESS, peer);
         msg.getData().putString(MESSAGE_BUNDLE_KEY_INTERFACE_NAME, interfaceName);
+        msg.getData().putByteArray(MESSAGE_BUNDLE_KEY_PMK, pmk);
+        msg.getData().putString(MESSAGE_BUNDLE_KEY_PASSPHRASE, passphrase);
         msg.getData().putBoolean(MESSAGE_BUNDLE_KEY_OOB, isOutOfBand);
         msg.getData().putByteArray(MESSAGE_BUNDLE_KEY_APP_INFO, appInfo);
         mSm.sendMessage(msg);
@@ -1053,14 +938,14 @@
      * Command to respond to the data-path request (executed by the responder).
      */
     public void respondToDataPathRequest(boolean accept, int ndpId, String interfaceName,
-            byte[] appInfo, boolean isOutOfBand,
-            WifiAwareDataPathSecurityConfig securityConfig) {
+            byte[] pmk, String passphrase, byte[] appInfo, boolean isOutOfBand) {
         Message msg = mSm.obtainMessage(MESSAGE_TYPE_COMMAND);
         msg.arg1 = COMMAND_TYPE_RESPOND_TO_DATA_PATH_SETUP_REQUEST;
         msg.arg2 = ndpId;
-        msg.obj = securityConfig;
-        msg.getData().putBoolean(MESSAGE_BUNDLE_KEY_ACCEPT_STATE, accept);
+        msg.obj = accept;
         msg.getData().putString(MESSAGE_BUNDLE_KEY_INTERFACE_NAME, interfaceName);
+        msg.getData().putByteArray(MESSAGE_BUNDLE_KEY_PMK, pmk);
+        msg.getData().putString(MESSAGE_BUNDLE_KEY_PASSPHRASE, passphrase);
         msg.getData().putByteArray(MESSAGE_BUNDLE_KEY_APP_INFO, appInfo);
         msg.getData().putBoolean(MESSAGE_BUNDLE_KEY_OOB, isOutOfBand);
         mSm.sendMessage(msg);
@@ -1244,7 +1129,7 @@
 
     /**
      * Response from firmware to
-     * {@link #respondToDataPathRequest(boolean, int, String, byte[], boolean, WifiAwareDataPathSecurityConfig)}
+     * {@link #respondToDataPathRequest(boolean, int, String, byte[], String, byte[], boolean)}
      */
     public void onRespondToDataPathSetupRequestResponse(short transactionId, boolean success,
             int reasonOnFailure) {
@@ -1302,8 +1187,7 @@
      * matching service (to the one we were looking for).
      */
     public void onMatchNotification(int pubSubId, int requestorInstanceId, byte[] peerMac,
-            byte[] serviceSpecificInfo, byte[] matchFilter, int rangingIndication, int rangeMm,
-            byte[] scid, int peerCipherSuite) {
+            byte[] serviceSpecificInfo, byte[] matchFilter, int rangingIndication, int rangeMm) {
         Message msg = mSm.obtainMessage(MESSAGE_TYPE_NOTIFICATION);
         msg.arg1 = NOTIFICATION_TYPE_MATCH;
         msg.arg2 = pubSubId;
@@ -1313,9 +1197,6 @@
         msg.getData().putByteArray(MESSAGE_BUNDLE_KEY_FILTER_DATA, matchFilter);
         msg.getData().putInt(MESSAGE_RANGING_INDICATION, rangingIndication);
         msg.getData().putInt(MESSAGE_RANGE_MM, rangeMm);
-        msg.getData().putInt(MESSAGE_BUNDLE_KEY_CIPHER_SUITE, peerCipherSuite);
-        msg.getData().putByteArray(MESSAGE_BUNDLE_KEY_SCID, scid);
-
         mSm.sendMessage(msg);
     }
 
@@ -1409,7 +1290,7 @@
      * data-path is now up.
      */
     public void onDataPathConfirmNotification(int ndpId, byte[] mac, boolean accept, int reason,
-            byte[] message, List<WifiAwareChannelInfo> channelInfo) {
+            byte[] message, List<NanDataPathChannelInfo> channelInfo) {
         Message msg = mSm.obtainMessage(MESSAGE_TYPE_NOTIFICATION);
         msg.arg1 = NOTIFICATION_TYPE_ON_DATA_PATH_CONFIRM;
         msg.arg2 = ndpId;
@@ -1437,7 +1318,7 @@
      * data-paths.
      */
     public void onDataPathScheduleUpdateNotification(byte[] peerMac, ArrayList<Integer> ndpIds,
-            List<WifiAwareChannelInfo> channelInfo) {
+            List<NanDataPathChannelInfo> channelInfo) {
         Message msg = mSm.obtainMessage(MESSAGE_TYPE_NOTIFICATION);
         msg.arg1 = NOTIFICATION_TYPE_ON_DATA_PATH_SCHED_UPDATE;
         msg.getData().putByteArray(MESSAGE_BUNDLE_KEY_MAC_ADDRESS, peerMac);
@@ -1456,7 +1337,6 @@
         private DefaultState mDefaultState = new DefaultState();
         private WaitState mWaitState = new WaitState();
         private WaitForResponseState mWaitForResponseState = new WaitForResponseState();
-        private WaitingState mWaitingState = new WaitingState(this);
 
         private short mNextTransactionId = 1;
         public int mNextSessionId = 1;
@@ -1482,7 +1362,6 @@
 
             addState(mDefaultState);
             /* --> */ addState(mWaitState, mDefaultState);
-            /* ----> */ addState(mWaitingState, mWaitState);
             /* --> */ addState(mWaitForResponseState, mDefaultState);
 
             setInitialState(mWaitState);
@@ -1651,11 +1530,9 @@
                     byte[] matchFilter = msg.getData().getByteArray(MESSAGE_BUNDLE_KEY_FILTER_DATA);
                     int rangingIndication = msg.getData().getInt(MESSAGE_RANGING_INDICATION);
                     int rangeMm = msg.getData().getInt(MESSAGE_RANGE_MM);
-                    int cipherSuite = msg.getData().getInt(MESSAGE_BUNDLE_KEY_CIPHER_SUITE);
-                    byte[] scid = msg.getData().getByteArray(MESSAGE_BUNDLE_KEY_SCID);
 
                     onMatchLocal(pubSubId, requestorInstanceId, peerMac, serviceSpecificInfo,
-                            matchFilter, rangingIndication, rangeMm, cipherSuite, scid);
+                            matchFilter, rangingIndication, rangeMm);
                     break;
                 }
                 case NOTIFICATION_TYPE_MATCH_EXPIRED: {
@@ -1783,7 +1660,7 @@
                             msg.getData().getBoolean(MESSAGE_BUNDLE_KEY_SUCCESS_FLAG),
                             msg.getData().getInt(MESSAGE_BUNDLE_KEY_STATUS_CODE),
                             msg.getData().getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE_DATA),
-                            (List<WifiAwareChannelInfo>) msg.obj);
+                            (List<NanDataPathChannelInfo>) msg.obj);
 
                     if (success) {
                         WakeupMessage timeout = mDataPathConfirmTimeoutMessages.get(ndpId);
@@ -1797,13 +1674,12 @@
                 }
                 case NOTIFICATION_TYPE_ON_DATA_PATH_END:
                     mDataPathMgr.onDataPathEnd(msg.arg2);
-                    sendAwareResourcesChangedBroadcast();
                     break;
                 case NOTIFICATION_TYPE_ON_DATA_PATH_SCHED_UPDATE:
                     mDataPathMgr.onDataPathSchedUpdate(
                             msg.getData().getByteArray(MESSAGE_BUNDLE_KEY_MAC_ADDRESS),
                             msg.getData().getIntegerArrayList(MESSAGE_BUNDLE_KEY_NDP_IDS),
-                            (List<WifiAwareChannelInfo>) msg.obj);
+                            (List<NanDataPathChannelInfo>) msg.obj);
                     break;
                 default:
                     Log.wtf(TAG, "processNotification: this isn't a NOTIFICATION -- msg=" + msg);
@@ -1842,7 +1718,6 @@
                         waitForResponse = false;
                         break;
                     }
-
                     int clientId = msg.arg2;
                     IWifiAwareEventCallback callback = (IWifiAwareEventCallback) msg.obj;
                     ConfigRequest configRequest = (ConfigRequest) msg.getData()
@@ -1856,33 +1731,9 @@
                     boolean notifyIdentityChange = msg.getData().getBoolean(
                             MESSAGE_BUNDLE_KEY_NOTIFY_IDENTITY_CHANGE);
 
-                    int proceedWithOperation =
-                            mInterfaceConflictMgr.manageInterfaceConflictForStateMachine(TAG, msg,
-                                    this, mWaitingState, mWaitState,
-                                    HalDeviceManager.HDM_CREATE_IFACE_NAN,
-                                    new WorkSource(uid, callingPackage));
-
-                    if (proceedWithOperation == InterfaceConflictManager.ICM_ABORT_COMMAND) {
-                        // handling user rejection or possible conflict (pending command)
-                        try {
-                            callback.onConnectFail(
-                                    NanStatusType.NO_RESOURCES_AVAILABLE);
-                            mAwareMetrics.recordAttachStatus(
-                                    NanStatusType.NO_RESOURCES_AVAILABLE);
-                        } catch (RemoteException e) {
-                            Log.w(TAG, "displayUserApprovalDialog user refusal: RemoteException "
-                                    + "(FYI): " + e);
-                        }
-                        waitForResponse = false;
-                    } else if (proceedWithOperation
-                            == InterfaceConflictManager.ICM_EXECUTE_COMMAND) {
-                        waitForResponse = connectLocal(mCurrentTransactionId, clientId, uid, pid,
-                                callingPackage, callingFeatureId, callback, configRequest,
-                                notifyIdentityChange,
-                                msg.getData().getBundle(MESSAGE_BUNDLE_KEY_ATTRIBUTION_SOURCE));
-                    } else { // InterfaceConflictManager.ICM_SKIP_COMMAND_WAIT_FOR_USER
-                        waitForResponse = false;
-                    }
+                    waitForResponse = connectLocal(mCurrentTransactionId, clientId, uid, pid,
+                            callingPackage, callingFeatureId, callback, configRequest,
+                            notifyIdentityChange);
                     break;
                 }
                 case COMMAND_TYPE_DISCONNECT: {
@@ -2055,27 +1906,29 @@
                     int channel = data.getInt(MESSAGE_BUNDLE_KEY_CHANNEL);
                     byte[] peer = data.getByteArray(MESSAGE_BUNDLE_KEY_MAC_ADDRESS);
                     String interfaceName = data.getString(MESSAGE_BUNDLE_KEY_INTERFACE_NAME);
+                    byte[] pmk = data.getByteArray(MESSAGE_BUNDLE_KEY_PMK);
+                    String passphrase = data.getString(MESSAGE_BUNDLE_KEY_PASSPHRASE);
                     boolean isOutOfBand = data.getBoolean(MESSAGE_BUNDLE_KEY_OOB);
                     byte[] appInfo = data.getByteArray(MESSAGE_BUNDLE_KEY_APP_INFO);
 
                     waitForResponse = initiateDataPathSetupLocal(mCurrentTransactionId,
                             networkSpecifier, peerId, channelRequestType, channel, peer,
-                            interfaceName, isOutOfBand, appInfo);
+                            interfaceName, pmk, passphrase, isOutOfBand, appInfo);
                     break;
                 }
                 case COMMAND_TYPE_RESPOND_TO_DATA_PATH_SETUP_REQUEST: {
                     Bundle data = msg.getData();
 
                     int ndpId = msg.arg2;
-                    WifiAwareDataPathSecurityConfig securityConfig =
-                            (WifiAwareDataPathSecurityConfig) msg.obj;
-                    boolean accept = data.getBoolean(MESSAGE_BUNDLE_KEY_ACCEPT_STATE);
+                    boolean accept = (boolean) msg.obj;
                     String interfaceName = data.getString(MESSAGE_BUNDLE_KEY_INTERFACE_NAME);
+                    byte[] pmk = data.getByteArray(MESSAGE_BUNDLE_KEY_PMK);
+                    String passphrase = data.getString(MESSAGE_BUNDLE_KEY_PASSPHRASE);
                     byte[] appInfo = data.getByteArray(MESSAGE_BUNDLE_KEY_APP_INFO);
                     boolean isOutOfBand = data.getBoolean(MESSAGE_BUNDLE_KEY_OOB);
 
                     waitForResponse = respondToDataPathRequestLocal(mCurrentTransactionId, accept,
-                            ndpId, interfaceName, appInfo, isOutOfBand, securityConfig);
+                            ndpId, interfaceName, pmk, passphrase, appInfo, isOutOfBand);
 
                     break;
                 }
@@ -2083,10 +1936,6 @@
                     waitForResponse = endDataPathLocal(mCurrentTransactionId, msg.arg2);
                     break;
                 case COMMAND_TYPE_DELAYED_INITIALIZATION:
-                    if (SdkLevel.isAtLeastT()) {
-                        mWifiManager.registerActiveCountryCodeChangedCallback(
-                                new HandlerExecutor(mHandler), new CountryCodeChangeCallback());
-                    }
                     mWifiAwareNativeManager.start(getHandler());
                     waitForResponse = false;
                     break;
@@ -2220,7 +2069,6 @@
                         mDataPathConfirmTimeoutMessages.put(ndpId, timeout);
                         timeout.schedule(
                                 SystemClock.elapsedRealtime() + AWARE_WAIT_FOR_DP_CONFIRM_TIMEOUT);
-                        sendAwareResourcesChangedBroadcast();
                     }
 
                     break;
@@ -2483,19 +2331,6 @@
         mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
     }
 
-    private void sendAwareResourcesChangedBroadcast() {
-        if (!SdkLevel.isAtLeastT()) {
-            return;
-        }
-        if (VDBG) {
-            Log.v(TAG, "sendAwareResourcesChangedBroadcast");
-        }
-        final Intent intent = new Intent(WifiAwareManager.ACTION_WIFI_AWARE_RESOURCE_CHANGED);
-        intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
-        intent.putExtra(WifiAwareManager.EXTRA_AWARE_RESOURCES, getAvailableAwareResources());
-        mContext.sendBroadcastAsUser(intent, UserHandle.ALL, ACCESS_WIFI_STATE);
-    }
-
     /*
      * COMMANDS
      */
@@ -2503,7 +2338,7 @@
     private boolean connectLocal(short transactionId, int clientId, int uid, int pid,
             String callingPackage, @Nullable String callingFeatureId,
             IWifiAwareEventCallback callback, ConfigRequest configRequest,
-            boolean notifyIdentityChange, Bundle extra) {
+            boolean notifyIdentityChange) {
         if (VDBG) {
             Log.v(TAG, "connectLocal(): transactionId=" + transactionId + ", clientId=" + clientId
                     + ", uid=" + uid + ", pid=" + pid + ", callingPackage=" + callingPackage
@@ -2555,7 +2390,7 @@
             }
             WifiAwareClientState client = new WifiAwareClientState(mContext, clientId, uid, pid,
                     callingPackage, callingFeatureId, callback, configRequest, notifyIdentityChange,
-                    SystemClock.elapsedRealtime(), mWifiPermissionsUtil, extra);
+                    SystemClock.elapsedRealtime(), mWifiPermissionsUtil);
             client.enableVerboseLogging(mDbg);
             client.onInterfaceAddressChange(mCurrentDiscoveryInterfaceMac);
             mClients.append(clientId, client);
@@ -2568,13 +2403,6 @@
         boolean notificationRequired =
                 doesAnyClientNeedIdentityChangeNotifications() || notifyIdentityChange;
         boolean rangingRequired = doesAnyClientNeedRanging();
-        int instantMode = getInstantModeFromAllClients();
-        boolean enableInstantMode = false;
-        int instantModeChannel = 0;
-        if (instantMode != INSTANT_MODE_DISABLED || mInstantCommModeGlobalEnable) {
-            enableInstantMode = true;
-            instantModeChannel = getAwareInstantCommunicationChannel(instantMode);
-        }
 
         if (mCurrentAwareConfiguration == null) {
             mWifiAwareNativeManager.tryToGetAware(new WorkSource(uid, callingPackage));
@@ -2583,7 +2411,7 @@
         boolean success = mWifiAwareNativeApi.enableAndConfigure(transactionId, merged,
                 notificationRequired, mCurrentAwareConfiguration == null,
                 mPowerManager.isInteractive(), mPowerManager.isDeviceIdleMode(),
-                rangingRequired, enableInstantMode, instantModeChannel);
+                rangingRequired, mIsInstantCommunicationModeEnabled);
         if (!success) {
             try {
                 callback.onConnectFail(NanStatusType.INTERNAL_FAILURE);
@@ -2621,7 +2449,6 @@
             mDataPathMgr.deleteAllInterfaces();
             mCurrentRangingEnabled = false;
             mCurrentIdentityNotification = false;
-            mInstantCommModeClientRequest = INSTANT_MODE_DISABLED;
             deferDisableAware();
             return false;
         }
@@ -2637,23 +2464,15 @@
         }
         boolean notificationReqs = doesAnyClientNeedIdentityChangeNotifications();
         boolean rangingEnabled = doesAnyClientNeedRanging();
-        int instantMode = getInstantModeFromAllClients();
-        boolean enableInstantMode = false;
-        int instantModeChannel = 0;
-        if (instantMode != INSTANT_MODE_DISABLED || mInstantCommModeGlobalEnable) {
-            enableInstantMode = true;
-            instantModeChannel = getAwareInstantCommunicationChannel(instantMode);
-        }
         if (merged.equals(mCurrentAwareConfiguration)
                 && mCurrentIdentityNotification == notificationReqs
-                && mCurrentRangingEnabled == rangingEnabled
-                && mInstantCommModeClientRequest == instantMode) {
+                && mCurrentRangingEnabled == rangingEnabled) {
             return false;
         }
 
         return mWifiAwareNativeApi.enableAndConfigure(transactionId, merged, notificationReqs,
                 false, mPowerManager.isInteractive(), mPowerManager.isDeviceIdleMode(),
-                rangingEnabled, enableInstantMode, instantModeChannel);
+                rangingEnabled, mIsInstantCommunicationModeEnabled);
     }
 
     private boolean reconfigureLocal(short transactionId) {
@@ -2666,18 +2485,11 @@
 
         boolean notificationReqs = doesAnyClientNeedIdentityChangeNotifications();
         boolean rangingEnabled = doesAnyClientNeedRanging();
-        int instantMode = getInstantModeFromAllClients();
-        boolean enableInstantMode = false;
-        int instantModeChannel = 0;
-        if (instantMode != INSTANT_MODE_DISABLED || mInstantCommModeGlobalEnable) {
-            enableInstantMode = true;
-            instantModeChannel = getAwareInstantCommunicationChannel(instantMode);
-        }
 
         return mWifiAwareNativeApi.enableAndConfigure(transactionId, mCurrentAwareConfiguration,
                 notificationReqs, false, mPowerManager.isInteractive(),
                 mPowerManager.isDeviceIdleMode(), rangingEnabled,
-                enableInstantMode, instantModeChannel);
+                mIsInstantCommunicationModeEnabled);
     }
 
     private void terminateSessionLocal(int clientId, int sessionId) {
@@ -2693,16 +2505,14 @@
         }
 
         WifiAwareDiscoverySessionState session = client.terminateSession(sessionId);
-        // If Ranging enabled or instant mode require changes, reconfigure.
-        if (mCurrentRangingEnabled != doesAnyClientNeedRanging()
-                || mInstantCommModeClientRequest != getInstantModeFromAllClients()) {
+        // If Ranging enabled require changes, reconfigure.
+        if (mCurrentRangingEnabled != doesAnyClientNeedRanging()) {
             reconfigure();
         }
         if (session != null) {
             mAwareMetrics.recordDiscoverySessionDuration(session.getCreationTime(),
                     session.isPublishSession());
         }
-        sendAwareResourcesChangedBroadcast();
     }
 
     private boolean publishLocal(short transactionId, int clientId, PublishConfig publishConfig,
@@ -2878,34 +2688,29 @@
         mUsageEnabled = markAsAvailable;
         mCurrentRangingEnabled = false;
         mCurrentIdentityNotification = false;
-        mInstantCommModeClientRequest = INSTANT_MODE_DISABLED;
         deferDisableAware();
         sendAwareStateChangedBroadcast(markAsAvailable);
-        if (!markAsAvailable) {
-            mAwareMetrics.recordDisableUsage();
-        }
+        mAwareMetrics.recordDisableUsage();
     }
 
     private boolean initiateDataPathSetupLocal(short transactionId,
             WifiAwareNetworkSpecifier networkSpecifier, int peerId, int channelRequestType,
-            int channel, byte[] peer, String interfaceName,
+            int channel, byte[] peer, String interfaceName, byte[] pmk, String passphrase,
             boolean isOutOfBand, byte[] appInfo) {
-        WifiAwareDataPathSecurityConfig securityConfig = networkSpecifier
-                .getWifiAwareDataPathSecurityConfig();
         if (VDBG) {
             Log.v(TAG, "initiateDataPathSetupLocal(): transactionId=" + transactionId
                     + ", networkSpecifier=" + networkSpecifier + ", peerId=" + peerId
                     + ", channelRequestType=" + channelRequestType + ", channel=" + channel
                     + ", peer="
                     + String.valueOf(HexEncoding.encode(peer)) + ", interfaceName=" + interfaceName
-                    + ", securityConfig=" + ((securityConfig == null) ? "" : securityConfig)
-                    + ", isOutOfBand="
+                    + ", pmk=" + ((pmk == null) ? "" : "*") + ", passphrase=" + (
+                    (passphrase == null) ? "" : "*") + ", isOutOfBand="
                     + isOutOfBand + ", appInfo=" + (appInfo == null ? "<null>" : "<non-null>"));
         }
 
         boolean success = mWifiAwareNativeApi.initiateDataPath(transactionId, peerId,
-                channelRequestType, channel, peer, interfaceName, isOutOfBand,
-                appInfo, mCapabilities, networkSpecifier.getWifiAwareDataPathSecurityConfig());
+                channelRequestType, channel, peer, interfaceName, pmk, passphrase, isOutOfBand,
+                appInfo, mCapabilities);
         if (!success) {
             mDataPathMgr.onDataPathInitiateFail(networkSpecifier, NanStatusType.INTERNAL_FAILURE);
         }
@@ -2914,22 +2719,21 @@
     }
 
     private boolean respondToDataPathRequestLocal(short transactionId, boolean accept,
-            int ndpId, String interfaceName, byte[] appInfo, boolean isOutOfBand,
-            WifiAwareDataPathSecurityConfig securityConfig) {
+            int ndpId, String interfaceName, byte[] pmk, String passphrase, byte[] appInfo,
+            boolean isOutOfBand) {
         if (VDBG) {
             Log.v(TAG,
                     "respondToDataPathRequestLocal(): transactionId=" + transactionId + ", accept="
                             + accept + ", ndpId=" + ndpId + ", interfaceName=" + interfaceName
-                            + ", securityConfig=" + securityConfig
-                            + ", isOutOfBand=" + isOutOfBand
-                            + ", appInfo=" + (appInfo == null ? "<null>" : "<non-null>"));
+                            + ", pmk=" + ((pmk == null) ? "" : "*") + ", passphrase="
+                            + ((passphrase == null) ? "" : "*") + ", isOutOfBand="
+                            + isOutOfBand + ", appInfo=" + (appInfo == null ? "<null>"
+                            : "<non-null>"));
         }
         boolean success = mWifiAwareNativeApi.respondToDataPathRequest(transactionId, accept, ndpId,
-                interfaceName, appInfo, isOutOfBand, mCapabilities, securityConfig);
+                interfaceName, pmk, passphrase, appInfo, isOutOfBand, mCapabilities);
         if (!success) {
             mDataPathMgr.onRespondToDataPathRequest(ndpId, false, NanStatusType.INTERNAL_FAILURE);
-        } else {
-            sendAwareResourcesChangedBroadcast();
         }
         return success;
     }
@@ -2939,7 +2743,7 @@
             Log.v(TAG,
                     "endDataPathLocal: transactionId=" + transactionId + ", ndpId=" + ndpId);
         }
-        sendAwareResourcesChangedBroadcast();
+
         return mWifiAwareNativeApi.endDataPath(transactionId, ndpId);
     }
 
@@ -2973,8 +2777,7 @@
 
             WifiAwareClientState client = new WifiAwareClientState(mContext, clientId, uid, pid,
                     callingPackage, callingFeatureId, callback, configRequest, notifyIdentityChange,
-                    SystemClock.elapsedRealtime(), mWifiPermissionsUtil,
-                    data.getBundle(MESSAGE_BUNDLE_KEY_ATTRIBUTION_SOURCE));
+                    SystemClock.elapsedRealtime(), mWifiPermissionsUtil);
             client.enableVerboseLogging(mDbg);
             mClients.put(clientId, client);
             mAwareMetrics.recordAttachSession(uid, notifyIdentityChange, mClients);
@@ -3004,13 +2807,6 @@
         }
         mCurrentIdentityNotification = doesAnyClientNeedIdentityChangeNotifications();
         mCurrentRangingEnabled = doesAnyClientNeedRanging();
-        mInstantCommModeClientRequest = getInstantModeFromAllClients();
-        if (mInstantCommModeClientRequest != INSTANT_MODE_DISABLED
-                && !mInstantCommModeGlobalEnable) {
-            // Change the instant communication mode when timeout
-            mHandler.postDelayed(() -> reconfigure(), (long) mContext.getResources()
-                    .getInteger(R.integer.config_wifiAwareInstantCommunicationModeDurationMillis));
-        }
     }
 
     private void onConfigFailedLocal(Message failedCommand, int reason) {
@@ -3073,16 +2869,12 @@
         }
 
         boolean isRangingEnabled = false;
-        boolean enableInstantMode = false;
-        int instantModeBand;
         int minRange = -1;
         int maxRange = -1;
         if (isPublish) {
             PublishConfig publishConfig = completedCommand.getData().getParcelable(
                     MESSAGE_BUNDLE_KEY_CONFIG);
             isRangingEnabled = publishConfig.mEnableRanging;
-            enableInstantMode = publishConfig.isInstantCommunicationModeEnabled();
-            instantModeBand = publishConfig.getInstantCommunicationBand();
         } else {
             SubscribeConfig subscribeConfig = completedCommand.getData().getParcelable(
                     MESSAGE_BUNDLE_KEY_CONFIG);
@@ -3094,8 +2886,6 @@
             if (subscribeConfig.mMaxDistanceMmSet) {
                 maxRange = subscribeConfig.mMaxDistanceMm;
             }
-            enableInstantMode = subscribeConfig.isInstantCommunicationModeEnabled();
-            instantModeBand = subscribeConfig.getInstantCommunicationBand();
         }
 
         if (completedCommand.arg1 == COMMAND_TYPE_PUBLISH
@@ -3121,7 +2911,7 @@
 
             WifiAwareDiscoverySessionState session = new WifiAwareDiscoverySessionState(
                     mWifiAwareNativeApi, sessionId, pubSubId, callback, isPublish, isRangingEnabled,
-                    SystemClock.elapsedRealtime(), enableInstantMode, instantModeBand);
+                    SystemClock.elapsedRealtime());
             session.enableVerboseLogging(mDbg);
             client.addSession(session);
 
@@ -3134,7 +2924,7 @@
             }
             mAwareMetrics.recordDiscoveryStatus(client.getUid(), NanStatusType.SUCCESS,
                     completedCommand.arg1 == COMMAND_TYPE_PUBLISH);
-            sendAwareResourcesChangedBroadcast();
+
         } else if (completedCommand.arg1 == COMMAND_TYPE_UPDATE_PUBLISH
                 || completedCommand.arg1 == COMMAND_TYPE_UPDATE_SUBSCRIBE) {
             int clientId = completedCommand.arg2;
@@ -3161,8 +2951,6 @@
                         + e);
             }
             session.setRangingEnabled(isRangingEnabled);
-            session.setInstantModeEnabled(enableInstantMode);
-            session.setInstantModeBand(instantModeBand);
             mAwareMetrics.recordDiscoveryStatus(client.getUid(), NanStatusType.SUCCESS,
                     completedCommand.arg1 == COMMAND_TYPE_UPDATE_PUBLISH);
         } else {
@@ -3170,9 +2958,8 @@
                     "onSessionConfigSuccessLocal: unexpected completedCommand=" + completedCommand);
             return;
         }
-        // If Ranging enabled or instant mode require changes, reconfigure.
-        if (mCurrentRangingEnabled != doesAnyClientNeedRanging()
-                || mInstantCommModeClientRequest != getInstantModeFromAllClients()) {
+        // If ranging require changes, reconfigure.
+        if (mCurrentRangingEnabled != doesAnyClientNeedRanging()) {
             reconfigure();
         }
     }
@@ -3231,12 +3018,9 @@
 
             if (reason == NanStatusType.INVALID_SESSION_ID) {
                 client.removeSession(sessionId);
-                // If Ranging enabled or instant mode require changes, reconfigure.
-                if (mCurrentRangingEnabled != doesAnyClientNeedRanging()
-                        || mInstantCommModeClientRequest != getInstantModeFromAllClients()) {
+                if (mCurrentRangingEnabled != doesAnyClientNeedRanging()) {
                     reconfigure();
                 }
-                sendAwareResourcesChangedBroadcast();
             }
         } else {
             Log.wtf(TAG, "onSessionConfigFailLocal: unexpected failedCommand=" + failedCommand);
@@ -3424,8 +3208,7 @@
     }
 
     private void onMatchLocal(int pubSubId, int requestorInstanceId, byte[] peerMac,
-            byte[] serviceSpecificInfo, byte[] matchFilter, int rangingIndication, int rangeMm,
-            int cipherSuite, byte[] scid) {
+            byte[] serviceSpecificInfo, byte[] matchFilter, int rangingIndication, int rangeMm) {
         if (VDBG) {
             Log.v(TAG,
                     "onMatch: pubSubId=" + pubSubId + ", requestorInstanceId=" + requestorInstanceId
@@ -3446,7 +3229,7 @@
             mAwareMetrics.recordMatchIndicationForRangeEnabledSubscribe(rangingIndication != 0);
         }
         data.second.onMatch(requestorInstanceId, peerMac, serviceSpecificInfo, matchFilter,
-                rangingIndication, rangeMm, cipherSuite, scid);
+                rangingIndication, rangeMm);
     }
 
     private void onMatchExpiredLocal(int pubSubId, int requestorInstanceId) {
@@ -3485,14 +3268,11 @@
                     "onSessionTerminatedLocal onSessionTerminated(): RemoteException (FYI): " + e);
         }
         data.first.removeSession(data.second.getSessionId());
-        // If Ranging enabled or instant mode require changes, reconfigure.
-        if (mCurrentRangingEnabled != doesAnyClientNeedRanging()
-                || mInstantCommModeClientRequest != getInstantModeFromAllClients()) {
+        if (mCurrentRangingEnabled != doesAnyClientNeedRanging()) {
             reconfigure();
         }
         mAwareMetrics.recordDiscoverySessionDuration(data.second.getCreationTime(),
                 data.second.isPublishSession());
-        sendAwareResourcesChangedBroadcast();
     }
 
     private void onMessageReceivedLocal(int pubSubId, int requestorInstanceId, byte[] peerMac,
@@ -3523,14 +3303,13 @@
         }
 
         for (int i = 0; i < mClients.size(); ++i) {
-            WifiAwareClientState client = mClients.valueAt(i);
-            mAwareMetrics.recordAttachSessionDuration(client.getCreationTime());
-            SparseArray<WifiAwareDiscoverySessionState> sessions = client.getSessions();
+            mAwareMetrics.recordAttachSessionDuration(mClients.valueAt(i).getCreationTime());
+            SparseArray<WifiAwareDiscoverySessionState> sessions = mClients.valueAt(
+                    i).getSessions();
             for (int j = 0; j < sessions.size(); ++j) {
                 mAwareMetrics.recordDiscoverySessionDuration(sessions.valueAt(j).getCreationTime(),
                         sessions.valueAt(j).isPublishSession());
             }
-            client.destroy();
         }
         mAwareMetrics.recordDisableAware();
 
@@ -3540,7 +3319,6 @@
         mDataPathMgr.onAwareDownCleanupDataPaths();
         mCurrentDiscoveryInterfaceMac = ALL_ZERO_MAC;
         mDataPathMgr.deleteAllInterfaces();
-        sendAwareResourcesChangedBroadcast();
     }
 
     /*
@@ -3683,21 +3461,6 @@
         return false;
     }
 
-    private int getInstantModeFromAllClients() {
-        int instantMode = INSTANT_MODE_DISABLED;
-        for (int i = 0; i < mClients.size(); ++i) {
-            int currentClient = mClients.valueAt(i).getInstantMode((long) mContext.getResources()
-                    .getInteger(R.integer.config_wifiAwareInstantCommunicationModeDurationMillis));
-            if (currentClient == INSTANT_MODE_5GHZ) {
-                return currentClient;
-            }
-            if (currentClient == INSTANT_MODE_24GHZ) {
-                instantMode = currentClient;
-            }
-        }
-        return instantMode;
-    }
-
     private static String messageToString(Message msg) {
         StringBuilder sb = new StringBuilder();
 
@@ -3750,70 +3513,5 @@
         mWifiAwareNativeApi.dump(fd, pw, args);
         pw.println("mAwareMetrics:");
         mAwareMetrics.dump(fd, pw, args);
-        mInterfaceConflictMgr.dump(fd, pw, args);
-    }
-
-    private void handleLocationModeDisabled() {
-        for (int i = 0; i < mClients.size(); i++) {
-            WifiAwareClientState clientState = mClients.valueAt(i);
-            try {
-                // As location mode is disabled, only app disavowal the location can pass the check.
-                mWifiPermissionsUtil.enforceNearbyDevicesPermission(clientState.getExtra()
-                        .getParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE), true,
-                        "Wifi Aware location mode change.");
-            } catch (SecurityException e) {
-                disconnect(clientState.getClientId());
-            }
-        }
-    }
-
-    private int getAwareInstantCommunicationChannel(int instantMode) {
-        if (instantMode != INSTANT_MODE_5GHZ) {
-            return AWARE_BAND_2_INSTANT_COMMUNICATION_CHANNEL_FREQ;
-        }
-        if (mAwareBand5InstantCommunicationChannelFreq == 0) {
-            // If 5G instant communication doesn't have a valid channel, fallback to 2G.
-            return AWARE_BAND_2_INSTANT_COMMUNICATION_CHANNEL_FREQ;
-        }
-        if (mAwareBand5InstantCommunicationChannelFreq > 0) {
-            return mAwareBand5InstantCommunicationChannelFreq;
-        }
-        List<WifiAvailableChannel> channels = mWifiInjector.getWifiThreadRunner().call(
-                () -> mWifiInjector.getWifiNative().getUsableChannels(WifiScanner.WIFI_BAND_5_GHZ,
-                        OP_MODE_WIFI_AWARE, WifiAvailableChannel.FILTER_NAN_INSTANT_MODE), null);
-        if (channels == null || channels.isEmpty()) {
-            if (mDbg) {
-                Log.v(TAG, "No available instant communication mode channel");
-            }
-            mAwareBand5InstantCommunicationChannelFreq = 0;
-        } else {
-            if (channels.size() > 1) {
-                if (mDbg) {
-                    Log.v(TAG, "should have only one 5G instant communication channel,"
-                            + "but size=" + channels.size());
-                }
-            }
-            // TODO(b/232138258): When the filter issue fixed, just check if only return channel is
-            //  correct
-            for (WifiAvailableChannel channel : channels) {
-                int freq = channel.getFrequencyMhz();
-                if (freq == AWARE_BAND_5_INSTANT_COMMUNICATION_CHANNEL_FREQ_CHANNEL_149) {
-                    mAwareBand5InstantCommunicationChannelFreq =
-                            AWARE_BAND_5_INSTANT_COMMUNICATION_CHANNEL_FREQ_CHANNEL_149;
-                    break;
-                } else if (freq == AWARE_BAND_5_INSTANT_COMMUNICATION_CHANNEL_FREQ_CHANNEL_44) {
-                    mAwareBand5InstantCommunicationChannelFreq =
-                            AWARE_BAND_5_INSTANT_COMMUNICATION_CHANNEL_FREQ_CHANNEL_44;
-                }
-            }
-            if (mAwareBand5InstantCommunicationChannelFreq == -1) {
-                Log.e(TAG, "Both channel 149 and 44 are not available when the 5G WI-FI is "
-                        + "supported");
-                mAwareBand5InstantCommunicationChannelFreq = 0;
-            }
-        }
-        return mAwareBand5InstantCommunicationChannelFreq == 0
-                ? AWARE_BAND_2_INSTANT_COMMUNICATION_CHANNEL_FREQ
-                : mAwareBand5InstantCommunicationChannelFreq;
     }
 }
diff --git a/service/java/com/android/server/wifi/coex/CoexManager.java b/service/java/com/android/server/wifi/coex/CoexManager.java
index f8e7b90..fa4c45f 100644
--- a/service/java/com/android/server/wifi/coex/CoexManager.java
+++ b/service/java/com/android/server/wifi/coex/CoexManager.java
@@ -33,24 +33,22 @@
 import static com.android.server.wifi.coex.CoexUtils.NUM_24_GHZ_CHANNELS;
 import static com.android.server.wifi.coex.CoexUtils.get2gHarmonicCoexUnsafeChannels;
 import static com.android.server.wifi.coex.CoexUtils.get5gHarmonicCoexUnsafeChannels;
-import static com.android.server.wifi.coex.CoexUtils.getCoexUnsafeChannelsForGpsL1;
 import static com.android.server.wifi.coex.CoexUtils.getIntermodCoexUnsafeChannels;
 import static com.android.server.wifi.coex.CoexUtils.getNeighboringCoexUnsafeChannels;
 
-import android.annotation.AnyThread;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.content.res.Resources;
 import android.net.wifi.CoexUnsafeChannel;
 import android.net.wifi.ICoexCallback;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiManager.CoexRestriction;
 import android.os.Build;
 import android.os.Handler;
+import android.os.HandlerExecutor;
 import android.os.PersistableBundle;
 import android.os.RemoteCallbackList;
 import android.os.RemoteException;
@@ -68,9 +66,7 @@
 
 import androidx.annotation.RequiresApi;
 
-import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.HandlerExecutor;
 import com.android.server.wifi.WifiNative;
 import com.android.wifi.resources.R;
 
@@ -257,9 +253,6 @@
     private final List<CoexUtils.CoexCellChannel> mMockCellChannels = new ArrayList<>();
     private boolean mIsUsingMockCellChannels = false;
 
-    private final Object mLock = new Object();
-
-    @GuardedBy("mLock")
     @NonNull
     private final List<CoexUnsafeChannel> mCurrentCoexUnsafeChannels = new ArrayList<>();
     private int mCoexRestrictions;
@@ -309,12 +302,9 @@
      *
      * @return Set of current CoexUnsafeChannels.
      */
-    @AnyThread
     @NonNull
     public List<CoexUnsafeChannel> getCoexUnsafeChannels() {
-        synchronized (mLock) {
-            return new ArrayList<>(mCurrentCoexUnsafeChannels);
-        }
+        return mCurrentCoexUnsafeChannels;
     }
 
     /**
@@ -348,21 +338,19 @@
             Log.e(TAG, "setCoexUnsafeChannels called with undefined restriction flags");
             return;
         }
-        synchronized (mLock) {
-            if (new HashSet(mCurrentCoexUnsafeChannels).equals(new HashSet(coexUnsafeChannels))
-                    && mCoexRestrictions == coexRestrictions) {
-                // Do not update if the unsafe channels haven't changed since the last time
-                return;
-            }
-            mCurrentCoexUnsafeChannels.clear();
-            mCurrentCoexUnsafeChannels.addAll(coexUnsafeChannels);
-            mCoexRestrictions = coexRestrictions;
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "Current unsafe channels: " + mCurrentCoexUnsafeChannels
-                        + ", restrictions: " + mCoexRestrictions);
-            }
-            mWifiNative.setCoexUnsafeChannels(mCurrentCoexUnsafeChannels, mCoexRestrictions);
+        if (new HashSet(mCurrentCoexUnsafeChannels).equals(new HashSet(coexUnsafeChannels))
+                && mCoexRestrictions == coexRestrictions) {
+            // Do not update if the unsafe channels haven't changed since the last time
+            return;
         }
+        mCurrentCoexUnsafeChannels.clear();
+        mCurrentCoexUnsafeChannels.addAll(coexUnsafeChannels);
+        mCoexRestrictions = coexRestrictions;
+        if (mVerboseLoggingEnabled) {
+            Log.v(TAG, "Current unsafe channels: " + mCurrentCoexUnsafeChannels
+                    + ", restrictions: " + mCoexRestrictions);
+        }
+        mWifiNative.setCoexUnsafeChannels(mCurrentCoexUnsafeChannels, mCoexRestrictions);
         notifyListeners();
         notifyRemoteCallbacks();
     }
@@ -402,9 +390,7 @@
     public void registerRemoteCoexCallback(ICoexCallback callback) {
         mRemoteCallbackList.register(callback);
         try {
-            synchronized (mLock) {
-                callback.onCoexUnsafeChannelsChanged(mCurrentCoexUnsafeChannels, mCoexRestrictions);
-            }
+            callback.onCoexUnsafeChannelsChanged(mCurrentCoexUnsafeChannels, mCoexRestrictions);
         } catch (RemoteException e) {
             Log.e(TAG, "onCoexUnsafeChannelsChanged: remote exception -- " + e);
         }
@@ -429,10 +415,8 @@
         final int itemCount = mRemoteCallbackList.beginBroadcast();
         for (int i = 0; i < itemCount; i++) {
             try {
-                synchronized (mLock) {
-                    mRemoteCallbackList.getBroadcastItem(i).onCoexUnsafeChannelsChanged(
-                            mCurrentCoexUnsafeChannels, mCoexRestrictions);
-                }
+                mRemoteCallbackList.getBroadcastItem(i)
+                        .onCoexUnsafeChannelsChanged(mCurrentCoexUnsafeChannels, mCoexRestrictions);
             } catch (RemoteException e) {
                 Log.e(TAG, "onCoexUnsafeChannelsChanged: remote exception -- " + e);
             }
@@ -482,10 +466,6 @@
                 default:
                     entry = null;
             }
-            final int downlinkFreqKhz = cellChannel.getDownlinkFreqKhz();
-            final int downlinkBandwidthKhz = cellChannel.getDownlinkBandwidthKhz();
-            final int uplinkFreqKhz = cellChannel.getUplinkFreqKhz();
-            final int uplinkBandwidthKhz = cellChannel.getUplinkBandwidthKhz();
             final List<CoexUnsafeChannel> currentBandUnsafeChannels = new ArrayList<>();
             if (entry != null) {
                 final int powerCapDbm;
@@ -501,6 +481,10 @@
                 final Override override = entry.getOverride();
                 if (params != null) {
                     // Add all of the CoexUnsafeChannels calculated with the given parameters.
+                    final int downlinkFreqKhz = cellChannel.getDownlinkFreqKhz();
+                    final int downlinkBandwidthKhz = cellChannel.getDownlinkBandwidthKhz();
+                    final int uplinkFreqKhz = cellChannel.getUplinkFreqKhz();
+                    final int uplinkBandwidthKhz = cellChannel.getUplinkBandwidthKhz();
                     final NeighborThresholds neighborThresholds = params.getNeighborThresholds();
                     final HarmonicParams harmonicParams2g = params.getHarmonicParams2g();
                     final HarmonicParams harmonicParams5g = params.getHarmonicParams5g();
@@ -722,16 +706,6 @@
                     }
                 }
             }
-            // Add all of the CoexUnsafeChannels that cause intermod on GPS L1 with the current
-            // uplink cell channels.
-            Resources res = mContext.getResources();
-            if (res.getBoolean(R.bool.config_wifiCoexForGpsL1)) {
-                if (uplinkFreqKhz >= 0 && uplinkBandwidthKhz >= 0) {
-                    currentBandUnsafeChannels.addAll(getCoexUnsafeChannelsForGpsL1(
-                            uplinkFreqKhz, uplinkBandwidthKhz,
-                            res.getInteger(R.integer.config_wifiCoexGpsL1ThresholdKhz)));
-                }
-            }
             // Add all of the CoexUnsafeChannels calculated from this cell channel to the total.
             // If the total already contains a CoexUnsafeChannel for the same band and channel,
             // keep the one that has the lower power cap.
diff --git a/service/java/com/android/server/wifi/coex/CoexUtils.java b/service/java/com/android/server/wifi/coex/CoexUtils.java
index 786fe78..7dd2398 100644
--- a/service/java/com/android/server/wifi/coex/CoexUtils.java
+++ b/service/java/com/android/server/wifi/coex/CoexUtils.java
@@ -56,8 +56,6 @@
     @VisibleForTesting
     /* package */ static final int INVALID_FREQ = -1;
 
-    public static final int GPS_L1_CENTER_FREQ_KHZ = 1575_420;
-
     public static final int NUM_24_GHZ_CHANNELS = 14;
     public static final NavigableSet<Integer> CHANNEL_SET_5_GHZ_20_MHZ = create5g20MhzChannels();
     public static final NavigableSet<Integer> CHANNEL_SET_5_GHZ_40_MHZ = create5g40MhzChannels();
@@ -545,96 +543,6 @@
     }
 
     /**
-     * Returns CoexUnsafeChannels affecting GPS L1 due to the intermod interference from a given
-     * uplink and downlink cell channel and every possible Wi-Fi channel.
-     */
-    public static List<CoexUnsafeChannel> getCoexUnsafeChannelsForGpsL1(
-            int cellUlFreqKhz, int cellUlBandwidthKhz, int thresholdKhz) {
-        List<CoexUnsafeChannel> coexUnsafeChannels = new ArrayList<>();
-        for (int channel = 1; channel <= 14; channel++) {
-            int centerFreq2gMhz =
-                    ScanResult.convertChannelToFrequencyMhzIfSupported(channel, WIFI_BAND_24_GHZ);
-            if (centerFreq2gMhz == UNSPECIFIED) {
-                continue;
-            }
-            if (isGpsL1ImpactedByCellAndWifi(cellUlFreqKhz, cellUlBandwidthKhz,
-                    centerFreq2gMhz * 1000, 22_000, thresholdKhz)) {
-                coexUnsafeChannels.add(new CoexUnsafeChannel(WIFI_BAND_24_GHZ, channel));
-            }
-        }
-        for (int channel : CHANNEL_SET_5_GHZ_20_MHZ) {
-            int centerFreq5g20Mhz =
-                    ScanResult.convertChannelToFrequencyMhzIfSupported(channel, WIFI_BAND_5_GHZ);
-            if (centerFreq5g20Mhz == UNSPECIFIED) {
-                continue;
-            }
-            if (isGpsL1ImpactedByCellAndWifi(cellUlFreqKhz, cellUlBandwidthKhz,
-                    centerFreq5g20Mhz * 1000, 20_000, thresholdKhz)) {
-                coexUnsafeChannels.add(new CoexUnsafeChannel(WIFI_BAND_24_GHZ, channel));
-            }
-        }
-        for (int channel : CHANNEL_SET_5_GHZ_40_MHZ) {
-            int centerFreq5g40Mhz =
-                    ScanResult.convertChannelToFrequencyMhzIfSupported(channel, WIFI_BAND_5_GHZ);
-            if (centerFreq5g40Mhz == UNSPECIFIED) {
-                continue;
-            }
-            if (isGpsL1ImpactedByCellAndWifi(cellUlFreqKhz, cellUlBandwidthKhz,
-                    centerFreq5g40Mhz * 1000, 40_000, thresholdKhz)) {
-                coexUnsafeChannels.add(new CoexUnsafeChannel(WIFI_BAND_24_GHZ, channel));
-            }
-        }
-        for (int channel : CHANNEL_SET_5_GHZ_80_MHZ) {
-            int centerFreq5g80Mhz =
-                    ScanResult.convertChannelToFrequencyMhzIfSupported(channel, WIFI_BAND_5_GHZ);
-            if (centerFreq5g80Mhz == UNSPECIFIED) {
-                continue;
-            }
-            if (isGpsL1ImpactedByCellAndWifi(cellUlFreqKhz, cellUlBandwidthKhz,
-                    centerFreq5g80Mhz * 1000, 80_000, thresholdKhz)) {
-                coexUnsafeChannels.add(new CoexUnsafeChannel(WIFI_BAND_24_GHZ, channel));
-            }
-        }
-        for (int channel : CHANNEL_SET_5_GHZ_160_MHZ) {
-            int centerFreq5g160Mhz =
-                    ScanResult.convertChannelToFrequencyMhzIfSupported(channel, WIFI_BAND_5_GHZ);
-            if (centerFreq5g160Mhz == UNSPECIFIED) {
-                continue;
-            }
-            if (isGpsL1ImpactedByCellAndWifi(cellUlFreqKhz, cellUlBandwidthKhz,
-                    centerFreq5g160Mhz * 1000, 160_000, thresholdKhz)) {
-                coexUnsafeChannels.add(new CoexUnsafeChannel(WIFI_BAND_24_GHZ, channel));
-            }
-        }
-        return coexUnsafeChannels;
-    }
-
-    /**
-     * Returns whether or not GPS L1 is impacted by the given cell and wifi channels.
-     */
-    public static boolean isGpsL1ImpactedByCellAndWifi(
-            int cellCenterKhz, int cellBandwidthKhz,
-            int wifiCenterKhz, int wifiBandwidthKhz,
-            int thresholdKhz) {
-        int cellLowerKhz = cellCenterKhz - cellBandwidthKhz / 2;
-        int cellUpperKhz = cellCenterKhz + cellBandwidthKhz / 2;
-        int wifiLowerKhz = wifiCenterKhz - wifiBandwidthKhz / 2;
-        int wifiUpperKhz = wifiCenterKhz + wifiBandwidthKhz / 2;
-        int intermodLowerKhz;
-        int intermodUpperKhz;
-        if (wifiCenterKhz > cellCenterKhz) {
-            intermodLowerKhz = wifiLowerKhz - cellUpperKhz;
-            intermodUpperKhz = wifiUpperKhz - cellLowerKhz;
-        } else {
-            intermodLowerKhz = cellLowerKhz - wifiUpperKhz;
-            intermodUpperKhz = cellUpperKhz - wifiLowerKhz;
-        }
-        int gpsLowerKhz = GPS_L1_CENTER_FREQ_KHZ - thresholdKhz;
-        int gpsUpperKhz = GPS_L1_CENTER_FREQ_KHZ + thresholdKhz;
-        return !(intermodLowerKhz > gpsUpperKhz || intermodUpperKhz < gpsLowerKhz);
-    }
-
-    /**
      * Data structure class mirroring cell channel information from PhysicalChannelConfig used for
      * coex calculations.
      */
diff --git a/service/java/com/android/server/wifi/hotspot2/ANQPMatcher.java b/service/java/com/android/server/wifi/hotspot2/ANQPMatcher.java
index e7b12d5..6bb834d 100644
--- a/service/java/com/android/server/wifi/hotspot2/ANQPMatcher.java
+++ b/service/java/com/android/server/wifi/hotspot2/ANQPMatcher.java
@@ -76,29 +76,27 @@
      * @param element The Roaming Consortium ANQP element
      * @param providerOIs The roaming consortium OIs of the provider
      * @param matchAll Indicates if a match with all OIs must be done
-     * @return Matched OI value if a match is found, 0 otherwise. If matchAll is true, then the
-     * first matched OI will be returned if and only if all elements match. If the caller is
-     * interested in matching all, the return value of non-0 can be interpreted as a positive
-     * output and a 0 result can be interpreted as a negative result.
+     * @return true if a match is found
      */
-    public static long matchRoamingConsortium(RoamingConsortiumElement element,
+    public static boolean matchRoamingConsortium(RoamingConsortiumElement element,
             long[] providerOIs, boolean matchAll) {
-        if (element == null) return 0;
-        if (providerOIs == null) return 0;
-
-        long matchedRcoi = 0;
+        if (element == null) {
+            return false;
+        }
+        if (providerOIs == null) {
+            return false;
+        }
         List<Long> rcOIs = element.getOIs();
         for (long oi : providerOIs) {
             if (rcOIs.contains(oi)) {
                 if (!matchAll) {
-                    return oi;
+                    return true;
                 }
-                if (matchedRcoi == 0) matchedRcoi = oi;
             } else if (matchAll) {
-                return 0;
+                return false;
             }
         }
-        return matchedRcoi;
+        return matchAll;
     }
 
     /**
diff --git a/service/java/com/android/server/wifi/hotspot2/NetworkDetail.java b/service/java/com/android/server/wifi/hotspot2/NetworkDetail.java
index 0186563..b43a00b 100644
--- a/service/java/com/android/server/wifi/hotspot2/NetworkDetail.java
+++ b/service/java/com/android/server/wifi/hotspot2/NetworkDetail.java
@@ -1,7 +1,8 @@
 package com.android.server.wifi.hotspot2;
 
-import android.net.MacAddress;
-import android.net.wifi.MloLink;
+import static com.android.server.wifi.hotspot2.anqp.Constants.BYTES_IN_EUI48;
+import static com.android.server.wifi.hotspot2.anqp.Constants.BYTE_MASK;
+
 import android.net.wifi.ScanResult;
 import android.util.Log;
 
@@ -17,7 +18,6 @@
 import java.nio.charset.CharsetDecoder;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
@@ -131,15 +131,10 @@
     private final boolean mMboCellularDataAware;
     private final boolean mOceSupported;
 
-    // MLO Attributes
-    private MacAddress mMldMacAddress = null;
-    private int mMloLinkId = MloLink.INVALID_MLO_LINK_ID;
-    private List<MloLink> mAffiliatedMloLinks = Collections.emptyList();
-
     public NetworkDetail(String bssid, ScanResult.InformationElement[] infoElements,
             List<String> anqpLines, int freq) {
         if (infoElements == null) {
-            infoElements = new ScanResult.InformationElement[0];
+            throw new IllegalArgumentException("Null information elements");
         }
 
         mBSSID = Utils.parseMac(bssid);
@@ -162,8 +157,6 @@
         InformationElementUtil.VhtOperation vhtOperation =
                 new InformationElementUtil.VhtOperation();
         InformationElementUtil.HeOperation heOperation = new InformationElementUtil.HeOperation();
-        InformationElementUtil.EhtOperation ehtOperation =
-                new InformationElementUtil.EhtOperation();
 
         InformationElementUtil.HtCapabilities htCapabilities =
                 new InformationElementUtil.HtCapabilities();
@@ -171,12 +164,7 @@
                 new InformationElementUtil.VhtCapabilities();
         InformationElementUtil.HeCapabilities heCapabilities =
                 new InformationElementUtil.HeCapabilities();
-        InformationElementUtil.EhtCapabilities ehtCapabilities =
-                new InformationElementUtil.EhtCapabilities();
-        InformationElementUtil.Rnr rnr =
-                new InformationElementUtil.Rnr();
-        InformationElementUtil.MultiLink multiLink =
-                new InformationElementUtil.MultiLink();
+
         InformationElementUtil.ExtendedCapabilities extendedCapabilities =
                 new InformationElementUtil.ExtendedCapabilities();
 
@@ -240,9 +228,6 @@
                     case ScanResult.InformationElement.EID_EXTENDED_SUPPORTED_RATES:
                         extendedSupportedRates.from(ie);
                         break;
-                    case ScanResult.InformationElement.EID_RNR:
-                        rnr.from(ie);
-                        break;
                     case ScanResult.InformationElement.EID_EXTENSION_PRESENT:
                         switch(ie.idExt) {
                             case ScanResult.InformationElement.EID_EXT_HE_OPERATION:
@@ -251,15 +236,6 @@
                             case ScanResult.InformationElement.EID_EXT_HE_CAPABILITIES:
                                 heCapabilities.from(ie);
                                 break;
-                            case ScanResult.InformationElement.EID_EXT_EHT_OPERATION:
-                                ehtOperation.from(ie);
-                                break;
-                            case ScanResult.InformationElement.EID_EXT_EHT_CAPABILITIES:
-                                ehtCapabilities.from(ie);
-                                break;
-                            case ScanResult.InformationElement.EID_EXT_MULTI_LINK:
-                                multiLink.from(ie);
-                                break;
                             default:
                                 break;
                         }
@@ -335,15 +311,7 @@
         int centerFreq0 = mPrimaryFreq;
         int centerFreq1 = 0;
 
-        if (ehtOperation.isPresent()) {
-            //TODO: include parsing of EHT_Operation to collect BW and center freq.
-        }
-
-        if (ehtOperation.isPresent()) {
-            //TODO Add impact for using info from EHT capabilities and EHT operation IEs
-        }
-
-        // Check if HE Operation IE is present
+        // First check if HE Operation IE is present
         if (heOperation.isPresent()) {
             // If 6GHz info is present, then parameters should be acquired from HE Operation IE
             if (heOperation.is6GhzInfoPresent()) {
@@ -412,36 +380,12 @@
             maxRateA = supportedRates.mRates.get(supportedRates.mRates.size() - 1);
             mMaxRate = maxRateA > maxRateB ? maxRateA : maxRateB;
             mWifiMode = InformationElementUtil.WifiMode.determineMode(mPrimaryFreq, mMaxRate,
-                    ehtOperation.isPresent(), heOperation.isPresent(), vhtOperation.isPresent(),
-                    htOperation.isPresent(),
+                    heOperation.isPresent(), vhtOperation.isPresent(), htOperation.isPresent(),
                     iesFound.contains(ScanResult.InformationElement.EID_ERP));
         } else {
             mWifiMode = 0;
             mMaxRate = 0;
         }
-
-        if (multiLink.isPresent()) {
-            mMldMacAddress = multiLink.getMldMacAddress();
-            mMloLinkId = multiLink.getLinkId();
-            if (rnr.isPresent()) {
-                if (!rnr.getAffiliatedMloLinks().isEmpty()) {
-                    mAffiliatedMloLinks = new ArrayList<>(rnr.getAffiliatedMloLinks());
-                } else if (!multiLink.getAffiliatedLinks().isEmpty()) {
-                    mAffiliatedMloLinks = new ArrayList<>(multiLink.getAffiliatedLinks());
-                }
-            }
-
-            // Add the current link to the list of links if not empty
-            if (!mAffiliatedMloLinks.isEmpty()) {
-                MloLink link = new MloLink();
-                link.setApMacAddress(MacAddress.fromString(bssid));
-                link.setChannel(ScanResult.convertFrequencyMhzToChannelIfSupported(mPrimaryFreq));
-                link.setBand(ScanResult.toBand(mPrimaryFreq));
-                link.setLinkId(mMloLinkId);
-                mAffiliatedMloLinks.add(link);
-            }
-        }
-
         if (DBG) {
             Log.d(TAG, mSSID + "ChannelWidth is: " + mChannelWidth + " PrimaryFreq: "
                     + mPrimaryFreq + " Centerfreq0: " + mCenterfreq0 + " Centerfreq1: "
@@ -454,7 +398,6 @@
                     + ", WifiMode: " + InformationElementUtil.WifiMode.toString(mWifiMode)
                     + ", Freq: " + mPrimaryFreq
                     + ", MaxRate: " + mMaxRate
-                    + ", EHT: " + String.valueOf(ehtOperation.isPresent())
                     + ", HE: " + String.valueOf(heOperation.isPresent())
                     + ", VHT: " + String.valueOf(vhtOperation.isPresent())
                     + ", HT: " + String.valueOf(htOperation.isPresent())
@@ -465,13 +408,6 @@
         }
     }
 
-    /**
-     * Copy constructor
-     */
-    public NetworkDetail(NetworkDetail networkDetail) {
-        this(networkDetail, networkDetail.mANQPElements);
-    }
-
     private static ByteBuffer getAndAdvancePayload(ByteBuffer data, int plLength) {
         ByteBuffer payload = data.duplicate().order(data.order());
         payload.limit(payload.position() + plLength);
@@ -640,18 +576,6 @@
         return mExtendedCapabilities.isStrictUtf8();
     }
 
-    public MacAddress getMldMacAddress() {
-        return mMldMacAddress;
-    }
-
-    public int getMloLinkId() {
-        return mMloLinkId;
-    }
-
-    public List<MloLink> getAffiliatedMloLinks() {
-        return mAffiliatedMloLinks;
-    }
-
     @Override
     public boolean equals(Object thatObject) {
         if (this == thatObject) {
@@ -673,27 +597,24 @@
 
     @Override
     public String toString() {
-        return "NetworkInfo{SSID='" + mSSID
-                + "', HESSID=" + Utils.macToSimpleString(mHESSID)
-                + ", BSSID=" + Utils.macToSimpleString(mBSSID)
-                + ", StationCount=" + mStationCount
-                + ", ChannelUtilization=" + mChannelUtilization
-                + ", Capacity=" + mCapacity
-                + ", Ant=" + mAnt + ", Internet=" + mInternet + ", HSRelease="
-                + mHSRelease + ", AnqpDomainID" + mAnqpDomainID + ", AnqpOICount" + mAnqpOICount
-                + ", RoamingConsortiums=" + Utils.roamingConsortiumsToString(mRoamingConsortiums)
-                + "}";
+        return String.format("NetworkInfo{SSID='%s', HESSID=%x, BSSID=%x, StationCount=%d, " +
+                "ChannelUtilization=%d, Capacity=%d, Ant=%s, Internet=%s, " +
+                "HSRelease=%s, AnqpDomainID=%d, " +
+                "AnqpOICount=%d, RoamingConsortiums=%s}",
+                mSSID, mHESSID, mBSSID, mStationCount,
+                mChannelUtilization, mCapacity, mAnt, mInternet,
+                mHSRelease, mAnqpDomainID,
+                mAnqpOICount, Utils.roamingConsortiumsToString(mRoamingConsortiums));
     }
 
     public String toKeyString() {
         return mHESSID != 0 ?
-                "'" + mSSID + "':" + Utils.macToSimpleString(mBSSID) + " ("
-                        + Utils.macToSimpleString(mHESSID) + ")"
-                : "'" + mSSID + "':" + Utils.macToSimpleString(mBSSID);
+            String.format("'%s':%012x (%012x)", mSSID, mBSSID, mHESSID) :
+            String.format("'%s':%012x", mSSID, mBSSID);
     }
 
     public String getBSSIDString() {
-        return Utils.macToString(mBSSID);
+        return toMACString(mBSSID);
     }
 
     /**
@@ -718,6 +639,20 @@
         return isBeaconFrame() && mIsHiddenSsid;
     }
 
+    public static String toMACString(long mac) {
+        StringBuilder sb = new StringBuilder();
+        boolean first = true;
+        for (int n = BYTES_IN_EUI48 - 1; n >= 0; n--) {
+            if (first) {
+                first = false;
+            } else {
+                sb.append(':');
+            }
+            sb.append(String.format("%02x", (mac >>> (n * Byte.SIZE)) & BYTE_MASK));
+        }
+        return sb.toString();
+    }
+
     public int getMboAssociationDisallowedReasonCode() {
         return mMboAssociationDisallowedReasonCode;
     }
diff --git a/service/java/com/android/server/wifi/hotspot2/OsuNetworkConnection.java b/service/java/com/android/server/wifi/hotspot2/OsuNetworkConnection.java
index 0cef543..6fb51a1 100644
--- a/service/java/com/android/server/wifi/hotspot2/OsuNetworkConnection.java
+++ b/service/java/com/android/server/wifi/hotspot2/OsuNetworkConnection.java
@@ -178,7 +178,7 @@
             return false;
         }
         WifiConfiguration config = new WifiConfiguration();
-        config.SSID = ssid.toString();
+        config.SSID = "\"" + ssid.toString() + "\"";
 
         // To suppress Wi-Fi has no internet access notification.
         config.noInternetAccessExpected = true;
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointManager.java b/service/java/com/android/server/wifi/hotspot2/PasspointManager.java
index 25670e3..192b26b 100644
--- a/service/java/com/android/server/wifi/hotspot2/PasspointManager.java
+++ b/service/java/com/android/server/wifi/hotspot2/PasspointManager.java
@@ -54,7 +54,6 @@
 import com.android.server.wifi.WifiKeyStore;
 import com.android.server.wifi.WifiMetrics;
 import com.android.server.wifi.WifiNative;
-import com.android.server.wifi.WifiSettingsStore;
 import com.android.server.wifi.hotspot2.anqp.ANQPElement;
 import com.android.server.wifi.hotspot2.anqp.Constants;
 import com.android.server.wifi.hotspot2.anqp.HSOsuProvidersElement;
@@ -135,7 +134,6 @@
     private final MacAddressUtil mMacAddressUtil;
     private final Clock mClock;
     private final WifiPermissionsUtil mWifiPermissionsUtil;
-    private final WifiSettingsStore mSettingsStore;
 
     /**
      * Map of package name of an app to the app ops changed listener for the app.
@@ -145,7 +143,6 @@
     // Counter used for assigning unique identifier to each provider.
     private long mProviderIndex;
     private boolean mVerboseLoggingEnabled = false;
-    private boolean mEnabled;
 
     private class CallbackHandler implements PasspointEventHandler.Callbacks {
         private final Context mContext;
@@ -355,7 +352,6 @@
             WifiNative wifiNative, WifiKeyStore keyStore, Clock clock,
             PasspointObjectFactory objectFactory, WifiConfigManager wifiConfigManager,
             WifiConfigStore wifiConfigStore,
-            WifiSettingsStore wifiSettingsStore,
             WifiMetrics wifiMetrics,
             WifiCarrierInfoManager wifiCarrierInfoManager,
             MacAddressUtil macAddressUtil,
@@ -383,12 +379,9 @@
         sPasspointManager = this;
         mMacAddressUtil = macAddressUtil;
         mClock = clock;
-        mHandler.postAtFrontOfQueue(() ->
-                mWifiConfigManager.addOnNetworkUpdateListener(
-                        new PasspointManager.OnNetworkUpdateListener()));
+        mWifiConfigManager.addOnNetworkUpdateListener(
+                new PasspointManager.OnNetworkUpdateListener());
         mWifiPermissionsUtil = wifiPermissionsUtil;
-        mSettingsStore = wifiSettingsStore;
-        mEnabled = mSettingsStore.isWifiPasspointEnabled();
     }
 
     /**
@@ -434,7 +427,7 @@
             return;
         }
         NetworkUpdateResult result = mWifiConfigManager.addOrUpdateNetwork(
-                newConfig, uid, packageName, false);
+                newConfig, uid, packageName);
         if (!result.isSuccess()) {
             Log.e(TAG, "Failed to update config in WifiConfigManager");
         } else {
@@ -572,7 +565,7 @@
         }
         mWifiMetrics.incrementNumPasspointProviderInstallSuccess();
         if (mPasspointNetworkNominateHelper != null) {
-            mPasspointNetworkNominateHelper.updateBestMatchScanDetailForProviders();
+            mPasspointNetworkNominateHelper.refreshPasspointNetworkCandidates(isFromSuggestion);
         }
         return true;
     }
@@ -590,12 +583,9 @@
         }
         provider.uninstallCertsAndKeys();
         String packageName = provider.getPackageName();
-        if (!provider.isFromSuggestion()) {
-            // Remove non-suggestion configs corresponding to the profile in WifiConfigManager.
-            // Suggestion passpoint will be handled by WifiNetworkSuggestionsManager
-            mWifiConfigManager.removePasspointConfiguredNetwork(
-                    provider.getWifiConfig().getProfileKey());
-        }
+        // Remove any configs corresponding to the profile in WifiConfigManager.
+        mWifiConfigManager.removePasspointConfiguredNetwork(
+                provider.getWifiConfig().getProfileKey());
         String uniqueId = provider.getConfig().getUniqueId();
         mProviders.remove(uniqueId);
         mWifiConfigManager.removeConnectChoiceFromAllNetworks(uniqueId);
@@ -826,6 +816,9 @@
      * Find all providers that can provide service through the given AP, which means the
      * providers contained credential to authenticate with the given AP.
      *
+     * If there is any home provider available, will return a list of matched home providers.
+     * Otherwise will return a list of matched roaming providers.
+     *
      * A empty list will be returned if no matching is found.
      *
      * @param scanResult The scan result associated with the AP
@@ -834,19 +827,40 @@
      */
     public @NonNull List<Pair<PasspointProvider, PasspointMatch>> matchProvider(
             ScanResult scanResult, boolean anqpRequestAllowed) {
-        if (!mEnabled) {
-            return Collections.emptyList();
-        }
         List<Pair<PasspointProvider, PasspointMatch>> allMatches = getAllMatchedProviders(
-                scanResult, anqpRequestAllowed).stream()
-                .filter(a -> !isExpired(a.first.getConfig()))
-                .collect(Collectors.toList());
+                scanResult, anqpRequestAllowed);
         if (allMatches.isEmpty()) {
-            if (mVerboseLoggingEnabled) {
-                Log.d(TAG, "No service provider found for " + scanResult.SSID);
+            return allMatches;
+        }
+        List<Pair<PasspointProvider, PasspointMatch>> homeProviders = new ArrayList<>();
+        List<Pair<PasspointProvider, PasspointMatch>> roamingProviders = new ArrayList<>();
+        for (Pair<PasspointProvider, PasspointMatch> match : allMatches) {
+            if (isExpired(match.first.getConfig())) {
+                continue;
+            }
+            if (match.second == PasspointMatch.HomeProvider) {
+                homeProviders.add(match);
+            } else {
+                roamingProviders.add(match);
             }
         }
-        return allMatches;
+
+        if (!homeProviders.isEmpty()) {
+            Log.d(TAG, String.format("Matched %s to %s providers as %s", scanResult.SSID,
+                    homeProviders.size(), "Home Provider"));
+            return homeProviders;
+        }
+
+        if (!roamingProviders.isEmpty()) {
+            Log.d(TAG, String.format("Matched %s to %s providers as %s", scanResult.SSID,
+                    roamingProviders.size(), "Roaming Provider"));
+            return roamingProviders;
+        }
+
+        if (mVerboseLoggingEnabled) {
+            Log.d(TAG, "No service provider found for " + scanResult.SSID);
+        }
+        return new ArrayList<>();
     }
 
     /**
@@ -1182,7 +1196,7 @@
                     .isPasspointSuggestionSharedWithUser(config)) {
                 continue;
             }
-            if (mWifiConfigManager.shouldUseNonPersistentRandomization(config)) {
+            if (mWifiConfigManager.shouldUseEnhancedRandomization(config)) {
                 config.setRandomizedMacAddress(MacAddress.fromString(DEFAULT_MAC_ADDRESS));
             } else {
                 MacAddress result = mMacAddressUtil.calculatePersistentMac(config.getNetworkKey(),
@@ -1238,7 +1252,6 @@
      */
     public void dump(PrintWriter pw) {
         pw.println("Dump of PasspointManager");
-        pw.println("mEnabled: " + mEnabled);
         pw.println("PasspointManager - Providers Begin ---");
         for (Map.Entry<String, PasspointProvider> entry : mProviders.entrySet()) {
             pw.println(entry.getValue());
@@ -1602,37 +1615,4 @@
                 + " from BSSID: " + Utils.macToString(event.getBssid()));
         return termsAndConditionsUrl;
     }
-
-    /**
-     * Check if Wi-Fi Passpoint is enabled.
-     *
-     * @return true if Wi-Fi Passpoint is enabled.
-     */
-    public boolean isWifiPasspointEnabled() {
-        return mEnabled;
-    }
-
-    /**
-     * Enable or disable Wi-Fi Passpoint globally.
-     */
-    public void setWifiPasspointEnabled(boolean enabled) {
-        if (enabled != mEnabled) {
-            clearAnqpRequestsAndFlushCache();
-            mEnabled = enabled;
-            mSettingsStore.handleWifiPasspointEnabled(enabled);
-        }
-    }
-
-    /**
-     * Get the selected RCOI for a particular Passpoint network connection
-     * @param uniqueId The Unique ID of the Passpoint configuration
-     * @param ssid The target SSID
-     * @return Selected RCOI for a network, or 0 if none.
-     */
-    public long getSelectedRcoiForNetwork(String uniqueId, String ssid) {
-        if (TextUtils.isEmpty(uniqueId) || TextUtils.isEmpty(ssid)) return 0;
-        PasspointProvider provider = mProviders.get(uniqueId);
-        if (provider == null) return 0;
-        return provider.getAndRemoveMatchedRcoi(ssid);
-    }
 }
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointNetworkNominateHelper.java b/service/java/com/android/server/wifi/hotspot2/PasspointNetworkNominateHelper.java
index df31721..b8a6f85 100644
--- a/service/java/com/android/server/wifi/hotspot2/PasspointNetworkNominateHelper.java
+++ b/service/java/com/android/server/wifi/hotspot2/PasspointNetworkNominateHelper.java
@@ -16,34 +16,26 @@
 
 package com.android.server.wifi.hotspot2;
 
-import static com.android.server.wifi.hotspot2.PasspointMatch.HomeProvider;
-
 import android.annotation.NonNull;
-import android.content.res.Resources;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.util.ScanResultUtil;
+import android.os.Process;
 import android.util.LocalLog;
 import android.util.Pair;
 
 import com.android.server.wifi.NetworkUpdateResult;
 import com.android.server.wifi.ScanDetail;
-import com.android.server.wifi.WifiCarrierInfoManager;
 import com.android.server.wifi.WifiConfigManager;
+import com.android.server.wifi.WifiNetworkSelector;
 import com.android.server.wifi.hotspot2.anqp.ANQPElement;
 import com.android.server.wifi.hotspot2.anqp.Constants;
 import com.android.server.wifi.hotspot2.anqp.HSWanMetricsElement;
-import com.android.wifi.resources.R;
+import com.android.server.wifi.util.ScanResultUtil;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -54,9 +46,7 @@
     @NonNull private final PasspointManager mPasspointManager;
     @NonNull private final WifiConfigManager mWifiConfigManager;
     @NonNull private final List<ScanDetail> mCachedScanDetails = new ArrayList<>();
-    @NonNull private final LocalLog mLocalLog;
-    @NonNull private final WifiCarrierInfoManager mCarrierInfoManager;
-    @NonNull private final Resources mResources;
+    @NonNull private LocalLog mLocalLog;
 
     /**
      * Contained information for a Passpoint network candidate.
@@ -74,22 +64,10 @@
     }
 
     public PasspointNetworkNominateHelper(@NonNull PasspointManager passpointManager,
-            @NonNull WifiConfigManager wifiConfigManager, @NonNull LocalLog localLog,
-            WifiCarrierInfoManager carrierInfoManager, Resources resources) {
+            @NonNull WifiConfigManager wifiConfigManager, @NonNull LocalLog localLog) {
         mPasspointManager = passpointManager;
         mWifiConfigManager = wifiConfigManager;
         mLocalLog = localLog;
-        mCarrierInfoManager = carrierInfoManager;
-        mResources = resources;
-    }
-
-    /**
-     * Update the matched passpoint network to the WifiConfigManager.
-     * Should be called each time have new scan details.
-     */
-    public void updatePasspointConfig(List<ScanDetail> scanDetails) {
-        filterAndUpdateScanDetails(scanDetails);
-        updateBestMatchScanDetailForProviders();
     }
 
     /**
@@ -100,14 +78,6 @@
      */
     public List<Pair<ScanDetail, WifiConfiguration>> getPasspointNetworkCandidates(
             List<ScanDetail> scanDetails, boolean isFromSuggestion) {
-        filterAndUpdateScanDetails(scanDetails);
-        return findBestMatchScanDetailForProviders(isFromSuggestion);
-    }
-
-    /**
-     * Filter out non-passpoint networks
-     */
-    private void filterAndUpdateScanDetails(List<ScanDetail> scanDetails) {
         // Sweep the ANQP cache to remove any expired ANQP entries.
         mPasspointManager.sweepCache();
         List<ScanDetail> filteredScanDetails = new ArrayList<>();
@@ -119,12 +89,30 @@
                 // If scanDetail is not Passpoint network, ignore.
                 continue;
             }
+            if (isApWanLinkStatusDown(scanDetail)) {
+                // If scanDetail has no internet connection, ignore.
+                mLocalLog.log("Ignoring no internet connection Passpoint AP: "
+                        + WifiNetworkSelector.toScanId(scanDetail.getScanResult()));
+                continue;
+            }
             filteredScanDetails.add(scanDetail);
         }
         if (!filteredScanDetails.isEmpty()) {
             mCachedScanDetails.clear();
             mCachedScanDetails.addAll(filteredScanDetails);
         }
+        return findBestMatchScanDetailForProviders(filteredScanDetails, isFromSuggestion);
+    }
+
+    /**
+     * Refresh the best matched available Passpoint network candidates in WifiConfigManager for the
+     * last seen scanDetails. This should be used if new profiles have been added but scan results
+     * remain the same.
+     * @param isFromSuggestion True to indicate profile from suggestion, false for user saved.
+     */
+    public void refreshPasspointNetworkCandidates(boolean isFromSuggestion) {
+        // This method will add the provider wifi configs to WifiConfigManager
+        findBestMatchScanDetailForProviders(mCachedScanDetails, isFromSuggestion);
     }
 
     /**
@@ -154,66 +142,45 @@
     }
 
     /**
-     * Use the latest scan details to add/update the matched passpoint to WifiConfigManager.  This
-     * should be used if new profiles have been added but scan results remain the same, or new
-     * ScanDetails available.
-     */
-    public void updateBestMatchScanDetailForProviders() {
-        if (mPasspointManager.isProvidersListEmpty()
-                || !mPasspointManager.isWifiPasspointEnabled() || mCachedScanDetails.isEmpty()) {
-            return;
-        }
-        Map<PasspointProvider, List<PasspointNetworkCandidate>> candidatesPerProvider =
-                getMatchedCandidateGroupByProvider(mCachedScanDetails, false);
-        // For each provider find the best scanDetail(prefer home, higher RSSI) for it and update
-        // it to the WifiConfigManager.
-        for (List<PasspointNetworkCandidate> candidates : candidatesPerProvider.values()) {
-            List<PasspointNetworkCandidate> bestCandidates = findHomeNetworksIfPossible(candidates);
-            Optional<PasspointNetworkCandidate> highestRssi = bestCandidates.stream().max(
-                    Comparator.comparingInt(a -> a.mScanDetail.getScanResult().level));
-            if (!highestRssi.isEmpty()) {
-                createWifiConfigForProvider(highestRssi.get());
-            }
-        }
-    }
-
-    /**
      * Match available providers for each scan detail and add their configs to WifiConfigManager.
      * Then for each available provider, find the best scan detail for it.
+     * @param scanDetails all details for this scan.
      * @param isFromSuggestion True to indicate profile from suggestion, false for user saved.
      * @return List of pair of scanDetail and WifiConfig from matched available provider.
      */
     private @NonNull List<Pair<ScanDetail, WifiConfiguration>> findBestMatchScanDetailForProviders(
-            boolean isFromSuggestion) {
-        List<ScanDetail> scanDetails = mCachedScanDetails;
-        if (mResources.getBoolean(
-                R.bool.config_wifiPasspointUseApWanLinkStatusAnqpElement)) {
-            scanDetails = mCachedScanDetails.stream()
-                    .filter(a -> !isApWanLinkStatusDown(a))
-                    .collect(Collectors.toList());
-        }
-        if (mPasspointManager.isProvidersListEmpty()
-                || !mPasspointManager.isWifiPasspointEnabled() || scanDetails.isEmpty()) {
+            List<ScanDetail> scanDetails, boolean isFromSuggestion) {
+        if (mPasspointManager.isProvidersListEmpty()) {
             return Collections.emptyList();
         }
         List<Pair<ScanDetail, WifiConfiguration>> results = new ArrayList<>();
         Map<PasspointProvider, List<PasspointNetworkCandidate>> candidatesPerProvider =
-                getMatchedCandidateGroupByProvider(scanDetails, true);
-        // For each provider find the best scanDetails(prefer home) for it and create selection
-        // candidate pair.
-        for (Map.Entry<PasspointProvider, List<PasspointNetworkCandidate>> candidates :
-                candidatesPerProvider.entrySet()) {
-            if (candidates.getKey().isFromSuggestion() != isFromSuggestion) {
+                new HashMap<>();
+        // Match each scanDetail with best provider (home > roaming), and grouped by FQDN.
+        for (ScanDetail scanDetail : scanDetails) {
+            List<Pair<PasspointProvider, PasspointMatch>> matchedProviders =
+                    mPasspointManager.matchProvider(scanDetail.getScanResult());
+            if (matchedProviders == null) {
                 continue;
             }
-            List<PasspointNetworkCandidate> bestCandidates =
-                    findHomeNetworksIfPossible(candidates.getValue());
+            for (Pair<PasspointProvider, PasspointMatch> matchedProvider : matchedProviders) {
+                if (matchedProvider.first.isFromSuggestion() != isFromSuggestion) {
+                    continue;
+                }
+                List<PasspointNetworkCandidate> candidates = candidatesPerProvider
+                        .computeIfAbsent(matchedProvider.first, k -> new ArrayList<>());
+                candidates.add(new PasspointNetworkCandidate(matchedProvider.first,
+                        matchedProvider.second, scanDetail));
+            }
+        }
+        // For each provider find the best scanDetail for it and create selection candidate pair.
+        for (List<PasspointNetworkCandidate> candidates : candidatesPerProvider.values()) {
+            List<PasspointNetworkCandidate> bestCandidates = findHomeNetworksIfPossible(candidates);
             for (PasspointNetworkCandidate candidate : bestCandidates) {
                 WifiConfiguration config = createWifiConfigForProvider(candidate);
                 if (config == null) {
                     continue;
                 }
-
                 if (mWifiConfigManager.isNonCarrierMergedNetworkTemporarilyDisabled(config)) {
                     mLocalLog.log("Ignoring non-carrier-merged SSID: " + config.FQDN);
                     continue;
@@ -228,47 +195,6 @@
         return results;
     }
 
-    private Map<PasspointProvider, List<PasspointNetworkCandidate>>
-            getMatchedCandidateGroupByProvider(List<ScanDetail> scanDetails,
-            boolean onlyHomeIfAvailable) {
-        Map<PasspointProvider, List<PasspointNetworkCandidate>> candidatesPerProvider =
-                new HashMap<>();
-        Set<String> fqdnSet = new HashSet<>(Arrays.asList(mResources.getStringArray(
-                R.array.config_wifiPasspointUseApWanLinkStatusAnqpElementFqdnAllowlist)));
-        // Match each scanDetail with the best provider (home > roaming), and grouped by provider.
-        for (ScanDetail scanDetail : scanDetails) {
-            List<Pair<PasspointProvider, PasspointMatch>> matchedProviders =
-                    mPasspointManager.matchProvider(scanDetail.getScanResult());
-            if (matchedProviders == null) {
-                continue;
-            }
-            // If wan link status check is disabled, check the FQDN allow list.
-            if (!mResources.getBoolean(R.bool.config_wifiPasspointUseApWanLinkStatusAnqpElement)
-                    && !fqdnSet.isEmpty()) {
-                matchedProviders = matchedProviders.stream().filter(a ->
-                                !fqdnSet.contains(a.first.getConfig().getHomeSp().getFqdn())
-                                        || !isApWanLinkStatusDown(scanDetail))
-                        .collect(Collectors.toList());
-            }
-            if (onlyHomeIfAvailable) {
-                List<Pair<PasspointProvider, PasspointMatch>> homeProviders =
-                        matchedProviders.stream()
-                                .filter(a -> a.second == HomeProvider)
-                                .collect(Collectors.toList());
-                if (!homeProviders.isEmpty()) {
-                    matchedProviders = homeProviders;
-                }
-            }
-            for (Pair<PasspointProvider, PasspointMatch> matchedProvider : matchedProviders) {
-                List<PasspointNetworkCandidate> candidates = candidatesPerProvider
-                        .computeIfAbsent(matchedProvider.first, k -> new ArrayList<>());
-                candidates.add(new PasspointNetworkCandidate(matchedProvider.first,
-                        matchedProvider.second, scanDetail));
-            }
-        }
-        return candidatesPerProvider;
-    }
-
     /**
      * Create and return a WifiConfiguration for the given ScanDetail and PasspointProvider.
      * The newly created WifiConfiguration will also be added to WifiConfigManager.
@@ -278,18 +204,12 @@
     private WifiConfiguration createWifiConfigForProvider(
             PasspointNetworkCandidate candidate) {
         WifiConfiguration config = candidate.mProvider.getWifiConfig();
-        config.SSID = ScanResultUtil.createQuotedSsid(candidate.mScanDetail.getSSID());
-        config.isHomeProviderNetwork = candidate.mMatchStatus == HomeProvider;
+        config.SSID = ScanResultUtil.createQuotedSSID(candidate.mScanDetail.getSSID());
+        config.isHomeProviderNetwork = candidate.mMatchStatus == PasspointMatch.HomeProvider;
         if (candidate.mScanDetail.getNetworkDetail().getAnt()
                 == NetworkDetail.Ant.ChargeablePublic) {
             config.meteredHint = true;
         }
-        if (mCarrierInfoManager.shouldDisableMacRandomization(config.SSID,
-                config.carrierId, config.subscriptionId)) {
-            mLocalLog.log("Disabling MAC randomization on " + config.SSID
-                    + " due to CarrierConfig override");
-            config.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_NONE;
-        }
         WifiConfiguration existingNetwork = mWifiConfigManager.getConfiguredNetwork(
                 config.getProfileKey());
         if (existingNetwork != null) {
@@ -307,12 +227,13 @@
         // NOTE: if existingNetwork != null, this update is a no-op in most cases if the SSID is the
         // same (since we update the cached config in PasspointManager#addOrUpdateProvider().
         NetworkUpdateResult result = mWifiConfigManager.addOrUpdateNetwork(
-                config, config.creatorUid, config.creatorName, false);
+                config, config.creatorUid, config.creatorName);
 
         if (!result.isSuccess()) {
             mLocalLog.log("Failed to add passpoint network");
             return existingNetwork;
         }
+        mWifiConfigManager.allowAutojoin(result.getNetworkId(), config.allowAutojoin);
         mWifiConfigManager.enableNetwork(result.getNetworkId(), false, config.creatorUid, null);
         mWifiConfigManager.setNetworkCandidateScanResult(result.getNetworkId(),
                 candidate.mScanDetail.getScanResult(), 0, null);
@@ -332,7 +253,7 @@
     private @NonNull List<PasspointNetworkCandidate> findHomeNetworksIfPossible(
             @NonNull List<PasspointNetworkCandidate> networkList) {
         List<PasspointNetworkCandidate> homeProviderCandidates = networkList.stream()
-                .filter(candidate -> candidate.mMatchStatus == HomeProvider)
+                .filter(candidate -> candidate.mMatchStatus == PasspointMatch.HomeProvider)
                 .collect(Collectors.toList());
         if (homeProviderCandidates.isEmpty()) {
             return networkList;
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointProvider.java b/service/java/com/android/server/wifi/hotspot2/PasspointProvider.java
index 5064ec7..8ca032d 100644
--- a/service/java/com/android/server/wifi/hotspot2/PasspointProvider.java
+++ b/service/java/com/android/server/wifi/hotspot2/PasspointProvider.java
@@ -26,7 +26,6 @@
 import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiEnterpriseConfig;
-import android.net.wifi.WifiSsid;
 import android.net.wifi.hotspot2.PasspointConfiguration;
 import android.net.wifi.hotspot2.pps.Credential;
 import android.net.wifi.hotspot2.pps.Credential.SimCredential;
@@ -64,7 +63,6 @@
 import java.security.cert.X509Certificate;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -85,7 +83,6 @@
     private static final String ALIAS_ALIAS_REMEDIATION_TYPE = "REMEDIATION_";
 
     private static final String SYSTEM_CA_STORE_PATH = "/system/etc/security/cacerts";
-    private static final long MAX_RCOI_ENTRY_LIFETIME_MS = 600_000; // 10 minutes
 
     private final PasspointConfiguration mConfig;
     private final WifiKeyStore mKeyStore;
@@ -124,10 +121,6 @@
     private String mConnectChoice = null;
     private int mConnectChoiceRssi = 0;
 
-    // A map that maps SSIDs (String) to a pair of RCOI and a timestamp (both are Long) to be
-    // used later when connecting to an RCOI-based Passpoint network.
-    private final Map<String, Pair<Long, Long>> mRcoiMatchForNetwork = new HashMap<>();
-
     public PasspointProvider(PasspointConfiguration config, WifiKeyStore keyStore,
             WifiCarrierInfoManager wifiCarrierInfoManager, long providerId, int creatorUid,
             String packageName, boolean isFromSuggestion, Clock clock) {
@@ -325,7 +318,7 @@
                 return false;
             }
             if (!mKeyStore.putUserPrivKeyAndCertsInKeyStore(
-                    keyName, clientKey, new Certificate[]{clientCert})) {
+                    keyName, clientKey, new Certificate[] {clientCert})) {
                 Log.e(TAG, "Failed to install client private key or certificate");
                 uninstallCertsAndKeys();
                 return false;
@@ -419,14 +412,13 @@
     /**
      * Return the matching status with the given AP, based on the ANQP elements from the AP.
      *
-     * @param anqpElements            ANQP elements from the AP
+     * @param anqpElements ANQP elements from the AP
      * @param roamingConsortiumFromAp Roaming Consortium information element from the AP
-     * @param scanResult              Latest Scan result
+     * @param scanResult Latest Scan result
      * @return {@link PasspointMatch}
      */
     public PasspointMatch match(Map<ANQPElementType, ANQPElement> anqpElements,
             RoamingConsortium roamingConsortiumFromAp, ScanResult scanResult) {
-        sweepMatchedRcoiMap();
         if (isProviderBlocked(scanResult)) {
             if (mVerboseLoggingEnabled) {
                 Log.d(TAG, "Provider " + mConfig.getServiceFriendlyName()
@@ -453,7 +445,7 @@
         // Match FQDN for Home provider or RCOI(s) for Roaming provider
         // For SIM credential, the FQDN is in the format of wlan.mnc*.mcc*.3gppnetwork.org
         PasspointMatch providerMatch = matchFqdnAndRcoi(anqpElements, roamingConsortiumFromAp,
-                matchingSimImsi, scanResult);
+                matchingSimImsi);
 
         // 3GPP Network matching
         if (providerMatch == PasspointMatch.None && ANQPMatcher.matchThreeGPPNetwork(
@@ -534,17 +526,10 @@
             carrierId = mBestGuessCarrierId;
         }
         wifiConfig.carrierId = carrierId;
-        if (mConfig.getSubscriptionGroup() != null) {
-            wifiConfig.setSubscriptionGroup(mConfig.getSubscriptionGroup());
-            wifiConfig.subscriptionId = mWifiCarrierInfoManager
-                    .getActiveSubscriptionIdInGroup(wifiConfig.getSubscriptionGroup());
-        } else {
-            wifiConfig.subscriptionId =
-                    mConfig.getSubscriptionId() == SubscriptionManager.INVALID_SUBSCRIPTION_ID
-                            ? mWifiCarrierInfoManager.getMatchingSubId(carrierId)
-                            : mConfig.getSubscriptionId();
-        }
-
+        wifiConfig.subscriptionId =
+                mConfig.getSubscriptionId() == SubscriptionManager.INVALID_SUBSCRIPTION_ID
+                        ? mWifiCarrierInfoManager.getMatchingSubId(carrierId)
+                        : mConfig.getSubscriptionId();
         wifiConfig.carrierMerged = mConfig.isCarrierMerged();
         wifiConfig.oemPaid = mConfig.isOemPaid();
         wifiConfig.oemPrivate = mConfig.isOemPrivate();
@@ -590,7 +575,7 @@
         wifiConfig.creatorUid = mCreatorUid;
         wifiConfig.trusted = mIsTrusted;
         if (mConfig.isMacRandomizationEnabled()) {
-            if (mConfig.isNonPersistentMacRandomizationEnabled()) {
+            if (mConfig.isEnhancedMacRandomizationEnabled()) {
                 wifiConfig.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_NON_PERSISTENT;
             } else {
                 wifiConfig.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_PERSISTENT;
@@ -601,6 +586,7 @@
         wifiConfig.meteredOverride = mConfig.getMeteredOverride();
         wifiConfig.getNetworkSelectionStatus().setConnectChoice(mConnectChoice);
         wifiConfig.getNetworkSelectionStatus().setConnectChoiceRssi(mConnectChoiceRssi);
+
         return wifiConfig;
     }
 
@@ -745,7 +731,7 @@
      * Retrieve the client certificate from the certificates chain.  The certificate
      * with the matching SHA256 digest is the client certificate.
      *
-     * @param certChain                 The client certificates chain
+     * @param certChain The client certificates chain
      * @param expectedSha256Fingerprint The expected SHA256 digest of the client certificate
      * @return {@link java.security.cert.X509Certificate}
      */
@@ -776,7 +762,6 @@
      * Expiration date -> non-metered
      * Data limit -> metered
      * Time usage limit -> metered
-     *
      * @param passpointConfig instance of {@link PasspointConfiguration}
      * @return {@code true} if the network is a metered network, {@code false} otherwise.
      */
@@ -792,69 +777,64 @@
     /**
      * Match given OIs to the Roaming Consortium OIs
      *
-     * @param providerOis              Provider OIs to match against
+     * @param providerOis Provider OIs to match against
      * @param roamingConsortiumElement RCOIs in the ANQP element
-     * @param roamingConsortiumFromAp  RCOIs in the AP scan results
-     * @param matchAll                 Indicates if all providerOis must match the RCOIs elements
-     * @return OI value if there is a match, 0 otherwise. If matachAll is true, then this method
-     * returns the first matched OI.
+     * @param roamingConsortiumFromAp RCOIs in the AP scan results
+     * @param matchAll Indicates if all providerOis must match the RCOIs elements
+     * @return {@code true} if there is a match, {@code false} otherwise.
      */
-    private long matchOis(long[] providerOis,
+    private boolean matchOis(long[] providerOis,
             RoamingConsortiumElement roamingConsortiumElement,
             RoamingConsortium roamingConsortiumFromAp,
             boolean matchAll) {
+
+
         // ANQP Roaming Consortium OI matching.
-        long matchedRcoi = ANQPMatcher.matchRoamingConsortium(roamingConsortiumElement, providerOis,
-                matchAll);
-        if (matchedRcoi != 0) {
+        if (ANQPMatcher.matchRoamingConsortium(roamingConsortiumElement, providerOis, matchAll)) {
             if (mVerboseLoggingEnabled) {
-                Log.d(TAG, String.format("ANQP RCOI match: 0x%x", matchedRcoi));
+                Log.e(TAG, "ANQP RCOI match " + roamingConsortiumElement);
             }
-            return matchedRcoi;
+            return true;
         }
 
         // AP Roaming Consortium OI matching.
         long[] apRoamingConsortiums = roamingConsortiumFromAp.getRoamingConsortiums();
         if (apRoamingConsortiums == null || providerOis == null) {
-            return 0;
+            return false;
         }
         // Roaming Consortium OI information element matching.
-        for (long apOi : apRoamingConsortiums) {
+        for (long apOi: apRoamingConsortiums) {
             boolean matched = false;
-            for (long providerOi : providerOis) {
+            for (long providerOi: providerOis) {
                 if (apOi == providerOi) {
                     if (mVerboseLoggingEnabled) {
-                        Log.d(TAG, String.format("AP RCOI match: 0x%x", apOi));
+                        Log.e(TAG, "AP RCOI match: " + apOi);
                     }
                     if (!matchAll) {
-                        return apOi;
+                        return true;
                     } else {
                         matched = true;
-                        if (matchedRcoi == 0) matchedRcoi = apOi;
                         break;
                     }
                 }
             }
             if (matchAll && !matched) {
-                return 0;
+                return false;
             }
         }
-        return matchedRcoi;
+        return matchAll;
     }
 
     /**
      * Perform a provider match based on the given ANQP elements for FQDN and RCOI
      *
-     * @param anqpElements            List of ANQP elements
+     * @param anqpElements List of ANQP elements
      * @param roamingConsortiumFromAp Roaming Consortium information element from the AP
-     * @param matchingSIMImsi         Installed SIM IMSI that matches the SIM credential ANQP
-     *                                element
-     * @param scanResult              The relevant scan result
+     * @param matchingSIMImsi Installed SIM IMSI that matches the SIM credential ANQP element
      * @return {@link PasspointMatch}
      */
     private PasspointMatch matchFqdnAndRcoi(Map<ANQPElementType, ANQPElement> anqpElements,
-            RoamingConsortium roamingConsortiumFromAp, String matchingSIMImsi,
-            ScanResult scanResult) {
+            RoamingConsortium roamingConsortiumFromAp, String matchingSIMImsi) {
         // Domain name matching.
         if (ANQPMatcher.matchDomainName(
                 (DomainNameElement) anqpElements.get(ANQPElementType.ANQPDomName),
@@ -885,44 +865,38 @@
         if (mConfig.getHomeSp().getMatchAllOis() != null) {
             // Ensure that every HomeOI whose corresponding HomeOIRequired value is true shall match
             // an OI in the Roaming Consortium advertised by the hotspot operator.
-            if (matchOis(mConfig.getHomeSp().getMatchAllOis(),
-                    (RoamingConsortiumElement) anqpElements.get(
-                            ANQPElementType.ANQPRoamingConsortium),
-                    roamingConsortiumFromAp, true) != 0) {
+            if (matchOis(mConfig.getHomeSp().getMatchAllOis(), (RoamingConsortiumElement)
+                            anqpElements.get(ANQPElementType.ANQPRoamingConsortium),
+                    roamingConsortiumFromAp, true)) {
                 if (mVerboseLoggingEnabled) {
-                    Log.d(TAG, "All HomeOI RCOI match: HomeProvider");
+                    Log.e(TAG, "All HomeOI RCOI match: HomeProvider");
                 }
                 return PasspointMatch.HomeProvider;
             }
         } else if (mConfig.getHomeSp().getMatchAnyOis() != null) {
             // Ensure that any HomeOI whose corresponding HomeOIRequired value is false shall match
             // an OI in the Roaming Consortium advertised by the hotspot operator.
-            if (matchOis(mConfig.getHomeSp().getMatchAnyOis(),
-                    (RoamingConsortiumElement) anqpElements.get(
-                            ANQPElementType.ANQPRoamingConsortium),
-                    roamingConsortiumFromAp, false) != 0) {
+            if (matchOis(mConfig.getHomeSp().getMatchAnyOis(), (RoamingConsortiumElement)
+                            anqpElements.get(ANQPElementType.ANQPRoamingConsortium),
+                    roamingConsortiumFromAp, false)) {
                 if (mVerboseLoggingEnabled) {
-                    Log.d(TAG, "Any HomeOI RCOI match: HomeProvider");
+                    Log.e(TAG, "Any HomeOI RCOI match: HomeProvider");
                 }
                 return PasspointMatch.HomeProvider;
             }
         }
 
         // Roaming Consortium OI matching.
-        long matchedRcoi = matchOis(mConfig.getHomeSp().getRoamingConsortiumOis(),
-                (RoamingConsortiumElement) anqpElements.get(ANQPElementType.ANQPRoamingConsortium),
-                roamingConsortiumFromAp, false);
-        if (matchedRcoi != 0) {
+        if (matchOis(mConfig.getHomeSp().getRoamingConsortiumOis(), (RoamingConsortiumElement)
+                anqpElements.get(ANQPElementType.ANQPRoamingConsortium),
+                roamingConsortiumFromAp, false)) {
             if (mVerboseLoggingEnabled) {
-                Log.d(TAG, String.format("RCOI match: RoamingProvider, selected RCOI = 0x%x",
-                        matchedRcoi));
+                Log.e(TAG, "ANQP RCOI match: RoamingProvider");
             }
-            addMatchedRcoi(scanResult, matchedRcoi);
             return PasspointMatch.RoamingProvider;
         }
-
         if (mVerboseLoggingEnabled) {
-            Log.d(TAG, "No domain name or RCOI match");
+            Log.e(TAG, "No domain name or RCOI match");
         }
         return PasspointMatch.None;
     }
@@ -930,7 +904,7 @@
     /**
      * Fill in WifiEnterpriseConfig with information from an user credential.
      *
-     * @param config     Instance of {@link WifiEnterpriseConfig}
+     * @param config Instance of {@link WifiEnterpriseConfig}
      * @param credential Instance of {@link UserCredential}
      */
     private void buildEnterpriseConfigForUserCredential(WifiEnterpriseConfig config,
@@ -989,13 +963,13 @@
     /**
      * Fill in WifiEnterpriseConfig with information from a SIM credential.
      *
-     * @param config     Instance of {@link WifiEnterpriseConfig}
+     * @param config Instance of {@link WifiEnterpriseConfig}
      * @param credential Instance of {@link SimCredential}
      */
     private void buildEnterpriseConfigForSimCredential(WifiEnterpriseConfig config,
             Credential.SimCredential credential) {
         int eapMethod = WifiEnterpriseConfig.Eap.NONE;
-        switch (credential.getEapType()) {
+        switch(credential.getEapType()) {
             case EAPConstants.EAP_SIM:
                 eapMethod = WifiEnterpriseConfig.Eap.SIM;
                 break;
@@ -1063,7 +1037,7 @@
                         Base64.DEFAULT), StandardCharsets.UTF_8);
         userCredential.setPassword(encodedPassword);
 
-        switch (config.getPhase2Method()) {
+        switch(config.getPhase2Method()) {
             case WifiEnterpriseConfig.Phase2.PAP:
                 userCredential.setNonEapInnerMethod(Credential.UserCredential.AUTH_METHOD_PAP);
                 break;
@@ -1086,7 +1060,7 @@
      * {@link WifiEnterpriseConfig}
      *
      * @param eapType The EAP type of the SIM credential
-     * @param config  The enterprise configuration containing the credential
+     * @param config The enterprise configuration containing the credential
      * @return {@link android.net.wifi.hotspot2.pps.Credential.SimCredential}
      */
     private static Credential.SimCredential buildSimCredentialFromEnterpriseConfig(
@@ -1103,7 +1077,6 @@
 
     /**
      * Enable verbose logging
-     *
      * @param verbose enables verbose logging
      */
     public void enableVerboseLogging(boolean verbose) {
@@ -1113,8 +1086,8 @@
     /**
      * Block a BSS or ESS following a Deauthentication-Imminent WNM-Notification
      *
-     * @param bssid          BSSID of the source AP
-     * @param isEss          true: Block ESS, false: Block BSS
+     * @param bssid BSSID of the source AP
+     * @param isEss true: Block ESS, false: Block BSS
      * @param delayInSeconds Delay duration in seconds
      */
     public void blockBssOrEss(long bssid, boolean isEss, int delayInSeconds) {
@@ -1178,10 +1151,9 @@
 
     /**
      * Set the user connect choice on the passpoint network.
-     *
      * @param choice The {@link WifiConfiguration#getProfileKey()} of the user connect
      *               network.
-     * @param rssi   The signal strength of the network.
+     * @param rssi The signal strength of the network.
      */
     public void setUserConnectChoice(String choice, int rssi) {
         mConnectChoice = choice;
@@ -1195,43 +1167,4 @@
     public int getConnectChoiceRssi() {
         return mConnectChoiceRssi;
     }
-
-    /**
-     * Add a potential RCOI match of the Passpoint provider to a network in the environment
-     * @param scanResult Scan result
-     * @param matchedRcoi Matched RCOI
-     */
-    private void addMatchedRcoi(ScanResult scanResult, long matchedRcoi) {
-        WifiSsid wifiSsid = scanResult.getWifiSsid();
-        if (wifiSsid != null && wifiSsid.getUtf8Text() != null) {
-            String ssid = wifiSsid.toString();
-            mRcoiMatchForNetwork.put(ssid, new Pair<>(matchedRcoi,
-                    mClock.getElapsedSinceBootMillis()));
-        }
-    }
-
-    /**
-     * Get the matched (selected) RCOI for a particular Passpoint network, and remove it from the
-     * internal map.
-     * @param ssid The SSID of the network
-     * @return An RCOI that the provider has matched with the network
-     */
-    public long getAndRemoveMatchedRcoi(String ssid) {
-        if (ssid == null) return 0;
-        if (mRcoiMatchForNetwork.isEmpty()) return 0;
-        Pair<Long, Long> rcoiMatchEntry = mRcoiMatchForNetwork.get(ssid);
-        if (rcoiMatchEntry == null) return 0;
-        mRcoiMatchForNetwork.remove(ssid);
-        return rcoiMatchEntry.first;
-    }
-
-    /**
-     * Sweep the match RCOI map and free up old entries
-     */
-    private void sweepMatchedRcoiMap() {
-        if (mRcoiMatchForNetwork.isEmpty()) return;
-        mRcoiMatchForNetwork.entrySet().removeIf(
-                entry -> (entry.getValue().second + MAX_RCOI_ENTRY_LIFETIME_MS
-                        < mClock.getElapsedSinceBootMillis()));
-    }
 }
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointProvisioner.java b/service/java/com/android/server/wifi/hotspot2/PasspointProvisioner.java
index 4cf7d8e..49105dd 100644
--- a/service/java/com/android/server/wifi/hotspot2/PasspointProvisioner.java
+++ b/service/java/com/android/server/wifi/hotspot2/PasspointProvisioner.java
@@ -31,7 +31,6 @@
 import android.net.wifi.hotspot2.PasspointConfiguration;
 import android.net.wifi.hotspot2.ProvisioningCallback;
 import android.net.wifi.hotspot2.omadm.PpsMoParser;
-import android.net.wifi.util.Environment;
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.Looper;
@@ -56,6 +55,7 @@
 import com.android.server.wifi.hotspot2.soap.command.BrowserUri;
 import com.android.server.wifi.hotspot2.soap.command.PpsMoData;
 import com.android.server.wifi.hotspot2.soap.command.SppCommand;
+import com.android.server.wifi.util.Environment;
 
 import java.net.MalformedURLException;
 import java.net.URL;
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointXmlUtils.java b/service/java/com/android/server/wifi/hotspot2/PasspointXmlUtils.java
index df3107f..d123ee8 100644
--- a/service/java/com/android/server/wifi/hotspot2/PasspointXmlUtils.java
+++ b/service/java/com/android/server/wifi/hotspot2/PasspointXmlUtils.java
@@ -21,8 +21,6 @@
 import android.net.wifi.hotspot2.pps.HomeSp;
 import android.net.wifi.hotspot2.pps.Policy;
 import android.net.wifi.hotspot2.pps.UpdateParameter;
-import android.os.ParcelUuid;
-import android.util.Log;
 
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.util.XmlUtil;
@@ -41,7 +39,6 @@
  * Utility class for serialize and deserialize Passpoint related configurations to/from XML string.
  */
 public class PasspointXmlUtils {
-    private static final String TAG = "PasspointXmlUtils";
     // XML section header tags.
     private static final String XML_TAG_SECTION_HEADER_HOMESP = "HomeSP";
     private static final String XML_TAG_SECTION_HEADER_CREDENTIAL = "Credential";
@@ -57,8 +54,6 @@
     private static final String XML_TAG_SECTION_HEADER_REQUIRED_PROTO_PORT_MAP =
             "RequiredProtoPortMap";
     private static final String XML_TAG_SECTION_HEADER_PROTO_PORT = "ProtoPort";
-    private static final String XML_TAG_SECTION_HEADER_AAA_SERVER_TRUSTED_NAMES =
-            "AAAServerTrustedNames";
 
     // XML value tags.
     private static final String XML_TAG_FQDN = "FQDN";
@@ -124,7 +119,6 @@
     private static final String XML_TAG_IS_OEM_PAID = "IsOemPaid";
     private static final String XML_TAG_IS_OEM_PRIVATE = "IsOemPrivate";
     private static final String XML_TAG_DECORATED_IDENTITY_PREFIX = "DecoratedIdentityPrefix";
-    private static final String XML_TAG_SUBSCRIPTION_GROUP = "SubscriptionGroup";
 
     /**
      * Serialize a {@link PasspointConfiguration} to the output stream as a XML block.
@@ -170,15 +164,10 @@
         XmlUtil.writeNextValue(out, XML_TAG_IS_CARRIER_MERGED, config.isCarrierMerged());
         XmlUtil.writeNextValue(out, XML_TAG_IS_OEM_PAID, config.isOemPaid());
         XmlUtil.writeNextValue(out, XML_TAG_IS_OEM_PRIVATE, config.isOemPrivate());
-        if (config.getSubscriptionGroup() != null) {
-            XmlUtil.writeNextValue(out, XML_TAG_SUBSCRIPTION_GROUP,
-                    config.getSubscriptionGroup().toString());
-        }
         if (SdkLevel.isAtLeastS()) {
             XmlUtil.writeNextValue(out, XML_TAG_DECORATED_IDENTITY_PREFIX,
                     config.getDecoratedIdentityPrefix());
         }
-        serializeAaaServerTrustedNames(out, config.getAaaServerTrustedNames());
     }
 
     /**
@@ -261,12 +250,9 @@
                             config.setDecoratedIdentityPrefix((String) value);
                         }
                         break;
-                    case XML_TAG_SUBSCRIPTION_GROUP:
-                        config.setSubscriptionGroup(ParcelUuid.fromString((String) value));
-                        break;
                     default:
-                        Log.w(TAG, "Unknown value under " + "PasspointConfiguration: "
-                                + in.getName());
+                        throw new XmlPullParserException("Unknown value under "
+                                + "PasspointConfiguration: " + in.getName());
                 }
             } else {
                 // Section elements.
@@ -284,12 +270,8 @@
                         config.setSubscriptionUpdate(
                                 deserializeUpdateParameter(in, outerTagDepth + 1));
                         break;
-                    case XML_TAG_SECTION_HEADER_AAA_SERVER_TRUSTED_NAMES:
-                        config.setAaaServerTrustedNames(deserializeAaaServerTrustedNames(
-                                in, outerTagDepth + 1));
-                        break;
                     default:
-                        Log.w(TAG, "Unknown section under "
+                        throw new XmlPullParserException("Unknown section under "
                                 + "PasspointConfiguration: " + in.getName());
                 }
             }
@@ -529,27 +511,6 @@
     }
 
     /**
-     * Serialize a AAA server trusted name list to an output stream as a XML block.
-     *
-     * @param out The output stream to serialize data to
-     * @param aaaServerTrustedNames The name list to serialize
-     * @throws XmlPullParserException
-     * @throws IOException
-     */
-    private static void serializeAaaServerTrustedNames(
-            XmlSerializer out, String[] aaaServerTrustedNames)
-            throws XmlPullParserException, IOException {
-        if (null == aaaServerTrustedNames) return;
-        if (aaaServerTrustedNames.length == 0) return;
-
-        XmlUtil.writeNextSectionStart(out, XML_TAG_SECTION_HEADER_AAA_SERVER_TRUSTED_NAMES);
-        for (String fqdn: aaaServerTrustedNames) {
-            XmlUtil.writeNextValue(out, XML_TAG_FQDN, fqdn);
-        }
-        XmlUtil.writeNextSectionEnd(out, XML_TAG_SECTION_HEADER_AAA_SERVER_TRUSTED_NAMES);
-    }
-
-    /**
      * Deserialize a {@link HomeSp} from an input stream.
      *
      * @param in The input stream to read data from
@@ -593,7 +554,7 @@
                     homeSp.setOtherHomePartners((String[]) value);
                     break;
                 default:
-                    Log.w(TAG, "Unknown data under HomeSP: " + valueName[0]);
+                    throw new XmlPullParserException("Unknown data under HomeSP: " + valueName[0]);
             }
         }
         return homeSp;
@@ -630,7 +591,7 @@
                         credential.setCheckAaaServerCertStatus((boolean) value);
                         break;
                     default:
-                        Log.w(TAG, "Unknown value under Credential: "
+                        throw new XmlPullParserException("Unknown value under Credential: "
                             + name[0]);
                 }
             } else {
@@ -649,7 +610,7 @@
                                 deserializeSimCredential(in, outerTagDepth + 1));
                         break;
                     default:
-                        Log.w(TAG, "Unknown section under Credential: "
+                        throw new XmlPullParserException("Unknown section under Credential: "
                                 + in.getName());
                 }
             }
@@ -709,7 +670,7 @@
                                 deserializePreferredRoamingPartnerList(in, outerTagDepth + 1));
                         break;
                     default:
-                        Log.w(TAG, "Unknown section under Policy: "
+                        throw new XmlPullParserException("Unknown section under Policy: "
                                 + in.getName());
                 }
             }
@@ -759,7 +720,7 @@
                     userCredential.setNonEapInnerMethod((String) value);
                     break;
                 default:
-                    Log.w(TAG, "Unknown value under UserCredential: "
+                    throw new XmlPullParserException("Unknown value under UserCredential: "
                             + valueName[0]);
             }
         }
@@ -793,7 +754,7 @@
                     certCredential.setCertSha256Fingerprint((byte[]) value);
                     break;
                 default:
-                    Log.w(TAG, "Unknown value under CertCredential: "
+                    throw new XmlPullParserException("Unknown value under CertCredential: "
                             + valueName[0]);
             }
         }
@@ -827,7 +788,7 @@
                     simCredential.setEapType((int) value);
                     break;
                 default:
-                    Log.w(TAG, "Unknown value under CertCredential: "
+                    throw new XmlPullParserException("Unknown value under CertCredential: "
                             + valueName[0]);
             }
         }
@@ -887,7 +848,7 @@
                     partner.setCountries((String) value);
                     break;
                 default:
-                    Log.w(TAG, "Unknown value under RoamingPartner: "
+                    throw new XmlPullParserException("Unknown value under RoamingPartner: "
                             + valueName[0]);
             }
         }
@@ -938,7 +899,7 @@
                     param.setTrustRootCertSha256Fingerprint((byte[]) value);
                     break;
                 default:
-                    Log.w(TAG, "Unknown value under UpdateParameter: "
+                    throw new XmlPullParserException("Unknown value under UpdateParameter: "
                             + valueName[0]);
             }
         }
@@ -967,37 +928,6 @@
     }
 
     /**
-     * Deserializen a AAA server trusted name list from an input stream.
-     *
-     * @param in The input stream to read data from
-     * @param outerTagDepth The tag depth of the current XML section
-     * @return a name array
-     * @throws XmlPullParserException
-     * @throws IOException
-     */
-    private static String[] deserializeAaaServerTrustedNames(XmlPullParser in, int outerTagDepth)
-            throws XmlPullParserException, IOException {
-        ArrayList<String> list = new ArrayList<>();
-        while (!XmlUtil.isNextSectionEnd(in, outerTagDepth)) {
-            String[] valueName = new String[1];
-            Object value = XmlUtil.readCurrentValue(in, valueName);
-            if (valueName[0] == null) {
-                throw new XmlPullParserException("Missing value name");
-            }
-            switch (valueName[0]) {
-                case XML_TAG_FQDN:
-                    list.add((String) value);
-                    break;
-                default:
-                    Log.w(TAG, "Unknown data under "
-                            + XML_TAG_SECTION_HEADER_AAA_SERVER_TRUSTED_NAMES
-                            + ": " + valueName[0]);
-            }
-        }
-        return list.size() > 0 ? list.toArray(new String[0]) : null;
-    }
-
-    /**
      * Determine if the current element is a value or a section.  The "name" attribute of the
      * element is used as the indicator, when it is present, the element is considered a value
      * element.
diff --git a/service/java/com/android/server/wifi/hotspot2/Utils.java b/service/java/com/android/server/wifi/hotspot2/Utils.java
index 3e68448..ec3e7d8 100644
--- a/service/java/com/android/server/wifi/hotspot2/Utils.java
+++ b/service/java/com/android/server/wifi/hotspot2/Utils.java
@@ -1,6 +1,5 @@
 package com.android.server.wifi.hotspot2;
 
-import static com.android.server.wifi.hotspot2.anqp.Constants.BYTES_IN_EUI48;
 import static com.android.server.wifi.hotspot2.anqp.Constants.BYTE_MASK;
 import static com.android.server.wifi.hotspot2.anqp.Constants.NIBBLE_MASK;
 
@@ -63,37 +62,18 @@
         return mac;
     }
 
-    /**
-     * Convert from mac address as long to simple string in hex code, same as "%012x".
-     * @param mac The Mac address as long value.
-     * @return String value of mac address.
-     */
-    public static String macToSimpleString(long mac) {
-        StringBuilder sb = new StringBuilder();
-        for (int n = BYTES_IN_EUI48 - 1; n >= 0; n--) {
-            long b = (mac >>> (n * Byte.SIZE)) & BYTE_MASK;
-            sb.append(b > 0xf ? Long.toHexString(b) : "0" + Long.toHexString(b));
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Convert from mac address as long to string in hex code, separated with colon.
-     * @param mac The Mac address as long value.
-     * @return String value of mac address.
-     */
     public static String macToString(long mac) {
         int len = (mac & ~EUI48Mask) != 0 ? EUI64Length : EUI48Length;
         StringBuilder sb = new StringBuilder();
         boolean first = true;
-        for (int n = (len - 1) * Byte.SIZE; n >= 0; n -= Byte.SIZE) {
+        for (int n = (len - 1)*Byte.SIZE; n >= 0; n -= Byte.SIZE) {
             if (first) {
                 first = false;
-            } else {
+            }
+            else {
                 sb.append(':');
             }
-            long b = (mac >>> n) & Constants.BYTE_MASK;
-            sb.append(b > 0xf ? Long.toHexString(b) : "0" + Long.toHexString(b));
+            sb.append(String.format("%02x", (mac >>> n) & Constants.BYTE_MASK));
         }
         return sb.toString();
     }
diff --git a/service/java/com/android/server/wifi/hotspot2/anqp/HSOsuProvidersElement.java b/service/java/com/android/server/wifi/hotspot2/anqp/HSOsuProvidersElement.java
index 782d095..146a44c 100644
--- a/service/java/com/android/server/wifi/hotspot2/anqp/HSOsuProvidersElement.java
+++ b/service/java/com/android/server/wifi/hotspot2/anqp/HSOsuProvidersElement.java
@@ -81,7 +81,7 @@
             numProviders--;
         }
 
-        return new HSOsuProvidersElement(WifiSsid.fromBytes(ssidBytes), providers);
+        return new HSOsuProvidersElement(WifiSsid.createFromByteArray(ssidBytes), providers);
     }
 
     public WifiSsid getOsuSsid() {
diff --git a/service/java/com/android/server/wifi/p2p/ExternalApproverManager.java b/service/java/com/android/server/wifi/p2p/ExternalApproverManager.java
deleted file mode 100644
index bcb0414..0000000
--- a/service/java/com/android/server/wifi/p2p/ExternalApproverManager.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi.p2p;
-
-import android.annotation.Nullable;
-import android.net.MacAddress;
-import android.os.IBinder;
-import android.os.Message;
-import android.util.Log;
-import android.util.Pair;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-/**
- * Manage external approvers for Wi-Fi Direct peers.
- */
-public class ExternalApproverManager {
-    private static final String TAG = "ExternalApproverManager";
-
-    Map<Pair<IBinder, MacAddress>, ApproverEntry> mApprovers = new HashMap<>();
-
-    // Look-up table for device addresses.
-    Map<MacAddress, ApproverEntry> mApproverByAddress = new HashMap<>();
-
-    private boolean mVerboseLoggingEnabled = false;
-
-    /**
-     * Store the approver.
-     *
-     * @param key The client binder.
-     * @param deviceAddress The peer device address.
-     * @param message The approver message which is used for the callback.
-     * @return The previous entry associated with the key & the peer, or null if there was
-     *         no mapping for key, peer pair
-     */
-    public ApproverEntry put(@Nullable IBinder key,
-            @Nullable MacAddress deviceAddress, @Nullable Message message) {
-        if (null == key) return null;
-        if (null == deviceAddress) return null;
-        if (null == message) return null;
-
-        // Use look-up table to ensure that only one approver is bounded to a peer.
-        ApproverEntry existEntry = mApproverByAddress.get(deviceAddress);
-        if (null != existEntry) {
-            logd("Replace an existing approver: " + existEntry);
-            mApprovers.remove(new Pair<>(existEntry.getKey(), existEntry.getAddress()));
-            mApproverByAddress.remove(existEntry.getAddress());
-        }
-
-        // Make a copy of message, or it might be modified externally.
-        ApproverEntry newEntry = new ApproverEntry(
-                key, deviceAddress, Message.obtain(message));
-        mApprovers.put(new Pair(key, deviceAddress), newEntry);
-        mApproverByAddress.put(deviceAddress, newEntry);
-        logd("Add an approver: " + newEntry);
-        return existEntry;
-    }
-
-    /** Return approvers associated with a client. */
-    public List<ApproverEntry> get(@Nullable IBinder key) {
-        if (null == key) return null;
-
-        return mApprovers.entrySet().stream()
-                .filter(e -> e.getKey().first.equals(key))
-                .map(Map.Entry::getValue)
-                .collect(Collectors.toList());
-    }
-
-    /** Return the approver associated with a peer. */
-    public ApproverEntry get(@Nullable MacAddress deviceAddress) {
-        if (null == deviceAddress) return null;
-        return mApproverByAddress.get(deviceAddress);
-    }
-
-    /** Return the approver associated with a client and a peer. */
-    public ApproverEntry get(@Nullable IBinder key,
-            @Nullable MacAddress deviceAddress) {
-        if (null == key) return null;
-        if (null == deviceAddress) return null;
-        return mApprovers.get(new Pair<>(key, deviceAddress));
-    }
-
-    /** Remove the approver associated with a peer. */
-    public ApproverEntry remove(@Nullable MacAddress deviceAddress) {
-        if (null == deviceAddress) return null;
-        ApproverEntry entry = mApproverByAddress.remove(deviceAddress);
-        if (null != entry) {
-            mApprovers.remove(new Pair<>(entry.getKey(), entry.getAddress()));
-        }
-        return entry;
-    }
-
-    /** Remove the approver associated with a client and a peer. */
-    public ApproverEntry remove(@Nullable IBinder key,
-            @Nullable MacAddress deviceAddress) {
-        if (null == key) return null;
-        if (null == deviceAddress) return null;
-
-        ApproverEntry entry = mApprovers.remove(new Pair<>(key, deviceAddress));
-        if (null == entry) return null;
-
-        mApproverByAddress.remove(deviceAddress);
-        return entry;
-    }
-
-    /** Remove approvers associated with a client. */
-    public void removeAll(@Nullable IBinder key) {
-        if (null == key) return;
-
-        List<ApproverEntry> entries = get(key);
-        entries.forEach(e -> {
-            remove(e.getKey(), e.getAddress());
-        });
-    }
-
-    /** Enable verbose logging. */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
-    }
-
-    private void logd(String s) {
-        if (!mVerboseLoggingEnabled) return;
-        Log.d(TAG, s);
-    }
-
-    /** The approver data. */
-    public class ApproverEntry {
-        IBinder  mIBinder;
-        MacAddress mDeviceAddress;
-        Message mMessage;
-
-        private ApproverEntry() {
-        }
-
-        public ApproverEntry(IBinder key, MacAddress deviceAddress, Message message) {
-            mIBinder = key;
-            mDeviceAddress = deviceAddress;
-            mMessage = message;
-        }
-
-        public IBinder getKey() {
-            return mIBinder;
-        }
-
-        public MacAddress getAddress() {
-            return mDeviceAddress;
-        }
-
-        public Message getMessage() {
-            return Message.obtain(mMessage);
-        }
-
-        @Override
-        public boolean equals(@Nullable Object o) {
-            if (this == o) return true;
-            if (o == null || getClass() != o.getClass()) return false;
-
-            ApproverEntry that = (ApproverEntry) o;
-            return Objects.equals(this.mIBinder, that.mIBinder)
-                    && Objects.equals(this.mDeviceAddress, that.mDeviceAddress)
-                    && Objects.equals(this.mMessage, that.mMessage);
-        }
-
-        @Override
-        public int hashCode() {
-            int _hash = 1;
-            _hash = 31 * _hash +  Objects.hashCode(mIBinder);
-            _hash = 31 * _hash +  Objects.hashCode(mDeviceAddress);
-            _hash = 31 * _hash +  Objects.hashCode(mMessage);
-            return _hash;
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder sb = new StringBuilder();
-            sb.append("Approver {IBinder=").append(mIBinder.toString())
-                    .append(", Peer=").append(mDeviceAddress)
-                    .append(", Message=").append(mMessage).append("}");
-            return sb.toString();
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/p2p/ISupplicantP2pIfaceHal.java b/service/java/com/android/server/wifi/p2p/ISupplicantP2pIfaceHal.java
deleted file mode 100644
index 80bc422..0000000
--- a/service/java/com/android/server/wifi/p2p/ISupplicantP2pIfaceHal.java
+++ /dev/null
@@ -1,572 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi.p2p;
-
-import android.annotation.NonNull;
-import android.net.wifi.CoexUnsafeChannel;
-import android.net.wifi.ScanResult;
-import android.net.wifi.p2p.WifiP2pConfig;
-import android.net.wifi.p2p.WifiP2pGroup;
-import android.net.wifi.p2p.WifiP2pGroupList;
-import android.net.wifi.p2p.WifiP2pManager;
-import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
-
-import java.util.List;
-import java.util.Set;
-
-/** Abstraction of Supplicant P2P Iface HAL interface */
-interface ISupplicantP2pIfaceHal {
-    /**
-     * Begin initializing the ISupplicantP2pIfaceHal object. Specific initialization
-     * logic differs between the HIDL and AIDL implementations.
-     *
-     * @return true if the initialization routine was successful
-     */
-    boolean initialize();
-
-    /**
-     * Set the debug log level for wpa_supplicant
-     *
-     * @param turnOnVerbose Whether to turn on verbose logging or not.
-     * @param globalShowKeys Whether show keys is true in WifiGlobals.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setLogLevel(boolean turnOnVerbose, boolean globalShowKeys);
-
-    /**
-     * Setup the P2P iface.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    boolean setupIface(@NonNull String ifaceName);
-
-    /**
-     * Teardown the P2P interface.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    boolean teardownIface(@NonNull String ifaceName);
-
-    /**
-     * Signals whether initialization started successfully.
-     */
-    boolean isInitializationStarted();
-
-    /**
-     * Signals whether Initialization completed successfully. Only necessary for testing, is not
-     * needed to guard calls etc.
-     */
-    boolean isInitializationComplete();
-
-    /**
-     * Initiate a P2P service discovery with a (optional) timeout.
-     *
-     * @param timeout Max time to be spent is performing discovery.
-     *        Set to 0 to indefinitely continue discovery until an explicit
-     *        |stopFind| is sent.
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean find(int timeout);
-
-    /**
-     * Initiate a P2P device discovery with a scan type, a (optional) frequency, and a (optional)
-     * timeout.
-     *
-     * @param type indicates what channels to scan.
-     *        Valid values are {@link WifiP2pManager#WIFI_P2P_SCAN_FULL} for doing full P2P scan,
-     *        {@link WifiP2pManager#WIFI_P2P_SCAN_SOCIAL} for scanning social channels,
-     *        {@link WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ} for scanning a specified frequency.
-     * @param freq is the frequency to be scanned.
-     *        The possible values are:
-     *        <ul>
-     *        <li> A valid frequency for {@link WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ}</li>
-     *        <li> {@link WifiP2pManager#WIFI_P2P_SCAN_FREQ_UNSPECIFIED} for
-     *          {@link WifiP2pManager#WIFI_P2P_SCAN_FULL} and
-     *          {@link WifiP2pManager#WIFI_P2P_SCAN_SOCIAL}</li>
-     *        </ul>
-     * @param timeout Max time to be spent is performing discovery.
-     *        Set to 0 to indefinitely continue discovery until an explicit
-     *        |stopFind| is sent.
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean find(@WifiP2pManager.WifiP2pScanType int type, int freq, int timeout);
-
-    /**
-     * Stop an ongoing P2P service discovery.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean stopFind();
-
-    /**
-     * Flush P2P peer table and state.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean flush();
-
-    /**
-     * This command can be used to flush all services from the
-     * device.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean serviceFlush();
-
-    /**
-     * Turn on/off power save mode for the interface.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param enable Indicate if power save is to be turned on/off.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean setPowerSave(String groupIfName, boolean enable);
-
-    /**
-     * Set the Maximum idle time in seconds for P2P groups.
-     * This value controls how long a P2P group is maintained after there
-     * is no other members in the group. As a group owner, this means no
-     * associated stations in the group. As a P2P client, this means no
-     * group owner seen in scan results.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param timeoutInSec Timeout value in seconds.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean setGroupIdle(String groupIfName, int timeoutInSec);
-
-    /**
-     * Set the postfix to be used for P2P SSID's.
-     *
-     * @param postfix String to be appended to SSID.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean setSsidPostfix(String postfix);
-
-    /**
-     * Start P2P group formation with a discovered P2P peer. This includes
-     * optional group owner negotiation, group interface setup, provisioning,
-     * and establishing data connection.
-     *
-     * @param config Configuration to use to connect to remote device.
-     * @param joinExistingGroup Indicates that this is a command to join an
-     *        existing group as a client. It skips the group owner negotiation
-     *        part. This must send a Provision Discovery Request message to the
-     *        target group owner before associating for WPS provisioning.
-     *
-     * @return String containing generated pin, if selected provision method
-     *        uses PIN.
-     */
-    String connect(WifiP2pConfig config, boolean joinExistingGroup);
-
-    /**
-     * Cancel an ongoing P2P group formation and joining-a-group related
-     * operation. This operation unauthorizes the specific peer device (if any
-     * had been authorized to start group formation), stops P2P find (if in
-     * progress), stops pending operations for join-a-group, and removes the
-     * P2P group interface (if one was used) that is in the WPS provisioning
-     * step. If the WPS provisioning step has been completed, the group is not
-     * terminated.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean cancelConnect();
-
-    /**
-     * Send P2P provision discovery request to the specified peer. The
-     * parameters for this command are the P2P device address of the peer and the
-     * desired configuration method.
-     *
-     * @param config Config class describing peer setup.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean provisionDiscovery(WifiP2pConfig config);
-
-    /**
-     * Invite a device to a persistent group.
-     * If the peer device is the group owner of the persistent group, the peer
-     * parameter is not needed. Otherwise it is used to specify which
-     * device to invite. |goDeviceAddress| parameter may be used to override
-     * the group owner device address for Invitation Request should it not be
-     * known for some reason (this should not be needed in most cases).
-     *
-     * @param group Group object to use.
-     * @param peerAddress MAC address of the device to invite.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean invite(WifiP2pGroup group, String peerAddress);
-
-    /**
-     * Reject connection attempt from a peer (specified with a device
-     * address). This is a mechanism to reject a pending group owner negotiation
-     * with a peer and request to automatically block any further connection or
-     * discovery of the peer.
-     *
-     * @param peerAddress MAC address of the device to reject.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean reject(String peerAddress);
-
-    /**
-     * Gets the MAC address of the device.
-     *
-     * @return MAC address of the device.
-     */
-    String getDeviceAddress();
-
-    /**
-     * Gets the operational SSID of the device.
-     *
-     * @param address MAC address of the peer.
-     *
-     * @return SSID of the device.
-     */
-    String getSsid(String address);
-
-    /**
-     * Reinvoke a device from a persistent group.
-     *
-     * @param networkId Used to specify the persistent group.
-     * @param peerAddress MAC address of the device to reinvoke.
-     *
-     * @return true, if operation was successful.
-     */
-    boolean reinvoke(int networkId, String peerAddress);
-
-    /**
-     * Set up a P2P group owner manually (i.e., without group owner
-     * negotiation with a specific peer). This is also known as autonomous
-     * group owner.
-     *
-     * @param networkId Used to specify the restart of a persistent group.
-     * @param isPersistent Used to request a persistent group to be formed.
-     *
-     * @return true, if operation was successful.
-     */
-    boolean groupAdd(int networkId, boolean isPersistent);
-
-    /**
-     * Set up a P2P group as Group Owner or join a group with a configuration.
-     *
-     * @param networkName SSID of the group to be formed
-     * @param passphrase passphrase of the group to be formed
-     * @param isPersistent Used to request a persistent group to be formed.
-     * @param freq preferred frequency or band of the group to be formed
-     * @param peerAddress peerAddress Group Owner MAC address, only applied for Group Client.
-     *        If the MAC is "00:00:00:00:00:00", the device will try to find a peer
-     *        whose SSID matches ssid.
-     * @param join join a group or create a group
-     *
-     * @return true, if operation was successful.
-     */
-    boolean groupAdd(String networkName, String passphrase,
-            boolean isPersistent, int freq, String peerAddress, boolean join);
-
-    /**
-     * Terminate a P2P group. If a new virtual network interface was used for
-     * the group, it must also be removed. The network interface name of the
-     * group interface is used as a parameter for this command.
-     *
-     * @param groupName Group interface name to use.
-     *
-     * @return true, if operation was successful.
-     */
-    boolean groupRemove(String groupName);
-
-    /**
-     * Gets the capability of the group which the device is a
-     * member of.
-     *
-     * @param peerAddress MAC address of the peer.
-     *
-     * @return combination of |GroupCapabilityMask| values.
-     */
-    int getGroupCapability(String peerAddress);
-
-    /**
-     * Configure Extended Listen Timing.
-     *
-     * If enabled, listen state must be entered every |intervalInMillis| for at
-     * least |periodInMillis|. Both values have acceptable range of 1-65535
-     * (with interval obviously having to be larger than or equal to duration).
-     * If the P2P module is not idle at the time the Extended Listen Timing
-     * timeout occurs, the Listen State operation must be skipped.
-     *
-     * @param enable Enables or disables listening.
-     * @param periodInMillis Period in milliseconds.
-     * @param intervalInMillis Interval in milliseconds.
-     *
-     * @return true, if operation was successful.
-     */
-    boolean configureExtListen(boolean enable, int periodInMillis, int intervalInMillis);
-
-    /**
-     * Set P2P Listen channel.
-     *
-     * @param listenChannel Wifi channel. eg, 1, 6, 11.
-     *
-     * @return true, if operation was successful.
-     */
-    boolean setListenChannel(int listenChannel);
-
-    /**
-     * Set P2P operating channel.
-     *
-     * @param operatingChannel the desired operating channel.
-     * @param unsafeChannels channels which p2p cannot use.
-     *
-     * @return true, if operation was successful.
-     */
-    boolean setOperatingChannel(int operatingChannel,
-            @NonNull List<CoexUnsafeChannel> unsafeChannels);
-
-    /**
-     * This command can be used to add a upnp/bonjour service.
-     *
-     * @param servInfo List of service queries.
-     *
-     * @return true, if operation was successful.
-     */
-    boolean serviceAdd(WifiP2pServiceInfo servInfo);
-
-    /**
-     * This command can be used to remove a upnp/bonjour service.
-     *
-     * @param servInfo List of service queries.
-     *
-     * @return true, if operation was successful.
-     */
-    boolean serviceRemove(WifiP2pServiceInfo servInfo);
-
-    /**
-     * Schedule a P2P service discovery request. The parameters for this command
-     * are the device address of the peer device (or 00:00:00:00:00:00 for
-     * wildcard query that is sent to every discovered P2P peer that supports
-     * service discovery) and P2P Service Query TLV(s) as hexdump.
-     *
-     * @param peerAddress MAC address of the device to discover.
-     * @param query Hex dump of the query data.
-     * @return identifier Identifier for the request. Can be used to cancel the
-     *         request.
-     */
-    String requestServiceDiscovery(String peerAddress, String query);
-
-    /**
-     * Cancel a previous service discovery request.
-     *
-     * @param identifier Identifier for the request to cancel.
-     * @return true, if operation was successful.
-     */
-    boolean cancelServiceDiscovery(String identifier);
-
-    /**
-     * Send driver command to set Miracast mode.
-     *
-     * @param mode Mode of Miracast.
-     * @return true, if operation was successful.
-     */
-    boolean setMiracastMode(int mode);
-
-    /**
-     * Initiate WPS Push Button setup.
-     * The PBC operation requires that a button is also pressed at the
-     * AP/Registrar at about the same time (2 minute window).
-     *
-     * @param groupIfName Group interface name to use.
-     * @param bssid BSSID of the AP. Use empty bssid to indicate wildcard.
-     * @return true, if operation was successful.
-     */
-    boolean startWpsPbc(String groupIfName, String bssid);
-
-    /**
-     * Initiate WPS Pin Keypad setup.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param pin 8 digit pin to be used.
-     * @return true, if operation was successful.
-     */
-    boolean startWpsPinKeypad(String groupIfName, String pin);
-
-    /**
-     * Initiate WPS Pin Display setup.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param bssid BSSID of the AP. Use empty bssid to indicate wildcard.
-     * @return generated pin if operation was successful, null otherwise.
-     */
-    String startWpsPinDisplay(String groupIfName, String bssid);
-
-    /**
-     * Cancel any ongoing WPS operations.
-     *
-     * @param groupIfName Group interface name to use.
-     * @return true, if operation was successful.
-     */
-    boolean cancelWps(String groupIfName);
-
-    /**
-     * Enable/Disable Wifi Display.
-     *
-     * @param enable true to enable, false to disable.
-     * @return true, if operation was successful.
-     */
-    boolean enableWfd(boolean enable);
-
-    /**
-     * Set Wifi Display device info.
-     *
-     * @param info WFD device info as described in section 5.1.2 of WFD technical
-     *        specification v1.0.0.
-     * @return true, if operation was successful.
-     */
-    boolean setWfdDeviceInfo(String info);
-
-    /**
-     * Remove network with provided id.
-     *
-     * @param networkId Id of the network to lookup.
-     * @return true, if operation was successful.
-     */
-    boolean removeNetwork(int networkId);
-
-    /**
-     * Get the persistent group list from wpa_supplicant's p2p mgmt interface
-     *
-     * @param groups WifiP2pGroupList to store persistent groups in
-     * @return true, if list has been modified.
-     */
-    boolean loadGroups(WifiP2pGroupList groups);
-
-    /**
-     * Set WPS device name.
-     *
-     * @param name String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setWpsDeviceName(String name);
-
-    /**
-     * Set WPS device type.
-     *
-     * @param typeStr Type specified as a string. Used format: <categ>-<OUI>-<subcateg>
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setWpsDeviceType(String typeStr);
-
-    /**
-     * Set WPS config methods
-     *
-     * @param configMethodsStr List of config methods.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    boolean setWpsConfigMethods(String configMethodsStr);
-
-    /**
-     * Get NFC handover request message.
-     *
-     * @return select message if created successfully, null otherwise.
-     */
-    String getNfcHandoverRequest();
-
-    /**
-     * Get NFC handover select message.
-     *
-     * @return select message if created successfully, null otherwise.
-     */
-    String getNfcHandoverSelect();
-
-    /**
-     * Report NFC handover select message.
-     *
-     * @return true if reported successfully, false otherwise.
-     */
-    boolean initiatorReportNfcHandover(String selectMessage);
-
-    /**
-     * Report NFC handover request message.
-     *
-     * @return true if reported successfully, false otherwise.
-     */
-    boolean responderReportNfcHandover(String requestMessage);
-
-    /**
-     * Set the client list for the provided network.
-     *
-     * @param networkId Id of the network.
-     * @param clientListStr Space separated list of clients.
-     * @return true, if operation was successful.
-     */
-    boolean setClientList(int networkId, String clientListStr);
-
-    /**
-     * Set the client list for the provided network.
-     *
-     * @param networkId Id of the network.
-     * @return Space separated list of clients if successful, null otherwise.
-     */
-    String getClientList(int networkId);
-
-    /**
-     * Persist the current configurations to disk.
-     *
-     * @return true, if operation was successful.
-     */
-    boolean saveConfig();
-
-    /**
-     * Enable/Disable P2P MAC randomization.
-     *
-     * @param enable true to enable, false to disable.
-     * @return true, if operation was successful.
-     */
-    boolean setMacRandomization(boolean enable);
-
-    /**
-     * Set Wifi Display R2 device info.
-     *
-     * @param info WFD R2 device info as described in section 5.1.12 of WFD technical
-     *        specification v2.1.
-     * @return true, if operation was successful.
-     */
-    boolean setWfdR2DeviceInfo(String info);
-
-    /**
-     * Remove the client with the MAC address from the group.
-     *
-     * @param peerAddress Mac address of the client.
-     * @param isLegacyClient Indicate if client is a legacy client or not.
-     * @return true if success
-     */
-    boolean removeClient(String peerAddress, boolean isLegacyClient);
-
-    /**
-     * Set vendor-specific information elements to wpa_supplicant.
-     *
-     * @param vendorElements vendor-specific information elements.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    boolean setVendorElements(Set<ScanResult.InformationElement> vendorElements);
-}
diff --git a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackAidlImpl.java b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackAidlImpl.java
deleted file mode 100644
index 8aa77ba..0000000
--- a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackAidlImpl.java
+++ /dev/null
@@ -1,767 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi.p2p;
-
-import android.annotation.NonNull;
-import android.hardware.wifi.supplicant.ISupplicantP2pIfaceCallback;
-import android.hardware.wifi.supplicant.P2pProvDiscStatusCode;
-import android.hardware.wifi.supplicant.P2pStatusCode;
-import android.hardware.wifi.supplicant.WpsConfigMethods;
-import android.hardware.wifi.supplicant.WpsDevPasswordId;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WpsInfo;
-import android.net.wifi.p2p.WifiP2pConfig;
-import android.net.wifi.p2p.WifiP2pDevice;
-import android.net.wifi.p2p.WifiP2pGroup;
-import android.net.wifi.p2p.WifiP2pProvDiscEvent;
-import android.net.wifi.p2p.WifiP2pWfdInfo;
-import android.net.wifi.p2p.nsd.WifiP2pServiceResponse;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.internal.util.HexDump;
-import com.android.server.wifi.util.NativeUtil;
-
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Class used for processing all P2P callbacks for the AIDL implementation.
- */
-public class SupplicantP2pIfaceCallbackAidlImpl extends ISupplicantP2pIfaceCallback.Stub {
-    private static final String TAG = "SupplicantP2pIfaceCallbackAidlImpl";
-    private static boolean sVerboseLoggingEnabled = true;
-
-    private final String mInterface;
-    private final WifiP2pMonitor mMonitor;
-
-    public SupplicantP2pIfaceCallbackAidlImpl(
-            @NonNull String iface, @NonNull WifiP2pMonitor monitor) {
-        mInterface = iface;
-        mMonitor = monitor;
-    }
-
-    /**
-     * Enable verbose logging for all sub modules.
-     */
-    public static void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        sVerboseLoggingEnabled = verboseEnabled;
-    }
-
-    protected static void logd(String msg) {
-        if (sVerboseLoggingEnabled) {
-            Log.d(TAG, msg);
-        }
-    }
-
-    /**
-     * Used to indicate that a P2P device has been found.
-     *
-     * @param srcAddress MAC address of the device found. This must either
-     *        be the P2P device address or the P2P interface address.
-     * @param p2pDeviceAddress P2P device address.
-     * @param primaryDeviceType Type of device. Refer to section B.1 of Wifi P2P
-     *        Technical specification v1.2.
-     * @param deviceName Name of the device.
-     * @param configMethods Mask of WPS configuration methods supported by the
-     *        device.
-     * @param deviceCapabilities Refer to section 4.1.4 of Wifi P2P Technical
-     *        specification v1.2.
-     * @param groupCapabilities Refer to section 4.1.4 of Wifi P2P Technical
-     *        specification v1.2.
-     * @param wfdDeviceInfo WFD device info as described in section 5.1.2 of WFD
-     *        technical specification v1.0.0.
-     */
-    @Override
-    public void onDeviceFound(byte[] srcAddress, byte[] p2pDeviceAddress, byte[] primaryDeviceType,
-            String deviceName, int configMethods, byte deviceCapabilities, int groupCapabilities,
-            byte[] wfdDeviceInfo) {
-        if (deviceName == null) {
-            Log.e(TAG, "Missing device name.");
-            return;
-        }
-        WifiP2pDevice device = new WifiP2pDevice();
-        device.deviceName = deviceName;
-        try {
-            device.deviceAddress = NativeUtil.macAddressFromByteArray(p2pDeviceAddress);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not decode device address.", e);
-            return;
-        }
-
-        try {
-            device.primaryDeviceType = NativeUtil.wpsDevTypeStringFromByteArray(primaryDeviceType);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not encode device primary type.", e);
-            return;
-        }
-
-        device.deviceCapability = deviceCapabilities;
-        device.groupCapability = groupCapabilities;
-        device.wpsConfigMethodsSupported = configMethods;
-        device.status = WifiP2pDevice.AVAILABLE;
-
-        if (wfdDeviceInfo != null && wfdDeviceInfo.length >= 6) {
-            device.wfdInfo = new WifiP2pWfdInfo(
-                    // Use & 0xFF to cast signed byte to unsigned int, otherwise
-                    // sign extension will affect the bitwise operations
-                    ((wfdDeviceInfo[0] & 0xFF) << 8) + (wfdDeviceInfo[1] & 0xFF),
-                    ((wfdDeviceInfo[2] & 0xFF) << 8) + (wfdDeviceInfo[3] & 0xFF),
-                    ((wfdDeviceInfo[4] & 0xFF) << 8) + (wfdDeviceInfo[5] & 0xFF));
-        }
-
-        logd("Device discovered on " + mInterface + ": " + device);
-        mMonitor.broadcastP2pDeviceFound(mInterface, device);
-    }
-
-    /**
-     * Used to indicate that a P2P device has been lost.
-     *
-     * @param p2pDeviceAddress P2P device address.
-     */
-    @Override
-    public void onDeviceLost(byte[] p2pDeviceAddress) {
-        WifiP2pDevice device = new WifiP2pDevice();
-
-        try {
-            device.deviceAddress = NativeUtil.macAddressFromByteArray(p2pDeviceAddress);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not decode device address.", e);
-            return;
-        }
-
-        device.status = WifiP2pDevice.UNAVAILABLE;
-
-        logd("Device lost on " + mInterface + ": " + device);
-        mMonitor.broadcastP2pDeviceLost(mInterface, device);
-    }
-
-    /**
-     * Used to indicate the termination of P2P find operation.
-     */
-    @Override
-    public void onFindStopped() {
-        logd("Search stopped on " + mInterface);
-        mMonitor.broadcastP2pFindStopped(mInterface);
-    }
-
-    /**
-     * Used to indicate the reception of a P2P Group Owner negotiation request.
-     *
-     * @param srcAddress MAC address of the device that initiated the GO
-     *        negotiation request.
-     * @param passwordId Type of password.
-     */
-    @Override
-    public void onGoNegotiationRequest(byte[] srcAddress, int passwordId) {
-        WifiP2pConfig config = new WifiP2pConfig();
-
-        try {
-            config.deviceAddress = NativeUtil.macAddressFromByteArray(srcAddress);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not decode device address.", e);
-            return;
-        }
-
-        config.wps = new WpsInfo();
-
-        switch (passwordId) {
-            case WpsDevPasswordId.USER_SPECIFIED:
-                config.wps.setup = WpsInfo.DISPLAY;
-                break;
-            case WpsDevPasswordId.PUSHBUTTON:
-                config.wps.setup = WpsInfo.PBC;
-                break;
-            case WpsDevPasswordId.REGISTRAR_SPECIFIED:
-                config.wps.setup = WpsInfo.KEYPAD;
-                break;
-            default:
-                config.wps.setup = WpsInfo.PBC;
-                break;
-        }
-
-        logd("Group Owner negotiation initiated on " + mInterface + ": " + config);
-        mMonitor.broadcastP2pGoNegotiationRequest(mInterface, config);
-    }
-
-    /**
-     * Used to indicate the completion of a P2P Group Owner negotiation request.
-     *
-     * @param status Status of the GO negotiation.
-     */
-    @Override
-    public void onGoNegotiationCompleted(int status) {
-        logd("Group Owner negotiation completed with status: " + status);
-        WifiP2pServiceImpl.P2pStatus result = halStatusToP2pStatus(status);
-
-        if (result == WifiP2pServiceImpl.P2pStatus.SUCCESS) {
-            mMonitor.broadcastP2pGoNegotiationSuccess(mInterface);
-        } else {
-            mMonitor.broadcastP2pGoNegotiationFailure(mInterface, result);
-        }
-    }
-
-    /**
-     * Used to indicate a successful formation of a P2P group.
-     */
-    @Override
-    public void onGroupFormationSuccess() {
-        logd("Group formation successful on " + mInterface);
-        mMonitor.broadcastP2pGroupFormationSuccess(mInterface);
-    }
-
-    /**
-     * Used to indicate a failure to form a P2P group.
-     *
-     * @param failureReason Failure reason string for debug purposes.
-     */
-    @Override
-    public void onGroupFormationFailure(String failureReason) {
-        logd("Group formation failed on " + mInterface + ": " + failureReason);
-        mMonitor.broadcastP2pGroupFormationFailure(mInterface, failureReason);
-    }
-
-    /**
-     * Used to indicate the start of a P2P group.
-     *
-     * @param groupIfName Interface name of the group. (For ex: p2p-p2p0-1)
-     * @param isGroupOwner Whether this device is owner of the group.
-     * @param ssid SSID of the group.
-     * @param frequency Frequency on which this group is created.
-     * @param psk PSK used to secure the group.
-     * @param passphrase PSK passphrase used to secure the group.
-     * @param goDeviceAddress MAC Address of the owner of this group.
-     * @param isPersistent Whether this group is persisted or not.
-     */
-    @Override
-    public void onGroupStarted(String groupIfName, boolean isGroupOwner, byte[] ssid,
-            int frequency, byte[] psk, String passphrase, byte[] goDeviceAddress,
-            boolean isPersistent) {
-        if (groupIfName == null) {
-            Log.e(TAG, "Missing group interface name.");
-            return;
-        }
-
-        logd("Group " + groupIfName + " started on " + mInterface);
-
-        WifiP2pGroup group = new WifiP2pGroup();
-        group.setInterface(groupIfName);
-
-        try {
-            String quotedSsid = NativeUtil.encodeSsid(
-                    NativeUtil.byteArrayToArrayList(ssid));
-            group.setNetworkName(NativeUtil.removeEnclosingQuotes(quotedSsid));
-        } catch (Exception e) {
-            Log.e(TAG, "Could not encode SSID.", e);
-            return;
-        }
-
-        group.setFrequency(frequency);
-        group.setIsGroupOwner(isGroupOwner);
-        group.setPassphrase(passphrase);
-
-        if (isPersistent) {
-            group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
-        } else {
-            group.setNetworkId(WifiP2pGroup.NETWORK_ID_TEMPORARY);
-        }
-
-        WifiP2pDevice owner = new WifiP2pDevice();
-
-        try {
-            owner.deviceAddress = NativeUtil.macAddressFromByteArray(goDeviceAddress);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not decode Group Owner address.", e);
-            return;
-        }
-
-        group.setOwner(owner);
-        mMonitor.broadcastP2pGroupStarted(mInterface, group);
-    }
-
-    /**
-     * Used to indicate the removal of a P2P group.
-     *
-     * @param groupIfName Interface name of the group. (For ex: p2p-p2p0-1)
-     * @param isGroupOwner Whether this device is owner of the group.
-     */
-    @Override
-    public void onGroupRemoved(String groupIfName, boolean isGroupOwner) {
-        if (groupIfName == null) {
-            Log.e(TAG, "Missing group name.");
-            return;
-        }
-
-        logd("Group " + groupIfName + " removed from " + mInterface);
-        WifiP2pGroup group = new WifiP2pGroup();
-        group.setInterface(groupIfName);
-        group.setIsGroupOwner(isGroupOwner);
-        mMonitor.broadcastP2pGroupRemoved(mInterface, group);
-    }
-
-    /**
-     * Used to indicate the reception of a P2P invitation.
-     *
-     * @param srcAddress MAC address of the device that sent the invitation.
-     * @param goDeviceAddress MAC Address of the owner of this group.
-     * @param bssid Bssid of the group.
-     * @param persistentNetworkId Persistent network Id of the group.
-     * @param operatingFrequency Frequency on which the invitation was received.
-     */
-    @Override
-    public void onInvitationReceived(byte[] srcAddress, byte[] goDeviceAddress,
-            byte[] bssid, int persistentNetworkId, int operatingFrequency) {
-        WifiP2pGroup group = new WifiP2pGroup();
-        group.setNetworkId(persistentNetworkId);
-
-        WifiP2pDevice client = new WifiP2pDevice();
-
-        try {
-            client.deviceAddress = NativeUtil.macAddressFromByteArray(srcAddress);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not decode MAC address.", e);
-            return;
-        }
-
-        group.addClient(client);
-
-        WifiP2pDevice owner = new WifiP2pDevice();
-
-        try {
-            owner.deviceAddress = NativeUtil.macAddressFromByteArray(goDeviceAddress);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not decode Group Owner MAC address.", e);
-            return;
-        }
-
-        group.setOwner(owner);
-
-        logd("Invitation received on " + mInterface + ": " + group);
-        mMonitor.broadcastP2pInvitationReceived(mInterface, group);
-    }
-
-    /**
-     * Used to indicate the result of the P2P invitation request.
-     *
-     * @param bssid Bssid of the group.
-     * @param status Status of the invitation.
-     */
-    @Override
-    public void onInvitationResult(byte[] bssid, int status) {
-        logd("Invitation completed with status: " + status);
-        mMonitor.broadcastP2pInvitationResult(mInterface, halStatusToP2pStatus(status));
-    }
-
-    private @WifiP2pMonitor.P2pProvDiscStatus int convertHalProvDiscStatusToFrameworkStatus(
-            int status) {
-        switch (status) {
-            case P2pProvDiscStatusCode.SUCCESS:
-                return WifiP2pMonitor.PROV_DISC_STATUS_SUCCESS;
-            case P2pProvDiscStatusCode.TIMEOUT:
-                return WifiP2pMonitor.PROV_DISC_STATUS_TIMEOUT;
-            case P2pProvDiscStatusCode.REJECTED:
-                return WifiP2pMonitor.PROV_DISC_STATUS_REJECTED;
-            case P2pProvDiscStatusCode.TIMEOUT_JOIN:
-                return WifiP2pMonitor.PROV_DISC_STATUS_TIMEOUT_JOIN;
-            case P2pProvDiscStatusCode.INFO_UNAVAILABLE:
-                return WifiP2pMonitor.PROV_DISC_STATUS_INFO_UNAVAILABLE;
-            default:
-                return WifiP2pMonitor.PROV_DISC_STATUS_UNKNOWN;
-        }
-    }
-
-    /**
-     * Used to indicate the completion of a P2P provision discovery request.
-     *
-     * @param p2pDeviceAddress P2P device address.
-     * @param isRequest Whether we received or sent the provision discovery.
-     * @param status Status of the provision discovery (SupplicantStatusCode).
-     * @param configMethods Mask of WPS configuration methods supported.
-     *                      Only one configMethod bit should be set per call.
-     * @param generatedPin 8 digit pin generated.
-     */
-    @Override
-    public void onProvisionDiscoveryCompleted(byte[] p2pDeviceAddress, boolean isRequest,
-            byte status, int configMethods, String generatedPin) {
-        logd("Provision discovery " + (isRequest ? "request" : "response")
-                + " for WPS Config method: " + configMethods
-                + " status: " + status);
-
-        WifiP2pProvDiscEvent event = new WifiP2pProvDiscEvent();
-        event.device = new WifiP2pDevice();
-
-        try {
-            event.device.deviceAddress = NativeUtil.macAddressFromByteArray(p2pDeviceAddress);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not decode MAC address.", e);
-            event.device.deviceAddress = null;
-        }
-
-        if (status != P2pProvDiscStatusCode.SUCCESS) {
-            Log.e(TAG, "Provision discovery failed, status code: " + status);
-            mMonitor.broadcastP2pProvisionDiscoveryFailure(mInterface,
-                    convertHalProvDiscStatusToFrameworkStatus(status), event);
-            return;
-        }
-
-        if (TextUtils.isEmpty(event.device.deviceAddress)) return;
-
-        if ((configMethods & WpsConfigMethods.PUSHBUTTON) != 0) {
-            if (isRequest) {
-                event.event = WifiP2pProvDiscEvent.PBC_REQ;
-                mMonitor.broadcastP2pProvisionDiscoveryPbcRequest(mInterface, event);
-            } else {
-                event.event = WifiP2pProvDiscEvent.PBC_RSP;
-                mMonitor.broadcastP2pProvisionDiscoveryPbcResponse(mInterface, event);
-            }
-        } else if (!isRequest && (configMethods & WpsConfigMethods.KEYPAD) != 0) {
-            event.event = WifiP2pProvDiscEvent.SHOW_PIN;
-            event.pin = generatedPin;
-            mMonitor.broadcastP2pProvisionDiscoveryShowPin(mInterface, event);
-        } else if (!isRequest && (configMethods & WpsConfigMethods.DISPLAY) != 0) {
-            event.event = WifiP2pProvDiscEvent.ENTER_PIN;
-            mMonitor.broadcastP2pProvisionDiscoveryEnterPin(mInterface, event);
-        } else if (isRequest && (configMethods & WpsConfigMethods.DISPLAY) != 0) {
-            event.event = WifiP2pProvDiscEvent.SHOW_PIN;
-            event.pin = generatedPin;
-            mMonitor.broadcastP2pProvisionDiscoveryShowPin(mInterface, event);
-        } else if (isRequest && (configMethods & WpsConfigMethods.KEYPAD) != 0) {
-            event.event = WifiP2pProvDiscEvent.ENTER_PIN;
-            mMonitor.broadcastP2pProvisionDiscoveryEnterPin(mInterface, event);
-        } else {
-            Log.e(TAG, "Unsupported config methods: " + configMethods);
-        }
-    }
-
-    /**
-     * Used to indicate the reception of a P2P service discovery response.
-     *
-     * @param srcAddress MAC address of the device that sent the service discovery.
-     * @param updateIndicator Service update indicator. Refer to section 3.1.3 of
-     *        Wifi P2P Technical specification v1.2.
-     * @param tlvs Refer to section 3.1.3.1 of Wifi P2P Technical specification v1.2.
-     */
-    @Override
-    public void onServiceDiscoveryResponse(byte[] srcAddress, char updateIndicator,
-            byte[] tlvs) {
-        List<WifiP2pServiceResponse> response = null;
-
-        logd("Service discovery response received on " + mInterface);
-        try {
-            String srcAddressStr = NativeUtil.macAddressFromByteArray(srcAddress);
-            // updateIndicator is not used
-            response = WifiP2pServiceResponse.newInstance(srcAddressStr, tlvs);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not process service discovery response.", e);
-            return;
-        }
-        mMonitor.broadcastP2pServiceDiscoveryResponse(mInterface, response);
-    }
-
-    private WifiP2pDevice createStaEventDevice(byte[] srcAddress, byte[] p2pDeviceAddress) {
-        WifiP2pDevice device = new WifiP2pDevice();
-        byte[] deviceAddressBytes;
-        // Legacy STAs may not supply a p2pDeviceAddress (signaled by a zero'd p2pDeviceAddress)
-        // In this case, use srcAddress instead
-        if (!Arrays.equals(NativeUtil.ANY_MAC_BYTES, p2pDeviceAddress)) {
-            deviceAddressBytes = p2pDeviceAddress;
-        } else {
-            deviceAddressBytes = srcAddress;
-        }
-        try {
-            device.deviceAddress = NativeUtil.macAddressFromByteArray(deviceAddressBytes);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not decode MAC address", e);
-            return null;
-        }
-        return device;
-    }
-
-    /**
-     * Used to indicate when a STA device is connected to this device.
-     *
-     * @param srcAddress MAC address of the device that was authorized.
-     * @param p2pDeviceAddress P2P device address.
-     */
-    @Override
-    public void onStaAuthorized(byte[] srcAddress, byte[] p2pDeviceAddress) {
-        logd("STA authorized on " + mInterface);
-        WifiP2pDevice device = createStaEventDevice(srcAddress, p2pDeviceAddress);
-        if (device == null) {
-            return;
-        }
-        mMonitor.broadcastP2pApStaConnected(mInterface, device);
-    }
-
-    /**
-     * Used to indicate when a STA device is disconnected from this device.
-     *
-     * @param srcAddress MAC address of the device that was deauthorized.
-     * @param p2pDeviceAddress P2P device address.
-     */
-    @Override
-    public void onStaDeauthorized(byte[] srcAddress, byte[] p2pDeviceAddress) {
-        logd("STA deauthorized on " + mInterface);
-        WifiP2pDevice device = createStaEventDevice(srcAddress, p2pDeviceAddress);
-        if (device == null) {
-            return;
-        }
-        mMonitor.broadcastP2pApStaDisconnected(mInterface, device);
-    }
-
-    /**
-     * Used to indicate that a P2P WFD R2 device has been found.
-     *
-     * @param srcAddress MAC address of the device found. This must either
-     *        be the P2P device address or the P2P interface address.
-     * @param p2pDeviceAddress P2P device address.
-     * @param primaryDeviceType Type of device. Refer to section B.1 of Wifi P2P
-     *        Technical specification v1.2.
-     * @param deviceName Name of the device.
-     * @param configMethods Mask of WPS configuration methods supported by the
-     *        device.
-     * @param deviceCapabilities Refer to section 4.1.4 of Wifi P2P Technical
-     *        specification v1.2.
-     * @param groupCapabilities Refer to section 4.1.4 of Wifi P2P Technical
-     *        specification v1.2.
-     * @param wfdDeviceInfo WFD device info as described in section 5.1.2 of WFD
-     *        technical specification v1.0.0.
-     * @param wfdR2DeviceInfo WFD R2 device info as described in section 5.1.12 of WFD
-     *        technical specification v2.1.
-     */
-    @Override
-    public void onR2DeviceFound(byte[] srcAddress, byte[] p2pDeviceAddress,
-            byte[] primaryDeviceType, String deviceName, int configMethods,
-            byte deviceCapabilities, int groupCapabilities, byte[] wfdDeviceInfo,
-            byte[] wfdR2DeviceInfo) {
-        WifiP2pDevice device = new WifiP2pDevice();
-        device.deviceName = deviceName;
-        if (deviceName == null) {
-            Log.e(TAG, "Missing device name.");
-            return;
-        }
-
-        try {
-            device.deviceAddress = NativeUtil.macAddressFromByteArray(p2pDeviceAddress);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not decode device address.", e);
-            return;
-        }
-
-        try {
-            device.primaryDeviceType = NativeUtil.wpsDevTypeStringFromByteArray(primaryDeviceType);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not encode device primary type.", e);
-            return;
-        }
-
-        device.deviceCapability = deviceCapabilities;
-        device.groupCapability = groupCapabilities;
-        device.wpsConfigMethodsSupported = configMethods;
-        device.status = WifiP2pDevice.AVAILABLE;
-
-        if (wfdDeviceInfo != null && wfdDeviceInfo.length >= 6) {
-            device.wfdInfo = new WifiP2pWfdInfo(
-                    ((wfdDeviceInfo[0] & 0xFF) << 8) + (wfdDeviceInfo[1] & 0xFF),
-                    ((wfdDeviceInfo[2] & 0xFF) << 8) + (wfdDeviceInfo[3] & 0xFF),
-                    ((wfdDeviceInfo[4] & 0xFF) << 8) + (wfdDeviceInfo[5] & 0xFF));
-        }
-        if (wfdR2DeviceInfo != null && wfdR2DeviceInfo.length >= 2) {
-            device.wfdInfo.setR2DeviceInfo(
-                    ((wfdR2DeviceInfo[0] & 0xFF) << 8) + (wfdR2DeviceInfo[1] & 0xFF));
-        }
-
-        logd("R2 Device discovered on " + mInterface + ": "
-                + device + " R2 Info:" + Arrays.toString(wfdR2DeviceInfo));
-        mMonitor.broadcastP2pDeviceFound(mInterface, device);
-    }
-
-    /**
-     * Used to indicate the frequency changed notification.
-     *
-     * @param groupIfName Interface name of the group.
-     * @param frequency New operating frequency.
-     */
-    public void onGroupFrequencyChanged(String groupIfName, int frequency) {
-        if (groupIfName == null) {
-            Log.e(TAG, "Missing group interface name.");
-            return;
-        }
-
-        logd("Frequency changed event on " + groupIfName + ". New frequency: " + frequency);
-
-        mMonitor.broadcastP2pFrequencyChanged(mInterface, frequency);
-    }
-
-    /*
-     * Used to indicate that a P2P device has been found.
-     *
-     * @param srcAddress MAC address of the device found. This must either
-     *        be the P2P device address or the P2P interface address.
-     * @param p2pDeviceAddress P2P device address.
-     * @param primaryDeviceType Type of device. Refer to section B.1 of Wifi P2P
-     *        Technical specification v1.2.
-     * @param deviceName Name of the device.
-     * @param configMethods Mask of WPS configuration methods supported by the
-     *        device.
-     * @param deviceCapabilities Refer to section 4.1.4 of Wifi P2P Technical
-     *        specification v1.2.
-     * @param groupCapabilities Refer to section 4.1.4 of Wifi P2P Technical
-     *        specification v1.2.
-     * @param wfdDeviceInfo WFD device info as described in section 5.1.2 of WFD
-     *        technical specification v1.0.0.
-     * @param wfdR2DeviceInfo WFD R2 device info as described in section 5.1.12 of WFD
-     *        technical specification v2.1.
-     * @param vendorElemBytes bytes of vendor-specific information elements.
-     */
-    @Override
-    public void onDeviceFoundWithVendorElements(byte[] srcAddress, byte[] p2pDeviceAddress,
-            byte[] primaryDeviceType, String deviceName, int configMethods,
-            byte deviceCapabilities, int groupCapabilities, byte[] wfdDeviceInfo,
-            byte[] wfdR2DeviceInfo, byte[] vendorElemBytes) {
-        WifiP2pDevice device = new WifiP2pDevice();
-        device.deviceName = deviceName;
-        if (deviceName == null) {
-            Log.e(TAG, "Missing device name.");
-            return;
-        }
-
-        try {
-            device.deviceAddress = NativeUtil.macAddressFromByteArray(p2pDeviceAddress);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not decode device address.", e);
-            return;
-        }
-
-        try {
-            device.primaryDeviceType = NativeUtil.wpsDevTypeStringFromByteArray(primaryDeviceType);
-        } catch (Exception e) {
-            Log.e(TAG, "Could not encode device primary type.", e);
-            return;
-        }
-
-        device.deviceCapability = deviceCapabilities;
-        device.groupCapability = groupCapabilities;
-        device.wpsConfigMethodsSupported = configMethods;
-        device.status = WifiP2pDevice.AVAILABLE;
-
-        if (wfdDeviceInfo != null && wfdDeviceInfo.length >= 6) {
-            device.wfdInfo = new WifiP2pWfdInfo(
-                    ((wfdDeviceInfo[0] & 0xFF) << 8) + (wfdDeviceInfo[1] & 0xFF),
-                    ((wfdDeviceInfo[2] & 0xFF) << 8) + (wfdDeviceInfo[3] & 0xFF),
-                    ((wfdDeviceInfo[4] & 0xFF) << 8) + (wfdDeviceInfo[5] & 0xFF));
-        }
-        if (wfdR2DeviceInfo != null && wfdR2DeviceInfo.length >= 2) {
-            device.wfdInfo.setR2DeviceInfo(
-                    ((wfdR2DeviceInfo[0] & 0xFF) << 8) + (wfdR2DeviceInfo[1] & 0xFF));
-        }
-
-        if (null != vendorElemBytes && vendorElemBytes.length > 0) {
-            logd("Vendor Element Bytes: " + HexDump.dumpHexString(vendorElemBytes));
-            List<ScanResult.InformationElement> vendorElements = new ArrayList<>();
-            try {
-                ByteArrayInputStream is = new ByteArrayInputStream(vendorElemBytes);
-                int b;
-                while ((b = is.read()) != -1) {
-                    int id = b;
-                    int len = is.read();
-                    if (len == -1) break;
-                    byte[] bytes = new byte[len];
-                    int read = is.read(bytes, 0, len);
-                    if (-1 == read || len != read) break;
-                    if (id != ScanResult.InformationElement.EID_VSA) continue;
-                    vendorElements.add(new ScanResult.InformationElement(id, 0, bytes));
-                }
-            } catch (Exception ex) {
-                logd("Cannot parse vendor element bytes: " + ex);
-                vendorElements = null;
-            }
-            device.setVendorElements(vendorElements);
-        }
-
-        logd("Device discovered on " + mInterface + ": " + device);
-        mMonitor.broadcastP2pDeviceFound(mInterface, device);
-    }
-
-    private static WifiP2pServiceImpl.P2pStatus halStatusToP2pStatus(int status) {
-        WifiP2pServiceImpl.P2pStatus result = WifiP2pServiceImpl.P2pStatus.UNKNOWN;
-
-        switch (status) {
-            case P2pStatusCode.SUCCESS:
-            case P2pStatusCode.SUCCESS_DEFERRED:
-                result = WifiP2pServiceImpl.P2pStatus.SUCCESS;
-                break;
-
-            case P2pStatusCode.FAIL_INFO_CURRENTLY_UNAVAILABLE:
-                result = WifiP2pServiceImpl.P2pStatus.INFORMATION_IS_CURRENTLY_UNAVAILABLE;
-                break;
-
-            case P2pStatusCode.FAIL_INCOMPATIBLE_PARAMS:
-                result = WifiP2pServiceImpl.P2pStatus.INCOMPATIBLE_PARAMETERS;
-                break;
-
-            case P2pStatusCode.FAIL_LIMIT_REACHED:
-                result = WifiP2pServiceImpl.P2pStatus.LIMIT_REACHED;
-                break;
-
-            case P2pStatusCode.FAIL_INVALID_PARAMS:
-                result = WifiP2pServiceImpl.P2pStatus.INVALID_PARAMETER;
-                break;
-
-            case P2pStatusCode.FAIL_UNABLE_TO_ACCOMMODATE:
-                result = WifiP2pServiceImpl.P2pStatus.UNABLE_TO_ACCOMMODATE_REQUEST;
-                break;
-
-            case P2pStatusCode.FAIL_PREV_PROTOCOL_ERROR:
-                result = WifiP2pServiceImpl.P2pStatus.PREVIOUS_PROTOCOL_ERROR;
-                break;
-
-            case P2pStatusCode.FAIL_NO_COMMON_CHANNELS:
-                result = WifiP2pServiceImpl.P2pStatus.NO_COMMON_CHANNEL;
-                break;
-
-            case P2pStatusCode.FAIL_UNKNOWN_GROUP:
-                result = WifiP2pServiceImpl.P2pStatus.UNKNOWN_P2P_GROUP;
-                break;
-
-            case P2pStatusCode.FAIL_BOTH_GO_INTENT_15:
-                result = WifiP2pServiceImpl.P2pStatus.BOTH_GO_INTENT_15;
-                break;
-
-            case P2pStatusCode.FAIL_INCOMPATIBLE_PROV_METHOD:
-                result = WifiP2pServiceImpl.P2pStatus.INCOMPATIBLE_PROVISIONING_METHOD;
-                break;
-
-            case P2pStatusCode.FAIL_REJECTED_BY_USER:
-                result = WifiP2pServiceImpl.P2pStatus.REJECTED_BY_USER;
-                break;
-        }
-        return result;
-    }
-
-    @Override
-    public String getInterfaceHash() {
-        return ISupplicantP2pIfaceCallback.HASH;
-    }
-
-    @Override
-    public int getInterfaceVersion() {
-        return ISupplicantP2pIfaceCallback.VERSION;
-    }
-}
diff --git a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackHidlImpl.java b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackImpl.java
similarity index 91%
rename from service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackHidlImpl.java
rename to service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackImpl.java
index dcc4cf7..21b0998 100644
--- a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackHidlImpl.java
+++ b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackImpl.java
@@ -26,7 +26,6 @@
 import android.net.wifi.p2p.WifiP2pProvDiscEvent;
 import android.net.wifi.p2p.WifiP2pWfdInfo;
 import android.net.wifi.p2p.nsd.WifiP2pServiceResponse;
-import android.text.TextUtils;
 import android.util.Log;
 
 import com.android.server.wifi.p2p.WifiP2pServiceImpl.P2pStatus;
@@ -37,18 +36,18 @@
 import java.util.List;
 
 /**
- * Class used for processing all P2P callbacks for the HIDL implementation.
+ * Class used for processing all P2P callbacks.
  */
-public class SupplicantP2pIfaceCallbackHidlImpl extends ISupplicantP2pIfaceCallback.Stub {
+public class SupplicantP2pIfaceCallbackImpl extends ISupplicantP2pIfaceCallback.Stub {
     private static final String TAG = "SupplicantP2pIfaceCallbackImpl";
     private static boolean sVerboseLoggingEnabled = true;
 
-    private final SupplicantP2pIfaceHalHidlImpl mP2pIfaceHal;
+    private final SupplicantP2pIfaceHal mP2pIfaceHal;
     private final String mInterface;
     private final WifiP2pMonitor mMonitor;
 
-    public SupplicantP2pIfaceCallbackHidlImpl(
-            @NonNull SupplicantP2pIfaceHalHidlImpl p2pIfaceHal,
+    public SupplicantP2pIfaceCallbackImpl(
+            @NonNull SupplicantP2pIfaceHal p2pIfaceHal,
             @NonNull String iface, @NonNull WifiP2pMonitor monitor) {
         mP2pIfaceHal = p2pIfaceHal;
         mInterface = iface;
@@ -58,8 +57,8 @@
     /**
      * Enable verbose logging for all sub modules.
      */
-    public static void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        sVerboseLoggingEnabled = verboseEnabled;
+    public static void enableVerboseLogging(int verbose) {
+        sVerboseLoggingEnabled = verbose > 0;
     }
 
     protected static void logd(String s) {
@@ -382,23 +381,6 @@
         mMonitor.broadcastP2pInvitationResult(mInterface, halStatusToP2pStatus(status));
     }
 
-    private @WifiP2pMonitor.P2pProvDiscStatus int convertHalProvDiscStatusToFrameworkStatus(
-            int status) {
-        switch (status) {
-            case ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.SUCCESS:
-                return WifiP2pMonitor.PROV_DISC_STATUS_SUCCESS;
-            case ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.TIMEOUT:
-                return WifiP2pMonitor.PROV_DISC_STATUS_TIMEOUT;
-            case ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.REJECTED:
-                return WifiP2pMonitor.PROV_DISC_STATUS_REJECTED;
-            case ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.TIMEOUT_JOIN:
-                return WifiP2pMonitor.PROV_DISC_STATUS_TIMEOUT_JOIN;
-            case ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.INFO_UNAVAILABLE:
-                return WifiP2pMonitor.PROV_DISC_STATUS_INFO_UNAVAILABLE;
-            default:
-                return WifiP2pMonitor.PROV_DISC_STATUS_UNKNOWN;
-        }
-    }
 
     /**
      * Used to indicate the completion of a P2P provision discovery request.
@@ -412,9 +394,14 @@
      */
     public void onProvisionDiscoveryCompleted(byte[] p2pDeviceAddress, boolean isRequest,
             byte status, short configMethods, String generatedPin) {
+        if (status != ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.SUCCESS) {
+            Log.e(TAG, "Provision discovery failed: " + status);
+            mMonitor.broadcastP2pProvisionDiscoveryFailure(mInterface);
+            return;
+        }
+
         logd("Provision discovery " + (isRequest ? "request" : "response")
-                + " for WPS Config method: " + configMethods
-                + " status: " + status);
+                + " for WPS Config method: " + configMethods);
 
         WifiP2pProvDiscEvent event = new WifiP2pProvDiscEvent();
         event.device = new WifiP2pDevice();
@@ -423,18 +410,9 @@
             event.device.deviceAddress = NativeUtil.macAddressFromByteArray(p2pDeviceAddress);
         } catch (Exception e) {
             Log.e(TAG, "Could not decode MAC address.", e);
-            event.device.deviceAddress = null;
-        }
-
-        if (status != ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.SUCCESS) {
-            Log.e(TAG, "Provision discovery failed, status code: " + status);
-            mMonitor.broadcastP2pProvisionDiscoveryFailure(mInterface,
-                    convertHalProvDiscStatusToFrameworkStatus(status), event);
             return;
         }
 
-        if (TextUtils.isEmpty(event.device.deviceAddress)) return;
-
         if ((configMethods & WpsConfigMethods.PUSHBUTTON) != 0) {
             if (isRequest) {
                 event.event = WifiP2pProvDiscEvent.PBC_REQ;
diff --git a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackHidlV1_4Impl.java b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackV1_4Impl.java
similarity index 96%
rename from service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackHidlV1_4Impl.java
rename to service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackV1_4Impl.java
index e29205e..676f8fd 100644
--- a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackHidlV1_4Impl.java
+++ b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackV1_4Impl.java
@@ -28,18 +28,18 @@
 /**
  * Class used for processing all P2P callbacks.
  */
-public class SupplicantP2pIfaceCallbackHidlV1_4Impl
+public class SupplicantP2pIfaceCallbackV1_4Impl
         extends android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIfaceCallback.Stub {
     private static final String TAG = "SupplicantP2pIfaceCallbackV1_4Impl";
     private static boolean sVerboseLoggingEnabled = true;
 
-    private final SupplicantP2pIfaceHalHidlImpl mP2pIfaceHal;
+    private final SupplicantP2pIfaceHal mP2pIfaceHal;
     private final String mInterface;
     private final WifiP2pMonitor mMonitor;
-    private final SupplicantP2pIfaceHalHidlImpl.SupplicantP2pIfaceCallback mCallbackV10;
+    private final SupplicantP2pIfaceHal.SupplicantP2pIfaceCallback mCallbackV10;
 
-    public SupplicantP2pIfaceCallbackHidlV1_4Impl(
-            @NonNull SupplicantP2pIfaceHalHidlImpl p2pIfaceHal,
+    public SupplicantP2pIfaceCallbackV1_4Impl(
+            @NonNull SupplicantP2pIfaceHal p2pIfaceHal,
             @NonNull String iface, @NonNull WifiP2pMonitor monitor) {
         mP2pIfaceHal = p2pIfaceHal;
         mInterface = iface;
@@ -52,8 +52,8 @@
     /**
      * Enable verbose logging for all sub modules.
      */
-    public static void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        sVerboseLoggingEnabled = verboseEnabled;
+    public static void enableVerboseLogging(int verbose) {
+        sVerboseLoggingEnabled = verbose > 0;
     }
 
     protected static void logd(String s) {
diff --git a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceHal.java b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceHal.java
index fa915a0..4d6dea0 100644
--- a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceHal.java
+++ b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceHal.java
@@ -17,129 +17,365 @@
 package com.android.server.wifi.p2p;
 
 import android.annotation.NonNull;
+import android.hardware.wifi.supplicant.V1_0.ISupplicant;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantIface;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantNetwork;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pIface;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pIfaceCallback;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pNetwork;
+import android.hardware.wifi.supplicant.V1_0.IfaceType;
+import android.hardware.wifi.supplicant.V1_0.SupplicantStatus;
+import android.hardware.wifi.supplicant.V1_0.SupplicantStatusCode;
+import android.hardware.wifi.supplicant.V1_0.WpsConfigMethods;
+import android.hidl.manager.V1_0.IServiceManager;
+import android.hidl.manager.V1_0.IServiceNotification;
 import android.net.wifi.CoexUnsafeChannel;
 import android.net.wifi.ScanResult;
+import android.net.wifi.WpsInfo;
 import android.net.wifi.p2p.WifiP2pConfig;
+import android.net.wifi.p2p.WifiP2pDevice;
 import android.net.wifi.p2p.WifiP2pGroup;
 import android.net.wifi.p2p.WifiP2pGroupList;
 import android.net.wifi.p2p.WifiP2pManager;
 import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
+import android.os.IHwBinder.DeathRecipient;
+import android.os.RemoteException;
+import android.text.TextUtils;
 import android.util.Log;
 
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.server.wifi.WifiGlobals;
+import com.android.modules.utils.build.SdkLevel;
+import com.android.server.wifi.util.ArrayUtils;
+import com.android.server.wifi.util.NativeUtil;
 
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
-import java.util.Set;
+import java.util.NoSuchElementException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
 
+/**
+ * Native calls sending requests to the P2P Hals, and callbacks for receiving P2P events
+ *
+ * {@hide}
+ */
 public class SupplicantP2pIfaceHal {
     private static final String TAG = "SupplicantP2pIfaceHal";
-    private final Object mLock = new Object();
     private static boolean sVerboseLoggingEnabled = true;
-    private static boolean sHalVerboseLoggingEnabled = true;
-    private final WifiP2pMonitor mMonitor;
-    private final WifiGlobals mWifiGlobals;
+    private static final int RESULT_NOT_VALID = -1;
+    private static final int DEFAULT_OPERATING_CLASS = 81;
+    /**
+     * Regex pattern for extracting the wps device type bytes.
+     * Matches a strings like the following: "<categ>-<OUI>-<subcateg>";
+     */
+    private static final Pattern WPS_DEVICE_TYPE_PATTERN =
+            Pattern.compile("^(\\d{1,2})-([0-9a-fA-F]{8})-(\\d{1,2})$");
 
-    // HAL interface object - might be implemented by HIDL or AIDL
-    private ISupplicantP2pIfaceHal mP2pIfaceHal;
+    private Object mLock = new Object();
 
-    public SupplicantP2pIfaceHal(WifiP2pMonitor monitor, WifiGlobals wifiGlobals) {
-        mMonitor = monitor;
-        mWifiGlobals = wifiGlobals;
-        mP2pIfaceHal = createP2pIfaceHalMockable();
-        if (mP2pIfaceHal == null) {
-            Log.wtf(TAG, "Failed to get internal ISupplicantP2pIfaceHal instance.");
+    // Supplicant HAL HIDL interface objects
+    private IServiceManager mIServiceManager = null;
+    private ISupplicant mISupplicant = null;
+    private ISupplicantIface mHidlSupplicantIface = null;
+    private ISupplicantP2pIface mISupplicantP2pIface = null;
+    private final IServiceNotification mServiceNotificationCallback =
+            new IServiceNotification.Stub() {
+        public void onRegistration(String fqName, String name, boolean preexisting) {
+            synchronized (mLock) {
+                if (sVerboseLoggingEnabled) {
+                    Log.i(TAG, "IServiceNotification.onRegistration for: " + fqName
+                            + ", " + name + " preexisting=" + preexisting);
+                }
+                if (!initSupplicantService()) {
+                    Log.e(TAG, "initalizing ISupplicant failed.");
+                    supplicantServiceDiedHandler();
+                } else {
+                    Log.i(TAG, "Completed initialization of ISupplicant interfaces.");
+                }
+            }
         }
+    };
+    private final DeathRecipient mServiceManagerDeathRecipient =
+            cookie -> {
+                Log.w(TAG, "IServiceManager died: cookie=" + cookie);
+                synchronized (mLock) {
+                    supplicantServiceDiedHandler();
+                    mIServiceManager = null; // Will need to register a new ServiceNotification
+                }
+            };
+    private final DeathRecipient mSupplicantDeathRecipient =
+            cookie -> {
+                Log.w(TAG, "ISupplicant/ISupplicantP2pIface died: cookie=" + cookie);
+                synchronized (mLock) {
+                    supplicantServiceDiedHandler();
+                }
+            };
+
+    private final WifiP2pMonitor mMonitor;
+    private ISupplicantP2pIfaceCallback mCallback = null;
+
+    public SupplicantP2pIfaceHal(WifiP2pMonitor monitor) {
+        mMonitor = monitor;
+    }
+
+    private boolean linkToServiceManagerDeath() {
+        if (mIServiceManager == null) return false;
+        try {
+            if (!mIServiceManager.linkToDeath(mServiceManagerDeathRecipient, 0)) {
+                Log.wtf(TAG, "Error on linkToDeath on IServiceManager");
+                supplicantServiceDiedHandler();
+                mIServiceManager = null; // Will need to register a new ServiceNotification
+                return false;
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "IServiceManager.linkToDeath exception", e);
+            return false;
+        }
+        return true;
     }
 
     /**
      * Enable verbose logging for all sub modules.
-     *
-     * @param verboseEnabled Verbose flag set in overlay XML.
-     * @param halVerboseEnabled Verbose flag set by the user.
      */
-    public static void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        sVerboseLoggingEnabled = verboseEnabled;
-        sHalVerboseLoggingEnabled = halVerboseEnabled;
-        SupplicantP2pIfaceHalHidlImpl.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-        SupplicantP2pIfaceHalAidlImpl.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
+    public static void enableVerboseLogging(int verbose) {
+        sVerboseLoggingEnabled = verbose > 0;
+        SupplicantP2pIfaceCallback.enableVerboseLogging(verbose);
+        SupplicantP2pIfaceCallbackV1_4.enableVerboseLogging(verbose);
     }
 
     /**
-     * Set the debug log level for wpa_supplicant
-     *
-     * @param turnOnVerbose Whether to turn on verbose logging or not.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setLogLevel(boolean turnOnVerbose) {
-        synchronized (mLock) {
-            String methodStr = "setLogLevel";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mP2pIfaceHal.setLogLevel(turnOnVerbose,
-                    mWifiGlobals.getShowKeyVerboseLoggingModeEnabled());
-        }
-    }
-
-    /**
-     * Initialize the P2P Iface HAL. Creates the internal ISupplicantP2pIfaceHal
-     * object and calls its initialize method.
-     *
-     * @return true if the initialization succeeded
+     * Registers a service notification for the ISupplicant service, which triggers intialization of
+     * the ISupplicantP2pIface
+     * @return true if the service notification was successfully registered
      */
     public boolean initialize() {
+        if (sVerboseLoggingEnabled) Log.i(TAG, "Registering ISupplicant service ready callback.");
         synchronized (mLock) {
-            if (sVerboseLoggingEnabled) {
-                Log.i(TAG, "Initializing SupplicantP2pIfaceHal.");
+            if (mIServiceManager != null) {
+                Log.i(TAG, "Supplicant HAL already initialized.");
+                // Already have an IServiceManager and serviceNotification registered, don't
+                // don't register another.
+                return true;
             }
-            if (mP2pIfaceHal == null) {
-                Log.wtf(TAG, "Internal ISupplicantP2pIfaceHal instance does not exist.");
-                return false;
+            mISupplicant = null;
+            mISupplicantP2pIface = null;
+            try {
+                mIServiceManager = getServiceManagerMockable();
+                if (mIServiceManager == null) {
+                    Log.e(TAG, "Failed to get HIDL Service Manager");
+                    return false;
+                }
+                if (!linkToServiceManagerDeath()) {
+                    return false;
+                }
+                /* TODO(b/33639391) : Use the new ISupplicant.registerForNotifications() once it
+                   exists */
+                if (!mIServiceManager.registerForNotifications(
+                        ISupplicant.kInterfaceName, "", mServiceNotificationCallback)) {
+                    Log.e(TAG, "Failed to register for notifications to "
+                            + ISupplicant.kInterfaceName);
+                    mIServiceManager = null; // Will need to register a new ServiceNotification
+                    return false;
+                }
+
+                // Successful completion by the end of the 'try' block. This will prevent reporting
+                // proper initialization after exception is caught.
+                return true;
+            } catch (RemoteException e) {
+                Log.e(TAG, "Exception while trying to register a listener for ISupplicant service: "
+                        + e);
+                supplicantServiceDiedHandler();
             }
-            if (!mP2pIfaceHal.initialize()) {
-                Log.e(TAG, "Failed to init ISupplicantP2pIfaceHal, stopping startup.");
-                return false;
-            }
-            setLogLevel(sHalVerboseLoggingEnabled);
-            return true;
+            return false;
         }
     }
 
-    /**
-     * Wrapper function to create the ISupplicantP2pIfaceHal object.
-     * Created to be mockable in unit tests.
-     */
-    @VisibleForTesting
-    protected ISupplicantP2pIfaceHal createP2pIfaceHalMockable() {
-        synchronized (mLock) {
-            // Prefer AIDL implementation if service is declared.
-            if (SupplicantP2pIfaceHalAidlImpl.serviceDeclared()) {
-                Log.i(TAG, "Initializing SupplicantP2pIfaceHal using AIDL implementation.");
-                return new SupplicantP2pIfaceHalAidlImpl(mMonitor);
-
-            } else if (SupplicantP2pIfaceHalHidlImpl.serviceDeclared()) {
-                Log.i(TAG, "Initializing SupplicantP2pIfaceHal using HIDL implementation.");
-                return new SupplicantP2pIfaceHalHidlImpl(mMonitor);
+    private boolean linkToSupplicantDeath() {
+        if (mISupplicant == null) return false;
+        try {
+            if (!mISupplicant.linkToDeath(mSupplicantDeathRecipient, 0)) {
+                Log.wtf(TAG, "Error on linkToDeath on ISupplicant");
+                supplicantServiceDiedHandler();
+                return false;
             }
-            Log.e(TAG, "No HIDL or AIDL service available for SupplicantP2pIfaceHal.");
-            return null;
+        } catch (RemoteException e) {
+            Log.e(TAG, "ISupplicant.linkToDeath exception", e);
+            return false;
         }
+        return true;
+    }
+
+    private boolean initSupplicantService() {
+        synchronized (mLock) {
+            try {
+                mISupplicant = getSupplicantMockable();
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicant.getService exception: " + e);
+                return false;
+            }
+            if (mISupplicant == null) {
+                Log.e(TAG, "Got null ISupplicant service. Stopping supplicant HIDL startup");
+                return false;
+            }
+            if (!linkToSupplicantDeath()) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private boolean linkToSupplicantP2pIfaceDeath() {
+        if (mISupplicantP2pIface == null) return false;
+        try {
+            if (!mISupplicantP2pIface.linkToDeath(mSupplicantDeathRecipient, 0)) {
+                Log.wtf(TAG, "Error on linkToDeath on ISupplicantP2pIface");
+                supplicantServiceDiedHandler();
+                return false;
+            }
+        } catch (RemoteException e) {
+            Log.e(TAG, "ISupplicantP2pIface.linkToDeath exception", e);
+            return false;
+        }
+        return true;
     }
 
     /**
-     * Setup the P2P iface.
+     * Setup the P2p iface.
      *
      * @param ifaceName Name of the interface.
      * @return true on success, false otherwise.
      */
     public boolean setupIface(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "setupIface";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (mISupplicantP2pIface != null) return false;
+            ISupplicantIface ifaceHwBinder;
+            if (isV1_1()) {
+                ifaceHwBinder = addIfaceV1_1(ifaceName);
+            } else {
+                ifaceHwBinder = getIfaceV1_0(ifaceName);
             }
-            return mP2pIfaceHal.setupIface(ifaceName);
+            if (ifaceHwBinder == null) {
+                Log.e(TAG, "initSupplicantP2pIface got null iface");
+                return false;
+            }
+            mISupplicantP2pIface = getP2pIfaceMockable(ifaceHwBinder);
+            if (!linkToSupplicantP2pIfaceDeath()) {
+                return false;
+            }
+            if (mISupplicantP2pIface != null && mMonitor != null) {
+                if (null != getP2pIfaceMockableV1_4()) {
+                    android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIfaceCallback callback =
+                            new SupplicantP2pIfaceCallbackV1_4(ifaceName);
+                    if (!registerCallbackV1_4(callback)) {
+                        Log.e(TAG, "Callback registration failed. Initialization incomplete.");
+                        return false;
+                    }
+                    mCallback = callback;
+                } else {
+                    mCallback = new SupplicantP2pIfaceCallback(ifaceName);
+                    if (!registerCallback(mCallback)) {
+                        Log.e(TAG, "Callback registration failed. Initialization incomplete.");
+                        return false;
+                    }
+                }
+            }
+            return true;
+        }
+    }
+
+    protected class SupplicantP2pIfaceCallback extends SupplicantP2pIfaceCallbackImpl {
+        SupplicantP2pIfaceCallback(@NonNull String ifaceName) {
+            super(SupplicantP2pIfaceHal.this, ifaceName, mMonitor);
+        }
+    }
+
+    protected class SupplicantP2pIfaceCallbackV1_4 extends SupplicantP2pIfaceCallbackV1_4Impl {
+        SupplicantP2pIfaceCallbackV1_4(@NonNull String ifaceName) {
+            super(SupplicantP2pIfaceHal.this, ifaceName, mMonitor);
+        }
+    }
+
+    private ISupplicantIface getIfaceV1_0(@NonNull String ifaceName) {
+        if (null == mISupplicant) {
+            Log.e(TAG, "Can't call getIface: ISupplicant is null");
+            return null;
+        }
+        /** List all supplicant Ifaces */
+        final ArrayList<ISupplicant.IfaceInfo> supplicantIfaces = new ArrayList();
+        try {
+            mISupplicant.listInterfaces((SupplicantStatus status,
+                                         ArrayList<ISupplicant.IfaceInfo> ifaces) -> {
+                if (status.code != SupplicantStatusCode.SUCCESS) {
+                    Log.e(TAG, "Getting Supplicant Interfaces failed: " + status.code);
+                    return;
+                }
+                supplicantIfaces.addAll(ifaces);
+            });
+        } catch (RemoteException e) {
+            Log.e(TAG, "ISupplicant.listInterfaces exception: " + e);
+            return null;
+        }
+        if (supplicantIfaces.size() == 0) {
+            Log.e(TAG, "Got zero HIDL supplicant ifaces. Stopping supplicant HIDL startup.");
+            supplicantServiceDiedHandler();
+            return null;
+        }
+        SupplicantResult<ISupplicantIface> supplicantIface =
+                new SupplicantResult("getInterface()");
+        for (ISupplicant.IfaceInfo ifaceInfo : supplicantIfaces) {
+            if (ifaceInfo.type == IfaceType.P2P && ifaceName.equals(ifaceInfo.name)) {
+                try {
+                    mISupplicant.getInterface(ifaceInfo,
+                            (SupplicantStatus status, ISupplicantIface iface) -> {
+                                if (status.code != SupplicantStatusCode.SUCCESS) {
+                                    Log.e(TAG, "Failed to get ISupplicantIface " + status.code);
+                                    return;
+                                }
+                                supplicantIface.setResult(status, iface);
+                            });
+                } catch (RemoteException | IllegalArgumentException e) {
+                    Log.e(TAG, "ISupplicant.getInterface exception: " + e);
+                    supplicantServiceDiedHandler();
+                    return null;
+                }
+                break;
+            }
+        }
+        return supplicantIface.getResult();
+    }
+
+    private ISupplicantIface addIfaceV1_1(@NonNull String ifaceName) {
+        synchronized (mLock) {
+            ISupplicant.IfaceInfo ifaceInfo = new ISupplicant.IfaceInfo();
+            ifaceInfo.name = ifaceName;
+            ifaceInfo.type = IfaceType.P2P;
+            SupplicantResult<ISupplicantIface> supplicantIface =
+                    new SupplicantResult("addInterface(" + ifaceInfo + ")");
+            try {
+                android.hardware.wifi.supplicant.V1_1.ISupplicant supplicant_v1_1 =
+                        getSupplicantMockableV1_1();
+                if (supplicant_v1_1 == null) {
+                    Log.e(TAG, "Can't call addIface: ISupplicantP2pIface is null");
+                    return null;
+                }
+                supplicant_v1_1.addInterface(ifaceInfo,
+                        (SupplicantStatus status, ISupplicantIface iface) -> {
+                            if (status.code != SupplicantStatusCode.SUCCESS
+                                    && status.code != SupplicantStatusCode.FAILURE_IFACE_EXISTS) {
+                                Log.e(TAG, "Failed to get ISupplicantIface " + status.code);
+                                return;
+                            }
+                            supplicantIface.setResult(status, iface);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicant.addInterface exception: " + e);
+                supplicantServiceDiedHandler();
+                return null;
+            }
+            return supplicantIface.getResult();
         }
     }
 
@@ -151,24 +387,62 @@
      */
     public boolean teardownIface(@NonNull String ifaceName) {
         synchronized (mLock) {
-            String methodStr = "teardownIface";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (mISupplicantP2pIface == null) return false;
+            // Only supported for V1.1
+            if (isV1_1()) {
+                return removeIfaceV1_1(ifaceName);
             }
-            return mP2pIfaceHal.teardownIface(ifaceName);
+            return true;
         }
     }
 
     /**
-     * Signals whether initialization started successfully.
+     * Remove the P2p iface.
+     *
+     * @return true on success, false otherwise.
+     */
+    private boolean removeIfaceV1_1(@NonNull String ifaceName) {
+        synchronized (mLock) {
+            try {
+                android.hardware.wifi.supplicant.V1_1.ISupplicant supplicant_v1_1 =
+                        getSupplicantMockableV1_1();
+                if (supplicant_v1_1 == null) {
+                    Log.e(TAG, "Can't call removeIface: ISupplicantP2pIface is null");
+                    return false;
+                }
+                ISupplicant.IfaceInfo ifaceInfo = new ISupplicant.IfaceInfo();
+                ifaceInfo.name = ifaceName;
+                ifaceInfo.type = IfaceType.P2P;
+                SupplicantStatus status = supplicant_v1_1.removeInterface(ifaceInfo);
+                if (status.code != SupplicantStatusCode.SUCCESS) {
+                    Log.e(TAG, "Failed to remove iface " + status.code);
+                    return false;
+                }
+                mCallback = null;
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicant.removeInterface exception: " + e);
+                supplicantServiceDiedHandler();
+                return false;
+            }
+            mISupplicantP2pIface = null;
+            return true;
+        }
+    }
+
+    private void supplicantServiceDiedHandler() {
+        synchronized (mLock) {
+            mISupplicant = null;
+            mISupplicantP2pIface = null;
+        }
+    }
+
+
+    /**
+     * Signals whether Initialization completed successfully.
      */
     public boolean isInitializationStarted() {
         synchronized (mLock) {
-            String methodStr = "isInitializationStarted";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mP2pIfaceHal.isInitializationStarted();
+            return mIServiceManager != null;
         }
     }
 
@@ -177,63 +451,266 @@
      * needed to guard calls etc.
      */
     public boolean isInitializationComplete() {
+        return mISupplicant != null;
+    }
+
+    /**
+     * Wrapper functions to access static HAL methods, created to be mockable in unit tests
+     */
+    protected IServiceManager getServiceManagerMockable() throws RemoteException {
+        return IServiceManager.getService();
+    }
+
+    protected ISupplicant getSupplicantMockable() throws RemoteException {
+        try {
+            return ISupplicant.getService();
+        } catch (NoSuchElementException e) {
+            Log.e(TAG, "Failed to get ISupplicant", e);
+            return null;
+        }
+    }
+
+    protected android.hardware.wifi.supplicant.V1_1.ISupplicant getSupplicantMockableV1_1()
+            throws RemoteException {
         synchronized (mLock) {
-            String methodStr = "isInitializationComplete";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            try {
+                return android.hardware.wifi.supplicant.V1_1.ISupplicant.castFrom(
+                        mISupplicant);
+            } catch (NoSuchElementException e) {
+                Log.e(TAG, "Failed to get ISupplicant", e);
+                return null;
             }
-            return mP2pIfaceHal.isInitializationComplete();
+        }
+    }
+
+    protected ISupplicantP2pIface getP2pIfaceMockable(ISupplicantIface iface) {
+        return ISupplicantP2pIface.asInterface(iface.asBinder());
+    }
+
+    protected android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface
+            getP2pIfaceMockableV1_2() {
+        if (mISupplicantP2pIface == null) return null;
+        return android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface.castFrom(
+                mISupplicantP2pIface);
+    }
+
+    protected android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface
+            getP2pIfaceMockableV1_4() {
+        if (mISupplicantP2pIface == null) return null;
+        return android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface.castFrom(
+                mISupplicantP2pIface);
+    }
+
+    protected ISupplicantP2pNetwork getP2pNetworkMockable(ISupplicantNetwork network) {
+        return ISupplicantP2pNetwork.asInterface(network.asBinder());
+    }
+
+    /**
+     * Check if the device is running V1_1 supplicant service.
+     * @return
+     */
+    private boolean isV1_1() {
+        synchronized (mLock) {
+            try {
+                return (getSupplicantMockableV1_1() != null);
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicant.getService exception: " + e);
+                supplicantServiceDiedHandler();
+                return false;
+            }
+        }
+    }
+
+    protected static void logd(String s) {
+        if (sVerboseLoggingEnabled) Log.d(TAG, s);
+    }
+
+    protected static void logw(String s) {
+        Log.w(TAG, s);
+    }
+
+    protected static <S> void logCompletion(String operation, int code, String debugMessage) {
+        if (code == SupplicantStatusCode.SUCCESS) {
+            logd(operation + " completed successfully.");
+        } else {
+            Log.w(TAG, operation + " failed: " + code + " (" + debugMessage + ")");
+        }
+    }
+
+
+    /**
+     * Returns false if SupplicantP2pIface is null, and logs failure to call methodStr
+     */
+    private boolean checkSupplicantP2pIfaceAndLogFailure(String method) {
+        if (mISupplicantP2pIface == null) {
+            Log.e(TAG, "Can't call " + method + ": ISupplicantP2pIface is null");
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Returns SupplicantP2pIface on success, logs failure to call methodStr
+     * and returns false otherwise
+     */
+    private android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface
+            getSupplicantP2pIfaceAndLogFailureV1_2(String method) {
+        synchronized (mLock) {
+            android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface p2pIfaceV12 =
+                    getP2pIfaceMockableV1_2();
+            if (p2pIfaceV12 == null) {
+                Log.e(TAG, "Can't call " + method + ": ISupplicantP2pIface is null");
+                return null;
+            }
+            return p2pIfaceV12;
         }
     }
 
     /**
+     * Returns SupplicantP2pIface on success, logs failure to call methodStr
+     * and returns false otherwise
+     */
+    private android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface
+            getSupplicantP2pIfaceAndLogFailureV1_4(String method) {
+        synchronized (mLock) {
+            android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface p2pIfaceV12 =
+                    getP2pIfaceMockableV1_4();
+            if (p2pIfaceV12 == null) {
+                Log.e(TAG, "Can't call " + method + ": ISupplicantP2pIface is null");
+                return null;
+            }
+            return p2pIfaceV12;
+        }
+    }
+
+    private int wpsInfoToConfigMethod(int info) {
+        switch (info) {
+            case WpsInfo.PBC:
+                return ISupplicantP2pIface.WpsProvisionMethod.PBC;
+
+            case WpsInfo.DISPLAY:
+                return ISupplicantP2pIface.WpsProvisionMethod.DISPLAY;
+
+            case WpsInfo.KEYPAD:
+            case WpsInfo.LABEL:
+                return ISupplicantP2pIface.WpsProvisionMethod.KEYPAD;
+
+            default:
+                Log.e(TAG, "Unsupported WPS provision method: " + info);
+                return RESULT_NOT_VALID;
+        }
+    }
+
+    /**
+     * Retrieves the name of the network interface.
+     *
+     * @return name Name of the network interface, e.g., wlan0
+     */
+    public String getName() {
+        synchronized (mLock) {
+            if (!checkSupplicantP2pIfaceAndLogFailure("getName")) return null;
+            SupplicantResult<String> result = new SupplicantResult("getName()");
+
+            try {
+                mISupplicantP2pIface.getName(
+                        (SupplicantStatus status, String name) -> {
+                            result.setResult(status, name);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.getResult();
+        }
+    }
+
+
+    /**
+     * Register for callbacks from this interface.
+     *
+     * These callbacks are invoked for events that are specific to this interface.
+     * Registration of multiple callback objects is supported. These objects must
+     * be automatically deleted when the corresponding client process is dead or
+     * if this interface is removed.
+     *
+     * @param receiver An instance of the |ISupplicantP2pIfaceCallback| HIDL
+     *        interface object.
+     * @return boolean value indicating whether operation was successful.
+     */
+    public boolean registerCallback(ISupplicantP2pIfaceCallback receiver) {
+        synchronized (mLock) {
+            if (!checkSupplicantP2pIfaceAndLogFailure("registerCallback")) return false;
+            SupplicantResult<Void> result = new SupplicantResult("registerCallback()");
+            try {
+                result.setResult(mISupplicantP2pIface.registerCallback(receiver));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.isSuccess();
+        }
+    }
+
+
+    /**
+     * Register for callbacks from this interface.
+     *
+     * These callbacks are invoked for events that are specific to this interface.
+     * Registration of multiple callback objects is supported. These objects must
+     * be automatically deleted when the corresponding client process is dead or
+     * if this interface is removed.
+     *
+     * @param receiver An instance of the |ISupplicantP2pIfaceCallback| HIDL
+     *        interface object.
+     * @return boolean value indicating whether operation was successful.
+     */
+    public boolean registerCallbackV1_4(
+            android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIfaceCallback receiver) {
+        synchronized (mLock) {
+            if (!checkSupplicantP2pIfaceAndLogFailure("registerCallbackV1_4")) return false;
+            android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface ifaceV14 =
+                    getP2pIfaceMockableV1_4();
+            if (null == ifaceV14) return false;
+            SupplicantResultV1_4<Void> result =
+                    new SupplicantResultV1_4("registerCallbackV1_4()");
+            try {
+                result.setResult(ifaceV14.registerCallback_1_4(receiver));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.isSuccess();
+        }
+    }
+
+
+    /**
      * Initiate a P2P service discovery with a (optional) timeout.
      *
-     * @param timeout Max time to be spent is performing discovery.
-     *        Set to 0 to indefinitely continue discovery until an explicit
+     * @param timeout Max time to be spent is peforming discovery.
+     *        Set to 0 to indefinely continue discovery untill and explicit
      *        |stopFind| is sent.
      * @return boolean value indicating whether operation was successful.
      */
     public boolean find(int timeout) {
         synchronized (mLock) {
-            String methodStr = "find";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("find")) return false;
+
+            if (timeout < 0) {
+                Log.e(TAG, "Invalid timeout value: " + timeout);
+                return false;
             }
-            return mP2pIfaceHal.find(timeout);
+            SupplicantResult<Void> result = new SupplicantResult("find(" + timeout + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.find(timeout));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.isSuccess();
         }
     }
 
-    /**
-     * Initiate a P2P device discovery with a scan type, a (optional) frequency, and a (optional)
-     * timeout.
-     *
-     * @param type indicates what channels to scan.
-     *        Valid values are {@link WifiP2pManager#WIFI_P2P_SCAN_FULL} for doing full P2P scan,
-     *        {@link WifiP2pManager#WIFI_P2P_SCAN_SOCIAL} for scanning social channels,
-     *        {@link WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ} for scanning a specified frequency.
-     * @param freq is the frequency to be scanned.
-     *        The possible values are:
-     *        <ul>
-     *        <li> A valid frequency for {@link WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ}</li>
-     *        <li> {@link WifiP2pManager#WIFI_P2P_SCAN_FREQ_UNSPECIFIED} for
-     *          {@link WifiP2pManager#WIFI_P2P_SCAN_FULL} and
-     *          {@link WifiP2pManager#WIFI_P2P_SCAN_SOCIAL}</li>
-     *        </ul>
-     * @param timeout Max time to be spent is performing discovery.
-     *        Set to 0 to indefinitely continue discovery until an explicit
-     *        |stopFind| is sent.
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean find(@WifiP2pManager.WifiP2pScanType int type, int freq, int timeout) {
-        synchronized (mLock) {
-            String methodStr = "find";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mP2pIfaceHal.find(type, freq, timeout);
-        }
-    }
 
     /**
      * Stop an ongoing P2P service discovery.
@@ -242,14 +719,19 @@
      */
     public boolean stopFind() {
         synchronized (mLock) {
-            String methodStr = "stopFind";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("stopFind")) return false;
+            SupplicantResult<Void> result = new SupplicantResult("stopFind()");
+            try {
+                result.setResult(mISupplicantP2pIface.stopFind());
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.stopFind();
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Flush P2P peer table and state.
      *
@@ -257,14 +739,19 @@
      */
     public boolean flush() {
         synchronized (mLock) {
-            String methodStr = "flush";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("flush")) return false;
+            SupplicantResult<Void> result = new SupplicantResult("flush()");
+            try {
+                result.setResult(mISupplicantP2pIface.flush());
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.flush();
+            return result.isSuccess();
         }
     }
 
+
     /**
      * This command can be used to flush all services from the
      * device.
@@ -273,14 +760,19 @@
      */
     public boolean serviceFlush() {
         synchronized (mLock) {
-            String methodStr = "serviceFlush";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("serviceFlush")) return false;
+            SupplicantResult<Void> result = new SupplicantResult("serviceFlush()");
+            try {
+                result.setResult(mISupplicantP2pIface.flushServices());
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.serviceFlush();
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Turn on/off power save mode for the interface.
      *
@@ -291,14 +783,20 @@
      */
     public boolean setPowerSave(String groupIfName, boolean enable) {
         synchronized (mLock) {
-            String methodStr = "setPowerSave";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setPowerSave")) return false;
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "setPowerSave(" + groupIfName + ", " + enable + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.setPowerSave(groupIfName, enable));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.setPowerSave(groupIfName, enable);
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Set the Maximum idle time in seconds for P2P groups.
      * This value controls how long a P2P group is maintained after there
@@ -313,14 +811,26 @@
      */
     public boolean setGroupIdle(String groupIfName, int timeoutInSec) {
         synchronized (mLock) {
-            String methodStr = "setGroupIdle";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setGroupIdle")) return false;
+            // Basic checking here. Leave actual parameter validation to supplicant.
+            if (timeoutInSec < 0) {
+                Log.e(TAG, "Invalid group timeout value " + timeoutInSec);
+                return false;
             }
-            return mP2pIfaceHal.setGroupIdle(groupIfName, timeoutInSec);
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "setGroupIdle(" + groupIfName + ", " + timeoutInSec + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.setGroupIdle(groupIfName, timeoutInSec));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Set the postfix to be used for P2P SSID's.
      *
@@ -330,14 +840,30 @@
      */
     public boolean setSsidPostfix(String postfix) {
         synchronized (mLock) {
-            String methodStr = "setSsidPostfix";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setSsidPostfix")) return false;
+            // Basic checking here. Leave actual parameter validation to supplicant.
+            if (postfix == null) {
+                Log.e(TAG, "Invalid SSID postfix value (null).");
+                return false;
             }
-            return mP2pIfaceHal.setSsidPostfix(postfix);
+
+            SupplicantResult<Void> result = new SupplicantResult("setSsidPostfix(" + postfix + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.setSsidPostfix(
+                        NativeUtil.decodeSsid("\"" + postfix + "\"")));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Could not decode SSID.", e);
+                return false;
+            }
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Start P2P group formation with a discovered P2P peer. This includes
      * optional group owner negotiation, group interface setup, provisioning,
@@ -353,13 +879,61 @@
      *        uses PIN.
      */
     public String connect(WifiP2pConfig config, boolean joinExistingGroup) {
+        if (config == null) return null;
         synchronized (mLock) {
-            String methodStr = "connect";
-            if (mP2pIfaceHal == null) {
-                handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setSsidPostfix")) return null;
+
+            if (config == null) {
+                Log.e(TAG, "Could not connect: null config.");
                 return null;
             }
-            return mP2pIfaceHal.connect(config, joinExistingGroup);
+
+            if (config.deviceAddress == null) {
+                Log.e(TAG, "Could not parse null mac address.");
+                return null;
+            }
+
+            if (config.wps.setup == WpsInfo.PBC && !TextUtils.isEmpty(config.wps.pin)) {
+                Log.e(TAG, "Expected empty pin for PBC.");
+                return null;
+            }
+
+            byte[] peerAddress = null;
+            try {
+                peerAddress = NativeUtil.macAddressToByteArray(config.deviceAddress);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse peer mac address.", e);
+                return null;
+            }
+
+            int provisionMethod = wpsInfoToConfigMethod(config.wps.setup);
+            if (provisionMethod == RESULT_NOT_VALID) {
+                Log.e(TAG, "Invalid WPS config method: " + config.wps.setup);
+                return null;
+            }
+            // NOTE: preSelectedPin cannot be null, otherwise hal would crash.
+            String preSelectedPin = TextUtils.isEmpty(config.wps.pin) ? "" : config.wps.pin;
+            boolean persistent = (config.netId == WifiP2pGroup.NETWORK_ID_PERSISTENT);
+
+            if (config.groupOwnerIntent < 0 || config.groupOwnerIntent > 15) {
+                Log.e(TAG, "Invalid group owner intent: " + config.groupOwnerIntent);
+                return null;
+            }
+
+            SupplicantResult<String> result = new SupplicantResult(
+                    "connect(" + config.deviceAddress + ")");
+            try {
+                mISupplicantP2pIface.connect(
+                        peerAddress, provisionMethod, preSelectedPin, joinExistingGroup,
+                        persistent, config.groupOwnerIntent,
+                        (SupplicantStatus status, String generatedPin) -> {
+                            result.setResult(status, generatedPin);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.getResult();
         }
     }
 
@@ -376,14 +950,19 @@
      */
     public boolean cancelConnect() {
         synchronized (mLock) {
-            String methodStr = "cancelConnect";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("cancelConnect")) return false;
+            SupplicantResult<Void> result = new SupplicantResult("cancelConnect()");
+            try {
+                result.setResult(mISupplicantP2pIface.cancelConnect());
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.cancelConnect();
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Send P2P provision discovery request to the specified peer. The
      * parameters for this command are the P2P device address of the peer and the
@@ -394,15 +973,49 @@
      * @return boolean value indicating whether operation was successful.
      */
     public boolean provisionDiscovery(WifiP2pConfig config) {
+        if (config == null) return false;
         synchronized (mLock) {
-            String methodStr = "provisionDiscovery";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("provisionDiscovery")) return false;
+
+            int targetMethod = wpsInfoToConfigMethod(config.wps.setup);
+            if (targetMethod == RESULT_NOT_VALID) {
+                Log.e(TAG, "Unrecognized WPS configuration method: " + config.wps.setup);
+                return false;
             }
-            return mP2pIfaceHal.provisionDiscovery(config);
+            if (targetMethod == ISupplicantP2pIface.WpsProvisionMethod.DISPLAY) {
+                // We are doing display, so provision discovery is keypad.
+                targetMethod = ISupplicantP2pIface.WpsProvisionMethod.KEYPAD;
+            } else if (targetMethod == ISupplicantP2pIface.WpsProvisionMethod.KEYPAD) {
+                // We are doing keypad, so provision discovery is display.
+                targetMethod = ISupplicantP2pIface.WpsProvisionMethod.DISPLAY;
+            }
+
+            if (config.deviceAddress == null) {
+                Log.e(TAG, "Cannot parse null mac address.");
+                return false;
+            }
+            byte[] macAddress = null;
+            try {
+                macAddress = NativeUtil.macAddressToByteArray(config.deviceAddress);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse peer mac address.", e);
+                return false;
+            }
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "provisionDiscovery(" + config.deviceAddress + ", " + config.wps.setup + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.provisionDiscovery(macAddress, targetMethod));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Invite a device to a persistent group.
      * If the peer device is the group owner of the persistent group, the peer
@@ -417,15 +1030,60 @@
      * @return boolean value indicating whether operation was successful.
      */
     public boolean invite(WifiP2pGroup group, String peerAddress) {
+        if (TextUtils.isEmpty(peerAddress)) return false;
         synchronized (mLock) {
-            String methodStr = "invite";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("invite")) return false;
+            if (group == null) {
+                Log.e(TAG, "Cannot invite to null group.");
+                return false;
             }
-            return mP2pIfaceHal.invite(group, peerAddress);
+
+            if (group.getOwner() == null) {
+                Log.e(TAG, "Cannot invite to group with null owner.");
+                return false;
+            }
+
+            if (group.getOwner().deviceAddress == null) {
+                Log.e(TAG, "Group owner has no mac address.");
+                return false;
+            }
+
+            byte[] ownerMacAddress = null;
+            try {
+                ownerMacAddress = NativeUtil.macAddressToByteArray(group.getOwner().deviceAddress);
+            } catch (Exception e) {
+                Log.e(TAG, "Group owner mac address parse error.", e);
+                return false;
+            }
+
+            if (peerAddress == null) {
+                Log.e(TAG, "Cannot parse peer mac address.");
+                return false;
+            }
+
+            byte[] peerMacAddress;
+            try {
+                peerMacAddress = NativeUtil.macAddressToByteArray(peerAddress);
+            } catch (Exception e) {
+                Log.e(TAG, "Peer mac address parse error.", e);
+                return false;
+            }
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "invite(" + group.getInterface() + ", " + group.getOwner().deviceAddress
+                            + ", " + peerAddress + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.invite(
+                        group.getInterface(), ownerMacAddress, peerMacAddress));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Reject connection attempt from a peer (specified with a device
      * address). This is a mechanism to reject a pending group owner negotiation
@@ -438,14 +1096,34 @@
      */
     public boolean reject(String peerAddress) {
         synchronized (mLock) {
-            String methodStr = "reject";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("reject")) return false;
+
+            if (peerAddress == null) {
+                Log.e(TAG, "Cannot parse rejected peer's mac address.");
+                return false;
             }
-            return mP2pIfaceHal.reject(peerAddress);
+            byte[] macAddress = null;
+            try {
+                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse peer mac address.", e);
+                return false;
+            }
+
+            SupplicantResult<Void> result =
+                    new SupplicantResult("reject(" + peerAddress + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.reject(macAddress));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Gets the MAC address of the device.
      *
@@ -453,15 +1131,29 @@
      */
     public String getDeviceAddress() {
         synchronized (mLock) {
-            String methodStr = "getDeviceAddress";
-            if (mP2pIfaceHal == null) {
-                handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("getDeviceAddress")) return null;
+            SupplicantResult<String> result = new SupplicantResult("getDeviceAddress()");
+            try {
+                mISupplicantP2pIface.getDeviceAddress((SupplicantStatus status, byte[] address) -> {
+                    String parsedAddress = null;
+                    try {
+                        parsedAddress = NativeUtil.macAddressFromByteArray(address);
+                    } catch (Exception e) {
+                        Log.e(TAG, "Could not process reported address.", e);
+                    }
+                    result.setResult(status, parsedAddress);
+                });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
                 return null;
             }
-            return mP2pIfaceHal.getDeviceAddress();
+
+            return result.getResult();
         }
     }
 
+
     /**
      * Gets the operational SSID of the device.
      *
@@ -471,15 +1163,47 @@
      */
     public String getSsid(String address) {
         synchronized (mLock) {
-            String methodStr = "getSsid";
-            if (mP2pIfaceHal == null) {
-                handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("getSsid")) return null;
+
+            if (address == null) {
+                Log.e(TAG, "Cannot parse peer mac address.");
                 return null;
             }
-            return mP2pIfaceHal.getSsid(address);
+            byte[] macAddress = null;
+            try {
+                macAddress = NativeUtil.macAddressToByteArray(address);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse mac address.", e);
+                return null;
+            }
+
+            SupplicantResult<String> result =
+                    new SupplicantResult("getSsid(" + address + ")");
+            try {
+                mISupplicantP2pIface.getSsid(
+                        macAddress, (SupplicantStatus status, ArrayList<Byte> ssid) -> {
+                            String ssidString = null;
+                            if (ssid != null) {
+                                try {
+                                    ssidString = NativeUtil.removeEnclosingQuotes(
+                                            NativeUtil.encodeSsid(ssid));
+                                } catch (Exception e) {
+                                    Log.e(TAG, "Could not encode SSID.", e);
+                                }
+                            }
+                            result.setResult(status, ssidString);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+                return null;
+            }
+
+            return result.getResult();
         }
     }
 
+
     /**
      * Reinvoke a device from a persistent group.
      *
@@ -489,15 +1213,35 @@
      * @return true, if operation was successful.
      */
     public boolean reinvoke(int networkId, String peerAddress) {
+        if (TextUtils.isEmpty(peerAddress) || networkId < 0) return false;
         synchronized (mLock) {
-            String methodStr = "reinvoke";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("reinvoke")) return false;
+            if (peerAddress == null) {
+                Log.e(TAG, "Cannot parse peer mac address.");
+                return false;
             }
-            return mP2pIfaceHal.reinvoke(networkId, peerAddress);
+            byte[] macAddress = null;
+            try {
+                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse mac address.", e);
+                return false;
+            }
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "reinvoke(" + networkId + ", " + peerAddress + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.reinvoke(networkId, macAddress));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Set up a P2P group owner manually (i.e., without group owner
      * negotiation with a specific peer). This is also known as autonomous
@@ -510,26 +1254,16 @@
      */
     public boolean groupAdd(int networkId, boolean isPersistent) {
         synchronized (mLock) {
-            String methodStr = "groupAdd";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("groupAdd")) return false;
+            SupplicantResult<Void> result =
+                    new SupplicantResult("groupAdd(" + networkId + ", " + isPersistent + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.addGroup(isPersistent, networkId));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.groupAdd(networkId, isPersistent);
-        }
-    }
-
-    /**
-     * Set up a P2P group owner manually.
-     * This is a helper method that invokes groupAdd(networkId, isPersistent) internally.
-     *
-     * @param isPersistent Used to request a persistent group to be formed.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean groupAdd(boolean isPersistent) {
-        synchronized (mLock) {
-            // Supplicant expects networkId to be -1 if not supplied.
-            return groupAdd(-1, isPersistent);
+            return result.isSuccess();
         }
     }
 
@@ -550,16 +1284,50 @@
     public boolean groupAdd(String networkName, String passphrase,
             boolean isPersistent, int freq, String peerAddress, boolean join) {
         synchronized (mLock) {
-            String methodStr = "groupAdd";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface ifaceV12 =
+                    getSupplicantP2pIfaceAndLogFailureV1_2("groupAdd_1_2");
+            if (ifaceV12 == null) return false;
+
+            java.util.ArrayList<Byte> ssid = NativeUtil.decodeSsid("\"" + networkName + "\"");
+            byte[] macAddress = null;
+            try {
+                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse mac address.", e);
+                return false;
             }
-            return mP2pIfaceHal.groupAdd(networkName, passphrase,
-                    isPersistent, freq, peerAddress, join);
+
+            SupplicantResult<Void> result =
+                    new SupplicantResult("groupAdd(" + networkName + ", "
+                        + (TextUtils.isEmpty(passphrase) ? "<Empty>" : "<Non-Empty>")
+                        + ", " + isPersistent + ", " + freq
+                        + ", " + peerAddress + ", " + join + ")");
+            try {
+                result.setResult(ifaceV12.addGroup_1_2(
+                        ssid, passphrase, isPersistent, freq, macAddress, join));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.isSuccess();
         }
     }
 
     /**
+     * Set up a P2P group owner manually.
+     * This is a helper method that invokes groupAdd(networkId, isPersistent) internally.
+     *
+     * @param isPersistent Used to request a persistent group to be formed.
+     *
+     * @return true, if operation was successful.
+     */
+    public boolean groupAdd(boolean isPersistent) {
+        // Supplicant expects networkId to be -1 if not supplied.
+        return groupAdd(-1, isPersistent);
+    }
+
+
+    /**
      * Terminate a P2P group. If a new virtual network interface was used for
      * the group, it must also be removed. The network interface name of the
      * group interface is used as a parameter for this command.
@@ -569,15 +1337,21 @@
      * @return true, if operation was successful.
      */
     public boolean groupRemove(String groupName) {
+        if (TextUtils.isEmpty(groupName)) return false;
         synchronized (mLock) {
-            String methodStr = "groupRemove";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("groupRemove")) return false;
+            SupplicantResult<Void> result = new SupplicantResult("groupRemove(" + groupName + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.removeGroup(groupName));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.groupRemove(groupName);
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Gets the capability of the group which the device is a
      * member of.
@@ -588,15 +1362,43 @@
      */
     public int getGroupCapability(String peerAddress) {
         synchronized (mLock) {
-            String methodStr = "getGroupCapability";
-            if (mP2pIfaceHal == null) {
-                handleNullHal(methodStr);
-                return -1;
+            if (!checkSupplicantP2pIfaceAndLogFailure("getGroupCapability")) {
+                return RESULT_NOT_VALID;
             }
-            return mP2pIfaceHal.getGroupCapability(peerAddress);
+
+            if (peerAddress == null) {
+                Log.e(TAG, "Cannot parse peer mac address.");
+                return RESULT_NOT_VALID;
+            }
+            byte[] macAddress = null;
+            try {
+                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse group address.", e);
+                return RESULT_NOT_VALID;
+            }
+
+            SupplicantResult<Integer> capability = new SupplicantResult(
+                    "getGroupCapability(" + peerAddress + ")");
+            try {
+                mISupplicantP2pIface.getGroupCapability(
+                        macAddress, (SupplicantStatus status, int cap) -> {
+                            capability.setResult(status, cap);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            if (!capability.isSuccess()) {
+                return RESULT_NOT_VALID;
+            }
+
+            return capability.getResult();
         }
     }
 
+
     /**
      * Configure Extended Listen Timing.
      *
@@ -613,15 +1415,41 @@
      * @return true, if operation was successful.
      */
     public boolean configureExtListen(boolean enable, int periodInMillis, int intervalInMillis) {
+        if (enable && intervalInMillis < periodInMillis) {
+            return false;
+        }
         synchronized (mLock) {
-            String methodStr = "configureExtListen";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("configureExtListen")) return false;
+
+            // If listening is disabled, wpa supplicant expects zeroes.
+            if (!enable) {
+                periodInMillis = 0;
+                intervalInMillis = 0;
             }
-            return mP2pIfaceHal.configureExtListen(enable, periodInMillis, intervalInMillis);
+
+            // Verify that the integers are not negative. Leave actual parameter validation to
+            // supplicant.
+            if (periodInMillis < 0 || intervalInMillis < 0) {
+                Log.e(TAG, "Invalid parameters supplied to configureExtListen: " + periodInMillis
+                        + ", " + intervalInMillis);
+                return false;
+            }
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "configureExtListen(" + periodInMillis + ", " + intervalInMillis + ")");
+            try {
+                result.setResult(
+                        mISupplicantP2pIface.configureExtListen(periodInMillis, intervalInMillis));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Set P2P Listen channel.
      *
@@ -631,11 +1459,26 @@
      */
     public boolean setListenChannel(int listenChannel) {
         synchronized (mLock) {
-            String methodStr = "setListenChannel";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setListenChannel")) return false;
+
+            // There is no original channel recorded in supplicant, so just return true.
+            if (0 == listenChannel) return true;
+
+            // Using channels other than 1, 6, and 11 would result in discovery issue.
+            if (listenChannel != 1 && listenChannel != 6 && listenChannel != 11) {
+                return false;
             }
-            return mP2pIfaceHal.setListenChannel(listenChannel);
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "setListenChannel(" + listenChannel + ", " + DEFAULT_OPERATING_CLASS + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.setListenChannel(
+                        listenChannel, DEFAULT_OPERATING_CLASS));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.isSuccess();
         }
     }
 
@@ -650,11 +1493,42 @@
     public boolean setOperatingChannel(int operatingChannel,
             @NonNull List<CoexUnsafeChannel> unsafeChannels) {
         synchronized (mLock) {
-            String methodStr = "setOperatingChannel";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setOperatingChannel")) return false;
+            if (null == unsafeChannels) return false;
+
+            ArrayList<ISupplicantP2pIface.FreqRange> ranges = new ArrayList<>();
+            if (operatingChannel >= 1 && operatingChannel <= 165) {
+                int freq = (operatingChannel <= 14 ? 2407 : 5000) + operatingChannel * 5;
+                ISupplicantP2pIface.FreqRange range1 =  new ISupplicantP2pIface.FreqRange();
+                range1.min = 1000;
+                range1.max = freq - 5;
+                ISupplicantP2pIface.FreqRange range2 =  new ISupplicantP2pIface.FreqRange();
+                range2.min = freq + 5;
+                range2.max = 6000;
+                ranges.add(range1);
+                ranges.add(range2);
             }
-            return mP2pIfaceHal.setOperatingChannel(operatingChannel, unsafeChannels);
+            if (SdkLevel.isAtLeastS()) {
+                for (CoexUnsafeChannel cuc: unsafeChannels) {
+                    int centerFreq = ScanResult.convertChannelToFrequencyMhzIfSupported(
+                            cuc.getChannel(), cuc.getBand());
+                    ISupplicantP2pIface.FreqRange range = new ISupplicantP2pIface.FreqRange();
+                    // The range boundaries are inclusive in native frequency inclusion check.
+                    // Minusing one to avoid affecting neighbors.
+                    range.min = centerFreq - 5 - 1;
+                    range.max = centerFreq + 5 - 1;
+                    ranges.add(range);
+                }
+            }
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "setDisallowedFrequencies(" + ranges + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.setDisallowedFrequencies(ranges));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.isSuccess();
         }
     }
 
@@ -667,14 +1541,73 @@
      */
     public boolean serviceAdd(WifiP2pServiceInfo servInfo) {
         synchronized (mLock) {
-            String methodStr = "serviceAdd";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("serviceAdd")) return false;
+
+            if (servInfo == null) {
+                Log.e(TAG, "Null service info passed.");
+                return false;
             }
-            return mP2pIfaceHal.serviceAdd(servInfo);
+
+            for (String s : servInfo.getSupplicantQueryList()) {
+                if (s == null) {
+                    Log.e(TAG, "Invalid service description (null).");
+                    return false;
+                }
+
+                String[] data = s.split(" ");
+                if (data.length < 3) {
+                    Log.e(TAG, "Service specification invalid: " + s);
+                    return false;
+                }
+
+                SupplicantResult<Void> result = null;
+                try {
+                    if ("upnp".equals(data[0])) {
+                        int version = 0;
+                        try {
+                            version = Integer.parseInt(data[1], 16);
+                        } catch (NumberFormatException e) {
+                            Log.e(TAG, "UPnP Service specification invalid: " + s, e);
+                            return false;
+                        }
+
+                        result = new SupplicantResult(
+                                "addUpnpService(" + data[1] + ", " + data[2] + ")");
+                        result.setResult(mISupplicantP2pIface.addUpnpService(version, data[2]));
+                    } else if ("bonjour".equals(data[0])) {
+                        if (data[1] != null && data[2] != null) {
+                            ArrayList<Byte> request = null;
+                            ArrayList<Byte> response = null;
+                            try {
+                                request = NativeUtil.byteArrayToArrayList(
+                                        NativeUtil.hexStringToByteArray(data[1]));
+                                response = NativeUtil.byteArrayToArrayList(
+                                        NativeUtil.hexStringToByteArray(data[2]));
+                            } catch (Exception e) {
+                                Log.e(TAG, "Invalid bonjour service description.");
+                                return false;
+                            }
+                            result = new SupplicantResult(
+                                    "addBonjourService(" + data[1] + ", " + data[2] + ")");
+                            result.setResult(
+                                    mISupplicantP2pIface.addBonjourService(request, response));
+                        }
+                    } else {
+                        return false;
+                    }
+                } catch (RemoteException e) {
+                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                    supplicantServiceDiedHandler();
+                }
+
+                if (result == null || !result.isSuccess()) return false;
+            }
+
+            return true;
         }
     }
 
+
     /**
      * This command can be used to remove a upnp/bonjour service.
      *
@@ -684,14 +1617,68 @@
      */
     public boolean serviceRemove(WifiP2pServiceInfo servInfo) {
         synchronized (mLock) {
-            String methodStr = "serviceRemove";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("serviceRemove")) return false;
+
+            if (servInfo == null) {
+                Log.e(TAG, "Null service info passed.");
+                return false;
             }
-            return mP2pIfaceHal.serviceRemove(servInfo);
+
+            for (String s : servInfo.getSupplicantQueryList()) {
+                if (s == null) {
+                    Log.e(TAG, "Invalid service description (null).");
+                    return false;
+                }
+
+                String[] data = s.split(" ");
+                if (data.length < 3) {
+                    Log.e(TAG, "Service specification invalid: " + s);
+                    return false;
+                }
+
+                SupplicantResult<Void> result = null;
+                try {
+                    if ("upnp".equals(data[0])) {
+                        int version = 0;
+                        try {
+                            version = Integer.parseInt(data[1], 16);
+                        } catch (NumberFormatException e) {
+                            Log.e(TAG, "UPnP Service specification invalid: " + s, e);
+                            return false;
+                        }
+                        result = new SupplicantResult(
+                                "removeUpnpService(" + data[1] + ", " + data[2] + ")");
+                        result.setResult(mISupplicantP2pIface.removeUpnpService(version, data[2]));
+                    } else if ("bonjour".equals(data[0])) {
+                        if (data[1] != null) {
+                            ArrayList<Byte> request = null;
+                            try {
+                                request = NativeUtil.byteArrayToArrayList(
+                                    NativeUtil.hexStringToByteArray(data[1]));
+                            } catch (Exception e) {
+                                Log.e(TAG, "Invalid bonjour service description.");
+                                return false;
+                            }
+                            result = new SupplicantResult("removeBonjourService(" + data[1] + ")");
+                            result.setResult(mISupplicantP2pIface.removeBonjourService(request));
+                        }
+                    } else {
+                        Log.e(TAG, "Unknown / unsupported P2P service requested: " + data[0]);
+                        return false;
+                    }
+                } catch (RemoteException e) {
+                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                    supplicantServiceDiedHandler();
+                }
+
+                if (result == null || !result.isSuccess()) return false;
+            }
+
+            return true;
         }
     }
 
+
     /**
      * Schedule a P2P service discovery request. The parameters for this command
      * are the device address of the peer device (or 00:00:00:00:00:00 for
@@ -705,15 +1692,52 @@
      */
     public String requestServiceDiscovery(String peerAddress, String query) {
         synchronized (mLock) {
-            String methodStr = "requestServiceDiscovery";
-            if (mP2pIfaceHal == null) {
-                handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("requestServiceDiscovery")) return null;
+
+            if (peerAddress == null) {
+                Log.e(TAG, "Cannot parse peer mac address.");
                 return null;
             }
-            return mP2pIfaceHal.requestServiceDiscovery(peerAddress, query);
+            byte[] macAddress = null;
+            try {
+                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not process peer MAC address.", e);
+                return null;
+            }
+
+            if (query == null) {
+                Log.e(TAG, "Cannot parse service discovery query: " + query);
+                return null;
+            }
+            ArrayList<Byte> binQuery = null;
+            try {
+                binQuery = NativeUtil.byteArrayToArrayList(NativeUtil.hexStringToByteArray(query));
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse service query.", e);
+                return null;
+            }
+
+            SupplicantResult<Long> result = new SupplicantResult(
+                    "requestServiceDiscovery(" + peerAddress + ", " + query + ")");
+            try {
+                mISupplicantP2pIface.requestServiceDiscovery(
+                        macAddress, binQuery,
+                        (SupplicantStatus status, long identifier) -> {
+                            result.setResult(status, new Long(identifier));
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            Long value = result.getResult();
+            if (value == null) return null;
+            return value.toString();
         }
     }
 
+
     /**
      * Cancel a previous service discovery request.
      *
@@ -722,14 +1746,34 @@
      */
     public boolean cancelServiceDiscovery(String identifier) {
         synchronized (mLock) {
-            String methodStr = "cancelServiceDiscovery";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("cancelServiceDiscovery")) return false;
+            if (identifier == null) {
+                Log.e(TAG, "cancelServiceDiscovery requires a valid tag.");
+                return false;
             }
-            return mP2pIfaceHal.cancelServiceDiscovery(identifier);
+
+            long id = 0;
+            try {
+                id = Long.parseLong(identifier);
+            } catch (NumberFormatException e) {
+                Log.e(TAG, "Service discovery identifier invalid: " + identifier, e);
+                return false;
+            }
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "cancelServiceDiscovery(" + identifier + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.cancelServiceDiscovery(id));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Send driver command to set Miracast mode.
      *
@@ -738,14 +1782,33 @@
      */
     public boolean setMiracastMode(int mode) {
         synchronized (mLock) {
-            String methodStr = "setMiracastMode";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setMiracastMode")) return false;
+            byte targetMode = ISupplicantP2pIface.MiracastMode.DISABLED;
+
+            switch (mode) {
+                case WifiP2pManager.MIRACAST_SOURCE:
+                    targetMode = ISupplicantP2pIface.MiracastMode.SOURCE;
+                    break;
+
+                case WifiP2pManager.MIRACAST_SINK:
+                    targetMode = ISupplicantP2pIface.MiracastMode.SINK;
+                    break;
             }
-            return mP2pIfaceHal.setMiracastMode(mode);
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "setMiracastMode(" + mode + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.setMiracastMode(targetMode));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Initiate WPS Push Button setup.
      * The PBC operation requires that a button is also pressed at the
@@ -756,15 +1819,35 @@
      * @return true, if operation was successful.
      */
     public boolean startWpsPbc(String groupIfName, String bssid) {
+        if (TextUtils.isEmpty(groupIfName)) {
+            Log.e(TAG, "Group name required when requesting WPS PBC. Got (" + groupIfName + ")");
+            return false;
+        }
         synchronized (mLock) {
-            String methodStr = "startWpsPbc";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("startWpsPbc")) return false;
+            // Null values should be fine, since bssid can be empty.
+            byte[] macAddress = null;
+            try {
+                macAddress = NativeUtil.macAddressToByteArray(bssid);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse BSSID.", e);
+                return false;
             }
-            return mP2pIfaceHal.startWpsPbc(groupIfName, bssid);
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "startWpsPbc(" + groupIfName + ", " + bssid + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.startWpsPbc(groupIfName, macAddress));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Initiate WPS Pin Keypad setup.
      *
@@ -773,15 +1856,32 @@
      * @return true, if operation was successful.
      */
     public boolean startWpsPinKeypad(String groupIfName, String pin) {
+        if (TextUtils.isEmpty(groupIfName) || TextUtils.isEmpty(pin)) return false;
         synchronized (mLock) {
-            String methodStr = "startWpsPinKeypad";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("startWpsPinKeypad")) return false;
+            if (groupIfName == null) {
+                Log.e(TAG, "Group name required when requesting WPS KEYPAD.");
+                return false;
             }
-            return mP2pIfaceHal.startWpsPinKeypad(groupIfName, pin);
+            if (pin == null) {
+                Log.e(TAG, "PIN required when requesting WPS KEYPAD.");
+                return false;
+            }
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "startWpsPinKeypad(" + groupIfName + ", " + pin + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.startWpsPinKeypad(groupIfName, pin));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Initiate WPS Pin Display setup.
      *
@@ -790,16 +1890,41 @@
      * @return generated pin if operation was successful, null otherwise.
      */
     public String startWpsPinDisplay(String groupIfName, String bssid) {
+        if (TextUtils.isEmpty(groupIfName)) return null;
         synchronized (mLock) {
-            String methodStr = "startWpsPinDisplay";
-            if (mP2pIfaceHal == null) {
-                handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("startWpsPinDisplay")) return null;
+            if (groupIfName == null) {
+                Log.e(TAG, "Group name required when requesting WPS KEYPAD.");
                 return null;
             }
-            return mP2pIfaceHal.startWpsPinDisplay(groupIfName, bssid);
+
+            // Null values should be fine, since bssid can be empty.
+            byte[] macAddress = null;
+            try {
+                macAddress = NativeUtil.macAddressToByteArray(bssid);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse BSSID.", e);
+                return null;
+            }
+
+            SupplicantResult<String> result = new SupplicantResult(
+                    "startWpsPinDisplay(" + groupIfName + ", " + bssid + ")");
+            try {
+                mISupplicantP2pIface.startWpsPinDisplay(
+                        groupIfName, macAddress,
+                        (SupplicantStatus status, String generatedPin) -> {
+                            result.setResult(status, generatedPin);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.getResult();
         }
     }
 
+
     /**
      * Cancel any ongoing WPS operations.
      *
@@ -808,14 +1933,26 @@
      */
     public boolean cancelWps(String groupIfName) {
         synchronized (mLock) {
-            String methodStr = "cancelWps";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("cancelWps")) return false;
+            if (groupIfName == null) {
+                Log.e(TAG, "Group name required when requesting WPS KEYPAD.");
+                return false;
             }
-            return mP2pIfaceHal.cancelWps(groupIfName);
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "cancelWps(" + groupIfName + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.cancelWps(groupIfName));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Enable/Disable Wifi Display.
      *
@@ -824,14 +1961,22 @@
      */
     public boolean enableWfd(boolean enable) {
         synchronized (mLock) {
-            String methodStr = "enableWfd";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("enableWfd")) return false;
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "enableWfd(" + enable + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.enableWfd(enable));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.enableWfd(enable);
+
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Set Wifi Display device info.
      *
@@ -841,11 +1986,30 @@
      */
     public boolean setWfdDeviceInfo(String info) {
         synchronized (mLock) {
-            String methodStr = "setWfdDeviceInfo";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setWfdDeviceInfo")) return false;
+
+            if (info == null) {
+                Log.e(TAG, "Cannot parse null WFD info string.");
+                return false;
             }
-            return mP2pIfaceHal.setWfdDeviceInfo(info);
+            byte[] wfdInfo = null;
+            try {
+                wfdInfo = NativeUtil.hexStringToByteArray(info);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse WFD Device Info string.");
+                return false;
+            }
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "setWfdDeviceInfo(" + info + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.setWfdDeviceInfo(wfdInfo));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+
+            return result.isSuccess();
         }
     }
 
@@ -857,11 +2021,69 @@
      */
     public boolean removeNetwork(int networkId) {
         synchronized (mLock) {
-            String methodStr = "removeNetwork";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("removeNetwork")) return false;
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "removeNetwork(" + networkId + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.removeNetwork(networkId));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.removeNetwork(networkId);
+
+            return result.isSuccess();
+        }
+    }
+
+    /**
+     * List the networks saved in wpa_supplicant.
+     *
+     * @return List of network ids.
+     */
+    private List<Integer> listNetworks() {
+        synchronized (mLock) {
+            if (!checkSupplicantP2pIfaceAndLogFailure("listNetworks")) return null;
+            SupplicantResult<ArrayList> result = new SupplicantResult("listNetworks()");
+            try {
+                mISupplicantP2pIface.listNetworks(
+                        (SupplicantStatus status, ArrayList<Integer> networkIds) -> {
+                            result.setResult(status, networkIds);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.getResult();
+        }
+    }
+
+    /**
+     * Get the supplicant P2p network object for the specified network ID.
+     *
+     * @param networkId Id of the network to lookup.
+     * @return ISupplicantP2pNetwork instance on success, null on failure.
+     */
+    private ISupplicantP2pNetwork getNetwork(int networkId) {
+        synchronized (mLock) {
+            if (!checkSupplicantP2pIfaceAndLogFailure("getNetwork")) return null;
+            SupplicantResult<ISupplicantNetwork> result =
+                    new SupplicantResult("getNetwork(" + networkId + ")");
+            try {
+                mISupplicantP2pIface.getNetwork(
+                        networkId,
+                        (SupplicantStatus status, ISupplicantNetwork network) -> {
+                            result.setResult(status, network);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            if (result.getResult() == null) {
+                Log.e(TAG, "getNetwork got null network");
+                return null;
+            }
+            return getP2pNetworkMockable(result.getResult());
         }
     }
 
@@ -873,12 +2095,92 @@
      */
     public boolean loadGroups(WifiP2pGroupList groups) {
         synchronized (mLock) {
-            String methodStr = "loadGroups";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("loadGroups")) return false;
+            List<Integer> networkIds = listNetworks();
+            if (networkIds == null || networkIds.isEmpty()) {
+                return false;
             }
-            return mP2pIfaceHal.loadGroups(groups);
+            for (Integer networkId : networkIds) {
+                ISupplicantP2pNetwork network = getNetwork(networkId);
+                if (network == null) {
+                    Log.e(TAG, "Failed to retrieve network object for " + networkId);
+                    continue;
+                }
+                SupplicantResult<Boolean> resultIsCurrent =
+                        new SupplicantResult("isCurrent(" + networkId + ")");
+                try {
+                    network.isCurrent(
+                            (SupplicantStatus status, boolean isCurrent) -> {
+                                resultIsCurrent.setResult(status, isCurrent);
+                            });
+                } catch (RemoteException e) {
+                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                    supplicantServiceDiedHandler();
+                }
+                /** Skip the current network, if we're somehow getting networks from the p2p GO
+                    interface, instead of p2p mgmt interface*/
+                if (!resultIsCurrent.isSuccess() || resultIsCurrent.getResult()) {
+                    Log.i(TAG, "Skipping current network");
+                    continue;
+                }
+
+                WifiP2pGroup group = new WifiP2pGroup();
+                group.setNetworkId(networkId);
+
+                // Now get the ssid, bssid and other flags for this network.
+                SupplicantResult<ArrayList> resultSsid =
+                        new SupplicantResult("getSsid(" + networkId + ")");
+                try {
+                    network.getSsid(
+                            (SupplicantStatus status, ArrayList<Byte> ssid) -> {
+                                resultSsid.setResult(status, ssid);
+                            });
+                } catch (RemoteException e) {
+                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                    supplicantServiceDiedHandler();
+                }
+                if (resultSsid.isSuccess() && resultSsid.getResult() != null
+                        && !resultSsid.getResult().isEmpty()) {
+                    group.setNetworkName(NativeUtil.removeEnclosingQuotes(
+                            NativeUtil.encodeSsid(resultSsid.getResult())));
+                }
+
+                SupplicantResult<byte[]> resultBssid =
+                        new SupplicantResult("getBssid(" + networkId + ")");
+                try {
+                    network.getBssid(
+                            (SupplicantStatus status, byte[] bssid) -> {
+                                resultBssid.setResult(status, bssid);
+                            });
+                } catch (RemoteException e) {
+                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                    supplicantServiceDiedHandler();
+                }
+                if (resultBssid.isSuccess() && !ArrayUtils.isEmpty(resultBssid.getResult())) {
+                    WifiP2pDevice device = new WifiP2pDevice();
+                    device.deviceAddress =
+                            NativeUtil.macAddressFromByteArray(resultBssid.getResult());
+                    group.setOwner(device);
+                }
+
+                SupplicantResult<Boolean> resultIsGo =
+                        new SupplicantResult("isGo(" + networkId + ")");
+                try {
+                    network.isGo(
+                            (SupplicantStatus status, boolean isGo) -> {
+                                resultIsGo.setResult(status, isGo);
+                            });
+                } catch (RemoteException e) {
+                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                    supplicantServiceDiedHandler();
+                }
+                if (resultIsGo.isSuccess()) {
+                    group.setIsGroupOwner(resultIsGo.getResult());
+                }
+                groups.add(group);
+            }
         }
+        return true;
     }
 
     /**
@@ -888,12 +2190,20 @@
      * @return true if request is sent successfully, false otherwise.
      */
     public boolean setWpsDeviceName(String name) {
+        if (name == null) {
+            return false;
+        }
         synchronized (mLock) {
-            String methodStr = "setWpsDeviceName";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setWpsDeviceName")) return false;
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "setWpsDeviceName(" + name + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.setWpsDeviceName(name));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.setWpsDeviceName(name);
+            return result.isSuccess();
         }
     }
 
@@ -904,12 +2214,36 @@
      * @return true if request is sent successfully, false otherwise.
      */
     public boolean setWpsDeviceType(String typeStr) {
-        synchronized (mLock) {
-            String methodStr = "setWpsDeviceType";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+        try {
+            Matcher match = WPS_DEVICE_TYPE_PATTERN.matcher(typeStr);
+            if (!match.find() || match.groupCount() != 3) {
+                Log.e(TAG, "Malformed WPS device type " + typeStr);
+                return false;
             }
-            return mP2pIfaceHal.setWpsDeviceType(typeStr);
+            short categ = Short.parseShort(match.group(1));
+            byte[] oui = NativeUtil.hexStringToByteArray(match.group(2));
+            short subCateg = Short.parseShort(match.group(3));
+
+            byte[] bytes = new byte[8];
+            ByteBuffer byteBuffer = ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
+            byteBuffer.putShort(categ);
+            byteBuffer.put(oui);
+            byteBuffer.putShort(subCateg);
+            synchronized (mLock) {
+                if (!checkSupplicantP2pIfaceAndLogFailure("setWpsDeviceType")) return false;
+                SupplicantResult<Void> result = new SupplicantResult(
+                        "setWpsDeviceType(" + typeStr + ")");
+                try {
+                    result.setResult(mISupplicantP2pIface.setWpsDeviceType(bytes));
+                } catch (RemoteException e) {
+                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                    supplicantServiceDiedHandler();
+                }
+                return result.isSuccess();
+            }
+        } catch (IllegalArgumentException e) {
+            Log.e(TAG, "Illegal argument " + typeStr, e);
+            return false;
         }
     }
 
@@ -921,11 +2255,21 @@
      */
     public boolean setWpsConfigMethods(String configMethodsStr) {
         synchronized (mLock) {
-            String methodStr = "setWpsConfigMethods";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setWpsConfigMethods")) return false;
+            SupplicantResult<Void> result =
+                    new SupplicantResult("setWpsConfigMethods(" + configMethodsStr + ")");
+            short configMethodsMask = 0;
+            String[] configMethodsStrArr = configMethodsStr.split("\\s+");
+            for (int i = 0; i < configMethodsStrArr.length; i++) {
+                configMethodsMask |= stringToWpsConfigMethod(configMethodsStrArr[i]);
             }
-            return mP2pIfaceHal.setWpsConfigMethods(configMethodsStr);
+            try {
+                result.setResult(mISupplicantP2pIface.setWpsConfigMethods(configMethodsMask));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.isSuccess();
         }
     }
 
@@ -936,12 +2280,24 @@
      */
     public String getNfcHandoverRequest() {
         synchronized (mLock) {
-            String methodStr = "getNfcHandoverRequest";
-            if (mP2pIfaceHal == null) {
-                handleNullHal(methodStr);
-                return null;
+            if (!checkSupplicantP2pIfaceAndLogFailure("getNfcHandoverRequest")) return null;
+            SupplicantResult<ArrayList> result = new SupplicantResult(
+                    "getNfcHandoverRequest()");
+            try {
+                mISupplicantP2pIface.createNfcHandoverRequestMessage(
+                        (SupplicantStatus status, ArrayList<Byte> message) -> {
+                            result.setResult(status, message);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.getNfcHandoverRequest();
+            if (!result.isSuccess()) {
+                return null;
+
+            }
+            return NativeUtil.hexStringFromByteArray(
+                    NativeUtil.byteArrayFromArrayList(result.getResult()));
         }
     }
 
@@ -952,12 +2308,24 @@
      */
     public String getNfcHandoverSelect() {
         synchronized (mLock) {
-            String methodStr = "getNfcHandoverSelect";
-            if (mP2pIfaceHal == null) {
-                handleNullHal(methodStr);
-                return null;
+            if (!checkSupplicantP2pIfaceAndLogFailure("getNfcHandoverSelect")) return null;
+            SupplicantResult<ArrayList> result = new SupplicantResult(
+                    "getNfcHandoverSelect()");
+            try {
+                mISupplicantP2pIface.createNfcHandoverSelectMessage(
+                        (SupplicantStatus status, ArrayList<Byte> message) -> {
+                            result.setResult(status, message);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.getNfcHandoverSelect();
+            if (!result.isSuccess()) {
+                return null;
+
+            }
+            return NativeUtil.hexStringFromByteArray(
+                    NativeUtil.byteArrayFromArrayList(result.getResult()));
         }
     }
 
@@ -967,12 +2335,23 @@
      * @return true if reported successfully, false otherwise.
      */
     public boolean initiatorReportNfcHandover(String selectMessage) {
+        if (selectMessage == null) return false;
         synchronized (mLock) {
-            String methodStr = "initiatorReportNfcHandover";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("initiatorReportNfcHandover")) return false;
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "initiatorReportNfcHandover(" + selectMessage + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.reportNfcHandoverInitiation(
+                        NativeUtil.byteArrayToArrayList(NativeUtil.hexStringToByteArray(
+                            selectMessage))));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + selectMessage, e);
+                return false;
             }
-            return mP2pIfaceHal.initiatorReportNfcHandover(selectMessage);
+            return result.isSuccess();
         }
     }
 
@@ -982,12 +2361,23 @@
      * @return true if reported successfully, false otherwise.
      */
     public boolean responderReportNfcHandover(String requestMessage) {
+        if (requestMessage == null) return false;
         synchronized (mLock) {
-            String methodStr = "responderReportNfcHandover";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("responderReportNfcHandover")) return false;
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "responderReportNfcHandover(" + requestMessage + ")");
+            try {
+                result.setResult(mISupplicantP2pIface.reportNfcHandoverResponse(
+                        NativeUtil.byteArrayToArrayList(NativeUtil.hexStringToByteArray(
+                            requestMessage))));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + requestMessage, e);
+                return false;
             }
-            return mP2pIfaceHal.responderReportNfcHandover(requestMessage);
+            return result.isSuccess();
         }
     }
 
@@ -1000,11 +2390,32 @@
      */
     public boolean setClientList(int networkId, String clientListStr) {
         synchronized (mLock) {
-            String methodStr = "setClientList";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("setClientList")) return false;
+            if (TextUtils.isEmpty(clientListStr)) {
+                Log.e(TAG, "Invalid client list");
+                return false;
             }
-            return mP2pIfaceHal.setClientList(networkId, clientListStr);
+            ISupplicantP2pNetwork network = getNetwork(networkId);
+            if (network == null) {
+                Log.e(TAG, "Invalid network id ");
+                return false;
+            }
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "setClientList(" + networkId + ", " + clientListStr + ")");
+            try {
+                ArrayList<byte[]> clients = new ArrayList<>();
+                for (String clientStr : Arrays.asList(clientListStr.split("\\s+"))) {
+                    clients.add(NativeUtil.macAddressToByteArray(clientStr));
+                }
+                result.setResult(network.setClientList(clients));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            } catch (IllegalArgumentException e) {
+                Log.e(TAG, "Illegal argument " + clientListStr, e);
+                return false;
+            }
+            return result.isSuccess();
         }
     }
 
@@ -1012,16 +2423,34 @@
      * Set the client list for the provided network.
      *
      * @param networkId Id of the network.
-     * @return Space separated list of clients if successful, null otherwise.
+     * @return  Space separated list of clients if successfull, null otherwise.
      */
     public String getClientList(int networkId) {
         synchronized (mLock) {
-            String methodStr = "getClientList";
-            if (mP2pIfaceHal == null) {
-                handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("getClientList")) return null;
+            ISupplicantP2pNetwork network = getNetwork(networkId);
+            if (network == null) {
+                Log.e(TAG, "Invalid network id ");
                 return null;
             }
-            return mP2pIfaceHal.getClientList(networkId);
+            SupplicantResult<ArrayList> result = new SupplicantResult(
+                    "getClientList(" + networkId + ")");
+            try {
+                network.getClientList(
+                        (SupplicantStatus status, ArrayList<byte[]> clients) -> {
+                            result.setResult(status, clients);
+                        });
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            if (!result.isSuccess()) {
+                return null;
+            }
+            ArrayList<byte[]> clients = result.getResult();
+            return clients.stream()
+                    .map(NativeUtil::macAddressFromByteArray)
+                    .collect(Collectors.joining(" "));
         }
     }
 
@@ -1032,14 +2461,19 @@
      */
     public boolean saveConfig() {
         synchronized (mLock) {
-            String methodStr = "saveConfig";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (!checkSupplicantP2pIfaceAndLogFailure("saveConfig")) return false;
+            SupplicantResult<Void> result = new SupplicantResult("saveConfig()");
+            try {
+                result.setResult(mISupplicantP2pIface.saveConfig());
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.saveConfig();
+            return result.isSuccess();
         }
     }
 
+
     /**
      * Enable/Disable P2P MAC randomization.
      *
@@ -1048,11 +2482,20 @@
      */
     public boolean setMacRandomization(boolean enable) {
         synchronized (mLock) {
-            String methodStr = "setMacRandomization";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface ifaceV12 =
+                    getSupplicantP2pIfaceAndLogFailureV1_2("setMacRandomization");
+            if (ifaceV12 == null) return false;
+
+            SupplicantResult<Void> result = new SupplicantResult(
+                    "setMacRandomization(" + enable + ")");
+            try {
+                result.setResult(ifaceV12.setMacRandomization(enable));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
             }
-            return mP2pIfaceHal.setMacRandomization(enable);
+
+            return result.isSuccess();
         }
     }
 
@@ -1065,60 +2508,157 @@
      */
     public boolean setWfdR2DeviceInfo(String info) {
         synchronized (mLock) {
-            String methodStr = "setWfdR2DeviceInfo";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+            if (info == null) {
+                Log.e(TAG, "Cannot parse null WFD info string.");
+                return false;
             }
-            return mP2pIfaceHal.setWfdR2DeviceInfo(info);
+            byte[] wfdR2Info = null;
+            try {
+                wfdR2Info = NativeUtil.hexStringToByteArray(info);
+            } catch (Exception e) {
+                Log.e(TAG, "Could not parse WFD R2 Device Info string.");
+                return false;
+            }
+
+            android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface ifaceV14 =
+                    getSupplicantP2pIfaceAndLogFailureV1_4("setWfdR2DeviceInfo");
+            if (ifaceV14 == null) return false;
+            SupplicantResultV1_4<Void> result = new SupplicantResultV1_4(
+                    "setWfdR2DeviceInfo(" + info + ")");
+            try {
+                result.setResult(ifaceV14.setWfdR2DeviceInfo(wfdR2Info));
+            } catch (RemoteException e) {
+                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
+                supplicantServiceDiedHandler();
+            }
+            return result.isSuccess();
         }
     }
 
+
     /**
-     * Remove the client with the MAC address from the group.
-     *
-     * @param peerAddress Mac address of the client.
-     * @param isLegacyClient Indicate if client is a legacy client or not.
-     * @return true if success
+     * Converts the Wps config method string to the equivalent enum value.
      */
-    public boolean removeClient(String peerAddress, boolean isLegacyClient) {
-        synchronized (mLock) {
-            String methodStr = "removeClient";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
-            }
-            return mP2pIfaceHal.removeClient(peerAddress, isLegacyClient);
+    private static short stringToWpsConfigMethod(String configMethod) {
+        switch (configMethod) {
+            case "usba":
+                return WpsConfigMethods.USBA;
+            case "ethernet":
+                return WpsConfigMethods.ETHERNET;
+            case "label":
+                return WpsConfigMethods.LABEL;
+            case "display":
+                return WpsConfigMethods.DISPLAY;
+            case "int_nfc_token":
+                return WpsConfigMethods.INT_NFC_TOKEN;
+            case "ext_nfc_token":
+                return WpsConfigMethods.EXT_NFC_TOKEN;
+            case "nfc_interface":
+                return WpsConfigMethods.NFC_INTERFACE;
+            case "push_button":
+                return WpsConfigMethods.PUSHBUTTON;
+            case "keypad":
+                return WpsConfigMethods.KEYPAD;
+            case "virtual_push_button":
+                return WpsConfigMethods.VIRT_PUSHBUTTON;
+            case "physical_push_button":
+                return WpsConfigMethods.PHY_PUSHBUTTON;
+            case "p2ps":
+                return WpsConfigMethods.P2PS;
+            case "virtual_display":
+                return WpsConfigMethods.VIRT_DISPLAY;
+            case "physical_display":
+                return WpsConfigMethods.PHY_DISPLAY;
+            default:
+                throw new IllegalArgumentException(
+                        "Invalid WPS config method: " + configMethod);
         }
     }
 
-    /**
-     * Set vendor-specific information elements to wpa_supplicant.
+    /** Container class allowing propagation of status and/or value
+     * from callbacks.
      *
-     * @param vendorElements The list of vendor-specific information elements.
-     *
-     * @return boolean The value indicating whether operation was successful.
+     * Primary purpose is to allow callback lambdas to provide results
+     * to parent methods.
      */
-    public boolean setVendorElements(Set<ScanResult.InformationElement> vendorElements) {
-        synchronized (mLock) {
-            String methodStr = "setVendorElements";
-            if (mP2pIfaceHal == null) {
-                return handleNullHal(methodStr);
+    private static class SupplicantResultBase<S, E> {
+        private String mMethodName;
+        private S mStatus;
+        private E mValue;
+
+        SupplicantResultBase(String methodName) {
+            mMethodName = methodName;
+            mStatus = null;
+            mValue = null;
+            logd("entering " + mMethodName);
+        }
+
+        public void setResult(S status, E value) {
+            if (status == null) {
+                logw(mMethodName + " failed: no status code returned.");
+            } else {
+                logCompletion(mMethodName, getCode(status), getDebugMessage(status));
             }
-            return mP2pIfaceHal.setVendorElements(vendorElements);
+            logd("leaving " + mMethodName + " with result = " + value);
+            mStatus = status;
+            mValue = value;
+        }
+
+        public void setResult(S status) {
+            if (status == null) {
+                logw(mMethodName + " failed: no status code returned.");
+            } else {
+                logCompletion(mMethodName, getCode(status), getDebugMessage(status));
+            }
+            logd("leaving " + mMethodName);
+            mStatus = status;
+        }
+
+        public boolean isSuccess() {
+            return (mStatus != null
+                    && (getCode(mStatus) == SupplicantStatusCode.SUCCESS
+                    || getCode(mStatus) == SupplicantStatusCode.FAILURE_IFACE_EXISTS));
+        }
+
+        public E getResult() {
+            return (isSuccess() ? mValue : null);
+        }
+
+        protected int getCode(Object obj) {
+            SupplicantStatus status = (SupplicantStatus) obj;
+            return status.code;
+        }
+
+        protected String getDebugMessage(Object obj) {
+            SupplicantStatus status = (SupplicantStatus) obj;
+            return status.debugMessage;
         }
     }
 
-    /**
-     * Get the supported features.
-     *
-     * @return  bitmask defined by WifiP2pManager.FEATURE_*
-     */
-    public long getSupportedFeatures() {
-        if (mP2pIfaceHal instanceof SupplicantP2pIfaceHalHidlImpl) return 0L;
-        return ((SupplicantP2pIfaceHalAidlImpl) mP2pIfaceHal).getSupportedFeatures();
+    private static class SupplicantResult<E>
+            extends SupplicantResultBase<SupplicantStatus, E> {
+        SupplicantResult(String iface) {
+            super(iface);
+        }
     }
 
-    private boolean handleNullHal(String methodStr) {
-        Log.e(TAG, "Cannot call " + methodStr + " because HAL object is null.");
-        return false;
+    private static class SupplicantResultV1_4<E>
+            extends SupplicantResultBase<
+                    android.hardware.wifi.supplicant.V1_4.SupplicantStatus, E> {
+        SupplicantResultV1_4(String iface) {
+            super(iface);
+        }
+
+        protected int getCode(Object obj) {
+            android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
+                    (android.hardware.wifi.supplicant.V1_4.SupplicantStatus) obj;
+            return status.code;
+        }
+
+        protected String getDebugMessage(Object obj) {
+            android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
+                    (android.hardware.wifi.supplicant.V1_4.SupplicantStatus) obj;
+            return status.debugMessage;
+        }
     }
 }
diff --git a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceHalAidlImpl.java b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceHalAidlImpl.java
deleted file mode 100644
index c872226..0000000
--- a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceHalAidlImpl.java
+++ /dev/null
@@ -1,2510 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi.p2p;
-
-import android.annotation.NonNull;
-import android.hardware.wifi.supplicant.DebugLevel;
-import android.hardware.wifi.supplicant.FreqRange;
-import android.hardware.wifi.supplicant.ISupplicant;
-import android.hardware.wifi.supplicant.ISupplicantP2pIface;
-import android.hardware.wifi.supplicant.ISupplicantP2pIfaceCallback;
-import android.hardware.wifi.supplicant.ISupplicantP2pNetwork;
-import android.hardware.wifi.supplicant.IfaceInfo;
-import android.hardware.wifi.supplicant.IfaceType;
-import android.hardware.wifi.supplicant.MiracastMode;
-import android.hardware.wifi.supplicant.P2pFrameTypeMask;
-import android.hardware.wifi.supplicant.WpsConfigMethods;
-import android.hardware.wifi.supplicant.WpsProvisionMethod;
-import android.net.wifi.CoexUnsafeChannel;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WpsInfo;
-import android.net.wifi.p2p.WifiP2pConfig;
-import android.net.wifi.p2p.WifiP2pDevice;
-import android.net.wifi.p2p.WifiP2pGroup;
-import android.net.wifi.p2p.WifiP2pGroupList;
-import android.net.wifi.p2p.WifiP2pManager;
-import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
-import android.os.IBinder;
-import android.os.IBinder.DeathRecipient;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.ServiceSpecificException;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.util.ArrayUtils;
-import com.android.server.wifi.util.NativeUtil;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Native calls sending requests to the P2P Hals, and callbacks for receiving P2P events
- */
-public class SupplicantP2pIfaceHalAidlImpl implements ISupplicantP2pIfaceHal {
-    private static final String TAG = "SupplicantP2pIfaceHalAidlImpl";
-    @VisibleForTesting
-    private static final String HAL_INSTANCE_NAME = ISupplicant.DESCRIPTOR + "/default";
-    private static boolean sVerboseLoggingEnabled = true;
-    private static boolean sHalVerboseLoggingEnabled = true;
-    private boolean mInitializationStarted = false;
-    private static final int RESULT_NOT_VALID = -1;
-    private static final int DEFAULT_OPERATING_CLASS = 81;
-    /**
-     * Regex pattern for extracting the wps device type bytes.
-     * Matches a strings like the following: "<categ>-<OUI>-<subcateg>";
-     */
-    private static final Pattern WPS_DEVICE_TYPE_PATTERN =
-            Pattern.compile("^(\\d{1,2})-([0-9a-fA-F]{8})-(\\d{1,2})$");
-
-    private final Object mLock = new Object();
-
-    // Supplicant HAL AIDL interface objects
-    private ISupplicant mISupplicant = null;
-    private ISupplicantP2pIface mISupplicantP2pIface = null;
-    private final DeathRecipient mSupplicantDeathRecipient =
-            () -> {
-                Log.w(TAG, "ISupplicant/ISupplicantP2pIface died");
-                synchronized (mLock) {
-                    supplicantServiceDiedHandler();
-                }
-            };
-    private final WifiP2pMonitor mMonitor;
-    private ISupplicantP2pIfaceCallback mCallback = null;
-
-    public SupplicantP2pIfaceHalAidlImpl(WifiP2pMonitor monitor) {
-        mMonitor = monitor;
-    }
-
-    /**
-     * Enable verbose logging for all sub modules.
-     *
-     * @param verboseEnabled Verbose flag set in overlay XML.
-     * @param halVerboseEnabled Verbose flag set by the user.
-     */
-    public static void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        sVerboseLoggingEnabled = verboseEnabled;
-        sHalVerboseLoggingEnabled = halVerboseEnabled;
-        SupplicantP2pIfaceCallbackAidlImpl.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-    }
-
-    /**
-     * Set the debug log level for wpa_supplicant
-     *
-     * @param turnOnVerbose Whether to turn on verbose logging or not.
-     * @param globalShowKeys Whether show keys is true in WifiGlobals.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setLogLevel(boolean turnOnVerbose, boolean globalShowKeys) {
-        synchronized (mLock) {
-            int logLevel = turnOnVerbose
-                    ? DebugLevel.DEBUG
-                    : DebugLevel.INFO;
-            return setDebugParams(logLevel, false,
-                    turnOnVerbose && globalShowKeys);
-        }
-    }
-
-    /** See ISupplicant.hal for documentation */
-    private boolean setDebugParams(int level, boolean showTimestamp, boolean showKeys) {
-        synchronized (mLock) {
-            String methodStr = "setDebugParams";
-            if (!checkSupplicantAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicant.setDebugParams(level, showTimestamp, showKeys);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Retrieve the ISupplicant service and link to service death.
-     * @return true if successful, false otherwise
-     */
-    public boolean initialize() {
-        synchronized (mLock) {
-            final String methodStr = "initialize";
-            if (mISupplicant != null) {
-                Log.i(TAG, "Service is already initialized.");
-                return true;
-            }
-            mInitializationStarted = true;
-            mISupplicantP2pIface = null;
-            mISupplicant = getSupplicantMockable();
-            if (mISupplicant == null) {
-                Log.e(TAG, "Unable to obtain ISupplicant binder.");
-                return false;
-            }
-            Log.i(TAG, "Obtained ISupplicant binder.");
-
-            try {
-                IBinder serviceBinder = getServiceBinderMockable();
-                if (serviceBinder == null) {
-                    return false;
-                }
-                serviceBinder.linkToDeath(mSupplicantDeathRecipient, /* flags= */  0);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-                return false;
-            }
-        }
-    }
-
-    /**
-     * Setup the P2P iface.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    public boolean setupIface(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            if (mISupplicantP2pIface != null) {
-                // P2P iface already exists
-                return false;
-            }
-            ISupplicantP2pIface iface = addIface(ifaceName);
-            if (iface == null) {
-                Log.e(TAG, "Unable to add iface " + ifaceName);
-                return false;
-            }
-            mISupplicantP2pIface = iface;
-
-            if (mMonitor != null) {
-                ISupplicantP2pIfaceCallback callback =
-                        new SupplicantP2pIfaceCallbackAidlImpl(ifaceName, mMonitor);
-                if (!registerCallback(callback)) {
-                    Log.e(TAG, "Unable to register callback for iface " + ifaceName);
-                    return false;
-                }
-                mCallback = callback;
-            }
-            return true;
-        }
-    }
-
-    private ISupplicantP2pIface addIface(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            String methodStr = "addIface";
-            if (!checkSupplicantAndLogFailure(methodStr)) {
-                return null;
-            }
-            try {
-                return mISupplicant.addP2pInterface(ifaceName);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Teardown the P2P interface.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    public boolean teardownIface(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            final String methodStr = "teardownIface";
-            if (!checkSupplicantAndLogFailure(methodStr)) {
-                return false;
-            } else if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            try {
-                IfaceInfo ifaceInfo = new IfaceInfo();
-                ifaceInfo.name = ifaceName;
-                ifaceInfo.type = IfaceType.P2P;
-                mISupplicant.removeInterface(ifaceInfo);
-                mISupplicantP2pIface = null;
-                mCallback = null;
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    private void supplicantServiceDiedHandler() {
-        synchronized (mLock) {
-            mISupplicant = null;
-            mISupplicantP2pIface = null;
-            mInitializationStarted = false;
-        }
-    }
-
-    /**
-     * Signals whether initialization started successfully.
-     */
-    public boolean isInitializationStarted() {
-        synchronized (mLock) {
-            return mInitializationStarted;
-        }
-    }
-
-    /**
-     * Signals whether initialization completed successfully.
-     */
-    public boolean isInitializationComplete() {
-        synchronized (mLock) {
-            return mISupplicant != null;
-        }
-    }
-
-    /**
-     * Indicates whether the AIDL service is declared
-     */
-    public static boolean serviceDeclared() {
-        // Service Manager API ServiceManager#isDeclared supported after T.
-        if (!SdkLevel.isAtLeastT()) {
-            return false;
-        }
-        return ServiceManager.isDeclared(HAL_INSTANCE_NAME);
-    }
-
-    /**
-     * Wrapper functions to access static HAL methods, created to be mockable in unit tests
-     */
-    @VisibleForTesting
-    protected ISupplicant getSupplicantMockable() {
-        synchronized (mLock) {
-            try {
-                return ISupplicant.Stub.asInterface(
-                        ServiceManager.waitForDeclaredService(HAL_INSTANCE_NAME));
-            } catch (Exception e) {
-                Log.e(TAG, "Unable to get ISupplicant service, " + e);
-                return null;
-            }
-        }
-    }
-
-    @VisibleForTesting
-    protected IBinder getServiceBinderMockable() {
-        synchronized (mLock) {
-            if (mISupplicant == null) {
-                return null;
-            }
-            return mISupplicant.asBinder();
-        }
-    }
-
-    /**
-     * Returns false if mISupplicant is null and logs failure message
-     */
-    private boolean checkSupplicantAndLogFailure(String methodStr) {
-        synchronized (mLock) {
-            if (mISupplicant == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", ISupplicant is null");
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Returns false if SupplicantP2pIface is null, and logs failure to call methodStr
-     */
-    private boolean checkP2pIfaceAndLogFailure(String methodStr) {
-        synchronized (mLock) {
-            if (mISupplicantP2pIface == null) {
-                Log.e(TAG, "Can't call " + methodStr + ", ISupplicantP2pIface is null");
-                return false;
-            }
-            return true;
-        }
-    }
-
-    private void handleRemoteException(RemoteException e, String methodStr) {
-        synchronized (mLock) {
-            supplicantServiceDiedHandler();
-            Log.e(TAG,
-                    "ISupplicantP2pIface." + methodStr + " failed with remote exception: ", e);
-        }
-    }
-
-    private void handleServiceSpecificException(ServiceSpecificException e, String methodStr) {
-        synchronized (mLock) {
-            Log.e(TAG, "ISupplicantP2pIface." + methodStr + " failed with "
-                    + "service specific exception: ", e);
-        }
-    }
-
-    private int wpsInfoToConfigMethod(int info) {
-        switch (info) {
-            case WpsInfo.PBC:
-                return WpsProvisionMethod.PBC;
-            case WpsInfo.DISPLAY:
-                return WpsProvisionMethod.DISPLAY;
-            case WpsInfo.KEYPAD:
-            case WpsInfo.LABEL:
-                return WpsProvisionMethod.KEYPAD;
-            default:
-                Log.e(TAG, "Unsupported WPS provision method: " + info);
-                return RESULT_NOT_VALID;
-        }
-    }
-
-    /**
-     * Retrieves the name of the network interface.
-     *
-     * @return name Name of the network interface, e.g., wlan0
-     */
-    public String getName() {
-        synchronized (mLock) {
-            String methodStr = "getName";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-            try {
-                return mISupplicantP2pIface.getName();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Register for callbacks from this interface.
-     *
-     * These callbacks are invoked for events that are specific to this interface.
-     * Registration of multiple callback objects is supported. These objects must
-     * be automatically deleted when the corresponding client process is dead or
-     * if this interface is removed.
-     *
-     * @param callback An instance of the |ISupplicantP2pIfaceCallback| AIDL
-     *        interface object.
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean registerCallback(ISupplicantP2pIfaceCallback callback) {
-        synchronized (mLock) {
-            String methodStr = "registerCallback";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.registerCallback(callback);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Initiate a P2P service discovery with a (optional) timeout.
-     *
-     * @param timeout Max time to be spent is performing discovery.
-     *        Set to 0 to indefinitely continue discovery until an explicit
-     *        |stopFind| is sent.
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean find(int timeout) {
-        return find(
-                WifiP2pManager.WIFI_P2P_SCAN_FULL,
-                WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, timeout);
-    }
-
-    /**
-     * Initiate a P2P device discovery with a scan type, a (optional) frequency, and a (optional)
-     * timeout.
-     *
-     * @param type indicates what channels to scan.
-     *        Valid values are {@link WifiP2pManager#WIFI_P2P_SCAN_FULL} for doing full P2P scan,
-     *        {@link WifiP2pManager#WIFI_P2P_SCAN_SOCIAL} for scanning social channels,
-     *        {@link WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ} for scanning a specified frequency.
-     * @param freq is the frequency to be scanned.
-     *        The possible values are:
-     *        <ul>
-     *        <li> A valid frequency for {@link WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ}</li>
-     *        <li> {@link WifiP2pManager#WIFI_P2P_SCAN_FREQ_UNSPECIFIED} for
-     *          {@link WifiP2pManager#WIFI_P2P_SCAN_FULL} and
-     *          {@link WifiP2pManager#WIFI_P2P_SCAN_SOCIAL}</li>
-     *        </ul>
-     * @param timeout Max time to be spent is performing discovery.
-     *        Set to 0 to indefinitely continue discovery until an explicit
-     *        |stopFind| is sent.
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean find(@WifiP2pManager.WifiP2pScanType int type, int freq, int timeout) {
-        synchronized (mLock) {
-            String methodStr = "find";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (timeout < 0) {
-                Log.e(TAG, "Invalid timeout value: " + timeout);
-                return false;
-            }
-            if (freq < 0) {
-                Log.e(TAG, "Invalid freq value: " + freq);
-                return false;
-            }
-            if (freq != WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED
-                    && type != WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ) {
-                Log.e(TAG, "Specified freq for scan type:" + type);
-                return false;
-            }
-            try {
-                switch (type) {
-                    case WifiP2pManager.WIFI_P2P_SCAN_FULL:
-                        mISupplicantP2pIface.find(timeout);
-                        break;
-                    case WifiP2pManager.WIFI_P2P_SCAN_SOCIAL:
-                        mISupplicantP2pIface.findOnSocialChannels(timeout);
-                        break;
-                    case WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ:
-                        if (freq == WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED) {
-                            Log.e(TAG, "Unspecified freq for WIFI_P2P_SCAN_SINGLE_FREQ");
-                            return false;
-                        }
-                        mISupplicantP2pIface.findOnSpecificFrequency(freq, timeout);
-                        break;
-                    default:
-                        Log.e(TAG, "Invalid scan type: " + type);
-                        return false;
-                }
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Stop an ongoing P2P service discovery.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean stopFind() {
-        synchronized (mLock) {
-            String methodStr = "stopFind";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.stopFind();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Flush P2P peer table and state.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean flush() {
-        synchronized (mLock) {
-            String methodStr = "flush";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.flush();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * This command can be used to flush all services from the
-     * device.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean serviceFlush() {
-        synchronized (mLock) {
-            String methodStr = "serviceFlush";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.flushServices();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Turn on/off power save mode for the interface.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param enable Indicate if power save is to be turned on/off.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean setPowerSave(String groupIfName, boolean enable) {
-        synchronized (mLock) {
-            String methodStr = "setPowerSave";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.setPowerSave(groupIfName, enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set the Maximum idle time in seconds for P2P groups.
-     * This value controls how long a P2P group is maintained after there
-     * is no other members in the group. As a group owner, this means no
-     * associated stations in the group. As a P2P client, this means no
-     * group owner seen in scan results.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param timeoutInSec Timeout value in seconds.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean setGroupIdle(String groupIfName, int timeoutInSec) {
-        synchronized (mLock) {
-            String methodStr = "setGroupIdle";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            // Basic checking here. Leave actual parameter validation to supplicant.
-            if (timeoutInSec < 0) {
-                Log.e(TAG, "Invalid group timeout value " + timeoutInSec);
-                return false;
-            }
-            if (groupIfName == null) {
-                Log.e(TAG, "Group interface name cannot be null.");
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.setGroupIdle(groupIfName, timeoutInSec);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set the postfix to be used for P2P SSID's.
-     *
-     * @param postfix String to be appended to SSID.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean setSsidPostfix(String postfix) {
-        synchronized (mLock) {
-            String methodStr = "setSsidPostfix";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            // Basic checking here. Leave actual parameter validation to supplicant.
-            if (postfix == null) {
-                Log.e(TAG, "Invalid SSID postfix value (null).");
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.setSsidPostfix(
-                        NativeUtil.byteArrayFromArrayList(
-                                NativeUtil.decodeSsid("\"" + postfix + "\"")));
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not decode SSID.", e);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Start P2P group formation with a discovered P2P peer. This includes
-     * optional group owner negotiation, group interface setup, provisioning,
-     * and establishing data connection.
-     *
-     * @param config Configuration to use to connect to remote device.
-     * @param joinExistingGroup Indicates that this is a command to join an
-     *        existing group as a client. It skips the group owner negotiation
-     *        part. This must send a Provision Discovery Request message to the
-     *        target group owner before associating for WPS provisioning.
-     *
-     * @return String containing generated pin, if selected provision method
-     *        uses PIN.
-     */
-    public String connect(WifiP2pConfig config, boolean joinExistingGroup) {
-        synchronized (mLock) {
-            String methodStr = "setSsidPostfix";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-            if (config == null) {
-                Log.e(TAG, "Could not connect because config is null.");
-                return null;
-            }
-            if (config.deviceAddress == null) {
-                Log.e(TAG, "Could not parse null mac address.");
-                return null;
-            }
-            if (config.wps.setup == WpsInfo.PBC && !TextUtils.isEmpty(config.wps.pin)) {
-                Log.e(TAG, "Expected empty pin for PBC.");
-                return null;
-            }
-
-            byte[] peerAddress = null;
-            try {
-                peerAddress = NativeUtil.macAddressToByteArray(config.deviceAddress);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse peer mac address.", e);
-                return null;
-            }
-
-            int provisionMethod = wpsInfoToConfigMethod(config.wps.setup);
-            if (provisionMethod == RESULT_NOT_VALID) {
-                Log.e(TAG, "Invalid WPS config method: " + config.wps.setup);
-                return null;
-            }
-            // NOTE: preSelectedPin cannot be null, otherwise hal would crash.
-            String preSelectedPin = TextUtils.isEmpty(config.wps.pin) ? "" : config.wps.pin;
-            boolean persistent = (config.netId == WifiP2pGroup.NETWORK_ID_PERSISTENT);
-
-            if (config.groupOwnerIntent < 0 || config.groupOwnerIntent > 15) {
-                Log.e(TAG, "Invalid group owner intent: " + config.groupOwnerIntent);
-                return null;
-            }
-
-            try {
-                return mISupplicantP2pIface.connect(
-                        peerAddress, provisionMethod, preSelectedPin, joinExistingGroup,
-                        persistent, config.groupOwnerIntent);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Cancel an ongoing P2P group formation and joining-a-group related
-     * operation. This operation unauthorizes the specific peer device (if any
-     * had been authorized to start group formation), stops P2P find (if in
-     * progress), stops pending operations for join-a-group, and removes the
-     * P2P group interface (if one was used) that is in the WPS provisioning
-     * step. If the WPS provisioning step has been completed, the group is not
-     * terminated.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean cancelConnect() {
-        synchronized (mLock) {
-            String methodStr = "cancelConnect";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.cancelConnect();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Send P2P provision discovery request to the specified peer. The
-     * parameters for this command are the P2P device address of the peer and the
-     * desired configuration method.
-     *
-     * @param config Config class describing peer setup.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean provisionDiscovery(WifiP2pConfig config) {
-        synchronized (mLock) {
-            String methodStr = "provisionDiscovery";
-            if (!checkP2pIfaceAndLogFailure("provisionDiscovery")) {
-                return false;
-            }
-            if (config == null) {
-                return false;
-            }
-
-            int targetMethod = wpsInfoToConfigMethod(config.wps.setup);
-            if (targetMethod == RESULT_NOT_VALID) {
-                Log.e(TAG, "Unrecognized WPS configuration method: " + config.wps.setup);
-                return false;
-            }
-            if (targetMethod == WpsProvisionMethod.DISPLAY) {
-                // We are doing display, so provision discovery is keypad.
-                targetMethod = WpsProvisionMethod.KEYPAD;
-            } else if (targetMethod == WpsProvisionMethod.KEYPAD) {
-                // We are doing keypad, so provision discovery is display.
-                targetMethod = WpsProvisionMethod.DISPLAY;
-            }
-
-            if (config.deviceAddress == null) {
-                Log.e(TAG, "Cannot parse null mac address.");
-                return false;
-            }
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(config.deviceAddress);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse peer mac address.", e);
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.provisionDiscovery(macAddress, targetMethod);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Invite a device to a persistent group.
-     * If the peer device is the group owner of the persistent group, the peer
-     * parameter is not needed. Otherwise it is used to specify which
-     * device to invite. |goDeviceAddress| parameter may be used to override
-     * the group owner device address for Invitation Request should it not be
-     * known for some reason (this should not be needed in most cases).
-     *
-     * @param group Group object to use.
-     * @param peerAddress MAC address of the device to invite.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean invite(WifiP2pGroup group, String peerAddress) {
-        synchronized (mLock) {
-            String methodStr = "invite";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (TextUtils.isEmpty(peerAddress)) {
-                Log.e(TAG, "Peer mac address is empty.");
-                return false;
-            }
-            if (group == null) {
-                Log.e(TAG, "Cannot invite to null group.");
-                return false;
-            }
-            if (group.getOwner() == null) {
-                Log.e(TAG, "Cannot invite to group with null owner.");
-                return false;
-            }
-            if (group.getOwner().deviceAddress == null) {
-                Log.e(TAG, "Group owner has no mac address.");
-                return false;
-            }
-
-            byte[] ownerMacAddress = null;
-            try {
-                ownerMacAddress = NativeUtil.macAddressToByteArray(group.getOwner().deviceAddress);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Group owner mac address parse error.", e);
-                return false;
-            }
-
-            byte[] peerMacAddress;
-            try {
-                peerMacAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Peer mac address parse error.", e);
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.invite(
-                        group.getInterface(), ownerMacAddress, peerMacAddress);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Reject connection attempt from a peer (specified with a device
-     * address). This is a mechanism to reject a pending group owner negotiation
-     * with a peer and request to automatically block any further connection or
-     * discovery of the peer.
-     *
-     * @param peerAddress MAC address of the device to reject.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean reject(String peerAddress) {
-        synchronized (mLock) {
-            String methodStr = "reject";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            if (peerAddress == null) {
-                Log.e(TAG, "Rejected peer's mac address is null.");
-                return false;
-            }
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse peer mac address.", e);
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.reject(macAddress);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Gets the MAC address of the device.
-     *
-     * @return MAC address of the device.
-     */
-    public String getDeviceAddress() {
-        synchronized (mLock) {
-            String methodStr = "getDeviceAddress";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-            try {
-                byte[] address = mISupplicantP2pIface.getDeviceAddress();
-                return NativeUtil.macAddressFromByteArray(address);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Received invalid MAC address", e);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Gets the operational SSID of the device.
-     *
-     * @param address MAC address of the peer.
-     *
-     * @return SSID of the device.
-     */
-    public String getSsid(String address) {
-        synchronized (mLock) {
-            String methodStr = "getSsid";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-
-            if (address == null) {
-                Log.e(TAG, "Cannot parse null peer mac address.");
-                return null;
-            }
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(address);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse mac address.", e);
-                return null;
-            }
-
-            try {
-                byte[] ssid = mISupplicantP2pIface.getSsid(macAddress);
-                if (ssid == null) {
-                    return null;
-                }
-                return NativeUtil.removeEnclosingQuotes(
-                        NativeUtil.encodeSsid(
-                                NativeUtil.byteArrayToArrayList(ssid)));
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Unable to parse SSID: ", e);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Reinvoke a device from a persistent group.
-     *
-     * @param networkId Used to specify the persistent group.
-     * @param peerAddress MAC address of the device to reinvoke.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean reinvoke(int networkId, String peerAddress) {
-        synchronized (mLock) {
-            String methodStr = "reinvoke";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (TextUtils.isEmpty(peerAddress) || networkId < 0) {
-                return false;
-            }
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse mac address.", e);
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.reinvoke(networkId, macAddress);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set up a P2P group owner manually (i.e., without group owner
-     * negotiation with a specific peer). This is also known as autonomous
-     * group owner.
-     *
-     * @param networkId Used to specify the restart of a persistent group.
-     * @param isPersistent Used to request a persistent group to be formed.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean groupAdd(int networkId, boolean isPersistent) {
-        synchronized (mLock) {
-            String methodStr = "groupAdd";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.addGroup(isPersistent, networkId);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set up a P2P group as Group Owner or join a group with a configuration.
-     *
-     * @param networkName SSID of the group to be formed
-     * @param passphrase passphrase of the group to be formed
-     * @param isPersistent Used to request a persistent group to be formed.
-     * @param freq preferred frequency or band of the group to be formed
-     * @param peerAddress peerAddress Group Owner MAC address, only applied for Group Client.
-     *        If the MAC is "00:00:00:00:00:00", the device will try to find a peer
-     *        whose SSID matches ssid.
-     * @param join join a group or create a group
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean groupAdd(String networkName, String passphrase,
-            boolean isPersistent, int freq, String peerAddress, boolean join) {
-        synchronized (mLock) {
-            String methodStr = "groupAdd";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse mac address.", e);
-                return false;
-            }
-
-            byte[] ssid = null;
-            try {
-                ssid = NativeUtil.byteArrayFromArrayList(
-                        NativeUtil.decodeSsid("\"" + networkName + "\""));
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse ssid.", e);
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.addGroupWithConfig(
-                        ssid, passphrase, isPersistent, freq, macAddress, join);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Terminate a P2P group. If a new virtual network interface was used for
-     * the group, it must also be removed. The network interface name of the
-     * group interface is used as a parameter for this command.
-     *
-     * @param groupName Group interface name to use.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean groupRemove(String groupName) {
-        synchronized (mLock) {
-            String methodStr = "groupRemove";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (TextUtils.isEmpty(groupName)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.removeGroup(groupName);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Gets the capability of the group which the device is a
-     * member of.
-     *
-     * @param peerAddress MAC address of the peer.
-     *
-     * @return combination of |GroupCapabilityMask| values.
-     */
-    public int getGroupCapability(String peerAddress) {
-        synchronized (mLock) {
-            String methodStr = "getGroupCapability";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return RESULT_NOT_VALID;
-            }
-            if (peerAddress == null) {
-                Log.e(TAG, "Cannot parse null peer mac address.");
-                return RESULT_NOT_VALID;
-            }
-
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse mac address.", e);
-                return RESULT_NOT_VALID;
-            }
-
-            try {
-                return mISupplicantP2pIface.getGroupCapability(macAddress);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return RESULT_NOT_VALID;
-        }
-    }
-
-    /**
-     * Configure Extended Listen Timing.
-     *
-     * If enabled, listen state must be entered every |intervalInMillis| for at
-     * least |periodInMillis|. Both values have acceptable range of 1-65535
-     * (with interval obviously having to be larger than or equal to duration).
-     * If the P2P module is not idle at the time the Extended Listen Timing
-     * timeout occurs, the Listen State operation must be skipped.
-     *
-     * @param enable Enables or disables listening.
-     * @param periodInMillis Period in milliseconds.
-     * @param intervalInMillis Interval in milliseconds.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean configureExtListen(boolean enable, int periodInMillis, int intervalInMillis) {
-        synchronized (mLock) {
-            String methodStr = "configureExtListen";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (enable && intervalInMillis < periodInMillis) {
-                return false;
-            }
-
-            // If listening is disabled, wpa supplicant expects zeroes.
-            if (!enable) {
-                periodInMillis = 0;
-                intervalInMillis = 0;
-            }
-
-            // Verify that the integers are not negative. Leave actual parameter validation to
-            // supplicant.
-            if (periodInMillis < 0 || intervalInMillis < 0) {
-                Log.e(TAG, "Invalid parameters supplied to configureExtListen: " + periodInMillis
-                        + ", " + intervalInMillis);
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.configureExtListen(periodInMillis, intervalInMillis);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set P2P Listen channel.
-     *
-     * @param listenChannel Wifi channel. eg, 1, 6, 11.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean setListenChannel(int listenChannel) {
-        synchronized (mLock) {
-            String methodStr = "setListenChannel";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            // There is no original channel recorded in supplicant, so just return true.
-            if (listenChannel == 0) {
-                return true;
-            }
-
-            // Using channels other than 1, 6, and 11 would result in a discovery issue.
-            if (listenChannel != 1 && listenChannel != 6 && listenChannel != 11) {
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.setListenChannel(listenChannel, DEFAULT_OPERATING_CLASS);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set P2P operating channel.
-     *
-     * @param operatingChannel the desired operating channel.
-     * @param unsafeChannels channels which p2p cannot use.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean setOperatingChannel(int operatingChannel,
-            @NonNull List<CoexUnsafeChannel> unsafeChannels) {
-        synchronized (mLock) {
-            String methodStr = "setOperatingChannel";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (unsafeChannels == null) {
-                return false;
-            }
-
-            ArrayList<FreqRange> ranges = new ArrayList<>();
-            if (operatingChannel >= 1 && operatingChannel <= 165) {
-                int freq = (operatingChannel <= 14 ? 2407 : 5000) + operatingChannel * 5;
-                FreqRange range1 =  new FreqRange();
-                range1.min = 1000;
-                range1.max = freq - 5;
-                FreqRange range2 =  new FreqRange();
-                range2.min = freq + 5;
-                range2.max = 6000;
-                ranges.add(range1);
-                ranges.add(range2);
-            }
-            if (SdkLevel.isAtLeastS()) {
-                for (CoexUnsafeChannel cuc: unsafeChannels) {
-                    int centerFreq = ScanResult.convertChannelToFrequencyMhzIfSupported(
-                            cuc.getChannel(), cuc.getBand());
-                    FreqRange range = new FreqRange();
-                    // The range boundaries are inclusive in native frequency inclusion check.
-                    // Subtract one to avoid affecting neighbors.
-                    range.min = centerFreq - 5 - 1;
-                    range.max = centerFreq + 5 - 1;
-                    ranges.add(range);
-                }
-            }
-
-            FreqRange[] rangeArr = new FreqRange[ranges.size()];
-            for (int i = 0; i < ranges.size(); i++) {
-                rangeArr[i] = ranges.get(i);
-            }
-
-            try {
-                mISupplicantP2pIface.setDisallowedFrequencies(rangeArr);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * This command can be used to add a upnp/bonjour service.
-     *
-     * @param servInfo List of service queries.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean serviceAdd(WifiP2pServiceInfo servInfo) {
-        synchronized (mLock) {
-            String methodStr = "serviceAdd";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            if (servInfo == null) {
-                Log.e(TAG, "Null service info passed.");
-                return false;
-            }
-
-            for (String s : servInfo.getSupplicantQueryList()) {
-                if (s == null) {
-                    Log.e(TAG, "Invalid service description (null).");
-                    return false;
-                }
-
-                String[] data = s.split(" ");
-                if (data.length < 3) {
-                    Log.e(TAG, "Service specification invalid: " + s);
-                    return false;
-                }
-
-                try {
-                    if ("upnp".equals(data[0])) {
-                        int version = 0;
-                        try {
-                            version = Integer.parseInt(data[1], 16);
-                        } catch (NumberFormatException e) {
-                            Log.e(TAG, "UPnP Service specification invalid: " + s, e);
-                            return false;
-                        }
-                        mISupplicantP2pIface.addUpnpService(version, data[2]);
-                    } else if ("bonjour".equals(data[0])) {
-                        if (data[1] != null && data[2] != null) {
-                            byte[] request = null;
-                            byte[] response = null;
-                            try {
-                                request = NativeUtil.hexStringToByteArray(data[1]);
-                                response = NativeUtil.hexStringToByteArray(data[2]);
-                            } catch (IllegalArgumentException e) {
-                                Log.e(TAG, "Invalid bonjour service description.");
-                                return false;
-                            }
-                            mISupplicantP2pIface.addBonjourService(request, response);
-                        }
-                    } else {
-                        Log.e(TAG, "Unknown / unsupported P2P service requested: " + data[0]);
-                        return false;
-                    }
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                    return false;
-                } catch (ServiceSpecificException e) {
-                    handleServiceSpecificException(e, methodStr);
-                    return false;
-                }
-            }
-
-            return true;
-        }
-    }
-
-    /**
-     * This command can be used to remove a upnp/bonjour service.
-     *
-     * @param servInfo List of service queries.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean serviceRemove(WifiP2pServiceInfo servInfo) {
-        synchronized (mLock) {
-            String methodStr = "serviceRemove";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            if (servInfo == null) {
-                Log.e(TAG, "Null service info passed.");
-                return false;
-            }
-
-            for (String s : servInfo.getSupplicantQueryList()) {
-                if (s == null) {
-                    Log.e(TAG, "Invalid service description (null).");
-                    return false;
-                }
-
-                String[] data = s.split(" ");
-                if (data.length < 3) {
-                    Log.e(TAG, "Service specification invalid: " + s);
-                    return false;
-                }
-
-                try {
-                    if ("upnp".equals(data[0])) {
-                        int version = 0;
-                        try {
-                            version = Integer.parseInt(data[1], 16);
-                        } catch (NumberFormatException e) {
-                            Log.e(TAG, "UPnP Service specification invalid: " + s, e);
-                            return false;
-                        }
-                        mISupplicantP2pIface.removeUpnpService(version, data[2]);
-                    } else if ("bonjour".equals(data[0])) {
-                        if (data[1] != null) {
-                            byte[] request = null;
-                            try {
-                                request = NativeUtil.hexStringToByteArray(data[1]);
-                            } catch (IllegalArgumentException e) {
-                                Log.e(TAG, "Invalid bonjour service description.");
-                                return false;
-                            }
-                            mISupplicantP2pIface.removeBonjourService(request);
-                        }
-                    } else {
-                        Log.e(TAG, "Unknown / unsupported P2P service requested: " + data[0]);
-                        return false;
-                    }
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                    return false;
-                } catch (ServiceSpecificException e) {
-                    handleServiceSpecificException(e, methodStr);
-                    return false;
-                }
-            }
-
-            return true;
-        }
-    }
-
-    /**
-     * Schedule a P2P service discovery request. The parameters for this command
-     * are the device address of the peer device (or 00:00:00:00:00:00 for
-     * wildcard query that is sent to every discovered P2P peer that supports
-     * service discovery) and P2P Service Query TLV(s) as hexdump.
-     *
-     * @param peerAddress MAC address of the device to discover.
-     * @param query Hex dump of the query data.
-     * @return identifier Identifier for the request. Can be used to cancel the
-     *         request.
-     */
-    public String requestServiceDiscovery(String peerAddress, String query) {
-        synchronized (mLock) {
-            String methodStr = "requestServiceDiscovery";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-
-            if (peerAddress == null) {
-                Log.e(TAG, "Cannot parse null peer mac address.");
-                return null;
-            }
-
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not process peer MAC address.", e);
-                return null;
-            }
-
-            if (query == null) {
-                Log.e(TAG, "Cannot parse null service discovery query.");
-                return null;
-            }
-            byte[] binQuery = null;
-            try {
-                binQuery = NativeUtil.hexStringToByteArray(query);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse service query.", e);
-                return null;
-            }
-
-            try {
-                long result = mISupplicantP2pIface.requestServiceDiscovery(macAddress, binQuery);
-                return Long.toString(result);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Cancel a previous service discovery request.
-     *
-     * @param identifier Identifier for the request to cancel.
-     * @return true, if operation was successful.
-     */
-    public boolean cancelServiceDiscovery(String identifier) {
-        synchronized (mLock) {
-            String methodStr = "cancelServiceDiscovery";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (identifier == null) {
-                Log.e(TAG, "Received a null service discovery identifier.");
-                return false;
-            }
-
-            long id = 0;
-            try {
-                id = Long.parseLong(identifier);
-            } catch (NumberFormatException e) {
-                Log.e(TAG, "Service discovery identifier invalid: " + identifier, e);
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.cancelServiceDiscovery(id);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Send driver command to set Miracast mode.
-     *
-     * @param mode Mode of Miracast.
-     * @return true, if operation was successful.
-     */
-    public boolean setMiracastMode(int mode) {
-        synchronized (mLock) {
-            String methodStr = "setMiracastMode";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            byte targetMode = MiracastMode.DISABLED;
-            switch (mode) {
-                case WifiP2pManager.MIRACAST_SOURCE:
-                    targetMode = MiracastMode.SOURCE;
-                    break;
-                case WifiP2pManager.MIRACAST_SINK:
-                    targetMode = MiracastMode.SINK;
-                    break;
-            }
-
-            try {
-                mISupplicantP2pIface.setMiracastMode(targetMode);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Initiate WPS Push Button setup.
-     * The PBC operation requires that a button is also pressed at the
-     * AP/Registrar at about the same time (2 minute window).
-     *
-     * @param groupIfName Group interface name to use.
-     * @param bssid BSSID of the AP. Use empty bssid to indicate wildcard.
-     * @return true, if operation was successful.
-     */
-    public boolean startWpsPbc(String groupIfName, String bssid) {
-        synchronized (mLock) {
-            String methodStr = "startWpsPbc";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (TextUtils.isEmpty(groupIfName)) {
-                Log.e(TAG, "Group name required when requesting WPS PBC. Got empty string.");
-                return false;
-            }
-
-            // Null values should be fine, since bssid can be empty.
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(bssid);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse BSSID.", e);
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.startWpsPbc(groupIfName, macAddress);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Initiate WPS Pin Keypad setup.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param pin 8 digit pin to be used.
-     * @return true, if operation was successful.
-     */
-    public boolean startWpsPinKeypad(String groupIfName, String pin) {
-        synchronized (mLock) {
-            String methodStr = "startWpsPinKeypad";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (TextUtils.isEmpty(groupIfName)) {
-                Log.e(TAG, "Group name required when requesting WPS KEYPAD.");
-                return false;
-            }
-            if (TextUtils.isEmpty(pin)) {
-                Log.e(TAG, "PIN required when requesting WPS KEYPAD.");
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.startWpsPinKeypad(groupIfName, pin);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Initiate WPS Pin Display setup.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param bssid BSSID of the AP. Use empty bssid to indicate wildcard.
-     * @return generated pin if operation was successful, null otherwise.
-     */
-    public String startWpsPinDisplay(String groupIfName, String bssid) {
-        synchronized (mLock) {
-            String methodStr = "startWpsPinDisplay";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-            if (TextUtils.isEmpty(groupIfName)) {
-                Log.e(TAG, "Group name required when requesting WPS KEYPAD.");
-                return null;
-            }
-
-            // Null values should be fine, since bssid can be empty.
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(bssid);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse BSSID.", e);
-                return null;
-            }
-
-            try {
-                return mISupplicantP2pIface.startWpsPinDisplay(groupIfName, macAddress);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Cancel any ongoing WPS operations.
-     *
-     * @param groupIfName Group interface name to use.
-     * @return true, if operation was successful.
-     */
-    public boolean cancelWps(String groupIfName) {
-        synchronized (mLock) {
-            String methodStr = "cancelWps";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (groupIfName == null) {
-                Log.e(TAG, "Group name required when requesting WPS KEYPAD.");
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.cancelWps(groupIfName);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Enable/Disable Wifi Display.
-     *
-     * @param enable true to enable, false to disable.
-     * @return true, if operation was successful.
-     */
-    public boolean enableWfd(boolean enable) {
-        synchronized (mLock) {
-            String methodStr = "enableWfd";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.enableWfd(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-
-    /**
-     * Set Wifi Display device info.
-     *
-     * @param info WFD device info as described in section 5.1.2 of WFD technical
-     *        specification v1.0.0.
-     * @return true, if operation was successful.
-     */
-    public boolean setWfdDeviceInfo(String info) {
-        synchronized (mLock) {
-            String methodStr = "setWfdDeviceInfo";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (info == null) {
-                Log.e(TAG, "Cannot parse null WFD info string.");
-                return false;
-            }
-
-            byte[] wfdInfo = null;
-            try {
-                wfdInfo = NativeUtil.hexStringToByteArray(info);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse WFD Device Info string.");
-                return false;
-            }
-
-            try {
-                mISupplicantP2pIface.setWfdDeviceInfo(wfdInfo);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Remove network with provided id.
-     *
-     * @param networkId Id of the network to lookup.
-     * @return true, if operation was successful.
-     */
-    public boolean removeNetwork(int networkId) {
-        synchronized (mLock) {
-            String methodStr = "removeNetwork";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.removeNetwork(networkId);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * List the networks saved in wpa_supplicant.
-     *
-     * @return List of network ids.
-     */
-    private int[] listNetworks() {
-        synchronized (mLock) {
-            String methodStr = "listNetworks";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-            try {
-                return mISupplicantP2pIface.listNetworks();
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Get the supplicant P2p network object for the specified network ID.
-     *
-     * @param networkId Id of the network to lookup.
-     * @return ISupplicantP2pNetwork instance on success, null on failure.
-     */
-    private ISupplicantP2pNetwork getNetwork(int networkId) {
-        synchronized (mLock) {
-            String methodStr = "getNetwork";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-            try {
-                return mISupplicantP2pIface.getNetwork(networkId);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Get the persistent group list from wpa_supplicant's p2p mgmt interface
-     *
-     * @param groups WifiP2pGroupList to store persistent groups in
-     * @return true, if list has been modified.
-     */
-    public boolean loadGroups(WifiP2pGroupList groups) {
-        synchronized (mLock) {
-            String methodStr = "loadGroups";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            int[] networkIds = listNetworks();
-            if (networkIds == null || networkIds.length == 0) {
-                return false;
-            }
-            for (int networkId : networkIds) {
-                ISupplicantP2pNetwork network = getNetwork(networkId);
-                if (network == null) {
-                    Log.e(TAG, "Failed to retrieve network object for " + networkId);
-                    continue;
-                }
-
-                boolean gotResult = false;
-                boolean isCurrent = false;
-                try {
-                    isCurrent = network.isCurrent();
-                    gotResult = true;
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                } catch (ServiceSpecificException e) {
-                    handleServiceSpecificException(e, methodStr);
-                }
-
-                /** Skip the current network, if we're somehow getting networks from the p2p GO
-                 interface, instead of p2p mgmt interface*/
-                if (!gotResult || isCurrent) {
-                    Log.i(TAG, "Skipping current network");
-                    continue;
-                }
-
-                WifiP2pGroup group = new WifiP2pGroup();
-                group.setNetworkId(networkId);
-
-                // Now get the ssid, bssid and other flags for this network.
-                byte[] ssid = null;
-                gotResult = false;
-                try {
-                    ssid = network.getSsid();
-                    gotResult = true;
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                } catch (ServiceSpecificException e) {
-                    handleServiceSpecificException(e, methodStr);
-                }
-                if (gotResult && !ArrayUtils.isEmpty(ssid)) {
-                    group.setNetworkName(NativeUtil.removeEnclosingQuotes(
-                            NativeUtil.encodeSsid(
-                                    NativeUtil.byteArrayToArrayList(ssid))));
-                }
-
-                byte[] bssid = null;
-                gotResult = false;
-                try {
-                    bssid = network.getBssid();
-                    gotResult = true;
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                } catch (ServiceSpecificException e) {
-                    handleServiceSpecificException(e, methodStr);
-                }
-                if (gotResult && !ArrayUtils.isEmpty(bssid)) {
-                    WifiP2pDevice device = new WifiP2pDevice();
-                    device.deviceAddress = NativeUtil.macAddressFromByteArray(bssid);
-                    group.setOwner(device);
-                }
-
-                boolean isGroupOwner = false;
-                gotResult = false;
-                try {
-                    isGroupOwner = network.isGroupOwner();
-                    gotResult = true;
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                } catch (ServiceSpecificException e) {
-                    handleServiceSpecificException(e, methodStr);
-                }
-                if (gotResult) {
-                    group.setIsGroupOwner(isGroupOwner);
-                }
-                groups.add(group);
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Set WPS device name.
-     *
-     * @param name String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsDeviceName(String name) {
-        synchronized (mLock) {
-            String methodStr = "setWpsDeviceName";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (name == null) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.setWpsDeviceName(name);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set WPS device type.
-     *
-     * @param typeStr Type specified as a string. Used format: <categ>-<OUI>-<subcateg>
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsDeviceType(String typeStr) {
-        try {
-            Matcher match = WPS_DEVICE_TYPE_PATTERN.matcher(typeStr);
-            if (!match.find() || match.groupCount() != 3) {
-                Log.e(TAG, "Malformed WPS device type " + typeStr);
-                return false;
-            }
-            short categ = Short.parseShort(match.group(1));
-            byte[] oui = NativeUtil.hexStringToByteArray(match.group(2));
-            short subCateg = Short.parseShort(match.group(3));
-
-            byte[] bytes = new byte[8];
-            ByteBuffer byteBuffer = ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
-            byteBuffer.putShort(categ);
-            byteBuffer.put(oui);
-            byteBuffer.putShort(subCateg);
-            synchronized (mLock) {
-                String methodStr = "setWpsDeviceType";
-                if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                    return false;
-                }
-                try {
-                    mISupplicantP2pIface.setWpsDeviceType(bytes);
-                    return true;
-                } catch (RemoteException e) {
-                    handleRemoteException(e, methodStr);
-                } catch (ServiceSpecificException e) {
-                    handleServiceSpecificException(e, methodStr);
-                }
-            }
-        } catch (IllegalArgumentException e) {
-            Log.e(TAG, "Illegal argument " + typeStr, e);
-        }
-        return false;
-    }
-
-    /**
-     * Set WPS config methods
-     *
-     * @param configMethodsStr List of config methods.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsConfigMethods(String configMethodsStr) {
-        synchronized (mLock) {
-            String methodStr = "setWpsConfigMethods";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-
-            short configMethodsMask = 0;
-            String[] configMethodsStrArr = configMethodsStr.split("\\s+");
-            for (int i = 0; i < configMethodsStrArr.length; i++) {
-                configMethodsMask |= stringToWpsConfigMethod(configMethodsStrArr[i]);
-            }
-
-            try {
-                mISupplicantP2pIface.setWpsConfigMethods(configMethodsMask);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get NFC handover request message.
-     *
-     * @return select message if created successfully, null otherwise.
-     */
-    public String getNfcHandoverRequest() {
-        synchronized (mLock) {
-            String methodStr = "getNfcHandoverRequest";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-            try {
-                byte[] message = mISupplicantP2pIface.createNfcHandoverRequestMessage();
-                return NativeUtil.hexStringFromByteArray(message);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Invalid message received ", e);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Get NFC handover select message.
-     *
-     * @return select message if created successfully, null otherwise.
-     */
-    public String getNfcHandoverSelect() {
-        synchronized (mLock) {
-            String methodStr = "getNfcHandoverSelect";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-            try {
-                byte[] message = mISupplicantP2pIface.createNfcHandoverSelectMessage();
-                return NativeUtil.hexStringFromByteArray(message);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Invalid message received ", e);
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Report NFC handover select message.
-     *
-     * @return true if reported successfully, false otherwise.
-     */
-    public boolean initiatorReportNfcHandover(String selectMessage) {
-        synchronized (mLock) {
-            String methodStr = "initiatorReportNfcHandover";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (selectMessage == null) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.reportNfcHandoverInitiation(
-                        NativeUtil.hexStringToByteArray(selectMessage));
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + selectMessage, e);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Report NFC handover request message.
-     *
-     * @return true if reported successfully, false otherwise.
-     */
-    public boolean responderReportNfcHandover(String requestMessage) {
-        synchronized (mLock) {
-            String methodStr = "responderReportNfcHandover";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (requestMessage == null) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.reportNfcHandoverResponse(
-                        NativeUtil.hexStringToByteArray(requestMessage));
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + requestMessage, e);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set the client list for the provided network.
-     *
-     * @param networkId Id of the network.
-     * @param clientListStr Space separated list of clients.
-     * @return true, if operation was successful.
-     */
-    public boolean setClientList(int networkId, String clientListStr) {
-        synchronized (mLock) {
-            String methodStr = "setClientList";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (TextUtils.isEmpty(clientListStr)) {
-                Log.e(TAG, "Invalid client list");
-                return false;
-            }
-            ISupplicantP2pNetwork network = getNetwork(networkId);
-            if (network == null) {
-                Log.e(TAG, "Invalid network id ");
-                return false;
-            }
-
-            try {
-                String[] clientListArr = clientListStr.split("\\s+");
-                android.hardware.wifi.supplicant.MacAddress[] clients =
-                        new android.hardware.wifi.supplicant.MacAddress[clientListArr.length];
-                for (int i = 0; i < clientListArr.length; i++) {
-                    android.hardware.wifi.supplicant.MacAddress client =
-                            new android.hardware.wifi.supplicant.MacAddress();
-                    client.data = NativeUtil.macAddressToByteArray(clientListArr[i]);
-                    clients[i] = client;
-                }
-                network.setClientList(clients);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + clientListStr, e);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set the client list for the provided network.
-     *
-     * @param networkId Id of the network.
-     * @return Space separated list of clients if successful, null otherwise.
-     */
-    public String getClientList(int networkId) {
-        synchronized (mLock) {
-            String methodStr = "getClientList";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return null;
-            }
-            ISupplicantP2pNetwork network = getNetwork(networkId);
-            if (network == null) {
-                Log.e(TAG, "Invalid network id ");
-                return null;
-            }
-            try {
-                android.hardware.wifi.supplicant.MacAddress[] clients = network.getClientList();
-                String[] macStrings = new String[clients.length];
-                for (int i = 0; i < clients.length; i++) {
-                    try {
-                        macStrings[i] = NativeUtil.macAddressFromByteArray(clients[i].data);
-                    } catch (Exception e) {
-                        Log.e(TAG, "Invalid MAC address received ", e);
-                        return null;
-                    }
-                }
-                return String.join(" ", macStrings);
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return null;
-
-        }
-    }
-
-    /**
-     * Persist the current configurations to disk.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean saveConfig() {
-        synchronized (mLock) {
-            String methodStr = "saveConfig";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.saveConfig();
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-
-    /**
-     * Enable/Disable P2P MAC randomization.
-     *
-     * @param enable true to enable, false to disable.
-     * @return true, if operation was successful.
-     */
-    public boolean setMacRandomization(boolean enable) {
-        synchronized (mLock) {
-            String methodStr = "setMacRandomization";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.setMacRandomization(enable);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set Wifi Display R2 device info.
-     *
-     * @param info WFD R2 device info as described in section 5.1.12 of WFD technical
-     *        specification v2.1.
-     * @return true, if operation was successful.
-     */
-    public boolean setWfdR2DeviceInfo(String info) {
-        synchronized (mLock) {
-            String methodStr = "setWfdR2DeviceInfo";
-            if (info == null) {
-                Log.e(TAG, "Cannot parse null WFD info string.");
-                return false;
-            }
-
-            byte[] wfdR2Info = null;
-            try {
-                wfdR2Info = NativeUtil.hexStringToByteArray(info);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not parse WFD R2 Device Info string.");
-                return false;
-            }
-
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.setWfdR2DeviceInfo(wfdR2Info);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Remove the client with the MAC address from the group.
-     *
-     * @param peerAddress Mac address of the client.
-     * @param isLegacyClient Indicate if client is a legacy client or not.
-     * @return true if success
-     */
-    public boolean removeClient(String peerAddress, boolean isLegacyClient) {
-        synchronized (mLock) {
-            String methodStr = "removeClient";
-
-            if (peerAddress == null) {
-                Log.e(TAG, "Cannot parse null peer mac address.");
-                return false;
-            }
-
-            byte[] peerMacAddress;
-            try {
-                peerMacAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Peer mac address parse error.", e);
-                return false;
-            }
-
-
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.removeClient(peerMacAddress, isLegacyClient);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Set vendor-specific information elements to wpa_supplicant.
-     *
-     * @param vendorElements The list of vendor-specific information elements.
-     *
-     * @return boolean The value indicating whether operation was successful.
-     */
-    public boolean setVendorElements(Set<ScanResult.InformationElement> vendorElements) {
-        synchronized (mLock) {
-            String methodStr = "setVendorElements";
-            if (!checkP2pIfaceAndLogFailure(methodStr)) {
-                return false;
-            }
-            if (vendorElements == null) {
-                return false;
-            }
-            byte[] vendorElemBytes = convertInformationElementSetToBytes(
-                    vendorElements);
-            if (null == vendorElemBytes) {
-                Log.w(TAG, "Cannot convert vendor elements to bytes.");
-                return false;
-            }
-            try {
-                mISupplicantP2pIface.setVendorElements(
-                        P2pFrameTypeMask.P2P_FRAME_PROBE_RESP_P2P, vendorElemBytes);
-                return true;
-            } catch (RemoteException e) {
-                handleRemoteException(e, methodStr);
-            } catch (ServiceSpecificException e) {
-                handleServiceSpecificException(e, methodStr);
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Get the supported features.
-     *
-     * @return  bitmask defined by WifiP2pManager.FEATURE_*
-     */
-    public long getSupportedFeatures() {
-        // First AIDL version supports these three features.
-        return WifiP2pManager.FEATURE_SET_VENDOR_ELEMENTS
-                | WifiP2pManager.FEATURE_FLEXIBLE_DISCOVERY
-                | WifiP2pManager.FEATURE_GROUP_CLIENT_REMOVAL;
-    }
-
-    private byte[] convertInformationElementSetToBytes(
-            Set<ScanResult.InformationElement> ies) {
-        try {
-            ByteArrayOutputStream os = new ByteArrayOutputStream();
-            for (ScanResult.InformationElement ie: ies) {
-                os.write((byte) ie.id);
-                os.write((byte) (ie.bytes.length));
-                os.write(ie.bytes);
-            }
-            return os.toByteArray();
-        } catch (IOException ex) {
-            return null;
-        } catch (Exception ex) {
-            return null;
-        }
-    }
-
-    /**
-     * Converts the Wps config method string to the equivalent enum value.
-     */
-    private static short stringToWpsConfigMethod(String configMethod) {
-        switch (configMethod) {
-            case "usba":
-                return WpsConfigMethods.USBA;
-            case "ethernet":
-                return WpsConfigMethods.ETHERNET;
-            case "label":
-                return WpsConfigMethods.LABEL;
-            case "display":
-                return WpsConfigMethods.DISPLAY;
-            case "int_nfc_token":
-                return WpsConfigMethods.INT_NFC_TOKEN;
-            case "ext_nfc_token":
-                return WpsConfigMethods.EXT_NFC_TOKEN;
-            case "nfc_interface":
-                return WpsConfigMethods.NFC_INTERFACE;
-            case "push_button":
-                return WpsConfigMethods.PUSHBUTTON;
-            case "keypad":
-                return WpsConfigMethods.KEYPAD;
-            case "virtual_push_button":
-                return WpsConfigMethods.VIRT_PUSHBUTTON;
-            case "physical_push_button":
-                return WpsConfigMethods.PHY_PUSHBUTTON;
-            case "p2ps":
-                return WpsConfigMethods.P2PS;
-            case "virtual_display":
-                return WpsConfigMethods.VIRT_DISPLAY;
-            case "physical_display":
-                return WpsConfigMethods.PHY_DISPLAY;
-            default:
-                throw new IllegalArgumentException(
-                        "Invalid WPS config method: " + configMethod);
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceHalHidlImpl.java b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceHalHidlImpl.java
deleted file mode 100644
index d500d5d..0000000
--- a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceHalHidlImpl.java
+++ /dev/null
@@ -1,2761 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi.p2p;
-
-import android.annotation.NonNull;
-import android.hardware.wifi.supplicant.V1_0.ISupplicant;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantIface;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantNetwork;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pIface;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pIfaceCallback;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pNetwork;
-import android.hardware.wifi.supplicant.V1_0.IfaceType;
-import android.hardware.wifi.supplicant.V1_0.SupplicantStatus;
-import android.hardware.wifi.supplicant.V1_0.SupplicantStatusCode;
-import android.hardware.wifi.supplicant.V1_0.WpsConfigMethods;
-import android.hidl.manager.V1_0.IServiceManager;
-import android.hidl.manager.V1_0.IServiceNotification;
-import android.net.wifi.CoexUnsafeChannel;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WpsInfo;
-import android.net.wifi.p2p.WifiP2pConfig;
-import android.net.wifi.p2p.WifiP2pDevice;
-import android.net.wifi.p2p.WifiP2pGroup;
-import android.net.wifi.p2p.WifiP2pGroupList;
-import android.net.wifi.p2p.WifiP2pManager;
-import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
-import android.os.IHwBinder.DeathRecipient;
-import android.os.RemoteException;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.util.ArrayUtils;
-import com.android.server.wifi.util.NativeUtil;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-
-/**
- * Native calls sending requests to the P2P Hals, and callbacks for receiving P2P events
- */
-public class SupplicantP2pIfaceHalHidlImpl implements ISupplicantP2pIfaceHal {
-    private static final String TAG = "SupplicantP2pIfaceHalHidlImpl";
-    @VisibleForTesting
-    public static final String HAL_INSTANCE_NAME = "default";
-    private static boolean sVerboseLoggingEnabled = true;
-    private static boolean sHalVerboseLoggingEnabled = true;
-    private static final int RESULT_NOT_VALID = -1;
-    private static final int DEFAULT_OPERATING_CLASS = 81;
-    /**
-     * Regex pattern for extracting the wps device type bytes.
-     * Matches a strings like the following: "<categ>-<OUI>-<subcateg>";
-     */
-    private static final Pattern WPS_DEVICE_TYPE_PATTERN =
-            Pattern.compile("^(\\d{1,2})-([0-9a-fA-F]{8})-(\\d{1,2})$");
-
-    private final Object mLock = new Object();
-
-    // Supplicant HAL HIDL interface objects
-    private IServiceManager mIServiceManager = null;
-    private ISupplicant mISupplicant = null;
-    private ISupplicantIface mHidlSupplicantIface = null;
-    private ISupplicantP2pIface mISupplicantP2pIface = null;
-    private final IServiceNotification mServiceNotificationCallback =
-            new IServiceNotification.Stub() {
-        public void onRegistration(String fqName, String name, boolean preexisting) {
-            synchronized (mLock) {
-                if (sVerboseLoggingEnabled) {
-                    Log.i(TAG, "IServiceNotification.onRegistration for: " + fqName
-                            + ", " + name + " preexisting=" + preexisting);
-                }
-                if (!initSupplicantService()) {
-                    Log.e(TAG, "Initializing ISupplicant failed.");
-                    supplicantServiceDiedHandler();
-                } else {
-                    Log.i(TAG, "Completed initialization of ISupplicant interfaces.");
-                }
-            }
-        }
-    };
-    private final DeathRecipient mServiceManagerDeathRecipient =
-            cookie -> {
-                Log.w(TAG, "IServiceManager died: cookie=" + cookie);
-                synchronized (mLock) {
-                    supplicantServiceDiedHandler();
-                    mIServiceManager = null; // Will need to register a new ServiceNotification
-                }
-            };
-    private final DeathRecipient mSupplicantDeathRecipient =
-            cookie -> {
-                Log.w(TAG, "ISupplicant/ISupplicantP2pIface died: cookie=" + cookie);
-                synchronized (mLock) {
-                    supplicantServiceDiedHandler();
-                }
-            };
-
-    private final WifiP2pMonitor mMonitor;
-    private ISupplicantP2pIfaceCallback mCallback = null;
-
-    public SupplicantP2pIfaceHalHidlImpl(WifiP2pMonitor monitor) {
-        mMonitor = monitor;
-    }
-
-    private boolean linkToServiceManagerDeath() {
-        if (mIServiceManager == null) return false;
-        try {
-            if (!mIServiceManager.linkToDeath(mServiceManagerDeathRecipient, 0)) {
-                Log.wtf(TAG, "Error on linkToDeath on IServiceManager");
-                supplicantServiceDiedHandler();
-                mIServiceManager = null; // Will need to register a new ServiceNotification
-                return false;
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "IServiceManager.linkToDeath exception", e);
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Enable verbose logging for all sub modules.
-     *
-     * @param verboseEnabled Verbose flag set in overlay XML.
-     * @param halVerboseEnabled Verbose flag set by the user.
-     */
-    public static void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        sVerboseLoggingEnabled = verboseEnabled;
-        sHalVerboseLoggingEnabled = halVerboseEnabled;
-        SupplicantP2pIfaceCallback.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-        SupplicantP2pIfaceCallbackV1_4.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
-    }
-
-    /**
-     * Set the debug log level for wpa_supplicant
-     *
-     * @param turnOnVerbose Whether to turn on verbose logging or not.
-     * @param globalShowKeys Whether show keys is true in WifiGlobals.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setLogLevel(boolean turnOnVerbose, boolean globalShowKeys) {
-        synchronized (mLock) {
-            int logLevel = turnOnVerbose
-                    ? ISupplicant.DebugLevel.DEBUG
-                    : ISupplicant.DebugLevel.INFO;
-            return setDebugParams(logLevel, false,
-                    turnOnVerbose && globalShowKeys);
-        }
-    }
-
-    /** See ISupplicant.hal for documentation */
-    private boolean setDebugParams(int level, boolean showTimestamp, boolean showKeys) {
-        synchronized (mLock) {
-            if (mISupplicant == null) {
-                Log.e(TAG, "Got null ISupplicant service. Stopping supplicant HIDL startup");
-                return false;
-            }
-            try {
-                SupplicantStatus status =
-                        mISupplicant.setDebugParams(level, showTimestamp, showKeys);
-                if (status == null || status.code != SupplicantStatusCode.SUCCESS) {
-                    Log.e(TAG, "Failed to set debug params " + status);
-                    return false;
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "Exception while setting debug params for ISupplicant service: " + e);
-                supplicantServiceDiedHandler();
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Registers a service notification for the ISupplicant service, which triggers initialization
-     * of the ISupplicantP2pIface
-     * @return true if the service notification was successfully registered
-     */
-    public boolean initialize() {
-        if (sVerboseLoggingEnabled) Log.i(TAG, "Registering ISupplicant service ready callback.");
-        synchronized (mLock) {
-            if (mIServiceManager != null) {
-                Log.i(TAG, "Supplicant HAL already initialized.");
-                // Already have an IServiceManager and serviceNotification registered, don't
-                // don't register another.
-                return true;
-            }
-            mISupplicant = null;
-            mISupplicantP2pIface = null;
-            try {
-                mIServiceManager = getServiceManagerMockable();
-                if (mIServiceManager == null) {
-                    Log.e(TAG, "Failed to get HIDL Service Manager");
-                    return false;
-                }
-                if (!linkToServiceManagerDeath()) {
-                    return false;
-                }
-                /* TODO(b/33639391) : Use the new ISupplicant.registerForNotifications() once it
-                   exists */
-                if (!mIServiceManager.registerForNotifications(
-                        ISupplicant.kInterfaceName, "", mServiceNotificationCallback)) {
-                    Log.e(TAG, "Failed to register for notifications to "
-                            + ISupplicant.kInterfaceName);
-                    mIServiceManager = null; // Will need to register a new ServiceNotification
-                    return false;
-                }
-
-                // Successful completion by the end of the 'try' block. This will prevent reporting
-                // proper initialization after exception is caught.
-                return true;
-            } catch (RemoteException e) {
-                Log.e(TAG, "Exception while trying to register a listener for ISupplicant service: "
-                        + e);
-                supplicantServiceDiedHandler();
-            }
-            return false;
-        }
-    }
-
-    private boolean linkToSupplicantDeath() {
-        if (mISupplicant == null) return false;
-        try {
-            if (!mISupplicant.linkToDeath(mSupplicantDeathRecipient, 0)) {
-                Log.wtf(TAG, "Error on linkToDeath on ISupplicant");
-                supplicantServiceDiedHandler();
-                return false;
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "ISupplicant.linkToDeath exception", e);
-            return false;
-        }
-        return true;
-    }
-
-    private boolean initSupplicantService() {
-        synchronized (mLock) {
-            try {
-                mISupplicant = getSupplicantMockable();
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicant.getService exception: " + e);
-                return false;
-            }
-            if (mISupplicant == null) {
-                Log.e(TAG, "Got null ISupplicant service. Stopping supplicant HIDL startup");
-                return false;
-            }
-            if (!linkToSupplicantDeath()) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    private boolean linkToSupplicantP2pIfaceDeath() {
-        if (mISupplicantP2pIface == null) return false;
-        try {
-            if (!mISupplicantP2pIface.linkToDeath(mSupplicantDeathRecipient, 0)) {
-                Log.wtf(TAG, "Error on linkToDeath on ISupplicantP2pIface");
-                supplicantServiceDiedHandler();
-                return false;
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "ISupplicantP2pIface.linkToDeath exception", e);
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Setup the P2p iface.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    public boolean setupIface(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            if (mISupplicantP2pIface != null) return false;
-            ISupplicantIface ifaceHwBinder;
-            if (isV1_1()) {
-                ifaceHwBinder = addIfaceV1_1(ifaceName);
-            } else {
-                ifaceHwBinder = getIfaceV1_0(ifaceName);
-            }
-            if (ifaceHwBinder == null) {
-                Log.e(TAG, "initSupplicantP2pIface got null iface");
-                return false;
-            }
-            mISupplicantP2pIface = getP2pIfaceMockable(ifaceHwBinder);
-            if (!linkToSupplicantP2pIfaceDeath()) {
-                return false;
-            }
-            if (mISupplicantP2pIface != null && mMonitor != null) {
-                if (null != getP2pIfaceMockableV1_4()) {
-                    android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIfaceCallback callback =
-                            new SupplicantP2pIfaceCallbackV1_4(ifaceName);
-                    if (!registerCallbackV1_4(callback)) {
-                        Log.e(TAG, "Callback registration failed. Initialization incomplete.");
-                        return false;
-                    }
-                    mCallback = callback;
-                } else {
-                    mCallback = new SupplicantP2pIfaceCallback(ifaceName);
-                    if (!registerCallback(mCallback)) {
-                        Log.e(TAG, "Callback registration failed. Initialization incomplete.");
-                        return false;
-                    }
-                }
-            }
-            return true;
-        }
-    }
-
-    protected class SupplicantP2pIfaceCallback extends SupplicantP2pIfaceCallbackHidlImpl {
-        SupplicantP2pIfaceCallback(@NonNull String ifaceName) {
-            super(SupplicantP2pIfaceHalHidlImpl.this, ifaceName, mMonitor);
-        }
-    }
-
-    protected class SupplicantP2pIfaceCallbackV1_4 extends SupplicantP2pIfaceCallbackHidlV1_4Impl {
-        SupplicantP2pIfaceCallbackV1_4(@NonNull String ifaceName) {
-            super(SupplicantP2pIfaceHalHidlImpl.this, ifaceName, mMonitor);
-        }
-    }
-
-    private ISupplicantIface getIfaceV1_0(@NonNull String ifaceName) {
-        if (null == mISupplicant) {
-            Log.e(TAG, "Can't call getIface: ISupplicant is null");
-            return null;
-        }
-        /** List all supplicant Ifaces */
-        final ArrayList<ISupplicant.IfaceInfo> supplicantIfaces = new ArrayList();
-        try {
-            mISupplicant.listInterfaces((SupplicantStatus status,
-                                         ArrayList<ISupplicant.IfaceInfo> ifaces) -> {
-                if (status.code != SupplicantStatusCode.SUCCESS) {
-                    Log.e(TAG, "Getting Supplicant Interfaces failed: " + status.code);
-                    return;
-                }
-                supplicantIfaces.addAll(ifaces);
-            });
-        } catch (RemoteException e) {
-            Log.e(TAG, "ISupplicant.listInterfaces exception: " + e);
-            return null;
-        }
-        if (supplicantIfaces.size() == 0) {
-            Log.e(TAG, "Got zero HIDL supplicant ifaces. Stopping supplicant HIDL startup.");
-            supplicantServiceDiedHandler();
-            return null;
-        }
-        SupplicantResult<ISupplicantIface> supplicantIface =
-                new SupplicantResult("getInterface()");
-        for (ISupplicant.IfaceInfo ifaceInfo : supplicantIfaces) {
-            if (ifaceInfo.type == IfaceType.P2P && ifaceName.equals(ifaceInfo.name)) {
-                try {
-                    mISupplicant.getInterface(ifaceInfo,
-                            (SupplicantStatus status, ISupplicantIface iface) -> {
-                                if (status.code != SupplicantStatusCode.SUCCESS) {
-                                    Log.e(TAG, "Failed to get ISupplicantIface " + status.code);
-                                    return;
-                                }
-                                supplicantIface.setResult(status, iface);
-                            });
-                } catch (RemoteException | IllegalArgumentException e) {
-                    Log.e(TAG, "ISupplicant.getInterface exception: " + e);
-                    supplicantServiceDiedHandler();
-                    return null;
-                }
-                break;
-            }
-        }
-        return supplicantIface.getResult();
-    }
-
-    private ISupplicantIface addIfaceV1_1(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            ISupplicant.IfaceInfo ifaceInfo = new ISupplicant.IfaceInfo();
-            ifaceInfo.name = ifaceName;
-            ifaceInfo.type = IfaceType.P2P;
-            SupplicantResult<ISupplicantIface> supplicantIface =
-                    new SupplicantResult("addInterface(" + ifaceInfo + ")");
-            try {
-                android.hardware.wifi.supplicant.V1_1.ISupplicant supplicant_v1_1 =
-                        getSupplicantMockableV1_1();
-                if (supplicant_v1_1 == null) {
-                    Log.e(TAG, "Can't call addIface: ISupplicantP2pIface is null");
-                    return null;
-                }
-                supplicant_v1_1.addInterface(ifaceInfo,
-                        (SupplicantStatus status, ISupplicantIface iface) -> {
-                            if (status.code != SupplicantStatusCode.SUCCESS
-                                    && status.code != SupplicantStatusCode.FAILURE_IFACE_EXISTS) {
-                                Log.e(TAG, "Failed to get ISupplicantIface " + status.code);
-                                return;
-                            }
-                            supplicantIface.setResult(status, iface);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicant.addInterface exception: " + e);
-                supplicantServiceDiedHandler();
-                return null;
-            }
-            return supplicantIface.getResult();
-        }
-    }
-
-    /**
-     * Teardown the P2P interface.
-     *
-     * @param ifaceName Name of the interface.
-     * @return true on success, false otherwise.
-     */
-    public boolean teardownIface(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            if (mISupplicantP2pIface == null) return false;
-            // Only supported for V1.1
-            if (isV1_1()) {
-                return removeIfaceV1_1(ifaceName);
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Remove the P2p iface.
-     *
-     * @return true on success, false otherwise.
-     */
-    private boolean removeIfaceV1_1(@NonNull String ifaceName) {
-        synchronized (mLock) {
-            try {
-                android.hardware.wifi.supplicant.V1_1.ISupplicant supplicant_v1_1 =
-                        getSupplicantMockableV1_1();
-                if (supplicant_v1_1 == null) {
-                    Log.e(TAG, "Can't call removeIface: ISupplicantP2pIface is null");
-                    return false;
-                }
-                ISupplicant.IfaceInfo ifaceInfo = new ISupplicant.IfaceInfo();
-                ifaceInfo.name = ifaceName;
-                ifaceInfo.type = IfaceType.P2P;
-                SupplicantStatus status = supplicant_v1_1.removeInterface(ifaceInfo);
-                if (status.code != SupplicantStatusCode.SUCCESS) {
-                    Log.e(TAG, "Failed to remove iface " + status.code);
-                    return false;
-                }
-                mCallback = null;
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicant.removeInterface exception: " + e);
-                supplicantServiceDiedHandler();
-                return false;
-            }
-            mISupplicantP2pIface = null;
-            return true;
-        }
-    }
-
-    private void supplicantServiceDiedHandler() {
-        synchronized (mLock) {
-            mISupplicant = null;
-            mISupplicantP2pIface = null;
-        }
-    }
-
-
-    /**
-     * Signals whether initialization started successfully.
-     */
-    public boolean isInitializationStarted() {
-        synchronized (mLock) {
-            return mIServiceManager != null;
-        }
-    }
-
-    /**
-     * Signals whether initialization completed successfully. Only necessary for testing, is not
-     * needed to guard calls etc.
-     */
-    public boolean isInitializationComplete() {
-        return mISupplicant != null;
-    }
-
-    /**
-     * Indicates whether the HIDL service is declared. Uses the IServiceManager to check
-     * if the device is running a version >= V1_0 of the HAL from the VINTF for the device.
-     */
-    public static boolean serviceDeclared() {
-        try {
-            IServiceManager serviceManager = IServiceManager.getService();
-            String interfaceName = android.hardware.wifi.supplicant.V1_0.ISupplicant.kInterfaceName;
-            if (serviceManager.getTransport(interfaceName, HAL_INSTANCE_NAME)
-                    != IServiceManager.Transport.EMPTY) {
-                return true;
-            }
-            return false;
-        } catch (RemoteException e) {
-            Log.e(TAG, "Unable to check for existence of HIDL service.");
-            return false;
-        }
-    }
-
-    /**
-     * Wrapper functions to access static HAL methods, created to be mockable in unit tests
-     */
-    protected IServiceManager getServiceManagerMockable() throws RemoteException {
-        return IServiceManager.getService();
-    }
-
-    protected ISupplicant getSupplicantMockable() throws RemoteException {
-        try {
-            return ISupplicant.getService();
-        } catch (NoSuchElementException e) {
-            Log.e(TAG, "Failed to get ISupplicant", e);
-            return null;
-        }
-    }
-
-    protected android.hardware.wifi.supplicant.V1_1.ISupplicant getSupplicantMockableV1_1()
-            throws RemoteException {
-        synchronized (mLock) {
-            try {
-                return android.hardware.wifi.supplicant.V1_1.ISupplicant.castFrom(
-                        mISupplicant);
-            } catch (NoSuchElementException e) {
-                Log.e(TAG, "Failed to get ISupplicant", e);
-                return null;
-            }
-        }
-    }
-
-    protected ISupplicantP2pIface getP2pIfaceMockable(ISupplicantIface iface) {
-        return ISupplicantP2pIface.asInterface(iface.asBinder());
-    }
-
-    protected android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface
-            getP2pIfaceMockableV1_2() {
-        if (mISupplicantP2pIface == null) return null;
-        return android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface.castFrom(
-                mISupplicantP2pIface);
-    }
-
-    protected android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface
-            getP2pIfaceMockableV1_4() {
-        if (mISupplicantP2pIface == null) return null;
-        return android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface.castFrom(
-                mISupplicantP2pIface);
-    }
-
-    protected ISupplicantP2pNetwork getP2pNetworkMockable(ISupplicantNetwork network) {
-        return ISupplicantP2pNetwork.asInterface(network.asBinder());
-    }
-
-    /**
-     * Check if the device is running V1_1 supplicant service.
-     * @return
-     */
-    private boolean isV1_1() {
-        synchronized (mLock) {
-            try {
-                return (getSupplicantMockableV1_1() != null);
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicant.getService exception: " + e);
-                supplicantServiceDiedHandler();
-                return false;
-            }
-        }
-    }
-
-    protected static void logd(String s) {
-        if (sVerboseLoggingEnabled) Log.d(TAG, s);
-    }
-
-    protected static void logw(String s) {
-        Log.w(TAG, s);
-    }
-
-    protected static <S> void logCompletion(String operation, int code, String debugMessage) {
-        if (code == SupplicantStatusCode.SUCCESS) {
-            logd(operation + " completed successfully.");
-        } else {
-            Log.w(TAG, operation + " failed: " + code + " (" + debugMessage + ")");
-        }
-    }
-
-
-    /**
-     * Returns false if SupplicantP2pIface is null, and logs failure to call methodStr
-     */
-    private boolean checkSupplicantP2pIfaceAndLogFailure(String method) {
-        if (mISupplicantP2pIface == null) {
-            Log.e(TAG, "Can't call " + method + ": ISupplicantP2pIface is null");
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Returns SupplicantP2pIface on success, logs failure to call methodStr
-     * and returns false otherwise
-     */
-    private android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface
-            getSupplicantP2pIfaceAndLogFailureV1_2(String method) {
-        synchronized (mLock) {
-            android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface p2pIfaceV12 =
-                    getP2pIfaceMockableV1_2();
-            if (p2pIfaceV12 == null) {
-                Log.e(TAG, "Can't call " + method + ": ISupplicantP2pIface is null");
-                return null;
-            }
-            return p2pIfaceV12;
-        }
-    }
-
-    /**
-     * Returns SupplicantP2pIface on success, logs failure to call methodStr
-     * and returns false otherwise
-     */
-    private android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface
-            getSupplicantP2pIfaceAndLogFailureV1_4(String method) {
-        synchronized (mLock) {
-            android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface p2pIfaceV12 =
-                    getP2pIfaceMockableV1_4();
-            if (p2pIfaceV12 == null) {
-                Log.e(TAG, "Can't call " + method + ": ISupplicantP2pIface is null");
-                return null;
-            }
-            return p2pIfaceV12;
-        }
-    }
-
-    private int wpsInfoToConfigMethod(int info) {
-        switch (info) {
-            case WpsInfo.PBC:
-                return ISupplicantP2pIface.WpsProvisionMethod.PBC;
-
-            case WpsInfo.DISPLAY:
-                return ISupplicantP2pIface.WpsProvisionMethod.DISPLAY;
-
-            case WpsInfo.KEYPAD:
-            case WpsInfo.LABEL:
-                return ISupplicantP2pIface.WpsProvisionMethod.KEYPAD;
-
-            default:
-                Log.e(TAG, "Unsupported WPS provision method: " + info);
-                return RESULT_NOT_VALID;
-        }
-    }
-
-    /**
-     * Retrieves the name of the network interface.
-     *
-     * @return name Name of the network interface, e.g., wlan0
-     */
-    public String getName() {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("getName")) return null;
-            SupplicantResult<String> result = new SupplicantResult("getName()");
-
-            try {
-                mISupplicantP2pIface.getName(
-                        (SupplicantStatus status, String name) -> {
-                            result.setResult(status, name);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.getResult();
-        }
-    }
-
-
-    /**
-     * Register for callbacks from this interface.
-     *
-     * These callbacks are invoked for events that are specific to this interface.
-     * Registration of multiple callback objects is supported. These objects must
-     * be automatically deleted when the corresponding client process is dead or
-     * if this interface is removed.
-     *
-     * @param receiver An instance of the |ISupplicantP2pIfaceCallback| HIDL
-     *        interface object.
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean registerCallback(ISupplicantP2pIfaceCallback receiver) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("registerCallback")) return false;
-            SupplicantResult<Void> result = new SupplicantResult("registerCallback()");
-            try {
-                result.setResult(mISupplicantP2pIface.registerCallback(receiver));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Register for callbacks from this interface.
-     *
-     * These callbacks are invoked for events that are specific to this interface.
-     * Registration of multiple callback objects is supported. These objects must
-     * be automatically deleted when the corresponding client process is dead or
-     * if this interface is removed.
-     *
-     * @param receiver An instance of the |ISupplicantP2pIfaceCallback| HIDL
-     *        interface object.
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean registerCallbackV1_4(
-            android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIfaceCallback receiver) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("registerCallbackV1_4")) return false;
-            android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface ifaceV14 =
-                    getP2pIfaceMockableV1_4();
-            if (null == ifaceV14) return false;
-            SupplicantResultV1_4<Void> result =
-                    new SupplicantResultV1_4("registerCallbackV1_4()");
-            try {
-                result.setResult(ifaceV14.registerCallback_1_4(receiver));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Initiate a P2P service discovery with a (optional) timeout.
-     *
-     * @param timeout Max time to be spent is performing discovery.
-     *        Set to 0 to indefinitely continue discovery until an explicit
-     *        |stopFind| is sent.
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean find(int timeout) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("find")) return false;
-
-            if (timeout < 0) {
-                Log.e(TAG, "Invalid timeout value: " + timeout);
-                return false;
-            }
-            SupplicantResult<Void> result = new SupplicantResult("find(" + timeout + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.find(timeout));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Initiate a P2P device discovery with a scan type, a (optional) frequency, and a (optional)
-     * timeout.
-     *
-     * @param type indicates what channels to scan.
-     *        Valid values are {@link WifiP2pManager#WIFI_P2P_SCAN_FULL} for doing full P2P scan,
-     *        {@link WifiP2pManager#WIFI_P2P_SCAN_SOCIAL} for scanning social channels,
-     *        {@link WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ} for scanning a specified frequency.
-     * @param freq is the frequency to be scanned.
-     *        The possible values are:
-     *        <ul>
-     *        <li> A valid frequency for {@link WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ}</li>
-     *        <li> {@link WifiP2pManager#WIFI_P2P_SCAN_FREQ_UNSPECIFIED} for
-     *          {@link WifiP2pManager#WIFI_P2P_SCAN_FULL} and
-     *          {@link WifiP2pManager#WIFI_P2P_SCAN_SOCIAL}</li>
-     *        </ul>
-     * @param timeout Max time to be spent is performing discovery.
-     *        Set to 0 to indefinitely continue discovery until an explicit
-     *        |stopFind| is sent.
-     * @return false, for it's not supported in HIDL.
-     */
-    public boolean find(@WifiP2pManager.WifiP2pScanType int type, int freq, int timeout) {
-        return false;
-    }
-
-    /**
-     * Stop an ongoing P2P service discovery.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean stopFind() {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("stopFind")) return false;
-            SupplicantResult<Void> result = new SupplicantResult("stopFind()");
-            try {
-                result.setResult(mISupplicantP2pIface.stopFind());
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Flush P2P peer table and state.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean flush() {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("flush")) return false;
-            SupplicantResult<Void> result = new SupplicantResult("flush()");
-            try {
-                result.setResult(mISupplicantP2pIface.flush());
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * This command can be used to flush all services from the
-     * device.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean serviceFlush() {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("serviceFlush")) return false;
-            SupplicantResult<Void> result = new SupplicantResult("serviceFlush()");
-            try {
-                result.setResult(mISupplicantP2pIface.flushServices());
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Turn on/off power save mode for the interface.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param enable Indicate if power save is to be turned on/off.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean setPowerSave(String groupIfName, boolean enable) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setPowerSave")) return false;
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "setPowerSave(" + groupIfName + ", " + enable + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.setPowerSave(groupIfName, enable));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Set the Maximum idle time in seconds for P2P groups.
-     * This value controls how long a P2P group is maintained after there
-     * is no other members in the group. As a group owner, this means no
-     * associated stations in the group. As a P2P client, this means no
-     * group owner seen in scan results.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param timeoutInSec Timeout value in seconds.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean setGroupIdle(String groupIfName, int timeoutInSec) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setGroupIdle")) return false;
-            // Basic checking here. Leave actual parameter validation to supplicant.
-            if (timeoutInSec < 0) {
-                Log.e(TAG, "Invalid group timeout value " + timeoutInSec);
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "setGroupIdle(" + groupIfName + ", " + timeoutInSec + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.setGroupIdle(groupIfName, timeoutInSec));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Set the postfix to be used for P2P SSID's.
-     *
-     * @param postfix String to be appended to SSID.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean setSsidPostfix(String postfix) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setSsidPostfix")) return false;
-            // Basic checking here. Leave actual parameter validation to supplicant.
-            if (postfix == null) {
-                Log.e(TAG, "Invalid SSID postfix value (null).");
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult("setSsidPostfix(" + postfix + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.setSsidPostfix(
-                        NativeUtil.decodeSsid("\"" + postfix + "\"")));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Could not decode SSID.", e);
-                return false;
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Start P2P group formation with a discovered P2P peer. This includes
-     * optional group owner negotiation, group interface setup, provisioning,
-     * and establishing data connection.
-     *
-     * @param config Configuration to use to connect to remote device.
-     * @param joinExistingGroup Indicates that this is a command to join an
-     *        existing group as a client. It skips the group owner negotiation
-     *        part. This must send a Provision Discovery Request message to the
-     *        target group owner before associating for WPS provisioning.
-     *
-     * @return String containing generated pin, if selected provision method
-     *        uses PIN.
-     */
-    public String connect(WifiP2pConfig config, boolean joinExistingGroup) {
-        if (config == null) return null;
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setSsidPostfix")) return null;
-
-            if (config == null) {
-                Log.e(TAG, "Could not connect: null config.");
-                return null;
-            }
-
-            if (config.deviceAddress == null) {
-                Log.e(TAG, "Could not parse null mac address.");
-                return null;
-            }
-
-            if (config.wps.setup == WpsInfo.PBC && !TextUtils.isEmpty(config.wps.pin)) {
-                Log.e(TAG, "Expected empty pin for PBC.");
-                return null;
-            }
-
-            byte[] peerAddress = null;
-            try {
-                peerAddress = NativeUtil.macAddressToByteArray(config.deviceAddress);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse peer mac address.", e);
-                return null;
-            }
-
-            int provisionMethod = wpsInfoToConfigMethod(config.wps.setup);
-            if (provisionMethod == RESULT_NOT_VALID) {
-                Log.e(TAG, "Invalid WPS config method: " + config.wps.setup);
-                return null;
-            }
-            // NOTE: preSelectedPin cannot be null, otherwise hal would crash.
-            String preSelectedPin = TextUtils.isEmpty(config.wps.pin) ? "" : config.wps.pin;
-            boolean persistent = (config.netId == WifiP2pGroup.NETWORK_ID_PERSISTENT);
-
-            if (config.groupOwnerIntent < 0 || config.groupOwnerIntent > 15) {
-                Log.e(TAG, "Invalid group owner intent: " + config.groupOwnerIntent);
-                return null;
-            }
-
-            SupplicantResult<String> result = new SupplicantResult(
-                    "connect(" + config.deviceAddress + ")");
-            try {
-                mISupplicantP2pIface.connect(
-                        peerAddress, provisionMethod, preSelectedPin, joinExistingGroup,
-                        persistent, config.groupOwnerIntent,
-                        (SupplicantStatus status, String generatedPin) -> {
-                            result.setResult(status, generatedPin);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.getResult();
-        }
-    }
-
-    /**
-     * Cancel an ongoing P2P group formation and joining-a-group related
-     * operation. This operation unauthorizes the specific peer device (if any
-     * had been authorized to start group formation), stops P2P find (if in
-     * progress), stops pending operations for join-a-group, and removes the
-     * P2P group interface (if one was used) that is in the WPS provisioning
-     * step. If the WPS provisioning step has been completed, the group is not
-     * terminated.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean cancelConnect() {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("cancelConnect")) return false;
-            SupplicantResult<Void> result = new SupplicantResult("cancelConnect()");
-            try {
-                result.setResult(mISupplicantP2pIface.cancelConnect());
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Send P2P provision discovery request to the specified peer. The
-     * parameters for this command are the P2P device address of the peer and the
-     * desired configuration method.
-     *
-     * @param config Config class describing peer setup.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean provisionDiscovery(WifiP2pConfig config) {
-        if (config == null) return false;
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("provisionDiscovery")) return false;
-
-            int targetMethod = wpsInfoToConfigMethod(config.wps.setup);
-            if (targetMethod == RESULT_NOT_VALID) {
-                Log.e(TAG, "Unrecognized WPS configuration method: " + config.wps.setup);
-                return false;
-            }
-            if (targetMethod == ISupplicantP2pIface.WpsProvisionMethod.DISPLAY) {
-                // We are doing display, so provision discovery is keypad.
-                targetMethod = ISupplicantP2pIface.WpsProvisionMethod.KEYPAD;
-            } else if (targetMethod == ISupplicantP2pIface.WpsProvisionMethod.KEYPAD) {
-                // We are doing keypad, so provision discovery is display.
-                targetMethod = ISupplicantP2pIface.WpsProvisionMethod.DISPLAY;
-            }
-
-            if (config.deviceAddress == null) {
-                Log.e(TAG, "Cannot parse null mac address.");
-                return false;
-            }
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(config.deviceAddress);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse peer mac address.", e);
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "provisionDiscovery(" + config.deviceAddress + ", " + config.wps.setup + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.provisionDiscovery(macAddress, targetMethod));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Invite a device to a persistent group.
-     * If the peer device is the group owner of the persistent group, the peer
-     * parameter is not needed. Otherwise it is used to specify which
-     * device to invite. |goDeviceAddress| parameter may be used to override
-     * the group owner device address for Invitation Request should it not be
-     * known for some reason (this should not be needed in most cases).
-     *
-     * @param group Group object to use.
-     * @param peerAddress MAC address of the device to invite.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean invite(WifiP2pGroup group, String peerAddress) {
-        if (TextUtils.isEmpty(peerAddress)) return false;
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("invite")) return false;
-            if (group == null) {
-                Log.e(TAG, "Cannot invite to null group.");
-                return false;
-            }
-
-            if (group.getOwner() == null) {
-                Log.e(TAG, "Cannot invite to group with null owner.");
-                return false;
-            }
-
-            if (group.getOwner().deviceAddress == null) {
-                Log.e(TAG, "Group owner has no mac address.");
-                return false;
-            }
-
-            byte[] ownerMacAddress = null;
-            try {
-                ownerMacAddress = NativeUtil.macAddressToByteArray(group.getOwner().deviceAddress);
-            } catch (Exception e) {
-                Log.e(TAG, "Group owner mac address parse error.", e);
-                return false;
-            }
-
-            if (peerAddress == null) {
-                Log.e(TAG, "Cannot parse peer mac address.");
-                return false;
-            }
-
-            byte[] peerMacAddress;
-            try {
-                peerMacAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (Exception e) {
-                Log.e(TAG, "Peer mac address parse error.", e);
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "invite(" + group.getInterface() + ", " + group.getOwner().deviceAddress
-                            + ", " + peerAddress + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.invite(
-                        group.getInterface(), ownerMacAddress, peerMacAddress));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Reject connection attempt from a peer (specified with a device
-     * address). This is a mechanism to reject a pending group owner negotiation
-     * with a peer and request to automatically block any further connection or
-     * discovery of the peer.
-     *
-     * @param peerAddress MAC address of the device to reject.
-     *
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean reject(String peerAddress) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("reject")) return false;
-
-            if (peerAddress == null) {
-                Log.e(TAG, "Cannot parse rejected peer's mac address.");
-                return false;
-            }
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse peer mac address.", e);
-                return false;
-            }
-
-            SupplicantResult<Void> result =
-                    new SupplicantResult("reject(" + peerAddress + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.reject(macAddress));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Gets the MAC address of the device.
-     *
-     * @return MAC address of the device.
-     */
-    public String getDeviceAddress() {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("getDeviceAddress")) return null;
-            SupplicantResult<String> result = new SupplicantResult("getDeviceAddress()");
-            try {
-                mISupplicantP2pIface.getDeviceAddress((SupplicantStatus status, byte[] address) -> {
-                    String parsedAddress = null;
-                    try {
-                        parsedAddress = NativeUtil.macAddressFromByteArray(address);
-                    } catch (Exception e) {
-                        Log.e(TAG, "Could not process reported address.", e);
-                    }
-                    result.setResult(status, parsedAddress);
-                });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-                return null;
-            }
-
-            return result.getResult();
-        }
-    }
-
-
-    /**
-     * Gets the operational SSID of the device.
-     *
-     * @param address MAC address of the peer.
-     *
-     * @return SSID of the device.
-     */
-    public String getSsid(String address) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("getSsid")) return null;
-
-            if (address == null) {
-                Log.e(TAG, "Cannot parse peer mac address.");
-                return null;
-            }
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(address);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse mac address.", e);
-                return null;
-            }
-
-            SupplicantResult<String> result =
-                    new SupplicantResult("getSsid(" + address + ")");
-            try {
-                mISupplicantP2pIface.getSsid(
-                        macAddress, (SupplicantStatus status, ArrayList<Byte> ssid) -> {
-                            String ssidString = null;
-                            if (ssid != null) {
-                                try {
-                                    ssidString = NativeUtil.removeEnclosingQuotes(
-                                            NativeUtil.encodeSsid(ssid));
-                                } catch (Exception e) {
-                                    Log.e(TAG, "Could not encode SSID.", e);
-                                }
-                            }
-                            result.setResult(status, ssidString);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-                return null;
-            }
-
-            return result.getResult();
-        }
-    }
-
-
-    /**
-     * Reinvoke a device from a persistent group.
-     *
-     * @param networkId Used to specify the persistent group.
-     * @param peerAddress MAC address of the device to reinvoke.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean reinvoke(int networkId, String peerAddress) {
-        if (TextUtils.isEmpty(peerAddress) || networkId < 0) return false;
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("reinvoke")) return false;
-            if (peerAddress == null) {
-                Log.e(TAG, "Cannot parse peer mac address.");
-                return false;
-            }
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse mac address.", e);
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "reinvoke(" + networkId + ", " + peerAddress + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.reinvoke(networkId, macAddress));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Set up a P2P group owner manually (i.e., without group owner
-     * negotiation with a specific peer). This is also known as autonomous
-     * group owner.
-     *
-     * @param networkId Used to specify the restart of a persistent group.
-     * @param isPersistent Used to request a persistent group to be formed.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean groupAdd(int networkId, boolean isPersistent) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("groupAdd")) return false;
-            SupplicantResult<Void> result =
-                    new SupplicantResult("groupAdd(" + networkId + ", " + isPersistent + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.addGroup(isPersistent, networkId));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Set up a P2P group as Group Owner or join a group with a configuration.
-     *
-     * @param networkName SSID of the group to be formed
-     * @param passphrase passphrase of the group to be formed
-     * @param isPersistent Used to request a persistent group to be formed.
-     * @param freq preferred frequency or band of the group to be formed
-     * @param peerAddress peerAddress Group Owner MAC address, only applied for Group Client.
-     *        If the MAC is "00:00:00:00:00:00", the device will try to find a peer
-     *        whose SSID matches ssid.
-     * @param join join a group or create a group
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean groupAdd(String networkName, String passphrase,
-            boolean isPersistent, int freq, String peerAddress, boolean join) {
-        synchronized (mLock) {
-            android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface ifaceV12 =
-                    getSupplicantP2pIfaceAndLogFailureV1_2("groupAdd_1_2");
-            if (ifaceV12 == null) return false;
-
-            java.util.ArrayList<Byte> ssid = NativeUtil.decodeSsid("\"" + networkName + "\"");
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse mac address.", e);
-                return false;
-            }
-
-            SupplicantResult<Void> result =
-                    new SupplicantResult("groupAdd(" + networkName + ", "
-                        + (TextUtils.isEmpty(passphrase) ? "<Empty>" : "<Non-Empty>")
-                        + ", " + isPersistent + ", " + freq
-                        + ", " + peerAddress + ", " + join + ")");
-            try {
-                result.setResult(ifaceV12.addGroup_1_2(
-                        ssid, passphrase, isPersistent, freq, macAddress, join));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Terminate a P2P group. If a new virtual network interface was used for
-     * the group, it must also be removed. The network interface name of the
-     * group interface is used as a parameter for this command.
-     *
-     * @param groupName Group interface name to use.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean groupRemove(String groupName) {
-        if (TextUtils.isEmpty(groupName)) return false;
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("groupRemove")) return false;
-            SupplicantResult<Void> result = new SupplicantResult("groupRemove(" + groupName + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.removeGroup(groupName));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Gets the capability of the group which the device is a
-     * member of.
-     *
-     * @param peerAddress MAC address of the peer.
-     *
-     * @return combination of |GroupCapabilityMask| values.
-     */
-    public int getGroupCapability(String peerAddress) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("getGroupCapability")) {
-                return RESULT_NOT_VALID;
-            }
-
-            if (peerAddress == null) {
-                Log.e(TAG, "Cannot parse peer mac address.");
-                return RESULT_NOT_VALID;
-            }
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse group address.", e);
-                return RESULT_NOT_VALID;
-            }
-
-            SupplicantResult<Integer> capability = new SupplicantResult(
-                    "getGroupCapability(" + peerAddress + ")");
-            try {
-                mISupplicantP2pIface.getGroupCapability(
-                        macAddress, (SupplicantStatus status, int cap) -> {
-                            capability.setResult(status, cap);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            if (!capability.isSuccess()) {
-                return RESULT_NOT_VALID;
-            }
-
-            return capability.getResult();
-        }
-    }
-
-
-    /**
-     * Configure Extended Listen Timing.
-     *
-     * If enabled, listen state must be entered every |intervalInMillis| for at
-     * least |periodInMillis|. Both values have acceptable range of 1-65535
-     * (with interval obviously having to be larger than or equal to duration).
-     * If the P2P module is not idle at the time the Extended Listen Timing
-     * timeout occurs, the Listen State operation must be skipped.
-     *
-     * @param enable Enables or disables listening.
-     * @param periodInMillis Period in milliseconds.
-     * @param intervalInMillis Interval in milliseconds.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean configureExtListen(boolean enable, int periodInMillis, int intervalInMillis) {
-        if (enable && intervalInMillis < periodInMillis) {
-            return false;
-        }
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("configureExtListen")) return false;
-
-            // If listening is disabled, wpa supplicant expects zeroes.
-            if (!enable) {
-                periodInMillis = 0;
-                intervalInMillis = 0;
-            }
-
-            // Verify that the integers are not negative. Leave actual parameter validation to
-            // supplicant.
-            if (periodInMillis < 0 || intervalInMillis < 0) {
-                Log.e(TAG, "Invalid parameters supplied to configureExtListen: " + periodInMillis
-                        + ", " + intervalInMillis);
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "configureExtListen(" + periodInMillis + ", " + intervalInMillis + ")");
-            try {
-                result.setResult(
-                        mISupplicantP2pIface.configureExtListen(periodInMillis, intervalInMillis));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Set P2P Listen channel.
-     *
-     * @param listenChannel Wifi channel. eg, 1, 6, 11.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean setListenChannel(int listenChannel) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setListenChannel")) return false;
-
-            // There is no original channel recorded in supplicant, so just return true.
-            if (0 == listenChannel) return true;
-
-            // Using channels other than 1, 6, and 11 would result in discovery issue.
-            if (listenChannel != 1 && listenChannel != 6 && listenChannel != 11) {
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "setListenChannel(" + listenChannel + ", " + DEFAULT_OPERATING_CLASS + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.setListenChannel(
-                        listenChannel, DEFAULT_OPERATING_CLASS));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Set P2P operating channel.
-     *
-     * @param operatingChannel the desired operating channel.
-     * @param unsafeChannels channels which p2p cannot use.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean setOperatingChannel(int operatingChannel,
-            @NonNull List<CoexUnsafeChannel> unsafeChannels) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setOperatingChannel")) return false;
-            if (null == unsafeChannels) return false;
-
-            ArrayList<ISupplicantP2pIface.FreqRange> ranges = new ArrayList<>();
-            if (operatingChannel >= 1 && operatingChannel <= 165) {
-                int freq = (operatingChannel <= 14 ? 2407 : 5000) + operatingChannel * 5;
-                ISupplicantP2pIface.FreqRange range1 =  new ISupplicantP2pIface.FreqRange();
-                range1.min = 1000;
-                range1.max = freq - 5;
-                ISupplicantP2pIface.FreqRange range2 =  new ISupplicantP2pIface.FreqRange();
-                range2.min = freq + 5;
-                range2.max = 6000;
-                ranges.add(range1);
-                ranges.add(range2);
-            }
-            if (SdkLevel.isAtLeastS()) {
-                for (CoexUnsafeChannel cuc: unsafeChannels) {
-                    int centerFreq = ScanResult.convertChannelToFrequencyMhzIfSupported(
-                            cuc.getChannel(), cuc.getBand());
-                    ISupplicantP2pIface.FreqRange range = new ISupplicantP2pIface.FreqRange();
-                    // The range boundaries are inclusive in native frequency inclusion check.
-                    // Minusing one to avoid affecting neighbors.
-                    range.min = centerFreq - 5 - 1;
-                    range.max = centerFreq + 5 - 1;
-                    ranges.add(range);
-                }
-            }
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "setDisallowedFrequencies(" + ranges + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.setDisallowedFrequencies(ranges));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * This command can be used to add a upnp/bonjour service.
-     *
-     * @param servInfo List of service queries.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean serviceAdd(WifiP2pServiceInfo servInfo) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("serviceAdd")) return false;
-
-            if (servInfo == null) {
-                Log.e(TAG, "Null service info passed.");
-                return false;
-            }
-
-            for (String s : servInfo.getSupplicantQueryList()) {
-                if (s == null) {
-                    Log.e(TAG, "Invalid service description (null).");
-                    return false;
-                }
-
-                String[] data = s.split(" ");
-                if (data.length < 3) {
-                    Log.e(TAG, "Service specification invalid: " + s);
-                    return false;
-                }
-
-                SupplicantResult<Void> result = null;
-                try {
-                    if ("upnp".equals(data[0])) {
-                        int version = 0;
-                        try {
-                            version = Integer.parseInt(data[1], 16);
-                        } catch (NumberFormatException e) {
-                            Log.e(TAG, "UPnP Service specification invalid: " + s, e);
-                            return false;
-                        }
-
-                        result = new SupplicantResult(
-                                "addUpnpService(" + data[1] + ", " + data[2] + ")");
-                        result.setResult(mISupplicantP2pIface.addUpnpService(version, data[2]));
-                    } else if ("bonjour".equals(data[0])) {
-                        if (data[1] != null && data[2] != null) {
-                            ArrayList<Byte> request = null;
-                            ArrayList<Byte> response = null;
-                            try {
-                                request = NativeUtil.byteArrayToArrayList(
-                                        NativeUtil.hexStringToByteArray(data[1]));
-                                response = NativeUtil.byteArrayToArrayList(
-                                        NativeUtil.hexStringToByteArray(data[2]));
-                            } catch (Exception e) {
-                                Log.e(TAG, "Invalid bonjour service description.");
-                                return false;
-                            }
-                            result = new SupplicantResult(
-                                    "addBonjourService(" + data[1] + ", " + data[2] + ")");
-                            result.setResult(
-                                    mISupplicantP2pIface.addBonjourService(request, response));
-                        }
-                    } else {
-                        return false;
-                    }
-                } catch (RemoteException e) {
-                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                    supplicantServiceDiedHandler();
-                }
-
-                if (result == null || !result.isSuccess()) return false;
-            }
-
-            return true;
-        }
-    }
-
-
-    /**
-     * This command can be used to remove a upnp/bonjour service.
-     *
-     * @param servInfo List of service queries.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean serviceRemove(WifiP2pServiceInfo servInfo) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("serviceRemove")) return false;
-
-            if (servInfo == null) {
-                Log.e(TAG, "Null service info passed.");
-                return false;
-            }
-
-            for (String s : servInfo.getSupplicantQueryList()) {
-                if (s == null) {
-                    Log.e(TAG, "Invalid service description (null).");
-                    return false;
-                }
-
-                String[] data = s.split(" ");
-                if (data.length < 3) {
-                    Log.e(TAG, "Service specification invalid: " + s);
-                    return false;
-                }
-
-                SupplicantResult<Void> result = null;
-                try {
-                    if ("upnp".equals(data[0])) {
-                        int version = 0;
-                        try {
-                            version = Integer.parseInt(data[1], 16);
-                        } catch (NumberFormatException e) {
-                            Log.e(TAG, "UPnP Service specification invalid: " + s, e);
-                            return false;
-                        }
-                        result = new SupplicantResult(
-                                "removeUpnpService(" + data[1] + ", " + data[2] + ")");
-                        result.setResult(mISupplicantP2pIface.removeUpnpService(version, data[2]));
-                    } else if ("bonjour".equals(data[0])) {
-                        if (data[1] != null) {
-                            ArrayList<Byte> request = null;
-                            try {
-                                request = NativeUtil.byteArrayToArrayList(
-                                    NativeUtil.hexStringToByteArray(data[1]));
-                            } catch (Exception e) {
-                                Log.e(TAG, "Invalid bonjour service description.");
-                                return false;
-                            }
-                            result = new SupplicantResult("removeBonjourService(" + data[1] + ")");
-                            result.setResult(mISupplicantP2pIface.removeBonjourService(request));
-                        }
-                    } else {
-                        Log.e(TAG, "Unknown / unsupported P2P service requested: " + data[0]);
-                        return false;
-                    }
-                } catch (RemoteException e) {
-                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                    supplicantServiceDiedHandler();
-                }
-
-                if (result == null || !result.isSuccess()) return false;
-            }
-
-            return true;
-        }
-    }
-
-
-    /**
-     * Schedule a P2P service discovery request. The parameters for this command
-     * are the device address of the peer device (or 00:00:00:00:00:00 for
-     * wildcard query that is sent to every discovered P2P peer that supports
-     * service discovery) and P2P Service Query TLV(s) as hexdump.
-     *
-     * @param peerAddress MAC address of the device to discover.
-     * @param query Hex dump of the query data.
-     * @return identifier Identifier for the request. Can be used to cancel the
-     *         request.
-     */
-    public String requestServiceDiscovery(String peerAddress, String query) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("requestServiceDiscovery")) return null;
-
-            if (peerAddress == null) {
-                Log.e(TAG, "Cannot parse peer mac address.");
-                return null;
-            }
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(peerAddress);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not process peer MAC address.", e);
-                return null;
-            }
-
-            if (query == null) {
-                Log.e(TAG, "Cannot parse service discovery query: " + query);
-                return null;
-            }
-            ArrayList<Byte> binQuery = null;
-            try {
-                binQuery = NativeUtil.byteArrayToArrayList(NativeUtil.hexStringToByteArray(query));
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse service query.", e);
-                return null;
-            }
-
-            SupplicantResult<Long> result = new SupplicantResult(
-                    "requestServiceDiscovery(" + peerAddress + ", " + query + ")");
-            try {
-                mISupplicantP2pIface.requestServiceDiscovery(
-                        macAddress, binQuery,
-                        (SupplicantStatus status, long identifier) -> {
-                            result.setResult(status, new Long(identifier));
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            Long value = result.getResult();
-            if (value == null) return null;
-            return value.toString();
-        }
-    }
-
-
-    /**
-     * Cancel a previous service discovery request.
-     *
-     * @param identifier Identifier for the request to cancel.
-     * @return true, if operation was successful.
-     */
-    public boolean cancelServiceDiscovery(String identifier) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("cancelServiceDiscovery")) return false;
-            if (identifier == null) {
-                Log.e(TAG, "cancelServiceDiscovery requires a valid tag.");
-                return false;
-            }
-
-            long id = 0;
-            try {
-                id = Long.parseLong(identifier);
-            } catch (NumberFormatException e) {
-                Log.e(TAG, "Service discovery identifier invalid: " + identifier, e);
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "cancelServiceDiscovery(" + identifier + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.cancelServiceDiscovery(id));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Send driver command to set Miracast mode.
-     *
-     * @param mode Mode of Miracast.
-     * @return true, if operation was successful.
-     */
-    public boolean setMiracastMode(int mode) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setMiracastMode")) return false;
-            byte targetMode = ISupplicantP2pIface.MiracastMode.DISABLED;
-
-            switch (mode) {
-                case WifiP2pManager.MIRACAST_SOURCE:
-                    targetMode = ISupplicantP2pIface.MiracastMode.SOURCE;
-                    break;
-
-                case WifiP2pManager.MIRACAST_SINK:
-                    targetMode = ISupplicantP2pIface.MiracastMode.SINK;
-                    break;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "setMiracastMode(" + mode + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.setMiracastMode(targetMode));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Initiate WPS Push Button setup.
-     * The PBC operation requires that a button is also pressed at the
-     * AP/Registrar at about the same time (2 minute window).
-     *
-     * @param groupIfName Group interface name to use.
-     * @param bssid BSSID of the AP. Use empty bssid to indicate wildcard.
-     * @return true, if operation was successful.
-     */
-    public boolean startWpsPbc(String groupIfName, String bssid) {
-        if (TextUtils.isEmpty(groupIfName)) {
-            Log.e(TAG, "Group name required when requesting WPS PBC. Got (" + groupIfName + ")");
-            return false;
-        }
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("startWpsPbc")) return false;
-            // Null values should be fine, since bssid can be empty.
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(bssid);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse BSSID.", e);
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "startWpsPbc(" + groupIfName + ", " + bssid + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.startWpsPbc(groupIfName, macAddress));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Initiate WPS Pin Keypad setup.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param pin 8 digit pin to be used.
-     * @return true, if operation was successful.
-     */
-    public boolean startWpsPinKeypad(String groupIfName, String pin) {
-        if (TextUtils.isEmpty(groupIfName) || TextUtils.isEmpty(pin)) return false;
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("startWpsPinKeypad")) return false;
-            if (groupIfName == null) {
-                Log.e(TAG, "Group name required when requesting WPS KEYPAD.");
-                return false;
-            }
-            if (pin == null) {
-                Log.e(TAG, "PIN required when requesting WPS KEYPAD.");
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "startWpsPinKeypad(" + groupIfName + ", " + pin + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.startWpsPinKeypad(groupIfName, pin));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Initiate WPS Pin Display setup.
-     *
-     * @param groupIfName Group interface name to use.
-     * @param bssid BSSID of the AP. Use empty bssid to indicate wildcard.
-     * @return generated pin if operation was successful, null otherwise.
-     */
-    public String startWpsPinDisplay(String groupIfName, String bssid) {
-        if (TextUtils.isEmpty(groupIfName)) return null;
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("startWpsPinDisplay")) return null;
-            if (groupIfName == null) {
-                Log.e(TAG, "Group name required when requesting WPS KEYPAD.");
-                return null;
-            }
-
-            // Null values should be fine, since bssid can be empty.
-            byte[] macAddress = null;
-            try {
-                macAddress = NativeUtil.macAddressToByteArray(bssid);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse BSSID.", e);
-                return null;
-            }
-
-            SupplicantResult<String> result = new SupplicantResult(
-                    "startWpsPinDisplay(" + groupIfName + ", " + bssid + ")");
-            try {
-                mISupplicantP2pIface.startWpsPinDisplay(
-                        groupIfName, macAddress,
-                        (SupplicantStatus status, String generatedPin) -> {
-                            result.setResult(status, generatedPin);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.getResult();
-        }
-    }
-
-
-    /**
-     * Cancel any ongoing WPS operations.
-     *
-     * @param groupIfName Group interface name to use.
-     * @return true, if operation was successful.
-     */
-    public boolean cancelWps(String groupIfName) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("cancelWps")) return false;
-            if (groupIfName == null) {
-                Log.e(TAG, "Group name required when requesting WPS KEYPAD.");
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "cancelWps(" + groupIfName + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.cancelWps(groupIfName));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Enable/Disable Wifi Display.
-     *
-     * @param enable true to enable, false to disable.
-     * @return true, if operation was successful.
-     */
-    public boolean enableWfd(boolean enable) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("enableWfd")) return false;
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "enableWfd(" + enable + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.enableWfd(enable));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Set Wifi Display device info.
-     *
-     * @param info WFD device info as described in section 5.1.2 of WFD technical
-     *        specification v1.0.0.
-     * @return true, if operation was successful.
-     */
-    public boolean setWfdDeviceInfo(String info) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setWfdDeviceInfo")) return false;
-
-            if (info == null) {
-                Log.e(TAG, "Cannot parse null WFD info string.");
-                return false;
-            }
-            byte[] wfdInfo = null;
-            try {
-                wfdInfo = NativeUtil.hexStringToByteArray(info);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse WFD Device Info string.");
-                return false;
-            }
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "setWfdDeviceInfo(" + info + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.setWfdDeviceInfo(wfdInfo));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Remove network with provided id.
-     *
-     * @param networkId Id of the network to lookup.
-     * @return true, if operation was successful.
-     */
-    public boolean removeNetwork(int networkId) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("removeNetwork")) return false;
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "removeNetwork(" + networkId + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.removeNetwork(networkId));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * List the networks saved in wpa_supplicant.
-     *
-     * @return List of network ids.
-     */
-    private List<Integer> listNetworks() {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("listNetworks")) return null;
-            SupplicantResult<ArrayList> result = new SupplicantResult("listNetworks()");
-            try {
-                mISupplicantP2pIface.listNetworks(
-                        (SupplicantStatus status, ArrayList<Integer> networkIds) -> {
-                            result.setResult(status, networkIds);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.getResult();
-        }
-    }
-
-    /**
-     * Get the supplicant P2p network object for the specified network ID.
-     *
-     * @param networkId Id of the network to lookup.
-     * @return ISupplicantP2pNetwork instance on success, null on failure.
-     */
-    private ISupplicantP2pNetwork getNetwork(int networkId) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("getNetwork")) return null;
-            SupplicantResult<ISupplicantNetwork> result =
-                    new SupplicantResult("getNetwork(" + networkId + ")");
-            try {
-                mISupplicantP2pIface.getNetwork(
-                        networkId,
-                        (SupplicantStatus status, ISupplicantNetwork network) -> {
-                            result.setResult(status, network);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            if (result.getResult() == null) {
-                Log.e(TAG, "getNetwork got null network");
-                return null;
-            }
-            return getP2pNetworkMockable(result.getResult());
-        }
-    }
-
-    /**
-     * Get the persistent group list from wpa_supplicant's p2p mgmt interface
-     *
-     * @param groups WifiP2pGroupList to store persistent groups in
-     * @return true, if list has been modified.
-     */
-    public boolean loadGroups(WifiP2pGroupList groups) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("loadGroups")) return false;
-            List<Integer> networkIds = listNetworks();
-            if (networkIds == null || networkIds.isEmpty()) {
-                return false;
-            }
-            for (Integer networkId : networkIds) {
-                ISupplicantP2pNetwork network = getNetwork(networkId);
-                if (network == null) {
-                    Log.e(TAG, "Failed to retrieve network object for " + networkId);
-                    continue;
-                }
-                SupplicantResult<Boolean> resultIsCurrent =
-                        new SupplicantResult("isCurrent(" + networkId + ")");
-                try {
-                    network.isCurrent(
-                            (SupplicantStatus status, boolean isCurrent) -> {
-                                resultIsCurrent.setResult(status, isCurrent);
-                            });
-                } catch (RemoteException e) {
-                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                    supplicantServiceDiedHandler();
-                }
-                /** Skip the current network, if we're somehow getting networks from the p2p GO
-                    interface, instead of p2p mgmt interface*/
-                if (!resultIsCurrent.isSuccess() || resultIsCurrent.getResult()) {
-                    Log.i(TAG, "Skipping current network");
-                    continue;
-                }
-
-                WifiP2pGroup group = new WifiP2pGroup();
-                group.setNetworkId(networkId);
-
-                // Now get the ssid, bssid and other flags for this network.
-                SupplicantResult<ArrayList> resultSsid =
-                        new SupplicantResult("getSsid(" + networkId + ")");
-                try {
-                    network.getSsid(
-                            (SupplicantStatus status, ArrayList<Byte> ssid) -> {
-                                resultSsid.setResult(status, ssid);
-                            });
-                } catch (RemoteException e) {
-                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                    supplicantServiceDiedHandler();
-                }
-                if (resultSsid.isSuccess() && resultSsid.getResult() != null
-                        && !resultSsid.getResult().isEmpty()) {
-                    group.setNetworkName(NativeUtil.removeEnclosingQuotes(
-                            NativeUtil.encodeSsid(resultSsid.getResult())));
-                }
-
-                SupplicantResult<byte[]> resultBssid =
-                        new SupplicantResult("getBssid(" + networkId + ")");
-                try {
-                    network.getBssid(
-                            (SupplicantStatus status, byte[] bssid) -> {
-                                resultBssid.setResult(status, bssid);
-                            });
-                } catch (RemoteException e) {
-                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                    supplicantServiceDiedHandler();
-                }
-                if (resultBssid.isSuccess() && !ArrayUtils.isEmpty(resultBssid.getResult())) {
-                    WifiP2pDevice device = new WifiP2pDevice();
-                    device.deviceAddress =
-                            NativeUtil.macAddressFromByteArray(resultBssid.getResult());
-                    group.setOwner(device);
-                }
-
-                SupplicantResult<Boolean> resultIsGo =
-                        new SupplicantResult("isGo(" + networkId + ")");
-                try {
-                    network.isGo(
-                            (SupplicantStatus status, boolean isGo) -> {
-                                resultIsGo.setResult(status, isGo);
-                            });
-                } catch (RemoteException e) {
-                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                    supplicantServiceDiedHandler();
-                }
-                if (resultIsGo.isSuccess()) {
-                    group.setIsGroupOwner(resultIsGo.getResult());
-                }
-                groups.add(group);
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Set WPS device name.
-     *
-     * @param name String to be set.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsDeviceName(String name) {
-        if (name == null) {
-            return false;
-        }
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setWpsDeviceName")) return false;
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "setWpsDeviceName(" + name + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.setWpsDeviceName(name));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Set WPS device type.
-     *
-     * @param typeStr Type specified as a string. Used format: <categ>-<OUI>-<subcateg>
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsDeviceType(String typeStr) {
-        try {
-            Matcher match = WPS_DEVICE_TYPE_PATTERN.matcher(typeStr);
-            if (!match.find() || match.groupCount() != 3) {
-                Log.e(TAG, "Malformed WPS device type " + typeStr);
-                return false;
-            }
-            short categ = Short.parseShort(match.group(1));
-            byte[] oui = NativeUtil.hexStringToByteArray(match.group(2));
-            short subCateg = Short.parseShort(match.group(3));
-
-            byte[] bytes = new byte[8];
-            ByteBuffer byteBuffer = ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
-            byteBuffer.putShort(categ);
-            byteBuffer.put(oui);
-            byteBuffer.putShort(subCateg);
-            synchronized (mLock) {
-                if (!checkSupplicantP2pIfaceAndLogFailure("setWpsDeviceType")) return false;
-                SupplicantResult<Void> result = new SupplicantResult(
-                        "setWpsDeviceType(" + typeStr + ")");
-                try {
-                    result.setResult(mISupplicantP2pIface.setWpsDeviceType(bytes));
-                } catch (RemoteException e) {
-                    Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                    supplicantServiceDiedHandler();
-                }
-                return result.isSuccess();
-            }
-        } catch (IllegalArgumentException e) {
-            Log.e(TAG, "Illegal argument " + typeStr, e);
-            return false;
-        }
-    }
-
-    /**
-     * Set WPS config methods
-     *
-     * @param configMethodsStr List of config methods.
-     * @return true if request is sent successfully, false otherwise.
-     */
-    public boolean setWpsConfigMethods(String configMethodsStr) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setWpsConfigMethods")) return false;
-            SupplicantResult<Void> result =
-                    new SupplicantResult("setWpsConfigMethods(" + configMethodsStr + ")");
-            short configMethodsMask = 0;
-            String[] configMethodsStrArr = configMethodsStr.split("\\s+");
-            for (int i = 0; i < configMethodsStrArr.length; i++) {
-                configMethodsMask |= stringToWpsConfigMethod(configMethodsStrArr[i]);
-            }
-            try {
-                result.setResult(mISupplicantP2pIface.setWpsConfigMethods(configMethodsMask));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Get NFC handover request message.
-     *
-     * @return select message if created successfully, null otherwise.
-     */
-    public String getNfcHandoverRequest() {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("getNfcHandoverRequest")) return null;
-            SupplicantResult<ArrayList> result = new SupplicantResult(
-                    "getNfcHandoverRequest()");
-            try {
-                mISupplicantP2pIface.createNfcHandoverRequestMessage(
-                        (SupplicantStatus status, ArrayList<Byte> message) -> {
-                            result.setResult(status, message);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            if (!result.isSuccess()) {
-                return null;
-
-            }
-            return NativeUtil.hexStringFromByteArray(
-                    NativeUtil.byteArrayFromArrayList(result.getResult()));
-        }
-    }
-
-    /**
-     * Get NFC handover select message.
-     *
-     * @return select message if created successfully, null otherwise.
-     */
-    public String getNfcHandoverSelect() {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("getNfcHandoverSelect")) return null;
-            SupplicantResult<ArrayList> result = new SupplicantResult(
-                    "getNfcHandoverSelect()");
-            try {
-                mISupplicantP2pIface.createNfcHandoverSelectMessage(
-                        (SupplicantStatus status, ArrayList<Byte> message) -> {
-                            result.setResult(status, message);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            if (!result.isSuccess()) {
-                return null;
-
-            }
-            return NativeUtil.hexStringFromByteArray(
-                    NativeUtil.byteArrayFromArrayList(result.getResult()));
-        }
-    }
-
-    /**
-     * Report NFC handover select message.
-     *
-     * @return true if reported successfully, false otherwise.
-     */
-    public boolean initiatorReportNfcHandover(String selectMessage) {
-        if (selectMessage == null) return false;
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("initiatorReportNfcHandover")) return false;
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "initiatorReportNfcHandover(" + selectMessage + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.reportNfcHandoverInitiation(
-                        NativeUtil.byteArrayToArrayList(NativeUtil.hexStringToByteArray(
-                            selectMessage))));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + selectMessage, e);
-                return false;
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Report NFC handover request message.
-     *
-     * @return true if reported successfully, false otherwise.
-     */
-    public boolean responderReportNfcHandover(String requestMessage) {
-        if (requestMessage == null) return false;
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("responderReportNfcHandover")) return false;
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "responderReportNfcHandover(" + requestMessage + ")");
-            try {
-                result.setResult(mISupplicantP2pIface.reportNfcHandoverResponse(
-                        NativeUtil.byteArrayToArrayList(NativeUtil.hexStringToByteArray(
-                            requestMessage))));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + requestMessage, e);
-                return false;
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Set the client list for the provided network.
-     *
-     * @param networkId Id of the network.
-     * @param clientListStr Space separated list of clients.
-     * @return true, if operation was successful.
-     */
-    public boolean setClientList(int networkId, String clientListStr) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("setClientList")) return false;
-            if (TextUtils.isEmpty(clientListStr)) {
-                Log.e(TAG, "Invalid client list");
-                return false;
-            }
-            ISupplicantP2pNetwork network = getNetwork(networkId);
-            if (network == null) {
-                Log.e(TAG, "Invalid network id ");
-                return false;
-            }
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "setClientList(" + networkId + ", " + clientListStr + ")");
-            try {
-                ArrayList<byte[]> clients = new ArrayList<>();
-                for (String clientStr : Arrays.asList(clientListStr.split("\\s+"))) {
-                    clients.add(NativeUtil.macAddressToByteArray(clientStr));
-                }
-                result.setResult(network.setClientList(clients));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Illegal argument " + clientListStr, e);
-                return false;
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Set the client list for the provided network.
-     *
-     * @param networkId Id of the network.
-     * @return Space separated list of clients if successful, null otherwise.
-     */
-    public String getClientList(int networkId) {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("getClientList")) return null;
-            ISupplicantP2pNetwork network = getNetwork(networkId);
-            if (network == null) {
-                Log.e(TAG, "Invalid network id ");
-                return null;
-            }
-            SupplicantResult<ArrayList> result = new SupplicantResult(
-                    "getClientList(" + networkId + ")");
-            try {
-                network.getClientList(
-                        (SupplicantStatus status, ArrayList<byte[]> clients) -> {
-                            result.setResult(status, clients);
-                        });
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            if (!result.isSuccess()) {
-                return null;
-            }
-            ArrayList<byte[]> clients = result.getResult();
-            return clients.stream()
-                    .map(NativeUtil::macAddressFromByteArray)
-                    .collect(Collectors.joining(" "));
-        }
-    }
-
-    /**
-     * Persist the current configurations to disk.
-     *
-     * @return true, if operation was successful.
-     */
-    public boolean saveConfig() {
-        synchronized (mLock) {
-            if (!checkSupplicantP2pIfaceAndLogFailure("saveConfig")) return false;
-            SupplicantResult<Void> result = new SupplicantResult("saveConfig()");
-            try {
-                result.setResult(mISupplicantP2pIface.saveConfig());
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-
-    /**
-     * Enable/Disable P2P MAC randomization.
-     *
-     * @param enable true to enable, false to disable.
-     * @return true, if operation was successful.
-     */
-    public boolean setMacRandomization(boolean enable) {
-        synchronized (mLock) {
-            android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface ifaceV12 =
-                    getSupplicantP2pIfaceAndLogFailureV1_2("setMacRandomization");
-            if (ifaceV12 == null) return false;
-
-            SupplicantResult<Void> result = new SupplicantResult(
-                    "setMacRandomization(" + enable + ")");
-            try {
-                result.setResult(ifaceV12.setMacRandomization(enable));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Set Wifi Display R2 device info.
-     *
-     * @param info WFD R2 device info as described in section 5.1.12 of WFD technical
-     *        specification v2.1.
-     * @return true, if operation was successful.
-     */
-    public boolean setWfdR2DeviceInfo(String info) {
-        synchronized (mLock) {
-            if (info == null) {
-                Log.e(TAG, "Cannot parse null WFD info string.");
-                return false;
-            }
-            byte[] wfdR2Info = null;
-            try {
-                wfdR2Info = NativeUtil.hexStringToByteArray(info);
-            } catch (Exception e) {
-                Log.e(TAG, "Could not parse WFD R2 Device Info string.");
-                return false;
-            }
-
-            android.hardware.wifi.supplicant.V1_4.ISupplicantP2pIface ifaceV14 =
-                    getSupplicantP2pIfaceAndLogFailureV1_4("setWfdR2DeviceInfo");
-            if (ifaceV14 == null) return false;
-            SupplicantResultV1_4<Void> result = new SupplicantResultV1_4(
-                    "setWfdR2DeviceInfo(" + info + ")");
-            try {
-                result.setResult(ifaceV14.setWfdR2DeviceInfo(wfdR2Info));
-            } catch (RemoteException e) {
-                Log.e(TAG, "ISupplicantP2pIface exception: " + e);
-                supplicantServiceDiedHandler();
-            }
-            return result.isSuccess();
-        }
-    }
-
-    /**
-     * Remove the client with the MAC address from the group.
-     *
-     * @param peerAddress Mac address of the client.
-     * @param isLegacyClient Indicate if client is a legacy client or not.
-     * @return true if success
-     */
-    public boolean removeClient(String peerAddress, boolean isLegacyClient) {
-        Log.d(TAG, "removeClient() is not supported.");
-        return false;
-    }
-
-    /**
-     * Set vendor-specific information elements to wpa_supplicant.
-     *
-     * @param vendorElements The list of vendor-specific information elements.
-     *
-     * @return boolean The value indicating whether operation was successful.
-     */
-    public boolean setVendorElements(Set<ScanResult.InformationElement> vendorElements) {
-        Log.d(TAG, "setVendorElements() is not supported.");
-        return false;
-    }
-
-    /**
-     * Converts the Wps config method string to the equivalent enum value.
-     */
-    private static short stringToWpsConfigMethod(String configMethod) {
-        switch (configMethod) {
-            case "usba":
-                return WpsConfigMethods.USBA;
-            case "ethernet":
-                return WpsConfigMethods.ETHERNET;
-            case "label":
-                return WpsConfigMethods.LABEL;
-            case "display":
-                return WpsConfigMethods.DISPLAY;
-            case "int_nfc_token":
-                return WpsConfigMethods.INT_NFC_TOKEN;
-            case "ext_nfc_token":
-                return WpsConfigMethods.EXT_NFC_TOKEN;
-            case "nfc_interface":
-                return WpsConfigMethods.NFC_INTERFACE;
-            case "push_button":
-                return WpsConfigMethods.PUSHBUTTON;
-            case "keypad":
-                return WpsConfigMethods.KEYPAD;
-            case "virtual_push_button":
-                return WpsConfigMethods.VIRT_PUSHBUTTON;
-            case "physical_push_button":
-                return WpsConfigMethods.PHY_PUSHBUTTON;
-            case "p2ps":
-                return WpsConfigMethods.P2PS;
-            case "virtual_display":
-                return WpsConfigMethods.VIRT_DISPLAY;
-            case "physical_display":
-                return WpsConfigMethods.PHY_DISPLAY;
-            default:
-                throw new IllegalArgumentException(
-                        "Invalid WPS config method: " + configMethod);
-        }
-    }
-
-    /** Container class allowing propagation of status and/or value
-     * from callbacks.
-     *
-     * Primary purpose is to allow callback lambdas to provide results
-     * to parent methods.
-     */
-    private static class SupplicantResultBase<S, E> {
-        private String mMethodName;
-        private S mStatus;
-        private E mValue;
-
-        SupplicantResultBase(String methodName) {
-            mMethodName = methodName;
-            mStatus = null;
-            mValue = null;
-            logd("entering " + mMethodName);
-        }
-
-        public void setResult(S status, E value) {
-            if (status == null) {
-                logw(mMethodName + " failed: no status code returned.");
-            } else {
-                logCompletion(mMethodName, getCode(status), getDebugMessage(status));
-            }
-            logd("leaving " + mMethodName + " with result = " + value);
-            mStatus = status;
-            mValue = value;
-        }
-
-        public void setResult(S status) {
-            if (status == null) {
-                logw(mMethodName + " failed: no status code returned.");
-            } else {
-                logCompletion(mMethodName, getCode(status), getDebugMessage(status));
-            }
-            logd("leaving " + mMethodName);
-            mStatus = status;
-        }
-
-        public boolean isSuccess() {
-            return (mStatus != null
-                    && (getCode(mStatus) == SupplicantStatusCode.SUCCESS
-                    || getCode(mStatus) == SupplicantStatusCode.FAILURE_IFACE_EXISTS));
-        }
-
-        public E getResult() {
-            return (isSuccess() ? mValue : null);
-        }
-
-        protected int getCode(Object obj) {
-            SupplicantStatus status = (SupplicantStatus) obj;
-            return status.code;
-        }
-
-        protected String getDebugMessage(Object obj) {
-            SupplicantStatus status = (SupplicantStatus) obj;
-            return status.debugMessage;
-        }
-    }
-
-    private static class SupplicantResult<E>
-            extends SupplicantResultBase<SupplicantStatus, E> {
-        SupplicantResult(String iface) {
-            super(iface);
-        }
-    }
-
-    private static class SupplicantResultV1_4<E>
-            extends SupplicantResultBase<
-                    android.hardware.wifi.supplicant.V1_4.SupplicantStatus, E> {
-        SupplicantResultV1_4(String iface) {
-            super(iface);
-        }
-
-        protected int getCode(Object obj) {
-            android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
-                    (android.hardware.wifi.supplicant.V1_4.SupplicantStatus) obj;
-            return status.code;
-        }
-
-        protected String getDebugMessage(Object obj) {
-            android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
-                    (android.hardware.wifi.supplicant.V1_4.SupplicantStatus) obj;
-            return status.debugMessage;
-        }
-    }
-}
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pMetrics.java b/service/java/com/android/server/wifi/p2p/WifiP2pMetrics.java
index 5349bf9..085a837 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pMetrics.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pMetrics.java
@@ -22,11 +22,9 @@
 import android.util.Log;
 
 import com.android.server.wifi.Clock;
-import com.android.server.wifi.proto.WifiStatsLog;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.GroupEvent;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.P2pConnectionEvent;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiP2pStats;
-import com.android.server.wifi.util.StringUtil;
 
 import java.io.PrintWriter;
 import java.util.ArrayList;
@@ -169,11 +167,8 @@
                 Calendar c = Calendar.getInstance();
                 c.setTimeInMillis(event.startTimeMillis);
                 sb.append("startTime=");
-                if (event.startTimeMillis == 0) {
-                    sb.append("            <null>");
-                } else {
-                    sb.append(StringUtil.calendarToString(c));
-                }
+                sb.append(event.startTimeMillis == 0 ? "            <null>" :
+                        String.format("%tm-%td %tH:%tM:%tS.%tL", c, c, c, c, c, c));
                 sb.append(", connectionType=");
                 switch (event.connectionType) {
                     case P2pConnectionEvent.CONNECTION_FRESH:
@@ -215,18 +210,6 @@
                 }
                 sb.append(", durationTakenToConnectMillis=");
                 sb.append(event.durationTakenToConnectMillis);
-                sb.append(", groupRole=");
-                switch (event.groupRole) {
-                    case GroupEvent.GROUP_OWNER:
-                        sb.append("OWNER");
-                        break;
-                    case GroupEvent.GROUP_CLIENT:
-                        sb.append("CLIENT");
-                        break;
-                    default:
-                        sb.append("UNKNOWN DURING CONNECT");
-                        break;
-                }
                 sb.append(", connectivityLevelFailureCode=");
                 switch (event.connectivityLevelFailureCode) {
                     case P2pConnectionEvent.CLF_NONE:
@@ -329,15 +312,14 @@
     }
 
     /**
-     * Create a new connection event. Call when p2p attempts to make a new connection to
+     * Create a new connection event. Call when p2p attmpts to make a new connection to
      * another peer. If there is a current 'un-ended' connection event, it will be ended with
-     * P2pConnectionEvent.CLF_NEW_CONNECTION_ATTEMPT.
+     * P2pConnectionEvent.CLF_NEW_CONNNECTION_ATTEMPT.
      *
      * @param connectionType indicate this connection is fresh or reinvoke.
      * @param config configuration used for this connection.
-     * @param groupRole groupRole used for this connection.
      */
-    public void startConnectionEvent(int connectionType, WifiP2pConfig config, int groupRole) {
+    public void startConnectionEvent(int connectionType, WifiP2pConfig config) {
         synchronized (mLock) {
             // handle overlapping connection event first.
             if (mCurrentConnectionEvent != null) {
@@ -352,7 +334,6 @@
             mCurrentConnectionEvent = new P2pConnectionEvent();
             mCurrentConnectionEvent.startTimeMillis = mClock.getWallClockMillis();
             mCurrentConnectionEvent.connectionType = connectionType;
-            mCurrentConnectionEvent.groupRole = groupRole;
             if (config != null) {
                 mCurrentConnectionEvent.wpsMethod = config.wps.setup;
             }
@@ -374,8 +355,7 @@
                 // Reinvoking a group with invitation will be handled in supplicant.
                 // There won't be a connection starting event in framework.
                 // THe framework only get the connection ending event in GroupStarted state.
-                startConnectionEvent(P2pConnectionEvent.CONNECTION_REINVOKE, null,
-                        GroupEvent.GROUP_UNKNOWN);
+                startConnectionEvent(P2pConnectionEvent.CONNECTION_REINVOKE, null);
             }
 
             mCurrentConnectionEvent.durationTakenToConnectMillis = (int)
@@ -383,65 +363,10 @@
                     - mCurrentConnectionEventStartTime);
             mCurrentConnectionEvent.connectivityLevelFailureCode = failure;
 
-            WifiStatsLog.write(WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED,
-                    convertConnectionType(mCurrentConnectionEvent.connectionType),
-                    mCurrentConnectionEvent.durationTakenToConnectMillis,
-                    mCurrentConnectionEvent.durationTakenToConnectMillis / 200,
-                    convertFailureCode(failure),
-                    convertGroupRole(mCurrentConnectionEvent.groupRole));
             mCurrentConnectionEvent = null;
         }
     }
 
-    private int convertConnectionType(int connectionType) {
-        switch (connectionType) {
-            case P2pConnectionEvent.CONNECTION_FRESH:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__TYPE__FRESH;
-            case P2pConnectionEvent.CONNECTION_REINVOKE:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__TYPE__REINVOKE;
-            case P2pConnectionEvent.CONNECTION_LOCAL:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__TYPE__LOCAL;
-            case P2pConnectionEvent.CONNECTION_FAST:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__TYPE__FAST;
-            default:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__TYPE__UNSPECIFIED;
-        }
-    }
-
-    private int convertFailureCode(int failureCode) {
-        switch (failureCode) {
-            case P2pConnectionEvent.CLF_NONE:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__FAILURE_CODE__NONE;
-            case P2pConnectionEvent.CLF_TIMEOUT:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__FAILURE_CODE__TIMEOUT;
-            case P2pConnectionEvent.CLF_CANCEL:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__FAILURE_CODE__CANCEL;
-            case P2pConnectionEvent.CLF_PROV_DISC_FAIL:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__FAILURE_CODE__PROV_DISC_FAIL;
-            case P2pConnectionEvent.CLF_INVITATION_FAIL:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__FAILURE_CODE__INVITATION_FAIL;
-            case P2pConnectionEvent.CLF_USER_REJECT:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__FAILURE_CODE__USER_REJECT;
-            case P2pConnectionEvent.CLF_NEW_CONNECTION_ATTEMPT:
-                return WifiStatsLog
-                        .WIFI_P2P_CONNECTION_REPORTED__FAILURE_CODE__NEW_CONNECTION_ATTEMPT;
-            case P2pConnectionEvent.CLF_UNKNOWN:
-            default:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__FAILURE_CODE__UNKNOWN;
-        }
-    }
-
-    private int convertGroupRole(int groupRole) {
-        switch (groupRole) {
-            case GroupEvent.GROUP_OWNER:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__GROUP_ROLE__GROUP_OWNER;
-            case GroupEvent.GROUP_CLIENT:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__GROUP_ROLE__GROUP_CLIENT;
-            default:
-                return WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__GROUP_ROLE__GROUP_UNKNOWN;
-        }
-    }
-
     /**
      * Create a new group event.
      *
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pMonitor.java b/service/java/com/android/server/wifi/p2p/WifiP2pMonitor.java
index 0d1efd7..a0a2667 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pMonitor.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pMonitor.java
@@ -16,8 +16,6 @@
 
 package com.android.server.wifi.p2p;
 
-import android.annotation.IntDef;
-import android.annotation.NonNull;
 import android.net.wifi.p2p.WifiP2pConfig;
 import android.net.wifi.p2p.WifiP2pDevice;
 import android.net.wifi.p2p.WifiP2pGroup;
@@ -33,8 +31,6 @@
 import com.android.internal.util.Protocol;
 import com.android.server.wifi.p2p.WifiP2pServiceImpl.P2pStatus;
 
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -74,36 +70,19 @@
     public static final int P2P_FIND_STOPPED_EVENT               = BASE + 37;
     public static final int P2P_SERV_DISC_RESP_EVENT             = BASE + 38;
     public static final int P2P_PROV_DISC_FAILURE_EVENT          = BASE + 39;
-    public static final int P2P_FREQUENCY_CHANGED_EVENT          = BASE + 40;
 
     /* hostap events */
     public static final int AP_STA_DISCONNECTED_EVENT            = BASE + 41;
     public static final int AP_STA_CONNECTED_EVENT               = BASE + 42;
 
-    public static final int PROV_DISC_STATUS_SUCCESS             = 0;
-    public static final int PROV_DISC_STATUS_TIMEOUT             = 1;
-    public static final int PROV_DISC_STATUS_REJECTED            = 2;
-    public static final int PROV_DISC_STATUS_TIMEOUT_JOIN        = 3;
-    public static final int PROV_DISC_STATUS_INFO_UNAVAILABLE    = 4;
-    public static final int PROV_DISC_STATUS_UNKNOWN             = 5;
-    @IntDef(prefix = {"PROV_DISC_STATUS_"}, value = {
-            PROV_DISC_STATUS_SUCCESS,
-            PROV_DISC_STATUS_TIMEOUT,
-            PROV_DISC_STATUS_REJECTED,
-            PROV_DISC_STATUS_TIMEOUT_JOIN,
-            PROV_DISC_STATUS_INFO_UNAVAILABLE,
-            PROV_DISC_STATUS_UNKNOWN})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface P2pProvDiscStatus {
-    }
 
     private boolean mVerboseLoggingEnabled = false;
 
     /**
      * Enable verbose logging for all sub modules.
      */
-    public void enableVerboseLogging(boolean verboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
+    public void enableVerboseLogging(int verbose) {
+        mVerboseLoggingEnabled = verbose > 0;
     }
 
     private final Map<String, SparseArray<Set<Handler>>> mHandlerMap = new HashMap<>();
@@ -442,12 +421,9 @@
      * Broadcast P2P discovery failure event to all handlers registered for this event.
      *
      * @param iface Name of iface on which this occurred.
-     * @param status Indicate the reason of this failure.
-     * @param event The information about the provision discovery.
      */
-    public void broadcastP2pProvisionDiscoveryFailure(@NonNull String iface,
-            @P2pProvDiscStatus int status, @NonNull WifiP2pProvDiscEvent event) {
-        sendMessage(iface, P2P_PROV_DISC_FAILURE_EVENT, status, 0, event);
+    public void broadcastP2pProvisionDiscoveryFailure(String iface) {
+        sendMessage(iface, P2P_PROV_DISC_FAILURE_EVENT);
     }
 
     /**
@@ -478,14 +454,4 @@
     public void broadcastP2pApStaDisconnected(String iface, WifiP2pDevice device) {
         sendMessage(iface, AP_STA_DISCONNECTED_EVENT, device);
     }
-
-    /**
-     * Broadcast frequency changed event.
-     *
-     * @param iface Name of iface on which this occurred.
-     * @param frequency New operating frequency.
-     */
-    public void broadcastP2pFrequencyChanged(String iface,  int frequency) {
-        sendMessage(iface, P2P_FREQUENCY_CHANGED_EVENT, frequency);
-    }
 }
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pNative.java b/service/java/com/android/server/wifi/p2p/WifiP2pNative.java
index c840bf1..1c66aea 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pNative.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pNative.java
@@ -20,15 +20,12 @@
 import android.annotation.Nullable;
 import android.hardware.wifi.V1_0.IWifiP2pIface;
 import android.net.wifi.CoexUnsafeChannel;
-import android.net.wifi.ScanResult;
 import android.net.wifi.nl80211.WifiNl80211Manager;
 import android.net.wifi.p2p.WifiP2pConfig;
 import android.net.wifi.p2p.WifiP2pGroup;
 import android.net.wifi.p2p.WifiP2pGroupList;
-import android.net.wifi.p2p.WifiP2pManager;
 import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
 import android.os.Handler;
-import android.os.Process;
 import android.os.WorkSource;
 import android.text.TextUtils;
 import android.util.Log;
@@ -38,7 +35,6 @@
 import com.android.server.wifi.WifiNative;
 import com.android.server.wifi.WifiVendorHal;
 
-import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
@@ -57,9 +53,6 @@
     private final WifiVendorHal mWifiVendorHal;
     private IWifiP2pIface mIWifiP2pIface;
     private InterfaceDestroyedListenerInternal mInterfaceDestroyedListener;
-    // Cache the features and return it when P2P interface is not up.
-    private long mSupportedFeatures = -1L;
-
 
     // Internal callback registered to HalDeviceManager.
     private class InterfaceDestroyedListenerInternal implements
@@ -111,9 +104,9 @@
     /**
      * Enable verbose logging for all sub modules.
      */
-    public void enableVerboseLogging(boolean verboseEnabled, boolean halVerboseEnabled) {
-        mVerboseLoggingEnabled = verboseEnabled;
-        SupplicantP2pIfaceHal.enableVerboseLogging(verboseEnabled, halVerboseEnabled);
+    public void enableVerboseLogging(int verbose) {
+        mVerboseLoggingEnabled = verbose > 0;
+        SupplicantP2pIfaceHal.enableVerboseLogging(verbose);
     }
 
     private static final int CONNECT_TO_SUPPLICANT_SAMPLING_INTERVAL_MS = 100;
@@ -147,11 +140,11 @@
      * Close supplicant connection.
      */
     public void closeSupplicantConnection() {
-        // Nothing to do for HAL.
+        // Nothing to do for HIDL.
     }
 
     /**
-     * Returns whether HAL is supported on this device or not.
+     * Returns whether HAL (HIDL) is supported on this device or not.
      */
     public boolean isHalInterfaceSupported() {
         return mHalDeviceManager.isSupported();
@@ -193,13 +186,12 @@
      * @param requestorWs Worksource to attribute the request to.
      */
     public String setupInterface(
-            @Nullable HalDeviceManager.InterfaceDestroyedListener destroyedListener,
+            @NonNull HalDeviceManager.InterfaceDestroyedListener destroyedListener,
             @NonNull Handler handler, @NonNull WorkSource requestorWs) {
         Log.d(TAG, "Setup P2P interface");
         if (mIWifiP2pIface == null) {
-            mInterfaceDestroyedListener = (null == destroyedListener)
-                    ? null
-                    : new InterfaceDestroyedListenerInternal(destroyedListener);
+            mInterfaceDestroyedListener =
+                    new InterfaceDestroyedListenerInternal(destroyedListener);
             String ifaceName = createP2pIface(handler, requestorWs);
             if (ifaceName == null) {
                 Log.e(TAG, "Failed to create P2p iface");
@@ -215,7 +207,6 @@
                 teardownInterface();
                 return null;
             }
-            mSupportedFeatures = mSupplicantP2pIfaceHal.getSupportedFeatures();
             Log.i(TAG, "P2P interface setup completed");
             return ifaceName;
         } else {
@@ -235,17 +226,13 @@
             if (mIWifiP2pIface != null) {
                 String ifaceName = HalDeviceManager.getName(mIWifiP2pIface);
                 mHalDeviceManager.removeIface(mIWifiP2pIface);
-                if (null != mInterfaceDestroyedListener) {
-                    mInterfaceDestroyedListener.teardownAndInvalidate(ifaceName);
-                }
+                mInterfaceDestroyedListener.teardownAndInvalidate(ifaceName);
                 Log.i(TAG, "P2P interface teardown completed");
             }
         } else {
-            Log.i(TAG, "HAL is not supported. Destroy listener for the interface.");
+            Log.i(TAG, "HAL (HIDL) is not supported. Destroy listener for the interface.");
             String ifaceName = mPropertyService.getString(P2P_INTERFACE_PROPERTY, P2P_IFACE_NAME);
-            if (null != mInterfaceDestroyedListener) {
-                mInterfaceDestroyedListener.teardownAndInvalidate(ifaceName);
-            }
+            mInterfaceDestroyedListener.teardownAndInvalidate(ifaceName);
         }
     }
 
@@ -257,36 +244,12 @@
             if (mIWifiP2pIface == null) return false;
             return mHalDeviceManager.replaceRequestorWs(mIWifiP2pIface, requestorWs);
         } else {
-            Log.i(TAG, "HAL is not supported. Ignore replace requestorWs");
+            Log.i(TAG, "HAL (HIDL) is not supported. Ignore replace requestorWs");
             return true;
         }
     }
 
     /**
-     * Get the supported features.
-     *
-     * The features are stored once P2P interface is up so it can be used
-     * when P2P interface is down due to idle shutdown.
-     *
-     * @return bitmask defined by WifiP2pManager.FEATURE_*
-     */
-    public long getSupportedFeatures() {
-        if (-1L != mSupportedFeatures) return mSupportedFeatures;
-
-        Log.i(TAG, "Set up a temporary P2P interface to get supported features.");
-        // Try to set up a temporary interface to get supported features.
-        WorkSource ws =  new WorkSource(Process.SYSTEM_UID);
-        String ifname = setupInterface(null, null, ws);
-        if (TextUtils.isEmpty(ifname)) {
-            Log.e(TAG, "Cannot set up a temporary P2P interface.");
-            return 0L;
-        }
-        teardownInterface();
-        mIWifiP2pIface = null;
-        return mSupportedFeatures;
-    }
-
-    /**
      * Set WPS device name.
      *
      * @param name String to be set.
@@ -443,8 +406,8 @@
     /**
      * Initiate a P2P service discovery with a (optional) timeout.
      *
-     * @param timeout The maximum amount of time to be spent in performing discovery.
-     *        Set to 0 to indefinitely continue discovery until an explicit
+     * @param timeout Max time to be spent is peforming discovery.
+     *        Set to 0 to indefinely continue discovery untill and explicit
      *        |stopFind| is sent.
      * @return boolean value indicating whether operation was successful.
      */
@@ -453,31 +416,6 @@
     }
 
     /**
-     * Initiate a P2P device discovery with a scan type, a (optional) frequency, and a (optional)
-     * timeout.
-     *
-     * @param type indicates what channels to scan.
-     *        Valid values are {@link WifiP2pManager#WIFI_P2P_SCAN_FULL} for doing full P2P scan,
-     *        {@link WifiP2pManager#WIFI_P2P_SCAN_SOCIAL} for scanning social channels,
-     *        {@link WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ} for scanning a specified frequency.
-     * @param freq is the frequency to be scanned.
-     *        The possible values are:
-     *        <ul>
-     *        <li> A valid frequency for {@link WifiP2pManager#WIFI_P2P_SCAN_SINGLE_FREQ}</li>
-     *        <li> {@link WifiP2pManager#WIFI_P2P_SCAN_FREQ_UNSPECIFIED} for
-     *          {@link WifiP2pManager#WIFI_P2P_SCAN_FULL} and
-     *          {@link WifiP2pManager#WIFI_P2P_SCAN_SOCIAL}</li>
-     *        </ul>
-     * @param timeout The maximum amount of time to be spent in performing discovery.
-     *        Set to 0 to indefinitely continue discovery until an explicit
-     *        |stopFind| is sent.
-     * @return boolean value indicating whether operation was successful.
-     */
-    public boolean p2pFind(@WifiP2pManager.WifiP2pScanType int type, int freq, int timeout) {
-        return mSupplicantP2pIfaceHal.find(type, freq, timeout);
-    }
-
-    /**
      * Stop an ongoing P2P service discovery.
      *
      * @return boolean value indicating whether operation was successful.
@@ -906,47 +844,4 @@
     public boolean setWfdR2DeviceInfo(String hex) {
         return mSupplicantP2pIfaceHal.setWfdR2DeviceInfo(hex);
     }
-
-    /**
-     * Remove the client with the MAC address from the group.
-     *
-     * @param peerAddress Mac address of the client.
-     * @return true if success
-     */
-    public boolean removeClient(String peerAddress) {
-        // The client is deemed as a P2P client, not a legacy client, hence the false.
-        return mSupplicantP2pIfaceHal.removeClient(peerAddress, false);
-    }
-
-    /**
-     * Set vendor-specific information elements to the native service.
-     *
-     * @param vendorElements the vendor opaque data.
-     * @return true, if opeartion was successful.
-     */
-    public boolean setVendorElements(Set<ScanResult.InformationElement> vendorElements) {
-        return mSupplicantP2pIfaceHal.setVendorElements(vendorElements);
-    }
-
-    /**
-     * Remove vendor-specific information elements from the native service.
-     */
-    public boolean removeVendorElements() {
-        return mSupplicantP2pIfaceHal.setVendorElements(
-                new HashSet<ScanResult.InformationElement>());
-    }
-
-    /** Indicate whether or not 2.4GHz/5GHz DBS is supported. */
-    public boolean is24g5gDbsSupported() {
-        if (null == mIWifiP2pIface) return false;
-        if (!mHalDeviceManager.isSupported()) return false;
-        return mHalDeviceManager.is24g5gDbsSupported(mIWifiP2pIface);
-    }
-
-    /** Indicate whether or not 5GHz/6GHz DBS is supported. */
-    public boolean is5g6gDbsSupported() {
-        if (null == mIWifiP2pIface) return false;
-        if (!mHalDeviceManager.isSupported()) return false;
-        return mHalDeviceManager.is5g6gDbsSupported(mIWifiP2pIface);
-    }
 }
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pService.java b/service/java/com/android/server/wifi/p2p/WifiP2pService.java
index a5053e6..2b536b0 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pService.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pService.java
@@ -17,10 +17,10 @@
 package com.android.server.wifi.p2p;
 
 import android.content.Context;
-import android.net.wifi.WifiContext;
 import android.util.Log;
 
 import com.android.server.SystemService;
+import com.android.server.wifi.WifiContext;
 import com.android.server.wifi.WifiInjector;
 
 /**
@@ -48,8 +48,6 @@
     public void onBootPhase(int phase) {
         if (phase == SystemService.PHASE_SYSTEM_SERVICES_READY) {
             mImpl.connectivityServiceReady();
-        } else if (phase == SystemService.PHASE_BOOT_COMPLETED) {
-            mImpl.handleBootCompleted();
         }
     }
 }
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
index c417758..e02f68e 100644
--- a/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
+++ b/service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java
@@ -20,13 +20,12 @@
 import static com.android.server.wifi.WifiSettingsConfigStore.WIFI_P2P_PENDING_FACTORY_RESET;
 import static com.android.server.wifi.WifiSettingsConfigStore.WIFI_VERBOSE_LOGGING_ENABLED;
 
-import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.AlertDialog;
-import android.app.BroadcastOptions;
-import android.content.AttributionSource;
 import android.content.BroadcastReceiver;
 import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.pm.PackageInfo;
@@ -38,7 +37,6 @@
 import android.net.DhcpResultsParcelable;
 import android.net.InetAddresses;
 import android.net.LinkProperties;
-import android.net.MacAddress;
 import android.net.NetworkInfo;
 import android.net.NetworkStack;
 import android.net.TetheringManager;
@@ -61,14 +59,12 @@
 import android.net.wifi.p2p.WifiP2pGroupList.GroupDeleteListener;
 import android.net.wifi.p2p.WifiP2pInfo;
 import android.net.wifi.p2p.WifiP2pManager;
-import android.net.wifi.p2p.WifiP2pManager.ExternalApproverRequestListener;
 import android.net.wifi.p2p.WifiP2pProvDiscEvent;
 import android.net.wifi.p2p.WifiP2pWfdInfo;
 import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
 import android.net.wifi.p2p.nsd.WifiP2pServiceRequest;
 import android.net.wifi.p2p.nsd.WifiP2pServiceResponse;
 import android.os.Binder;
-import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.HandlerThread;
@@ -76,7 +72,6 @@
 import android.os.Looper;
 import android.os.Message;
 import android.os.Messenger;
-import android.os.ParcelFileDescriptor;
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.SystemClock;
@@ -87,7 +82,6 @@
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.SparseArray;
-import android.view.Display;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -96,8 +90,6 @@
 import android.widget.EditText;
 import android.widget.TextView;
 
-import androidx.annotation.RequiresApi;
-
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.AsyncChannel;
 import com.android.internal.util.Protocol;
@@ -105,24 +97,17 @@
 import com.android.internal.util.StateMachine;
 import com.android.internal.util.WakeupMessage;
 import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.BuildProperties;
-import com.android.server.wifi.Clock;
 import com.android.server.wifi.FrameworkFacade;
-import com.android.server.wifi.HalDeviceManager;
-import com.android.server.wifi.InterfaceConflictManager;
-import com.android.server.wifi.WifiDialogManager;
 import com.android.server.wifi.WifiGlobals;
 import com.android.server.wifi.WifiInjector;
+import com.android.server.wifi.WifiLog;
 import com.android.server.wifi.WifiSettingsConfigStore;
-import com.android.server.wifi.WifiThreadRunner;
 import com.android.server.wifi.coex.CoexManager;
-import com.android.server.wifi.p2p.ExternalApproverManager.ApproverEntry;
-import com.android.server.wifi.proto.nano.WifiMetricsProto;
-import com.android.server.wifi.proto.nano.WifiMetricsProto.GroupEvent;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.P2pConnectionEvent;
 import com.android.server.wifi.util.NetdWrapper;
 import com.android.server.wifi.util.StringUtil;
-import com.android.server.wifi.util.WaitingState;
+import com.android.server.wifi.util.WifiAsyncChannel;
+import com.android.server.wifi.util.WifiHandler;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.server.wifi.util.WifiPermissionsWrapper;
 import com.android.wifi.resources.R;
@@ -138,11 +123,9 @@
 import java.util.Collection;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
-import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
 
@@ -191,7 +174,7 @@
     private DhcpResultsParcelable mDhcpResultsParcelable;
 
     private P2pStateMachine mP2pStateMachine;
-    private AsyncChannel mReplyChannel = new AsyncChannel();
+    private AsyncChannel mReplyChannel = new WifiAsyncChannel(TAG);
     private AsyncChannel mWifiChannel;
     private LocationManager mLocationManager;
     private WifiInjector mWifiInjector;
@@ -199,14 +182,9 @@
     private FrameworkFacade mFrameworkFacade;
     private WifiSettingsConfigStore mSettingsConfigStore;
     private WifiP2pMetrics mWifiP2pMetrics;
-    private final BuildProperties mBuildProperties;
     // This will only be null if SdkLevel is not at least S
     @Nullable private CoexManager mCoexManager;
     private WifiGlobals mWifiGlobals;
-    private UserManager mUserManager;
-    private InterfaceConflictManager mInterfaceConflictManager;
-    private final int mVerboseAlwaysOnLevel;
-    private WifiP2pNative mWifiNative;
 
     private static final Boolean JOIN_GROUP = true;
     private static final Boolean FORM_GROUP = false;
@@ -251,13 +229,11 @@
     // User accepted a peer request
     private static final int PEER_CONNECTION_USER_ACCEPT    =   BASE + 2;
     // User rejected a peer request
-    @VisibleForTesting
-    static final int PEER_CONNECTION_USER_REJECT            =   BASE + 3;
+    private static final int PEER_CONNECTION_USER_REJECT    =   BASE + 3;
     // User wants to disconnect wifi in favour of p2p
     private static final int DROP_WIFI_USER_ACCEPT          =   BASE + 4;
     // User wants to keep his wifi connection and drop p2p
-    @VisibleForTesting
-    static final int DROP_WIFI_USER_REJECT                  =   BASE + 5;
+    private static final int DROP_WIFI_USER_REJECT          =   BASE + 5;
     // Delayed message to timeout p2p disable
     public static final int DISABLE_P2P_TIMED_OUT           =   BASE + 6;
     // User confirm a peer request
@@ -314,14 +290,6 @@
 
     private final WifiP2pDevice mThisDevice = new WifiP2pDevice();
 
-    // To avoid changing the default name on every initialization, preserve it
-    // in a period if this device is not rebooted.
-    private String mDefaultDeviceName = null;
-    private long mLastDefaultDeviceNameGeneratingTimeMillis = 0L;
-    // Keep the default name in 24 hours.
-    @VisibleForTesting
-    static final long DEFAULT_DEVICE_NAME_LIFE_TIME_MILLIS = 24 * 60 * 60 * 1000;
-
     // When a group has been explicitly created by an app, we persist the group
     // even after all clients have been disconnected until an explicit remove
     // is invoked
@@ -341,9 +309,6 @@
     // remember if we were in a scan when it had to be stopped
     private boolean mDiscoveryPostponed = false;
 
-    // Track whether DISALLOW_WIFI_DIRECT user restriction has been set
-    private boolean mIsP2pDisallowedByAdmin = false;
-
     private NetworkInfo.DetailedState mDetailedState;
 
     private boolean mTemporarilyDisconnectedWifi = false;
@@ -361,16 +326,6 @@
     // clients(application) channel list
     private Map<IBinder, Messenger> mClientChannelList = new HashMap<IBinder, Messenger>();
 
-    // clients(application) approver manager
-    private ExternalApproverManager mExternalApproverManager = new ExternalApproverManager();
-
-    // client(application) attribution source list
-    private Map<IBinder, AttributionSource> mClientAttributionSource = new HashMap<>();
-
-    // client(application) vendor-specific information element list
-    private Map<String, HashSet<ScanResult.InformationElement>> mVendorElements =
-            new HashMap<>();
-
     // The empty device address set by wpa_supplicant.
     private static final String EMPTY_DEVICE_ADDRESS = "00:00:00:00:00:00";
 
@@ -382,10 +337,6 @@
     @VisibleForTesting
     public WakeupMessage mP2pIdleShutdownMessage;
 
-    private WifiP2pConfig mSavedRejectedPeerConfig = null;
-
-    private boolean mIsBootComplete;
-
     /**
      * Error code definition.
      * see the Table.8 in the WiFi Direct specification for the detail.
@@ -469,14 +420,6 @@
         }
     }
 
-    /**
-     * Proxy for the final native call of the parent class. Enables mocking of
-     * the function.
-     */
-    public int getMockableCallingUid() {
-        return Binder.getCallingUid();
-    }
-
     private void updateWorkSourceByUid(int uid, boolean active) {
         if (uid == -1) return;
         if (active == mActiveClients.containsKey(uid)) return;
@@ -505,10 +448,10 @@
     /**
      * Handles client connections
      */
-    private class ClientHandler extends Handler {
+    private class ClientHandler extends WifiHandler {
 
         ClientHandler(String tag, android.os.Looper looper) {
-            super(looper);
+            super(tag, looper);
         }
 
         @Override
@@ -547,11 +490,6 @@
                 case WifiP2pManager.REQUEST_NETWORK_INFO:
                 case WifiP2pManager.UPDATE_CHANNEL_INFO:
                 case WifiP2pManager.REQUEST_DEVICE_INFO:
-                case WifiP2pManager.REMOVE_CLIENT:
-                case WifiP2pManager.ADD_EXTERNAL_APPROVER:
-                case WifiP2pManager.REMOVE_EXTERNAL_APPROVER:
-                case WifiP2pManager.SET_CONNECTION_REQUEST_RESULT:
-                case WifiP2pManager.SET_VENDOR_ELEMENTS:
                     mP2pStateMachine.sendMessage(Message.obtain(msg));
                     break;
                 default:
@@ -571,33 +509,48 @@
         return info;
     }
 
+    /**
+     * Provide a way for unit tests to set valid log object in the WifiHandler
+     * @param log WifiLog object to assign to the clientHandler
+     */
+    @VisibleForTesting
+    void setWifiHandlerLogForTest(WifiLog log) {
+        mClientHandler.setWifiLog(log);
+
+    }
+
+    /**
+     * Provide a way for unit tests to set valid log object in the WifiAsyncChannel
+     * @param log WifiLog object to assign to the mReplyChannel
+     */
+    @VisibleForTesting
+    void setWifiLogForReplyChannel(WifiLog log) {
+        ((WifiAsyncChannel) mReplyChannel).setWifiLog(log);
+    }
+
     private class DeathHandlerData {
-        DeathHandlerData(int uid, DeathRecipient dr, Messenger m, WorkSource ws, int displayId) {
+        DeathHandlerData(int uid, DeathRecipient dr, Messenger m, WorkSource ws) {
             mUid = uid;
             mDeathRecipient = dr;
             mMessenger = m;
             mWorkSource = ws;
-            mDisplayId = displayId;
         }
 
         @Override
         public String toString() {
-            return "mUid=" + mUid + ", deathRecipient=" + mDeathRecipient + ", messenger="
-                    + mMessenger + ", worksource=" + mWorkSource + ", displayId=" + mDisplayId;
+            return "deathRecipient=" + mDeathRecipient + ", messenger=" + mMessenger
+                    + ", worksource=" + mWorkSource;
         }
 
         final int mUid;
         final DeathRecipient mDeathRecipient;
         final Messenger mMessenger;
         final WorkSource mWorkSource;
-        final int mDisplayId;
     }
     private Object mLock = new Object();
     private final Map<IBinder, DeathHandlerData> mDeathDataByBinder = new ConcurrentHashMap<>();
     private final Map<Integer, WorkSource> mActiveClients = new ConcurrentHashMap<>();
 
-    private Clock mClock;
-
     public WifiP2pServiceImpl(Context context, WifiInjector wifiInjector) {
         mContext = context;
         mWifiInjector = wifiInjector;
@@ -607,10 +560,6 @@
         mWifiP2pMetrics = mWifiInjector.getWifiP2pMetrics();
         mCoexManager = mWifiInjector.getCoexManager();
         mWifiGlobals = mWifiInjector.getWifiGlobals();
-        mBuildProperties = mWifiInjector.getBuildProperties();
-        mUserManager = mWifiInjector.getUserManager();
-        mInterfaceConflictManager = mWifiInjector.getInterfaceConflictManager();
-        mClock = mWifiInjector.getClock();
 
         mDetailedState = NetworkInfo.DetailedState.IDLE;
 
@@ -619,12 +568,8 @@
 
         HandlerThread wifiP2pThread = mWifiInjector.getWifiP2pServiceHandlerThread();
         mClientHandler = new ClientHandler(TAG, wifiP2pThread.getLooper());
-        mWifiNative = mWifiInjector.getWifiP2pNative();
         mP2pStateMachine = new P2pStateMachine(TAG, wifiP2pThread.getLooper(), mP2pSupported);
-        mP2pStateMachine.setDbg(false); // can enable for very verbose logs
         mP2pStateMachine.start();
-        mVerboseAlwaysOnLevel = context.getResources()
-                .getInteger(R.integer.config_wifiVerboseLoggingAlwaysOnLevel);
     }
 
     /**
@@ -634,16 +579,6 @@
         mNetdWrapper = mWifiInjector.makeNetdWrapper();
     }
 
-    /** Indicate that boot is completed. */
-    public void handleBootCompleted() {
-        mIsBootComplete = true;
-    }
-
-    private boolean isVerboseLoggingEnabled() {
-        return mFrameworkFacade.isVerboseLoggingAlwaysOn(mVerboseAlwaysOnLevel, mBuildProperties)
-                ? true : mVerboseLoggingEnabled;
-    }
-
     private void enforceAccessPermission() {
         mContext.enforceCallingOrSelfPermission(android.Manifest.permission.ACCESS_WIFI_STATE,
                 "WifiP2pService");
@@ -758,78 +693,29 @@
      * an AsyncChannel communication with WifiP2pService
      */
     @Override
-    public Messenger getMessenger(final IBinder binder, final String packageName, Bundle extras) {
+    public Messenger getMessenger(final IBinder binder, final String packageName) {
         enforceAccessPermission();
         enforceChangePermission();
 
-        int callerUid = getMockableCallingUid();
-        int uidToUse = callerUid;
-        String packageNameToUse = packageName;
-
-        // if we're being called from the SYSTEM_UID then allow usage of the AttributionSource to
-        // locate the original caller.
-        if (SdkLevel.isAtLeastS() && UserHandle.getAppId(callerUid) == Process.SYSTEM_UID) {
-            if (extras == null) {
-                throw new SecurityException("extras bundle is null");
-            }
-            AttributionSource as = extras.getParcelable(
-                    WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE);
-            if (as == null) {
-                throw new SecurityException(
-                        "WifiP2pManager getMessenger attributionSource is null");
-            }
-
-            if (!as.checkCallingUid()) {
-                throw new SecurityException("WifiP2pManager getMessenger invalid (checkCallingUid "
-                        + "fails) attribution source=" + as);
-            }
-
-            // an attribution chain is either of size 1: unregistered (valid by definition) or
-            // size >1: in which case all are validated.
-            if (as.getNext() != null) {
-                AttributionSource asIt = as;
-                AttributionSource asLast = as;
-                do {
-                    if (!asIt.isTrusted(mContext)) {
-                        throw new SecurityException("WifiP2pManager getMessenger invalid "
-                                + "(isTrusted fails) attribution source=" + asIt);
-                    }
-                    asIt = asIt.getNext();
-                    if (asIt != null) asLast = asIt;
-                } while (asIt != null);
-
-                // use the last AttributionSource in the chain - i.e. the original caller
-                uidToUse = asLast.getUid();
-                packageNameToUse = asLast.getPackageName();
-            }
-        }
-
-        // get the DisplayId of the caller (if available)
-        int displayId = Display.DEFAULT_DISPLAY;
-        if (mWifiPermissionsUtil.isSystem(packageName, callerUid)) {
-            displayId = extras.getInt(WifiP2pManager.EXTRA_PARAM_KEY_DISPLAY_ID,
-                    Display.DEFAULT_DISPLAY);
-        }
-
         synchronized (mLock) {
             final Messenger messenger = new Messenger(mClientHandler);
-            if (isVerboseLoggingEnabled()) {
+            if (mVerboseLoggingEnabled) {
                 Log.d(TAG, "getMessenger: uid=" + getCallingUid() + ", binder=" + binder
                         + ", messenger=" + messenger);
             }
 
             IBinder.DeathRecipient dr = () -> {
-                if (isVerboseLoggingEnabled()) Log.d(TAG, "binderDied: binder=" + binder);
+                if (mVerboseLoggingEnabled) Log.d(TAG, "binderDied: binder=" + binder);
                 close(binder);
             };
 
-            WorkSource ws = packageNameToUse != null
-                    ? new WorkSource(uidToUse, packageNameToUse)
-                    : new WorkSource(uidToUse);
+            WorkSource ws = packageName != null
+                    ? new WorkSource(Binder.getCallingUid(), packageName)
+                    : new WorkSource(Binder.getCallingUid());
             try {
                 binder.linkToDeath(dr, 0);
-                mDeathDataByBinder.put(binder,
-                        new DeathHandlerData(callerUid, dr, messenger, ws, displayId));
+                mDeathDataByBinder.put(binder, new DeathHandlerData(
+                        Binder.getCallingUid(), dr, messenger, ws));
             } catch (RemoteException e) {
                 Log.e(TAG, "Error on linkToDeath: e=" + e);
                 // fall-through here - won't clean up
@@ -873,13 +759,6 @@
             updateWorkSourceByUid(Binder.getCallingUid(), false);
             mP2pStateMachine.sendMessage(REMOVE_CLIENT_INFO, 0, 0, binder);
 
-            if (SdkLevel.isAtLeastS()) {
-                AttributionSource source = mClientAttributionSource.remove(binder);
-                if (null != source) {
-                    mVendorElements.remove(source.getPackageName());
-                }
-            }
-
             // clean-up if there are no more clients registered
             // TODO: what does the ClientModeImpl client do? It isn't tracked through here!
             if (dhd.mMessenger != null && mDeathDataByBinder.isEmpty()) {
@@ -919,14 +798,6 @@
         }
     }
 
-    /**
-     * see {@link android.net.wifi.p2p.WifiP2pManager#getSupportedFeatures()}
-     */
-    @Override
-    public long getSupportedFeatures() {
-        return mWifiNative.getSupportedFeatures();
-    }
-
     private boolean getWfdPermission(int uid) {
         WifiPermissionsWrapper wifiPermissionsWrapper = mWifiInjector.getWifiPermissionsWrapper();
         return wifiPermissionsWrapper.getUidPermission(
@@ -944,7 +815,6 @@
             return;
         }
         mP2pStateMachine.dump(fd, pw, args);
-        mWifiP2pMetrics.dump(pw);
         pw.println("mAutonomousGroup " + mAutonomousGroup);
         pw.println("mJoinExistingGroup " + mJoinExistingGroup);
         pw.println("mDiscoveryStarted " + mDiscoveryStarted);
@@ -953,7 +823,6 @@
         pw.println("mServiceDiscReqId " + mServiceDiscReqId);
         pw.println("mDeathDataByBinder " + mDeathDataByBinder);
         pw.println("mClientInfoList " + mClientInfoList.size());
-        pw.println("mActiveClients " + mActiveClients);
         pw.println();
 
         final IIpClient ipClient = mIpClient;
@@ -963,21 +832,6 @@
         }
     }
 
-    @Override
-    public int handleShellCommand(@NonNull ParcelFileDescriptor in,
-            @NonNull ParcelFileDescriptor out, @NonNull ParcelFileDescriptor err,
-            @NonNull String[] args) {
-        if (!mIsBootComplete) {
-            Log.w(TAG, "Received shell command when boot is not complete!");
-            return -1;
-        }
-
-        WifiP2pShellCommand shellCommand = new WifiP2pShellCommand(mContext);
-        return shellCommand.exec(
-                this, in.getFileDescriptor(), out.getFileDescriptor(), err.getFileDescriptor(),
-                args);
-    }
-
     /**
      * Handles interaction with ClientModeImpl
      */
@@ -986,10 +840,7 @@
         private DefaultState mDefaultState = new DefaultState();
         private P2pNotSupportedState mP2pNotSupportedState = new P2pNotSupportedState();
         private P2pDisablingState mP2pDisablingState = new P2pDisablingState();
-        private P2pDisabledContainerState mP2pDisabledContainerState =
-                new P2pDisabledContainerState();
         private P2pDisabledState mP2pDisabledState = new P2pDisabledState();
-        private WaitingState mWaitingState = new WaitingState(this);
         private P2pEnabledState mP2pEnabledState = new P2pEnabledState();
         // Inactive is when p2p is enabled with no connectivity
         private InactiveState mInactiveState = new InactiveState();
@@ -1006,6 +857,7 @@
         private UserAuthorizingJoinState mUserAuthorizingJoinState = new UserAuthorizingJoinState();
         private OngoingGroupRemovalState mOngoingGroupRemovalState = new OngoingGroupRemovalState();
 
+        private WifiP2pNative mWifiNative = mWifiInjector.getWifiP2pNative();
         private WifiP2pMonitor mWifiMonitor = mWifiInjector.getWifiP2pMonitor();
         private final WifiP2pDeviceList mPeers = new WifiP2pDeviceList();
         private String mInterfaceName;
@@ -1025,9 +877,7 @@
                 new GroupDeleteListener() {
                     @Override
                     public void onDeleteGroup(int netId) {
-                        if (isVerboseLoggingEnabled()) {
-                            logd("called onDeleteGroup() netId=" + netId);
-                        }
+                        if (mVerboseLoggingEnabled) logd("called onDeleteGroup() netId=" + netId);
                         mWifiNative.removeP2pNetwork(netId);
                         mWifiNative.saveConfig();
                         sendP2pPersistentGroupsChangedBroadcast();
@@ -1042,7 +892,6 @@
         // The deviceAddress will be an empty string when the device is inactive
         // or if it is connected without any ongoing join request
         private WifiP2pConfig mSavedPeerConfig = new WifiP2pConfig();
-        private WifiDialogManager.DialogHandle mInvitationDialogHandle = null;
 
         P2pStateMachine(String name, Looper looper, boolean p2pSupported) {
             super(name, looper);
@@ -1051,9 +900,7 @@
             addState(mDefaultState);
                 addState(mP2pNotSupportedState, mDefaultState);
                 addState(mP2pDisablingState, mDefaultState);
-                addState(mP2pDisabledContainerState, mDefaultState);
-                    addState(mP2pDisabledState, mP2pDisabledContainerState);
-                    addState(mWaitingState, mP2pDisabledContainerState);
+                addState(mP2pDisabledState, mDefaultState);
                 addState(mP2pEnabledState, mDefaultState);
                     addState(mInactiveState, mP2pEnabledState);
                     addState(mGroupCreatingState, mP2pEnabledState);
@@ -1072,7 +919,8 @@
             } else {
                 setInitialState(mP2pNotSupportedState);
             }
-            setLogRecSize(100);
+            setLogRecSize(50);
+            setLogOnlyTransitions(true);
 
             if (p2pSupported) {
                 // Init p2p idle shutdown message
@@ -1094,10 +942,7 @@
                             // Teardown P2P if it's up already.
                             sendMessage(DISABLE_P2P);
                         }
-                        if (wifistate == WifiManager.WIFI_STATE_ENABLED
-                                || wifistate == WifiManager.WIFI_STATE_DISABLING) {
-                            checkAndSendP2pStateChangedBroadcast();
-                        }
+                        checkAndSendP2pStateChangedBroadcast();
                     }
                 }, new IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION));
                 // Register for location mode on/off broadcasts
@@ -1110,8 +955,7 @@
                          * - service discovery
                          * - group joining scan in native service
                          */
-                        if (!mWifiPermissionsUtil.isLocationModeEnabled()
-                                && !SdkLevel.isAtLeastT()) {
+                        if (!mWifiPermissionsUtil.isLocationModeEnabled()) {
                             sendMessage(WifiP2pManager.STOP_DISCOVERY);
                         }
                     }
@@ -1138,240 +982,6 @@
                         }
                     });
                 }
-                if (SdkLevel.isAtLeastT()) {
-                    mContext.registerReceiver(
-                            new BroadcastReceiver() {
-                                @Override
-                                public void onReceive(Context context, Intent intent) {
-                                    Log.d(TAG, "user restrictions changed");
-                                    onUserRestrictionsChanged();
-                                }
-                            },
-                            new IntentFilter(UserManager.ACTION_USER_RESTRICTIONS_CHANGED));
-                    mIsP2pDisallowedByAdmin = mUserManager.getUserRestrictions()
-                            .getBoolean(UserManager.DISALLOW_WIFI_DIRECT);
-                }
-            }
-        }
-
-        /**
-         * Find which user restrictions have changed and take corresponding actions
-         */
-        @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-        private void onUserRestrictionsChanged() {
-            final Bundle restrictions = mUserManager.getUserRestrictions();
-            final boolean newIsP2pDisallowedByAdmin =
-                    restrictions.getBoolean(UserManager.DISALLOW_WIFI_DIRECT);
-
-            if (newIsP2pDisallowedByAdmin != mIsP2pDisallowedByAdmin) {
-                if (newIsP2pDisallowedByAdmin) {
-                    Log.i(TAG, "Disable P2P: DISALLOW_WIFI_DIRECT set");
-                    sendMessage(DISABLE_P2P);
-                }
-                mIsP2pDisallowedByAdmin = newIsP2pDisallowedByAdmin;
-            }
-        }
-
-        @Override
-        protected String getLogRecString(Message msg) {
-            StringBuilder sb = new StringBuilder();
-            sb.append("sender=").append(getCallingPkgName(msg.sendingUid, msg.replyTo))
-                    .append("(").append(msg.sendingUid).append(")");
-            return sb.toString();
-        }
-
-        @Override
-        protected boolean recordLogRec(Message msg) {
-            // Filter unnecessary records to avoid overwhelming the buffer.
-            switch (msg.what) {
-                case WifiP2pManager.REQUEST_PEERS:
-                case WifiP2pMonitor.P2P_DEVICE_FOUND_EVENT:
-                case WifiP2pMonitor.P2P_DEVICE_LOST_EVENT:
-                    return false;
-                default:
-                    return true;
-            }
-        }
-
-        @Override
-        protected String getWhatToString(int what) {
-            switch (what) {
-                case AsyncChannel.CMD_CHANNEL_DISCONNECTED:
-                    return "AsyncChannel.CMD_CHANNEL_DISCONNECTED";
-                case AsyncChannel.CMD_CHANNEL_FULL_CONNECTION:
-                    return "AsyncChannel.CMD_CHANNEL_FULL_CONNECTION";
-                case AsyncChannel.CMD_CHANNEL_HALF_CONNECTED:
-                    return "AsyncChannel.CMD_CHANNEL_HALF_CONNECTED";
-                case BLOCK_DISCOVERY:
-                    return "BLOCK_DISCOVERY";
-                case CMD_P2P_IDLE_SHUTDOWN:
-                    return "CMD_P2P_IDLE_SHUTDOWN";
-                case DISABLE_P2P:
-                    return "DISABLE_P2P";
-                case DISABLE_P2P_TIMED_OUT:
-                    return "DISABLE_P2P_TIMED_OUT";
-                case DISCONNECT_WIFI_RESPONSE:
-                    return "DISCONNECT_WIFI_RESPONSE";
-                case DROP_WIFI_USER_ACCEPT:
-                    return "DROP_WIFI_USER_ACCEPT";
-                case DROP_WIFI_USER_REJECT:
-                    return "DROP_WIFI_USER_REJECT";
-                case ENABLE_P2P:
-                    return "ENABLE_P2P";
-                case GROUP_CREATING_TIMED_OUT:
-                    return "GROUP_CREATING_TIMED_OUT";
-                case IPC_DHCP_RESULTS:
-                    return "IPC_DHCP_RESULTS";
-                case IPC_POST_DHCP_ACTION:
-                    return "IPC_POST_DHCP_ACTION";
-                case IPC_PRE_DHCP_ACTION:
-                    return "IPC_PRE_DHCP_ACTION";
-                case IPC_PROVISIONING_FAILURE:
-                    return "IPC_PROVISIONING_FAILURE";
-                case IPC_PROVISIONING_SUCCESS:
-                    return "IPC_PROVISIONING_SUCCESS";
-                case PEER_CONNECTION_USER_ACCEPT:
-                    return "PEER_CONNECTION_USER_ACCEPT";
-                case PEER_CONNECTION_USER_CONFIRM:
-                    return "PEER_CONNECTION_USER_CONFIRM";
-                case PEER_CONNECTION_USER_REJECT:
-                    return "PEER_CONNECTION_USER_REJECT";
-                case REMOVE_CLIENT_INFO:
-                    return "REMOVE_CLIENT_INFO";
-                case SET_MIRACAST_MODE:
-                    return "SET_MIRACAST_MODE";
-                case TETHER_INTERFACE_STATE_CHANGED:
-                    return "TETHER_INTERFACE_STATE_CHANGED";
-                case UPDATE_P2P_DISALLOWED_CHANNELS:
-                    return "UPDATE_P2P_DISALLOWED_CHANNELS";
-                case WifiP2pManager.ADD_LOCAL_SERVICE:
-                    return "WifiP2pManager.ADD_LOCAL_SERVICE";
-                case WifiP2pManager.ADD_SERVICE_REQUEST:
-                    return "WifiP2pManager.ADD_SERVICE_REQUEST";
-                case WifiP2pManager.CANCEL_CONNECT:
-                    return "WifiP2pManager.CANCEL_CONNECT";
-                case WifiP2pManager.CLEAR_LOCAL_SERVICES:
-                    return "WifiP2pManager.CLEAR_LOCAL_SERVICES";
-                case WifiP2pManager.CLEAR_SERVICE_REQUESTS:
-                    return "WifiP2pManager.CLEAR_SERVICE_REQUESTS";
-                case WifiP2pManager.CONNECT:
-                    return "WifiP2pManager.CONNECT";
-                case WifiP2pManager.CREATE_GROUP:
-                    return "WifiP2pManager.CREATE_GROUP";
-                case WifiP2pManager.DELETE_PERSISTENT_GROUP:
-                    return "WifiP2pManager.DELETE_PERSISTENT_GROUP";
-                case WifiP2pManager.DISCOVER_PEERS:
-                    return "WifiP2pManager.DISCOVER_PEERS";
-                case WifiP2pManager.DISCOVER_SERVICES:
-                    return "WifiP2pManager.DISCOVER_SERVICES";
-                case WifiP2pManager.FACTORY_RESET:
-                    return "WifiP2pManager.FACTORY_RESET";
-                case WifiP2pManager.GET_HANDOVER_REQUEST:
-                    return "WifiP2pManager.GET_HANDOVER_REQUEST";
-                case WifiP2pManager.GET_HANDOVER_SELECT:
-                    return "WifiP2pManager.GET_HANDOVER_SELECT";
-                case WifiP2pManager.INITIATOR_REPORT_NFC_HANDOVER:
-                    return "WifiP2pManager.INITIATOR_REPORT_NFC_HANDOVER";
-                case WifiP2pManager.REMOVE_GROUP:
-                    return "WifiP2pManager.REMOVE_GROUP";
-                case WifiP2pManager.REMOVE_LOCAL_SERVICE:
-                    return "WifiP2pManager.REMOVE_LOCAL_SERVICE";
-                case WifiP2pManager.REMOVE_SERVICE_REQUEST:
-                    return "WifiP2pManager.REMOVE_SERVICE_REQUEST";
-                case WifiP2pManager.REQUEST_CONNECTION_INFO:
-                    return "WifiP2pManager.REQUEST_CONNECTION_INFO";
-                case WifiP2pManager.REQUEST_DEVICE_INFO:
-                    return "WifiP2pManager.REQUEST_DEVICE_INFO";
-                case WifiP2pManager.REQUEST_DISCOVERY_STATE:
-                    return "WifiP2pManager.REQUEST_DISCOVERY_STATE";
-                case WifiP2pManager.REQUEST_GROUP_INFO:
-                    return "WifiP2pManager.REQUEST_GROUP_INFO";
-                case WifiP2pManager.REQUEST_NETWORK_INFO:
-                    return "WifiP2pManager.REQUEST_NETWORK_INFO";
-                case WifiP2pManager.REQUEST_ONGOING_PEER_CONFIG:
-                    return "WifiP2pManager.REQUEST_ONGOING_PEER_CONFIG";
-                case WifiP2pManager.REQUEST_P2P_STATE:
-                    return "WifiP2pManager.REQUEST_P2P_STATE";
-                case WifiP2pManager.REQUEST_PEERS:
-                    return "WifiP2pManager.REQUEST_PEERS";
-                case WifiP2pManager.REQUEST_PERSISTENT_GROUP_INFO:
-                    return "WifiP2pManager.REQUEST_PERSISTENT_GROUP_INFO";
-                case WifiP2pManager.RESPONDER_REPORT_NFC_HANDOVER:
-                    return "WifiP2pManager.RESPONDER_REPORT_NFC_HANDOVER";
-                case WifiP2pManager.SET_CHANNEL:
-                    return "WifiP2pManager.SET_CHANNEL";
-                case WifiP2pManager.SET_DEVICE_NAME:
-                    return "WifiP2pManager.SET_DEVICE_NAME";
-                case WifiP2pManager.SET_ONGOING_PEER_CONFIG:
-                    return "WifiP2pManager.SET_ONGOING_PEER_CONFIG";
-                case WifiP2pManager.SET_WFD_INFO:
-                    return "WifiP2pManager.SET_WFD_INFO";
-                case WifiP2pManager.START_LISTEN:
-                    return "WifiP2pManager.START_LISTEN";
-                case WifiP2pManager.START_WPS:
-                    return "WifiP2pManager.START_WPS";
-                case WifiP2pManager.STOP_DISCOVERY:
-                    return "WifiP2pManager.STOP_DISCOVERY";
-                case WifiP2pManager.STOP_LISTEN:
-                    return "WifiP2pManager.STOP_LISTEN";
-                case WifiP2pManager.UPDATE_CHANNEL_INFO:
-                    return "WifiP2pManager.UPDATE_CHANNEL_INFO";
-                case WifiP2pManager.REMOVE_CLIENT:
-                    return "WifiP2pManager.REMOVE_CLIENT";
-                case WifiP2pMonitor.AP_STA_CONNECTED_EVENT:
-                    return "WifiP2pMonitor.AP_STA_CONNECTED_EVENT";
-                case WifiP2pMonitor.AP_STA_DISCONNECTED_EVENT:
-                    return "WifiP2pMonitor.AP_STA_DISCONNECTED_EVENT";
-                case WifiP2pMonitor.P2P_DEVICE_FOUND_EVENT:
-                    return "WifiP2pMonitor.P2P_DEVICE_FOUND_EVENT";
-                case WifiP2pMonitor.P2P_DEVICE_LOST_EVENT:
-                    return "WifiP2pMonitor.P2P_DEVICE_LOST_EVENT";
-                case WifiP2pMonitor.P2P_FIND_STOPPED_EVENT:
-                    return "WifiP2pMonitor.P2P_FIND_STOPPED_EVENT";
-                case WifiP2pMonitor.P2P_GO_NEGOTIATION_FAILURE_EVENT:
-                    return "WifiP2pMonitor.P2P_GO_NEGOTIATION_FAILURE_EVENT";
-                case WifiP2pMonitor.P2P_GO_NEGOTIATION_REQUEST_EVENT:
-                    return "WifiP2pMonitor.P2P_GO_NEGOTIATION_REQUEST_EVENT";
-                case WifiP2pMonitor.P2P_GO_NEGOTIATION_SUCCESS_EVENT:
-                    return "WifiP2pMonitor.P2P_GO_NEGOTIATION_SUCCESS_EVENT";
-                case WifiP2pMonitor.P2P_GROUP_FORMATION_FAILURE_EVENT:
-                    return "WifiP2pMonitor.P2P_GROUP_FORMATION_FAILURE_EVENT";
-                case WifiP2pMonitor.P2P_GROUP_FORMATION_SUCCESS_EVENT:
-                    return "WifiP2pMonitor.P2P_GROUP_FORMATION_SUCCESS_EVENT";
-                case WifiP2pMonitor.P2P_GROUP_REMOVED_EVENT:
-                    return "WifiP2pMonitor.P2P_GROUP_REMOVED_EVENT";
-                case WifiP2pMonitor.P2P_GROUP_STARTED_EVENT:
-                    return "WifiP2pMonitor.P2P_GROUP_STARTED_EVENT";
-                case WifiP2pMonitor.P2P_INVITATION_RECEIVED_EVENT:
-                    return "WifiP2pMonitor.P2P_INVITATION_RECEIVED_EVENT";
-                case WifiP2pMonitor.P2P_INVITATION_RESULT_EVENT:
-                    return "WifiP2pMonitor.P2P_INVITATION_RESULT_EVENT";
-                case WifiP2pMonitor.P2P_PROV_DISC_ENTER_PIN_EVENT:
-                    return "WifiP2pMonitor.P2P_PROV_DISC_ENTER_PIN_EVENT";
-                case WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT:
-                    return "WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT";
-                case WifiP2pMonitor.P2P_PROV_DISC_PBC_REQ_EVENT:
-                    return "WifiP2pMonitor.P2P_PROV_DISC_PBC_REQ_EVENT";
-                case WifiP2pMonitor.P2P_PROV_DISC_PBC_RSP_EVENT:
-                    return "WifiP2pMonitor.P2P_PROV_DISC_PBC_RSP_EVENT";
-                case WifiP2pMonitor.P2P_PROV_DISC_SHOW_PIN_EVENT:
-                    return "WifiP2pMonitor.P2P_PROV_DISC_SHOW_PIN_EVENT";
-                case WifiP2pMonitor.P2P_SERV_DISC_RESP_EVENT:
-                    return "WifiP2pMonitor.P2P_SERV_DISC_RESP_EVENT";
-                case WifiP2pMonitor.SUP_CONNECTION_EVENT:
-                    return "WifiP2pMonitor.SUP_CONNECTION_EVENT";
-                case WifiP2pMonitor.SUP_DISCONNECTION_EVENT:
-                    return "WifiP2pMonitor.SUP_DISCONNECTION_EVENT";
-                case WifiP2pMonitor.P2P_FREQUENCY_CHANGED_EVENT:
-                    return "WifiP2pMonitor.P2P_FREQUENCY_CHANGED_EVENT";
-                case WpsInfo.DISPLAY:
-                    return "WpsInfo.DISPLAY";
-                case WpsInfo.KEYPAD:
-                    return "WpsInfo.KEYPAD";
-                case WifiP2pManager.SET_VENDOR_ELEMENTS:
-                    return "WifiP2pManager.SET_VENDOR_ELEMENTS";
-                default:
-                    return "what:" + what;
             }
         }
 
@@ -1382,7 +992,7 @@
         // data should be cleared because the caller might not clear them, ex. WFD app
         // enables WFD, but does not disable it after leaving the app.
         private void clearP2pInternalDataIfNecessary() {
-            if (isWifiP2pAvailable() && !mDeathDataByBinder.isEmpty()) return;
+            if (mIsWifiEnabled && !mDeathDataByBinder.isEmpty()) return;
 
             mThisDevice.wfdInfo = null;
         }
@@ -1396,7 +1006,7 @@
                 mP2pIdleShutdownMessage.cancel();
                 mP2pIdleShutdownMessage.schedule(SystemClock.elapsedRealtime()
                         + P2P_INTERFACE_IDLE_SHUTDOWN_TIMEOUT_MS);
-                if (isVerboseLoggingEnabled()) {
+                if (mVerboseLoggingEnabled) {
                     Log.d(TAG, "IdleShutDown message (re)scheduled in "
                             + (P2P_INTERFACE_IDLE_SHUTDOWN_TIMEOUT_MS / 1000) + "s");
                 }
@@ -1407,7 +1017,7 @@
         void cancelIdleShutdown() {
             if (mP2pIdleShutdownMessage != null) {
                 mP2pIdleShutdownMessage.cancel();
-                if (isVerboseLoggingEnabled()) {
+                if (mVerboseLoggingEnabled) {
                     Log.d(TAG, "IdleShutDown message canceled");
                 }
             }
@@ -1434,11 +1044,10 @@
         /**
          * Enable verbose logging for all sub modules.
          */
-        private void enableVerboseLogging(boolean verboseEnabled) {
-            mVerboseLoggingEnabled = verboseEnabled;
-            mWifiNative.enableVerboseLogging(isVerboseLoggingEnabled(), mVerboseLoggingEnabled);
-            mWifiMonitor.enableVerboseLogging(isVerboseLoggingEnabled());
-            mExternalApproverManager.enableVerboseLogging(isVerboseLoggingEnabled());
+        private void enableVerboseLogging(boolean verbose) {
+            mVerboseLoggingEnabled = verbose;
+            mWifiNative.enableVerboseLogging(verbose ? 1 : 0);
+            mWifiMonitor.enableVerboseLogging(verbose ? 1 : 0);
         }
 
         public void registerForWifiMonitorEvents() {
@@ -1486,8 +1095,6 @@
                     WifiP2pMonitor.SUP_CONNECTION_EVENT, getHandler());
             mWifiMonitor.registerHandler(mInterfaceName,
                     WifiP2pMonitor.SUP_DISCONNECTION_EVENT, getHandler());
-            mWifiMonitor.registerHandler(mInterfaceName,
-                    WifiP2pMonitor.P2P_FREQUENCY_CHANGED_EVENT, getHandler());
 
             mWifiMonitor.startMonitoring(mInterfaceName);
         }
@@ -1516,7 +1123,6 @@
                 case WifiP2pManager.CLEAR_LOCAL_SERVICES:
                 case WifiP2pManager.REMOVE_SERVICE_REQUEST:
                 case WifiP2pManager.CLEAR_SERVICE_REQUESTS:
-                case WifiP2pManager.REMOVE_CLIENT:
                 // These commands return wifi service p2p information which
                 // does not need active P2P.
                 case WifiP2pManager.REQUEST_P2P_STATE:
@@ -1524,14 +1130,10 @@
                 case WifiP2pManager.REQUEST_NETWORK_INFO:
                 case WifiP2pManager.REQUEST_CONNECTION_INFO:
                 case WifiP2pManager.REQUEST_GROUP_INFO:
+                case WifiP2pManager.REQUEST_DEVICE_INFO:
                 case WifiP2pManager.REQUEST_PEERS:
-                // These commands configure the framework behavior.
-                case WifiP2pManager.ADD_EXTERNAL_APPROVER:
-                case WifiP2pManager.REMOVE_EXTERNAL_APPROVER:
-                case WifiP2pManager.SET_CONNECTION_REQUEST_RESULT:
                 // These commands could be cached and executed on activating P2P.
                 case WifiP2pManager.SET_DEVICE_NAME:
-                case WifiP2pManager.SET_VENDOR_ELEMENTS:
                     return false;
             }
             return true;
@@ -1547,11 +1149,11 @@
         class DefaultState extends State {
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 switch (message.what) {
                     case AsyncChannel.CMD_CHANNEL_HALF_CONNECTED:
                         if (message.arg1 == AsyncChannel.STATUS_SUCCESSFUL) {
-                            if (isVerboseLoggingEnabled()) {
+                            if (mVerboseLoggingEnabled) {
                                 logd("Full connection with ClientModeImpl established");
                             }
                             mWifiChannel = (AsyncChannel) message.obj;
@@ -1571,7 +1173,7 @@
                         transitionTo(mP2pDisabledState);
                         break;
                     case AsyncChannel.CMD_CHANNEL_FULL_CONNECTION:
-                        AsyncChannel ac = new AsyncChannel();
+                        AsyncChannel ac = new WifiAsyncChannel(TAG);
                         ac.connect(mContext, getHandler(), message.replyTo);
                         break;
                     case BLOCK_DISCOVERY:
@@ -1588,7 +1190,7 @@
                                 WifiP2pManager.BUSY);
                         break;
                     case WifiP2pManager.STOP_DISCOVERY:
-                        if (isWifiP2pAvailable()) {
+                        if (mIsWifiEnabled) {
                             replyToMessage(message, WifiP2pManager.STOP_DISCOVERY_SUCCEEDED);
                         } else {
                             replyToMessage(message, WifiP2pManager.STOP_DISCOVERY_FAILED,
@@ -1616,7 +1218,7 @@
                                 WifiP2pManager.BUSY);
                         break;
                     case WifiP2pManager.STOP_LISTEN:
-                        if (isWifiP2pAvailable()) {
+                        if (mIsWifiEnabled) {
                             replyToMessage(message, WifiP2pManager.STOP_LISTEN_SUCCEEDED);
                         }
                         break;
@@ -1648,7 +1250,7 @@
                         break;
                     case WifiP2pManager.SET_DEVICE_NAME:
                     {
-                        if (!isWifiP2pAvailable()) {
+                        if (!mIsWifiEnabled) {
                             replyToMessage(message, WifiP2pManager.SET_DEVICE_NAME_FAILED,
                                     WifiP2pManager.BUSY);
                             break;
@@ -1664,7 +1266,7 @@
                         }
                         WifiP2pDevice d = (WifiP2pDevice) message.obj;
                         if (d != null && setAndPersistDeviceName(d.deviceName)) {
-                            if (isVerboseLoggingEnabled()) logd("set device name " + d.deviceName);
+                            if (mVerboseLoggingEnabled) logd("set device name " + d.deviceName);
                             replyToMessage(message, WifiP2pManager.SET_DEVICE_NAME_SUCCEEDED);
                         } else {
                             replyToMessage(message, WifiP2pManager.SET_DEVICE_NAME_FAILED,
@@ -1679,7 +1281,6 @@
                     case WifiP2pManager.SET_WFD_INFO:
                         WifiP2pWfdInfo d = (WifiP2pWfdInfo) message.obj;
                         if (!getWfdPermission(message.sendingUid)) {
-                            loge("No WFD permission, uid = " + message.sendingUid);
                             replyToMessage(message, WifiP2pManager.SET_WFD_INFO_FAILED,
                                     WifiP2pManager.ERROR);
                         } else if (d != null) {
@@ -1694,31 +1295,17 @@
                         replyToMessage(message, WifiP2pManager.RESPONSE_PEERS,
                                 getPeers(getCallingPkgName(message.sendingUid, message.replyTo),
                                         getCallingFeatureId(message.sendingUid, message.replyTo),
-                                        message.sendingUid, (Bundle) message.obj));
+                                        message.sendingUid));
                         break;
                     case WifiP2pManager.REQUEST_CONNECTION_INFO:
                         replyToMessage(message, WifiP2pManager.RESPONSE_CONNECTION_INFO,
                                 new WifiP2pInfo(mWifiP2pInfo));
                         break;
-                    case WifiP2pManager.REQUEST_GROUP_INFO: {
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
-                            replyToMessage(message, WifiP2pManager.RESPONSE_GROUP_INFO, null);
-                            break;
-                        }
-                        int uid = message.sendingUid;
-                        Bundle extras = (Bundle) message.obj;
-                        boolean hasPermission = false;
-                        if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                            hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                                    packageName,
-                                    getCallingFeatureId(message.sendingUid, message.replyTo),
-                                    uid, false);
-                        } else {
-                            hasPermission = checkNearbyDevicesPermission(uid, packageName,
-                                    extras, "REQUEST_GROUP_INFO");
-                        }
-                        if (!hasPermission) {
+                    case WifiP2pManager.REQUEST_GROUP_INFO:
+                        if (!mWifiPermissionsUtil.checkCanAccessWifiDirect(
+                                getCallingPkgName(message.sendingUid, message.replyTo),
+                                getCallingFeatureId(message.sendingUid, message.replyTo),
+                                message.sendingUid, false)) {
                             replyToMessage(message, WifiP2pManager.RESPONSE_GROUP_INFO, null);
                             // remain at this state.
                             break;
@@ -1726,8 +1313,7 @@
                         replyToMessage(message, WifiP2pManager.RESPONSE_GROUP_INFO,
                                 maybeEraseOwnDeviceAddress(mGroup, message.sendingUid));
                         break;
-                    }
-                    case WifiP2pManager.REQUEST_PERSISTENT_GROUP_INFO: {
+                    case WifiP2pManager.REQUEST_PERSISTENT_GROUP_INFO:
                         if (!checkNetworkSettingsOrNetworkStackOrReadWifiCredentialPermission(
                                 message.sendingUid)) {
                             loge("Permission violation - none of NETWORK_SETTING, NETWORK_STACK,"
@@ -1737,31 +1323,14 @@
                                     new WifiP2pGroupList());
                             break;
                         }
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
-                            replyToMessage(message, WifiP2pManager.RESPONSE_PERSISTENT_GROUP_INFO,
-                                    new WifiP2pGroupList());
-                            break;
-                        }
-                        Bundle extras = (Bundle) message.obj;
-                        if (!isPlatformOrTargetSdkLessThanT(packageName, message.sendingUid)
-                                && !checkNearbyDevicesPermission(message.sendingUid, packageName,
-                                        extras, "REQUEST_PERSISTENT_GROUP_INFO")) {
-                            loge("Permission violation - no NEARBY_WIFI_DEVICES permission, uid = "
-                                    + message.sendingUid);
-                            replyToMessage(message, WifiP2pManager.RESPONSE_PERSISTENT_GROUP_INFO,
-                                    new WifiP2pGroupList());
-                            break;
-                        }
                         replyToMessage(message, WifiP2pManager.RESPONSE_PERSISTENT_GROUP_INFO,
                                 new WifiP2pGroupList(
                                         maybeEraseOwnDeviceAddress(mGroups, message.sendingUid),
                                         null));
                         break;
-                    }
                     case WifiP2pManager.REQUEST_P2P_STATE:
                         replyToMessage(message, WifiP2pManager.RESPONSE_P2P_STATE,
-                                isWifiP2pAvailable()
+                                mIsWifiEnabled
                                 ? WifiP2pManager.WIFI_P2P_STATE_ENABLED
                                 : WifiP2pManager.WIFI_P2P_STATE_DISABLED);
                         break;
@@ -1788,10 +1357,6 @@
                         replyToMessage(message, WifiP2pManager.REPORT_NFC_HANDOVER_FAILED,
                                 WifiP2pManager.BUSY);
                         break;
-                    case WifiP2pManager.SET_CONNECTION_REQUEST_RESULT:
-                        replyToMessage(message, WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_FAILED,
-                                WifiP2pManager.BUSY);
-                        break;
                     case WifiP2pMonitor.P2P_INVITATION_RESULT_EVENT:
                     case WifiP2pMonitor.SUP_CONNECTION_EVENT:
                     case WifiP2pMonitor.SUP_DISCONNECTION_EVENT:
@@ -1839,12 +1404,6 @@
                         // a group removed event. Flushing things at group formation
                         // failure causes supplicant issues. Ignore right now.
                         break;
-                    case WifiP2pMonitor.P2P_GO_NEGOTIATION_FAILURE_EVENT:
-                        if (null != mSavedRejectedPeerConfig) {
-                            sendP2pRequestChangedBroadcast(false);
-                            mSavedRejectedPeerConfig = null;
-                        }
-                        break;
                     case WifiP2pManager.FACTORY_RESET:
                         if (factoryReset(message.sendingUid)) {
                             replyToMessage(message, WifiP2pManager.FACTORY_RESET_SUCCEEDED);
@@ -1884,7 +1443,7 @@
                                     WifiP2pManager.RESPONSE_ONGOING_PEER_CONFIG, null);
                         }
                         break;
-                    case WifiP2pManager.UPDATE_CHANNEL_INFO: {
+                    case WifiP2pManager.UPDATE_CHANNEL_INFO:
                         if (!(message.obj instanceof Bundle)) {
                             break;
                         }
@@ -1903,132 +1462,19 @@
                             ClientInfo clientInfo = getClientInfo(message.replyTo, true);
                             clientInfo.mPackageName = pkgName;
                             clientInfo.mFeatureId = featureId;
-                            if (SdkLevel.isAtLeastS()) {
-                                AttributionSource source = (AttributionSource) bundle.getParcelable(
-                                        WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE);
-                                if (null != source) {
-                                    mClientAttributionSource.put(binder, source);
-                                }
-                            }
                         }
                         break;
-                    }
                     case WifiP2pManager.REQUEST_DEVICE_INFO:
-                    {
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
-                            replyToMessage(message, WifiP2pManager.RESPONSE_DEVICE_INFO, null);
-                            break;
-                        }
-                        int uid = message.sendingUid;
-                        Bundle extras = (Bundle) message.obj;
-                        boolean hasPermission = false;
-                        if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                            hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                                    packageName,
-                                    getCallingFeatureId(message.sendingUid, message.replyTo),
-                                    uid, false);
-                        } else {
-                            hasPermission = checkNearbyDevicesPermission(uid, packageName,
-                                    extras, "REQUEST_DEVICE_INFO");
-                        }
-                        if (!hasPermission) {
+                        if (!mWifiPermissionsUtil.checkCanAccessWifiDirect(
+                                getCallingPkgName(message.sendingUid, message.replyTo),
+                                getCallingFeatureId(message.sendingUid, message.replyTo),
+                                message.sendingUid, false)) {
                             replyToMessage(message, WifiP2pManager.RESPONSE_DEVICE_INFO, null);
                             break;
                         }
                         replyToMessage(message, WifiP2pManager.RESPONSE_DEVICE_INFO,
                                 maybeEraseOwnDeviceAddress(mThisDevice, message.sendingUid));
                         break;
-                    }
-                    case WifiP2pManager.REMOVE_CLIENT:
-                        if (!isFeatureSupported(WifiP2pManager.FEATURE_GROUP_CLIENT_REMOVAL)) {
-                            replyToMessage(message, WifiP2pManager.REMOVE_CLIENT_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        replyToMessage(message, WifiP2pManager.REMOVE_CLIENT_SUCCEEDED);
-                        break;
-                    case WifiP2pManager.ADD_EXTERNAL_APPROVER: {
-                        Bundle extras = (Bundle) message.obj;
-                        MacAddress devAddr = extras.getParcelable(
-                                WifiP2pManager.EXTRA_PARAM_KEY_PEER_ADDRESS);
-                        IBinder binder = extras.getBinder(WifiP2pManager.CALLING_BINDER);
-                        if (!checkExternalApproverCaller(message, binder, devAddr,
-                                "ADD_EXTERNAL_APPROVER")) {
-                            replyToMessage(message, WifiP2pManager.EXTERNAL_APPROVER_DETACH,
-                                    ExternalApproverRequestListener.APPROVER_DETACH_REASON_FAILURE,
-                                    devAddr);
-                            break;
-                        }
-                        ApproverEntry entry = mExternalApproverManager.put(
-                                binder, devAddr, message);
-                        // A non-null entry indicates that the device address was added before.
-                        // So inform the approver about detach.
-                        if (null != entry) {
-                            logd("Replace an existing approver " + entry);
-                            replyToMessage(entry.getMessage(),
-                                    WifiP2pManager.EXTERNAL_APPROVER_DETACH,
-                                    ExternalApproverRequestListener.APPROVER_DETACH_REASON_REPLACE,
-                                    devAddr);
-                            break;
-                        }
-                        logd("Add the approver " + mExternalApproverManager.get(devAddr));
-                        replyToMessage(message, WifiP2pManager.EXTERNAL_APPROVER_ATTACH, devAddr);
-                        break;
-                    }
-                    case WifiP2pManager.REMOVE_EXTERNAL_APPROVER: {
-                        Bundle extras = (Bundle) message.obj;
-                        MacAddress devAddr = extras.getParcelable(
-                                WifiP2pManager.EXTRA_PARAM_KEY_PEER_ADDRESS);
-                        IBinder binder = extras.getBinder(WifiP2pManager.CALLING_BINDER);
-                        if (!checkExternalApproverCaller(message, binder, devAddr,
-                                "REMOVE_EXTERNAL_APPROVER")) {
-                            replyToMessage(message,
-                                    WifiP2pManager.REMOVE_EXTERNAL_APPROVER_FAILED);
-                            break;
-                        }
-                        ApproverEntry entry = mExternalApproverManager.remove(
-                                binder, devAddr);
-                        if (null != entry) {
-                            logd("Remove the approver " + entry);
-                            replyToMessage(entry.getMessage(),
-                                    WifiP2pManager.EXTERNAL_APPROVER_DETACH,
-                                    ExternalApproverRequestListener.APPROVER_DETACH_REASON_REMOVE,
-                                    devAddr);
-                            break;
-                        }
-                        replyToMessage(message, WifiP2pManager.REMOVE_EXTERNAL_APPROVER_SUCCEEDED);
-                        break;
-                    }
-                    case WifiP2pManager.SET_VENDOR_ELEMENTS: {
-                        if (!isFeatureSupported(WifiP2pManager.FEATURE_SET_VENDOR_ELEMENTS)) {
-                            replyToMessage(message, WifiP2pManager.SET_VENDOR_ELEMENTS_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        if (!mWifiPermissionsUtil.checkConfigOverridePermission(
-                                message.sendingUid)) {
-                            loge(" Uid " + message.sendingUid
-                                    + " has no config override permission");
-                            replyToMessage(message, WifiP2pManager.SET_VENDOR_ELEMENTS_FAILED);
-                            break;
-                        }
-                        if (!checkNearbyDevicesPermission(message, "SET_VENDOR_ELEMENTS")) {
-                            replyToMessage(message, WifiP2pManager.SET_VENDOR_ELEMENTS_FAILED);
-                            break;
-                        }
-                        Bundle extras = (Bundle) message.obj;
-                        ArrayList<ScanResult.InformationElement> ies =
-                                extras.getParcelableArrayList(
-                                        WifiP2pManager.EXTRA_PARAM_KEY_INFORMATION_ELEMENT_LIST);
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (!updateVendorElements(packageName, ies)) {
-                            replyToMessage(message, WifiP2pManager.SET_VENDOR_ELEMENTS_FAILED);
-                            break;
-                        }
-                        replyToMessage(message, WifiP2pManager.SET_VENDOR_ELEMENTS_SUCCEEDED);
-                        break;
-                    }
                     default:
                         loge("Unhandled message " + message);
                         return NOT_HANDLED;
@@ -2105,7 +1551,6 @@
                         break;
                     case WifiP2pManager.SET_WFD_INFO:
                         if (!getWfdPermission(message.sendingUid)) {
-                            loge("No WFD permission, uid = " + message.sendingUid);
                             replyToMessage(message, WifiP2pManager.SET_WFD_INFO_FAILED,
                                     WifiP2pManager.ERROR);
                         } else {
@@ -2129,18 +1574,6 @@
                         replyToMessage(message, WifiP2pManager.FACTORY_RESET_FAILED,
                                 WifiP2pManager.P2P_UNSUPPORTED);
                         break;
-                    case WifiP2pManager.REMOVE_CLIENT:
-                        replyToMessage(message, WifiP2pManager.REMOVE_CLIENT_FAILED,
-                                WifiP2pManager.P2P_UNSUPPORTED);
-                        break;
-                    case WifiP2pManager.SET_CONNECTION_REQUEST_RESULT:
-                        replyToMessage(message, WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_FAILED,
-                                WifiP2pManager.P2P_UNSUPPORTED);
-                        break;
-                    case WifiP2pManager.SET_VENDOR_ELEMENTS:
-                        replyToMessage(message, WifiP2pManager.SET_VENDOR_ELEMENTS_FAILED,
-                                WifiP2pManager.P2P_UNSUPPORTED);
-                        break;
 
                     default:
                         return NOT_HANDLED;
@@ -2152,17 +1585,17 @@
         class P2pDisablingState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
                 sendMessageDelayed(obtainMessage(DISABLE_P2P_TIMED_OUT,
                         ++sDisableP2pTimeoutIndex, 0), DISABLE_P2P_WAIT_TIME_MS);
             }
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 switch (message.what) {
                     case WifiP2pMonitor.SUP_DISCONNECTION_EVENT:
-                        if (isVerboseLoggingEnabled()) logd("p2p socket connection lost");
+                        if (mVerboseLoggingEnabled) logd("p2p socket connection lost");
                         transitionTo(mP2pDisabledState);
                         break;
                     case ENABLE_P2P:
@@ -2183,17 +1616,15 @@
             }
         }
 
-        class P2pDisabledContainerState extends State { // split due to b/220588514
+        class P2pDisabledState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
                 mInterfaceName = null; // reset iface name on disable.
                 mActiveClients.clear();
                 clearP2pInternalDataIfNecessary();
             }
-        }
 
-        class P2pDisabledState extends State {
             private void setupInterfaceFeatures(String interfaceName) {
                 if (mContext.getResources().getBoolean(
                         R.bool.config_wifi_p2p_mac_randomization_supported)) {
@@ -2205,9 +1636,8 @@
             }
 
             private boolean setupInterface() {
-                if (!isWifiP2pAvailable()) {
-                    Log.e(TAG, "Ignore P2P enable since wifi is " + mIsWifiEnabled
-                            + ", P2P disallowed by admin=" + mIsP2pDisallowedByAdmin);
+                if (!mIsWifiEnabled) {
+                    Log.e(TAG, "Ignore P2P enable since wifi is " + mIsWifiEnabled);
                     return false;
                 }
                 WorkSource requestorWs = createMergedRequestorWs();
@@ -2231,25 +1661,14 @@
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 switch (message.what) {
-                    case ENABLE_P2P: {
-                        int proceedWithOperation =
-                                mInterfaceConflictManager.manageInterfaceConflictForStateMachine(
-                                        TAG, message, mP2pStateMachine, mWaitingState,
-                                        mP2pDisabledState, HalDeviceManager.HDM_CREATE_IFACE_P2P,
-                                        createMergedRequestorWs());
-                        if (proceedWithOperation == InterfaceConflictManager.ICM_ABORT_COMMAND) {
-                            Log.e(TAG, "User refused to set up P2P");
-                        } else if (proceedWithOperation
-                                == InterfaceConflictManager.ICM_EXECUTE_COMMAND) {
-                            if (setupInterface()) {
-                                transitionTo(mInactiveState);
-                            }
-                        } // else InterfaceConflictManager.ICM_SKIP_COMMAND_WAIT_FOR_USER: nop
+                    case ENABLE_P2P:
+                        if (setupInterface()) {
+                            transitionTo(mInactiveState);
+                        }
                         break;
-                    }
-                    case REMOVE_CLIENT_INFO: {
+                    case REMOVE_CLIENT_INFO:
                         if (!(message.obj instanceof IBinder)) {
                             loge("Invalid obj when REMOVE_CLIENT_INFO");
                             break;
@@ -2262,10 +1681,8 @@
                         if (clientInfo != null) {
                             logd("Remove client - " + clientInfo.mPackageName);
                         }
-                        detachExternalApproverFromClient(b);
                         break;
-                    }
-                    default: {
+                    default:
                         // only handle commands from clients and only commands
                         // which require P2P to be active.
                         if (!needsActiveP2p(message.what)) {
@@ -2281,30 +1698,16 @@
                         // P2P interface will be created if all of the below are true:
                         // a) Wifi is enabled.
                         // b) There is at least 1 client app which invoked initialize().
-                        if (isVerboseLoggingEnabled()) {
-                            Log.d(TAG, "Wifi enabled=" + mIsWifiEnabled
-                                    + ", P2P disallowed by admin=" + mIsP2pDisallowedByAdmin
-                                    + ", Number of clients=" + mDeathDataByBinder.size());
+                        if (mVerboseLoggingEnabled) {
+                            Log.d(TAG, "Wifi enabled=" + mIsWifiEnabled + ", Number of clients="
+                                    + mDeathDataByBinder.size());
                         }
-                        if (!isWifiP2pAvailable()) return NOT_HANDLED;
+                        if (!mIsWifiEnabled) return NOT_HANDLED;
                         if (mDeathDataByBinder.isEmpty()) return NOT_HANDLED;
-
-                        int proceedWithOperation =
-                                mInterfaceConflictManager.manageInterfaceConflictForStateMachine(
-                                        TAG, message, mP2pStateMachine, mWaitingState,
-                                        mP2pDisabledState, HalDeviceManager.HDM_CREATE_IFACE_P2P,
-                                        createMergedRequestorWs());
-                        if (proceedWithOperation == InterfaceConflictManager.ICM_ABORT_COMMAND) {
-                            Log.e(TAG, "User refused to set up P2P");
-                            return NOT_HANDLED;
-                        } else if (proceedWithOperation
-                                == InterfaceConflictManager.ICM_EXECUTE_COMMAND) {
-                            if (!setupInterface()) return NOT_HANDLED;
-                            deferMessage(message);
-                            transitionTo(mInactiveState);
-                        }  // else InterfaceConflictManager.ICM_SKIP_COMMAND_WAIT_FOR_USER: nop
+                        if (!setupInterface()) return NOT_HANDLED;
+                        deferMessage(message);
+                        transitionTo(mInactiveState);
                         break;
-                    }
                 }
                 return HANDLED;
             }
@@ -2313,7 +1716,7 @@
         class P2pEnabledState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
 
                 if (isPendingFactoryReset()) {
                     factoryReset(Process.SYSTEM_UID);
@@ -2327,7 +1730,7 @@
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 switch (message.what) {
                     case WifiP2pMonitor.SUP_DISCONNECTION_EVENT:
                         loge("Unexpected loss of p2p socket connection");
@@ -2360,13 +1763,11 @@
                         if (!mWifiNative.replaceRequestorWs(createMergedRequestorWs())) {
                             Log.e(TAG, "Failed to replace requestorWs");
                         }
-                        detachExternalApproverFromClient(b);
                         break;
                     case WifiP2pManager.SET_WFD_INFO:
                     {
                         WifiP2pWfdInfo d = (WifiP2pWfdInfo) message.obj;
                         if (!getWfdPermission(message.sendingUid)) {
-                            loge("No WFD permission, uid = " + message.sendingUid);
                             replyToMessage(message, WifiP2pManager.SET_WFD_INFO_FAILED,
                                     WifiP2pManager.ERROR);
                         } else if (d != null && setWfdInfo(d)) {
@@ -2387,7 +1788,7 @@
                         }
                         if (!blocked && mDiscoveryPostponed) {
                             mDiscoveryPostponed = false;
-                            if (p2pFind(DISCOVER_TIMEOUT_S)) {
+                            if (mWifiNative.p2pFind(DISCOVER_TIMEOUT_S)) {
                                 sendP2pDiscoveryChangedBroadcast(true);
                             }
                         }
@@ -2395,36 +1796,11 @@
                             mWifiChannel.replyToMessage(message, message.arg2);
                         }
                         break;
-                    case WifiP2pManager.DISCOVER_PEERS: {
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
-                            replyToMessage(message, WifiP2pManager.DISCOVER_PEERS_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        int scanType = message.arg1;
-                        int uid = message.sendingUid;
-                        Bundle extras = (Bundle) message.obj;
-                        int freq = extras.getInt(
-                                    WifiP2pManager.EXTRA_PARAM_KEY_PEER_DISCOVERY_FREQ,
-                                    WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED);
-                        boolean hasPermission = false;
-                        if (scanType != WifiP2pManager.WIFI_P2P_SCAN_FULL
-                                && !isFeatureSupported(WifiP2pManager.FEATURE_FLEXIBLE_DISCOVERY)) {
-                            replyToMessage(message, WifiP2pManager.DISCOVER_PEERS_FAILED,
-                                    WifiP2pManager.ERROR);
-                        }
-                        if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                            hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                                    packageName,
-                                    getCallingFeatureId(message.sendingUid, message.replyTo),
-                                    uid, true);
-                        } else {
-                            hasPermission = checkNearbyDevicesPermission(uid, packageName,
-                                    extras, "DISCOVER_PEERS");
-                        }
-
-                        if (!hasPermission) {
+                    case WifiP2pManager.DISCOVER_PEERS:
+                        if (!mWifiPermissionsUtil.checkCanAccessWifiDirect(
+                                getCallingPkgName(message.sendingUid, message.replyTo),
+                                getCallingFeatureId(message.sendingUid, message.replyTo),
+                                message.sendingUid, true)) {
                             replyToMessage(message, WifiP2pManager.DISCOVER_PEERS_FAILED,
                                     WifiP2pManager.ERROR);
                             // remain at this state.
@@ -2437,8 +1813,7 @@
                         }
                         // do not send service discovery request while normal find operation.
                         clearSupplicantServiceRequest();
-                        Log.e(TAG, "-------discover_peers before p2pFind");
-                        if (p2pFind(scanType, freq, DISCOVER_TIMEOUT_S)) {
+                        if (mWifiNative.p2pFind(DISCOVER_TIMEOUT_S)) {
                             mWifiP2pMetrics.incrementPeerScans();
                             replyToMessage(message, WifiP2pManager.DISCOVER_PEERS_SUCCEEDED);
                             sendP2pDiscoveryChangedBroadcast(true);
@@ -2447,9 +1822,7 @@
                                     WifiP2pManager.ERROR);
                         }
                         break;
-                    }
                     case WifiP2pMonitor.P2P_FIND_STOPPED_EVENT:
-                        mWifiNative.removeVendorElements();
                         sendP2pDiscoveryChangedBroadcast(false);
                         break;
                     case WifiP2pManager.STOP_DISCOVERY:
@@ -2460,26 +1833,11 @@
                                     WifiP2pManager.ERROR);
                         }
                         break;
-                    case WifiP2pManager.DISCOVER_SERVICES: {
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
-                            replyToMessage(message, WifiP2pManager.DISCOVER_SERVICES_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        int uid = message.sendingUid;
-                        Bundle extras = (Bundle) message.obj;
-                        boolean hasPermission = false;
-                        if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                            hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                                    packageName,
-                                    getCallingFeatureId(message.sendingUid, message.replyTo),
-                                    uid, true);
-                        } else {
-                            hasPermission = checkNearbyDevicesPermission(uid, packageName,
-                                    extras, "DISCOVER_SERVICES");
-                        }
-                        if (!hasPermission) {
+                    case WifiP2pManager.DISCOVER_SERVICES:
+                        if (!mWifiPermissionsUtil.checkCanAccessWifiDirect(
+                                getCallingPkgName(message.sendingUid, message.replyTo),
+                                getCallingFeatureId(message.sendingUid, message.replyTo),
+                                message.sendingUid, true)) {
                             replyToMessage(message, WifiP2pManager.DISCOVER_SERVICES_FAILED,
                                     WifiP2pManager.ERROR);
                             // remain at this state.
@@ -2490,13 +1848,13 @@
                                     WifiP2pManager.BUSY);
                             break;
                         }
-                        if (isVerboseLoggingEnabled()) logd(getName() + " discover services");
+                        if (mVerboseLoggingEnabled) logd(getName() + " discover services");
                         if (!updateSupplicantServiceRequest()) {
                             replyToMessage(message, WifiP2pManager.DISCOVER_SERVICES_FAILED,
                                     WifiP2pManager.NO_SERVICE_REQUESTS);
                             break;
                         }
-                        if (p2pFind(DISCOVER_TIMEOUT_S)) {
+                        if (mWifiNative.p2pFind(DISCOVER_TIMEOUT_S)) {
                             sendP2pDiscoveryChangedBroadcast(true);
                             mWifiP2pMetrics.incrementServiceScans();
                             replyToMessage(message, WifiP2pManager.DISCOVER_SERVICES_SUCCEEDED);
@@ -2505,7 +1863,6 @@
                                     WifiP2pManager.ERROR);
                         }
                         break;
-                    }
                     case WifiP2pMonitor.P2P_DEVICE_FOUND_EVENT:
                         if (message.obj == null) {
                             Log.e(TAG, "Illegal argument(s)");
@@ -2528,52 +1885,36 @@
                             sendPeersChangedBroadcast();
                         }
                         break;
-                    case WifiP2pManager.ADD_LOCAL_SERVICE: {
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
-                            replyToMessage(message, WifiP2pManager.ADD_LOCAL_SERVICE_FAILED);
-                            break;
-                        }
-                        int uid = message.sendingUid;
-                        Bundle extras = (Bundle) message.obj;
-                        boolean hasPermission = false;
-                        if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                            hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                                    packageName,
-                                    getCallingFeatureId(message.sendingUid, message.replyTo),
-                                    uid, false);
-                        } else {
-                            hasPermission = checkNearbyDevicesPermission(uid, packageName,
-                                    extras, "ADD_LOCAL_SERVICE");
-                        }
-                        if (!hasPermission) {
+                    case WifiP2pManager.ADD_LOCAL_SERVICE:
+                        if (!mWifiPermissionsUtil.checkCanAccessWifiDirect(
+                                getCallingPkgName(message.sendingUid, message.replyTo),
+                                getCallingFeatureId(message.sendingUid, message.replyTo),
+                                message.sendingUid, false)) {
                             replyToMessage(message, WifiP2pManager.ADD_LOCAL_SERVICE_FAILED);
                             // remain at this state.
                             break;
                         }
-                        if (isVerboseLoggingEnabled()) logd(getName() + " add service");
-                        WifiP2pServiceInfo servInfo = (WifiP2pServiceInfo)
-                                extras.getParcelable(WifiP2pManager.EXTRA_PARAM_KEY_SERVICE_INFO);
+                        if (mVerboseLoggingEnabled) logd(getName() + " add service");
+                        WifiP2pServiceInfo servInfo = (WifiP2pServiceInfo) message.obj;
                         if (addLocalService(message.replyTo, servInfo)) {
                             replyToMessage(message, WifiP2pManager.ADD_LOCAL_SERVICE_SUCCEEDED);
                         } else {
                             replyToMessage(message, WifiP2pManager.ADD_LOCAL_SERVICE_FAILED);
                         }
                         break;
-                    }
                     case WifiP2pManager.REMOVE_LOCAL_SERVICE:
-                        if (isVerboseLoggingEnabled()) logd(getName() + " remove service");
-                        WifiP2pServiceInfo servInfo = (WifiP2pServiceInfo) message.obj;
+                        if (mVerboseLoggingEnabled) logd(getName() + " remove service");
+                        servInfo = (WifiP2pServiceInfo) message.obj;
                         removeLocalService(message.replyTo, servInfo);
                         replyToMessage(message, WifiP2pManager.REMOVE_LOCAL_SERVICE_SUCCEEDED);
                         break;
                     case WifiP2pManager.CLEAR_LOCAL_SERVICES:
-                        if (isVerboseLoggingEnabled()) logd(getName() + " clear service");
+                        if (mVerboseLoggingEnabled) logd(getName() + " clear service");
                         clearLocalServices(message.replyTo);
                         replyToMessage(message, WifiP2pManager.CLEAR_LOCAL_SERVICES_SUCCEEDED);
                         break;
                     case WifiP2pManager.ADD_SERVICE_REQUEST:
-                        if (isVerboseLoggingEnabled()) logd(getName() + " add service request");
+                        if (mVerboseLoggingEnabled) logd(getName() + " add service request");
                         if (!addServiceRequest(message.replyTo,
                                 (WifiP2pServiceRequest) message.obj)) {
                             replyToMessage(message, WifiP2pManager.ADD_SERVICE_REQUEST_FAILED);
@@ -2582,19 +1923,17 @@
                         replyToMessage(message, WifiP2pManager.ADD_SERVICE_REQUEST_SUCCEEDED);
                         break;
                     case WifiP2pManager.REMOVE_SERVICE_REQUEST:
-                        if (isVerboseLoggingEnabled()) logd(getName() + " remove service request");
+                        if (mVerboseLoggingEnabled) logd(getName() + " remove service request");
                         removeServiceRequest(message.replyTo, (WifiP2pServiceRequest) message.obj);
                         replyToMessage(message, WifiP2pManager.REMOVE_SERVICE_REQUEST_SUCCEEDED);
                         break;
                     case WifiP2pManager.CLEAR_SERVICE_REQUESTS:
-                        if (isVerboseLoggingEnabled()) logd(getName() + " clear service request");
+                        if (mVerboseLoggingEnabled) logd(getName() + " clear service request");
                         clearServiceRequests(message.replyTo);
                         replyToMessage(message, WifiP2pManager.CLEAR_SERVICE_REQUESTS_SUCCEEDED);
                         break;
                     case WifiP2pMonitor.P2P_SERV_DISC_RESP_EVENT:
-                        if (isVerboseLoggingEnabled()) {
-                            logd(getName() + " receive service response");
-                        }
+                        if (mVerboseLoggingEnabled) logd(getName() + " receive service response");
                         if (message.obj == null) {
                             Log.e(TAG, "Illegal argument(s)");
                             break;
@@ -2618,7 +1957,7 @@
                                     WifiP2pManager.ERROR);
                             break;
                         }
-                        if (isVerboseLoggingEnabled()) logd(getName() + " delete persistent group");
+                        if (mVerboseLoggingEnabled) logd(getName() + " delete persistent group");
                         mGroups.remove(message.arg1);
                         mWifiP2pMetrics.updatePersistentGroup(mGroups);
                         replyToMessage(message, WifiP2pManager.DELETE_PERSISTENT_GROUP_SUCCEEDED);
@@ -2627,29 +1966,15 @@
                         mWifiNative.setMiracastMode(message.arg1);
                         break;
                     case WifiP2pManager.START_LISTEN:
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
+                        if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(
+                                message.sendingUid)) {
+                            loge("Permission violation - no NETWORK_SETTING permission,"
+                                    + " uid = " + message.sendingUid);
                             replyToMessage(message, WifiP2pManager.START_LISTEN_FAILED);
                             break;
                         }
-                        int uid = message.sendingUid;
-                        Bundle extras = (Bundle) message.obj;
-                        boolean hasPermission = false;
-                        if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                            hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                                    packageName,
-                                    getCallingFeatureId(message.sendingUid, message.replyTo),
-                                    uid, true);
-                        } else {
-                            hasPermission = checkNearbyDevicesPermission(uid, packageName,
-                                    extras, "START_LISTEN");
-                        }
-                        if (!hasPermission) {
-                            replyToMessage(message, WifiP2pManager.START_LISTEN_FAILED);
-                            break;
-                        }
-                        if (isVerboseLoggingEnabled()) logd(getName() + " start listen mode");
-                        mWifiNative.p2pStopFind();
+                        if (mVerboseLoggingEnabled) logd(getName() + " start listen mode");
+                        mWifiNative.p2pFlush();
                         if (mWifiNative.p2pExtListen(true, 500, 500)) {
                             replyToMessage(message, WifiP2pManager.START_LISTEN_SUCCEEDED);
                         } else {
@@ -2657,13 +1982,20 @@
                         }
                         break;
                     case WifiP2pManager.STOP_LISTEN:
-                        if (isVerboseLoggingEnabled()) logd(getName() + " stop listen mode");
+                        if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(
+                                message.sendingUid)) {
+                            loge("Permission violation - no NETWORK_SETTING permission,"
+                                    + " uid = " + message.sendingUid);
+                            replyToMessage(message, WifiP2pManager.STOP_LISTEN_FAILED);
+                            break;
+                        }
+                        if (mVerboseLoggingEnabled) logd(getName() + " stop listen mode");
                         if (mWifiNative.p2pExtListen(false, 0, 0)) {
                             replyToMessage(message, WifiP2pManager.STOP_LISTEN_SUCCEEDED);
                         } else {
                             replyToMessage(message, WifiP2pManager.STOP_LISTEN_FAILED);
                         }
-                        mWifiNative.p2pStopFind();
+                        mWifiNative.p2pFlush();
                         break;
                     case WifiP2pManager.SET_CHANNEL:
                         if (!checkNetworkSettingsOrNetworkStackOrOverrideWifiConfigPermission(
@@ -2727,7 +2059,7 @@
         class InactiveState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
                 mSavedPeerConfig.invalidate();
                 mDetailedState = NetworkInfo.DetailedState.IDLE;
                 scheduleIdleShutdown();
@@ -2740,7 +2072,7 @@
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 // Re-schedule the shutdown timer since we got the new operation.
                 // only handle commands from clients.
                 if (message.what > Protocol.BASE_WIFI_P2P_MANAGER
@@ -2748,32 +2080,17 @@
                     scheduleIdleShutdown();
                 }
                 switch (message.what) {
-                    case WifiP2pManager.CONNECT: {
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
-                            replyToMessage(message, WifiP2pManager.CONNECT_FAILED);
-                            break;
-                        }
-                        int uid = message.sendingUid;
-                        Bundle extras = (Bundle) message.obj;
-                        boolean hasPermission = false;
-                        if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                            hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                                    packageName,
-                                    getCallingFeatureId(message.sendingUid, message.replyTo),
-                                    uid, false);
-                        } else {
-                            hasPermission = checkNearbyDevicesPermission(uid, packageName,
-                                    extras, "CONNECT");
-                        }
-                        if (!hasPermission) {
+                    case WifiP2pManager.CONNECT:
+                        if (!mWifiPermissionsUtil.checkCanAccessWifiDirect(
+                                getCallingPkgName(message.sendingUid, message.replyTo),
+                                getCallingFeatureId(message.sendingUid, message.replyTo),
+                                message.sendingUid, false)) {
                             replyToMessage(message, WifiP2pManager.CONNECT_FAILED);
                             // remain at this state.
                             break;
                         }
-                        if (isVerboseLoggingEnabled()) logd(getName() + " sending connect");
-                        WifiP2pConfig config = (WifiP2pConfig)
-                                extras.getParcelable(WifiP2pManager.EXTRA_PARAM_KEY_CONFIG);
+                        if (mVerboseLoggingEnabled) logd(getName() + " sending connect");
+                        WifiP2pConfig config = (WifiP2pConfig) message.obj;
 
                         boolean isConnectFailed = false;
                         if (isConfigValidAsGroup(config)) {
@@ -2782,7 +2099,7 @@
                             if (mWifiNative.p2pGroupAdd(config, true)) {
                                 mWifiP2pMetrics.startConnectionEvent(
                                         P2pConnectionEvent.CONNECTION_FAST,
-                                        config, WifiMetricsProto.GroupEvent.GROUP_CLIENT);
+                                        config);
                                 transitionTo(mGroupNegotiationState);
                             } else {
                                 loge("Cannot join a group with config.");
@@ -2800,12 +2117,12 @@
                                 if (reinvokePersistentGroup(config, false)) {
                                     mWifiP2pMetrics.startConnectionEvent(
                                             P2pConnectionEvent.CONNECTION_REINVOKE,
-                                            config, GroupEvent.GROUP_UNKNOWN);
+                                            config);
                                     transitionTo(mGroupNegotiationState);
                                 } else {
                                     mWifiP2pMetrics.startConnectionEvent(
                                             P2pConnectionEvent.CONNECTION_FRESH,
-                                            config, GroupEvent.GROUP_UNKNOWN);
+                                            config);
                                     transitionTo(mProvisionDiscoveryState);
                                 }
                             }
@@ -2819,7 +2136,6 @@
                             replyToMessage(message, WifiP2pManager.CONNECT_SUCCEEDED);
                         }
                         break;
-                    }
                     case WifiP2pManager.STOP_DISCOVERY:
                         if (mWifiNative.p2pStopFind()) {
                             // When discovery stops in inactive state, flush to clear
@@ -2837,7 +2153,7 @@
                         sendMessage(DISABLE_P2P);
                         break;
                     case WifiP2pMonitor.P2P_GO_NEGOTIATION_REQUEST_EVENT:
-                        WifiP2pConfig config = (WifiP2pConfig) message.obj;
+                        config = (WifiP2pConfig) message.obj;
                         if (isConfigInvalid(config)) {
                             loge("Dropping GO neg request " + config);
                             break;
@@ -2847,7 +2163,7 @@
                         mJoinExistingGroup = false;
                         mWifiP2pMetrics.startConnectionEvent(
                                 P2pConnectionEvent.CONNECTION_FRESH,
-                                config, GroupEvent.GROUP_UNKNOWN);
+                                config);
                         transitionTo(mUserAuthorizingNegotiationRequestState);
                         break;
                     case WifiP2pMonitor.P2P_INVITATION_RECEIVED_EVENT:
@@ -2897,7 +2213,7 @@
                         mJoinExistingGroup = true;
                         mWifiP2pMetrics.startConnectionEvent(
                                 P2pConnectionEvent.CONNECTION_FRESH,
-                                config, GroupEvent.GROUP_UNKNOWN);
+                                config);
                         transitionTo(mUserAuthorizingInviteRequestState);
                         break;
                     case WifiP2pMonitor.P2P_PROV_DISC_PBC_REQ_EVENT:
@@ -2928,26 +2244,11 @@
                         sendPeersChangedBroadcast();
                         transitionTo(mUserAuthorizingNegotiationRequestState);
                         break;
-                    case WifiP2pManager.CREATE_GROUP: {
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
-                            replyToMessage(message, WifiP2pManager.CREATE_GROUP_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        int uid = message.sendingUid;
-                        Bundle extras = (Bundle) message.obj;
-                        boolean hasPermission = false;
-                        if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                            hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                                    packageName,
-                                    getCallingFeatureId(message.sendingUid, message.replyTo),
-                                    uid, false);
-                        } else {
-                            hasPermission = checkNearbyDevicesPermission(uid, packageName,
-                                    extras, "CREATE_GROUP");
-                        }
-                        if (!hasPermission) {
+                    case WifiP2pManager.CREATE_GROUP:
+                        if (!mWifiPermissionsUtil.checkCanAccessWifiDirect(
+                                getCallingPkgName(message.sendingUid, message.replyTo),
+                                getCallingFeatureId(message.sendingUid, message.replyTo),
+                                message.sendingUid, false)) {
                             replyToMessage(message, WifiP2pManager.CREATE_GROUP_FAILED,
                                     WifiP2pManager.ERROR);
                             // remain at this state.
@@ -2955,14 +2256,13 @@
                         }
                         mAutonomousGroup = true;
                         int netId = message.arg1;
-                        config = (WifiP2pConfig)
-                                extras.getParcelable(WifiP2pManager.EXTRA_PARAM_KEY_CONFIG);
+                        config = (WifiP2pConfig) message.obj;
                         boolean ret = false;
                         if (config != null) {
                             if (isConfigValidAsGroup(config)) {
                                 mWifiP2pMetrics.startConnectionEvent(
                                         P2pConnectionEvent.CONNECTION_FAST,
-                                        config, GroupEvent.GROUP_OWNER);
+                                        config);
                                 ret = mWifiNative.p2pGroupAdd(config, false);
                             } else {
                                 ret = false;
@@ -2973,18 +2273,18 @@
                             if (netId != -1) {
                                 mWifiP2pMetrics.startConnectionEvent(
                                         P2pConnectionEvent.CONNECTION_REINVOKE,
-                                        null, GroupEvent.GROUP_OWNER);
+                                        null);
                                 ret = mWifiNative.p2pGroupAdd(netId);
                             } else {
                                 mWifiP2pMetrics.startConnectionEvent(
                                         P2pConnectionEvent.CONNECTION_LOCAL,
-                                        null, GroupEvent.GROUP_OWNER);
+                                        null);
                                 ret = mWifiNative.p2pGroupAdd(true);
                             }
                         } else {
                             mWifiP2pMetrics.startConnectionEvent(
                                     P2pConnectionEvent.CONNECTION_LOCAL,
-                                    null, GroupEvent.GROUP_OWNER);
+                                    null);
                             ret = mWifiNative.p2pGroupAdd(false);
                         }
 
@@ -2997,14 +2297,13 @@
                             // remain at this state.
                         }
                         break;
-                    }
                     case WifiP2pMonitor.P2P_GROUP_STARTED_EVENT:
                         if (message.obj == null) {
                             Log.e(TAG, "Invalid argument(s)");
                             break;
                         }
                         mGroup = (WifiP2pGroup) message.obj;
-                        if (isVerboseLoggingEnabled()) logd(getName() + " group started");
+                        if (mVerboseLoggingEnabled) logd(getName() + " group started");
                         if (mGroup.isGroupOwner()
                                 && EMPTY_DEVICE_ADDRESS.equals(mGroup.getOwner().deviceAddress)) {
                             // wpa_supplicant doesn't set own device address to go_dev_addr.
@@ -3021,29 +2320,15 @@
                         }
                         break;
                     case WifiP2pManager.START_LISTEN:
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
+                        if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(
+                                message.sendingUid)) {
+                            loge("Permission violation - no NETWORK_SETTING permission,"
+                                    + " uid = " + message.sendingUid);
                             replyToMessage(message, WifiP2pManager.START_LISTEN_FAILED);
                             break;
                         }
-                        int uid = message.sendingUid;
-                        Bundle extras = (Bundle) message.obj;
-                        boolean hasPermission = false;
-                        if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                            hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                                    packageName,
-                                    getCallingFeatureId(message.sendingUid, message.replyTo),
-                                    uid, true);
-                        } else {
-                            hasPermission = checkNearbyDevicesPermission(uid, packageName,
-                                    extras, "START_LISTEN");
-                        }
-                        if (!hasPermission) {
-                            replyToMessage(message, WifiP2pManager.START_LISTEN_FAILED);
-                            break;
-                        }
-                        if (isVerboseLoggingEnabled()) logd(getName() + " start listen mode");
-                        mWifiNative.p2pStopFind();
+                        if (mVerboseLoggingEnabled) logd(getName() + " start listen mode");
+                        mWifiNative.p2pFlush();
                         if (mWifiNative.p2pExtListen(true, 500, 500)) {
                             replyToMessage(message, WifiP2pManager.START_LISTEN_SUCCEEDED);
                         } else {
@@ -3051,13 +2336,20 @@
                         }
                         break;
                     case WifiP2pManager.STOP_LISTEN:
-                        if (isVerboseLoggingEnabled()) logd(getName() + " stop listen mode");
+                        if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(
+                                message.sendingUid)) {
+                            loge("Permission violation - no NETWORK_SETTING permission,"
+                                    + " uid = " + message.sendingUid);
+                            replyToMessage(message, WifiP2pManager.STOP_LISTEN_FAILED);
+                            break;
+                        }
+                        if (mVerboseLoggingEnabled) logd(getName() + " stop listen mode");
                         if (mWifiNative.p2pExtListen(false, 0, 0)) {
                             replyToMessage(message, WifiP2pManager.STOP_LISTEN_SUCCEEDED);
                         } else {
                             replyToMessage(message, WifiP2pManager.STOP_LISTEN_FAILED);
                         }
-                        mWifiNative.p2pStopFind();
+                        mWifiNative.p2pFlush();
                         break;
                     case WifiP2pManager.SET_CHANNEL:
                         if (!checkNetworkSettingsOrNetworkStackOrOverrideWifiConfigPermission(
@@ -3124,19 +2416,19 @@
         class GroupCreatingState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
                 sendMessageDelayed(obtainMessage(GROUP_CREATING_TIMED_OUT,
                         ++sGroupCreatingTimeoutIndex, 0), GROUP_CREATING_WAIT_TIME_MS);
             }
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 boolean ret = HANDLED;
                 switch (message.what) {
                     case GROUP_CREATING_TIMED_OUT:
                         if (sGroupCreatingTimeoutIndex == message.arg1) {
-                            if (isVerboseLoggingEnabled()) logd("Group negotiation timed out");
+                            if (mVerboseLoggingEnabled) logd("Group negotiation timed out");
                             mWifiP2pMetrics.endConnectionEvent(
                                     P2pConnectionEvent.CLF_TIMEOUT);
                             handleGroupCreationFailure();
@@ -3150,7 +2442,7 @@
                         }
                         WifiP2pDevice device = (WifiP2pDevice) message.obj;
                         if (!mSavedPeerConfig.deviceAddress.equals(device.deviceAddress)) {
-                            if (isVerboseLoggingEnabled()) {
+                            if (mVerboseLoggingEnabled) {
                                 logd("mSavedPeerConfig " + mSavedPeerConfig.deviceAddress
                                         + "device " + device.deviceAddress);
                             }
@@ -3159,7 +2451,7 @@
                             break;
                         }
                         // Do nothing
-                        if (isVerboseLoggingEnabled()) logd("Add device to lost list " + device);
+                        if (mVerboseLoggingEnabled) logd("Add device to lost list " + device);
                         mPeersLostDuringConnection.updateSupplicantDetails(device);
                         break;
                     case WifiP2pManager.DISCOVER_PEERS:
@@ -3176,14 +2468,6 @@
                         mWifiNative.p2pCancelConnect();
                         mWifiP2pMetrics.endConnectionEvent(
                                 P2pConnectionEvent.CLF_CANCEL);
-                        // Notify the peer about the rejection.
-                        if (mSavedPeerConfig != null) {
-                            mWifiNative.p2pStopFind();
-                            mWifiNative.p2pReject(mSavedPeerConfig.deviceAddress);
-                            // p2pReject() only updates the peer state, but not sends this
-                            // to the peer, trigger provision discovery to notify the peer.
-                            mWifiNative.p2pProvisionDiscovery(mSavedPeerConfig);
-                        }
                         handleGroupCreationFailure();
                         transitionTo(mInactiveState);
                         replyToMessage(message, WifiP2pManager.CANCEL_CONNECT_SUCCEEDED);
@@ -3203,18 +2487,16 @@
         class UserAuthorizingNegotiationRequestState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
                 if (mSavedPeerConfig.wps.setup == WpsInfo.PBC
                             || TextUtils.isEmpty(mSavedPeerConfig.wps.pin)) {
-                    notifyInvitationReceived(
-                            WifiP2pManager.ExternalApproverRequestListener
-                                    .REQUEST_TYPE_NEGOTIATION);
+                    notifyInvitationReceived();
                 }
             }
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 boolean ret = HANDLED;
                 switch (message.what) {
                     case PEER_CONNECTION_USER_ACCEPT:
@@ -3226,38 +2508,9 @@
                         transitionTo(mGroupNegotiationState);
                         break;
                     case PEER_CONNECTION_USER_REJECT:
-                        if (isVerboseLoggingEnabled()) {
+                        if (mVerboseLoggingEnabled) {
                             logd("User rejected negotiation " + mSavedPeerConfig);
                         }
-                        if (mSavedPeerConfig != null) {
-                            WifiP2pDevice dev = fetchCurrentDeviceDetails(mSavedPeerConfig);
-                            boolean join = (dev != null && dev.isGroupOwner())
-                                    || mJoinExistingGroup;
-                            if (mVerboseLoggingEnabled) {
-                                logd("User rejected negotiation, join =  " + join
-                                        + " peer = " + mSavedPeerConfig);
-                            }
-                            mSavedRejectedPeerConfig = new WifiP2pConfig(mSavedPeerConfig);
-                            if (join) {
-                                mWifiNative.p2pCancelConnect();
-                                mWifiNative.p2pStopFind();
-                                mWifiNative.p2pReject(mSavedPeerConfig.deviceAddress);
-                                // p2pReject() only updates the peer state, but not sends this
-                                // to the peer, trigger provision discovery to notify the peer.
-                                mWifiNative.p2pProvisionDiscovery(mSavedPeerConfig);
-                                sendP2pConnectionChangedBroadcast();
-                            } else {
-                                mWifiNative.p2pReject(mSavedPeerConfig.deviceAddress);
-                                // p2pReject() only updates the peer state, but not sends this
-                                // to the peer, trigger negotiation request to notify the peer.
-                                p2pConnectWithPinDisplay(mSavedPeerConfig,
-                                        P2P_CONNECT_TRIGGER_GROUP_NEG_REQ);
-                            }
-                            mSavedPeerConfig.invalidate();
-                        } else {
-                            mWifiNative.p2pCancelConnect();
-                            handleGroupCreationFailure();
-                        }
                         transitionTo(mInactiveState);
                         break;
                     case PEER_CONNECTION_USER_CONFIRM:
@@ -3267,19 +2520,6 @@
                         mWifiNative.p2pConnect(mSavedPeerConfig, FORM_GROUP);
                         transitionTo(mGroupNegotiationState);
                         break;
-                    case WifiP2pManager.SET_CONNECTION_REQUEST_RESULT: {
-                        if (!handleSetConnectionResult(message,
-                                WifiP2pManager.ExternalApproverRequestListener
-                                        .REQUEST_TYPE_NEGOTIATION)) {
-                            replyToMessage(message,
-                                    WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        replyToMessage(message,
-                                WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_SUCCEEDED);
-                        break;
-                    }
                     default:
                         return NOT_HANDLED;
                 }
@@ -3288,24 +2528,20 @@
 
             @Override
             public void exit() {
-                if (null != mInvitationDialogHandle) {
-                    mInvitationDialogHandle.dismissDialog();
-                    mInvitationDialogHandle = null;
-                }
+                // TODO: dismiss dialog if not already done
             }
         }
 
         class UserAuthorizingInviteRequestState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
-                notifyInvitationReceived(
-                        WifiP2pManager.ExternalApproverRequestListener.REQUEST_TYPE_INVITATION);
+                if (mVerboseLoggingEnabled) logd(getName());
+                notifyInvitationReceived();
             }
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 boolean ret = HANDLED;
                 switch (message.what) {
                     case PEER_CONNECTION_USER_ACCEPT:
@@ -3320,23 +2556,11 @@
                         transitionTo(mGroupNegotiationState);
                         break;
                     case PEER_CONNECTION_USER_REJECT:
-                        if (isVerboseLoggingEnabled()) {
+                        if (mVerboseLoggingEnabled) {
                             logd("User rejected invitation " + mSavedPeerConfig);
                         }
                         transitionTo(mInactiveState);
                         break;
-                    case WifiP2pManager.SET_CONNECTION_REQUEST_RESULT:
-                        if (!handleSetConnectionResult(message,
-                                WifiP2pManager.ExternalApproverRequestListener
-                                        .REQUEST_TYPE_INVITATION)) {
-                            replyToMessage(message,
-                                    WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        replyToMessage(message,
-                                WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_SUCCEEDED);
-                        break;
                     default:
                         return NOT_HANDLED;
                 }
@@ -3345,23 +2569,20 @@
 
             @Override
             public void exit() {
-                if (null != mInvitationDialogHandle) {
-                    mInvitationDialogHandle.dismissDialog();
-                    mInvitationDialogHandle = null;
-                }
+                // TODO: dismiss dialog if not already done
             }
         }
 
         class ProvisionDiscoveryState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
                 mWifiNative.p2pProvisionDiscovery(mSavedPeerConfig);
             }
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 WifiP2pProvDiscEvent provDisc = null;
                 WifiP2pDevice device = null;
                 switch (message.what) {
@@ -3377,9 +2598,7 @@
                             break;
                         }
                         if (mSavedPeerConfig.wps.setup == WpsInfo.PBC) {
-                            if (isVerboseLoggingEnabled()) {
-                                logd("Found a match " + mSavedPeerConfig);
-                            }
+                            if (mVerboseLoggingEnabled) logd("Found a match " + mSavedPeerConfig);
                             p2pConnectWithPinDisplay(mSavedPeerConfig, P2P_CONNECT_TRIGGER_OTHER);
                             transitionTo(mGroupNegotiationState);
                         }
@@ -3396,9 +2615,7 @@
                             break;
                         }
                         if (mSavedPeerConfig.wps.setup == WpsInfo.KEYPAD) {
-                            if (isVerboseLoggingEnabled()) {
-                                logd("Found a match " + mSavedPeerConfig);
-                            }
+                            if (mVerboseLoggingEnabled) logd("Found a match " + mSavedPeerConfig);
                             // we already have the pin
                             if (!TextUtils.isEmpty(mSavedPeerConfig.wps.pin)) {
                                 p2pConnectWithPinDisplay(mSavedPeerConfig,
@@ -3425,9 +2642,7 @@
                             break;
                         }
                         if (mSavedPeerConfig.wps.setup == WpsInfo.DISPLAY) {
-                            if (isVerboseLoggingEnabled()) {
-                                logd("Found a match " + mSavedPeerConfig);
-                            }
+                            if (mVerboseLoggingEnabled) logd("Found a match " + mSavedPeerConfig);
                             mSavedPeerConfig.wps.pin = provDisc.pin;
                             p2pConnectWithPinDisplay(mSavedPeerConfig, P2P_CONNECT_TRIGGER_OTHER);
                             notifyInvitationSent(provDisc.pin, device.deviceAddress);
@@ -3435,15 +2650,7 @@
                         }
                         break;
                     case WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT:
-                        loge("provision discovery failed status: " + message.arg1);
-
-                        // Saved peer information is used in handleGroupCreationFailure().
-                        if (!handleProvDiscFailure(
-                                (WifiP2pProvDiscEvent) message.obj, false)) {
-                            break;
-                        }
-
-                        mWifiNative.p2pCancelConnect();
+                        loge("provision discovery failed");
                         mWifiP2pMetrics.endConnectionEvent(
                                 P2pConnectionEvent.CLF_PROV_DISC_FAIL);
                         handleGroupCreationFailure();
@@ -3459,18 +2666,18 @@
         class GroupNegotiationState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
             }
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 switch (message.what) {
                     // We ignore these right now, since we get a GROUP_STARTED notification
                     // afterwards
                     case WifiP2pMonitor.P2P_GO_NEGOTIATION_SUCCESS_EVENT:
                     case WifiP2pMonitor.P2P_GROUP_FORMATION_SUCCESS_EVENT:
-                        if (isVerboseLoggingEnabled()) logd(getName() + " go success");
+                        if (mVerboseLoggingEnabled) logd(getName() + " go success");
                         break;
                     case WifiP2pMonitor.P2P_GROUP_STARTED_EVENT:
                         if (message.obj == null) {
@@ -3478,7 +2685,7 @@
                             break;
                         }
                         mGroup = (WifiP2pGroup) message.obj;
-                        if (isVerboseLoggingEnabled()) logd(getName() + " group started");
+                        if (mVerboseLoggingEnabled) logd(getName() + " group started");
                         if (mGroup.isGroupOwner()
                                 && EMPTY_DEVICE_ADDRESS.equals(mGroup.getOwner().deviceAddress)) {
                             // wpa_supplicant doesn't set own device address to go_dev_addr.
@@ -3558,7 +2765,7 @@
                         }
                         // continue with group removal handling
                     case WifiP2pMonitor.P2P_GROUP_REMOVED_EVENT:
-                        if (isVerboseLoggingEnabled()) logd(getName() + " go failure");
+                        if (mVerboseLoggingEnabled) logd(getName() + " go failure");
                         mWifiP2pMetrics.endConnectionEvent(
                                 P2pConnectionEvent.CLF_UNKNOWN);
                         handleGroupCreationFailure();
@@ -3587,7 +2794,7 @@
                             // So, remove this credential accordingly.
                             int netId = mSavedPeerConfig.netId;
                             if (netId >= 0) {
-                                if (isVerboseLoggingEnabled()) {
+                                if (mVerboseLoggingEnabled) {
                                     logd("Remove unknown client from the list");
                                 }
                                 removeClientFromList(netId, mSavedPeerConfig.deviceAddress, true);
@@ -3622,17 +2829,6 @@
                             deferMessage(message);
                             break;
                         }
-                        break;
-                    case WifiP2pManager.SET_CONNECTION_REQUEST_RESULT:
-                        if (!handleSetConnectionResultForInvitationSent(message)) {
-                            replyToMessage(message,
-                                    WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        replyToMessage(message,
-                                WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_SUCCEEDED);
-                        break;
                     default:
                         return NOT_HANDLED;
                 }
@@ -3641,25 +2837,38 @@
         }
 
         class FrequencyConflictState extends State {
-            private WifiDialogManager.DialogHandle mFrequencyConflictDialog;
-            private AlertDialog mFrequencyConflictDialogPreT;
-
+            private AlertDialog mFrequencyConflictDialog;
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
                 notifyFrequencyConflict();
             }
 
-            private void showFrequencyConflictDialogPreT() {
+            private void notifyFrequencyConflict() {
+                logd("Notify frequency conflict");
                 Resources r = mContext.getResources();
+
                 AlertDialog dialog = mFrameworkFacade.makeAlertDialogBuilder(mContext)
                         .setMessage(r.getString(R.string.wifi_p2p_frequency_conflict_message,
-                                getDeviceName(mSavedPeerConfig.deviceAddress)))
-                        .setPositiveButton(r.getString(R.string.dlg_ok), (dialog1, which) ->
-                                sendMessage(DROP_WIFI_USER_ACCEPT))
-                        .setNegativeButton(r.getString(R.string.decline), (dialog2, which) ->
-                                sendMessage(DROP_WIFI_USER_REJECT))
-                        .setOnCancelListener(arg0 -> sendMessage(DROP_WIFI_USER_REJECT))
+                            getDeviceName(mSavedPeerConfig.deviceAddress)))
+                        .setPositiveButton(r.getString(R.string.dlg_ok), new OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                sendMessage(DROP_WIFI_USER_ACCEPT);
+                            }
+                        })
+                        .setNegativeButton(r.getString(R.string.decline), new OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                sendMessage(DROP_WIFI_USER_REJECT);
+                            }
+                        })
+                        .setOnCancelListener(new DialogInterface.OnCancelListener() {
+                            @Override
+                            public void onCancel(DialogInterface arg0) {
+                                sendMessage(DROP_WIFI_USER_REJECT);
+                            }
+                        })
                         .create();
                 dialog.setCanceledOnTouchOutside(false);
 
@@ -3667,58 +2876,12 @@
                 dialog.getWindow().addSystemFlags(
                         WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS);
                 dialog.show();
-                mFrequencyConflictDialogPreT = dialog;
-            }
-
-            private void showFrequencyConflictDialog() {
-                Resources r = mContext.getResources();
-                WifiDialogManager.DialogHandle dialog = mWifiInjector.getWifiDialogManager()
-                        .createSimpleDialog(
-                                null /* title */,
-                                r.getString(R.string.wifi_p2p_frequency_conflict_message,
-                                        getDeviceName(mSavedPeerConfig.deviceAddress)),
-                                r.getString(R.string.dlg_ok),
-                                r.getString(R.string.decline),
-                                null /* neutralButtonText */,
-                                new WifiDialogManager.SimpleDialogCallback() {
-                                    @Override
-                                    public void onPositiveButtonClicked() {
-                                        sendMessage(DROP_WIFI_USER_ACCEPT);
-                                    }
-
-                                    @Override
-                                    public void onNegativeButtonClicked() {
-                                        sendMessage(DROP_WIFI_USER_REJECT);
-                                    }
-
-                                    @Override
-                                    public void onNeutralButtonClicked() {
-                                        // Not used
-                                        sendMessage(DROP_WIFI_USER_REJECT);
-                                    }
-
-                                    @Override
-                                    public void onCancelled() {
-                                        sendMessage(DROP_WIFI_USER_REJECT);
-                                    }
-                                },
-                                new WifiThreadRunner(getHandler()));
                 mFrequencyConflictDialog = dialog;
-                dialog.launchDialog();
-            }
-
-            private void notifyFrequencyConflict() {
-                logd("Notify frequency conflict");
-                if (!SdkLevel.isAtLeastT()) {
-                    showFrequencyConflictDialogPreT();
-                } else {
-                    showFrequencyConflictDialog();
-                }
             }
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 switch (message.what) {
                     case WifiP2pMonitor.P2P_GO_NEGOTIATION_SUCCESS_EVENT:
                     case WifiP2pMonitor.P2P_GROUP_FORMATION_SUCCESS_EVENT:
@@ -3736,31 +2899,27 @@
                         break;
                     case DROP_WIFI_USER_REJECT:
                         // User rejected dropping wifi in favour of p2p
-                        mFrequencyConflictDialog = null;
-                        mFrequencyConflictDialogPreT = null;
                         mWifiP2pMetrics.endConnectionEvent(
                                 P2pConnectionEvent.CLF_USER_REJECT);
                         handleGroupCreationFailure();
                         transitionTo(mInactiveState);
                         break;
                     case DROP_WIFI_USER_ACCEPT:
-                        mFrequencyConflictDialog = null;
-                        mFrequencyConflictDialogPreT = null;
                         // User accepted dropping wifi in favour of p2p
-                        sendDisconnectWifiRequest(true);
+                        if (mWifiChannel != null) {
+                            mWifiChannel.sendMessage(WifiP2pServiceImpl.DISCONNECT_WIFI_REQUEST, 1);
+                        } else {
+                            loge("DROP_WIFI_USER_ACCEPT message received when WifiChannel is null");
+                        }
+                        mTemporarilyDisconnectedWifi = true;
                         break;
                     case DISCONNECT_WIFI_RESPONSE:
                         // Got a response from ClientModeImpl, retry p2p
-                        if (isVerboseLoggingEnabled()) {
+                        if (mVerboseLoggingEnabled) {
                             logd(getName() + "Wifi disconnected, retry p2p");
                         }
                         transitionTo(mInactiveState);
-                        Bundle extras = new Bundle();
-                        extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_CONFIG,
-                                mSavedPeerConfig);
-                        extras.putBoolean(
-                                WifiP2pManager.EXTRA_PARAM_KEY_INTERNAL_MESSAGE, true);
-                        sendMessage(WifiP2pManager.CONNECT, extras);
+                        sendMessage(WifiP2pManager.CONNECT, mSavedPeerConfig);
                         break;
                     default:
                         return NOT_HANDLED;
@@ -3769,19 +2928,14 @@
             }
 
             public void exit() {
-                if (mFrequencyConflictDialogPreT != null) {
-                    mFrequencyConflictDialogPreT.dismiss();
-                }
-                if (mFrequencyConflictDialog != null) {
-                    mFrequencyConflictDialog.dismissDialog();
-                }
+                if (mFrequencyConflictDialog != null) mFrequencyConflictDialog.dismiss();
             }
         }
 
         class GroupCreatedState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
                 // Once connected, peer config details are invalid
                 mSavedPeerConfig.invalidate();
                 mDetailedState = NetworkInfo.DetailedState.CONNECTED;
@@ -3813,7 +2967,7 @@
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 WifiP2pDevice device = null;
                 String deviceAddress = null;
                 switch (message.what) {
@@ -3833,7 +2987,7 @@
                                 mGroup.addClient(deviceAddress);
                             }
                             mPeers.updateStatus(deviceAddress, WifiP2pDevice.CONNECTED);
-                            if (isVerboseLoggingEnabled()) logd(getName() + " ap sta connected");
+                            if (mVerboseLoggingEnabled) logd(getName() + " ap sta connected");
                             sendPeersChangedBroadcast();
                             mWifiP2pMetrics.updateGroupEvent(mGroup);
                         } else {
@@ -3851,9 +3005,7 @@
                         if (deviceAddress != null) {
                             mPeers.updateStatus(deviceAddress, WifiP2pDevice.AVAILABLE);
                             if (mGroup.removeClient(deviceAddress)) {
-                                if (isVerboseLoggingEnabled()) {
-                                    logd("Removed client " + deviceAddress);
-                                }
+                                if (mVerboseLoggingEnabled) logd("Removed client " + deviceAddress);
                                 if (!mAutonomousGroup && mGroup.isClientListEmpty()) {
                                     logd("Client list empty, remove non-persistent p2p group");
                                     mWifiNative.p2pGroupRemove(mGroup.getInterface());
@@ -3865,17 +3017,15 @@
                                 }
                                 mWifiP2pMetrics.updateGroupEvent(mGroup);
                             } else {
-                                if (isVerboseLoggingEnabled()) {
+                                if (mVerboseLoggingEnabled) {
                                     logd("Failed to remove client " + deviceAddress);
                                 }
                                 for (WifiP2pDevice c : mGroup.getClientList()) {
-                                    if (isVerboseLoggingEnabled()) {
-                                        logd("client " + c.deviceAddress);
-                                    }
+                                    if (mVerboseLoggingEnabled) logd("client " + c.deviceAddress);
                                 }
                             }
                             sendPeersChangedBroadcast();
-                            if (isVerboseLoggingEnabled()) logd(getName() + " ap sta disconnected");
+                            if (mVerboseLoggingEnabled) logd(getName() + " ap sta disconnected");
                         } else {
                             loge("Disconnect on unknown device: " + device);
                         }
@@ -3897,7 +3047,7 @@
                             break;
                         }
 
-                        if (isVerboseLoggingEnabled()) {
+                        if (mVerboseLoggingEnabled) {
                             logd("mDhcpResultsParcelable: " + mDhcpResultsParcelable);
                         }
                         setWifiP2pInfoOnGroupFormation(mDhcpResultsParcelable.serverAddress);
@@ -3920,7 +3070,7 @@
                         mWifiNative.p2pGroupRemove(mGroup.getInterface());
                         break;
                     case WifiP2pManager.REMOVE_GROUP:
-                        if (isVerboseLoggingEnabled()) logd(getName() + " remove group");
+                        if (mVerboseLoggingEnabled) logd(getName() + " remove group");
                         if (mWifiNative.p2pGroupRemove(mGroup.getInterface())) {
                             transitionTo(mOngoingGroupRemovalState);
                             replyToMessage(message, WifiP2pManager.REMOVE_GROUP_SUCCEEDED);
@@ -3942,7 +3092,7 @@
                         //
                         // Treating network disconnection as group removal causes race conditions
                         // since supplicant would still maintain the group at that stage.
-                        if (isVerboseLoggingEnabled()) logd(getName() + " group removed");
+                        if (mVerboseLoggingEnabled) logd(getName() + " group removed");
                         handleGroupRemoved();
                         transitionTo(mInactiveState);
                         break;
@@ -3958,7 +3108,7 @@
                         }
                         // Device loss for a connected device indicates
                         // it is not in discovery any more
-                        if (isVerboseLoggingEnabled()) logd("Add device to lost list " + device);
+                        if (mVerboseLoggingEnabled) logd("Add device to lost list " + device);
                         mPeersLostDuringConnection.updateSupplicantDetails(device);
                         return HANDLED;
                     case DISABLE_P2P:
@@ -3994,31 +3144,16 @@
                         replyToMessage(message, ret ? WifiP2pManager.START_WPS_SUCCEEDED :
                                 WifiP2pManager.START_WPS_FAILED);
                         break;
-                    case WifiP2pManager.CONNECT: {
-                        String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-                        if (packageName == null) {
-                            replyToMessage(message, WifiP2pManager.CONNECT_FAILED);
-                            break;
-                        }
-                        int uid = message.sendingUid;
-                        Bundle extras = (Bundle) message.obj;
-                        boolean hasPermission = false;
-                        if (isPlatformOrTargetSdkLessThanT(packageName, uid)) {
-                            hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                                    packageName,
-                                    getCallingFeatureId(message.sendingUid, message.replyTo),
-                                    uid, false);
-                        } else {
-                            hasPermission = checkNearbyDevicesPermission(uid, packageName,
-                                    extras, "CONNECT");
-                        }
-                        if (!hasPermission) {
+                    case WifiP2pManager.CONNECT:
+                        if (!mWifiPermissionsUtil.checkCanAccessWifiDirect(
+                                getCallingPkgName(message.sendingUid, message.replyTo),
+                                getCallingFeatureId(message.sendingUid, message.replyTo),
+                                message.sendingUid, false)) {
                             replyToMessage(message, WifiP2pManager.CONNECT_FAILED);
                             // remain at this state.
                             break;
                         }
-                        WifiP2pConfig config = (WifiP2pConfig)
-                                extras.getParcelable(WifiP2pManager.EXTRA_PARAM_KEY_CONFIG);
+                        WifiP2pConfig config = (WifiP2pConfig) message.obj;
                         if (isConfigInvalid(config)) {
                             loge("Dropping connect request " + config);
                             replyToMessage(message, WifiP2pManager.CONNECT_FAILED);
@@ -4037,7 +3172,6 @@
                         // TODO: figure out updating the status to declined
                         // when invitation is rejected
                         break;
-                    }
                     case WifiP2pMonitor.P2P_INVITATION_RESULT_EVENT:
                         P2pStatus status = (P2pStatus) message.obj;
                         if (status == P2pStatus.SUCCESS) {
@@ -4050,17 +3184,12 @@
                             // So, remove this credential accordingly.
                             int netId = mGroup.getNetworkId();
                             if (netId >= 0) {
-                                if (isVerboseLoggingEnabled()) {
+                                if (mVerboseLoggingEnabled) {
                                     logd("Remove unknown client from the list");
                                 }
                                 removeClientFromList(netId, mSavedPeerConfig.deviceAddress, false);
                                 // try invitation.
-                                Bundle extras = new Bundle();
-                                extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_CONFIG,
-                                        mSavedPeerConfig);
-                                extras.putBoolean(
-                                        WifiP2pManager.EXTRA_PARAM_KEY_INTERNAL_MESSAGE, true);
-                                sendMessage(WifiP2pManager.CONNECT, extras);
+                                sendMessage(WifiP2pManager.CONNECT, mSavedPeerConfig);
                             }
                         }
                         break;
@@ -4086,9 +3215,7 @@
                         if (mGroup.isGroupOwner()) {
                             transitionTo(mUserAuthorizingJoinState);
                         } else {
-                            if (isVerboseLoggingEnabled()) {
-                                logd("Ignore provision discovery for GC");
-                            }
+                            if (mVerboseLoggingEnabled) logd("Ignore provision discovery for GC");
                         }
                         break;
                     case WifiP2pMonitor.P2P_GROUP_STARTED_EVENT:
@@ -4111,44 +3238,6 @@
 
                         replyToMessage(message, WifiP2pManager.CANCEL_CONNECT_SUCCEEDED);
                         break;
-                    case WifiP2pMonitor.P2P_FREQUENCY_CHANGED_EVENT:
-                        if (mGroup != null) {
-                            mGroup.setFrequency(message.arg1);
-                            sendP2pConnectionChangedBroadcast();
-                        }
-                        break;
-                    case WifiP2pManager.REMOVE_CLIENT: {
-                        if (!isFeatureSupported(WifiP2pManager.FEATURE_GROUP_CLIENT_REMOVAL)) {
-                            replyToMessage(message, WifiP2pManager.REMOVE_CLIENT_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        if (mVerboseLoggingEnabled) logd(getName() + " remove client");
-                        MacAddress peerAddress = (MacAddress) message.obj;
-
-                        if (peerAddress != null
-                                && mWifiNative.removeClient(peerAddress.toString())) {
-                            replyToMessage(message, WifiP2pManager.REMOVE_CLIENT_SUCCEEDED);
-                        } else {
-                            replyToMessage(message, WifiP2pManager.REMOVE_CLIENT_FAILED,
-                                    WifiP2pManager.ERROR);
-                        }
-                        break;
-                    }
-                    case WifiP2pManager.SET_CONNECTION_REQUEST_RESULT:
-                        if (!handleSetConnectionResultForInvitationSent(message)) {
-                            replyToMessage(message,
-                                    WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        replyToMessage(message,
-                                WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_SUCCEEDED);
-                        break;
-                    case WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT:
-                        loge("provision discovery failed status: " + message.arg1);
-                        handleProvDiscFailure((WifiP2pProvDiscEvent) message.obj, true);
-                        break;
                     default:
                         return NOT_HANDLED;
                 }
@@ -4177,28 +3266,19 @@
         class UserAuthorizingJoinState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
-                notifyInvitationReceived(
-                        WifiP2pManager.ExternalApproverRequestListener.REQUEST_TYPE_JOIN);
+                if (mVerboseLoggingEnabled) logd(getName());
+                notifyInvitationReceived();
             }
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 switch (message.what) {
                     case WifiP2pMonitor.P2P_PROV_DISC_PBC_REQ_EVENT:
                     case WifiP2pMonitor.P2P_PROV_DISC_ENTER_PIN_EVENT:
                     case WifiP2pMonitor.P2P_PROV_DISC_SHOW_PIN_EVENT:
                         // Ignore more client requests
                         break;
-                    case WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT:
-                        loge("provision discovery failed status: " + message.arg1);
-                        if (!handleProvDiscFailure(
-                                (WifiP2pProvDiscEvent) message.obj, true)) {
-                            break;
-                        }
-                        transitionTo(mGroupCreatedState);
-                        break;
                     case PEER_CONNECTION_USER_ACCEPT:
                         // Stop discovery to avoid failure due to channel switch
                         mWifiNative.p2pStopFind();
@@ -4211,21 +3291,9 @@
                         transitionTo(mGroupCreatedState);
                         break;
                     case PEER_CONNECTION_USER_REJECT:
-                        if (isVerboseLoggingEnabled()) logd("User rejected incoming request");
-                        mSavedPeerConfig.invalidate();
+                        if (mVerboseLoggingEnabled) logd("User rejected incoming request");
                         transitionTo(mGroupCreatedState);
                         break;
-                    case WifiP2pManager.SET_CONNECTION_REQUEST_RESULT:
-                        if (!handleSetConnectionResult(message,
-                                WifiP2pManager.ExternalApproverRequestListener.REQUEST_TYPE_JOIN)) {
-                            replyToMessage(message,
-                                    WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_FAILED,
-                                    WifiP2pManager.ERROR);
-                            break;
-                        }
-                        replyToMessage(message,
-                                WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_SUCCEEDED);
-                        break;
                     default:
                         return NOT_HANDLED;
                 }
@@ -4234,22 +3302,19 @@
 
             @Override
             public void exit() {
-                if (null != mInvitationDialogHandle) {
-                    mInvitationDialogHandle.dismissDialog();
-                    mInvitationDialogHandle = null;
-                }
+                // TODO: dismiss dialog if not already done
             }
         }
 
         class OngoingGroupRemovalState extends State {
             @Override
             public void enter() {
-                if (isVerboseLoggingEnabled()) logd(getName());
+                if (mVerboseLoggingEnabled) logd(getName());
             }
 
             @Override
             public boolean processMessage(Message message) {
-                if (isVerboseLoggingEnabled()) logd(getName() + message.toString());
+                if (mVerboseLoggingEnabled) logd(getName() + message.toString());
                 switch (message.what) {
                     // Group removal ongoing. Multiple calls
                     // end up removing persisted network. Do nothing.
@@ -4275,14 +3340,9 @@
             pw.println();
         }
 
-        private boolean isWifiP2pAvailable() {
-            return mIsWifiEnabled && !mIsP2pDisallowedByAdmin;
-        }
-
         private void checkAndSendP2pStateChangedBroadcast() {
-            Log.d(TAG, "Wifi enabled=" + mIsWifiEnabled + ", P2P disallowed by admin="
-                    + mIsP2pDisallowedByAdmin);
-            sendP2pStateChangedBroadcast(isWifiP2pAvailable());
+            Log.d(TAG, "Wifi enabled=" + mIsWifiEnabled);
+            sendP2pStateChangedBroadcast(mIsWifiEnabled);
         }
 
         private void sendP2pStateChangedBroadcast(boolean enabled) {
@@ -4302,7 +3362,7 @@
             if (mDiscoveryStarted == started) return;
             mDiscoveryStarted = started;
 
-            if (isVerboseLoggingEnabled()) logd("discovery change broadcast " + started);
+            if (mVerboseLoggingEnabled) logd("discovery change broadcast " + started);
 
             final Intent intent = new Intent(WifiP2pManager.WIFI_P2P_DISCOVERY_CHANGED_ACTION);
             intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
@@ -4315,26 +3375,11 @@
         private void sendBroadcastMultiplePermissions(Intent intent) {
             Context context = mContext.createContextAsUser(UserHandle.ALL, 0);
             String[] permissions = RECEIVER_PERMISSIONS_FOR_BROADCAST;
-            boolean isLocationModeEnabled = mWifiPermissionsUtil.isLocationModeEnabled();
-            if (!isLocationModeEnabled) {
+            if (!mWifiPermissionsUtil.isLocationModeEnabled()) {
                 permissions = RECEIVER_PERMISSIONS_FOR_BROADCAST_LOCATION_OFF;
             }
             context.sendBroadcastWithMultiplePermissions(
                     intent, permissions);
-            if (SdkLevel.isAtLeastT()) {
-                // on Android T or later, also send broadcasts to apps that have NEARBY_WIFI_DEVICES
-                String[] requiredPermissions = new String[] {
-                        android.Manifest.permission.NEARBY_WIFI_DEVICES,
-                        android.Manifest.permission.ACCESS_WIFI_STATE
-                };
-                BroadcastOptions broadcastOptions = mWifiInjector.makeBroadcastOptions();
-                broadcastOptions.setRequireAllOfPermissions(requiredPermissions);
-                if (isLocationModeEnabled) {
-                    broadcastOptions.setRequireNoneOfPermissions(
-                            new String[] {android.Manifest.permission.ACCESS_FINE_LOCATION});
-                }
-                context.sendBroadcast(intent, null, broadcastOptions.toBundle());
-            }
         }
 
         private void sendThisDeviceChangedBroadcast() {
@@ -4353,9 +3398,10 @@
         }
 
         private void sendP2pConnectionChangedBroadcast() {
-            if (isVerboseLoggingEnabled()) logd("sending p2p connection changed broadcast");
+            if (mVerboseLoggingEnabled) logd("sending p2p connection changed broadcast");
             Intent intent = new Intent(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION);
-            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
+            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT
+                    | Intent.FLAG_RECEIVER_REPLACE_PENDING);
             intent.putExtra(WifiP2pManager.EXTRA_WIFI_P2P_INFO, new WifiP2pInfo(mWifiP2pInfo));
             intent.putExtra(WifiP2pManager.EXTRA_NETWORK_INFO, makeNetworkInfo());
             intent.putExtra(WifiP2pManager.EXTRA_WIFI_P2P_GROUP, eraseOwnDeviceAddress(mGroup));
@@ -4368,48 +3414,6 @@
             }
         }
 
-        private boolean isPlatformOrTargetSdkLessThanT(String packageName, int uid) {
-            if (!SdkLevel.isAtLeastT()) {
-                return true;
-            }
-            return mWifiPermissionsUtil.isTargetSdkLessThan(packageName,
-                    Build.VERSION_CODES.TIRAMISU, uid);
-        }
-
-        private boolean checkNearbyDevicesPermission(Message message, String cmd) {
-            if (null == message) return false;
-            if (null == message.obj) return false;
-
-            String packageName = getCallingPkgName(message.sendingUid, message.replyTo);
-            if (packageName == null) {
-                return false;
-            }
-            int uid = message.sendingUid;
-            Bundle extras = (Bundle) message.obj;
-            return checkNearbyDevicesPermission(uid, packageName, extras, cmd);
-        }
-
-        private boolean checkNearbyDevicesPermission(int uid, String packageName, Bundle extras,
-                String message) {
-            if (extras == null) {
-                return false;
-            }
-            if (extras.getBoolean(WifiP2pManager.EXTRA_PARAM_KEY_INTERNAL_MESSAGE)) {
-                // bypass permission check for internal call.
-                return true;
-            }
-            try {
-                mWifiPermissionsUtil.checkPackage(uid, packageName);
-            } catch (SecurityException e) {
-                loge("checkPackage failed");
-                return false;
-            }
-            return mWifiPermissionsUtil.checkNearbyDevicesPermission(
-                    extras.getParcelable(
-                            WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE),
-                    true, TAG + " " + message);
-        }
-
         private boolean isPackageExisted(String pkgName) {
             PackageManager pm = mContext.getPackageManager();
             try {
@@ -4445,46 +3449,27 @@
             Log.i(TAG, "sending p2p tether request broadcast to "
                     + tetheringServicePackage);
 
-            final String[] receiverPermissionsForTetheringRequest = {
-                    android.Manifest.permission.TETHER_PRIVILEGED
-            };
             Intent intent = new Intent(WifiP2pManager.WIFI_P2P_CONNECTION_CHANGED_ACTION);
             intent.setPackage(tetheringServicePackage);
-            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
+            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT
+                    | Intent.FLAG_RECEIVER_REPLACE_PENDING);
             intent.putExtra(WifiP2pManager.EXTRA_WIFI_P2P_INFO, new WifiP2pInfo(mWifiP2pInfo));
             intent.putExtra(WifiP2pManager.EXTRA_NETWORK_INFO, makeNetworkInfo());
             intent.putExtra(WifiP2pManager.EXTRA_WIFI_P2P_GROUP, eraseOwnDeviceAddress(mGroup));
 
             Context context = mContext.createContextAsUser(UserHandle.ALL, 0);
             context.sendBroadcastWithMultiplePermissions(
-                    intent, receiverPermissionsForTetheringRequest);
+                    intent, RECEIVER_PERMISSIONS_FOR_BROADCAST);
             return true;
         }
 
         private void sendP2pPersistentGroupsChangedBroadcast() {
-            if (isVerboseLoggingEnabled()) logd("sending p2p persistent groups changed broadcast");
+            if (mVerboseLoggingEnabled) logd("sending p2p persistent groups changed broadcast");
             Intent intent = new Intent(WifiP2pManager.ACTION_WIFI_P2P_PERSISTENT_GROUPS_CHANGED);
             intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
             mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
         }
 
-        private void sendP2pRequestChangedBroadcast(boolean accepted) {
-            if (mVerboseLoggingEnabled) logd("sending p2p request changed broadcast");
-            Intent intent = new Intent(WifiP2pManager.ACTION_WIFI_P2P_REQUEST_RESPONSE_CHANGED);
-            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT
-                    | Intent.FLAG_RECEIVER_REPLACE_PENDING);
-            intent.putExtra(WifiP2pManager.EXTRA_REQUEST_RESPONSE, accepted);
-            if (accepted) {
-                intent.putExtra(WifiP2pManager.EXTRA_REQUEST_CONFIG, mSavedPeerConfig);
-            } else {
-                intent.putExtra(WifiP2pManager.EXTRA_REQUEST_CONFIG, mSavedRejectedPeerConfig);
-            }
-
-            Context context = mContext.createContextAsUser(UserHandle.ALL, 0);
-            context.sendBroadcastWithMultiplePermissions(
-                    intent, RECEIVER_PERMISSIONS_FOR_BROADCAST);
-        }
-
         private void addRowToDialog(ViewGroup group, int stringId, String value) {
             Resources r = mContext.getResources();
             View row = LayoutInflater.from(mContext).cloneInContext(mContext)
@@ -4494,17 +3479,14 @@
             group.addView(row);
         }
 
-        // Legacy dialog behavior to avoid WifiDialogActivity invoking onPause() of pre-T
-        // Settings/Apps, which might trigger P2P teardown.
-        private void showInvitationSentDialogPreT(@NonNull String deviceName,
-                @Nullable String pin) {
+        private void notifyInvitationSent(String pin, String peerAddress) {
             Resources r = mContext.getResources();
 
             final View textEntryView = LayoutInflater.from(mContext).cloneInContext(mContext)
                     .inflate(R.layout.wifi_p2p_dialog, null);
 
-            ViewGroup group = textEntryView.findViewById(R.id.info);
-            addRowToDialog(group, R.string.wifi_p2p_to_message, deviceName);
+            ViewGroup group = (ViewGroup) textEntryView.findViewById(R.id.info);
+            addRowToDialog(group, R.string.wifi_p2p_to_message, getDeviceName(peerAddress));
             addRowToDialog(group, R.string.wifi_p2p_show_pin_message, pin);
 
             AlertDialog dialog = mFrameworkFacade.makeAlertDialogBuilder(mContext)
@@ -4519,62 +3501,23 @@
             dialog.show();
         }
 
-        private void showInvitationSentDialog(@NonNull String deviceName, @Nullable String pin) {
-            int displayId = mDeathDataByBinder.values().stream()
-                    .filter(d -> d.mDisplayId != Display.DEFAULT_DISPLAY)
-                    .findAny()
-                    .map((dhd) -> dhd.mDisplayId)
-                    .orElse(Display.DEFAULT_DISPLAY);
-            WifiDialogManager.DialogHandle dialogHandle = mWifiInjector.getWifiDialogManager()
-                    .createP2pInvitationSentDialog(deviceName, pin, displayId);
-            if (dialogHandle == null) {
-                loge("Could not create invitation sent dialog!");
-                return;
-            }
-            dialogHandle.launchDialog();
-        }
-
-        private void notifyInvitationSent(String pin, String peerAddress) {
-            ApproverEntry entry = mExternalApproverManager.get(MacAddress.fromString(peerAddress));
-            if (null == entry) {
-                logd("No approver found for " + peerAddress
-                        + " check the wildcard address approver.");
-                entry = mExternalApproverManager.get(MacAddress.BROADCAST_ADDRESS);
-            }
-            if (null != entry) {
-                logd("Received invitation - Send WPS PIN event to the approver " + entry);
-                Bundle extras = new Bundle();
-                extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_PEER_ADDRESS,
-                        entry.getAddress());
-                extras.putString(WifiP2pManager.EXTRA_PARAM_KEY_WPS_PIN, pin);
-                replyToMessage(entry.getMessage(), WifiP2pManager.EXTERNAL_APPROVER_PIN_GENERATED,
-                        extras);
-                return;
-            }
-            String deviceName = getDeviceName(peerAddress);
-            if (!SdkLevel.isAtLeastT()) {
-                showInvitationSentDialogPreT(deviceName, pin);
-            } else {
-                showInvitationSentDialog(deviceName, pin);
-            }
-        }
-
-        // Legacy dialog behavior to avoid WifiDialogActivity invoking onPause() of pre-T
-        // Settings/Apps, which might trigger P2P teardown.
-        private void showP2pProvDiscShowPinRequestDialogPreT(String deviceName, String pin) {
+        private void notifyP2pProvDiscShowPinRequest(String pin, String peerAddress) {
             Resources r = mContext.getResources();
             final View textEntryView = LayoutInflater.from(mContext).cloneInContext(mContext)
                     .inflate(R.layout.wifi_p2p_dialog, null);
 
-            ViewGroup group = textEntryView.findViewById(R.id.info);
-            addRowToDialog(group, R.string.wifi_p2p_to_message, deviceName);
+            ViewGroup group = (ViewGroup) textEntryView.findViewById(R.id.info);
+            addRowToDialog(group, R.string.wifi_p2p_to_message, getDeviceName(peerAddress));
             addRowToDialog(group, R.string.wifi_p2p_show_pin_message, pin);
 
             AlertDialog dialog = mFrameworkFacade.makeAlertDialogBuilder(mContext)
                     .setTitle(r.getString(R.string.wifi_p2p_invitation_sent_title))
                     .setView(textEntryView)
-                    .setPositiveButton(r.getString(R.string.accept),
-                            (dialog1, which) -> sendMessage(PEER_CONNECTION_USER_CONFIRM))
+                    .setPositiveButton(r.getString(R.string.accept), new OnClickListener() {
+                            public void onClick(DialogInterface dialog, int which) {
+                                sendMessage(PEER_CONNECTION_USER_CONFIRM);
+                            }
+                    })
                     .create();
             dialog.setCanceledOnTouchOutside(false);
             dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
@@ -4583,109 +3526,57 @@
             dialog.show();
         }
 
-        private void showP2pProvDiscShowPinRequestDialog(String deviceName, String pin) {
-            int displayId = mDeathDataByBinder.values().stream()
-                    .filter(d -> d.mDisplayId != Display.DEFAULT_DISPLAY)
-                    .findAny()
-                    .map((dhd) -> dhd.mDisplayId)
-                    .orElse(Display.DEFAULT_DISPLAY);
-            // TODO(b/222115086): This dialog only makes sense for the prov disc receiver.
-            //                    Use WifiDialogManager.createP2pInvitationSentDialog(...) for
-            //                    the initiator.
-            mWifiInjector.getWifiDialogManager().createP2pInvitationReceivedDialog(
-                    deviceName,
-                    false /* isPinRequested */,
-                    pin,
-                    displayId,
-                    new WifiDialogManager.P2pInvitationReceivedDialogCallback() {
-                        @Override
-                        public void onAccepted(@Nullable String optionalPin) {
-                            sendMessage(PEER_CONNECTION_USER_CONFIRM);
-                        }
-
-                        @Override
-                        public void onDeclined() {
-                            // Do nothing
-                            // TODO(b/222115086): Do the correct "decline" behavior.
-                        }
-                    },
-                    new WifiThreadRunner(getHandler())).launchDialog();
-        }
-
-        private void notifyP2pProvDiscShowPinRequest(String pin, String peerAddress) {
-            ExternalApproverManager.ApproverEntry entry = mExternalApproverManager.get(
-                    MacAddress.fromString(peerAddress));
-            if (null == entry) {
-                logd("No approver found for " + peerAddress
-                        + " check the wildcard address approver.");
-                entry = mExternalApproverManager.get(MacAddress.BROADCAST_ADDRESS);
-            }
-            if (null != entry) {
-                logd("Received provision discovery request - Send request from "
-                        + mSavedPeerConfig.deviceAddress + " to the approver " + entry);
-                Bundle extras = new Bundle();
-                extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_DEVICE,
-                        mPeers.get(mSavedPeerConfig.deviceAddress));
-                extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_CONFIG, mSavedPeerConfig);
-                replyToMessage(entry.getMessage(),
-                        WifiP2pManager.EXTERNAL_APPROVER_CONNECTION_REQUESTED,
-                        WifiP2pManager.ExternalApproverRequestListener.REQUEST_TYPE_NEGOTIATION,
-                        extras);
-                return;
-            }
-            String deviceName = getDeviceName(peerAddress);
-            if (!SdkLevel.isAtLeastT()) {
-                showP2pProvDiscShowPinRequestDialogPreT(deviceName, pin);
-            } else {
-                showP2pProvDiscShowPinRequestDialog(deviceName, pin);
-            }
-        }
-
-        // Legacy dialog behavior to avoid WifiDialogActivity invoking onPause() of pre-T
-        // Settings/Apps, which might trigger P2P teardown.
-        private void showInvitationReceivedDialogPreT() {
+        private void notifyInvitationReceived() {
             Resources r = mContext.getResources();
             final WpsInfo wps = mSavedPeerConfig.wps;
             final View textEntryView = LayoutInflater.from(mContext).cloneInContext(mContext)
                     .inflate(R.layout.wifi_p2p_dialog, null);
 
-            ViewGroup group = textEntryView.findViewById(R.id.info);
+            ViewGroup group = (ViewGroup) textEntryView.findViewById(R.id.info);
             addRowToDialog(group, R.string.wifi_p2p_from_message, getDeviceName(
                     mSavedPeerConfig.deviceAddress));
 
-            final EditText pin = textEntryView.findViewById(R.id.wifi_p2p_wps_pin);
+            final EditText pin = (EditText) textEntryView.findViewById(R.id.wifi_p2p_wps_pin);
 
             AlertDialog dialog = mFrameworkFacade.makeAlertDialogBuilder(mContext)
                     .setTitle(r.getString(R.string.wifi_p2p_invitation_to_connect_title))
                     .setView(textEntryView)
-                    .setPositiveButton(r.getString(R.string.accept), (dialog1, which) -> {
-                        if (wps.setup == WpsInfo.KEYPAD) {
-                            mSavedPeerConfig.wps.pin = pin.getText().toString();
-                        }
-                        if (isVerboseLoggingEnabled()) {
-                            logd(getName() + " accept invitation " + mSavedPeerConfig);
-                        }
-                        sendMessage(PEER_CONNECTION_USER_ACCEPT);
-                    })
-                    .setNegativeButton(r.getString(R.string.decline), (dialog2, which) -> {
-                        if (isVerboseLoggingEnabled()) logd(getName() + " ignore connect");
-                        sendMessage(PEER_CONNECTION_USER_REJECT);
-                    })
-                    .setOnCancelListener(arg0 -> {
-                        if (isVerboseLoggingEnabled()) logd(getName() + " ignore connect");
-                        sendMessage(PEER_CONNECTION_USER_REJECT);
-                    })
+                    .setPositiveButton(r.getString(R.string.accept), new OnClickListener() {
+                            public void onClick(DialogInterface dialog, int which) {
+                                if (wps.setup == WpsInfo.KEYPAD) {
+                                    mSavedPeerConfig.wps.pin = pin.getText().toString();
+                                }
+                                if (mVerboseLoggingEnabled) {
+                                    logd(getName() + " accept invitation " + mSavedPeerConfig);
+                                }
+                                sendMessage(PEER_CONNECTION_USER_ACCEPT);
+                            }
+                        })
+                    .setNegativeButton(r.getString(R.string.decline), new OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                if (mVerboseLoggingEnabled) logd(getName() + " ignore connect");
+                                sendMessage(PEER_CONNECTION_USER_REJECT);
+                            }
+                        })
+                    .setOnCancelListener(new DialogInterface.OnCancelListener() {
+                            @Override
+                            public void onCancel(DialogInterface arg0) {
+                                if (mVerboseLoggingEnabled) logd(getName() + " ignore connect");
+                                sendMessage(PEER_CONNECTION_USER_REJECT);
+                            }
+                        })
                     .create();
             dialog.setCanceledOnTouchOutside(false);
 
             // make the enter pin area or the display pin area visible
             switch (wps.setup) {
                 case WpsInfo.KEYPAD:
-                    if (isVerboseLoggingEnabled()) logd("Enter pin section visible");
+                    if (mVerboseLoggingEnabled) logd("Enter pin section visible");
                     textEntryView.findViewById(R.id.enter_pin_section).setVisibility(View.VISIBLE);
                     break;
                 case WpsInfo.DISPLAY:
-                    if (isVerboseLoggingEnabled()) logd("Shown pin section visible");
+                    if (mVerboseLoggingEnabled) logd("Shown pin section visible");
                     addRowToDialog(group, R.string.wifi_p2p_show_pin_message, wps.pin);
                     break;
                 default:
@@ -4694,14 +3585,22 @@
 
             if ((r.getConfiguration().uiMode & Configuration.UI_MODE_TYPE_APPLIANCE)
                     == Configuration.UI_MODE_TYPE_APPLIANCE) {
-                dialog.setOnKeyListener((dialog3, keyCode, event) -> {
-                    if (keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) {
-                        sendMessage(PEER_CONNECTION_USER_ACCEPT);
-                        dialog3.dismiss();
-                        return true;
+                // For appliance devices, add a key listener which accepts.
+                dialog.setOnKeyListener(new DialogInterface.OnKeyListener() {
+
+                    @Override
+                    public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
+                        // TODO: make the actual key come from a config value.
+                        if (keyCode == KeyEvent.KEYCODE_VOLUME_MUTE) {
+                            sendMessage(PEER_CONNECTION_USER_ACCEPT);
+                            dialog.dismiss();
+                            return true;
+                        }
+                        return false;
                     }
-                    return false;
                 });
+                // TODO: add timeout for this dialog.
+                // TODO: update UI in appliance mode to tell user what to do.
             }
 
             dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
@@ -4710,92 +3609,6 @@
             dialog.show();
         }
 
-        private void showInvitationReceivedDialog() {
-            String deviceName = getDeviceName(mSavedPeerConfig.deviceAddress);
-            boolean isPinRequested = false;
-            String displayPin = null;
-
-            int displayId = mDeathDataByBinder.values().stream()
-                    .filter(d -> d.mDisplayId != Display.DEFAULT_DISPLAY)
-                    .findAny()
-                    .map((dhd) -> dhd.mDisplayId)
-                    .orElse(Display.DEFAULT_DISPLAY);
-            final WpsInfo wps = mSavedPeerConfig.wps;
-            switch (wps.setup) {
-                case WpsInfo.KEYPAD:
-                    isPinRequested = true;
-                    break;
-                case WpsInfo.DISPLAY:
-                    displayPin = wps.pin;
-                    break;
-                default:
-                    break;
-            }
-
-            WifiDialogManager.P2pInvitationReceivedDialogCallback callback =
-                    new WifiDialogManager.P2pInvitationReceivedDialogCallback() {
-                        @Override
-                        public void onAccepted(@Nullable String optionalPin) {
-                            if (optionalPin != null) {
-                                mSavedPeerConfig.wps.pin = optionalPin;
-                            }
-                            if (isVerboseLoggingEnabled()) {
-                                logd(getName() + " accept invitation " + mSavedPeerConfig);
-                            }
-                            sendMessage(PEER_CONNECTION_USER_ACCEPT);
-                            mInvitationDialogHandle = null;
-                        }
-
-                        @Override
-                        public void onDeclined() {
-                            if (isVerboseLoggingEnabled()) {
-                                logd(getName() + " ignore connect");
-                            }
-                            sendMessage(PEER_CONNECTION_USER_REJECT);
-                            mInvitationDialogHandle = null;
-                        }
-                    };
-
-            WifiDialogManager.DialogHandle mInvitationDialogHandle =
-                    mWifiInjector.getWifiDialogManager().createP2pInvitationReceivedDialog(
-                            deviceName,
-                            isPinRequested,
-                            displayPin,
-                            displayId,
-                            callback,
-                            new WifiThreadRunner(getHandler()));
-            mInvitationDialogHandle.launchDialog(mContext.getResources().getInteger(
-                    R.integer.config_p2pInvitationReceivedDialogTimeoutMs));
-        }
-
-        private void notifyInvitationReceived(
-                @WifiP2pManager.ExternalApproverRequestListener.RequestType int requestType) {
-            ApproverEntry entry = mExternalApproverManager.get(
-                    MacAddress.fromString(mSavedPeerConfig.deviceAddress));
-            if (null == entry) {
-                logd("No approver found for " + mSavedPeerConfig.deviceAddress
-                        + " check the wildcard address approver.");
-                entry = mExternalApproverManager.get(MacAddress.BROADCAST_ADDRESS);
-            }
-            if (null != entry) {
-                logd("Received Invitation request - Send request " + requestType + " from "
-                        + mSavedPeerConfig.deviceAddress + " to the approver " + entry);
-                Bundle extras = new Bundle();
-                extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_DEVICE,
-                        mPeers.get(mSavedPeerConfig.deviceAddress));
-                extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_CONFIG, mSavedPeerConfig);
-                replyToMessage(entry.getMessage(),
-                        WifiP2pManager.EXTERNAL_APPROVER_CONNECTION_REQUESTED,
-                        requestType, extras);
-                return;
-            }
-            if (!SdkLevel.isAtLeastT()) {
-                showInvitationReceivedDialogPreT();
-            } else {
-                showInvitationReceivedDialog();
-            }
-        }
-
         /**
          * This method unifies the persisent group list, cleans up unused
          * networks and if required, updates corresponding broadcast receivers
@@ -4947,11 +3760,9 @@
                 // Calling app holds the LOCAL_MAC_ADDRESS permission, and is allowed to see this
                 // device's MAC.
                 return new WifiP2pDevice(device);
+            } else {
+                return eraseOwnDeviceAddress(device);
             }
-            if (mVerboseLoggingEnabled) {
-                Log.i(TAG, "Uid " + uid + " does not have local mac address permission");
-            }
-            return eraseOwnDeviceAddress(device);
         }
 
         /**
@@ -4973,11 +3784,9 @@
                 // Calling app holds the LOCAL_MAC_ADDRESS permission, and is allowed to see this
                 // device's MAC.
                 return new WifiP2pGroup(group);
+            } else {
+                return eraseOwnDeviceAddress(group);
             }
-            if (mVerboseLoggingEnabled) {
-                Log.i(TAG, "Uid " + uid + " does not have local mac address permission");
-            }
-            return eraseOwnDeviceAddress(group);
         }
 
         /**
@@ -5030,7 +3839,6 @@
             String pin = mWifiNative.p2pConnect(config, action);
             try {
                 Integer.parseInt(pin);
-                mSavedPeerConfig.wps.pin = pin;
                 notifyInvitationSent(pin, config.deviceAddress);
             } catch (NumberFormatException ignore) {
                 // do nothing if p2pConnect did not return a pin
@@ -5058,10 +3866,10 @@
             // a group, and the target should be a group owner.
             boolean join = dev.isGroupOwner() || isInvited;
             String ssid = mWifiNative.p2pGetSsid(dev.deviceAddress);
-            if (isVerboseLoggingEnabled()) logd("target ssid is " + ssid + " join:" + join);
+            if (mVerboseLoggingEnabled) logd("target ssid is " + ssid + " join:" + join);
 
             if (join && dev.isGroupLimit()) {
-                if (isVerboseLoggingEnabled()) logd("target device reaches group limit.");
+                if (mVerboseLoggingEnabled) logd("target device reaches group limit.");
 
                 // if the target group has reached the limit,
                 // try group formation.
@@ -5097,7 +3905,7 @@
                 if (netId < 0) {
                     netId = getNetworkIdFromClientList(dev.deviceAddress);
                 }
-                if (isVerboseLoggingEnabled()) {
+                if (mVerboseLoggingEnabled) {
                     logd("netId related with " + dev.deviceAddress + " = " + netId);
                 }
                 if (netId >= 0) {
@@ -5180,7 +3988,7 @@
             }
             if (modifiedClientList.length() == 0 && isRemovable) {
                 // the client list is empty. so remove it.
-                if (isVerboseLoggingEnabled()) logd("Remove unknown network");
+                if (mVerboseLoggingEnabled) logd("Remove unknown network");
                 mGroups.remove(netId);
                 mWifiP2pMetrics.updatePersistentGroup(mGroups);
                 return true;
@@ -5191,7 +3999,7 @@
                 return false;
             }
 
-            if (isVerboseLoggingEnabled()) logd("Modified client list: " + modifiedClientList);
+            if (mVerboseLoggingEnabled) logd("Modified client list: " + modifiedClientList);
             if (modifiedClientList.length() == 0) {
                 modifiedClientList.append("\"\"");
             }
@@ -5209,10 +4017,6 @@
                         + interfaceName, ex);
                 return null;
             }
-            if (null == iface) {
-                Log.w(TAG, "Could not obtain interface " + interfaceName);
-                return null;
-            }
             Enumeration<InetAddress> addrs = iface.getInetAddresses();
             while (addrs.hasMoreElements()) {
                 InetAddress addr = addrs.nextElement();
@@ -5253,15 +4057,6 @@
             String deviceName = mSettingsConfigStore.get(WIFI_P2P_DEVICE_NAME);
             if (!TextUtils.isEmpty(deviceName)) return deviceName;
 
-            // If a default device is already generated and not expired, just return it.
-            long expirationTime = mLastDefaultDeviceNameGeneratingTimeMillis
-                    + DEFAULT_DEVICE_NAME_LIFE_TIME_MILLIS;
-            if (!TextUtils.isEmpty(mDefaultDeviceName)
-                    && expirationTime > mClock.getElapsedSinceBootMillis()) {
-                logd("Return the persistent device name: " + mDefaultDeviceName);
-                return mDefaultDeviceName;
-            }
-
             String prefix = mWifiGlobals.getWifiP2pDeviceNamePrefix();
             if (DEVICE_NAME_PREFIX_LENGTH_MAX < prefix.getBytes(StandardCharsets.UTF_8).length
                     || 0 == prefix.getBytes(StandardCharsets.UTF_8).length) {
@@ -5283,19 +4078,15 @@
             String postfix;
             if (numDigits >= DEVICE_NAME_POSTFIX_LENGTH_MIN) {
                 postfix = StringUtil.generateRandomNumberString(numDigits);
-            } else if (!SdkLevel.isAtLeastT()) {
+            } else {
                 // We use the 4 digits of the ANDROID_ID to have a friendly
                 // default that has low likelihood of collision with a peer
                 String id = mFrameworkFacade.getSecureStringSetting(mContext,
                         Settings.Secure.ANDROID_ID);
                 postfix = id.substring(0, 4);
-            } else {
-                postfix = StringUtil.generateRandomString(4);
             }
-            mDefaultDeviceName = prefix + postfix;
-            mLastDefaultDeviceNameGeneratingTimeMillis = mClock.getElapsedSinceBootMillis();
-            logd("the default device name: " + mDefaultDeviceName);
-            return mDefaultDeviceName;
+            logd("the default device name: " + prefix + postfix);
+            return prefix + postfix;
         }
 
         private boolean setAndPersistDeviceName(String devName) {
@@ -5359,7 +4150,7 @@
 
             mThisDevice.deviceAddress = mWifiNative.p2pGetDeviceAddress();
             updateThisDevice(WifiP2pDevice.AVAILABLE);
-            if (isVerboseLoggingEnabled()) logd("DeviceAddress: " + mThisDevice.deviceAddress);
+            if (mVerboseLoggingEnabled) logd("DeviceAddress: " + mThisDevice.deviceAddress);
             mWifiNative.p2pFlush();
             mWifiNative.p2pServiceFlush();
             mServiceTransactionId = 0;
@@ -5378,24 +4169,6 @@
             sendThisDeviceChangedBroadcast();
         }
 
-        private boolean handleProvDiscFailure(WifiP2pProvDiscEvent pdEvent,
-                boolean invalidateSavedPeer) {
-            if (TextUtils.isEmpty(pdEvent.device.deviceAddress)) return false;
-            if (!pdEvent.device.deviceAddress.equals(
-                    mSavedPeerConfig.deviceAddress)) {
-                return false;
-            }
-
-            if (null != mInvitationDialogHandle) {
-                mInvitationDialogHandle.dismissDialog();
-                mInvitationDialogHandle = null;
-            }
-            if (invalidateSavedPeer) {
-                mSavedPeerConfig.invalidate();
-            }
-            return true;
-        }
-
         private void handleGroupCreationFailure() {
             // A group is formed, but the tethering request is not proceed.
             if (null != mGroup) {
@@ -5422,11 +4195,7 @@
 
             mPeersLostDuringConnection.clear();
             mServiceDiscReqId = null;
-            Bundle extras = new Bundle();
-            extras.putBoolean(WifiP2pManager.EXTRA_PARAM_KEY_INTERNAL_MESSAGE, true);
-            sendMessage(WifiP2pManager.DISCOVER_PEERS, extras);
-
-            sendDisconnectWifiRequest(false);
+            sendMessage(WifiP2pManager.DISCOVER_PEERS);
         }
 
         private void handleGroupRemoved() {
@@ -5435,7 +4204,7 @@
                 // {@link WifiP2pManager#WIFI_P2P_CONNECTION_CHANGED_ACTION}
                 // events and takes over the DHCP server management automatically.
             } else {
-                if (isVerboseLoggingEnabled()) logd("stop IpClient");
+                if (mVerboseLoggingEnabled) logd("stop IpClient");
                 stopIpClient();
                 try {
                     mNetdWrapper.removeInterfaceFromLocalNetwork(mGroup.getInterface());
@@ -5453,7 +4222,6 @@
             // Clear any timeout that was set. This is essential for devices
             // that reuse the main p2p interface for a created group.
             mWifiNative.setP2pGroupIdle(mGroup.getInterface(), 0);
-            mWifiNative.p2pFlush();
 
             boolean peersChanged = false;
             // Remove only peers part of the group, so that other devices discovered
@@ -5471,19 +4239,14 @@
             mPeersLostDuringConnection.clear();
             mServiceDiscReqId = null;
 
-            sendDisconnectWifiRequest(false);
-        }
-
-        private void sendDisconnectWifiRequest(boolean disableWifi) {
-            if (null == mWifiChannel) {
-                loge("WifiChannel is null, ignore DISCONNECT_WIFI_REQUEST " + disableWifi);
-                return;
+            if (mTemporarilyDisconnectedWifi) {
+                if (mWifiChannel != null) {
+                    mWifiChannel.sendMessage(WifiP2pServiceImpl.DISCONNECT_WIFI_REQUEST, 0);
+                } else {
+                    loge("handleGroupRemoved(): WifiChannel is null");
+                }
+                mTemporarilyDisconnectedWifi = false;
             }
-            if (mTemporarilyDisconnectedWifi == disableWifi) return;
-
-            mWifiChannel.sendMessage(WifiP2pServiceImpl.DISCONNECT_WIFI_REQUEST,
-                    disableWifi ? 1 : 0);
-            mTemporarilyDisconnectedWifi = disableWifi;
         }
 
         private void replyToMessage(Message msg, int what) {
@@ -5511,15 +4274,6 @@
             mReplyChannel.replyToMessage(msg, dstMsg);
         }
 
-        private void replyToMessage(Message msg, int what, int arg1, Object obj) {
-            if (msg.replyTo == null) return;
-            Message dstMsg = obtainMessage(msg);
-            dstMsg.what = what;
-            dstMsg.arg1 = arg1;
-            dstMsg.obj = obj;
-            mReplyChannel.replyToMessage(msg, dstMsg);
-        }
-
         private Message obtainMessage(Message srcMsg) {
             // arg2 on the source message has a hash code that needs to
             // be retained in replies see WifiP2pManager for details
@@ -5543,6 +4297,7 @@
          */
         private boolean updateSupplicantServiceRequest() {
             clearSupplicantServiceRequest();
+
             StringBuffer sb = new StringBuffer();
             for (ClientInfo c: mClientInfoList.values()) {
                 int key;
@@ -5554,6 +4309,7 @@
                     }
                 }
             }
+
             if (sb.length() == 0) {
                 return false;
             }
@@ -5594,9 +4350,11 @@
             if (mServiceTransactionId == 256) mServiceTransactionId = 1;
             req.setTransactionId((mServiceTransactionId));
             clientInfo.mReqList.put(mServiceTransactionId, req);
+
             if (mServiceDiscReqId == null) {
                 return true;
             }
+
             return updateSupplicantServiceRequest();
         }
 
@@ -5747,7 +4505,7 @@
                     try {
                         c.mMessenger.send(msg);
                     } catch (RemoteException e) {
-                        if (isVerboseLoggingEnabled()) logd("detect dead channel");
+                        if (mVerboseLoggingEnabled) logd("detect dead channel");
                         clearClientInfo(c.mMessenger);
                         return;
                     }
@@ -5777,7 +4535,7 @@
                 try {
                     c.mMessenger.send(msg);
                 } catch (RemoteException e) {
-                    if (isVerboseLoggingEnabled()) logd("detect dead channel");
+                    if (mVerboseLoggingEnabled) logd("detect dead channel");
                     deadClients.add(c.mMessenger);
                 }
             }
@@ -5796,8 +4554,9 @@
          */
         private ClientInfo getClientInfo(Messenger m, boolean createIfNotExist) {
             ClientInfo clientInfo = mClientInfoList.get(m);
+
             if (clientInfo == null && createIfNotExist) {
-                if (isVerboseLoggingEnabled()) logd("add a new client");
+                if (mVerboseLoggingEnabled) logd("add a new client");
                 clientInfo = new ClientInfo(m);
                 mClientInfoList.put(m, clientInfo);
             }
@@ -5812,19 +4571,10 @@
          * @param uid of the caller
          * @return WifiP2pDeviceList the peer list
          */
-        private WifiP2pDeviceList getPeers(String pkgName, @Nullable String featureId, int uid,
-                Bundle extras) {
+        private WifiP2pDeviceList getPeers(String pkgName, @Nullable String featureId, int uid) {
             // getPeers() is guaranteed to be invoked after Wifi Service is up
             // This ensures getInstance() will return a non-null object now
-            boolean hasPermission = false;
-            if (isPlatformOrTargetSdkLessThanT(pkgName, uid)) {
-                hasPermission = mWifiPermissionsUtil.checkCanAccessWifiDirect(
-                        pkgName, featureId, uid, true);
-            } else {
-                hasPermission = checkNearbyDevicesPermission(uid, pkgName,
-                        extras, "getPeers");
-            }
-            if (hasPermission) {
+            if (mWifiPermissionsUtil.checkCanAccessWifiDirect(pkgName, featureId, uid, true)) {
                 return new WifiP2pDeviceList(mPeers);
             } else {
                 return new WifiP2pDeviceList();
@@ -5846,12 +4596,13 @@
          */
         private boolean factoryReset(int uid) {
             String pkgName = mContext.getPackageManager().getNameForUid(uid);
+            UserManager userManager = mWifiInjector.getUserManager();
 
             if (!mWifiPermissionsUtil.checkNetworkSettingsPermission(uid)) return false;
 
-            if (mUserManager.hasUserRestrictionForUser(
+            if (userManager.hasUserRestrictionForUser(
                     UserManager.DISALLOW_NETWORK_RESET, UserHandle.getUserHandleForUid(uid))
-                    || mUserManager.hasUserRestrictionForUser(
+                    || userManager.hasUserRestrictionForUser(
                     UserManager.DISALLOW_CONFIG_WIFI, UserHandle.getUserHandleForUid(uid))) {
                 return false;
             }
@@ -5873,71 +4624,6 @@
             return true;
         }
 
-        private boolean updateVendorElements(
-                String packageName, ArrayList<ScanResult.InformationElement> vendorElements) {
-            if (TextUtils.isEmpty(packageName)) return false;
-            if (null == vendorElements || 0 == vendorElements.size()) {
-                if (isVerboseLoggingEnabled()) logd("Clear vendor elements for " + packageName);
-                mVendorElements.remove(packageName);
-            } else {
-                if (isVerboseLoggingEnabled()) logd("Update vendor elements for " + packageName);
-
-                if (vendorElements.stream()
-                        .anyMatch(ie -> ie.id != ScanResult.InformationElement.EID_VSA)) {
-                    loge("received InformationElement which is not a Vendor Specific IE (VSIE)."
-                            + "VSIEs have an ID = 221.");
-                    return false;
-                }
-
-                mVendorElements.put(packageName,
-                        new HashSet<ScanResult.InformationElement>(vendorElements));
-
-                Set<ScanResult.InformationElement> aggregatedVendorElements = new HashSet<>();
-                mVendorElements.forEach((k, v) -> aggregatedVendorElements.addAll(v));
-                // The total bytes of an IE is EID (1 byte) + length (1 byte) + payload length.
-                int totalBytes = aggregatedVendorElements.stream()
-                        .mapToInt(ie -> (2 + ie.bytes.length)).sum();
-                if (totalBytes > WifiP2pManager.getP2pMaxAllowedVendorElementsLengthBytes()) {
-                    mVendorElements.forEach((k, v) -> {
-                        Log.w(TAG, "package=" + k + " VSIE size="
-                                + v.stream().mapToInt(ie -> ie.bytes.length).sum());
-                    });
-                    mVendorElements.remove(packageName);
-                    return false;
-                }
-            }
-            return true;
-        }
-
-        private boolean p2pFind(int timeout) {
-            return p2pFind(
-                    WifiP2pManager.WIFI_P2P_SCAN_FULL,
-                    WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, timeout);
-        }
-
-        private boolean p2pFind(@WifiP2pManager.WifiP2pScanType int scanType, int freq,
-                                int timeout) {
-            if (isFeatureSupported(WifiP2pManager.FEATURE_SET_VENDOR_ELEMENTS)) {
-                Set<ScanResult.InformationElement> aggregatedVendorElements = new HashSet<>();
-                mVendorElements.forEach((k, v) -> aggregatedVendorElements.addAll(v));
-                if (!mWifiNative.setVendorElements(aggregatedVendorElements)) {
-                    Log.w(TAG, "cannot set vendor elements to the native service.");
-                    // Don't block p2p find or it might affect regular P2P functinalities.
-                    mWifiNative.removeVendorElements();
-                }
-            }
-            if (scanType == WifiP2pManager.WIFI_P2P_SCAN_FULL) {
-                return mWifiNative.p2pFind(timeout);
-            } else if (scanType == WifiP2pManager.WIFI_P2P_SCAN_SOCIAL
-                    && freq == WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED) {
-                return mWifiNative.p2pFind(scanType, freq, timeout);
-            } else if (scanType == WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ
-                    && freq != WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED) {
-                return mWifiNative.p2pFind(scanType, freq, timeout);
-            }
-            return false;
-        }
-
         /**
         * Get calling package string from Client HashMap
         *
@@ -5949,7 +4635,7 @@
             if (clientInfo != null) {
                 return clientInfo.mPackageName;
             }
-            if (UserHandle.getAppId(uid) == Process.SYSTEM_UID) return mContext.getOpPackageName();
+            if (uid == Process.SYSTEM_UID) return mContext.getOpPackageName();
             return null;
         }
 
@@ -5964,7 +4650,7 @@
             if (clientInfo != null) {
                 return clientInfo.mFeatureId;
             }
-            if (UserHandle.getAppId(uid) == Process.SYSTEM_UID) return mContext.getAttributionTag();
+            if (uid == Process.SYSTEM_UID) return mContext.getAttributionTag();
             return null;
         }
 
@@ -5994,40 +4680,13 @@
             WifiInfo wifiInfo = wifiManager.getConnectionInfo();
             Log.d(TAG, "WifiInfo: " + wifiInfo);
             int freq = wifiInfo.getFrequency();
-            /*
-             * GO intent table
-             * STA Freq         2.4GHz/5GHz DBS 5GHz/6GHz DBS   GO intent
-             * 2.4 GHz          No              X               5
-             * N/A              X               X               6 (default)
-             * 2.4 GHz          Yes             X               7
-             * 5 GHz            Yes             No              8
-             * 5 GHz            Yes             Yes             9
-             * 5 GHz            No              X               10
-             * 6 GHz            X               No              11
-             * 6 Ghz            X               Yes             12
-             */
             if (wifiInfo.getNetworkId() == WifiConfiguration.INVALID_NETWORK_ID) {
-                intent = DEFAULT_GROUP_OWNER_INTENT;
+                intent = DEFAULT_GROUP_OWNER_INTENT + 1;
             } else if (ScanResult.is24GHz(freq)) {
-                if (mWifiNative.is24g5gDbsSupported()) {
-                    intent = 7;
-                } else {
-                    intent = 5;
-                }
+                intent = WifiP2pConfig.GROUP_OWNER_INTENT_MIN;
             } else if (ScanResult.is5GHz(freq)) {
-                if (!mWifiNative.is24g5gDbsSupported()) {
-                    intent = 10;
-                } else if (mWifiNative.is5g6gDbsSupported()) {
-                    intent = 9;
-                } else {
-                    intent = 8;
-                }
-            } else if (ScanResult.is6GHz(freq)) {
-                if (mWifiNative.is5g6gDbsSupported()) {
-                    intent = 12;
-                } else {
-                    intent = 11;
-                }
+                // If both sides use the maximum, the negotiation would fail.
+                intent = WifiP2pConfig.GROUP_OWNER_INTENT_MAX - 1;
             } else {
                 intent = DEFAULT_GROUP_OWNER_INTENT;
             }
@@ -6053,161 +4712,6 @@
             }
             return true;
         }
-
-        private boolean checkExternalApproverCaller(Message message,
-                IBinder binder, MacAddress devAddr, String cmd) {
-            Bundle extras = (Bundle) message.obj;
-            if (!mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(
-                    message.sendingUid)) {
-                loge("Permission violation - no MANAGE_WIFI_NETWORK_SELECTION,"
-                        + " permission, uid = " + message.sendingUid);
-                return false;
-            }
-            if (!checkNearbyDevicesPermission(message, cmd)) {
-                loge("Permission violation - no NEARBY_WIFI_DEVICES permission"
-                        + ", uid = " + message.sendingUid);
-                return false;
-            }
-            if (null == binder) {
-                loge("No valid binder for this approver.");
-                return false;
-            }
-            if (null == devAddr) {
-                loge("No device address for this approver.");
-                return false;
-            }
-            return true;
-        }
-
-        private void detachExternalApproverFromClient(IBinder binder) {
-            if (null == binder) return;
-
-            logd("Detach approvers for " + binder);
-            List<ApproverEntry> entries = mExternalApproverManager.get(binder);
-            entries.forEach(e -> {
-                logd("Detach the approver " + e);
-                replyToMessage(
-                        e.getMessage(), WifiP2pManager.EXTERNAL_APPROVER_DETACH,
-                        ExternalApproverRequestListener.APPROVER_DETACH_REASON_CLOSE,
-                        e.getAddress());
-            });
-            mExternalApproverManager.removeAll(binder);
-        }
-
-        private void detachExternalApproverFromPeer() {
-            if (TextUtils.isEmpty(mSavedPeerConfig.deviceAddress)) return;
-
-            ApproverEntry entry = mExternalApproverManager.remove(
-                    MacAddress.fromString(mSavedPeerConfig.deviceAddress));
-            if (null == entry) {
-                logd("No approver found for " + mSavedPeerConfig.deviceAddress
-                        + " check the wildcard address approver.");
-                entry = mExternalApproverManager.remove(MacAddress.BROADCAST_ADDRESS);
-            }
-            if (null == entry) return;
-
-            logd("Detach the approver " + entry);
-            replyToMessage(entry.getMessage(), WifiP2pManager.EXTERNAL_APPROVER_DETACH,
-                    ExternalApproverRequestListener.APPROVER_DETACH_REASON_REMOVE,
-                    entry.getAddress());
-        }
-
-        private boolean handleSetConnectionResultCommon(@NonNull Message message) {
-            Bundle extras = (Bundle) message.obj;
-            MacAddress devAddr = extras.getParcelable(
-                    WifiP2pManager.EXTRA_PARAM_KEY_PEER_ADDRESS);
-            IBinder binder = extras.getBinder(WifiP2pManager.CALLING_BINDER);
-            if (!checkExternalApproverCaller(message, binder, devAddr,
-                    "SET_CONNECTION_REQUEST_RESULT")) {
-                return false;
-            }
-
-            if (!devAddr.equals(MacAddress.fromString(mSavedPeerConfig.deviceAddress))) {
-                logd("Saved peer address is different from " + devAddr);
-                return false;
-            }
-
-            ApproverEntry entry = mExternalApproverManager.get(binder, devAddr);
-            if (null == entry) {
-                logd("No approver found for " + devAddr
-                        + " check the wildcard address approver.");
-                entry = mExternalApproverManager.get(binder, MacAddress.BROADCAST_ADDRESS);
-            }
-            if (null == entry) return false;
-            if (!entry.getKey().equals(binder)) {
-                loge("Ignore connection result from a client"
-                        + " which is different from the existing approver.");
-                return false;
-            }
-            return true;
-        }
-
-        private boolean handleSetConnectionResult(@NonNull Message message,
-                @WifiP2pManager.ExternalApproverRequestListener.RequestType int requestType) {
-            if (!handleSetConnectionResultCommon(message)) return false;
-
-            logd("handle connection result from the approver, result= " + message.arg1);
-            // For deferring result, the approver should be removed first to avoid notifying
-            // the application again.
-            if (WifiP2pManager.CONNECTION_REQUEST_DEFER_TO_SERVICE == message.arg1) {
-                detachExternalApproverFromPeer();
-                notifyInvitationReceived(requestType);
-                return true;
-            } else if (WifiP2pManager.CONNECTION_REQUEST_DEFER_SHOW_PIN_TO_SERVICE
-                            == message.arg1
-                    && WifiP2pManager.ExternalApproverRequestListener.REQUEST_TYPE_NEGOTIATION
-                            == requestType
-                    && WpsInfo.KEYPAD == mSavedPeerConfig.wps.setup) {
-                detachExternalApproverFromPeer();
-                notifyP2pProvDiscShowPinRequest(mSavedPeerConfig.wps.pin,
-                        mSavedPeerConfig.deviceAddress);
-                return true;
-            }
-
-            if (WifiP2pManager.CONNECTION_REQUEST_ACCEPT == message.arg1) {
-                if (WifiP2pManager.ExternalApproverRequestListener.REQUEST_TYPE_NEGOTIATION
-                        == requestType
-                        && WpsInfo.KEYPAD == mSavedPeerConfig.wps.setup) {
-                    sendMessage(PEER_CONNECTION_USER_CONFIRM);
-                } else {
-                    Bundle extras = (Bundle) message.obj;
-                    String pin = extras.getString(
-                            WifiP2pManager.EXTRA_PARAM_KEY_WPS_PIN);
-                    if (!TextUtils.isEmpty(pin)) {
-                        mSavedPeerConfig.wps.pin = pin;
-                    }
-                    sendMessage(PEER_CONNECTION_USER_ACCEPT);
-                }
-            } else if (WifiP2pManager.CONNECTION_REQUEST_REJECT == message.arg1) {
-                sendMessage(PEER_CONNECTION_USER_REJECT);
-            } else {
-                Log.w(TAG, "Invalid connection result: " + message.arg1
-                        + ", config: " + mSavedPeerConfig);
-                return false;
-            }
-            detachExternalApproverFromPeer();
-            return true;
-        }
-
-        private boolean handleSetConnectionResultForInvitationSent(@NonNull Message message) {
-            if (!handleSetConnectionResultCommon(message)) return false;
-
-            logd("handle connection result for pin from the approver, result= " + message.arg1);
-            // For deferring result, the approver should be removed first to avoid notifying
-            // the application again.
-            if (WifiP2pManager.CONNECTION_REQUEST_DEFER_SHOW_PIN_TO_SERVICE == message.arg1) {
-                detachExternalApproverFromPeer();
-                notifyInvitationSent(mSavedPeerConfig.wps.pin,
-                        mSavedPeerConfig.deviceAddress);
-                return true;
-            }
-            Log.w(TAG, "Invalid connection result: " + message.arg1);
-            return false;
-        }
-
-        private boolean isFeatureSupported(long feature) {
-            return (getSupportedFeatures() & feature) == feature;
-        }
     }
 
     /**
diff --git a/service/java/com/android/server/wifi/p2p/WifiP2pShellCommand.java b/service/java/com/android/server/wifi/p2p/WifiP2pShellCommand.java
deleted file mode 100644
index 8760219..0000000
--- a/service/java/com/android/server/wifi/p2p/WifiP2pShellCommand.java
+++ /dev/null
@@ -1,581 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi.p2p;
-
-import android.content.Context;
-import android.net.MacAddress;
-import android.net.NetworkInfo;
-import android.net.wifi.p2p.WifiP2pConfig;
-import android.net.wifi.p2p.WifiP2pDevice;
-import android.net.wifi.p2p.WifiP2pDeviceList;
-import android.net.wifi.p2p.WifiP2pGroup;
-import android.net.wifi.p2p.WifiP2pGroupList;
-import android.net.wifi.p2p.WifiP2pInfo;
-import android.net.wifi.p2p.WifiP2pManager;
-import android.os.Binder;
-import android.os.Message;
-import android.os.Process;
-
-import com.android.internal.util.Protocol;
-import com.android.modules.utils.BasicShellCommandHandler;
-import com.android.modules.utils.build.SdkLevel;
-
-import java.io.PrintWriter;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Interprets and executes 'adb shell cmd wifip2p [args]'.
- * The leading command name is defined by android.content.Context.WIFI_P2P_SERVICE.
- */
-public class WifiP2pShellCommand extends BasicShellCommandHandler {
-    private static final String TAG = "WifiP2pShellCommand";
-
-    private static WifiP2pManager.Channel sWifiP2pChannel;
-
-    private final Context mContext;
-
-    private final WifiP2pManager mWifiP2pManager;
-
-    public WifiP2pShellCommand(Context context) {
-        mContext = context;
-        mWifiP2pManager = mContext.getSystemService(WifiP2pManager.class);
-    }
-
-    private int handleCommand(String cmd, PrintWriter pw) throws Exception {
-        CountDownLatch countDownLatch = new CountDownLatch(1);
-        WifiP2pManager.ActionListener actionListener = new WifiP2pManager.ActionListener() {
-            @Override
-            public void onSuccess() {
-                countDownLatch.countDown();
-            }
-            @Override
-            public void onFailure(int reason) {
-                pw.println("FAILED with reason " + reason);
-                countDownLatch.countDown();
-            }
-        };
-
-        switch (cmd) {
-            case "init":
-                if (null != sWifiP2pChannel) sWifiP2pChannel.close();
-                sWifiP2pChannel = mWifiP2pManager.initialize(
-                        mContext, mContext.getMainLooper(), null);
-                if (null == sWifiP2pChannel) {
-                    pw.println("Cannot initialize p2p channel.");
-                    return -1;
-                }
-                return 0;
-            case "deinit":
-                if (null != sWifiP2pChannel) sWifiP2pChannel.close();
-                sWifiP2pChannel = null;
-                return 0;
-            case "start-peer-discovery":
-                mWifiP2pManager.discoverPeers(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "start-peer-discovery-on-social-channels":
-                if (!SdkLevel.isAtLeastT()) {
-                    pw.println("This feature is only supported on SdkLevel T or later.");
-                    return -1;
-                }
-                mWifiP2pManager.discoverPeersOnSocialChannels(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "start-peer-discovery-on-specific-frequency":
-                if (!SdkLevel.isAtLeastT()) {
-                    pw.println("This feature is only supported on SdkLevel T or later.");
-                    return -1;
-                }
-                int frequencyMhz;
-                try {
-                    frequencyMhz = Integer.parseInt(getNextArgRequired());
-                } catch (NumberFormatException e) {
-                    pw.println(
-                            "Invalid argument to 'start-peer-discovery-on-specific-frequency' "
-                                    + "- must be an integer");
-                    return -1;
-                }
-                if (frequencyMhz <= 0) {
-                    pw.println("Invalid argument to 'start-peer-discovery-on-specific-frequency' "
-                            + "- must be a positive integer.");
-                    return -1;
-                }
-                mWifiP2pManager.discoverPeersOnSpecificFrequency(
-                        sWifiP2pChannel, frequencyMhz, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "stop-peer-discovery":
-                mWifiP2pManager.stopPeerDiscovery(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "start-service-discovery":
-                mWifiP2pManager.discoverServices(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "stop-service-discovery":
-                mWifiP2pManager.stopPeerDiscovery(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "list-peers":
-                mWifiP2pManager.requestPeers(sWifiP2pChannel,
-                        new WifiP2pManager.PeerListListener() {
-                            @Override
-                            public void onPeersAvailable(WifiP2pDeviceList peers) {
-                                pw.println(String.format("%-32s %-24s %-10s %-10s %-10s",
-                                        "Name", "Address", "DevCaps", "GroupCaps", "Status"));
-                                for (WifiP2pDevice d: peers.getDeviceList()) {
-                                    pw.println(String.format("%-32s %-24s 0x%010x 0x%010x %-10s",
-                                            d.deviceName, d.deviceAddress,
-                                            d.deviceCapability, d.groupCapability,
-                                            wifiP2pDeviceStatusToStr(d.status)));
-                                }
-                                countDownLatch.countDown();
-                            }
-                        });
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "remove-client":
-                if (!SdkLevel.isAtLeastT()) {
-                    pw.println("This feature is only supported on SdkLevel T or later.");
-                    return -1;
-                }
-                MacAddress peerAddress;
-                try {
-                    peerAddress = MacAddress.fromString(getNextArgRequired());
-                } catch (IllegalArgumentException e) {
-                    pw.println(
-                            "Invalid argument to 'remove-client' "
-                                    + "- must be a valid mac address");
-                    return -1;
-                }
-                mWifiP2pManager.removeClient(sWifiP2pChannel, peerAddress, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "cancel-connect":
-                mWifiP2pManager.cancelConnect(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "create-group":
-                mWifiP2pManager.createGroup(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "remove-group":
-                mWifiP2pManager.removeGroup(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "set-device-name":
-                String deviceName = getNextArgRequired();
-                mWifiP2pManager.setDeviceName(sWifiP2pChannel, deviceName, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "get-connection-info":
-                mWifiP2pManager.requestConnectionInfo(sWifiP2pChannel,
-                        new WifiP2pManager.ConnectionInfoListener() {
-                            @Override
-                            public void onConnectionInfoAvailable(WifiP2pInfo info) {
-                                pw.println(info.toString());
-                                countDownLatch.countDown();
-                            }
-                        });
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "get-group-info":
-                mWifiP2pManager.requestGroupInfo(sWifiP2pChannel,
-                        new WifiP2pManager.GroupInfoListener() {
-                            @Override
-                            public void onGroupInfoAvailable(WifiP2pGroup group) {
-                                pw.println(group.toString());
-                                countDownLatch.countDown();
-                            }
-                        });
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "get-state":
-                mWifiP2pManager.requestP2pState(sWifiP2pChannel,
-                        new WifiP2pManager.P2pStateListener() {
-                            @Override
-                            public void onP2pStateAvailable(int state) {
-                                switch (state) {
-                                    case WifiP2pManager.WIFI_P2P_STATE_DISABLED:
-                                        pw.println("DISABLED");
-                                        break;
-                                    case WifiP2pManager.WIFI_P2P_STATE_ENABLED:
-                                        pw.println("ENABLED");
-                                        break;
-                                    default:
-                                        pw.println("UNKNOWN");
-                                        break;
-                                }
-                                countDownLatch.countDown();
-                            }
-                        });
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "get-discovery-state":
-                mWifiP2pManager.requestDiscoveryState(sWifiP2pChannel,
-                        new WifiP2pManager.DiscoveryStateListener() {
-                            @Override
-                            public void onDiscoveryStateAvailable(int state) {
-                                switch (state) {
-                                    case WifiP2pManager.WIFI_P2P_DISCOVERY_STARTED:
-                                        pw.println("STARTED");
-                                        break;
-                                    case WifiP2pManager.WIFI_P2P_DISCOVERY_STOPPED:
-                                        pw.println("STOPPED");
-                                        break;
-                                    default:
-                                        pw.println("UNKNOWN");
-                                        break;
-                                }
-                                countDownLatch.countDown();
-                            }
-                        });
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "get-network-info":
-                mWifiP2pManager.requestNetworkInfo(sWifiP2pChannel,
-                        new WifiP2pManager.NetworkInfoListener() {
-                            @Override
-                            public void onNetworkInfoAvailable(NetworkInfo networkInfo) {
-                                pw.println(networkInfo.toString());
-                                countDownLatch.countDown();
-                            }
-                        });
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "get-device-info":
-                mWifiP2pManager.requestDeviceInfo(sWifiP2pChannel,
-                        new WifiP2pManager.DeviceInfoListener() {
-                            @Override
-                            public void onDeviceInfoAvailable(WifiP2pDevice dev) {
-                                pw.println(dev.toString());
-                                countDownLatch.countDown();
-                            }
-                        });
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "list-saved-groups":
-                mWifiP2pManager.requestPersistentGroupInfo(sWifiP2pChannel,
-                        new WifiP2pManager.PersistentGroupInfoListener() {
-                            @Override
-                            public void onPersistentGroupInfoAvailable(WifiP2pGroupList groups) {
-                                pw.println(groups.toString());
-                                countDownLatch.countDown();
-                            }
-                        });
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "delete-saved-group":
-                int netId;
-                try {
-                    netId = Integer.parseInt(getNextArgRequired());
-                } catch (NumberFormatException e) {
-                    pw.println(
-                            "Invalid argument to 'delete-saved-group' "
-                                    + "- must be an integer");
-                    return -1;
-                }
-                if (netId < 0) {
-                    pw.println("Invalid argument to 'delete-saved-group' "
-                            + "- must be 0 or a positive integer.");
-                    return -1;
-                }
-                mWifiP2pManager.deletePersistentGroup(sWifiP2pChannel, netId, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "set-channels":
-                int listeningChannel, operatingChannel;
-                try {
-                    listeningChannel = Integer.parseInt(getNextArgRequired());
-                    operatingChannel = Integer.parseInt(getNextArgRequired());
-                } catch (NumberFormatException e) {
-                    pw.println(
-                            "Invalid argument to 'set-channels' "
-                                    + "- must be an integer");
-                    return -1;
-                }
-                if (listeningChannel < 0 || operatingChannel < 0) {
-                    pw.println("Invalid argument to 'set-channels' "
-                            + "- must be 0 or a positive integer.");
-                    return -1;
-                }
-                mWifiP2pManager.setWifiP2pChannels(sWifiP2pChannel,
-                        listeningChannel, operatingChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "start-listening":
-                mWifiP2pManager.startListening(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "stop-listening":
-                mWifiP2pManager.stopListening(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "set-miracast-mode":
-                int mode;
-                try {
-                    mode = Integer.parseInt(getNextArgRequired());
-                } catch (NumberFormatException e) {
-                    pw.println("Invalid argument to 'set-miracast-mode' "
-                            + "- must be an integer");
-                    return -1;
-                }
-                if (mode < 0) {
-                    pw.println("Invalid argument to 'set-miracast-mode' "
-                            + "- must be 0 or a positive integer.");
-                    return -1;
-                }
-                mWifiP2pManager.setMiracastMode(mode);
-                return 0;
-            case "factory-reset":
-                mWifiP2pManager.factoryReset(sWifiP2pChannel, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            case "connect": {
-                WifiP2pConfig config = new WifiP2pConfig();
-                config.deviceAddress = getNextArgRequired();
-                mWifiP2pManager.connect(sWifiP2pChannel, config, actionListener);
-                countDownLatch.await(3000, TimeUnit.MILLISECONDS);
-                return 0;
-            }
-            case "accept-connection":
-                mWifiP2pManager.getP2pStateMachineMessenger()
-                        .send(Message.obtain(null, Protocol.BASE_WIFI_P2P_SERVICE + 2));
-                return 0;
-            case "reject-connection":
-                mWifiP2pManager.getP2pStateMachineMessenger()
-                        .send(Message.obtain(null, Protocol.BASE_WIFI_P2P_SERVICE + 3));
-                return 0;
-            case "create-group-with-config": {
-                WifiP2pConfig config = prepareWifiP2pConfig(pw);
-                if (null == config) {
-                    pw.println("Invalid argument to 'create-group-with-config'");
-                    return -1;
-                }
-                mWifiP2pManager.createGroup(sWifiP2pChannel, config, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            }
-            case "connect-with-config": {
-                WifiP2pConfig config = prepareWifiP2pConfig(pw);
-                if (null == config) {
-                    pw.println("Invalid argument to 'connect-with-config'");
-                    return -1;
-                }
-                mWifiP2pManager.connect(sWifiP2pChannel, config, actionListener);
-                countDownLatch.await(1000, TimeUnit.MILLISECONDS);
-                return 0;
-            }
-            default:
-                return handleDefaultCommands(cmd);
-        }
-    }
-
-    @Override
-    public int onCommand(String cmd) {
-        final PrintWriter pw = getOutPrintWriter();
-        checkRootPermission();
-
-        // Treat no command as help command.
-        if (cmd == null || cmd.equals("")) {
-            cmd = "help";
-        }
-        if (!commandDoesNotRequireP2pAlreadyInitialized(cmd, pw)) return -1;
-
-        try {
-            return handleCommand(cmd, pw);
-        } catch (Exception e) {
-            pw.println("Exception: " + e);
-        }
-
-        return -1;
-    }
-
-    private boolean commandDoesNotRequireP2pAlreadyInitialized(String cmd, PrintWriter pw) {
-        if (cmd.equals("init")) return true;
-        if (cmd.equals("deinit")) return true;
-        if (cmd.equals("help")) return true;
-
-        if (null == mWifiP2pManager) {
-            pw.println("P2p service is not available.");
-            return false;
-        }
-
-        if (null == sWifiP2pChannel) {
-            pw.println("P2p client is not initialized,  execute init first.");
-            return false;
-        }
-
-        return true;
-    }
-
-    private String wifiP2pDeviceStatusToStr(int status) {
-        switch (status) {
-            case WifiP2pDevice.CONNECTED:
-                return "CONNECTED";
-            case WifiP2pDevice.INVITED:
-                return "INVITED";
-            case WifiP2pDevice.FAILED:
-                return "FAILED";
-            case WifiP2pDevice.AVAILABLE:
-                return "AVAILABLE";
-            case WifiP2pDevice.UNAVAILABLE:
-                return "UNAVAILABLE";
-        }
-        return "UNKNOWN";
-    }
-
-    private WifiP2pConfig prepareWifiP2pConfig(PrintWriter pw) {
-        String networkName = getNextArgRequired();
-        String passphrase = getNextArgRequired();
-        int operatingBandOrFreq;
-        try {
-            operatingBandOrFreq = Integer.parseInt(getNextArgRequired());
-        } catch (NumberFormatException e) {
-            pw.println("Invalid argument to for wifi p2p config opeartingBandOrFreq "
-                    + "- must be an integer");
-            return null;
-        }
-        if (operatingBandOrFreq < 0) {
-            pw.println("Invalid argument to for wifi p2p config opeartingBandOrFreq "
-                    + "- must be 0 or a positive integer.");
-            return null;
-        }
-        boolean isPersistent = getNextArgRequiredTrueOrFalse("true", "false");
-        WifiP2pConfig.Builder builder = new WifiP2pConfig.Builder()
-                .setNetworkName(networkName)
-                .setPassphrase(passphrase);
-        if (operatingBandOrFreq < 1000) {
-            builder.setGroupOperatingBand(operatingBandOrFreq);
-        } else {
-            builder.setGroupOperatingFrequency(operatingBandOrFreq);
-        }
-        builder.enablePersistentMode(isPersistent);
-        return builder.build();
-    }
-
-    private boolean getNextArgRequiredTrueOrFalse(String trueString, String falseString)
-            throws IllegalArgumentException {
-        String nextArg = getNextArgRequired();
-        if (trueString.equals(nextArg)) {
-            return true;
-        } else if (falseString.equals(nextArg)) {
-            return false;
-        } else {
-            throw new IllegalArgumentException("Expected '" + trueString + "' or '" + falseString
-                    + "' as next arg but got '" + nextArg + "'");
-        }
-    }
-
-    private void checkRootPermission() {
-        final int uid = Binder.getCallingUid();
-        if (uid == Process.ROOT_UID) {
-            // Root can do anything.
-            return;
-        }
-        throw new SecurityException("Uid " + uid + " does not have access to wifip2p commands");
-    }
-
-    @Override
-    public void onHelp() {
-        final PrintWriter pw = getOutPrintWriter();
-
-        pw.println("Wi-Fi P2P (wifip2p) commands:");
-        pw.println("  help");
-        pw.println("    Print this help text.");
-        pw.println("  init");
-        pw.println("    Init p2p client, this must be called before executing p2p commands.");
-        pw.println("  deinit");
-        pw.println("    De-init p2p client, this must be called at the end, or wifi service will"
-                        + " keep the p2p client and block SoftAp or NAN.");
-        pw.println("  start-peer-discovery");
-        pw.println("    Start p2p peer discovery.");
-        pw.println("  start-peer-discovery-on-social-channels");
-        pw.println("    Start p2p peer discovery on social channels.");
-        pw.println("  start-peer-discovery-on-specific-frequency <frequency>");
-        pw.println("    Start p2p peer discovery on specific frequency.");
-        pw.println("  stop-peer-discovery");
-        pw.println("    Stop p2p peer discovery.");
-        pw.println("  start-service-discovery");
-        pw.println("    Start p2p service discovery.");
-        pw.println("  stop-service-discovery");
-        pw.println("    Stop p2p service discovery.");
-        pw.println("  start-listening");
-        pw.println("    Start p2p listening.");
-        pw.println("  stop-listening");
-        pw.println("    Stop p2p listening.");
-        pw.println("  list-peers");
-        pw.println("    List scanned peers.");
-        pw.println("  set-device-name <name>");
-        pw.println("    Set the p2p device name.");
-        pw.println("  get-connection-info");
-        pw.println("    Get current connection information.");
-        pw.println("  get-group-info");
-        pw.println("    Get current group information.");
-        pw.println("  get-network-info");
-        pw.println("    Get current P2P network information.");
-        pw.println("  get-device-info");
-        pw.println("    Get the device information");
-        pw.println("  get-state");
-        pw.println("    Get P2P state.");
-        pw.println("  get-discovery-state");
-        pw.println("    Indicate whether p2p discovery is running or not.");
-        pw.println("  list-saved-groups");
-        pw.println("    List saved groups.");
-        pw.println("  delete-saved-group <networkId>");
-        pw.println("    Delete a saved group.");
-        pw.println("  set-channels <listening channel> <operating channel>");
-        pw.println("    Set listening channel and operating channel.");
-        pw.println("  set-miracast-mode (0|1|2)");
-        pw.println("    Set Miracast mode. 0 is DISABLED, 1 is SOURCE, and 2 is SINK.");
-        pw.println("  factory-reset");
-        pw.println("    Do P2P factory reset.");
-        pw.println("  accept-connection");
-        pw.println("    Accept an incoming connection request.");
-        pw.println("  reject-connection");
-        pw.println("    Reject an incoming connection request.");
-        pw.println("  connect <device address>");
-        pw.println("    Connect to a device.");
-        pw.println("  connect-with-config <network name> <passphrase>"
-                        + " <bandOrFreq> <persistent>");
-        pw.println("    <bandOrFreq> - select the preferred band or frequency.");
-        pw.println("        - Use '2' to select 2.4GHz band as the preferred band");
-        pw.println("        - Use '5' to select 5GHz band as the preferred band");
-        pw.println("        - Use a frequency in MHz to indicate the preferred frequency.");
-        pw.println("    <persistent> true for a persistent group; otherwise false.");
-        pw.println("    Connect to a device with a configuration.");
-        pw.println("  remove-client <peerAddress>");
-        pw.println("    <peerAddress> the MAC address of the p2p client.");
-        pw.println("    Remove the p2p client.");
-        pw.println("  cancel-connect");
-        pw.println("    Cancel an onging connection request.");
-        pw.println("  create-group");
-        pw.println("    Create a persistent autonomous group.");
-        pw.println("  create-group-with-config <network name> <passphrase>"
-                        + " <bandOrFreq> <persistent>");
-        pw.println("    <bandOrFreq> - select the preferred band or frequency.");
-        pw.println("        - Use '2' to select 2.4GHz band as the preferred band");
-        pw.println("        - Use '5' to select 5GHz band as the preferred band");
-        pw.println("        - Use a frequency in MHz to indicate the preferred frequency.");
-        pw.println("    <persistent> true for a persistent group; otherwise false.");
-        pw.println("    Create an autonomous group with a configuration.");
-        pw.println("  remove-group");
-        pw.println("    Remove current formed group.");
-        pw.println();
-    }
-}
diff --git a/service/java/com/android/server/wifi/rtt/RttNative.java b/service/java/com/android/server/wifi/rtt/RttNative.java
index f05d809..3c0541b 100644
--- a/service/java/com/android/server/wifi/rtt/RttNative.java
+++ b/service/java/com/android/server/wifi/rtt/RttNative.java
@@ -20,17 +20,17 @@
 import android.annotation.Nullable;
 import android.hardware.wifi.V1_0.IWifiRttController;
 import android.hardware.wifi.V1_0.IWifiRttControllerEventCallback;
+import android.hardware.wifi.V1_0.RttBw;
 import android.hardware.wifi.V1_0.RttCapabilities;
 import android.hardware.wifi.V1_0.RttConfig;
 import android.hardware.wifi.V1_0.RttPeerType;
+import android.hardware.wifi.V1_0.RttPreamble;
 import android.hardware.wifi.V1_0.RttResult;
 import android.hardware.wifi.V1_0.RttStatus;
 import android.hardware.wifi.V1_0.RttType;
+import android.hardware.wifi.V1_0.WifiChannelWidthInMhz;
 import android.hardware.wifi.V1_0.WifiStatus;
 import android.hardware.wifi.V1_0.WifiStatusCode;
-import android.hardware.wifi.V1_6.RttBw;
-import android.hardware.wifi.V1_6.RttPreamble;
-import android.hardware.wifi.V1_6.WifiChannelWidthInMhz;
 import android.net.MacAddress;
 import android.net.wifi.rtt.RangingRequest;
 import android.net.wifi.rtt.RangingResult;
@@ -115,9 +115,7 @@
     private volatile Capabilities mRttCapabilities;
     private final WifiRttControllerEventCallback mWifiRttControllerEventCallback;
     private volatile android.hardware.wifi.V1_4.IWifiRttController mIWifiRttController14;
-    private volatile android.hardware.wifi.V1_6.IWifiRttController mIWifiRttController16;
     private final WifiRttControllerEventCallback14 mWifiRttControllerEventCallback14;
-    private final WifiRttControllerEventCallback16 mWifiRttControllerEventCallback16;
     private static final int CONVERSION_US_TO_MS = 1_000;
 
     private final HalDeviceManager.InterfaceRttControllerLifecycleCallback mRttLifecycleCb =
@@ -128,13 +126,9 @@
                     synchronized (mLock) {
                         mIWifiRttController = controller;
                         mIWifiRttController14 = getWifiRttControllerV1_4();
-                        mIWifiRttController16 = getWifiRttControllerV1_6();
 
                         try {
-                            if (mIWifiRttController16 != null) {
-                                mIWifiRttController16.registerEventCallback_1_6(
-                                        mWifiRttControllerEventCallback16);
-                            } else if (mIWifiRttController14 != null) {
+                            if (mIWifiRttController14 != null) {
                                 mIWifiRttController14.registerEventCallback_1_4(
                                         mWifiRttControllerEventCallback14);
                             } else {
@@ -146,7 +140,6 @@
                             if (mIWifiRttController != null) {
                                 mIWifiRttController = null;
                                 mIWifiRttController14 = null;
-                                mIWifiRttController16 = null;
                                 mRttService.disable();
                             }
                             return;
@@ -162,7 +155,6 @@
                     synchronized (mLock) {
                         mIWifiRttController = null;
                         mIWifiRttController14 = null;
-                        mIWifiRttController16 = null;
                         mRttCapabilities = null;
                         mRttService.disable();
                     }
@@ -174,7 +166,6 @@
         mHalDeviceManager = halDeviceManager;
         mWifiRttControllerEventCallback = new WifiRttControllerEventCallback();
         mWifiRttControllerEventCallback14 = new WifiRttControllerEventCallback14();
-        mWifiRttControllerEventCallback16 = new WifiRttControllerEventCallback16();
     }
 
     /**
@@ -226,22 +217,7 @@
 
         synchronized (mLock) {
             try {
-                if (mIWifiRttController16 != null) {
-                    mIWifiRttController16.getCapabilities_1_6(
-                            (status, capabilities16) -> {
-                                if (status.code != WifiStatusCode.SUCCESS) {
-                                    Log.e(TAG, "updateRttCapabilities:"
-                                            + " error requesting capabilities "
-                                            + "-- code=" + status.code);
-                                    return;
-                                }
-                                if (mDbg) {
-                                    Log.v(TAG, "updateRttCapabilities: RTT capabilities="
-                                            + capabilities16);
-                                }
-                                mRttCapabilities = new Capabilities(capabilities16);
-                            });
-                } else if (mIWifiRttController14 != null) {
+                if (mIWifiRttController14 != null) {
                     mIWifiRttController14.getCapabilities_1_4(
                             (status, capabilities14) -> {
                                 if (status.code != WifiStatusCode.SUCCESS) {
@@ -308,9 +284,7 @@
             }
             updateRttCapabilities();
 
-            if (mIWifiRttController16 != null) {
-                return sendRangeRequest16(cmdId, request, isCalledFromPrivilegedContext);
-            } else if (mIWifiRttController14 != null) {
+            if (mIWifiRttController14 != null) {
                 return sendRangeRequest14(cmdId, request, isCalledFromPrivilegedContext);
             } else {
                 return sendRangeRequest(cmdId, request, isCalledFromPrivilegedContext);
@@ -376,36 +350,6 @@
         return true;
     }
 
-    private boolean sendRangeRequest16(int cmdId, RangingRequest request,
-            boolean isCalledFromPrivilegedContext) {
-        ArrayList<android.hardware.wifi.V1_6.RttConfig> rttConfig =
-                convertRangingRequestToRttConfigs16(request,
-                isCalledFromPrivilegedContext, mRttCapabilities);
-        if (rttConfig == null) {
-            Log.e(TAG, "sendRangeRequest16: invalid request parameters");
-            return false;
-        }
-        if (rttConfig.size() == 0) {
-            Log.e(TAG, "sendRangeRequest16: all requests invalidated");
-            mRttService.onRangingResults(cmdId, new ArrayList<>());
-            return true;
-        }
-
-        try {
-            WifiStatus status = mIWifiRttController16.rangeRequest_1_6(cmdId, rttConfig);
-            if (status.code != WifiStatusCode.SUCCESS) {
-                Log.e(TAG, "sendRangeRequest16: cannot issue range request -- code="
-                        + status.code);
-                return false;
-            }
-        } catch (RemoteException e) {
-            Log.e(TAG, "sendRangeRequest16: exception issuing range request: " + e);
-            return false;
-        }
-
-        return true;
-    }
-
     /**
      * Cancel an outstanding ranging request: no guarantees of execution - we will ignore any
      * results which are returned for the canceled request.
@@ -510,10 +454,7 @@
         if (bw == RttBw.BW_40MHZ && preamble >= RttPreamble.HT) {
             return;
         }
-        if (bw == RttBw.BW_320MHZ && preamble == RttPreamble.EHT) {
-            return;
-        }
-        if (bw >= RttBw.BW_80MHZ && bw < RttBw.BW_320MHZ && preamble >= RttPreamble.VHT) {
+        if (bw >= RttBw.BW_80MHZ && preamble >= RttPreamble.VHT) {
             return;
         }
         throw new IllegalArgumentException(
@@ -589,75 +530,6 @@
         return rttConfigs;
     }
 
-    private static ArrayList<android.hardware.wifi.V1_6.RttConfig>
-            convertRangingRequestToRttConfigs16(
-            RangingRequest request, boolean isCalledFromPrivilegedContext, Capabilities cap) {
-        ArrayList<android.hardware.wifi.V1_6.RttConfig> rttConfigs =
-                new ArrayList<>(request.mRttPeers.size());
-
-        // Skipping any configurations which have an error (printing out a message).
-        // The caller will only get results for valid configurations.
-        for (ResponderConfig responder: request.mRttPeers) {
-
-            android.hardware.wifi.V1_6.RttConfig config =
-                    new android.hardware.wifi.V1_6.RttConfig();
-
-            System.arraycopy(responder.macAddress.toByteArray(), 0, config.addr, 0,
-                    config.addr.length);
-
-            try {
-                config.type = responder.supports80211mc ? RttType.TWO_SIDED : RttType.ONE_SIDED;
-                if (config.type == RttType.ONE_SIDED && cap != null && !cap.oneSidedRttSupported) {
-                    Log.w(TAG, "Device does not support one-sided RTT");
-                    continue;
-                }
-
-                config.peer = halRttPeerTypeFromResponderType(responder.responderType);
-                config.channel.width = halChannelWidthFromResponderChannelWidth(
-                        responder.channelWidth);
-                config.channel.centerFreq = responder.frequency;
-                config.channel.centerFreq0 = responder.centerFreq0;
-                config.channel.centerFreq1 = responder.centerFreq1;
-                config.bw = halRttChannelBandwidthFromResponderChannelWidth(responder.channelWidth);
-                config.preamble = halRttPreamble14FromResponderPreamble(responder.preamble);
-
-                if (config.peer == RttPeerType.NAN) {
-                    config.mustRequestLci = false;
-                    config.mustRequestLcr = false;
-                    config.burstPeriod = 0;
-                    config.numBurst = 0;
-                    config.numFramesPerBurst = request.mRttBurstSize;
-                    config.numRetriesPerRttFrame = 0; // irrelevant for 2-sided RTT
-                    config.numRetriesPerFtmr = 3;
-                    config.burstDuration = 9;
-                } else { // AP + all non-NAN requests
-                    config.mustRequestLci = true;
-                    config.mustRequestLcr = true;
-                    config.burstPeriod = 0;
-                    config.numBurst = 0;
-                    config.numFramesPerBurst = request.mRttBurstSize;
-                    config.numRetriesPerRttFrame = (config.type == RttType.TWO_SIDED ? 0 : 3);
-                    config.numRetriesPerFtmr = 3;
-                    config.burstDuration = 9;
-
-                    if (cap != null) { // constrain parameters per device capabilities
-                        config.mustRequestLci = config.mustRequestLci && cap.lciSupported;
-                        config.mustRequestLcr = config.mustRequestLcr && cap.lcrSupported;
-                        config.bw = halRttChannelBandwidthCapabilityLimiter(config.bw, cap);
-                        config.preamble = halRttPreambleCapabilityLimiter(config.preamble, cap);
-                    }
-                }
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Invalid configuration: " + e.getMessage());
-                continue;
-            }
-
-            rttConfigs.add(config);
-        }
-
-        return rttConfigs;
-    }
-
     private static int halRttPeerTypeFromResponderType(int responderType) {
         switch (responderType) {
             case ResponderConfig.RESPONDER_AP:
@@ -688,8 +560,6 @@
                 return WifiChannelWidthInMhz.WIDTH_160;
             case ResponderConfig.CHANNEL_WIDTH_80MHZ_PLUS_MHZ:
                 return WifiChannelWidthInMhz.WIDTH_80P80;
-            case ResponderConfig.CHANNEL_WIDTH_320MHZ:
-                return WifiChannelWidthInMhz.WIDTH_320;
             default:
                 throw new IllegalArgumentException(
                         "halChannelWidthFromResponderChannelWidth: bad " + responderChannelWidth);
@@ -707,8 +577,6 @@
             case ResponderConfig.CHANNEL_WIDTH_160MHZ:
             case ResponderConfig.CHANNEL_WIDTH_80MHZ_PLUS_MHZ:
                 return RttBw.BW_160MHZ;
-            case ResponderConfig.CHANNEL_WIDTH_320MHZ:
-                return RttBw.BW_320MHZ;
             default:
                 throw new IllegalArgumentException(
                         "halRttChannelBandwidthFromHalBandwidth: bad " + responderChannelWidth);
@@ -723,10 +591,6 @@
                 return RttPreamble.HT;
             case ResponderConfig.PREAMBLE_VHT:
                 return RttPreamble.VHT;
-            case ResponderConfig.PREAMBLE_HE:
-                return RttPreamble.HE;
-            case ResponderConfig.PREAMBLE_EHT:
-                return RttPreamble.EHT;
             default:
                 throw new IllegalArgumentException(
                         "halRttPreambleFromResponderPreamble: bad " + responderPreamble);
@@ -742,7 +606,7 @@
             case ResponderConfig.PREAMBLE_VHT:
                 return RttPreamble.VHT;
             case ResponderConfig.PREAMBLE_HE:
-                return RttPreamble.HE;
+                return android.hardware.wifi.V1_4.RttPreamble.HE;
             default:
                 throw new IllegalArgumentException(
                         "halRttPreamble14FromResponderPreamble: bad " + responderPreamble);
@@ -808,19 +672,6 @@
     }
 
     /**
-     * Check if HAL Interface 1.6 is running
-     *
-     * @return 1.6 IWifiRttController object if the device is running the 1.6 hal service, null
-     * otherwise
-     */
-    private android.hardware.wifi.V1_6.IWifiRttController getWifiRttControllerV1_6() {
-        if (mIWifiRttController == null) {
-            return null;
-        }
-        return android.hardware.wifi.V1_6.IWifiRttController.castFrom(mIWifiRttController);
-    }
-
-    /**
      * Dump the internal state of the class.
      */
     public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
@@ -884,41 +735,6 @@
         }
     }
 
-    /**
-     *  Callback for events on 1.6 WifiRttController
-     */
-    private class WifiRttControllerEventCallback16 extends
-            android.hardware.wifi.V1_6.IWifiRttControllerEventCallback.Stub {
-        @Override
-        public void onResults(int cmdId, ArrayList<RttResult> halResults) {
-            // This callback is not supported on this version of the interface
-            return;
-        }
-
-        @Override
-        public void onResults_1_4(int cmdId,
-                ArrayList<android.hardware.wifi.V1_4.RttResult> halResults) {
-            // This callback is not supported on this version of the interface
-            return;
-        }
-
-        @Override
-        public void onResults_1_6(int cmdId,
-                ArrayList<android.hardware.wifi.V1_6.RttResult> halResults) {
-            if (mDbg) {
-                Log.v(TAG,
-                        "onResults_1_6: cmdId=" + cmdId + ", # of results=" + halResults.size());
-            }
-            // sanitize HAL results
-            if (halResults == null) {
-                halResults = new ArrayList<>();
-            }
-            halResults.removeIf(Objects::isNull);
-            ArrayList<RangingResult> rangingResults = convertHalResultsRangingResults16(halResults);
-            mRttService.onRangingResults(cmdId, rangingResults);
-        }
-    }
-
     private ArrayList<RangingResult> convertHalResultsRangingResults(
             ArrayList<RttResult> halResults) {
         ArrayList<RangingResult> rangingResults = new ArrayList<>();
@@ -993,43 +809,6 @@
         return rangingResults;
     }
 
-    private ArrayList<RangingResult> convertHalResultsRangingResults16(
-            ArrayList<android.hardware.wifi.V1_6.RttResult> halResults) {
-        ArrayList<RangingResult> rangingResults = new ArrayList<>();
-        for (android.hardware.wifi.V1_6.RttResult rttResult : halResults) {
-            byte[] lci = NativeUtil.byteArrayFromArrayList(rttResult.lci.data);
-            byte[] lcr = NativeUtil.byteArrayFromArrayList(rttResult.lcr.data);
-            ResponderLocation responderLocation;
-            try {
-                responderLocation = new ResponderLocation(lci, lcr);
-                if (!responderLocation.isValid()) {
-                    responderLocation = null;
-                }
-            } catch (Exception e) {
-                responderLocation = null;
-                Log.e(TAG,
-                        "ResponderLocation: lci/lcr parser failed exception -- " + e);
-            }
-            if (rttResult.successNumber <= 1
-                    && rttResult.distanceSdInMm != 0) {
-                if (mDbg) {
-                    Log.w(TAG, "postProcessResults: non-zero distance stdev with 0||1 num "
-                            + "samples!? result=" + rttResult);
-                }
-                rttResult.distanceSdInMm = 0;
-            }
-            rangingResults.add(new RangingResult(
-                    convertHalStatusToFrameworkStatus(rttResult.status),
-                    MacAddress.fromBytes(rttResult.addr),
-                    rttResult.distanceInMm, rttResult.distanceSdInMm,
-                    rttResult.rssi / -2, rttResult.numberPerBurstPeer,
-                    rttResult.successNumber, lci, lcr, responderLocation,
-                    rttResult.timeStampInUs / CONVERSION_US_TO_MS,
-                    rttResult.type == RttType.TWO_SIDED));
-        }
-        return rangingResults;
-    }
-
     private @FrameworkRttStatus int convertHalStatusToFrameworkStatus(int halStatus) {
         switch (halStatus) {
             case RttStatus.SUCCESS:
@@ -1112,16 +891,5 @@
             bwSupported = rttHalCapabilities.bwSupport;
             rttFtmSupported = rttHalCapabilities.rttFtmSupported;
         }
-
-        public Capabilities(android.hardware.wifi.V1_6.RttCapabilities rttHalCapabilities) {
-            oneSidedRttSupported = rttHalCapabilities.rttOneSidedSupported;
-            lciSupported = rttHalCapabilities.lciSupported;
-            lcrSupported = rttHalCapabilities.lcrSupported;
-            responderSupported = rttHalCapabilities.responderSupported;
-            preambleSupported = rttHalCapabilities.preambleSupport;
-            mcVersion = rttHalCapabilities.mcVersion;
-            bwSupported = rttHalCapabilities.bwSupport;
-            rttFtmSupported = rttHalCapabilities.rttFtmSupported;
-        }
     }
 }
diff --git a/service/java/com/android/server/wifi/rtt/RttService.java b/service/java/com/android/server/wifi/rtt/RttService.java
index c4eb6c5..17e4558 100644
--- a/service/java/com/android/server/wifi/rtt/RttService.java
+++ b/service/java/com/android/server/wifi/rtt/RttService.java
@@ -17,13 +17,13 @@
 package com.android.server.wifi.rtt;
 
 import android.content.Context;
-import android.net.wifi.WifiContext;
 import android.net.wifi.aware.WifiAwareManager;
 import android.os.HandlerThread;
 import android.util.Log;
 
 import com.android.server.SystemService;
 import com.android.server.wifi.HalDeviceManager;
+import com.android.server.wifi.WifiContext;
 import com.android.server.wifi.WifiInjector;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 
diff --git a/service/java/com/android/server/wifi/rtt/RttServiceImpl.java b/service/java/com/android/server/wifi/rtt/RttServiceImpl.java
index 7cd1ea9..c3267cc 100644
--- a/service/java/com/android/server/wifi/rtt/RttServiceImpl.java
+++ b/service/java/com/android/server/wifi/rtt/RttServiceImpl.java
@@ -29,9 +29,7 @@
 import android.content.pm.PackageManager;
 import android.location.LocationManager;
 import android.net.MacAddress;
-import android.net.wifi.WifiManager;
 import android.net.wifi.aware.IWifiAwareMacAddressProvider;
-import android.net.wifi.aware.MacAddrMapping;
 import android.net.wifi.aware.WifiAwareManager;
 import android.net.wifi.rtt.IRttCallback;
 import android.net.wifi.rtt.IWifiRttManager;
@@ -42,7 +40,6 @@
 import android.net.wifi.rtt.ResponderLocation;
 import android.net.wifi.rtt.WifiRttManager;
 import android.os.Binder;
-import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Looper;
@@ -58,7 +55,6 @@
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.WakeupMessage;
 import com.android.modules.utils.BasicShellCommandHandler;
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.Clock;
 import com.android.server.wifi.WifiSettingsConfigStore;
 import com.android.server.wifi.proto.nano.WifiMetricsProto;
@@ -390,7 +386,7 @@
      */
     @Override
     public void startRanging(IBinder binder, String callingPackage, String callingFeatureId,
-            WorkSource workSource, RangingRequest request, IRttCallback callback, Bundle extras)
+            WorkSource workSource, RangingRequest request, IRttCallback callback)
             throws RemoteException {
         if (VDBG) {
             Log.v(TAG, "startRanging: binder=" + binder + ", callingPackage=" + callingPackage
@@ -430,24 +426,7 @@
         // permission checks
         enforceAccessPermission();
         enforceChangePermission();
-        mWifiPermissionsUtil.checkPackage(uid, callingPackage);
-        // check if only Aware APs are ranged.
-        boolean onlyAwareApRanged = request.mRttPeers.stream().allMatch(
-                config -> config.responderType == ResponderConfig.RESPONDER_AWARE);
-        if (onlyAwareApRanged && SdkLevel.isAtLeastT()) {
-            // Special case: if only aware APs are ranged, then allow this request if the caller
-            // has nearby permission.
-            if (!mWifiPermissionsUtil.checkNearbyDevicesPermission(extras.getParcelable(
-                            WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE), true,
-                    "wifi aware ranging")) {
-                // No nearby permission. Still check for location permission.
-                mWifiPermissionsUtil.enforceFineLocationPermission(
-                        callingPackage, callingFeatureId, uid);
-            }
-        } else {
-            mWifiPermissionsUtil.enforceFineLocationPermission(
-                    callingPackage, callingFeatureId, uid);
-        }
+        mWifiPermissionsUtil.enforceFineLocationPermission(callingPackage, callingFeatureId, uid);
 
         final WorkSource ws;
         if (workSource != null) {
@@ -490,7 +469,7 @@
             }
             mRttServiceSynchronized.queueRangingRequest(uid, sourceToUse, binder, dr,
                     callingPackage, callingFeatureId, request, callback,
-                    isCalledFromPrivilegedContext, extras);
+                    isCalledFromPrivilegedContext);
         });
     }
 
@@ -699,7 +678,7 @@
         private void queueRangingRequest(int uid, WorkSource workSource, IBinder binder,
                 IBinder.DeathRecipient dr, String callingPackage, String callingFeatureId,
                 RangingRequest request, IRttCallback callback,
-                boolean isCalledFromPrivilegedContext, Bundle extras) {
+                boolean isCalledFromPrivilegedContext) {
             mRttMetrics.recordRequest(workSource, request);
 
             if (isRequestorSpamming(workSource)) {
@@ -726,7 +705,6 @@
             newRequest.request = request;
             newRequest.callback = callback;
             newRequest.isCalledFromPrivilegedContext = isCalledFromPrivilegedContext;
-            newRequest.extras = extras;
             mRttRequestQueue.add(newRequest);
 
             if (VDBG) {
@@ -1014,15 +992,14 @@
             }
 
             request.peerHandlesTranslated = true;
-            int[] peerIdsArray = peerIdsNeedingTranslation.stream().mapToInt(i -> i).toArray();
-            mAwareManager.requestMacAddresses(request.uid, peerIdsArray,
+            mAwareManager.requestMacAddresses(request.uid, peerIdsNeedingTranslation,
                     new IWifiAwareMacAddressProvider.Stub() {
                         @Override
-                        public void macAddress(MacAddrMapping[] peerIdToMacList) {
+                        public void macAddress(Map peerIdToMacMap) {
                             // ASYNC DOMAIN
                             mHandler.post(() -> {
                                 // BACK TO SYNC DOMAIN
-                                processReceivedAwarePeerMacAddresses(request, peerIdToMacList);
+                                processReceivedAwarePeerMacAddresses(request, peerIdToMacMap);
                             });
                         }
                     });
@@ -1030,27 +1007,16 @@
         }
 
         private void processReceivedAwarePeerMacAddresses(RttRequestInfo request,
-                MacAddrMapping[] peerIdToMacList) {
+                Map<Integer, byte[]> peerIdToMacMap) {
             if (VDBG) {
-                Log.v(TAG, "processReceivedAwarePeerMacAddresses: request=" + request);
-                Log.v(TAG, "processReceivedAwarePeerMacAddresses: peerIdToMacList begin");
-                for (MacAddrMapping mapping : peerIdToMacList) {
-                    Log.v(TAG, "    " + mapping.peerId + ": "
-                            + MacAddress.fromBytes(mapping.macAddress));
-                }
-                Log.v(TAG, "processReceivedAwarePeerMacAddresses: peerIdToMacList end");
+                Log.v(TAG, "processReceivedAwarePeerMacAddresses: request=" + request
+                        + ", peerIdToMacMap=" + peerIdToMacMap);
             }
 
             RangingRequest.Builder newRequestBuilder = new RangingRequest.Builder();
             for (ResponderConfig rttPeer : request.request.mRttPeers) {
                 if (rttPeer.peerHandle != null && rttPeer.macAddress == null) {
-                    byte[] mac = null;
-                    for (MacAddrMapping mapping : peerIdToMacList) {
-                        if (mapping.peerId == rttPeer.peerHandle.peerId) {
-                            mac = mapping.macAddress;
-                            break;
-                        }
-                    }
+                    byte[] mac = peerIdToMacMap.get(rttPeer.peerHandle.peerId);
                     if (mac == null || mac.length != 6) {
                         Log.e(TAG, "processReceivedAwarePeerMacAddresses: received an invalid MAC "
                                 + "address for peerId=" + rttPeer.peerHandle.peerId);
@@ -1092,25 +1058,10 @@
                 return;
             }
 
-            boolean onlyAwareApRanged = topOfQueueRequest.request.mRttPeers.stream().allMatch(
-                    config -> config.responderType == ResponderConfig.RESPONDER_AWARE);
-            boolean permissionGranted = false;
-            if (onlyAwareApRanged && SdkLevel.isAtLeastT()) {
-                // Special case: if only aware APs are ranged, then allow this request if the caller
-                // has nearby permission.
-                permissionGranted = mWifiPermissionsUtil.checkNearbyDevicesPermission(
-                        topOfQueueRequest.extras.getParcelable(
-                                WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE), true,
-                        "wifi aware on ranging result");
-            }
-            if (!permissionGranted) {
-                permissionGranted =
-                        mWifiPermissionsUtil.checkCallersLocationPermission(
-                                topOfQueueRequest.callingPackage,
-                                topOfQueueRequest.callingFeatureId,
-                                topOfQueueRequest.uid, /* coarseForTargetSdkLessThanQ */ false,
-                                null) && mWifiPermissionsUtil.isLocationModeEnabled();
-            }
+            boolean permissionGranted = mWifiPermissionsUtil.checkCallersLocationPermission(
+                    topOfQueueRequest.callingPackage, topOfQueueRequest.callingFeatureId,
+                    topOfQueueRequest.uid, /* coarseForTargetSdkLessThanQ */ false, null)
+                    && mWifiPermissionsUtil.isLocationModeEnabled();
             try {
                 if (permissionGranted) {
                     List<RangingResult> finalResults = postProcessResults(topOfQueueRequest.request,
@@ -1242,7 +1193,6 @@
         public RangingRequest request;
         public IRttCallback callback;
         public boolean isCalledFromPrivilegedContext;
-        public Bundle extras;
 
         public int cmdId = 0; // uninitialized cmdId value
         public boolean dispatchedToNative = false;
diff --git a/service/java/com/android/server/wifi/scanner/WifiScanningService.java b/service/java/com/android/server/wifi/scanner/WifiScanningService.java
index d5f55f0..8ec0d15 100644
--- a/service/java/com/android/server/wifi/scanner/WifiScanningService.java
+++ b/service/java/com/android/server/wifi/scanner/WifiScanningService.java
@@ -17,12 +17,12 @@
 package com.android.server.wifi.scanner;
 
 import android.content.Context;
-import android.net.wifi.WifiContext;
 import android.os.BatteryStatsManager;
 import android.os.HandlerThread;
 import android.util.Log;
 
 import com.android.server.SystemService;
+import com.android.server.wifi.WifiContext;
 import com.android.server.wifi.WifiInjector;
 
 /**
diff --git a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
index 2c792d6..042a385 100644
--- a/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
+++ b/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java
@@ -34,7 +34,6 @@
 import android.net.wifi.WifiScanner.ScanData;
 import android.net.wifi.WifiScanner.ScanSettings;
 import android.net.wifi.WifiScanner.WifiBand;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.BadParcelableException;
 import android.os.BatteryStatsManager;
 import android.os.Binder;
@@ -70,6 +69,8 @@
 import com.android.server.wifi.scanner.ChannelHelper.ChannelCollection;
 import com.android.server.wifi.util.ArrayUtils;
 import com.android.server.wifi.util.LastCallerInfoManager;
+import com.android.server.wifi.util.ScanResultUtil;
+import com.android.server.wifi.util.WifiHandler;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.server.wifi.util.WorkSourceUtil;
 
@@ -147,20 +148,6 @@
         return b;
     }
 
-    /**
-     * See {@link WifiScanner#isScanning()}
-     * @return true if in ScanningState.
-     */
-    @Override
-    public boolean isScanning() {
-        int uid = Binder.getCallingUid();
-        if (!mWifiPermissionsUtil.checkCallersHardwareLocationPermission(uid)) {
-            throw new SecurityException("UID " + uid
-                    + " does not have hardware Location permission");
-        }
-        return mIsScanning;
-    }
-
     private void enforceNetworkStack(int uid) {
         mContext.enforcePermission(
                 Manifest.permission.NETWORK_STACK,
@@ -170,14 +157,11 @@
 
     // Helper method to check if the incoming message is for a privileged request.
     private boolean isPrivilegedMessage(int msgWhat) {
-        boolean isPrivileged = (msgWhat == WifiScanner.CMD_ENABLE
+        return (msgWhat == WifiScanner.CMD_ENABLE
                 || msgWhat == WifiScanner.CMD_DISABLE
                 || msgWhat == WifiScanner.CMD_START_PNO_SCAN
-                || msgWhat == WifiScanner.CMD_STOP_PNO_SCAN);
-        if (!SdkLevel.isAtLeastT()) {
-            isPrivileged = isPrivileged || msgWhat == WifiScanner.CMD_REGISTER_SCAN_LISTENER;
-        }
-        return isPrivileged;
+                || msgWhat == WifiScanner.CMD_STOP_PNO_SCAN
+                || msgWhat == WifiScanner.CMD_REGISTER_SCAN_LISTENER);
     }
 
     // For non-privileged requests, retrieve the bundled package name for app-op & permission
@@ -265,10 +249,10 @@
         }
     }
 
-    private class ClientHandler extends Handler {
+    private class ClientHandler extends WifiHandler {
 
         ClientHandler(String tag, Looper looper) {
-            super(looper);
+            super(tag, looper);
         }
 
         @Override
@@ -289,7 +273,7 @@
                         return;
                     }
 
-                    AsyncChannel ac = new AsyncChannel();
+                    AsyncChannel ac = mFrameworkFacade.makeWifiAsyncChannel(TAG);
                     ac.connected(mContext, this, msg.replyTo);
 
                     client = new ExternalClientInfo(msg.sendingUid, msg.replyTo, ac);
@@ -354,7 +338,7 @@
                     mBackgroundScanStateMachine.sendMessage(Message.obtain(msg));
                     mSingleScanStateMachine.sendMessage(Message.obtain(msg));
                     mPnoScanStateMachine.sendMessage(Message.obtain(msg));
-                    mLastCallerInfoManager.put(WifiManager.API_SCANNING_ENABLED, msg.arg1,
+                    mLastCallerInfoManager.put(LastCallerInfoManager.SCANNING_ENABLED, msg.arg1,
                             msg.sendingUid, msg.arg2, (String) msg.obj, true);
                     break;
                 case WifiScanner.CMD_DISABLE:
@@ -363,7 +347,7 @@
                     mBackgroundScanStateMachine.sendMessage(Message.obtain(msg));
                     mSingleScanStateMachine.sendMessage(Message.obtain(msg));
                     mPnoScanStateMachine.sendMessage(Message.obtain(msg));
-                    mLastCallerInfoManager.put(WifiManager.API_SCANNING_ENABLED, msg.arg1,
+                    mLastCallerInfoManager.put(LastCallerInfoManager.SCANNING_ENABLED, msg.arg1,
                             msg.sendingUid, msg.arg2, (String) msg.obj, false);
                     break;
                 case WifiScanner.CMD_START_BACKGROUND_SCAN:
@@ -417,7 +401,6 @@
     private ChannelHelper mChannelHelper;
     private BackgroundScanScheduler mBackgroundScheduler;
     private WifiNative.ScanSettings mPreviousSchedule;
-    private boolean mIsScanning = false;
 
     private WifiBackgroundScanStateMachine mBackgroundScanStateMachine;
     private WifiSingleScanStateMachine mSingleScanStateMachine;
@@ -547,6 +530,15 @@
         mScannerImpls.clear();
     }
 
+    /**
+     * Provide a way for unit tests to set valid log object in the WifiHandler
+     * @param log WifiLog object to assign to the clientHandler
+     */
+    @VisibleForTesting
+    public void setWifiHandlerLogForTest(WifiLog log) {
+        mClientHandler.setWifiLog(log);
+    }
+
     private WorkSource computeWorkSource(ClientInfo ci, WorkSource requestedWorkSource) {
         if (requestedWorkSource != null && !requestedWorkSource.isEmpty()) {
             return requestedWorkSource.withoutNames();
@@ -1054,7 +1046,6 @@
                 WifiStatsLog.write(WifiStatsLog.WIFI_SCAN_STATE_CHANGED,
                         uidsAndTags.first, uidsAndTags.second,
                         WifiStatsLog.WIFI_SCAN_STATE_CHANGED__STATE__ON);
-                mIsScanning = true;
             }
 
             @Override
@@ -1066,7 +1057,6 @@
                 WifiStatsLog.write(WifiStatsLog.WIFI_SCAN_STATE_CHANGED,
                         uidsAndTags.first, uidsAndTags.second,
                         WifiStatsLog.WIFI_SCAN_STATE_CHANGED__STATE__OFF);
-                mIsScanning = false;
 
                 // if any scans are still active (never got results available then indicate failure)
                 mWifiMetrics.incrementScanReturnEntry(
@@ -1272,19 +1262,10 @@
             bucketSettings.report_events = WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN;
 
             ChannelCollection channels = mChannelHelper.createChannelCollection();
-            WifiScanner.ChannelSpec[][] available6GhzChannels =
-                    mChannelHelper.getAvailableScanChannels(WifiScanner.WIFI_BAND_6_GHZ);
-            boolean are6GhzChannelsAvailable = available6GhzChannels.length > 0
-                    && available6GhzChannels[0].length > 0;
             List<WifiNative.HiddenNetwork> hiddenNetworkList = new ArrayList<>();
             for (RequestInfo<ScanSettings> entry : mPendingScans) {
                 settings.scanType = mergeScanTypes(settings.scanType, entry.settings.type);
-                if (are6GhzChannelsAvailable) {
-                    settings.enable6GhzRnr = mergeRnrSetting(
-                            settings.enable6GhzRnr, entry.settings);
-                } else {
-                    settings.enable6GhzRnr = false;
-                }
+                settings.enable6GhzRnr = mergeRnrSetting(settings.enable6GhzRnr, entry.settings);
                 channels.addChannels(entry.settings);
                 for (ScanSettings.HiddenNetwork srcNetwork : entry.settings.hiddenNetworks) {
                     WifiNative.HiddenNetwork hiddenNetwork = new WifiNative.HiddenNetwork();
diff --git a/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java b/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java
index 31eb421..d8ef62b 100644
--- a/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java
+++ b/service/java/com/android/server/wifi/scanner/WificondScannerImpl.java
@@ -21,7 +21,6 @@
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiScanner;
 import android.net.wifi.WifiScanner.WifiBandIndex;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
@@ -33,6 +32,7 @@
 import com.android.server.wifi.WifiNative;
 import com.android.server.wifi.scanner.ChannelHelper.ChannelCollection;
 import com.android.server.wifi.util.NativeUtil;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.wifi.resources.R;
 
 import java.io.FileDescriptor;
@@ -54,8 +54,8 @@
     private static final boolean DBG = false;
 
     public static final String TIMEOUT_ALARM_TAG = TAG + " Scan Timeout";
-    // Default number of networks that can be specified to wificond per scan request
-    public static final int DEFAULT_NUM_HIDDEN_NETWORK_IDS_PER_SCAN = 16;
+    // Max number of networks that can be specified to wificond per scan request
+    public static final int MAX_HIDDEN_NETWORK_IDS_PER_SCAN = 16;
 
     private static final int SCAN_BUFFER_CAPACITY = 10;
     private static final int MAX_APS_PER_SCAN = 32;
@@ -75,8 +75,6 @@
     private ArrayList<ScanDetail> mNativePnoScanResults;
     private WifiScanner.ScanData mLatestSingleScanResult =
             new WifiScanner.ScanData(0, 0, new ScanResult[0]);
-    private int mMaxNumScanSsids = -1;
-    private int mNextHiddenNetworkScanId = 0;
 
     // Settings for the currently running single scan, null if no scan active
     private LastScanSettings mLastScanSettings = null;
@@ -120,8 +118,6 @@
             cancelScanTimeout();
             reportScanFailure();
             stopHwPnoScan();
-            mMaxNumScanSsids = -1;
-            mNextHiddenNetworkScanId = 0;
             mLastScanSettings = null; // finally clear any active scan
             mLastPnoScanSettings = null; // finally clear any active scan
             mWifiMonitor.deregisterHandler(getIfaceName(),
@@ -176,38 +172,11 @@
 
             List<String> hiddenNetworkSSIDSet = new ArrayList<>();
             if (settings.hiddenNetworks != null) {
-                boolean executeRoundRobin = true;
-                int maxNumScanSsids = mMaxNumScanSsids;
-                if (maxNumScanSsids <= 0) {
-                    // Subtract 1 to account for the wildcard/broadcast probe request that
-                    // wificond adds to the scan set.
-                    mMaxNumScanSsids = mWifiNative.getMaxSsidsPerScan(getIfaceName()) - 1;
-                    if (mMaxNumScanSsids > 0) {
-                        maxNumScanSsids = mMaxNumScanSsids;
-                    } else {
-                        maxNumScanSsids = DEFAULT_NUM_HIDDEN_NETWORK_IDS_PER_SCAN;
-                        executeRoundRobin = false;
-                    }
+                int numHiddenNetworks =
+                        Math.min(settings.hiddenNetworks.length, MAX_HIDDEN_NETWORK_IDS_PER_SCAN);
+                for (int i = 0; i < numHiddenNetworks; i++) {
+                    hiddenNetworkSSIDSet.add(settings.hiddenNetworks[i].ssid);
                 }
-                int numHiddenNetworksPerScan =
-                        Math.min(settings.hiddenNetworks.length, maxNumScanSsids);
-                if (numHiddenNetworksPerScan == settings.hiddenNetworks.length
-                        || mNextHiddenNetworkScanId >= settings.hiddenNetworks.length
-                        || !executeRoundRobin) {
-                    mNextHiddenNetworkScanId = 0;
-                }
-                if (DBG) {
-                    Log.d(TAG, "Scanning for " + numHiddenNetworksPerScan + " out of "
-                            + settings.hiddenNetworks.length + " total hidden networks");
-                    Log.d(TAG, "Scan hidden networks starting at id=" + mNextHiddenNetworkScanId);
-                }
-
-                int id = mNextHiddenNetworkScanId;
-                for (int i = 0; i < numHiddenNetworksPerScan; i++, id++) {
-                    hiddenNetworkSSIDSet.add(
-                            settings.hiddenNetworks[id % settings.hiddenNetworks.length].ssid);
-                }
-                mNextHiddenNetworkScanId = id % settings.hiddenNetworks.length;
             }
             mLastScanSettings = new LastScanSettings(
                     mClock.getElapsedSinceBootNanos(),
diff --git a/service/java/com/android/server/wifi/util/ApConfigUtil.java b/service/java/com/android/server/wifi/util/ApConfigUtil.java
index f94eb51..5846a74 100644
--- a/service/java/com/android/server/wifi/util/ApConfigUtil.java
+++ b/service/java/com/android/server/wifi/util/ApConfigUtil.java
@@ -26,7 +26,6 @@
 import android.net.wifi.SoftApConfiguration;
 import android.net.wifi.SoftApConfiguration.BandType;
 import android.net.wifi.SoftApInfo;
-import android.net.wifi.WifiAvailableChannel;
 import android.net.wifi.WifiClient;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiManager;
@@ -34,7 +33,6 @@
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.SparseArray;
-import android.util.SparseIntArray;
 
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.WifiNative;
@@ -42,8 +40,6 @@
 import com.android.wifi.resources.R;
 
 import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -51,9 +47,7 @@
 import java.util.Objects;
 import java.util.Random;
 import java.util.Set;
-import java.util.StringJoiner;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
+
 
 /**
  * Provide utility functions for updating soft AP related configuration.
@@ -74,15 +68,6 @@
 
     /* Random number generator used for AP channel selection. */
     private static final Random sRandom = new Random();
-    private static boolean sVerboseLoggingEnabled = false;
-
-    /**
-     * Enable or disable verbose logging
-     * @param verboseEnabled true if verbose logging is enabled
-     */
-    public static void enableVerboseLogging(boolean verboseEnabled) {
-        sVerboseLoggingEnabled = verboseEnabled;
-    }
 
     /**
      * Valid Global Operating classes in each wifi band
@@ -98,37 +83,6 @@
     }
 
     /**
-     * Converts a SoftApConfiguration.BAND_* constant to a meaningful String
-     */
-    public static String bandToString(int band) {
-        StringJoiner sj = new StringJoiner(" & ");
-        sj.setEmptyValue("unspecified");
-        if ((band & SoftApConfiguration.BAND_2GHZ) != 0) {
-            sj.add("2Ghz");
-        }
-        band &= ~SoftApConfiguration.BAND_2GHZ;
-
-        if ((band & SoftApConfiguration.BAND_5GHZ) != 0) {
-            sj.add("5Ghz");
-        }
-        band &= ~SoftApConfiguration.BAND_5GHZ;
-
-        if ((band & SoftApConfiguration.BAND_6GHZ) != 0) {
-            sj.add("6Ghz");
-        }
-        band &= ~SoftApConfiguration.BAND_6GHZ;
-
-        if ((band & SoftApConfiguration.BAND_60GHZ) != 0) {
-            sj.add("60Ghz");
-        }
-        band &= ~SoftApConfiguration.BAND_60GHZ;
-        if (band != 0) {
-            return "Invalid band";
-        }
-        return sj.toString();
-    }
-
-    /**
      * Helper function to get the band corresponding to the operating class.
      *
      * @param operatingClass Global operating class.
@@ -235,20 +189,6 @@
     }
 
     /**
-     * Add 5Ghz to target band when 5Ghz SoftAp supported.
-     *
-     * @param targetBand The band is needed to add 5GHz band.
-     * @return The band includes 5Ghz when 5G SoftAp supported.
-     */
-    public static @BandType int append5GToBandIf5GSupported(@BandType int targetBand,
-            Context context) {
-        if (isBandSupported(SoftApConfiguration.BAND_5GHZ, context)) {
-            return targetBand | SoftApConfiguration.BAND_5GHZ;
-        }
-        return targetBand;
-    }
-
-    /**
      * Checks if band is a valid combination of {link  SoftApConfiguration#BandType} values
      */
     public static boolean isBandValid(@BandType int band) {
@@ -286,16 +226,32 @@
      */
     public static boolean isBandSupported(@BandType int apBand, Context context) {
         if (!isBandValid(apBand)) {
-            Log.e(TAG, "Invalid SoftAp band " + apBand);
+            Log.e(TAG, "Invalid SoftAp band. ");
             return false;
         }
 
-        for (int b : SoftApConfiguration.BAND_TYPES) {
-            if (containsBand(apBand, b) && !isSoftApBandSupported(context, b)) {
-                Log.e(TAG, "Can not start softAp with band " + bandToString(b)
-                        + " not supported.");
-                return false;
-            }
+        if (containsBand(apBand, SoftApConfiguration.BAND_2GHZ)
+                && !isSoftAp24GhzSupported(context)) {
+            Log.e(TAG, "Can not start softAp with 2GHz band, not supported.");
+            return false;
+        }
+
+        if (containsBand(apBand, SoftApConfiguration.BAND_5GHZ)
+                && !isSoftAp5GhzSupported(context)) {
+            Log.e(TAG, "Can not start softAp with 5GHz band, not supported.");
+            return false;
+        }
+
+        if (containsBand(apBand, SoftApConfiguration.BAND_6GHZ)
+                && !isSoftAp6GhzSupported(context)) {
+            Log.e(TAG, "Can not start softAp with 6GHz band, not supported.");
+            return false;
+        }
+
+        if (containsBand(apBand, SoftApConfiguration.BAND_60GHZ)
+                && !isSoftAp60GhzSupported(context)) {
+            Log.e(TAG, "Can not start softAp with 6GHz band, not supported.");
+            return false;
         }
 
         return true;
@@ -363,87 +319,12 @@
         return unsafeFreqs;
     }
 
-    private static List<Integer> getConfiguredChannelList(Resources resources, @BandType int band) {
-        switch (band) {
-            case SoftApConfiguration.BAND_2GHZ:
-                return convertStringToChannelList(resources.getString(
-                        R.string.config_wifiSoftap2gChannelList));
-            case SoftApConfiguration.BAND_5GHZ:
-                return convertStringToChannelList(resources.getString(
-                        R.string.config_wifiSoftap5gChannelList));
-            case SoftApConfiguration.BAND_6GHZ:
-                return convertStringToChannelList(resources.getString(
-                        R.string.config_wifiSoftap6gChannelList));
-            case SoftApConfiguration.BAND_60GHZ:
-                return convertStringToChannelList(resources.getString(
-                        R.string.config_wifiSoftap60gChannelList));
-            default:
-                return null;
-        }
-    }
-
-    private static List<Integer> addDfsChannelsIfNeeded(List<Integer> regulatoryList,
-            @WifiScanner.WifiBand int scannerBand, WifiNative wifiNative, Resources resources,
-            boolean inFrequencyMHz) {
-        // Add DFS channels to the supported channel list if the device supports SoftAp
-        // operation in the DFS channel.
-        if (resources.getBoolean(R.bool.config_wifiSoftapAcsIncludeDfs)
-                && scannerBand == WifiScanner.WIFI_BAND_5_GHZ) {
-            int[] dfs5gBand = wifiNative.getChannelsForBand(
-                    WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY);
-            for (int freq : dfs5gBand) {
-                final int freqOrChan = inFrequencyMHz
-                        ? freq : ScanResult.convertFrequencyMhzToChannelIfSupported(freq);
-                if (!regulatoryList.contains(freqOrChan)) {
-                    regulatoryList.add(freqOrChan);
-                }
-            }
-        }
-        return regulatoryList;
-    }
-
-    private static List<Integer> getWifiCondAvailableChannelsForBand(
-            @WifiScanner.WifiBand int scannerBand, WifiNative wifiNative, Resources resources,
-            boolean inFrequencyMHz) {
-        List<Integer> regulatoryList = new ArrayList<Integer>();
-        // Get the allowed list of channel frequencies in MHz from wificond
-        int[] regulatoryArray = wifiNative.getChannelsForBand(scannerBand);
-        for (int freq : regulatoryArray) {
-            regulatoryList.add(inFrequencyMHz
-                    ? freq : ScanResult.convertFrequencyMhzToChannelIfSupported(freq));
-        }
-        return addDfsChannelsIfNeeded(regulatoryList, scannerBand, wifiNative, resources,
-                inFrequencyMHz);
-    }
-
-    private static List<Integer> getHalAvailableChannelsForBand(
-            @WifiScanner.WifiBand int scannerBand, WifiNative wifiNative, Resources resources,
-            boolean inFrequencyMHz) {
-        // Try vendor HAL API to get the usable channel list.
-        List<WifiAvailableChannel> usableChannelList = wifiNative.getUsableChannels(
-                scannerBand,
-                WifiAvailableChannel.OP_MODE_SAP,
-                WifiAvailableChannel.FILTER_REGULATORY);
-        if (usableChannelList == null) {
-            // If HAL doesn't support getUsableChannels then return null
-            return null;
-        }
-        List<Integer> regulatoryList = usableChannelList.stream()
-                .map(ch -> inFrequencyMHz
-                        ? ch.getFrequencyMhz()
-                        : ScanResult.convertFrequencyMhzToChannelIfSupported(
-                                ch.getFrequencyMhz()))
-                .collect(Collectors.toList());
-        return addDfsChannelsIfNeeded(regulatoryList, scannerBand, wifiNative, resources,
-                inFrequencyMHz);
-    }
-
     /**
      * Get channels or frequencies for band that are allowed by both regulatory
      * and OEM configuration.
      *
      * @param band to get channels for
-     * @param wifiNative reference used to get regulatory restrictions.
+     * @param wifiNative reference used to get regulatory restrictionsimport java.util.Arrays;
      * @param resources used to get OEM restrictions
      * @param inFrequencyMHz true to convert channel to frequency.
      * @return A list of frequencies that are allowed, null on error.
@@ -455,32 +336,53 @@
             return null;
         }
 
-        int scannerBand = apConfig2wifiScannerBand(band);
-        List<Integer> regulatoryList = null;
-        boolean useWifiCond = false;
-        // Check if vendor HAL API for getting usable channels is available. If HAL doesn't support
-        // the API it returns null list, in that case we retrieve the list from wificond.
-        if (!wifiNative.isHalSupported()) {
-            // HAL is not supported, fallback to wificond
-            useWifiCond = true;
-        } else {
-            if (!wifiNative.isHalStarted()) {
-                // HAL is not started, return null
+        List<Integer> configuredList;
+        int scannerBand;
+        switch (band) {
+            case SoftApConfiguration.BAND_2GHZ:
+                configuredList = convertStringToChannelList(resources.getString(
+                        R.string.config_wifiSoftap2gChannelList));
+                scannerBand = WifiScanner.WIFI_BAND_24_GHZ;
+                break;
+            case SoftApConfiguration.BAND_5GHZ:
+                configuredList = convertStringToChannelList(resources.getString(
+                        R.string.config_wifiSoftap5gChannelList));
+                scannerBand = WifiScanner.WIFI_BAND_5_GHZ;
+                break;
+            case SoftApConfiguration.BAND_6GHZ:
+                configuredList = convertStringToChannelList(resources.getString(
+                        R.string.config_wifiSoftap6gChannelList));
+                scannerBand = WifiScanner.WIFI_BAND_6_GHZ;
+                break;
+            case SoftApConfiguration.BAND_60GHZ:
+                configuredList = convertStringToChannelList(resources.getString(
+                        R.string.config_wifiSoftap60gChannelList));
+                scannerBand = WifiScanner.WIFI_BAND_60_GHZ;
+                break;
+            default:
                 return null;
-            }
-            regulatoryList = getHalAvailableChannelsForBand(scannerBand, wifiNative, resources,
-                    inFrequencyMHz);
-            if (regulatoryList == null) {
-                // HAL API not supported by HAL, fallback to wificond
-                useWifiCond = true;
+        }
+
+        // Get the allowed list of channel frequencies in MHz
+        int[] regulatoryArray = wifiNative.getChannelsForBand(scannerBand);
+        List<Integer> regulatoryList = new ArrayList<Integer>();
+        for (int freq : regulatoryArray) {
+            regulatoryList.add(inFrequencyMHz
+                    ? freq : ScanResult.convertFrequencyMhzToChannelIfSupported(freq));
+        }
+
+        // Add DFS channels to the supported channel list if the device supports SoftAp operation
+        // in the DFS channel.
+        if (resources.getBoolean(R.bool.config_wifiSoftapAcsIncludeDfs)
+                && scannerBand == WifiScanner.WIFI_BAND_5_GHZ) {
+            regulatoryArray = wifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY);
+            for (int freq : regulatoryArray) {
+                regulatoryList.add(inFrequencyMHz
+                        ? freq : ScanResult.convertFrequencyMhzToChannelIfSupported(freq));
             }
         }
-        if (useWifiCond) {
-            regulatoryList = getWifiCondAvailableChannelsForBand(scannerBand, wifiNative, resources,
-                    inFrequencyMHz);
-        }
-        List<Integer> configuredList = getConfiguredChannelList(resources, band);
-        if (configuredList == null || configuredList.isEmpty() || regulatoryList == null) {
+
+        if (configuredList == null || configuredList.isEmpty()) {
             return regulatoryList;
         }
         List<Integer> filteredList = new ArrayList<Integer>();
@@ -495,23 +397,19 @@
                 filteredList.add(channel);
             }
         }
-        if (sVerboseLoggingEnabled) {
-            Log.d(TAG, "Filtered channel list for band " + bandToString(band) + " : "
-                    + filteredList.stream().map(Object::toString).collect(Collectors.joining(",")));
-        }
         return filteredList;
     }
 
     /**
      * Return a channel frequency for AP setup based on the frequency band.
      * @param apBand one or combination of the values of SoftApConfiguration.BAND_*.
+     * @param wifiNative reference used to collect regulatory restrictions.
      * @param coexManager reference used to get unsafe channels to avoid for coex.
      * @param resources the resources to use to get configured allowed channels.
-     * @param capability soft AP capability
      * @return a valid channel frequency on success, -1 on failure.
      */
-    public static int chooseApChannel(int apBand, @NonNull CoexManager coexManager,
-            @NonNull Resources resources, SoftApCapability capability) {
+    public static int chooseApChannel(int apBand, @NonNull WifiNative wifiNative,
+            @NonNull CoexManager coexManager, @NonNull Resources resources) {
         if (!isBandValid(apBand)) {
             Log.e(TAG, "Invalid band: " + apBand);
             return -1;
@@ -531,14 +429,11 @@
             if ((apBand & band) == 0) {
                 continue;
             }
-            int[] availableChannels = capability.getSupportedChannelList(band);
-            if (availableChannels == null || availableChannels.length == 0) {
+            final List<Integer> availableFreqs =
+                    getAvailableChannelFreqsForBand(band, wifiNative, resources, true);
+            if (availableFreqs == null || availableFreqs.isEmpty()) {
                 continue;
             }
-            final List<Integer> availableFreqs =
-                    Arrays.stream(availableChannels).boxed()
-                            .map(ch -> convertChannelToFrequency(ch, band))
-                            .collect(Collectors.toList());
             // Separate the available freqs by safe and unsafe.
             List<Integer> availableSafeFreqs = new ArrayList<>();
             List<Integer> availableUnsafeFreqs = new ArrayList<>();
@@ -586,7 +481,7 @@
      * Remove unavailable bands from the input band and return the resulting
      * (remaining) available bands. Unavailable bands are those which don't have channels available.
      *
-     * @param capability SoftApCapability which indicates supported channel list.
+     * @param capability SoftApCapability which inidcates supported channel list.
      * @param targetBand The target band which plan to enable
      * @param coexManager reference to CoexManager
      *
@@ -629,80 +524,22 @@
     public static @BandType int removeUnsupportedBands(Context context,
             @NonNull int band) {
         int availableBand = band;
-        for (int b : SoftApConfiguration.BAND_TYPES) {
-            if (((band & b) != 0) && !isSoftApBandSupported(context, b)) {
-                availableBand &= ~b;
-            }
+        if (((band & SoftApConfiguration.BAND_2GHZ) != 0) && !isSoftAp24GhzSupported(context)) {
+            availableBand &= ~SoftApConfiguration.BAND_2GHZ;
+        }
+        if (((band & SoftApConfiguration.BAND_5GHZ) != 0) && !isSoftAp5GhzSupported(context)) {
+            availableBand &= ~SoftApConfiguration.BAND_5GHZ;
+        }
+        if (((band & SoftApConfiguration.BAND_6GHZ) != 0) && !isSoftAp6GhzSupported(context)) {
+            availableBand &= ~SoftApConfiguration.BAND_6GHZ;
+        }
+        if (((band & SoftApConfiguration.BAND_60GHZ) != 0) && !isSoftAp60GhzSupported(context)) {
+            availableBand &= ~SoftApConfiguration.BAND_60GHZ;
         }
         return availableBand;
     }
 
     /**
-     * Check if security type is restricted for operation in 6GHz band
-     * As per WFA specification for 6GHz operation, the following security types are not allowed to
-     * be used in 6GHz band:
-     *   - OPEN
-     *   - WPA2-Personal
-     *   - WPA3-SAE-Transition
-     *   - WPA3-OWE-Transition
-     *
-     * @param type security type to check on
-     *
-     * @return true if security type is restricted for operation in 6GHz band, false otherwise
-     */
-    public static boolean isSecurityTypeRestrictedFor6gBand(
-            @SoftApConfiguration.SecurityType int type) {
-        switch(type) {
-            case SoftApConfiguration.SECURITY_TYPE_OPEN:
-            case SoftApConfiguration.SECURITY_TYPE_WPA2_PSK:
-            case SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION:
-            case SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION:
-                return true;
-        }
-        return false;
-    }
-
-    /**
-     * Remove {@link SoftApConfiguration#BAND_6GHZ} if multiple bands are configured
-     * as a mask when security type is restricted to operate in this band.
-     *
-     * @param config The current {@link SoftApConfiguration}.
-     *
-     * @return the updated SoftApConfiguration.
-     */
-    public static SoftApConfiguration remove6gBandForUnsupportedSecurity(
-            SoftApConfiguration config) {
-        SoftApConfiguration.Builder builder = new SoftApConfiguration.Builder(config);
-
-        if (config.getBands().length == 1) {
-            int configuredBand = config.getBand();
-            if ((configuredBand & SoftApConfiguration.BAND_6GHZ) != 0
-                    && isSecurityTypeRestrictedFor6gBand(config.getSecurityType())) {
-                Log.i(TAG, "remove BAND_6G if multiple bands are configured "
-                        + "as a mask since security type is restricted");
-                builder.setBand(configuredBand & ~SoftApConfiguration.BAND_6GHZ);
-            }
-        } else if (SdkLevel.isAtLeastS()) {
-            SparseIntArray channels = config.getChannels();
-            SparseIntArray newChannels = new SparseIntArray(channels.size());
-            if (isSecurityTypeRestrictedFor6gBand(config.getSecurityType())) {
-                for (int i = 0; i < channels.size(); i++) {
-                    int band = channels.keyAt(i);
-                    if ((band & SoftApConfiguration.BAND_6GHZ) != 0) {
-                        Log.i(TAG, "remove BAND_6G if multiple bands are configured "
-                                + "as a mask when security type is restricted");
-                        band &= ~SoftApConfiguration.BAND_6GHZ;
-                    }
-                    newChannels.put(band, channels.valueAt(i));
-                }
-                builder.setChannels(newChannels);
-            }
-        }
-
-        return builder.build();
-    }
-
-    /**
      * Update AP band and channel based on the provided country code and band.
      * This will also set
      * @param wifiNative reference to WifiNative
@@ -710,7 +547,6 @@
      * @param resources the resources to use to get configured allowed channels.
      * @param countryCode country code
      * @param config configuration to update
-     * @param capability soft ap capability
      * @return an integer result code
      */
     public static int updateApChannelConfig(WifiNative wifiNative,
@@ -719,7 +555,7 @@
             String countryCode,
             SoftApConfiguration.Builder configBuilder,
             SoftApConfiguration config,
-            SoftApCapability capability) {
+            boolean acsEnabled) {
         /* Use default band and channel for device without HAL. */
         if (!wifiNative.isHalStarted()) {
             configBuilder.setChannel(DEFAULT_AP_CHANNEL, DEFAULT_AP_BAND);
@@ -732,33 +568,18 @@
             Log.e(TAG, "5GHz band is not allowed without country code");
             return ERROR_GENERIC;
         }
-        if (!capability.areFeaturesSupported(SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD)) {
-            /* Select a channel if it is not specified and ACS is not enabled */
-            if (config.getChannel() == 0) {
-                int freq = chooseApChannel(config.getBand(), coexManager, resources,
-                        capability);
-                if (freq == -1) {
-                    /* We're not able to get channel from wificond. */
-                    Log.e(TAG, "Failed to get available channel.");
-                    return ERROR_NO_CHANNEL;
-                }
-                configBuilder.setChannel(
-                        ScanResult.convertFrequencyMhzToChannelIfSupported(freq),
-                        convertFrequencyToBand(freq));
-            }
 
-            if (SdkLevel.isAtLeastT()) {
-                /* remove list of allowed channels since they only apply to ACS */
-                if (sVerboseLoggingEnabled) {
-                    Log.i(TAG, "Ignoring Allowed ACS channels since ACS is not supported.");
-                }
-                configBuilder.setAllowedAcsChannels(SoftApConfiguration.BAND_2GHZ,
-                        new int[] {});
-                configBuilder.setAllowedAcsChannels(SoftApConfiguration.BAND_5GHZ,
-                        new int[] {});
-                configBuilder.setAllowedAcsChannels(SoftApConfiguration.BAND_6GHZ,
-                        new int[] {});
+        /* Select a channel if it is not specified and ACS is not enabled */
+        if ((config.getChannel() == 0) && !acsEnabled) {
+            int freq = chooseApChannel(config.getBand(), wifiNative, coexManager, resources);
+            if (freq == -1) {
+                /* We're not able to get channel from wificond. */
+                Log.e(TAG, "Failed to get available channel.");
+                return ERROR_NO_CHANNEL;
             }
+            configBuilder.setChannel(
+                    ScanResult.convertFrequencyMhzToChannelIfSupported(freq),
+                    convertFrequencyToBand(freq));
         }
 
         return SUCCESS;
@@ -779,9 +600,6 @@
             @NonNull WifiConfiguration wifiConfig) {
         SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder();
         try {
-            // WifiConfiguration#SSID uses a formatted string with double quotes for UTF-8 and no
-            // quotes for hexadecimal. But to support legacy behavior, we need to continue
-            // setting the entire string with quotes as the UTF-8 SSID.
             configBuilder.setSsid(wifiConfig.SSID);
             if (wifiConfig.getAuthType() == WifiConfiguration.KeyMgmt.WPA2_PSK) {
                 configBuilder.setPassphrase(wifiConfig.preSharedKey,
@@ -849,46 +667,26 @@
             features |= SoftApCapability.SOFTAP_FEATURE_MAC_ADDRESS_CUSTOMIZATION;
         }
 
-        if (isSoftApBandSupported(context, SoftApConfiguration.BAND_2GHZ)) {
+        if (isSoftAp24GhzSupported(context)) {
             Log.d(TAG, "Update Softap capability, add 2.4G support");
             features |= SoftApCapability.SOFTAP_FEATURE_BAND_24G_SUPPORTED;
         }
 
-        if (isSoftApBandSupported(context, SoftApConfiguration.BAND_5GHZ)) {
+        if (isSoftAp5GhzSupported(context)) {
             Log.d(TAG, "Update Softap capability, add 5G support");
             features |= SoftApCapability.SOFTAP_FEATURE_BAND_5G_SUPPORTED;
         }
 
-        if (isSoftApBandSupported(context, SoftApConfiguration.BAND_6GHZ)) {
+        if (isSoftAp6GhzSupported(context)) {
             Log.d(TAG, "Update Softap capability, add 6G support");
             features |= SoftApCapability.SOFTAP_FEATURE_BAND_6G_SUPPORTED;
         }
 
-        if (isSoftApBandSupported(context, SoftApConfiguration.BAND_60GHZ)) {
+        if (isSoftAp60GhzSupported(context)) {
             Log.d(TAG, "Update Softap capability, add 60G support");
             features |= SoftApCapability.SOFTAP_FEATURE_BAND_60G_SUPPORTED;
         }
 
-        if (isIeee80211axSupported(context)) {
-            Log.d(TAG, "Update Softap capability, add ax support");
-            features |= SoftApCapability.SOFTAP_FEATURE_IEEE80211_AX;
-        }
-
-        if (isIeee80211beSupported(context)) {
-            Log.d(TAG, "Update Softap capability, add be support");
-            features |= SoftApCapability.SOFTAP_FEATURE_IEEE80211_BE;
-        }
-
-        if (isOweTransitionSupported(context)) {
-            Log.d(TAG, "Update Softap capability, add OWE Transition feature support");
-            features |= SoftApCapability.SOFTAP_FEATURE_WPA3_OWE_TRANSITION;
-        }
-
-        if (isOweSupported(context)) {
-            Log.d(TAG, "Update Softap capability, add OWE feature support");
-            features |= SoftApCapability.SOFTAP_FEATURE_WPA3_OWE;
-        }
-
         SoftApCapability capability = new SoftApCapability(features);
         int hardwareSupportedMaxClient = context.getResources().getInteger(
                 R.integer.config_wifiHardwareSoftapMaxClientCount);
@@ -901,28 +699,6 @@
     }
 
     /**
-     * Helper function to get device support 802.11 AX on Soft AP or not
-     *
-     * @param context the caller context used to get value from resource file.
-     * @return true if supported, false otherwise.
-     */
-    public static boolean isIeee80211axSupported(@NonNull Context context) {
-        return context.getResources().getBoolean(
-                    R.bool.config_wifiSoftapIeee80211axSupported);
-    }
-
-    /**
-     * Helper function to get device support 802.11 BE on Soft AP or not
-     *
-     * @param context the caller context used to get value from resource file.
-     * @return true if supported, false otherwise.
-     */
-    public static boolean isIeee80211beSupported(@NonNull Context context) {
-        return context.getResources().getBoolean(
-                    R.bool.config_wifiSoftapIeee80211beSupported);
-    }
-
-    /**
      * Helper function to get device support AP MAC randomization or not.
      *
      * @param context the caller context used to get value from resource file.
@@ -1000,33 +776,51 @@
     }
 
     /**
-     * Helper function to get whether or not Soft AP support on particular band.
+     * Helper function to get whether or not 2.4G Soft AP support.
      *
      * @param context the caller context used to get value from resource file.
-     * @param band the band soft AP to operate on.
      * @return true if supported, false otherwise.
      */
-    public static boolean isSoftApBandSupported(@NonNull Context context, @BandType int band) {
-        switch (band) {
-            case SoftApConfiguration.BAND_2GHZ:
-                return context.getResources().getBoolean(R.bool.config_wifi24ghzSupport)
-                        && context.getResources().getBoolean(
-                        R.bool.config_wifiSoftap24ghzSupported);
-            case SoftApConfiguration.BAND_5GHZ:
-                return context.getResources().getBoolean(R.bool.config_wifi5ghzSupport)
-                        && context.getResources().getBoolean(
-                        R.bool.config_wifiSoftap5ghzSupported);
-            case SoftApConfiguration.BAND_6GHZ:
-                return context.getResources().getBoolean(R.bool.config_wifi6ghzSupport)
-                        && context.getResources().getBoolean(
-                        R.bool.config_wifiSoftap6ghzSupported);
-            case SoftApConfiguration.BAND_60GHZ:
-                return context.getResources().getBoolean(R.bool.config_wifi60ghzSupport)
-                        && context.getResources().getBoolean(
-                        R.bool.config_wifiSoftap60ghzSupported);
-            default:
-                return false;
-        }
+    public static boolean isSoftAp24GhzSupported(@NonNull Context context) {
+        return context.getResources().getBoolean(R.bool.config_wifi24ghzSupport)
+                && context.getResources().getBoolean(
+                R.bool.config_wifiSoftap24ghzSupported);
+    }
+
+    /**
+     * Helper function to get whether or not 5G Soft AP support.
+     *
+     * @param context the caller context used to get value from resource file.
+     * @return true if supported, false otherwise.
+     */
+    public static boolean isSoftAp5GhzSupported(@NonNull Context context) {
+        return context.getResources().getBoolean(R.bool.config_wifi5ghzSupport)
+                && context.getResources().getBoolean(
+                R.bool.config_wifiSoftap5ghzSupported);
+    }
+
+    /**
+     * Helper function to get whether or not 6G Soft AP support
+     *
+     * @param context the caller context used to get value from resource file.
+     * @return true if supported, false otherwise.
+     */
+    public static boolean isSoftAp6GhzSupported(@NonNull Context context) {
+        return context.getResources().getBoolean(R.bool.config_wifi6ghzSupport)
+                && context.getResources().getBoolean(
+                R.bool.config_wifiSoftap6ghzSupported);
+    }
+
+    /**
+     * Helper function to get whether or not 60G Soft AP support.
+     *
+     * @param context the caller context used to get value from resource file.
+     * @return true if supported, false otherwise.
+     */
+    public static boolean isSoftAp60GhzSupported(@NonNull Context context) {
+        return context.getResources().getBoolean(R.bool.config_wifi60ghzSupport)
+                && context.getResources().getBoolean(
+                R.bool.config_wifiSoftap60ghzSupported);
     }
 
     /**
@@ -1041,40 +835,6 @@
                 R.bool.config_wifiSoftApDynamicCountryCodeUpdateSupported);
     }
 
-
-    /**
-     * Helper function to get whether or not restart Soft AP required when country code changed.
-     *
-     * @param context the caller context used to get value from resource file.
-     * @return true if supported, false otherwise.
-     */
-    public static boolean isSoftApRestartRequiredWhenCountryCodeChanged(@NonNull Context context) {
-        return context.getResources().getBoolean(
-                R.bool.config_wifiForcedSoftApRestartWhenCountryCodeChanged);
-    }
-
-    /**
-     * Helper function to get OWE-Transition is support or not.
-     *
-     * @param context the caller context used to get value from resource file.
-     * @return true if supported, false otherwise.
-     */
-    public static boolean isOweTransitionSupported(@NonNull Context context) {
-        return context.getResources().getBoolean(
-                R.bool.config_wifiSoftapOweTransitionSupported);
-    }
-
-    /**
-     * Helper function to get OWE is support or not.
-     *
-     * @param context the caller context used to get value from resource file.
-     * @return true if supported, false otherwise.
-     */
-    public static boolean isOweSupported(@NonNull Context context) {
-        return context.getResources().getBoolean(
-                R.bool.config_wifiSoftapOweSupported);
-    }
-
     /**
      * Helper function for comparing two SoftApConfiguration.
      *
@@ -1085,7 +845,7 @@
      */
     public static boolean checkConfigurationChangeNeedToRestart(
             SoftApConfiguration currentConfig, SoftApConfiguration newConfig) {
-        return !Objects.equals(currentConfig.getWifiSsid(), newConfig.getWifiSsid())
+        return !Objects.equals(currentConfig.getSsid(), newConfig.getSsid())
                 || !Objects.equals(currentConfig.getBssid(), newConfig.getBssid())
                 || currentConfig.getSecurityType() != newConfig.getSecurityType()
                 || !Objects.equals(currentConfig.getPassphrase(), newConfig.getPassphrase())
@@ -1125,9 +885,11 @@
         // The bands length should always 1 in R. Adding SdkLevel.isAtLeastS for lint check only.
         if (config.getBands().length > 1 && SdkLevel.isAtLeastS()) {
             int[] bands = config.getBands();
-            if ((bands[0] & SoftApConfiguration.BAND_60GHZ) != 0
+            if ((bands[0] & SoftApConfiguration.BAND_6GHZ) != 0
+                    || (bands[0] & SoftApConfiguration.BAND_60GHZ) != 0
+                    || (bands[1] & SoftApConfiguration.BAND_6GHZ) != 0
                     || (bands[1] & SoftApConfiguration.BAND_60GHZ) != 0) {
-                Log.d(TAG, "Error, dual APs doesn't support on 60GHz");
+                Log.d(TAG, "Error, dual APs doesn't support on 6GHz and 60GHz");
                 return false;
             }
             if (!capability.areFeaturesSupported(SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD)
@@ -1145,31 +907,44 @@
      * Check if need to provide freq range for ACS.
      *
      * @param band in SoftApConfiguration.BandType
-     * @param context the caller context used to get values from resource file
-     * @param config the used SoftApConfiguration
-     *
      * @return true when freq ranges is needed, otherwise false.
      */
-    public static boolean isSendFreqRangesNeeded(@BandType int band, Context context,
-            SoftApConfiguration config) {
-        // Fist we check if one of the selected bands has restrictions in the overlay file or in the
-        // provided SoftApConfiguration.
+    public static boolean isSendFreqRangesNeeded(@BandType int band, Context context) {
+        // Fist we check if one of the selected bands has restrictions in the overlay file.
         // Note,
         //   - We store the config string here for future use, hence we need to check all bands.
-        //   - If there is no restrictions on channels, we store the full band
-        for (int b : SoftApConfiguration.BAND_TYPES) {
-            if ((band & b) != 0) {
-                List<Integer> configuredList = getConfiguredChannelList(context.getResources(), b);
-                if (configuredList != null && !configuredList.isEmpty()) {
-                    // If any of the selected band has restriction in the overlay file return true.
-                    return true;
-                }
-                if (SdkLevel.isAtLeastT() && config.getAllowedAcsChannels(b).length != 0) {
-                    return true;
-                }
+        //   - If there is no OEM restriction, we store the full band
+        boolean retVal = false;
+        String channelList = "";
+        if ((band & SoftApConfiguration.BAND_2GHZ) != 0) {
+            channelList =
+                context.getResources().getString(R.string.config_wifiSoftap2gChannelList);
+            if (!TextUtils.isEmpty(channelList)) {
+                retVal = true;
             }
         }
 
+        if ((band & SoftApConfiguration.BAND_5GHZ) != 0) {
+            channelList =
+                context.getResources().getString(R.string.config_wifiSoftap5gChannelList);
+            if (!TextUtils.isEmpty(channelList)) {
+                retVal = true;
+            }
+        }
+
+        if ((band & SoftApConfiguration.BAND_6GHZ) != 0) {
+            channelList =
+                context.getResources().getString(R.string.config_wifiSoftap6gChannelList);
+            if (!TextUtils.isEmpty(channelList)) {
+                retVal = true;
+            }
+        }
+
+        // If any of the selected band has restriction in the overlay file, we return true.
+        if (retVal) {
+            return true;
+        }
+
         // Next, if only one of 5G or 6G is selected, then we need freqList to separate them
         // Since there is no other way.
         if (((band & SoftApConfiguration.BAND_5GHZ) != 0)
@@ -1186,107 +961,6 @@
     }
 
     /**
-     * Collect a List of allowed channels for ACS operations on a selected band
-     *
-     * @param band on which channel list are required
-     * @param oemConfigString Configuration string from OEM resource file.
-     *        An empty string means all channels on this band are allowed
-     * @param callerConfig allowed chnannels as required by the caller
-     *
-     * @return List of channel numbers that meet both criteria
-     */
-    public static List<Integer> collectAllowedAcsChannels(@BandType int band,
-            String oemConfigString, int[] callerConfig) {
-
-        // Convert the OEM config string into a set of channel numbers
-        Set<Integer> allowedChannelSet = getOemAllowedChannels(band, oemConfigString);
-
-        // Update the allowed channels with user configuration
-        allowedChannelSet.retainAll(getCallerAllowedChannels(band, callerConfig));
-
-        return new ArrayList<Integer>(allowedChannelSet);
-    }
-
-    private static Set<Integer> getSetForAllChannelsInBand(@BandType int band) {
-        switch(band) {
-            case SoftApConfiguration.BAND_2GHZ:
-                return IntStream.rangeClosed(
-                        ScanResult.BAND_24_GHZ_FIRST_CH_NUM,
-                        ScanResult.BAND_24_GHZ_LAST_CH_NUM)
-                        .boxed()
-                        .collect(Collectors.toSet());
-
-            case SoftApConfiguration.BAND_5GHZ:
-                return IntStream.rangeClosed(
-                        ScanResult.BAND_5_GHZ_FIRST_CH_NUM,
-                        ScanResult.BAND_5_GHZ_LAST_CH_NUM)
-                        .boxed()
-                        .collect(Collectors.toSet());
-
-            case SoftApConfiguration.BAND_6GHZ:
-                return IntStream.rangeClosed(
-                        ScanResult.BAND_6_GHZ_FIRST_CH_NUM,
-                        ScanResult.BAND_6_GHZ_LAST_CH_NUM)
-                        .boxed()
-                        .collect(Collectors.toSet());
-            default:
-                Log.e(TAG, "Invalid band: " + bandToString(band));
-                return Collections.emptySet();
-        }
-    }
-
-    private static Set<Integer> getOemAllowedChannels(@BandType int band, String oemConfigString) {
-        if (TextUtils.isEmpty(oemConfigString)) {
-            // Empty string means all channels are allowed in this band
-            return getSetForAllChannelsInBand(band);
-        }
-
-        // String is not empty, parsing it
-        Set<Integer> allowedChannelsOem = new HashSet<>();
-
-        for (String channelRange : oemConfigString.split(",")) {
-            try {
-                if (channelRange.contains("-")) {
-                    String[] channels  = channelRange.split("-");
-                    if (channels.length != 2) {
-                        Log.e(TAG, "Unrecognized channel range, length is " + channels.length);
-                        continue;
-                    }
-                    int start = Integer.parseInt(channels[0].trim());
-                    int end = Integer.parseInt(channels[1].trim());
-                    if (start > end) {
-                        Log.e(TAG, "Invalid channel range, from " + start + " to " + end);
-                        continue;
-                    }
-
-                    allowedChannelsOem.addAll(IntStream.rangeClosed(start, end)
-                            .boxed().collect(Collectors.toSet()));
-                } else if (!TextUtils.isEmpty(channelRange)) {
-                    int channel = Integer.parseInt(channelRange.trim());
-                    allowedChannelsOem.add(channel);
-                }
-            } catch (NumberFormatException e) {
-                // Ignore malformed value
-                Log.e(TAG, "Malformed channel value detected: " + e);
-                continue;
-            }
-        }
-
-        return allowedChannelsOem;
-    }
-
-    private static Set<Integer> getCallerAllowedChannels(@BandType int band, int[] callerConfig) {
-        if (callerConfig.length == 0) {
-            // Empty set means all channels are allowed in this band
-            return getSetForAllChannelsInBand(band);
-        }
-
-        // Otherwise return the caller set as is
-        return IntStream.of(callerConfig).boxed()
-                .collect(Collectors.toCollection(HashSet::new));
-    }
-
-    /**
      * Deep copy for object Map<String, SoftApInfo>
      */
     public static Map<String, SoftApInfo> deepCopyForSoftApInfoMap(
@@ -1320,46 +994,4 @@
         }
         return deepCopyMap;
     }
-
-
-    /**
-     * Observer the available channel from native layer (vendor HAL if getUsableChannels is
-     * supported, or wificond if not supported) and update the SoftApCapability
-     *
-     * @param softApCapability the current softap capability
-     * @param context the caller context used to get value from resource file
-     * @param wifiNative reference used to collect regulatory restrictions.     *
-     * @return updated soft AP capability
-     */
-    public static SoftApCapability updateSoftApCapabilityWithAvailableChannelList(
-            @NonNull SoftApCapability softApCapability, @NonNull Context context,
-            @NonNull WifiNative wifiNative) {
-        SoftApCapability newSoftApCapability = new SoftApCapability(softApCapability);
-        List<Integer> supportedChannelList = null;
-
-        for (int band : SoftApConfiguration.BAND_TYPES) {
-            if (isSoftApBandSupported(context, band)) {
-                supportedChannelList = getAvailableChannelFreqsForBand(
-                        band, wifiNative, context.getResources(), false);
-                if (supportedChannelList != null) {
-                    newSoftApCapability.setSupportedChannelList(
-                            band,
-                            supportedChannelList.stream().mapToInt(Integer::intValue).toArray());
-                }
-            }
-        }
-        return newSoftApCapability;
-    }
-
-    /**
-     * Helper function to check if security type can ignore password.
-     *
-     * @param security type for SoftApConfiguration.
-     * @return true for Open/Owe-Transition SoftAp AKM.
-     */
-    public static boolean isNonPasswordAP(int security) {
-        return (security == SoftApConfiguration.SECURITY_TYPE_OPEN
-                || security == SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION
-                || security == SoftApConfiguration.SECURITY_TYPE_WPA3_OWE);
-    }
 }
diff --git a/service/java/com/android/server/wifi/util/CertificateSubjectInfo.java b/service/java/com/android/server/wifi/util/CertificateSubjectInfo.java
deleted file mode 100644
index e140ab5..0000000
--- a/service/java/com/android/server/wifi/util/CertificateSubjectInfo.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi.util;
-
-import android.net.wifi.util.HexEncoding;
-import android.text.TextUtils;
-import android.util.Log;
-
-import java.nio.charset.StandardCharsets;
-
-/** Utilities for parsing information from a certificate subject. */
-public class CertificateSubjectInfo {
-    private static final String TAG = "CertificateSubjectInfo";
-    private static final String COMMON_NAME_PREFIX = "CN=";
-    private static final String ORGANIZATION_PREFIX = "O=";
-    private static final String LOCATION_PREFIX = "L=";
-    private static final String STATE_PREFIX = "ST=";
-    private static final String COUNTRY_PREFIX = "C=";
-    // This is hex-encoded string.
-    private static final String EMAILADDRESS_OID_PREFIX = "1.2.840.113549.1.9.1=#1614";
-
-    public String rawData = "";
-    public String commonName = "";
-    public String organization = "";
-    public String location = "";
-    public String state = "";
-    public String country = "";
-    public String email = "";
-
-    private CertificateSubjectInfo() {
-    }
-
-    /**
-     * Parse the subject of a certificate.
-     *
-     * @param subject the subject string
-     * @return CertificateSubjectInfo object if the subject is valid; otherwise, null.
-     */
-    public static CertificateSubjectInfo parse(String subject) {
-        CertificateSubjectInfo info = new CertificateSubjectInfo();
-        info.rawData = unescapeString(subject);
-        if (null == info.rawData) return null;
-
-        String[] parts = info.rawData.split(",");
-        for (String s : parts) {
-            if (s.startsWith(COMMON_NAME_PREFIX)) {
-                info.commonName = s.substring(COMMON_NAME_PREFIX.length());
-            } else if (s.startsWith(ORGANIZATION_PREFIX)) {
-                info.organization = s.substring(ORGANIZATION_PREFIX.length());
-            } else if (s.startsWith(LOCATION_PREFIX)) {
-                info.location = s.substring(LOCATION_PREFIX.length());
-            } else if (s.startsWith(STATE_PREFIX)) {
-                info.state = s.substring(STATE_PREFIX.length());
-            } else if (s.startsWith(COUNTRY_PREFIX)) {
-                info.country = s.substring(COUNTRY_PREFIX.length());
-            } else if (s.startsWith(EMAILADDRESS_OID_PREFIX)) {
-                String hexStr = s.substring(EMAILADDRESS_OID_PREFIX.length());
-                try {
-                    info.email = new String(
-                            HexEncoding.decode(hexStr.toCharArray(), false),
-                            StandardCharsets.UTF_8);
-                } catch (IllegalArgumentException ex) {
-                    Log.w(TAG, "failed to decode email: " + ex);
-                }
-            } else {
-                Log.d(TAG, "Unhandled subject info: " + s);
-            }
-        }
-        return TextUtils.isEmpty(info.commonName) ? null : info;
-    }
-
-    /**
-     * The characters in a subject string will be escaped based on RFC2253.
-     * To restore the original string, this method unescapes escaped
-     * characters.
-     */
-    private static String unescapeString(String s) {
-        final String escapees = ",=+<>#;\"\\";
-        StringBuilder res = new StringBuilder();
-        char[] chars = s.toCharArray();
-        boolean isEscaped = false;
-        for (char c: chars) {
-            if (c == '\\' && !isEscaped) {
-                isEscaped = true;
-                continue;
-            }
-            // An illegal escaped character is founded.
-            if (isEscaped && escapees.indexOf(c) == -1) {
-                Log.d(TAG, "Unable to unescape string: " + s);
-                return null;
-            }
-            res.append(c);
-            isEscaped = false;
-        }
-        // There is a trailing '\' without a escaped character.
-        if (isEscaped) {
-            Log.d(TAG, "Unable to unescape string: " + s);
-            return null;
-        }
-        return res.toString();
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("Raw=").append(rawData)
-            .append(", Common Name=").append(commonName)
-            .append(", Organization=").append(organization)
-            .append(", Location=").append(location)
-            .append(", State=").append(state)
-            .append(", Country=").append(country)
-            .append(", Contact=").append(email);
-        return sb.toString();
-    }
-}
diff --git a/framework/java/android/net/wifi/util/Environment.java b/service/java/com/android/server/wifi/util/Environment.java
similarity index 62%
rename from framework/java/android/net/wifi/util/Environment.java
rename to service/java/com/android/server/wifi/util/Environment.java
index f2e8266..a423d55 100644
--- a/framework/java/android/net/wifi/util/Environment.java
+++ b/service/java/com/android/server/wifi/util/Environment.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * 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.
@@ -14,14 +14,11 @@
  * limitations under the License.
  */
 
-package android.net.wifi.util;
+package com.android.server.wifi.util;
 
 import android.content.ApexEnvironment;
 import android.content.pm.ApplicationInfo;
-import android.os.Build;
 import android.os.UserHandle;
-import android.sysprop.VndkProperties;
-import android.util.Log;
 
 import java.io.File;
 
@@ -36,8 +33,6 @@
      */
     private static final String WIFI_APEX_NAME = "com.android.wifi";
 
-    private static final String TAG = "Environment";
-
     /**
      * The path where the Wifi apex is mounted.
      * Current value = "/apex/com.android.wifi"
@@ -67,27 +62,4 @@
     public static boolean isAppInWifiApex(ApplicationInfo appInfo) {
         return appInfo.sourceDir.startsWith(WIFI_APEX_PATH);
     }
-
-    /**
-     * Return whether the VNDK version of the vendor partition is newer than the given API level.
-     * If the property is set to non-integer value, this means the vendor partition is using
-     * current API level and true is returned.
-     *
-     * Note: reference from com.android.compatibility.common.util.PropertyUtil;
-     */
-    public static boolean isVndkApiLevelNewerThan(int apiLevel) {
-        final String version = VndkProperties.vendor_vndk_version().orElse("");
-        int vndkApiLevel = 0;
-        if (!version.isEmpty()) {
-            try {
-                vndkApiLevel = Integer.parseInt(version);
-            } catch (NumberFormatException ignore) {
-                if (!("REL".equals(Build.VERSION.CODENAME))) {
-                    Log.d(TAG, "developer build, bypass the vndk version check");
-                    return true;
-                }
-            }
-        }
-        return vndkApiLevel > apiLevel;
-    }
 }
diff --git a/service/java/com/android/server/wifi/util/InformationElementUtil.java b/service/java/com/android/server/wifi/util/InformationElementUtil.java
index 4457806..ebcf379 100644
--- a/service/java/com/android/server/wifi/util/InformationElementUtil.java
+++ b/service/java/com/android/server/wifi/util/InformationElementUtil.java
@@ -15,8 +15,6 @@
  */
 package com.android.server.wifi.util;
 
-import android.net.MacAddress;
-import android.net.wifi.MloLink;
 import android.net.wifi.ScanResult;
 import android.net.wifi.ScanResult.InformationElement;
 import android.net.wifi.WifiAnnotations.Cipher;
@@ -25,7 +23,6 @@
 import android.net.wifi.WifiScanner;
 import android.net.wifi.nl80211.NativeScanResult;
 import android.net.wifi.nl80211.WifiNl80211Manager;
-import android.net.wifi.util.HexEncoding;
 import android.util.Log;
 
 import com.android.server.wifi.ByteBufferReader;
@@ -37,7 +34,6 @@
 import java.nio.ByteBuffer;
 import java.nio.ByteOrder;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.BitSet;
 import java.util.List;
 import java.util.Locale;
@@ -45,27 +41,6 @@
 public class InformationElementUtil {
     private static final String TAG = "InformationElementUtil";
     private static final boolean DBG = false;
-
-    /** Converts InformationElement to hex string */
-    public static String toHexString(InformationElement e) {
-        StringBuilder sb = new StringBuilder();
-        sb.append(HexEncoding.encode(new byte[]{(byte) e.id}));
-        if (e.id == InformationElement.EID_EXTENSION_PRESENT) {
-            sb.append(HexEncoding.encode(new byte[]{(byte) e.idExt}));
-        }
-        sb.append(HexEncoding.encode(new byte[]{(byte) e.bytes.length}));
-        sb.append(HexEncoding.encode(e.bytes));
-        return sb.toString();
-    }
-
-    /** Parses information elements from hex string */
-    public static InformationElement[] parseInformationElements(String data) {
-        if (data == null) {
-            return new InformationElement[0];
-        }
-        return parseInformationElements(HexEncoding.decode(data));
-    }
-
     public static InformationElement[] parseInformationElements(byte[] bytes) {
         if (bytes == null) {
             return new InformationElement[0];
@@ -152,30 +127,6 @@
     }
 
     /**
-     * Parse and retrieve all Vendor Specific Information Elements from the list of IEs.
-     *
-     * @param ies List of IEs to retrieve from
-     * @return List of {@link Vsa}
-     */
-    public static List<Vsa> getVendorSpecificIE(InformationElement[] ies) {
-        List<Vsa> vsas = new ArrayList<>();
-        if (ies != null) {
-            for (InformationElement ie : ies) {
-                if (ie.id == InformationElement.EID_VSA) {
-                    try {
-                        Vsa vsa = new Vsa();
-                        vsa.from(ie);
-                        vsas.add(vsa);
-                    } catch (RuntimeException e) {
-                        Log.e(TAG, "Failed to parse Vendor Specific IE: " + e.getMessage());
-                    }
-                }
-            }
-        }
-        return vsas;
-    }
-
-    /**
      * Parse and retrieve the Interworking information element from the list of IEs.
      *
      * @param ies List of IEs to retrieve from
@@ -221,159 +172,6 @@
         }
     }
 
-    /**
-     * Rnr: represents the Reduced Neighbor Report (RNR) IE
-     * As described by IEEE 802.11 Specification Section 9.4.2.170
-     */
-    public static class Rnr {
-        private static final int TBTT_INFO_COUNT_OFFSET = 0;
-        private static final int TBTT_INFO_COUNT_MASK = 0xF0;
-        private static final int TBTT_INFO_COUNT_SHIFT = 4;
-        private static final int TBTT_INFO_LENGTH_OFFSET = 1;
-        private static final int TBTT_INFO_OP_CLASS_OFFSET = 2;
-        private static final int TBTT_INFO_CHANNEL_OFFSET = 3;
-        private static final int TBTT_INFO_SET_START_OFFSET = 4;
-        private static final int MLD_ID_START_OFFSET = 0;
-        private static final int LINK_ID_START_OFFSET = 1;
-        private static final int LINK_ID_MASK = 0x0F;
-
-        private boolean mPresent = false;
-        private List<MloLink> mAffiliatedMloLinks = new ArrayList<>();
-
-        /**
-         * Returns whether the RNR Information Element is present.
-         */
-        public boolean isPresent() {
-            return mPresent;
-        }
-
-        /**
-         * Returns the list of the affiliated MLO links
-         */
-        public List<MloLink> getAffiliatedMloLinks() {
-            return mAffiliatedMloLinks;
-        }
-
-        /**
-         * Parse RNR Operation IE
-         *
-         * RNR format as described in IEEE 802.11 specs, Section 9.4.2.170
-         *
-         *              | ElementID | Length | Neighbor AP Information Fields |
-         * Octets:            1          1             variable
-         *
-         *
-         * Where Neighbor AP Information Fields is one or more Neighbor AP Information Field as,
-         *
-         *               | Header | Operating Class | Channel | TBTT Information Set |
-         * Octets:            2            1            1           variable
-         *
-         *
-         * The Header subfield is described as follows,
-         *
-         *            | Type  | Filtered AP | Reserved | Count | Length |
-         * Bits:         2          1           1          4       8
-         *
-         *
-         * Information Set is one or more TBTT Information fields, which is described as,
-         *
-         *         | Offset | BSSID  | Short-SSID | BSS Params | 20MHz PSD | MLD Params|
-         * Octets:     1      0 or 6    0 or 4        0 or 1      0 or 1      0 or 3
-         *
-         *
-         * The MLD Params are described as,
-         *       | MLD ID | Link ID | BSS Change Count | Reserved |
-         * Bits:     8        4              8              4
-         *
-         * Note: InformationElement.bytes has 'Element ID' and 'Length'
-         *       stripped off already
-         *
-         */
-        public void from(InformationElement ie) {
-            if (ie.id != InformationElement.EID_RNR) {
-                throw new IllegalArgumentException("Element id is not RNR");
-            }
-
-            int startOffset = 0;
-            while (ie.bytes.length > startOffset + TBTT_INFO_SET_START_OFFSET) {
-                int tbttInfoCount =
-                        ie.bytes[startOffset + TBTT_INFO_COUNT_OFFSET] & TBTT_INFO_COUNT_MASK;
-                tbttInfoCount >>= TBTT_INFO_COUNT_SHIFT;
-                tbttInfoCount++;
-
-                int tbttInfoLen =
-                        ie.bytes[startOffset + TBTT_INFO_LENGTH_OFFSET] & Constants.BYTE_MASK;
-                int tbttInfoStartOffset = startOffset + TBTT_INFO_SET_START_OFFSET;
-
-                // Only handle TBTT info with MLD Info
-                if (tbttInfoLen == 4 || tbttInfoLen >= 16) {
-                    // Make sure length allows for this TBTT Info
-                    if (ie.bytes.length < startOffset + TBTT_INFO_SET_START_OFFSET
-                            + tbttInfoLen * tbttInfoCount) {
-                        if (DBG) {
-                            Log.w(TAG, "Invalid RNR len, not enough for TBTT Info: "
-                                    + ie.bytes.length + "/" + tbttInfoLen + "/" + tbttInfoCount);
-                        }
-                        // Skipping parsing of the IE
-                        return;
-                    }
-
-                    int mldStartOffset;
-                    int bssidOffset;
-
-                    if (tbttInfoLen == 4) {
-                        mldStartOffset = 1;
-                        bssidOffset = -1;
-                    } else {
-                        mldStartOffset = 13;
-                        bssidOffset = 1;
-                    }
-
-                    int opClass = ie.bytes[startOffset + TBTT_INFO_OP_CLASS_OFFSET]
-                            & Constants.BYTE_MASK;
-                    int channel = ie.bytes[startOffset + TBTT_INFO_CHANNEL_OFFSET]
-                            & Constants.BYTE_MASK;
-                    int band = ScanResult.getBandFromOpClass(opClass, channel);
-                    if (band == WifiScanner.WIFI_BAND_UNSPECIFIED) {
-                        if (DBG) {
-                            Log.w(TAG, "Invalid op class/channel in RNR TBTT Info: "
-                                    + opClass + "/" + channel);
-                        }
-                        // Skipping parsing of the IE
-                        return;
-                    }
-                    for (int i = 0; i < tbttInfoCount; i++) {
-                        int mldId = ie.bytes[tbttInfoStartOffset + mldStartOffset
-                                + MLD_ID_START_OFFSET] & Constants.BYTE_MASK;
-                        if (mldId == 0) {
-                            //This is an affiliated link
-                            int linkId = ie.bytes[tbttInfoStartOffset + mldStartOffset
-                                    + LINK_ID_START_OFFSET] & LINK_ID_MASK;
-                            MloLink link = new MloLink();
-                            link.setLinkId(linkId);
-                            link.setBand(band);
-                            link.setChannel(channel);
-                            if (bssidOffset != -1) {
-                                int macAddressStart = tbttInfoStartOffset + bssidOffset;
-                                link.setApMacAddress(MacAddress.fromBytes(
-                                        Arrays.copyOfRange(ie.bytes,
-                                                macAddressStart, macAddressStart + 6)));
-                            }
-
-                            mAffiliatedMloLinks.add(link);
-                        }
-                        tbttInfoStartOffset += tbttInfoLen;
-                    }
-                }
-
-                startOffset += TBTT_INFO_SET_START_OFFSET + (tbttInfoCount * tbttInfoLen);
-            }
-
-            // Done with parsing
-            mPresent = true;
-        }
-    }
-
     public static class HtOperation {
         private static final int HT_OPERATION_IE_LEN = 22;
         private boolean mPresent = false;
@@ -688,32 +486,6 @@
     }
 
     /**
-     * EhtOperation: represents the EHT Operation IE
-     */
-    public static class EhtOperation {
-        private boolean mPresent = false;
-
-        /**
-         * Returns whether the EHT Information Element is present.
-         */
-        public boolean isPresent() {
-            return mPresent;
-        }
-
-        /** Parse EHT Operation IE */
-        public void from(InformationElement ie) {
-            if (ie.id != InformationElement.EID_EXTENSION_PRESENT
-                    || ie.idExt != InformationElement.EID_EXT_EHT_OPERATION) {
-                throw new IllegalArgumentException("Element id is not EHT_OPERATION");
-            }
-
-            mPresent = true;
-
-            //TODO put more functionality for parsing the IE
-        }
-    }
-
-    /**
      * HtCapabilities: represents the HT Capabilities IE
      */
     public static class HtCapabilities {
@@ -830,277 +602,6 @@
         }
     }
 
-    /**
-     * EhtCapabilities: represents the EHT Capabilities IE
-     */
-    public static class EhtCapabilities {
-        private boolean mPresent = false;
-        /** Returns whether HE Capabilities IE is present */
-        public boolean isPresent() {
-            return mPresent;
-        }
-
-        /** Parse EHT Capabilities IE */
-        public void from(InformationElement ie) {
-            if (ie.id != InformationElement.EID_EXTENSION_PRESENT
-                    || ie.idExt != InformationElement.EID_EXT_EHT_CAPABILITIES) {
-                throw new IllegalArgumentException("Element id is not EHT_CAPABILITIES: " + ie.id);
-            }
-            mPresent = true;
-
-            //TODO Add code to parse the IE
-        }
-    }
-
-    /**
-     * MultiLink: represents the Multi-Link IE
-     * as described in IEEE 802.11be Specification Section 9.4.2.312
-     */
-    public static class MultiLink {
-        private static final int CONTROL_FIELD_LEN = 2;
-        private static final int BASIC_COMMON_INFO_FIELD_MIN_LEN = 7;
-        private static final int BASIC_LINK_INFO_FIELD_MIN_LEN = 0;
-        private static final int BASIC_IE_MIN_LEN = CONTROL_FIELD_LEN
-                + BASIC_COMMON_INFO_FIELD_MIN_LEN
-                + BASIC_LINK_INFO_FIELD_MIN_LEN;
-
-        // Control field constants
-        private static final int IE_TYPE_OFFSET = 0;
-        private static final int IE_TYPE_MASK = 0x07;
-        public static final int TYPE_BASIC = 0;
-        public static final int LINK_ID_PRESENT_OFFSET = 0;
-        public static final int LINK_ID_PRESENT_MASK = 0x10;
-
-
-        // Common info field constants
-        private static final int COMMON_FIELD_START_INDEX = CONTROL_FIELD_LEN;
-        private static final int BASIC_IE_COMMON_INFO_LEN_OFFSET = 0;
-        private static final int BASIC_IE_COMMON_MLD_MAC_ADDRESS_OFFSET = 1;
-        private static final int BASIC_IE_COMMOM_LINK_ID_OFFSET = 7;
-        private static final int BASIC_IE_COMMOM_LINK_ID_MASK = 0x0F;
-
-        // Per-STA sub-element constants
-        private static final int PER_STA_SUB_ELEMENT_ID = 0;
-        private static final int PER_STA_SUB_ELEMENT_MIN_LEN = 5;
-        private static final int PER_STA_SUB_ELEMENT_LINK_ID_OFFSET = 2;
-        private static final int PER_STA_SUB_ELEMENT_LINK_ID_MASK = 0x0F;
-        private static final int PER_STA_SUB_ELEMENT_STA_INFO_OFFSET = 4;
-        private static final int PER_STA_SUB_ELEMENT_MAC_ADDRESS_PRESENT_OFFSET = 2;
-        private static final int PER_STA_SUB_ELEMENT_MAC_ADDRESS_PRESENT_MASK = 0x20;
-        private static final int PER_STA_SUB_ELEMENT_STA_INFO_MAC_ADDRESS_OFFSET = 1;
-
-        private boolean mPresent = false;
-        private int mLinkId = MloLink.INVALID_MLO_LINK_ID;
-        private MacAddress mMldMacAddress = null;
-        private List<MloLink> mAffiliatedLinks = new ArrayList<>();
-
-        /** Returns whether Multi-Link IE is present */
-        public boolean isPresent() {
-            return mPresent;
-        }
-
-        /** Returns the MLD MAC Address */
-        public MacAddress getMldMacAddress() {
-            return mMldMacAddress;
-        }
-
-        /** Return the link id */
-        public int getLinkId() {
-            return mLinkId;
-        }
-
-        /** Return the affiliated links */
-        public List<MloLink> getAffiliatedLinks() {
-            return new ArrayList<MloLink>(mAffiliatedLinks);
-        }
-
-        /**
-         * Parse Common Info field in Multi-Link Operation IE
-         *
-         * Common Info filed as described in IEEE 802.11 specs, Section 9.4.2.312,
-         *
-         *        | Len | MLD Address | Link Id | BSS Change count | MedSync | EML Cap | MLD Cap |
-         * Octets:   1        6          0 or 1        0 or 1         0 or 2    0 or 2    0 or 2
-         *
-         */
-        private int parseCommonInfoField(InformationElement ie) {
-            int commonInfoLength = ie.bytes[COMMON_FIELD_START_INDEX
-                    + BASIC_IE_COMMON_INFO_LEN_OFFSET] & Constants.BYTE_MASK;
-            if (commonInfoLength < BASIC_COMMON_INFO_FIELD_MIN_LEN) {
-                if (DBG) {
-                    Log.w(TAG, "Invalid Common Info field length: " + commonInfoLength);
-                }
-                // Skipping parsing of the IE
-                return 0;
-            }
-
-            boolean isLinkIdInfoPresent = (ie.bytes[LINK_ID_PRESENT_OFFSET]
-                    & LINK_ID_PRESENT_MASK) != 0;
-            if (isLinkIdInfoPresent) {
-                if (ie.bytes.length < BASIC_IE_MIN_LEN + 1 /*Link Id info */) {
-                    if (DBG) {
-                        Log.w(TAG, "Invalid Multi-Link IE len: " + ie.bytes.length);
-                    }
-                    // Skipping parsing of the IE
-                    return 0;
-                }
-
-                mLinkId = ie.bytes[COMMON_FIELD_START_INDEX
-                        + BASIC_IE_COMMOM_LINK_ID_OFFSET] & BASIC_IE_COMMOM_LINK_ID_MASK;
-            }
-
-            int macAddressStart = COMMON_FIELD_START_INDEX + BASIC_IE_COMMON_MLD_MAC_ADDRESS_OFFSET;
-            mMldMacAddress = MacAddress.fromBytes(
-                    Arrays.copyOfRange(ie.bytes, macAddressStart, macAddressStart + 6));
-
-            return commonInfoLength;
-        }
-
-        /**
-         * Parse Link Info field in Multi-Link Operation IE
-         *
-         * Link Info filed as described in IEEE 802.11 specs, Section 9.4.2.312,
-         *
-         *        | ID | Len | STA Control | STA Info | STA Profile |
-         * Octets:  1     1        2         variable    variable
-         *
-         * where STA Control subfield is described as,
-         *
-         *      | LinkId | Complete | MAC | Beacon Interval | DTIM | NSTR Link | NSTR Bitmap | R |
-         * Bits:    4          1       1          1             1        1            1        6
-         *
-         */
-        private boolean parseLinkInfoField(InformationElement ie, int startOffset) {
-            // Check if Link Info field is present
-            while (ie.bytes.length >= startOffset + PER_STA_SUB_ELEMENT_MIN_LEN) {
-                int subElementId = ie.bytes[startOffset] & Constants.BYTE_MASK;
-                int subElementLen = ie.bytes[startOffset + 1] & Constants.BYTE_MASK;
-                if (ie.bytes.length < startOffset + subElementLen) {
-                    if (DBG) {
-                        Log.w(TAG, "Invalid sub-element length: " + subElementLen);
-                    }
-                    // Skipping parsing of the IE
-                    return false;
-                }
-                if (subElementId != PER_STA_SUB_ELEMENT_ID) {
-                    // Skip this subelement, could be an unsupported one
-                    startOffset += subElementLen;
-                    continue;
-                }
-
-                MloLink link = new MloLink();
-                link.setLinkId(ie.bytes[startOffset + PER_STA_SUB_ELEMENT_LINK_ID_OFFSET]
-                        & PER_STA_SUB_ELEMENT_LINK_ID_MASK);
-
-                int staInfoLength = ie.bytes[startOffset + PER_STA_SUB_ELEMENT_STA_INFO_OFFSET]
-                        & Constants.BYTE_MASK;
-                if (subElementLen < PER_STA_SUB_ELEMENT_STA_INFO_OFFSET + staInfoLength) {
-                    if (DBG) {
-                        Log.w(TAG, "Invalid sta info length: " + staInfoLength);
-                    }
-                    // Skipping parsing of the IE
-                    return false;
-                }
-
-                // Check if MAC Address is present
-                if ((ie.bytes[startOffset + PER_STA_SUB_ELEMENT_MAC_ADDRESS_PRESENT_OFFSET]
-                        & PER_STA_SUB_ELEMENT_MAC_ADDRESS_PRESENT_MASK) != 0) {
-                    if (staInfoLength < 1 /*length*/ + 6 /*mac address*/) {
-                        if (DBG) {
-                            Log.w(TAG, "Invalid sta info length: " + staInfoLength);
-                        }
-                        // Skipping parsing of the IE
-                        return false;
-                    }
-
-                    int macAddressOffset = startOffset + PER_STA_SUB_ELEMENT_STA_INFO_OFFSET
-                            + PER_STA_SUB_ELEMENT_STA_INFO_MAC_ADDRESS_OFFSET;
-                    link.setApMacAddress(MacAddress.fromBytes(Arrays.copyOfRange(ie.bytes,
-                            macAddressOffset, macAddressOffset + 6)));
-                }
-
-                mAffiliatedLinks.add(link);
-
-                // Done with this sub-element
-                startOffset += subElementLen;
-            }
-
-            return true;
-        }
-
-        /**
-         * Parse Multi-Link Operation IE
-         *
-         * Multi-Link IE format as described in IEEE 802.11 specs, Section 9.4.2.312
-         *
-         *              | ElementID | Length | ExtendedID | Control | Common Info | Link Info |
-         * Octets:            1          1         1          2        Variable     variable
-         *
-         *
-         * Where Control field is described as,
-         *
-         *         | Type | Reserved | Presence Bitmap |
-         * Bits:      3        1            12
-         *
-         * Where the Presence Bitmap subfield is described as,
-         *
-         *        | LinkId | BSS change count | MedSync | EML cap | MLD cap | Reserved |
-         * Bits:      1            1               1         1         1         7
-         *
-         *
-         *
-         * Note: InformationElement.bytes has 'Element ID', 'Length', and 'Extended ID'
-         *       stripped off already
-         *
-         */
-        public void from(InformationElement ie) {
-            if (ie.id != InformationElement.EID_EXTENSION_PRESENT
-                    || ie.idExt != InformationElement.EID_EXT_MULTI_LINK) {
-                throw new IllegalArgumentException("Element id is not Multi-Link: " + ie.id);
-            }
-
-            // Make sure the byte array length is at least the Control field size
-            if (ie.bytes.length < CONTROL_FIELD_LEN) {
-                if (DBG) {
-                    Log.w(TAG, "Invalid Multi-Link IE len: " + ie.bytes.length);
-                }
-                // Skipping parsing of the IE
-                return;
-            }
-
-            // Check on IE type
-            // Note only the BASIC type is allowed to be received from AP
-            int type = ie.bytes[IE_TYPE_OFFSET] & IE_TYPE_MASK;
-            if (type != TYPE_BASIC) {
-                if (DBG) {
-                    Log.w(TAG, "Invalid/Unsupported Multi-Link IE type: " + type);
-                }
-                // Skipping parsing of the IE
-                return;
-            }
-
-            // Check length
-            if (ie.bytes.length < BASIC_IE_MIN_LEN) {
-                if (DBG) {
-                    Log.w(TAG, "Invalid Multi-Link IE len: " + ie.bytes.length);
-                }
-                // Skipping parsing of the IE
-                return;
-            }
-
-            int commonInfoLength = parseCommonInfoField(ie);
-            if (commonInfoLength == 0) {
-                return;
-            }
-
-            if (!parseLinkInfoField(ie, CONTROL_FIELD_LEN + commonInfoLength)) {
-                return;
-            }
-
-            mPresent = true;
-        }
-    }
-
     private static int parseMaxNumberSpatialStreamsFromMcsMap(int mcsMap) {
         int maxNumberSpatialStreams = 1;
         for (int i = 8; i >= 1; --i) {
@@ -1222,7 +723,6 @@
         public boolean IsOceCapable = false;
         public int mboAssociationDisallowedReasonCode =
                 MboOceConstants.MBO_OCE_ATTRIBUTE_NOT_PRESENT;
-        public byte[] oui;
 
         private void parseVsaMboOce(InformationElement ie) {
             ByteBuffer data = ByteBuffer.wrap(ie.bytes).order(ByteOrder.LITTLE_ENDIAN);
@@ -1321,7 +821,6 @@
                 return;
             }
 
-            oui = Arrays.copyOfRange(ie.bytes, 0, 3);
             int oui = (((ie.bytes[0] & Constants.BYTE_MASK) << 16)
                        | ((ie.bytes[1] & Constants.BYTE_MASK) << 8)
                        |  ((ie.bytes[2] & Constants.BYTE_MASK)));
@@ -1422,7 +921,6 @@
         private static final int RSN_OSEN = 0x019a6f50;
         private static final int RSN_AKM_EAP_FILS_SHA256 = 0x0eac0f00;
         private static final int RSN_AKM_EAP_FILS_SHA384 = 0x0fac0f00;
-        private static final int RSN_AKM_DPP = 0x029a6f50;
 
         private static final int WPA_CIPHER_NONE = 0x00f25000;
         private static final int WPA_CIPHER_TKIP = 0x02f25000;
@@ -1542,9 +1040,6 @@
                         case RSN_AKM_EAP_FILS_SHA384:
                             rsnKeyManagement.add(ScanResult.KEY_MGMT_FILS_SHA384);
                             break;
-                        case RSN_AKM_DPP:
-                            rsnKeyManagement.add(ScanResult.KEY_MGMT_DPP);
-                            break;
                         default:
                             rsnKeyManagement.add(ScanResult.KEY_MGMT_UNKNOWN);
                             break;
@@ -1872,8 +1367,6 @@
                     return "EAP-FILS-SHA256";
                 case ScanResult.KEY_MGMT_FILS_SHA384:
                     return "EAP-FILS-SHA384";
-                case ScanResult.KEY_MGMT_DPP:
-                    return "DPP";
                 default:
                     return "?";
             }
@@ -2050,7 +1543,7 @@
     }
 
     /**
-     * This util class determines the 802.11 standard (a/b/g/n/ac/ax/be) being used
+     * This util class determines the 802.11 standard (a/b/g/n/ac/ax) being used
      */
     public static class WifiMode {
         public static final int MODE_UNDEFINED = 0; // Unknown/undefined
@@ -2060,18 +1553,15 @@
         public static final int MODE_11N = 4;       // 802.11n
         public static final int MODE_11AC = 5;      // 802.11ac
         public static final int MODE_11AX = 6;      // 802.11ax
-        public static final int MODE_11BE = 7;      // 802.11be
         //<TODO> add support for 802.11ad and be more selective instead of defaulting to 11A
 
         /**
-         * Use frequency, max supported rate, and the existence of EHT, HE, VHT, HT & ERP fields in
+         * Use frequency, max supported rate, and the existence of HE, VHT, HT & ERP fields in scan
          * scan result to determine the 802.11 Wifi standard being used.
          */
-        public static int determineMode(int frequency, int maxRate, boolean foundEht,
-                boolean foundHe, boolean foundVht, boolean foundHt, boolean foundErp) {
-            if (foundEht) {
-                return MODE_11BE;
-            } else if (foundHe) {
+        public static int determineMode(int frequency, int maxRate, boolean foundHe,
+                boolean foundVht, boolean foundHt, boolean foundErp) {
+            if (foundHe) {
                 return MODE_11AX;
             } else if (!ScanResult.is24GHz(frequency) && foundVht) {
                 // Do not include subset of VHT on 2.4 GHz vendor extension
@@ -2093,7 +1583,7 @@
         }
 
         /**
-         * Map the wifiMode integer to its type, and output as String MODE_11<A/B/G/N/AC/AX/BE>
+         * Map the wifiMode integer to its type, and output as String MODE_11<A/B/G/N/AC>
          */
         public static String toString(int mode) {
             switch(mode) {
@@ -2109,8 +1599,6 @@
                     return "MODE_11AC";
                 case MODE_11AX:
                     return "MODE_11AX";
-                case MODE_11BE:
-                    return "MODE_11BE";
                 default:
                     return "MODE_UNDEFINED";
             }
diff --git a/service/java/com/android/server/wifi/util/IpConfigStore.java b/service/java/com/android/server/wifi/util/IpConfigStore.java
index 2a719c4..e12f75f 100644
--- a/service/java/com/android/server/wifi/util/IpConfigStore.java
+++ b/service/java/com/android/server/wifi/util/IpConfigStore.java
@@ -112,14 +112,14 @@
                 do {
                     key = in.readUTF();
                     try {
-                        if (ID_KEY.equals(key)) {
+                        if (key.equals(ID_KEY)) {
                             if (version < 3) {
                                 int id = in.readInt();
                                 uniqueToken = String.valueOf(id);
                             } else {
                                 uniqueToken = in.readUTF();
                             }
-                        } else if (IP_ASSIGNMENT_KEY.equals(key)) {
+                        } else if (key.equals(IP_ASSIGNMENT_KEY)) {
                             ipAssignment = IpAssignment.valueOf(in.readUTF());
                         } else if (key.equals(LINK_ADDRESS_KEY)) {
                             LinkAddress linkAddr = new LinkAddress(
@@ -127,7 +127,7 @@
                             if (linkAddr.getAddress() instanceof Inet4Address) {
                                 staticIPBuilder.setIpAddress(linkAddr);
                             }
-                        } else if (GATEWAY_KEY.equals(key)) {
+                        } else if (key.equals(GATEWAY_KEY)) {
                             LinkAddress dest = null;
                             InetAddress gateway = null;
                             if (version == 1) {
@@ -155,19 +155,19 @@
                                     loge("Non-IPv4 default or duplicate route: " + route);
                                 }
                             }
-                        } else if (DNS_KEY.equals(key)) {
+                        } else if (key.equals(DNS_KEY)) {
                             dnsServerAddresses.add(InetAddresses.parseNumericAddress(in.readUTF()));
-                        } else if (PROXY_SETTINGS_KEY.equals(key)) {
+                        } else if (key.equals(PROXY_SETTINGS_KEY)) {
                             proxySettings = ProxySettings.valueOf(in.readUTF());
-                        } else if (PROXY_HOST_KEY.equals(key)) {
+                        } else if (key.equals(PROXY_HOST_KEY)) {
                             proxyHost = in.readUTF();
-                        } else if (PROXY_PORT_KEY.equals(key)) {
+                        } else if (key.equals(PROXY_PORT_KEY)) {
                             proxyPort = in.readInt();
-                        } else if (PROXY_PAC_FILE.equals(key)) {
+                        } else if (key.equals(PROXY_PAC_FILE)) {
                             pacFileUrl = in.readUTF();
-                        } else if (EXCLUSION_LIST_KEY.equals(key)) {
+                        } else if (key.equals(EXCLUSION_LIST_KEY)) {
                             exclusionList = in.readUTF();
-                        } else if (EOS.equals(key)) {
+                        } else if (key.equals(EOS)) {
                             break;
                         } else {
                             loge("Ignore unknown key " + key + "while reading");
diff --git a/service/java/com/android/server/wifi/util/LastCallerInfoManager.java b/service/java/com/android/server/wifi/util/LastCallerInfoManager.java
index 0af4d32..0074a0c 100644
--- a/service/java/com/android/server/wifi/util/LastCallerInfoManager.java
+++ b/service/java/com/android/server/wifi/util/LastCallerInfoManager.java
@@ -16,16 +16,32 @@
 
 package com.android.server.wifi.util;
 
-import android.net.wifi.WifiManager;
-import android.net.wifi.WifiManager.ApiType;
+import android.annotation.IntDef;
 import android.util.SparseArray;
 
 import java.io.PrintWriter;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 
 /**
  * Manage multiple last caller info
  */
 public class LastCallerInfoManager {
+    /** @hide */
+    @Retention(RetentionPolicy.SOURCE)
+    @IntDef(value = {
+            SCANNING_ENABLED,
+            WIFI_ENABLED,
+            SOFT_AP,
+            TETHERED_HOTSPOT,
+            AUTOJOIN_GLOBAL})
+    public @interface ApiType {}
+    public static final int SCANNING_ENABLED = 1;
+    public static final int WIFI_ENABLED = 2;
+    public static final int SOFT_AP = 3;
+    public static final int TETHERED_HOTSPOT = 4;
+    public static final int AUTOJOIN_GLOBAL = 5;
+
     private final SparseArray<LastCallerInfo> mLastCallerInfoMap = new SparseArray<>();
 
     /**
@@ -40,33 +56,20 @@
     }
 
     /**
-     * Get the LastCallerInfo for a particular api.
-     * @param apiName Name of the API
-     * @return The LastCallerInfo, or null if not available.
-     */
-    public LastCallerInfo get(@ApiType int apiName) {
-        synchronized (mLastCallerInfoMap) {
-            return mLastCallerInfoMap.get(apiName);
-        }
-    }
-
-    /**
      * Convert int constant into API String name
      */
     private String convertApiName(@ApiType int key) {
         switch (key) {
-            case WifiManager.API_SCANNING_ENABLED:
+            case SCANNING_ENABLED:
                 return "ScanningEnabled";
-            case WifiManager.API_WIFI_ENABLED:
+            case WIFI_ENABLED:
                 return "WifiEnabled";
-            case WifiManager.API_SOFT_AP:
+            case SOFT_AP:
                 return "SoftAp";
-            case WifiManager.API_TETHERED_HOTSPOT:
+            case TETHERED_HOTSPOT:
                 return "TetheredHotspot";
-            case WifiManager.API_AUTOJOIN_GLOBAL:
+            case AUTOJOIN_GLOBAL:
                 return "AutojoinGlobal";
-            case WifiManager.API_SET_SCAN_SCHEDULE:
-                return "SetScanScanSchedule";
             default:
                 return "Unknown";
         }
@@ -103,20 +106,6 @@
         }
 
         /**
-         * Gets the packageName.
-         */
-        public String getPackageName() {
-            return mPackageName;
-        }
-
-        /**
-         * Gets the toggleState.
-         */
-        public boolean getToggleState() {
-            return mToggleState;
-        }
-
-        /**
          * Convert the last caller info into String format
          */
         public String toString() {
diff --git a/service/java/com/android/server/wifi/util/NetdWrapper.java b/service/java/com/android/server/wifi/util/NetdWrapper.java
index 220fea4..686fca6 100644
--- a/service/java/com/android/server/wifi/util/NetdWrapper.java
+++ b/service/java/com/android/server/wifi/util/NetdWrapper.java
@@ -349,14 +349,14 @@
      * Register a new netd event observer.
      */
     public void registerObserver(NetdEventObserver observer) {
-        mHandler.post(() -> mObservers.add(observer));
+        mObservers.add(observer);
     }
 
     /**
      * Unregister a new netd event observer.
      */
     public void unregisterObserver(NetdEventObserver observer) {
-        mHandler.post(() -> mObservers.remove(observer));
+        mObservers.remove(observer);
     }
 
     /**
diff --git a/framework/java/android/net/wifi/util/ScanResultUtil.java b/service/java/com/android/server/wifi/util/ScanResultUtil.java
similarity index 80%
rename from framework/java/android/net/wifi/util/ScanResultUtil.java
rename to service/java/com/android/server/wifi/util/ScanResultUtil.java
index b909ac7..b7e26ae 100644
--- a/framework/java/android/net/wifi/util/ScanResultUtil.java
+++ b/service/java/com/android/server/wifi/util/ScanResultUtil.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021 The Android Open Source Project
+ * Copyright (C) 2016 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.
@@ -14,19 +14,18 @@
  * limitations under the License.
  */
 
-package android.net.wifi.util;
-
-import static android.net.wifi.ScanResult.FLAG_PASSPOINT_NETWORK;
+package com.android.server.wifi.util;
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.net.MacAddress;
 import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
 import android.util.Log;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.wifi.ScanDetail;
+import com.android.server.wifi.hotspot2.NetworkDetail;
 
 import java.io.PrintWriter;
 import java.util.ArrayList;
@@ -34,18 +33,32 @@
 /**
  * Scan result utility for any {@link ScanResult} related operations.
  * Currently contains:
+ *   > Helper method for converting a ScanResult to a ScanDetail.
+ *     Only fields that are supported in ScanResult are copied.
  *   > Helper methods to identify the encryption of a ScanResult.
- * @hide
  */
 public class ScanResultUtil {
     private static final String TAG = "ScanResultUtil";
     private ScanResultUtil() { /* not constructable */ }
 
     /**
+     * This method should only be used when the informationElements field in the provided scan
+     * result is filled in with the IEs from the beacon.
+     */
+    public static ScanDetail toScanDetail(ScanResult scanResult) {
+        ScanResult.InformationElement[] ieArray = (null != scanResult.informationElements)
+            ? scanResult.informationElements
+            : new ScanResult.InformationElement[0];
+        NetworkDetail networkDetail = new NetworkDetail(scanResult.BSSID,
+                ieArray, scanResult.anqpLines, scanResult.frequency);
+        return new ScanDetail(scanResult, networkDetail);
+    }
+
+    /**
      * Helper method to check if the provided |scanResult| corresponds to a PSK network or not.
      * This checks if the provided capabilities string contains PSK encryption type or not.
      */
-    public static boolean isScanResultForPskNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForPskNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("PSK");
     }
 
@@ -53,7 +66,7 @@
      * Helper method to check if the provided |scanResult| corresponds to a WAPI-PSK network or not.
      * This checks if the provided capabilities string contains PSK encryption type or not.
      */
-    public static boolean isScanResultForWapiPskNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForWapiPskNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("WAPI-PSK");
     }
 
@@ -62,7 +75,7 @@
      * network or not.
      * This checks if the provided capabilities string contains PSK encryption type or not.
      */
-    public static boolean isScanResultForWapiCertNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForWapiCertNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("WAPI-CERT");
     }
 
@@ -73,7 +86,7 @@
      * - Not a WPA3 Enterprise only network.
      * - Not a WPA3 Enterprise transition network.
      */
-    public static boolean isScanResultForEapNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForEapNetwork(ScanResult scanResult) {
         return (scanResult.capabilities.contains("EAP/SHA1")
                         || scanResult.capabilities.contains("EAP/SHA256")
                         || scanResult.capabilities.contains("FT/EAP")
@@ -82,11 +95,11 @@
                 && !isScanResultForWpa3EnterpriseTransitionNetwork(scanResult);
     }
 
-    private static boolean isScanResultForPmfMandatoryNetwork(@NonNull ScanResult scanResult) {
+    private static boolean isScanResultForPmfMandatoryNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("[MFPR]");
     }
 
-    private static boolean isScanResultForPmfCapableNetwork(@NonNull ScanResult scanResult) {
+    private static boolean isScanResultForPmfCapableNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("[MFPC]");
     }
 
@@ -98,10 +111,12 @@
      * - interworking bit is set.
      * - HotSpot Release presents.
      */
-    public static boolean isScanResultForPasspointR1R2Network(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForPasspointR1R2Network(ScanResult scanResult) {
         if (!isScanResultForEapNetwork(scanResult)) return false;
 
-        return scanResult.isPasspointNetwork();
+        ScanDetail detail = toScanDetail(scanResult);
+        if (!detail.getNetworkDetail().isInterworking()) return false;
+        return null != detail.getNetworkDetail().getHSRelease();
     }
 
     /**
@@ -114,7 +129,7 @@
      * - HotSpot Release presents.
      * - PMF is mandatory.
      */
-    public static boolean isScanResultForPasspointR3Network(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForPasspointR3Network(ScanResult scanResult) {
         if (!isScanResultForEapNetwork(scanResult)
                 && !isScanResultForWpa3EnterpriseOnlyNetwork(scanResult)
                 && !isScanResultForEapSuiteBNetwork(scanResult)) {
@@ -122,7 +137,9 @@
         }
         if (!isScanResultForPmfMandatoryNetwork(scanResult)) return false;
 
-        return scanResult.isPasspointNetwork();
+        ScanDetail detail = toScanDetail(scanResult);
+        if (!detail.getNetworkDetail().isInterworking()) return false;
+        return null != detail.getNetworkDetail().getHSRelease();
     }
 
     /**
@@ -135,8 +152,7 @@
      * - Management Frame Protection Capable is set.
      * - Management Frame Protection Required is not set.
      */
-    public static boolean isScanResultForWpa3EnterpriseTransitionNetwork(
-            @NonNull ScanResult scanResult) {
+    public static boolean isScanResultForWpa3EnterpriseTransitionNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("EAP/SHA1")
                 && scanResult.capabilities.contains("EAP/SHA256")
                 && scanResult.capabilities.contains("RSN")
@@ -157,7 +173,7 @@
      * - Management Frame Protection Capable is set.
      * - Management Frame Protection Required is set.
      */
-    public static boolean isScanResultForWpa3EnterpriseOnlyNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForWpa3EnterpriseOnlyNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("EAP/SHA256")
                 && !scanResult.capabilities.contains("EAP/SHA1")
                 && scanResult.capabilities.contains("RSN")
@@ -176,7 +192,7 @@
      * - Not enable WPA1 version 1, WEP, and TKIP.
      * - Management Frame Protection Required is set.
      */
-    public static boolean isScanResultForEapSuiteBNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForEapSuiteBNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("SUITE_B_192")
                 && scanResult.capabilities.contains("RSN")
                 && !scanResult.capabilities.contains("WEP")
@@ -188,7 +204,7 @@
      * Helper method to check if the provided |scanResult| corresponds to a WEP network or not.
      * This checks if the provided capabilities string contains WEP encryption type or not.
      */
-    public static boolean isScanResultForWepNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForWepNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("WEP");
     }
 
@@ -196,7 +212,7 @@
      * Helper method to check if the provided |scanResult| corresponds to OWE network.
      * This checks if the provided capabilities string contains OWE or not.
      */
-    public static boolean isScanResultForOweNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForOweNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("OWE");
     }
 
@@ -204,7 +220,7 @@
      * Helper method to check if the provided |scanResult| corresponds to OWE transition network.
      * This checks if the provided capabilities string contains OWE_TRANSITION or not.
      */
-    public static boolean isScanResultForOweTransitionNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForOweTransitionNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("OWE_TRANSITION");
     }
 
@@ -212,7 +228,7 @@
      * Helper method to check if the provided |scanResult| corresponds to SAE network.
      * This checks if the provided capabilities string contains SAE or not.
      */
-    public static boolean isScanResultForSaeNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForSaeNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("SAE");
     }
 
@@ -220,7 +236,7 @@
      * Helper method to check if the provided |scanResult| corresponds to PSK-SAE transition
      * network. This checks if the provided capabilities string contains both PSK and SAE or not.
      */
-    public static boolean isScanResultForPskSaeTransitionNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForPskSaeTransitionNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("PSK") && scanResult.capabilities.contains("SAE");
     }
 
@@ -228,7 +244,7 @@
      * Helper method to check if the provided |scanResult| corresponds to FILS SHA256 network.
      * This checks if the provided capabilities string contains FILS-SHA256 or not.
      */
-    public static boolean isScanResultForFilsSha256Network(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForFilsSha256Network(ScanResult scanResult) {
         return scanResult.capabilities.contains("FILS-SHA256");
     }
 
@@ -236,23 +252,15 @@
      * Helper method to check if the provided |scanResult| corresponds to FILS SHA384 network.
      * This checks if the provided capabilities string contains FILS-SHA384 or not.
      */
-    public static boolean isScanResultForFilsSha384Network(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForFilsSha384Network(ScanResult scanResult) {
         return scanResult.capabilities.contains("FILS-SHA384");
     }
 
     /**
-     * Helper method to check if the provided |scanResult| corresponds to DPP network.
-     * This checks if the provided capabilities string contains DPP or not.
-     */
-    public static boolean isScanResultForDppNetwork(@NonNull ScanResult scanResult) {
-        return scanResult.capabilities.contains("DPP");
-    }
-
-    /**
      *  Helper method to check if the provided |scanResult| corresponds to an unknown amk network.
      *  This checks if the provided capabilities string contains ? or not.
      */
-    public static boolean isScanResultForUnknownAkmNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForUnknownAkmNetwork(ScanResult scanResult) {
         return scanResult.capabilities.contains("?");
     }
 
@@ -261,7 +269,7 @@
      * This checks if the provided capabilities string does not contain either of WEP, PSK, SAE
      * EAP, or unknown encryption types or not.
      */
-    public static boolean isScanResultForOpenNetwork(@NonNull ScanResult scanResult) {
+    public static boolean isScanResultForOpenNetwork(ScanResult scanResult) {
         return (!(isScanResultForWepNetwork(scanResult) || isScanResultForPskNetwork(scanResult)
                 || isScanResultForEapNetwork(scanResult) || isScanResultForSaeNetwork(scanResult)
                 || isScanResultForWpa3EnterpriseTransitionNetwork(scanResult)
@@ -269,7 +277,6 @@
                 || isScanResultForWapiPskNetwork(scanResult)
                 || isScanResultForWapiCertNetwork(scanResult)
                 || isScanResultForEapSuiteBNetwork(scanResult)
-                || isScanResultForDppNetwork(scanResult)
                 || isScanResultForUnknownAkmNetwork(scanResult)));
     }
 
@@ -278,17 +285,17 @@
      * WifiConfiguration object.
      */
     @VisibleForTesting
-    public static @NonNull String createQuotedSsid(@Nullable String ssid) {
+    public static String createQuotedSSID(String ssid) {
         return "\"" + ssid + "\"";
     }
 
     /**
      * Creates a network configuration object using the provided |scanResult|.
+     * This is used to create ephemeral network configurations.
      */
-    public static @Nullable WifiConfiguration createNetworkFromScanResult(
-            @NonNull ScanResult scanResult) {
+    public static @Nullable WifiConfiguration createNetworkFromScanResult(ScanResult scanResult) {
         WifiConfiguration config = new WifiConfiguration();
-        config.SSID = createQuotedSsid(scanResult.SSID);
+        config.SSID = createQuotedSSID(scanResult.SSID);
         List<SecurityParams> list = generateSecurityParamsListFromScanResult(scanResult);
         if (list.isEmpty()) {
             return null;
@@ -303,7 +310,7 @@
      * @return a list of security params. If no known security params, return an empty list.
      */
     public static @NonNull List<SecurityParams> generateSecurityParamsListFromScanResult(
-            @NonNull ScanResult scanResult) {
+            ScanResult scanResult) {
         List<SecurityParams> list = new ArrayList<>();
 
         // Open network & its upgradable types
@@ -360,10 +367,6 @@
             list.add(SecurityParams.createSecurityParamsBySecurityType(
                     WifiConfiguration.SECURITY_TYPE_SAE));
             return list;
-        } else if (ScanResultUtil.isScanResultForDppNetwork(scanResult)) {
-            list.add(SecurityParams.createSecurityParamsBySecurityType(
-                    WifiConfiguration.SECURITY_TYPE_DPP));
-            return list;
         }
 
         // WPA3 Enterprise 192-bit mode, WPA2/WPA3 enterprise network & its upgradable types
@@ -398,8 +401,7 @@
     /**
      * Dump the provided scan results list to |pw|.
      */
-    public static void dumpScanResults(@NonNull PrintWriter pw,
-            @Nullable List<ScanResult> scanResults, long nowMs) {
+    public static void dumpScanResults(PrintWriter pw, List<ScanResult> scanResults, long nowMs) {
         if (scanResults != null && scanResults.size() != 0) {
             pw.println("    BSSID              Frequency      RSSI           Age(sec)     SSID "
                     + "                                Flags");
@@ -417,19 +419,18 @@
                 }
                 String ssid = r.SSID == null ? "" : r.SSID;
                 String rssiInfo = "";
-                int numRadioChainInfos = r.radioChainInfos == null ? 0 : r.radioChainInfos.length;
-                if (numRadioChainInfos == 1) {
+                if (ArrayUtils.size(r.radioChainInfos) == 1) {
                     rssiInfo = String.format("%5d(%1d:%3d)       ", r.level,
                             r.radioChainInfos[0].id, r.radioChainInfos[0].level);
-                } else if (numRadioChainInfos == 2) {
+                } else if (ArrayUtils.size(r.radioChainInfos) == 2) {
                     rssiInfo = String.format("%5d(%1d:%3d/%1d:%3d)", r.level,
                             r.radioChainInfos[0].id, r.radioChainInfos[0].level,
                             r.radioChainInfos[1].id, r.radioChainInfos[1].level);
                 } else {
                     rssiInfo = String.format("%9d         ", r.level);
                 }
-                if ((r.flags & FLAG_PASSPOINT_NETWORK)
-                        == FLAG_PASSPOINT_NETWORK) {
+                if ((r.flags & ScanResult.FLAG_PASSPOINT_NETWORK)
+                        == ScanResult.FLAG_PASSPOINT_NETWORK) {
                     r.capabilities += "[PASSPOINT]";
                 }
                 pw.printf("  %17s  %9d  %18s   %7s    %-32s  %s\n",
@@ -444,9 +445,9 @@
     }
 
     /**
-     * Check if ScanResult list is valid.
+     * Check if ScarResult list is valid.
      */
-    public static boolean validateScanResultList(@Nullable List<ScanResult> scanResults) {
+    public static boolean validateScanResultList(List<ScanResult> scanResults) {
         if (scanResults == null || scanResults.isEmpty()) {
             Log.w(TAG, "Empty or null ScanResult list");
             return false;
@@ -460,35 +461,8 @@
         return true;
     }
 
-    private static boolean validate(@Nullable ScanResult scanResult) {
+    private static boolean validate(ScanResult scanResult) {
         return scanResult != null && scanResult.SSID != null
                 && scanResult.capabilities != null && scanResult.BSSID != null;
     }
-
-    /**
-     * Redact bytes from a bssid.
-     */
-    public static String redactBssid(MacAddress bssid, int numRedactedOctets) {
-        if (bssid == null) {
-            return "";
-        }
-        StringBuilder redactedBssid = new StringBuilder();
-        byte[] bssidBytes = bssid.toByteArray();
-
-        if (numRedactedOctets < 0 || numRedactedOctets > 6) {
-            // Reset to default if passed value is invalid.
-            numRedactedOctets = 4;
-        }
-        for (int i = 0; i < 6; i++) {
-            if (i < numRedactedOctets) {
-                redactedBssid.append("xx");
-            } else {
-                redactedBssid.append(String.format("%02X", bssidBytes[i]));
-            }
-            if (i != 5) {
-                redactedBssid.append(":");
-            }
-        }
-        return redactedBssid.toString();
-    }
 }
diff --git a/service/java/com/android/server/wifi/util/StringUtil.java b/service/java/com/android/server/wifi/util/StringUtil.java
index 9ec8f45..4279efe 100644
--- a/service/java/com/android/server/wifi/util/StringUtil.java
+++ b/service/java/com/android/server/wifi/util/StringUtil.java
@@ -16,7 +16,6 @@
 
 package com.android.server.wifi.util;
 
-import java.util.Calendar;
 import java.util.Random;
 import java.util.stream.Collectors;
 
@@ -58,56 +57,4 @@
                 .mapToObj(i -> Character.toString(pool.charAt(i)))
                 .collect(Collectors.joining());
     }
-
-    /** Returns a random string which consists of alphabets and numbers. */
-    public static String generateRandomString(int length) {
-        final String pool = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
-        return new Random(System.currentTimeMillis())
-                .ints(length, 0, pool.length())
-                .mapToObj(i -> Character.toString(pool.charAt(i)))
-                .collect(Collectors.joining());
-    }
-
-    /** Returns the date and time of the calendar as a formatted string. */
-    public static String calendarToString(Calendar c) {
-        // Date format: "%tm-%td %tH:%tM:%tS.%tL"
-        return new StringBuilder().append(c.get(Calendar.MONTH) + 1 - Calendar.JANUARY).append("-")
-                .append(c.get(Calendar.DAY_OF_MONTH)).append(" ")
-                .append(c.get(Calendar.HOUR_OF_DAY)).append(":")
-                .append(c.get(Calendar.MINUTE)).append(":")
-                .append(c.get(Calendar.SECOND)).append(".")
-                .append(c.get(Calendar.MILLISECOND)).toString();
-    }
-
-    /** Returns the string representation of the float number, with specified digits (up to 4)
-     * after the decimal point.
-     * @param num the float number
-     * @param digits the number of digits after the decimal point
-     * @return the string representation
-     */
-    public static String doubleToString(double num, int digits) {
-        if (digits < 0 || digits > 4) return "Err";
-
-        final boolean isNegative = num < 0;
-        num = isNegative ? -num : num;
-        long mask = 1;
-        for (int i = 0; i < digits; i++) {
-            mask *= 10;
-        }
-        long integral = (long) num;
-        long fraction = (long) (num * mask) - integral * mask;
-
-        StringBuilder sb = new StringBuilder();
-        if (isNegative) sb.append("-");
-        sb.append(integral);
-        if (digits == 0) return sb.toString();
-        sb.append(".");
-        for (long f1 = fraction; f1 > 0; f1 /= 10) {
-            digits--;
-        }
-        for (int i = 0; i < digits; i++) {
-            sb.append(0);
-        }
-        return fraction == 0 ? sb.toString() : sb.append(fraction).toString();
-    }
 }
diff --git a/service/java/com/android/server/wifi/util/WaitingState.java b/service/java/com/android/server/wifi/util/WaitingState.java
deleted file mode 100644
index c5289d3..0000000
--- a/service/java/com/android/server/wifi/util/WaitingState.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi.util;
-
-import android.os.Message;
-
-import com.android.internal.util.State;
-import com.android.internal.util.StateMachine;
-
-/**
- * A generic WaitingState which will defer all messages.
- *
- * Note: if the state machine implements local transitions as opposed to external transitions
- * (see https://en.wikipedia.org/wiki/UML_state_machine#Local_versus_external_transitions for a
- * description) then this state can be added under the state which it is supposed to be blocking -
- * it will prevent triggering local exit() and enter() methods on that state. However, the Android
- * state machine does a mix of local and external transitions. Therefore, if the class which is
- * being blocked has an enter() and/or exit() methods then modify the state machine structure:
- * - Create a new container state which will have the enter() and exit() methods
- * - Add both the original state (now without the enter() and exit() methods) and the waiting state
- *   to the container.
- */
-public class WaitingState extends State {
-    private final StateMachine mParentStateMachine;
-
-    // message.what and message.getData() entries to try to guarantee no overlap with any containing
-    // state
-    private static final int MESSAGE_TYPE_TRANSITION = 0xFFFFFF;
-    private static final String MESSAGE_BUNDLE_KEY_UNIQUE_ID = "__waiting_state_unique_key";
-
-    public WaitingState(StateMachine parentStateMachine) {
-        mParentStateMachine = parentStateMachine;
-    }
-
-    @Override
-    public boolean processMessage(Message message) {
-        if (message.what == MESSAGE_TYPE_TRANSITION && message.getData().getBoolean(
-                MESSAGE_BUNDLE_KEY_UNIQUE_ID, false)) {
-            mParentStateMachine.transitionTo((State) message.obj);
-        } else {
-            mParentStateMachine.deferMessage(message);
-        }
-        return HANDLED;
-    }
-
-    /**
-     * Trigger a transition to another state.
-     *
-     * Note: has to be done as a message processing operation for the StateMachine to accept it
-     * and trigger state transition, deferred message processing.
-     */
-    public void sendTransitionStateCommand(State destState) {
-        Message message = mParentStateMachine.obtainMessage(MESSAGE_TYPE_TRANSITION, destState);
-        message.getData().putBoolean(MESSAGE_BUNDLE_KEY_UNIQUE_ID, true);
-        mParentStateMachine.sendMessage(message);
-    }
-}
diff --git a/service/java/com/android/server/wifi/util/WifiAsyncChannel.java b/service/java/com/android/server/wifi/util/WifiAsyncChannel.java
new file mode 100644
index 0000000..4526d68
--- /dev/null
+++ b/service/java/com/android/server/wifi/util/WifiAsyncChannel.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2016 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.server.wifi.util;
+
+import android.annotation.NonNull;
+import android.os.Message;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.AsyncChannel;
+import com.android.server.wifi.WifiInjector;
+import com.android.server.wifi.WifiLog;
+
+/**
+ * This class subclasses AsyncChannel and adds logging
+ * to the sendMessage() API
+ */
+public class WifiAsyncChannel extends AsyncChannel {
+    private static final String LOG_TAG = "WifiAsyncChannel";
+    private WifiLog mLog;
+    private String mTag;
+    /**
+     * AsyncChannelWithLogging constructor
+     */
+    public WifiAsyncChannel(String serviceTag) {
+        mTag = LOG_TAG + "." + serviceTag;
+    }
+
+    @NonNull
+    private WifiLog getOrInitLog() {
+        // Lazy initization of mLog
+        if (mLog == null) {
+            mLog = WifiInjector.getInstance().makeLog(mTag);
+        }
+        return mLog;
+    }
+
+    /**
+     * Send a message to the destination handler.
+     *
+     * @param msg
+     */
+    @Override
+    public void sendMessage(Message msg) {
+        getOrInitLog().trace("sendMessage message=%")
+            .c(msg.what)
+            .flush();
+        super.sendMessage(msg);
+    }
+
+    /**
+     * Reply to srcMsg
+     *
+     * @param srcMsg
+     * @param dstMsg
+     */
+    @Override
+    public void replyToMessage(Message srcMsg, Message dstMsg) {
+        getOrInitLog()
+                .trace("replyToMessage recvdMessage=% sendingUid=% sentMessage=%")
+                .c(srcMsg.what)
+                .c(srcMsg.sendingUid)
+                .c(dstMsg.what)
+                .flush();
+        super.replyToMessage(srcMsg, dstMsg);
+    }
+
+    /**
+     * Send the Message synchronously.
+     *
+     * @param msg to send
+     * @return reply message or null if an error.
+     */
+    @Override
+    public Message sendMessageSynchronously(Message msg) {
+        getOrInitLog().trace("sendMessageSynchronously.send message=%")
+            .c(msg.what)
+            .flush();
+        Message replyMessage = super.sendMessageSynchronously(msg);
+        if (replyMessage != null) {
+            getOrInitLog().trace("sendMessageSynchronously.recv message=% sendingUid=%")
+                    .c(replyMessage.what)
+                    .c(replyMessage.sendingUid)
+                    .flush();
+        }
+        return replyMessage;
+    }
+
+    @VisibleForTesting
+    public void setWifiLog(WifiLog log) {
+        mLog = log;
+    }
+}
diff --git a/service/java/com/android/server/wifi/util/WifiHandler.java b/service/java/com/android/server/wifi/util/WifiHandler.java
new file mode 100644
index 0000000..51802b1
--- /dev/null
+++ b/service/java/com/android/server/wifi/util/WifiHandler.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2016 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.server.wifi.util;
+
+import android.annotation.NonNull;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.server.wifi.WifiInjector;
+import com.android.server.wifi.WifiLog;
+
+/**
+ * This class subclasses Handler to log incoming messages
+ */
+public class WifiHandler extends Handler {
+    private static final String LOG_TAG = "WifiHandler";
+    private WifiLog mLog;
+    private String mTag;
+
+    public WifiHandler(String tag, Looper looper) {
+        super(looper);
+        mTag = LOG_TAG + "." + tag;
+    }
+
+    @NonNull
+    private WifiLog getOrInitLog() {
+        // Lazy initialization of mLog
+        if (mLog == null) {
+            mLog = WifiInjector.getInstance().makeLog(mTag);
+        }
+        return mLog;
+    }
+
+    @Override
+    public void handleMessage(Message msg) {
+        getOrInitLog().trace("Received message=% sendingUid=%")
+                .c(msg.what)
+                .c(msg.sendingUid)
+                .flush();
+    }
+
+    /**
+     * @hide
+     */
+    @VisibleForTesting
+    public void setWifiLog(WifiLog wifiLog) {
+        // TODO WifiInjector should be passed as a variable in the constructor
+        // b/33308811 tracks removing lazy initializations of mLog
+        mLog = wifiLog;
+    }
+}
diff --git a/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java b/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
index 4c0c7ef..4a30029 100644
--- a/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
+++ b/service/java/com/android/server/wifi/util/WifiPermissionsUtil.java
@@ -16,56 +16,34 @@
 
 package com.android.server.wifi.util;
 
-import static android.Manifest.permission.ACCESS_FINE_LOCATION;
 import static android.Manifest.permission.ENTER_CAR_MODE_PRIORITIZED;
-import static android.Manifest.permission.NEARBY_WIFI_DEVICES;
-import static android.Manifest.permission.RENOUNCE_PERMISSIONS;
-import static android.Manifest.permission.REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION;
-import static android.content.pm.PackageManager.GET_PERMISSIONS;
-import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES;
 
 import android.Manifest;
-import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.app.AppOpsManager;
 import android.app.admin.DevicePolicyManager;
-import android.app.admin.WifiSsidPolicy;
-import android.content.AttributionSource;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.location.LocationManager;
 import android.net.NetworkStack;
-import android.net.wifi.SecurityParams;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiSsid;
 import android.os.Binder;
 import android.os.Build;
-import android.os.Process;
 import android.os.UserHandle;
 import android.os.UserManager;
-import android.permission.PermissionManager;
 import android.provider.Settings;
-import android.util.ArraySet;
 import android.util.EventLog;
 import android.util.Log;
 import android.util.Pair;
-import android.util.SparseBooleanArray;
-
-import androidx.annotation.RequiresApi;
 
 import com.android.internal.annotations.GuardedBy;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.FrameworkFacade;
 import com.android.server.wifi.WifiInjector;
 import com.android.server.wifi.WifiLog;
-import com.android.wifi.resources.R;
 
 import java.util.Arrays;
-import java.util.Set;
 
 /**
  * A wifi permissions utility assessing permissions
@@ -81,13 +59,11 @@
     private final FrameworkFacade mFrameworkFacade;
     private final AppOpsManager mAppOps;
     private final UserManager mUserManager;
-    private final PermissionManager mPermissionManager;
     private final Object mLock = new Object();
     @GuardedBy("mLock")
     private LocationManager mLocationManager;
     private WifiLog mLog;
     private boolean mVerboseLoggingEnabled;
-    private final SparseBooleanArray mOemPrivilegedAdminUidCache = new SparseBooleanArray();
 
     public WifiPermissionsUtil(WifiPermissionsWrapper wifiPermissionsWrapper,
             Context context, UserManager userManager, WifiInjector wifiInjector) {
@@ -96,55 +72,9 @@
         mFrameworkFacade = wifiInjector.getFrameworkFacade();
         mUserManager = userManager;
         mAppOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE);
-        mPermissionManager = mContext.getSystemService(PermissionManager.class);
         mLog = wifiInjector.makeLog(TAG);
     }
 
-
-    /**
-     * A class to store binder caller information.
-     */
-    public static final class CallerIdentity {
-        int mUid;
-        int mPid;
-        String mPackageName;
-        String mFeatureId;
-
-        public CallerIdentity(int uid, int pid, String packageName, String featureId) {
-            mUid = uid;
-            mPid = pid;
-            mPackageName = packageName;
-            mFeatureId = featureId;
-        }
-
-        public int getUid() {
-            return mUid;
-        }
-
-        public int getPid() {
-            return mPid;
-        }
-
-        public String getPackageName() {
-            return mPackageName;
-        }
-
-        public String getFeatureId() {
-            return mFeatureId;
-        }
-
-        @NonNull
-        @Override
-        public String toString() {
-            return "CallerIdentity{"
-                    + "Uid= " + mUid
-                    + ", Pid= " + mPid
-                    + ", PackageName= " + mPackageName
-                    + ", FeatureId= " + mFeatureId
-                    + '}';
-        }
-    }
-
     /**
      * Checks if the app has the permission to override Wi-Fi network configuration or not.
      *
@@ -152,8 +82,8 @@
      * @return true if the app does have the permission, false otherwise.
      */
     public boolean checkConfigOverridePermission(int uid) {
-        return mWifiPermissionsWrapper.getOverrideWifiConfigPermission(uid)
-                == PackageManager.PERMISSION_GRANTED;
+        int permission = mWifiPermissionsWrapper.getOverrideWifiConfigPermission(uid);
+        return permission == PackageManager.PERMISSION_GRANTED;
     }
 
     /**
@@ -172,149 +102,6 @@
     }
 
     /**
-     * Version of enforceNearbyDevicesPermission that do not throw an exception.
-     */
-    public boolean checkNearbyDevicesPermission(AttributionSource attributionSource,
-            boolean checkForLocation, String message) {
-        try {
-            enforceNearbyDevicesPermission(attributionSource, checkForLocation, message);
-        } catch (SecurityException e) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Check and enforce NEARBY_WIFI_DEVICES permission and optionally enforce for either location
-     * disavowal or location permission.
-     *
-     * Note, this is only callable on SDK version T and later.
-     *
-     * @param attributionSource AttributionSource of the caller.
-     * @param checkForLocation If true will require the caller to either disavow location
-     *                         or actually have location permission.
-     * @param message String to log as the reason for performing permission checks.
-     */
-    public void enforceNearbyDevicesPermission(AttributionSource attributionSource,
-            boolean checkForLocation, String message) throws SecurityException {
-        if (!SdkLevel.isAtLeastT()) {
-            Log.wtf(TAG, "enforceNearbyDevicesPermission should never be called on pre-T "
-                    + "devices");
-            throw new SecurityException("enforceNearbyDevicesPermission requires at least "
-                    + "Android T");
-        }
-        if (attributionSource == null) {
-            throw new SecurityException("enforceNearbyDevicesPermission attributionSource is null");
-        }
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "enforceNearbyDevicesPermission(attributionSource="
-                    + attributionSource + ", checkForLocation=" + checkForLocation);
-        }
-        if (!attributionSource.checkCallingUid()) {
-            throw new SecurityException("enforceNearbyDevicesPermission invalid attribution source="
-                    + attributionSource);
-        }
-        String packageName = attributionSource.getPackageName();
-        int uid = attributionSource.getUid();
-        // Apps with NETWORK_SETTINGS, NETWORK_SETUP_WIZARD, NETWORK_MANAGED_PROVISIONING,
-        // NETWORK_STACK & MAINLINE_NETWORK_STACK, RADIO_SCAN_WITHOUT_LOCATION are granted a bypass.
-        if (checkNetworkSettingsPermission(uid) || checkNetworkSetupWizardPermission(uid)
-                || checkNetworkManagedProvisioningPermission(uid)
-                || checkNetworkStackPermission(uid) || checkMainlineNetworkStackPermission(uid)
-                || checkScanWithoutLocationPermission(uid)) {
-            return;
-        }
-        int permissionCheckResult = mPermissionManager.checkPermissionForDataDelivery(
-                Manifest.permission.NEARBY_WIFI_DEVICES, attributionSource, message);
-        if (permissionCheckResult != PermissionManager.PERMISSION_GRANTED) {
-            throw new SecurityException("package=" + packageName + " UID=" + uid
-                    + " does not have nearby devices permission.");
-        }
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "pkg=" + packageName + " has NEARBY_WIFI_DEVICES permission.");
-        }
-        if (!checkForLocation) {
-            // No need to check for location permission. All done now and return.
-            return;
-        }
-
-        // There are 2 ways to disavow location. Skip location permission check if any of the
-        // 2 ways are used to disavow location usage.
-        // First check if the app renounced location.
-        // Check every step along the attribution chain for a renouncement.
-        AttributionSource currentAttrib = attributionSource;
-        while (true) {
-            int curUid = currentAttrib.getUid();
-            String curPackageName = currentAttrib.getPackageName();
-            // If location has been renounced anywhere in the chain we treat it as a disavowal.
-            if (currentAttrib.getRenouncedPermissions().contains(ACCESS_FINE_LOCATION)
-                    && mWifiPermissionsWrapper.getUidPermission(RENOUNCE_PERMISSIONS, curUid)
-                    == PackageManager.PERMISSION_GRANTED) {
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, "package=" + curPackageName + " UID=" + curUid
-                            + " has renounced location permission - bypassing location check.");
-                }
-                return;
-            }
-            AttributionSource nextAttrib = currentAttrib.getNext();
-            if (nextAttrib == null) {
-                break;
-            }
-            currentAttrib = nextAttrib;
-        }
-        // If the app did not renounce location, check if "neverForLocation" is set.
-        PackageManager pm = mContext.getPackageManager();
-        try {
-            PackageInfo pkgInfo = pm.getPackageInfo(packageName,
-                    GET_PERMISSIONS | MATCH_UNINSTALLED_PACKAGES);
-            int requestedPermissionsLength = pkgInfo.requestedPermissions == null
-                    || pkgInfo.requestedPermissionsFlags == null ? 0
-                    : pkgInfo.requestedPermissions.length;
-            if (requestedPermissionsLength == 0) {
-                Log.e(TAG, "package=" + packageName + " unexpectedly has null "
-                        + "requestedPermissions or requestPermissionFlags.");
-            }
-            for (int i = 0; i < requestedPermissionsLength; i++) {
-                if (pkgInfo.requestedPermissions[i].equals(NEARBY_WIFI_DEVICES)
-                        && (pkgInfo.requestedPermissionsFlags[i]
-                        & PackageInfo.REQUESTED_PERMISSION_NEVER_FOR_LOCATION) != 0) {
-                    if (mVerboseLoggingEnabled) {
-                        Log.v(TAG, "package=" + packageName + " UID=" + uid
-                                + " has declared neverForLocation - bypassing location check.");
-                    }
-                    return;
-                }
-            }
-        } catch (PackageManager.NameNotFoundException e) {
-            Log.w(TAG, "Could not find package for disavowal check: " + packageName);
-        }
-        // App did not disavow location. Check for location permission and location mode.
-        long ident = Binder.clearCallingIdentity();
-        try {
-            if (!isLocationModeEnabled()) {
-                if (mVerboseLoggingEnabled) {
-                    Log.v(TAG, "enforceNearbyDevicesPermission(pkg=" + packageName + ", uid=" + uid
-                            + "): "
-                            + "location is disabled");
-                }
-                throw new SecurityException("Location mode is disabled for the device");
-            }
-        } finally {
-            Binder.restoreCallingIdentity(ident);
-        }
-        if (mPermissionManager.checkPermissionForDataDelivery(
-                ACCESS_FINE_LOCATION, attributionSource, message)
-                == PermissionManager.PERMISSION_GRANTED) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "package=" + packageName + " UID=" + uid + " has location permission.");
-            }
-            return;
-        }
-        throw new SecurityException("package=" + packageName + ", UID=" + uid
-                + " does not have Fine Location permission");
-    }
-
-    /**
      * Checks whether than the target SDK of the package is less than the specified version code.
      */
     public boolean isTargetSdkLessThan(String packageName, int versionCode, int callingUid) {
@@ -344,16 +131,6 @@
     }
 
     /**
-     * Returns the global demo mode of the device. Note that there is a
-     * UserManager.isDeviceInDemoMode(Context) which does the same thing - but is not a
-     * public/system API (whereas the Settings.Global.DEVICE_DEMO_MODE is a System API).
-     */
-    public boolean isDeviceInDemoMode(Context context) {
-        return Settings.Global.getInt(context.getContentResolver(),
-                Settings.Global.DEVICE_DEMO_MODE, 0) > 0;
-    }
-
-    /**
      * Checks that calling process has android.Manifest.permission.ACCESS_FINE_LOCATION or
      * android.Manifest.permission.ACCESS_FINE_LOCATION (depending on config/targetSDK leve)
      * and a corresponding app op is allowed for this package and uid.
@@ -370,7 +147,7 @@
             int uid, boolean coarseForTargetSdkLessThanQ, @Nullable String message) {
         boolean isTargetSdkLessThanQ = isTargetSdkLessThan(pkgName, Build.VERSION_CODES.Q, uid);
 
-        String permissionType = ACCESS_FINE_LOCATION;
+        String permissionType = Manifest.permission.ACCESS_FINE_LOCATION;
         if (coarseForTargetSdkLessThanQ && isTargetSdkLessThanQ) {
             // Having FINE permission implies having COARSE permission (but not the reverse)
             permissionType = Manifest.permission.ACCESS_COARSE_LOCATION;
@@ -423,7 +200,7 @@
      */
     public void enforceFineLocationPermission(String pkgName, @Nullable String featureId,
             int uid) {
-        if (!checkCallersFineLocationPermission(pkgName, featureId, uid, false, false)) {
+        if (!checkCallersFineLocationPermission(pkgName, featureId, uid, false)) {
             throw new SecurityException("UID " + uid + " does not have Fine Location permission");
         }
     }
@@ -438,75 +215,22 @@
      * @param hideFromAppOps True to invoke {@link AppOpsManager#checkOp(int, int, String)}, false
      *                       to invoke {@link AppOpsManager#noteOp(String, int, String, String,
      *                       String)}.
-     * @param ignoreLocationSettings Whether this request can bypass location settings.
      */
     private boolean checkCallersFineLocationPermission(String pkgName, @Nullable String featureId,
-            int uid, boolean hideFromAppOps, boolean ignoreLocationSettings) {
+            int uid, boolean hideFromAppOps) {
         // Having FINE permission implies having COARSE permission (but not the reverse)
         if (mWifiPermissionsWrapper.getUidPermission(
-                ACCESS_FINE_LOCATION, uid)
+                Manifest.permission.ACCESS_FINE_LOCATION, uid)
                 == PackageManager.PERMISSION_DENIED) {
             return false;
         }
-
-        boolean isAllowed;
         if (hideFromAppOps) {
             // Don't note the operation, just check if the app is allowed to perform the operation.
-            isAllowed = checkAppOpAllowed(AppOpsManager.OPSTR_FINE_LOCATION, pkgName, uid);
+            return checkAppOpAllowed(AppOpsManager.OPSTR_FINE_LOCATION, pkgName, uid);
         } else {
-            isAllowed = noteAppOpAllowed(AppOpsManager.OPSTR_FINE_LOCATION, pkgName, featureId, uid,
+            return noteAppOpAllowed(AppOpsManager.OPSTR_FINE_LOCATION, pkgName, featureId, uid,
                     null);
         }
-        // If the ignoreLocationSettings is true, we always return true. This is for the emergency
-        // location service use case. But still notify the operation manager.
-        return isAllowed || ignoreLocationSettings;
-    }
-
-    /**
-     * Check and enforce Coarse Location permission.
-     *
-     * @param pkgName PackageName of the application requesting access.
-     * @param featureId The feature in the package.
-     * @param uid The uid of the package.
-     */
-    public void enforceCoarseLocationPermission(String pkgName, @Nullable String featureId,
-            int uid) {
-        if (!checkCallersCoarseLocationPermission(pkgName, featureId,
-                uid, null)) {
-            throw new SecurityException(
-                    "UID " + uid + " does not have Coarse Location permission");
-        }
-    }
-
-    /**
-     * Checks that calling process has android.Manifest.permission.ACCESS_COARSE_LOCATION
-     * and a corresponding app op is allowed for this package and uid.
-     *
-     * @param pkgName PackageName of the application requesting access.
-     * @param featureId The feature in the package.
-     * @param uid The uid of the package.
-     * @param message A message describing why the permission was checked. Only needed if this is
-     *                not inside of a two-way binder call from the data receiver.
-     */
-    public boolean checkCallersCoarseLocationPermission(String pkgName, @Nullable String featureId,
-            int uid, @Nullable String message) {
-        if (mWifiPermissionsWrapper.getUidPermission(
-                Manifest.permission.ACCESS_COARSE_LOCATION, uid)
-                == PackageManager.PERMISSION_DENIED) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "checkCallersCoarseLocationPermission(" + pkgName + "): uid " + uid
-                        + " doesn't have ACCESS_COARSE_LOCATION permission ");
-            }
-            return false;
-        }
-        boolean allowed = noteAppOpAllowed(AppOpsManager.OPSTR_COARSE_LOCATION, pkgName,
-                    featureId, uid, message);
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "checkCallersCoarseLocationPermission(" + pkgName + "): returning "
-                    + allowed + " because uid " + uid + (allowed ? "has" : "doesn't have")
-                    + " app-op " + AppOpsManager.OPSTR_COARSE_LOCATION);
-        }
-        return allowed;
     }
 
     /**
@@ -619,8 +343,8 @@
         }
         // LocationAccess by App: caller must have fine & hardware Location permission to have
         // access to location information.
-        if (!checkCallersFineLocationPermission(pkgName, featureId, uid, hideFromAppOps,
-                ignoreLocationSettings) || !checkCallersHardwareLocationPermission(uid)) {
+        if (!checkCallersFineLocationPermission(pkgName, featureId, uid, hideFromAppOps)
+                || !checkCallersHardwareLocationPermission(uid)) {
             throw new SecurityException("UID " + uid + " has no location permission");
         }
         // Check if Wifi Scan request is an operation allowed for this App.
@@ -749,15 +473,6 @@
     }
 
     /**
-     * Returns true if the |uid| holds REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION permission.
-     */
-    public boolean checkRequestCompanionProfileAutomotiveProjectionPermission(int uid) {
-        return mWifiPermissionsWrapper.getUidPermission(
-                REQUEST_COMPANION_PROFILE_AUTOMOTIVE_PROJECTION, uid)
-                == PackageManager.PERMISSION_GRANTED;
-    }
-
-    /**
      * Returns true if the |uid| holds ENTER_CAR_MODE_PRIORITIZED permission.
      */
     public boolean checkEnterCarModePrioritized(int uid) {
@@ -766,24 +481,6 @@
     }
 
     /**
-     * Returns true if the |uid| holds MANAGE_WIFI_INTERFACES permission.
-     */
-    public boolean checkManageWifiInterfacesPermission(int uid) {
-        return mWifiPermissionsWrapper.getUidPermission(
-                android.Manifest.permission.MANAGE_WIFI_INTERFACES, uid)
-                == PackageManager.PERMISSION_GRANTED;
-    }
-
-    /**
-     * Returns true if the |uid| holds MANAGE_WIFI_NETWORK_SELECTION permission.
-     */
-    public boolean checkManageWifiNetworkSelectionPermission(int uid) {
-        return mWifiPermissionsWrapper.getUidPermission(
-                android.Manifest.permission.MANAGE_WIFI_NETWORK_SELECTION, uid)
-                == PackageManager.PERMISSION_GRANTED;
-    }
-
-    /**
      * Returns true if the |uid| holds NETWORK_SETTINGS permission.
      */
     public boolean checkNetworkSettingsPermission(int uid) {
@@ -865,15 +562,6 @@
     }
 
     /**
-     * Returns true if the |uid| holds CAMERA permission.
-     */
-    public boolean checkCameraPermission(int uid) {
-        return mWifiPermissionsWrapper.getUidPermission(
-                android.Manifest.permission.CAMERA, uid)
-                == PackageManager.PERMISSION_GRANTED;
-    }
-
-    /**
      * Returns true if the |callingUid|/\callingPackage| holds SYSTEM_ALERT_WINDOW permission.
      */
     public boolean checkSystemAlertWindowPermission(int callingUid, String callingPackage) {
@@ -887,10 +575,7 @@
         return mode == AppOpsManager.MODE_ALLOWED;
     }
 
-    /**
-     * Returns the DevicePolicyManager from context
-     */
-    public static DevicePolicyManager retrieveDevicePolicyManagerFromContext(Context context) {
+    private static DevicePolicyManager retrieveDevicePolicyManagerFromContext(Context context) {
         DevicePolicyManager devicePolicyManager =
                 context.getSystemService(DevicePolicyManager.class);
         if (devicePolicyManager == null
@@ -999,48 +684,7 @@
     }
 
     /**
-     * Returns {@code true} if the calling {@code uid} is the OEM privileged admin.
-     *
-     * The admin must be allowlisted in the wifi overlay and signed with system cert.
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    public boolean isOemPrivilegedAdmin(int uid) {
-        synchronized (mOemPrivilegedAdminUidCache) {
-            int cacheIdx = mOemPrivilegedAdminUidCache.indexOfKey(uid);
-            if (cacheIdx >= 0) {
-                return mOemPrivilegedAdminUidCache.valueAt(cacheIdx);
-            }
-        }
-
-        boolean result = isOemPrivilegedAdminNoCache(uid);
-
-        synchronized (mOemPrivilegedAdminUidCache) {
-            mOemPrivilegedAdminUidCache.put(uid, result);
-        }
-
-        return result;
-    }
-
-    /**
-     * Returns {@code true} if the calling {@code uid} is the OEM privileged admin.
-     *
-     * This method doesn't memoize results, use {@code isOemPrivilegedAdmin} instead.
-     */
-    @RequiresApi(Build.VERSION_CODES.TIRAMISU)
-    private boolean isOemPrivilegedAdminNoCache(int uid) {
-        Set<String> oemPrivilegedAdmins = new ArraySet<>(mContext.getResources()
-                .getStringArray(R.array.config_oemPrivilegedWifiAdminPackages));
-        PackageManager pm = mContext.getPackageManager();
-        String[] packages = pm.getPackagesForUid(uid);
-        if (packages == null || Arrays.stream(packages).noneMatch(oemPrivilegedAdmins::contains)) {
-            return false;
-        }
-
-        return pm.checkSignatures(uid, Process.SYSTEM_UID) == PackageManager.SIGNATURE_MATCH;
-    }
-
-    /**
-     * Returns true if the |callingUid|/|callingPackage| is the profile owner.
+     * Returns true if the |callingUid|/\callingPackage| is the profile owner.
      */
     public boolean isProfileOwner(int uid, @Nullable String packageName) {
         // Cannot determine if the app is DO/PO if packageName is null. So, will return false to be
@@ -1055,41 +699,6 @@
         return devicePolicyManager.isProfileOwnerApp(packageName);
     }
 
-    /**
-     * Returns {@code true} if the calling {@code uid} is the profile owner of
-     * an organization owned device.
-     */
-    public boolean isProfileOwnerOfOrganizationOwnedDevice(int uid) {
-        DevicePolicyManager devicePolicyManager =
-                retrieveDevicePolicyManagerFromUserContext(uid);
-        if (devicePolicyManager == null) return false;
-
-        // this relies on having only one PO on COPE device.
-        if (!devicePolicyManager.isOrganizationOwnedDeviceWithManagedProfile()) {
-            return false;
-        }
-        String[] packages = mContext.getPackageManager().getPackagesForUid(uid);
-        if (packages == null) {
-            Log.w(TAG, "isProfileOwnerOfOrganizationOwnedDevice(): could not find packages for uid="
-                    + uid);
-            return false;
-        }
-        for (String packageName : packages) {
-            if (devicePolicyManager.isProfileOwnerApp(packageName)) return true;
-        }
-        return false;
-    }
-
-    /**
-     * Returns {@code true} if the calling {@code uid} and {@code packageName} is the device owner
-     * or the profile owner of an organization owned device.
-     */
-    public boolean isOrganizationOwnedDeviceAdmin(int uid, @Nullable String packageName) {
-        boolean isDeviceOwner =
-                packageName == null ? isDeviceOwner(uid) : isDeviceOwner(uid, packageName);
-        return isDeviceOwner || isProfileOwnerOfOrganizationOwnedDevice(uid);
-    }
-
     /** Helper method to check if the entity initiating the binder call is a system app. */
     public boolean isSystem(String packageName, int uid) {
         long ident = Binder.clearCallingIdentity();
@@ -1131,20 +740,6 @@
     }
 
     /**
-     * Check if the current user is a guest user
-     * @return true if the current user is a guest user, false otherwise.
-     */
-    public boolean isGuestUser() {
-        UserManager userManager = mContext.createContextAsUser(
-                UserHandle.of(mWifiPermissionsWrapper.getCurrentUser()), 0)
-                .getSystemService(UserManager.class);
-        if (userManager == null) {
-            return true;
-        }
-        return userManager.isGuestUser();
-    }
-
-    /**
      * Checks if the given UID belongs to the given user ID. This is
      * used to prevent apps running in other users from modifying network configurations belonging
      * to the given user.
@@ -1157,7 +752,7 @@
      * @return true if the given UID belongs to the given user.
      */
     public boolean doesUidBelongToUser(int uid, int userId) {
-        if (UserHandle.getAppId(uid) == android.os.Process.SYSTEM_UID
+        if (uid == android.os.Process.SYSTEM_UID
                 // UIDs with the NETWORK_SETTINGS permission are always allowed since they are
                 // acting on behalf of the user.
                 || checkNetworkSettingsPermission(uid)) {
@@ -1175,98 +770,4 @@
     public void enableVerboseLogging(boolean enabled) {
         mVerboseLoggingEnabled = enabled;
     }
-
-    /**
-     * Returns true if the |callingUid|/|callingPackage| is an admin.
-     */
-    public boolean isAdmin(int uid, @Nullable String packageName) {
-        // Cannot determine if the app is an admin if packageName is null.
-        // So, will return false to be safe.
-        if (packageName == null) {
-            Log.e(TAG, "isAdmin: packageName is null, returning false");
-            return false;
-        }
-        boolean isOemPrivilegedAdmin = (SdkLevel.isAtLeastT()) ? isOemPrivilegedAdmin(uid) : false;
-
-        return isDeviceOwner(uid, packageName) || isProfileOwner(uid, packageName)
-                || isOemPrivilegedAdmin;
-    }
-
-    /**
-     * Returns true if the device may not connect to the configuration due to admin restriction
-     */
-    public boolean isAdminRestrictedNetwork(@Nullable WifiConfiguration config) {
-        if (config == null || !SdkLevel.isAtLeastT()) {
-            return false;
-        }
-
-        DevicePolicyManager devicePolicyManager =
-                WifiPermissionsUtil.retrieveDevicePolicyManagerFromContext(mContext);
-        if (devicePolicyManager == null) return false;
-
-        int adminMinimumSecurityLevel = 0;
-        WifiSsidPolicy policy;
-        long ident = Binder.clearCallingIdentity();
-        try {
-            adminMinimumSecurityLevel = devicePolicyManager.getMinimumRequiredWifiSecurityLevel();
-            policy = devicePolicyManager.getWifiSsidPolicy();
-        } finally {
-            Binder.restoreCallingIdentity(ident);
-        }
-
-        //check minimum security level restriction
-        if (adminMinimumSecurityLevel != 0) {
-            boolean securityRestrictionPassed = false;
-            for (SecurityParams params : config.getSecurityParamsList()) {
-                int securityLevel = WifiInfo.convertSecurityTypeToDpmWifiSecurity(
-                        WifiInfo.convertWifiConfigurationSecurityType(params.getSecurityType()));
-
-                // Skip unknown security type since security level cannot be determined.
-                if (securityLevel == WifiInfo.DPM_SECURITY_TYPE_UNKNOWN) continue;
-
-                if (adminMinimumSecurityLevel <= securityLevel) {
-                    securityRestrictionPassed = true;
-                    break;
-                }
-            }
-            if (!securityRestrictionPassed) {
-                return true;
-            }
-        }
-
-        //check SSID restriction
-        if (policy != null) {
-            //skip SSID restriction check for Osu and Passpoint networks
-            if (config.osu || config.isPasspoint()) return false;
-
-            int policyType = policy.getPolicyType();
-            Set<WifiSsid> ssids = policy.getSsids();
-            WifiSsid ssid = WifiSsid.fromString(config.SSID);
-
-            if (policyType == WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_ALLOWLIST
-                    && !ssids.contains(ssid)) {
-                return true;
-            }
-            if (policyType == WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_DENYLIST
-                    && ssids.contains(ssid)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Returns the foreground userId
-     */
-    public int getCurrentUser() {
-        //set the default to undefined user id (UserHandle.USER_NULL)
-        int user = -10000;
-        long ident = Binder.clearCallingIdentity();
-        try {
-            user = mWifiPermissionsWrapper.getCurrentUser();
-        } finally {
-            Binder.restoreCallingIdentity(ident);
-        }
-        return user;
-    }
 }
diff --git a/service/java/com/android/server/wifi/util/WifiPermissionsWrapper.java b/service/java/com/android/server/wifi/util/WifiPermissionsWrapper.java
index a8d3e49..42669fc 100644
--- a/service/java/com/android/server/wifi/util/WifiPermissionsWrapper.java
+++ b/service/java/com/android/server/wifi/util/WifiPermissionsWrapper.java
@@ -16,8 +16,11 @@
 
 package com.android.server.wifi.util;
 
+import android.Manifest;
 import android.app.ActivityManager;
 import android.content.Context;
+import android.content.pm.PackageManager;
+import android.util.Log;
 
 /**
  * A wifi permissions dependency class to wrap around external
@@ -26,6 +29,7 @@
 public class WifiPermissionsWrapper {
     private static final String TAG = "WifiPermissionsWrapper";
     private final Context mContext;
+    private boolean mVerboseLoggingEnabled;
 
     public WifiPermissionsWrapper(Context context) {
         mContext = context;
@@ -43,7 +47,12 @@
      */
     public int getUidPermission(String permissionType, int uid) {
         // We don't care about pid, pass in -1
-        return mContext.checkPermission(permissionType, -1, uid);
+        int granted = mContext.checkPermission(permissionType, -1, uid);
+        if (mVerboseLoggingEnabled) {
+            Log.v(TAG, "getUidPermission(" + permissionType + ", " + uid + "): "
+                    + (granted == PackageManager.PERMISSION_GRANTED));
+        }
+        return granted;
     }
 
     /**
@@ -56,4 +65,20 @@
         return getUidPermission(android.Manifest.permission.OVERRIDE_WIFI_CONFIG, uid);
     }
 
+    /**
+     * Determines if the caller has local mac address permission.
+     *
+     * @param uid to check the permission for
+     * @return int representation of success or denied
+     */
+    public int getLocalMacAddressPermission(int uid) {
+        return getUidPermission(Manifest.permission.LOCAL_MAC_ADDRESS, uid);
+    }
+
+    /**
+     * Sets the verbose logging level.
+     */
+    public void enableVerboseLogging(boolean enabled) {
+        mVerboseLoggingEnabled = enabled;
+    }
 }
diff --git a/service/java/com/android/server/wifi/util/WorkSourceHelper.java b/service/java/com/android/server/wifi/util/WorkSourceHelper.java
index cbd65a8..d793ef9 100644
--- a/service/java/com/android/server/wifi/util/WorkSourceHelper.java
+++ b/service/java/com/android/server/wifi/util/WorkSourceHelper.java
@@ -23,17 +23,11 @@
 import android.app.ActivityManager;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
-import android.content.res.Resources;
 import android.os.Process;
 import android.os.UserHandle;
 import android.os.WorkSource;
-import android.text.TextUtils;
 import android.util.Log;
 
-import com.android.wifi.resources.R;
-
-import java.util.Arrays;
-
 /**
  * Class for wrapping a WorkSource object and providing some (wifi specific) utility methods.
  *
@@ -47,23 +41,16 @@
     private final WifiPermissionsUtil mWifiPermissionsUtil;
     private final ActivityManager mActivityManager;
     private final PackageManager mPackageManager;
-    private final Resources mResources;
 
     public WorkSourceHelper(
             @NonNull WorkSource workSource,
             @NonNull WifiPermissionsUtil wifiPermissionsUtil,
             @NonNull ActivityManager activityManager,
-            @NonNull PackageManager packageManager,
-            @NonNull Resources resources) {
+            @NonNull PackageManager packageManager) {
         mWorkSource = workSource;
         mWifiPermissionsUtil = wifiPermissionsUtil;
         mActivityManager = activityManager;
         mPackageManager = packageManager;
-        mResources = resources;
-    }
-
-    public WorkSource getWorkSource() {
-        return mWorkSource;
     }
 
     @Override
@@ -125,16 +112,7 @@
     /**
      * Check if the request comes from foreground app.
      */
-    private boolean isForegroundApp(@NonNull String requestorPackageName,
-            boolean allowOverlayBypass) {
-        if (allowOverlayBypass) {
-            String[] exceptionList = mResources.getStringArray(
-                    R.array.config_wifiInterfacePriorityTreatAsForegroundList);
-            if (exceptionList != null && Arrays.stream(exceptionList).anyMatch(
-                    s -> TextUtils.equals(requestorPackageName, s))) {
-                return true;
-            }
-        }
+    private boolean isForegroundApp(@NonNull String requestorPackageName) {
         try {
             return mActivityManager.getPackageImportance(requestorPackageName)
                     <= IMPORTANCE_FOREGROUND;
@@ -147,13 +125,10 @@
     /**
      * Returns whether any of the one or more worksource objects contains a foreground app
      * request.
-     *
-     * @param allowOverlayBypass Use the `config_wifiInterfacePriorityTreatAsForegroundList` overlay
-     *                           to consider the specified packages are foreground.
      */
-    public boolean hasAnyForegroundAppRequest(boolean allowOverlayBypass) {
+    public boolean hasAnyForegroundAppRequest() {
         for (int i = 0; i < mWorkSource.size(); i++) {
-            if (isForegroundApp(mWorkSource.getPackageName(i), allowOverlayBypass)) return true;
+            if (isForegroundApp(mWorkSource.getPackageName(i))) return true;
         }
         return false;
     }
diff --git a/service/java/com/android/server/wifi/util/XmlUtil.java b/service/java/com/android/server/wifi/util/XmlUtil.java
index 185bc86..dd3d6f6 100644
--- a/service/java/com/android/server/wifi/util/XmlUtil.java
+++ b/service/java/com/android/server/wifi/util/XmlUtil.java
@@ -18,7 +18,6 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.compat.Compatibility;
 import android.net.InetAddresses;
 import android.net.IpConfiguration;
 import android.net.IpConfiguration.IpAssignment;
@@ -29,16 +28,10 @@
 import android.net.RouteInfo;
 import android.net.StaticIpConfiguration;
 import android.net.Uri;
-import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
-import android.net.wifi.SoftApConfiguration;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
 import android.net.wifi.WifiEnterpriseConfig;
-import android.net.wifi.WifiManager;
-import android.net.wifi.WifiMigration;
-import android.net.wifi.WifiSsid;
-import android.os.ParcelUuid;
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.Pair;
@@ -379,14 +372,6 @@
         public static final String XML_TAG_SAE_IS_PK_ONLY_MODE = "SaeIsPkOnlyMode";
         public static final String XML_TAG_IS_ADDED_BY_AUTO_UPGRADE = "IsAddedByAutoUpgrade";
         private static final String XML_TAG_IS_MOST_RECENTLY_CONNECTED = "IsMostRecentlyConnected";
-        private static final String XML_TAG_IS_RESTRICTED = "IsRestricted";
-        private static final String XML_TAG_SUBSCRIPTION_GROUP = "SubscriptionGroup";
-        public static final String XML_TAG_BSSID_ALLOW_LIST = "bssidAllowList";
-        private static final String XML_TAG_IS_REPEATER_ENABLED = "RepeaterEnabled";
-        public static final String XML_TAG_DPP_PRIVATE_EC_KEY = "DppPrivateEcKey";
-        public static final String XML_TAG_DPP_CONNECTOR = "DppConnector";
-        public static final String XML_TAG_DPP_CSIGN_KEY = "DppCSignKey";
-        public static final String XML_TAG_DPP_NET_ACCESS_KEY = "DppNetAccessKey";
 
         /**
          * Write WepKeys to the XML stream.
@@ -468,47 +453,6 @@
             XmlUtil.writeNextSectionEnd(out, XML_TAG_SECURITY_PARAMS_LIST);
         }
 
-        private static void writeEncryptedBytesToXml(
-                XmlSerializer out, @Nullable WifiConfigStoreEncryptionUtil encryptionUtil,
-                String tag, byte[] data)
-                throws XmlPullParserException, IOException {
-            EncryptedData encryptedData = null;
-            if (encryptionUtil != null) {
-                encryptedData = encryptionUtil.encrypt(data);
-                if (encryptedData == null) {
-                    // We silently fail encryption failures!
-                    Log.wtf(TAG, "Encryption of " + tag + " failed");
-                }
-            }
-            if (encryptedData != null) {
-                XmlUtil.writeNextSectionStart(out, tag);
-                EncryptedDataXmlUtil.writeToXml(out, encryptedData);
-                XmlUtil.writeNextSectionEnd(out, tag);
-            } else {
-                XmlUtil.writeNextValue(out, tag, data);
-            }
-        }
-
-        /**
-         * Write dpp configuration and connection keys to the XML stream.
-         *
-         * If encryptionUtil is null or if encryption fails for some reason, the dpp
-         * keys are stored in plaintext, else the encrypted keys are stored.
-         */
-        private static void writeDppConfigurationToXml(
-                XmlSerializer out, WifiConfiguration configuration,
-                @Nullable WifiConfigStoreEncryptionUtil encryptionUtil)
-                throws XmlPullParserException, IOException {
-            writeEncryptedBytesToXml(out, encryptionUtil, XML_TAG_DPP_PRIVATE_EC_KEY,
-                    configuration.getDppPrivateEcKey());
-            writeEncryptedBytesToXml(out, encryptionUtil, XML_TAG_DPP_CONNECTOR,
-                    configuration.getDppConnector());
-            writeEncryptedBytesToXml(out, encryptionUtil, XML_TAG_DPP_CSIGN_KEY,
-                    configuration.getDppCSignKey());
-            writeEncryptedBytesToXml(out, encryptionUtil, XML_TAG_DPP_NET_ACCESS_KEY,
-                    configuration.getDppNetAccessKey());
-        }
-
         /**
          * Write the Configuration data elements that are common for backup & config store to the
          * XML stream.
@@ -558,8 +502,6 @@
             XmlUtil.writeNextValue(
                     out, XML_TAG_NUM_REBOOTS_SINCE_LAST_USE,
                     configuration.numRebootsSinceLastUse);
-            XmlUtil.writeNextValue(out, XML_TAG_IS_REPEATER_ENABLED,
-                    configuration.isRepeaterEnabled());
             writeSecurityParamsListToXml(out, configuration);
         }
 
@@ -591,7 +533,6 @@
                 throws XmlPullParserException, IOException {
             writeCommonElementsToXml(out, configuration, encryptionUtil);
             XmlUtil.writeNextValue(out, XML_TAG_IS_TRUSTED, configuration.trusted);
-            XmlUtil.writeNextValue(out, XML_TAG_IS_RESTRICTED, configuration.restricted);
             XmlUtil.writeNextValue(out, XML_TAG_IS_OEM_PAID, configuration.oemPaid);
             XmlUtil.writeNextValue(out, XML_TAG_IS_OEM_PRIVATE, configuration.oemPrivate);
             XmlUtil.writeNextValue(out, XML_TAG_IS_CARRIER_MERGED,
@@ -632,36 +573,6 @@
             XmlUtil.writeNextValue(out, XML_TAG_IS_MOST_RECENTLY_CONNECTED,
                     configuration.isMostRecentlyConnected);
             XmlUtil.writeNextValue(out, XML_TAG_SUBSCRIPTION_ID, configuration.subscriptionId);
-            if (configuration.getSubscriptionGroup() != null) {
-                XmlUtil.writeNextValue(out, XML_TAG_SUBSCRIPTION_GROUP,
-                        configuration.getSubscriptionGroup().toString());
-            }
-            if (configuration.getBssidAllowlistInternal() != null) {
-                XmlUtil.writeNextValue(out, XML_TAG_BSSID_ALLOW_LIST,
-                        covertMacAddressListToStringList(configuration
-                                .getBssidAllowlistInternal()));
-            }
-            writeDppConfigurationToXml(out, configuration, encryptionUtil);
-        }
-
-        private static List<String> covertMacAddressListToStringList(List<MacAddress> macList) {
-            List<String> bssidList = new ArrayList<>();
-            for (MacAddress address : macList) {
-                bssidList.add(address.toString());
-            }
-            return bssidList;
-        }
-
-        private static List<MacAddress> covertStringListToMacAddressList(List<String> stringList) {
-            List<MacAddress> macAddressList = new ArrayList<>();
-            for (String address : stringList) {
-                try {
-                    macAddressList.add(MacAddress.fromString(address));
-                } catch (Exception e) {
-                    Log.e(TAG, "Invalid BSSID String: " + address);
-                }
-            }
-            return macAddressList;
         }
 
         /**
@@ -725,19 +636,6 @@
             return params;
         }
 
-        private static byte[] readEncrytepdBytesFromXml(
-                @Nullable WifiConfigStoreEncryptionUtil encryptionUtil,
-                XmlPullParser in, int outerTagDepth)
-                throws XmlPullParserException, IOException {
-            if (encryptionUtil == null) {
-                throw new XmlPullParserException(
-                        "Encrypted preSharedKey section not expected");
-            }
-            EncryptedData encryptedData =
-                    EncryptedDataXmlUtil.parseFromXml(in, outerTagDepth + 1);
-            return encryptionUtil.decrypt(encryptedData);
-        }
-
         private static void parseSecurityParamsListFromXml(
                 XmlPullParser in, int outerTagDepth,
                 WifiConfiguration configuration)
@@ -779,9 +677,6 @@
             WifiConfiguration configuration = new WifiConfiguration();
             String configKeyInData = null;
             boolean macRandomizationSettingExists = false;
-            byte[] dppConnector = null;
-            byte[] dppCSign = null;
-            byte[] dppNetAccessKey = null;
 
             // Loop through and parse out all the elements from the stream within this section.
             while (!XmlUtil.isNextSectionEnd(in, outerTagDepth)) {
@@ -946,33 +841,6 @@
                             break;
                         case XML_TAG_IS_CARRIER_MERGED:
                             configuration.carrierMerged = (boolean) value;
-                            break;
-                        case XML_TAG_IS_RESTRICTED:
-                            configuration.restricted = (boolean) value;
-                            break;
-                        case XML_TAG_SUBSCRIPTION_GROUP:
-                            configuration.setSubscriptionGroup(
-                                    ParcelUuid.fromString((String) value));
-                            break;
-                        case XML_TAG_BSSID_ALLOW_LIST:
-                            configuration.setBssidAllowlist(
-                                    covertStringListToMacAddressList((List<String>) value));
-                            break;
-                        case XML_TAG_IS_REPEATER_ENABLED:
-                            configuration.setRepeaterEnabled((boolean) value);
-                            break;
-                        case XML_TAG_DPP_PRIVATE_EC_KEY:
-                            configuration.setDppConfigurator((byte[]) value);
-                            break;
-                        case XML_TAG_DPP_CONNECTOR:
-                            dppConnector = (byte[]) value;
-                            break;
-                        case XML_TAG_DPP_CSIGN_KEY:
-                            dppCSign = (byte[]) value;
-                            break;
-                        case XML_TAG_DPP_NET_ACCESS_KEY:
-                            dppNetAccessKey = (byte[]) value;
-                            break;
                         default:
                             Log.w(TAG, "Ignoring unknown value name found: " + valueName[0]);
                             break;
@@ -1000,22 +868,6 @@
                         case XML_TAG_SECURITY_PARAMS_LIST:
                             parseSecurityParamsListFromXml(in, outerTagDepth + 1, configuration);
                             break;
-                        case XML_TAG_DPP_PRIVATE_EC_KEY:
-                            configuration.setDppConfigurator(readEncrytepdBytesFromXml(
-                                    encryptionUtil, in, outerTagDepth));
-                            break;
-                        case XML_TAG_DPP_CONNECTOR:
-                            dppConnector = readEncrytepdBytesFromXml(encryptionUtil, in,
-                                    outerTagDepth);
-                            break;
-                        case XML_TAG_DPP_CSIGN_KEY:
-                            dppCSign = readEncrytepdBytesFromXml(encryptionUtil, in,
-                                    outerTagDepth);
-                            break;
-                        case XML_TAG_DPP_NET_ACCESS_KEY:
-                            dppNetAccessKey = readEncrytepdBytesFromXml(encryptionUtil, in,
-                                    outerTagDepth);
-                            break;
                         default:
                             Log.w(TAG, "Ignoring unknown tag found: " + tagName);
                             break;
@@ -1030,7 +882,6 @@
                 configuration.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_AUTO;
             }
             configuration.convertLegacyFieldsToSecurityParamsIfNeeded();
-            configuration.setDppConnectionKeys(dppConnector, dppCSign, dppNetAccessKey);
             return Pair.create(configKeyInData, configuration);
         }
     }
@@ -1422,8 +1273,6 @@
         public static final String XML_TAG_APP_INSTALLED_PRIVATE_KEY = "AppInstalledPrivateKey";
         public static final String XML_TAG_KEYCHAIN_KEY_ALIAS = "KeyChainAlias";
         public static final String XML_TAG_DECORATED_IDENTITY_PREFIX = "DecoratedIdentityPrefix";
-        public static final String XML_TAG_TRUST_ON_FIRST_USE = "TrustOnFirstUse";
-        public static final String XML_TAG_USER_APPROVE_NO_CA_CERT = "UserApproveNoCaCert";
 
         /**
          * Write password key to the XML stream.
@@ -1507,10 +1356,6 @@
                 XmlUtil.writeNextValue(out, XML_TAG_DECORATED_IDENTITY_PREFIX,
                         enterpriseConfig.getDecoratedIdentityPrefix());
             }
-            XmlUtil.writeNextValue(out, XML_TAG_TRUST_ON_FIRST_USE,
-                    enterpriseConfig.isTrustOnFirstUseEnabled());
-            XmlUtil.writeNextValue(out, XML_TAG_USER_APPROVE_NO_CA_CERT,
-                    enterpriseConfig.isUserApproveNoCaCert());
         }
 
         /**
@@ -1627,12 +1472,6 @@
                                 enterpriseConfig.setDecoratedIdentityPrefix((String) value);
                             }
                             break;
-                        case XML_TAG_TRUST_ON_FIRST_USE:
-                            enterpriseConfig.enableTrustOnFirstUse((boolean) value);
-                            break;
-                        case XML_TAG_USER_APPROVE_NO_CA_CERT:
-                            enterpriseConfig.setUserApproveNoCaCert((boolean) value);
-                            break;
                         default:
                             Log.w(TAG, "Ignoring unknown value name found: " + valueName[0]);
                             break;
@@ -1745,36 +1584,8 @@
          */
         public static final String XML_TAG_CLIENT_MACADDRESS = "ClientMacAddress";
         public static final String XML_TAG_BAND_CHANNEL = "BandChannel";
-        public static final String XML_TAG_SSID = "SSID"; // Use XML_TAG_WIFI_SSID instead
-        public static final String XML_TAG_WIFI_SSID = "WifiSsid";
-        public static final String XML_TAG_BSSID = "Bssid";
-        public static final String XML_TAG_BAND = "Band";
-        public static final String XML_TAG_CHANNEL = "Channel";
-        public static final String XML_TAG_HIDDEN_SSID = "HiddenSSID";
-        public static final String XML_TAG_SECURITY_TYPE = "SecurityType";
-        public static final String XML_TAG_WPA2_PASSPHRASE = "Wpa2Passphrase";
-        public static final String XML_TAG_AP_BAND = "ApBand";
-        public static final String XML_TAG_PASSPHRASE = "Passphrase";
-        public static final String XML_TAG_MAX_NUMBER_OF_CLIENTS = "MaxNumberOfClients";
-        public static final String XML_TAG_AUTO_SHUTDOWN_ENABLED = "AutoShutdownEnabled";
-        public static final String XML_TAG_SHUTDOWN_TIMEOUT_MILLIS = "ShutdownTimeoutMillis";
-        public static final String XML_TAG_CLIENT_CONTROL_BY_USER = "ClientControlByUser";
-        public static final String XML_TAG_BLOCKED_CLIENT_LIST = "BlockedClientList";
-        public static final String XML_TAG_ALLOWED_CLIENT_LIST = "AllowedClientList";
-        public static final String XML_TAG_BRIDGED_MODE_OPPORTUNISTIC_SHUTDOWN_ENABLED =
-                "BridgedModeOpportunisticShutdownEnabled";
-        public static final String XML_TAG_MAC_RAMDOMIZATION_SETTING = "MacRandomizationSetting";
-        public static final String XML_TAG_BAND_CHANNEL_MAP = "BandChannelMap";
-        public static final String XML_TAG_80211_AX_ENABLED = "80211axEnabled";
-        public static final String XML_TAG_80211_BE_ENABLED = "80211beEnabled";
-        public static final String XML_TAG_USER_CONFIGURATION = "UserConfiguration";
-        public static final String XML_TAG_BRIDGED_MODE_OPPORTUNISTIC_SHUTDOWN_TIMEOUT_MILLIS =
-                "BridgedModeOpportunisticShutdownTimeoutMillis";
-        public static final String XML_TAG_VENDOR_ELEMENT = "VendorElement";
-        public static final String XML_TAG_VENDOR_ELEMENTS = "VendorElements";
-        public static final String XML_TAG_PERSISTENT_RANDOMIZED_MAC_ADDRESS =
-                "PersistentRandomizedMacAddress";
-
+        private static final String XML_TAG_BAND = "Band";
+        private static final String XML_TAG_CHANNEL = "Channel";
 
         /**
          * Parses the client list from the provided XML stream to a ArrayList object.
@@ -1821,48 +1632,6 @@
             }
         }
 
-        /**
-         * Write the SoftApConfiguration vendor elements list information elements to the XML
-         *
-         * @param out XmlSerializer instance pointing to the XML stream
-         * @param elements Vendor elements list
-         */
-        public static void writeVendorElementsSetToXml(
-                XmlSerializer out, List<ScanResult.InformationElement> elements)
-                throws XmlPullParserException, IOException {
-            for (ScanResult.InformationElement e : elements) {
-                XmlUtil.writeNextValue(out, XML_TAG_VENDOR_ELEMENT,
-                        InformationElementUtil.toHexString(e));
-            }
-        }
-
-        /**
-         * Parses the vendor elements from the provided XML stream to HashSet object.
-         *
-         * @param in XmlPullParser instance pointing to the XML stream
-         * @param outerTagDepth depth of the outer tag in the XML document
-         * @return HashSet object if parsing is successful, empty set otherwise
-         */
-        public static List<ScanResult.InformationElement> parseVendorElementsFromXml(
-                XmlPullParser in, int outerTagDepth)
-                throws XmlPullParserException, IOException, IllegalArgumentException {
-            List<ScanResult.InformationElement> elements = new ArrayList<>();
-            while (!XmlUtil.isNextSectionEnd(in, outerTagDepth)) {
-                String[] valueName = new String[1];
-                Object value = XmlUtil.readCurrentValue(in, valueName);
-                if (valueName[0] == null) {
-                    throw new XmlPullParserException("Missing value name");
-                }
-                if (XML_TAG_VENDOR_ELEMENT.equals(valueName[0])) {
-                    ScanResult.InformationElement[] data =
-                            InformationElementUtil.parseInformationElements((String) value);
-                    elements.addAll(Arrays.asList(data));
-                } else {
-                    Log.e(TAG, "Unknown value name found: " + valueName[0]);
-                }
-            }
-            return elements;
-        }
 
         /**
          * Parses the band and channel from the provided XML stream to a SparseIntArray object.
@@ -1921,315 +1690,6 @@
                 XmlUtil.writeNextSectionEnd(out, XML_TAG_BAND_CHANNEL);
             }
         }
-
-        /**
-         * Write the SoftApConfiguration data elements to the XML stream.
-         *
-         * @param out          XmlSerializer instance pointing to the XML stream.
-         * @param softApConfig configuration of the Soft AP.
-         */
-        public static void writeSoftApConfigurationToXml(@NonNull XmlSerializer out,
-                @NonNull SoftApConfiguration softApConfig)
-                throws XmlPullParserException, IOException {
-            XmlUtil.writeNextValue(out, XML_TAG_WIFI_SSID, softApConfig.getWifiSsid().toString());
-            if (softApConfig.getBssid() != null) {
-                XmlUtil.writeNextValue(out, XML_TAG_BSSID, softApConfig.getBssid().toString());
-            }
-            if (!SdkLevel.isAtLeastS()) {
-                // Band and channel change to store in Tag:BandChannelMap from S.
-                XmlUtil.writeNextValue(out, XML_TAG_AP_BAND, softApConfig.getBand());
-                XmlUtil.writeNextValue(out, XML_TAG_CHANNEL, softApConfig.getChannel());
-            }
-            XmlUtil.writeNextValue(out, XML_TAG_HIDDEN_SSID, softApConfig.isHiddenSsid());
-            XmlUtil.writeNextValue(out, XML_TAG_SECURITY_TYPE, softApConfig.getSecurityType());
-            if (!ApConfigUtil.isNonPasswordAP(softApConfig.getSecurityType())) {
-                XmlUtil.writeNextValue(out, XML_TAG_PASSPHRASE,
-                        softApConfig.getPassphrase());
-            }
-
-            XmlUtil.writeNextValue(out, XML_TAG_MAX_NUMBER_OF_CLIENTS,
-                    softApConfig.getMaxNumberOfClients());
-            XmlUtil.writeNextValue(out, XML_TAG_CLIENT_CONTROL_BY_USER,
-                    softApConfig.isClientControlByUserEnabled());
-            XmlUtil.writeNextValue(out, XML_TAG_AUTO_SHUTDOWN_ENABLED,
-                    softApConfig.isAutoShutdownEnabled());
-            XmlUtil.writeNextValue(out, XML_TAG_SHUTDOWN_TIMEOUT_MILLIS,
-                    softApConfig.getShutdownTimeoutMillis());
-            XmlUtil.writeNextSectionStart(out, XML_TAG_BLOCKED_CLIENT_LIST);
-            XmlUtil.SoftApConfigurationXmlUtil.writeClientListToXml(out,
-                    softApConfig.getBlockedClientList());
-            XmlUtil.writeNextSectionEnd(out, XML_TAG_BLOCKED_CLIENT_LIST);
-
-            XmlUtil.writeNextSectionStart(out, XML_TAG_ALLOWED_CLIENT_LIST);
-            XmlUtil.SoftApConfigurationXmlUtil.writeClientListToXml(out,
-                    softApConfig.getAllowedClientList());
-            XmlUtil.writeNextSectionEnd(out, XML_TAG_ALLOWED_CLIENT_LIST);
-            if (SdkLevel.isAtLeastS()) {
-                XmlUtil.writeNextValue(out, XML_TAG_BRIDGED_MODE_OPPORTUNISTIC_SHUTDOWN_ENABLED,
-                        softApConfig.isBridgedModeOpportunisticShutdownEnabled());
-                XmlUtil.writeNextValue(out, XML_TAG_MAC_RAMDOMIZATION_SETTING,
-                        softApConfig.getMacRandomizationSetting());
-
-                XmlUtil.writeNextSectionStart(out, XML_TAG_BAND_CHANNEL_MAP);
-                XmlUtil.SoftApConfigurationXmlUtil.writeChannelsToXml(out,
-                        softApConfig.getChannels());
-                XmlUtil.writeNextSectionEnd(out, XML_TAG_BAND_CHANNEL_MAP);
-                XmlUtil.writeNextValue(out, XML_TAG_80211_AX_ENABLED,
-                        softApConfig.isIeee80211axEnabled());
-                XmlUtil.writeNextValue(out, XML_TAG_USER_CONFIGURATION,
-                        softApConfig.isUserConfiguration());
-            }
-            if (SdkLevel.isAtLeastT()) {
-                XmlUtil.writeNextValue(out,
-                        XML_TAG_BRIDGED_MODE_OPPORTUNISTIC_SHUTDOWN_TIMEOUT_MILLIS,
-                        softApConfig.getBridgedModeOpportunisticShutdownTimeoutMillisInternal());
-                XmlUtil.writeNextSectionStart(out, XML_TAG_VENDOR_ELEMENTS);
-                XmlUtil.SoftApConfigurationXmlUtil.writeVendorElementsSetToXml(out,
-                        softApConfig.getVendorElementsInternal());
-                XmlUtil.writeNextSectionEnd(out, XML_TAG_VENDOR_ELEMENTS);
-                XmlUtil.writeNextValue(out, XML_TAG_80211_BE_ENABLED,
-                        softApConfig.isIeee80211beEnabled());
-                if (softApConfig.getPersistentRandomizedMacAddress() != null) {
-                    XmlUtil.writeNextValue(out, XML_TAG_PERSISTENT_RANDOMIZED_MAC_ADDRESS,
-                            softApConfig.getPersistentRandomizedMacAddress().toString());
-                }
-            }
-        } // End of writeSoftApConfigurationToXml
-
-        /**
-         * Returns configuration of the SoftAp from the XML stream.
-         *
-         * @param in XmlPullParser instance pointing to the XML stream.
-         * @param outerTagDepth depth of the outer tag in the XML document.
-         * @param settingsMigrationDataHolder the class instance of SettingsMigrationDataHolder
-         */
-        @Nullable
-        public static SoftApConfiguration parseFromXml(XmlPullParser in, int outerTagDepth,
-                SettingsMigrationDataHolder settingsMigrationDataHolder)
-                throws XmlPullParserException, IOException  {
-            SoftApConfiguration.Builder softApConfigBuilder = new SoftApConfiguration.Builder();
-            int securityType = SoftApConfiguration.SECURITY_TYPE_OPEN;
-            String passphrase = null;
-            // SSID may be retrieved from the old encoding (XML_TAG_SSID) or the new encoding
-            // (XML_TAG_WIFI_SSID).
-            boolean hasSsid = false;
-            String bssid = null;
-            // Note that, during deserialization, we may read the old band encoding (XML_TAG_BAND)
-            // or the new band encoding (XML_TAG_AP_BAND) that is used after the introduction of the
-            // 6GHz band. If the old encoding is found, a conversion is done.
-            int channel = -1;
-            int apBand = -1;
-            boolean hasBandChannelMap = false;
-            List<MacAddress> blockedList = new ArrayList<>();
-            List<MacAddress> allowedList = new ArrayList<>();
-            boolean autoShutdownEnabledTagPresent = false;
-            try {
-                while (!XmlUtil.isNextSectionEnd(in, outerTagDepth)) {
-                    if (in.getAttributeValue(null, "name") != null) {
-                        String[] valueName = new String[1];
-                        Object value = XmlUtil.readCurrentValue(in, valueName);
-                        if (TextUtils.isEmpty(valueName[0])) {
-                            throw new XmlPullParserException("Missing value name");
-                        }
-                        switch (valueName[0]) {
-                            case XML_TAG_SSID:
-                                hasSsid = true;
-                                softApConfigBuilder.setSsid((String) value);
-                                break;
-                            case XML_TAG_WIFI_SSID:
-                                hasSsid = true;
-                                final WifiSsid wifiSsid = WifiSsid.fromString((String) value);
-                                if (SdkLevel.isAtLeastT()) {
-                                    softApConfigBuilder.setWifiSsid(wifiSsid);
-                                } else {
-                                    // If the SSID is non-UTF-8, then use WifiManager.UNKNOWN_SSID.
-                                    // This should not happen since non-UTF-8 SSIDs may only be set
-                                    // with SoftApConfiguration#Builder#setWifiSsid(WifiSsid),
-                                    // which is only available in T and above.
-                                    final CharSequence utf8Ssid = wifiSsid.getUtf8Text();
-                                    softApConfigBuilder.setSsid(utf8Ssid != null
-                                            ? utf8Ssid.toString() : WifiManager.UNKNOWN_SSID);
-                                }
-                                break;
-                            case XML_TAG_BSSID:
-                                bssid = (String) value;
-                                softApConfigBuilder.setBssid(MacAddress.fromString(bssid));
-                                break;
-                            case XML_TAG_BAND:
-                                apBand = ApConfigUtil.convertWifiConfigBandToSoftApConfigBand(
-                                        (int) value);
-                                break;
-                            case XML_TAG_AP_BAND:
-                                apBand = (int) value;
-                                break;
-                            case XML_TAG_CHANNEL:
-                                channel = (int) value;
-                                break;
-                            case XML_TAG_HIDDEN_SSID:
-                                softApConfigBuilder.setHiddenSsid((boolean) value);
-                                break;
-                            case XML_TAG_SECURITY_TYPE:
-                                securityType = (int) value;
-                                break;
-                            case XML_TAG_WPA2_PASSPHRASE:
-                            case XML_TAG_PASSPHRASE:
-                                passphrase = (String) value;
-                                break;
-                            case XML_TAG_MAX_NUMBER_OF_CLIENTS:
-                                softApConfigBuilder.setMaxNumberOfClients((int) value);
-                                break;
-                            case XML_TAG_AUTO_SHUTDOWN_ENABLED:
-                                softApConfigBuilder.setAutoShutdownEnabled((boolean) value);
-                                autoShutdownEnabledTagPresent = true;
-                                break;
-                            case XML_TAG_SHUTDOWN_TIMEOUT_MILLIS:
-                                long shutDownMillis = 0;
-                                if (value instanceof Integer) {
-                                    shutDownMillis = Long.valueOf((int) value);
-                                } else if (value instanceof Long) {
-                                    shutDownMillis = (long) value;
-                                }
-                                if (shutDownMillis == 0
-                                        && Compatibility.isChangeEnabled(
-                                        SoftApConfiguration.REMOVE_ZERO_FOR_TIMEOUT_SETTING)) {
-                                    shutDownMillis = SoftApConfiguration.DEFAULT_TIMEOUT;
-                                }
-                                softApConfigBuilder.setShutdownTimeoutMillis(shutDownMillis);
-                                break;
-                            case XML_TAG_CLIENT_CONTROL_BY_USER:
-                                softApConfigBuilder.setClientControlByUserEnabled((boolean) value);
-                                break;
-                            case XML_TAG_BRIDGED_MODE_OPPORTUNISTIC_SHUTDOWN_ENABLED:
-                                if (SdkLevel.isAtLeastS()) {
-                                    softApConfigBuilder.setBridgedModeOpportunisticShutdownEnabled(
-                                            (boolean) value);
-                                }
-                                break;
-                            case XML_TAG_MAC_RAMDOMIZATION_SETTING:
-                                if (SdkLevel.isAtLeastS()) {
-                                    softApConfigBuilder.setMacRandomizationSetting((int) value);
-                                }
-                                break;
-                            case XML_TAG_80211_AX_ENABLED:
-                                if (SdkLevel.isAtLeastS()) {
-                                    softApConfigBuilder.setIeee80211axEnabled((boolean) value);
-                                }
-                                break;
-                            case XML_TAG_80211_BE_ENABLED:
-                                if (SdkLevel.isAtLeastT()) {
-                                    softApConfigBuilder.setIeee80211beEnabled((boolean) value);
-                                }
-                                break;
-                            case XML_TAG_USER_CONFIGURATION:
-                                if (SdkLevel.isAtLeastS()) {
-                                    softApConfigBuilder.setUserConfiguration((boolean) value);
-                                }
-                                break;
-                            case XML_TAG_BRIDGED_MODE_OPPORTUNISTIC_SHUTDOWN_TIMEOUT_MILLIS:
-                                if (SdkLevel.isAtLeastT()) {
-                                    long bridgedTimeout = (long) value;
-                                    bridgedTimeout = bridgedTimeout == 0
-                                            ? SoftApConfiguration.DEFAULT_TIMEOUT : bridgedTimeout;
-                                    softApConfigBuilder
-                                            .setBridgedModeOpportunisticShutdownTimeoutMillis(
-                                                    bridgedTimeout);
-                                }
-                                break;
-                            case XML_TAG_PERSISTENT_RANDOMIZED_MAC_ADDRESS:
-                                if (SdkLevel.isAtLeastT()) {
-                                    softApConfigBuilder.setRandomizedMacAddress(
-                                            MacAddress.fromString((String) value));
-                                }
-                                break;
-                            default:
-                                Log.w(TAG, "Ignoring unknown value name " + valueName[0]);
-                                break;
-                        }
-                    } else {
-                        String tagName = in.getName();
-                        List<MacAddress> parseredList;
-                        if (tagName == null) {
-                            throw new XmlPullParserException("Unexpected null tag found");
-                        }
-                        switch (tagName) {
-                            case XML_TAG_BLOCKED_CLIENT_LIST:
-                                parseredList =
-                                        XmlUtil.SoftApConfigurationXmlUtil.parseClientListFromXml(
-                                        in, outerTagDepth + 1);
-                                if (parseredList != null) {
-                                    blockedList = new ArrayList<>(parseredList);
-                                }
-                                break;
-                            case XML_TAG_ALLOWED_CLIENT_LIST:
-                                parseredList =
-                                        XmlUtil.SoftApConfigurationXmlUtil.parseClientListFromXml(
-                                        in, outerTagDepth + 1);
-                                if (parseredList != null) {
-                                    allowedList = new ArrayList<>(parseredList);
-                                }
-                                break;
-                            case XML_TAG_BAND_CHANNEL_MAP:
-                                if (SdkLevel.isAtLeastS()) {
-                                    hasBandChannelMap = true;
-                                    SparseIntArray channels = XmlUtil.SoftApConfigurationXmlUtil
-                                            .parseChannelsFromXml(in, outerTagDepth + 1);
-                                    softApConfigBuilder.setChannels(channels);
-                                }
-                                break;
-                            case XML_TAG_VENDOR_ELEMENTS:
-                                if (SdkLevel.isAtLeastT()) {
-                                    softApConfigBuilder.setVendorElements(
-                                            SoftApConfigurationXmlUtil.parseVendorElementsFromXml(
-                                                    in, outerTagDepth + 1));
-                                }
-                                break;
-                            default:
-                                Log.w(TAG, "Ignoring unknown tag found: " + tagName);
-                                break;
-                        }
-                    }
-                }
-                softApConfigBuilder.setBlockedClientList(blockedList);
-                softApConfigBuilder.setAllowedClientList(allowedList);
-                if (!hasBandChannelMap) {
-                    // Set channel and band
-                    if (channel == 0) {
-                        softApConfigBuilder.setBand(apBand);
-                    } else {
-                        softApConfigBuilder.setChannel(channel, apBand);
-                    }
-                }
-
-                // We should at least have an SSID restored from store.
-                if (!hasSsid) {
-                    Log.e(TAG, "Failed to parse SSID");
-                    return null;
-                }
-                if (!ApConfigUtil.isNonPasswordAP(securityType)) {
-                    softApConfigBuilder.setPassphrase(passphrase, securityType);
-                }
-                if (!autoShutdownEnabledTagPresent) {
-                    // Migrate data out of settings.
-                    WifiMigration.SettingsMigrationData migrationData =
-                            settingsMigrationDataHolder.retrieveData();
-                    if (migrationData == null) {
-                        Log.e(TAG, "No migration data present");
-                    } else {
-                        softApConfigBuilder.setAutoShutdownEnabled(
-                                migrationData.isSoftApTimeoutEnabled());
-                    }
-                }
-                if (bssid != null && SdkLevel.isAtLeastS()) {
-                    // Force MAC randomization setting to none when BSSID is configured
-                    softApConfigBuilder.setMacRandomizationSetting(
-                            SoftApConfiguration.RANDOMIZATION_NONE);
-                }
-            } catch (IllegalArgumentException e) {
-                Log.e(TAG, "Failed to parse configuration " + e);
-                return null;
-            }
-            return softApConfigBuilder.build();
-        } // End of parseFromXml
     }
 }
 
diff --git a/service/proto/src/metrics.proto b/service/proto/src/metrics.proto
index 09a596f..cc8b154 100644
--- a/service/proto/src/metrics.proto
+++ b/service/proto/src/metrics.proto
@@ -1044,9 +1044,6 @@
 
     // The reason code if AP disconnects STA during the connecting state.
     DISCONNECTION_NON_LOCAL = 6;
-
-    // The reason code if a user rejects this connection.
-    AUTH_FAILURE_REJECTED_BY_USER = 7;
   }
 
   // Entity that recommended connecting to this network.
@@ -1458,8 +1455,6 @@
     // Connected to a network that's not found in the database.
     DISCONNECT_UNKNOWN_NETWORK = 15;
 
-    // The network has been marked as untrusted.
-    DISCONNECT_NETWORK_UNTRUSTED = 16;
   }
 
   // Authentication Failure reasons as reported through the API.
@@ -3018,10 +3013,6 @@
 
   // Failures that happen at the connectivity layer.
   optional ConnectivityLevelFailure connectivity_level_failure_code = 5;
-
-  // Group role. This could be unknown with connect() call when the WifiConfig doesn't have the
-  // credential.
-  optional GroupEvent.GroupRole group_role = 6;
 }
 
 // GroupEvent tracking group information from GroupStarted to GroupRemoved.
@@ -3032,8 +3023,6 @@
     GROUP_OWNER = 0;
 
     GROUP_CLIENT = 1;
-
-    GROUP_UNKNOWN = 2;
   }
 
   // The ID of network in supplicant for this group.
diff --git a/service/tests/mts/Android.bp b/service/tests/mts/Android.bp
index e016740..f29908a 100644
--- a/service/tests/mts/Android.bp
+++ b/service/tests/mts/Android.bp
@@ -24,8 +24,7 @@
     defaults: ["cts_defaults"],
 
     min_sdk_version: "30",
-    target_sdk_version: "33",
-    compile_multilib: "both",
+    target_sdk_version: "30",
 
     libs: [
         "org.apache.http.legacy",
diff --git a/service/tests/wifitests/Android.bp b/service/tests/wifitests/Android.bp
index 479e3d9..cedcb61 100644
--- a/service/tests/wifitests/Android.bp
+++ b/service/tests/wifitests/Android.bp
@@ -72,7 +72,7 @@
     compile_multilib: "both",
 
     min_sdk_version: "30",
-    target_sdk_version: "33",
+    target_sdk_version: "30",
     privileged: true,
     test_suites: [
         "general-tests",
@@ -105,6 +105,12 @@
             "com.android.server.wifi.BackupManagerProxy",
             "com.android.server.wifi.BackupManagerProxy$*",
             "com.android.server.wifi.BackupManagerProxy.**",
+            "com.android.server.wifi.BaseWifiService",
+            "com.android.server.wifi.BaseWifiService$*",
+            "com.android.server.wifi.BaseWifiService.**",
+            "com.android.server.wifi.WifiBlocklistMonitor",
+            "com.android.server.wifi.WifiBlocklistMonitor$*",
+            "com.android.server.wifi.WifiBlocklistMonitor.**",
             "com.android.server.wifi.BubbleFunScorer",
             "com.android.server.wifi.BubbleFunScorer$*",
             "com.android.server.wifi.BubbleFunScorer.**",
@@ -117,24 +123,12 @@
             "com.android.server.wifi.ClientMode",
             "com.android.server.wifi.ClientMode$*",
             "com.android.server.wifi.ClientMode.**",
-            "com.android.server.wifi.ClientModeDefaults",
-            "com.android.server.wifi.ClientModeDefaults$*",
-            "com.android.server.wifi.ClientModeDefaults.**",
             "com.android.server.wifi.ClientModeImpl",
             "com.android.server.wifi.ClientModeImpl$*",
             "com.android.server.wifi.ClientModeImpl.**",
-            "com.android.server.wifi.ClientModeImplListener",
-            "com.android.server.wifi.ClientModeImplListener$*",
-            "com.android.server.wifi.ClientModeImplListener.**",
-            "com.android.server.wifi.ClientModeImplMonitor",
-            "com.android.server.wifi.ClientModeImplMonitor$*",
-            "com.android.server.wifi.ClientModeImplMonitor.**",
             "com.android.server.wifi.ClientModeManager",
             "com.android.server.wifi.ClientModeManager$*",
             "com.android.server.wifi.ClientModeManager.**",
-            "com.android.server.wifi.ClientModeManagerBroadcastQueue",
-            "com.android.server.wifi.ClientModeManagerBroadcastQueue$*",
-            "com.android.server.wifi.ClientModeManagerBroadcastQueue.**",
             "com.android.server.wifi.Clock",
             "com.android.server.wifi.Clock$*",
             "com.android.server.wifi.Clock.**",
@@ -183,12 +177,6 @@
             "com.android.server.wifi.ExtendedWifiInfo",
             "com.android.server.wifi.ExtendedWifiInfo$*",
             "com.android.server.wifi.ExtendedWifiInfo.**",
-            "com.android.server.wifi.ExternalPnoScanRequestManager",
-            "com.android.server.wifi.ExternalPnoScanRequestManager$*",
-            "com.android.server.wifi.ExternalPnoScanRequestManager.**",
-            "com.android.server.wifi.ExternalScoreUpdateObserverProxy",
-            "com.android.server.wifi.ExternalScoreUpdateObserverProxy$*",
-            "com.android.server.wifi.ExternalScoreUpdateObserverProxy.**",
             "com.android.server.wifi.FakeWifiLog",
             "com.android.server.wifi.FakeWifiLog$*",
             "com.android.server.wifi.FakeWifiLog.**",
@@ -198,36 +186,15 @@
             "com.android.server.wifi.HalDeviceManager",
             "com.android.server.wifi.HalDeviceManager$*",
             "com.android.server.wifi.HalDeviceManager.**",
-            "com.android.server.wifi.HalDeviceManagerUtil",
-            "com.android.server.wifi.HalDeviceManagerUtil$*",
-            "com.android.server.wifi.HalDeviceManagerUtil.**",
             "com.android.server.wifi.HostapdHal",
             "com.android.server.wifi.HostapdHal$*",
             "com.android.server.wifi.HostapdHal.**",
-            "com.android.server.wifi.HostapdHalAidlImp",
-            "com.android.server.wifi.HostapdHalAidlImp$*",
-            "com.android.server.wifi.HostapdHalAidlImp.**",
-            "com.android.server.wifi.HostapdHalHidlImp",
-            "com.android.server.wifi.HostapdHalHidlImp$*",
-            "com.android.server.wifi.HostapdHalHidlImp.**",
-            "com.android.server.wifi.IHostapdHal",
-            "com.android.server.wifi.IHostapdHal$*",
-            "com.android.server.wifi.IHostapdHal.**",
             "com.android.server.wifi.IMSIParameter",
             "com.android.server.wifi.IMSIParameter$*",
             "com.android.server.wifi.IMSIParameter.**",
-            "com.android.server.wifi.ISupplicantStaIfaceHal",
-            "com.android.server.wifi.ISupplicantStaIfaceHal$*",
-            "com.android.server.wifi.ISupplicantStaIfaceHal.**",
-            "com.android.server.wifi.ImsiPrivacyProtectionExemptionStoreData",
-            "com.android.server.wifi.ImsiPrivacyProtectionExemptionStoreData$*",
-            "com.android.server.wifi.ImsiPrivacyProtectionExemptionStoreData.**",
-            "com.android.server.wifi.InsecureEapNetworkHandler",
-            "com.android.server.wifi.InsecureEapNetworkHandler$*",
-            "com.android.server.wifi.InsecureEapNetworkHandler.**",
-            "com.android.server.wifi.InterfaceConflictManager",
-            "com.android.server.wifi.InterfaceConflictManager$*",
-            "com.android.server.wifi.InterfaceConflictManager.**",
+            "com.android.server.wifi.WifiCarrierInfoStoreManagerData",
+            "com.android.server.wifi.WifiCarrierInfoStoreManagerData$*",
+            "com.android.server.wifi.WifiCarrierInfoStoreManagerData.**",
             "com.android.server.wifi.LastMileLogger",
             "com.android.server.wifi.LastMileLogger$*",
             "com.android.server.wifi.LastMileLogger.**",
@@ -243,9 +210,6 @@
             "com.android.server.wifi.MacAddressUtil",
             "com.android.server.wifi.MacAddressUtil$*",
             "com.android.server.wifi.MacAddressUtil.**",
-            "com.android.server.wifi.MakeBeforeBreakManager",
-            "com.android.server.wifi.MakeBeforeBreakManager$*",
-            "com.android.server.wifi.MakeBeforeBreakManager.**",
             "com.android.server.wifi.MboOceConstants",
             "com.android.server.wifi.MboOceConstants$*",
             "com.android.server.wifi.MboOceConstants.**",
@@ -255,15 +219,6 @@
             "com.android.server.wifi.MemoryStoreImpl",
             "com.android.server.wifi.MemoryStoreImpl$*",
             "com.android.server.wifi.MemoryStoreImpl.**",
-            "com.android.server.wifi.MultiInternetManager",
-            "com.android.server.wifi.MultiInternetManager$*",
-            "com.android.server.wifi.MultiInternetManager.**",
-            "com.android.server.wifi.MultiInternetWifiNetworkFactory",
-            "com.android.server.wifi.MultiInternetWifiNetworkFactory$*",
-            "com.android.server.wifi.MultiInternetWifiNetworkFactory.**",
-            "com.android.server.wifi.NetworkConnectionEventInfo",
-            "com.android.server.wifi.NetworkConnectionEventInfo$*",
-            "com.android.server.wifi.NetworkConnectionEventInfo.**",
             "com.android.server.wifi.NetworkListSharedStoreData",
             "com.android.server.wifi.NetworkListSharedStoreData$*",
             "com.android.server.wifi.NetworkListSharedStoreData.**",
@@ -288,30 +243,15 @@
             "com.android.server.wifi.NoLogMessage",
             "com.android.server.wifi.NoLogMessage$*",
             "com.android.server.wifi.NoLogMessage.**",
-            "com.android.server.wifi.NonCarrierMergedNetworksStatusTracker",
-            "com.android.server.wifi.NonCarrierMergedNetworksStatusTracker$*",
-            "com.android.server.wifi.NonCarrierMergedNetworksStatusTracker.**",
-            "com.android.server.wifi.OemWifiNetworkFactory",
-            "com.android.server.wifi.OemWifiNetworkFactory$*",
-            "com.android.server.wifi.OemWifiNetworkFactory.**",
             "com.android.server.wifi.OpenNetworkNotifier",
             "com.android.server.wifi.OpenNetworkNotifier$*",
             "com.android.server.wifi.OpenNetworkNotifier.**",
-            "com.android.server.wifi.PmkCacheManager",
-            "com.android.server.wifi.PmkCacheManager$*",
-            "com.android.server.wifi.PmkCacheManager.**",
             "com.android.server.wifi.PropertyService",
             "com.android.server.wifi.PropertyService$*",
             "com.android.server.wifi.PropertyService.**",
-            "com.android.server.wifi.QosPolicyRequestHandler",
-            "com.android.server.wifi.QosPolicyRequestHandler$*",
-            "com.android.server.wifi.QosPolicyRequestHandler.**",
             "com.android.server.wifi.RandomizedMacStoreData",
             "com.android.server.wifi.RandomizedMacStoreData$*",
             "com.android.server.wifi.RandomizedMacStoreData.**",
-            "com.android.server.wifi.RestrictedWifiNetworkFactory",
-            "com.android.server.wifi.RestrictedWifiNetworkFactory$*",
-            "com.android.server.wifi.RestrictedWifiNetworkFactory.**",
             "com.android.server.wifi.SarInfo",
             "com.android.server.wifi.SarInfo$*",
             "com.android.server.wifi.SarInfo.**",
@@ -339,6 +279,9 @@
             "com.android.server.wifi.ScoreCardBasedScorer",
             "com.android.server.wifi.ScoreCardBasedScorer$*",
             "com.android.server.wifi.ScoreCardBasedScorer.**",
+            "com.android.server.wifi.ScoredNetworkNominator",
+            "com.android.server.wifi.ScoredNetworkNominator$*",
+            "com.android.server.wifi.ScoredNetworkNominator.**",
             "com.android.server.wifi.ScoringParams",
             "com.android.server.wifi.ScoringParams$*",
             "com.android.server.wifi.ScoringParams.**",
@@ -369,51 +312,24 @@
             "com.android.server.wifi.StateChangeResult",
             "com.android.server.wifi.StateChangeResult$*",
             "com.android.server.wifi.StateChangeResult.**",
-            "com.android.server.wifi.SupplicantEventInfo",
-            "com.android.server.wifi.SupplicantEventInfo$*",
-            "com.android.server.wifi.SupplicantEventInfo.**",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackAidlImpl",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackAidlImpl$*",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackAidlImpl.**",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlImpl",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlImpl$*",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlImpl.**",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_1Impl",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_1Impl$*",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_1Impl.**",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_2Impl",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_2Impl$*",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_2Impl.**",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_3Impl",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_3Impl$*",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_3Impl.**",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_4Impl",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_4Impl$*",
-            "com.android.server.wifi.SupplicantStaIfaceCallbackHidlV1_4Impl.**",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackImpl",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackImpl$*",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackImpl.**",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackV1_1Impl",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackV1_1Impl$*",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackV1_1Impl.**",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackV1_2Impl",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackV1_2Impl$*",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackV1_2Impl.**",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackV1_3Impl",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackV1_3Impl$*",
+            "com.android.server.wifi.SupplicantStaIfaceCallbackV1_3Impl.**",
             "com.android.server.wifi.SupplicantStaIfaceHal",
             "com.android.server.wifi.SupplicantStaIfaceHal$*",
             "com.android.server.wifi.SupplicantStaIfaceHal.**",
-            "com.android.server.wifi.SupplicantStaIfaceHalAidlImpl",
-            "com.android.server.wifi.SupplicantStaIfaceHalAidlImpl$*",
-            "com.android.server.wifi.SupplicantStaIfaceHalAidlImpl.**",
-            "com.android.server.wifi.SupplicantStaIfaceHalHidlImpl",
-            "com.android.server.wifi.SupplicantStaIfaceHalHidlImpl$*",
-            "com.android.server.wifi.SupplicantStaIfaceHalHidlImpl.**",
-            "com.android.server.wifi.SupplicantStaNetworkCallbackAidlImpl",
-            "com.android.server.wifi.SupplicantStaNetworkCallbackAidlImpl$*",
-            "com.android.server.wifi.SupplicantStaNetworkCallbackAidlImpl.**",
-            "com.android.server.wifi.SupplicantStaNetworkCallbackHidlImpl",
-            "com.android.server.wifi.SupplicantStaNetworkCallbackHidlImpl$*",
-            "com.android.server.wifi.SupplicantStaNetworkCallbackHidlImpl.**",
-            "com.android.server.wifi.SupplicantStaNetworkCallbackHidlV1_4Impl",
-            "com.android.server.wifi.SupplicantStaNetworkCallbackHidlV1_4Impl$*",
-            "com.android.server.wifi.SupplicantStaNetworkCallbackHidlV1_4Impl.**",
-            "com.android.server.wifi.SupplicantStaNetworkHalAidlImpl",
-            "com.android.server.wifi.SupplicantStaNetworkHalAidlImpl$*",
-            "com.android.server.wifi.SupplicantStaNetworkHalAidlImpl.**",
-            "com.android.server.wifi.SupplicantStaNetworkHalHidlImpl",
-            "com.android.server.wifi.SupplicantStaNetworkHalHidlImpl$*",
-            "com.android.server.wifi.SupplicantStaNetworkHalHidlImpl.**",
+            "com.android.server.wifi.SupplicantStaNetworkHal",
+            "com.android.server.wifi.SupplicantStaNetworkHal$*",
+            "com.android.server.wifi.SupplicantStaNetworkHal.**",
             "com.android.server.wifi.SupplicantStateTracker",
             "com.android.server.wifi.SupplicantStateTracker$*",
             "com.android.server.wifi.SupplicantStateTracker.**",
@@ -465,18 +381,12 @@
             "com.android.server.wifi.WifiBackupRestore",
             "com.android.server.wifi.WifiBackupRestore$*",
             "com.android.server.wifi.WifiBackupRestore.**",
-            "com.android.server.wifi.WifiBlocklistMonitor",
-            "com.android.server.wifi.WifiBlocklistMonitor$*",
-            "com.android.server.wifi.WifiBlocklistMonitor.**",
             "com.android.server.wifi.WifiCandidates",
             "com.android.server.wifi.WifiCandidates$*",
             "com.android.server.wifi.WifiCandidates.**",
             "com.android.server.wifi.WifiCarrierInfoManager",
             "com.android.server.wifi.WifiCarrierInfoManager$*",
             "com.android.server.wifi.WifiCarrierInfoManager.**",
-            "com.android.server.wifi.WifiCarrierInfoStoreManagerData",
-            "com.android.server.wifi.WifiCarrierInfoStoreManagerData$*",
-            "com.android.server.wifi.WifiCarrierInfoStoreManagerData.**",
             "com.android.server.wifi.WifiChannelUtilization",
             "com.android.server.wifi.WifiChannelUtilization$*",
             "com.android.server.wifi.WifiChannelUtilization.**",
@@ -495,6 +405,9 @@
             "com.android.server.wifi.WifiConnectivityManager",
             "com.android.server.wifi.WifiConnectivityManager$*",
             "com.android.server.wifi.WifiConnectivityManager.**",
+            "com.android.server.wifi.WifiContext",
+            "com.android.server.wifi.WifiContext$*",
+            "com.android.server.wifi.WifiContext.**",
             "com.android.server.wifi.WifiCountryCode",
             "com.android.server.wifi.WifiCountryCode$*",
             "com.android.server.wifi.WifiCountryCode.**",
@@ -504,9 +417,6 @@
             "com.android.server.wifi.WifiDiagnostics",
             "com.android.server.wifi.WifiDiagnostics$*",
             "com.android.server.wifi.WifiDiagnostics.**",
-            "com.android.server.wifi.WifiDialogManager",
-            "com.android.server.wifi.WifiDialogManager$*",
-            "com.android.server.wifi.WifiDialogManager.**",
             "com.android.server.wifi.WifiGlobals",
             "com.android.server.wifi.WifiGlobals$*",
             "com.android.server.wifi.WifiGlobals.**",
@@ -546,21 +456,18 @@
             "com.android.server.wifi.WifiNative",
             "com.android.server.wifi.WifiNative$*",
             "com.android.server.wifi.WifiNative.**",
-            "com.android.server.wifi.WifiNetworkAgent",
-            "com.android.server.wifi.WifiNetworkAgent$*",
-            "com.android.server.wifi.WifiNetworkAgent.**",
             "com.android.server.wifi.WifiNetworkFactory",
             "com.android.server.wifi.WifiNetworkFactory$*",
             "com.android.server.wifi.WifiNetworkFactory.**",
+            "com.android.server.wifi.WifiNetworkScoreCache",
+            "com.android.server.wifi.WifiNetworkScoreCache$*",
+            "com.android.server.wifi.WifiNetworkScoreCache.**",
             "com.android.server.wifi.WifiNetworkSelector",
             "com.android.server.wifi.WifiNetworkSelector$*",
             "com.android.server.wifi.WifiNetworkSelector.**",
             "com.android.server.wifi.WifiNetworkSuggestionsManager",
             "com.android.server.wifi.WifiNetworkSuggestionsManager$*",
             "com.android.server.wifi.WifiNetworkSuggestionsManager.**",
-            "com.android.server.wifi.WifiNotificationManager",
-            "com.android.server.wifi.WifiNotificationManager$*",
-            "com.android.server.wifi.WifiNotificationManager.**",
             "com.android.server.wifi.WifiP2pConnection",
             "com.android.server.wifi.WifiP2pConnection$*",
             "com.android.server.wifi.WifiP2pConnection.**",
@@ -648,12 +555,6 @@
             "com.android.server.wifi.aware.WifiAwareStateManager",
             "com.android.server.wifi.aware.WifiAwareStateManager$*",
             "com.android.server.wifi.aware.WifiAwareStateManager.**",
-            "com.android.server.wifi.coex.CoexManager",
-            "com.android.server.wifi.coex.CoexManager$*",
-            "com.android.server.wifi.coex.CoexManager.**",
-            "com.android.server.wifi.coex.CoexUtils",
-            "com.android.server.wifi.coex.CoexUtils$*",
-            "com.android.server.wifi.coex.CoexUtils.**",
             "com.android.server.wifi.hotspot2.ANQPData",
             "com.android.server.wifi.hotspot2.ANQPData$*",
             "com.android.server.wifi.hotspot2.ANQPData.**",
@@ -804,9 +705,6 @@
             "com.android.server.wifi.hotspot2.anqp.VenueNameElement",
             "com.android.server.wifi.hotspot2.anqp.VenueNameElement$*",
             "com.android.server.wifi.hotspot2.anqp.VenueNameElement.**",
-            "com.android.server.wifi.hotspot2.anqp.VenueUrlElement",
-            "com.android.server.wifi.hotspot2.anqp.VenueUrlElement$*",
-            "com.android.server.wifi.hotspot2.anqp.VenueUrlElement.**",
             "com.android.server.wifi.hotspot2.anqp.eap.AuthParam",
             "com.android.server.wifi.hotspot2.anqp.eap.AuthParam$*",
             "com.android.server.wifi.hotspot2.anqp.eap.AuthParam.**",
@@ -876,30 +774,12 @@
             "com.android.server.wifi.hotspot2.soap.command.SppCommand",
             "com.android.server.wifi.hotspot2.soap.command.SppCommand$*",
             "com.android.server.wifi.hotspot2.soap.command.SppCommand.**",
-            "com.android.server.wifi.p2p.ExternalApproverManager",
-            "com.android.server.wifi.p2p.ExternalApproverManager$*",
-            "com.android.server.wifi.p2p.ExternalApproverManager.**",
-            "com.android.server.wifi.p2p.ISupplicantP2pIfaceHal",
-            "com.android.server.wifi.p2p.ISupplicantP2pIfaceHal$*",
-            "com.android.server.wifi.p2p.ISupplicantP2pIfaceHal.**",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallbackAidlImpl",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallbackAidlImpl$*",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallbackAidlImpl.**",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallbackHidlImpl",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallbackHidlImpl$*",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallbackHidlImpl.**",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallbackHidlV1_4Impl",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallbackHidlV1_4Impl$*",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallbackHidlV1_4Impl.**",
+            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallback",
+            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallback$*",
+            "com.android.server.wifi.p2p.SupplicantP2pIfaceCallback.**",
             "com.android.server.wifi.p2p.SupplicantP2pIfaceHal",
             "com.android.server.wifi.p2p.SupplicantP2pIfaceHal$*",
             "com.android.server.wifi.p2p.SupplicantP2pIfaceHal.**",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceHalAidlImpl",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceHalAidlImpl$*",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceHalAidlImpl.**",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceHalHidlImpl",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceHalHidlImpl$*",
-            "com.android.server.wifi.p2p.SupplicantP2pIfaceHalHidlImpl.**",
             "com.android.server.wifi.p2p.WifiP2pMetrics",
             "com.android.server.wifi.p2p.WifiP2pMetrics$*",
             "com.android.server.wifi.p2p.WifiP2pMetrics.**",
@@ -915,9 +795,6 @@
             "com.android.server.wifi.p2p.WifiP2pServiceImpl",
             "com.android.server.wifi.p2p.WifiP2pServiceImpl$*",
             "com.android.server.wifi.p2p.WifiP2pServiceImpl.**",
-            "com.android.server.wifi.p2p.WifiP2pShellCommand",
-            "com.android.server.wifi.p2p.WifiP2pShellCommand$*",
-            "com.android.server.wifi.p2p.WifiP2pShellCommand.**",
             "com.android.server.wifi.rtt.RttMetrics",
             "com.android.server.wifi.rtt.RttMetrics$*",
             "com.android.server.wifi.rtt.RttMetrics.**",
@@ -978,12 +855,15 @@
             "com.android.server.wifi.util.ByteArrayRingBuffer",
             "com.android.server.wifi.util.ByteArrayRingBuffer$*",
             "com.android.server.wifi.util.ByteArrayRingBuffer.**",
-            "com.android.server.wifi.util.CertificateSubjectInfo",
-            "com.android.server.wifi.util.CertificateSubjectInfo$*",
-            "com.android.server.wifi.util.CertificateSubjectInfo.**",
             "com.android.server.wifi.util.EncryptedData",
             "com.android.server.wifi.util.EncryptedData$*",
             "com.android.server.wifi.util.EncryptedData.**",
+            "com.android.server.wifi.util.Environment",
+            "com.android.server.wifi.util.Environment$*",
+            "com.android.server.wifi.util.Environment.**",
+            "com.android.server.wifi.util.ExternalCallbackTracker",
+            "com.android.server.wifi.util.ExternalCallbackTracker$*",
+            "com.android.server.wifi.util.ExternalCallbackTracker.**",
             "com.android.server.wifi.util.FileUtils",
             "com.android.server.wifi.util.FileUtils$*",
             "com.android.server.wifi.util.FileUtils.**",
@@ -1011,9 +891,6 @@
             "com.android.server.wifi.util.KeyValueListParser",
             "com.android.server.wifi.util.KeyValueListParser$*",
             "com.android.server.wifi.util.KeyValueListParser.**",
-            "com.android.server.wifi.util.LastCallerInfoManager",
-            "com.android.server.wifi.util.LastCallerInfoManager$*",
-            "com.android.server.wifi.util.LastCallerInfoManager.**",
             "com.android.server.wifi.util.LruConnectionTracker",
             "com.android.server.wifi.util.LruConnectionTracker$*",
             "com.android.server.wifi.util.LruConnectionTracker.**",
@@ -1041,6 +918,9 @@
             "com.android.server.wifi.util.RssiUtil",
             "com.android.server.wifi.util.RssiUtil$*",
             "com.android.server.wifi.util.RssiUtil.**",
+            "com.android.server.wifi.util.ScanResultUtil",
+            "com.android.server.wifi.util.ScanResultUtil$*",
+            "com.android.server.wifi.util.ScanResultUtil.**",
             "com.android.server.wifi.util.SettingsMigrationDataHolder",
             "com.android.server.wifi.util.SettingsMigrationDataHolder$*",
             "com.android.server.wifi.util.SettingsMigrationDataHolder.**",
@@ -1053,9 +933,9 @@
             "com.android.server.wifi.util.TimedQuotaManager",
             "com.android.server.wifi.util.TimedQuotaManager$*",
             "com.android.server.wifi.util.TimedQuotaManager.**",
-            "com.android.server.wifi.util.WaitingState",
-            "com.android.server.wifi.util.WaitingState$*",
-            "com.android.server.wifi.util.WaitingState.**",
+            "com.android.server.wifi.util.WifiAsyncChannel",
+            "com.android.server.wifi.util.WifiAsyncChannel$*",
+            "com.android.server.wifi.util.WifiAsyncChannel.**",
             "com.android.server.wifi.util.WifiConfigStoreEncryptionUtil",
             "com.android.server.wifi.util.WifiConfigStoreEncryptionUtil$*",
             "com.android.server.wifi.util.WifiConfigStoreEncryptionUtil.**",
diff --git a/service/tests/wifitests/coverage.sh b/service/tests/wifitests/coverage.sh
index ba5bb7b..c0f7e38 100755
--- a/service/tests/wifitests/coverage.sh
+++ b/service/tests/wifitests/coverage.sh
@@ -33,7 +33,7 @@
 
 generate_new_bp () (
   sed -n -e p -e '/include_filter:/q' < Android.bp
-  (cd ../../../service/java && find * -name \*.java) |
+  (cd ../../service/java && find * -name \*.java) |
     LC_ALL=C sort |
     class_patterns_from_filenames
   tail -n 3 Android.bp
@@ -67,18 +67,15 @@
 END_OF_BUILD_SCRIPT
 
 APK_NAME="$(find $BUILD_OUT_DIR/target/product -name FrameworksWifiTests.apk | \
-              grep -v /priv-app/)"
+              grep -v /symbols/)"
 REPORTER_JAR="$(find $BUILD_OUT_DIR/host -name jacoco-cli.jar)"
 
-JACOCO_JAR="$(find $BUILD_OUT_DIR/target/product -name jacoco-report-classes.jar)"
-
 echo "Running tests and generating coverage report"
 
 set -e # fail early
 set -x # print commands
 test -f "$APK_NAME"
 test -f "$REPORTER_JAR"
-test -f "$JACOCO_JAR"
 
 adb root
 adb wait-for-device
@@ -95,8 +92,8 @@
 java -jar $REPORTER_JAR \
   report \
   --html $OUTPUT_DIR \
-  --classfiles  $JACOCO_JAR \
-  --sourcefiles $ANDROID_BUILD_TOP/packages/modules/Wifi/service/java/com/android/server/wifi \
+  --classfiles $BUILD_OUT_DIR/target/common/obj/APPS/FrameworksWifiTests_intermediates/jacoco-report-classes.jar \
+  --sourcefiles $ANDROID_BUILD_TOP/frameworks/opt/net/wifi/service/java \
   --name wifi-coverage \
   $COVERAGE_OUTPUT_FILE
 set +x
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ActiveModeWardenTest.java b/service/tests/wifitests/src/com/android/server/wifi/ActiveModeWardenTest.java
index 5bba4f6..9e31f40 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ActiveModeWardenTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ActiveModeWardenTest.java
@@ -16,8 +16,6 @@
 
 package com.android.server.wifi;
 
-import static android.net.wifi.WifiManager.WIFI_STATE_ENABLED;
-
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_LOCAL_ONLY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_PRIMARY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SCAN_ONLY;
@@ -34,7 +32,6 @@
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.argThat;
 import static org.mockito.Mockito.any;
@@ -76,7 +73,6 @@
 import android.os.IBinder;
 import android.os.Process;
 import android.os.RemoteException;
-import android.os.UserManager;
 import android.os.WorkSource;
 import android.os.test.TestLooper;
 import android.telephony.TelephonyManager;
@@ -84,7 +80,6 @@
 
 import androidx.test.filters.SmallTest;
 
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.ActiveModeManager.ClientConnectivityRole;
 import com.android.server.wifi.ActiveModeManager.Listener;
 import com.android.server.wifi.ActiveModeManager.SoftApRole;
@@ -135,10 +130,7 @@
     private static final int TEST_AP_BANDWIDTH = SoftApInfo.CHANNEL_WIDTH_20MHZ;
     private static final int TEST_UID = 435546654;
     private static final String TEST_PACKAGE = "com.test";
-    private static final String TEST_COUNTRYCODE = "US";
     private static final WorkSource TEST_WORKSOURCE = new WorkSource(TEST_UID, TEST_PACKAGE);
-    private static final WorkSource SETTINGS_WORKSOURCE =
-            new WorkSource(Process.SYSTEM_UID, "system-service");
 
     TestLooper mLooper;
     @Mock WifiInjector mWifiInjector;
@@ -165,7 +157,6 @@
     @Mock DppManager mDppManager;
     @Mock SarManager mSarManager;
     @Mock HalDeviceManager mHalDeviceManager;
-    @Mock UserManager mUserManager;
 
     Listener<ConcreteClientModeManager> mClientListener;
     Listener<SoftApManager> mSoftApListener;
@@ -196,7 +187,6 @@
         when(mWifiInjector.getScanRequestProxy()).thenReturn(mScanRequestProxy);
         when(mWifiInjector.getSarManager()).thenReturn(mSarManager);
         when(mWifiInjector.getHalDeviceManager()).thenReturn(mHalDeviceManager);
-        when(mWifiInjector.getUserManager()).thenReturn(mUserManager);
         when(mClientModeManager.getRole()).thenReturn(ROLE_CLIENT_PRIMARY);
         when(mClientModeManager.getInterfaceName()).thenReturn(WIFI_IFACE_NAME);
         when(mContext.getResources()).thenReturn(mResources);
@@ -215,7 +205,7 @@
         when(mSettingsStore.isAirplaneModeOn()).thenReturn(false);
         when(mSettingsStore.isScanAlwaysAvailable()).thenReturn(false);
         when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true);
-        when(mFacade.getSettingsWorkSource(mContext)).thenReturn(SETTINGS_WORKSOURCE);
+        when(mFacade.getSettingsWorkSource(mContext)).thenReturn(TEST_WORKSOURCE);
 
         doAnswer(new Answer<ClientModeManager>() {
             public ClientModeManager answer(InvocationOnMock invocation) {
@@ -339,16 +329,12 @@
             verify(mWifiInjector).makeClientModeManager(
                     any(), eq(TEST_WORKSOURCE), eq(ROLE_CLIENT_PRIMARY), anyBoolean());
         } else {
-            verify(mClientModeManager).setRole(ROLE_CLIENT_PRIMARY, SETTINGS_WORKSOURCE);
+            verify(mClientModeManager).setRole(ROLE_CLIENT_PRIMARY, TEST_WORKSOURCE);
         }
-        verify(mScanRequestProxy, times(1)).enableScanning(true, true);
+        verify(mScanRequestProxy).enableScanning(true, true);
         if (fromState.equals(DISABLED_STATE_STRING)) {
             verify(mBatteryStats).reportWifiOn();
         }
-        for (int i = 0; i < 3; i++) {
-            mActiveModeWarden.updateClientScanModeAfterCountryCodeUpdate(TEST_COUNTRYCODE);
-        }
-        verify(mScanRequestProxy, times(4)).enableScanning(true, true);
         assertEquals(mClientModeManager, mActiveModeWarden.getPrimaryClientModeManager());
         verify(mModeChangeCallback).onActiveModeManagerRoleChanged(mClientModeManager);
     }
@@ -727,7 +713,7 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         // request for an additional CMM
         ConcreteClientModeManager additionalClientModeManager =
@@ -1197,7 +1183,7 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mSoftApCapability);
         SoftApConfiguration lohsConfigWC = mWifiApConfigStore.generateLocalOnlyHotspotConfig(
-                mContext, null, mSoftApCapability);
+                mContext, SoftApConfiguration.BAND_2GHZ, null);
         SoftApModeConfiguration lohsConfig =
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_LOCAL_ONLY, lohsConfigWC,
                 mSoftApCapability);
@@ -1402,44 +1388,6 @@
         assertInEnabledState();
     }
 
-    /**
-     * Do not change Wi-Fi state when airplane mode changes if
-     * DISALLOW_CHANGE_WIFI_STATE user restriction is set.
-     */
-    @Test
-    public void testWifiStateUnaffectedByAirplaneMode() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_CHANGE_WIFI_STATE),
-                any())).thenReturn(true);
-        when(mSettingsStore.updateAirplaneModeTracker()).thenReturn(true);
-
-        reset(mContext);
-        when(mContext.getResources()).thenReturn(mResources);
-        mActiveModeWarden = createActiveModeWarden();
-        mActiveModeWarden.start();
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<BroadcastReceiver> bcastRxCaptor =
-                ArgumentCaptor.forClass(BroadcastReceiver.class);
-        verify(mContext).registerReceiver(
-                bcastRxCaptor.capture(),
-                argThat(filter -> filter.hasAction(Intent.ACTION_AIRPLANE_MODE_CHANGED)));
-        BroadcastReceiver broadcastReceiver = bcastRxCaptor.getValue();
-
-        Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
-        broadcastReceiver.onReceive(mContext, intent);
-        mLooper.dispatchAll();
-
-        verify(mSettingsStore, never()).handleAirplaneModeToggled();
-
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_CHANGE_WIFI_STATE),
-                any())).thenReturn(false);
-        broadcastReceiver.onReceive(mContext, intent);
-        mLooper.dispatchAll();
-
-        verify(mSettingsStore).handleAirplaneModeToggled();
-    }
-
 
     /**
      * Disabling location mode when in scan mode will disable wifi
@@ -1965,7 +1913,7 @@
         mLooper.dispatchAll();
 
         verify(mWifiInjector, never()).makeClientModeManager(
-                any(), any(), eq(ROLE_CLIENT_PRIMARY), anyBoolean());
+                any(), eq(TEST_WORKSOURCE), eq(ROLE_CLIENT_PRIMARY), anyBoolean());
         assertInDisabledState();
         assertInEmergencyMode();
 
@@ -1976,7 +1924,7 @@
 
         // Wifi toggle on now takes effect
         verify(mWifiInjector).makeClientModeManager(
-                any(), eq(SETTINGS_WORKSOURCE), eq(ROLE_CLIENT_PRIMARY), anyBoolean());
+                any(), eq(TEST_WORKSOURCE), eq(ROLE_CLIENT_PRIMARY), anyBoolean());
         assertInEnabledState();
     }
 
@@ -2267,7 +2215,7 @@
 
         // note: using a reason that will typical not start a bug report on purpose to guarantee
         // that it is the flag and not the reason which controls it.
-        mActiveModeWarden.recoveryRestartWifi(SelfRecovery.REASON_LAST_RESORT_WATCHDOG,
+        mActiveModeWarden.recoveryRestartWifi(SelfRecovery.REASON_LAST_RESORT_WATCHDOG, "some text",
                 true);
         mLooper.dispatchAll();
         verify(mWifiDiagnostics).takeBugReport(anyString(), anyString());
@@ -2280,7 +2228,7 @@
         // note: using a reason that will typical start a bug report on purpose to guarantee that
         // it is the flag and not the reason which controls it.
         mActiveModeWarden.recoveryRestartWifi(SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                false);
+                "anything", false);
         mLooper.dispatchAll();
         verify(mWifiDiagnostics, never()).takeBugReport(anyString(), anyString());
         verify(mSubsystemRestartCallback).onSubsystemRestarting();
@@ -2333,7 +2281,7 @@
         assertInDisabledState();
 
         mActiveModeWarden.recoveryRestartWifi(SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                true);
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
         mLooper.dispatchAll();
 
         mLooper.moveTimeForward(TEST_WIFI_RECOVERY_DELAY_MS + 10);
@@ -2367,7 +2315,7 @@
                 anyBoolean());
 
         mActiveModeWarden.recoveryRestartWifi(SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                true);
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
         mLooper.dispatchAll();
 
         verify(mClientModeManager).stop();
@@ -2405,7 +2353,7 @@
 
         assertWifiShutDown(() -> {
             mActiveModeWarden.recoveryRestartWifi(SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                    true);
+                    SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
             mLooper.dispatchAll();
             // Complete the stop
             mClientListener.onStopped(mClientModeManager);
@@ -2458,7 +2406,7 @@
         verify(mModeChangeCallback).onActiveModeManagerRemoved(mClientModeManager);
 
         mActiveModeWarden.recoveryRestartWifi(SelfRecovery.REASON_LAST_RESORT_WATCHDOG,
-                false);
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_LAST_RESORT_WATCHDOG], false);
         mLooper.dispatchAll();
 
         // wasn't called again
@@ -2480,12 +2428,10 @@
         enterSoftApActiveMode();
         verify(mWifiInjector).makeSoftApManager(
                 any(), any(), any(), eq(TEST_WORKSOURCE), eq(ROLE_SOFTAP_TETHERED), anyBoolean());
-        when(mSettingsStore.isWifiToggleEnabled()).thenReturn(true);
-        // Return true to indicate Wifi recovery in progress
-        when(mSelfRecovery.isRecoveryInProgress()).thenReturn(true);
+
         assertWifiShutDown(() -> {
             mActiveModeWarden.recoveryRestartWifi(SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                    true);
+                    SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
             mLooper.dispatchAll();
             // Complete the stop
             mSoftApListener.onStopped(mSoftApManager);
@@ -2497,61 +2443,6 @@
         // still only started once
         verify(mWifiInjector).makeSoftApManager(
                 any(), any(), any(), eq(TEST_WORKSOURCE), eq(ROLE_SOFTAP_TETHERED), anyBoolean());
-        // No client mode manager created
-        verify(mWifiInjector, never()).makeClientModeManager(
-                any(), any(), eq(ROLE_CLIENT_PRIMARY), anyBoolean());
-
-        verify(mSelfRecovery).isRecoveryInProgress();
-        verify(mSelfRecovery).onWifiStopped();
-
-        mLooper.moveTimeForward(TEST_WIFI_RECOVERY_DELAY_MS);
-        mLooper.dispatchAll();
-
-        // started again
-        verify(mWifiInjector, times(2)).makeSoftApManager(
-                any(), any(), any(), any(), any(), anyBoolean());
-        assertInEnabledState();
-
-        verify(mSelfRecovery).onRecoveryCompleted();
-        verify(mSubsystemRestartCallback).onSubsystemRestarting();
-        verify(mSubsystemRestartCallback).onSubsystemRestarted();
-    }
-
-    /**
-     * The command to trigger a WiFi reset should trigger a wifi reset in SoftApManager through
-     * the ActiveModeWarden.shutdownWifi() call when in SAP enabled mode.
-     * If the shutdown isn't done fast enough to transit to disabled state it should still
-     * bring up soft ap manager later.
-     */
-    @Test
-    public void testRestartWifiStackInTetheredSoftApEnabledState_SlowDisable() throws Exception {
-        enterSoftApActiveMode();
-        verify(mWifiInjector).makeSoftApManager(
-                any(), any(), any(), eq(TEST_WORKSOURCE), eq(ROLE_SOFTAP_TETHERED), anyBoolean());
-
-        assertWifiShutDown(() -> {
-            mActiveModeWarden.recoveryRestartWifi(SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                    true);
-            mLooper.dispatchAll();
-            mLooper.moveTimeForward(TEST_WIFI_RECOVERY_DELAY_MS);
-            mLooper.dispatchAll();
-        });
-        // Wifi is still not disabled yet.
-        verify(mModeChangeCallback, never()).onActiveModeManagerRemoved(mSoftApManager);
-        verify(mWifiInjector).makeSoftApManager(
-                any(), any(), any(), eq(TEST_WORKSOURCE), eq(ROLE_SOFTAP_TETHERED), anyBoolean());
-        assertInEnabledState();
-
-        // Now complete the stop and transit to disabled state
-        mSoftApListener.onStopped(mSoftApManager);
-        // mLooper.moveTimeForward(TEST_WIFI_RECOVERY_DELAY_MS);
-        mLooper.dispatchAll();
-
-        verify(mModeChangeCallback).onActiveModeManagerRemoved(mSoftApManager);
-        // started again
-        verify(mWifiInjector, times(1)).makeSoftApManager(
-                any(), any(), any(), any(), any(), anyBoolean());
-        assertInDisabledState();
 
         mLooper.moveTimeForward(TEST_WIFI_RECOVERY_DELAY_MS);
         mLooper.dispatchAll();
@@ -2581,7 +2472,7 @@
 
         assertWifiShutDown(() -> {
             mActiveModeWarden.recoveryRestartWifi(SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                    true);
+                    SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
             mLooper.dispatchAll();
             // Complete the stop
             mClientListener.onStopped(mClientModeManager);
@@ -2722,8 +2613,7 @@
     public void testUpdateCapabilityInSoftApActiveMode() throws Exception {
         SoftApCapability testCapability = new SoftApCapability(0);
         enterSoftApActiveMode();
-        mActiveModeWarden.updateSoftApCapability(testCapability,
-                WifiManager.IFACE_IP_MODE_TETHERED);
+        mActiveModeWarden.updateSoftApCapability(testCapability);
         mLooper.dispatchAll();
         verify(mSoftApManager).updateCapability(testCapability);
     }
@@ -2742,18 +2632,7 @@
     public void testUpdateCapabilityInNonSoftApActiveMode() throws Exception {
         SoftApCapability testCapability = new SoftApCapability(0);
         enterClientModeActiveState();
-        mActiveModeWarden.updateSoftApCapability(testCapability,
-                WifiManager.IFACE_IP_MODE_TETHERED);
-        mLooper.dispatchAll();
-        verify(mSoftApManager, never()).updateCapability(any());
-    }
-
-    @Test
-    public void testUpdateLocalModeSoftApCapabilityInTetheredSoftApActiveMode() throws Exception {
-        SoftApCapability testCapability = new SoftApCapability(0);
-        enterSoftApActiveMode(); // Tethered mode
-        mActiveModeWarden.updateSoftApCapability(testCapability,
-                WifiManager.IFACE_IP_MODE_LOCAL_ONLY);
+        mActiveModeWarden.updateSoftApCapability(testCapability);
         mLooper.dispatchAll();
         verify(mSoftApManager, never()).updateCapability(any());
     }
@@ -2835,7 +2714,7 @@
         // request for ssid2/bssid2
         if (additionaClientModeManagerRole == ROLE_CLIENT_LOCAL_ONLY) {
             mActiveModeWarden.requestLocalOnlyClientModeManager(
-                    externalRequestListener, TEST_WORKSOURCE, ssid, bssid, false);
+                    externalRequestListener, TEST_WORKSOURCE, ssid, bssid);
         } else if (additionaClientModeManagerRole == ROLE_CLIENT_SECONDARY_LONG_LIVED) {
             mActiveModeWarden.requestSecondaryLongLivedClientModeManager(
                     externalRequestListener, TEST_WORKSOURCE, ssid, bssid);
@@ -2877,26 +2756,6 @@
         return additionalClientListener.value;
     }
 
-    @Test
-    public void testRemoveDefaultClientModeManager() throws Exception {
-        // Ensure that we can create more client ifaces.
-        when(mWifiNative.isItPossibleToCreateStaIface(any())).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled))
-                .thenReturn(true);
-        assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
-
-        // Verify removing a non DefaultClientModeManager works properly.
-        requestRemoveAdditionalClientModeManager(ROLE_CLIENT_LOCAL_ONLY);
-
-        // Verify that a request to remove DefaultClientModeManager is ignored.
-        ClientModeManager defaultClientModeManager = mock(DefaultClientModeManager.class);
-
-        mActiveModeWarden.removeClientModeManager(defaultClientModeManager);
-        mLooper.dispatchAll();
-        verify(defaultClientModeManager, never()).stop();
-    }
-
     private void requestRemoveAdditionalClientModeManager(
             ClientConnectivityRole role) throws Exception {
         ConcreteClientModeManager additionalClientModeManager =
@@ -2918,7 +2777,7 @@
     }
 
     private void requestRemoveAdditionalClientModeManagerWhenNotAllowed(
-            ClientConnectivityRole role, boolean clientIsExpected) throws Exception {
+            ClientConnectivityRole role) throws Exception {
         enterClientModeActiveState();
 
         // Connected to ssid1/bssid1
@@ -2946,7 +2805,7 @@
         // request for ssid2/bssid2
         if (role == ROLE_CLIENT_LOCAL_ONLY) {
             mActiveModeWarden.requestLocalOnlyClientModeManager(
-                    externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2, false);
+                    externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2);
         } else if (role == ROLE_CLIENT_SECONDARY_LONG_LIVED) {
             mActiveModeWarden.requestSecondaryLongLivedClientModeManager(
                     externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2);
@@ -2960,13 +2819,9 @@
         ArgumentCaptor<ClientModeManager> requestedClientModeManager =
                 ArgumentCaptor.forClass(ClientModeManager.class);
         verify(externalRequestListener).onAnswer(requestedClientModeManager.capture());
-        if (clientIsExpected) {
-            assertEquals(mClientModeManager, requestedClientModeManager.getValue());
+        assertEquals(mClientModeManager, requestedClientModeManager.getValue());
 
-            mActiveModeWarden.removeClientModeManager(requestedClientModeManager.getValue());
-        } else {
-            assertNull(requestedClientModeManager.getValue());
-        }
+        mActiveModeWarden.removeClientModeManager(requestedClientModeManager.getValue());
         mLooper.dispatchAll();
         verifyNoMoreInteractions(additionalClientModeManager);
     }
@@ -2977,7 +2832,7 @@
                 ExternalClientModeManagerRequestListener.class);
         if (role == ROLE_CLIENT_LOCAL_ONLY) {
             mActiveModeWarden.requestLocalOnlyClientModeManager(
-                    externalRequestListener, TEST_WORKSOURCE, TEST_SSID_1, TEST_BSSID_1, false);
+                    externalRequestListener, TEST_WORKSOURCE, TEST_SSID_1, TEST_BSSID_1);
         } else if (role == ROLE_CLIENT_SECONDARY_LONG_LIVED) {
             mActiveModeWarden.requestSecondaryLongLivedClientModeManager(
                     externalRequestListener, TEST_WORKSOURCE, TEST_SSID_1, TEST_BSSID_1);
@@ -3009,7 +2864,7 @@
         // request for one more CMM (returns the existing one).
         if (role == ROLE_CLIENT_LOCAL_ONLY) {
             mActiveModeWarden.requestLocalOnlyClientModeManager(
-                    externalRequestListener, TEST_WORKSOURCE, TEST_SSID_3, TEST_BSSID_3, false);
+                    externalRequestListener, TEST_WORKSOURCE, TEST_SSID_3, TEST_BSSID_3);
         } else if (role == ROLE_CLIENT_SECONDARY_LONG_LIVED) {
             mActiveModeWarden.requestSecondaryLongLivedClientModeManager(
                     externalRequestListener, TEST_WORKSOURCE, TEST_SSID_3, TEST_BSSID_3);
@@ -3052,7 +2907,7 @@
         // request for the same SSID/BSSID and expect the existing CMM to get returned twice.
         if (role == ROLE_CLIENT_LOCAL_ONLY) {
             mActiveModeWarden.requestLocalOnlyClientModeManager(
-                    externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2, false);
+                    externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2);
         } else if (role == ROLE_CLIENT_SECONDARY_LONG_LIVED) {
             mActiveModeWarden.requestSecondaryLongLivedClientModeManager(
                     externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2);
@@ -3099,7 +2954,7 @@
         // request for same ssid1/bssid1
         if (role == ROLE_CLIENT_LOCAL_ONLY) {
             mActiveModeWarden.requestLocalOnlyClientModeManager(
-                    externalRequestListener, TEST_WORKSOURCE, TEST_SSID_1, TEST_BSSID_1, false);
+                    externalRequestListener, TEST_WORKSOURCE, TEST_SSID_1, TEST_BSSID_1);
         } else if (role == ROLE_CLIENT_SECONDARY_LONG_LIVED) {
             mActiveModeWarden.requestSecondaryLongLivedClientModeManager(
                     externalRequestListener, TEST_WORKSOURCE, TEST_SSID_1, TEST_BSSID_1);
@@ -3123,7 +2978,7 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
 
         requestRemoveAdditionalClientModeManager(ROLE_CLIENT_LOCAL_ONLY);
     }
@@ -3133,8 +2988,8 @@
         // Ensure that we cannot create more client ifaces.
         when(mWifiNative.isItPossibleToCreateStaIface(any())).thenReturn(false);
         assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
-        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_LOCAL_ONLY, true);
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
+        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_LOCAL_ONLY);
     }
 
     @Test
@@ -3144,8 +2999,8 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled))
                 .thenReturn(false);
         assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
-        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_LOCAL_ONLY, true);
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
+        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_LOCAL_ONLY);
     }
 
     @Test
@@ -3153,7 +3008,7 @@
         // Ensure that we can create more client ifaces.
         when(mWifiNative.isItPossibleToCreateStaIface(any())).thenReturn(true);
         assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
 
         requestAdditionalClientModeManagerWhenWifiIsOff(ROLE_CLIENT_LOCAL_ONLY);
     }
@@ -3165,7 +3020,7 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
 
         requestAdditionalClientModeManagerWhenAlreadyPresent(ROLE_CLIENT_LOCAL_ONLY);
     }
@@ -3177,7 +3032,7 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
 
         requestAdditionalClientModeManagerWhenAlreadyPresentSameBssid(ROLE_CLIENT_LOCAL_ONLY);
     }
@@ -3189,7 +3044,7 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
 
         requestAdditionalClientModeManagerWhenConnectingToPrimaryBssid(ROLE_CLIENT_LOCAL_ONLY);
     }
@@ -3201,21 +3056,13 @@
         when(mWifiNative.isItPossibleToCreateStaIface(any())).thenReturn(true);
         when(mResources.getBoolean(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled))
                 .thenReturn(true);
-
         when(mWifiPermissionsUtil.isSystem(TEST_PACKAGE, TEST_UID)).thenReturn(false);
         when(mWifiPermissionsUtil.isTargetSdkLessThan(
                 TEST_PACKAGE, Build.VERSION_CODES.S, TEST_UID))
                 .thenReturn(true);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(
-                "system-service", Build.VERSION_CODES.S, Process.SYSTEM_UID))
-                .thenReturn(false);
-        // Simulate explicit user approval
         assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, true));
-        WorkSource workSource = new WorkSource(TEST_WORKSOURCE);
-        workSource.add(SETTINGS_WORKSOURCE);
-        verify(mWifiNative).isItPossibleToCreateStaIface(eq(workSource));
-        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_LOCAL_ONLY, true);
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
+        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_LOCAL_ONLY);
     }
 
     @Test
@@ -3230,52 +3077,18 @@
                 TEST_PACKAGE, Build.VERSION_CODES.S, TEST_UID))
                 .thenReturn(false);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
         requestRemoveAdditionalClientModeManager(ROLE_CLIENT_LOCAL_ONLY);
     }
 
     @Test
-    public void requestRemoveLoClientModeManagerWhenNotSystemAppAndTargetSdkLessThanSAndCantCreate()
-            throws Exception {
-        // Ensure that we can't create more client ifaces - so will attempt to fallback (which we
-        // should be able to do for <S apps)
-        when(mWifiNative.isItPossibleToCreateStaIface(any())).thenReturn(false);
-        when(mResources.getBoolean(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled))
-                .thenReturn(true);
-        when(mWifiPermissionsUtil.isSystem(TEST_PACKAGE, TEST_UID)).thenReturn(false);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(
-                TEST_PACKAGE, Build.VERSION_CODES.S, TEST_UID))
-                .thenReturn(true);
-        assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
-        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_LOCAL_ONLY, true);
-    }
-
-    @Test
-    public void requestRemoveLoClientModeManagerWhenNotSystemAppAndTargetSdkEqualToSAndCantCreate()
-            throws Exception {
-        // Ensure that we can't create more client ifaces - so will attempt to fallback (which we
-        // can't for >=S apps)
-        when(mWifiNative.isItPossibleToCreateStaIface(any())).thenReturn(false);
-        when(mResources.getBoolean(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled))
-                .thenReturn(true);
-        when(mWifiPermissionsUtil.isSystem(TEST_PACKAGE, TEST_UID)).thenReturn(false);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(
-                TEST_PACKAGE, Build.VERSION_CODES.S, TEST_UID))
-                .thenReturn(false);
-        assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
-        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_LOCAL_ONLY, false);
-    }
-
-    @Test
     public void requestRemoveSecondaryLongLivedClientModeManager() throws Exception {
         // Ensure that we can create more client ifaces.
         when(mWifiNative.isItPossibleToCreateStaIface(any())).thenReturn(true);
         when(mResources.getBoolean(R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED));
 
         requestRemoveAdditionalClientModeManager(ROLE_CLIENT_SECONDARY_LONG_LIVED);
     }
@@ -3286,9 +3099,8 @@
         // Ensure that we cannot create more client ifaces.
         when(mWifiNative.isItPossibleToCreateStaIface(any())).thenReturn(false);
         assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED, false));
-        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_SECONDARY_LONG_LIVED,
-                true);
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED));
+        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_SECONDARY_LONG_LIVED);
     }
 
     @Test
@@ -3299,9 +3111,8 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled))
                 .thenReturn(false);
         assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED, false));
-        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_SECONDARY_LONG_LIVED,
-                true);
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED));
+        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_SECONDARY_LONG_LIVED);
     }
 
     @Test
@@ -3311,7 +3122,7 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED));
 
         requestAdditionalClientModeManagerWhenWifiIsOff(ROLE_CLIENT_SECONDARY_LONG_LIVED);
     }
@@ -3323,7 +3134,7 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED));
 
         requestAdditionalClientModeManagerWhenAlreadyPresent(ROLE_CLIENT_SECONDARY_LONG_LIVED);
     }
@@ -3336,7 +3147,7 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED));
 
         requestAdditionalClientModeManagerWhenAlreadyPresentSameBssid(
                 ROLE_CLIENT_SECONDARY_LONG_LIVED);
@@ -3350,7 +3161,7 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED));
 
         requestAdditionalClientModeManagerWhenConnectingToPrimaryBssid(
                 ROLE_CLIENT_SECONDARY_LONG_LIVED);
@@ -3364,7 +3175,7 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         requestRemoveAdditionalClientModeManager(ROLE_CLIENT_SECONDARY_TRANSIENT);
     }
@@ -3375,9 +3186,8 @@
         // Ensure that we cannot create more client ifaces.
         when(mWifiNative.isItPossibleToCreateStaIface(any())).thenReturn(false);
         assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
-        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_SECONDARY_TRANSIENT,
-                true);
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
+        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_SECONDARY_TRANSIENT);
     }
 
     @Test
@@ -3389,9 +3199,8 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(false);
         assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
-        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_SECONDARY_TRANSIENT,
-                true);
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
+        requestRemoveAdditionalClientModeManagerWhenNotAllowed(ROLE_CLIENT_SECONDARY_TRANSIENT);
     }
 
     @Test
@@ -3402,7 +3211,7 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         requestAdditionalClientModeManagerWhenWifiIsOff(ROLE_CLIENT_SECONDARY_TRANSIENT);
     }
@@ -3415,7 +3224,7 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         requestAdditionalClientModeManagerWhenAlreadyPresent(ROLE_CLIENT_SECONDARY_TRANSIENT);
     }
@@ -3429,7 +3238,7 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         requestAdditionalClientModeManagerWhenAlreadyPresentSameBssid(
                 ROLE_CLIENT_SECONDARY_TRANSIENT);
@@ -3444,7 +3253,7 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         requestAdditionalClientModeManagerWhenConnectingToPrimaryBssid(
                 ROLE_CLIENT_SECONDARY_TRANSIENT);
@@ -3462,9 +3271,9 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         enterClientModeActiveState();
 
@@ -3492,7 +3301,7 @@
                 ExternalClientModeManagerRequestListener.class);
         // request for ssid2/bssid2
         mActiveModeWarden.requestLocalOnlyClientModeManager(
-                externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2, false);
+                externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2);
         mLooper.dispatchAll();
         verify(mWifiInjector).makeClientModeManager(
                 any(), eq(TEST_WORKSOURCE), eq(ROLE_CLIENT_LOCAL_ONLY), anyBoolean());
@@ -3547,9 +3356,9 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         enterClientModeActiveState();
 
@@ -3577,7 +3386,7 @@
                 ExternalClientModeManagerRequestListener.class);
         // request for ssid2/bssid2
         mActiveModeWarden.requestLocalOnlyClientModeManager(
-                externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2, false);
+                externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2);
         mLooper.dispatchAll();
         verify(mWifiInjector).makeClientModeManager(
                 any(), eq(TEST_WORKSOURCE), eq(ROLE_CLIENT_LOCAL_ONLY), anyBoolean());
@@ -3625,7 +3434,7 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         // Create primary STA.
         enterClientModeActiveState();
@@ -3690,9 +3499,9 @@
         when(mResources.getBoolean(R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY));
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED));
 
         enterClientModeActiveState();
         ArgumentCaptor<ClientModeManager> requestedClientModeManager =
@@ -3715,7 +3524,7 @@
 
         // mock requesting local only secondary
         mActiveModeWarden.requestLocalOnlyClientModeManager(
-                externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2, false);
+                externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2);
         mLooper.dispatchAll();
         // Verify the primary is given to the externalRequestListener
         verify(externalRequestListener).onAnswer(requestedClientModeManager.capture());
@@ -3748,7 +3557,7 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         ConcreteClientModeManager additionalClientModeManager =
                 mock(ConcreteClientModeManager.class);
@@ -4004,7 +3813,7 @@
                 R.bool.config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled))
                 .thenReturn(true);
         assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT, false));
+                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_TRANSIENT));
 
         enterClientModeActiveState();
 
@@ -4088,7 +3897,7 @@
 
         mActiveModeWarden.requestLocalOnlyClientModeManager(
                 mock(ExternalClientModeManagerRequestListener.class),
-                TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2, false);
+                TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2);
         mLooper.dispatchAll();
 
         // No role set, should be ignored.
@@ -4119,7 +3928,7 @@
             mClientListener.onStarted(mClientModeManager);
             mLooper.dispatchAll();
             verify(mWifiInjector).makeClientModeManager(
-                    any(), eq(SETTINGS_WORKSOURCE), eq(ROLE_CLIENT_SCAN_ONLY), anyBoolean());
+                    any(), eq(TEST_WORKSOURCE), eq(ROLE_CLIENT_SCAN_ONLY), anyBoolean());
             verify(mModeChangeCallback).onActiveModeManagerAdded(mClientModeManager);
             verify(mScanRequestProxy).enableScanning(true, false);
             verify(mBatteryStats).reportWifiOn();
@@ -4377,78 +4186,4 @@
 
         indicateEndOfEmergencyScan(true, ROLE_CLIENT_PRIMARY);
     }
-
-    @Test
-    public void testRequestForSecondaryLocalOnlyForPreSAppWithUserConnect() throws Exception {
-        // Ensure that we can create more client ifaces.
-        when(mWifiNative.isItPossibleToCreateStaIface(any())).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled))
-                .thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifiMultiStaRestrictedConcurrencyEnabled))
-                .thenReturn(true);
-        when(mWifiPermissionsUtil.isSystem(TEST_PACKAGE, TEST_UID)).thenReturn(false);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(
-                TEST_PACKAGE, Build.VERSION_CODES.S, TEST_UID))
-                .thenReturn(true);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(
-                "system-service", Build.VERSION_CODES.S, Process.SYSTEM_UID))
-                .thenReturn(false);
-        assertFalse(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_LOCAL_ONLY, true));
-        assertTrue(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                TEST_WORKSOURCE, ROLE_CLIENT_SECONDARY_LONG_LIVED, false));
-
-        enterClientModeActiveState();
-        ArgumentCaptor<ClientModeManager> requestedClientModeManager =
-                ArgumentCaptor.forClass(ClientModeManager.class);
-        ExternalClientModeManagerRequestListener externalRequestListener = mock(
-                ExternalClientModeManagerRequestListener.class);
-        Mutable<Listener<ConcreteClientModeManager>> additionalClientListener =
-                new Mutable<>();
-        ConcreteClientModeManager additionalClientModeManager =
-                mock(ConcreteClientModeManager.class);
-        doAnswer((invocation) -> {
-            Object[] args = invocation.getArguments();
-            additionalClientListener.value =
-                    (Listener<ConcreteClientModeManager>) args[0];
-            return additionalClientModeManager;
-        }).when(mWifiInjector).makeClientModeManager(
-                any(Listener.class), any(), any(), anyBoolean());
-        when(additionalClientModeManager.getInterfaceName()).thenReturn(WIFI_IFACE_NAME_1);
-        when(additionalClientModeManager.getRole()).thenReturn(ROLE_CLIENT_LOCAL_ONLY);
-
-        // mock requesting local only secondary
-        mActiveModeWarden.requestLocalOnlyClientModeManager(
-                externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2, true);
-        mLooper.dispatchAll();
-        // Verify the primary is given to the externalRequestListener
-        verify(externalRequestListener).onAnswer(requestedClientModeManager.capture());
-        verify(mWifiInjector, never()).makeClientModeManager(
-                any(), any(), eq(ROLE_CLIENT_LOCAL_ONLY), anyBoolean());
-        assertEquals(ROLE_CLIENT_PRIMARY, requestedClientModeManager.getValue().getRole());
-
-        // Request for non local-only STA and verify the secondary STA is provided instead.
-        when(additionalClientModeManager.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_LONG_LIVED);
-        mActiveModeWarden.requestSecondaryLongLivedClientModeManager(
-                externalRequestListener, TEST_WORKSOURCE, TEST_SSID_2, TEST_BSSID_2);
-        mLooper.dispatchAll();
-        verify(mWifiInjector).makeClientModeManager(any(), any(),
-                eq(ROLE_CLIENT_SECONDARY_LONG_LIVED), anyBoolean());
-
-        additionalClientListener.value.onStarted(additionalClientModeManager);
-        mLooper.dispatchAll();
-        verify(externalRequestListener, times(2)).onAnswer(
-                requestedClientModeManager.capture());
-        assertEquals(ROLE_CLIENT_SECONDARY_LONG_LIVED,
-                requestedClientModeManager.getValue().getRole());
-    }
-
-    @Test
-    public void testSetAndGetWifiState() {
-        int invalidState = 5;
-        mActiveModeWarden.setWifiStateForApiCalls(WIFI_STATE_ENABLED);
-        assertEquals(WIFI_STATE_ENABLED, mActiveModeWarden.getWifiState());
-        mActiveModeWarden.setWifiStateForApiCalls(invalidState);
-        assertEquals(WIFI_STATE_ENABLED, mActiveModeWarden.getWifiState());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/AvailableNetworkNotifierTest.java b/service/tests/wifitests/src/com/android/server/wifi/AvailableNetworkNotifierTest.java
index 3c9ac5b..3437a81 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/AvailableNetworkNotifierTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/AvailableNetworkNotifierTest.java
@@ -24,14 +24,11 @@
 import android.content.Intent;
 import android.net.wifi.ScanResult;
 import android.net.wifi.ScanResult.InformationElement;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiSsid;
 import android.os.Looper;
 
 import androidx.test.filters.SmallTest;
 
-import com.android.server.wifi.util.WifiPermissionsUtil;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -58,7 +55,6 @@
     @Mock ConnectToNetworkNotificationBuilder mConnectToNetworkNotificationBuilder;
     @Mock MakeBeforeBreakManager mMakeBeforeBreakManager;
     @Mock WifiNotificationManager mWifiNotificationManager;
-    @Mock WifiPermissionsUtil mWifiPermissionsUtil;
 
     BroadcastReceiver mBroadcastReceiver;
 
@@ -85,8 +81,7 @@
                 mConnectHelper,
                 mConnectToNetworkNotificationBuilder,
                 mMakeBeforeBreakManager,
-                mWifiNotificationManager,
-                mWifiPermissionsUtil);
+                mWifiNotificationManager);
 
         ArgumentCaptor<BroadcastReceiver> captor = ArgumentCaptor.forClass(BroadcastReceiver.class);
         verify(mContext).registerReceiver(captor.capture(), any(), any(), any());
@@ -106,7 +101,7 @@
                 AvailableNetworkNotifier.STATE_SHOWING_RECOMMENDATION_NOTIFICATION;
         final String ssid = "UnknownAkm-Network";
         final String caps = "[RSN-?-TKIP+CCMP][ESS][WPS]";
-        ScanResult result = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult result = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
         InformationElement ie = new InformationElement();
diff --git a/service/tests/wifitests/src/com/android/server/wifi/CandidateScorerTest.java b/service/tests/wifitests/src/com/android/server/wifi/CandidateScorerTest.java
index 5541a73..0238900 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/CandidateScorerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/CandidateScorerTest.java
@@ -20,11 +20,6 @@
 import static org.hamcrest.Matchers.lessThan;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.spy;
-
-import android.net.wifi.ScanResult;
 
 import androidx.test.filters.SmallTest;
 
@@ -111,10 +106,6 @@
      */
     @Before
     public void setUp() throws Exception {
-        if (mExpectedExpId == ThroughputScorer.THROUGHPUT_SCORER_DEFAULT_EXPID) {
-            mScoringParams = spy(new ScoringParams());
-            mCandidateScorer = new ThroughputScorer(mScoringParams);
-        }
         mScoringParams.update("");
         mCandidate1 = new ConcreteCandidate().setNominatorId(0)
                 .setScanRssi(-50).setFrequency(5180);
@@ -451,76 +442,4 @@
         }
     }
 
-    @Test
-    public void test6GhzRssiBoost() {
-        if (mExpectedExpId == ThroughputScorer.THROUGHPUT_SCORER_DEFAULT_EXPID) {
-            // setup a 5Ghz and a 6Ghz candidate with the same RSSI
-            mCandidate1 = new ConcreteCandidate().setNominatorId(0)
-                    .setScanRssi(-77).setFrequency(5180)
-                    .setChannelWidth(ScanResult.CHANNEL_WIDTH_20MHZ);
-            mCandidate2 = new ConcreteCandidate().setNominatorId(0)
-                    .setScanRssi(-77).setFrequency(5975)
-                    .setChannelWidth(ScanResult.CHANNEL_WIDTH_20MHZ);
-
-            // both should be equal score when both networks have 20Mhz channel width
-            assertEquals(evaluate(mCandidate2), evaluate(mCandidate1), TOL);
-
-            // increase channel width of 6Ghz network and verify it now has a higher score
-            mCandidate2.setChannelWidth(ScanResult.CHANNEL_WIDTH_80MHZ);
-            assertTrue(evaluate(mCandidate2) > evaluate(mCandidate1));
-        }
-    }
-
-    @Test
-    public void testThroughputBeforeAndAfter800Mbps() {
-        if (mExpectedExpId == ThroughputScorer.THROUGHPUT_SCORER_DEFAULT_EXPID) {
-            // setup candidate
-            mCandidate1 = new ConcreteCandidate().setNominatorId(0)
-                    .setScanRssi(-50).setFrequency(5180).setPredictedThroughputMbps(0);
-            double scoreThroughput0Mbps = evaluate(mCandidate1);
-
-            mCandidate1.setPredictedThroughputMbps(800);
-            double scoreThroughput800Mbps = evaluate(mCandidate1);
-
-            mCandidate1.setPredictedThroughputMbps(2000);
-            double scoreThroughput2800Mbps = evaluate(mCandidate1);
-
-            // verify score awarded according to expected slope when throughput <= 800Mbps
-            assertEquals("expected score under 800Mbps does not match",
-                    800 * mScoringParams.getThroughputBonusNumerator()
-                    / mScoringParams.getThroughputBonusDenominator(),
-                    scoreThroughput800Mbps - scoreThroughput0Mbps, TOL);
-
-            // verify score awarded according to expected slope when throughput > 800Mbps
-            assertEquals("expected score over 800Mbps does not match",
-                    1200 * mScoringParams.getThroughputBonusNumeratorAfter800Mbps()
-                    / mScoringParams.getThroughputBonusDenominatorAfter800Mbps(),
-                    scoreThroughput2800Mbps - scoreThroughput800Mbps, TOL);
-        }
-    }
-
-    @Test
-    public void testBand6GhzBonusIsCapped() {
-        if (mExpectedExpId == ThroughputScorer.THROUGHPUT_SCORER_DEFAULT_EXPID) {
-            doReturn(0).when(mScoringParams).getBand6GhzBonus();
-            doReturn(500).when(mScoringParams).getScoringBucketStepSize();
-
-            // setup a 6Ghz candidate
-            mCandidate1 = new ConcreteCandidate().setNominatorId(0)
-                    .setScanRssi(-77).setFrequency(5975);
-            double scoreNoBandBonus = evaluate(mCandidate1);
-
-            // Verify the 6Ghz band specific bonus is applied.
-            doReturn(5).when(mScoringParams).getBand6GhzBonus();
-            assertEquals(scoreNoBandBonus + 5, evaluate(mCandidate1), TOL);
-
-            // Verify the band bonus is capped by the scoring bucket size.
-            doReturn(500).when(mScoringParams).getBand6GhzBonus();
-            assertTrue(evaluate(mCandidate1) < scoreNoBandBonus + 500);
-
-            // Increasing the scoring bucket size should allow more band bonus to get applied.
-            doReturn(1000).when(mScoringParams).getScoringBucketStepSize();
-            assertEquals(scoreNoBandBonus + 500, evaluate(mCandidate1), TOL);
-        }
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
index 3c3a140..1c7e203 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
@@ -29,11 +29,9 @@
 import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.DISABLED_NONE;
 import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.DISABLED_NO_INTERNET_PERMANENT;
 import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.DISABLED_NO_INTERNET_TEMPORARY;
-import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.NETWORK_SELECTION_PERMANENTLY_DISABLED;
 
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_PRIMARY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_TRANSIENT;
-import static com.android.server.wifi.ClientModeImpl.ARP_TABLE_PATH;
 import static com.android.server.wifi.ClientModeImpl.CMD_PRE_DHCP_ACTION;
 import static com.android.server.wifi.ClientModeImpl.CMD_UNWANTED_NETWORK;
 import static com.android.server.wifi.ClientModeImpl.WIFI_WORK_SOURCE;
@@ -87,7 +85,6 @@
 import android.net.CaptivePortalData;
 import android.net.DhcpResultsParcelable;
 import android.net.InetAddresses;
-import android.net.IpPrefix;
 import android.net.Layer2InformationParcelable;
 import android.net.Layer2PacketParcelable;
 import android.net.LinkAddress;
@@ -101,24 +98,19 @@
 import android.net.NetworkProvider;
 import android.net.NetworkSpecifier;
 import android.net.ProvisioningConfigurationParcelable;
-import android.net.RouteInfo;
 import android.net.StaticIpConfiguration;
 import android.net.Uri;
 import android.net.apf.ApfCapabilities;
 import android.net.ip.IIpClient;
 import android.net.ip.IpClientCallbacks;
-import android.net.networkstack.aidl.ip.ReachabilityLossInfoParcelable;
-import android.net.networkstack.aidl.ip.ReachabilityLossReason;
 import android.net.vcn.VcnManager;
 import android.net.vcn.VcnNetworkPolicyResult;
 import android.net.wifi.IActionListener;
-import android.net.wifi.MloLink;
 import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
 import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiConfiguration.KeyMgmt;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
@@ -129,7 +121,6 @@
 import android.net.wifi.hotspot2.OsuProvider;
 import android.net.wifi.nl80211.WifiNl80211Manager;
 import android.net.wifi.p2p.WifiP2pManager;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.BatteryStatsManager;
 import android.os.Binder;
 import android.os.Bundle;
@@ -145,10 +136,8 @@
 import android.telephony.TelephonyManager;
 import android.test.mock.MockContentProvider;
 import android.test.mock.MockContentResolver;
-import android.util.ArraySet;
 import android.util.Log;
 import android.util.Pair;
-import android.util.Range;
 
 import androidx.test.filters.SmallTest;
 
@@ -173,6 +162,7 @@
 import com.android.server.wifi.util.ActionListenerWrapper;
 import com.android.server.wifi.util.NativeUtil;
 import com.android.server.wifi.util.RssiUtilTest;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.wifi.resources.R;
 
@@ -188,7 +178,6 @@
 import org.mockito.MockitoSession;
 import org.mockito.quality.Strictness;
 
-import java.io.BufferedReader;
 import java.io.ByteArrayOutputStream;
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
@@ -196,19 +185,13 @@
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.net.Inet4Address;
-import java.net.InetAddress;
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 import java.util.Random;
 import java.util.Set;
-import java.util.StringJoiner;
 import java.util.concurrent.CountDownLatch;
 import java.util.function.Consumer;
 
@@ -221,9 +204,10 @@
 
     private static final int MANAGED_PROFILE_UID = 1100000;
     private static final int OTHER_USER_UID = 1200000;
-    private static final int LOG_REC_LIMIT_IN_VERBOSE_MODE = ClientModeImpl.NUM_LOG_RECS_VERBOSE;
-    private static final int LOG_REC_LIMIT_IN_VERBOSE_MODE_LOW_RAM =
-            ClientModeImpl.NUM_LOG_RECS_VERBOSE_LOW_MEMORY;
+    private static final int LOG_REC_LIMIT_IN_VERBOSE_MODE =
+            (ActivityManager.isLowRamDeviceStatic()
+                    ? ClientModeImpl.NUM_LOG_RECS_VERBOSE_LOW_MEMORY
+                    : ClientModeImpl.NUM_LOG_RECS_VERBOSE);
     private static final int FRAMEWORK_NETWORK_ID = 0;
     private static final int PASSPOINT_NETWORK_ID = 1;
     private static final int OTHER_NETWORK_ID = 47;
@@ -240,7 +224,8 @@
             MacAddress.fromString("2a:53:43:c3:56:21");
     private static final MacAddress TEST_DEFAULT_MAC_ADDRESS =
             MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS);
-   // NetworkAgent creates threshold ranges with Integers
+
+    // NetworkAgent creates threshold ranges with Integers
     private static final int RSSI_THRESHOLD_MAX = -30;
     private static final int RSSI_THRESHOLD_MIN = -76;
     // Threshold breach callbacks are called with bytes
@@ -258,13 +243,6 @@
             "https://policies.google.com/terms?hl=en-US";
     private static final String VENUE_URL =
             "https://www.android.com/android-11/";
-    private static final long[] TEST_RCOI_ARRAY = {0xcafeL, 0xbabaL};
-    private static final long TEST_MATCHED_RCOI = TEST_RCOI_ARRAY[0];
-
-    private static final String TEST_AP_MLD_MAC_ADDRESS_STR = "02:03:04:05:06:07";
-    private static final MacAddress TEST_AP_MLD_MAC_ADDRESS =
-            MacAddress.fromString(TEST_AP_MLD_MAC_ADDRESS_STR);
-    private static final int TEST_MLO_LINK_ID = 1;
 
     private long mBinderToken;
     private MockitoSession mSession;
@@ -300,10 +278,10 @@
         return facade;
     }
 
-    private WifiContext getContext() throws Exception {
+    private Context getContext() throws Exception {
         when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT)).thenReturn(true);
 
-        WifiContext context = mock(WifiContext.class);
+        Context context = mock(Context.class);
         when(context.getPackageManager()).thenReturn(mPackageManager);
 
         MockContentResolver mockContentResolver = new MockContentResolver();
@@ -328,7 +306,8 @@
 
         when(context.getOpPackageName()).thenReturn(OP_PACKAGE_NAME);
 
-        when(context.getSystemService(ActivityManager.class)).thenReturn(mActivityManager);
+        when(context.getSystemService(ActivityManager.class)).thenReturn(
+                mock(ActivityManager.class));
 
         WifiP2pManager p2pm = mock(WifiP2pManager.class);
         when(context.getSystemService(WifiP2pManager.class)).thenReturn(p2pm);
@@ -395,22 +374,6 @@
         return detail;
     }
 
-    private static ScanDetail getHiddenScanDetail(int rssi, String bssid, int freq) {
-        ScanResult.InformationElement ie = new ScanResult.InformationElement();
-        WifiSsid ssid = WifiSsid.fromBytes(new byte[]{0x00, 0x00, 0x00, 0x00, 0x00, 0x00});
-        ie.id = ScanResult.InformationElement.EID_SSID;
-        ie.bytes = ssid.getBytes();
-        ScanResult.InformationElement[] ies = new ScanResult.InformationElement[1];
-        ies[0] = ie;
-        NetworkDetail nd = new NetworkDetail(TEST_BSSID_STR, ies, new ArrayList<String>(), sFreq);
-        ScanDetail detail = new ScanDetail(nd, ssid, bssid, "", rssi, freq,
-                Long.MAX_VALUE, /* needed so that scan results aren't rejected because
-                                   there older than scan start */
-                ies, new ArrayList<String>(), ScanResults.generateIERawDatafromScanResultIE(ies));
-
-        return detail;
-    }
-
     private ArrayList<ScanDetail> getMockScanResults() {
         ScanResults sr = ScanResults.create(0, 2412, 2437, 2462, 5180, 5220, 5745, 5825);
         ArrayList<ScanDetail> list = sr.getScanDetailArrayList();
@@ -424,17 +387,6 @@
         mIpClientCallback.onProvisioningSuccess(new LinkProperties());
     }
 
-    private void injectDhcpSuccess() {
-        DhcpResultsParcelable dhcpResults = new DhcpResultsParcelable();
-        dhcpResults.baseConfiguration = new StaticIpConfiguration();
-        dhcpResults.baseConfiguration.gateway = InetAddresses.parseNumericAddress("1.2.3.4");
-        dhcpResults.baseConfiguration.ipAddress =
-                new LinkAddress(InetAddresses.parseNumericAddress("192.168.1.100"), 0);
-        dhcpResults.baseConfiguration.dnsServers.add(InetAddresses.parseNumericAddress("8.8.8.8"));
-        dhcpResults.leaseDuration = 3600;
-        injectDhcpSuccess(dhcpResults);
-    }
-
     private void injectDhcpFailure() {
         mIpClientCallback.onNewDhcpResults((DhcpResultsParcelable) null);
         mIpClientCallback.onProvisioningFailure(new LinkProperties());
@@ -442,10 +394,10 @@
 
     static final String   TEST_SSID = "\"GoogleGuest\"";
     static final String   SSID_NO_QUOTE = TEST_SSID.replace("\"", "");
-    static final WifiSsid TEST_WIFI_SSID = WifiSsid.fromUtf8Text(SSID_NO_QUOTE);
+    static final WifiSsid TEST_WIFI_SSID = WifiSsid.createFromAsciiEncoded(SSID_NO_QUOTE);
     static final String   TEST_SSID1 = "\"RandomSsid1\"";
     static final String   SSID_NO_QUOTE1 = TEST_SSID1.replace("\"", "");
-    static final WifiSsid TEST_WIFI_SSID1 = WifiSsid.fromUtf8Text(SSID_NO_QUOTE1);
+    static final WifiSsid TEST_WIFI_SSID1 = WifiSsid.createFromAsciiEncoded(SSID_NO_QUOTE1);
     static final String   TEST_BSSID_STR = "01:02:03:04:05:06";
     static final String   TEST_BSSID_STR1 = "02:01:04:03:06:05";
     static final int      sFreq = 2437;
@@ -453,12 +405,6 @@
     static final String   WIFI_IFACE_NAME = "mockWlan";
     static final String sFilsSsid = "FILS-AP";
     static final ApfCapabilities APF_CAP = new ApfCapabilities(1, 2, 3);
-    static final long TEST_TOTAL_TX_BYTES = 6666;
-    static final long TEST_TOTAL_RX_BYTES = 8888;
-    static final long TEST_MOBILE_TX_BYTES = 2345;
-    static final long TEST_MOBILE_RX_BYTES = 1234;
-    static final long TEST_TX_BYTES = TEST_TOTAL_TX_BYTES - TEST_MOBILE_TX_BYTES;
-    static final long TEST_RX_BYTES = TEST_TOTAL_RX_BYTES - TEST_MOBILE_RX_BYTES;
 
     ClientModeImpl mCmi;
     HandlerThread mWifiCoreThread;
@@ -467,17 +413,15 @@
     TestAlarmManager mAlarmManager;
     MockWifiMonitor mWifiMonitor;
     TestLooper mLooper;
-    WifiContext mContext;
+    Context mContext;
     MockResources mResources;
     FrameworkFacade mFrameworkFacade;
     IpClientCallbacks mIpClientCallback;
     OsuProvider mOsuProvider;
     WifiConfiguration mConnectedNetwork;
-    WifiConfiguration mTestConfig;
     ExtendedWifiInfo mWifiInfo;
     ConnectionCapabilities mConnectionCapabilities = new ConnectionCapabilities();
 
-    @Mock ActivityManager mActivityManager;
     @Mock WifiNetworkAgent mWifiNetworkAgent;
     @Mock SupplicantStateTracker mSupplicantStateTracker;
     @Mock WifiMetrics mWifiMetrics;
@@ -509,8 +453,6 @@
     @Mock WifiNetworkFactory mWifiNetworkFactory;
     @Mock UntrustedWifiNetworkFactory mUntrustedWifiNetworkFactory;
     @Mock OemWifiNetworkFactory mOemWifiNetworkFactory;
-    @Mock RestrictedWifiNetworkFactory mRestrictedWifiNetworkFactory;
-    @Mock MultiInternetManager mMultiInternetManager;
     @Mock WifiNetworkSuggestionsManager mWifiNetworkSuggestionsManager;
     @Mock LinkProbeManager mLinkProbeManager;
     @Mock PackageManager mPackageManager;
@@ -539,10 +481,6 @@
     @Mock WifiSettingsConfigStore mSettingsConfigStore;
     @Mock Uri mMockUri;
     @Mock WifiCarrierInfoManager mWifiCarrierInfoManager;
-    @Mock WifiNotificationManager mWifiNotificationManager;
-    @Mock InsecureEapNetworkHandler mInsecureEapNetworkHandler;
-    @Mock ScanResult mScanResult;
-    @Mock HandlerThread mWifiHandlerThread;
 
     @Captor ArgumentCaptor<WifiConfigManager.OnNetworkUpdateListener> mConfigUpdateListenerCaptor;
     @Captor ArgumentCaptor<WifiNetworkAgent.Callback> mWifiNetworkAgentCallbackCaptor;
@@ -597,8 +535,6 @@
         // enableDebugLogs();
         mWifiMonitor = spy(new MockWifiMonitor());
         when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mDataTelephonyManager);
-        when(mWifiNetworkFactory.getSpecificNetworkRequestUids(any(), any()))
-                .thenReturn(Collections.emptySet());
         when(mWifiNetworkFactory.getSpecificNetworkRequestUidAndPackageName(any(), any()))
                 .thenReturn(Pair.create(Process.INVALID_UID, ""));
         setUpWifiNative();
@@ -613,7 +549,6 @@
         when(mWifiNetworkFactory.hasConnectionRequests()).thenReturn(true);
         when(mUntrustedWifiNetworkFactory.hasConnectionRequests()).thenReturn(true);
         when(mOemWifiNetworkFactory.hasConnectionRequests()).thenReturn(true);
-        when(mMultiInternetManager.hasPendingConnectionRequests()).thenReturn(true);
 
         mFrameworkFacade = getFrameworkFacade();
         mContext = getContext();
@@ -635,10 +570,6 @@
                 Settings.Global.WIFI_FREQUENCY_BAND,
                 WifiManager.WIFI_FREQUENCY_BAND_AUTO)).thenReturn(
                 WifiManager.WIFI_FREQUENCY_BAND_AUTO);
-        when(mFrameworkFacade.getTotalTxBytes()).thenReturn(TEST_TOTAL_TX_BYTES);
-        when(mFrameworkFacade.getMobileTxBytes()).thenReturn(TEST_MOBILE_TX_BYTES);
-        when(mFrameworkFacade.getTotalRxBytes()).thenReturn(TEST_TOTAL_RX_BYTES);
-        when(mFrameworkFacade.getMobileRxBytes()).thenReturn(TEST_MOBILE_RX_BYTES);
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
         doAnswer(inv -> {
             mIpClientCallback.onQuit();
@@ -658,12 +589,9 @@
         when(mPrimaryClientModeManager.getSupportedFeatures()).thenReturn(
                 WifiManager.WIFI_FEATURE_WPA3_SAE | WifiManager.WIFI_FEATURE_OWE);
         when(mWifiInjector.getWifiGlobals()).thenReturn(mWifiGlobals);
-        when(mWifiInjector.getWifiHandlerThread()).thenReturn(mWifiHandlerThread);
-        when(mWifiHandlerThread.getLooper()).thenReturn(mLooper.getLooper());
         when(mWifiGlobals.isWpa3SaeUpgradeEnabled()).thenReturn(true);
         when(mWifiGlobals.isOweUpgradeEnabled()).thenReturn(true);
         when(mWifiGlobals.getClientModeImplNumLogRecs()).thenReturn(100);
-        when(mWifiGlobals.isSaveFactoryMacToConfigStoreEnabled()).thenReturn(true);
         when(mWifiInjector.makeWifiNetworkAgent(any(), any(), any(), any(), any()))
                 .thenAnswer(new AnswerWithArguments() {
                     public WifiNetworkAgent answer(
@@ -759,16 +687,16 @@
                 mDeviceConfigFacade, mScanRequestProxy, mWifiInfo, mWifiConnectivityManager,
                 mWifiBlocklistMonitor, mConnectionFailureNotifier,
                 WifiInjector.REGULAR_NETWORK_CAPABILITIES_FILTER, mWifiNetworkFactory,
-                mUntrustedWifiNetworkFactory, mOemWifiNetworkFactory, mRestrictedWifiNetworkFactory,
-                mMultiInternetManager, mWifiLastResortWatchdog, mWakeupController,
+                mUntrustedWifiNetworkFactory, mOemWifiNetworkFactory,
+                mWifiLastResortWatchdog, mWakeupController,
                 mWifiLockManager, mFrameworkFacade, mLooper.getLooper(),
                 mWifiNative, mWrongPasswordNotifier, mWifiTrafficPoller, mLinkProbeManager,
                 1, mBatteryStatsManager, mSupplicantStateTracker, mMboOceController,
                 mWifiCarrierInfoManager, mEapFailureNotifier, mSimRequiredNotifier,
                 mWifiScoreReport, mWifiP2pConnection, mWifiGlobals,
-                WIFI_IFACE_NAME, mClientModeManager, mCmiMonitor,
-                mBroadcastQueue, mWifiNetworkSelector, mTelephonyManager, mWifiInjector,
-                mSettingsConfigStore, false, mWifiNotificationManager);
+                WIFI_IFACE_NAME, mClientModeManager, mCmiMonitor, mBroadcastQueue,
+                mWifiNetworkSelector, mTelephonyManager, mWifiInjector, mSettingsConfigStore,
+                false);
 
         mWifiCoreThread = getCmiHandlerThread(mCmi);
 
@@ -853,7 +781,7 @@
         mCmi.saveNetwork(
                 new NetworkUpdateResult(TEST_NETWORK_ID),
                 new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
+                Binder.getCallingUid());
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
     }
@@ -866,28 +794,6 @@
         canSaveNetworkConfig();
     }
 
-    /**
-     * Verifies that admin restricted configs can be saved without triggering a connection.
-     */
-    @Test
-    public void canSaveAdminRestrictedNetworkWithoutConnecting() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        mWifiInfo.setNetworkId(WifiConfiguration.INVALID_NETWORK_ID);
-        IActionListener connectActionListener = mock(IActionListener.class);
-        when(mWifiPermissionsUtil.isAdminRestrictedNetwork(any())).thenReturn(true);
-        mCmi.saveNetwork(
-                new NetworkUpdateResult(TEST_NETWORK_ID, false, false, true, false),
-                new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
-        mLooper.dispatchAll();
-
-        verify(connectActionListener).onSuccess();
-        verify(mWifiPermissionsUtil).isAdminRestrictedNetwork(any());
-        verify(mClientModeManager, never())
-                .setShouldReduceNetworkScore(false);
-    }
-
     private WifiConfiguration createTestNetwork(boolean isHidden) {
         WifiConfiguration config = new WifiConfiguration();
         config.networkId = FRAMEWORK_NETWORK_ID;
@@ -897,22 +803,14 @@
         return config;
     }
 
-    private void initializeMocksForAddedNetwork(WifiConfiguration config) throws Exception {
+    private void initializeMocksForAddedNetwork(boolean isHidden) throws Exception {
+        WifiConfiguration config = createTestNetwork(isHidden);
+
         when(mWifiConfigManager.getSavedNetworks(anyInt())).thenReturn(Arrays.asList(config));
         when(mWifiConfigManager.getConfiguredNetwork(0)).thenReturn(config);
         when(mWifiConfigManager.getConfiguredNetworkWithoutMasking(0)).thenReturn(config);
     }
 
-    private void initializeMocksForAddedNetwork(boolean isHidden) throws Exception {
-        mTestConfig = createTestNetwork(isHidden);
-        initializeMocksForAddedNetwork(mTestConfig);
-    }
-
-    private void initializeAndAddNetworkAndVerifySuccess(WifiConfiguration config)
-            throws Exception {
-        initializeMocksForAddedNetwork(config);
-    }
-
     private void initializeAndAddNetworkAndVerifySuccess() throws Exception {
         initializeAndAddNetworkAndVerifySuccess(false);
     }
@@ -933,7 +831,7 @@
         mCmi.connectNetwork(
                 new NetworkUpdateResult(config.networkId),
                 new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
+                Binder.getCallingUid());
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
     }
@@ -974,29 +872,31 @@
                         .filter(WifiConfigurationUtil::isSecurityParamsValid)
                         .findFirst().orElse(null),
                 config.getNetworkSelectionStatus().getCandidateSecurityParams());
-        mConnectedNetwork.getNetworkSelectionStatus().setLastUsedSecurityParams(
-                config.getNetworkSelectionStatus().getCandidateSecurityParams());
     }
 
     /**
-     * Tests the manual connection request will run network selection to find
-     * a proper security params, but not use the default one.
+     * Tests the network connection initiation sequence with the default network request pending
+     * from WifiNetworkFactory.
+     * This simulates the connect sequence using the public
+     * {@link WifiManager#enableNetwork(int, boolean)} and ensures that we invoke
+     * {@link WifiNative#connectToNetwork(WifiConfiguration)}.
      */
     @Test
     public void triggerConnectWithUpgradeType() throws Exception {
         String ssid = "TestOpenOweSsid";
         WifiConfiguration config = spy(WifiConfigurationTestUtil.createOpenOweNetwork(
-                ScanResultUtil.createQuotedSsid(ssid)));
+                ScanResultUtil.createQuotedSSID(ssid)));
         doAnswer(new AnswerWithArguments() {
-            public WifiConfiguration answer(List<WifiCandidates.Candidate> candidates) {
+            public void answer(
+                    WifiConfiguration network, ScanDetail scanDetail) {
+                if (!config.SSID.equals(network.SSID)) return;
                 config.getNetworkSelectionStatus().setCandidateSecurityParams(
                         SecurityParams.createSecurityParamsBySecurityType(
                                 WifiConfiguration.SECURITY_TYPE_OWE));
-                return config;
             }
-        }).when(mWifiNetworkSelector).selectNetwork(any());
+        }).when(mWifiNetworkSelector).updateNetworkCandidateSecurityParams(any(), any());
         String caps = "[RSN-OWE_TRANSITION]";
-        ScanResult scanResult = new ScanResult(WifiSsid.fromUtf8Text(ssid),
+        ScanResult scanResult = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid),
                 ssid, TEST_BSSID_STR, 1245, 0, caps, -78, 2412, 1025, 22, 33, 20, 0, 0, true);
         ScanResult.InformationElement ie = createIE(ScanResult.InformationElement.EID_SSID,
                 ssid.getBytes(StandardCharsets.UTF_8));
@@ -1011,8 +911,8 @@
 
         setupAndStartConnectSequence(config);
         validateSuccessfulConnectSequence(config);
-        assertEquals(WifiConfiguration.SECURITY_TYPE_OWE,
-                config.getNetworkSelectionStatus().getCandidateSecurityParams().getSecurityType());
+        assertTrue(config.getNetworkSelectionStatus().getCandidateSecurityParams()
+                .isSecurityType(WifiConfiguration.SECURITY_TYPE_OWE));
     }
 
     /**
@@ -1047,7 +947,6 @@
         when(mWifiNetworkFactory.hasConnectionRequests()).thenReturn(false);
         when(mUntrustedWifiNetworkFactory.hasConnectionRequests()).thenReturn(false);
         when(mOemWifiNetworkFactory.hasConnectionRequests()).thenReturn(false);
-        when(mMultiInternetManager.hasPendingConnectionRequests()).thenReturn(false);
 
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         config.networkId = FRAMEWORK_NETWORK_ID;
@@ -1092,7 +991,7 @@
                 getGoogleGuestScanDetail(TEST_RSSI, TEST_BSSID_STR, sFreq));
         when(mScanDetailCache.getScanResult(TEST_BSSID_STR)).thenReturn(
                 getGoogleGuestScanDetail(TEST_RSSI, TEST_BSSID_STR, sFreq).getScanResult());
-        ScanResult scanResult = new ScanResult(WifiSsid.fromUtf8Text(sFilsSsid),
+        ScanResult scanResult = new ScanResult(WifiSsid.createFromAsciiEncoded(sFilsSsid),
                 sFilsSsid, TEST_BSSID_STR, 1245, 0, "", -78, 2412, 1025, 22, 33, 20, 0, 0, true);
         ScanResult.InformationElement ie = createIE(ScanResult.InformationElement.EID_SSID,
                 sFilsSsid.getBytes(StandardCharsets.UTF_8));
@@ -1104,7 +1003,7 @@
                         SupplicantState.ASSOCIATED));
         mLooper.dispatchAll();
 
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
                 NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(mConnectedNetwork.SSID)));
         mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
                 new NetworkConnectionEventInfo(0, wifiSsid, TEST_BSSID_STR, false));
@@ -1165,7 +1064,6 @@
         }
         assertEquals(Arrays.asList(scanResult.informationElements),
                     wifiInfo.getInformationElements());
-        assertNotNull(wifiInfo.getNetworkKey());
         expectRegisterNetworkAgent((na) -> {
             if (!mConnectedNetwork.carrierMerged) {
                 assertNull(na.subscriberId);
@@ -1222,7 +1120,7 @@
         when(mScanDetailCache.getScanResult(TEST_BSSID_STR)).thenReturn(
                 getGoogleGuestScanDetail(TEST_RSSI, TEST_BSSID_STR, sFreq).getScanResult());
 
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
                 NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(mConnectedNetwork.SSID)));
         mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
                 new NetworkConnectionEventInfo(0, wifiSsid, TEST_BSSID_STR, false));
@@ -1259,7 +1157,7 @@
         assertEquals("L2ConnectingState", getCurrentState().getName());
 
         // send expected new network SSID
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
                 NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(config.SSID)));
         mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
                 new NetworkConnectionEventInfo(
@@ -1408,7 +1306,7 @@
         when(mWifiNative.getEapAnonymousIdentity(anyString()))
                 .thenReturn(expectedAnonymousIdentity);
 
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
                 NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(mConnectedNetwork.SSID)));
         mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
                 new NetworkConnectionEventInfo(0, wifiSsid, TEST_BSSID_STR, false));
@@ -1462,15 +1360,13 @@
         when(mWifiNative.getEapAnonymousIdentity(anyString()))
                 .thenReturn(pseudonym);
 
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
                 NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(mConnectedNetwork.SSID)));
         mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
                 new NetworkConnectionEventInfo(0, wifiSsid, TEST_BSSID_STR, false));
         mLooper.dispatchAll();
 
         verify(mWifiNative).getEapAnonymousIdentity(any());
-        // No decorated pseudonum, no need to send back to the supplicant.
-        verify(mWifiNative, never()).setEapAnonymousIdentity(any(), any());
         assertEquals(pseudonym,
                 mConnectedNetwork.enterpriseConfig.getAnonymousIdentity());
         // Verify that WifiConfigManager#addOrUpdateNetwork() was called if there we received a
@@ -1520,14 +1416,13 @@
         when(mWifiNative.getEapAnonymousIdentity(anyString()))
                 .thenReturn(pseudonym);
 
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
                 NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(mConnectedNetwork.SSID)));
         mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
                 new NetworkConnectionEventInfo(0, wifiSsid, TEST_BSSID_STR, false));
         mLooper.dispatchAll();
 
         verify(mWifiNative).getEapAnonymousIdentity(any());
-        verify(mWifiNative).setEapAnonymousIdentity(any(), eq(pseudonym + "@" + realm));
         assertEquals(pseudonym + "@" + realm,
                 mConnectedNetwork.enterpriseConfig.getAnonymousIdentity());
         // Verify that WifiConfigManager#addOrUpdateNetwork() was called if there we received a
@@ -1574,15 +1469,13 @@
         when(mWifiNative.getEapAnonymousIdentity(anyString()))
                 .thenReturn(pseudonym);
 
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
                 NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(mConnectedNetwork.SSID)));
         mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
                 new NetworkConnectionEventInfo(0, wifiSsid, TEST_BSSID_STR, false));
         mLooper.dispatchAll();
 
         verify(mWifiNative).getEapAnonymousIdentity(any());
-        // No decorated pseudonum, no need to send back to the supplicant.
-        verify(mWifiNative, never()).setEapAnonymousIdentity(any(), any());
         assertEquals(pseudonym,
                 mConnectedNetwork.enterpriseConfig.getAnonymousIdentity());
         // Verify that WifiConfigManager#addOrUpdateNetwork() was called if there we received a
@@ -1634,15 +1527,13 @@
         when(mWifiNative.getEapAnonymousIdentity(anyString()))
                 .thenReturn(pseudonym);
 
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
                 NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(mConnectedNetwork.SSID)));
         mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
                 new NetworkConnectionEventInfo(0, wifiSsid, TEST_BSSID_STR, false));
         mLooper.dispatchAll();
 
         verify(mWifiNative).getEapAnonymousIdentity(any());
-        // No decorated pseudonum, no need to send back to the supplicant.
-        verify(mWifiNative, never()).setEapAnonymousIdentity(any(), any());
         assertEquals(pseudonym,
                 mConnectedNetwork.enterpriseConfig.getAnonymousIdentity());
         // Verify that WifiConfigManager#addOrUpdateNetwork() was called if there we received a
@@ -1664,12 +1555,8 @@
         config.BSSID = TEST_BSSID_STR;
         config.networkId = FRAMEWORK_NETWORK_ID;
         config.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_AUTO;
-        config.roamingConsortiumIds = TEST_RCOI_ARRAY;
-        when(mPasspointManager.getSelectedRcoiForNetwork(eq(config.getPasspointUniqueId()),
-                eq(config.SSID))).thenReturn(TEST_MATCHED_RCOI);
         setupAndStartConnectSequence(config);
         validateSuccessfulConnectSequence(config);
-        assertEquals(TEST_MATCHED_RCOI, config.enterpriseConfig.getSelectedRcoi());
 
         mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
                 new StateChangeResult(FRAMEWORK_NETWORK_ID, TEST_WIFI_SSID, TEST_BSSID_STR,
@@ -1774,43 +1661,6 @@
     }
 
     /**
-     * Tests that {@link WifiInfo#getHiddenSsid()} returns {@code true} if we've connected to a
-     * hidden SSID network.
-     * @throws Exception
-     */
-    @Test
-    public void testConnectHiddenSsid() throws Exception {
-        connect();
-
-        // Set the scan detail cache for hidden SSID.
-        when(mWifiConfigManager.getScanDetailCacheForNetwork(FRAMEWORK_NETWORK_ID))
-                .thenReturn(mScanDetailCache);
-        ScanDetail hiddenScanDetail = getHiddenScanDetail(TEST_RSSI, TEST_BSSID_STR1, sFreq1);
-        when(mScanDetailCache.getScanDetail(TEST_BSSID_STR1)).thenReturn(hiddenScanDetail);
-        when(mScanDetailCache.getScanResult(TEST_BSSID_STR1)).thenReturn(
-                hiddenScanDetail.getScanResult());
-
-        mCmi.sendMessage(WifiMonitor.ASSOCIATED_BSSID_EVENT, 0, 0, TEST_BSSID_STR1);
-        mLooper.dispatchAll();
-
-        // Hidden SSID scan result should set WifiInfo.getHiddenSsid() to true.
-        assertTrue(mWifiInfo.getHiddenSSID());
-
-        // Set the scan detail cache for non-hidden SSID.
-        ScanDetail googleGuestScanDetail =
-                getGoogleGuestScanDetail(TEST_RSSI, TEST_BSSID_STR, sFreq1);
-        when(mScanDetailCache.getScanDetail(TEST_BSSID_STR)).thenReturn(googleGuestScanDetail);
-        when(mScanDetailCache.getScanResult(TEST_BSSID_STR)).thenReturn(
-                googleGuestScanDetail.getScanResult());
-
-        mCmi.sendMessage(WifiMonitor.ASSOCIATED_BSSID_EVENT, 0, 0, TEST_BSSID_STR);
-        mLooper.dispatchAll();
-
-        // Non-hidden SSID scan result should set WifiInfo.getHiddenSsid() to false.
-        assertFalse(mWifiInfo.getHiddenSSID());
-    }
-
-    /**
      * Verify that WifiStateTracker is called if wifi is disabled while connected.
      */
     @Test
@@ -1838,7 +1688,6 @@
         when(mWifiNetworkFactory.hasConnectionRequests()).thenReturn(false);
         when(mUntrustedWifiNetworkFactory.hasConnectionRequests()).thenReturn(false);
         when(mOemWifiNetworkFactory.hasConnectionRequests()).thenReturn(false);
-        when(mMultiInternetManager.hasPendingConnectionRequests()).thenReturn(false);
 
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         config.networkId = FRAMEWORK_NETWORK_ID + 1;
@@ -1865,7 +1714,6 @@
         when(mWifiNetworkFactory.hasConnectionRequests()).thenReturn(false);
         when(mUntrustedWifiNetworkFactory.hasConnectionRequests()).thenReturn(false);
         when(mOemWifiNetworkFactory.hasConnectionRequests()).thenReturn(false);
-        when(mMultiInternetManager.hasPendingConnectionRequests()).thenReturn(false);
 
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
 
@@ -1876,8 +1724,7 @@
         verify(mWifiConfigManager, never())
                 .getConfiguredNetworkWithoutMasking(eq(config.networkId));
         verify(mWifiNative, never()).connectToNetwork(eq(WIFI_IFACE_NAME), eq(config));
-        // These are called from connectToUserSelectNetwork() and L2ConnectedState::enter()
-        verify(mWifiPermissionsUtil, times(4)).checkNetworkSettingsPermission(anyInt());
+        verify(mWifiPermissionsUtil, times(2)).checkNetworkSettingsPermission(anyInt());
     }
 
     /**
@@ -1896,7 +1743,7 @@
         mCmi.connectNetwork(
                 new NetworkUpdateResult(FRAMEWORK_NETWORK_ID),
                 new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
+                Binder.getCallingUid());
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
 
@@ -1921,7 +1768,7 @@
         mCmi.connectNetwork(
                 new NetworkUpdateResult(FRAMEWORK_NETWORK_ID),
                 new ActionListenerWrapper(connectActionListener),
-                callingUid, OP_PACKAGE_NAME);
+                callingUid);
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
 
@@ -1946,7 +1793,7 @@
         mCmi.connectNetwork(
                 new NetworkUpdateResult(FRAMEWORK_NETWORK_ID),
                 new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
+                Binder.getCallingUid());
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
 
@@ -1978,7 +1825,7 @@
         mCmi.connectNetwork(
                 networkUpdateResult,
                 new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
+                Binder.getCallingUid());
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
 
@@ -2008,7 +1855,7 @@
         mCmi.connectNetwork(
                 new NetworkUpdateResult(FRAMEWORK_NETWORK_ID),
                 new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
+                Binder.getCallingUid());
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
 
@@ -2038,7 +1885,7 @@
         mCmi.connectNetwork(
                 new NetworkUpdateResult(FRAMEWORK_NETWORK_ID),
                 new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
+                Binder.getCallingUid());
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
 
@@ -2150,7 +1997,7 @@
         mCmi.connectNetwork(
                 new NetworkUpdateResult(TEST_NETWORK_ID),
                 new ActionListenerWrapper(connectActionListener),
-                Process.SYSTEM_UID, OP_PACKAGE_NAME);
+                Process.SYSTEM_UID);
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
 
@@ -2167,7 +2014,7 @@
         mCmi.connectNetwork(
                 new NetworkUpdateResult(networkId),
                 new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
+                Binder.getCallingUid());
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
     }
@@ -2205,16 +2052,14 @@
         verify(mWifiLastResortWatchdog, times(2)).noteConnectionFailureAndTriggerIfNeeded(
                 eq(TEST_SSID), eq(TEST_BSSID_STR),
                 eq(WifiLastResortWatchdog.FAILURE_CODE_DHCP), anyBoolean());
-        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(eq(TEST_BSSID_STR),
-                eq(mTestConfig), eq(WifiBlocklistMonitor.REASON_DHCP_FAILURE), anyInt());
+        verify(mWifiBlocklistMonitor, times(2)).handleBssidConnectionFailure(eq(TEST_BSSID_STR),
+                eq(TEST_SSID), eq(WifiBlocklistMonitor.REASON_DHCP_FAILURE), anyInt());
+        verify(mWifiBlocklistMonitor, times(2)).handleBssidConnectionFailure(eq(TEST_BSSID_STR),
+                eq(TEST_SSID), eq(WifiBlocklistMonitor.REASON_DHCP_FAILURE), anyInt());
         verify(mWifiBlocklistMonitor, never()).handleDhcpProvisioningSuccess(
                 TEST_BSSID_STR, TEST_SSID);
         verify(mWifiBlocklistMonitor, never()).handleNetworkValidationSuccess(
                 TEST_BSSID_STR, TEST_SSID);
-        DisconnectEventInfo disconnectEventInfo =
-                new DisconnectEventInfo(mConnectedNetwork.SSID, TEST_BSSID_STR, 3, true);
-        mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
-        mLooper.dispatchAll();
     }
 
     /**
@@ -2246,14 +2091,13 @@
         when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(config);
 
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1));
+                WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD);
         DisconnectEventInfo disconnectEventInfo =
                 new DisconnectEventInfo(TEST_SSID, TEST_BSSID_STR, 0, false);
         mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
         mLooper.dispatchAll();
 
-        verify(mWrongPasswordNotifier, never()).onWrongPasswordError(any());
+        verify(mWrongPasswordNotifier, never()).onWrongPasswordError(anyString());
         verify(mWifiConfigManager).updateNetworkSelectionStatus(anyInt(),
                 eq(WifiConfiguration.NetworkSelectionStatus.DISABLED_AUTHENTICATION_FAILURE));
 
@@ -2261,64 +2105,6 @@
     }
 
     /**
-     * Verify that when wrong password authentication failure notification is not sent when
-     * the network was local only.
-     */
-    @Test
-    public void testWrongPasswordWithLocalOnlyConnection() throws Exception {
-        initializeAndAddNetworkAndVerifySuccess();
-
-        startConnectSuccess();
-
-        WifiConfiguration config = createTestNetwork(false);
-        when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(config);
-
-        when(mWifiNetworkFactory.getSpecificNetworkRequestUids(any(), any()))
-                .thenReturn(Set.of(TEST_UID));
-        when(mWifiNetworkFactory.getSpecificNetworkRequestUidAndPackageName(any(), any()))
-                .thenReturn(Pair.create(TEST_UID, OP_PACKAGE_NAME));
-        mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1));
-        DisconnectEventInfo disconnectEventInfo =
-                new DisconnectEventInfo(TEST_SSID, TEST_BSSID_STR, 0, false);
-        mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
-        mLooper.dispatchAll();
-
-        verify(mWrongPasswordNotifier, never()).onWrongPasswordError(any());
-        assertEquals("DisconnectedState", getCurrentState().getName());
-    }
-
-    /**
-     * Verify that when wrong password authentication failure notification is sent when
-     * the network was NOT local only.
-     */
-    @Test
-    public void testWrongPasswordWithNonLocalOnlyConnection() throws Exception {
-        initializeAndAddNetworkAndVerifySuccess();
-
-        startConnectSuccess();
-
-        WifiConfiguration config = createTestNetwork(false);
-        when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(config);
-
-        when(mWifiNetworkFactory.getSpecificNetworkRequestUids(any(), any()))
-                .thenReturn(Collections.emptySet());
-        when(mWifiNetworkFactory.getSpecificNetworkRequestUidAndPackageName(any(), any()))
-                .thenReturn(Pair.create(Process.INVALID_UID, ""));
-        mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1));
-        DisconnectEventInfo disconnectEventInfo =
-                new DisconnectEventInfo(TEST_SSID, TEST_BSSID_STR, 0, false);
-        mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
-        mLooper.dispatchAll();
-
-        verify(mWrongPasswordNotifier).onWrongPasswordError(any());
-        assertEquals("DisconnectedState", getCurrentState().getName());
-    }
-
-    /**
      * It is observed sometimes the WifiMonitor.NETWORK_DISCONNECTION_EVENT is observed before the
      * actual connection failure messages while making a connection.
      * The test make sure that make sure that the connection event is ended properly in the above
@@ -2343,7 +2129,7 @@
                 any(), eq(WifiMetrics.ConnectionEvent.FAILURE_NETWORK_DISCONNECTION),
                 anyInt(), anyInt(), anyInt());
         verify(mWifiConnectivityManager).handleConnectionAttemptEnded(
-                any(), anyInt(), anyInt(), any(), any());
+                any(), anyInt(), any(), any());
         assertEquals(WifiInfo.SECURITY_TYPE_UNKNOWN, mWifiInfo.getCurrentSecurityType());
         assertEquals("DisconnectedState", getCurrentState().getName());
     }
@@ -2375,14 +2161,13 @@
                         SupplicantState.FOUR_WAY_HANDSHAKE));
 
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1));
+                WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD);
         DisconnectEventInfo disconnectEventInfo =
                 new DisconnectEventInfo(TEST_SSID, TEST_BSSID_STR, 0, false);
         mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
         mLooper.dispatchAll();
 
-        verify(mWrongPasswordNotifier).onWrongPasswordError(config);
+        verify(mWrongPasswordNotifier).onWrongPasswordError(eq(TEST_SSID));
         verify(mWifiConfigManager).updateNetworkSelectionStatus(anyInt(),
                 eq(WifiConfiguration.NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD));
         verify(mWifiMetrics).incrementNumOfCarrierWifiConnectionAuthFailure();
@@ -2421,9 +2206,8 @@
                 .thenReturn(WifiHealthMonitor.REASON_AUTH_FAILURE);
 
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE,
-                        WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED));
+                WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE,
+                WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED);
         mLooper.dispatchAll();
 
         verify(mEapFailureNotifier).onEapFailure(
@@ -2452,30 +2236,13 @@
         when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(config);
 
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE,
-                        WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED));
+                WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE,
+                WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED);
         mLooper.dispatchAll();
 
         verify(mWifiCarrierInfoManager, never()).resetCarrierKeysForImsiEncryption(any());
     }
 
-    @Test
-    public void testAuthFailureOnDifferentSsidIsIgnored() throws Exception {
-        initializeAndAddNetworkAndVerifySuccess();
-
-        startConnectSuccess();
-        mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo("WRONG_SSID",
-                        MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE,
-                        WifiNative.EAP_SIM_NOT_SUBSCRIBED));
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager, never()).updateNetworkSelectionStatus(anyInt(),
-                eq(WifiConfiguration.NetworkSelectionStatus
-                        .DISABLED_AUTHENTICATION_NO_SUBSCRIPTION));
-    }
-
     /**
      * Verify that the network selection status will be updated with
      * DISABLED_AUTHENTICATION_NO_SUBSCRIBED when service is not subscribed.
@@ -2486,10 +2253,11 @@
 
         startConnectSuccess();
 
+        when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(null);
+
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE,
-                        WifiNative.EAP_SIM_NOT_SUBSCRIBED));
+                WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE,
+                WifiNative.EAP_SIM_NOT_SUBSCRIBED);
         mLooper.dispatchAll();
 
         verify(mWifiConfigManager).updateNetworkSelectionStatus(anyInt(),
@@ -2523,8 +2291,6 @@
         assertEquals("CMD_PRE_DHCP_ACTION", mCmi.getWhatToString(CMD_PRE_DHCP_ACTION));
         assertEquals("CMD_IP_REACHABILITY_LOST", mCmi.getWhatToString(
                 ClientModeImpl.CMD_IP_REACHABILITY_LOST));
-        assertEquals("CMD_IP_REACHABILITY_FAILURE", mCmi.getWhatToString(
-                ClientModeImpl.CMD_IP_REACHABILITY_FAILURE));
     }
 
     @Test
@@ -2541,7 +2307,7 @@
         mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
         mLooper.dispatchAll();
         mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(0, WifiSsid.fromUtf8Text(mConnectedNetwork.SSID),
+                new StateChangeResult(0, WifiSsid.createFromAsciiEncoded(mConnectedNetwork.SSID),
                         TEST_BSSID_STR, SupplicantState.DISCONNECTED));
         mLooper.dispatchAll();
 
@@ -2575,7 +2341,7 @@
         mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
         mLooper.dispatchAll();
         mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(0, WifiSsid.fromUtf8Text(mConnectedNetwork.SSID),
+                new StateChangeResult(0, WifiSsid.createFromAsciiEncoded(mConnectedNetwork.SSID),
                         TEST_BSSID_STR, SupplicantState.DISCONNECTED));
         mLooper.dispatchAll();
 
@@ -2601,7 +2367,7 @@
         mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
         mLooper.dispatchAll();
         mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(0, WifiSsid.fromUtf8Text(mConnectedNetwork.SSID),
+                new StateChangeResult(0, WifiSsid.createFromAsciiEncoded(mConnectedNetwork.SSID),
                         TEST_BSSID_STR, SupplicantState.DISCONNECTED));
         mLooper.dispatchAll();
 
@@ -2661,21 +2427,10 @@
      */
     @Test
     public void enablingVerboseLoggingUpdatesLogRecSize() {
-        when(mActivityManager.isLowRamDevice()).thenReturn(false);
         mCmi.enableVerboseLogging(true);
         assertEquals(LOG_REC_LIMIT_IN_VERBOSE_MODE, mCmi.getLogRecMaxSize());
     }
 
-    /**
-     * Verifies that, in verbose mode, we allow a larger number of log records on a low ram device.
-     */
-    @Test
-    public void enablingVerboseLoggingUpdatesLogRecSizeLowRamDevice() {
-        when(mActivityManager.isLowRamDevice()).thenReturn(true);
-        mCmi.enableVerboseLogging(true);
-        assertEquals(LOG_REC_LIMIT_IN_VERBOSE_MODE_LOW_RAM, mCmi.getLogRecMaxSize());
-    }
-
     @Test
     public void disablingVerboseLoggingClearsRecords() {
         mCmi.sendMessage(ClientModeImpl.CMD_DISCONNECT);
@@ -3082,9 +2837,7 @@
         // targetNetworkId state)
         mCmi.sendMessage(ClientModeImpl.CMD_START_CONNECT, 0, 0, TEST_BSSID_STR);
         mLooper.dispatchAll();
-        mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_TIMEOUT, -1));
+        mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT, 0, 0, null);
         DisconnectEventInfo disconnectEventInfo =
                 new DisconnectEventInfo(TEST_SSID, TEST_BSSID_STR, 0, false);
         mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
@@ -3346,8 +3099,6 @@
     public void verifyConnectedModeNetworkCapabilitiesBandwidthUpdate() throws Exception {
         when(mPerNetwork.getTxLinkBandwidthKbps()).thenReturn(40_000);
         when(mPerNetwork.getRxLinkBandwidthKbps()).thenReturn(50_000);
-        when(mWifiNetworkFactory.getSpecificNetworkRequestUids(any(), any()))
-                .thenReturn(Collections.emptySet());
         when(mWifiNetworkFactory.getSpecificNetworkRequestUidAndPackageName(any(), any()))
                 .thenReturn(Pair.create(Process.INVALID_UID, ""));
         // Simulate the first connection.
@@ -3453,32 +3204,6 @@
      * Verifies that when
      * 1. connected MAC randomization is on and
      * 2. macRandomizationSetting of the WifiConfiguration is RANDOMIZATION_AUTO and
-     * 3. current MAC set to the driver is a randomized MAC address.
-     * 4. SSID of network to connect is in the MAC randomization forced disable list.
-     *
-     * Then the current MAC will be set to the factory MAC when CMD_START_CONNECT executes.
-     */
-    @Test
-    public void testConnectedMacRandomizationRandomizationForceDisabled() throws Exception {
-        initializeAndAddNetworkAndVerifySuccess();
-
-        when(mWifiNative.getMacAddress(WIFI_IFACE_NAME))
-                .thenReturn(TEST_LOCAL_MAC_ADDRESS.toString());
-        mResources.setStringArray(R.array.config_wifiForceDisableMacRandomizationSsidList,
-                new String[]{mConnectedNetwork.SSID});
-
-        connect();
-        verify(mWifiNative).setStaMacAddress(WIFI_IFACE_NAME, TEST_GLOBAL_MAC_ADDRESS);
-        verify(mWifiMetrics).logStaEvent(
-                eq(WIFI_IFACE_NAME), eq(StaEvent.TYPE_MAC_CHANGE), any(WifiConfiguration.class));
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(), eq(Process.SYSTEM_UID));
-        assertEquals(TEST_GLOBAL_MAC_ADDRESS.toString(), mWifiInfo.getMacAddress());
-    }
-
-    /**
-     * Verifies that when
-     * 1. connected MAC randomization is on and
-     * 2. macRandomizationSetting of the WifiConfiguration is RANDOMIZATION_AUTO and
      * 3. randomized MAC for the network to connect to is different from the current MAC.
      *
      * Then the current MAC gets set to the randomized MAC when CMD_START_CONNECT executes.
@@ -3609,7 +3334,7 @@
         mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
         mLooper.dispatchAll();
         mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(0, WifiSsid.fromUtf8Text(mConnectedNetwork.SSID),
+                new StateChangeResult(0, WifiSsid.createFromAsciiEncoded(mConnectedNetwork.SSID),
                         TEST_BSSID_STR, SupplicantState.DISCONNECTED));
         mLooper.dispatchAll();
 
@@ -3665,8 +3390,7 @@
         initializeAndAddNetworkAndVerifySuccess();
         mCmi.sendMessage(ClientModeImpl.CMD_START_CONNECT, FRAMEWORK_NETWORK_ID, 0, TEST_BSSID_STR);
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_TIMEOUT, -1));
+                WifiManager.ERROR_AUTH_FAILURE_TIMEOUT);
         mLooper.dispatchAll();
 
         WifiConfiguration config = mCmi.getConnectedWifiConfiguration();
@@ -3685,8 +3409,7 @@
         initializeAndAddNetworkAndVerifySuccess();
         mCmi.sendMessage(ClientModeImpl.CMD_START_CONNECT, FRAMEWORK_NETWORK_ID, 0, TEST_BSSID_STR);
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1));
+                WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD);
         mLooper.dispatchAll();
 
         verify(mConnectionFailureNotifier, never())
@@ -3710,35 +3433,41 @@
                 eq(WifiDiagnostics.CONNECTION_EVENT_STARTED), any());
     }
 
+    /**
+     * Verifies that CMD_DIAG_CONNECT_TIMEOUT is processed after the timeout threshold if we
+     * start a connection but do not finish it.
+     * @throws Exception
+     */
     @Test
-    public void testApNoResponseTriggerTimeout() throws Exception {
+    public void testCmdDiagsConnectTimeoutIsGeneratedAfterCmdStartConnect() throws Exception {
+        // Setup CONNECT_MODE & a WifiConfiguration
         initializeAndAddNetworkAndVerifySuccess();
         mCmi.sendMessage(ClientModeImpl.CMD_START_CONNECT, 0, 0, TEST_BSSID_STR);
         mLooper.dispatchAll();
-        verify(mWifiBlocklistMonitor, never()).handleBssidConnectionFailure(any(), any(),
-                anyInt(), anyInt());
-
-        mLooper.moveTimeForward(ClientModeImpl.CONNECTING_WATCHDOG_TIMEOUT_MS);
+        mLooper.moveTimeForward(ClientModeImpl.DIAGS_CONNECT_TIMEOUT_MILLIS);
         mLooper.dispatchAll();
-        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(any(), any(),
-                eq(WifiBlocklistMonitor.REASON_FAILURE_NO_RESPONSE), anyInt());
         verify(mWifiDiagnostics).reportConnectionEvent(
                 eq(WifiDiagnostics.CONNECTION_EVENT_TIMEOUT), any());
     }
 
+    /**
+     * Verifies that CMD_DIAG_CONNECT_TIMEOUT does not get processed before the timeout threshold.
+     * @throws Exception
+     */
     @Test
-    public void testApNoResponseTimerCanceledAfterConnectionSuccess() throws Exception {
-        connect();
-        mLooper.moveTimeForward(ClientModeImpl.CONNECTING_WATCHDOG_TIMEOUT_MS);
+    public void testCmdDiagsConnectTimeoutIsNotProcessedBeforeTimerExpires() throws Exception {
+        // Setup CONNECT_MODE & a WifiConfiguration
+        initializeAndAddNetworkAndVerifySuccess();
+        mCmi.sendMessage(ClientModeImpl.CMD_START_CONNECT, 0, 0, TEST_BSSID_STR);
         mLooper.dispatchAll();
-        verify(mWifiBlocklistMonitor, never()).handleBssidConnectionFailure(any(), any(),
-                anyInt(), anyInt());
+        mLooper.moveTimeForward(ClientModeImpl.DIAGS_CONNECT_TIMEOUT_MILLIS - 1000);
+        mLooper.dispatchAll();
         verify(mWifiDiagnostics, never()).reportConnectionEvent(
                 eq(WifiDiagnostics.CONNECTION_EVENT_TIMEOUT), any());
     }
 
     private void verifyConnectionEventTimeoutDoesNotOccur() {
-        mLooper.moveTimeForward(ClientModeImpl.CONNECTING_WATCHDOG_TIMEOUT_MS);
+        mLooper.moveTimeForward(ClientModeImpl.DIAGS_CONNECT_TIMEOUT_MILLIS);
         mLooper.dispatchAll();
         verify(mWifiDiagnostics, never()).reportConnectionEvent(
                 eq(WifiDiagnostics.CONNECTION_EVENT_TIMEOUT), any());
@@ -3768,16 +3497,14 @@
                 eq(WifiDiagnostics.CONNECTION_EVENT_FAILED), any());
         verify(mWifiConnectivityManager).handleConnectionAttemptEnded(
                 mClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION,
-                WifiMetricsProto.ConnectionEvent.ASSOCIATION_REJECTION_AP_UNABLE_TO_HANDLE_NEW_STA,
-                TEST_BSSID_STR,
-                mTestConfig);
+                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION, TEST_BSSID_STR,
+                TEST_SSID);
         verify(mWifiNetworkFactory).handleConnectionAttemptEnded(
                 eq(WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION),
-                eq(mTestConfig), eq(TEST_BSSID_STR));
+                any(WifiConfiguration.class), eq(TEST_BSSID_STR));
         verify(mWifiNetworkSuggestionsManager).handleConnectionAttemptEnded(
                 eq(WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION),
-                eq(mTestConfig), eq(null));
+                any(WifiConfiguration.class), eq(null));
         verify(mWifiMetrics, never())
                 .incrementNumBssidDifferentSelectionBetweenFrameworkAndFirmware();
         verifyConnectionEventTimeoutDoesNotOccur();
@@ -3810,22 +3537,20 @@
         initializeAndAddNetworkAndVerifySuccess();
         mCmi.sendMessage(ClientModeImpl.CMD_START_CONNECT, 0, 0, TEST_BSSID_STR);
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1));
+                WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD);
         mLooper.dispatchAll();
         verify(mWifiDiagnostics).reportConnectionEvent(
                 eq(WifiDiagnostics.CONNECTION_EVENT_FAILED), any());
         verify(mWifiConnectivityManager).handleConnectionAttemptEnded(
                 mClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_AUTHENTICATION_FAILURE,
-                WifiMetricsProto.ConnectionEvent.AUTH_FAILURE_WRONG_PSWD, TEST_BSSID_STR,
-                mTestConfig);
+                WifiMetrics.ConnectionEvent.FAILURE_AUTHENTICATION_FAILURE, TEST_BSSID_STR,
+                TEST_SSID);
         verify(mWifiNetworkFactory).handleConnectionAttemptEnded(
                 eq(WifiMetrics.ConnectionEvent.FAILURE_AUTHENTICATION_FAILURE),
-                eq(mTestConfig), eq(TEST_BSSID_STR));
+                any(WifiConfiguration.class), eq(TEST_BSSID_STR));
         verify(mWifiNetworkSuggestionsManager).handleConnectionAttemptEnded(
                 eq(WifiMetrics.ConnectionEvent.FAILURE_AUTHENTICATION_FAILURE),
-                eq(mTestConfig), eq(null));
+                any(WifiConfiguration.class), eq(null));
         verify(mWifiMetrics, never())
                 .incrementNumBssidDifferentSelectionBetweenFrameworkAndFirmware();
         verifyConnectionEventTimeoutDoesNotOccur();
@@ -3867,8 +3592,7 @@
         mLooper.dispatchAll();
 
         verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(eq(TEST_BSSID_STR),
-                eq(mConnectedNetwork), eq(WifiBlocklistMonitor.REASON_ABNORMAL_DISCONNECT),
-                anyInt());
+                eq(TEST_SSID), eq(WifiBlocklistMonitor.REASON_ABNORMAL_DISCONNECT), anyInt());
     }
 
     /**
@@ -3893,7 +3617,7 @@
                 getGoogleGuestScanDetail(testLowRssi, TEST_BSSID_STR, sFreq).getScanResult());
         mLooper.dispatchAll();
 
-        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(TEST_BSSID_STR, mTestConfig,
+        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(TEST_BSSID_STR, TEST_SSID,
                 WifiBlocklistMonitor.REASON_ASSOCIATION_TIMEOUT, testLowRssi);
     }
 
@@ -3932,23 +3656,12 @@
         verify(mWifiScoreCard).resetConnectionState(WIFI_IFACE_NAME);
         // Verify that the WifiBlocklistMonitor is notified of a non-locally generated disconnect
         // that occurred mid connection attempt.
-        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(anyString(), eq(mTestConfig),
+        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(anyString(), anyString(),
                 eq(WifiBlocklistMonitor.REASON_NONLOCAL_DISCONNECT_CONNECTING), anyInt());
         verify(mWifiConfigManager, never()).updateNetworkSelectionStatus(anyInt(),
                 eq(WifiConfiguration.NetworkSelectionStatus.DISABLED_CONSECUTIVE_FAILURES));
     }
 
-    private void triggerConnectionWithConsecutiveFailure() throws Exception {
-        when(mPerNetworkRecentStats.getCount(WifiScoreCard.CNT_CONSECUTIVE_CONNECTION_FAILURE))
-                .thenReturn(WifiBlocklistMonitor.NUM_CONSECUTIVE_FAILURES_PER_NETWORK_EXP_BACKOFF);
-        mCmi.sendMessage(ClientModeImpl.CMD_START_CONNECT, FRAMEWORK_NETWORK_ID, 0, TEST_BSSID_STR);
-        mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT,
-                new DisconnectEventInfo(TEST_SSID, TEST_BSSID_STR,
-                        ISupplicantStaIfaceCallback.ReasonCode.FOURWAY_HANDSHAKE_TIMEOUT,
-                        false));
-        mLooper.dispatchAll();
-    }
-
     /**
      * Verify that the WifiConfigManager is notified when a network experiences consecutive
      * connection failures.
@@ -3956,84 +3669,22 @@
     @Test
     public void testDisableNetworkConsecutiveFailures() throws Exception {
         initializeAndAddNetworkAndVerifySuccess();
-        triggerConnectionWithConsecutiveFailure();
-
+        when(mPerNetworkRecentStats.getCount(WifiScoreCard.CNT_CONSECUTIVE_CONNECTION_FAILURE))
+                .thenReturn(WifiBlocklistMonitor.NUM_CONSECUTIVE_FAILURES_PER_NETWORK_EXP_BACKOFF);
+        mCmi.sendMessage(ClientModeImpl.CMD_START_CONNECT, FRAMEWORK_NETWORK_ID, 0, TEST_BSSID_STR);
+        mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT,
+                new DisconnectEventInfo(TEST_SSID, TEST_BSSID_STR,
+                        ISupplicantStaIfaceCallback.ReasonCode.FOURWAY_HANDSHAKE_TIMEOUT,
+                        false));
+        mLooper.dispatchAll();
         verify(mWifiScoreCard).noteConnectionFailure(any(), anyInt(), anyString(), anyInt());
         verify(mWifiScoreCard).resetConnectionState(WIFI_IFACE_NAME);
-        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(anyString(), eq(mTestConfig),
+        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(anyString(), anyString(),
                 eq(WifiBlocklistMonitor.REASON_NONLOCAL_DISCONNECT_CONNECTING), anyInt());
         verify(mWifiConfigManager).updateNetworkSelectionStatus(FRAMEWORK_NETWORK_ID,
                 WifiConfiguration.NetworkSelectionStatus.DISABLED_CONSECUTIVE_FAILURES);
     }
 
-    @Test
-    public void testDisableNetworkConsecutiveFailuresDoNotOverrideDisabledNetworks()
-            throws Exception {
-        initializeAndAddNetworkAndVerifySuccess();
-        // Now mock the connecting network to be already disabled
-        mTestConfig.getNetworkSelectionStatus().setNetworkSelectionStatus(
-                NETWORK_SELECTION_PERMANENTLY_DISABLED);
-        triggerConnectionWithConsecutiveFailure();
-
-        verify(mWifiScoreCard).noteConnectionFailure(any(), anyInt(), anyString(), anyInt());
-        verify(mWifiScoreCard).resetConnectionState(WIFI_IFACE_NAME);
-        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(anyString(), eq(mTestConfig),
-                eq(WifiBlocklistMonitor.REASON_NONLOCAL_DISCONNECT_CONNECTING), anyInt());
-
-        // should not disable due to DISABLED_CONSECUTIVE_FAILURES
-        verify(mWifiConfigManager, never()).updateNetworkSelectionStatus(FRAMEWORK_NETWORK_ID,
-                WifiConfiguration.NetworkSelectionStatus.DISABLED_CONSECUTIVE_FAILURES);
-    }
-
-    /**
-     * Verify that a network that was successfully connected to before will get permanently disabled
-     * for wrong password when the number of wrong password failures exceed a threshold.
-     */
-    @Test
-    public void testUpgradeMultipleWrongPasswordFailuresToPermanentWrongPassword()
-            throws Exception {
-        initializeAndAddNetworkAndVerifySuccess();
-        startConnectSuccess();
-
-        // mock the target network to be something that had been successfully connected before
-        WifiConfiguration config = createTestNetwork(false);
-        config.getNetworkSelectionStatus().setHasEverConnected(true);
-        when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(config);
-
-        // mock number of wrong password failures to be less than the threshold
-        when(mPerNetworkRecentStats.getCount(WifiScoreCard.CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE))
-                .thenReturn(ClientModeImpl.THRESHOLD_TO_PERM_WRONG_PASSWORD - 1);
-
-        // trigger the wrong password failure
-        mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1));
-        DisconnectEventInfo disconnectEventInfo =
-                new DisconnectEventInfo(TEST_SSID, TEST_BSSID_STR, 0, false);
-        mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
-        mLooper.dispatchAll();
-
-        // should not disable network permanently
-        verify(mWifiConfigManager, never()).updateNetworkSelectionStatus(FRAMEWORK_NETWORK_ID,
-                WifiConfiguration.NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD);
-
-        // Bump up the wrong password count to reach the threshold and verify the network is
-        // disabled permanently.
-        when(mPerNetworkRecentStats.getCount(WifiScoreCard.CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE))
-                .thenReturn(ClientModeImpl.THRESHOLD_TO_PERM_WRONG_PASSWORD);
-
-        startConnectSuccess();
-        // trigger the wrong password failure
-        mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1));
-        mCmi.sendMessage(WifiMonitor.NETWORK_DISCONNECTION_EVENT, disconnectEventInfo);
-        mLooper.dispatchAll();
-
-        verify(mWifiConfigManager).updateNetworkSelectionStatus(FRAMEWORK_NETWORK_ID,
-                WifiConfiguration.NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD);
-    }
-
     /**
      * Verify that the recent failure association status is updated properly when
      * DENIED_POOR_CHANNEL_CONDITIONS occurs.
@@ -4156,7 +3807,7 @@
         verify(mWifiLastResortWatchdog, never()).noteConnectionFailureAndTriggerIfNeeded(
                 anyString(), anyString(), anyInt(), anyBoolean());
         verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(eq(TEST_BSSID_STR),
-                eq(mTestConfig), eq(WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA),
+                eq(TEST_SSID), eq(WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA),
                 anyInt());
     }
 
@@ -4177,7 +3828,7 @@
         verify(mWifiLastResortWatchdog, never()).noteConnectionFailureAndTriggerIfNeeded(
                 anyString(), anyString(), anyInt(), anyBoolean());
         verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(eq(TEST_BSSID_STR),
-                eq(mTestConfig), eq(WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA),
+                eq(TEST_SSID), eq(WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA),
                 anyInt());
     }
 
@@ -4198,7 +3849,7 @@
         verify(mWifiLastResortWatchdog).noteConnectionFailureAndTriggerIfNeeded(
                 anyString(), anyString(), anyInt(), anyBoolean());
         verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(eq(TEST_BSSID_STR),
-                eq(mTestConfig), eq(WifiBlocklistMonitor.REASON_ASSOCIATION_REJECTION), anyInt());
+                eq(TEST_SSID), eq(WifiBlocklistMonitor.REASON_ASSOCIATION_REJECTION), anyInt());
         verify(mWifiMetrics).incrementNumOfCarrierWifiConnectionNonAuthFailure();
     }
 
@@ -4216,13 +3867,12 @@
                 new StateChangeResult(0, TEST_WIFI_SSID, TEST_BSSID_STR,
                         SupplicantState.COMPLETED));
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD, -1));
+                WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD);
         mLooper.dispatchAll();
         verify(mWifiLastResortWatchdog, never()).noteConnectionFailureAndTriggerIfNeeded(
                 anyString(), anyString(), anyInt(), anyBoolean());
         verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(eq(TEST_BSSID_STR),
-                eq(mTestConfig), eq(WifiBlocklistMonitor.REASON_WRONG_PASSWORD), anyInt());
+                eq(TEST_SSID), eq(WifiBlocklistMonitor.REASON_WRONG_PASSWORD), anyInt());
     }
 
     /**
@@ -4239,13 +3889,12 @@
                 new StateChangeResult(0, TEST_WIFI_SSID, TEST_BSSID_STR,
                         SupplicantState.COMPLETED));
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE, -1));
+                WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE);
         mLooper.dispatchAll();
         verify(mWifiLastResortWatchdog, never()).noteConnectionFailureAndTriggerIfNeeded(
                 anyString(), anyString(), anyInt(), anyBoolean());
         verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(eq(TEST_BSSID_STR),
-                eq(mTestConfig), eq(WifiBlocklistMonitor.REASON_EAP_FAILURE), anyInt());
+                eq(TEST_SSID), eq(WifiBlocklistMonitor.REASON_EAP_FAILURE), anyInt());
     }
 
     /**
@@ -4261,13 +3910,12 @@
                 new StateChangeResult(0, TEST_WIFI_SSID, TEST_BSSID_STR,
                         SupplicantState.COMPLETED));
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_TIMEOUT, -1));
+                WifiManager.ERROR_AUTH_FAILURE_TIMEOUT);
         mLooper.dispatchAll();
         verify(mWifiLastResortWatchdog).noteConnectionFailureAndTriggerIfNeeded(
                 anyString(), anyString(), anyInt(), anyBoolean());
         verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(eq(TEST_BSSID_STR),
-                eq(mTestConfig), eq(WifiBlocklistMonitor.REASON_AUTHENTICATION_FAILURE), anyInt());
+                eq(TEST_SSID), eq(WifiBlocklistMonitor.REASON_AUTHENTICATION_FAILURE), anyInt());
     }
 
     /**
@@ -4300,17 +3948,15 @@
                 .setCandidate(getGoogleGuestScanDetail(TEST_RSSI, TEST_BSSID_STR, sFreq)
                         .getScanResult());
         testDhcpFailure();
-        verify(mWifiDiagnostics).reportConnectionEvent(
+        verify(mWifiDiagnostics, atLeastOnce()).reportConnectionEvent(
                 eq(WifiDiagnostics.CONNECTION_EVENT_FAILED), any());
-        verify(mWifiConnectivityManager).handleConnectionAttemptEnded(
+        verify(mWifiConnectivityManager, atLeastOnce()).handleConnectionAttemptEnded(
                 mClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_DHCP,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, TEST_BSSID_STR,
-                mTestConfig);
-        verify(mWifiNetworkFactory).handleConnectionAttemptEnded(
+                WifiMetrics.ConnectionEvent.FAILURE_DHCP, TEST_BSSID_STR, TEST_SSID);
+        verify(mWifiNetworkFactory, atLeastOnce()).handleConnectionAttemptEnded(
                 eq(WifiMetrics.ConnectionEvent.FAILURE_DHCP), any(WifiConfiguration.class),
                 eq(TEST_BSSID_STR));
-        verify(mWifiNetworkSuggestionsManager).handleConnectionAttemptEnded(
+        verify(mWifiNetworkSuggestionsManager, atLeastOnce()).handleConnectionAttemptEnded(
                 eq(WifiMetrics.ConnectionEvent.FAILURE_DHCP), any(WifiConfiguration.class),
                 any(String.class));
         verify(mWifiMetrics, never())
@@ -4339,14 +3985,12 @@
                 eq(WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED), any());
         verify(mWifiConnectivityManager).handleConnectionAttemptEnded(
                 mClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_NONE,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, TEST_BSSID_STR,
-                mConnectedNetwork);
+                WifiMetrics.ConnectionEvent.FAILURE_NONE, TEST_BSSID_STR, TEST_SSID);
         verify(mWifiNetworkFactory).handleConnectionAttemptEnded(
-                eq(WifiMetrics.ConnectionEvent.FAILURE_NONE), eq(mConnectedNetwork),
+                eq(WifiMetrics.ConnectionEvent.FAILURE_NONE), any(WifiConfiguration.class),
                 eq(TEST_BSSID_STR));
         verify(mWifiNetworkSuggestionsManager).handleConnectionAttemptEnded(
-                eq(WifiMetrics.ConnectionEvent.FAILURE_NONE), eq(mConnectedNetwork),
+                eq(WifiMetrics.ConnectionEvent.FAILURE_NONE), any(WifiConfiguration.class),
                 any(String.class));
         verify(mCmiMonitor).onInternetValidated(mClientModeManager);
         // BSSID different, record this connection.
@@ -4502,9 +4146,6 @@
         // not user selected
         when(mWifiConfigManager.getConfiguredNetwork(FRAMEWORK_NETWORK_ID))
                 .thenReturn(currentNetwork);
-        when(mWifiConfigManager.getConfiguredNetworkWithoutMasking(FRAMEWORK_NETWORK_ID))
-                .thenReturn(currentNetwork);
-
         when(mWifiConfigManager.getLastSelectedNetwork()).thenReturn(FRAMEWORK_NETWORK_ID + 1);
 
         // internet validation failure
@@ -4517,69 +4158,31 @@
         // expect temporarily disabled
         verify(mWifiConfigManager).updateNetworkSelectionStatus(
                 FRAMEWORK_NETWORK_ID, DISABLED_NO_INTERNET_TEMPORARY);
-        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(TEST_BSSID_STR,
-                currentNetwork, WifiBlocklistMonitor.REASON_NETWORK_VALIDATION_FAILURE,
-                RSSI_THRESHOLD_BREACH_MIN);
+        verify(mWifiBlocklistMonitor).handleBssidConnectionFailure(TEST_BSSID_STR, TEST_SSID,
+                WifiBlocklistMonitor.REASON_NETWORK_VALIDATION_FAILURE, RSSI_THRESHOLD_BREACH_MIN);
         verify(mWifiScoreCard).noteValidationFailure(any());
     }
 
     @Test
-    public void testMbbInternetValidationErrorExpectDisconnect() throws Exception {
+    public void mbb_internetValidationError_expectDisconnect() throws Exception {
         connect();
         verify(mWifiInjector).makeWifiNetworkAgent(any(), any(), any(), any(),
                 mWifiNetworkAgentCallbackCaptor.capture());
 
         // Make Before Break CMM
         when(mClientModeManager.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_TRANSIENT);
-        when(mActiveModeWarden.getClientModeManagerInRole(
-                ROLE_CLIENT_SECONDARY_TRANSIENT)).thenReturn(mock(ConcreteClientModeManager.class));
 
-        // internet validation failure without detecting captive portal
+        // internet validation failure
         mWifiNetworkAgentCallbackCaptor.getValue().onValidationStatus(
                 NetworkAgent.VALIDATION_STATUS_NOT_VALID, null /* captivePortalUr; */);
         mLooper.dispatchAll();
-        verify(mCmiMonitor).onInternetValidationFailed(mClientModeManager, false);
-    }
 
-    @Test
-    public void testMbbNetworkUnwantedExpectDisconnect() throws Exception {
-        connect();
-        verify(mWifiInjector).makeWifiNetworkAgent(any(), any(), any(), any(),
-                mWifiNetworkAgentCallbackCaptor.capture());
-
-        // Make Before Break CMM
-        when(mClientModeManager.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_TRANSIENT);
-        when(mActiveModeWarden.getClientModeManagerInRole(
-                ROLE_CLIENT_SECONDARY_TRANSIENT)).thenReturn(mock(ConcreteClientModeManager.class));
-
-        // internet was lost and network got unwanted.
-        mWifiNetworkAgentCallbackCaptor.getValue().onNetworkUnwanted();
-        mLooper.dispatchAll();
         // expect disconnection
         verify(mWifiNative).disconnect(WIFI_IFACE_NAME);
     }
 
     @Test
-    public void testMbbInternetValidationErrorCaptivePortalNoDisconnect() throws Exception {
-        connect();
-        verify(mWifiInjector).makeWifiNetworkAgent(any(), any(), any(), any(),
-                mWifiNetworkAgentCallbackCaptor.capture());
-
-        // Make Before Break CMM
-        when(mClientModeManager.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_TRANSIENT);
-
-        // mock internet validation failure with captive portal detected
-        when(mMockUri.toString()).thenReturn("TEST_URI");
-        mWifiNetworkAgentCallbackCaptor.getValue().onValidationStatus(
-                NetworkAgent.VALIDATION_STATUS_NOT_VALID, mMockUri);
-        mLooper.dispatchAll();
-
-        // expect no disconnection
-        verify(mWifiNative, never()).disconnect(WIFI_IFACE_NAME);
-    }
-
-    @Test
-    public void testCaptivePortalDetectedNotifiesCmiMonitor() throws Exception {
+    public void captivePortalDetected_notifiesCmiMonitor() throws Exception {
         connect();
         verify(mWifiInjector).makeWifiNetworkAgent(any(), any(), any(), any(),
                 mWifiNetworkAgentCallbackCaptor.capture());
@@ -4595,7 +4198,7 @@
     }
 
     @Test
-    public void testInternetValidationFailureUserSelectedRecentlyExpectNotDisabled()
+    public void internetValidationFailure_userSelectedRecently_expectNotDisabled()
             throws Exception {
         connect();
         verify(mWifiInjector).makeWifiNetworkAgent(any(), any(), any(), any(),
@@ -4628,7 +4231,7 @@
     }
 
     @Test
-    public void testInternetValidationFailureUserSelectedTooLongAgoExpectTemporarilyDisabled()
+    public void internetValidationFailure_userSelectedTooLongAgo_expectTemporarilyDisabled()
             throws Exception {
         connect();
         verify(mWifiInjector).makeWifiNetworkAgent(any(), any(), any(), any(),
@@ -4662,7 +4265,7 @@
     }
 
     @Test
-    public void testNetworkInternetValidationFailureNotUserSelectedExpectNotDisabled()
+    public void noInternetExpectedNetwork_internetValidationFailure_notUserSelected_expectNotDisabled()
             throws Exception {
         connect();
         verify(mWifiInjector).makeWifiNetworkAgent(any(), any(), any(), any(),
@@ -4677,8 +4280,6 @@
         // user didn't pick this network
         when(mWifiConfigManager.getConfiguredNetwork(FRAMEWORK_NETWORK_ID))
                 .thenReturn(currentNetwork);
-        when(mWifiConfigManager.getConfiguredNetworkWithoutMasking(FRAMEWORK_NETWORK_ID))
-                .thenReturn(currentNetwork);
         when(mWifiConfigManager.getLastSelectedNetwork()).thenReturn(FRAMEWORK_NETWORK_ID + 1);
 
         // internet validation failure
@@ -4832,7 +4433,7 @@
                         SupplicantState.ASSOCIATED));
         mLooper.dispatchAll();
 
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
                 NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(mConnectedNetwork.SSID)));
         mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
                 new NetworkConnectionEventInfo(0, wifiSsid, TEST_BSSID_STR, false));
@@ -4868,8 +4469,6 @@
         mWifiInfo.setFrequency(5825);
         when(mPerNetwork.getTxLinkBandwidthKbps()).thenReturn(40_000);
         when(mPerNetwork.getRxLinkBandwidthKbps()).thenReturn(50_000);
-        when(mWifiNetworkFactory.getSpecificNetworkRequestUids(any(), any()))
-                .thenReturn(Collections.emptySet());
         when(mWifiNetworkFactory.getSpecificNetworkRequestUidAndPackageName(any(), any()))
                 .thenReturn(Pair.create(Process.INVALID_UID, ""));
         // Simulate the first connection.
@@ -4887,10 +4486,6 @@
         assertTrue(networkCapabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET));
 
         assertEquals(mConnectedNetwork.creatorUid, networkCapabilities.getOwnerUid());
-        if (SdkLevel.isAtLeastT()) {
-            assertEquals(Set.of(mConnectedNetwork.creatorUid),
-                    networkCapabilities.getAllowedUids());
-        }
         assertArrayEquals(
                 new int[] {mConnectedNetwork.creatorUid},
                 networkCapabilities.getAdministratorUids());
@@ -4921,8 +4516,6 @@
         mWifiInfo.setFrequency(2437);
         when(mPerNetwork.getTxLinkBandwidthKbps()).thenReturn(30_000);
         when(mPerNetwork.getRxLinkBandwidthKbps()).thenReturn(40_000);
-        when(mWifiNetworkFactory.getSpecificNetworkRequestUids(any(), any()))
-                .thenReturn(Set.of(TEST_UID));
         when(mWifiNetworkFactory.getSpecificNetworkRequestUidAndPackageName(any(), any()))
                 .thenReturn(Pair.create(TEST_UID, OP_PACKAGE_NAME));
         // Simulate the first connection.
@@ -4952,13 +4545,8 @@
                 new WifiNetworkAgentSpecifier(expectedConfig, ScanResult.WIFI_BAND_24_GHZ,
                         true /* matchLocalOnlySpecifiers */);
         assertEquals(expectedWifiNetworkAgentSpecifier, wifiNetworkAgentSpecifier);
-        if (SdkLevel.isAtLeastS()) {
-            assertEquals(Set.of(new Range<Integer>(TEST_UID, TEST_UID)),
-                    networkCapabilities.getUids());
-        } else {
-            assertEquals(TEST_UID, networkCapabilities.getRequestorUid());
-            assertEquals(OP_PACKAGE_NAME, networkCapabilities.getRequestorPackageName());
-        }
+        assertEquals(TEST_UID, networkCapabilities.getRequestorUid());
+        assertEquals(OP_PACKAGE_NAME, networkCapabilities.getRequestorPackageName());
         assertEquals(30_000, networkCapabilities.getLinkUpstreamBandwidthKbps());
         assertEquals(40_000, networkCapabilities.getLinkDownstreamBandwidthKbps());
     }
@@ -4981,8 +4569,7 @@
         mCmi.sendMessage(ClientModeImpl.CMD_RSSI_POLL, 1);
         mLooper.dispatchAll();
         verify(mWifiDataStall).checkDataStallAndThroughputSufficiency(WIFI_IFACE_NAME,
-                mConnectionCapabilities, oldLLStats, newLLStats, mWifiInfo, TEST_TX_BYTES,
-                TEST_RX_BYTES);
+                mConnectionCapabilities, oldLLStats, newLLStats, mWifiInfo);
         verify(mWifiMetrics).incrementWifiLinkLayerUsageStats(WIFI_IFACE_NAME, newLLStats);
     }
 
@@ -4999,7 +4586,7 @@
         WifiLinkLayerStats stats = new WifiLinkLayerStats();
         when(mWifiNative.getWifiLinkLayerStats(any())).thenReturn(stats);
         when(mWifiDataStall.checkDataStallAndThroughputSufficiency(any(),
-                any(), any(), any(), any(), anyLong(), anyLong()))
+                any(), any(), any(), any()))
                 .thenReturn(WifiIsUnusableEvent.TYPE_UNKNOWN);
         mCmi.sendMessage(ClientModeImpl.CMD_RSSI_POLL, 1);
         mLooper.dispatchAll();
@@ -5008,7 +4595,7 @@
                 WifiUsabilityStats.LABEL_BAD, eq(anyInt()), eq(-1));
 
         when(mWifiDataStall.checkDataStallAndThroughputSufficiency(any(), any(), any(), any(),
-                any(), anyLong(), anyLong()))
+                any()))
                 .thenReturn(WifiIsUnusableEvent.TYPE_DATA_STALL_BAD_TX);
         when(mClock.getElapsedSinceBootMillis()).thenReturn(10L);
         mCmi.sendMessage(ClientModeImpl.CMD_RSSI_POLL, 1);
@@ -5031,9 +4618,8 @@
         // called once during setup()
         verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, true);
 
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK, true));
-        assertTrue(mCmi.enablePowerSave());
-        verify(mWifiNative, times(3)).setPowerSave(WIFI_IFACE_NAME, true);
+        assertTrue(mCmi.setPowerSave(true));
+        verify(mWifiNative, times(2)).setPowerSave(WIFI_IFACE_NAME, true);
     }
 
     /**
@@ -5042,57 +4628,11 @@
      */
     @Test
     public void verifySetPowerSaveFalseSuccess() throws Exception {
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_DHCP, false));
+        assertTrue(mCmi.setPowerSave(false));
         verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, false);
     }
 
     /**
-     * Verify that using setPowerSave with multiple clients (DHCP/WifiLock) operates correctly:
-     * - Disable power save if ANY client disables it
-     * - Enable power save only if ALL clients no longer disable it
-     */
-    @Test
-    public void verifySetPowerSaveMultipleSources() {
-        InOrder inOrderWifiNative = inOrder(mWifiNative);
-
-        // #1 Disable-> #2 Disable-> #2 Enable-> #1 Enable
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK, false));
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, false);
-
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_DHCP, false));
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, false);
-
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_DHCP, true));
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, false);
-
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK, true));
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, true);
-
-        // #1 Disable-> #2 Disable-> #1 Enable-> #2 Enable
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK, false));
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, false);
-
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_DHCP, false));
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, false);
-
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK, true));
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, false);
-
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_DHCP, true));
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, true);
-
-        // #1 Disable-> #2 Disable-> global enable
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK, false));
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, false);
-
-        assertTrue(mCmi.setPowerSave(ClientMode.POWER_SAVE_CLIENT_DHCP, false));
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, false);
-
-        assertTrue(mCmi.enablePowerSave());
-        inOrderWifiNative.verify(mWifiNative).setPowerSave(WIFI_IFACE_NAME, true);
-    }
-
-    /**
      * Verify that we call into WifiTrafficPoller during rssi poll
      */
     @Test
@@ -5161,24 +4701,6 @@
     }
 
     /**
-     * Verify the wifi module can be confiured to always get the factory MAC address from
-     * WifiNative instead of using saved value in WifiConfigStore.
-     */
-    @Test
-    public void testGetFactoryMacAddressAlwaysFromWifiNative() throws Exception {
-        // Configure overlay to always retrieve the MAC address from WifiNative.
-        when(mWifiGlobals.isSaveFactoryMacToConfigStoreEnabled()).thenReturn(false);
-        initializeAndAddNetworkAndVerifySuccess();
-
-        clearInvocations(mWifiNative, mSettingsConfigStore);
-        assertEquals(TEST_GLOBAL_MAC_ADDRESS.toString(), mCmi.getFactoryMacAddress());
-        assertEquals(TEST_GLOBAL_MAC_ADDRESS.toString(), mCmi.getFactoryMacAddress());
-        assertEquals(TEST_GLOBAL_MAC_ADDRESS.toString(), mCmi.getFactoryMacAddress());
-
-        verify(mWifiNative, times(3)).getStaFactoryMacAddress(WIFI_IFACE_NAME);
-    }
-
-    /**
      * Verify getting the factory MAC address success case.
      */
     @Test
@@ -5259,45 +4781,6 @@
         assertNotEquals("The currently programmed MAC address should be different from the factory "
                 + "MAC address after ClientModeImpl starts",
                 mCmi.getFactoryMacAddress(), currentMac.toString());
-
-        // Verify interface up will not re-randomize the MAC address again.
-        mCmi.onUpChanged(true);
-        verify(mWifiNative).setStaMacAddress(anyString(), macAddressCaptor.capture());
-    }
-
-    /**
-     * Verify if re-randomizing had failed, then we will retry the next time the interface comes up.
-     */
-    @Test
-    public void testRandomizeMacAddressFailedRetryOnInterfaceUp() throws Exception {
-        // mock setting the MAC address to fail
-        when(mWifiNative.setStaMacAddress(eq(WIFI_IFACE_NAME), anyObject())).thenReturn(false);
-        initializeCmi();
-
-        ArgumentCaptor<MacAddress> macAddressCaptor = ArgumentCaptor.forClass(MacAddress.class);
-        verify(mWifiNative, times(2)).setStaMacAddress(anyString(), macAddressCaptor.capture());
-        MacAddress currentMac = macAddressCaptor.getValue();
-
-        // mock setting the MAC address to succeed
-        when(mWifiNative.setStaMacAddress(eq(WIFI_IFACE_NAME), anyObject()))
-                .then(new AnswerWithArguments() {
-                    public boolean answer(String iface, MacAddress mac) {
-                        when(mWifiNative.getMacAddress(iface)).thenReturn(mac.toString());
-                        return true;
-                    }
-                });
-
-        // Verify interface up will re-randomize the MAC address since the last attempt failed.
-        mCmi.onUpChanged(true);
-        verify(mWifiNative, times(3)).setStaMacAddress(anyString(), macAddressCaptor.capture());
-        assertNotEquals("The currently programmed MAC address should be different from the factory "
-                        + "MAC address after ClientModeImpl starts",
-                mCmi.getFactoryMacAddress(), currentMac.toString());
-
-        // Verify interface up will not re-randomize the MAC address since the last attempt
-        // succeeded.
-        mCmi.onUpChanged(true);
-        verify(mWifiNative, times(3)).setStaMacAddress(anyString(), macAddressCaptor.capture());
     }
 
     /**
@@ -5327,21 +4810,6 @@
     }
 
     /**
-     * Verify bugreport will be taken when get IP_REACHABILITY_FAILURE
-     */
-    @Test
-    public void testTakeBugReportByIpReachabilityFailure() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        connect();
-
-        ReachabilityLossInfoParcelable lossInfo =
-                new ReachabilityLossInfoParcelable("", ReachabilityLossReason.ROAM);
-        mCmi.sendMessage(ClientModeImpl.CMD_IP_REACHABILITY_FAILURE, lossInfo);
-        mLooper.dispatchAll();
-        verify(mWifiDiagnostics).triggerBugReportDataCapture(
-                eq(WifiDiagnostics.REPORT_REASON_REACHABILITY_FAILURE));
-    }
-    /**
      * Verifies that WifiLastResortWatchdog is notified of FOURWAY_HANDSHAKE_TIMEOUT.
      */
     @Test
@@ -5386,12 +4854,10 @@
         mConnectedNetwork.ephemeral = true;
         mConnectedNetwork.trusted = true;
         mConnectedNetwork.creatorName = OP_PACKAGE_NAME;
-        mConnectedNetwork.restricted = true;
         connect();
 
         assertTrue(mWifiInfo.isEphemeral());
         assertTrue(mWifiInfo.isTrusted());
-        assumeTrue(mWifiInfo.isRestricted());
         assertEquals(OP_PACKAGE_NAME,
                 mWifiInfo.getRequestingPackageName());
     }
@@ -5405,12 +4871,10 @@
         mConnectedNetwork.ephemeral = true;
         mConnectedNetwork.trusted = true;
         mConnectedNetwork.creatorName = OP_PACKAGE_NAME;
-        mConnectedNetwork.restricted = true;
         connect();
 
         assertTrue(mWifiInfo.isEphemeral());
         assertTrue(mWifiInfo.isTrusted());
-        assumeTrue(mWifiInfo.isRestricted());
         assertEquals(OP_PACKAGE_NAME,
                 mWifiInfo.getRequestingPackageName());
     }
@@ -5434,27 +4898,6 @@
     }
 
     /**
-     * Verify that a WifiIsUnusableEvent is logged and the current list of usability stats entries
-     * are labeled and saved when receiving an IP reachability failure message with non roam type.
-     * @throws Exception
-     */
-    @Test
-    public void verifyIpReachabilityFailureMsgUpdatesWifiUsabilityMetrics() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        connect();
-
-        ReachabilityLossInfoParcelable lossInfo =
-                new ReachabilityLossInfoParcelable("", ReachabilityLossReason.CONFIRM);
-        mCmi.sendMessage(ClientModeImpl.CMD_IP_REACHABILITY_FAILURE, lossInfo);
-        mLooper.dispatchAll();
-        verify(mWifiMetrics).logWifiIsUnusableEvent(WIFI_IFACE_NAME,
-                WifiIsUnusableEvent.TYPE_IP_REACHABILITY_LOST);
-        verify(mWifiMetrics).addToWifiUsabilityStatsList(WIFI_IFACE_NAME,
-                WifiUsabilityStats.LABEL_BAD,
-                WifiUsabilityStats.TYPE_IP_REACHABILITY_LOST, -1);
-    }
-
-    /**
      * Tests that when {@link ClientModeImpl} receives a SUP_REQUEST_IDENTITY message, it responds
      * to the supplicant with the SIM identity.
      */
@@ -5689,7 +5132,7 @@
         mLooper.dispatchAll();
 
         verify(mWifiMetrics, times(1)).incrementSteeringRequestCountIncludingMboAssocRetryDelay();
-        verify(mWifiBlocklistMonitor).blockBssidForDurationMs(eq(TEST_BSSID_STR), any(),
+        verify(mWifiBlocklistMonitor).blockBssidForDurationMs(eq(TEST_BSSID_STR), eq(TEST_SSID),
                 eq(btmFrmData.mBlockListDurationMs), anyInt(), anyInt());
     }
 
@@ -5712,7 +5155,7 @@
         mLooper.dispatchAll();
 
         verify(mWifiMetrics, never()).incrementSteeringRequestCountIncludingMboAssocRetryDelay();
-        verify(mWifiBlocklistMonitor).blockBssidForDurationMs(eq(TEST_BSSID_STR), any(),
+        verify(mWifiBlocklistMonitor).blockBssidForDurationMs(eq(TEST_BSSID_STR), eq(TEST_SSID),
                 eq(MboOceConstants.DEFAULT_BLOCKLIST_DURATION_MS), anyInt(), anyInt());
     }
 
@@ -5737,7 +5180,7 @@
         mLooper.dispatchAll();
 
         verify(mWifiBlocklistMonitor, never()).blockBssidForDurationMs(eq(TEST_BSSID_STR),
-                any(), eq(btmFrmData.mBlockListDurationMs), anyInt(), anyInt());
+                eq(TEST_SSID), eq(btmFrmData.mBlockListDurationMs), anyInt(), anyInt());
         verify(mWifiConnectivityManager).forceConnectivityScan(ClientModeImpl.WIFI_WORK_SOURCE);
         verify(mWifiMetrics, times(1)).incrementMboCellularSwitchRequestCount();
         verify(mWifiMetrics, times(1))
@@ -5784,7 +5227,7 @@
         config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
         config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
         config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
-        config.SSID = ScanResultUtil.createQuotedSsid(sFilsSsid);
+        config.SSID = ScanResultUtil.createQuotedSSID(sFilsSsid);
         config.networkId = 1;
         config.setRandomizedMacAddress(TEST_LOCAL_MAC_ADDRESS);
         config.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_AUTO;
@@ -5807,7 +5250,7 @@
     private void setupFilsEnabledApInScanResult() {
         String caps = "[WPA2-EAP/SHA1+EAP/SHA256+EAP-FILS-SHA256-CCMP]"
                 + "[RSN-EAP/SHA1+EAP/SHA256+EAP-FILS-SHA256-CCMP][ESS]";
-        ScanResult scanResult = new ScanResult(WifiSsid.fromUtf8Text(sFilsSsid),
+        ScanResult scanResult = new ScanResult(WifiSsid.createFromAsciiEncoded(sFilsSsid),
                 sFilsSsid, TEST_BSSID_STR, 1245, 0, caps, -78, 2412, 1025, 22, 33, 20, 0, 0, true);
         ScanResult.InformationElement ie = createIE(ScanResult.InformationElement.EID_SSID,
                 sFilsSsid.getBytes(StandardCharsets.UTF_8));
@@ -5950,7 +5393,7 @@
         verify(mWifiMetrics, times(1)).incrementL2ConnectionThroughFilsAuthCount();
 
         mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(0, WifiSsid.fromUtf8Text(sFilsSsid),
+                new StateChangeResult(0, WifiSsid.createFromAsciiEncoded(sFilsSsid),
                 TEST_BSSID_STR, SupplicantState.COMPLETED));
         mLooper.dispatchAll();
 
@@ -5970,7 +5413,7 @@
         WifiInfo wifiInfo = mWifiInfo;
         assertNotNull(wifiInfo);
         assertEquals(TEST_BSSID_STR, wifiInfo.getBSSID());
-        assertTrue(WifiSsid.fromUtf8Text(sFilsSsid).equals(wifiInfo.getWifiSsid()));
+        assertTrue(WifiSsid.createFromAsciiEncoded(sFilsSsid).equals(wifiInfo.getWifiSsid()));
         assertEquals("L3ConnectedState", getCurrentState().getName());
     }
 
@@ -6009,7 +5452,6 @@
         assertEquals(mConnectedNetwork.ephemeral, mWifiInfo.isEphemeral());
         assertEquals(mConnectedNetwork.trusted, mWifiInfo.isTrusted());
         assertEquals(mConnectedNetwork.osu, mWifiInfo.isOsuAp());
-        assertEquals(mConnectedNetwork.restricted, mWifiInfo.isRestricted());
         if (SdkLevel.isAtLeastS()) {
             assertEquals(mConnectedNetwork.oemPaid, mWifiInfo.isOemPaid());
             assertEquals(mConnectedNetwork.oemPrivate, mWifiInfo.isOemPrivate());
@@ -6280,7 +5722,7 @@
 
         // get disconnect event
         mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(0, WifiSsid.fromUtf8Text(mConnectedNetwork.SSID),
+                new StateChangeResult(0, WifiSsid.createFromAsciiEncoded(mConnectedNetwork.SSID),
                         TEST_BSSID_STR, SupplicantState.DISCONNECTED));
         mLooper.dispatchAll();
 
@@ -6300,7 +5742,7 @@
 
         // missing disconnect event, but got supplicant state change with disconnect state instead.
         mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(0, WifiSsid.fromUtf8Text(mConnectedNetwork.SSID),
+                new StateChangeResult(0, WifiSsid.createFromAsciiEncoded(mConnectedNetwork.SSID),
                         TEST_BSSID_STR, SupplicantState.DISCONNECTED));
         mLooper.dispatchAll();
 
@@ -6349,53 +5791,6 @@
     }
 
     @Test
-    public void testIpReachabilityFailureConfirmTriggersDisconnection() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        connect();
-        expectRegisterNetworkAgent((agentConfig) -> { }, (cap) -> { });
-        reset(mWifiNetworkAgent);
-
-        // Trigger ip reachability failure and ensure we trigger a disconnect.
-        ReachabilityLossInfoParcelable lossInfo =
-                new ReachabilityLossInfoParcelable("", ReachabilityLossReason.CONFIRM);
-        mCmi.sendMessage(ClientModeImpl.CMD_IP_REACHABILITY_FAILURE, lossInfo);
-        mLooper.dispatchAll();
-        verify(mWifiNative).disconnect(WIFI_IFACE_NAME);
-    }
-
-    @Test
-    public void testIpReachabilityFailureOrganicTriggersDisconnection() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        connect();
-        expectRegisterNetworkAgent((agentConfig) -> { }, (cap) -> { });
-        reset(mWifiNetworkAgent);
-
-        // Trigger ip reachability failure and ensure we trigger a disconnect.
-        ReachabilityLossInfoParcelable lossInfo =
-                new ReachabilityLossInfoParcelable("", ReachabilityLossReason.ORGANIC);
-        mCmi.sendMessage(ClientModeImpl.CMD_IP_REACHABILITY_FAILURE, lossInfo);
-        mLooper.dispatchAll();
-        verify(mWifiNative).disconnect(WIFI_IFACE_NAME);
-    }
-
-    @Test
-    public void testIpReachabilityFailureRoamL3ProvisioningState() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        connect();
-        expectRegisterNetworkAgent((agentConfig) -> { }, (cap) -> { });
-        reset(mWifiNetworkAgent);
-
-        // Trigger ip reachability failure and ensure we do not trigger a disconnect.
-        ReachabilityLossInfoParcelable lossInfo =
-                new ReachabilityLossInfoParcelable("", ReachabilityLossReason.ROAM);
-        mCmi.sendMessage(ClientModeImpl.CMD_IP_REACHABILITY_FAILURE, lossInfo);
-        mLooper.dispatchAll();
-        verify(mWifiNetworkAgent).unregisterAfterReplacement(anyInt());
-        verify(mWifiNative, never()).disconnect(WIFI_IFACE_NAME);
-        assertEquals("L3ProvisioningState", getCurrentState().getName());
-    }
-
-    @Test
     public void testIpReachabilityLostAndRoamEventsRace() throws Exception {
         connect();
         expectRegisterNetworkAgent((agentConfig) -> { }, (cap) -> { });
@@ -6506,26 +5901,19 @@
      */
     @Test
     public void testWifiScoreReportDump() throws Exception {
-        InOrder inOrder = inOrder(mWifiNative, mWifiScoreReport);
-        inOrder.verify(mWifiNative, never()).getWifiLinkLayerStats(any());
         connect();
 
+        mLooper.startAutoDispatch();
         mCmi.dump(new FileDescriptor(), new PrintWriter(new StringWriter()), null);
-        mLooper.dispatchAll();
+        mLooper.stopAutoDispatchAndIgnoreExceptions();
 
-        inOrder.verify(mWifiNative, atLeastOnce()).getWifiLinkLayerStats(any());
+        InOrder inOrder = inOrder(mWifiNative, mWifiScoreReport);
+
+        inOrder.verify(mWifiNative).getWifiLinkLayerStats(any());
         inOrder.verify(mWifiScoreReport).dump(any(), any(), any());
     }
 
     @Test
-    public void testHandleScreenChangedDontUpdateLinkLayerStatsWhenDisconnected() {
-        setScreenState(true);
-        setScreenState(false);
-        setScreenState(true);
-        verify(mWifiNative, never()).getWifiLinkLayerStats(any());
-    }
-
-    @Test
     public void clearRequestingPackageNameInWifiInfoOnConnectionFailure() throws Exception {
         mConnectedNetwork.fromWifiNetworkSpecifier = true;
         mConnectedNetwork.ephemeral = true;
@@ -6609,19 +5997,6 @@
     }
 
     @Test
-    public void testRestrictedetworkCapability() throws Exception {
-        // oemPaid introduced in S, not applicable to R
-        assumeTrue(SdkLevel.isAtLeastS());
-        mConnectedNetwork.restricted = true;
-        connect();
-        expectRegisterNetworkAgent((agentConfig) -> { },
-                (cap) -> {
-                    assertFalse(cap.hasCapability(NetworkCapabilities
-                            .NET_CAPABILITY_NOT_RESTRICTED));
-                });
-    }
-
-    @Test
     public void testOemPrivateNetworkCapability() throws Exception {
         // oemPrivate introduced in S, not applicable to R
         assumeTrue(SdkLevel.isAtLeastS());
@@ -6688,7 +6063,7 @@
         when(mScanDetailCache.getScanResult(TEST_BSSID_STR)).thenReturn(
                 getGoogleGuestScanDetail(TEST_RSSI, TEST_BSSID_STR, sFreq).getScanResult());
 
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
                 NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(mConnectedNetwork.SSID)));
         mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
                 new NetworkConnectionEventInfo(0, wifiSsid, TEST_BSSID_STR, false));
@@ -6783,8 +6158,8 @@
         when(mEapFailureNotifier.onEapFailure(anyInt(), eq(config), anyBoolean())).thenReturn(true);
 
         mCmi.sendMessage(WifiMonitor.AUTHENTICATION_FAILURE_EVENT,
-                new AuthenticationFailureEventInfo(TEST_SSID, MacAddress.fromString(TEST_BSSID_STR),
-                        WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE, DEFINED_ERROR_CODE)
+                WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE,
+                DEFINED_ERROR_CODE
         );
         mLooper.dispatchAll();
 
@@ -6920,15 +6295,13 @@
                 eq(WifiDiagnostics.CONNECTION_EVENT_FAILED), any());
         verify(mWifiConnectivityManager).handleConnectionAttemptEnded(
                 mClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_NETWORK_NOT_FOUND,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, TEST_BSSID_STR,
-                mTestConfig);
+                WifiMetrics.ConnectionEvent.FAILURE_NETWORK_NOT_FOUND, TEST_BSSID_STR, TEST_SSID);
         verify(mWifiNetworkFactory).handleConnectionAttemptEnded(
                 eq(WifiMetrics.ConnectionEvent.FAILURE_NETWORK_NOT_FOUND),
-                eq(mTestConfig), eq(TEST_BSSID_STR));
+                any(WifiConfiguration.class), eq(TEST_BSSID_STR));
         verify(mWifiNetworkSuggestionsManager).handleConnectionAttemptEnded(
                 eq(WifiMetrics.ConnectionEvent.FAILURE_NETWORK_NOT_FOUND),
-                eq(mTestConfig), eq(null));
+                any(WifiConfiguration.class), eq(null));
         verify(mWifiMetrics, never())
                 .incrementNumBssidDifferentSelectionBetweenFrameworkAndFirmware();
         verifyConnectionEventTimeoutDoesNotOccur();
@@ -7257,7 +6630,7 @@
         mLooper.dispatchAll();
         verify(mWifiNative).getWifiLinkLayerStats(WIFI_IFACE_NAME);
         verify(mWifiDataStall).checkDataStallAndThroughputSufficiency(WIFI_IFACE_NAME,
-                mConnectionCapabilities, null, oldLLStats, mWifiInfo, TEST_TX_BYTES, TEST_RX_BYTES);
+                mConnectionCapabilities, null, oldLLStats, mWifiInfo);
         verify(mWifiMetrics).incrementWifiLinkLayerUsageStats(WIFI_IFACE_NAME, oldLLStats);
 
         WifiLinkLayerStats newLLStats = new WifiLinkLayerStats();
@@ -7267,8 +6640,7 @@
         verify(mWifiNative, times(2)).getWifiLinkLayerStats(WIFI_IFACE_NAME);
 
         verify(mWifiDataStall).checkDataStallAndThroughputSufficiency(WIFI_IFACE_NAME,
-                mConnectionCapabilities, oldLLStats, newLLStats, mWifiInfo, TEST_TX_BYTES,
-                TEST_RX_BYTES);
+                mConnectionCapabilities, oldLLStats, newLLStats, mWifiInfo);
         verify(mWifiMetrics).incrementWifiLinkLayerUsageStats(WIFI_IFACE_NAME, newLLStats);
 
         // Now set the screen state to false & move time forward, ensure no more link layer stats
@@ -7330,7 +6702,7 @@
         mLooper.dispatchAll();
         verify(mWifiNative).getWifiLinkLayerStats(WIFI_IFACE_NAME);
         verify(mWifiDataStall).checkDataStallAndThroughputSufficiency(WIFI_IFACE_NAME,
-                mConnectionCapabilities, null, oldLLStats, mWifiInfo, TEST_TX_BYTES, TEST_RX_BYTES);
+                mConnectionCapabilities, null, oldLLStats, mWifiInfo);
         verify(mWifiMetrics).incrementWifiLinkLayerUsageStats(WIFI_IFACE_NAME, oldLLStats);
     }
 
@@ -7347,7 +6719,7 @@
         mLooper.dispatchAll();
         verify(mWifiNative).getWifiLinkLayerStats(WIFI_IFACE_NAME);
         verify(mWifiDataStall).checkDataStallAndThroughputSufficiency(WIFI_IFACE_NAME,
-                mConnectionCapabilities, null, oldLLStats, mWifiInfo, TEST_TX_BYTES, TEST_RX_BYTES);
+                mConnectionCapabilities, null, oldLLStats, mWifiInfo);
         verify(mWifiMetrics).incrementWifiLinkLayerUsageStats(WIFI_IFACE_NAME, oldLLStats);
 
         // Now invoke role change, that should stop rssi polling on the secondary.
@@ -7386,9 +6758,9 @@
         mCmi.connectNetwork(
                 new NetworkUpdateResult(config.networkId),
                 new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
+                Binder.getCallingUid());
         mLooper.dispatchAll();
-        verify(connectActionListener).onFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+        verify(connectActionListener).onFailure(WifiManager.ERROR);
         verify(mWifiConfigManager, never())
                 .getConfiguredNetworkWithoutMasking(eq(config.networkId));
         verify(mWifiNative, never()).connectToNetwork(eq(WIFI_IFACE_NAME), eq(config));
@@ -7407,353 +6779,6 @@
         triggerConnect();
     }
 
-    @Test
-    public void testNetworkRemovedUpdatesLinkedNetworks() throws Exception {
-        mResources.setBoolean(R.bool.config_wifiEnableLinkedNetworkRoaming, true);
-        WifiConfiguration connectedConfig = WifiConfigurationTestUtil.createPskNetwork("\"ssid1\"");
-        connectedConfig.networkId = FRAMEWORK_NETWORK_ID;
-        WifiConfiguration removeConfig = WifiConfigurationTestUtil.createPskNetwork("\"ssid2\"");
-        removeConfig.networkId = FRAMEWORK_NETWORK_ID + 1;
-        connectedConfig.linkedConfigurations = new HashMap<>();
-        connectedConfig.linkedConfigurations.put(removeConfig.getProfileKey(), 1);
-        removeConfig.linkedConfigurations = new HashMap<>();
-        removeConfig.linkedConfigurations.put(connectedConfig.getProfileKey(), 1);
-        when(mWifiConfigManager.getConfiguredNetwork(connectedConfig.networkId))
-                .thenReturn(connectedConfig);
-        when(mWifiConfigManager.getConfiguredNetwork(removeConfig.networkId))
-                .thenReturn(removeConfig);
-        mConnectedNetwork = connectedConfig;
-        connect();
-
-        when(mWifiNative.getCurrentNetworkSecurityParams(any())).thenReturn(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_PSK));
-        mConfigUpdateListenerCaptor.getValue().onNetworkRemoved(removeConfig);
-        mLooper.dispatchAll();
-
-        verify(mWifiConfigManager).updateLinkedNetworks(connectedConfig.networkId);
-    }
-
-    @Test
-    public void testConnectClearsAllowlistSsids() throws Exception {
-        connect();
-        verify(mWifiBlocklistMonitor)
-                .setAllowlistSsids(eq(mConnectedNetwork.SSID), eq(Collections.emptyList()));
-    }
-
-    @Test
-    public void testNetworkUpdatedUpdatesLinkedNetworks() throws Exception {
-        mResources.setBoolean(R.bool.config_wifiEnableLinkedNetworkRoaming, true);
-        WifiConfiguration connectedConfig = WifiConfigurationTestUtil.createPskNetwork("\"ssid1\"");
-        connectedConfig.networkId = FRAMEWORK_NETWORK_ID;
-        WifiConfiguration updatedConfig = WifiConfigurationTestUtil.createPskNetwork("\"ssid2\"");
-        updatedConfig.networkId = FRAMEWORK_NETWORK_ID + 1;
-        connectedConfig.linkedConfigurations = new HashMap<>();
-        connectedConfig.linkedConfigurations.put(updatedConfig.getProfileKey(), 1);
-        updatedConfig.linkedConfigurations = new HashMap<>();
-        updatedConfig.linkedConfigurations.put(connectedConfig.getProfileKey(), 1);
-        when(mWifiConfigManager.getConfiguredNetwork(connectedConfig.networkId))
-                .thenReturn(connectedConfig);
-        when(mWifiConfigManager.getConfiguredNetwork(updatedConfig.networkId))
-                .thenReturn(updatedConfig);
-        mConnectedNetwork = connectedConfig;
-        connect();
-
-        when(mWifiNative.getCurrentNetworkSecurityParams(any())).thenReturn(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_PSK));
-        IActionListener connectActionListener = mock(IActionListener.class);
-        mCmi.saveNetwork(
-                new NetworkUpdateResult(
-                        updatedConfig.networkId, false, false, true, false),
-                new ActionListenerWrapper(connectActionListener),
-                Binder.getCallingUid(), OP_PACKAGE_NAME);
-        mLooper.dispatchAll();
-
-        verify(mWifiConfigManager).updateLinkedNetworks(connectedConfig.networkId);
-    }
-
-    @Test
-    public void testNetworkValidationUpdatesLinkedNetworks() throws Exception {
-        mResources.setBoolean(R.bool.config_wifiEnableLinkedNetworkRoaming, true);
-        BufferedReader reader = mock(BufferedReader.class);
-        WifiConfiguration connectedConfig = WifiConfigurationTestUtil.createPskNetwork("\"ssid1\"");
-        connectedConfig.networkId = FRAMEWORK_NETWORK_ID;
-        when(mWifiConfigManager.getConfiguredNetwork(connectedConfig.networkId))
-                .thenReturn(connectedConfig);
-        mConnectedNetwork = connectedConfig;
-        connect();
-        verify(mWifiInjector).makeWifiNetworkAgent(any(), any(), any(), any(),
-                mWifiNetworkAgentCallbackCaptor.capture());
-        verify(mWifiBlocklistMonitor).setAllowlistSsids(
-                eq(connectedConfig.SSID), eq(Collections.emptyList()));
-        verify(mWifiBlocklistMonitor).updateFirmwareRoamingConfiguration(
-                eq(Set.of(connectedConfig.SSID)));
-
-        LinkProperties linkProperties = mock(LinkProperties.class);
-        RouteInfo routeInfo = mock(RouteInfo.class);
-        IpPrefix ipPrefix = mock(IpPrefix.class);
-        Inet4Address destinationAddress = mock(Inet4Address.class);
-        InetAddress gatewayAddress = mock(InetAddress.class);
-        String hostAddress = "127.0.0.1";
-        String gatewayMac = "192.168.0.1";
-        when(linkProperties.getRoutes()).thenReturn(Arrays.asList(routeInfo));
-        when(routeInfo.isDefaultRoute()).thenReturn(true);
-        when(routeInfo.getDestination()).thenReturn(ipPrefix);
-        when(ipPrefix.getAddress()).thenReturn(destinationAddress);
-        when(routeInfo.hasGateway()).thenReturn(true);
-        when(routeInfo.getGateway()).thenReturn(gatewayAddress);
-        when(gatewayAddress.getHostAddress()).thenReturn(hostAddress);
-        when(mWifiInjector.createBufferedReader(ARP_TABLE_PATH)).thenReturn(reader);
-        when(reader.readLine()).thenReturn(new StringJoiner(" ")
-                .add(hostAddress)
-                .add("HWType")
-                .add("Flags")
-                .add(gatewayMac)
-                .add("Mask")
-                .add("Device")
-                .toString());
-
-        mIpClientCallback.onLinkPropertiesChange(linkProperties);
-        mLooper.dispatchAll();
-        when(mWifiNative.getCurrentNetworkSecurityParams(any())).thenReturn(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_PSK));
-        when(mWifiConfigManager.setNetworkDefaultGwMacAddress(anyInt(), any())).thenReturn(true);
-        when(mWifiConfigManager.saveToStore(anyBoolean())).thenReturn(true);
-        WifiConfiguration linkedConfig = WifiConfigurationTestUtil.createPskNetwork("\"ssid2\"");
-        linkedConfig.networkId = connectedConfig.networkId + 1;
-        Map<String, WifiConfiguration> linkedNetworks = new HashMap<>();
-        linkedNetworks.put(linkedConfig.getProfileKey(), linkedConfig);
-        when(mWifiConfigManager.getLinkedNetworksWithoutMasking(connectedConfig.networkId))
-                .thenReturn(linkedNetworks);
-        when(mWifiNative.updateLinkedNetworks(any(), anyInt(), any())).thenReturn(true);
-        mWifiNetworkAgentCallbackCaptor.getValue().onValidationStatus(
-                NetworkAgent.VALIDATION_STATUS_VALID, null /* captivePortalUrl */);
-        mLooper.dispatchAll();
-
-        verify(mWifiConfigManager)
-                .setNetworkDefaultGwMacAddress(mConnectedNetwork.networkId, gatewayMac);
-        verify(mWifiConfigManager).updateLinkedNetworks(connectedConfig.networkId);
-        verify(mWifiNative).updateLinkedNetworks(
-                any(), eq(connectedConfig.networkId), eq(linkedNetworks));
-        List<String> allowlistSsids = new ArrayList<>();
-        allowlistSsids.add(linkedConfig.SSID);
-        allowlistSsids.add(connectedConfig.SSID);
-        verify(mWifiBlocklistMonitor).setAllowlistSsids(
-                eq(connectedConfig.SSID), eq(allowlistSsids));
-        verify(mWifiBlocklistMonitor).updateFirmwareRoamingConfiguration(
-                eq(new ArraySet<>(allowlistSsids)));
-    }
-
-    @Test
-    public void testNonPskNetworkDoesNotUpdateLinkedNetworks() throws Exception {
-        mResources.setBoolean(R.bool.config_wifiEnableLinkedNetworkRoaming, true);
-        BufferedReader reader = mock(BufferedReader.class);
-        WifiConfiguration connectedConfig = WifiConfigurationTestUtil.createPskNetwork("\"ssid1\"");
-        connectedConfig.networkId = FRAMEWORK_NETWORK_ID;
-        when(mWifiConfigManager.getConfiguredNetwork(connectedConfig.networkId))
-                .thenReturn(connectedConfig);
-        mConnectedNetwork = connectedConfig;
-        connect();
-        verify(mWifiInjector).makeWifiNetworkAgent(any(), any(), any(), any(),
-                mWifiNetworkAgentCallbackCaptor.capture());
-
-        LinkProperties linkProperties = mock(LinkProperties.class);
-        RouteInfo routeInfo = mock(RouteInfo.class);
-        IpPrefix ipPrefix = mock(IpPrefix.class);
-        Inet4Address destinationAddress = mock(Inet4Address.class);
-        InetAddress gatewayAddress = mock(InetAddress.class);
-        String hostAddress = "127.0.0.1";
-        String gatewayMac = "192.168.0.1";
-        when(linkProperties.getRoutes()).thenReturn(Arrays.asList(routeInfo));
-        when(routeInfo.isDefaultRoute()).thenReturn(true);
-        when(routeInfo.getDestination()).thenReturn(ipPrefix);
-        when(ipPrefix.getAddress()).thenReturn(destinationAddress);
-        when(routeInfo.hasGateway()).thenReturn(true);
-        when(routeInfo.getGateway()).thenReturn(gatewayAddress);
-        when(gatewayAddress.getHostAddress()).thenReturn(hostAddress);
-        when(mWifiInjector.createBufferedReader(ARP_TABLE_PATH)).thenReturn(reader);
-        when(reader.readLine()).thenReturn(new StringJoiner(" ")
-                .add(hostAddress)
-                .add("HWType")
-                .add("Flags")
-                .add(gatewayMac)
-                .add("Mask")
-                .add("Device")
-                .toString());
-
-        mIpClientCallback.onLinkPropertiesChange(linkProperties);
-        mLooper.dispatchAll();
-        when(mWifiNative.getCurrentNetworkSecurityParams(any())).thenReturn(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_SAE));
-        when(mWifiConfigManager.setNetworkDefaultGwMacAddress(anyInt(), any())).thenReturn(true);
-        when(mWifiConfigManager.saveToStore(anyBoolean())).thenReturn(true);
-        mWifiNetworkAgentCallbackCaptor.getValue().onValidationStatus(
-                NetworkAgent.VALIDATION_STATUS_VALID, null /* captivePortalUrl */);
-        mLooper.dispatchAll();
-
-        verify(mWifiConfigManager)
-                .setNetworkDefaultGwMacAddress(mConnectedNetwork.networkId, gatewayMac);
-        verify(mWifiConfigManager, never()).updateLinkedNetworks(connectedConfig.networkId);
-    }
-
-    @Test
-    public void testInvalidScanResultDoesNotUpdateLinkedNetworks() throws Exception {
-        mResources.setBoolean(R.bool.config_wifiEnableLinkedNetworkRoaming, true);
-        BufferedReader reader = mock(BufferedReader.class);
-        WifiConfiguration connectedConfig = WifiConfigurationTestUtil.createPskNetwork("\"ssid1\"");
-        connectedConfig.networkId = FRAMEWORK_NETWORK_ID;
-        when(mWifiConfigManager.getConfiguredNetwork(connectedConfig.networkId))
-                .thenReturn(connectedConfig);
-        mConnectedNetwork = connectedConfig;
-        connect();
-        verify(mWifiInjector).makeWifiNetworkAgent(any(), any(), any(), any(),
-                mWifiNetworkAgentCallbackCaptor.capture());
-
-        LinkProperties linkProperties = mock(LinkProperties.class);
-        RouteInfo routeInfo = mock(RouteInfo.class);
-        IpPrefix ipPrefix = mock(IpPrefix.class);
-        Inet4Address destinationAddress = mock(Inet4Address.class);
-        InetAddress gatewayAddress = mock(InetAddress.class);
-        String hostAddress = "127.0.0.1";
-        String gatewayMac = "192.168.0.1";
-        when(linkProperties.getRoutes()).thenReturn(Arrays.asList(routeInfo));
-        when(routeInfo.isDefaultRoute()).thenReturn(true);
-        when(routeInfo.getDestination()).thenReturn(ipPrefix);
-        when(ipPrefix.getAddress()).thenReturn(destinationAddress);
-        when(routeInfo.hasGateway()).thenReturn(true);
-        when(routeInfo.getGateway()).thenReturn(gatewayAddress);
-        when(gatewayAddress.getHostAddress()).thenReturn(hostAddress);
-        when(mWifiInjector.createBufferedReader(ARP_TABLE_PATH)).thenReturn(reader);
-        when(reader.readLine()).thenReturn(new StringJoiner(" ")
-                .add(hostAddress)
-                .add("HWType")
-                .add("Flags")
-                .add(gatewayMac)
-                .add("Mask")
-                .add("Device")
-                .toString());
-
-        mIpClientCallback.onLinkPropertiesChange(linkProperties);
-        mLooper.dispatchAll();
-        when(mWifiNative.getCurrentNetworkSecurityParams(any())).thenReturn(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_PSK));
-        when(mWifiConfigManager.setNetworkDefaultGwMacAddress(anyInt(), any())).thenReturn(true);
-        when(mWifiConfigManager.saveToStore(anyBoolean())).thenReturn(true);
-
-        // FT/PSK scan, do not update linked networks
-        ScanResult ftPskScan = new ScanResult();
-        ftPskScan.capabilities = "FT/PSK";
-        when(mScanRequestProxy.getScanResult(any())).thenReturn(ftPskScan);
-        mWifiNetworkAgentCallbackCaptor.getValue().onValidationStatus(
-                NetworkAgent.VALIDATION_STATUS_VALID, null /* captivePortalUrl */);
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager)
-                .setNetworkDefaultGwMacAddress(mConnectedNetwork.networkId, gatewayMac);
-        verify(mWifiConfigManager, never()).updateLinkedNetworks(connectedConfig.networkId);
-
-        // Null scan, do not update linked networks
-        mWifiNetworkAgentCallbackCaptor.getValue().onValidationStatus(
-                NetworkAgent.VALIDATION_STATUS_VALID, null /* captivePortalUrl */);
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager)
-                .setNetworkDefaultGwMacAddress(mConnectedNetwork.networkId, gatewayMac);
-        verify(mWifiConfigManager, never()).updateLinkedNetworks(connectedConfig.networkId);
-    }
-
-    /**
-     * Verify that we disconnect when we mark a previous trusted network untrusted.
-     */
-    @Test
-    public void verifyDisconnectOnMarkingNetworkUntrusted() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        connect();
-        expectRegisterNetworkAgent((config) -> { }, (cap) -> {
-            assertTrue(cap.hasCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED));
-        });
-
-        WifiConfiguration oldConfig = new WifiConfiguration(mConnectedNetwork);
-        mConnectedNetwork.trusted = false;
-
-        mConfigUpdateListenerCaptor.getValue().onNetworkUpdated(mConnectedNetwork, oldConfig);
-        mLooper.dispatchAll();
-        verify(mWifiNative).disconnect(WIFI_IFACE_NAME);
-        verify(mWifiMetrics).logStaEvent(anyString(), eq(StaEvent.TYPE_FRAMEWORK_DISCONNECT),
-                eq(StaEvent.DISCONNECT_NETWORK_UNTRUSTED));
-    }
-
-    /**
-     * Verify that we only update capabilities when we mark a previous untrusted network trusted.
-     */
-    @Test
-    public void verifyUpdateCapabilitiesOnMarkingNetworkTrusted() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        mConnectedNetwork.trusted = false;
-        connect();
-        expectRegisterNetworkAgent((config) -> { }, (cap) -> {
-            assertFalse(cap.hasCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED));
-        });
-        reset(mWifiNetworkAgent);
-
-        WifiConfiguration oldConfig = new WifiConfiguration(mConnectedNetwork);
-        mConnectedNetwork.trusted = true;
-
-        mConfigUpdateListenerCaptor.getValue().onNetworkUpdated(mConnectedNetwork, oldConfig);
-        mLooper.dispatchAll();
-        assertEquals("L3ConnectedState", getCurrentState().getName());
-
-        expectNetworkAgentUpdateCapabilities((cap) -> {
-            assertTrue(cap.hasCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED));
-        });
-    }
-
-    /**
-     * Verify on device before T we will not disconnect when we mark a previous trusted network
-     * untrusted.
-     */
-    @Test
-    public void verifyNoDisconnectOnMarkingNetworkUntrustedBeforeT() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        connect();
-        expectRegisterNetworkAgent((config) -> { }, (cap) -> {
-            assertTrue(cap.hasCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED));
-        });
-
-        WifiConfiguration oldConfig = new WifiConfiguration(mConnectedNetwork);
-        mConnectedNetwork.trusted = false;
-
-        mConfigUpdateListenerCaptor.getValue().onNetworkUpdated(mConnectedNetwork, oldConfig);
-        mLooper.dispatchAll();
-        verify(mWifiNative, never()).disconnect(WIFI_IFACE_NAME);
-        verify(mWifiMetrics, never()).logStaEvent(anyString(), anyInt(), anyInt());
-    }
-
-    /**
-     * Verify on a build before T we will not update capabilities or disconnect when we mark a
-     * previous untrusted network trusted.
-     */
-    @Test
-    public void verifyNoUpdateCapabilitiesOnMarkingNetworkTrustedBeforeT() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        mConnectedNetwork.trusted = false;
-        connect();
-        expectRegisterNetworkAgent((config) -> { }, (cap) -> {
-            assertFalse(cap.hasCapability(NetworkCapabilities.NET_CAPABILITY_TRUSTED));
-        });
-        reset(mWifiNetworkAgent);
-
-        WifiConfiguration oldConfig = new WifiConfiguration(mConnectedNetwork);
-        mConnectedNetwork.trusted = true;
-
-        mConfigUpdateListenerCaptor.getValue().onNetworkUpdated(mConnectedNetwork, oldConfig);
-        mLooper.dispatchAll();
-        assertEquals("L3ConnectedState", getCurrentState().getName());
-        verifyNoMoreInteractions(mWifiNetworkAgent);
-    }
-
     private void verifyUpdateAutoUpgradeFlagForSaeOnR(
             boolean isWpa3SaeUpgradeEnabled, boolean isWpa2PersonalOnlyNetworkInRange,
             boolean isWpa2Wpa3PersonalTransitionNetworkInRange,
@@ -7777,7 +6802,7 @@
         mCmi.connectNetwork(
                 new NetworkUpdateResult(TEST_NETWORK_ID),
                 new ActionListenerWrapper(connectActionListener),
-                Process.SYSTEM_UID, OP_PACKAGE_NAME);
+                Process.SYSTEM_UID);
         mLooper.dispatchAll();
         verify(connectActionListener).onSuccess();
         if (shouldBeUpdated) {
@@ -7852,431 +6877,4 @@
 
         verifyUpdateAutoUpgradeFlagForSaeOnR(false, false, true, true, false);
     }
-
-    private WifiConfiguration setupLegacyEapNetworkTest(boolean isUserSelected) throws Exception {
-        return setupTrustOnFirstUse(false, false, isUserSelected);
-    }
-
-    private WifiConfiguration setupTrustOnFirstUse(
-            boolean isAtLeastT, boolean isTrustOnFirstUseSupported, boolean isUserSelected)
-            throws Exception {
-        if (isTrustOnFirstUseSupported) {
-            when(mWifiNative.getSupportedFeatureSet(WIFI_IFACE_NAME)).thenReturn(
-                    WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE);
-        }
-        mCmi.mInsecureEapNetworkHandler = mInsecureEapNetworkHandler;
-        when(mInsecureEapNetworkHandler.startUserApprovalIfNecessary(anyBoolean()))
-                .thenReturn(true);
-
-        WifiConfiguration eapTlsConfig = spy(WifiConfigurationTestUtil.createEapNetwork(
-                WifiEnterpriseConfig.Eap.TLS, WifiEnterpriseConfig.Phase2.NONE));
-        eapTlsConfig.networkId = FRAMEWORK_NETWORK_ID;
-        eapTlsConfig.SSID = TEST_SSID;
-        if (isAtLeastT) {
-            eapTlsConfig.enterpriseConfig.enableTrustOnFirstUse(true);
-        }
-        eapTlsConfig.enterpriseConfig.setCaPath("");
-        eapTlsConfig.enterpriseConfig.setDomainSuffixMatch("");
-
-        initializeAndAddNetworkAndVerifySuccess(eapTlsConfig);
-
-        if (isUserSelected) {
-            startConnectSuccess();
-        } else {
-            mCmi.startConnectToNetwork(
-                    eapTlsConfig.networkId,
-                    Process.SYSTEM_UID,
-                    ClientModeImpl.SUPPLICANT_BSSID_ANY);
-            mLooper.dispatchAll();
-        }
-        verify(mInsecureEapNetworkHandler).prepareConnection(eq(eapTlsConfig));
-
-        mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(0, TEST_WIFI_SSID, TEST_BSSID_STR,
-                        SupplicantState.ASSOCIATED));
-        mLooper.dispatchAll();
-
-        if (isTrustOnFirstUseSupported) {
-            mCmi.sendMessage(WifiMonitor.TOFU_ROOT_CA_CERTIFICATE,
-                    FRAMEWORK_NETWORK_ID, 0, FakeKeys.CA_CERT0);
-            mLooper.dispatchAll();
-            verify(mInsecureEapNetworkHandler).setPendingCertificate(
-                    eq(eapTlsConfig.SSID), eq(0), eq(FakeKeys.CA_CERT0));
-        }
-
-        mCmi.sendMessage(WifiMonitor.NETWORK_CONNECTION_EVENT,
-                new NetworkConnectionEventInfo(0, TEST_WIFI_SSID, TEST_BSSID_STR, false));
-        mLooper.dispatchAll();
-
-        mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(0, TEST_WIFI_SSID, TEST_BSSID_STR,
-                        SupplicantState.COMPLETED));
-        mLooper.dispatchAll();
-
-        verify(mInsecureEapNetworkHandler).startUserApprovalIfNecessary(eq(isUserSelected));
-        assertEquals("L3ProvisioningState", getCurrentState().getName());
-
-        return eapTlsConfig;
-    }
-
-    /**
-     * Verify Trust On First Use support.
-     * - This network is selected by a user.
-     * - Accept the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseAcceptWhenConnectByUser() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupTrustOnFirstUse(true, true, true);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onAccept(testConfig.SSID);
-        mLooper.dispatchAll();
-        injectDhcpSuccess();
-        mLooper.dispatchAll();
-        assertEquals("L3ConnectedState", getCurrentState().getName());
-    }
-
-    /**
-     * Verify Trust On First Use support.
-     * - This network is selected by a user.
-     * - Reject the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseRejectWhenConnectByUser() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupTrustOnFirstUse(true, true, true);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onReject(testConfig.SSID);
-        mLooper.dispatchAll();
-        verify(mWifiNative).disconnect(eq(WIFI_IFACE_NAME));
-    }
-
-    /**
-     * Verify Trust On First Use support.
-     * - This network is selected by a user.
-     * - Errors occur in InsecureEapNetworkHandler.
-     */
-    @Test
-    public void verifyTrustOnFirstUseErrorWhenConnectByUser() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupTrustOnFirstUse(true, true, true);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onError(testConfig.SSID);
-        mLooper.dispatchAll();
-        verify(mWifiNative).disconnect(eq(WIFI_IFACE_NAME));
-    }
-
-   /**
-     * Verify Trust On First Use support.
-     * - this network is automatically connected.
-     * - Tap the notification.
-     * - Accept the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseAcceptWhenAutoConnect() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupTrustOnFirstUse(true, true, false);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onAccept(testConfig.SSID);
-        mLooper.dispatchAll();
-        injectDhcpSuccess();
-        mLooper.dispatchAll();
-        assertEquals("L3ConnectedState", getCurrentState().getName());
-    }
-
-    /**
-     * Verify Trust On First Use support.
-     * - this network is automatically connected.
-     * - Tap the notification
-     * - Reject the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseRejectWhenAutoConnect() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupTrustOnFirstUse(true, true, false);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onReject(testConfig.SSID);
-        mLooper.dispatchAll();
-        verify(mWifiNative).disconnect(eq(WIFI_IFACE_NAME));
-    }
-
-    /**
-     * Verify Trust On First Use support.
-     * - This network is automatically connected.
-     * - Errors occur in InsecureEapNetworkHandler.
-     */
-    @Test
-    public void verifyTrustOnFirstUseErrorWhenAutoConnect() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupTrustOnFirstUse(true, true, false);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onError(testConfig.SSID);
-        mLooper.dispatchAll();
-        verify(mWifiNative).disconnect(eq(WIFI_IFACE_NAME));
-    }
-
-    /**
-     * Verify legacy EAP network handling.
-     * - This network is selected by a user.
-     * - Accept the connection.
-     */
-    @Test
-    public void verifyLegacyEapNetworkAcceptWhenConnectByUser() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupLegacyEapNetworkTest(true);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onAccept(testConfig.SSID);
-        mLooper.dispatchAll();
-        injectDhcpSuccess();
-        mLooper.dispatchAll();
-        assertEquals("L3ConnectedState", getCurrentState().getName());
-    }
-
-    /**
-     * Verify legacy EAP network handling.
-     * - This network is selected by a user.
-     * - Reject the connection.
-     */
-    @Test
-    public void verifyLegacyEapNetworkRejectWhenConnectByUser() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupLegacyEapNetworkTest(true);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onReject(testConfig.SSID);
-        mLooper.dispatchAll();
-        verify(mWifiNative).disconnect(eq(WIFI_IFACE_NAME));
-    }
-
-    /**
-     * Verify legacy EAP network handling.
-     * - This network is automatically connected.
-     * - Errors occur in InsecureEapNetworkHandler.
-     */
-    @Test
-    public void verifyLegacyEapNetworkErrorWhenConnectByUser() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupLegacyEapNetworkTest(true);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onError(testConfig.SSID);
-        mLooper.dispatchAll();
-        verify(mWifiNative).disconnect(eq(WIFI_IFACE_NAME));
-    }
-
-    /**
-     * Verify legacy EAP network handling.
-     * - This network is automatically connected.
-     * - Tap "connect anyway" on the notification.
-     */
-    @Test
-    public void verifyLegacyEapNetworkAcceptOnNotificationWhenAutoConnect() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupLegacyEapNetworkTest(false);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onAccept(testConfig.SSID);
-        injectDhcpSuccess();
-        mLooper.dispatchAll();
-        assertEquals("L3ConnectedState", getCurrentState().getName());
-    }
-
-    /**
-     * Verify legacy EAP network handling.
-     * - This network is automatically connected.
-     * - Tap "Don't connect" on the notification
-     */
-    @Test
-    public void verifyLegacyEapNetworkRejectOnNotificationWhenAutoConnect() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupLegacyEapNetworkTest(false);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onReject(testConfig.SSID);
-        mLooper.dispatchAll();
-
-        verify(mFrameworkFacade, never()).makeAlertDialogBuilder(any());
-        verify(mWifiNative).disconnect(eq(WIFI_IFACE_NAME));
-    }
-
-    /**
-     * Verify legacy EAP network handling.
-     * - This network is automatically connected.
-     * - Errors occur in InsecureEapNetworkHandler.
-     */
-    @Test
-    public void verifyLegacyEapNetworkErrorWhenAutoConnect() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        WifiConfiguration testConfig = setupLegacyEapNetworkTest(false);
-
-        mCmi.mInsecureEapNetworkHandlerCallbacksImpl.onError(testConfig.SSID);
-        mLooper.dispatchAll();
-        verify(mWifiNative).disconnect(eq(WIFI_IFACE_NAME));
-    }
-
-    private void setScanResultWithMloInfo() {
-        List<MloLink> mloLinks = new ArrayList<>();
-        MloLink link1 = new MloLink();
-        MloLink link2 = new MloLink();
-        mloLinks.add(link1);
-        mloLinks.add(link2);
-
-        when(mScanResult.getApMldMacAddress()).thenReturn(TEST_AP_MLD_MAC_ADDRESS);
-        when(mScanResult.getApMloLinkId()).thenReturn(TEST_MLO_LINK_ID);
-        when(mScanResult.getAffiliatedMloLinks()).thenReturn(mloLinks);
-
-        when(mScanRequestProxy.getScanResults()).thenReturn(Arrays.asList(mScanResult));
-        when(mScanRequestProxy.getScanResult(any())).thenReturn(mScanResult);
-    }
-
-    private void setScanResultWithoutMloInfo() {
-        when(mScanResult.getApMldMacAddress()).thenReturn(null);
-        when(mScanResult.getApMloLinkId()).thenReturn(MloLink.INVALID_MLO_LINK_ID);
-        when(mScanResult.getAffiliatedMloLinks()).thenReturn(Collections.emptyList());
-
-        when(mScanRequestProxy.getScanResults()).thenReturn(Arrays.asList(mScanResult));
-        when(mScanRequestProxy.getScanResult(any())).thenReturn(mScanResult);
-    }
-
-    private void setConnection() throws Exception {
-        WifiConfiguration config = createTestNetwork(false);
-        setupAndStartConnectSequence(config);
-        validateSuccessfulConnectSequence(config);
-    }
-
-    /**
-     * Verify MLO parameters update from ScanResult at association
-     */
-    @Test
-    public void verifyMloParametersUpdateAssoc() throws Exception {
-        setConnection();
-        setScanResultWithMloInfo();
-        mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(FRAMEWORK_NETWORK_ID, TEST_WIFI_SSID, TEST_BSSID_STR,
-                        SupplicantState.ASSOCIATED));
-        mLooper.dispatchAll();
-
-        mLooper.startAutoDispatch();
-        WifiInfo connectionInfo = mCmi.syncRequestConnectionInfo();
-        mLooper.stopAutoDispatch();
-        assertNotNull(connectionInfo.getApMldMacAddress());
-        assertEquals(TEST_AP_MLD_MAC_ADDRESS_STR, connectionInfo.getApMldMacAddress().toString());
-        assertEquals(TEST_MLO_LINK_ID, connectionInfo.getApMloLinkId());
-        assertEquals(2, connectionInfo.getAffiliatedMloLinks().size());
-    }
-
-    /**
-     * Verify MLO parameters update when roaming to a MLD ap, and then get cleared when roaming to
-     * a non MLD supported AP.
-     */
-    @Test
-    public void verifyMloParametersUpdateRoam() throws Exception {
-        connect();
-        setScanResultWithMloInfo();
-
-        // Roam to a MLD AP
-        mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(FRAMEWORK_NETWORK_ID, TEST_WIFI_SSID, TEST_BSSID_STR,
-                        SupplicantState.ASSOCIATED));
-        mLooper.dispatchAll();
-
-        mLooper.startAutoDispatch();
-        WifiInfo connectionInfo = mCmi.syncRequestConnectionInfo();
-        mLooper.stopAutoDispatch();
-
-        assertNotNull(connectionInfo.getApMldMacAddress());
-        assertEquals(TEST_AP_MLD_MAC_ADDRESS_STR, connectionInfo.getApMldMacAddress().toString());
-        assertEquals(TEST_MLO_LINK_ID, connectionInfo.getApMloLinkId());
-        assertEquals(2, connectionInfo.getAffiliatedMloLinks().size());
-
-        // Now perform Roaming to a non-MLD AP
-        setScanResultWithoutMloInfo();
-        mCmi.sendMessage(WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0,
-                new StateChangeResult(FRAMEWORK_NETWORK_ID, TEST_WIFI_SSID, TEST_BSSID_STR,
-                        SupplicantState.ASSOCIATED));
-        mLooper.dispatchAll();
-
-        mLooper.startAutoDispatch();
-        connectionInfo = mCmi.syncRequestConnectionInfo();
-        mLooper.stopAutoDispatch();
-        assertNull(connectionInfo.getApMldMacAddress());
-        assertEquals(MloLink.INVALID_MLO_LINK_ID, connectionInfo.getApMloLinkId());
-        assertTrue(connectionInfo.getAffiliatedMloLinks().isEmpty());
-    }
-
-    /**
-     * Verify that an event that occurs on a managed network is handled by
-     * logEventIfManagedNetwork.
-     */
-    @Test
-    public void verifyEventHandledByLogEventIfManagedNetwork() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        MacAddress bssid = MacAddress.fromString(TEST_BSSID_STR);
-        int numMaskedOctets = 4;
-
-        mResources.setInteger(
-                R.integer.config_wifiNumMaskedBssidOctetsInSecurityLog, numMaskedOctets);
-        when(mWifiPermissionsUtil.isAdmin(anyInt(), any())).thenReturn(true);
-        MockitoSession scanResultUtilSession = ExtendedMockito.mockitoSession()
-                .strictness(Strictness.LENIENT)
-                .mockStatic(ScanResultUtil.class, withSettings().lenient())
-                .startMocking();
-        connect();
-
-        // Connect will generate the Associated and Connected events. Confirm the events were
-        // handled by checking that redactBssid() was called for each one.
-        ExtendedMockito.verify(() ->
-                ScanResultUtil.redactBssid(bssid, numMaskedOctets), times(2));
-        scanResultUtilSession.finishMocking();
-    }
-
-    /**
-     * Verify that QoS policy reset events are handled when mNetworkAgent is non-null.
-     */
-    @Test
-    public void verifyQosPolicyResetEventWithNonNullNetworkAgent() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        connect();
-        assertNotNull(mCmi.mNetworkAgent);
-        mCmi.sendMessage(WifiMonitor.QOS_POLICY_RESET_EVENT, 0, 0, null);
-        mLooper.dispatchAll();
-        verify(mWifiNetworkAgent).sendRemoveAllDscpPolicies();
-    }
-
-    /**
-     * Verify that QoS policy reset events are not handled when mNetworkAgent is null.
-     */
-    @Test
-    public void verifyQosPolicyResetEventWithNullNetworkAgent() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        assertNull(mCmi.mNetworkAgent);
-        mCmi.sendMessage(WifiMonitor.QOS_POLICY_RESET_EVENT, 0, 0, null);
-        mLooper.dispatchAll();
-        verify(mWifiNetworkAgent, never()).sendRemoveAllDscpPolicies();
-    }
-
-    /**
-     * Verify that QoS policy request events are handled when mNetworkAgent is non-null.
-     */
-    @Test
-    public void verifyQosPolicyRequestEvent() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        final int dialogToken = 124;
-
-        // Event should be ignored by the QosPolicyRequestHandler if no network is connected,
-        // since mNetworkAgent is null.
-        assertNull(mCmi.mNetworkAgent);
-        mCmi.sendMessage(WifiMonitor.QOS_POLICY_REQUEST_EVENT, dialogToken, 0,
-                new ArrayList<SupplicantStaIfaceHal.QosPolicyRequest>());
-        mLooper.dispatchAll();
-
-        // New events should be processed after connecting to a network,
-        // since mNetworkAgent is not null.
-        connect();
-        assertNotNull(mCmi.mNetworkAgent);
-        mCmi.sendMessage(WifiMonitor.QOS_POLICY_REQUEST_EVENT, dialogToken + 1, 0,
-                new ArrayList<SupplicantStaIfaceHal.QosPolicyRequest>());
-        mLooper.dispatchAll();
-
-        verify(mWifiNative, never()).sendQosPolicyResponse(
-                eq(WIFI_IFACE_NAME), eq(dialogToken), eq(true), any());
-        verify(mWifiNative).sendQosPolicyResponse(
-                eq(WIFI_IFACE_NAME), eq(dialogToken + 1), eq(true), any());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ConcreteCandidate.java b/service/tests/wifitests/src/com/android/server/wifi/ConcreteCandidate.java
index 490dc48..b5f1f0f 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ConcreteCandidate.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ConcreteCandidate.java
@@ -16,7 +16,6 @@
 
 package com.android.server.wifi;
 
-import android.net.wifi.WifiAnnotations;
 import android.util.ArrayMap;
 
 import com.android.server.wifi.proto.WifiScoreCardProto;
@@ -24,7 +23,6 @@
 import java.util.Map;
 
 public final class ConcreteCandidate implements WifiCandidates.Candidate {
-    private boolean mRestricted;
     private WifiCandidates.Key mKey;
     private int mNetworkConfigId = -1;
     private boolean mIsOpenNetwork;
@@ -35,7 +33,6 @@
     private boolean mIsTrusted = true;
     private boolean mIsOemPaid;
     private boolean mIsOemPrivate;
-    private boolean mSecondaryInternet;
     private boolean mCarrierOrPrivileged;
     private boolean mIsMetered;
     private boolean mHasNoInternetAccess;
@@ -44,7 +41,6 @@
     private double mLastSelectionWeight;
     private int mScanRssi = -127;
     private int mFrequency = -1;
-    private int mChannelWidth;
     private int mPredictedThroughputMbps = 0;
     private int mEstimatedPercentInternetAvailability = 50;
 
@@ -63,9 +59,7 @@
         mIsPasspoint = candidate.isPasspoint();
         mIsEphemeral = candidate.isEphemeral();
         mIsTrusted = candidate.isTrusted();
-        mRestricted = candidate.isRestricted();
         mIsOemPaid = candidate.isOemPaid();
-        mSecondaryInternet = candidate.isSecondaryInternet();
         mCarrierOrPrivileged = candidate.isCarrierOrPrivileged();
         mIsMetered = candidate.isMetered();
         mHasNoInternetAccess = candidate.hasNoInternetAccess();
@@ -74,7 +68,6 @@
         mLastSelectionWeight = candidate.getLastSelectionWeight();
         mScanRssi = candidate.getScanRssi();
         mFrequency = candidate.getFrequency();
-        mChannelWidth = candidate.getChannelWidth();
         mPredictedThroughputMbps = candidate.getPredictedThroughputMbps();
         mEstimatedPercentInternetAvailability = candidate
                 .getEstimatedPercentInternetAvailability();
@@ -166,11 +159,6 @@
         return mIsOemPrivate;
     }
 
-    @Override
-    public boolean isSecondaryInternet() {
-        return mSecondaryInternet;
-    }
-
     public ConcreteCandidate setCarrierOrPrivileged(boolean carrierOrPrivileged) {
         mCarrierOrPrivileged = carrierOrPrivileged;
         return this;
@@ -266,21 +254,11 @@
         return this;
     }
 
-    public ConcreteCandidate setChannelWidth(@WifiAnnotations.ChannelWidth int channelWidth) {
-        mChannelWidth = channelWidth;
-        return this;
-    }
-
     @Override
     public int getFrequency() {
         return mFrequency;
     }
 
-    @Override
-    public int getChannelWidth() {
-        return mChannelWidth;
-    }
-
     public ConcreteCandidate setPredictedThroughputMbps(int predictedThroughputMbps) {
         mPredictedThroughputMbps = predictedThroughputMbps;
         return this;
@@ -313,9 +291,4 @@
         return mEventStatisticsMap.get(event);
     }
 
-    @Override
-    public boolean isRestricted() {
-        return mRestricted;
-    }
-
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ConcreteClientModeManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/ConcreteClientModeManagerTest.java
index 318a257..810889b 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ConcreteClientModeManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ConcreteClientModeManagerTest.java
@@ -103,8 +103,6 @@
     @Mock ActiveModeManager.Listener<ConcreteClientModeManager> mListener;
     @Mock WakeupController mWakeupController;
     @Mock WifiInjector mWifiInjector;
-    @Mock DeviceConfigFacade mDeviceConfigFacade;
-    @Mock WifiDiagnostics mWifiDiagnostics;
     @Mock ClientModeImpl mClientModeImpl;
     @Mock CarrierConfigManager mCarrierConfigManager;
     @Mock PersistableBundle mCarrierConfigBundle;
@@ -117,7 +115,6 @@
     @Mock ScanOnlyModeImpl mScanOnlyModeImpl;
     @Mock DefaultClientModeManager mDefaultClientModeManager;
     @Mock ClientModeManagerBroadcastQueue mBroadcastQueue;
-    @Mock ActiveModeWarden mActiveModeWarden;
 
     private RegistrationManager.RegistrationCallback mImsMmTelManagerRegistrationCallback = null;
     private @RegistrationManager.ImsRegistrationState int mCurrentImsRegistrationState =
@@ -126,6 +123,7 @@
             AccessNetworkConstants.TRANSPORT_TYPE_INVALID;
     private NetworkRequest mImsRequest = null;
     private NetworkCallback mImsNetworkCallback = null;
+    private Handler mImsNetworkCallbackHandler = null;
     private long mElapsedSinceBootMillis = 0L;
     private List<SubscriptionInfo> mSubscriptionInfoList = new ArrayList<>();
     private MockResources mResources;
@@ -140,11 +138,11 @@
      * from the context.
      */
     private void setUpSystemServiceForContext() {
-        when(mContext.getSystemService(eq(CarrierConfigManager.class)))
+        when(mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE))
                 .thenReturn(mCarrierConfigManager);
-        when(mContext.getSystemService(eq(SubscriptionManager.class)))
+        when(mContext.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE))
                 .thenReturn(mSubscriptionManager);
-        when(mContext.getSystemService(eq(ConnectivityManager.class)))
+        when(mContext.getSystemService(Context.CONNECTIVITY_SERVICE))
                 .thenReturn(mConnectivityManager);
         when(mContext.getResources()).thenReturn(mResources);
         when(mWifiInjector.makeClientModeImpl(any(), any(), anyBoolean()))
@@ -224,6 +222,7 @@
             public void answer(NetworkRequest req, NetworkCallback callback, Handler handler) {
                 mImsRequest = req;
                 mImsNetworkCallback = callback;
+                mImsNetworkCallbackHandler = handler;
             }
         }).when(mConnectivityManager).registerNetworkCallback(any(), any(), any());
         doAnswer(new AnswerWithArguments() {
@@ -243,10 +242,7 @@
                 broadcast.send();
             }
         }).when(mBroadcastQueue).queueOrSendBroadcast(any(), any());
-        when(mDeviceConfigFacade.isInterfaceFailureBugreportEnabled()).thenReturn(true);
-        when(mWifiInjector.getDeviceConfigFacade()).thenReturn(mDeviceConfigFacade);
-        when(mWifiInjector.getWifiDiagnostics()).thenReturn(mWifiDiagnostics);
-        when(mWifiInjector.getActiveModeWarden()).thenReturn(mActiveModeWarden);
+
         mLooper = new TestLooper();
     }
 
@@ -276,9 +272,6 @@
         mInterfaceCallbackCaptor.getValue().onUp(TEST_INTERFACE_NAME);
         mLooper.dispatchAll();
 
-        // DeferStopHandler(): ConnectivityManager.class
-        verify(mContext).getSystemService(eq(ConnectivityManager.class));
-
         // Ensure that no public broadcasts were sent.
         verifyNoMoreInteractions(mContext);
         verify(mListener).onStarted(mClientModeManager);
@@ -304,7 +297,6 @@
         mInterfaceCallbackCaptor.getValue().onUp(TEST_INTERFACE_NAME);
         mLooper.dispatchAll();
 
-        verify(mClientModeImpl).onUpChanged(true);
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
         verify(mContext, atLeastOnce()).sendStickyBroadcastAsUser(intentCaptor.capture(),
                 eq(UserHandle.ALL));
@@ -316,7 +308,7 @@
                 WIFI_STATE_DISABLED);
         checkWifiConnectModeStateChangedBroadcast(intents.get(1), WIFI_STATE_ENABLED,
                 WIFI_STATE_ENABLING);
-        verify(mActiveModeWarden).setWifiStateForApiCalls(WIFI_STATE_ENABLED);
+        assertEquals(WIFI_STATE_ENABLED, mClientModeManager.syncGetWifiState());
 
         verify(mListener).onStarted(mClientModeManager);
     }
@@ -342,7 +334,7 @@
                 WIFI_STATE_DISABLING, fromState);
         checkWifiConnectModeStateChangedBroadcast(intents.get(intents.size() - 1),
                 WIFI_STATE_DISABLED, WIFI_STATE_DISABLING);
-        verify(mActiveModeWarden).setWifiStateForApiCalls(WIFI_STATE_DISABLED);
+        assertEquals(WIFI_STATE_DISABLED, mClientModeManager.syncGetWifiState());
     }
 
     private void verifyConnectModeNotificationsForFailure() {
@@ -356,7 +348,7 @@
                 WIFI_STATE_UNKNOWN);
         checkWifiConnectModeStateChangedBroadcast(intents.get(1), WIFI_STATE_DISABLED,
                 WIFI_STATE_DISABLING);
-        verify(mActiveModeWarden).setWifiStateForApiCalls(WIFI_STATE_DISABLED);
+        assertEquals(WIFI_STATE_DISABLED, mClientModeManager.syncGetWifiState());
     }
 
     /**
@@ -407,7 +399,7 @@
                 WIFI_STATE_DISABLED);
         checkWifiConnectModeStateChangedBroadcast(intents.get(1), WIFI_STATE_ENABLED,
                 WIFI_STATE_ENABLING);
-        verify(mActiveModeWarden).setWifiStateForApiCalls(WIFI_STATE_ENABLED);
+        assertEquals(WIFI_STATE_ENABLED, mClientModeManager.syncGetWifiState());
 
         verify(mListener).onStarted(mClientModeManager);
         verify(mListener).onRoleChanged(mClientModeManager);
@@ -430,7 +422,7 @@
         mLooper.dispatchAll();
 
         verify(mClientModeImpl).stop();
-        verify(mActiveModeWarden, never()).setWifiStateForApiCalls(WIFI_STATE_DISABLED);
+        assertEquals(WIFI_STATE_DISABLED, mClientModeManager.syncGetWifiState());
 
         // Ensure that only public broadcasts for the "start" events were sent.
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
@@ -464,10 +456,7 @@
         verify(mWifiNative).switchClientInterfaceToScanMode(TEST_INTERFACE_NAME, TEST_WORKSOURCE);
         verify(mClientModeImpl).stop();
 
-        // DeferStopHandler(): ConnectivityManager.class
-        // getWifiOffDeferringTimeMs(): SubscriptionManager.class
-        verify(mContext).getSystemService(eq(ConnectivityManager.class));
-        verify(mContext).getSystemService(eq(SubscriptionManager.class));
+        verify(mContext).getSystemService(anyString());
         verify(mImsMmTelManager, never()).registerImsRegistrationCallback(any(), any());
         verify(mImsMmTelManager, never()).unregisterImsRegistrationCallback(any());
 
@@ -499,9 +488,8 @@
                 WIFI_STATE_DISABLED);
         checkWifiConnectModeStateChangedBroadcast(intents.get(1), WIFI_STATE_DISABLED,
                 WIFI_STATE_UNKNOWN);
-        verify(mActiveModeWarden).setWifiStateForApiCalls(WIFI_STATE_DISABLED);
+        assertEquals(WIFI_STATE_DISABLED, mClientModeManager.syncGetWifiState());
         verify(mListener).onStartFailure(mClientModeManager);
-        verify(mWifiDiagnostics).takeBugReport(anyString(), anyString());
     }
 
     /** Tests failure when setting up iface for scan only mode. */
@@ -514,9 +502,8 @@
         mClientModeManager = createClientModeManager(ROLE_CLIENT_PRIMARY);
         mLooper.dispatchAll();
 
-        verify(mActiveModeWarden, never()).setWifiStateForApiCalls(anyInt());
+        assertEquals(WIFI_STATE_DISABLED, mClientModeManager.syncGetWifiState());
         verify(mListener).onStartFailure(mClientModeManager);
-        verify(mWifiDiagnostics).takeBugReport(anyString(), anyString());
 
         mClientModeManager.getFactoryMacAddress();
         // wifi is off, should get value from DefaultClientModeManager
@@ -772,8 +759,6 @@
         setUpSystemServiceForContext();
         mClientModeManager.stop();
         mLooper.dispatchAll();
-        mImsNetworkCallback.onAvailable(null);
-        mLooper.dispatchAll();
 
         // Not yet finish IMS deregistration.
         verify(mImsMmTelManager).registerImsRegistrationCallback(
@@ -823,8 +808,6 @@
         setUpSystemServiceForContext();
         mClientModeManager.stop();
         mLooper.dispatchAll();
-        mImsNetworkCallback.onAvailable(null);
-        mLooper.dispatchAll();
 
         // Not yet finish IMS deregistration.
         verify(mImsMmTelManager).registerImsRegistrationCallback(
@@ -1084,8 +1067,6 @@
 
         mClientModeManager.setRole(ROLE_CLIENT_SCAN_ONLY, TEST_WORKSOURCE);
         mLooper.dispatchAll();
-        mImsNetworkCallback.onAvailable(null);
-        mLooper.dispatchAll();
 
         // Not yet finish IMS deregistration.
         verify(mWifiNative, never()).switchClientInterfaceToScanMode(any(), any());
@@ -1131,8 +1112,6 @@
 
         mClientModeManager.setRole(ROLE_CLIENT_SCAN_ONLY, TEST_WORKSOURCE);
         mLooper.dispatchAll();
-        mImsNetworkCallback.onAvailable(null);
-        mLooper.dispatchAll();
 
         // Not yet finish IMS deregistration.
         verify(mWifiNative, never()).switchClientInterfaceToScanMode(any(), any());
@@ -1518,8 +1497,8 @@
                         intent.getIntExtra(WifiManager.EXTRA_WIFI_STATE, -1)
                                 == WifiManager.WIFI_STATE_DISABLING),
                 any());
-        // Wifi state should not be updated due to the role is not primary.
-        verify(mActiveModeWarden, never()).setWifiStateForApiCalls(WIFI_STATE_DISABLING);
+        // but wifi state was updated (should be updated no matter the role)
+        assertEquals(WifiManager.WIFI_STATE_DISABLING, mClientModeManager.syncGetWifiState());
     }
 
     @Test
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ConnectHelperTest.java b/service/tests/wifitests/src/com/android/server/wifi/ConnectHelperTest.java
index dc4e2b7..e6d3f2b 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ConnectHelperTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ConnectHelperTest.java
@@ -43,7 +43,6 @@
     private static final int TEST_CALLING_UID = 1000;
     private static final int TEST_NETWORK_ID = 42;
     private static final String TEST_SSID = "TestSSID";
-    private static final String TEST_PACKAGE_NAME = "com.test.xxx";
 
     private ConnectHelper mConnectHelper;
 
@@ -73,13 +72,10 @@
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(mWifiConfig);
 
         NetworkUpdateResult result = new NetworkUpdateResult(TEST_NETWORK_ID);
-        mConnectHelper.connectToNetwork(result, mActionListener, TEST_CALLING_UID,
-                TEST_PACKAGE_NAME);
+        mConnectHelper.connectToNetwork(result, mActionListener, TEST_CALLING_UID);
 
-        verify(mWifiConfigManager).updateBeforeConnect(TEST_NETWORK_ID, TEST_CALLING_UID,
-                TEST_PACKAGE_NAME);
-        verify(mClientModeManager).connectNetwork(eq(result), any(), eq(TEST_CALLING_UID),
-                eq(TEST_PACKAGE_NAME));
+        verify(mWifiConfigManager).updateBeforeConnect(TEST_NETWORK_ID, TEST_CALLING_UID);
+        verify(mClientModeManager).connectNetwork(eq(result), any(), eq(TEST_CALLING_UID));
         // success is sent by ClientModeManager, not sent by ConnectHelper
         verify(mActionListener, never()).sendSuccess();
         verify(mActionListener, never()).sendFailure(anyInt());
@@ -90,12 +86,11 @@
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(null);
 
         mConnectHelper.connectToNetwork(new NetworkUpdateResult(TEST_NETWORK_ID), mActionListener,
-                TEST_CALLING_UID, TEST_PACKAGE_NAME);
+                TEST_CALLING_UID);
 
-        verify(mWifiConfigManager, never()).updateBeforeConnect(TEST_NETWORK_ID, TEST_CALLING_UID,
-                TEST_PACKAGE_NAME);
-        verify(mClientModeManager, never()).connectNetwork(any(), any(), anyInt(), any());
-        verify(mActionListener).sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+        verify(mWifiConfigManager, never()).updateBeforeConnect(TEST_NETWORK_ID, TEST_CALLING_UID);
+        verify(mClientModeManager, never()).connectNetwork(any(), any(), anyInt());
+        verify(mActionListener).sendFailure(WifiManager.ERROR);
         verify(mActionListener, never()).sendSuccess();
     }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ConnectionFailureNotifierTest.java b/service/tests/wifitests/src/com/android/server/wifi/ConnectionFailureNotifierTest.java
index 3376523..fda7b6d 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ConnectionFailureNotifierTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ConnectionFailureNotifierTest.java
@@ -17,25 +17,17 @@
 package com.android.server.wifi;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.argThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
+import android.app.AlertDialog;
 import android.app.Notification;
 import android.content.BroadcastReceiver;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.res.Resources;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.os.Handler;
 import android.os.Process;
 import android.os.test.TestLooper;
@@ -43,7 +35,6 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
-import com.android.wifi.resources.R;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -63,10 +54,9 @@
     @Mock private WifiConfigManager mWifiConfigManager;
     @Mock private WifiConnectivityManager mWifiConnectivityManager;
     @Mock private WifiNotificationManager mWifiNotificationManager;
-    @Mock private WifiDialogManager mWifiDialogManager;
     @Mock private ConnectionFailureNotificationBuilder mConnectionFailureNotificationBuilder;
     @Mock private Notification mNotification;
-    @Mock private WifiDialogManager.DialogHandle mDialogHandle;
+    @Mock private AlertDialog mAlertDialog;
 
     private final ArgumentCaptor<BroadcastReceiver> mBroadCastReceiverCaptor =
             ArgumentCaptor.forClass(BroadcastReceiver.class);
@@ -82,15 +72,12 @@
         when(mContext.getResources()).thenReturn(mResources);
         when(mConnectionFailureNotificationBuilder
                 .buildNoMacRandomizationSupportNotification(any())).thenReturn(mNotification);
-        when(mWifiDialogManager.createSimpleDialog(any(), any(), any(), any(), any(), any(), any()))
-                .thenReturn(mDialogHandle);
+        when(mConnectionFailureNotificationBuilder.buildChangeMacRandomizationSettingDialog(any(),
+                any())).thenReturn(mAlertDialog);
         mConnectionFailureNotifier = new ConnectionFailureNotifier(
                 mContext, mFrameworkFacade, mWifiConfigManager, mWifiConnectivityManager,
                 new Handler(mLooper.getLooper()), mWifiNotificationManager,
-                mConnectionFailureNotificationBuilder, mWifiDialogManager);
-        when(mResources.getString(
-                eq(R.string.wifi_disable_mac_randomization_dialog_message), anyString()))
-                .thenAnswer(s -> "blah" + s.getArguments()[1]);
+                mConnectionFailureNotificationBuilder);
 
         verify(mContext).registerReceiver(mBroadCastReceiverCaptor.capture(), any());
     }
@@ -142,19 +129,12 @@
         ArgumentCaptor<DialogInterface.OnClickListener>  onClickListenerArgumentCaptor =
                 ArgumentCaptor.forClass(DialogInterface.OnClickListener.class);
         mBroadCastReceiverCaptor.getValue().onReceive(mContext, intent);
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> dialogCallbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        ArgumentCaptor<String> messageCaptor = ArgumentCaptor.forClass(String.class);
-        verify(mDialogHandle).launchDialog();
-        verify(mWifiDialogManager).createSimpleDialog(
-                any(), messageCaptor.capture(), any(), any(), any(),
-                dialogCallbackCaptor.capture(), any());
-        String message = messageCaptor.getValue();
-        assertNotNull(message);
-        assertTrue(message.contains(config.SSID));
+        verify(mConnectionFailureNotificationBuilder).buildChangeMacRandomizationSettingDialog(
+                eq(config.SSID), onClickListenerArgumentCaptor.capture());
 
         // simulate the user tapping on the option to reset MAC address to factory MAC
-        dialogCallbackCaptor.getValue().onPositiveButtonClicked();
+        onClickListenerArgumentCaptor.getValue().onClick(null, 0);
+        mLooper.dispatchAll();
 
         // verify the WifiConfiguration is updated properly.
         verify(mWifiConfigManager).addOrUpdateNetwork(
@@ -186,9 +166,8 @@
         mBroadCastReceiverCaptor.getValue().onReceive(mContext, intent);
 
         // verify that the AlertDialog is not launched in this case
-        verify(mWifiDialogManager, never())
-                .createSimpleDialog(any(), any(), any(), any(), any(), any(), any());
-        verify(mDialogHandle, never()).launchDialog();
+        verify(mConnectionFailureNotificationBuilder, never())
+                .buildChangeMacRandomizationSettingDialog(any(), any());
 
         verify(mFrameworkFacade, never()).makeAlertDialogBuilder(any());
         // instead we are showings a toast due to failing to find the network
diff --git a/service/tests/wifitests/src/com/android/server/wifi/DeviceConfigFacadeTest.java b/service/tests/wifitests/src/com/android/server/wifi/DeviceConfigFacadeTest.java
index 28c4a57..5b16b9c 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/DeviceConfigFacadeTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/DeviceConfigFacadeTest.java
@@ -20,6 +20,7 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.*;
+import static org.mockito.MockitoAnnotations.*;
 
 import android.app.test.MockAnswerUtil.AnswerWithArguments;
 import android.content.Context;
@@ -180,9 +181,9 @@
         assertEquals(Collections.emptySet(),
                 mDeviceConfigFacade.getRandomizationFlakySsidHotlist());
         assertEquals(Collections.emptySet(),
-                mDeviceConfigFacade.getNonPersistentMacRandomizationSsidAllowlist());
+                mDeviceConfigFacade.getAggressiveMacRandomizationSsidAllowlist());
         assertEquals(Collections.emptySet(),
-                mDeviceConfigFacade.getNonPersistentMacRandomizationSsidBlocklist());
+                mDeviceConfigFacade.getAggressiveMacRandomizationSsidBlocklist());
         assertEquals(false, mDeviceConfigFacade.isAbnormalConnectionFailureBugreportEnabled());
         assertEquals(false, mDeviceConfigFacade.isAbnormalDisconnectionBugreportEnabled());
         assertEquals(DeviceConfigFacade.DEFAULT_HEALTH_MONITOR_MIN_NUM_CONNECTION_ATTEMPT,
@@ -215,12 +216,11 @@
                 mDeviceConfigFacade.getMinConfirmationDurationSendHighScoreMs());
         assertEquals(DeviceConfigFacade.DEFAULT_RSSI_THRESHOLD_NOT_SEND_LOW_SCORE_TO_CS_DBM,
                 mDeviceConfigFacade.getRssiThresholdNotSendLowScoreToCsDbm());
-        assertEquals(false, mDeviceConfigFacade.allowNonPersistentMacRandomizationOnOpenSsids());
+        assertEquals(false, mDeviceConfigFacade.allowEnhancedMacRandomizationOnOpenSsids());
         assertEquals(DeviceConfigFacade.DEFAULT_TRAFFIC_STATS_THRESHOLD_MAX_KB,
                 mDeviceConfigFacade.getTrafficStatsThresholdMaxKbyte());
         assertEquals(DeviceConfigFacade.DEFAULT_BANDWIDTH_ESTIMATOR_TIME_CONSTANT_LARGE_SEC,
                 mDeviceConfigFacade.getBandwidthEstimatorLargeTimeConstantSec());
-        assertEquals(false, mDeviceConfigFacade.isInterfaceFailureBugreportEnabled());
     }
 
     /**
@@ -344,9 +344,6 @@
                 anyInt())).thenReturn(5000);
         when(DeviceConfig.getInt(anyString(), eq("bandwidth_estimator_time_constant_large_sec"),
                 anyInt())).thenReturn(30);
-        when(DeviceConfig.getBoolean(anyString(),
-                eq("interface_failure_bugreport_enabled"),
-                anyBoolean())).thenReturn(true);
         mOnPropertiesChangedListenerCaptor.getValue().onPropertiesChanged(null);
 
         // Verifying fields are updated to the new values
@@ -386,9 +383,9 @@
         assertEquals(-67, mDeviceConfigFacade.getHealthMonitorMinRssiThrDbm());
         assertEquals(testSsidSet, mDeviceConfigFacade.getRandomizationFlakySsidHotlist());
         assertEquals(testSsidSet,
-                mDeviceConfigFacade.getNonPersistentMacRandomizationSsidAllowlist());
+                mDeviceConfigFacade.getAggressiveMacRandomizationSsidAllowlist());
         assertEquals(testSsidSet,
-                mDeviceConfigFacade.getNonPersistentMacRandomizationSsidBlocklist());
+                mDeviceConfigFacade.getAggressiveMacRandomizationSsidBlocklist());
         assertEquals(true, mDeviceConfigFacade.isAbnormalConnectionFailureBugreportEnabled());
         assertEquals(true, mDeviceConfigFacade.isAbnormalDisconnectionBugreportEnabled());
         assertEquals(20, mDeviceConfigFacade.getHealthMonitorMinNumConnectionAttempt());
@@ -409,9 +406,8 @@
         assertEquals(4000, mDeviceConfigFacade.getMinConfirmationDurationSendLowScoreMs());
         assertEquals(1000, mDeviceConfigFacade.getMinConfirmationDurationSendHighScoreMs());
         assertEquals(-70, mDeviceConfigFacade.getRssiThresholdNotSendLowScoreToCsDbm());
-        assertEquals(true, mDeviceConfigFacade.allowNonPersistentMacRandomizationOnOpenSsids());
+        assertEquals(true, mDeviceConfigFacade.allowEnhancedMacRandomizationOnOpenSsids());
         assertEquals(5000, mDeviceConfigFacade.getTrafficStatsThresholdMaxKbyte());
         assertEquals(30, mDeviceConfigFacade.getBandwidthEstimatorLargeTimeConstantSec());
-        assertEquals(true, mDeviceConfigFacade.isInterfaceFailureBugreportEnabled());
     }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/DppManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/DppManagerTest.java
index b3ed6c5..a2c241b 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/DppManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/DppManagerTest.java
@@ -164,7 +164,7 @@
 
         // Successfully start configurator
         when(mWifiNative.startDppConfiguratorInitiator(anyString(), anyInt(), anyInt(), anyString(),
-                any(), any(), anyInt(), anyInt(), any())).thenReturn(true);
+                any(), any(), anyInt(), anyInt())).thenReturn(true);
 
         // Successfully generate the bootstrap QR code.
         WifiNative.DppBootstrapQrCodeInfo mBootStrapInfo =
@@ -180,11 +180,11 @@
     }
 
     private DppManager createDppManager() {
-        DppManager dppManager = new DppManager(new Handler(mLooper.getLooper()), mWifiNative,
+        DppManager dppManger = new DppManager(new Handler(mLooper.getLooper()), mWifiNative,
                 mWifiConfigManager, mContext, mDppMetrics, mScanRequestProxy, mWifiPermissionsUtil);
-        dppManager.mDppTimeoutMessage = mWakeupMessage;
-        dppManager.enableVerboseLogging(true);
-        return dppManager;
+        dppManger.mDppTimeoutMessage = mWakeupMessage;
+        dppManger.enableVerboseLogging(1);
+        return dppManger;
     }
 
     /**
@@ -210,30 +210,6 @@
         assertFalse(mDppManager.isSessionInProgress());
     }
 
-    /**
-     * Verify that the startDppAsConfiguratorInitiator fails if the network profile
-     * is not configured for configuring DPP-Enrollees.
-     */
-    @Test
-    public void testStartDppAsConfiguratorInitiatorWithoutConfigurableProfile() throws Exception {
-        // Generate a mock WifiConfiguration object
-        WifiConfiguration selectedNetwork = new WifiConfiguration();
-        selectedNetwork.SSID = TEST_SSID;
-        selectedNetwork.networkId = 1;
-        selectedNetwork.setSecurityParams(WifiConfiguration.SECURITY_TYPE_DPP);
-        selectedNetwork.setDppConfigurator(null);
-
-        when(mWifiConfigManager.getConfiguredNetworkWithoutMasking(anyInt())).thenReturn(
-                selectedNetwork);
-
-        assertFalse(mDppManager.isSessionInProgress());
-        mDppManager.startDppAsConfiguratorInitiator(0, TEST_PACKAGE_NAME, TEST_INTERFACE_NAME,
-                mBinder, mUri, 1, EASY_CONNECT_NETWORK_ROLE_STA, mDppCallback);
-        verify(mDppCallback).onFailure(eq(EASY_CONNECT_EVENT_FAILURE_INVALID_NETWORK), eq(null),
-                eq(null), eq(new int[0]));
-        assertFalse(mDppManager.isSessionInProgress());
-    }
-
     @Test
     public void testStartDppAsConfiguratorInitiatorFailAddPeer() throws Exception {
         // Generate a mock WifiConfiguration object
@@ -301,7 +277,7 @@
         assertFalse(mDppManager.isSessionInProgress());
         // Fail to start
         when(mWifiNative.startDppConfiguratorInitiator(anyString(), anyInt(), anyInt(), anyString(),
-                any(), any(), anyInt(), anyInt(), any())).thenReturn(false);
+                any(), any(), anyInt(), anyInt())).thenReturn(false);
 
         mDppManager.startDppAsConfiguratorInitiator(0, TEST_PACKAGE_NAME, TEST_INTERFACE_NAME,
                 mBinder, mUri, 1, EASY_CONNECT_NETWORK_ROLE_STA, mDppCallback);
@@ -357,7 +333,7 @@
         verify(mDppCallback, never()).onSuccessConfigReceived(anyInt());
         verify(mWifiNative).startDppConfiguratorInitiator(eq(TEST_INTERFACE_NAME),
                 eq(TEST_PEER_ID), anyInt(), eq(TEST_SSID_ENCODED), eq(TEST_PASSWORD_ENCODED), any(),
-                eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(PSK), eq(null));
+                eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(PSK));
         verify(mDppMetrics).updateDppConfiguratorInitiatorRequests();
         verifyNoMoreInteractions(mDppMetrics);
         assertTrue(mDppManager.isSessionInProgress());
@@ -383,7 +359,7 @@
         verify(mDppCallback, never()).onSuccessConfigReceived(anyInt());
         verify(mWifiNative).startDppConfiguratorInitiator(eq(TEST_INTERFACE_NAME),
                 eq(TEST_PEER_ID), anyInt(), eq(TEST_SSID_ENCODED), eq(TEST_PASSWORD_ENCODED), any(),
-                eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(SAE), eq(null));
+                eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(SAE));
         verify(mDppMetrics).updateDppConfiguratorInitiatorRequests();
         verifyNoMoreInteractions(mDppMetrics);
         assertTrue(mDppManager.isSessionInProgress());
@@ -475,7 +451,7 @@
         verify(mDppCallback, never()).onSuccessConfigReceived(anyInt());
         verify(mWifiNative).startDppConfiguratorInitiator(eq(TEST_INTERFACE_NAME),
                 eq(TEST_PEER_ID), anyInt(), eq(TEST_SSID_ENCODED), eq(TEST_PASSWORD_ENCODED), any(),
-                eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(SAE), eq(null));
+                eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(SAE));
         assertTrue(mDppManager.isSessionInProgress());
 
         mDppManager.startDppAsConfiguratorInitiator(1, TEST_PACKAGE_NAME, TEST_INTERFACE_NAME,
@@ -541,7 +517,7 @@
         verify(mWifiNative).startDppConfiguratorInitiator(eq(TEST_INTERFACE_NAME),
                 eq(TEST_PEER_ID), anyInt(), eq(TEST_SSID_ENCODED), eq(TEST_PASSWORD_ENCODED), any(),
                 eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(
-                        SAE), eq(null));
+                        SAE));
         assertTrue(mDppManager.isSessionInProgress());
 
         WifiNative.DppEventCallback dppEventCallback = dppEventCallbackCaptor.getValue();
@@ -641,7 +617,7 @@
         verify(mWifiNative).startDppConfiguratorInitiator(eq(TEST_INTERFACE_NAME),
                 eq(TEST_PEER_ID), anyInt(), eq(TEST_SSID_ENCODED), eq(TEST_PASSWORD_ENCODED), any(),
                 eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(
-                        SAE), eq(null));
+                        SAE));
         assertTrue(mDppManager.isSessionInProgress());
 
         WifiNative.DppEventCallback dppEventCallback = dppEventCallbackCaptor.getValue();
@@ -845,7 +821,7 @@
      */
     private void addTestNetworkInScanResult(int frequency) {
         String caps = "[WPA2-FT/SAE+SAE][ESS][WPS]";
-        ScanResult scanResult = new ScanResult(WifiSsid.fromUtf8Text(TEST_SSID_NO_QUOTE),
+        ScanResult scanResult = new ScanResult(WifiSsid.createFromAsciiEncoded(TEST_SSID_NO_QUOTE),
                 TEST_SSID_NO_QUOTE, TEST_BSSID, 1245, 0, caps, -78, frequency,
                 1025, 22, 33, 20, 0, 0, true);
         List<ScanResult> scanResults = new ArrayList<>();
@@ -961,7 +937,7 @@
         verify(mWifiNative).startDppConfiguratorInitiator(eq(TEST_INTERFACE_NAME),
                 eq(TEST_PEER_ID), anyInt(), eq(TEST_SSID_ENCODED), eq(TEST_PASSWORD_ENCODED), any(),
                 eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(
-                        SAE), eq(null));
+                        SAE));
         assertTrue(mDppManager.isSessionInProgress());
 
         WifiNative.DppEventCallback dppEventCallback = dppEventCallbackCaptor.getValue();
@@ -1019,7 +995,7 @@
         verify(mDppCallback, never()).onSuccessConfigReceived(anyInt());
         verify(mWifiNative).startDppConfiguratorInitiator(eq(TEST_INTERFACE_NAME),
                 eq(TEST_PEER_ID), anyInt(), eq(TEST_SSID_ENCODED), eq(TEST_PASSWORD_ENCODED), any(),
-                eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(SAE), eq(null));
+                eq(EASY_CONNECT_NETWORK_ROLE_STA), eq(SAE));
         assertTrue(mDppManager.isSessionInProgress());
 
         WifiNative.DppEventCallback dppEventCallback = dppEventCallbackCaptor.getValue();
diff --git a/service/tests/wifitests/src/com/android/server/wifi/EapFailureNotifierTest.java b/service/tests/wifitests/src/com/android/server/wifi/EapFailureNotifierTest.java
index 2b2c8b1..62ed458 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/EapFailureNotifierTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/EapFailureNotifierTest.java
@@ -16,28 +16,19 @@
 
 package com.android.server.wifi;
 
-import static com.android.server.wifi.EapFailureNotifier.ERROR_MESSAGE_OVERLAY_PREFIX;
-import static com.android.server.wifi.EapFailureNotifier.ERROR_MESSAGE_OVERLAY_UNKNOWN_ERROR_CODE;
+import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession;
 
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.validateMockitoUsage;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.*;
 
 import android.app.Notification;
 import android.app.PendingIntent;
 import android.content.Intent;
 import android.content.res.Resources;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
-import android.net.wifi.WifiStringResourceWrapper;
 import android.provider.Settings;
 import android.service.notification.StatusBarNotification;
+import android.telephony.SubscriptionManager;
 
 import androidx.test.filters.SmallTest;
 
@@ -48,6 +39,7 @@
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoSession;
 
 /**
  * Unit tests for {@link com.android.server.wifi.EapFailureNotifier}.
@@ -59,7 +51,6 @@
 
     @Mock WifiContext mContext;
     @Mock Resources mResources;
-    @Mock WifiStringResourceWrapper mResourceWrapper;
     @Mock WifiNotificationManager mWifiNotificationManager;
     @Mock FrameworkFacade mFrameworkFacade;
     @Mock Notification mNotification;
@@ -68,13 +59,13 @@
     @Mock WifiConfiguration mWifiConfiguration;
 
     @Mock(answer = Answers.RETURNS_DEEP_STUBS) private Notification.Builder mNotificationBuilder;
-    private static final int KNOWN_ERROR_CODE = 32764;
-    private static final int UNKNOWN_ERROR_CODE = 12345;
+    private static final int DEFINED_ERROR_CODE = 32764;
+    private static final int UNDEFINED_ERROR_CODE = 12345;
     private static final String SSID_1 = "Carrier_AP_1";
     private static final String SSID_2 = "Carrier_AP_2";
-    private static final String ERROR_MESSAGE = "Error Message";
-    private static final String ERROR_MESSAGE_UNKNOWN_ERROR_CODE =
-            "Error Message Unknown Error Code";
+    private static final String DEFINED_ERROR_RESOURCE_NAME = "wifi_eap_error_message_code_32764";
+    private static final String UNDEFINED_ERROR_RESOURCE_NAME = "wifi_eap_error_message_code_12345";
+    private MockitoSession mStaticMockSession = null;
 
     EapFailureNotifier mEapFailureNotifier;
 
@@ -84,15 +75,20 @@
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
+        // static mocking
+        mStaticMockSession = mockitoSession()
+            .mockStatic(SubscriptionManager.class)
+            .startMocking();
         when(mWifiCarrierInfoManager.getBestMatchSubscriptionId(mWifiConfiguration)).thenReturn(0);
+        lenient().when(SubscriptionManager.getResourcesForSubId(eq(mContext), anyInt()))
+                .thenReturn(mResources);
         when(mContext.getResources()).thenReturn(mResources);
-        when(mContext.getStringResourceWrapper(anyInt(), anyInt())).thenReturn(mResourceWrapper);
-        when(mResourceWrapper.getString(eq(ERROR_MESSAGE_OVERLAY_PREFIX + UNKNOWN_ERROR_CODE),
-                anyString())).thenReturn(null);
-        when(mResourceWrapper.getString(eq(ERROR_MESSAGE_OVERLAY_PREFIX + KNOWN_ERROR_CODE),
-                anyString())).thenReturn(ERROR_MESSAGE);
-        when(mResourceWrapper.getString(eq(ERROR_MESSAGE_OVERLAY_UNKNOWN_ERROR_CODE),
-                anyString())).thenReturn(ERROR_MESSAGE_UNKNOWN_ERROR_CODE);
+        when(mResources.getIdentifier(eq(DEFINED_ERROR_RESOURCE_NAME), anyString(),
+                anyString())).thenReturn(1);
+        when(mResources.getIdentifier(eq(UNDEFINED_ERROR_RESOURCE_NAME), anyString(),
+                anyString())).thenReturn(0);
+        when(mResources.getString(eq(0), anyString())).thenReturn(null);
+        when(mResources.getString(eq(1), anyString())).thenReturn("Error Message");
         when(mContext.createPackageContext(anyString(), eq(0))).thenReturn(mContext);
         when(mContext.getWifiOverlayApkPkgName()).thenReturn("test.com.android.wifi.resources");
         when(mFrameworkFacade.getSettingsPackageName(any())).thenReturn(TEST_SETTINGS_PACKAGE);
@@ -104,6 +100,9 @@
     @After
     public void cleanUp() throws Exception {
         validateMockitoUsage();
+        if (mStaticMockSession != null) {
+            mStaticMockSession.finishMocking();
+        }
     }
 
     /**
@@ -121,7 +120,7 @@
                 mNotification, android.os.Process.myUserHandle(), 0);
         when(mWifiNotificationManager.getActiveNotifications()).thenReturn(activeNotifications);
         mWifiConfiguration.SSID = SSID_2;
-        mEapFailureNotifier.onEapFailure(KNOWN_ERROR_CODE, mWifiConfiguration, true);
+        mEapFailureNotifier.onEapFailure(DEFINED_ERROR_CODE, mWifiConfiguration, true);
         verify(mWifiNotificationManager).notify(eq(EapFailureNotifier.NOTIFICATION_ID), any());
         ArgumentCaptor<Intent> intent = ArgumentCaptor.forClass(Intent.class);
         verify(mFrameworkFacade).getActivity(
@@ -146,7 +145,7 @@
                 mNotification, android.os.Process.myUserHandle(), 0);
         when(mWifiNotificationManager.getActiveNotifications()).thenReturn(activeNotifications);
         mWifiConfiguration.SSID = SSID_2;
-        mEapFailureNotifier.onEapFailure(KNOWN_ERROR_CODE, mWifiConfiguration, false);
+        mEapFailureNotifier.onEapFailure(DEFINED_ERROR_CODE, mWifiConfiguration, false);
         verify(mWifiNotificationManager, never()).notify(anyInt(), any());
     }
 
@@ -158,7 +157,7 @@
      * @throws Exception
      */
     @Test
-    public void onEapFailureWithDefinedErrorCodeWithNotificationShownWithoutSameSsid()
+    public void onEapFailureWithDefinedErroCodeWithNotificationShownWithoutSameSsid()
             throws Exception {
         when(mFrameworkFacade.makeNotificationBuilder(any(),
                 eq(WifiService.NOTIFICATION_NETWORK_ALERTS))).thenReturn(mNotificationBuilder);
@@ -168,7 +167,7 @@
         when(mWifiNotificationManager.getActiveNotifications()).thenReturn(activeNotifications);
         mEapFailureNotifier.setCurrentShownSsid(SSID_1);
         mWifiConfiguration.SSID = SSID_2;
-        mEapFailureNotifier.onEapFailure(KNOWN_ERROR_CODE, mWifiConfiguration, true);
+        mEapFailureNotifier.onEapFailure(DEFINED_ERROR_CODE, mWifiConfiguration, true);
         verify(mWifiNotificationManager).notify(eq(EapFailureNotifier.NOTIFICATION_ID), any());
         ArgumentCaptor<Intent> intent = ArgumentCaptor.forClass(Intent.class);
         verify(mFrameworkFacade).getActivity(
@@ -186,7 +185,7 @@
      * @throws Exception
      */
     @Test
-    public void onEapFailureWithDefinedErrorCodeWithNotificationShownWithSameSsid()
+    public void onEapFailureWithDefinedErroCodeWithNotificationShownWithSameSsid()
             throws Exception {
         when(mFrameworkFacade.makeNotificationBuilder(any(),
                 eq(WifiService.NOTIFICATION_NETWORK_ALERTS))).thenReturn(mNotificationBuilder);
@@ -196,44 +195,18 @@
         when(mWifiNotificationManager.getActiveNotifications()).thenReturn(activeNotifications);
         mEapFailureNotifier.setCurrentShownSsid(SSID_1);
         mWifiConfiguration.SSID = SSID_1;
-        mEapFailureNotifier.onEapFailure(KNOWN_ERROR_CODE, mWifiConfiguration, true);
+        mEapFailureNotifier.onEapFailure(DEFINED_ERROR_CODE, mWifiConfiguration, true);
         verify(mFrameworkFacade, never()).makeNotificationBuilder(any(),
                 eq(WifiService.NOTIFICATION_NETWORK_ALERTS));
     }
 
     /**
      * Verify that a eap failure notification will Not be generated with the following conditions :
-     * No eap failure notification of eap failure is displayed now.
-     * Error code is defined by carrier
-     * Message resource is empty
+     * Error code is NOT defined by carrier
      * @throws Exception
      */
     @Test
-    public void onEapFailureWithDefinedErrorCodeWithoutMessage()
-            throws Exception {
-        when(mFrameworkFacade.makeNotificationBuilder(any(),
-                eq(WifiService.NOTIFICATION_NETWORK_ALERTS))).thenReturn(mNotificationBuilder);
-        StatusBarNotification[] activeNotifications = new StatusBarNotification[1];
-        activeNotifications[0] = new StatusBarNotification("android", "", 56, "", 0, 0, 0,
-                mNotification, android.os.Process.myUserHandle(), 0);
-        when(mWifiNotificationManager.getActiveNotifications()).thenReturn(activeNotifications);
-        when(mResourceWrapper.getString(eq(ERROR_MESSAGE_OVERLAY_PREFIX + KNOWN_ERROR_CODE),
-                anyString())).thenReturn("");
-        mEapFailureNotifier.setCurrentShownSsid(SSID_1);
-        mWifiConfiguration.SSID = SSID_1;
-        mEapFailureNotifier.onEapFailure(KNOWN_ERROR_CODE, mWifiConfiguration, true);
-        verify(mFrameworkFacade, never()).makeNotificationBuilder(any(),
-                eq(WifiService.NOTIFICATION_NETWORK_ALERTS));
-    }
-
-    /**
-     * Verify that a eap failure notification will be generated with the following conditions :
-     * No eap failure notification of eap failure is displayed now.
-     * Error code is unknown
-     * @throws Exception
-     */
-    @Test
-    public void onEapFailureWithUnknownErrorCode() throws Exception {
+    public void onEapFailureWithUnDefinedErrorCode() throws Exception {
         when(mFrameworkFacade.makeNotificationBuilder(any(),
                 eq(WifiService.NOTIFICATION_NETWORK_ALERTS))).thenReturn(mNotificationBuilder);
         StatusBarNotification[] activeNotifications = new StatusBarNotification[1];
@@ -241,32 +214,7 @@
                 mNotification, android.os.Process.myUserHandle(), 0);
         when(mWifiNotificationManager.getActiveNotifications()).thenReturn(activeNotifications);
         mWifiConfiguration.SSID = SSID_1;
-        mEapFailureNotifier.onEapFailure(UNKNOWN_ERROR_CODE, mWifiConfiguration, true);
-        verify(mWifiNotificationManager).notify(eq(EapFailureNotifier.NOTIFICATION_ID), any());
-        ArgumentCaptor<Intent> intent = ArgumentCaptor.forClass(Intent.class);
-        verify(mFrameworkFacade).getActivity(
-                eq(mContext), eq(0), intent.capture(),
-                eq(PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE));
-        assertEquals(TEST_SETTINGS_PACKAGE, intent.getValue().getPackage());
-        assertEquals(Settings.ACTION_WIFI_SETTINGS, intent.getValue().getAction());
-    }
-
-    /**
-     * Verify that no eap failure notification will be generated with the following conditions :
-     * No eap failure notification of eap failure is displayed now.
-     * Error code is negative
-     * @throws Exception
-     */
-    @Test
-    public void onEapFailureWithNegativeErrorCode() throws Exception {
-        when(mFrameworkFacade.makeNotificationBuilder(any(),
-                eq(WifiService.NOTIFICATION_NETWORK_ALERTS))).thenReturn(mNotificationBuilder);
-        StatusBarNotification[] activeNotifications = new StatusBarNotification[1];
-        activeNotifications[0] = new StatusBarNotification("android", "", 56, "", 0, 0, 0,
-                mNotification, android.os.Process.myUserHandle(), 0);
-        when(mWifiNotificationManager.getActiveNotifications()).thenReturn(activeNotifications);
-        mWifiConfiguration.SSID = SSID_1;
-        mEapFailureNotifier.onEapFailure(-1, mWifiConfiguration, true);
+        mEapFailureNotifier.onEapFailure(UNDEFINED_ERROR_CODE, mWifiConfiguration, true);
         verify(mFrameworkFacade, never()).makeNotificationBuilder(any(),
                 eq(WifiService.NOTIFICATION_NETWORK_ALERTS));
     }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ExternalPnoScanRequestManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/ExternalPnoScanRequestManagerTest.java
deleted file mode 100644
index 8574809..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/ExternalPnoScanRequestManagerTest.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import static android.net.wifi.WifiManager.PnoScanResultsCallback.REGISTER_PNO_CALLBACK_RESOURCE_BUSY;
-import static android.net.wifi.WifiManager.PnoScanResultsCallback.REMOVE_PNO_CALLBACK_RESULTS_DELIVERED;
-import static android.net.wifi.WifiManager.PnoScanResultsCallback.REMOVE_PNO_CALLBACK_UNREGISTERED;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-
-import android.content.Context;
-import android.content.Intent;
-import android.net.wifi.IPnoScanResultsCallback;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiSsid;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.test.TestLooper;
-import android.util.ArraySet;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InOrder;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-/**
- * Unit tests for {@link com.android.server.wifi.ExternalPnoScanRequestManager}.
- */
-@SmallTest
-public class ExternalPnoScanRequestManagerTest extends WifiBaseTest {
-    private static final int TEST_UID = 1001;
-    private static final String TEST_PACKAGE = "TestPackage";
-    private static final String TEST_SSID_1 = "\"TEST_SSID_1\"";
-    private static final String TEST_SSID_2 = "\"TEST_SSID_2\"";
-    private static final List<WifiSsid> TEST_WIFI_SSIDS = Arrays.asList(
-            WifiSsid.fromString(TEST_SSID_1),
-            WifiSsid.fromString(TEST_SSID_2));
-    private static final Set<String> EXPECTED_SSIDS_SET = new ArraySet<>(
-            Arrays.asList(TEST_SSID_1, TEST_SSID_2)
-    );
-    private static final int[] TEST_FREQUENCIES = new int[] {2420, 5160};
-    private static final int[] TEST_FREQUENCIES_2 = new int[] {2420, 5180};
-    private static final Set<Integer> EXPECTED_FREQUENCIES_SET =
-            new ArraySet<>(Arrays.asList(2420, 5160));
-
-    private TestLooper mLooper;
-    private ExternalPnoScanRequestManager mExternalPnoScanRequestManager;
-    @Mock private IPnoScanResultsCallback mCallback;
-    @Mock private IBinder mIBinder;
-    @Mock private Context mContext;
-
-    /**
-     * Called before each test
-     */
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mLooper = new TestLooper();
-        mExternalPnoScanRequestManager = new ExternalPnoScanRequestManager(
-                new Handler(mLooper.getLooper()), mContext);
-    }
-
-    @Test
-    public void testSetRequest_success() throws RemoteException {
-        InOrder inOrder = inOrder(mCallback, mIBinder);
-
-        // initial register should be successful
-        assertTrue(mExternalPnoScanRequestManager.setRequest(TEST_UID, TEST_PACKAGE, mIBinder,
-                mCallback, TEST_WIFI_SSIDS, TEST_FREQUENCIES));
-        inOrder.verify(mIBinder).linkToDeath(mExternalPnoScanRequestManager, 0);
-        inOrder.verify(mCallback).onRegisterSuccess();
-
-        // Another register with same uid should override the existing one.
-        assertTrue(mExternalPnoScanRequestManager.setRequest(TEST_UID, TEST_PACKAGE, mIBinder,
-                mCallback, TEST_WIFI_SSIDS, TEST_FREQUENCIES_2));
-        inOrder.verify(mCallback).onRegisterSuccess();
-
-        // Another register with different uid should fail with REGISTER_PNO_CALLBACK_RESOURCE_BUSY
-        assertFalse(mExternalPnoScanRequestManager.setRequest(TEST_UID + 1, TEST_PACKAGE,
-                mIBinder, mCallback, TEST_WIFI_SSIDS, TEST_FREQUENCIES));
-        inOrder.verify(mCallback).onRegisterFailed(REGISTER_PNO_CALLBACK_RESOURCE_BUSY);
-
-
-        assertEquals(EXPECTED_SSIDS_SET, mExternalPnoScanRequestManager.getExternalPnoScanSsids());
-        Set<Integer> expectedFrequencies2 = Arrays.stream(TEST_FREQUENCIES_2).boxed().collect(
-                Collectors.toSet());
-        assertEquals(expectedFrequencies2,
-                mExternalPnoScanRequestManager.getExternalPnoScanFrequencies());
-    }
-
-    @Test
-    public void testSetRequest_linkToDeathFailed() throws RemoteException {
-        IPnoScanResultsCallback anotherCallback = mock(IPnoScanResultsCallback.class);
-        InOrder inOrder = inOrder(mCallback, anotherCallback, mIBinder);
-
-        // Expect fail to set request due to link to death fail.
-        doThrow(new RemoteException()).when(mIBinder).linkToDeath(
-                mExternalPnoScanRequestManager, 0);
-        assertFalse(mExternalPnoScanRequestManager.setRequest(TEST_UID, TEST_PACKAGE, mIBinder,
-                mCallback, TEST_WIFI_SSIDS, TEST_FREQUENCIES));
-        inOrder.verify(mIBinder).linkToDeath(mExternalPnoScanRequestManager, 0);
-        assertEquals(Collections.EMPTY_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanSsids());
-        assertEquals(Collections.EMPTY_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanFrequencies());
-    }
-
-    @Test
-    public void testRemoveRequest_explicit() throws RemoteException {
-        InOrder inOrder = inOrder(mCallback, mIBinder);
-        // Removing when no requests registered should be no-op
-        assertFalse(mExternalPnoScanRequestManager.removeRequest(TEST_UID));
-
-        // register a request
-        assertTrue(mExternalPnoScanRequestManager.setRequest(TEST_UID, TEST_PACKAGE, mIBinder,
-                mCallback, TEST_WIFI_SSIDS, TEST_FREQUENCIES));
-        inOrder.verify(mIBinder).linkToDeath(mExternalPnoScanRequestManager, 0);
-        inOrder.verify(mCallback).onRegisterSuccess();
-
-        // Removing with a different uid should fail.
-        assertFalse(mExternalPnoScanRequestManager.removeRequest(TEST_UID + 1));
-
-        // Removing with the same uid should work.
-        assertTrue(mExternalPnoScanRequestManager.removeRequest(TEST_UID));
-        inOrder.verify(mCallback).onRemoved(REMOVE_PNO_CALLBACK_UNREGISTERED);
-        inOrder.verify(mIBinder).unlinkToDeath(mExternalPnoScanRequestManager, 0);
-        assertEquals(Collections.EMPTY_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanSsids());
-        assertEquals(Collections.EMPTY_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanFrequencies());
-    }
-
-    @Test
-    public void testRemoveRequest_afterDelivery() throws RemoteException {
-        ArgumentCaptor<Intent> intentArgumentCaptor = ArgumentCaptor.forClass(Intent.class);
-        InOrder inOrder = inOrder(mCallback, mIBinder, mContext);
-
-        // register a request
-        assertTrue(mExternalPnoScanRequestManager.setRequest(TEST_UID, TEST_PACKAGE, mIBinder,
-                mCallback, TEST_WIFI_SSIDS, TEST_FREQUENCIES));
-        inOrder.verify(mIBinder).linkToDeath(mExternalPnoScanRequestManager, 0);
-        inOrder.verify(mCallback).onRegisterSuccess();
-        assertEquals(EXPECTED_SSIDS_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanSsids());
-        assertEquals(EXPECTED_FREQUENCIES_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanFrequencies());
-
-        // Mock 3 scan results.
-        // scanResults[0] is not requested.
-        // scanResults[1] is being requested.
-        // scanResults[2] is being requested.
-        ScanResult scanResult1 = new ScanResult();
-        scanResult1.setWifiSsid(WifiSsid.fromString("\"RANDOM_SSID_123\""));
-        ScanResult scanResult2 = new ScanResult();
-        scanResult2.setWifiSsid(WifiSsid.fromString(TEST_SSID_1));
-        ScanResult scanResult3 = new ScanResult();
-        scanResult3.setWifiSsid(WifiSsid.fromString(TEST_SSID_2));
-        ScanResult[] scanResults = new ScanResult[] {scanResult1, scanResult2, scanResult3};
-
-        List<ScanResult> expectedResults = new ArrayList<>();
-        expectedResults.add(scanResult2);
-        expectedResults.add(scanResult3);
-        mExternalPnoScanRequestManager.onPnoNetworkFound(scanResults);
-        inOrder.verify(mContext).sendBroadcastAsUser(intentArgumentCaptor.capture(), any());
-        assertEquals(TEST_PACKAGE, intentArgumentCaptor.getValue().getPackage());
-        inOrder.verify(mCallback).onScanResultsAvailable(expectedResults);
-        inOrder.verify(mCallback).onRemoved(REMOVE_PNO_CALLBACK_RESULTS_DELIVERED);
-        inOrder.verify(mIBinder).unlinkToDeath(mExternalPnoScanRequestManager, 0);
-        assertEquals(Collections.EMPTY_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanSsids());
-        assertEquals(Collections.EMPTY_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanFrequencies());
-    }
-
-    @Test
-    public void testRemoveRequest_noDeliveryIfNoMatch() throws RemoteException {
-        InOrder inOrder = inOrder(mCallback, mIBinder, mContext);
-
-        // register a request
-        assertTrue(mExternalPnoScanRequestManager.setRequest(TEST_UID, TEST_PACKAGE, mIBinder,
-                mCallback, TEST_WIFI_SSIDS, TEST_FREQUENCIES));
-        inOrder.verify(mIBinder).linkToDeath(mExternalPnoScanRequestManager, 0);
-        inOrder.verify(mCallback).onRegisterSuccess();
-        assertEquals(EXPECTED_SSIDS_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanSsids());
-        assertEquals(EXPECTED_FREQUENCIES_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanFrequencies());
-
-        // Mock a scan result that's not being requested
-        ScanResult scanResult1 = new ScanResult();
-        scanResult1.setWifiSsid(WifiSsid.fromString("\"RANDOM_SSID_123\""));
-        ScanResult[] scanResults = new ScanResult[] {scanResult1};
-
-        // Results should not be delivered, and the request should still be registered.
-        mExternalPnoScanRequestManager.onPnoNetworkFound(scanResults);
-        inOrder.verify(mContext, never()).sendBroadcastAsUser(any(), any());
-        inOrder.verify(mCallback, never()).onScanResultsAvailable(any());
-        inOrder.verify(mCallback, never()).onRemoved(anyInt());
-        inOrder.verify(mIBinder, never()).unlinkToDeath(mExternalPnoScanRequestManager, 0);
-        assertEquals(EXPECTED_SSIDS_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanSsids());
-        assertEquals(EXPECTED_FREQUENCIES_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanFrequencies());
-    }
-
-    @Test
-    public void testKeepRequest_afterBinderDeath() throws RemoteException {
-        InOrder inOrder = inOrder(mCallback, mIBinder);
-
-        // register a request
-        assertTrue(mExternalPnoScanRequestManager.setRequest(TEST_UID, TEST_PACKAGE, mIBinder,
-                mCallback, TEST_WIFI_SSIDS, TEST_FREQUENCIES));
-        inOrder.verify(mIBinder).linkToDeath(mExternalPnoScanRequestManager, 0);
-        inOrder.verify(mCallback).onRegisterSuccess();
-        assertEquals(EXPECTED_SSIDS_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanSsids());
-        assertEquals(EXPECTED_FREQUENCIES_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanFrequencies());
-
-        mExternalPnoScanRequestManager.binderDied();
-        mLooper.dispatchAll();
-        assertEquals(EXPECTED_SSIDS_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanSsids());
-        assertEquals(EXPECTED_FREQUENCIES_SET,
-                mExternalPnoScanRequestManager.getExternalPnoScanFrequencies());
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java
index f87cd1f..f62fc2b 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java
@@ -16,8 +16,6 @@
 
 package com.android.server.wifi;
 
-import static com.android.server.wifi.HalDeviceManager.CHIP_CAPABILITY_ANY;
-import static com.android.server.wifi.HalDeviceManager.HAL_IFACE_MAP;
 import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP;
 import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP_BRIDGE;
 import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_NAN;
@@ -26,7 +24,6 @@
 import static com.android.server.wifi.HalDeviceManager.START_HAL_RETRY_TIMES;
 
 import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
 import static junit.framework.Assert.assertNull;
 
 import static org.hamcrest.Matchers.is;
@@ -52,7 +49,6 @@
 import static org.mockito.Mockito.when;
 
 import android.app.test.MockAnswerUtil;
-import android.content.res.Resources;
 import android.hardware.wifi.V1_0.IWifi;
 import android.hardware.wifi.V1_0.IWifiApIface;
 import android.hardware.wifi.V1_0.IWifiChip;
@@ -66,21 +62,14 @@
 import android.hardware.wifi.V1_0.IfaceType;
 import android.hardware.wifi.V1_0.WifiStatus;
 import android.hardware.wifi.V1_0.WifiStatusCode;
-import android.hardware.wifi.V1_5.WifiBand;
-import android.hardware.wifi.V1_6.IfaceConcurrencyType;
-import android.hardware.wifi.V1_6.WifiRadioCombination;
-import android.hardware.wifi.V1_6.WifiRadioCombinationMatrix;
-import android.hardware.wifi.V1_6.WifiRadioConfiguration;
 import android.hidl.manager.V1_0.IServiceNotification;
 import android.hidl.manager.V1_2.IServiceManager;
-import android.net.wifi.WifiContext;
 import android.os.Handler;
 import android.os.IHwBinder;
 import android.os.RemoteException;
 import android.os.WorkSource;
 import android.os.test.TestLooper;
 import android.util.Log;
-import android.util.Pair;
 import android.util.SparseArray;
 
 import androidx.test.filters.SmallTest;
@@ -88,12 +77,8 @@
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.HalDeviceManager.InterfaceDestroyedListener;
 import com.android.server.wifi.util.WorkSourceHelper;
-import com.android.wifi.resources.R;
-
-import com.google.common.collect.ImmutableList;
 
 import org.hamcrest.core.IsNull;
-import org.json.JSONArray;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
@@ -111,7 +96,6 @@
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -130,17 +114,12 @@
     @Mock android.hardware.wifi.V1_5.IWifi mWifiMockV15;
     @Mock IWifiRttController mRttControllerMock;
     @Mock HalDeviceManager.ManagerStatusListener mManagerStatusListenerMock;
-    @Mock private WifiContext mContext;
-    @Mock private Resources mResources;
     @Mock private Clock mClock;
     @Mock private WifiInjector mWifiInjector;
-    @Mock private SoftApManager mSoftApManager;
-    @Mock private WifiSettingsConfigStore mWifiSettingsConfigStore;
     @Mock private WorkSourceHelper mWorkSourceHelper0;
     @Mock private WorkSourceHelper mWorkSourceHelper1;
     @Mock private WorkSourceHelper mWorkSourceHelper2;
     private android.hardware.wifi.V1_5.IWifiChip mWifiChipV15 = null;
-    private android.hardware.wifi.V1_6.IWifiChip mWifiChipV16 = null;
     private TestLooper mTestLooper;
     private Handler mHandler;
     private ArgumentCaptor<IHwBinder.DeathRecipient> mDeathRecipientCaptor =
@@ -156,12 +135,10 @@
     @Rule public ErrorCollector collector = new ErrorCollector();
     private WifiStatus mStatusOk;
     private WifiStatus mStatusFail;
-    private boolean mIsBridgedSoftApSupported = false;
-    private boolean mIsStaWithBridgedSoftApConcurrencySupported = false;
 
     private class HalDeviceManagerSpy extends HalDeviceManager {
         HalDeviceManagerSpy() {
-            super(mContext, mClock, mWifiInjector, mHandler);
+            super(mClock, mWifiInjector, mHandler);
         }
 
         @Override
@@ -185,30 +162,6 @@
         protected android.hardware.wifi.V1_5.IWifiChip getWifiChipForV1_5Mockable(IWifiChip chip) {
             return mWifiChipV15;
         }
-
-        @Override
-        protected android.hardware.wifi.V1_6.IWifiChip getWifiChipForV1_6Mockable(IWifiChip chip) {
-            return mWifiChipV16;
-        }
-
-        @Override
-        protected android.hardware.wifi.V1_5.IWifiApIface getIWifiApIfaceForV1_5Mockable(
-                IWifiApIface iface) {
-            if (iface instanceof android.hardware.wifi.V1_5.IWifiApIface) {
-                return (android.hardware.wifi.V1_5.IWifiApIface) iface;
-            }
-            return null;
-        }
-
-        @Override
-        protected boolean isBridgedSoftApSupportedMockable() {
-            return mIsBridgedSoftApSupported;
-        }
-
-        @Override
-        protected boolean isStaWithBridgedSoftApConcurrencySupportedMockable() {
-            return mIsStaWithBridgedSoftApConcurrencySupported;
-        }
     }
 
     @Before
@@ -230,10 +183,6 @@
         when(mWorkSourceHelper0.hasAnyPrivilegedAppRequest()).thenReturn(true);
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(true);
         when(mWorkSourceHelper2.hasAnyPrivilegedAppRequest()).thenReturn(true);
-        when(mWorkSourceHelper0.getWorkSource()).thenReturn(TEST_WORKSOURCE_0);
-        when(mWorkSourceHelper1.getWorkSource()).thenReturn(TEST_WORKSOURCE_1);
-        when(mWorkSourceHelper2.getWorkSource()).thenReturn(TEST_WORKSOURCE_2);
-        when(mWifiInjector.getSettingsConfigStore()).thenReturn(mWifiSettingsConfigStore);
 
         when(mServiceManagerMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
                 anyLong())).thenReturn(true);
@@ -248,11 +197,6 @@
         when(mWifiMock.stop()).thenReturn(mStatusOk);
         when(mWifiMock.isStarted()).thenReturn(true);
         when(mWifiMockV15.isStarted()).thenReturn(true);
-        when(mContext.getResources()).thenReturn(mResources);
-        when(mResources.getBoolean(R.bool.config_wifiBridgedSoftApSupported))
-                .thenReturn(mIsBridgedSoftApSupported);
-        when(mResources.getBoolean(R.bool.config_wifiStaWithBridgedSoftApConcurrencySupported))
-                .thenReturn(mIsStaWithBridgedSoftApConcurrencySupported);
 
         mDut = new HalDeviceManagerSpy();
     }
@@ -280,9 +224,6 @@
      */
     @Test
     public void testStartStopFlow() throws Exception {
-        TestChipV5 chipMock = new TestChipV5();
-        setupWifiChipV15(chipMock);
-        chipMock.initialize();
         mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15,
                 mManagerStatusListenerMock);
         executeAndValidateInitializationSequence();
@@ -322,9 +263,6 @@
      */
     @Test
     public void testMultipleCallbackRegistrations() throws Exception {
-        TestChipV5 chipMock = new TestChipV5();
-        setupWifiChipV15(chipMock);
-        chipMock.initialize();
         mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15,
                 mManagerStatusListenerMock);
         executeAndValidateInitializationSequence();
@@ -353,9 +291,6 @@
      */
     @Test
     public void testWifiDeathAndRegistration() throws Exception {
-        TestChipV5 chipMock = new TestChipV5();
-        setupWifiChipV15(chipMock);
-        chipMock.initialize();
         mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, mWifiMockV15,
                 mManagerStatusListenerMock);
         executeAndValidateInitializationSequence();
@@ -401,9 +336,6 @@
      */
     @Test
     public void testWifiFail() throws Exception {
-        TestChipV5 chipMock = new TestChipV5();
-        setupWifiChipV15(chipMock);
-        chipMock.initialize();
         mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, mWifiMockV15,
                 mManagerStatusListenerMock);
         executeAndValidateInitializationSequence();
@@ -431,7 +363,7 @@
 
         // verify: service and callback calls
         mInOrder.verify(mWifiMock).start();
-        mInOrder.verify(mManagerStatusListenerMock, times(2)).onStatusChanged();
+        mInOrder.verify(mManagerStatusListenerMock).onStatusChanged();
 
         verifyNoMoreInteractions(mManagerStatusListenerMock);
     }
@@ -658,11 +590,6 @@
         HalDeviceManager.InterfaceRttControllerLifecycleCallback cb2 = mock(
                 HalDeviceManager.InterfaceRttControllerLifecycleCallback.class);
 
-        InterfaceDestroyedListener staDestroyedListener = mock(
-                InterfaceDestroyedListener.class);
-        InterfaceDestroyedListener apDestroyedListener = mock(
-                InterfaceDestroyedListener.class);
-
         InOrder io1 = inOrder(cb1);
         InOrder io2 = inOrder(cb2);
 
@@ -674,14 +601,14 @@
                 mManagerStatusListenerMock);
         executeAndValidateInitializationSequence();
         executeAndValidateStartupSequence();
-        IWifiIface staIface = validateInterfaceSequence(chipMock,
+        validateInterfaceSequence(chipMock,
                 false, // chipModeValid
                 -1000, // chipModeId (only used if chipModeValid is true)
                 HDM_CREATE_IFACE_STA,
                 "wlan0",
                 TestChipV1.STA_CHIP_MODE_ID,
                 null, // tearDownList
-                staDestroyedListener, // destroyedListener
+                null, // destroyedListener
                 TEST_WORKSOURCE_0 // requestorWs
         );
         mInOrder.verify(chipMock.chip, times(0)).createRttController(any(), any());
@@ -700,16 +627,15 @@
 
         // change to AP mode (which for TestChipV1 doesn't allow RTT): trigger onDestroyed for all
         doAnswer(new GetBoundIfaceAnswer(false)).when(mRttControllerMock).getBoundIface(any());
-        IWifiIface apIface = validateInterfaceSequence(chipMock,
+        validateInterfaceSequence(chipMock,
                 true, // chipModeValid
                 TestChipV1.STA_CHIP_MODE_ID, // chipModeId (only used if chipModeValid is true)
                 HDM_CREATE_IFACE_AP,
                 "wlan0",
                 TestChipV1.AP_CHIP_MODE_ID,
-                new IWifiIface[]{staIface}, // tearDownList
-                apDestroyedListener, // destroyedListener
-                TEST_WORKSOURCE_0, // requestorWs
-                new InterfaceDestroyedListenerWithIfaceName(getName(staIface), staDestroyedListener)
+                null, // tearDownList
+                null, // destroyedListener
+                TEST_WORKSOURCE_0 // requestorWs
         );
         mTestLooper.dispatchAll();
         verify(chipMock.chip, times(2)).createRttController(any(), any()); // but returns a null!
@@ -723,10 +649,9 @@
                 HDM_CREATE_IFACE_STA,
                 "wlan0",
                 TestChipV1.STA_CHIP_MODE_ID,
-                new IWifiIface[]{apIface}, // tearDownList
+                null, // tearDownList
                 null, // destroyedListener
-                TEST_WORKSOURCE_0, // requestorWs
-                new InterfaceDestroyedListenerWithIfaceName(getName(apIface), apDestroyedListener)
+                TEST_WORKSOURCE_0 // requestorWs
         );
         mTestLooper.dispatchAll();
         verify(chipMock.chip, times(3)).createRttController(any(), any());
@@ -814,9 +739,6 @@
         executeAndValidateInitializationSequence();
         executeAndValidateStartupSequence();
 
-        InterfaceDestroyedListener staDestroyedListener = mock(
-                InterfaceDestroyedListener.class);
-
         // create STA interface from privileged app: should succeed.
         IWifiIface staIface = validateInterfaceSequence(chipMock,
                 false, // chipModeValid
@@ -825,7 +747,7 @@
                 "wlan0",
                 TestChipV1.STA_CHIP_MODE_ID,
                 null, // tearDownList
-                staDestroyedListener, // destroyedListener
+                null, // destroyedListener
                 TEST_WORKSOURCE_0 // requestorWs
         );
         collector.checkThat("STA created", staIface, IsNull.notNullValue());
@@ -833,18 +755,12 @@
         // get AP interface from a system app: should fail
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(true);
-        List<Pair<Integer, WorkSource>> apDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_AP, false, TEST_WORKSOURCE_1);
-        assertNull("Should not create this AP", apDetails);
-        apDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_AP, true, TEST_WORKSOURCE_1);
-        assertNull("Should not create this AP", apDetails);
-        IWifiApIface apIface = mDut.createApIface(
-                CHIP_CAPABILITY_ANY, null, null, TEST_WORKSOURCE_1, false, mSoftApManager);
+        IWifiApIface apIface = mDut.createApIface(null, null, TEST_WORKSOURCE_1, false);
         collector.checkThat("not allocated interface", apIface, IsNull.nullValue());
 
         // Now replace the requestorWs (fg app now) for the STA iface.
         when(mWorkSourceHelper2.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper2.hasAnyForegroundAppRequest(true)).thenReturn(true);
+        when(mWorkSourceHelper2.hasAnyForegroundAppRequest()).thenReturn(true);
         assertTrue(mDut.replaceRequestorWs(staIface, TEST_WORKSOURCE_2));
 
         // get AP interface again from a system app: should succeed now
@@ -856,10 +772,9 @@
                 HDM_CREATE_IFACE_AP,
                 "wlan0",
                 TestChipV1.AP_CHIP_MODE_ID,
-                new IWifiIface[]{staIface}, // tearDownList
+                null, // tearDownList
                 null, // destroyedListener
-                TEST_WORKSOURCE_1, // requestorWs
-                new InterfaceDestroyedListenerWithIfaceName(getName(staIface), staDestroyedListener)
+                TEST_WORKSOURCE_1 // requestorWs
         );
         collector.checkThat("not allocated interface", apIface, IsNull.notNullValue());
     }
@@ -1137,7 +1052,7 @@
      * Expect a change in chip mode.
      */
     @Test
-    public void testCreateApWithStaIfaceUpTestChipV1UsingHandlerListeners() throws Exception {
+    public void testCreateApWithStIfaceUpTestChipV1UsingHandlerListeners() throws Exception {
         // Make the creation and InterfaceDestroyListener running on the same thread to verify the
         // order in the real scenario.
         when(mWifiInjector.getCurrentThreadId())
@@ -1168,11 +1083,6 @@
                 any(IWifiIface.getTypeCallback.class));
         doAnswer(new CreateXxxIfaceAnswer(chipMock, mStatusOk, staIface)).when(
                 chipMock.chip).createStaIface(any(IWifiChip.createStaIfaceCallback.class));
-        List<Pair<Integer, WorkSource>> staDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_0);
-        assertTrue("Expecting nothing to destroy on creating STA", staDetails.isEmpty());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_0);
-        assertTrue("Expecting nothing to destroy on creating STA", staDetails.isEmpty());
         assertEquals(staIface, mDut.createStaIface(staIdl, mHandler, TEST_WORKSOURCE_0));
 
         mInOrder.verify(chipMock.chip).configureChip(TestChipV1.STA_CHIP_MODE_ID);
@@ -1186,17 +1096,7 @@
         doAnswer(new CreateXxxIfaceAnswer(chipMock, mStatusOk, apIface)).when(
                 chipMock.chip).createApIface(
                 any(IWifiChip.createApIfaceCallback.class));
-        List<Pair<Integer, WorkSource>> apDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_AP, false, TEST_WORKSOURCE_0);
-        assertEquals("Should get STA destroy details", 1, apDetails.size());
-        assertEquals("Need to destroy the STA", Pair.create(IfaceType.STA, TEST_WORKSOURCE_0),
-                apDetails.get(0));
-        apDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_AP, true, TEST_WORKSOURCE_0);
-        assertEquals("Should get STA destroy details", 1, apDetails.size());
-        assertEquals("Need to destroy the STA", Pair.create(IfaceType.STA, TEST_WORKSOURCE_0),
-                apDetails.get(0));
-        assertEquals(apIface, mDut.createApIface(
-                CHIP_CAPABILITY_ANY, apIdl, mHandler, TEST_WORKSOURCE_0, false, mSoftApManager));
+        assertEquals(apIface, mDut.createApIface(apIdl, mHandler, TEST_WORKSOURCE_0, false));
         mInOrder.verify(chipMock.chip).removeStaIface(getName(staIface));
         mInOrder.verify(staIdl).onDestroyed(getName(staIface));
         mInOrder.verify(chipMock.chip).configureChip(TestChipV1.AP_CHIP_MODE_ID);
@@ -1250,8 +1150,7 @@
         doAnswer(new CreateXxxIfaceAnswer(chipMock, mStatusOk, apIface)).when(
                 chipMock.chip).createApIface(
                 any(IWifiChip.createApIfaceCallback.class));
-        assertNull(mDut.createApIface(
-                CHIP_CAPABILITY_ANY, idl, null, TEST_WORKSOURCE_0, false, mSoftApManager));
+        assertNull(mDut.createApIface(idl, null, TEST_WORKSOURCE_0, false));
 
         // Create NAN Iface will be failure because null handler.
         IWifiNanIface nanIface = mock(IWifiNanIface.class);
@@ -1378,12 +1277,6 @@
         // get STA interface again (from a system app)
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(true);
-        List<Pair<Integer, WorkSource>> staDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_1);
-        assertNotNull("Should not have a problem if STA already exists", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_1);
-        assertNull("Should not be able to create a new STA", staDetails);
         IWifiIface staIface2 = mDut.createStaIface(
                 staDestroyedListener2, mHandler, TEST_WORKSOURCE_1);
         collector.checkThat("STA created", staIface2, IsNull.nullValue());
@@ -1443,21 +1336,21 @@
     }
 
     /**
-     * Validate {@link HalDeviceManager#canDeviceSupportCreateTypeCombo(SparseArray)}
+     * Validate {@link HalDeviceManager#canSupportIfaceCombo(SparseArray)}
      */
     @Test
-    public void testCanDeviceSupportCreateTypeComboChipV1() throws Exception {
+    public void testCanSupportIfaceComboTestChipV1() throws Exception {
+        final String name = "wlan0";
+
         TestChipV1 chipMock = new TestChipV1();
         chipMock.initialize();
         mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, chipMock.chip,
                 mManagerStatusListenerMock);
         executeAndValidateInitializationSequence();
-
-        // Try to query iface support before starting the HAL. Should return false without any
-        // stored static chip info.
+        // Try to query iface support before starting the HAL. Should return false.
         when(mWifiMock.isStarted()).thenReturn(false);
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
+        assertFalse(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
             }}
         ));
         verify(mWifiMock, never()).getChipIds(any());
@@ -1466,114 +1359,50 @@
 
         clearInvocations(mWifiMock);
 
-        // Verify that the latest static chip info is saved to store.
-        verify(mWifiSettingsConfigStore).put(eq(WifiSettingsConfigStore.WIFI_STATIC_CHIP_INFO),
-                eq(new JSONArray(TestChipV1.STATIC_CHIP_INFO_JSON_STRING).toString()));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
             }}
         ));
-        // AP should now be supported after we read directly from the chip.
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.AP, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.AP, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.P2P, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.P2P, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.NAN, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.NAN, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.P2P, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
+                put(IfaceType.P2P, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.NAN, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
+                put(IfaceType.NAN, 1);
             }}
         ));
 
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.AP, 1);
+        assertFalse(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
+                put(IfaceType.AP, 1);
             }}
         ));
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 2);
+        assertFalse(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 2);
             }}
         ));
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.P2P, 1);
-                put(IfaceConcurrencyType.NAN, 1);
+        assertFalse(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.P2P, 1);
+                put(IfaceType.NAN, 1);
             }}
         ));
 
-        verifyNoMoreInteractions(mManagerStatusListenerMock);
-    }
-
-    /**
-     * Validate {@link HalDeviceManager#canDeviceSupportCreateTypeCombo(SparseArray)} with stored
-     * static chip info.
-     */
-    @Test
-    public void testCanDeviceSupportCreateTypeComboChipV1WithStoredStaticChipInfo()
-            throws Exception {
-        TestChipV1 chipMock = new TestChipV1();
-        chipMock.initialize();
-        mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, chipMock.chip,
-                mManagerStatusListenerMock);
-        executeAndValidateInitializationSequence();
-
-        // Try to query iface support before starting the HAL. Should return true with the stored
-        // static chip info.
-        when(mWifiMock.isStarted()).thenReturn(false);
-        when(mWifiSettingsConfigStore.get(WifiSettingsConfigStore.WIFI_STATIC_CHIP_INFO))
-                .thenReturn(TestChipV1.STATIC_CHIP_INFO_JSON_STRING);
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-            }}
-        ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.AP, 1);
-            }}
-        ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.P2P, 1);
-            }}
-        ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.NAN, 1);
-            }}
-        ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.P2P, 1);
-            }}
-        ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.NAN, 1);
-            }}
-        ));
-
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.AP, 1);
-            }}
-        ));
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 2);
-            }}
-        ));
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.P2P, 1);
-                put(IfaceConcurrencyType.NAN, 1);
-            }}
-        ));
+        // Ensure we only fetched chip info once, use the cache after that.
+        verify(mWifiMock, times(1)).getChipIds(any());
 
         verifyNoMoreInteractions(mManagerStatusListenerMock);
     }
@@ -1607,27 +1436,27 @@
 
         // FG app not allowed to create AP interface.
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_AP, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.AP, TEST_WORKSOURCE_1));
 
         // New system app not allowed to create AP interface.
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(false);
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(false);
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_AP, TEST_WORKSOURCE_1));
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.AP, TEST_WORKSOURCE_1));
 
         // Privileged app allowed to create AP interface.
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(false);
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(true);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_AP, TEST_WORKSOURCE_1));
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.AP, TEST_WORKSOURCE_1));
 
         // FG app allowed to create NAN interface (since there is no need to delete any interfaces).
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_NAN, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.NAN, TEST_WORKSOURCE_1));
 
         // BG app allowed to create P2P interface (since there is no need to delete any interfaces).
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(false);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_P2P, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(false);
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.P2P, TEST_WORKSOURCE_1));
     }
 
     @Test
@@ -1656,16 +1485,16 @@
         collector.checkThat("STA created", staIface, IsNull.notNullValue());
 
         // Allowed to create AP interface (since AP can teardown STA interface)
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_AP, TEST_WORKSOURCE_1));
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.AP, TEST_WORKSOURCE_1));
 
         // Allow to create NAN interface (since there is no need to delete any interfaces).
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_NAN, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.NAN, TEST_WORKSOURCE_1));
 
         // Allow to create P2P interface (since there is no need to delete any interfaces).
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(false);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_P2P, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(false);
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.P2P, TEST_WORKSOURCE_1));
     }
 
     //////////////////////////////////////////////////////////////////////////////////////
@@ -1750,7 +1579,7 @@
                 HDM_CREATE_IFACE_NAN, // ifaceTypeToCreate
                 "wlan0", // ifaceName
                 TestChipV2.CHIP_MODE_ID, // finalChipMode
-                new IWifiIface[]{p2pIface}, // tearDownList
+                null, // tearDownList
                 nanDestroyedListener, // destroyedListener
                 TEST_WORKSOURCE_2, // requestorWs
                 new InterfaceDestroyedListenerWithIfaceName(
@@ -1772,24 +1601,11 @@
         collector.checkThat("AP interface wasn't created", apIface, IsNull.notNullValue());
 
         // request STA2 (system app): should fail
-        List<Pair<Integer, WorkSource>> staDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_0);
-        assertNotNull("should not fail when asking for same STA", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_0);
-        assertNull("should not be able to create a new STA", staDetails);
         IWifiIface staIface2 = mDut.createStaIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("STA2 should not be created", staIface2, IsNull.nullValue());
 
         // request AP2 (system app): should fail
-        List<Pair<Integer, WorkSource>> apDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_AP, false, TEST_WORKSOURCE_0);
-        assertNotNull("Should not fail when asking for same AP", apDetails);
-        assertEquals(0, apDetails.size());
-        apDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_AP, true, TEST_WORKSOURCE_0);
-        assertNull("Should not be able to create a new AP", apDetails);
-        IWifiIface apIface2 = mDut.createApIface(
-                CHIP_CAPABILITY_ANY, null, null, TEST_WORKSOURCE_0, false, mSoftApManager);
+        IWifiIface apIface2 = mDut.createApIface(null, null, TEST_WORKSOURCE_0, false);
         collector.checkThat("AP2 should not be created", apIface2, IsNull.nullValue());
 
         // tear down AP
@@ -1814,11 +1630,6 @@
         collector.checkThat("STA 2 interface wasn't created", staIface2, IsNull.notNullValue());
 
         // request STA3 (system app): should fail
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_0);
-        assertNotNull("should not fail when asking for same STA", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_0);
-        assertNull("should not create this STA", staDetails);
         IWifiIface staIface3 = mDut.createStaIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("STA3 should not be created", staIface3, IsNull.nullValue());
 
@@ -1829,12 +1640,12 @@
                 HDM_CREATE_IFACE_AP, // ifaceTypeToCreate
                 "wlan1", // ifaceName
                 TestChipV2.CHIP_MODE_ID, // finalChipMode
-                new IWifiIface[]{staIface2}, // tearDownList
+                null, // tearDownList
                 apDestroyedListener, // destroyedListener
                 TEST_WORKSOURCE_2, // requestorWs
                 // destroyedInterfacesDestroyedListeners...
                 new InterfaceDestroyedListenerWithIfaceName(
-                        getName(staIface2), staDestroyedListener2)
+                        getName(staIface), staDestroyedListener)
         );
         collector.checkThat("AP interface wasn't created", apIface, IsNull.notNullValue());
 
@@ -1931,22 +1742,21 @@
     }
 
     /**
-     * Validate {@link HalDeviceManager#canDeviceSupportCreateTypeCombo(SparseArray)}
+     * Validate {@link HalDeviceManager#canSupportIfaceCombo(SparseArray)}
      */
     @Test
-    public void testCanDeviceSupportIfaceComboTestChipV2() throws Exception {
+    public void testCanSupportIfaceComboTestChipV2() throws Exception {
+        final String name = "wlan0";
+
         TestChipV2 chipMock = new TestChipV2();
         chipMock.initialize();
         mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, chipMock.chip,
                 mManagerStatusListenerMock);
         executeAndValidateInitializationSequence();
-        // Try to query iface support before starting the HAL. Should return true with the stored
-        // static chip info.
+        // Try to query iface support before starting the HAL. Should return false.
         when(mWifiMock.isStarted()).thenReturn(false);
-        when(mWifiSettingsConfigStore.get(WifiSettingsConfigStore.WIFI_STATIC_CHIP_INFO))
-                .thenReturn(TestChipV2.STATIC_CHIP_INFO_JSON_STRING);
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
+        assertFalse(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
             }}
         ));
         verify(mWifiMock, never()).getChipIds(any());
@@ -1955,74 +1765,77 @@
 
         clearInvocations(mWifiMock);
 
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.AP, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.AP, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.P2P, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.P2P, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.NAN, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.NAN, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.P2P, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
+                put(IfaceType.P2P, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.NAN, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
+                put(IfaceType.NAN, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.AP, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
+                put(IfaceType.AP, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 2);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 2);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.P2P, 1);
-                put(IfaceConcurrencyType.AP, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.P2P, 1);
+                put(IfaceType.AP, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.P2P, 1);
-                put(IfaceConcurrencyType.AP, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
+                put(IfaceType.P2P, 1);
+                put(IfaceType.AP, 1);
             }}
         ));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.AP, 1);
-                put(IfaceConcurrencyType.NAN, 1);
+        assertTrue(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 1);
+                put(IfaceType.AP, 1);
+                put(IfaceType.NAN, 1);
             }}
         ));
 
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.P2P, 1);
-                put(IfaceConcurrencyType.NAN, 1);
+        assertFalse(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.P2P, 1);
+                put(IfaceType.NAN, 1);
             }}
         ));
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.AP, 2);
+        assertFalse(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.AP, 2);
             }}
         ));
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {{
-                put(IfaceConcurrencyType.STA, 2);
-                put(IfaceConcurrencyType.AP, 1);
+        assertFalse(mDut.canSupportIfaceCombo(new SparseArray<Integer>() {{
+                put(IfaceType.STA, 2);
+                put(IfaceType.AP, 1);
             }}
         ));
 
+        // Ensure we only fetched chip info once, use the cache after that.
+        verify(mWifiMock, times(1)).getChipIds(any());
+
         verifyNoMoreInteractions(mManagerStatusListenerMock);
     }
 
@@ -2070,27 +1883,27 @@
 
         // FG app not allowed to create STA interface.
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.STA, TEST_WORKSOURCE_1));
 
         // New system app not allowed to create STA interface.
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(false);
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(false);
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, TEST_WORKSOURCE_1));
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.STA, TEST_WORKSOURCE_1));
 
         // Privileged app allowed to create STA interface.
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(false);
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(true);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, TEST_WORKSOURCE_1));
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.STA, TEST_WORKSOURCE_1));
 
         // FG app allowed to create NAN interface (since there is no need to delete any interfaces).
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_NAN, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.NAN, TEST_WORKSOURCE_1));
 
         // BG app allowed to create P2P interface (since there is no need to delete any interfaces).
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(false);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_P2P, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(false);
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.P2P, TEST_WORKSOURCE_1));
     }
 
     //////////////////////////////////////////////////////////////////////////////////////
@@ -2106,7 +1919,6 @@
      * - create STA (system app): will get refused
      * - create AP (system app): will get refused
      * - request P2P (system app): failure
-     * - request P2P (privileged app): failure
      * - tear down AP
      * - create STA (system app)
      * - create STA (system app): will get refused
@@ -2175,10 +1987,10 @@
                 HDM_CREATE_IFACE_NAN, // ifaceTypeToCreate
                 "wlan0", // ifaceName
                 TestChipV3.CHIP_MODE_ID, // finalChipMode
-                new IWifiIface[]{p2pIface}, // tearDownList
+                null, // tearDownList
                 nanDestroyedListener, // destroyedListener
                 TEST_WORKSOURCE_2, // requestorWs
-                new InterfaceDestroyedListenerWithIfaceName(getName(p2pIface), p2pDestroyedListener)
+                new InterfaceDestroyedListenerWithIfaceName("p2p0", p2pDestroyedListener)
         );
         collector.checkThat("NAN interface wasn't created", nanIface, IsNull.notNullValue());
 
@@ -2189,49 +2001,26 @@
                 HDM_CREATE_IFACE_AP, // ifaceTypeToCreate
                 "wlan1", // ifaceName
                 TestChipV3.CHIP_MODE_ID, // finalChipMode
-                new IWifiIface[]{nanIface}, // tearDownList
+                null, // tearDownList
                 apDestroyedListener, // destroyedListener
                 TEST_WORKSOURCE_2, // requestorWs
-                new InterfaceDestroyedListenerWithIfaceName(getName(nanIface), nanDestroyedListener)
+                new InterfaceDestroyedListenerWithIfaceName("wlan0", nanDestroyedListener)
         );
         collector.checkThat("AP interface wasn't created", apIface, IsNull.notNullValue());
         verify(chipMock.chip).removeP2pIface("p2p0");
 
         // request STA2 (system app): should fail
-        List<Pair<Integer, WorkSource>> staDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_0);
-        assertNotNull("should not fail when asking for same STA", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_0);
-        assertNull("should not create this STA", staDetails);
         IWifiIface staIface2 = mDut.createStaIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("STA2 should not be created", staIface2, IsNull.nullValue());
 
         // request AP2 (system app): should fail
-        List<Pair<Integer, WorkSource>> apDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_AP, false, TEST_WORKSOURCE_0);
-        assertNotNull("Should not fail when asking for same AP", apDetails);
-        assertEquals(0, apDetails.size());
-        apDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_AP, true, TEST_WORKSOURCE_0);
-        assertNull("Should not create this AP", apDetails);
-        IWifiIface apIface2 = mDut.createApIface(
-                CHIP_CAPABILITY_ANY, null, null, TEST_WORKSOURCE_0, false, mSoftApManager);
+        IWifiIface apIface2 = mDut.createApIface(null, null, TEST_WORKSOURCE_0, false);
         collector.checkThat("AP2 should not be created", apIface2, IsNull.nullValue());
 
         // request P2P (system app): should fail
-        List<Pair<Integer, WorkSource>> p2pDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_P2P, true, TEST_WORKSOURCE_0);
-        assertNull("should not create this p2p", p2pDetails);
         p2pIface = mDut.createP2pIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("P2P should not be created", p2pIface, IsNull.nullValue());
 
-        // request P2P (privileged app): should fail
-        p2pDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_P2P, true, TEST_WORKSOURCE_2);
-        assertNull("should not create this p2p", p2pDetails);
-        p2pIface = mDut.createP2pIface(null, null, TEST_WORKSOURCE_2);
-        collector.checkThat("P2P should not be created", p2pIface, IsNull.nullValue());
-
         // tear down AP
         mDut.removeIface(apIface);
         mTestLooper.dispatchAll();
@@ -2254,11 +2043,6 @@
         collector.checkThat("STA 2 interface wasn't created", staIface2, IsNull.notNullValue());
 
         // request STA3 (system app): should fail
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_0);
-        assertNotNull("should not fail when asking for same STA", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_0);
-        assertNull("should not create this STA", staDetails);
         IWifiIface staIface3 = mDut.createStaIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("STA3 should not be created", staIface3, IsNull.nullValue());
 
@@ -2269,25 +2053,20 @@
                 HDM_CREATE_IFACE_NAN, // ifaceTypeToCreate
                 "wlan0", // ifaceName
                 TestChipV3.CHIP_MODE_ID, // finalChipMode
-                new IWifiIface[]{staIface2}, // tearDownList
+                null, // tearDownList
                 nanDestroyedListener, // destroyedListener
                 TEST_WORKSOURCE_2, // requestorWs
                 new InterfaceDestroyedListenerWithIfaceName(
-                        getName(staIface2), staDestroyedListener2)
+                        getName(staIface), staDestroyedListener)
         );
         collector.checkThat("NAN interface wasn't created", nanIface, IsNull.notNullValue());
 
-        verify(chipMock.chip).removeStaIface("wlan1");
-        verify(staDestroyedListener2).onDestroyed(getName(staIface2));
+        verify(chipMock.chip).removeStaIface("wlan0");
+        verify(staDestroyedListener).onDestroyed(getName(staIface));
 
         // request STA2 (foreground app): should fail
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_1);
-        assertNotNull("should not fail when asking for same STA", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_1);
-        assertNull("should not create this STA", staDetails);
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
         staIface2 = mDut.createStaIface(null, null, TEST_WORKSOURCE_1);
         collector.checkThat("STA2 should not be created", staIface2, IsNull.nullValue());
 
@@ -2407,27 +2186,27 @@
 
         // FG app not allowed to create STA interface.
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.STA, TEST_WORKSOURCE_1));
 
         // New system app not allowed to create STA interface.
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(false);
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(false);
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, TEST_WORKSOURCE_1));
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.STA, TEST_WORKSOURCE_1));
 
         // Privileged app allowed to create STA interface.
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(false);
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(true);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, TEST_WORKSOURCE_1));
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.STA, TEST_WORKSOURCE_1));
 
         // FG app not allowed to create NAN interface.
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_NAN, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.NAN, TEST_WORKSOURCE_1));
 
         // Privileged app allowed to create P2P interface.
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(true);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_P2P, TEST_WORKSOURCE_1));
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.P2P, TEST_WORKSOURCE_1));
     }
 
     //////////////////////////////////////////////////////////////////////////////////////
@@ -2443,7 +2222,6 @@
      * - create STA (system app): will get refused
      * - create AP (system app): will get refused
      * - request P2P (system app): failure
-     * - request P2P (privileged app): failure
      * - tear down AP
      * - create STA (system app): will get refused
      * - create NAN (privileged app)
@@ -2511,10 +2289,10 @@
                 HDM_CREATE_IFACE_NAN, // ifaceTypeToCreate
                 "wlan0", // ifaceName
                 TestChipV4.CHIP_MODE_ID, // finalChipMode
-                new IWifiIface[]{p2pIface}, // tearDownList
+                null, // tearDownList
                 nanDestroyedListener, // destroyedListener
                 TEST_WORKSOURCE_2, // requestorWs
-                new InterfaceDestroyedListenerWithIfaceName(getName(p2pIface), p2pDestroyedListener)
+                new InterfaceDestroyedListenerWithIfaceName("p2p0", p2pDestroyedListener)
         );
         collector.checkThat("allocated NAN interface", nanIface, IsNull.notNullValue());
 
@@ -2525,49 +2303,26 @@
                 HDM_CREATE_IFACE_AP, // ifaceTypeToCreate
                 "wlan1", // ifaceName
                 TestChipV4.CHIP_MODE_ID, // finalChipMode
-                new IWifiIface[]{nanIface}, // tearDownList
+                null, // tearDownList
                 apDestroyedListener, // destroyedListener
                 TEST_WORKSOURCE_2, // requestorWs
-                new InterfaceDestroyedListenerWithIfaceName(getName(nanIface), nanDestroyedListener)
+                new InterfaceDestroyedListenerWithIfaceName("wlan0", nanDestroyedListener)
         );
         collector.checkThat("AP interface wasn't created", apIface, IsNull.notNullValue());
         verify(chipMock.chip).removeP2pIface("p2p0");
 
         // request STA2 (system app): should fail
-        List<Pair<Integer, WorkSource>> staDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_0);
-        assertNotNull("should not fail when asking for same STA", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_0);
-        assertNull("should not create this STA", staDetails);
         IWifiIface staIface2 = mDut.createStaIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("STA2 should not be created", staIface2, IsNull.nullValue());
 
         // request AP2 (system app): should fail
-        List<Pair<Integer, WorkSource>> apDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_AP, false, TEST_WORKSOURCE_0);
-        assertNotNull("Should not fail when asking for same AP", apDetails);
-        assertEquals(0, apDetails.size());
-        apDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_AP, true, TEST_WORKSOURCE_0);
-        assertNull("Should not create this AP", apDetails);
-        IWifiIface apIface2 = mDut.createApIface(
-                CHIP_CAPABILITY_ANY, null, null, TEST_WORKSOURCE_0, false, mSoftApManager);
+        IWifiIface apIface2 = mDut.createApIface(null, null, TEST_WORKSOURCE_0, false);
         collector.checkThat("AP2 should not be created", apIface2, IsNull.nullValue());
 
         // request P2P (system app): should fail
-        List<Pair<Integer, WorkSource>> p2pDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_P2P, true, TEST_WORKSOURCE_0);
-        assertNull("should not create this p2p", p2pDetails);
         p2pIface = mDut.createP2pIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("P2P should not be created", p2pIface, IsNull.nullValue());
 
-        // request P2P (privileged app): should fail
-        p2pDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_P2P, true, TEST_WORKSOURCE_2);
-        assertNull("should not create this p2p", p2pDetails);
-        p2pIface = mDut.createP2pIface(null, null, TEST_WORKSOURCE_2);
-        collector.checkThat("P2P should not be created", p2pIface, IsNull.nullValue());
-
         // tear down AP
         mDut.removeIface(apIface);
         mTestLooper.dispatchAll();
@@ -2576,11 +2331,6 @@
         verify(apDestroyedListener).onDestroyed(getName(apIface));
 
         // request STA2 (system app): should fail
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_0);
-        assertNotNull("should not fail when asking for same STA", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_0);
-        assertNull("should not create this STA", staDetails);
         staIface2 = mDut.createStaIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("STA2 should not be created", staIface2, IsNull.nullValue());
 
@@ -2599,12 +2349,7 @@
 
         // request STA2 (foreground app): should fail
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_1);
-        assertNotNull("should not fail when asking for same STA", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_1);
-        assertNull("should not create this STA", staDetails);
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
         staIface2 = mDut.createStaIface(null, null, TEST_WORKSOURCE_1);
         collector.checkThat("STA2 should not be created", staIface2, IsNull.nullValue());
 
@@ -2677,10 +2422,10 @@
                 HDM_CREATE_IFACE_NAN, // ifaceTypeToCreate
                 "wlan0", // ifaceName
                 TestChipV4.CHIP_MODE_ID, // finalChipMode
-                new IWifiIface[]{p2pIface}, // tearDownList
+                null, // tearDownList
                 nanDestroyedListener, // destroyedListener
                 TEST_WORKSOURCE_2, // requestorWs
-                new InterfaceDestroyedListenerWithIfaceName(getName(p2pIface), p2pDestroyedListener)
+                new InterfaceDestroyedListenerWithIfaceName("p2p0", p2pDestroyedListener)
         );
         collector.checkThat("NAN interface wasn't created", nanIface, IsNull.notNullValue());
 
@@ -2691,46 +2436,27 @@
                 HDM_CREATE_IFACE_AP, // ifaceTypeToCreate
                 "wlan1", // ifaceName
                 TestChipV4.CHIP_MODE_ID, // finalChipMode
-                new IWifiIface[]{nanIface}, // tearDownList
+                null, // tearDownList
                 apDestroyedListener, // destroyedListener
                 TEST_WORKSOURCE_2, // requestorWs
-                new InterfaceDestroyedListenerWithIfaceName(getName(nanIface), nanDestroyedListener)
+                new InterfaceDestroyedListenerWithIfaceName("wlan0", nanDestroyedListener)
         );
         collector.checkThat("AP interface wasn't created", apIface, IsNull.notNullValue());
         verify(chipMock.chip).removeP2pIface("p2p0");
 
         // request STA2 (system app): should fail
-        List<Pair<Integer, WorkSource>> staDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_0);
-        assertNotNull("should not fail when asking for same STA", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_0);
-        assertNull("Should not create this STA", staDetails);
         IWifiIface staIface2 = mDut.createStaIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("STA2 should not be created", staIface2, IsNull.nullValue());
 
         // request AP2: should fail
-        List<Pair<Integer, WorkSource>> apDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_AP, false, TEST_WORKSOURCE_0);
-        assertNotNull("Should not fail when asking for same AP", apDetails);
-        assertEquals(0, apDetails.size());
-        apDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_AP, true, TEST_WORKSOURCE_0);
-        assertNull("Should not create this AP", apDetails);
-        IWifiIface apIface2 = mDut.createApIface(
-                CHIP_CAPABILITY_ANY, null, null, TEST_WORKSOURCE_0, false, mSoftApManager);
+        IWifiIface apIface2 = mDut.createApIface(null, null, TEST_WORKSOURCE_0, false);
         collector.checkThat("AP2 should not be created", apIface2, IsNull.nullValue());
 
         // request P2P: should fail
-        List<Pair<Integer, WorkSource>> p2pDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_P2P, true, TEST_WORKSOURCE_0);
-        assertNull("should not create this p2p", p2pDetails);
         p2pIface = mDut.createP2pIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("P2P should not be created", p2pIface, IsNull.nullValue());
 
         // request NAN: should fail
-        List<Pair<Integer, WorkSource>> nanDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_NAN, true, TEST_WORKSOURCE_0);
-        assertNull("Should not create this nan", nanDetails);
         nanIface = mDut.createNanIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("NAN should not be created", nanIface, IsNull.nullValue());
 
@@ -2742,11 +2468,6 @@
         verify(apDestroyedListener).onDestroyed(getName(apIface));
 
         // request STA2: should fail
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, false, TEST_WORKSOURCE_0);
-        assertNotNull("should not fail when asking for same STA", staDetails);
-        assertEquals(0, staDetails.size());
-        staDetails = mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_0);
-        assertNull("Should not create this STA", staDetails);
         staIface2 = mDut.createStaIface(null, null, TEST_WORKSOURCE_0);
         collector.checkThat("STA2 should not be created", staIface2, IsNull.nullValue());
 
@@ -2807,10 +2528,10 @@
                 HDM_CREATE_IFACE_AP, // ifaceTypeToCreate
                 "wlan1", // ifaceName
                 TestChipV3.CHIP_MODE_ID, // finalChipMode
-                new IWifiIface[]{nanIface}, // tearDownList
+                null, // tearDownList
                 apDestroyedListener, // destroyedListener
                 TEST_WORKSOURCE_1, // requestorWs
-                new InterfaceDestroyedListenerWithIfaceName(getName(nanIface), nanDestroyedListener)
+                new InterfaceDestroyedListenerWithIfaceName("wlan0", nanDestroyedListener)
         );
         collector.checkThat("AP interface wasn't created", apIface, IsNull.notNullValue());
         verify(chipMock.chip).removeNanIface("wlan0");
@@ -2938,27 +2659,27 @@
 
         // FG app not allowed to create STA interface.
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.STA, TEST_WORKSOURCE_1));
 
         // New system app not allowed to create STA interface.
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(false);
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(false);
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, TEST_WORKSOURCE_1));
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.STA, TEST_WORKSOURCE_1));
 
         // Privileged app allowed to create STA interface.
         when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(false);
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(true);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, TEST_WORKSOURCE_1));
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.STA, TEST_WORKSOURCE_1));
 
         // FG app not allowed to create NAN interface.
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_NAN, TEST_WORKSOURCE_1));
+        when(mWorkSourceHelper1.hasAnyForegroundAppRequest()).thenReturn(true);
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.NAN, TEST_WORKSOURCE_1));
 
         // Privileged app allowed to create P2P interface.
         when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(true);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_P2P, TEST_WORKSOURCE_1));
+        assertTrue(mDut.isItPossibleToCreateIface(IfaceType.P2P, TEST_WORKSOURCE_1));
     }
 
     @Test
@@ -3000,16 +2721,16 @@
         collector.checkThat("AP created", apIface, IsNull.notNullValue());
 
         // Not allowed to create STA interface.
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_STA, TEST_WORKSOURCE_1));
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.STA, TEST_WORKSOURCE_1));
 
         // Not allowed to create AP interface.
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_AP, TEST_WORKSOURCE_1));
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.AP, TEST_WORKSOURCE_1));
 
         // Not allowed to create NAN interface.
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_NAN, TEST_WORKSOURCE_1));
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.NAN, TEST_WORKSOURCE_1));
 
         // Not allowed to create P2P interface.
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_P2P, TEST_WORKSOURCE_1));
+        assertFalse(mDut.isItPossibleToCreateIface(IfaceType.P2P, TEST_WORKSOURCE_1));
     }
 
     public void verify60GhzIfaceCreation(
@@ -3046,9 +2767,6 @@
             );
             collector.checkThat("STA created", staIface, IsNull.notNullValue());
         } else {
-            List<Pair<Integer, WorkSource>> staDetails = mDut.reportImpactToCreateIface(
-                    HDM_CREATE_IFACE_STA, true, requiredChipCapabilities, TEST_WORKSOURCE_1);
-            assertNull("Should not create this STA", staDetails);
             staIface = mDut.createStaIface(
                     requiredChipCapabilities, null, null, TEST_WORKSOURCE_1);
             mInOrder.verify(chipMock.chip, times(0)).configureChip(anyInt());
@@ -3063,7 +2781,7 @@
             apIface = validateInterfaceSequence(chipMock,
                     true, // chipModeValid
                     chipModeId, // chipModeId (only used if chipModeValid is true)
-                    HDM_CREATE_IFACE_AP, // createIfaceType
+                    HDM_CREATE_IFACE_AP, // ifaceTypeToCreate
                     "wlan0", // ifaceName
                     finalChipModeId, // finalChipMode
                     requiredChipCapabilities, // requiredChipCapabilities
@@ -3073,17 +2791,14 @@
             );
             collector.checkThat("AP created", apIface, IsNull.notNullValue());
         } else {
-            List<Pair<Integer, WorkSource>> apDetails = mDut.reportImpactToCreateIface(
-                    HDM_CREATE_IFACE_AP, true, requiredChipCapabilities, TEST_WORKSOURCE_0);
-            assertNull("Should not create this AP", apDetails);
             apIface = mDut.createApIface(
-                    requiredChipCapabilities, null, null, TEST_WORKSOURCE_0, false, mSoftApManager);
+                    requiredChipCapabilities, null, null, TEST_WORKSOURCE_0, false);
             collector.checkThat("AP should not be created", apIface, IsNull.nullValue());
         }
         if (SdkLevel.isAtLeastS()) {
             // Privileged app allowed to create P2P interface.
             when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(true);
-            assertThat(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_P2P,
+            assertThat(mDut.isItPossibleToCreateIface(IfaceType.P2P,
                     android.hardware.wifi.V1_5.IWifiChip.ChipCapabilityMask.WIGIG,
                     TEST_WORKSOURCE_1), is(isWigigSupported));
         }
@@ -3139,506 +2854,11 @@
     @Test
     public void testCreateApBridgeInterfaceNoInitModeTestChipV15() throws Exception {
         mWifiChipV15 = mock(android.hardware.wifi.V1_5.IWifiChip.class);
-        mIsBridgedSoftApSupported = true;
-        mIsStaWithBridgedSoftApConcurrencySupported = true;
         runCreateSingleXxxInterfaceNoInitMode(new TestChipV5(), HDM_CREATE_IFACE_AP_BRIDGE, "wlan0",
                 TestChipV5.CHIP_MODE_ID);
     }
 
-    /**
-     * Validate creation of AP Bridge interface fails if there is a STA up and the device doesn't
-     * support STA + Bridged AP.
-     */
-    @Test
-    public void testCreateApBridgeInterfaceWithStaV15() throws Exception {
-        mIsBridgedSoftApSupported = true;
-        mIsStaWithBridgedSoftApConcurrencySupported = false;
-        TestChipV5 chipMock = new TestChipV5();
-        setupWifiChipV15(chipMock);
-        chipMock.initialize();
-        mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, chipMock.chip,
-                mWifiChipV15, mManagerStatusListenerMock);
-        executeAndValidateInitializationSequence();
-        executeAndValidateStartupSequence();
 
-        InterfaceDestroyedListener idl = mock(
-                InterfaceDestroyedListener.class);
-
-        IWifiIface iface = validateInterfaceSequence(chipMock,
-                false, // chipModeValid
-                -1000, // chipModeId (only used if chipModeValid is true)
-                HDM_CREATE_IFACE_STA,
-                "wlan0",
-                TestChipV5.CHIP_MODE_ID,
-                null, // tearDownList
-                idl, // destroyedListener
-                TEST_WORKSOURCE_0 // requestorWs
-        );
-        collector.checkThat("interface was null", iface, IsNull.notNullValue());
-
-        List<Pair<Integer, WorkSource>> bridgedApDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_AP_BRIDGE, true, TEST_WORKSOURCE_1);
-        // STA + AP_BRIDGED is not supported
-        assertNull(bridgedApDetails);
-
-        mIsStaWithBridgedSoftApConcurrencySupported = true;
-        bridgedApDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_AP_BRIDGE, true, TEST_WORKSOURCE_1);
-        // STA + AP_BRIDGED supported
-        assertEquals(0, bridgedApDetails.size());
-    }
-
-    /**
-     * Validate {@link HalDeviceManager#canDeviceSupportCreateTypeCombo(SparseArray)}
-     */
-    @Test
-    public void testCanDeviceSupportIfaceComboTestChipV6() throws Exception {
-        TestChipV6 testChip = new TestChipV6();
-        testChip.initialize();
-        mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, testChip.chip,
-                mManagerStatusListenerMock);
-        executeAndValidateInitializationSequence();
-        // Try to query iface support before starting the HAL. Should return true with the stored
-        // static chip info.
-        when(mWifiMock.isStarted()).thenReturn(false);
-        when(mWifiSettingsConfigStore.get(WifiSettingsConfigStore.WIFI_STATIC_CHIP_INFO))
-                .thenReturn(TestChipV6.STATIC_CHIP_INFO_JSON_STRING);
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {
-            {
-                put(IfaceConcurrencyType.STA, 1);
-            }
-        }));
-        verify(mWifiMock, never()).getChipIds(any());
-        when(mWifiMock.isStarted()).thenReturn(true);
-        executeAndValidateStartupSequence();
-
-        clearInvocations(mWifiMock);
-
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {
-            {
-                put(IfaceConcurrencyType.STA, 1);
-            }
-        }));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {
-            {
-                put(IfaceConcurrencyType.AP, 1);
-            }
-        }));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {
-            {
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.AP, 1);
-            }
-        }));
-        assertTrue(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {
-            {
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.AP_BRIDGED, 1);
-            }
-        }));
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {
-            {
-                put(IfaceConcurrencyType.AP, 1);
-                put(IfaceConcurrencyType.AP_BRIDGED, 1);
-            }
-        }));
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {
-            {
-                put(IfaceConcurrencyType.STA, 1);
-                put(IfaceConcurrencyType.AP, 1);
-                put(IfaceConcurrencyType.AP_BRIDGED, 1);
-            }
-        }));
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {
-            {
-                put(IfaceConcurrencyType.NAN, 1);
-            }
-        }));
-        assertFalse(mDut.canDeviceSupportCreateTypeCombo(new SparseArray<Integer>() {
-            {
-                put(IfaceConcurrencyType.P2P, 2);
-            }
-        }));
-
-        verifyNoMoreInteractions(mManagerStatusListenerMock);
-    }
-
-    /**
-     * Validate creation of AP Bridge interface from blank start-up in TestChipV6
-     */
-    @Test
-    public void testCreateApBridgeInterfaceNoInitModeTestChipV6() throws Exception {
-        TestChipV6 testChip = new TestChipV6();
-        setupWifiChipV15(testChip);
-        runCreateSingleXxxInterfaceNoInitMode(testChip, HDM_CREATE_IFACE_AP_BRIDGE, "wlan0",
-                TestChipV6.CHIP_MODE_ID);
-    }
-
-    /**
-     * Validate creation of STA will not downgrade an AP Bridge interface in TestChipV6, since it
-     * can support STA and AP Bridge concurrently.
-     */
-    @Test
-    public void testCreateStaDoesNotDowngradeApBridgeInterfaceTestChipV6() throws Exception {
-        mIsBridgedSoftApSupported = true;
-        mIsStaWithBridgedSoftApConcurrencySupported = false;
-        TestChipV6 chipMock = new TestChipV6();
-        setupWifiChipV15(chipMock);
-        chipMock.initialize();
-        mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, chipMock.chip,
-                mWifiChipV15, mManagerStatusListenerMock);
-        executeAndValidateInitializationSequence();
-        executeAndValidateStartupSequence();
-
-        InterfaceDestroyedListener idl = mock(
-                InterfaceDestroyedListener.class);
-
-        // Create the bridged AP
-        ArrayList<String> bridgedApInstances = new ArrayList<>();
-        bridgedApInstances.add("instance0");
-        bridgedApInstances.add("instance1");
-        chipMock.bridgedApInstancesByName.put("wlan0", bridgedApInstances);
-        IWifiIface iface = validateInterfaceSequence(chipMock,
-                false, // chipModeValid
-                -1000, // chipModeId (only used if chipModeValid is true)
-                HDM_CREATE_IFACE_AP_BRIDGE,
-                "wlan0",
-                TestChipV6.CHIP_MODE_ID,
-                null, // tearDownList
-                idl, // destroyedListener
-                TEST_WORKSOURCE_0 // requestorWs
-        );
-        collector.checkThat("interface was null", iface, IsNull.notNullValue());
-
-        when(mSoftApManager.getBridgedApDowngradeIfaceInstanceForRemoval()).thenReturn("instance1");
-        // Should be able to create a STA without downgrading the bridged AP
-        iface = validateInterfaceSequence(chipMock,
-                true, // chipModeValid
-                TestChipV6.CHIP_MODE_ID,
-                HDM_CREATE_IFACE_STA,
-                "wlan3",
-                TestChipV6.CHIP_MODE_ID,
-                null, // tearDownList
-                idl, // destroyedListener
-                TEST_WORKSOURCE_0 // requestorWs
-        );
-        collector.checkThat("interface was null", iface, IsNull.notNullValue());
-        assertEquals(2, bridgedApInstances.size());
-    }
-
-    private IWifiIface setupDbsSupportTest(ChipMockBase testChip, int onlyChipMode,
-            ImmutableList<ArrayList<Integer>> radioCombinationMatrix) throws Exception {
-        WifiRadioCombinationMatrix matrix = new WifiRadioCombinationMatrix();
-        for (ArrayList<Integer> comb: radioCombinationMatrix) {
-            WifiRadioCombination combination = new WifiRadioCombination();
-            for (Integer b: comb) {
-                WifiRadioConfiguration config = new WifiRadioConfiguration();
-                config.bandInfo = b;
-                combination.radioConfigurations.add(config);
-            }
-            matrix.radioCombinations.add(combination);
-        }
-
-        testChip.chipSupportedRadioCombinationsMatrix = matrix;
-
-        testChip.initialize();
-        mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, testChip.chip,
-                mManagerStatusListenerMock);
-        executeAndValidateInitializationSequence();
-        executeAndValidateStartupSequence();
-
-        InterfaceDestroyedListener staDestroyedListener = mock(
-                InterfaceDestroyedListener.class);
-
-        InterfaceDestroyedListener p2pDestroyedListener = mock(
-                InterfaceDestroyedListener.class);
-
-        // Request STA
-        IWifiIface staIface = validateInterfaceSequence(testChip,
-                false, // chipModeValid
-                -1000, // chipModeId (only used if chipModeValid is true)
-                HDM_CREATE_IFACE_STA, // createIfaceType
-                "wlan0", // ifaceName
-                onlyChipMode, // finalChipMode
-                null, // tearDownList
-                staDestroyedListener, // destroyedListener
-                TEST_WORKSOURCE_0 // requestorWs
-        );
-        collector.checkThat("STA can't be created", staIface, IsNull.notNullValue());
-
-        // Request P2P
-        IWifiIface p2pIface = validateInterfaceSequence(testChip,
-                true, // chipModeValid
-                onlyChipMode, // chipModeId
-                HDM_CREATE_IFACE_P2P, // ifaceTypeToCreate
-                "p2p0", // ifaceName
-                onlyChipMode, // finalChipMode
-                null, // tearDownList
-                p2pDestroyedListener, // destroyedListener
-                TEST_WORKSOURCE_0 // requestorWs
-        );
-        collector.checkThat("P2P can't be created", p2pIface, IsNull.notNullValue());
-        mTestLooper.dispatchAll();
-
-        return staIface;
-    }
-
-    /**
-     * Validate 24GHz/5GHz DBS support.
-     */
-    @Test
-    public void test24g5gDbsSupport() throws Exception {
-        TestChipV6 testChip = new TestChipV6();
-        ImmutableList<ArrayList<Integer>> radioCombinationMatrix = ImmutableList.of(
-                new ArrayList(Arrays.asList(WifiBand.BAND_24GHZ, WifiBand.BAND_5GHZ)));
-        IWifiIface iface = setupDbsSupportTest(testChip, TestChipV6.CHIP_MODE_ID,
-                radioCombinationMatrix);
-
-        assertTrue(mDut.is24g5gDbsSupported(iface));
-        assertFalse(mDut.is5g6gDbsSupported(iface));
-    }
-
-    /**
-     * Validate 5GHz/6GHz DBS support.
-     */
-    @Test
-    public void test5g6gDbsSupport() throws Exception {
-        TestChipV6 testChip = new TestChipV6();
-        ImmutableList<ArrayList<Integer>> radioCombinationMatrix = ImmutableList.of(
-                new ArrayList(Arrays.asList(WifiBand.BAND_5GHZ, WifiBand.BAND_6GHZ)));
-        IWifiIface iface = setupDbsSupportTest(testChip, TestChipV6.CHIP_MODE_ID,
-                radioCombinationMatrix);
-
-        assertFalse(mDut.is24g5gDbsSupported(iface));
-        assertTrue(mDut.is5g6gDbsSupported(iface));
-    }
-
-    /**
-     * Validate 2.4GHz/5GHz DBS and 5GHz/6GHz DBS support.
-     */
-    @Test
-    public void test24g5gAnd5g6gDbsSupport() throws Exception {
-        TestChipV6 testChip = new TestChipV6();
-        ImmutableList<ArrayList<Integer>> radioCombinationMatrix = ImmutableList.of(
-                new ArrayList(Arrays.asList(WifiBand.BAND_24GHZ, WifiBand.BAND_5GHZ)),
-                new ArrayList(Arrays.asList(WifiBand.BAND_5GHZ, WifiBand.BAND_6GHZ)));
-        IWifiIface iface = setupDbsSupportTest(testChip, TestChipV6.CHIP_MODE_ID,
-                radioCombinationMatrix);
-
-        assertTrue(mDut.is24g5gDbsSupported(iface));
-        assertTrue(mDut.is5g6gDbsSupported(iface));
-    }
-
-    /**
-     * Validate that a requested iface should have higher priority than ALL of the existing ifaces
-     * for a mode change.
-     */
-    @Test
-    public void testIsItPossibleToCreateIfaceBetweenChipModesTestChipV7() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-
-        TestChipV7 chipMock = new TestChipV7();
-        chipMock.initialize();
-        mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, chipMock.chip,
-                mManagerStatusListenerMock);
-        executeAndValidateInitializationSequence();
-        executeAndValidateStartupSequence();
-
-        // get STA interface from privileged app.
-        IWifiIface staIface = validateInterfaceSequence(chipMock,
-                false, // chipModeValid
-                -1000, // chipModeId (only used if chipModeValid is true)
-                HDM_CREATE_IFACE_STA, // ifaceTypeToCreate
-                "wlan0", // ifaceName
-                TestChipV7.DUAL_STA_CHIP_MODE_ID, // finalChipMode
-                null, // tearDownList
-                mock(InterfaceDestroyedListener.class), // destroyedListener
-                TEST_WORKSOURCE_0 // requestorWs
-        );
-        collector.checkThat("STA created", staIface, IsNull.notNullValue());
-
-        // get STA interface from foreground app.
-        when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnyForegroundAppRequest(true)).thenReturn(true);
-        staIface = validateInterfaceSequence(chipMock,
-                true, // chipModeValid
-                TestChipV7.DUAL_STA_CHIP_MODE_ID, // chipModeId (only used if chipModeValid is true)
-                HDM_CREATE_IFACE_STA, // ifaceTypeToCreate
-                "wlan1", // ifaceName
-                TestChipV7.DUAL_STA_CHIP_MODE_ID, // finalChipMode
-                null, // tearDownList
-                mock(InterfaceDestroyedListener.class), // destroyedListener
-                TEST_WORKSOURCE_1 // requestorWs
-        );
-        collector.checkThat("STA created", staIface, IsNull.notNullValue());
-
-        // New system app not allowed to create AP interface since it would tear down the privileged
-        // app STA during the chip mode change.
-        when(mWorkSourceHelper2.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper2.hasAnySystemAppRequest()).thenReturn(true);
-        assertFalse(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_AP, TEST_WORKSOURCE_2));
-
-        // Privileged app allowed to create AP interface since it is able to tear down the
-        // privileged app STA during the chip mode change.
-        when(mWorkSourceHelper2.hasAnyPrivilegedAppRequest()).thenReturn(true);
-        assertTrue(mDut.isItPossibleToCreateIface(HDM_CREATE_IFACE_AP, TEST_WORKSOURCE_2));
-    }
-
-    /**
-     * Validate that a requested iface should delete the correct AP/AP_BRIDGED based on available
-     * concurrency and not priority.
-     */
-    @Test
-    public void testCreateInterfaceRemovesCorrectApIfaceTestChipV8() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-
-        TestChipV8 chipMock = new TestChipV8();
-        chipMock.initialize();
-        setupWifiChipV15(chipMock);
-        mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, chipMock.chip,
-                mWifiChipV15, mManagerStatusListenerMock);
-        executeAndValidateInitializationSequence();
-        executeAndValidateStartupSequence();
-
-        // get AP_BRIDGED interface for a privileged app.
-        ArrayList<String> bridgedApInstances = new ArrayList<>();
-        bridgedApInstances.add("instance0");
-        bridgedApInstances.add("instance1");
-        chipMock.bridgedApInstancesByName.put("wlan0", bridgedApInstances);
-        IWifiIface apBridgedIface = validateInterfaceSequence(chipMock,
-                false, // chipModeValid
-                -1000, // chipModeId (only used if chipModeValid is true)
-                HDM_CREATE_IFACE_AP_BRIDGE, // ifaceTypeToCreate
-                "wlan0", // ifaceName
-                TestChipV8.CHIP_MODE_ID, // finalChipMode
-                null, // tearDownList
-                mock(InterfaceDestroyedListener.class), // destroyedListener
-                TEST_WORKSOURCE_0 // requestorWs
-        );
-        collector.checkThat("Bridged AP created", apBridgedIface, IsNull.notNullValue());
-
-        // get AP interface for a system app.
-        when(mWorkSourceHelper1.hasAnyPrivilegedAppRequest()).thenReturn(false);
-        when(mWorkSourceHelper1.hasAnySystemAppRequest()).thenReturn(true);
-        IWifiIface apIface = validateInterfaceSequence(chipMock,
-                true, // chipModeValid
-                TestChipV8.CHIP_MODE_ID, // chipModeId
-                HDM_CREATE_IFACE_AP, // ifaceTypeToCreate
-                "wlan1", // ifaceName
-                TestChipV8.CHIP_MODE_ID, // finalChipMode
-                null, // tearDownList
-                mock(InterfaceDestroyedListener.class), // destroyedListener
-                TEST_WORKSOURCE_1 // requestorWs
-        );
-        collector.checkThat("AP created", apIface, IsNull.notNullValue());
-
-        // Check that the impact to add a STA will remove the AP_BRIDGED (TEST_WORKSOURCE_0) and not
-        // the AP (TEST_WORKSOURCE_1), even though the AP has lower priority.
-        List<Pair<Integer, WorkSource>> impactToCreateSta =
-                mDut.reportImpactToCreateIface(HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_0);
-        assertFalse(impactToCreateSta.isEmpty());
-        assertEquals(TEST_WORKSOURCE_0, impactToCreateSta.get(0).second);
-    }
-
-    /**
-     * Validate creation of STA with a downgraded bridged AP in chip V9 with no STA + Bridged AP
-     * concurrency.
-     */
-    @Test
-    public void testCreateStaInterfaceWithDowngradedBridgedApTestChipV9()
-            throws Exception {
-        mIsBridgedSoftApSupported = true;
-        mIsStaWithBridgedSoftApConcurrencySupported = false;
-        TestChipV9 chipMock = new TestChipV9();
-        setupWifiChipV15(chipMock);
-        chipMock.initialize();
-        mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, chipMock.chip,
-                mWifiChipV15, mManagerStatusListenerMock);
-        executeAndValidateInitializationSequence();
-        executeAndValidateStartupSequence();
-
-        InterfaceDestroyedListener idl = mock(
-                InterfaceDestroyedListener.class);
-
-        // Create the bridged AP
-        ArrayList<String> bridgedApInstances = new ArrayList<>();
-        bridgedApInstances.add("instance0");
-        bridgedApInstances.add("instance1");
-        chipMock.bridgedApInstancesByName.put("wlan0", bridgedApInstances);
-        IWifiIface iface = validateInterfaceSequence(chipMock,
-                false, // chipModeValid
-                -1000, // chipModeId (only used if chipModeValid is true)
-                HDM_CREATE_IFACE_AP_BRIDGE,
-                "wlan0",
-                TestChipV9.CHIP_MODE_ID,
-                null, // tearDownList
-                idl, // destroyedListener
-                TEST_WORKSOURCE_0 // requestorWs
-        );
-        collector.checkThat("interface was null", iface, IsNull.notNullValue());
-
-        // Downgrade the bridged AP.
-        chipMock.bridgedApInstancesByName.get("wlan0").remove(0);
-
-        // Should be able to create a STA now since STA + AP is supported
-        List<Pair<Integer, WorkSource>> staDetails = mDut.reportImpactToCreateIface(
-                HDM_CREATE_IFACE_STA, true, TEST_WORKSOURCE_1);
-        assertNotNull(staDetails);
-        assertEquals(0, staDetails.size());
-    }
-
-    /**
-     * Validate a bridged AP will be downgraded to make room for a STA in chip V9 with no STA +
-     * Bridged AP concurrency
-     */
-    @Test
-    public void testCreateStaInterfaceWillDowngradeBridgedApTestChipV9()
-            throws Exception {
-        mIsBridgedSoftApSupported = true;
-        mIsStaWithBridgedSoftApConcurrencySupported = false;
-        TestChipV9 chipMock = new TestChipV9();
-        setupWifiChipV15(chipMock);
-        chipMock.initialize();
-        mInOrder = inOrder(mServiceManagerMock, mWifiMock, mWifiMockV15, chipMock.chip,
-                mWifiChipV15, mManagerStatusListenerMock);
-        executeAndValidateInitializationSequence();
-        executeAndValidateStartupSequence();
-
-        InterfaceDestroyedListener idl = mock(
-                InterfaceDestroyedListener.class);
-
-        // Create the bridged AP
-        ArrayList<String> bridgedApInstances = new ArrayList<>();
-        bridgedApInstances.add("instance0");
-        bridgedApInstances.add("instance1");
-        chipMock.bridgedApInstancesByName.put("wlan0", bridgedApInstances);
-        IWifiIface iface = validateInterfaceSequence(chipMock,
-                false, // chipModeValid
-                -1000, // chipModeId (only used if chipModeValid is true)
-                HDM_CREATE_IFACE_AP_BRIDGE,
-                "wlan0",
-                TestChipV9.CHIP_MODE_ID,
-                null, // tearDownList
-                idl, // destroyedListener
-                TEST_WORKSOURCE_0 // requestorWs
-        );
-        collector.checkThat("interface was null", iface, IsNull.notNullValue());
-
-        when(mSoftApManager.getBridgedApDowngradeIfaceInstanceForRemoval()).thenReturn("instance1");
-        // Should be able to create a STA by downgrading the bridged AP
-        iface = validateInterfaceSequence(chipMock,
-                true, // chipModeValid
-                TestChipV9.CHIP_MODE_ID,
-                HDM_CREATE_IFACE_STA,
-                "wlan3",
-                TestChipV9.CHIP_MODE_ID,
-                null, // tearDownList
-                idl, // destroyedListener
-                TEST_WORKSOURCE_0 // requestorWs
-        );
-        collector.checkThat("interface was null", iface, IsNull.notNullValue());
-    }
 
     ///////////////////////////////////////////////////////////////////////////////////////
     // utilities
@@ -3648,12 +2868,6 @@
         doAnswer(new GetCapabilities_1_5Answer(chipMock))
                 .when(mWifiChipV15).getCapabilities_1_5(any(
                         android.hardware.wifi.V1_5.IWifiChip.getCapabilities_1_5Callback.class));
-        when(mWifiChipV15.removeIfaceInstanceFromBridgedApIface(any(), any()))
-                .thenAnswer((invocation) -> {
-                    chipMock.bridgedApInstancesByName.get(invocation.getArgument(0))
-                            .remove(invocation.getArgument(1));
-                    return getStatus(WifiStatusCode.SUCCESS);
-                });
     }
 
     private void setupWifiV15(IWifi iWifiMock) throws RemoteException {
@@ -3689,8 +2903,6 @@
         // verify: wifi initialization sequence if vendor HAL is supported.
         if (isSupported) {
             mInOrder.verify(mWifiMock).linkToDeath(mDeathRecipientCaptor.capture(), anyLong());
-            // verify: onStop called as a part of initialize.
-            mInOrder.verify(mWifiMock).stop();
             if (null != mWifiMockV15) {
                 mInOrder.verify(mWifiMockV15).registerEventCallback_1_5(
                         mWifiEventCallbackCaptorV15.capture());
@@ -3698,6 +2910,9 @@
                 mInOrder.verify(mWifiMock).registerEventCallback(
                         mWifiEventCallbackCaptor.capture());
             }
+            // verify: onStop called as a part of initialize.
+            mInOrder.verify(mWifiMock).stop();
+
             collector.checkThat("isReady is true", mDut.isReady(), equalTo(true));
         } else {
             collector.checkThat("isReady is false", mDut.isReady(), equalTo(false));
@@ -3821,7 +3036,7 @@
         IWifiIface staIface = validateInterfaceSequence(chipMock,
                 false, // chipModeValid
                 -1000, // chipModeId (only used if chipModeValid is true)
-                HDM_CREATE_IFACE_STA, // createIfaceType
+                HDM_CREATE_IFACE_STA, // ifaceTypeToCreate
                 "wlan0", // ifaceName
                 onlyChipMode, // finalChipMode
                 null, // tearDownList
@@ -3882,7 +3097,7 @@
 
     private IWifiIface validateInterfaceSequence(ChipMockBase chipMock,
             boolean chipModeValid, int chipModeId,
-            int createIfaceType, String ifaceName, int finalChipMode,
+            int ifaceTypeToCreate, String ifaceName, int finalChipMode,
             long requiredChipCapabilities,
             IWifiIface[] tearDownList,
             InterfaceDestroyedListener destroyedListener,
@@ -3893,22 +3108,11 @@
         chipMock.chipModeValid = chipModeValid;
         chipMock.chipModeId = chipModeId;
 
-        // check if can create interface
-        List<Pair<Integer, WorkSource>> details = mDut.reportImpactToCreateIface(
-                createIfaceType, true, requiredChipCapabilities, requestorWs);
-        if (tearDownList == null || tearDownList.length == 0) {
-            assertTrue("Details list must be empty - can create" + details, details.isEmpty());
-        } else { // TODO: assumes that at most a single entry - which is the current usage
-            assertEquals("Details don't match " + details, tearDownList.length, details.size());
-            assertEquals("Details don't match " + details, getType(tearDownList[0]),
-                    HAL_IFACE_MAP.get(details.get(0).first.intValue()));
-        }
-
         IWifiIface iface = null;
 
         // configure: interface to be created
         // act: request the interface
-        switch (createIfaceType) {
+        switch (ifaceTypeToCreate) {
             case HDM_CREATE_IFACE_STA:
                 iface = mock(IWifiStaIface.class);
                 doAnswer(new GetNameAnswer(ifaceName)).when(iface).getName(
@@ -3928,17 +3132,12 @@
                         any(IWifiIface.getNameCallback.class));
                 doAnswer(new GetTypeAnswer(IfaceType.AP)).when(iface).getType(
                         any(IWifiIface.getTypeCallback.class));
-                if (mWifiChipV15 != null && createIfaceType == HDM_CREATE_IFACE_AP_BRIDGE) {
-                    android.hardware.wifi.V1_5.IWifiApIface ifaceApV15 =
-                            mock(android.hardware.wifi.V1_5.IWifiApIface.class);
+                if (mWifiChipV15 != null && ifaceTypeToCreate == HDM_CREATE_IFACE_AP_BRIDGE) {
+                    IWifiIface ifaceApV15 = mock(android.hardware.wifi.V1_5.IWifiApIface.class);
                     doAnswer(new GetNameAnswer(ifaceName)).when(ifaceApV15).getName(
                             any(IWifiIface.getNameCallback.class));
                     doAnswer(new GetTypeAnswer(IfaceType.AP)).when(ifaceApV15).getType(
                             any(IWifiIface.getTypeCallback.class));
-                    doAnswer(new GetBridgedInstancesAnswer(chipMock, ifaceName))
-                            .when(ifaceApV15).getBridgedInstances(
-                                    any(android.hardware.wifi.V1_5.IWifiApIface
-                                            .getBridgedInstancesCallback.class));
                     doAnswer(new CreateXxxIfaceAnswer(chipMock, mStatusOk, ifaceApV15)).when(
                             mWifiChipV15).createBridgedApIface(
                             any(android.hardware.wifi.V1_5.IWifiChip
@@ -3950,7 +3149,7 @@
                 }
                 mDut.createApIface(requiredChipCapabilities,
                         destroyedListener, mHandler, requestorWs,
-                        createIfaceType == HDM_CREATE_IFACE_AP_BRIDGE, mSoftApManager);
+                        ifaceTypeToCreate == HDM_CREATE_IFACE_AP_BRIDGE);
                 break;
             case HDM_CREATE_IFACE_P2P:
                 iface = mock(IWifiP2pIface.class);
@@ -4005,14 +3204,14 @@
         }
 
         // validate: create interface
-        switch (createIfaceType) {
+        switch (ifaceTypeToCreate) {
             case HDM_CREATE_IFACE_STA:
                 mInOrder.verify(chipMock.chip).createStaIface(
                         any(IWifiChip.createStaIfaceCallback.class));
                 break;
             case HDM_CREATE_IFACE_AP_BRIDGE:
             case HDM_CREATE_IFACE_AP:
-                if (mWifiChipV15 != null && createIfaceType == HDM_CREATE_IFACE_AP_BRIDGE) {
+                if (mWifiChipV15 != null && ifaceTypeToCreate == HDM_CREATE_IFACE_AP_BRIDGE) {
                     mInOrder.verify(mWifiChipV15)
                             .createBridgedApIface(any(android.hardware.wifi.V1_5.IWifiChip
                             .createBridgedApIfaceCallback.class));
@@ -4041,15 +3240,15 @@
 
     private IWifiIface validateInterfaceSequence(ChipMockBase chipMock,
             boolean chipModeValid, int chipModeId,
-            int createIfaceType, String ifaceName, int finalChipMode,
+            int ifaceTypeToCreate, String ifaceName, int finalChipMode,
             IWifiIface[] tearDownList,
             InterfaceDestroyedListener destroyedListener,
             WorkSource requestorWs,
             InterfaceDestroyedListenerWithIfaceName...destroyedInterfacesDestroyedListeners)
             throws Exception {
         return validateInterfaceSequence(chipMock, chipModeValid, chipModeId,
-                createIfaceType, ifaceName,
-                finalChipMode, CHIP_CAPABILITY_ANY,
+                ifaceTypeToCreate, ifaceName,
+                finalChipMode, HalDeviceManager.CHIP_CAPABILITY_ANY,
                 tearDownList, destroyedListener, requestorWs,
                 destroyedInterfacesDestroyedListeners);
     }
@@ -4181,18 +3380,6 @@
         }
     }
 
-    private class GetAvailableModesAnswer_1_6 extends MockAnswerUtil.AnswerWithArguments {
-        private ChipMockBase mChipMockBase;
-
-        GetAvailableModesAnswer_1_6(ChipMockBase chipMockBase) {
-            mChipMockBase = chipMockBase;
-        }
-
-        public void answer(android.hardware.wifi.V1_6.IWifiChip.getAvailableModes_1_6Callback cb) {
-            cb.onValues(mStatusOk, mChipMockBase.availableModes_1_6);
-        }
-    }
-
     private class GetModeAnswer extends MockAnswerUtil.AnswerWithArguments {
         private ChipMockBase mChipMockBase;
 
@@ -4405,40 +3592,6 @@
         }
     }
 
-    private class GetSupportedRadioCombinationsMatrixAnswer
-            extends MockAnswerUtil.AnswerWithArguments {
-        private ChipMockBase mChipMockBase;
-
-        GetSupportedRadioCombinationsMatrixAnswer(ChipMockBase chipMockBase) {
-            mChipMockBase = chipMockBase;
-        }
-
-        public void answer(
-                android.hardware.wifi.V1_6.IWifiChip.getSupportedRadioCombinationsMatrixCallback
-                cb) {
-            cb.onValues(mStatusOk, mChipMockBase.chipSupportedRadioCombinationsMatrix);
-        }
-    }
-
-    private class GetBridgedInstancesAnswer extends MockAnswerUtil.AnswerWithArguments {
-        private ChipMockBase mChipMockBase;
-        private String mName;
-
-        GetBridgedInstancesAnswer(ChipMockBase chipMockBase, String name) {
-            mChipMockBase = chipMockBase;
-            mName = name;
-        }
-
-        public void answer(android.hardware.wifi.V1_5.IWifiApIface.getBridgedInstancesCallback cb) {
-            ArrayList<String> bridgedApInstances =
-                    mChipMockBase.bridgedApInstancesByName.get(mName);
-            if (bridgedApInstances == null) {
-                bridgedApInstances = new ArrayList<>();
-            }
-            cb.onValues(mStatusOk, bridgedApInstances);
-        }
-    }
-
     // chip configuration
 
     private static final int CHIP_MOCK_V1 = 0;
@@ -4446,27 +3599,23 @@
     private static final int CHIP_MOCK_V3 = 2;
     private static final int CHIP_MOCK_V4 = 3;
     private static final int CHIP_MOCK_V5 = 4;
-    private static final int CHIP_MOCK_V6 = 6;
 
     private class ChipMockBase {
         public int chipMockId;
 
-        public android.hardware.wifi.V1_6.IWifiChip chip;
+        public IWifiChip chip;
         public int chipId;
         public boolean chipModeValid = false;
         public int chipModeId = -1000;
         public int chipModeIdValidForRtt = -1; // single chip mode ID where RTT can be created
         public int chipCapabilities = 0;
-        public WifiRadioCombinationMatrix chipSupportedRadioCombinationsMatrix = null;
         public Map<Integer, ArrayList<String>> interfaceNames = new HashMap<>();
         public Map<Integer, Map<String, IWifiIface>> interfacesByName = new HashMap<>();
-        public Map<String, ArrayList<String>> bridgedApInstancesByName = new HashMap<>();
 
         public ArrayList<IWifiChip.ChipMode> availableModes;
-        public ArrayList<android.hardware.wifi.V1_6.IWifiChip.ChipMode> availableModes_1_6;
 
         void initialize() throws Exception {
-            chip = mock(android.hardware.wifi.V1_6.IWifiChip.class);
+            chip = mock(IWifiChip.class);
 
             interfaceNames.put(IfaceType.STA, new ArrayList<>());
             interfaceNames.put(IfaceType.AP, new ArrayList<>());
@@ -4517,10 +3666,6 @@
                     chip).createRttController(any(), any());
 
             doAnswer(new GetBoundIfaceAnswer(true)).when(mRttControllerMock).getBoundIface(any());
-            doAnswer(new GetSupportedRadioCombinationsMatrixAnswer(this))
-                    .when(chip).getSupportedRadioCombinationsMatrix(
-                            any(android.hardware.wifi.V1_6.IWifiChip
-                                    .getSupportedRadioCombinationsMatrixCallback.class));
         }
     }
 
@@ -4530,44 +3675,6 @@
     private class TestChipV1 extends ChipMockBase {
         static final int STA_CHIP_MODE_ID = 0;
         static final int AP_CHIP_MODE_ID = 1;
-        static final String STATIC_CHIP_INFO_JSON_STRING = "["
-                + "    {"
-                + "        \"chipId\": 10,"
-                + "        \"chipCapabilities\": -1,"
-                + "        \"availableModes\": ["
-                + "            {"
-                + "                \"id\": 0,"
-                + "                \"availableCombinations\": ["
-                + "                    {"
-                + "                        \"limits\": ["
-                + "                            {"
-                + "                                \"maxIfaces\": 1,"
-                + "                                \"types\": [0]"
-                + "                            },"
-                + "                            {"
-                + "                                \"maxIfaces\": 1,"
-                + "                                \"types\": [3, 4]"
-                + "                            }"
-                + "                        ]"
-                + "                    }"
-                + "                ]"
-                + "            },"
-                + "            {"
-                + "                \"id\": 1,"
-                + "                \"availableCombinations\": ["
-                + "                    {"
-                + "                        \"limits\": ["
-                + "                            {"
-                + "                                \"maxIfaces\": 1,"
-                + "                                \"types\": [1]"
-                + "                            }"
-                + "                        ]"
-                + "                    }"
-                + "                ]"
-                + "            }"
-                + "        ]"
-                + "    }"
-                + "]";
 
         void initialize() throws Exception {
             super.initialize();
@@ -4633,35 +3740,6 @@
     private class TestChipV2 extends ChipMockBase {
         // only mode (different number from any in TestChipV1 so can catch test errors)
         static final int CHIP_MODE_ID = 5;
-        static final String STATIC_CHIP_INFO_JSON_STRING = "["
-                + "    {"
-                + "        \"chipId\": 12,"
-                + "        \"chipCapabilities\": 0,"
-                + "        \"availableModes\": ["
-                + "            {"
-                + "                \"id\": 5,"
-                + "                \"availableCombinations\": ["
-                + "                    {"
-                + "                        \"limits\": ["
-                + "                            {"
-                + "                                \"maxIfaces\": 1,"
-                + "                                \"types\": [0]"
-                + "                            },"
-                + "                            {"
-                + "                                \"maxIfaces\": 1,"
-                + "                                \"types\": [0, 1]"
-                + "                            },"
-                + "                            {"
-                + "                                \"maxIfaces\": 1,"
-                + "                                \"types\": [3, 4]"
-                + "                            }"
-                + "                        ]"
-                + "                    }"
-                + "                ]"
-                + "            }"
-                + "        ]"
-                + "    }"
-                + "]";
 
         void initialize() throws Exception {
             super.initialize();
@@ -4932,309 +4010,4 @@
                     .getAvailableModes(any(IWifiChip.getAvailableModesCallback.class));
         }
     }
-
-    // test chip configuration V6 for Bridged AP:
-    // mode:
-    //    STA + (AP || AP_BRIDGED)
-    //    STA + (NAN || P2P)
-    private class TestChipV6 extends ChipMockBase {
-        // only mode (different number from any in other TestChips so can catch test errors)
-        static final int CHIP_MODE_ID = 60;
-        static final int CHIP_ID = 6;
-        static final String STATIC_CHIP_INFO_JSON_STRING = "["
-                + "    {"
-                + "        \"chipId\": 6,"
-                + "        \"chipCapabilities\": 0,"
-                + "        \"availableModes\": ["
-                + "            {"
-                + "                \"id\": 60,"
-                + "                \"availableCombinations\": ["
-                + "                    {"
-                + "                        \"limits\": ["
-                + "                            {"
-                + "                                \"maxIfaces\": 1,"
-                + "                                \"types\": [0]"
-                + "                            },"
-                + "                            {"
-                + "                                \"maxIfaces\": 1,"
-                + "                                \"types\": [1, 2]"
-                + "                            }"
-                + "                        ]"
-                + "                    }"
-                + "                ]"
-                + "            }"
-                + "        ]"
-                + "    }"
-                + "]";
-
-        void initialize() throws Exception {
-            super.initialize();
-            chipMockId = CHIP_MOCK_V6;
-
-            // chip Id configuration
-            ArrayList<Integer> chipIds;
-            chipId = CHIP_ID;
-            chipIds = new ArrayList<>();
-            chipIds.add(chipId);
-            doAnswer(new GetChipIdsAnswer(mStatusOk, chipIds)).when(mWifiMock).getChipIds(
-                    any(IWifi.getChipIdsCallback.class));
-
-            doAnswer(new GetChipAnswer(mStatusOk, chip)).when(mWifiMock).getChip(eq(CHIP_ID),
-                    any(IWifi.getChipCallback.class));
-
-            // initialize placeholder chip modes
-            android.hardware.wifi.V1_6.IWifiChip.ChipMode cm;
-            android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination ccc;
-            android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit cccl;
-
-            // Mode 60 (only one): 1xSTA + 1x{AP,AP_BRIDGED}, 1xSTA + 1x{P2P,NAN}
-            availableModes_1_6 = new ArrayList<>();
-            cm = new android.hardware.wifi.V1_6.IWifiChip.ChipMode();
-            cm.id = CHIP_MODE_ID;
-
-            ccc = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination();
-
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.STA);
-            ccc.limits.add(cccl);
-
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.AP);
-            cccl.types.add(IfaceConcurrencyType.AP_BRIDGED);
-            ccc.limits.add(cccl);
-
-            cm.availableCombinations.add(ccc);
-
-            ccc = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination();
-
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceType.STA);
-            ccc.limits.add(cccl);
-
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceType.P2P);
-            cccl.types.add(IfaceType.NAN);
-            ccc.limits.add(cccl);
-
-            cm.availableCombinations.add(ccc);
-
-            availableModes_1_6.add(cm);
-
-            chipModeIdValidForRtt = CHIP_MODE_ID;
-
-            doAnswer(new GetAvailableModesAnswer_1_6(this))
-                    .when(chip).getAvailableModes_1_6(any(
-                            android.hardware.wifi.V1_6.IWifiChip.getAvailableModes_1_6Callback
-                                    .class));
-            mWifiChipV16 = chip;
-        }
-    }
-
-    // test chip configuration V7 for testing interface priorities for mode switching
-    // mode 0: STA + STA
-    // mode 1: AP
-    // mode 2: STA + AP || AP + AP_BRIDGED
-    private class TestChipV7 extends ChipMockBase {
-        static final int DUAL_STA_CHIP_MODE_ID = 71;
-        static final int AP_CHIP_MODE_ID = 72;
-        static final int AP_AP_BRIDGED_CHIP_MODE_ID = 73;
-
-        void initialize() throws Exception {
-            super.initialize();
-
-            // chip Id configuration
-            ArrayList<Integer> chipIds;
-            chipId = 70;
-            chipIds = new ArrayList<>();
-            chipIds.add(chipId);
-            doAnswer(new GetChipIdsAnswer(mStatusOk, chipIds)).when(mWifiMock).getChipIds(
-                    any(IWifi.getChipIdsCallback.class));
-
-            doAnswer(new GetChipAnswer(mStatusOk, chip)).when(mWifiMock).getChip(eq(chipId),
-                    any(IWifi.getChipCallback.class));
-
-            // initialize placeholder chip modes
-            android.hardware.wifi.V1_6.IWifiChip.ChipMode cm;
-            android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination ccc;
-            android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit cccl;
-
-            availableModes_1_6 = new ArrayList<>();
-
-            cm = new android.hardware.wifi.V1_6.IWifiChip.ChipMode();
-            cm.id = DUAL_STA_CHIP_MODE_ID;
-            ccc = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination();
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 2;
-            cccl.types.add(IfaceConcurrencyType.STA);
-            ccc.limits.add(cccl);
-            cm.availableCombinations.add(ccc);
-            availableModes_1_6.add(cm);
-
-            cm = new android.hardware.wifi.V1_6.IWifiChip.ChipMode();
-            cm.id = AP_CHIP_MODE_ID;
-            ccc = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination();
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.AP);
-            ccc.limits.add(cccl);
-            cm.availableCombinations.add(ccc);
-            availableModes_1_6.add(cm);
-
-            cm = new android.hardware.wifi.V1_6.IWifiChip.ChipMode();
-            cm.id = AP_AP_BRIDGED_CHIP_MODE_ID;
-            ccc = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination();
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.STA);
-            ccc.limits.add(cccl);
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.AP);
-            ccc.limits.add(cccl);
-            cm.availableCombinations.add(ccc);
-            ccc = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination();
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.AP);
-            ccc.limits.add(cccl);
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.AP_BRIDGED);
-            ccc.limits.add(cccl);
-            cm.availableCombinations.add(ccc);
-            availableModes_1_6.add(cm);
-
-            chipModeIdValidForRtt = DUAL_STA_CHIP_MODE_ID;
-
-            doAnswer(new GetAvailableModesAnswer_1_6(this))
-                    .when(chip).getAvailableModes_1_6(any(
-                            android.hardware.wifi.V1_6.IWifiChip.getAvailableModes_1_6Callback
-                                    .class));
-            mWifiChipV16 = chip;
-        }
-    }
-
-    // test chip configuration V8 for testing AP/AP_BRIDGED deletion
-    // mode 0: STA + AP || AP + AP_BRIDGED
-    private class TestChipV8 extends ChipMockBase {
-        static final int CHIP_MODE_ID = 71;
-
-        void initialize() throws Exception {
-            super.initialize();
-
-            // chip Id configuration
-            ArrayList<Integer> chipIds;
-            chipId = 80;
-            chipIds = new ArrayList<>();
-            chipIds.add(chipId);
-            doAnswer(new GetChipIdsAnswer(mStatusOk, chipIds)).when(mWifiMock).getChipIds(
-                    any(IWifi.getChipIdsCallback.class));
-
-            doAnswer(new GetChipAnswer(mStatusOk, chip)).when(mWifiMock).getChip(eq(chipId),
-                    any(IWifi.getChipCallback.class));
-
-            // initialize placeholder chip modes
-            android.hardware.wifi.V1_6.IWifiChip.ChipMode cm;
-            android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination ccc;
-            android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit cccl;
-
-            availableModes_1_6 = new ArrayList<>();
-
-            cm = new android.hardware.wifi.V1_6.IWifiChip.ChipMode();
-            cm.id = CHIP_MODE_ID;
-            ccc = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination();
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.STA);
-            ccc.limits.add(cccl);
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.AP);
-            ccc.limits.add(cccl);
-            cm.availableCombinations.add(ccc);
-            ccc = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination();
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.AP);
-            ccc.limits.add(cccl);
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.AP_BRIDGED);
-            ccc.limits.add(cccl);
-            cm.availableCombinations.add(ccc);
-            availableModes_1_6.add(cm);
-
-            chipModeIdValidForRtt = CHIP_MODE_ID;
-
-            doAnswer(new GetAvailableModesAnswer_1_6(this))
-                    .when(chip).getAvailableModes_1_6(any(
-                            android.hardware.wifi.V1_6.IWifiChip.getAvailableModes_1_6Callback
-                                    .class));
-            mWifiChipV16 = chip;
-        }
-    }
-
-    // test chip configuration V9 for Bridged AP without STA + Bridged AP concurrency:
-    // mode:
-    //    (STA + AP) || (AP_BRIDGED)
-    private class TestChipV9 extends ChipMockBase {
-        static final int CHIP_MODE_ID = 90;
-
-        void initialize() throws Exception {
-            super.initialize();
-
-            // chip Id configuration
-            ArrayList<Integer> chipIds;
-            chipId = 9;
-            chipIds = new ArrayList<>();
-            chipIds.add(chipId);
-            doAnswer(new GetChipIdsAnswer(mStatusOk, chipIds)).when(mWifiMock).getChipIds(
-                    any(IWifi.getChipIdsCallback.class));
-
-            doAnswer(new GetChipAnswer(mStatusOk, chip)).when(mWifiMock).getChip(eq(chipId),
-                    any(IWifi.getChipCallback.class));
-
-            // initialize placeholder chip modes
-            android.hardware.wifi.V1_6.IWifiChip.ChipMode cm;
-            android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination ccc;
-            android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit cccl;
-
-            // Mode 90 (only one): (1xSTA + 1xAP) || (1xAP_BRIDGED)
-            availableModes_1_6 = new ArrayList<>();
-            cm = new android.hardware.wifi.V1_6.IWifiChip.ChipMode();
-            cm.id = CHIP_MODE_ID;
-
-            ccc = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination();
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.STA);
-            ccc.limits.add(cccl);
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.AP);
-            ccc.limits.add(cccl);
-            cm.availableCombinations.add(ccc);
-
-            ccc = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombination();
-            cccl = new android.hardware.wifi.V1_6.IWifiChip.ChipConcurrencyCombinationLimit();
-            cccl.maxIfaces = 1;
-            cccl.types.add(IfaceConcurrencyType.AP_BRIDGED);
-            ccc.limits.add(cccl);
-            cm.availableCombinations.add(ccc);
-
-            availableModes_1_6.add(cm);
-
-            chipModeIdValidForRtt = CHIP_MODE_ID;
-
-            doAnswer(new GetAvailableModesAnswer_1_6(this))
-                    .when(chip).getAvailableModes_1_6(any(
-                            android.hardware.wifi.V1_6.IWifiChip.getAvailableModes_1_6Callback
-                                    .class));
-            mWifiChipV16 = chip;
-        }
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/HostapdHalAidlImpTest.java b/service/tests/wifitests/src/com/android/server/wifi/HostapdHalAidlImpTest.java
deleted file mode 100644
index 03822c4..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/HostapdHalAidlImpTest.java
+++ /dev/null
@@ -1,1165 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.app.test.MockAnswerUtil;
-import android.content.Context;
-import android.hardware.wifi.hostapd.ApInfo;
-import android.hardware.wifi.hostapd.BandMask;
-import android.hardware.wifi.hostapd.ChannelBandwidth;
-import android.hardware.wifi.hostapd.ClientInfo;
-import android.hardware.wifi.hostapd.DebugLevel;
-import android.hardware.wifi.hostapd.EncryptionType;
-import android.hardware.wifi.hostapd.FrequencyRange;
-import android.hardware.wifi.hostapd.Generation;
-import android.hardware.wifi.hostapd.HostapdStatusCode;
-import android.hardware.wifi.hostapd.IHostapd;
-import android.hardware.wifi.hostapd.IHostapdCallback;
-import android.hardware.wifi.hostapd.Ieee80211ReasonCode;
-import android.hardware.wifi.hostapd.IfaceParams;
-import android.hardware.wifi.hostapd.NetworkParams;
-import android.net.MacAddress;
-import android.net.wifi.SoftApConfiguration;
-import android.net.wifi.SoftApConfiguration.Builder;
-import android.net.wifi.WifiManager;
-import android.os.Binder;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.IBinder.DeathRecipient;
-import android.os.RemoteException;
-import android.os.ServiceSpecificException;
-import android.os.test.TestLooper;
-import android.util.SparseIntArray;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.util.ApConfigUtil;
-import com.android.server.wifi.util.NativeUtil;
-import com.android.wifi.resources.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-
-/**
- * Unit tests for HostapdHal
- */
-@SmallTest
-public class HostapdHalAidlImpTest extends WifiBaseTest {
-    private static final String IFACE_NAME = "mock-wlan0";
-    private static final String NETWORK_SSID = "test-ssid";
-    private static final String NETWORK_PSK = "test-psk";
-    private static final String TEST_CLIENT_MAC = "11:22:33:44:55:66";
-    private static final String TEST_AP_INSTANCE = "instance-wlan0";
-    private static final String TEST_AP_INSTANCE_2 = "instance-wlan1";
-    private static final int TEST_FREQ_24G = 2412;
-    private static final int TEST_FREQ_5G = 5745;
-    private static final int TEST_BANDWIDTH = ChannelBandwidth.BANDWIDTH_20;
-    private static final int TEST_GENERATION = Generation.WIFI_STANDARD_11N;
-
-    private final int mBand256G = SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ
-            | SoftApConfiguration.BAND_6GHZ;
-
-    private @Mock Context mContext;
-    private @Mock IHostapd mIHostapdMock;
-    private @Mock IBinder mServiceBinderMock;
-    private @Mock WifiNative.HostapdDeathEventHandler mHostapdHalDeathHandler;
-    private @Mock WifiNative.SoftApHalCallback mSoftApHalCallback;
-
-    private IHostapdCallback mIHostapdCallback;
-    private MockResources mResources;
-
-    private TestLooper mLooper = new TestLooper();
-    private HostapdHalAidlImp mHostapdHal;
-    private ArgumentCaptor<DeathRecipient> mHostapdDeathCaptor =
-            ArgumentCaptor.forClass(DeathRecipient.class);
-    private ArgumentCaptor<IfaceParams> mIfaceParamsCaptor =
-            ArgumentCaptor.forClass(IfaceParams.class);
-    private ArgumentCaptor<NetworkParams> mNetworkParamsCaptor =
-            ArgumentCaptor.forClass(NetworkParams.class);
-
-    private class HostapdHalSpy extends HostapdHalAidlImp {
-        private IBinder mServiceBinderOverride;
-        HostapdHalSpy() {
-            super(mContext, new Handler(mLooper.getLooper()));
-        }
-
-        public void setServiceBinderOverride(IBinder serviceBinderOverride) {
-            mServiceBinderOverride = serviceBinderOverride;
-        }
-
-        @Override
-        protected IHostapd getHostapdMockable() {
-            return mIHostapdMock;
-        }
-
-        @Override
-        protected IBinder getServiceBinderMockable() {
-            return mServiceBinderOverride == null ? mServiceBinderMock : mServiceBinderOverride;
-        }
-
-        @Override
-        public boolean initialize() {
-            return true;
-        }
-    }
-
-    private void mockApInfoChangedAndVerify(int numOfApInfo, IHostapdCallback mockHostapdCallback,
-            WifiNative.SoftApHalCallback mockSoftApHalCallback) throws Exception {
-        // Trigger on info changed.
-        ApInfo apInfo = new ApInfo();
-        apInfo.ifaceName = IFACE_NAME;
-        apInfo.apIfaceInstance = TEST_AP_INSTANCE;
-        apInfo.freqMhz = TEST_FREQ_24G;
-        apInfo.channelBandwidth = TEST_BANDWIDTH;
-        apInfo.generation = TEST_GENERATION;
-        apInfo.apIfaceInstanceMacAddress = MacAddress.fromString(TEST_CLIENT_MAC).toByteArray();
-        if (numOfApInfo == 1) {
-            mockHostapdCallback.onApInstanceInfoChanged(apInfo);
-            verify(mockSoftApHalCallback).onInfoChanged(eq(TEST_AP_INSTANCE), eq(TEST_FREQ_24G),
-                    eq(mHostapdHal.mapHalChannelBandwidthToSoftApInfo(TEST_BANDWIDTH)),
-                    eq(mHostapdHal.mapHalGenerationToWifiStandard(TEST_GENERATION)),
-                    eq(MacAddress.fromString(TEST_CLIENT_MAC)));
-        } else if (numOfApInfo == 2) {
-            apInfo.apIfaceInstance = TEST_AP_INSTANCE_2;
-            apInfo.freqMhz = TEST_FREQ_5G;
-            mockHostapdCallback.onApInstanceInfoChanged(apInfo);
-            verify(mockSoftApHalCallback).onInfoChanged(eq(TEST_AP_INSTANCE_2), eq(TEST_FREQ_5G),
-                    eq(mHostapdHal.mapHalChannelBandwidthToSoftApInfo(TEST_BANDWIDTH)),
-                    eq(mHostapdHal.mapHalGenerationToWifiStandard(TEST_GENERATION)),
-                    eq(MacAddress.fromString(TEST_CLIENT_MAC)));
-        }
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mResources = new MockResources();
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
-        mResources.setBoolean(R.bool.config_wifi_softap_ieee80211ac_supported, false);
-        mResources.setBoolean(R.bool.config_wifiSoftapIeee80211axSupported, false);
-        mResources.setBoolean(R.bool.config_wifiSoftap6ghzSupported, false);
-        mResources.setBoolean(R.bool.config_wifiSoftapAcsIncludeDfs, false);
-        mResources.setString(R.string.config_wifiSoftap2gChannelList, "");
-        mResources.setString(R.string.config_wifiSoftap5gChannelList, "");
-        mResources.setString(R.string.config_wifiSoftap6gChannelList, "");
-
-        when(mContext.getResources()).thenReturn(mResources);
-        doNothing().when(mIHostapdMock).addAccessPoint(
-                mIfaceParamsCaptor.capture(), mNetworkParamsCaptor.capture());
-        doNothing().when(mIHostapdMock).removeAccessPoint(any());
-        mHostapdHal = new HostapdHalSpy();
-    }
-
-    /**
-     * Sunny day scenario for HostapdHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_success() throws Exception {
-        executeAndValidateInitializationSequence(true);
-    }
-
-    /**
-     * Failure scenario for HostapdHal initialization
-     */
-    @Test
-    public void testInitialize_registerException() throws Exception {
-        executeAndValidateInitializationSequence(false);
-    }
-
-    /**
-     * Verifies the hostapd death handling.
-     */
-    @Test
-    public void testDeathHandling() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        mHostapdHal.registerDeathHandler(mHostapdHalDeathHandler);
-        mHostapdDeathCaptor.getValue().binderDied();
-        mLooper.dispatchAll();
-        verify(mHostapdHalDeathHandler).onDeath();
-    }
-
-    /**
-     * Verifies the hostapd death handling ignored with stale death recipient.
-     */
-    @Test
-    public void testDeathHandlingIgnore() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        mHostapdHal.registerDeathHandler(mHostapdHalDeathHandler);
-        DeathRecipient old = mHostapdDeathCaptor.getValue();
-        // Start the HAL again
-        reset(mServiceBinderMock);
-        reset(mIHostapdMock);
-        // Initialize and start hostapd daemon with different service binder
-        ((HostapdHalSpy) mHostapdHal).setServiceBinderOverride(new Binder());
-        assertTrue(mHostapdHal.initialize());
-        assertTrue(mHostapdHal.startDaemon());
-        // The old binder died should be ignored.
-        old.binderDied();
-        mLooper.dispatchAll();
-        verify(mHostapdHalDeathHandler, never()).onDeath();
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_Band2G() throws Exception {
-        // TODO(b/195971074) : Parameterize the unit tests for addAccessPoint
-        executeAndValidateInitializationSequence(true);
-        final int apChannel = 6;
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_2GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(BandMask.BAND_2_GHZ,
-                mIfaceParamsCaptor.getValue().channelParams[0].bandMask);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].acsShouldExcludeDfs);
-        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams[0].channel);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Open_Band5G() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        final int apChannel = 149;
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(true);
-        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_5GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(BandMask.BAND_5_GHZ,
-                mIfaceParamsCaptor.getValue().channelParams[0].bandMask);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].acsShouldExcludeDfs);
-        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams[0].channel);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertTrue(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.NONE, mNetworkParamsCaptor.getValue().encryptionType);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_Band5G_Hidden() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        final int apChannel = 149;
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(true);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_5GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(BandMask.BAND_5_GHZ,
-                mIfaceParamsCaptor.getValue().channelParams[0].bandMask);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].acsShouldExcludeDfs);
-        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams[0].channel);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertTrue(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_Band2G_WithACS() throws Exception {
-        // Enable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-        final int apChannel = 6;
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_2GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(BandMask.BAND_2_GHZ,
-                mIfaceParamsCaptor.getValue().channelParams[0].bandMask);
-        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams[0].channel);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].acsShouldExcludeDfs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_Band2G_WithIeee80211AC() throws Exception {
-        // Enable ACS & 80211AC in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mResources.setBoolean(R.bool.config_wifi_softap_ieee80211ac_supported, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-        final int apChannel = 6;
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_2GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(BandMask.BAND_2_GHZ,
-                mIfaceParamsCaptor.getValue().channelParams[0].bandMask);
-        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams[0].channel);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].acsShouldExcludeDfs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_BandAny_WithACS() throws Exception {
-        // Enable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setBand(mBand256G);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(mBand256G,
-                mIfaceParamsCaptor.getValue().channelParams[0].bandMask);
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams[0].acsShouldExcludeDfs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_WithoutACS() throws Exception {
-        // Disable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setBand(mBand256G);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-    }
-
-    /**
-     * Verifies the failure handling in addition of access point.
-     */
-    @Test
-    public void testAddAccessPointFailure() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        doThrow(new RemoteException()).when(mIHostapdMock).addAccessPoint(any(), any());
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(true);
-        configurationBuilder.setChannel(6, SoftApConfiguration.BAND_2GHZ);
-
-        assertFalse(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-    }
-
-    /**
-     * Verifies the failure handling in addition of access point.
-     */
-    @Test
-    public void testAddAccessPointRemoteException() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        doThrow(new RemoteException()).when(mIHostapdMock).addAccessPoint(any(), any());
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(true);
-        configurationBuilder.setChannel(6, SoftApConfiguration.BAND_2GHZ);
-
-        assertFalse(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-    }
-
-    /**
-     * Verifies the successful removal of access point.
-     */
-    @Test
-    public void testRemoveAccessPointSuccess() throws Exception {
-        executeAndValidateInitializationSequence(true);
-
-        assertTrue(mHostapdHal.removeAccessPoint(IFACE_NAME));
-        verify(mIHostapdMock).removeAccessPoint(any());
-    }
-
-    /**
-     * Verifies service specific exception handling in removal of access point.
-     */
-    @Test
-    public void testRemoveAccessPointServiceException() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        doThrow(new ServiceSpecificException(HostapdStatusCode.FAILURE_UNKNOWN))
-                .when(mIHostapdMock).removeAccessPoint(any());
-
-        assertFalse(mHostapdHal.removeAccessPoint(IFACE_NAME));
-        verify(mIHostapdMock).removeAccessPoint(any());
-    }
-
-    /**
-     * Verifies remote exception handling in removal of access point.
-     */
-    @Test
-    public void testRemoveAccessPointRemoteException() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        doThrow(new RemoteException()).when(mIHostapdMock).removeAccessPoint(any());
-
-        assertFalse(mHostapdHal.removeAccessPoint(IFACE_NAME));
-        verify(mIHostapdMock).removeAccessPoint(any());
-    }
-
-    /**
-     * Verifies the handling of onFailure callback from hostapd.
-     */
-    @Test
-    public void testOnFailureCallbackHandling() throws Exception {
-        executeAndValidateInitializationSequence(true);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setBand(SoftApConfiguration.BAND_2GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        // Trigger on failure.
-        mIHostapdCallback.onFailure(IFACE_NAME, IFACE_NAME);
-        verify(mSoftApHalCallback).onFailure();
-
-        // Now remove the access point and ensure that the callback is no longer handled.
-        reset(mSoftApHalCallback);
-        assertTrue(mHostapdHal.removeAccessPoint(IFACE_NAME));
-        mIHostapdCallback.onFailure(IFACE_NAME, IFACE_NAME);
-        verify(mSoftApHalCallback, never()).onFailure();
-    }
-
-    /**
-     * Calls initialize(), mocking various callback answers and verifying flow
-     */
-    private void executeAndValidateInitializationSequence(
-            boolean shouldSucceed) throws Exception {
-        doNothing().when(mIHostapdMock).setDebugParams(anyInt());
-        if (!shouldSucceed) {
-            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-                public void answer(IHostapdCallback cb) throws RemoteException {
-                    throw new RemoteException();
-                }
-            }).when(mIHostapdMock).registerCallback(any(IHostapdCallback.class));
-        } else {
-            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-                public void answer(IHostapdCallback cb) throws RemoteException {
-                    mIHostapdCallback = cb;
-                }
-            }).when(mIHostapdMock).registerCallback(any(IHostapdCallback.class));
-        }
-
-        // Initialize and start hostapd daemon
-        assertTrue(mHostapdHal.initialize());
-        assertTrue(mHostapdHal.startDaemon() == shouldSucceed);
-
-        // Verify initialization sequence
-        verify(mServiceBinderMock).linkToDeath(mHostapdDeathCaptor.capture(), anyInt());
-        verify(mIHostapdMock).registerCallback(any(IHostapdCallback.class));
-        assertEquals(shouldSucceed, mHostapdHal.isInitializationComplete());
-    }
-
-    /**
-     * Verifies the successful execute forceClientDisconnect.
-     */
-    @Test
-    public void testForceClientDisconnectSuccess() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
-        ArgumentCaptor<byte[]> macAddrCaptor = ArgumentCaptor.forClass(byte[].class);
-        doNothing().when(mIHostapdMock).forceClientDisconnect(
-                anyString(), macAddrCaptor.capture(), anyInt());
-
-        assertTrue(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client,
-                WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER));
-        verify(mIHostapdMock).forceClientDisconnect(eq(IFACE_NAME), any(byte[].class),
-                eq(Ieee80211ReasonCode.WLAN_REASON_PREV_AUTH_NOT_VALID));
-        assertTrue(test_client.equals(MacAddress.fromBytes(macAddrCaptor.getValue())));
-    }
-
-    /**
-     * Verifies the failure handling in forceClientDisconnect.
-     */
-    @Test
-    public void testForceClientDisconnectFailureDueToInvalidArg() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
-        ArgumentCaptor<byte[]> macAddrCaptor = ArgumentCaptor.forClass(byte[].class);
-        doNothing().when(mIHostapdMock).forceClientDisconnect(
-                anyString(), macAddrCaptor.capture(), anyInt());
-
-        try {
-            mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client, -1);
-            fail();
-        } catch (IllegalArgumentException e) {
-            // Expect this exception to be thrown
-        }
-    }
-
-    /**
-     * Verifies the service specific exception handling in forceClientDisconnect.
-     */
-    @Test
-    public void testforceClientDisconnectServiceException() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
-        ArgumentCaptor<byte[]> macAddrCaptor = ArgumentCaptor.forClass(byte[].class);
-        doThrow(new ServiceSpecificException(HostapdStatusCode.FAILURE_CLIENT_UNKNOWN))
-                .when(mIHostapdMock).forceClientDisconnect(
-                anyString(), macAddrCaptor.capture(), anyInt());
-
-        assertFalse(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client,
-                WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER));
-        verify(mIHostapdMock).forceClientDisconnect(eq(IFACE_NAME), any(byte[].class),
-                eq(Ieee80211ReasonCode.WLAN_REASON_PREV_AUTH_NOT_VALID));
-        assertTrue(test_client.equals(MacAddress.fromBytes(macAddrCaptor.getValue())));
-    }
-
-    /**
-     * Verifies remote exception handling in forceClientDisconnect.
-     */
-    @Test
-    public void testforceClientDisconnectRemoteException() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
-        ArgumentCaptor<byte[]> macAddrCaptor = ArgumentCaptor.forClass(byte[].class);
-        doThrow(new RemoteException()).when(mIHostapdMock).forceClientDisconnect(
-                anyString(), macAddrCaptor.capture(), anyInt());
-
-        assertFalse(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client,
-                WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER));
-        verify(mIHostapdMock).forceClientDisconnect(eq(IFACE_NAME), any(byte[].class),
-                eq(Ieee80211ReasonCode.WLAN_REASON_PREV_AUTH_NOT_VALID));
-        assertTrue(test_client.equals(MacAddress.fromBytes(macAddrCaptor.getValue())));
-    }
-
-    /**
-     * Verifies the setting of log level.
-     */
-    @Test
-    public void testSetLogLevel() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        doNothing().when(mIHostapdMock).setDebugParams(anyInt());
-
-        mHostapdHal.enableVerboseLogging(false, true);
-        verify(mIHostapdMock, atLeastOnce())
-                .setDebugParams(eq(DebugLevel.DEBUG));
-
-        mHostapdHal.enableVerboseLogging(false, false);
-        verify(mIHostapdMock, atLeastOnce())
-                .setDebugParams(eq(DebugLevel.INFO));
-    }
-
-    /**
-     * Verifies the successful addition of access point with SAE.
-     */
-    @Test
-    public void testAddAccessPointSuccess_SAE_WithoutACS() throws Exception {
-        // Disable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-
-        doNothing().when(mIHostapdMock).addAccessPoint(
-                mIfaceParamsCaptor.capture(), mNetworkParamsCaptor.capture());
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA3_SAE,
-                mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().passphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point with SAE Transition.
-     */
-    @Test
-    public void testAddAccessPointSuccess_SAE_Transition_WithoutACS() throws Exception {
-        // Disable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION);
-        configurationBuilder.setBand(mBand256G);
-
-        doNothing().when(mIHostapdMock).addAccessPoint(
-                mIfaceParamsCaptor.capture(), mNetworkParamsCaptor.capture());
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA3_SAE_TRANSITION,
-                mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().passphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point when ACS is allowed to include DFS channels.
-     */
-    @Test
-    public void testAddAccessPointSuccess_WithACS_IncludeDFSChannels() throws Exception {
-        // Enable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mResources.setBoolean(R.bool.config_wifiSoftapAcsIncludeDfs, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setBand(mBand256G);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(mBand256G,
-                mIfaceParamsCaptor.getValue().channelParams[0].bandMask);
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[0].acsShouldExcludeDfs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-    }
-
-    /*
-     * Sunny day scenario for HostapdHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testHostapdCallbackEvent() throws Exception {
-        executeAndValidateInitializationSequence(true);
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setBand(SoftApConfiguration.BAND_2GHZ);
-
-        doNothing().when(mIHostapdMock).addAccessPoint(any(), any());
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        // Trigger on failure.
-        mIHostapdCallback.onFailure(IFACE_NAME, IFACE_NAME);
-        verify(mSoftApHalCallback).onFailure();
-        // Register SoftApManager callback
-        mHostapdHal.registerApCallback(IFACE_NAME, mSoftApHalCallback);
-
-        // Trigger on info changed and verify.
-        mockApInfoChangedAndVerify(1, mIHostapdCallback, mSoftApHalCallback);
-
-        // Trigger on client connected.
-        ClientInfo clientInfo = new ClientInfo();
-        clientInfo.ifaceName = IFACE_NAME;
-        clientInfo.apIfaceInstance = TEST_AP_INSTANCE;
-        clientInfo.clientAddress = MacAddress.fromString(TEST_CLIENT_MAC).toByteArray();
-        clientInfo.isConnected = true;
-        mIHostapdCallback.onConnectedClientsChanged(clientInfo);
-        verify(mSoftApHalCallback).onConnectedClientsChanged(eq(TEST_AP_INSTANCE),
-                eq(MacAddress.fromString(TEST_CLIENT_MAC)), eq(true));
-    }
-
-    /**
-     * Verifies the successful addition of access point with SAE with metered indication.
-     */
-    @Test
-    public void testAddAccessPointSuccess_WithMeteredSAE() throws Exception {
-        boolean isMetered = true;
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-
-        doNothing().when(mIHostapdMock).addAccessPoint(
-                mIfaceParamsCaptor.capture(), mNetworkParamsCaptor.capture());
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), isMetered,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA3_SAE,
-                mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().passphrase);
-        assertTrue(mNetworkParamsCaptor.getValue().isMetered);
-    }
-
-    /**
-     * Verifies the successful addition of access point with SAE with non metered indication.
-     */
-    @Test
-    public void testAddAccessPointSuccess_WithNonMeteredSAE() throws Exception {
-        boolean isMetered = false;
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-
-        doNothing().when(mIHostapdMock).addAccessPoint(
-                mIfaceParamsCaptor.capture(), mNetworkParamsCaptor.capture());
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), isMetered,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA3_SAE,
-                mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().passphrase);
-        assertFalse(mNetworkParamsCaptor.getValue().isMetered);
-    }
-
-    /**
-     * Verifies the successful addition of access point with Dual channel config.
-     */
-    @Test
-    public void testAddAccessPointSuccess_DualBandConfig() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS()); // dual band supported on S.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-
-        // Enable ACS and set available channels in the config.
-        final String acsChannelStr2g = "1,6,11-13";
-        final String acsChannelStr5g = "40";
-        final String acsChannelStr6g = "";
-        mResources.setString(R.string.config_wifiSoftap2gChannelList, acsChannelStr2g);
-        mResources.setString(R.string.config_wifiSoftap5gChannelList, acsChannelStr5g);
-        mResources.setString(R.string.config_wifiSoftap6gChannelList, acsChannelStr6g);
-
-        FrequencyRange freqRange1 = new FrequencyRange();
-        FrequencyRange freqRange2 = new FrequencyRange();
-        FrequencyRange freqRange3 = new FrequencyRange();
-
-        freqRange1.startMhz = freqRange1.endMhz = ApConfigUtil.convertChannelToFrequency(
-                1, SoftApConfiguration.BAND_2GHZ);
-        freqRange2.startMhz = freqRange2.endMhz = ApConfigUtil.convertChannelToFrequency(
-                6, SoftApConfiguration.BAND_2GHZ);
-        freqRange3.startMhz = ApConfigUtil.convertChannelToFrequency(
-                11, SoftApConfiguration.BAND_2GHZ);
-        freqRange3.endMhz = ApConfigUtil.convertChannelToFrequency(13,
-                SoftApConfiguration.BAND_2GHZ);
-        ArrayList<FrequencyRange> acsFreqRanges = new ArrayList<>();
-        acsFreqRanges.add(freqRange1);
-        acsFreqRanges.add(freqRange2);
-        acsFreqRanges.add(freqRange3);
-
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-
-        SparseIntArray dual_channels = new SparseIntArray(2);
-        dual_channels.put(SoftApConfiguration.BAND_5GHZ, 149);
-        dual_channels.put(SoftApConfiguration.BAND_2GHZ, 0);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setChannels(dual_channels);
-
-        doNothing().when(mIHostapdMock).addAccessPoint(
-                mIfaceParamsCaptor.capture(), mNetworkParamsCaptor.capture());
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AX);
-
-        // 2.4G band, ACS case.
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-        assertEquals(mIfaceParamsCaptor.getValue().channelParams[0].bandMask,
-                BandMask.BAND_2_GHZ);
-        assertEquals(mIfaceParamsCaptor.getValue().channelParams[0].channel, 0);
-        assertEquals(mIfaceParamsCaptor.getValue().channelParams[0]
-                .acsChannelFreqRangesMhz.length, acsFreqRanges.size());
-        for (int i = 0; i < acsFreqRanges.size(); i++) {
-            assertEquals(mIfaceParamsCaptor.getValue().channelParams[0]
-                    .acsChannelFreqRangesMhz[i].startMhz, acsFreqRanges.get(i).startMhz);
-            assertEquals(mIfaceParamsCaptor.getValue().channelParams[0]
-                    .acsChannelFreqRangesMhz[i].endMhz, acsFreqRanges.get(i).endMhz);
-        }
-
-        // 5G band, specific channel.
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams[1].enableAcs);
-        assertEquals(mIfaceParamsCaptor.getValue().channelParams[1].bandMask,
-                BandMask.BAND_5_GHZ);
-        assertEquals(mIfaceParamsCaptor.getValue().channelParams[1].channel, 149);
-
-        // No acsChannelFreqRangesMh
-        assertEquals(0,
-                mIfaceParamsCaptor.getValue().channelParams[1].acsChannelFreqRangesMhz.length);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA3_SAE,
-                mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().passphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point with metered SAE indication on the 80211ax
-     * supported device.
-     */
-    @Test
-    public void testAddAccessPointSuccess_WithMeteredSAEOn11AXSupportedDevice()
-            throws Exception {
-        boolean isMetered = true;
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mResources.setBoolean(R.bool.config_wifiSoftapIeee80211axSupported, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-
-        doNothing().when(mIHostapdMock).addAccessPoint(
-                mIfaceParamsCaptor.capture(), mNetworkParamsCaptor.capture());
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), isMetered,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AX);
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(EncryptionType.WPA3_SAE,
-                mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().passphrase);
-        assertTrue(mNetworkParamsCaptor.getValue().isMetered);
-    }
-
-    /**
-     * Verifies the successful addition of access point with metered SAE indication on the 80211ax
-     * supported device but 80211ax is disabled in configuration.
-     */
-    @Test
-    public void testAddAccessPointSuccess_WithMeteredSAEOn11AXSupportedDeviceBut11AXDisabled()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS()); // setIeee80211axEnabled() added on Android S.
-        boolean isMetered = true;
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mResources.setBoolean(R.bool.config_wifiSoftapIeee80211axSupported, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence(true);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-        configurationBuilder.setIeee80211axEnabled(false);
-
-        doNothing().when(mIHostapdMock).addAccessPoint(
-                mIfaceParamsCaptor.capture(), mNetworkParamsCaptor.capture());
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), isMetered,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().name);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AX);
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams[0].enableAcs);
-
-        assertEquals(NETWORK_SSID,
-                NativeUtil.stringFromByteArray(mNetworkParamsCaptor.getValue().ssid));
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(android.hardware.wifi.hostapd.EncryptionType.WPA3_SAE,
-                mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().passphrase);
-        assertTrue(mNetworkParamsCaptor.getValue().isMetered);
-    }
-
-    /**
-     * Verifies the onFailure event in bridged mode.
-     */
-    @Test
-    public void testHostapdCallbackOnFailureEventInBridgedMode() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        executeAndValidateInitializationSequence(true);
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setBands(new int[] {SoftApConfiguration.BAND_2GHZ,
-                SoftApConfiguration.BAND_5GHZ});
-
-        doNothing().when(mIHostapdMock).addAccessPoint(any(), any());
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        // Register SoftApManager callback
-        mHostapdHal.registerApCallback(IFACE_NAME, mSoftApHalCallback);
-
-        // Trigger on info changed and verify.
-        mockApInfoChangedAndVerify(2, mIHostapdCallback, mSoftApHalCallback);
-
-        // Trigger on failure from first instance.
-        mIHostapdCallback.onFailure(IFACE_NAME, TEST_AP_INSTANCE);
-        verify(mSoftApHalCallback).onInstanceFailure(TEST_AP_INSTANCE);
-
-        // Trigger on failure from second instance.
-        mIHostapdCallback.onFailure(IFACE_NAME, TEST_AP_INSTANCE_2);
-        verify(mSoftApHalCallback).onFailure();
-
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/HostapdHalHidlImpTest.java b/service/tests/wifitests/src/com/android/server/wifi/HostapdHalHidlImpTest.java
deleted file mode 100644
index d0ad11f..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/HostapdHalHidlImpTest.java
+++ /dev/null
@@ -1,1579 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static org.junit.Assert.*;
-import static org.junit.Assume.assumeTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.*;
-
-import android.app.test.MockAnswerUtil;
-import android.content.Context;
-import android.hardware.wifi.hostapd.V1_0.HostapdStatus;
-import android.hardware.wifi.hostapd.V1_0.HostapdStatusCode;
-import android.hardware.wifi.hostapd.V1_0.IHostapd;
-import android.hardware.wifi.hostapd.V1_1.IHostapdCallback;
-import android.hardware.wifi.hostapd.V1_2.DebugLevel;
-import android.hardware.wifi.hostapd.V1_3.Bandwidth;
-import android.hardware.wifi.hostapd.V1_3.Generation;
-import android.hidl.manager.V1_0.IServiceManager;
-import android.hidl.manager.V1_0.IServiceNotification;
-import android.net.MacAddress;
-import android.net.wifi.SoftApConfiguration;
-import android.net.wifi.SoftApConfiguration.Builder;
-import android.net.wifi.WifiManager;
-import android.os.Handler;
-import android.os.IHwBinder;
-import android.os.RemoteException;
-import android.os.test.TestLooper;
-import android.util.SparseIntArray;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.util.ApConfigUtil;
-import com.android.server.wifi.util.NativeUtil;
-import com.android.wifi.resources.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InOrder;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-
-/**
- * Unit tests for HostapdHal
- */
-@SmallTest
-public class HostapdHalHidlImpTest extends WifiBaseTest {
-    private static final String IFACE_NAME = "mock-wlan0";
-    private static final String NETWORK_SSID = "test-ssid";
-    private static final String NETWORK_PSK = "test-psk";
-    private static final String TEST_CLIENT_MAC = "11:22:33:44:55:66";
-    private static final String TEST_AP_INSTANCE = "instance-wlan0";
-
-    private final int mBand256G = SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ
-            | SoftApConfiguration.BAND_6GHZ;
-
-    private @Mock Context mContext;
-    private @Mock IServiceManager mServiceManagerMock;
-    private @Mock IHostapd mIHostapdMock;
-    private @Mock WifiNative.HostapdDeathEventHandler mHostapdHalDeathHandler;
-    private @Mock WifiNative.SoftApHalCallback mSoftApHalCallback;
-    private android.hardware.wifi.hostapd.V1_1.IHostapd mIHostapdMockV11;
-    private android.hardware.wifi.hostapd.V1_2.IHostapd mIHostapdMockV12;
-    private android.hardware.wifi.hostapd.V1_3.IHostapd mIHostapdMockV13;
-    private IHostapdCallback mIHostapdCallback;
-    private android.hardware.wifi.hostapd.V1_3.IHostapdCallback mIHostapdCallback13;
-    private MockResources mResources;
-    HostapdStatus mStatusSuccess;
-    HostapdStatus mStatusFailure;
-    android.hardware.wifi.hostapd.V1_2.HostapdStatus mStatusSuccess12;
-    android.hardware.wifi.hostapd.V1_2.HostapdStatus mStatusFailure12;
-    private TestLooper mLooper = new TestLooper();
-    private HostapdHalHidlImp mHostapdHal;
-    private ArgumentCaptor<IHwBinder.DeathRecipient> mServiceManagerDeathCaptor =
-            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
-    private ArgumentCaptor<IHwBinder.DeathRecipient> mHostapdDeathCaptor =
-            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
-    private ArgumentCaptor<IServiceNotification.Stub> mServiceNotificationCaptor =
-            ArgumentCaptor.forClass(IServiceNotification.Stub.class);
-    private ArgumentCaptor<IHostapd.IfaceParams> mIfaceParamsCaptor =
-            ArgumentCaptor.forClass(IHostapd.IfaceParams.class);
-    private ArgumentCaptor<android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams>
-            mIfaceParamsCaptorV11 =
-            ArgumentCaptor.forClass(android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams.class);
-    private ArgumentCaptor<android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams>
-            mIfaceParamsCaptorV12 =
-            ArgumentCaptor.forClass(android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams.class);
-    private ArgumentCaptor<android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams>
-            mIfaceParamsCaptorV13 =
-            ArgumentCaptor.forClass(android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams.class);
-    private ArgumentCaptor<IHostapd.NetworkParams> mNetworkParamsCaptor =
-            ArgumentCaptor.forClass(IHostapd.NetworkParams.class);
-    private ArgumentCaptor<android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams>
-            mNetworkParamsV12Captor = ArgumentCaptor.forClass(
-            android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams.class);
-    private ArgumentCaptor<android.hardware.wifi.hostapd.V1_3.IHostapd.NetworkParams>
-            mNetworkParamsV13Captor = ArgumentCaptor.forClass(
-            android.hardware.wifi.hostapd.V1_3.IHostapd.NetworkParams.class);
-    private ArgumentCaptor<Long> mDeathRecipientCookieCaptor = ArgumentCaptor.forClass(Long.class);
-    private InOrder mInOrder;
-
-    private class HostapdHalSpy extends HostapdHalHidlImp {
-        HostapdHalSpy() {
-            super(mContext, new Handler(mLooper.getLooper()));
-        }
-
-        @Override
-        protected IServiceManager getServiceManagerMockable() throws RemoteException {
-            return mServiceManagerMock;
-        }
-
-        @Override
-        protected IHostapd getHostapdMockable() throws RemoteException {
-            return mIHostapdMock;
-        }
-
-        @Override
-        protected android.hardware.wifi.hostapd.V1_1.IHostapd getHostapdMockableV1_1()
-                throws RemoteException {
-            return mIHostapdMockV11;
-        }
-
-        @Override
-        protected android.hardware.wifi.hostapd.V1_2.IHostapd getHostapdMockableV1_2()
-                throws RemoteException {
-            return mIHostapdMockV12;
-        }
-
-        @Override
-        protected android.hardware.wifi.hostapd.V1_3.IHostapd getHostapdMockableV1_3()
-                throws RemoteException {
-            return mIHostapdMockV13;
-        }
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mResources = new MockResources();
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
-        mResources.setBoolean(R.bool.config_wifi_softap_ieee80211ac_supported, false);
-        mResources.setBoolean(R.bool.config_wifiSoftapIeee80211axSupported, false);
-        mResources.setBoolean(R.bool.config_wifiSoftap6ghzSupported, false);
-        mResources.setBoolean(R.bool.config_wifiSoftapAcsIncludeDfs, false);
-        mResources.setString(R.string.config_wifiSoftap2gChannelList, "");
-        mResources.setString(R.string.config_wifiSoftap5gChannelList, "");
-        mResources.setString(R.string.config_wifiSoftap6gChannelList, "");
-
-        mStatusSuccess = createHostapdStatus(HostapdStatusCode.SUCCESS);
-        mStatusFailure = createHostapdStatus(HostapdStatusCode.FAILURE_UNKNOWN);
-
-
-        mStatusSuccess12 = createHostapdStatus_1_2(HostapdStatusCode.SUCCESS);
-        mStatusFailure12 = createHostapdStatus_1_2(HostapdStatusCode.FAILURE_UNKNOWN);
-
-        when(mContext.getResources()).thenReturn(mResources);
-        when(mServiceManagerMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
-                anyLong())).thenReturn(true);
-        when(mServiceManagerMock.registerForNotifications(anyString(), anyString(),
-                any(IServiceNotification.Stub.class))).thenReturn(true);
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.EMPTY);
-        when(mIHostapdMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
-                anyLong())).thenReturn(true);
-        when(mIHostapdMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
-                anyLong())).thenReturn(true);
-        when(mIHostapdMock.addAccessPoint(
-                mIfaceParamsCaptor.capture(), mNetworkParamsCaptor.capture()))
-                .thenReturn(mStatusSuccess);
-        when(mIHostapdMock.removeAccessPoint(any())).thenReturn(mStatusSuccess);
-        mHostapdHal = new HostapdHalSpy();
-    }
-
-    /**
-     * Sunny day scenario for HostapdHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_success() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-    }
-
-    /**
-     * Failure scenario for HostapdHal initialization
-     */
-    @Test
-    public void testInitialize_registerException() throws Exception {
-        executeAndValidateInitializationSequence(true, false);
-    }
-
-    /**
-     * Failure scenario for HostapdHal initialization
-     */
-    @Test
-    public void testInitialize_registerFailure() throws Exception {
-        executeAndValidateInitializationSequence(false, true);
-    }
-
-    /**
-     * Sunny day scenario for V1.1 HostapdHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_successV1_1() throws Exception {
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        executeAndValidateInitializationSequenceV1_1(false);
-    }
-
-    /**
-     * Failure scenario for V1.1 HostapdHal initialization
-     */
-    @Test
-    public void testInitialize_registerCallbackFailureV1_1() throws Exception {
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        executeAndValidateInitializationSequenceV1_1(true);
-    }
-
-    /**
-     * Verifies the hostapd death handling.
-     */
-    @Test
-    public void testDeathHandling() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        mHostapdHal.registerDeathHandler(mHostapdHalDeathHandler);
-        mHostapdDeathCaptor.getValue().serviceDied(mDeathRecipientCookieCaptor.getValue());
-        mLooper.dispatchAll();
-        verify(mHostapdHalDeathHandler).onDeath();
-    }
-
-    /**
-     * Verifies the hostapd death handling.
-     */
-    @Test
-    public void testStaleDeathHandling() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        mHostapdHal.registerDeathHandler(mHostapdHalDeathHandler);
-        mHostapdDeathCaptor.getValue().serviceDied(mDeathRecipientCookieCaptor.getValue() - 1);
-        mLooper.dispatchAll();
-        verify(mHostapdHalDeathHandler, never()).onDeath();
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_Band2G() throws Exception {
-        executeAndValidateInitializationSequence();
-        final int apChannel = 6;
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_2GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(IHostapd.Band.BAND_2_4_GHZ, mIfaceParamsCaptor.getValue().channelParams.band);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
-        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams.channel);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsCaptor.getValue().ssid);
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Open_Band5G() throws Exception {
-        executeAndValidateInitializationSequence();
-        final int apChannel = 149;
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(true);
-        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_5GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(IHostapd.Band.BAND_5_GHZ, mIfaceParamsCaptor.getValue().channelParams.band);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
-        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams.channel);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsCaptor.getValue().ssid);
-        assertTrue(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(IHostapd.EncryptionType.NONE, mNetworkParamsCaptor.getValue().encryptionType);
-        assertNotNull(mNetworkParamsCaptor.getValue().pskPassphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_Band5G_Hidden() throws Exception {
-        executeAndValidateInitializationSequence();
-        final int apChannel = 149;
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(true);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_5GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(IHostapd.Band.BAND_5_GHZ, mIfaceParamsCaptor.getValue().channelParams.band);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
-        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams.channel);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsCaptor.getValue().ssid);
-        assertTrue(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_Band2G_WithACS() throws Exception {
-        // Enable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence();
-        final int apChannel = 6;
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_2GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(IHostapd.Band.BAND_2_4_GHZ, mIfaceParamsCaptor.getValue().channelParams.band);
-        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams.channel);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsCaptor.getValue().ssid);
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_Band2G_WithIeee80211AC() throws Exception {
-        // Enable ACS & 80211AC in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mResources.setBoolean(R.bool.config_wifi_softap_ieee80211ac_supported, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence();
-        final int apChannel = 6;
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_2GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(IHostapd.Band.BAND_2_4_GHZ, mIfaceParamsCaptor.getValue().channelParams.band);
-        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams.channel);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsCaptor.getValue().ssid);
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_BandAny_WithACS() throws Exception {
-        // Enable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence();
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setBand(mBand256G);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(IHostapd.Band.BAND_ANY, mIfaceParamsCaptor.getValue().channelParams.band);
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsCaptor.getValue().ssid);
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_WithoutACS() throws Exception {
-        // Disable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence();
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setBand(mBand256G);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsCaptor.getValue().ssid);
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point.
-     * Verifies that channel info for ACS is handled.
-     */
-    @Test
-    public void testAddAccessPointSuccess_Psk_BandAny_WithACS_AcsChannels() throws Exception {
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        // Enable ACS and set available channels in the config.
-        final String acsChannelStr2g = "1,6,11-13";
-        final String acsChannelStr5g = "40";
-        final String acsChannelStr6g = "";
-        android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange channelRange1 =
-                new android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange();
-        android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange channelRange2 =
-                new android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange();
-        android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange channelRange3 =
-                new android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange();
-        android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange channelRange4 =
-                new android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange();
-        channelRange1.start = channelRange1.end = 1;
-        channelRange2.start = channelRange2.end = 6;
-        channelRange3.start = 11;
-        channelRange3.end = 13;
-        channelRange4.start = channelRange4.end = 40;
-        ArrayList<android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange> acsChannelRanges =
-                new ArrayList<>();
-        acsChannelRanges.add(channelRange1);
-        acsChannelRanges.add(channelRange2);
-        acsChannelRanges.add(channelRange3);
-        acsChannelRanges.add(channelRange4);
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mResources.setString(R.string.config_wifiSoftap2gChannelList, acsChannelStr2g);
-        mResources.setString(R.string.config_wifiSoftap5gChannelList, acsChannelStr5g);
-        mResources.setString(R.string.config_wifiSoftap6gChannelList, acsChannelStr6g);
-        mHostapdHal = new HostapdHalSpy();
-
-        when(mIHostapdMockV11.addAccessPoint_1_1(
-                mIfaceParamsCaptorV11.capture(), mNetworkParamsCaptor.capture()))
-                .thenReturn(mStatusSuccess);
-
-        executeAndValidateInitializationSequenceV1_1(false);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setBand(mBand256G);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMockV11).addAccessPoint_1_1(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptorV11.getValue().V1_0.ifaceName);
-        assertTrue(mIfaceParamsCaptorV11.getValue().V1_0.hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptorV11.getValue().V1_0.hwModeParams.enable80211AC);
-        assertEquals(IHostapd.Band.BAND_ANY,
-                mIfaceParamsCaptorV11.getValue().V1_0.channelParams.band);
-        assertTrue(mIfaceParamsCaptorV11.getValue().V1_0.channelParams.enableAcs);
-        assertTrue(mIfaceParamsCaptorV11.getValue().V1_0.channelParams.acsShouldExcludeDfs);
-        assertEquals(acsChannelRanges,
-                mIfaceParamsCaptorV11.getValue().channelParams.acsChannelRanges);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsCaptor.getValue().ssid);
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
-    }
-
-    /**
-     * Verifies the failure handling in addition of access point.
-     */
-    @Test
-    public void testAddAccessPointFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        when(mIHostapdMock.addAccessPoint(any(), any())).thenReturn(mStatusFailure);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(true);
-        configurationBuilder.setChannel(6, SoftApConfiguration.BAND_2GHZ);
-
-        assertFalse(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-    }
-
-    /**
-     * Verifies the failure handling in addition of access point.
-     */
-    @Test
-    public void testAddAccessPointRemoteException() throws Exception {
-        executeAndValidateInitializationSequence();
-        doThrow(new RemoteException()).when(mIHostapdMock).addAccessPoint(any(), any());
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(true);
-        configurationBuilder.setChannel(6, SoftApConfiguration.BAND_2GHZ);
-
-        assertFalse(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-    }
-
-    /**
-     * Verifies the successful removal of access point.
-     */
-    @Test
-    public void testRemoveAccessPointSuccess() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        assertTrue(mHostapdHal.removeAccessPoint(IFACE_NAME));
-        verify(mIHostapdMock).removeAccessPoint(any());
-    }
-
-    /**
-     * Verifies the failure handling in removal of access point.
-     */
-    @Test
-    public void testRemoveAccessPointFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        when(mIHostapdMock.removeAccessPoint(any())).thenReturn(mStatusFailure);
-
-        assertFalse(mHostapdHal.removeAccessPoint(IFACE_NAME));
-        verify(mIHostapdMock).removeAccessPoint(any());
-    }
-
-    /**
-     * Verifies the failure handling in addition of access point.
-     */
-    @Test
-    public void testRemoveAccessPointRemoteException() throws Exception {
-        executeAndValidateInitializationSequence();
-        doThrow(new RemoteException()).when(mIHostapdMock).removeAccessPoint(any());
-
-        assertFalse(mHostapdHal.removeAccessPoint(IFACE_NAME));
-        verify(mIHostapdMock).removeAccessPoint(any());
-    }
-
-    /**
-     * Verifies the handling of onFailure callback from hostapd.
-     */
-    @Test
-    public void testOnFailureCallbackHandling() throws Exception {
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        when(mIHostapdMockV11.addAccessPoint_1_1(
-                mIfaceParamsCaptorV11.capture(), mNetworkParamsCaptor.capture()))
-                .thenReturn(mStatusSuccess);
-        executeAndValidateInitializationSequenceV1_1(false);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setBand(SoftApConfiguration.BAND_2GHZ);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMockV11).addAccessPoint_1_1(any(), any());
-
-        // Trigger on failure.
-        mIHostapdCallback.onFailure(IFACE_NAME);
-        verify(mSoftApHalCallback).onFailure();
-
-        // Now remove the access point and ensure that the callback is no longer handled.
-        reset(mSoftApHalCallback);
-        assertTrue(mHostapdHal.removeAccessPoint(IFACE_NAME));
-        mIHostapdCallback.onFailure(IFACE_NAME);
-        verify(mSoftApHalCallback, never()).onFailure();
-    }
-
-    private void executeAndValidateInitializationSequence() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-    }
-
-    /**
-     * Calls.initialize() on HIDL 1.0, mocking various callback answers and verifying flow,
-     * asserting for the expected result. Verifies if IHostapd manager is initialized or reset.
-     */
-    private void executeAndValidateInitializationSequence(
-            boolean causeRegisterRemoteException, boolean causeRegisterFailure) throws Exception {
-        boolean shouldSucceed = !causeRegisterRemoteException && !causeRegisterFailure;
-        mInOrder = inOrder(mServiceManagerMock, mIHostapdMock);
-        if (causeRegisterFailure) {
-            when(mServiceManagerMock.registerForNotifications(anyString(), anyString(),
-                    any(IServiceNotification.Stub.class))).thenReturn(false);
-        } else if (causeRegisterRemoteException) {
-            doThrow(new RemoteException()).when(mServiceManagerMock)
-                    .registerForNotifications(
-                            anyString(), anyString(), any(IServiceNotification.Stub.class));
-        }
-        // Initialize HostapdHal, should call serviceManager.registerForNotifications
-        assertEquals(shouldSucceed, mHostapdHal.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
-                anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(IHostapd.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        if (shouldSucceed) {
-            // act: cause the onRegistration(...) callback to execute
-            mServiceNotificationCaptor.getValue().onRegistration(IHostapd.kInterfaceName, "", true);
-            assertTrue(mHostapdHal.isInitializationComplete());
-            mInOrder.verify(mIHostapdMock).linkToDeath(mHostapdDeathCaptor.capture(),
-                    mDeathRecipientCookieCaptor.capture());
-        } else {
-            assertFalse(mHostapdHal.isInitializationComplete());
-            mInOrder.verify(mIHostapdMock, never()).linkToDeath(
-                    mHostapdDeathCaptor.capture(), anyLong());
-        }
-    }
-
-    /**
-     * Calls.initialize() on HIDL V1.1, mocking various callback answers and verifying flow,
-     * asserting for the expected result. Verifies if IHostapd manager is initialized or reset.
-     */
-    private void executeAndValidateInitializationSequenceV1_1(
-            boolean causeCallbackFailure) throws Exception {
-        boolean shouldSucceed = !causeCallbackFailure;
-        mInOrder = inOrder(mServiceManagerMock, mIHostapdMock);
-        if (causeCallbackFailure) {
-            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-                public HostapdStatus answer(IHostapdCallback cb)
-                        throws RemoteException {
-                    return mStatusFailure;
-                }
-            }).when(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
-        } else {
-            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-                public HostapdStatus answer(IHostapdCallback cb)
-                        throws RemoteException {
-                    mIHostapdCallback = cb;
-                    return mStatusSuccess;
-                }
-            }).when(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
-        }
-        // Initialize HostapdHal, should call serviceManager.registerForNotifications
-        assertTrue(mHostapdHal.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
-                anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(IHostapd.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        // act: cause the onRegistration(...) callback to execute
-        mServiceNotificationCaptor.getValue().onRegistration(IHostapd.kInterfaceName, "", true);
-        assertEquals(shouldSucceed, mHostapdHal.isInitializationComplete());
-        mInOrder.verify(mIHostapdMock).linkToDeath(mHostapdDeathCaptor.capture(), anyLong());
-        verify(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
-    }
-
-    /**
-     * Calls.initialize() on HIDL 1.2, mocking various callback answers and verifying flow,
-     * asserting for the expected result. Verifies if IHostapd manager is initialized or reset.
-     */
-    private void executeAndValidateInitializationSequenceV1_2(
-            boolean causeCallbackFailure) throws Exception {
-        boolean shouldSucceed = !causeCallbackFailure;
-        mInOrder = inOrder(mServiceManagerMock, mIHostapdMock);
-        when(mIHostapdMockV12.setDebugParams(anyInt()))
-                .thenReturn(mStatusSuccess12);
-        if (causeCallbackFailure) {
-            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-                public HostapdStatus answer(IHostapdCallback cb)
-                        throws RemoteException {
-                    return mStatusFailure;
-                }
-            }).when(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
-        } else {
-            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-                public HostapdStatus answer(IHostapdCallback cb)
-                        throws RemoteException {
-                    mIHostapdCallback = cb;
-                    return mStatusSuccess;
-                }
-            }).when(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
-        }
-        // Initialize HostapdHal, should call serviceManager.registerForNotifications
-        assertTrue(mHostapdHal.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
-                anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(IHostapd.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        // act: cause the onRegistration(...) callback to execute
-        mServiceNotificationCaptor.getValue().onRegistration(IHostapd.kInterfaceName, "", true);
-        assertEquals(shouldSucceed, mHostapdHal.isInitializationComplete());
-        mInOrder.verify(mIHostapdMock).linkToDeath(mHostapdDeathCaptor.capture(), anyLong());
-        verify(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
-    }
-
-    /**
-     * Calls.initialize() on HIDL 1.3, mocking various callback answers and verifying flow,
-     * asserting for the expected result. Verifies if IHostapd manager is initialized or reset.
-     */
-    private void executeAndValidateInitializationSequenceV1_3(
-            boolean causeCallbackFailure) throws Exception {
-        boolean shouldSucceed = !causeCallbackFailure;
-        mInOrder = inOrder(mServiceManagerMock, mIHostapdMock);
-        when(mIHostapdMockV12.setDebugParams(anyInt()))
-                .thenReturn(mStatusSuccess12);
-        if (causeCallbackFailure) {
-            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-                public android.hardware.wifi.hostapd.V1_2.HostapdStatus answer(
-                        android.hardware.wifi.hostapd.V1_3.IHostapdCallback cb)
-                        throws RemoteException {
-                    return mStatusFailure12;
-                }
-            }).when(mIHostapdMockV13).registerCallback_1_3(
-                    any(android.hardware.wifi.hostapd.V1_3.IHostapdCallback.class));
-        } else {
-            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-                public android.hardware.wifi.hostapd.V1_2.HostapdStatus answer(
-                        android.hardware.wifi.hostapd.V1_3.IHostapdCallback cb)
-                        throws RemoteException {
-                    mIHostapdCallback13 = cb;
-                    return mStatusSuccess12;
-                }
-            }).when(mIHostapdMockV13).registerCallback_1_3(
-                    any(android.hardware.wifi.hostapd.V1_3.IHostapdCallback.class));
-        }
-        // Initialize HostapdHal, should call serviceManager.registerForNotifications
-        assertTrue(mHostapdHal.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
-                anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(IHostapd.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        // act: cause the onRegistration(...) callback to execute
-        mServiceNotificationCaptor.getValue().onRegistration(IHostapd.kInterfaceName, "", true);
-        assertEquals(shouldSucceed, mHostapdHal.isInitializationComplete());
-        mInOrder.verify(mIHostapdMock).linkToDeath(mHostapdDeathCaptor.capture(), anyLong());
-        verify(mIHostapdMockV11, never()).registerCallback(any(IHostapdCallback.class));
-        verify(mIHostapdMockV13).registerCallback_1_3(
-                any(android.hardware.wifi.hostapd.V1_3.IHostapdCallback.class));
-    }
-
-    /**
-     * Calls.initialize() on last HIDL, mocking various callback answers and verifying flow,
-     * asserting for the expected result. Verifies if IHostapd manager is initialized or reset.
-     */
-    private void executeAndValidateInitializationSequenceOnLastHIDL(
-            boolean causeCallbackFailure) throws Exception {
-        executeAndValidateInitializationSequenceV1_3(causeCallbackFailure);
-    }
-
-    private HostapdStatus createHostapdStatus(int code) {
-        HostapdStatus status = new HostapdStatus();
-        status.code = code;
-        return status;
-    }
-
-    private android.hardware.wifi.hostapd.V1_2.HostapdStatus createHostapdStatus_1_2(int code) {
-        android.hardware.wifi.hostapd.V1_2.HostapdStatus status =
-                new android.hardware.wifi.hostapd.V1_2.HostapdStatus();
-        status.code = code;
-        return status;
-    }
-
-    /**
-     * Verifies the successful execute forceClientDisconnect.
-     */
-    @Test
-    public void testForceClientDisconnectSuccess() throws Exception {
-        executeAndValidateInitializationSequence();
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        when(mIHostapdMockV12.forceClientDisconnect(any(), any(), anyShort()))
-                .thenReturn(mStatusSuccess12);
-
-        assertTrue(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client,
-                WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER));
-        verify(mIHostapdMockV12).forceClientDisconnect(any(), any(), anyShort());
-    }
-
-    @Test
-    public void testForceClientDisconnectFailureDueToInvalidArg() throws Exception {
-        executeAndValidateInitializationSequence();
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        when(mIHostapdMockV12.forceClientDisconnect(any(), any(), anyShort()))
-                .thenReturn(mStatusSuccess12);
-
-        try {
-            mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client, -1);
-            fail();
-        } catch (IllegalArgumentException e) {
-        }
-    }
-
-    /**
-     * Verifies the failure handling in forceClientDisconnect.
-     */
-    @Test
-    public void testForceClientDisconnectFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        when(mIHostapdMockV12.forceClientDisconnect(any(), any(), anyShort()))
-                .thenReturn(mStatusFailure12);
-
-        assertFalse(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client,
-                WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER));
-        verify(mIHostapdMockV12).forceClientDisconnect(any(), any(), anyShort());
-    }
-
-    /**
-     * Verifies the exception handling in forceClientDisconnect.
-     */
-    @Test
-    public void testforceClientDisconnectRemoteException() throws Exception {
-        executeAndValidateInitializationSequence();
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        doThrow(new RemoteException()).when(mIHostapdMockV12)
-                .forceClientDisconnect(any(), any(), anyShort());
-
-        assertFalse(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client, 0));
-        verify(mIHostapdMockV12).forceClientDisconnect(any(), any(), anyShort());
-    }
-
-    /**
-     * Verifies the HIDL not support handling in forceClientDisconnect.
-     */
-    @Test
-    public void testforceClientDisconnectHIDLNotSupport() throws Exception {
-        executeAndValidateInitializationSequence();
-        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
-
-        assertFalse(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client, 0));
-    }
-
-    /**
-     * Verifies the setting of log level.
-     */
-    @Test
-    public void testSetLogLevel() throws Exception {
-        executeAndValidateInitializationSequence();
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        when(mIHostapdMockV12.setDebugParams(anyInt()))
-                .thenReturn(mStatusSuccess12);
-
-        mHostapdHal.enableVerboseLogging(false, true);
-        verify(mIHostapdMockV12)
-                .setDebugParams(eq(DebugLevel.DEBUG));
-
-        mHostapdHal.enableVerboseLogging(false, false);
-        verify(mIHostapdMockV12)
-                .setDebugParams(eq(DebugLevel.INFO));
-    }
-
-    /*
-     * Sunny day scenario for V1.2 HostapdHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_successV1_2() throws Exception {
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_2.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        executeAndValidateInitializationSequenceV1_2(false);
-    }
-
-    /*
-     * Sunny day scenario for V1.3 HostapdHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_successV1_3() throws Exception {
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_2.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_3.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
-        executeAndValidateInitializationSequenceV1_3(false);
-    }
-
-    /**
-     * Failure scenario for V1.1 HostapdHal initialization
-     */
-    @Test
-    public void testInitialize_registerCallbackFailureV1_3() throws Exception {
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_2.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_3.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
-        executeAndValidateInitializationSequenceV1_3(true);
-    }
-
-    /**
-     * Verifies the successful addition of access point with SAE.
-     */
-    @Test
-    public void testAddAccessPointSuccess_SAE_WithoutACS() throws Exception {
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
-        // Disable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequenceOnLastHIDL(false);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-
-        when(mIHostapdMockV13.addAccessPoint_1_3(
-                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
-                .thenReturn(mStatusSuccess12);
-
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
-        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
-        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
-                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
-        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point with SAE Transition.
-     */
-    @Test
-    public void testAddAccessPointSuccess_SAE_Transition_WithoutACS() throws Exception {
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
-        // Disable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequenceOnLastHIDL(false);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION);
-        configurationBuilder.setBand(mBand256G);
-
-        when(mIHostapdMockV13.addAccessPoint_1_3(
-                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
-                .thenReturn(mStatusSuccess12);
-
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
-        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
-        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE_TRANSITION,
-                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
-        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
-    }
-
-    /**
-     * Verifies the failure handling addition of access point with SAE Transition in old hal.
-     */
-    @Test
-    public void testAddAccessPointFailure_SAEWithOldHal() throws Exception {
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        // Disable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequenceV1_1(false);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-
-        assertFalse(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-    }
-
-    /**
-     * Verifies the successful addition of access point when ACS is allowed to include DFS channels.
-     */
-    @Test
-    public void testAddAccessPointSuccess_WithACS_IncludeDFSChannels() throws Exception {
-        // Enable ACS in the config.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mResources.setBoolean(R.bool.config_wifiSoftapAcsIncludeDfs, true);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequence();
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        configurationBuilder.setBand(mBand256G);
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMock).addAccessPoint(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
-        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
-        assertEquals(IHostapd.Band.BAND_ANY, mIfaceParamsCaptor.getValue().channelParams.band);
-        assertTrue(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
-        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsCaptor.getValue().ssid);
-        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
-        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
-    }
-
-
-    /*
-     * Sunny day scenario for V1.3 HostapdHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testHostapdCallbackEventAfter1_3() throws Exception {
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_2.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        when(mServiceManagerMock.getTransport(eq(
-                android.hardware.wifi.hostapd.V1_3.IHostapd.kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
-        executeAndValidateInitializationSequenceV1_3(false);
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setBand(SoftApConfiguration.BAND_2GHZ);
-
-        when(mIHostapdMockV13.addAccessPoint_1_3(any(), any()))
-                .thenReturn(mStatusSuccess12);
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
-
-        // Trigger on failure.
-        mIHostapdCallback13.onFailure(IFACE_NAME);
-        verify(mSoftApHalCallback).onFailure();
-        // Register SoftApManager callback
-        mHostapdHal.registerApCallback(IFACE_NAME, mSoftApHalCallback);
-
-        int testFreq = 2412;
-        int testBandwidth = Bandwidth.WIFI_BANDWIDTH_20;
-        int testGeneration = Generation.WIFI_STANDARD_11N;
-        // Trigger on info changed.
-        mIHostapdCallback13.onApInstanceInfoChanged(IFACE_NAME, TEST_AP_INSTANCE,
-                testFreq, testBandwidth, testGeneration,
-                MacAddress.fromString(TEST_CLIENT_MAC).toByteArray());
-        verify(mSoftApHalCallback).onInfoChanged(eq(TEST_AP_INSTANCE), eq(testFreq),
-                eq(mHostapdHal.mapHalBandwidthToSoftApInfo(testBandwidth)),
-                eq(mHostapdHal.mapHalGenerationToWifiStandard(testGeneration)),
-                eq(MacAddress.fromString(TEST_CLIENT_MAC)));
-
-        // Trigger on client connected.
-        mIHostapdCallback13.onConnectedClientsChanged(IFACE_NAME, TEST_AP_INSTANCE,
-                MacAddress.fromString(TEST_CLIENT_MAC).toByteArray(), true);
-        verify(mSoftApHalCallback).onConnectedClientsChanged(eq(TEST_AP_INSTANCE),
-                eq(MacAddress.fromString(TEST_CLIENT_MAC)), eq(true));
-    }
-
-    /**
-     * Verifies the successful addition of access point with SAE with metered indication.
-     */
-    @Test
-    public void testAddAccessPointSuccess_WithMeteredSAE() throws Exception {
-        boolean isMetered = true;
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequenceOnLastHIDL(false);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-
-        when(mIHostapdMockV13.addAccessPoint_1_3(
-                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
-                .thenReturn(mStatusSuccess12);
-
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), isMetered,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
-        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
-        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
-                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
-        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
-        assertTrue(mNetworkParamsV13Captor.getValue().isMetered);
-    }
-
-    /**
-     * Verifies the successful addition of access point with SAE with non metered indication.
-     */
-    @Test
-    public void testAddAccessPointSuccess_WithNonMeteredSAE() throws Exception {
-        boolean isMetered = false;
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequenceOnLastHIDL(false);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-
-        when(mIHostapdMockV13.addAccessPoint_1_3(
-                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
-                .thenReturn(mStatusSuccess12);
-
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), isMetered,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
-        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
-        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
-                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
-        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
-        assertFalse(mNetworkParamsV13Captor.getValue().isMetered);
-    }
-
-    /**
-     * Verifies the successful addition of access point with Dual channel config.
-     */
-    @Test
-    public void testAddAccessPointSuccess_DualBandConfig() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS()); // dual band supported on S.
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
-        // Enable ACS and set available channels in the config.
-        final String acsChannelStr2g = "1,6,11-13";
-        final String acsChannelStr5g = "40";
-        final String acsChannelStr6g = "";
-        mResources.setString(R.string.config_wifiSoftap2gChannelList, acsChannelStr2g);
-        mResources.setString(R.string.config_wifiSoftap5gChannelList, acsChannelStr5g);
-        mResources.setString(R.string.config_wifiSoftap6gChannelList, acsChannelStr6g);
-
-        android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange freqRange1 =
-                new android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange();
-        android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange freqRange2 =
-                new android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange();
-        android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange freqRange3 =
-                new android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange();
-        android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange freqRange4 =
-                new android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange();
-
-        freqRange1.start = freqRange1.end = ApConfigUtil.convertChannelToFrequency(
-                1, SoftApConfiguration.BAND_2GHZ);
-        freqRange2.start = freqRange2.end = ApConfigUtil.convertChannelToFrequency(
-                6, SoftApConfiguration.BAND_2GHZ);
-        freqRange3.start = ApConfigUtil.convertChannelToFrequency(11,
-                SoftApConfiguration.BAND_2GHZ);
-        freqRange3.end = ApConfigUtil.convertChannelToFrequency(13, SoftApConfiguration.BAND_2GHZ);
-        ArrayList<android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange> acsFreqRanges =
-                new ArrayList<>();
-        acsFreqRanges.add(freqRange1);
-        acsFreqRanges.add(freqRange2);
-        acsFreqRanges.add(freqRange3);
-
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequenceOnLastHIDL(false);
-
-        SparseIntArray dual_channels = new SparseIntArray(2);
-        dual_channels.put(SoftApConfiguration.BAND_5GHZ, 149);
-        dual_channels.put(SoftApConfiguration.BAND_2GHZ, 0);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setChannels(dual_channels);
-
-        when(mIHostapdMockV13.addAccessPoint_1_3(
-                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
-                .thenReturn(mStatusSuccess12);
-
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), true,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.hwModeParams.enable80211AX);
-        // 2.4G band, ACS case.
-        assertTrue(mIfaceParamsCaptorV13.getValue().channelParamsList.get(0).enableAcs);
-        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(0).V1_2.bandMask,
-                android.hardware.wifi.hostapd.V1_2.IHostapd.BandMask.BAND_2_GHZ);
-        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(0).channel, 0);
-        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(0)
-                .V1_2.acsChannelFreqRangesMhz, acsFreqRanges);
-        // 5G band, specific channel.
-        assertFalse(mIfaceParamsCaptorV13.getValue().channelParamsList.get(1).enableAcs);
-        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(1).V1_2.bandMask,
-                android.hardware.wifi.hostapd.V1_2.IHostapd.BandMask.BAND_5_GHZ);
-        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(1).channel, 149);
-        // No acsChannelFreqRangesMh
-        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(1)
-                .V1_2.acsChannelFreqRangesMhz.size(), 0);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
-        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
-        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
-                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
-        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
-    }
-
-    /**
-     * Verifies the successful addition of access point with metered SAE indication on the 80211ax
-     * supported device.
-     */
-    @Test
-    public void testAddAccessPointSuccess_WithMeteredSAEOn11AXSupportedDevice()
-            throws Exception {
-        boolean isMetered = true;
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mResources.setBoolean(R.bool.config_wifiSoftapIeee80211axSupported, true);
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequenceOnLastHIDL(false);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-
-        when(mIHostapdMockV13.addAccessPoint_1_3(
-                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
-                .thenReturn(mStatusSuccess12);
-
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), isMetered,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.hwModeParams.enable80211AX);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
-        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
-        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
-                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
-        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
-        assertTrue(mNetworkParamsV13Captor.getValue().isMetered);
-    }
-
-    /**
-     * Verifies the successful addition of access point with metered SAE indication on the 80211ax
-     * supported device but 80211ax is disabled in configuration.
-     */
-    @Test
-    public void testAddAccessPointSuccess_WithMeteredSAEOn11AXSupportedDeviceBut11AXDisabled()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS()); // setIeee80211axEnabled() added on Android S.
-        boolean isMetered = true;
-        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
-        mResources.setBoolean(R.bool.config_wifiSoftapIeee80211axSupported, true);
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
-        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
-        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
-        mHostapdHal = new HostapdHalSpy();
-
-        executeAndValidateInitializationSequenceOnLastHIDL(false);
-
-        Builder configurationBuilder = new SoftApConfiguration.Builder();
-        configurationBuilder.setSsid(NETWORK_SSID);
-        configurationBuilder.setHiddenSsid(false);
-        configurationBuilder.setPassphrase(NETWORK_PSK,
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        configurationBuilder.setBand(mBand256G);
-        configurationBuilder.setIeee80211axEnabled(false);
-
-        when(mIHostapdMockV13.addAccessPoint_1_3(
-                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
-                .thenReturn(mStatusSuccess12);
-
-
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
-                configurationBuilder.build(), isMetered,
-                () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
-
-        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
-        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.hwModeParams.enable80211AX);
-        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
-
-        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
-                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
-        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
-        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
-                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
-        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
-        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
-        assertTrue(mNetworkParamsV13Captor.getValue().isMetered);
-    }
-}
-
diff --git a/service/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java b/service/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java
index 624535e..c779da5 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/HostapdHalTest.java
@@ -15,47 +15,109 @@
  */
 package com.android.server.wifi;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.junit.Assert.*;
+import static org.junit.Assume.assumeTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyLong;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.*;
 
+import android.app.test.MockAnswerUtil;
 import android.content.Context;
+import android.hardware.wifi.hostapd.V1_0.HostapdStatus;
+import android.hardware.wifi.hostapd.V1_0.HostapdStatusCode;
+import android.hardware.wifi.hostapd.V1_0.IHostapd;
+import android.hardware.wifi.hostapd.V1_1.IHostapdCallback;
+import android.hardware.wifi.hostapd.V1_2.DebugLevel;
+import android.hardware.wifi.hostapd.V1_3.Bandwidth;
+import android.hardware.wifi.hostapd.V1_3.Generation;
+import android.hidl.manager.V1_0.IServiceManager;
+import android.hidl.manager.V1_0.IServiceNotification;
 import android.net.MacAddress;
 import android.net.wifi.SoftApConfiguration;
 import android.net.wifi.SoftApConfiguration.Builder;
 import android.net.wifi.WifiManager;
 import android.os.Handler;
+import android.os.IHwBinder;
+import android.os.RemoteException;
 import android.os.test.TestLooper;
+import android.util.SparseIntArray;
 
 import androidx.test.filters.SmallTest;
 
+import com.android.modules.utils.build.SdkLevel;
+import com.android.server.wifi.util.ApConfigUtil;
+import com.android.server.wifi.util.NativeUtil;
+import com.android.wifi.resources.R;
+
 import org.junit.Before;
 import org.junit.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InOrder;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+import java.util.ArrayList;
+
 /**
  * Unit tests for HostapdHal
  */
 @SmallTest
 public class HostapdHalTest extends WifiBaseTest {
     private static final String IFACE_NAME = "mock-wlan0";
-    private HostapdHalSpy mHostapdHal;
-    private IHostapdHal mIHostapd;
-    private @Mock HostapdHalAidlImp mIHostapdAidlMock;
-    private @Mock HostapdHalHidlImp mIHostapdHidlMock;
+    private static final String NETWORK_SSID = "test-ssid";
+    private static final String NETWORK_PSK = "test-psk";
+    private static final String TEST_CLIENT_MAC = "11:22:33:44:55:66";
+    private static final String TEST_AP_INSTANCE = "instance-wlan0";
+
+    private final int mBand256G = SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ
+            | SoftApConfiguration.BAND_6GHZ;
+
     private @Mock Context mContext;
+    private @Mock IServiceManager mServiceManagerMock;
+    private @Mock IHostapd mIHostapdMock;
     private @Mock WifiNative.HostapdDeathEventHandler mHostapdHalDeathHandler;
-    private @Mock WifiNative.SoftApHalCallback mSoftApHalCallback;
+    private @Mock WifiNative.SoftApListener mSoftApListener;
+    private android.hardware.wifi.hostapd.V1_1.IHostapd mIHostapdMockV11;
+    private android.hardware.wifi.hostapd.V1_2.IHostapd mIHostapdMockV12;
+    private android.hardware.wifi.hostapd.V1_3.IHostapd mIHostapdMockV13;
+    private IHostapdCallback mIHostapdCallback;
+    private android.hardware.wifi.hostapd.V1_3.IHostapdCallback mIHostapdCallback13;
+    private MockResources mResources;
+    HostapdStatus mStatusSuccess;
+    HostapdStatus mStatusFailure;
+    android.hardware.wifi.hostapd.V1_2.HostapdStatus mStatusSuccess12;
+    android.hardware.wifi.hostapd.V1_2.HostapdStatus mStatusFailure12;
     private TestLooper mLooper = new TestLooper();
+    private HostapdHal mHostapdHal;
+    private ArgumentCaptor<IHwBinder.DeathRecipient> mServiceManagerDeathCaptor =
+            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
+    private ArgumentCaptor<IHwBinder.DeathRecipient> mHostapdDeathCaptor =
+            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
+    private ArgumentCaptor<IServiceNotification.Stub> mServiceNotificationCaptor =
+            ArgumentCaptor.forClass(IServiceNotification.Stub.class);
+    private ArgumentCaptor<IHostapd.IfaceParams> mIfaceParamsCaptor =
+            ArgumentCaptor.forClass(IHostapd.IfaceParams.class);
+    private ArgumentCaptor<android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams>
+            mIfaceParamsCaptorV1_1 =
+            ArgumentCaptor.forClass(android.hardware.wifi.hostapd.V1_1.IHostapd.IfaceParams.class);
+    private ArgumentCaptor<android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams>
+            mIfaceParamsCaptorV12 =
+            ArgumentCaptor.forClass(android.hardware.wifi.hostapd.V1_2.IHostapd.IfaceParams.class);
+    private ArgumentCaptor<android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams>
+            mIfaceParamsCaptorV13 =
+            ArgumentCaptor.forClass(android.hardware.wifi.hostapd.V1_3.IHostapd.IfaceParams.class);
+    private ArgumentCaptor<IHostapd.NetworkParams> mNetworkParamsCaptor =
+            ArgumentCaptor.forClass(IHostapd.NetworkParams.class);
+    private ArgumentCaptor<android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams>
+            mNetworkParamsV12Captor = ArgumentCaptor.forClass(
+            android.hardware.wifi.hostapd.V1_2.IHostapd.NetworkParams.class);
+    private ArgumentCaptor<android.hardware.wifi.hostapd.V1_3.IHostapd.NetworkParams>
+            mNetworkParamsV13Captor = ArgumentCaptor.forClass(
+            android.hardware.wifi.hostapd.V1_3.IHostapd.NetworkParams.class);
+    private ArgumentCaptor<Long> mDeathRecipientCookieCaptor = ArgumentCaptor.forClass(Long.class);
+    private InOrder mInOrder;
 
     private class HostapdHalSpy extends HostapdHal {
         HostapdHalSpy() {
@@ -63,227 +125,1455 @@
         }
 
         @Override
-        protected IHostapdHal createIHostapdHalMockable() {
-            return mIHostapd;
+        protected IServiceManager getServiceManagerMockable() throws RemoteException {
+            return mServiceManagerMock;
+        }
+
+        @Override
+        protected IHostapd getHostapdMockable() throws RemoteException {
+            return mIHostapdMock;
+        }
+
+        @Override
+        protected android.hardware.wifi.hostapd.V1_1.IHostapd getHostapdMockableV1_1()
+                throws RemoteException {
+            return mIHostapdMockV11;
+        }
+
+        @Override
+        protected android.hardware.wifi.hostapd.V1_2.IHostapd getHostapdMockableV1_2()
+                throws RemoteException {
+            return mIHostapdMockV12;
+        }
+
+        @Override
+        protected android.hardware.wifi.hostapd.V1_3.IHostapd getHostapdMockableV1_3()
+                throws RemoteException {
+            return mIHostapdMockV13;
         }
     }
 
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
+        mResources = new MockResources();
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
+        mResources.setBoolean(R.bool.config_wifi_softap_ieee80211ac_supported, false);
+        mResources.setBoolean(R.bool.config_wifiSoftapIeee80211axSupported, false);
+        mResources.setBoolean(R.bool.config_wifiSoftap6ghzSupported, false);
+        mResources.setBoolean(R.bool.config_wifiSoftapAcsIncludeDfs, false);
+        mResources.setString(R.string.config_wifiSoftap2gChannelList, "");
+        mResources.setString(R.string.config_wifiSoftap5gChannelList, "");
+        mResources.setString(R.string.config_wifiSoftap6gChannelList, "");
+
+        mStatusSuccess = createHostapdStatus(HostapdStatusCode.SUCCESS);
+        mStatusFailure = createHostapdStatus(HostapdStatusCode.FAILURE_UNKNOWN);
+
+
+        mStatusSuccess12 = createHostapdStatus_1_2(HostapdStatusCode.SUCCESS);
+        mStatusFailure12 = createHostapdStatus_1_2(HostapdStatusCode.FAILURE_UNKNOWN);
+
+        when(mContext.getResources()).thenReturn(mResources);
+        when(mServiceManagerMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
+                anyLong())).thenReturn(true);
+        when(mServiceManagerMock.registerForNotifications(anyString(), anyString(),
+                any(IServiceNotification.Stub.class))).thenReturn(true);
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.EMPTY);
+        when(mIHostapdMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
+                anyLong())).thenReturn(true);
+        when(mIHostapdMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
+                anyLong())).thenReturn(true);
+        when(mIHostapdMock.addAccessPoint(
+                mIfaceParamsCaptor.capture(), mNetworkParamsCaptor.capture()))
+                .thenReturn(mStatusSuccess);
+        when(mIHostapdMock.removeAccessPoint(any())).thenReturn(mStatusSuccess);
         mHostapdHal = new HostapdHalSpy();
     }
 
-    private void setIHostapdImp(IHostapdHal imp) {
-        mIHostapd = imp;
-    }
-
-    private void initializeWithAidlImp(boolean shouldSucceed) {
-        setIHostapdImp(mIHostapdAidlMock);
-        when(mIHostapdAidlMock.initialize()).thenReturn(shouldSucceed);
-        assertEquals(mHostapdHal.initialize(), shouldSucceed);
-        verify(mIHostapdAidlMock).initialize();
-        verify(mIHostapdHidlMock, never()).initialize();
-    }
-
-    private void initializeWithHidlImp(boolean shouldSucceed) {
-        setIHostapdImp(mIHostapdHidlMock);
-        when(mIHostapdHidlMock.initialize()).thenReturn(shouldSucceed);
-        assertEquals(mHostapdHal.initialize(), shouldSucceed);
-        verify(mIHostapdHidlMock).initialize();
-        verify(mIHostapdAidlMock, never()).initialize();
+    /**
+     * Sunny day scenario for HostapdHal initialization
+     * Asserts successful initialization
+     */
+    @Test
+    public void testInitialize_success() throws Exception {
+        executeAndValidateInitializationSequence(false, false);
     }
 
     /**
-     * Tests successful init of HostapdHal with an AIDL implementation
+     * Failure scenario for HostapdHal initialization
      */
     @Test
-    public void testInitSuccessAidl() {
-        initializeWithAidlImp(true);
+    public void testInitialize_registerException() throws Exception {
+        executeAndValidateInitializationSequence(true, false);
     }
 
     /**
-     * Tests successful init of HostapdHal with a HIDL implementation
+     * Failure scenario for HostapdHal initialization
      */
     @Test
-    public void testInitSuccessHidl() {
-        initializeWithHidlImp(true);
+    public void testInitialize_registerFailure() throws Exception {
+        executeAndValidateInitializationSequence(false, true);
     }
 
     /**
-     * Tests failed init of HostapdHal with an AIDL implementation
+     * Sunny day scenario for V1.1 HostapdHal initialization
+     * Asserts successful initialization
      */
     @Test
-    public void testInitFailureAidl() {
-        initializeWithAidlImp(false);
+    public void testInitialize_successV1_1() throws Exception {
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        executeAndValidateInitializationSequenceV1_1(false);
     }
 
     /**
-     * Tests failed init of HostapdHal with a HIDL implementation
+     * Failure scenario for V1.1 HostapdHal initialization
      */
     @Test
-    public void testInitFailureHidl() {
-        initializeWithHidlImp(false);
+    public void testInitialize_registerCallbackFailureV1_1() throws Exception {
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        executeAndValidateInitializationSequenceV1_1(true);
     }
 
     /**
-     * Check that initialize() returns false if we receive a null hostapd implementation
+     * Verifies the hostapd death handling.
      */
     @Test
-    public void testInitFailure_null() {
-        setIHostapdImp(null);
-        assertFalse(mHostapdHal.initialize());
-        verify(mIHostapdHidlMock, never()).initialize();
-        verify(mIHostapdAidlMock, never()).initialize();
+    public void testDeathHandling() throws Exception {
+        executeAndValidateInitializationSequence();
+
+        mHostapdHal.registerDeathHandler(mHostapdHalDeathHandler);
+        mHostapdDeathCaptor.getValue().serviceDied(mDeathRecipientCookieCaptor.getValue());
+        mLooper.dispatchAll();
+        verify(mHostapdHalDeathHandler).onDeath();
     }
 
     /**
-     * Check that other functions cannot be called if initialize() failed
+     * Verifies the hostapd death handling.
      */
     @Test
-    public void testCallAfterInitFailure() {
-        initializeWithAidlImp(false);
-        when(mIHostapdAidlMock.isApInfoCallbackSupported()).thenReturn(true);
-        assertFalse(mHostapdHal.isApInfoCallbackSupported());
-        verify(mIHostapdAidlMock, never()).isApInfoCallbackSupported();
+    public void testStaleDeathHandling() throws Exception {
+        executeAndValidateInitializationSequence();
+
+        mHostapdHal.registerDeathHandler(mHostapdHalDeathHandler);
+        mHostapdDeathCaptor.getValue().serviceDied(mDeathRecipientCookieCaptor.getValue() - 1);
+        mLooper.dispatchAll();
+        verify(mHostapdHalDeathHandler, never()).onDeath();
     }
 
     /**
-     * Check that HostapdHal.isApInfoCallbackSupported() returns the implementation's result
+     * Verifies the successful addition of access point.
      */
     @Test
-    public void testIsApInfoCallbackSupported() {
-        initializeWithAidlImp(true);
-        when(mIHostapdAidlMock.isApInfoCallbackSupported()).thenReturn(true);
-        assertTrue(mHostapdHal.isApInfoCallbackSupported());
-        verify(mIHostapdAidlMock).isApInfoCallbackSupported();
-    }
+    public void testAddAccessPointSuccess_Psk_Band2G() throws Exception {
+        executeAndValidateInitializationSequence();
+        final int apChannel = 6;
 
-    /**
-     * Check that HostapdHal.registerApCallback() returns the implementation's result
-     * and that the implementation receives the expected arguments
-     */
-    @Test
-    public void testRegisterApCallback() {
-        initializeWithAidlImp(true);
-        when(mIHostapdAidlMock.registerApCallback(anyString(),
-                any(WifiNative.SoftApHalCallback.class)))
-                .thenReturn(true);
-        assertTrue(mHostapdHal.registerApCallback(IFACE_NAME, mSoftApHalCallback));
-        verify(mIHostapdAidlMock).registerApCallback(eq(IFACE_NAME), eq(mSoftApHalCallback));
-    }
-
-    /**
-     * Check that HostapdHal.addAccessPoint() returns the implementation's result
-     * and that the implementation receives the expected arguments
-     */
-    @Test
-    public void testAddAccessPoint() {
-        initializeWithAidlImp(true);
-        when(mIHostapdAidlMock.addAccessPoint(anyString(), any(SoftApConfiguration.class),
-                anyBoolean(), any(Runnable.class)))
-                .thenReturn(true);
-        boolean isMetered = true;
         Builder configurationBuilder = new SoftApConfiguration.Builder();
-        SoftApConfiguration config = configurationBuilder.build();
-        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME, config,
-                isMetered, () -> mSoftApHalCallback.onFailure()));
-        verify(mIHostapdAidlMock).addAccessPoint(eq(IFACE_NAME), eq(config),
-                eq(isMetered), any(Runnable.class));
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
+        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_2GHZ);
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMock).addAccessPoint(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
+        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
+        assertEquals(IHostapd.Band.BAND_2_4_GHZ, mIfaceParamsCaptor.getValue().channelParams.band);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
+        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams.channel);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsCaptor.getValue().ssid);
+        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
+        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
     }
 
     /**
-     * Check that HostapdHal.removeAccessPoint() returns the implementation's result
-     * and that the implementation receives the expected arguments
+     * Verifies the successful addition of access point.
      */
     @Test
-    public void testRemoveAccessPoint() {
-        initializeWithAidlImp(true);
-        when(mIHostapdAidlMock.removeAccessPoint(anyString())).thenReturn(true);
+    public void testAddAccessPointSuccess_Open_Band5G() throws Exception {
+        executeAndValidateInitializationSequence();
+        final int apChannel = 149;
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(true);
+        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_5GHZ);
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMock).addAccessPoint(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
+        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
+        assertEquals(IHostapd.Band.BAND_5_GHZ, mIfaceParamsCaptor.getValue().channelParams.band);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
+        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams.channel);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsCaptor.getValue().ssid);
+        assertTrue(mNetworkParamsCaptor.getValue().isHidden);
+        assertEquals(IHostapd.EncryptionType.NONE, mNetworkParamsCaptor.getValue().encryptionType);
+        assertNotNull(mNetworkParamsCaptor.getValue().pskPassphrase);
+    }
+
+    /**
+     * Verifies the successful addition of access point.
+     */
+    @Test
+    public void testAddAccessPointSuccess_Psk_Band5G_Hidden() throws Exception {
+        executeAndValidateInitializationSequence();
+        final int apChannel = 149;
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(true);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
+        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_5GHZ);
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMock).addAccessPoint(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
+        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
+        assertEquals(IHostapd.Band.BAND_5_GHZ, mIfaceParamsCaptor.getValue().channelParams.band);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
+        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams.channel);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsCaptor.getValue().ssid);
+        assertTrue(mNetworkParamsCaptor.getValue().isHidden);
+        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
+    }
+
+    /**
+     * Verifies the successful addition of access point.
+     */
+    @Test
+    public void testAddAccessPointSuccess_Psk_Band2G_WithACS() throws Exception {
+        // Enable ACS in the config.
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequence();
+        final int apChannel = 6;
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
+        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_2GHZ);
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMock).addAccessPoint(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
+        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
+        assertEquals(IHostapd.Band.BAND_2_4_GHZ, mIfaceParamsCaptor.getValue().channelParams.band);
+        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams.channel);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsCaptor.getValue().ssid);
+        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
+        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
+    }
+
+    /**
+     * Verifies the successful addition of access point.
+     */
+    @Test
+    public void testAddAccessPointSuccess_Psk_Band2G_WithIeee80211AC() throws Exception {
+        // Enable ACS & 80211AC in the config.
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
+        mResources.setBoolean(R.bool.config_wifi_softap_ieee80211ac_supported, true);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequence();
+        final int apChannel = 6;
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
+        configurationBuilder.setChannel(apChannel, SoftApConfiguration.BAND_2GHZ);
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMock).addAccessPoint(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
+        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
+        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
+        assertEquals(IHostapd.Band.BAND_2_4_GHZ, mIfaceParamsCaptor.getValue().channelParams.band);
+        assertEquals(apChannel, mIfaceParamsCaptor.getValue().channelParams.channel);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsCaptor.getValue().ssid);
+        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
+        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
+    }
+
+    /**
+     * Verifies the successful addition of access point.
+     */
+    @Test
+    public void testAddAccessPointSuccess_Psk_BandAny_WithACS() throws Exception {
+        // Enable ACS in the config.
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequence();
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
+        configurationBuilder.setBand(mBand256G);
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMock).addAccessPoint(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
+        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
+        assertEquals(IHostapd.Band.BAND_ANY, mIfaceParamsCaptor.getValue().channelParams.band);
+        assertTrue(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
+        assertTrue(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsCaptor.getValue().ssid);
+        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
+        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
+    }
+
+    /**
+     * Verifies the successful addition of access point.
+     */
+    @Test
+    public void testAddAccessPointSuccess_Psk_WithoutACS() throws Exception {
+        // Disable ACS in the config.
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequence();
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
+        configurationBuilder.setBand(mBand256G);
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMock).addAccessPoint(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
+        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsCaptor.getValue().ssid);
+        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
+        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
+    }
+
+    /**
+     * Verifies the successful addition of access point.
+     * Verifies that channel info for ACS is handled.
+     */
+    @Test
+    public void testAddAccessPointSuccess_Psk_BandAny_WithACS_AcsChannels() throws Exception {
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        // Enable ACS and set available channels in the config.
+        final String acsChannelStr2g = "1,6,11-13";
+        final String acsChannelStr5g = "40";
+        final String acsChannelStr6g = "";
+        android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange channelRange1 =
+                new android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange();
+        android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange channelRange2 =
+                new android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange();
+        android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange channelRange3 =
+                new android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange();
+        android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange channelRange4 =
+                new android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange();
+        channelRange1.start = channelRange1.end = 1;
+        channelRange2.start = channelRange2.end = 6;
+        channelRange3.start = 11;
+        channelRange3.end = 13;
+        channelRange4.start = channelRange4.end = 40;
+        ArrayList<android.hardware.wifi.hostapd.V1_1.IHostapd.AcsChannelRange> acsChannelRanges =
+                new ArrayList<>();
+        acsChannelRanges.add(channelRange1);
+        acsChannelRanges.add(channelRange2);
+        acsChannelRanges.add(channelRange3);
+        acsChannelRanges.add(channelRange4);
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
+        mResources.setString(R.string.config_wifiSoftap2gChannelList, acsChannelStr2g);
+        mResources.setString(R.string.config_wifiSoftap5gChannelList, acsChannelStr5g);
+        mResources.setString(R.string.config_wifiSoftap6gChannelList, acsChannelStr6g);
+        mHostapdHal = new HostapdHalSpy();
+
+        when(mIHostapdMockV11.addAccessPoint_1_1(
+                mIfaceParamsCaptorV1_1.capture(), mNetworkParamsCaptor.capture()))
+                .thenReturn(mStatusSuccess);
+
+        executeAndValidateInitializationSequenceV1_1(false);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
+        configurationBuilder.setBand(mBand256G);
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMockV11).addAccessPoint_1_1(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptorV1_1.getValue().V1_0.ifaceName);
+        assertTrue(mIfaceParamsCaptorV1_1.getValue().V1_0.hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptorV1_1.getValue().V1_0.hwModeParams.enable80211AC);
+        assertEquals(IHostapd.Band.BAND_ANY,
+                mIfaceParamsCaptorV1_1.getValue().V1_0.channelParams.band);
+        assertTrue(mIfaceParamsCaptorV1_1.getValue().V1_0.channelParams.enableAcs);
+        assertTrue(mIfaceParamsCaptorV1_1.getValue().V1_0.channelParams.acsShouldExcludeDfs);
+        assertEquals(acsChannelRanges,
+                mIfaceParamsCaptorV1_1.getValue().channelParams.acsChannelRanges);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsCaptor.getValue().ssid);
+        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
+        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
+    }
+
+    /**
+     * Verifies the failure handling in addition of access point.
+     */
+    @Test
+    public void testAddAccessPointFailure() throws Exception {
+        executeAndValidateInitializationSequence();
+        when(mIHostapdMock.addAccessPoint(any(), any())).thenReturn(mStatusFailure);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(true);
+        configurationBuilder.setChannel(6, SoftApConfiguration.BAND_2GHZ);
+
+        assertFalse(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMock).addAccessPoint(any(), any());
+    }
+
+    /**
+     * Verifies the failure handling in addition of access point.
+     */
+    @Test
+    public void testAddAccessPointRemoteException() throws Exception {
+        executeAndValidateInitializationSequence();
+        doThrow(new RemoteException()).when(mIHostapdMock).addAccessPoint(any(), any());
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(true);
+        configurationBuilder.setChannel(6, SoftApConfiguration.BAND_2GHZ);
+
+        assertFalse(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMock).addAccessPoint(any(), any());
+    }
+
+    /**
+     * Verifies the successful removal of access point.
+     */
+    @Test
+    public void testRemoveAccessPointSuccess() throws Exception {
+        executeAndValidateInitializationSequence();
+
         assertTrue(mHostapdHal.removeAccessPoint(IFACE_NAME));
-        verify(mIHostapdAidlMock).removeAccessPoint(eq(IFACE_NAME));
+        verify(mIHostapdMock).removeAccessPoint(any());
     }
 
     /**
-     * Check that HostapdHal.forceClientDisconnect() returns the implementation's result
-     * and that the implementation receives the expected arguments
+     * Verifies the failure handling in removal of access point.
      */
     @Test
-    public void testForceClientDisconnect() {
-        initializeWithAidlImp(true);
-        when(mIHostapdAidlMock.forceClientDisconnect(anyString(), any(MacAddress.class),
-                anyInt())).thenReturn(true);
+    public void testRemoveAccessPointFailure() throws Exception {
+        executeAndValidateInitializationSequence();
+        when(mIHostapdMock.removeAccessPoint(any())).thenReturn(mStatusFailure);
+
+        assertFalse(mHostapdHal.removeAccessPoint(IFACE_NAME));
+        verify(mIHostapdMock).removeAccessPoint(any());
+    }
+
+    /**
+     * Verifies the failure handling in addition of access point.
+     */
+    @Test
+    public void testRemoveAccessPointRemoteException() throws Exception {
+        executeAndValidateInitializationSequence();
+        doThrow(new RemoteException()).when(mIHostapdMock).removeAccessPoint(any());
+
+        assertFalse(mHostapdHal.removeAccessPoint(IFACE_NAME));
+        verify(mIHostapdMock).removeAccessPoint(any());
+    }
+
+    /**
+     * Verifies the handling of onFailure callback from hostapd.
+     */
+    @Test
+    public void testOnFailureCallbackHandling() throws Exception {
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        when(mIHostapdMockV11.addAccessPoint_1_1(
+                mIfaceParamsCaptorV1_1.capture(), mNetworkParamsCaptor.capture()))
+                .thenReturn(mStatusSuccess);
+        executeAndValidateInitializationSequenceV1_1(false);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setBand(SoftApConfiguration.BAND_2GHZ);
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMockV11).addAccessPoint_1_1(any(), any());
+
+        // Trigger on failure.
+        mIHostapdCallback.onFailure(IFACE_NAME);
+        verify(mSoftApListener).onFailure();
+
+        // Now remove the access point and ensure that the callback is no longer handled.
+        reset(mSoftApListener);
+        assertTrue(mHostapdHal.removeAccessPoint(IFACE_NAME));
+        mIHostapdCallback.onFailure(IFACE_NAME);
+        verify(mSoftApListener, never()).onFailure();
+    }
+
+    private void executeAndValidateInitializationSequence() throws Exception {
+        executeAndValidateInitializationSequence(false, false);
+    }
+
+    /**
+     * Calls.initialize() on HIDL 1.0, mocking various callback answers and verifying flow,
+     * asserting for the expected result. Verifies if IHostapd manager is initialized or reset.
+     */
+    private void executeAndValidateInitializationSequence(
+            boolean causeRegisterRemoteException, boolean causeRegisterFailure) throws Exception {
+        boolean shouldSucceed = !causeRegisterRemoteException && !causeRegisterFailure;
+        mInOrder = inOrder(mServiceManagerMock, mIHostapdMock);
+        if (causeRegisterFailure) {
+            when(mServiceManagerMock.registerForNotifications(anyString(), anyString(),
+                    any(IServiceNotification.Stub.class))).thenReturn(false);
+        } else if (causeRegisterRemoteException) {
+            doThrow(new RemoteException()).when(mServiceManagerMock)
+                    .registerForNotifications(
+                            anyString(), anyString(), any(IServiceNotification.Stub.class));
+        }
+        // Initialize HostapdHal, should call serviceManager.registerForNotifications
+        assertEquals(shouldSucceed, mHostapdHal.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
+                anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(IHostapd.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        if (shouldSucceed) {
+            // act: cause the onRegistration(...) callback to execute
+            mServiceNotificationCaptor.getValue().onRegistration(IHostapd.kInterfaceName, "", true);
+            assertTrue(mHostapdHal.isInitializationComplete());
+            mInOrder.verify(mIHostapdMock).linkToDeath(mHostapdDeathCaptor.capture(),
+                    mDeathRecipientCookieCaptor.capture());
+        } else {
+            assertFalse(mHostapdHal.isInitializationComplete());
+            mInOrder.verify(mIHostapdMock, never()).linkToDeath(
+                    mHostapdDeathCaptor.capture(), anyLong());
+        }
+    }
+
+    /**
+     * Calls.initialize() on HIDL V1.1, mocking various callback answers and verifying flow,
+     * asserting for the expected result. Verifies if IHostapd manager is initialized or reset.
+     */
+    private void executeAndValidateInitializationSequenceV1_1(
+            boolean causeCallbackFailure) throws Exception {
+        boolean shouldSucceed = !causeCallbackFailure;
+        mInOrder = inOrder(mServiceManagerMock, mIHostapdMock);
+        if (causeCallbackFailure) {
+            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+                public HostapdStatus answer(IHostapdCallback cb)
+                        throws RemoteException {
+                    return mStatusFailure;
+                }
+            }).when(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
+        } else {
+            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+                public HostapdStatus answer(IHostapdCallback cb)
+                        throws RemoteException {
+                    mIHostapdCallback = cb;
+                    return mStatusSuccess;
+                }
+            }).when(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
+        }
+        // Initialize HostapdHal, should call serviceManager.registerForNotifications
+        assertTrue(mHostapdHal.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
+                anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(IHostapd.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        // act: cause the onRegistration(...) callback to execute
+        mServiceNotificationCaptor.getValue().onRegistration(IHostapd.kInterfaceName, "", true);
+        assertEquals(shouldSucceed, mHostapdHal.isInitializationComplete());
+        mInOrder.verify(mIHostapdMock).linkToDeath(mHostapdDeathCaptor.capture(), anyLong());
+        verify(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
+    }
+
+    /**
+     * Calls.initialize() on HIDL 1.2, mocking various callback answers and verifying flow,
+     * asserting for the expected result. Verifies if IHostapd manager is initialized or reset.
+     */
+    private void executeAndValidateInitializationSequenceV1_2(
+            boolean causeCallbackFailure) throws Exception {
+        boolean shouldSucceed = !causeCallbackFailure;
+        mInOrder = inOrder(mServiceManagerMock, mIHostapdMock);
+        when(mIHostapdMockV12.setDebugParams(anyInt()))
+                .thenReturn(mStatusSuccess12);
+        if (causeCallbackFailure) {
+            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+                public HostapdStatus answer(IHostapdCallback cb)
+                        throws RemoteException {
+                    return mStatusFailure;
+                }
+            }).when(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
+        } else {
+            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+                public HostapdStatus answer(IHostapdCallback cb)
+                        throws RemoteException {
+                    mIHostapdCallback = cb;
+                    return mStatusSuccess;
+                }
+            }).when(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
+        }
+        // Initialize HostapdHal, should call serviceManager.registerForNotifications
+        assertTrue(mHostapdHal.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
+                anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(IHostapd.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        // act: cause the onRegistration(...) callback to execute
+        mServiceNotificationCaptor.getValue().onRegistration(IHostapd.kInterfaceName, "", true);
+        assertEquals(shouldSucceed, mHostapdHal.isInitializationComplete());
+        mInOrder.verify(mIHostapdMock).linkToDeath(mHostapdDeathCaptor.capture(), anyLong());
+        verify(mIHostapdMockV11).registerCallback(any(IHostapdCallback.class));
+    }
+
+    /**
+     * Calls.initialize() on HIDL 1.3, mocking various callback answers and verifying flow,
+     * asserting for the expected result. Verifies if IHostapd manager is initialized or reset.
+     */
+    private void executeAndValidateInitializationSequenceV1_3(
+            boolean causeCallbackFailure) throws Exception {
+        boolean shouldSucceed = !causeCallbackFailure;
+        mInOrder = inOrder(mServiceManagerMock, mIHostapdMock);
+        when(mIHostapdMockV12.setDebugParams(anyInt()))
+                .thenReturn(mStatusSuccess12);
+        if (causeCallbackFailure) {
+            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+                public android.hardware.wifi.hostapd.V1_2.HostapdStatus answer(
+                        android.hardware.wifi.hostapd.V1_3.IHostapdCallback cb)
+                        throws RemoteException {
+                    return mStatusFailure12;
+                }
+            }).when(mIHostapdMockV13).registerCallback_1_3(
+                    any(android.hardware.wifi.hostapd.V1_3.IHostapdCallback.class));
+        } else {
+            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+                public android.hardware.wifi.hostapd.V1_2.HostapdStatus answer(
+                        android.hardware.wifi.hostapd.V1_3.IHostapdCallback cb)
+                        throws RemoteException {
+                    mIHostapdCallback13 = cb;
+                    return mStatusSuccess12;
+                }
+            }).when(mIHostapdMockV13).registerCallback_1_3(
+                    any(android.hardware.wifi.hostapd.V1_3.IHostapdCallback.class));
+        }
+        // Initialize HostapdHal, should call serviceManager.registerForNotifications
+        assertTrue(mHostapdHal.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
+                anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(IHostapd.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        // act: cause the onRegistration(...) callback to execute
+        mServiceNotificationCaptor.getValue().onRegistration(IHostapd.kInterfaceName, "", true);
+        assertEquals(shouldSucceed, mHostapdHal.isInitializationComplete());
+        mInOrder.verify(mIHostapdMock).linkToDeath(mHostapdDeathCaptor.capture(), anyLong());
+        verify(mIHostapdMockV11, never()).registerCallback(any(IHostapdCallback.class));
+        verify(mIHostapdMockV13).registerCallback_1_3(
+                any(android.hardware.wifi.hostapd.V1_3.IHostapdCallback.class));
+    }
+
+    /**
+     * Calls.initialize() on last HIDL, mocking various callback answers and verifying flow,
+     * asserting for the expected result. Verifies if IHostapd manager is initialized or reset.
+     */
+    private void executeAndValidateInitializationSequenceOnLastHIDL(
+            boolean causeCallbackFailure) throws Exception {
+        executeAndValidateInitializationSequenceV1_3(causeCallbackFailure);
+    }
+
+    private HostapdStatus createHostapdStatus(int code) {
+        HostapdStatus status = new HostapdStatus();
+        status.code = code;
+        return status;
+    }
+
+    private android.hardware.wifi.hostapd.V1_2.HostapdStatus createHostapdStatus_1_2(int code) {
+        android.hardware.wifi.hostapd.V1_2.HostapdStatus status =
+                new android.hardware.wifi.hostapd.V1_2.HostapdStatus();
+        status.code = code;
+        return status;
+    }
+
+    /**
+     * Verifies the successful execute forceClientDisconnect.
+     */
+    @Test
+    public void testForceClientDisconnectSuccess() throws Exception {
+        executeAndValidateInitializationSequence();
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
         MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        when(mIHostapdMockV12.forceClientDisconnect(any(), any(), anyShort()))
+                .thenReturn(mStatusSuccess12);
+
         assertTrue(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client,
                 WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER));
-        verify(mIHostapdAidlMock).forceClientDisconnect(eq(IFACE_NAME), eq(test_client),
-                eq(WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER));
+        verify(mIHostapdMockV12).forceClientDisconnect(any(), any(), anyShort());
+    }
+
+    @Test
+    public void testForceClientDisconnectFailureDueToInvalidArg() throws Exception {
+        executeAndValidateInitializationSequence();
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        when(mIHostapdMockV12.forceClientDisconnect(any(), any(), anyShort()))
+                .thenReturn(mStatusSuccess12);
+
+        try {
+            mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client, -1);
+            fail();
+        } catch (IllegalArgumentException e) {
+        }
     }
 
     /**
-     * Check that HostapdHal.registerDeathHandler() returns the implementation's result
-     * and that the implementation receives the expected arguments
+     * Verifies the failure handling in forceClientDisconnect.
      */
     @Test
-    public void testRegisterDeathHandler() {
-        initializeWithAidlImp(true);
-        when(mIHostapdAidlMock.registerDeathHandler(any(WifiNative.HostapdDeathEventHandler.class)))
-                .thenReturn(true);
-        assertTrue(mHostapdHal.registerDeathHandler(mHostapdHalDeathHandler));
-        verify(mIHostapdAidlMock).registerDeathHandler(eq(mHostapdHalDeathHandler));
+    public void testForceClientDisconnectFailure() throws Exception {
+        executeAndValidateInitializationSequence();
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        when(mIHostapdMockV12.forceClientDisconnect(any(), any(), anyShort()))
+                .thenReturn(mStatusFailure12);
+
+        assertFalse(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client,
+                WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER));
+        verify(mIHostapdMockV12).forceClientDisconnect(any(), any(), anyShort());
     }
 
     /**
-     * Check that HostapdHal.deregisterDeathHandler() returns the implementation's result
+     * Verifies the exception handling in forceClientDisconnect.
      */
     @Test
-    public void testDeregisterDeathHandler() {
-        initializeWithAidlImp(true);
-        when(mIHostapdAidlMock.deregisterDeathHandler()).thenReturn(true);
-        assertTrue(mHostapdHal.deregisterDeathHandler());
-        verify(mIHostapdAidlMock).deregisterDeathHandler();
+    public void testforceClientDisconnectRemoteException() throws Exception {
+        executeAndValidateInitializationSequence();
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        doThrow(new RemoteException()).when(mIHostapdMockV12)
+                .forceClientDisconnect(any(), any(), anyShort());
+
+        assertFalse(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client, 0));
+        verify(mIHostapdMockV12).forceClientDisconnect(any(), any(), anyShort());
     }
 
     /**
-     * Check that HostapdHal.isInitializationStarted() returns the implementation's result
+     * Verifies the HIDL not support handling in forceClientDisconnect.
      */
     @Test
-    public void testIsInitializationStarted() {
-        initializeWithAidlImp(true);
-        when(mIHostapdAidlMock.isInitializationStarted()).thenReturn(true);
-        assertTrue(mHostapdHal.isInitializationStarted());
-        verify(mIHostapdAidlMock).isInitializationStarted();
+    public void testforceClientDisconnectHIDLNotSupport() throws Exception {
+        executeAndValidateInitializationSequence();
+        MacAddress test_client = MacAddress.fromString("da:a1:19:0:0:0");
+
+        assertFalse(mHostapdHal.forceClientDisconnect(IFACE_NAME, test_client, 0));
     }
 
     /**
-     * Check that HostapdHal.isInitializationComplete() returns the implementation's result
+     * Verifies the setting of log level.
      */
     @Test
-    public void testIsInitializationComplete() {
-        initializeWithAidlImp(true);
-        when(mIHostapdAidlMock.isInitializationComplete()).thenReturn(true);
-        assertTrue(mHostapdHal.isInitializationComplete());
-        verify(mIHostapdAidlMock).isInitializationComplete();
+    public void testSetLogLevel() throws Exception {
+        executeAndValidateInitializationSequence();
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        when(mIHostapdMockV12.setDebugParams(anyInt()))
+                .thenReturn(mStatusSuccess12);
+
+        mHostapdHal.enableVerboseLogging(true);
+        verify(mIHostapdMockV12)
+                .setDebugParams(eq(DebugLevel.DEBUG));
+
+        mHostapdHal.enableVerboseLogging(false);
+        verify(mIHostapdMockV12)
+                .setDebugParams(eq(DebugLevel.INFO));
+    }
+
+    /*
+     * Sunny day scenario for V1.2 HostapdHal initialization
+     * Asserts successful initialization
+     */
+    @Test
+    public void testInitialize_successV1_2() throws Exception {
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_2.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        executeAndValidateInitializationSequenceV1_2(false);
+    }
+
+    /*
+     * Sunny day scenario for V1.3 HostapdHal initialization
+     * Asserts successful initialization
+     */
+    @Test
+    public void testInitialize_successV1_3() throws Exception {
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_2.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_3.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
+        executeAndValidateInitializationSequenceV1_3(false);
     }
 
     /**
-     * Check that HostapdHal.startDaemon() returns the implementation's result
+     * Failure scenario for V1.1 HostapdHal initialization
      */
     @Test
-    public void testStartDaemon() {
-        initializeWithAidlImp(true);
-        when(mIHostapdAidlMock.startDaemon()).thenReturn(true);
-        assertTrue(mHostapdHal.startDaemon());
-        verify(mIHostapdAidlMock).startDaemon();
+    public void testInitialize_registerCallbackFailureV1_3() throws Exception {
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_2.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_3.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
+        executeAndValidateInitializationSequenceV1_3(true);
     }
 
     /**
-     * Check that HostapdHal.terminate() calls the corresponding implementation method
+     * Verifies the successful addition of access point with SAE.
      */
     @Test
-    public void testTerminate() {
-        initializeWithAidlImp(true);
-        mHostapdHal.startDaemon();
-        verify(mIHostapdAidlMock).startDaemon();
+    public void testAddAccessPointSuccess_SAE_WithoutACS() throws Exception {
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
+        // Disable ACS in the config.
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequenceOnLastHIDL(false);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
+        configurationBuilder.setBand(mBand256G);
+
+        when(mIHostapdMockV13.addAccessPoint_1_3(
+                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
+                .thenReturn(mStatusSuccess12);
+
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
+        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
+        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
+                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
+        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
+    }
+
+    /**
+     * Verifies the successful addition of access point with SAE Transition.
+     */
+    @Test
+    public void testAddAccessPointSuccess_SAE_Transition_WithoutACS() throws Exception {
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
+        // Disable ACS in the config.
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequenceOnLastHIDL(false);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION);
+        configurationBuilder.setBand(mBand256G);
+
+        when(mIHostapdMockV13.addAccessPoint_1_3(
+                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
+                .thenReturn(mStatusSuccess12);
+
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
+        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
+        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE_TRANSITION,
+                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
+        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
+    }
+
+    /**
+     * Verifies the failure handling addition of access point with SAE Transition in old hal.
+     */
+    @Test
+    public void testAddAccessPointFailure_SAEWithOldHal() throws Exception {
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        // Disable ACS in the config.
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, false);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequenceV1_1(false);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
+        configurationBuilder.setBand(mBand256G);
+
+        assertFalse(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+    }
+
+    /**
+     * Verifies the successful addition of access point when ACS is allowed to include DFS channels.
+     */
+    @Test
+    public void testAddAccessPointSuccess_WithACS_IncludeDFSChannels() throws Exception {
+        // Enable ACS in the config.
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
+        mResources.setBoolean(R.bool.config_wifiSoftapAcsIncludeDfs, true);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequence();
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
+        configurationBuilder.setBand(mBand256G);
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMock).addAccessPoint(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptor.getValue().ifaceName);
+        assertTrue(mIfaceParamsCaptor.getValue().hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptor.getValue().hwModeParams.enable80211AC);
+        assertEquals(IHostapd.Band.BAND_ANY, mIfaceParamsCaptor.getValue().channelParams.band);
+        assertTrue(mIfaceParamsCaptor.getValue().channelParams.enableAcs);
+        assertFalse(mIfaceParamsCaptor.getValue().channelParams.acsShouldExcludeDfs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsCaptor.getValue().ssid);
+        assertFalse(mNetworkParamsCaptor.getValue().isHidden);
+        assertEquals(IHostapd.EncryptionType.WPA2, mNetworkParamsCaptor.getValue().encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsCaptor.getValue().pskPassphrase);
+    }
+
+
+    /*
+     * Sunny day scenario for V1.3 HostapdHal initialization
+     * Asserts successful initialization
+     */
+    @Test
+    public void testHostapdCallbackEventAfter1_3() throws Exception {
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_0.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_1.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_2.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        when(mServiceManagerMock.getTransport(eq(
+                android.hardware.wifi.hostapd.V1_3.IHostapd.kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
+        executeAndValidateInitializationSequenceV1_3(false);
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setBand(SoftApConfiguration.BAND_2GHZ);
+
+        when(mIHostapdMockV13.addAccessPoint_1_3(any(), any()))
+                .thenReturn(mStatusSuccess12);
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
+
+        // Trigger on failure.
+        mIHostapdCallback13.onFailure(IFACE_NAME);
+        verify(mSoftApListener).onFailure();
+        // Register SoftApManager callback
+        mHostapdHal.registerApCallback(IFACE_NAME, mSoftApListener);
+
+        int testFreq = 2412;
+        int testBandwidth = Bandwidth.WIFI_BANDWIDTH_20;
+        int testGeneration = Generation.WIFI_STANDARD_11N;
+        // Trigger on info changed.
+        mIHostapdCallback13.onApInstanceInfoChanged(IFACE_NAME, TEST_AP_INSTANCE,
+                testFreq, testBandwidth, testGeneration,
+                MacAddress.fromString(TEST_CLIENT_MAC).toByteArray());
+        verify(mSoftApListener).onInfoChanged(eq(TEST_AP_INSTANCE), eq(testFreq),
+                eq(mHostapdHal.mapHalBandwidthToSoftApInfo(testBandwidth)),
+                eq(mHostapdHal.mapHalGenerationToWifiStandard(testGeneration)),
+                eq(MacAddress.fromString(TEST_CLIENT_MAC)));
+
+        // Trigger on client connected.
+        mIHostapdCallback13.onConnectedClientsChanged(IFACE_NAME, TEST_AP_INSTANCE,
+                MacAddress.fromString(TEST_CLIENT_MAC).toByteArray(), true);
+        verify(mSoftApListener).onConnectedClientsChanged(eq(TEST_AP_INSTANCE),
+                eq(MacAddress.fromString(TEST_CLIENT_MAC)), eq(true));
+    }
+
+    /**
+     * Verifies the successful addition of access point with SAE with metered indication.
+     */
+    @Test
+    public void testAddAccessPointSuccess_WithMeteredSAE() throws Exception {
+        boolean isMetered = true;
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequenceOnLastHIDL(false);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
+        configurationBuilder.setBand(mBand256G);
+
+        when(mIHostapdMockV13.addAccessPoint_1_3(
+                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
+                .thenReturn(mStatusSuccess12);
+
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), isMetered,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
+        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
+        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
+                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
+        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
+        assertTrue(mNetworkParamsV13Captor.getValue().isMetered);
+    }
+
+    /**
+     * Verifies the successful addition of access point with SAE with non metered indication.
+     */
+    @Test
+    public void testAddAccessPointSuccess_WithNonMeteredSAE() throws Exception {
+        boolean isMetered = false;
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequenceOnLastHIDL(false);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
+        configurationBuilder.setBand(mBand256G);
+
+        when(mIHostapdMockV13.addAccessPoint_1_3(
+                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
+                .thenReturn(mStatusSuccess12);
+
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), isMetered,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
+        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
+        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
+                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
+        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
+        assertFalse(mNetworkParamsV13Captor.getValue().isMetered);
+    }
+
+    /**
+     * Verifies the successful addition of access point with Dual channel config.
+     */
+    @Test
+    public void testAddAccessPointSuccess_DualBandConfig() throws Exception {
+        assumeTrue(SdkLevel.isAtLeastS()); // dual band supported on S.
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
+        // Enable ACS and set available channels in the config.
+        final String acsChannelStr2g = "1,6,11-13";
+        final String acsChannelStr5g = "40";
+        final String acsChannelStr6g = "";
+        mResources.setString(R.string.config_wifiSoftap2gChannelList, acsChannelStr2g);
+        mResources.setString(R.string.config_wifiSoftap5gChannelList, acsChannelStr5g);
+        mResources.setString(R.string.config_wifiSoftap6gChannelList, acsChannelStr6g);
+
+        android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange freqRange1 =
+                new android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange();
+        android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange freqRange2 =
+                new android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange();
+        android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange freqRange3 =
+                new android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange();
+        android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange freqRange4 =
+                new android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange();
+
+        freqRange1.start = freqRange1.end = ApConfigUtil.convertChannelToFrequency(
+                1, SoftApConfiguration.BAND_2GHZ);
+        freqRange2.start = freqRange2.end = ApConfigUtil.convertChannelToFrequency(
+                6, SoftApConfiguration.BAND_2GHZ);
+        freqRange3.start = ApConfigUtil.convertChannelToFrequency(11,
+                SoftApConfiguration.BAND_2GHZ);
+        freqRange3.end = ApConfigUtil.convertChannelToFrequency(13, SoftApConfiguration.BAND_2GHZ);
+        ArrayList<android.hardware.wifi.hostapd.V1_2.IHostapd.AcsFrequencyRange> acsFreqRanges =
+                new ArrayList<>();
+        acsFreqRanges.add(freqRange1);
+        acsFreqRanges.add(freqRange2);
+        acsFreqRanges.add(freqRange3);
+
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequenceOnLastHIDL(false);
+
+        SparseIntArray dual_channels = new SparseIntArray(2);
+        dual_channels.put(SoftApConfiguration.BAND_5GHZ, 149);
+        dual_channels.put(SoftApConfiguration.BAND_2GHZ, 0);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
+        configurationBuilder.setChannels(dual_channels);
+
+        when(mIHostapdMockV13.addAccessPoint_1_3(
+                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
+                .thenReturn(mStatusSuccess12);
+
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), true,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.hwModeParams.enable80211AX);
+        // 2.4G band, ACS case.
+        assertTrue(mIfaceParamsCaptorV13.getValue().channelParamsList.get(0).enableAcs);
+        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(0).V1_2.bandMask,
+                android.hardware.wifi.hostapd.V1_2.IHostapd.BandMask.BAND_2_GHZ);
+        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(0).channel, 0);
+        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(0)
+                .V1_2.acsChannelFreqRangesMhz, acsFreqRanges);
+        // 5G band, specific channel.
+        assertFalse(mIfaceParamsCaptorV13.getValue().channelParamsList.get(1).enableAcs);
+        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(1).V1_2.bandMask,
+                android.hardware.wifi.hostapd.V1_2.IHostapd.BandMask.BAND_5_GHZ);
+        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(1).channel, 149);
+        // No acsChannelFreqRangesMh
+        assertEquals(mIfaceParamsCaptorV13.getValue().channelParamsList.get(1)
+                .V1_2.acsChannelFreqRangesMhz.size(), 0);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
+        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
+        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
+                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
+        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
+    }
+
+    /**
+     * Verifies the successful addition of access point with metered SAE indication on the 80211ax
+     * supported device.
+     */
+    @Test
+    public void testAddAccessPointSuccess_WithMeteredSAEOn11AXSupportedDevice()
+            throws Exception {
+        boolean isMetered = true;
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
+        mResources.setBoolean(R.bool.config_wifiSoftapIeee80211axSupported, true);
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequenceOnLastHIDL(false);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
+        configurationBuilder.setBand(mBand256G);
+
+        when(mIHostapdMockV13.addAccessPoint_1_3(
+                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
+                .thenReturn(mStatusSuccess12);
+
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), isMetered,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.hwModeParams.enable80211AX);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
+        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
+        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
+                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
+        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
+        assertTrue(mNetworkParamsV13Captor.getValue().isMetered);
+    }
+
+    /**
+     * Verifies the successful addition of access point with metered SAE indication on the 80211ax
+     * supported device but 80211ax is disabled in configuration.
+     */
+    @Test
+    public void testAddAccessPointSuccess_WithMeteredSAEOn11AXSupportedDeviceBut11AXDisabled()
+            throws Exception {
+        assumeTrue(SdkLevel.isAtLeastS()); // setIeee80211axEnabled() added on Android S.
+        boolean isMetered = true;
+        mResources.setBoolean(R.bool.config_wifi_softap_acs_supported, true);
+        mResources.setBoolean(R.bool.config_wifiSoftapIeee80211axSupported, true);
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mIHostapdMockV11 = mock(android.hardware.wifi.hostapd.V1_1.IHostapd.class);
+        mIHostapdMockV12 = mock(android.hardware.wifi.hostapd.V1_2.IHostapd.class);
+        mIHostapdMockV13 = mock(android.hardware.wifi.hostapd.V1_3.IHostapd.class);
+        mHostapdHal = new HostapdHalSpy();
+
+        executeAndValidateInitializationSequenceOnLastHIDL(false);
+
+        Builder configurationBuilder = new SoftApConfiguration.Builder();
+        configurationBuilder.setSsid(NETWORK_SSID);
+        configurationBuilder.setHiddenSsid(false);
+        configurationBuilder.setPassphrase(NETWORK_PSK,
+                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
+        configurationBuilder.setBand(mBand256G);
+        configurationBuilder.setIeee80211axEnabled(false);
+
+        when(mIHostapdMockV13.addAccessPoint_1_3(
+                mIfaceParamsCaptorV13.capture(), mNetworkParamsV13Captor.capture()))
+                .thenReturn(mStatusSuccess12);
+
+
+        assertTrue(mHostapdHal.addAccessPoint(IFACE_NAME,
+                configurationBuilder.build(), isMetered,
+                () -> mSoftApListener.onFailure()));
+        verify(mIHostapdMockV13).addAccessPoint_1_3(any(), any());
+
+        assertEquals(IFACE_NAME, mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.ifaceName);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211N);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.hwModeParams.enable80211AC);
+        assertFalse(mIfaceParamsCaptorV13.getValue().V1_2.hwModeParams.enable80211AX);
+        assertTrue(mIfaceParamsCaptorV13.getValue().V1_2.V1_1.V1_0.channelParams.enableAcs);
+
+        assertEquals(NativeUtil.stringToByteArrayList(NETWORK_SSID),
+                mNetworkParamsV13Captor.getValue().V1_2.V1_0.ssid);
+        assertFalse(mNetworkParamsV13Captor.getValue().V1_2.V1_0.isHidden);
+        assertEquals(android.hardware.wifi.hostapd.V1_2.IHostapd.EncryptionType.WPA3_SAE,
+                mNetworkParamsV13Captor.getValue().V1_2.encryptionType);
+        assertEquals(NETWORK_PSK, mNetworkParamsV13Captor.getValue().V1_2.passphrase);
+        assertEquals("", mNetworkParamsV13Captor.getValue().V1_2.V1_0.pskPassphrase);
+        assertTrue(mNetworkParamsV13Captor.getValue().isMetered);
     }
 }
+
diff --git a/service/tests/wifitests/src/com/android/server/wifi/InsecureEapNetworkHandlerTest.java b/service/tests/wifitests/src/com/android/server/wifi/InsecureEapNetworkHandlerTest.java
deleted file mode 100644
index aed3753..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/InsecureEapNetworkHandlerTest.java
+++ /dev/null
@@ -1,589 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
-import static org.junit.Assume.assumeTrue;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.argThat;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.validateMockitoUsage;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.app.Notification;
-import android.content.BroadcastReceiver;
-import android.content.Intent;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
-import android.net.wifi.WifiEnterpriseConfig;
-import android.os.Handler;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.modules.utils.build.SdkLevel;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Answers;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.security.cert.X509Certificate;
-
-/**
- * Unit tests for {@link com.android.server.wifi.InsecureEapNetworkHandlerTest}.
- */
-@SmallTest
-public class InsecureEapNetworkHandlerTest extends WifiBaseTest {
-
-    private static final int ACTION_ACCEPT = 0;
-    private static final int ACTION_REJECT = 1;
-    private static final int ACTION_TAP = 2;
-    private static final String WIFI_IFACE_NAME = "wlan-test-9";
-    private static final int FRAMEWORK_NETWORK_ID = 2;
-    private static final String TEST_SSID = "test_ssid";
-
-    @Mock WifiContext mContext;
-    @Mock WifiConfigManager mWifiConfigManager;
-    @Mock WifiNative mWifiNative;
-    @Mock FrameworkFacade mFrameworkFacade;
-    @Mock WifiNotificationManager mWifiNotificationManager;
-    @Mock WifiDialogManager mWifiDialogManager;
-    @Mock Handler mHandler;
-    @Mock InsecureEapNetworkHandler.InsecureEapNetworkHandlerCallbacks mCallbacks;
-
-    @Mock(answer = Answers.RETURNS_DEEP_STUBS) private Notification.Builder mNotificationBuilder;
-    @Mock private WifiDialogManager.DialogHandle mTofuAlertDialog;
-
-    @Captor ArgumentCaptor<BroadcastReceiver> mBroadcastReceiverCaptor;
-
-    MockResources mResources;
-    InsecureEapNetworkHandler mInsecureEapNetworkHandler;
-
-    /**
-     * Sets up for unit test
-     */
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mResources = new MockResources();
-        when(mContext.getString(anyInt())).thenReturn("TestString");
-        when(mContext.getString(anyInt(), any())).thenReturn("TestStringWithArgument");
-        when(mContext.getText(anyInt())).thenReturn("TestStr");
-        when(mContext.getWifiOverlayApkPkgName()).thenReturn("test.com.android.wifi.resources");
-        when(mContext.getResources()).thenReturn(mResources);
-        when(mWifiDialogManager.createSimpleDialogWithUrl(
-                any(), any(), any(), anyInt(), anyInt(), any(), any(), any(), any(), any()))
-                .thenReturn(mTofuAlertDialog);
-
-        when(mFrameworkFacade.makeNotificationBuilder(any(), any()))
-                .thenReturn(mNotificationBuilder);
-    }
-
-    @After
-    public void cleanUp() throws Exception {
-        validateMockitoUsage();
-    }
-
-    /**
-     * Verify Trust On First Use flow.
-     * - This network is selected by a user.
-     * - Accept the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseAcceptWhenConnectByUser() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = true;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        verifyTrustOnFirstUseFlowWithDefaultCerts(config, ACTION_ACCEPT,
-                isTrustOnFirstUseSupported, isUserSelected, needUserApproval);
-    }
-
-    /**
-     * Verify Trust On First Use flow.
-     * - This network is selected by a user.
-     * - Reject the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseRejectWhenConnectByUser() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = true;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        verifyTrustOnFirstUseFlowWithDefaultCerts(config, ACTION_REJECT,
-                isTrustOnFirstUseSupported, isUserSelected, needUserApproval);
-    }
-
-    /**
-     * Verify Trust On First Use flow.
-     * - This network is auto-connected.
-     * - Accept the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseAcceptWhenConnectByAutoConnect() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = false;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        verifyTrustOnFirstUseFlowWithDefaultCerts(config, ACTION_ACCEPT,
-                isTrustOnFirstUseSupported, isUserSelected, needUserApproval);
-    }
-
-    /**
-     * Verify Trust On First Use flow.
-     * - This network is auto-connected.
-     * - Reject the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseRejectWhenConnectByAutoConnect() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = false;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        verifyTrustOnFirstUseFlowWithDefaultCerts(config, ACTION_REJECT,
-                isTrustOnFirstUseSupported, isUserSelected, needUserApproval);
-    }
-
-    /**
-     * Verify Trust On First Use flow.
-     * - This network is auto-connected.
-     * - Tap the notification to show the dialog.
-     */
-    @Test
-    public void verifyTrustOnFirstUseTapWhenConnectByAutoConnect() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = false;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        verifyTrustOnFirstUseFlowWithDefaultCerts(config, ACTION_TAP,
-                isTrustOnFirstUseSupported, isUserSelected, needUserApproval);
-    }
-
-    /**
-     * Verify that it reports errors if there is no pending Root CA certifiate
-     * with Trust On First Use support.
-     */
-    @Test
-    public void verifyTrustOnFirstUseWhenTrustOnFirstUseNoPendingCert() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        assertTrue(mInsecureEapNetworkHandler.startUserApprovalIfNecessary(isUserSelected));
-        verify(mCallbacks).onError(eq(config.SSID));
-    }
-
-    /**
-     * Verify that Trust On First Use is not supported on T.
-     * It follows the same behavior on preT release.
-     */
-    @Test
-    public void verifyTrustOnFirstUseWhenTrustOnFirstUseNotSupported() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = false, isUserSelected = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        assertTrue(mInsecureEapNetworkHandler.startUserApprovalIfNecessary(isUserSelected));
-        verify(mCallbacks, never()).onError(any());
-    }
-
-    /**
-     * Verify legacy insecure EAP network flow.
-     * - This network is selected by a user.
-     * - Accept the connection.
-     */
-    @Test
-    public void verifyLegacyEapNetworkAcceptWhenConnectByUser() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = false, isTrustOnFirstUseSupported = false, isUserSelected = true;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        verifyTrustOnFirstUseFlowWithDefaultCerts(config, ACTION_ACCEPT,
-                isTrustOnFirstUseSupported, isUserSelected, needUserApproval);
-    }
-
-    /**
-     * Verify legacy insecure EAP network flow.
-     * - Trust On First Use is not supported.
-     * - This network is selected by a user.
-     * - Reject the connection.
-     */
-    @Test
-    public void verifyLegacyEapNetworkRejectWhenConnectByUser() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = false, isTrustOnFirstUseSupported = false, isUserSelected = true;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        verifyTrustOnFirstUseFlowWithDefaultCerts(config, ACTION_REJECT,
-                isTrustOnFirstUseSupported, isUserSelected, needUserApproval);
-    }
-
-    /**
-     * Verify legacy insecure EAP network flow.
-     * - This network is auto-connected.
-     * - Accept the connection.
-     */
-    @Test
-    public void verifyLegacyEapNetworkAcceptWhenAutoConnect() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = false, isTrustOnFirstUseSupported = false, isUserSelected = false;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        verifyTrustOnFirstUseFlowWithDefaultCerts(config, ACTION_ACCEPT,
-                isTrustOnFirstUseSupported, isUserSelected, needUserApproval);
-    }
-
-    /**
-     * Verify legacy insecure EAP network flow.
-     * - Trust On First Use is not supported.
-     * - This network is auto-connected.
-     * - Reject the connection.
-     */
-    @Test
-    public void verifyLegacyEapNetworkRejectWhenAutoConnect() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = false, isTrustOnFirstUseSupported = false, isUserSelected = false;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        verifyTrustOnFirstUseFlowWithDefaultCerts(config, ACTION_REJECT,
-                isTrustOnFirstUseSupported, isUserSelected, needUserApproval);
-    }
-
-    /**
-     * Verify legacy insecure EAP network flow.
-     * - This network is selected by a user.
-     * - Tap the notification
-     */
-    @Test
-    public void verifyLegacyEapNetworkOpenLinkWhenConnectByUser() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = false, isTrustOnFirstUseSupported = false, isUserSelected = true;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-        verifyTrustOnFirstUseFlowWithDefaultCerts(config, ACTION_TAP,
-                isTrustOnFirstUseSupported, isUserSelected, needUserApproval);
-    }
-
-    private WifiConfiguration prepareWifiConfiguration(boolean isAtLeastT) {
-        WifiConfiguration config = spy(WifiConfigurationTestUtil.createEapNetwork(
-                WifiEnterpriseConfig.Eap.TLS, WifiEnterpriseConfig.Phase2.NONE));
-        config.networkId = FRAMEWORK_NETWORK_ID;
-        config.SSID = TEST_SSID;
-        if (isAtLeastT) {
-            config.enterpriseConfig.enableTrustOnFirstUse(true);
-        }
-        config.enterpriseConfig.setCaPath("");
-        config.enterpriseConfig.setDomainSuffixMatch("");
-        return config;
-    }
-
-    private void setupTest(WifiConfiguration config,
-            boolean isAtLeastT, boolean isTrustOnFirstUseSupported) {
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported, false);
-    }
-
-    private void setupTest(WifiConfiguration config,
-            boolean isAtLeastT, boolean isTrustOnFirstUseSupported,
-            boolean isInsecureEnterpriseConfigurationAllowed) {
-        mInsecureEapNetworkHandler = new InsecureEapNetworkHandler(
-                mContext,
-                mWifiConfigManager,
-                mWifiNative,
-                mFrameworkFacade,
-                mWifiNotificationManager,
-                mWifiDialogManager, isTrustOnFirstUseSupported,
-                isInsecureEnterpriseConfigurationAllowed,
-                mCallbacks,
-                WIFI_IFACE_NAME,
-                mHandler);
-
-        mInsecureEapNetworkHandler.prepareConnection(config);
-
-        if (isTrustOnFirstUseSupported && config.enterpriseConfig.isTrustOnFirstUseEnabled()) {
-            verify(mContext, atLeastOnce()).registerReceiver(
-                    mBroadcastReceiverCaptor.capture(),
-                    argThat(f -> f.hasAction(InsecureEapNetworkHandler.ACTION_CERT_NOTIF_TAP)),
-                    eq(null),
-                    eq(mHandler));
-        } else if ((isTrustOnFirstUseSupported
-                && !config.enterpriseConfig.isTrustOnFirstUseEnabled()
-                && isInsecureEnterpriseConfigurationAllowed)
-                || !isTrustOnFirstUseSupported) {
-            verify(mContext, atLeastOnce()).registerReceiver(
-                    mBroadcastReceiverCaptor.capture(),
-                    argThat(f -> f.hasAction(InsecureEapNetworkHandler.ACTION_CERT_NOTIF_ACCEPT)
-                            && f.hasAction(InsecureEapNetworkHandler.ACTION_CERT_NOTIF_REJECT)),
-                    eq(null),
-                    eq(mHandler));
-        }
-    }
-
-    /**
-     * Verify Trust On First Use flow with a minimal cert chain
-     * - This network is selected by a user.
-     * - Accept the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseAcceptWhenConnectByUserWithMinimalChain() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = true;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-
-        mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 1, FakeKeys.CA_CERT0);
-        mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 0, FakeKeys.CLIENT_CERT);
-
-        verifyTrustOnFirstUseFlow(config, ACTION_ACCEPT, isTrustOnFirstUseSupported,
-                isUserSelected, needUserApproval, FakeKeys.CA_CERT0, FakeKeys.CLIENT_CERT);
-    }
-
-    /**
-     * Verify Trust On First Use flow with a reversal cert chain
-     * - This network is selected by a user.
-     * - Accept the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseAcceptWhenConnectByUserWithReversalOrderChain()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = true;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-
-        mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 0, FakeKeys.CLIENT_CERT);
-        mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 1, FakeKeys.CA_CERT1);
-        mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 2, FakeKeys.CA_CERT0);
-
-        verifyTrustOnFirstUseFlow(config, ACTION_ACCEPT, isTrustOnFirstUseSupported,
-                isUserSelected, needUserApproval, FakeKeys.CA_CERT0, FakeKeys.CLIENT_CERT);
-    }
-
-    /**
-     * Verify Trust On First Use flow with a self-signed CA cert.
-     * - This network is selected by a user.
-     * - Accept the connection.
-     */
-    @Test
-    public void verifyTrustOnFirstUseAcceptWhenConnectByUserWithSelfSignedCaCert()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = true;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-
-        mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 0, FakeKeys.CA_CERT0);
-
-        verifyTrustOnFirstUseFlow(config, ACTION_ACCEPT, isTrustOnFirstUseSupported,
-                isUserSelected, needUserApproval, FakeKeys.CA_CERT0, FakeKeys.CA_CERT0);
-    }
-
-    /**
-     * Verify that the connection should be terminated.
-     * - TOFU is supported.
-     * - Insecure EAP network is not allowed.
-     * - No cert is received.
-     */
-    @Test
-    public void verifyOnErrorWithoutCert() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = true;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-
-        assertEquals(needUserApproval,
-                mInsecureEapNetworkHandler.startUserApprovalIfNecessary(isUserSelected));
-        verify(mCallbacks).onError(eq(config.SSID));
-    }
-
-    /**
-     * Verify that the connection should be terminated.
-     * - TOFU is supported.
-     * - Insecure EAP network is not allowed.
-     * - TOFU is not enabled
-     */
-    @Test
-    public void verifyOnErrorWithTofuDisabledWhenInsecureEapNetworkIsNotAllowed()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = true;
-        boolean needUserApproval = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        config.enterpriseConfig.enableTrustOnFirstUse(false);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported);
-
-        mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 0, FakeKeys.CA_CERT0);
-
-        assertEquals(needUserApproval,
-                mInsecureEapNetworkHandler.startUserApprovalIfNecessary(isUserSelected));
-        verify(mCallbacks).onError(eq(config.SSID));
-    }
-
-    /**
-     * Verify that no error occurs in insecure network handling flow.
-     * - TOFU is supported.
-     * - Insecure EAP network is allowed.
-     * - TOFU is not enabled
-     */
-    @Test
-    public void verifyNoErrorWithTofuDisabledWhenInsecureEapNetworkIsAllowed()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isAtLeastT = true, isTrustOnFirstUseSupported = true, isUserSelected = true;
-        boolean needUserApproval = true, isInsecureEnterpriseConfigurationAllowed = true;
-
-        WifiConfiguration config = prepareWifiConfiguration(isAtLeastT);
-        config.enterpriseConfig.enableTrustOnFirstUse(false);
-        setupTest(config, isAtLeastT, isTrustOnFirstUseSupported,
-                isInsecureEnterpriseConfigurationAllowed);
-
-        mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 0, FakeKeys.CA_CERT0);
-
-        assertEquals(needUserApproval,
-                mInsecureEapNetworkHandler.startUserApprovalIfNecessary(isUserSelected));
-        verify(mCallbacks, never()).onError(any());
-    }
-
-    private void verifyTrustOnFirstUseFlowWithDefaultCerts(WifiConfiguration config,
-            int action, boolean isTrustOnFirstUseSupported, boolean isUserSelected,
-            boolean needUserApproval) throws Exception {
-        if (isTrustOnFirstUseSupported) {
-            mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 2, FakeKeys.CA_CERT0);
-            mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 1, FakeKeys.CA_CERT1);
-            mInsecureEapNetworkHandler.setPendingCertificate(config.SSID, 0, FakeKeys.CLIENT_CERT);
-        }
-        verifyTrustOnFirstUseFlow(config, action, isTrustOnFirstUseSupported,
-                isUserSelected, needUserApproval, FakeKeys.CA_CERT0, FakeKeys.CLIENT_CERT);
-    }
-
-    private void verifyTrustOnFirstUseFlow(WifiConfiguration config,
-            int action, boolean isTrustOnFirstUseSupported, boolean isUserSelected,
-            boolean needUserApproval, X509Certificate expectedCaCert,
-            X509Certificate expectedServerCert) throws Exception {
-        assertEquals(needUserApproval,
-                mInsecureEapNetworkHandler.startUserApprovalIfNecessary(isUserSelected));
-
-        if (isUserSelected) {
-            ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> dialogCallbackCaptor =
-                    ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-            verify(mWifiDialogManager).createSimpleDialogWithUrl(
-                    any(), any(), any(), anyInt(), anyInt(), any(), any(), any(),
-                    dialogCallbackCaptor.capture(), any());
-            if (action == ACTION_ACCEPT) {
-                dialogCallbackCaptor.getValue().onPositiveButtonClicked();
-            } else if (action == ACTION_REJECT) {
-                dialogCallbackCaptor.getValue().onNegativeButtonClicked();
-            }
-        } else {
-            verify(mFrameworkFacade, never()).makeAlertDialogBuilder(any());
-            verify(mFrameworkFacade).makeNotificationBuilder(
-                    eq(mContext), eq(WifiService.NOTIFICATION_NETWORK_ALERTS));
-            // Trust On First Use notification has no accept and reject action buttons.
-            // It only supports TAP and launch the dialog.
-            if (isTrustOnFirstUseSupported) {
-                Intent intent = new Intent(InsecureEapNetworkHandler.ACTION_CERT_NOTIF_TAP);
-                intent.putExtra(InsecureEapNetworkHandler.EXTRA_PENDING_CERT_SSID, TEST_SSID);
-                BroadcastReceiver br = mBroadcastReceiverCaptor.getValue();
-                br.onReceive(mContext, intent);
-                ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> dialogCallbackCaptor =
-                        ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-                verify(mWifiDialogManager).createSimpleDialogWithUrl(
-                        any(), any(), any(), anyInt(), anyInt(), any(), any(), any(),
-                        dialogCallbackCaptor.capture(), any());
-                if (action == ACTION_ACCEPT) {
-                    dialogCallbackCaptor.getValue().onPositiveButtonClicked();
-                } else if (action == ACTION_REJECT) {
-                    dialogCallbackCaptor.getValue().onNegativeButtonClicked();
-                }
-            } else {
-                Intent intent = new Intent();
-                if (action == ACTION_ACCEPT) {
-                    intent = new Intent(InsecureEapNetworkHandler.ACTION_CERT_NOTIF_ACCEPT);
-                } else if (action == ACTION_REJECT) {
-                    intent = new Intent(InsecureEapNetworkHandler.ACTION_CERT_NOTIF_REJECT);
-                } else if (action == ACTION_TAP) {
-                    intent = new Intent(InsecureEapNetworkHandler.ACTION_CERT_NOTIF_TAP);
-                }
-                intent.putExtra(InsecureEapNetworkHandler.EXTRA_PENDING_CERT_SSID, TEST_SSID);
-                BroadcastReceiver br = mBroadcastReceiverCaptor.getValue();
-                br.onReceive(mContext, intent);
-            }
-        }
-
-        if (action == ACTION_ACCEPT) {
-            verify(mWifiConfigManager).allowAutojoin(eq(config.networkId), eq(true));
-            if (isTrustOnFirstUseSupported) {
-                verify(mWifiConfigManager).updateCaCertificate(
-                        eq(config.networkId), eq(expectedCaCert), eq(expectedServerCert));
-            } else {
-                verify(mWifiConfigManager, never()).updateCaCertificate(
-                        anyInt(), any(), any());
-            }
-            verify(mCallbacks).onAccept(eq(config.SSID));
-        } else if (action == ACTION_REJECT) {
-            verify(mWifiConfigManager).allowAutojoin(eq(config.networkId), eq(false));
-            verify(mCallbacks).onReject(eq(config.SSID));
-        } else if (action == ACTION_TAP) {
-            verify(mWifiDialogManager).createSimpleDialogWithUrl(
-                    any(), any(), any(), anyInt(), anyInt(), any(), any(), any(), any(), any());
-            verify(mTofuAlertDialog).launchDialog();
-        }
-        verify(mCallbacks, never()).onError(any());
-    }
-
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/InterfaceConflictManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/InterfaceConflictManagerTest.java
deleted file mode 100644
index 9d43c75..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/InterfaceConflictManagerTest.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.content.res.Resources;
-import android.net.wifi.WifiContext;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.os.WorkSource;
-import android.os.test.TestLooper;
-import android.util.Pair;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.internal.util.State;
-import com.android.internal.util.StateMachine;
-import com.android.server.wifi.util.WaitingState;
-import com.android.wifi.resources.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Unit test harness for InterfaceConflictManager.
- */
-@SmallTest
-public class InterfaceConflictManagerTest {
-    private TestLooper mTestLooper;
-    private InterfaceConflictManager mDut;
-    private TestStateMachine mSm;
-
-    @Mock WifiContext mWifiContext;
-    @Mock Resources mResources;
-    @Mock FrameworkFacade mFrameworkFacade;
-    @Mock HalDeviceManager mHdm;
-    @Mock WifiDialogManager mWifiDialogManager;
-    @Mock WifiDialogManager.DialogHandle mDialogHandle;
-
-    private static final int TEST_UID = 1234;
-    private static final String TEST_PACKAGE_NAME = "some.package.name";
-    private static final String TEST_APP_NAME = "Some App Name";
-    private static final WorkSource TEST_WS = new WorkSource(TEST_UID, TEST_PACKAGE_NAME);
-
-    ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> mCallbackCaptor =
-            ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-
-    private class TestState extends State {
-        private final String mName;
-
-        public List<Integer> commandList = new ArrayList<>();
-
-        public void resetTestFlags() {
-            commandList.clear();
-        }
-
-        TestState(String name) {
-            super();
-            mName = name;
-        }
-
-        @Override
-        public String getName() {
-            return mName;
-        }
-
-        @Override
-        public boolean processMessage(Message msg) {
-            commandList.add(msg.what);
-            return HANDLED;
-        }
-    }
-
-    private class TestStateMachine extends StateMachine {
-        public TestState A = new TestState("A");
-        public WaitingState B;
-
-        TestStateMachine(String name, Looper looper) {
-            super(name, looper);
-
-            addState(A);
-            B = new WaitingState(this);
-            addState(B, A);
-
-            setInitialState(A);
-        }
-    }
-
-    /**
-     * Initializes mocks.
-     */
-    @Before
-    public void setup() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mTestLooper = new TestLooper();
-
-        mSm = new TestStateMachine("TestStateMachine", mTestLooper.getLooper());
-        mSm.setDbg(true);
-        mSm.start();
-
-        // enable user approval (needed for most tests)
-        when(mWifiContext.getResources()).thenReturn(mResources);
-        when(mResources.getBoolean(
-                R.bool.config_wifiUserApprovalRequiredForD2dInterfacePriority)).thenReturn(true);
-
-        when(mFrameworkFacade.getAppName(any(), anyString(), anyInt())).thenReturn(TEST_APP_NAME);
-        when(mWifiDialogManager.createSimpleDialog(any(), any(), any(), any(), any(), any(),
-                any())).thenReturn(mDialogHandle);
-
-        mDut = new InterfaceConflictManager(mWifiContext, mFrameworkFacade, mHdm,
-                new WifiThreadRunner(new Handler(mTestLooper.getLooper())), mWifiDialogManager);
-
-    }
-
-    /**
-     * Verify that w/o user approval enabled will always continue operation
-     */
-    @Test
-    public void testUserApprovalDisabled() {
-        // disable user approval
-        when(mResources.getBoolean(
-                R.bool.config_wifiUserApprovalRequiredForD2dInterfacePriority)).thenReturn(false);
-
-        assertEquals(InterfaceConflictManager.ICM_EXECUTE_COMMAND,
-                mDut.manageInterfaceConflictForStateMachine("Some Tag", mSm.obtainMessage(10), mSm,
-                        mSm.B, mSm.A, HalDeviceManager.HDM_CREATE_IFACE_NAN, TEST_WS));
-        mTestLooper.dispatchAll();
-        assertEquals("State changed incorrect", mSm.A, mSm.getCurrentState());
-    }
-
-    /**
-     * Verify that w/o user approval enabled will always continue operation
-     */
-    @Test
-    public void testUserApprovalDisabledForSpecificPackage() {
-        // disable user approval for specific package
-        when(mResources.getStringArray(
-                R.array.config_wifiExcludedFromUserApprovalForD2dInterfacePriority)).thenReturn(
-                new String[]{TEST_PACKAGE_NAME});
-
-        assertEquals(InterfaceConflictManager.ICM_EXECUTE_COMMAND,
-                mDut.manageInterfaceConflictForStateMachine("Some Tag", mSm.obtainMessage(10), mSm,
-                        mSm.B, mSm.A, HalDeviceManager.HDM_CREATE_IFACE_NAN, TEST_WS));
-        mTestLooper.dispatchAll();
-        assertEquals("State changed incorrect", mSm.A, mSm.getCurrentState());
-    }
-
-    /**
-     * Verify that if interface cannot be created or if interface can be created w/o side effects
-     * then command simply proceeds.
-     */
-    @Test
-    public void testUserApprovalNeededButCommandCanProceed() {
-        int interfaceType = HalDeviceManager.HDM_CREATE_IFACE_NAN;
-
-        // can't create interface
-        when(mHdm.reportImpactToCreateIface(eq(interfaceType), eq(false), eq(TEST_WS))).thenReturn(
-                null);
-        assertEquals(InterfaceConflictManager.ICM_EXECUTE_COMMAND,
-                mDut.manageInterfaceConflictForStateMachine("Some Tag", mSm.obtainMessage(10), mSm,
-                        mSm.B, mSm.A, interfaceType, TEST_WS));
-        mTestLooper.dispatchAll();
-        assertEquals("State changed incorrect", mSm.A, mSm.getCurrentState());
-
-        // can create interface w/o side effects
-        when(mHdm.reportImpactToCreateIface(eq(interfaceType), eq(false), eq(TEST_WS))).thenReturn(
-                Collections.emptyList());
-        assertEquals(InterfaceConflictManager.ICM_EXECUTE_COMMAND,
-                mDut.manageInterfaceConflictForStateMachine("Some Tag", mSm.obtainMessage(10), mSm,
-                        mSm.B, mSm.A, interfaceType, TEST_WS));
-        mTestLooper.dispatchAll();
-        assertEquals("State changed incorrect", mSm.A, mSm.getCurrentState());
-    }
-
-    /**
-     * Verify flow with user approval.
-     */
-    @Test
-    public void testUserApproved() {
-        int interfaceType = HalDeviceManager.HDM_CREATE_IFACE_P2P;
-        Message msg = mSm.obtainMessage(10);
-
-        // can create interface - but with side effects
-        when(mHdm.reportImpactToCreateIface(eq(interfaceType), eq(false), eq(TEST_WS))).thenReturn(
-                Arrays.asList(Pair.create(HalDeviceManager.HDM_CREATE_IFACE_NAN,
-                        new WorkSource(10, "something else"))));
-
-        // send request
-        assertEquals(InterfaceConflictManager.ICM_SKIP_COMMAND_WAIT_FOR_USER,
-                mDut.manageInterfaceConflictForStateMachine("Some Tag", msg, mSm, mSm.B, mSm.A,
-                        interfaceType, TEST_WS));
-        mTestLooper.dispatchAll();
-        assertEquals("State not in waiting", mSm.B, mSm.getCurrentState());
-        verify(mWifiDialogManager).createSimpleDialog(any(), any(), any(), any(), any(),
-                mCallbackCaptor.capture(), any());
-
-        // user approve
-        mCallbackCaptor.getValue().onPositiveButtonClicked();
-        mTestLooper.dispatchAll();
-        assertEquals("State not back in primary", mSm.A, mSm.getCurrentState());
-        assertArrayEquals("Executed the held back command", new Integer[]{10},
-                mSm.A.commandList.toArray());
-
-        // re-execute command and get indication to proceed
-        assertEquals(InterfaceConflictManager.ICM_EXECUTE_COMMAND,
-                mDut.manageInterfaceConflictForStateMachine("Some Tag", msg, mSm, mSm.B, mSm.A,
-                        interfaceType, TEST_WS));
-        mTestLooper.dispatchAll();
-        assertEquals("State should stay in primary", mSm.A, mSm.getCurrentState());
-    }
-
-    /**
-     * Verify flow with user rejection.
-     */
-    @Test
-    public void testUserRejected() {
-        int interfaceType = HalDeviceManager.HDM_CREATE_IFACE_P2P;
-        Message msg = mSm.obtainMessage(10);
-
-        // can create interface - but with side effects
-        when(mHdm.reportImpactToCreateIface(eq(interfaceType), eq(false), eq(TEST_WS))).thenReturn(
-                Arrays.asList(Pair.create(HalDeviceManager.HDM_CREATE_IFACE_NAN,
-                        new WorkSource(10, "something else"))));
-
-        // send request
-        assertEquals(InterfaceConflictManager.ICM_SKIP_COMMAND_WAIT_FOR_USER,
-                mDut.manageInterfaceConflictForStateMachine("Some Tag", msg, mSm, mSm.B, mSm.A,
-                        interfaceType, TEST_WS));
-        mTestLooper.dispatchAll();
-        assertEquals("State not in waiting", mSm.B, mSm.getCurrentState());
-        verify(mWifiDialogManager).createSimpleDialog(any(), any(), any(), any(), any(),
-                mCallbackCaptor.capture(), any());
-
-        // user rejects
-        mCallbackCaptor.getValue().onNegativeButtonClicked();
-        mTestLooper.dispatchAll();
-        assertEquals("State not back in primary", mSm.A, mSm.getCurrentState());
-        assertArrayEquals("Executed the held back command", new Integer[]{10},
-                mSm.A.commandList.toArray());
-
-        // re-execute command and get indication to abort
-        assertEquals(InterfaceConflictManager.ICM_ABORT_COMMAND,
-                mDut.manageInterfaceConflictForStateMachine("Some Tag", msg, mSm, mSm.B, mSm.A,
-                        interfaceType, TEST_WS));
-        mTestLooper.dispatchAll();
-        assertEquals("State should stay in primary", mSm.A, mSm.getCurrentState());
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/LocalOnlyHotspotRequestInfoTest.java b/service/tests/wifitests/src/com/android/server/wifi/LocalOnlyHotspotRequestInfoTest.java
index 86cbe8c..95f24c4 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/LocalOnlyHotspotRequestInfoTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/LocalOnlyHotspotRequestInfoTest.java
@@ -26,7 +26,6 @@
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.WorkSource;
-import android.os.test.TestLooper;
 
 import androidx.test.filters.SmallTest;
 
@@ -45,7 +44,6 @@
     private static final String TAG = "LocalOnlyHotspotRequestInfoTest";
     private static final WorkSource TEST_WORKSOURCE = new WorkSource();
 
-    private TestLooper mLooper;
     @Mock IBinder mAppBinder;
     @Mock ILocalOnlyHotspotCallback mCallback;
     @Mock LocalOnlyHotspotRequestInfo.RequestingApplicationDeathCallback mDeathCallback;
@@ -58,7 +56,6 @@
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
-        mLooper = new TestLooper();
         when(mCallback.asBinder()).thenReturn(mAppBinder);
         mRemoteException = new RemoteException("Test Remote Exception");
     }
@@ -69,7 +66,7 @@
      */
     @Test
     public void verifyBinderLinkToDeathIsCalled() throws Exception {
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, mCallback, mDeathCallback, null);
         verify(mAppBinder).linkToDeath(eq(mLOHSRequestInfo), eq(0));
     }
@@ -79,7 +76,7 @@
      */
     @Test(expected = NullPointerException.class)
     public void verifyNullCallbackChecked() throws Exception {
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, null, mDeathCallback, null);
     }
 
@@ -88,7 +85,7 @@
      */
     @Test(expected = NullPointerException.class)
     public void verifyNullDeathCallbackChecked() throws Exception {
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, mCallback, null, null);
     }
 
@@ -97,7 +94,7 @@
      */
     @Test
     public void verifyUnlinkDeathRecipientUnlinksFromBinder() throws Exception {
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, mCallback, mDeathCallback, null);
         mLOHSRequestInfo.unlinkDeathRecipient();
         verify(mAppBinder).unlinkToDeath(eq(mLOHSRequestInfo), eq(0));
@@ -108,10 +105,9 @@
      */
     @Test
     public void verifyBinderDeathTriggersCallback() {
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, mCallback, mDeathCallback, null);
         mLOHSRequestInfo.binderDied();
-        mLooper.dispatchAll();
         verify(mDeathCallback).onLocalOnlyHotspotRequestorDeath(eq(mLOHSRequestInfo));
     }
 
@@ -122,9 +118,8 @@
     public void verifyRemoteExceptionTriggersCallback() throws Exception {
         doThrow(mRemoteException).when(mAppBinder)
                 .linkToDeath(any(IBinder.DeathRecipient.class), eq(0));
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, mCallback, mDeathCallback, null);
-        mLooper.dispatchAll();
         verify(mDeathCallback).onLocalOnlyHotspotRequestorDeath(eq(mLOHSRequestInfo));
     }
 
@@ -133,7 +128,7 @@
      */
     @Test
     public void verifyPid() {
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, mCallback, mDeathCallback, null);
         assertEquals(Process.myPid(), mLOHSRequestInfo.getPid());
     }
@@ -143,7 +138,7 @@
         SoftApConfiguration config = new SoftApConfiguration.Builder()
                 .setSsid("customSsid")
                 .build();
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, mCallback, mDeathCallback, config);
         assertEquals(config, mLOHSRequestInfo.getCustomConfig());
     }
@@ -153,7 +148,7 @@
      */
     @Test
     public void verifySendFailedMessage() throws Exception {
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, mCallback, mDeathCallback, null);
         mLOHSRequestInfo.sendHotspotFailedMessage(
                 WifiManager.LocalOnlyHotspotCallback.ERROR_GENERIC);
@@ -165,7 +160,7 @@
      */
     @Test
     public void verifySendStartedMessage() throws Exception {
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, mCallback, mDeathCallback, null);
         SoftApConfiguration config = mock(SoftApConfiguration.class);
         mLOHSRequestInfo.sendHotspotStartedMessage(config);
@@ -181,7 +176,7 @@
      */
     @Test
     public void verifySendStoppedMessage() throws Exception {
-        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(mLooper.getLooper(),
+        mLOHSRequestInfo = new LocalOnlyHotspotRequestInfo(
                 TEST_WORKSOURCE, mCallback, mDeathCallback, null);
         mLOHSRequestInfo.sendHotspotStoppedMessage();
         verify(mCallback).onHotspotStopped();
diff --git a/service/tests/wifitests/src/com/android/server/wifi/LogcatLogTest.java b/service/tests/wifitests/src/com/android/server/wifi/LogcatLogTest.java
index db5ba14..1985bab 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/LogcatLogTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/LogcatLogTest.java
@@ -253,63 +253,63 @@
     @Test
     public void traceLogMessageIncludesCallerName() {
         try {
-            LogcatLog.enableVerboseLogging(true);
+            LogcatLog.enableVerboseLogging(1);
             WifiLog.LogMessage logMessage = mLogger.trace("%");
             logMessage.c("says hello").flush();
             assertEquals("traceLogMessageIncludesCallerName says hello",
                     logMessage.toString());
         } finally {
-            LogcatLog.enableVerboseLogging(false);
+            LogcatLog.enableVerboseLogging(0);
         }
     }
 
     @Test
     public void traceLogMessageRespectsNumFramesToIgnore() {
         try {
-            LogcatLog.enableVerboseLogging(true);
+            LogcatLog.enableVerboseLogging(1);
             WifiLog.LogMessage logMessage = traceHelper("%");
             logMessage.c("says hello").flush();
             assertEquals("traceLogMessageRespectsNumFramesToIgnore says hello",
                     logMessage.toString());
         } finally {
-            LogcatLog.enableVerboseLogging(false);
+            LogcatLog.enableVerboseLogging(0);
         }
     }
 
     @Test
     public void traceLogMessageDoesNotCrashOnOversizedNumFramesToIgnore() {
         try {
-            LogcatLog.enableVerboseLogging(true);
+            LogcatLog.enableVerboseLogging(1);
             WifiLog.LogMessage logMessage = mLogger.trace("%",
                     (new Throwable()).getStackTrace().length);
             logMessage.c("says hello").flush();
             assertEquals("<unknown> says hello", logMessage.toString());
         } finally {
-            LogcatLog.enableVerboseLogging(false);
+            LogcatLog.enableVerboseLogging(0);
         }
     }
 
     @Test
     public void traceLogMessageDoesNotCrashOnOverflowingNumFramesToIgnore() {
         try {
-            LogcatLog.enableVerboseLogging(true);
+            LogcatLog.enableVerboseLogging(1);
             WifiLog.LogMessage logMessage = mLogger.trace("%", Integer.MAX_VALUE);
             logMessage.c("says hello").flush();
             assertEquals("<unknown> says hello", logMessage.toString());
         } finally {
-            LogcatLog.enableVerboseLogging(false);
+            LogcatLog.enableVerboseLogging(0);
         }
     }
 
     @Test
     public void traceLogMessageDoesNotCrashOnUndersizedNumFramesToIgnore() {
         try {
-            LogcatLog.enableVerboseLogging(true);
+            LogcatLog.enableVerboseLogging(1);
             WifiLog.LogMessage logMessage = mLogger.trace("%", Integer.MIN_VALUE);
             logMessage.c("says hello").flush();
             assertEquals("<unknown> says hello", logMessage.toString());
         } finally {
-            LogcatLog.enableVerboseLogging(false);
+            LogcatLog.enableVerboseLogging(0);
         }
     }
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/MakeBeforeBreakManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/MakeBeforeBreakManagerTest.java
index 18b269f..b384174 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/MakeBeforeBreakManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/MakeBeforeBreakManagerTest.java
@@ -20,7 +20,6 @@
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_LONG_LIVED;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_TRANSIENT;
 
-import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.*;
 
 import android.content.Context;
@@ -93,14 +92,6 @@
     }
 
     @Test
-    public void onL3ValidatedSecondaryTransientThatWasPreviouslyPrimary_noOp() {
-        when(mNewPrimaryCmm.getPreviousRole()).thenReturn(ROLE_CLIENT_PRIMARY);
-        mCmiListenerCaptor.getValue().onInternetValidated(mNewPrimaryCmm);
-
-        verify(mNewPrimaryCmm, never()).setRole(any(), any());
-    }
-
-    @Test
     public void onL3ValidatedNonSecondaryTransient_noOp() {
         when(mNewPrimaryCmm.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_LONG_LIVED);
         mCmiListenerCaptor.getValue().onInternetValidated(mNewPrimaryCmm);
@@ -299,87 +290,4 @@
 
         verify(mOnStoppedListener).run();
     }
-
-    @Test
-    public void onInternetValidationSuccessful() {
-        when(mOldPrimaryCmm.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_TRANSIENT);
-        when(mActiveModeWarden.getClientModeManagersInRoles(ROLE_CLIENT_SECONDARY_TRANSIENT))
-                .thenReturn(List.of(mNewPrimaryCmm, mOldPrimaryCmm));
-
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mNewPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_SECONDARY_TRANSIENT_CREATED,
-                mMbbManager.getInternalState());
-        mCmiListenerCaptor.getValue().onCaptivePortalDetected(mNewPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_CAPTIVE_PORTAL_DETECTED,
-                mMbbManager.getInternalState());
-        mCmiListenerCaptor.getValue().onInternetValidated(mNewPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_INTERNET_VALIDATED,
-                mMbbManager.getInternalState());
-        verify(mOldPrimaryCmm).setRole(ROLE_CLIENT_SECONDARY_TRANSIENT,
-                ActiveModeWarden.INTERNAL_REQUESTOR_WS);
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRoleChanged(mOldPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_ROLES_BEING_SWITCHED_BOTH_SECONDARY_TRANSIENT,
-                mMbbManager.getInternalState());
-        verify(mNewPrimaryCmm).setRole(ROLE_CLIENT_PRIMARY, mSettingsWorkSource);
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRoleChanged(mOldPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_ROLE_SWITCH_COMPLETE,
-                mMbbManager.getInternalState());
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRemoved(mOldPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_NONE,
-                mMbbManager.getInternalState());
-
-        verify(mOldPrimaryCmm).setShouldReduceNetworkScore(true);
-    }
-
-    @Test
-    public void onInternetValidationFailedSecondaryTransient() {
-        when(mActiveModeWarden.getClientModeManagerInRole(ROLE_CLIENT_SECONDARY_TRANSIENT))
-                .thenReturn(mNewPrimaryCmm);
-        when(mOldPrimaryCmm.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_TRANSIENT);
-        mCmiListenerCaptor.getValue().onInternetValidationFailed(mNewPrimaryCmm, true);
-        verify(mNewPrimaryCmm).disconnect();
-        verify(mActiveModeWarden).removeClientModeManager(eq(mNewPrimaryCmm));
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_VALIDATION_FAILED,
-                mMbbManager.getInternalState());
-    }
-
-    @Test
-    public void onInternetValidationFailedWhenLingering() {
-        when(mOldPrimaryCmm.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_TRANSIENT);
-        when(mActiveModeWarden.getClientModeManagersInRoles(ROLE_CLIENT_SECONDARY_TRANSIENT))
-                .thenReturn(List.of(mNewPrimaryCmm, mOldPrimaryCmm));
-
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mNewPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_SECONDARY_TRANSIENT_CREATED,
-                mMbbManager.getInternalState());
-        mCmiListenerCaptor.getValue().onCaptivePortalDetected(mNewPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_CAPTIVE_PORTAL_DETECTED,
-                mMbbManager.getInternalState());
-        mCmiListenerCaptor.getValue().onInternetValidated(mNewPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_INTERNET_VALIDATED,
-                mMbbManager.getInternalState());
-        verify(mOldPrimaryCmm).setRole(ROLE_CLIENT_SECONDARY_TRANSIENT,
-                ActiveModeWarden.INTERNAL_REQUESTOR_WS);
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRoleChanged(mOldPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_ROLES_BEING_SWITCHED_BOTH_SECONDARY_TRANSIENT,
-                mMbbManager.getInternalState());
-        verify(mNewPrimaryCmm).setRole(ROLE_CLIENT_PRIMARY, mSettingsWorkSource);
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRoleChanged(mOldPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_ROLE_SWITCH_COMPLETE,
-                mMbbManager.getInternalState());
-        // Internet was lost when lingering
-        when(mActiveModeWarden.getClientModeManagerInRole(ROLE_CLIENT_SECONDARY_TRANSIENT))
-                .thenReturn(mOldPrimaryCmm);
-        when(mNewPrimaryCmm.getRole()).thenReturn(ROLE_CLIENT_PRIMARY);
-        mCmiListenerCaptor.getValue().onInternetValidationFailed(mNewPrimaryCmm, true);
-        verify(mOldPrimaryCmm).setRole(eq(ROLE_CLIENT_PRIMARY), any());
-        verify(mNewPrimaryCmm).setRole(eq(ROLE_CLIENT_SECONDARY_TRANSIENT), any());
-        verify(mNewPrimaryCmm).disconnect();
-        verify(mActiveModeWarden).removeClientModeManager(eq(mNewPrimaryCmm));
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRemoved(mOldPrimaryCmm);
-        assertEquals(MakeBeforeBreakManager.MBB_STATE_NONE,
-                mMbbManager.getInternalState());
-
-        verify(mOldPrimaryCmm).setShouldReduceNetworkScore(true);
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/MockResources.java b/service/tests/wifitests/src/com/android/server/wifi/MockResources.java
index e6ccb6e..bde33d7 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/MockResources.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/MockResources.java
@@ -90,11 +90,6 @@
         }
     }
 
-    @Override
-    public int getColor(int id) {
-        return 0;
-    }
-
     public void setBoolean(int id, boolean value) {
         mBooleanValues.put(id, value);
     }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/MultiInternetManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/MultiInternetManagerTest.java
deleted file mode 100644
index 4a3d649..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/MultiInternetManagerTest.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_PRIMARY;
-import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_LONG_LIVED;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.content.Context;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.net.wifi.WifiSsid;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.os.SystemClock;
-import android.os.WorkSource;
-import android.os.test.TestLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.server.wifi.ActiveModeWarden.ModeChangeCallback;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/** Unit tests for {@link MultiInternetManager}. */
-@SmallTest
-public class MultiInternetManagerTest extends WifiBaseTest {
-    @Mock private ActiveModeWarden mActiveModeWarden;
-    @Mock private FrameworkFacade mFrameworkFacade;
-    @Mock private Context mContext;
-    @Mock private ClientModeImplMonitor mCmiMonitor;
-    @Mock private Clock mClock;
-    @Mock private ConcreteClientModeManager mPrimaryCmm;
-    @Mock private ConcreteClientModeManager mSecondaryCmm;
-    @Mock private WifiSettingsStore mSettingsStore;
-    @Mock private MultiInternetManager.ConnectionStatusListener mConnectionStatusListener;
-    @Mock WorkSource mWorksource;
-    @Captor private ArgumentCaptor<ModeChangeCallback> mModeChangeCallbackCaptor;
-    @Captor private ArgumentCaptor<ClientModeImplListener> mCmiListenerCaptor;
-
-    private static final int TEST_NETWORK_ID1 = 5;
-    private static final int TEST_NETWORK_ID2 = 6;
-    private static final String TEST_SSID1 = "Test123";
-    private static final String TEST_SSID2 = "Test456";
-    private static final String TEST_BSSID1 = "12:12:12:12:12:12";
-    private static final String TEST_BSSID2 = "22:22:22:22:22:22";
-    private static final String TEST_BSSID3 = "33:332:33:33:33:332";
-    private static final int TEST_FREQUENCY1 = 2412;
-    private static final int TEST_FREQUENCY2 = 5262;
-    private static final int TEST_UID = 4556;
-    private static final int TEST_UID2 = 4567;
-    private static final int SCAN_INTERVAL = 10_000;
-    private static final String TEST_PACKAGE_NAME = "com.test";
-    private static final WorkSource TEST_WORKSOURCE = new WorkSource(TEST_UID, TEST_PACKAGE_NAME);
-    private static final String TEST_PACKAGE_NAME2 = "com.test2";
-    private static final WorkSource TEST_WORKSOURCE2 = new WorkSource(TEST_UID2,
-            TEST_PACKAGE_NAME2);
-    private TestLooper mLooper;
-    private TestHandler mTestHandler;
-    private MultiInternetManager mMultiInternetManager;
-    private WifiInfo mPrimaryInfo = new WifiInfo();
-    private WifiInfo mSecondaryInfo = new WifiInfo();
-
-    /**
-    * A test Handler that stores one single incoming Message with delayed time internally, to be
-    * able to manually triggered by calling {@link #timeAdvance}. Only one delayed message can be
-    * scheduled at a time. The scheduled delayed message intervals are recorded and returned by
-    * {@link #getIntervals}. The intervals are cleared by calling {@link #reset}.
-    */
-    private class TestHandler extends Handler {
-        private ArrayList<Long> mIntervals = new ArrayList<>();
-        private Message mMessage;
-
-        TestHandler(Looper looper) {
-            super(looper);
-        }
-
-        public List<Long> getIntervals() {
-            return mIntervals;
-        }
-
-        public void reset() {
-            mIntervals.clear();
-        }
-
-        public void timeAdvance() {
-            if (mMessage != null) {
-                // Dispatch the message without waiting.
-                super.dispatchMessage(mMessage);
-            }
-        }
-
-        @Override
-        public boolean sendMessageAtTime(Message msg, long uptimeMillis) {
-            // uptimeMillis is an absolute time obtained as SystemClock.uptimeMillis() + delay
-            // in Handler and can't be replaced with customized clock.
-            // if custom clock is given, recalculate the time with regards to it
-            long delayMs = uptimeMillis - SystemClock.uptimeMillis();
-            if (delayMs > 0) {
-                mIntervals.add(delayMs);
-                mMessage = msg;
-            }
-            uptimeMillis = delayMs + mClock.getElapsedSinceBootMillis();
-            // Message is still queued to super, so it doesn't get filtered out and rely on the
-            // timeAdvance() to dispatch. timeAdvance() can force time to advance and send the
-            // message immediately. If it is not called not the message can still be dispatched
-            // at the time the message is scheduled.
-            return super.sendMessageAtTime(msg, uptimeMillis);
-        }
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-
-        mPrimaryInfo.setSSID(WifiSsid.fromUtf8Text(TEST_SSID1));
-        mPrimaryInfo.setBSSID(TEST_BSSID1);
-        mPrimaryInfo.setNetworkId(TEST_NETWORK_ID1);
-        mPrimaryInfo.setFrequency(TEST_FREQUENCY1);
-        mPrimaryInfo.setIsPrimary(true);
-
-        mSecondaryInfo.setSSID(WifiSsid.fromUtf8Text(TEST_SSID2));
-        mSecondaryInfo.setBSSID(TEST_BSSID2);
-        mSecondaryInfo.setNetworkId(TEST_NETWORK_ID2);
-        mSecondaryInfo.setFrequency(TEST_FREQUENCY2);
-        mSecondaryInfo.setIsPrimary(false);
-
-        when(mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()).thenReturn(true);
-
-        when(mPrimaryCmm.getRole()).thenReturn(ROLE_CLIENT_PRIMARY);
-        when(mPrimaryCmm.syncRequestConnectionInfo()).thenReturn(null);
-        when(mSecondaryCmm.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_LONG_LIVED);
-        when(mSecondaryCmm.syncRequestConnectionInfo()).thenReturn(null);
-        when(mSecondaryCmm.isSecondaryInternet()).thenReturn(true);
-
-        when(mActiveModeWarden.getPrimaryClientModeManagerNullable()).thenReturn(mPrimaryCmm);
-        when(mActiveModeWarden.getClientModeManagersInRoles(ROLE_CLIENT_SECONDARY_LONG_LIVED))
-                .thenReturn(List.of(mSecondaryCmm));
-        when(mActiveModeWarden.getInternetConnectivityClientModeManagers()).thenReturn(
-                List.of(mPrimaryCmm, mSecondaryCmm));
-        when(mActiveModeWarden.getClientModeManagersInRoles(ROLE_CLIENT_PRIMARY))
-                .thenReturn(List.of(mPrimaryCmm));
-        when(mActiveModeWarden.getClientModeManagersInRoles(ROLE_CLIENT_SECONDARY_LONG_LIVED))
-                .thenReturn(List.of(mSecondaryCmm));
-        when(mActiveModeWarden.getClientModeManagerInRole(ROLE_CLIENT_SECONDARY_LONG_LIVED))
-                .thenReturn(mSecondaryCmm);
-
-        mLooper = new TestLooper(mClock::getElapsedSinceBootMillis);
-        mTestHandler = new TestHandler(mLooper.getLooper());
-
-        mMultiInternetManager = new MultiInternetManager(mActiveModeWarden, mFrameworkFacade,
-                mContext, mCmiMonitor, mSettingsStore, mTestHandler, mClock);
-
-        verify(mActiveModeWarden).registerModeChangeCallback(mModeChangeCallbackCaptor.capture());
-        verify(mCmiMonitor).registerListener(mCmiListenerCaptor.capture());
-        mMultiInternetManager.setConnectionStatusListener(mConnectionStatusListener);
-    }
-
-    private void fakePrimaryCmmConnected(boolean isConnected) {
-        when(mPrimaryCmm.syncRequestConnectionInfo()).thenReturn(isConnected ? mPrimaryInfo : null);
-        when(mPrimaryCmm.isConnected()).thenReturn(isConnected);
-    }
-
-    private void fakeSecondaryCmmConnected(boolean isConnected) {
-        when(mSecondaryCmm.syncRequestConnectionInfo()).thenReturn(
-                isConnected ? mSecondaryInfo : null);
-        when(mSecondaryCmm.isConnected()).thenReturn(isConnected);
-    }
-
-    @Test
-    public void testMultiInternetFeatureDisabledNoOp() {
-        when(mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()).thenReturn(false);
-
-        mCmiListenerCaptor.getValue().onInternetValidated(mSecondaryCmm);
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRemoved(mSecondaryCmm);
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRoleChanged(mSecondaryCmm);
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mSecondaryCmm);
-
-        verify(mSecondaryCmm, never()).syncRequestConnectionInfo();
-        assertEquals(0, mMultiInternetManager.getNetworkConnectionState().size());
-    }
-
-    @Test
-    public void testSetMultiInternetStateWhenFeatureDisabled() {
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED,
-                mMultiInternetManager.getStaConcurrencyForMultiInternetMode());
-        when(mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()).thenReturn(false);
-        assertFalse(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP));
-        verify(mSettingsStore, never()).handleWifiMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP);
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED,
-                mMultiInternetManager.getStaConcurrencyForMultiInternetMode());
-        assertEquals(0, mMultiInternetManager.getNetworkConnectionState().size());
-    }
-
-    @Test
-    public void testSetMultiInternetStateWhenFeatureEnabled() {
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED,
-                mMultiInternetManager.getStaConcurrencyForMultiInternetMode());
-
-        assertTrue(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_DBS_AP));
-        assertFalse(mMultiInternetManager.isStaConcurrencyForMultiInternetMultiApAllowed());
-        assertTrue(mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled());
-        verify(mSettingsStore).handleWifiMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_DBS_AP);
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_DBS_AP,
-                mMultiInternetManager.getStaConcurrencyForMultiInternetMode());
-
-        assertTrue(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP));
-        assertTrue(mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled());
-        assertTrue(mMultiInternetManager.isStaConcurrencyForMultiInternetMultiApAllowed());
-        verify(mSettingsStore).handleWifiMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP);
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP,
-                mMultiInternetManager.getStaConcurrencyForMultiInternetMode());
-        assertEquals(0, mMultiInternetManager.getNetworkConnectionState().size());
-    }
-
-    @Test
-    public void testSetMultiInternetConnectionWorksource() {
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED,
-                mMultiInternetManager.getStaConcurrencyForMultiInternetMode());
-        assertTrue(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP));
-        verify(mSettingsStore).handleWifiMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP);
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP,
-                mMultiInternetManager.getStaConcurrencyForMultiInternetMode());
-        assertTrue(mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled());
-
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_5_GHZ,
-                TEST_WORKSOURCE);
-        assertTrue(mMultiInternetManager.hasPendingConnectionRequests());
-        assertTrue(mMultiInternetManager.getNetworkConnectionState()
-                .contains(ScanResult.WIFI_BAND_5_GHZ));
-        verify(mConnectionStatusListener).onStatusChange(
-                MultiInternetManager.MULTI_INTERNET_STATE_CONNECTION_REQUESTED, TEST_WORKSOURCE);
-        verify(mConnectionStatusListener).onStartScan(TEST_WORKSOURCE);
-    }
-
-    @Test
-    public void testSetMultiInternetConnectionWorksourceOnTwoBands() {
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_DISABLED,
-                mMultiInternetManager.getStaConcurrencyForMultiInternetMode());
-        assertTrue(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP));
-        verify(mSettingsStore).handleWifiMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP);
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP,
-                mMultiInternetManager.getStaConcurrencyForMultiInternetMode());
-        assertTrue(mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled());
-
-        // Set for 2.4G
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_24_GHZ,
-                TEST_WORKSOURCE);
-        assertTrue(mMultiInternetManager.hasPendingConnectionRequests());
-        assertTrue(mMultiInternetManager.getNetworkConnectionState()
-                .contains(ScanResult.WIFI_BAND_24_GHZ));
-        verify(mConnectionStatusListener).onStatusChange(
-                MultiInternetManager.MULTI_INTERNET_STATE_CONNECTION_REQUESTED, TEST_WORKSOURCE);
-        verify(mConnectionStatusListener).onStartScan(TEST_WORKSOURCE);
-        // Set for 5G
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_5_GHZ,
-                TEST_WORKSOURCE);
-        assertTrue(mMultiInternetManager.getNetworkConnectionState()
-                .contains(ScanResult.WIFI_BAND_5_GHZ));
-        verify(mConnectionStatusListener).onStatusChange(
-                MultiInternetManager.MULTI_INTERNET_STATE_CONNECTION_REQUESTED, TEST_WORKSOURCE);
-        verify(mConnectionStatusListener, times(2)).onStartScan(TEST_WORKSOURCE);
-        // Clear the WorkSource
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_24_GHZ,
-                null);
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_5_GHZ,
-                null);
-        assertFalse(mMultiInternetManager.hasPendingConnectionRequests());
-        assertEquals(0, mMultiInternetManager.getNetworkConnectionState().size());
-    }
-
-    @Test
-    public void testOnInternetValidatedSecondaryCmmConnection() {
-        assertTrue(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP));
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_5_GHZ,
-                TEST_WORKSOURCE);
-        assertTrue(mMultiInternetManager.hasPendingConnectionRequests());
-        fakePrimaryCmmConnected(true);
-        fakeSecondaryCmmConnected(true);
-        mCmiListenerCaptor.getValue().onInternetValidated(mSecondaryCmm);
-        assertFalse(mMultiInternetManager.hasPendingConnectionRequests());
-        assertTrue(mMultiInternetManager.getNetworkConnectionState()
-                .contains(ScanResult.WIFI_BAND_5_GHZ));
-        assertTrue(mMultiInternetManager.getNetworkConnectionState()
-                .get(ScanResult.WIFI_BAND_5_GHZ).isValidated());
-    }
-
-    @Test
-    public void testOnL3ConnectedSecondaryCmmConnection() {
-        assertTrue(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP));
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_24_GHZ,
-                TEST_WORKSOURCE);
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_5_GHZ,
-                TEST_WORKSOURCE);
-        assertTrue(mMultiInternetManager.hasPendingConnectionRequests());
-        fakePrimaryCmmConnected(true);
-        fakeSecondaryCmmConnected(true);
-        mCmiListenerCaptor.getValue().onL3Connected(mSecondaryCmm);
-        assertFalse(mMultiInternetManager.hasPendingConnectionRequests());
-        assertTrue(mMultiInternetManager.getNetworkConnectionState()
-                .get(ScanResult.WIFI_BAND_5_GHZ).isConnected());
-    }
-
-    @Test
-    public void testOnConnectionEndPrimaryCmmConnection() {
-        assertTrue(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP));
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_24_GHZ,
-                TEST_WORKSOURCE);
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_5_GHZ,
-                TEST_WORKSOURCE);
-        assertTrue(mMultiInternetManager.hasPendingConnectionRequests());
-        fakePrimaryCmmConnected(true);
-        fakeSecondaryCmmConnected(true);
-        mCmiListenerCaptor.getValue().onL3Connected(mSecondaryCmm);
-        assertFalse(mMultiInternetManager.hasPendingConnectionRequests());
-        // Primary disconnected
-        fakePrimaryCmmConnected(false);
-        mCmiListenerCaptor.getValue().onConnectionEnd(mPrimaryCmm);
-        verify(mSecondaryCmm).disconnect();
-        assertTrue(mMultiInternetManager.hasPendingConnectionRequests());
-    }
-
-    @Test
-    public void testStartConnectivityScan() {
-        assertTrue(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP));
-        // Primary is 2G, fake 2G is connected.
-        fakePrimaryCmmConnected(true);
-        long currentTimeStamp = 1000;
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp);
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_24_GHZ,
-                TEST_WORKSOURCE);
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_5_GHZ,
-                TEST_WORKSOURCE2);
-        assertTrue(mMultiInternetManager.hasPendingConnectionRequests());
-        for (int i = 0; i < 5; i++) {
-            currentTimeStamp += SCAN_INTERVAL;
-            when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp);
-            mTestHandler.timeAdvance();
-        }
-        verify(mConnectionStatusListener, times(1)).onStatusChange(
-                MultiInternetManager.MULTI_INTERNET_STATE_CONNECTION_REQUESTED, TEST_WORKSOURCE2);
-        verify(mConnectionStatusListener, times(1)).onStartScan(TEST_WORKSOURCE2);
-    }
-
-    @Test
-    public void testNotifyBssidAssociatedEvent() {
-        assertTrue(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP));
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_24_GHZ,
-                TEST_WORKSOURCE);
-        mMultiInternetManager.setMultiInternetConnectionWorksource(ScanResult.WIFI_BAND_5_GHZ,
-                TEST_WORKSOURCE);
-        assertTrue(mMultiInternetManager.hasPendingConnectionRequests());
-        fakePrimaryCmmConnected(true);
-        fakeSecondaryCmmConnected(true);
-        mCmiListenerCaptor.getValue().onL3Connected(mSecondaryCmm);
-        assertFalse(mMultiInternetManager.hasPendingConnectionRequests());
-        // Primary roamed to same frequency as secondary
-        mPrimaryInfo.setBSSID(TEST_BSSID3);
-        mPrimaryInfo.setFrequency(TEST_FREQUENCY2);
-        when(mPrimaryCmm.syncRequestConnectionInfo()).thenReturn(mPrimaryInfo);
-        mMultiInternetManager.notifyBssidAssociatedEvent(mPrimaryCmm);
-        verify(mSecondaryCmm).disconnect();
-        assertTrue(mMultiInternetManager.hasPendingConnectionRequests());
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/MultiInternetWifiNetworkFactoryTest.java b/service/tests/wifitests/src/com/android/server/wifi/MultiInternetWifiNetworkFactoryTest.java
deleted file mode 100644
index a3ece06..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/MultiInternetWifiNetworkFactoryTest.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyObject;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.validateMockitoUsage;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.when;
-
-import android.app.AlarmManager;
-import android.content.Context;
-import android.net.MacAddress;
-import android.net.NetworkCapabilities;
-import android.net.NetworkRequest;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiNetworkSpecifier;
-import android.os.PatternMatcher;
-import android.os.WorkSource;
-import android.os.test.TestLooper;
-import android.test.suitebuilder.annotation.SmallTest;
-import android.util.LocalLog;
-
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.util.WifiPermissionsUtil;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-/**
- * Unit tests for {@link com.android.server.wifi.MultiInternetWifiNetworkFactory}.
- */
-@SmallTest
-public class MultiInternetWifiNetworkFactoryTest extends WifiBaseTest {
-    private static final int TEST_UID = 4556;
-    private static final String TEST_PACKAGE_NAME = "com.test";
-    private static final String TEST_SSID = "TEST_AP1";
-    private static final String TEST_BSSID = "aa:bb:cc:dd:ee:ff";
-    private static final WorkSource TEST_WORKSOURCE = new WorkSource(TEST_UID, TEST_PACKAGE_NAME);
-
-    @Mock WifiConnectivityManager mWifiConnectivityManager;
-    @Mock Context mContext;
-    @Mock WifiPermissionsUtil mWifiPermissionsUtil;
-    @Mock AlarmManager mAlarmManager;
-    @Mock MultiInternetManager mMultiInternetManager;
-    @Mock FrameworkFacade mFrameworkFacade;
-    private LocalLog mLocalLog;
-    private NetworkCapabilities mNetworkCapabilities;
-    private TestLooper mLooper;
-    private NetworkRequest mNetworkRequest2G;
-    private NetworkRequest mNetworkRequest5G;
-
-    private MultiInternetWifiNetworkFactory mMultiInternetWifiNetworkFactory;
-
-    /**
-     * Setup the mocks.
-     */
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-
-        assumeTrue(SdkLevel.isAtLeastS());
-
-        mLocalLog = new LocalLog(512);
-        mLooper = new TestLooper();
-        mNetworkCapabilities = new NetworkCapabilities();
-        mNetworkCapabilities.addTransportType(NetworkCapabilities.TRANSPORT_WIFI);
-        mNetworkCapabilities.setRequestorUid(TEST_UID);
-        mNetworkCapabilities.setRequestorPackageName(TEST_PACKAGE_NAME);
-        final WifiNetworkSpecifier specifier2G = new WifiNetworkSpecifier.Builder()
-                .setBand(ScanResult.WIFI_BAND_24_GHZ)
-                .build();
-        final WifiNetworkSpecifier specifier5G = new WifiNetworkSpecifier.Builder()
-                .setBand(ScanResult.WIFI_BAND_5_GHZ)
-                .build();
-
-        mMultiInternetWifiNetworkFactory = new MultiInternetWifiNetworkFactory(
-                mLooper.getLooper(), mContext, mNetworkCapabilities, mFrameworkFacade,
-                mAlarmManager, mWifiPermissionsUtil, mMultiInternetManager,
-                mWifiConnectivityManager, mLocalLog);
-
-        mNetworkRequest2G = new NetworkRequest.Builder()
-                .setCapabilities(mNetworkCapabilities)
-                .setNetworkSpecifier(specifier2G)
-                .build();
-        mNetworkRequest5G = new NetworkRequest.Builder()
-                .setCapabilities(mNetworkCapabilities)
-                .setNetworkSpecifier(specifier5G)
-                .build();
-    }
-
-    /**
-     * Called after each test
-     */
-    @After
-    public void cleanup() {
-        validateMockitoUsage();
-    }
-
-    @Test
-    public void testIsWifiMultiInternetRequest() {
-        assertFalse(MultiInternetWifiNetworkFactory.isWifiMultiInternetRequest(mNetworkRequest2G));
-        assertFalse(MultiInternetWifiNetworkFactory.isWifiMultiInternetRequest(mNetworkRequest5G));
-        mNetworkRequest2G.networkCapabilities.addCapability(
-                NetworkCapabilities.NET_CAPABILITY_INTERNET);
-        mNetworkRequest5G.networkCapabilities.addCapability(
-                NetworkCapabilities.NET_CAPABILITY_INTERNET);
-        assertTrue(MultiInternetWifiNetworkFactory.isWifiMultiInternetRequest(mNetworkRequest2G));
-        assertTrue(MultiInternetWifiNetworkFactory.isWifiMultiInternetRequest(mNetworkRequest5G));
-        final NetworkRequest networkRequestNoBandSpecifier = new NetworkRequest.Builder()
-                .setCapabilities(mNetworkCapabilities)
-                .setNetworkSpecifier(new WifiNetworkSpecifier.Builder()
-                        .setBssid(MacAddress.fromString(TEST_BSSID))
-                        .build())
-                .build();
-        assertFalse(MultiInternetWifiNetworkFactory.isWifiMultiInternetRequest(
-                networkRequestNoBandSpecifier));
-        final NetworkRequest networkRequestSSIDSpecifier = new NetworkRequest.Builder()
-                .setCapabilities(mNetworkCapabilities)
-                .setNetworkSpecifier(new WifiNetworkSpecifier.Builder()
-                    .setSsidPattern(new PatternMatcher(TEST_SSID,
-                            PatternMatcher.PATTERN_ADVANCED_GLOB))
-                    .setBand(ScanResult.WIFI_BAND_5_GHZ)
-                    .build())
-                .build();
-        assertFalse(MultiInternetWifiNetworkFactory.isWifiMultiInternetRequest(
-                networkRequestSSIDSpecifier));
-        final NetworkRequest networkRequestBSSIDSpecifier = new NetworkRequest.Builder()
-                .setCapabilities(mNetworkCapabilities)
-                .setNetworkSpecifier(new WifiNetworkSpecifier.Builder()
-                    .setBssid(MacAddress.fromString(TEST_BSSID))
-                    .setBand(ScanResult.WIFI_BAND_5_GHZ)
-                    .build())
-                .build();
-        assertFalse(MultiInternetWifiNetworkFactory.isWifiMultiInternetRequest(
-                networkRequestBSSIDSpecifier));
-    }
-
-    /**
-     * Validates handling of needNetworkFor.
-     */
-    @Test
-    public void testMultiInternetHandleNetworkRequest() {
-        when(mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled()).thenReturn(true);
-        mNetworkRequest2G.networkCapabilities.addCapability(
-                NetworkCapabilities.NET_CAPABILITY_INTERNET);
-
-        mMultiInternetWifiNetworkFactory.needNetworkFor(mNetworkRequest2G);
-        // First network request should notify MultiInternetManager.
-        verify(mMultiInternetManager).setMultiInternetConnectionWorksource(
-                ScanResult.WIFI_BAND_24_GHZ, TEST_WORKSOURCE);
-
-        // Subsequent ones should do nothing.
-        mMultiInternetWifiNetworkFactory.needNetworkFor(mNetworkRequest2G);
-        verifyNoMoreInteractions(mWifiConnectivityManager);
-    }
-
-    /**
-     * Validates handling of needNetworkFor of dual bands.
-     */
-    @Test
-    public void testMultiInternetHandleDualBandNetworkRequest() {
-        when(mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled()).thenReturn(true);
-        mNetworkRequest2G.networkCapabilities.addCapability(
-                NetworkCapabilities.NET_CAPABILITY_INTERNET);
-        mNetworkRequest5G.networkCapabilities.addCapability(
-                NetworkCapabilities.NET_CAPABILITY_INTERNET);
-
-        mMultiInternetWifiNetworkFactory.needNetworkFor(mNetworkRequest2G);
-        mMultiInternetWifiNetworkFactory.needNetworkFor(mNetworkRequest5G);
-        // First network request should notify MultiInternetManager.
-        verify(mMultiInternetManager).setMultiInternetConnectionWorksource(
-                ScanResult.WIFI_BAND_24_GHZ, TEST_WORKSOURCE);
-        verify(mMultiInternetManager).setMultiInternetConnectionWorksource(
-                ScanResult.WIFI_BAND_5_GHZ, TEST_WORKSOURCE);
-
-        reset(mMultiInternetManager);
-        // Subsequent ones should do nothing.
-        mMultiInternetWifiNetworkFactory.needNetworkFor(mNetworkRequest2G);
-        mMultiInternetWifiNetworkFactory.needNetworkFor(mNetworkRequest5G);
-        verify(mMultiInternetManager, never()).setMultiInternetConnectionWorksource(anyInt(),
-                anyObject());
-        verifyNoMoreInteractions(mWifiConnectivityManager);
-    }
-
-    /**
-     * Validates handling of releaseNetwork.
-     */
-    @Test
-    public void testHandleMultiInternetNetworkRelease() {
-        when(mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled()).thenReturn(true);
-        mNetworkRequest2G.networkCapabilities.addCapability(
-                NetworkCapabilities.NET_CAPABILITY_INTERNET);
-        // Release network without a corresponding request should be ignored.
-        mMultiInternetWifiNetworkFactory.releaseNetworkFor(mNetworkRequest2G);
-
-        // Now request & then release the network request
-        mMultiInternetWifiNetworkFactory.needNetworkFor(mNetworkRequest2G);
-        verify(mMultiInternetManager).setMultiInternetConnectionWorksource(
-                ScanResult.WIFI_BAND_24_GHZ, TEST_WORKSOURCE);
-
-        mMultiInternetWifiNetworkFactory.releaseNetworkFor(mNetworkRequest2G);
-        verify(mMultiInternetManager).setMultiInternetConnectionWorksource(
-                ScanResult.WIFI_BAND_24_GHZ, null);
-    }
-
-    /**
-     * Validates handling of releaseNetwork after multiple network requests.
-     */
-    @Test
-    public void testHandleMultiInternetNetworkReleaseWithMultiRequests() {
-        when(mMultiInternetManager.isStaConcurrencyForMultiInternetEnabled()).thenReturn(true);
-        mNetworkRequest5G.networkCapabilities.addCapability(
-                NetworkCapabilities.NET_CAPABILITY_INTERNET);
-        // Release network without a corresponding request should be ignored.
-        mMultiInternetWifiNetworkFactory.releaseNetworkFor(mNetworkRequest5G);
-
-        // Now request & then release the network request
-        mMultiInternetWifiNetworkFactory.needNetworkFor(mNetworkRequest5G);
-        verify(mMultiInternetManager).setMultiInternetConnectionWorksource(
-                ScanResult.WIFI_BAND_5_GHZ, TEST_WORKSOURCE);
-
-        // Now request the network again for 2 times.
-        mMultiInternetWifiNetworkFactory.needNetworkFor(mNetworkRequest5G);
-        mMultiInternetWifiNetworkFactory.needNetworkFor(mNetworkRequest5G);
-
-        mMultiInternetWifiNetworkFactory.releaseNetworkFor(mNetworkRequest5G);
-        verify(mMultiInternetManager, never()).setMultiInternetConnectionWorksource(
-                ScanResult.WIFI_BAND_5_GHZ, null);
-        mMultiInternetWifiNetworkFactory.releaseNetworkFor(mNetworkRequest5G);
-        mMultiInternetWifiNetworkFactory.releaseNetworkFor(mNetworkRequest5G);
-        verify(mMultiInternetManager).setMultiInternetConnectionWorksource(
-                ScanResult.WIFI_BAND_5_GHZ, null);
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java b/service/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
index 0684c33..6282951 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/NetworkListStoreDataTest.java
@@ -21,29 +21,21 @@
 import static com.android.server.wifi.WifiConfigurationTestUtil.TEST_EAP_PASSWORD;
 import static com.android.server.wifi.WifiConfigurationTestUtil.TEST_IDENTITY;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.net.MacAddress;
-import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiEnterpriseConfig;
-import android.net.wifi.util.ScanResultUtil;
 import android.util.Xml;
 
 import androidx.test.filters.SmallTest;
 
 import com.android.internal.util.FastXmlSerializer;
 import com.android.modules.utils.build.SdkLevel;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.server.wifi.util.WifiConfigStoreEncryptionUtil;
 import com.android.server.wifi.util.XmlUtilTest;
 
@@ -94,7 +86,6 @@
                     + "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
                     + "<int name=\"DeletionPriority\" value=\"0\" />\n"
                     + "<int name=\"NumRebootsSinceLastUse\" value=\"0\" />\n"
-                    + "<boolean name=\"RepeaterEnabled\" value=\"false\" />\n"
                     + "<SecurityParamsList>\n"
                     + "<SecurityParams>\n"
                     + "<int name=\"SecurityType\" value=\"0\" />\n"
@@ -110,7 +101,6 @@
                     + "</SecurityParams>\n"
                     + "</SecurityParamsList>\n"
                     + "<boolean name=\"Trusted\" value=\"true\" />\n"
-                    + "<boolean name=\"IsRestricted\" value=\"false\" />\n"
                     + "<boolean name=\"OemPaid\" value=\"false\" />\n"
                     + "<boolean name=\"OemPrivate\" value=\"false\" />\n"
                     + "<boolean name=\"CarrierMerged\" value=\"false\" />\n"
@@ -137,10 +127,6 @@
                     + "<int name=\"CarrierId\" value=\"-1\" />\n"
                     + "<boolean name=\"IsMostRecentlyConnected\" value=\"false\" />\n"
                     + "<int name=\"SubscriptionId\" value=\"-1\" />\n"
-                    + "<byte-array name=\"DppPrivateEcKey\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppConnector\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppCSignKey\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppNetAccessKey\" num=\"0\"></byte-array>\n"
                     + "</WifiConfiguration>\n"
                     + "<NetworkStatus>\n"
                     + "<string name=\"SelectionStatus\">NETWORK_SELECTION_ENABLED</string>\n"
@@ -177,7 +163,6 @@
                     + "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
                     + "<int name=\"DeletionPriority\" value=\"0\" />\n"
                     + "<int name=\"NumRebootsSinceLastUse\" value=\"0\" />\n"
-                    + "<boolean name=\"RepeaterEnabled\" value=\"false\" />\n"
                     + "<SecurityParamsList>\n"
                     + "<SecurityParams>\n"
                     + "<int name=\"SecurityType\" value=\"3\" />\n"
@@ -193,7 +178,6 @@
                     + "</SecurityParams>\n"
                     + "</SecurityParamsList>\n"
                     + "<boolean name=\"Trusted\" value=\"true\" />\n"
-                    + "<boolean name=\"IsRestricted\" value=\"false\" />\n"
                     + "<boolean name=\"OemPaid\" value=\"false\" />\n"
                     + "<boolean name=\"OemPrivate\" value=\"false\" />\n"
                     + "<boolean name=\"CarrierMerged\" value=\"false\" />\n"
@@ -220,10 +204,6 @@
                     + "<int name=\"CarrierId\" value=\"-1\" />\n"
                     + "<boolean name=\"IsMostRecentlyConnected\" value=\"false\" />\n"
                     + "<int name=\"SubscriptionId\" value=\"-1\" />\n"
-                    + "<byte-array name=\"DppPrivateEcKey\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppConnector\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppCSignKey\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppNetAccessKey\" num=\"0\"></byte-array>\n"
                     + "</WifiConfiguration>\n"
                     + "<NetworkStatus>\n"
                     + "<string name=\"SelectionStatus\">NETWORK_SELECTION_ENABLED</string>\n"
@@ -261,8 +241,6 @@
                     + "<null name=\"KeyChainAlias\" />\n"
                     + (SdkLevel.isAtLeastS()
                     ? "<null name=\"DecoratedIdentityPrefix\" />\n" : "")
-                    + "<boolean name=\"TrustOnFirstUse\" value=\"false\" />\n"
-                    + "<boolean name=\"UserApproveNoCaCert\" value=\"false\" />\n"
                     + "</WifiEnterpriseConfiguration>\n"
                     + "</Network>\n";;
 
@@ -288,7 +266,6 @@
                     + "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
                     + "<int name=\"DeletionPriority\" value=\"0\" />\n"
                     + "<int name=\"NumRebootsSinceLastUse\" value=\"0\" />\n"
-                    + "<boolean name=\"RepeaterEnabled\" value=\"false\" />\n"
                     + "<SecurityParamsList>\n"
                     + "<SecurityParams>\n"
                     + "<int name=\"SecurityType\" value=\"4\" />\n"
@@ -298,7 +275,6 @@
                     + "</SecurityParams>\n"
                     + "</SecurityParamsList>\n"
                     + "<boolean name=\"Trusted\" value=\"true\" />\n"
-                    + "<boolean name=\"IsRestricted\" value=\"false\" />\n"
                     + "<boolean name=\"OemPaid\" value=\"false\" />\n"
                     + "<boolean name=\"OemPrivate\" value=\"false\" />\n"
                     + "<boolean name=\"CarrierMerged\" value=\"false\" />\n"
@@ -325,10 +301,6 @@
                     + "<int name=\"CarrierId\" value=\"-1\" />\n"
                     + "<boolean name=\"IsMostRecentlyConnected\" value=\"false\" />\n"
                     + "<int name=\"SubscriptionId\" value=\"-1\" />\n"
-                    + "<byte-array name=\"DppPrivateEcKey\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppConnector\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppCSignKey\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppNetAccessKey\" num=\"0\"></byte-array>\n"
                     + "</WifiConfiguration>\n"
                     + "<NetworkStatus>\n"
                     + "<string name=\"SelectionStatus\">NETWORK_SELECTION_ENABLED</string>\n"
@@ -365,7 +337,6 @@
                     + "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
                     + "<int name=\"DeletionPriority\" value=\"0\" />\n"
                     + "<int name=\"NumRebootsSinceLastUse\" value=\"0\" />\n"
-                    + "<boolean name=\"RepeaterEnabled\" value=\"false\" />\n"
                     + "<SecurityParamsList>\n"
                     + "<SecurityParams>\n"
                     + "<int name=\"SecurityType\" value=\"3\" />\n"
@@ -407,10 +378,6 @@
                     + "<int name=\"CarrierId\" value=\"-1\" />\n"
                     + "<boolean name=\"IsMostRecentlyConnected\" value=\"false\" />\n"
                     + "<int name=\"SubscriptionId\" value=\"-1\" />\n"
-                    + "<byte-array name=\"DppPrivateEcKey\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppConnector\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppCSignKey\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"DppNetAccessKey\" num=\"0\"></byte-array>\n"
                     + "</WifiConfiguration>\n"
                     + "<NetworkStatus>\n"
                     + "<string name=\"SelectionStatus\">NETWORK_SELECTION_ENABLED</string>\n"
@@ -448,8 +415,6 @@
                     + "<null name=\"KeyChainAlias\" />\n"
                     + (SdkLevel.isAtLeastS()
                     ? "<null name=\"DecoratedIdentityPrefix\" />\n" : "")
-                    + "<boolean name=\"TrustOnFirstUse\" value=\"false\" />\n"
-                    + "<boolean name=\"UserApproveNoCaCert\" value=\"false\" />\n"
                     + "</WifiEnterpriseConfiguration>\n"
                     + "</Network>\n";;
 
@@ -481,7 +446,6 @@
                     + "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
                     + "<int name=\"DeletionPriority\" value=\"0\" />\n"
                     + "<int name=\"NumRebootsSinceLastUse\" value=\"0\" />\n"
-                    + "<boolean name=\"RepeaterEnabled\" value=\"false\" />\n"
                     + "<boolean name=\"Trusted\" value=\"true\" />\n"
                     + "<null name=\"BSSID\" />\n"
                     + "<int name=\"Status\" value=\"2\" />\n"
@@ -779,7 +743,6 @@
      *
      * @throws Exception
      */
-    @Test
     public void parseNetworkWithMismatchConfigKey() throws Exception {
         WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork();
         byte[] xmlData = String.format(SINGLE_OPEN_NETWORK_DATA_XML_STRING_FORMAT,
@@ -973,7 +936,7 @@
         List<WifiConfiguration> storedWIfiConfig = new ArrayList<>();
         for (int i = 1; i <= 1; i++) {
             WifiConfiguration network = WifiConfigurationTestUtil.createOpenNetwork(
-                    ScanResultUtil.createQuotedSsid(testSSID + (1 - i)));
+                    ScanResultUtil.createQuotedSSID(testSSID + (1 - i)));
             network.creatorName = TEST_CREATOR_NAME;
         }
         // Add to store data based on added order.
@@ -1041,46 +1004,4 @@
         assertTrue(deserializedWpa3EapNetwork.isSecurityType(
                 WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE));
     }
-
-    @Test
-    public void testSerializeDeserializeWithSecurityUpdate() throws Exception {
-        WifiConfiguration pskConfig = WifiConfigurationTestUtil.createPskNetwork();
-        WifiConfiguration wpa2EapConfig = WifiConfigurationTestUtil
-                .createWpa2Wpa3EnterpriseNetwork();
-        wpa2EapConfig.setSecurityParams(SecurityParams
-                .createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_EAP));
-        WifiConfiguration openConfig = WifiConfigurationTestUtil.createOpenNetwork();
-
-        List<WifiConfiguration> expected = new ArrayList<>();
-        expected.add(pskConfig);
-        expected.add(wpa2EapConfig);
-        expected.add(openConfig);
-        mNetworkListSharedStoreData.setConfigurations(expected);
-        List<WifiConfiguration> retrieved = deserializeData(serializeData());
-        assertEquals(expected.size(), retrieved.size());
-        for (int i = 0; i < expected.size(); i++) {
-            verifyAutoUpgradeType(expected.get(i), retrieved.get(i));
-        }
-    }
-
-    /**
-     * This helper method tests the auto-upgrade type is added for Open,
-     * PSK, and Enterprise networks.
-     */
-    private static void verifyAutoUpgradeType(WifiConfiguration expected,
-            WifiConfiguration actual) {
-        if (expected.isSecurityType(WifiConfiguration.SECURITY_TYPE_OPEN)) {
-            assertTrue(actual.isSecurityType(WifiConfiguration.SECURITY_TYPE_OPEN));
-            assertTrue(actual.isSecurityType(WifiConfiguration.SECURITY_TYPE_OWE));
-        } else if (expected.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)) {
-            assertTrue(actual.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK));
-            assertTrue(actual.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE));
-        } else if (expected.isSecurityType(WifiConfiguration.SECURITY_TYPE_EAP)
-                && expected.isEnterprise()) {
-            assertTrue(actual.isSecurityType(WifiConfiguration.SECURITY_TYPE_EAP));
-            assertTrue(actual.isSecurityType(
-                    WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE));
-        }
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionNominatorTest.java b/service/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionNominatorTest.java
index 6e9f26c..4c11e3d 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionNominatorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/NetworkSuggestionNominatorTest.java
@@ -48,7 +48,6 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -122,7 +121,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -165,7 +164,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -207,7 +206,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -252,7 +251,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -297,7 +296,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -346,7 +345,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -392,7 +391,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -447,7 +446,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -491,7 +490,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -549,7 +548,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -614,7 +613,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) ->
                         connectableNetworks.add(Pair.create(scanDetail, configuration)));
 
@@ -671,7 +670,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -740,7 +739,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -807,7 +806,7 @@
                 .thenReturn(matchedExtSuggestions);
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -861,7 +860,7 @@
                 .thenReturn(Set.of());
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -905,7 +904,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -951,7 +950,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1001,7 +1000,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1046,7 +1045,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1092,7 +1091,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), true, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), true, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1136,7 +1135,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1183,7 +1182,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, true, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, true, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1227,7 +1226,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1274,7 +1273,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, true, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, true,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1324,7 +1323,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, true, true, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, true, true,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1373,7 +1372,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1423,7 +1422,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, true, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, true, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1473,7 +1472,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, true, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, true,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1521,7 +1520,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1568,7 +1567,7 @@
 
         List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
         mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
+                Arrays.asList(scanDetails), false, false, false,
                 (ScanDetail scanDetail, WifiConfiguration configuration) -> {
                     connectableNetworks.add(Pair.create(scanDetail, configuration));
                 });
@@ -1578,97 +1577,6 @@
                 .incrementNetworkSuggestionMoreThanOneSuggestionForSingleScanResult();
     }
 
-    /**
-     * Ensure that we nominate no matching network suggestion.
-     * Because the only matched suggestion is restricted and restricted is not allowed
-     * Expected connectable Networks: {}
-     */
-    @Test
-    public void testSelectNetworkSuggestionForOneMatchRestrictedNotAllow() {
-        String[] scanSsids = {"test1", "test2"};
-        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
-        int[] freqs = {2470, 2437};
-        String[] caps = {"[WPA2-EAP/SHA1-CCMP][ESS]", "[WPA2-EAP/SHA1-CCMP][ESS]"};
-        int[] levels = {-67, -76};
-        String[] suggestionSsids = {"\"" + scanSsids[0] + "\""};
-        int[] securities = {SECURITY_PSK};
-        boolean[] appInteractions = {true};
-        boolean[] meteredness = {true};
-        int[] priorities = {-1};
-        int[] uids = {TEST_UID};
-        String[] packageNames = {TEST_PACKAGE};
-        boolean[] autojoin = {true};
-        boolean[] shareWithUser = {true};
-        int[] priorityGroup = {0};
-
-        ScanDetail[] scanDetails =
-                buildScanDetails(scanSsids, bssids, freqs, caps, levels, mClock);
-        ExtendedWifiNetworkSuggestion[] suggestions = buildNetworkSuggestions(suggestionSsids,
-                securities, appInteractions, meteredness, priorities, uids,
-                packageNames, autojoin, shareWithUser, priorityGroup);
-        suggestions[0].wns.wifiConfiguration.restricted = true;
-        // Link the scan result with suggestions.
-        linkScanDetailsWithNetworkSuggestions(scanDetails, suggestions);
-
-        List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
-        mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), false, false, false, Collections.emptySet(),
-                (ScanDetail scanDetail, WifiConfiguration configuration) -> {
-                    connectableNetworks.add(Pair.create(scanDetail, configuration));
-                });
-
-        assertTrue(connectableNetworks.isEmpty());
-        verify(mWifiMetrics, never())
-                .incrementNetworkSuggestionMoreThanOneSuggestionForSingleScanResult();
-    }
-
-    /**
-     * Ensure that we nominate the one matching network suggestion.
-     * Because the only matched suggestion is restricted and restricted is allowed
-     * Expected connectable Networks: {suggestionSsids[0]}
-     */
-    @Test
-    public void testSelectNetworkSuggestionForOneMatchRestrictedAllow() {
-        String[] scanSsids = {"test1", "test2"};
-        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
-        int[] freqs = {2470, 2437};
-        String[] caps = {"[WPA2-EAP/SHA1-CCMP][ESS]", "[WPA2-EAP/SHA1-CCMP][ESS]"};
-        int[] levels = {-67, -76};
-        String[] suggestionSsids = {"\"" + scanSsids[0] + "\""};
-        int[] securities = {SECURITY_PSK};
-        boolean[] appInteractions = {true};
-        boolean[] meteredness = {true};
-        int[] priorities = {-1};
-        int[] uids = {TEST_UID};
-        String[] packageNames = {TEST_PACKAGE};
-        boolean[] autojoin = {true};
-        boolean[] shareWithUser = {true};
-        int[] priorityGroup = {0};
-
-        ScanDetail[] scanDetails =
-                buildScanDetails(scanSsids, bssids, freqs, caps, levels, mClock);
-        ExtendedWifiNetworkSuggestion[] suggestions = buildNetworkSuggestions(suggestionSsids,
-                securities, appInteractions, meteredness, priorities, uids,
-                packageNames, autojoin, shareWithUser, priorityGroup);
-        suggestions[0].wns.wifiConfiguration.restricted = true;
-        // Link the scan result with suggestions.
-        linkScanDetailsWithNetworkSuggestions(scanDetails, suggestions);
-
-        setupAddToWifiConfigManager(suggestions[0]);
-
-        List<Pair<ScanDetail, WifiConfiguration>> connectableNetworks = new ArrayList<>();
-        mNetworkSuggestionNominator.nominateNetworks(
-                Arrays.asList(scanDetails), true, false, false,
-                Set.of(suggestions[0].wns.wifiConfiguration.creatorUid),
-                (ScanDetail scanDetail, WifiConfiguration configuration) -> {
-                    connectableNetworks.add(Pair.create(scanDetail, configuration));
-                });
-
-        validateConnectableNetworks(connectableNetworks, scanSsids[0]);
-        verify(mWifiMetrics, never())
-                .incrementNetworkSuggestionMoreThanOneSuggestionForSingleScanResult();
-    }
-
     private void setupAddToWifiConfigManager(ExtendedWifiNetworkSuggestion...candidates) {
         for (int i = 0; i < candidates.length; i++) {
             WifiConfiguration candidate = candidates[i].createInternalWifiConfiguration(
@@ -1691,7 +1599,7 @@
         ArgumentCaptor<WifiConfiguration> wifiConfigurationCaptor =
                 ArgumentCaptor.forClass(WifiConfiguration.class);
         verify(mWifiConfigManager, times(candidates.length)).addOrUpdateNetwork(
-                wifiConfigurationCaptor.capture(), anyInt(), anyString(), eq(false));
+                wifiConfigurationCaptor.capture(), anyInt(), anyString());
         verify(mWifiConfigManager, times(candidates.length)).allowAutojoin(anyInt(), anyBoolean());
         for (int i = 0; i < candidates.length; i++) {
             WifiConfiguration addedWifiConfiguration = null;
@@ -1725,7 +1633,7 @@
         ScanDetail[] scanDetails = new ScanDetail[ssids.length];
         long timeStamp = clock.getElapsedSinceBootMillis();
         for (int index = 0; index < ssids.length; index++) {
-            scanDetails[index] = new ScanDetail(WifiSsid.fromUtf8Text(ssids[index]),
+            scanDetails[index] = new ScanDetail(WifiSsid.createFromAsciiEncoded(ssids[index]),
                     bssids[index], caps[index], levels[index], freqs[index], timeStamp, 0);
         }
         return scanDetails;
diff --git a/service/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java b/service/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java
index 332b6d9..6e56957 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/OpenNetworkNotifierTest.java
@@ -25,7 +25,6 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assume.assumeTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.anyInt;
@@ -42,7 +41,6 @@
 import android.database.ContentObserver;
 import android.net.Uri;
 import android.net.wifi.ScanResult;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiManager;
 import android.os.Message;
 import android.os.Process;
@@ -54,11 +52,9 @@
 
 import androidx.test.filters.SmallTest;
 
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.proto.nano.WifiMetricsProto;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.ConnectToNetworkNotificationAndActionCount;
 import com.android.server.wifi.util.ActionListenerWrapper;
-import com.android.server.wifi.util.WifiPermissionsUtil;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -77,11 +73,9 @@
 
     private static final String TEST_SSID_1 = "Test SSID 1";
     private static final String TEST_SSID_2 = "Test SSID 2";
-    private static final String TEST_BSSID = "11:22:33:44:55:66";
     private static final int MIN_RSSI_LEVEL = -127;
     private static final String OPEN_NET_NOTIFIER_TAG = OpenNetworkNotifier.TAG;
     private static final int TEST_NETWORK_ID = 42;
-    private static final String TEST_PACKAGE_NAME = "com.test.xxx";
 
     @Mock private WifiContext mContext;
     @Mock private Resources mResources;
@@ -96,7 +90,6 @@
     @Mock private UserManager mUserManager;
     @Mock private ConnectHelper mConnectHelper;
     @Mock private MakeBeforeBreakManager mMakeBeforeBreakManager;
-    @Mock private WifiPermissionsUtil mWifiPermissionsUtil;
     private OpenNetworkNotifier mNotificationController;
     private TestLooper mLooper;
     private BroadcastReceiver mBroadcastReceiver;
@@ -118,17 +111,16 @@
         when(mContext.getResources()).thenReturn(mResources);
         mTestNetwork = new ScanResult();
         mTestNetwork.SSID = TEST_SSID_1;
-        mTestNetwork.BSSID = TEST_BSSID;
         mTestNetwork.capabilities = "[ESS]";
         mTestNetwork.level = MIN_RSSI_LEVEL;
         mOpenNetworks = new ArrayList<>();
-        mOpenNetworks.add(new ScanDetail(mTestNetwork));
+        mOpenNetworks.add(new ScanDetail(mTestNetwork, null /* networkDetail */));
 
         mLooper = new TestLooper();
         mNotificationController = new OpenNetworkNotifier(
                 mContext, mLooper.getLooper(), mFrameworkFacade, mClock, mWifiMetrics,
                 mWifiConfigManager, mWifiConfigStore, mConnectHelper, mNotificationBuilder,
-                mMakeBeforeBreakManager, mWifiNotificationManager, mWifiPermissionsUtil);
+                mMakeBeforeBreakManager, mWifiNotificationManager);
         ArgumentCaptor<BroadcastReceiver> broadcastReceiverCaptor =
                 ArgumentCaptor.forClass(BroadcastReceiver.class);
         verify(mContext).registerReceiver(broadcastReceiverCaptor.capture(), any(), any(), any());
@@ -146,7 +138,6 @@
                 onStoppedListener.run();
             }
         }).when(mMakeBeforeBreakManager).stopAllSecondaryTransientClientModeManagers(any());
-        when(mWifiPermissionsUtil.getCurrentUser()).thenReturn(UserHandle.USER_SYSTEM);
     }
 
     /**
@@ -325,10 +316,9 @@
 
         ScanResult newNetwork = new ScanResult();
         newNetwork.SSID = TEST_SSID_2;
-        newNetwork.BSSID = TEST_BSSID;
         mTestNetwork.capabilities = "[ESS]";
         mTestNetwork.level = MIN_RSSI_LEVEL + 1;
-        mOpenNetworks.add(new ScanDetail(newNetwork));
+        mOpenNetworks.add(new ScanDetail(newNetwork, null /* networkDetail */));
 
         mNotificationController.handleScreenStateChanged(false);
         mNotificationController.handleScanResults(mOpenNetworks);
@@ -474,15 +464,11 @@
     @Test
     public void userHasDisallowConfigWifiRestriction_notificationNotDisplayed() {
         when(mUserManager.hasUserRestrictionForUser(UserManager.DISALLOW_CONFIG_WIFI,
-                UserHandle.of(mWifiPermissionsUtil.getCurrentUser())))
+              UserHandle.CURRENT))
                 .thenReturn(true);
 
         mNotificationController.handleScanResults(mOpenNetworks);
 
-        if (!SdkLevel.isAtLeastT()) {
-            verify(mUserManager, never()).hasUserRestrictionForUser(
-                    eq(UserManager.DISALLOW_ADD_WIFI_CONFIG), any());
-        }
         verify(mWifiNotificationManager, never()).notify(anyInt(), any());
     }
 
@@ -498,48 +484,7 @@
         verify(mWifiNotificationManager).notify(anyInt(), any());
 
         when(mUserManager.hasUserRestrictionForUser(UserManager.DISALLOW_CONFIG_WIFI,
-                UserHandle.of(mWifiPermissionsUtil.getCurrentUser())))
-                .thenReturn(true);
-
-        mNotificationController.handleScanResults(mOpenNetworks);
-
-        if (!SdkLevel.isAtLeastT()) {
-            verify(mUserManager, never()).hasUserRestrictionForUser(
-                    eq(UserManager.DISALLOW_ADD_WIFI_CONFIG), any());
-        }
-        verify(mWifiNotificationManager).cancel(anyInt());
-    }
-
-    /** Verifies that {@link UserManager#DISALLOW_ADD_WIFI_CONFIG} disables the feature. */
-    @Test
-    public void userHasDisallowAddWifiConfigRestriction_notificationNotDisplayed() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mUserManager.hasUserRestrictionForUser(UserManager.DISALLOW_ADD_WIFI_CONFIG,
-                UserHandle.of(mWifiPermissionsUtil.getCurrentUser())))
-                .thenReturn(true);
-
-        mNotificationController.handleScanResults(mOpenNetworks);
-
-        verify(mWifiNotificationManager, never()).notify(anyInt(), any());
-    }
-
-    /**
-     * Verifies that {@link UserManager#DISALLOW_ADD_WIFI_CONFIG} clears the
-     * showing notification.
-     */
-    @Test
-    public void userHasDisallowAddWifiConfigRestriction_showingNotificationIsCleared() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        mNotificationController.handleScanResults(mOpenNetworks);
-
-        verify(mNotificationBuilder).createConnectToAvailableNetworkNotification(
-                OPEN_NET_NOTIFIER_TAG, mTestNetwork);
-        verify(mWifiMetrics).incrementConnectToNetworkNotification(OPEN_NET_NOTIFIER_TAG,
-                ConnectToNetworkNotificationAndActionCount.NOTIFICATION_RECOMMEND_NETWORK);
-        verify(mWifiNotificationManager).notify(anyInt(), any());
-
-        when(mUserManager.hasUserRestrictionForUser(UserManager.DISALLOW_ADD_WIFI_CONFIG,
-                UserHandle.of(mWifiPermissionsUtil.getCurrentUser())))
+              UserHandle.CURRENT))
                 .thenReturn(true);
 
         mNotificationController.handleScanResults(mOpenNetworks);
@@ -554,7 +499,7 @@
     @Test
     public void actionConnectToNetwork_notificationNotShowing_doesNothing() {
         mBroadcastReceiver.onReceive(mContext, createIntent(ACTION_CONNECT_TO_NETWORK));
-        verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt(), any());
+        verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt());
     }
 
     /**
@@ -575,7 +520,7 @@
         mBroadcastReceiver.onReceive(mContext, createIntent(ACTION_CONNECT_TO_NETWORK));
 
         verify(mConnectHelper).connectToNetwork(eq(new NetworkUpdateResult(TEST_NETWORK_ID)),
-                any(ActionListenerWrapper.class), eq(Process.SYSTEM_UID), any());
+                any(ActionListenerWrapper.class), eq(Process.SYSTEM_UID));
         // Connecting Notification
         verify(mNotificationBuilder).createNetworkConnectingNotification(OPEN_NET_NOTIFIER_TAG,
                 mTestNetwork);
@@ -756,7 +701,7 @@
         ArgumentCaptor<ActionListenerWrapper> connectListenerCaptor =
                 ArgumentCaptor.forClass(ActionListenerWrapper.class);
         verify(mConnectHelper).connectToNetwork(eq(new NetworkUpdateResult(TEST_NETWORK_ID)),
-                connectListenerCaptor.capture(), eq(Process.SYSTEM_UID), any());
+                connectListenerCaptor.capture(), eq(Process.SYSTEM_UID));
         ActionListenerWrapper connectListener = connectListenerCaptor.getValue();
 
         // Connecting Notification
@@ -769,7 +714,7 @@
                 ConnectToNetworkNotificationAndActionCount.ACTION_CONNECT_TO_NETWORK);
         verify(mWifiNotificationManager, times(2)).notify(anyInt(), any());
 
-        connectListener.sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+        connectListener.sendFailure(WifiManager.ERROR);
         mLooper.dispatchAll();
 
         // Failed to Connect Notification
@@ -796,9 +741,8 @@
         for (String ssid : ssids) {
             ScanResult scanResult = new ScanResult();
             scanResult.SSID = ssid;
-            scanResult.BSSID = TEST_BSSID;
             scanResult.capabilities = "[ESS]";
-            scanResults.add(new ScanDetail(scanResult));
+            scanResults.add(new ScanDetail(scanResult, null /* networkDetail */));
         }
         return scanResults;
     }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/PmkCacheManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/PmkCacheManagerTest.java
deleted file mode 100644
index eb08c3e..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/PmkCacheManagerTest.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.net.MacAddress;
-import android.os.Handler;
-import android.text.TextUtils;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.server.wifi.util.NativeUtil;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Unit tests for {@link com.android.server.wifi.PmkCacheManager}.
- */
-@SmallTest
-public class PmkCacheManagerTest extends WifiBaseTest {
-
-    private static final MacAddress TEST_MAC_ADDRESS =
-            MacAddress.fromString("aa:bb:cc:dd:ee:ff");
-    private static final MacAddress TEST_MAC_ADDRESS_2 =
-            MacAddress.fromString("aa:bb:cc:dd:ee:00");
-
-    @Mock private Clock mClock;
-    @Mock private Handler mHandler;
-
-    private PmkCacheManager mPmkCacheManager;
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-
-        mPmkCacheManager = new PmkCacheManager(mClock, mHandler);
-
-        doNothing().when(mHandler).removeCallbacksAndMessages(any());
-
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(0L);
-    }
-
-    private void preparePmkCache() throws Exception {
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 0, 1500, generatePmkDataFromString("Cache"));
-
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 1, 1000, generatePmkDataFromString("HelloWorld"));
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 1, 1500, generatePmkDataFromString("HelloWorld2"));
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 1, 3000, generatePmkDataFromString("HelloWorld3"));
-
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 2, 1000, generatePmkDataFromString("HelloWorld"));
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 2, 1500, generatePmkDataFromString("HelloWorld2"));
-        mPmkCacheManager.add(TEST_MAC_ADDRESS_2, 2, 3000, generatePmkDataFromString("HelloWorld3"));
-    }
-
-    @After
-    public void cleanUp() throws Exception {
-    }
-
-    @Test
-    public void testGet() throws Exception {
-        preparePmkCache();
-
-        List<ArrayList<Byte>> pmkDataList;
-
-        pmkDataList = mPmkCacheManager.get(0);
-        assertEquals(1, pmkDataList.size());
-
-        pmkDataList = mPmkCacheManager.get(1);
-        assertEquals(3, pmkDataList.size());
-
-        // No PMK cache for this network
-        pmkDataList = mPmkCacheManager.get(99);
-        assertNull(pmkDataList);
-    }
-
-    @Test
-    public void testRemove() throws Exception {
-        preparePmkCache();
-
-        mPmkCacheManager.remove(1);
-        List<ArrayList<Byte>> pmkDataList = mPmkCacheManager.get(1);
-        assertNull(pmkDataList);
-
-        // Remove non-existent cache should not crash.
-        mPmkCacheManager.remove(99);
-    }
-
-    @Test
-    public void testRemoveIfNeeded() throws Exception {
-        preparePmkCache();
-
-        List<ArrayList<Byte>> pmkDataList;
-
-        // MAC address is not changed, do nothing.
-        pmkDataList = mPmkCacheManager.get(1);
-        assertEquals(3, pmkDataList.size());
-        mPmkCacheManager.remove(1, TEST_MAC_ADDRESS);
-        pmkDataList = mPmkCacheManager.get(1);
-        assertEquals(3, pmkDataList.size());
-
-        // MAC address is changed and all entries are associated with this MAC address.
-        mPmkCacheManager.remove(1, TEST_MAC_ADDRESS_2);
-        pmkDataList = mPmkCacheManager.get(1);
-        assertNull(pmkDataList);
-
-        // MAC address is changed and partial entries are associated with this MAC address.
-        pmkDataList = mPmkCacheManager.get(2);
-        assertEquals(3, pmkDataList.size());
-        mPmkCacheManager.remove(2, TEST_MAC_ADDRESS_2);
-        pmkDataList = mPmkCacheManager.get(2);
-        assertEquals(1, pmkDataList.size());
-    }
-
-    @Test
-    public void testPmkCacheExpirationUpdate() throws Exception {
-
-        final long testStartSeconds = 100;
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(testStartSeconds * 1000L);
-        // Add the first entry, the next updating time is the expiration of the first entry.
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 0, 1500, generatePmkDataFromString("Cache"));
-        verify(mHandler).postDelayed(
-                /* private listener */ any(),
-                eq(PmkCacheManager.PMK_CACHE_EXPIRATION_ALARM_TAG),
-                eq((1500 - testStartSeconds) * 1000));
-
-        // The expiration of the second one is smaller, and the next updating time is changed.
-        reset(mHandler);
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 1, 1000, generatePmkDataFromString("HelloWorld"));
-        verify(mHandler).postDelayed(
-                /* private listener */ any(),
-                eq(PmkCacheManager.PMK_CACHE_EXPIRATION_ALARM_TAG),
-                eq((1000 - testStartSeconds) * 1000));
-
-        // The expiration of the third one is greater, and the next updating time is not changed.
-        reset(mHandler);
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 2, 3000, generatePmkDataFromString("HelloWorld3"));
-        verify(mHandler).postDelayed(
-                /* private listener */ any(),
-                eq(PmkCacheManager.PMK_CACHE_EXPIRATION_ALARM_TAG),
-                eq((1000 - testStartSeconds) * 1000));
-    }
-
-    @Test
-    public void testPmkCacheExpiration() throws Exception {
-
-        List<ArrayList<Byte>> pmkDataList;
-
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 0, 1500, generatePmkDataFromString("Cache"));
-
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 1, 1000, generatePmkDataFromString("HelloWorld"));
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 1, 1500, generatePmkDataFromString("HelloWorld2"));
-        mPmkCacheManager.add(TEST_MAC_ADDRESS, 1, 3000, generatePmkDataFromString("HelloWorld3"));
-        pmkDataList = mPmkCacheManager.get(0);
-        assertEquals(1, pmkDataList.size());
-        pmkDataList = mPmkCacheManager.get(1);
-        assertEquals(3, pmkDataList.size());
-
-        // Advance to 1000s, one entry of network ID 1 should be removed.
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(1000 * 1000L);
-        mPmkCacheManager.updatePmkCacheExpiration();
-        pmkDataList = mPmkCacheManager.get(0);
-        assertEquals(1, pmkDataList.size());
-        pmkDataList = mPmkCacheManager.get(1);
-        assertEquals(2, pmkDataList.size());
-
-        // Advance to 1500s, network ID 0 should be removed
-        // and only one entry is left for network ID 1.
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(1500 * 1000L);
-        mPmkCacheManager.updatePmkCacheExpiration();
-        pmkDataList = mPmkCacheManager.get(0);
-        assertNull(pmkDataList);
-        pmkDataList = mPmkCacheManager.get(1);
-        assertEquals(1, pmkDataList.size());
-
-    }
-
-    private ArrayList<Byte> generatePmkDataFromString(String dataStr) {
-        if (TextUtils.isEmpty(dataStr)) return new ArrayList<Byte>();
-        return NativeUtil.byteArrayToArrayList(dataStr.getBytes());
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/QosPolicyRequestHandlerTest.java b/service/tests/wifitests/src/com/android/server/wifi/QosPolicyRequestHandlerTest.java
deleted file mode 100644
index dcad30e..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/QosPolicyRequestHandlerTest.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assume.assumeTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.annotation.Nullable;
-import android.net.DscpPolicy;
-import android.net.NetworkAgent;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.test.TestLooper;
-
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyClassifierParams;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyRequest;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyRequestType;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyStatus;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.InOrder;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class QosPolicyRequestHandlerTest {
-    private static final String TEST_IFACE_NAME = "mockWlan";
-    private static final byte[] TEST_INET_ADDR = {127, 0, 0, 1};
-    private static final int QOS_REQUEST_DIALOG_TOKEN = 124;
-
-    private QosPolicyRequestHandler mQosPolicyRequestHandler;
-    private TestLooper mLooper;
-    private Handler mNetworkAgentHandler;
-    @Mock WifiNetworkAgent mWifiNetworkAgent;
-    @Mock WifiNetworkAgent mWifiNetworkAgentAlt;
-    @Mock WifiNative mWifiNative;
-    @Mock ClientModeImpl mClientModeImpl;
-    @Mock HandlerThread mHandlerThread;
-
-    @Captor ArgumentCaptor<List<QosPolicyStatus>> mQosStatusListCaptor;
-    private InOrder mInOrder;
-
-    @Before
-    public void setUp() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        MockitoAnnotations.initMocks(this);
-        mLooper = new TestLooper();
-        when(mHandlerThread.getLooper()).thenReturn(mLooper.getLooper());
-        mQosPolicyRequestHandler = new QosPolicyRequestHandler(
-                TEST_IFACE_NAME, mWifiNative, mClientModeImpl, mHandlerThread);
-        mQosPolicyRequestHandler.setNetworkAgent(mWifiNetworkAgent);
-        mNetworkAgentHandler = new Handler(mLooper.getLooper());
-
-        // Accept any policy sent to the NetworkAgent.
-        doAnswer(new Answer() {
-            @Override
-            public Object answer(InvocationOnMock invocation) throws Throwable {
-
-                Object[] args = invocation.getArguments();
-                DscpPolicy policy = (DscpPolicy) args[0];
-                mNetworkAgentHandler.post(() -> mQosPolicyRequestHandler.setQosPolicyStatus(
-                        policy.getPolicyId(), NetworkAgent.DSCP_POLICY_STATUS_SUCCESS));
-                return null;
-            }
-        }).when(mWifiNetworkAgent).sendAddDscpPolicy(any(DscpPolicy.class));
-        doAnswer((Answer<Void>) invocation -> {
-            Object[] args = invocation.getArguments();
-            int policyId = (int) args[0];
-            mNetworkAgentHandler.post(() -> mQosPolicyRequestHandler.setQosPolicyStatus(
-                    policyId, NetworkAgent.DSCP_POLICY_STATUS_DELETED));
-            return null;
-        }).when(mWifiNetworkAgent).sendRemoveDscpPolicy(anyInt());
-    }
-
-    private QosPolicyRequest createQosPolicyRequest(
-            int policyId, @QosPolicyRequestType int requestType,
-            int dscp, @Nullable byte[] srcIp, @Nullable byte[] dstIp,
-            @Nullable Integer srcPort, @Nullable int[] dstPortRange,
-            @Nullable Integer protocol) {
-        QosPolicyClassifierParams classifierParams = new QosPolicyClassifierParams(
-                srcIp != null, srcIp,
-                dstIp != null, dstIp,
-                srcPort != null ? srcPort : DscpPolicy.SOURCE_PORT_ANY,
-                dstPortRange != null ? dstPortRange : new int[]{0, 65535},
-                protocol != null ? protocol : DscpPolicy.PROTOCOL_ANY);
-        return new QosPolicyRequest((byte) policyId, requestType, (byte) dscp, classifierParams);
-    }
-
-    /**
-     * Tests the handling of a valid QoS policy request event.
-     */
-    @Test
-    public void testSingleQosPolicyRequestEvent() throws Exception {
-        ArrayList<QosPolicyRequest> policies = new ArrayList();
-        policies.add(createQosPolicyRequest(1, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                TEST_INET_ADDR /* srcIp */, null, null, null, null));
-        policies.add(createQosPolicyRequest(2, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, 1337 /* srcPort */, null, null));
-        policies.add(createQosPolicyRequest(3, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_REMOVE, 0,
-                null, null, null, null, null));
-        policies.add(createQosPolicyRequest(4, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, null, new int[]{350, 150} /* invalid dstPortRange */, null));
-        QosPolicyRequest removePolicyRequest = policies.get(2);
-        QosPolicyRequest invalidPolicyRequest = policies.get(3);
-
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN, policies);
-        mLooper.dispatchAll();
-
-        verify(mWifiNetworkAgent, times(2))
-                .sendAddDscpPolicy(any());  /* excludes add request with invalid parameters */
-        verify(mWifiNetworkAgent, times(1)).sendRemoveDscpPolicy(anyInt());
-        verify(mWifiNative).sendQosPolicyResponse(eq(TEST_IFACE_NAME), eq(QOS_REQUEST_DIALOG_TOKEN),
-                eq(true), mQosStatusListCaptor.capture());
-
-        assertEquals(policies.size(), mQosStatusListCaptor.getValue().size());
-        for (QosPolicyStatus status : mQosStatusListCaptor.getValue()) {
-            if (status.policyId == invalidPolicyRequest.policyId) {
-                assertEquals(NetworkAgent.DSCP_POLICY_STATUS_REQUEST_DECLINED,
-                        status.dscpPolicyStatus);
-            } else if (status.policyId == removePolicyRequest.policyId) {
-                assertEquals(NetworkAgent.DSCP_POLICY_STATUS_DELETED, status.dscpPolicyStatus);
-            } else {  // valid add request
-                assertEquals(NetworkAgent.DSCP_POLICY_STATUS_SUCCESS, status.dscpPolicyStatus);
-            }
-        }
-    }
-
-    /**
-     * Tests the handling of a series of QoS policy request events, ensuring that they
-     * are queued and processed correctly.
-     */
-    @Test
-    public void testMultipleQosPolicyRequestEvents() throws Exception {
-        ArrayList<QosPolicyRequest> policies = new ArrayList();
-        policies.add(createQosPolicyRequest(1, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                TEST_INET_ADDR /* srcIp */, null, null, null, null));
-        policies.add(createQosPolicyRequest(2, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, 1337 /* srcPort */, null, null));
-        policies.add(createQosPolicyRequest(3, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, null, new int[]{15, 256} /* dstPortRange */, null));
-
-        mInOrder = inOrder(mWifiNative);
-        int numQosPolicyRequestEvents = 10;
-        for (int i = 0; i < numQosPolicyRequestEvents; i++) {
-            mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN + i, policies);
-        }
-        mLooper.dispatchAll();
-
-        verify(mWifiNetworkAgent, times(policies.size() * numQosPolicyRequestEvents))
-                .sendAddDscpPolicy(any());
-        for (int i = 0; i < numQosPolicyRequestEvents; i++) {
-            mInOrder.verify(mWifiNative).sendQosPolicyResponse(eq(TEST_IFACE_NAME),
-                    eq(QOS_REQUEST_DIALOG_TOKEN + i), eq(true), mQosStatusListCaptor.capture());
-            assertEquals(policies.size(), mQosStatusListCaptor.getValue().size());
-            for (QosPolicyStatus status : mQosStatusListCaptor.getValue()) {
-                assertEquals(NetworkAgent.DSCP_POLICY_STATUS_SUCCESS, status.dscpPolicyStatus);
-            }
-        }
-    }
-
-    /**
-     * Tests that a QoS policy request event containing duplicate policy id's
-     * is handled correctly.
-     */
-    @Test
-    public void testQosPolicyRequestEventWithDuplicatePolicyIds() throws Exception {
-        ArrayList<QosPolicyRequest> policies = new ArrayList();
-        policies.add(createQosPolicyRequest(1, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                TEST_INET_ADDR /* srcIp */, null, null, null, null));
-        policies.add(createQosPolicyRequest(2, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, 1337, null, null));
-        policies.add(createQosPolicyRequest(1 /* duplicate id */,
-                SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD,
-                0, null, null, 1776 /* srcPort */, null, null));
-
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN, policies);
-        mLooper.dispatchAll();
-
-        verify(mWifiNetworkAgent, never()).sendAddDscpPolicy(any());
-        verify(mWifiNative).sendQosPolicyResponse(eq(TEST_IFACE_NAME), eq(QOS_REQUEST_DIALOG_TOKEN),
-                eq(true), mQosStatusListCaptor.capture());
-        assertEquals(policies.size(), mQosStatusListCaptor.getValue().size());
-        for (QosPolicyStatus status : mQosStatusListCaptor.getValue()) {
-            assertEquals(NetworkAgent.DSCP_POLICY_STATUS_REQUEST_DECLINED, status.dscpPolicyStatus);
-        }
-    }
-
-    /**
-     * Tests that a QoS policy request event containing no policies is handled correctly.
-     */
-    @Test
-    public void testQosPolicyRequestEventWithEmptyPolicyList() throws Exception {
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN, new ArrayList());
-        mLooper.dispatchAll();
-        verify(mWifiNetworkAgent, never()).sendAddDscpPolicy(any());
-        verify(mWifiNetworkAgent, never()).sendRemoveDscpPolicy(anyInt());
-        verify(mWifiNative).sendQosPolicyResponse(eq(TEST_IFACE_NAME), eq(QOS_REQUEST_DIALOG_TOKEN),
-                eq(true), mQosStatusListCaptor.capture());
-        assertEquals(0, mQosStatusListCaptor.getValue().size());
-    }
-
-    /**
-     * Tests that moreResources is set to false in the QoS policy response if a policy is rejected
-     * with status NetworkAgent.DSCP_POLICY_STATUS_INSUFFICIENT_PROCESSING_RESOURCES.
-     */
-    @Test
-    public void testMoreResourcesIsFalseIfInsufficientResources() throws Exception {
-        doAnswer((Answer<Void>) invocation -> {
-            Object[] args = invocation.getArguments();
-            DscpPolicy policy = (DscpPolicy) args[0];
-            // Reject policy 3 for this test case.
-            int policyId = policy.getPolicyId();
-            int status = policyId == 3
-                    ? NetworkAgent.DSCP_POLICY_STATUS_INSUFFICIENT_PROCESSING_RESOURCES
-                    : NetworkAgent.DSCP_POLICY_STATUS_SUCCESS;
-            mNetworkAgentHandler.post(() -> mQosPolicyRequestHandler.setQosPolicyStatus(
-                    policyId, status));
-            return null;
-        }).when(mWifiNetworkAgent).sendAddDscpPolicy(any(DscpPolicy.class));
-
-        ArrayList<QosPolicyRequest> policies = new ArrayList();
-        policies.add(createQosPolicyRequest(1, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                TEST_INET_ADDR /* srcIp */, null, null, null, null));
-        policies.add(createQosPolicyRequest(2, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, 1337 /* srcPort */, null, null));
-        policies.add(createQosPolicyRequest(3, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, null, new int[]{15, 256} /* dstPortRange */, null));
-        policies.add(createQosPolicyRequest(4, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, 1776 /* srcPort */, null, null));
-
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN, policies);
-        mLooper.dispatchAll();
-
-        verify(mWifiNetworkAgent, times(policies.size())).sendAddDscpPolicy(any());
-        verify(mWifiNative).sendQosPolicyResponse(eq(TEST_IFACE_NAME), eq(QOS_REQUEST_DIALOG_TOKEN),
-                eq(false) /* morePolicies */, mQosStatusListCaptor.capture());
-        assertEquals(policies.size(), mQosStatusListCaptor.getValue().size());
-
-        for (QosPolicyStatus status : mQosStatusListCaptor.getValue()) {
-            if (status.policyId == 3) {
-                assertEquals(NetworkAgent.DSCP_POLICY_STATUS_INSUFFICIENT_PROCESSING_RESOURCES,
-                        status.dscpPolicyStatus);
-            }  else {
-                assertEquals(NetworkAgent.DSCP_POLICY_STATUS_SUCCESS, status.dscpPolicyStatus);
-            }
-        }
-    }
-
-    /*
-     * Tests that the processing queue and current request state are cleared if the network agent
-     * is set to null during processing.
-     */
-    @Test
-    public void testNetworkAgentSetToNullDuringProcessing() throws Exception {
-        ArrayList<QosPolicyRequest> policies = new ArrayList();
-        policies.add(createQosPolicyRequest(1, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                TEST_INET_ADDR /* srcIp */, null, null, null, null));
-        policies.add(createQosPolicyRequest(2, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, 1337 /* srcPort */, null, null));
-        policies.add(createQosPolicyRequest(3, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, null, new int[]{15, 256} /* dstPortRange */, null));
-
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN, policies);
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN + 1, policies);
-        mQosPolicyRequestHandler.setNetworkAgent(null);
-        mLooper.dispatchAll();
-
-        mQosPolicyRequestHandler.setNetworkAgent(mWifiNetworkAgent);
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN + 2, policies);
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN + 3, policies);
-        mLooper.dispatchAll();
-
-        // First 2 requests should have been cleared out when the network agent was set to null.
-        verify(mWifiNative, never()).sendQosPolicyResponse(eq(TEST_IFACE_NAME),
-                eq(QOS_REQUEST_DIALOG_TOKEN), eq(true), mQosStatusListCaptor.capture());
-        verify(mWifiNative, never()).sendQosPolicyResponse(eq(TEST_IFACE_NAME),
-                eq(QOS_REQUEST_DIALOG_TOKEN + 1), eq(true), mQosStatusListCaptor.capture());
-
-        // Next 2 requests should have been processed as expected.
-        verify(mWifiNative).sendQosPolicyResponse(eq(TEST_IFACE_NAME),
-                eq(QOS_REQUEST_DIALOG_TOKEN + 2), eq(true), mQosStatusListCaptor.capture());
-        verify(mWifiNative).sendQosPolicyResponse(eq(TEST_IFACE_NAME),
-                eq(QOS_REQUEST_DIALOG_TOKEN + 3), eq(true), mQosStatusListCaptor.capture());
-    }
-
-    /*
-     * Tests that if the existing network agent is replaced by a new one (ex. in the case of a NUD
-     * failure), we clear out the queue and reset all existing policies.
-     */
-    @Test
-    public void testNetworkAgentReplacedDuringProcessing() throws Exception {
-        ArrayList<QosPolicyRequest> policies = new ArrayList();
-        policies.add(createQosPolicyRequest(1, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                TEST_INET_ADDR /* srcIp */, null, null, null, null));
-        policies.add(createQosPolicyRequest(2, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, 1337 /* srcPort */, null, null));
-        policies.add(createQosPolicyRequest(3, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                null, null, null, new int[]{15, 256} /* dstPortRange */, null));
-
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN, policies);
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN + 1, policies);
-        mQosPolicyRequestHandler.setNetworkAgent(mWifiNetworkAgentAlt);
-        mLooper.dispatchAll();
-
-        verify(mWifiNative, never()).sendQosPolicyResponse(eq(TEST_IFACE_NAME),
-                eq(QOS_REQUEST_DIALOG_TOKEN), anyBoolean(), any());
-        verify(mWifiNative, never()).sendQosPolicyResponse(eq(TEST_IFACE_NAME),
-                eq(QOS_REQUEST_DIALOG_TOKEN + 1), anyBoolean(), any());
-        verify(mClientModeImpl).clearQueuedQosMessages();
-        verify(mWifiNetworkAgentAlt).sendRemoveAllDscpPolicies();
-        verify(mWifiNative).removeAllQosPolicies(TEST_IFACE_NAME);
-    }
-
-    /*
-     * Tests that if we time out while waiting for a response from the network agent,
-     * we clear out the queue and reset all existing policies.
-     */
-    @Test
-    public void testRequestTimesOutDuringProcessing() throws Exception {
-        // Do not respond to any remove requests for this test case.
-        doNothing().when(mWifiNetworkAgent).sendRemoveDscpPolicy(anyInt());
-        ArrayList<QosPolicyRequest> removePolicies = new ArrayList();
-        removePolicies.add(createQosPolicyRequest(1,
-                SupplicantStaIfaceHal.QOS_POLICY_REQUEST_REMOVE, 0, null, null, null, null, null));
-
-        ArrayList<QosPolicyRequest> addPolicies = new ArrayList();
-        addPolicies.add(createQosPolicyRequest(1, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, 0,
-                TEST_INET_ADDR /* srcIp */, null, null, null, null));
-
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN, removePolicies);
-        mQosPolicyRequestHandler.queueQosPolicyRequest(QOS_REQUEST_DIALOG_TOKEN + 1, addPolicies);
-        mLooper.dispatchAll();
-
-        mLooper.moveTimeForward(QosPolicyRequestHandler.PROCESSING_TIMEOUT_MILLIS + 1);
-        mLooper.dispatchAll();
-
-        verify(mWifiNative, never()).sendQosPolicyResponse(eq(TEST_IFACE_NAME),
-                eq(QOS_REQUEST_DIALOG_TOKEN), anyBoolean(), any());
-        verify(mWifiNative, never()).sendQosPolicyResponse(eq(TEST_IFACE_NAME),
-                eq(QOS_REQUEST_DIALOG_TOKEN + 1), anyBoolean(), any());
-        verify(mClientModeImpl).clearQueuedQosMessages();
-        verify(mWifiNetworkAgent).sendRemoveAllDscpPolicies();
-        verify(mWifiNative).removeAllQosPolicies(TEST_IFACE_NAME);
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/RestrictedWifiNetworkFactoryTest.java b/service/tests/wifitests/src/com/android/server/wifi/RestrictedWifiNetworkFactoryTest.java
deleted file mode 100644
index eca0a01..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/RestrictedWifiNetworkFactoryTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.Mockito.validateMockitoUsage;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-
-import android.content.Context;
-import android.net.NetworkCapabilities;
-import android.net.NetworkRequest;
-import android.os.test.TestLooper;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-/**
- * Unit tests for {@link RestrictedWifiNetworkFactory}.
- */
-@SmallTest
-public class RestrictedWifiNetworkFactoryTest extends WifiBaseTest {
-    @Mock WifiConnectivityManager mWifiConnectivityManager;
-    @Mock Context mContext;
-    NetworkCapabilities mNetworkCapabilities;
-    TestLooper mLooper;
-    NetworkRequest mNetworkRequest;
-
-    private RestrictedWifiNetworkFactory mRestrictedWifiNetworkFactory;
-
-    /**
-     * Setup the mocks.
-     */
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-
-        mLooper = new TestLooper();
-        mNetworkCapabilities = new NetworkCapabilities();
-        mNetworkCapabilities.addTransportType(NetworkCapabilities.TRANSPORT_WIFI);
-        mNetworkCapabilities.removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED);
-
-        mRestrictedWifiNetworkFactory = new RestrictedWifiNetworkFactory(
-                mLooper.getLooper(), mContext,
-                mNetworkCapabilities, mWifiConnectivityManager);
-
-        mNetworkRequest = new NetworkRequest.Builder()
-                .setCapabilities(mNetworkCapabilities)
-                .build();
-    }
-
-    /**
-     * Called after each test
-     */
-    @After
-    public void cleanup() {
-        validateMockitoUsage();
-    }
-
-    /**
-     * Validates handling of needNetworkFor.
-     */
-    @Test
-    public void testHandleNetworkRequest() {
-        assertFalse(mRestrictedWifiNetworkFactory.hasConnectionRequests());
-        mRestrictedWifiNetworkFactory.needNetworkFor(mNetworkRequest);
-
-        // First network request should turn on auto-join.
-        verify(mWifiConnectivityManager).addRestrictionConnectionAllowedUid(anyInt());
-        assertTrue(mRestrictedWifiNetworkFactory.hasConnectionRequests());
-
-        // Subsequent ones should do nothing.
-        mRestrictedWifiNetworkFactory.needNetworkFor(mNetworkRequest);
-        verifyNoMoreInteractions(mWifiConnectivityManager);
-    }
-
-    /**
-     * Validates handling of releaseNetwork.
-     */
-    @Test
-    public void testHandleNetworkRelease() {
-        // Release network without a corresponding request should be ignored.
-        mRestrictedWifiNetworkFactory.releaseNetworkFor(mNetworkRequest);
-        assertFalse(mRestrictedWifiNetworkFactory.hasConnectionRequests());
-
-        ArgumentCaptor<Integer> captor = ArgumentCaptor.forClass(Integer.class);
-        // Now request & then release the network request
-        mRestrictedWifiNetworkFactory.needNetworkFor(mNetworkRequest);
-        assertTrue(mRestrictedWifiNetworkFactory.hasConnectionRequests());
-        verify(mWifiConnectivityManager).addRestrictionConnectionAllowedUid(captor.capture());
-
-        mRestrictedWifiNetworkFactory.releaseNetworkFor(mNetworkRequest);
-        assertFalse(mRestrictedWifiNetworkFactory.hasConnectionRequests());
-        verify(mWifiConnectivityManager).addRestrictionConnectionAllowedUid(captor.getValue());
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SarManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/SarManagerTest.java
index 215e39e..a616ff4 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SarManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SarManagerTest.java
@@ -54,7 +54,7 @@
     private static final String OP_PACKAGE_NAME = "com.xxx";
 
     private void enableDebugLogs() {
-        mSarMgr.enableVerboseLogging(true);
+        mSarMgr.enableVerboseLogging(1);
     }
 
     private MockResources getMockResources() {
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SavedNetworkNominatorTest.java b/service/tests/wifitests/src/com/android/server/wifi/SavedNetworkNominatorTest.java
index da75a96..e6e4769 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SavedNetworkNominatorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SavedNetworkNominatorTest.java
@@ -20,10 +20,8 @@
 import static com.android.server.wifi.WifiConfigurationTestUtil.SECURITY_NONE;
 import static com.android.server.wifi.WifiConfigurationTestUtil.SECURITY_PSK;
 
-import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.*;
 
-import android.net.MacAddress;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiManager;
 import android.test.suitebuilder.annotation.SmallTest;
@@ -44,7 +42,6 @@
 import org.mockito.MockitoSession;
 
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 
 /**
@@ -138,7 +135,7 @@
         }
 
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
 
         verify(mOnConnectableListener, never()).onConnectable(any(), any());
     }
@@ -164,7 +161,7 @@
         when(mWifiCarrierInfoManager.isSimReady(eq(INVALID_SUBID))).thenReturn(false);
 
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
 
         verify(mOnConnectableListener, never()).onConnectable(any(), any());
     }
@@ -191,7 +188,7 @@
         }
 
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
 
         verify(mOnConnectableListener, never()).onConnectable(any(), any());
     }
@@ -216,13 +213,13 @@
         WifiConfiguration[] savedConfigs = scanDetailsAndConfigs.getWifiConfigs();
 
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
 
         verify(mOnConnectableListener, times(2)).onConnectable(any(), any());
         reset(mOnConnectableListener);
         savedConfigs[1].allowAutojoin = false;
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
         verify(mOnConnectableListener).onConnectable(any(),
                 mWifiConfigurationArgumentCaptor.capture());
         WifiConfigurationTestUtil.assertConfigurationEqual(savedConfigs[0],
@@ -250,7 +247,7 @@
             wifiConfiguration.allowAutojoin = false;
         }
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
         verify(mOnConnectableListener, never()).onConnectable(any(), any());
     }
 
@@ -272,7 +269,7 @@
         when(mPasspointNetworkNominateHelper.getPasspointNetworkCandidates(scanDetails, false))
                 .thenReturn(passpointCandidates);
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
         verify(mOnConnectableListener).onConnectable(scanDetail1, configuration1);
         verify(mOnConnectableListener, never()).onConnectable(scanDetail2, configuration2);
     }
@@ -296,7 +293,7 @@
         when(mWifiCarrierInfoManager.isCarrierNetworkFromNonDefaultDataSim(savedConfigs[0]))
                 .thenReturn(false);
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
         verify(mOnConnectableListener).onConnectable(any(), any());
         reset(mOnConnectableListener);
         when(mWifiCarrierInfoManager.isCarrierNetworkFromNonDefaultDataSim(savedConfigs[0]))
@@ -327,7 +324,7 @@
         when(mWifiCarrierInfoManager.hasUserApprovedImsiPrivacyExemptionForCarrier(TEST_CARRIER_ID))
                 .thenReturn(false);
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
         verify(mOnConnectableListener, never()).onConnectable(any(), any());
         verify(mWifiCarrierInfoManager)
                 .sendImsiProtectionExemptionNotificationIfRequired(TEST_CARRIER_ID);
@@ -335,7 +332,7 @@
         when(mWifiCarrierInfoManager.hasUserApprovedImsiPrivacyExemptionForCarrier(TEST_CARRIER_ID))
                 .thenReturn(true);
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
         verify(mOnConnectableListener).onConnectable(any(), any());
         // If from settings app, will bypass the IMSI check.
         when(mWifiCarrierInfoManager.hasUserApprovedImsiPrivacyExemptionForCarrier(TEST_CARRIER_ID))
@@ -362,62 +359,14 @@
                 .shouldBeIgnoredBySecureSuggestionFromSameCarrier(any(), any()))
                 .thenReturn(true);
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
         verify(mOnConnectableListener, never()).onConnectable(any(), any());
 
         when(mWifiNetworkSuggestionsManager
                 .shouldBeIgnoredBySecureSuggestionFromSameCarrier(any(), any()))
                 .thenReturn(false);
         mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
+                scanDetails, false, true, true, mOnConnectableListener);
         verify(mOnConnectableListener).onConnectable(any(), any());
     }
-
-    /**
-     * Only return the candidate in the BSSID allow list.
-     */
-    @Test
-    public void returnOnlyCandidateWithBssidInAllowList() {
-        String[] ssids = {"\"test1\""};
-        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
-        int[] freqs = {2470, 2437};
-        String[] caps = {"[ESS]", "[ESS]"};
-        int[] levels = {RSSI_LEVEL, RSSI_LEVEL};
-        int[] securities = {SECURITY_NONE};
-        ArgumentCaptor<ScanDetail> captor = ArgumentCaptor.forClass(ScanDetail.class);
-
-        ScanDetailsAndWifiConfigs scanDetailsAndConfigs =
-                WifiNetworkSelectorTestUtil.setupScanDetailsAndConfigStore(ssids, bssids,
-                        freqs, caps, levels, securities, mWifiConfigManager, mClock);
-        List<ScanDetail> scanDetails = scanDetailsAndConfigs.getScanDetails();
-        WifiConfiguration[] savedConfigs = scanDetailsAndConfigs.getWifiConfigs();
-        savedConfigs[0].setBssidAllowlist(List.of(MacAddress.fromString(bssids[0])));
-        mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
-        verify(mOnConnectableListener).onConnectable(captor.capture(), any());
-        assertEquals(bssids[0], captor.getValue().getBSSIDString());
-    }
-
-    /**
-     * Return no candidate when BSSID allow list is empty.
-     */
-    @Test
-    public void returnNoCandidateWithEmptyBssidAllowList() {
-        String[] ssids = {"\"test1\""};
-        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
-        int[] freqs = {2470, 2437};
-        String[] caps = {"[ESS]", "[ESS]"};
-        int[] levels = {RSSI_LEVEL, RSSI_LEVEL};
-        int[] securities = {SECURITY_NONE};
-
-        ScanDetailsAndWifiConfigs scanDetailsAndConfigs =
-                WifiNetworkSelectorTestUtil.setupScanDetailsAndConfigStore(ssids, bssids,
-                        freqs, caps, levels, securities, mWifiConfigManager, mClock);
-        List<ScanDetail> scanDetails = scanDetailsAndConfigs.getScanDetails();
-        WifiConfiguration[] savedConfigs = scanDetailsAndConfigs.getWifiConfigs();
-        savedConfigs[0].setBssidAllowlist(Collections.emptyList());
-        mSavedNetworkNominator.nominateNetworks(
-                scanDetails, false, true, true, Collections.emptySet(), mOnConnectableListener);
-        verify(mOnConnectableListener, never()).onConnectable(any(), any());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ScanRequestProxyTest.java b/service/tests/wifitests/src/com/android/server/wifi/ScanRequestProxyTest.java
index 3c616d1..5c0cd32 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ScanRequestProxyTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ScanRequestProxyTest.java
@@ -127,9 +127,8 @@
         when(mWifiInjector.getWifiScanner()).thenReturn(mWifiScanner);
         when(mWifiInjector.getWifiNetworkSuggestionsManager())
                 .thenReturn(mWifiNetworkSuggestionsManager);
-        when(mWifiConfigManager.retrieveHiddenNetworkList(false /* autoJoinOnly */))
-                .thenReturn(TEST_HIDDEN_NETWORKS_LIST);
-        when(mWifiNetworkSuggestionsManager.retrieveHiddenNetworkList(false /* autoJoinOnly */))
+        when(mWifiConfigManager.retrieveHiddenNetworkList()).thenReturn(TEST_HIDDEN_NETWORKS_LIST);
+        when(mWifiNetworkSuggestionsManager.retrieveHiddenNetworkList())
                 .thenReturn(TEST_HIDDEN_NETWORKS_LIST_NS);
         when(mWifiMetrics.getScanMetrics()).thenReturn(mScanMetrics);
         doNothing().when(mWifiScanner).registerScanListener(
@@ -290,10 +289,8 @@
         validateScanAvailableBroadcastSent(true);
 
         assertTrue(mScanRequestProxy.startScan(TEST_UID, TEST_PACKAGE_NAME_1));
-        mInOrder.verify(mWifiConfigManager, never())
-                .retrieveHiddenNetworkList(false /* autoJoinOnly */);
-        mInOrder.verify(mWifiNetworkSuggestionsManager, never())
-                .retrieveHiddenNetworkList(false /* autoJoinOnly */);
+        mInOrder.verify(mWifiConfigManager, never()).retrieveHiddenNetworkList();
+        mInOrder.verify(mWifiNetworkSuggestionsManager, never()).retrieveHiddenNetworkList();
         mInOrder.verify(mWifiScanner).startScan(any(), any(), any(), any());
 
         assertEquals(mWorkSourceArgumentCaptor.getValue(),
@@ -315,10 +312,8 @@
 
         assertTrue(mScanRequestProxy.startScan(TEST_UID, TEST_PACKAGE_NAME_1));
 
-        mInOrder.verify(mWifiConfigManager)
-                .retrieveHiddenNetworkList(false /* autoJoinOnly */);
-        mInOrder.verify(mWifiNetworkSuggestionsManager)
-                .retrieveHiddenNetworkList(false /* autoJoinOnly */);
+        mInOrder.verify(mWifiConfigManager).retrieveHiddenNetworkList();
+        mInOrder.verify(mWifiNetworkSuggestionsManager).retrieveHiddenNetworkList();
         mInOrder.verify(mWifiScanner).startScan(any(), any(), any(), any());
 
         assertEquals(mWorkSourceArgumentCaptor.getValue(),
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ScanResultMatchInfoTest.java b/service/tests/wifitests/src/com/android/server/wifi/ScanResultMatchInfoTest.java
index eb38f5a..7df3f51 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ScanResultMatchInfoTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ScanResultMatchInfoTest.java
@@ -101,11 +101,6 @@
         assertEquals(ScanResultMatchInfo.fromWifiConfiguration(conf),
                 ScanResultMatchInfo.fromScanResult(scan.getScanResult()));
 
-        conf = WifiConfigurationTestUtil.createPskNetwork("0123456789");
-        scan = createScanDetailForNetwork(conf, "AA:AA:AA:AA:AA:AA");
-        assertEquals(ScanResultMatchInfo.fromWifiConfiguration(conf),
-                ScanResultMatchInfo.fromScanResult(scan.getScanResult()));
-
         conf = WifiConfigurationTestUtil.createOpenNetwork("\"WIFIght the inevitable\"");
         scan = createScanDetailForNetwork(conf, "BB:BB:BB:BB:BB:BB");
         assertEquals(ScanResultMatchInfo.fromWifiConfiguration(conf),
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ScanResults.java b/service/tests/wifitests/src/com/android/server/wifi/ScanResults.java
index 15f0a7f..78d5e5c 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ScanResults.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ScanResults.java
@@ -132,7 +132,7 @@
             }
             List<String> anqpLines = new ArrayList<>();
             NetworkDetail nd = new NetworkDetail(bssid, ie, anqpLines, freq);
-            ScanDetail detail = new ScanDetail(nd, WifiSsid.fromUtf8Text(ssid),
+            ScanDetail detail = new ScanDetail(nd, WifiSsid.createFromAsciiEncoded(ssid),
                     bssid, "", rssi, freq,
                     // needed so that scan results aren't rejected because they are older than scan
                     // start.
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ScanTestUtil.java b/service/tests/wifitests/src/com/android/server/wifi/ScanTestUtil.java
index 5a34402..45cc482 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ScanTestUtil.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ScanTestUtil.java
@@ -295,7 +295,7 @@
     }
 
     public static ScanResult createScanResult(int freq) {
-        return new ScanResult(WifiSsid.fromUtf8Text("AN SSID"),
+        return new ScanResult(WifiSsid.createFromAsciiEncoded("AN SSID"),
                 MacAddressUtils.createRandomUnicastAddress().toString(), 0L,
                 -1, null, "", 0, freq, 0);
     }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ScoredNetworkNominatorTest.java b/service/tests/wifitests/src/com/android/server/wifi/ScoredNetworkNominatorTest.java
new file mode 100644
index 0000000..e50171a
--- /dev/null
+++ b/service/tests/wifitests/src/com/android/server/wifi/ScoredNetworkNominatorTest.java
@@ -0,0 +1,433 @@
+/*
+ * Copyright (C) 2016 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.server.wifi;
+
+import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SAE;
+
+import static com.android.server.wifi.ScoredNetworkNominator.SETTINGS_GLOBAL_USE_OPEN_WIFI_PACKAGE;
+import static com.android.server.wifi.WifiConfigurationTestUtil.SECURITY_NONE;
+import static com.android.server.wifi.WifiConfigurationTestUtil.SECURITY_PSK;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.database.ContentObserver;
+import android.net.NetworkKey;
+import android.net.NetworkScoreManager;
+import android.net.Uri;
+import android.net.wifi.ScanResult;
+import android.net.wifi.WifiConfiguration;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.SystemClock;
+import android.util.LocalLog;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.dx.mockito.inline.extended.ExtendedMockito;
+import com.android.server.wifi.WifiNetworkSelector.NetworkNominator.OnConnectableListener;
+import com.android.server.wifi.WifiNetworkSelectorTestUtil.ScanDetailsAndWifiConfigs;
+import com.android.server.wifi.util.WifiPermissionsUtil;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.mockito.MockitoSession;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Unit tests for {@link ScoredNetworkNominator}.
+ */
+@SmallTest
+public class ScoredNetworkNominatorTest extends WifiBaseTest {
+    private static final String TEST_PACKAGE_NAME = "name.package.test";
+    private static final int TEST_UID = 12345;
+    private ContentObserver mContentObserver;
+    private int mThresholdQualifiedRssi2G;
+    private int mThresholdQualifiedRssi5G;
+
+    @Mock private Context mContext;
+    @Mock private Clock mClock;
+    @Mock private FrameworkFacade mFrameworkFacade;
+    @Mock private NetworkScoreManager mNetworkScoreManager;
+    @Mock private PackageManager mPackageManager;
+    @Mock private WifiConfigManager mWifiConfigManager;
+    @Mock private WifiPermissionsUtil mWifiPermissionsUtil;
+    @Mock private OnConnectableListener mOnConnectableListener;
+    @Mock private WifiInjector mWifiInjector;
+    @Mock private WifiGlobals mWifiGlobals;
+    @Mock private ActiveModeWarden mActiveModeWarden;
+    @Mock private ClientModeManager mClientModeManager;
+    @Captor private ArgumentCaptor<Collection<NetworkKey>> mNetworkKeyCollectionCaptor;
+    @Captor private ArgumentCaptor<WifiConfiguration> mWifiConfigCaptor;
+
+    private WifiNetworkScoreCache mScoreCache;
+    private ScoredNetworkNominator mScoredNetworkNominator;
+    private MockitoSession mSession;
+
+    @Before
+    public void setUp() throws Exception {
+        mThresholdQualifiedRssi2G = -73;
+        mThresholdQualifiedRssi5G = -70;
+
+        MockitoAnnotations.initMocks(this);
+        mSession = ExtendedMockito.mockitoSession()
+                .mockStatic(WifiInjector.class, withSettings().lenient())
+                .startMocking();
+        when(WifiInjector.getInstance()).thenReturn(mWifiInjector);
+        when(mWifiInjector.getWifiGlobals()).thenReturn(mWifiGlobals);
+        when(mWifiInjector.getActiveModeWarden()).thenReturn(mActiveModeWarden);
+        when(mActiveModeWarden.getPrimaryClientModeManager()).thenReturn(mClientModeManager);
+        when(mClientModeManager.getSupportedFeatures()).thenReturn(
+                WIFI_FEATURE_OWE | WIFI_FEATURE_WPA3_SAE);
+        when(mWifiGlobals.isWpa3SaeUpgradeEnabled()).thenReturn(true);
+        when(mWifiGlobals.isOweUpgradeEnabled()).thenReturn(true);
+
+        when(mFrameworkFacade.getStringSetting(mContext,
+                SETTINGS_GLOBAL_USE_OPEN_WIFI_PACKAGE))
+                .thenReturn("test");
+        ApplicationInfo appInfo = new ApplicationInfo();
+        appInfo.uid = TEST_UID;
+        when(mPackageManager.getApplicationInfo(eq(TEST_PACKAGE_NAME), anyInt()))
+                .thenReturn(appInfo);
+        when(mNetworkScoreManager.getActiveScorerPackage())
+                .thenReturn(TEST_PACKAGE_NAME);
+
+        ArgumentCaptor<ContentObserver> observerCaptor =
+                ArgumentCaptor.forClass(ContentObserver.class);
+        mScoreCache = new WifiNetworkScoreCache(mContext);
+        mScoredNetworkNominator = new ScoredNetworkNominator(mContext,
+                new Handler(Looper.getMainLooper()), mFrameworkFacade, mNetworkScoreManager,
+                mPackageManager, mWifiConfigManager, new LocalLog(0), mScoreCache,
+                mWifiPermissionsUtil);
+        verify(mFrameworkFacade).registerContentObserver(eq(mContext), any(Uri.class), eq(false),
+                observerCaptor.capture());
+        mContentObserver = observerCaptor.getValue();
+
+        when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime());
+    }
+
+    @After
+    public void tearDown() {
+        validateMockitoUsage();
+        if (mSession != null) {
+            mSession.finishMocking();
+        }
+    }
+
+    @Test
+    public void testUpdate_recommendationsDisabled() {
+        String[] ssids = {"\"test1\""};
+        String[] bssids = {"6c:f3:7f:ae:8c:f3"};
+        int[] freqs = {2470};
+        String[] caps = {"[WPA2-PSK][ESS]"};
+        int[] levels = {mThresholdQualifiedRssi2G + 8};
+        int[] securities = {SECURITY_PSK};
+
+        ScanDetailsAndWifiConfigs scanDetailsAndConfigs = WifiNetworkSelectorTestUtil
+                .setupScanDetailsAndConfigStore(
+                ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock);
+
+        when(mFrameworkFacade.getStringSetting(mContext,
+                SETTINGS_GLOBAL_USE_OPEN_WIFI_PACKAGE))
+                .thenReturn(null);
+
+        mContentObserver.onChange(false /* unused */);
+
+        mScoredNetworkNominator.update(scanDetailsAndConfigs.getScanDetails());
+
+        verifyZeroInteractions(mNetworkScoreManager);
+    }
+
+    @Test
+    public void testUpdate_emptyScanList() {
+        String[] ssids = {"\"test1\""};
+        String[] bssids = {"6c:f3:7f:ae:8c:f3"};
+        int[] freqs = {2470};
+        String[] caps = {"[WPA2-PSK][ESS]"};
+        int[] levels = {mThresholdQualifiedRssi2G + 8};
+        int[] securities = {SECURITY_PSK};
+
+        ScanDetailsAndWifiConfigs scanDetailsAndConfigs = WifiNetworkSelectorTestUtil
+                .setupScanDetailsAndConfigStore(
+                        ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock);
+
+        mScoredNetworkNominator.update(new ArrayList<ScanDetail>());
+
+        verifyZeroInteractions(mNetworkScoreManager);
+    }
+
+    @Test
+    public void testUpdate_allNetworksUnscored() {
+        String[] ssids = {"\"test1\"", "\"test2\""};
+        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
+        int[] freqs = {2470, 2437};
+        String[] caps = {"[WPA2-PSK][ESS]", "[ESS]"};
+        int[] securities = {SECURITY_PSK, SECURITY_NONE};
+        int[] levels = {mThresholdQualifiedRssi2G + 8, mThresholdQualifiedRssi2G + 10};
+
+        ScanDetailsAndWifiConfigs scanDetailsAndConfigs = WifiNetworkSelectorTestUtil
+                .setupScanDetailsAndConfigStore(
+                        ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock);
+
+        mScoredNetworkNominator.update(scanDetailsAndConfigs.getScanDetails());
+
+        verify(mNetworkScoreManager).requestScores(mNetworkKeyCollectionCaptor.capture());
+        NetworkKey[] requestedScores =
+                mNetworkKeyCollectionCaptor.getValue().toArray(new NetworkKey[0]);
+        assertEquals(2, requestedScores.length);
+        NetworkKey expectedNetworkKey = NetworkKey.createFromScanResult(
+                scanDetailsAndConfigs.getScanDetails().get(0).getScanResult());
+        assertEquals(expectedNetworkKey, requestedScores[0]);
+        expectedNetworkKey = NetworkKey.createFromScanResult(
+                scanDetailsAndConfigs.getScanDetails().get(1).getScanResult());
+        assertEquals(expectedNetworkKey, requestedScores[1]);
+    }
+
+    @Test
+    public void testUpdate_oneScored_oneUnscored() {
+        String[] ssids = {"\"test1\"", "\"test2\""};
+        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
+        int[] freqs = {2470, 2437};
+        String[] caps = {"[WPA2-PSK][ESS]", "[ESS]"};
+        int[] securities = {SECURITY_PSK, SECURITY_NONE};
+        int[] levels = {mThresholdQualifiedRssi2G + 8, mThresholdQualifiedRssi2G + 10};
+
+        ScanDetailsAndWifiConfigs scanDetailsAndConfigs = WifiNetworkSelectorTestUtil
+                .setupScanDetailsAndConfigStore(
+                        ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock);
+
+        List<ScanDetail> scoredScanDetails = scanDetailsAndConfigs.getScanDetails().subList(0, 1);
+        Integer[] scores = {120};
+        boolean[] meteredHints = {true};
+        WifiNetworkSelectorTestUtil.configureScoreCache(
+                mScoreCache, scoredScanDetails, scores, meteredHints);
+
+        mScoredNetworkNominator.update(scanDetailsAndConfigs.getScanDetails());
+
+        verify(mNetworkScoreManager).requestScores(mNetworkKeyCollectionCaptor.capture());
+
+        NetworkKey[] requestedScores =
+                mNetworkKeyCollectionCaptor.getValue().toArray(new NetworkKey[0]);
+        assertEquals(1, requestedScores.length);
+        NetworkKey expectedNetworkKey = NetworkKey.createFromScanResult(
+                scanDetailsAndConfigs.getScanDetails().get(1).getScanResult());
+        assertEquals(expectedNetworkKey, requestedScores[0]);
+    }
+
+    @Test
+    public void testEvaluateNetworks_recommendationsDisabled() {
+        when(mFrameworkFacade.getStringSetting(mContext,
+                SETTINGS_GLOBAL_USE_OPEN_WIFI_PACKAGE))
+                .thenReturn(null);
+
+        mContentObserver.onChange(false /* unused */);
+
+        mScoredNetworkNominator.nominateNetworks(
+                null, false, true, true, mOnConnectableListener);
+
+        verifyZeroInteractions(mWifiConfigManager, mNetworkScoreManager);
+    }
+
+    @Test
+    public void testUpdate_externalScorerNotPermittedToSeeScanResults() {
+        String[] ssids = {"\"test1\"", "\"test2\""};
+        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
+        int[] freqs = {2470, 2437};
+        String[] caps = {"[WPA2-PSK][ESS]", "[ESS]"};
+        int[] securities = {SECURITY_PSK, SECURITY_NONE};
+        int[] levels = {mThresholdQualifiedRssi2G + 8, mThresholdQualifiedRssi2G + 10};
+
+        doThrow(new SecurityException()).when(mWifiPermissionsUtil).enforceCanAccessScanResults(
+                any(), any(), anyInt(), any());
+
+        ScanDetailsAndWifiConfigs scanDetailsAndConfigs = WifiNetworkSelectorTestUtil
+                .setupScanDetailsAndConfigStore(
+                        ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock);
+
+        mScoredNetworkNominator.update(scanDetailsAndConfigs.getScanDetails());
+
+        verify(mNetworkScoreManager, never()).requestScores(anyCollection());
+        verify(mWifiPermissionsUtil).enforceCanAccessScanResults(
+                eq(TEST_PACKAGE_NAME), any(), eq(TEST_UID), nullable(String.class));
+    }
+
+    @Test
+    public void testUpdate_externalScorerNotPermittedToSeeScanResultsWithException() {
+        String[] ssids = {"\"test1\"", "\"test2\""};
+        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
+        int[] freqs = {2470, 2437};
+        String[] caps = {"[WPA2-PSK][ESS]", "[ESS]"};
+        int[] securities = {SECURITY_PSK, SECURITY_NONE};
+        int[] levels = {mThresholdQualifiedRssi2G + 8, mThresholdQualifiedRssi2G + 10};
+
+        doThrow(new SecurityException()).when(mWifiPermissionsUtil).enforceCanAccessScanResults(
+                any(), any(), anyInt(), any());
+
+        ScanDetailsAndWifiConfigs scanDetailsAndConfigs = WifiNetworkSelectorTestUtil
+                .setupScanDetailsAndConfigStore(
+                        ssids, bssids, freqs, caps, levels, securities, mWifiConfigManager, mClock);
+
+        mScoredNetworkNominator.update(scanDetailsAndConfigs.getScanDetails());
+
+        verify(mNetworkScoreManager, never()).requestScores(anyCollection());
+        verify(mWifiPermissionsUtil).enforceCanAccessScanResults(
+                eq(TEST_PACKAGE_NAME), any(), eq(TEST_UID), nullable(String.class));
+    }
+
+    /**
+     * When we have created a new ephemeral network, make sure that mOnConnectableListener
+     * is called.
+     */
+    @Test
+    public void testEvaluateNetworks_newEphemeralNetworkMustBeReportedAsConnectable() {
+        String[] ssids = {"\"test1\"", "\"test2\""};
+        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
+        int[] freqs = {2470, 2437};
+        String[] caps = {"[WPA2-PSK][ESS]", "[ESS]"};
+        int[] levels = {mThresholdQualifiedRssi2G + 8, mThresholdQualifiedRssi2G + 10};
+        Integer[] scores = {null, 120};
+        boolean[] meteredHints = {false, false};
+        List<ScanDetail> scanDetails = WifiNetworkSelectorTestUtil.buildScanDetails(
+                ssids, bssids, freqs, caps, levels, mClock);
+        WifiNetworkSelectorTestUtil.configureScoreCache(mScoreCache,
+                scanDetails, scores, meteredHints);
+        ScanResult scanResult = scanDetails.get(1).getScanResult();
+        WifiConfiguration ephemeralNetworkConfig = WifiNetworkSelectorTestUtil
+                .setupEphemeralNetwork(mWifiConfigManager, 1, scanDetails.get(1), meteredHints[1]);
+        // No saved networks.
+        when(mWifiConfigManager.getSavedNetworkForScanDetailAndCache(any(ScanDetail.class)))
+                .thenReturn(null);
+        // But when we create one, this is should be it.
+        when(mWifiConfigManager.addOrUpdateNetwork(any(), eq(TEST_UID), eq(TEST_PACKAGE_NAME)))
+                .thenReturn(new NetworkUpdateResult(1));
+        // Untrusted networks allowed.
+        mScoredNetworkNominator.nominateNetworks(
+                scanDetails, true, true, true, mOnConnectableListener);
+        verify(mOnConnectableListener, atLeastOnce())
+                .onConnectable(any(), mWifiConfigCaptor.capture());
+        assertTrue(mWifiConfigCaptor.getAllValues().stream()
+                .anyMatch(c -> c.networkId == ephemeralNetworkConfig.networkId));
+    }
+
+    /**
+     * Don't choose available ephemeral networks if no saved networks and untrusted networks
+     * are not allowed.
+     */
+    @Test
+    public void testEvaluateNetworks_noEphemeralNetworkWhenUntrustedNetworksNotAllowed() {
+        String[] ssids = {"\"test1\"", "\"test2\""};
+        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
+        int[] freqs = {2470, 2437};
+        String[] caps = {"[WPA2-PSK][ESS]", "[ESS]"};
+        int[] levels = {mThresholdQualifiedRssi2G + 8, mThresholdQualifiedRssi2G + 10};
+        Integer[] scores = {null, 120};
+        boolean[] meteredHints = {false, true};
+
+        List<ScanDetail> scanDetails = WifiNetworkSelectorTestUtil.buildScanDetails(
+                ssids, bssids, freqs, caps, levels, mClock);
+        WifiNetworkSelectorTestUtil.configureScoreCache(mScoreCache,
+                scanDetails, scores, meteredHints);
+
+        // No saved networks.
+        when(mWifiConfigManager.getSavedNetworkForScanDetailAndCache(any(ScanDetail.class)))
+                .thenReturn(null);
+
+        WifiNetworkSelectorTestUtil.setupEphemeralNetwork(
+                mWifiConfigManager, 1, scanDetails.get(1), meteredHints[1]);
+
+        // Untrusted networks not allowed.
+        mScoredNetworkNominator.nominateNetworks(
+                scanDetails, false, true, true, mOnConnectableListener);
+
+        verify(mOnConnectableListener, never()).onConnectable(any(), any());
+    }
+
+    /**
+     * Choose externally scored saved network.
+     */
+    @Test
+    public void testEvaluateNetworks_chooseSavedNetworkWithExternalScore() {
+        String[] ssids = {"\"test1\""};
+        String[] bssids = {"6c:f3:7f:ae:8c:f3"};
+        int[] freqs = {5200};
+        String[] caps = {"[WPA2-PSK][ESS]"};
+        int[] securities = {SECURITY_PSK};
+        int[] levels = {mThresholdQualifiedRssi5G + 8};
+        Integer[] scores = {120};
+        boolean[] meteredHints = {false};
+
+        WifiNetworkSelectorTestUtil.ScanDetailsAndWifiConfigs scanDetailsAndConfigs =
+                WifiNetworkSelectorTestUtil.setupScanDetailsAndConfigStore(ssids, bssids,
+                        freqs, caps, levels, securities, mWifiConfigManager, mClock);
+        List<ScanDetail> scanDetails = scanDetailsAndConfigs.getScanDetails();
+        WifiConfiguration[] savedConfigs = scanDetailsAndConfigs.getWifiConfigs();
+        savedConfigs[0].useExternalScores = true;
+
+        WifiNetworkSelectorTestUtil.configureScoreCache(mScoreCache,
+                scanDetails, scores, meteredHints);
+
+        mScoredNetworkNominator.nominateNetworks(
+                scanDetails, true, true, true, mOnConnectableListener);
+
+        verify(mOnConnectableListener).onConnectable(any(), mWifiConfigCaptor.capture());
+        assertEquals(mWifiConfigCaptor.getValue().networkId, savedConfigs[0].networkId);
+    }
+
+    /**
+     * Prefer externally scored saved network over untrusted network when they have
+     * the same score.
+     */
+    @Test
+    public void testEvaluateNetworks_nullScoredNetworks() {
+        String[] ssids = {"\"test1\"", "\"test2\""};
+        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
+        int[] freqs = {2470, 2437};
+        String[] caps = {"[WPA2-PSK][ESS]", "[ESS]"};
+        int[] securities = {SECURITY_PSK, SECURITY_NONE};
+        int[] levels = {mThresholdQualifiedRssi2G + 8, mThresholdQualifiedRssi2G + 8};
+        Integer[] scores = {null, null};
+        boolean[] meteredHints = {false, true};
+
+        WifiNetworkSelectorTestUtil.ScanDetailsAndWifiConfigs scanDetailsAndConfigs =
+                WifiNetworkSelectorTestUtil.setupScanDetailsAndConfigStore(ssids, bssids,
+                        freqs, caps, levels, securities, mWifiConfigManager, mClock);
+        List<ScanDetail> scanDetails = scanDetailsAndConfigs.getScanDetails();
+        WifiConfiguration[] savedConfigs = scanDetailsAndConfigs.getWifiConfigs();
+        savedConfigs[0].useExternalScores = true;
+
+        WifiNetworkSelectorTestUtil.configureScoreCache(mScoreCache,
+                scanDetails, scores, meteredHints);
+
+        mScoredNetworkNominator.nominateNetworks(
+                scanDetails, true, true, true, mOnConnectableListener);
+
+        verify(mOnConnectableListener).onConnectable(any(), mWifiConfigCaptor.capture());
+        assertEquals(mWifiConfigCaptor.getValue().networkId, savedConfigs[0].networkId);
+    }
+}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ScoringParamsTest.java b/service/tests/wifitests/src/com/android/server/wifi/ScoringParamsTest.java
index 4da24ef..905fb29 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ScoringParamsTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ScoringParamsTest.java
@@ -256,8 +256,6 @@
     int mBad5GHz, mEntry5GHz, mSufficient5GHz, mGood5GHz;
     int mBad6GHz, mEntry6GHz, mSufficient6GHz, mGood6GHz;
     int mEstimateRssiErrorMargin;
-    int mBand6GhzBonus;
-    int mScoringBucketStepSize;
 
     @Mock Context mContext;
     @Spy private MockResources mResources = new MockResources();
@@ -299,9 +297,6 @@
                 R.integer.config_wifiFrameworkScoreGoodRssiThreshold6ghz, -50);
         mEstimateRssiErrorMargin = setupIntegerResource(
                 R.integer.config_wifiEstimateRssiErrorMarginDb, 5);
-        mBand6GhzBonus = setupIntegerResource(R.integer.config_wifiBand6GhzBonus, 7);
-        mScoringBucketStepSize = setupIntegerResource(R.integer.config_wifiScoringBucketStepSize,
-                567);
     }
 
     /**
@@ -329,7 +324,5 @@
         assertEquals(mGood6GHz, mScoringParams.getGoodRssi(6275));
         assertEquals(mGood6GHz, mScoringParams.getGoodRssi(ScanResult.BAND_6_GHZ_START_FREQ_MHZ));
         assertEquals(mEstimateRssiErrorMargin, mScoringParams.getEstimateRssiErrorMargin());
-        assertEquals(mBand6GhzBonus, mScoringParams.getBand6GhzBonus());
-        assertEquals(mScoringBucketStepSize, mScoringParams.getScoringBucketStepSize());
     }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SelfRecoveryTest.java b/service/tests/wifitests/src/com/android/server/wifi/SelfRecoveryTest.java
index b656446..9c623d5 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SelfRecoveryTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SelfRecoveryTest.java
@@ -16,15 +16,8 @@
 
 package com.android.server.wifi;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.when;
-import static org.mockito.MockitoAnnotations.initMocks;
+import static org.mockito.Mockito.*;
+import static org.mockito.MockitoAnnotations.*;
 
 import android.content.Context;
 
@@ -34,7 +27,6 @@
 
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 
 import java.util.concurrent.TimeUnit;
@@ -51,8 +43,6 @@
     @Mock ActiveModeWarden mActiveModeWarden;
     @Mock Clock mClock;
     @Mock WifiNative mWifiNative;
-    final ArgumentCaptor<HalDeviceManager.SubsystemRestartListener> mRestartListenerCaptor =
-            ArgumentCaptor.forClass(HalDeviceManager.SubsystemRestartListener.class);
 
     @Before
     public void setUp() throws Exception {
@@ -63,11 +53,6 @@
                 DEFAULT_MAX_RECOVERY_PER_HOUR);
         when(mContext.getResources()).thenReturn(mResources);
         mSelfRecovery = new SelfRecovery(mContext, mActiveModeWarden, mClock, mWifiNative);
-        verify(mWifiNative).registerSubsystemRestartListener(mRestartListenerCaptor.capture());
-        doAnswer((invocation) -> {
-            mRestartListenerCaptor.getValue().onSubsystemRestart();
-            return true;
-        }).when(mWifiNative).startSubsystemRestart();
     }
 
     /**
@@ -78,14 +63,14 @@
     public void testValidTriggerReasonsSendMessageToWifiController() {
         mSelfRecovery.trigger(SelfRecovery.REASON_LAST_RESORT_WATCHDOG);
         verify(mActiveModeWarden).recoveryRestartWifi(SelfRecovery.REASON_LAST_RESORT_WATCHDOG,
-                false);
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_LAST_RESORT_WATCHDOG], false);
         reset(mActiveModeWarden);
 
         when(mClock.getElapsedSinceBootMillis())
                 .thenReturn(TimeUnit.HOURS.toMillis(1) + 1);
         mSelfRecovery.trigger(SelfRecovery.REASON_WIFINATIVE_FAILURE);
         verify(mActiveModeWarden).recoveryRestartWifi(SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                true);
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
         reset(mActiveModeWarden);
     }
 
@@ -124,11 +109,7 @@
         for (int i = 0; i < DEFAULT_MAX_RECOVERY_PER_HOUR; i++) {
             mSelfRecovery.trigger(SelfRecovery.REASON_WIFINATIVE_FAILURE);
             verify(mActiveModeWarden).recoveryRestartWifi(SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                    true);
-            mSelfRecovery.onWifiStopped();
-            assertTrue(mSelfRecovery.isRecoveryInProgress());
-            mSelfRecovery.onRecoveryCompleted();
-            assertFalse(mSelfRecovery.isRecoveryInProgress());
+                    SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
             reset(mActiveModeWarden);
         }
 
@@ -136,36 +117,26 @@
         mSelfRecovery.trigger(SelfRecovery.REASON_WIFINATIVE_FAILURE);
         verify(mActiveModeWarden, never()).recoveryRestartWifi(
                 SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                true);
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
         verify(mActiveModeWarden).recoveryDisableWifi();
-        mSelfRecovery.onWifiStopped();
-        assertFalse(mSelfRecovery.isRecoveryInProgress());
         reset(mActiveModeWarden);
 
         mSelfRecovery.trigger(SelfRecovery.REASON_WIFINATIVE_FAILURE);
         verify(mActiveModeWarden, never()).recoveryRestartWifi(
                 SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                true);
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
         verify(mActiveModeWarden).recoveryDisableWifi();
-        mSelfRecovery.onWifiStopped();
-        assertFalse(mSelfRecovery.isRecoveryInProgress());
         reset(mActiveModeWarden);
 
         // Verify L.R.Watchdog can still restart things (It has its own complex limiter)
         mSelfRecovery.trigger(SelfRecovery.REASON_LAST_RESORT_WATCHDOG);
         verify(mActiveModeWarden).recoveryRestartWifi(SelfRecovery.REASON_LAST_RESORT_WATCHDOG,
-                false);
-        mSelfRecovery.onWifiStopped();
-        assertTrue(mSelfRecovery.isRecoveryInProgress());
-        mSelfRecovery.onRecoveryCompleted();
-        assertFalse(mSelfRecovery.isRecoveryInProgress());
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_LAST_RESORT_WATCHDOG], false);
         reset(mActiveModeWarden);
 
         // Verify Sta Interface Down will still disable wifi
         mSelfRecovery.trigger(SelfRecovery.REASON_STA_IFACE_DOWN);
         verify(mActiveModeWarden).recoveryDisableWifi();
-        mSelfRecovery.onWifiStopped();
-        assertFalse(mSelfRecovery.isRecoveryInProgress());
         reset(mActiveModeWarden);
 
         // now TRAVEL FORWARDS IN TIME and ensure that more restarts can occur
@@ -173,18 +144,14 @@
                 .thenReturn(TimeUnit.HOURS.toMillis(1) + 1);
         mSelfRecovery.trigger(SelfRecovery.REASON_LAST_RESORT_WATCHDOG);
         verify(mActiveModeWarden).recoveryRestartWifi(SelfRecovery.REASON_LAST_RESORT_WATCHDOG,
-                false);
-        mSelfRecovery.onWifiStopped();
-        assertTrue(mSelfRecovery.isRecoveryInProgress());
-        mSelfRecovery.onRecoveryCompleted();
-        assertFalse(mSelfRecovery.isRecoveryInProgress());
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_LAST_RESORT_WATCHDOG], false);
         reset(mActiveModeWarden);
 
         when(mClock.getElapsedSinceBootMillis())
                 .thenReturn(TimeUnit.HOURS.toMillis(1) + 1);
         mSelfRecovery.trigger(SelfRecovery.REASON_WIFINATIVE_FAILURE);
         verify(mActiveModeWarden).recoveryRestartWifi(SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                true);
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
         reset(mActiveModeWarden);
     }
 
@@ -200,16 +167,14 @@
         mSelfRecovery.trigger(SelfRecovery.REASON_WIFINATIVE_FAILURE);
         verify(mActiveModeWarden, never()).recoveryRestartWifi(
                 SelfRecovery.REASON_WIFINATIVE_FAILURE,
-                true);
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_WIFINATIVE_FAILURE], true);
         verify(mActiveModeWarden).recoveryDisableWifi();
-        mSelfRecovery.onWifiStopped();
-        assertFalse(mSelfRecovery.isRecoveryInProgress());
         reset(mActiveModeWarden);
 
         // Verify L.R.Watchdog can still restart things (It has its own complex limiter)
         mSelfRecovery.trigger(SelfRecovery.REASON_LAST_RESORT_WATCHDOG);
         verify(mActiveModeWarden).recoveryRestartWifi(SelfRecovery.REASON_LAST_RESORT_WATCHDOG,
-                false);
+                SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_LAST_RESORT_WATCHDOG], false);
     }
 
     /**
@@ -223,11 +188,7 @@
             // Verify L.R.Watchdog can still restart things (It has it's own complex limiter)
             mSelfRecovery.trigger(SelfRecovery.REASON_LAST_RESORT_WATCHDOG);
             verify(mActiveModeWarden).recoveryRestartWifi(SelfRecovery.REASON_LAST_RESORT_WATCHDOG,
-                    false);
-            mSelfRecovery.onWifiStopped();
-            assertTrue(mSelfRecovery.isRecoveryInProgress());
-            mSelfRecovery.onRecoveryCompleted();
-            assertFalse(mSelfRecovery.isRecoveryInProgress());
+                    SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_LAST_RESORT_WATCHDOG], false);
             reset(mActiveModeWarden);
         }
     }
@@ -244,43 +205,8 @@
             verify(mActiveModeWarden).recoveryDisableWifi();
             verify(mActiveModeWarden, never()).recoveryRestartWifi(
                     SelfRecovery.REASON_STA_IFACE_DOWN,
-                    true);
-            mSelfRecovery.onWifiStopped();
-            assertFalse(mSelfRecovery.isRecoveryInProgress());
+                    SelfRecovery.REASON_STRINGS[SelfRecovery.REASON_STA_IFACE_DOWN], true);
             reset(mActiveModeWarden);
         }
     }
-
-    /**
-     * Verifies an unsolicited system restart received by system restart listener.
-     */
-    @Test
-    public void testUnsolicitedSystemRestart() {
-        mRestartListenerCaptor.getValue().onSubsystemRestart();
-        verify(mActiveModeWarden).recoveryRestartWifi(SelfRecovery.REASON_SUBSYSTEM_RESTART,
-                true);
-        assertTrue(mSelfRecovery.isRecoveryInProgress());
-        mSelfRecovery.onWifiStopped();
-        assertTrue(mSelfRecovery.isRecoveryInProgress());
-        mSelfRecovery.onRecoveryCompleted();
-        assertFalse(mSelfRecovery.isRecoveryInProgress());
-    }
-
-    /**
-     * Verifies a system restart when WifiNative#startSubsystemRestart failed.
-     */
-    @Test
-    public void testWifiNativeStartSubsystemRestartFailed() {
-        doAnswer((invocation) -> {
-            return false;
-        }).when(mWifiNative).startSubsystemRestart();
-        mSelfRecovery.trigger(SelfRecovery.REASON_API_CALL);
-        verify(mActiveModeWarden).recoveryRestartWifi(SelfRecovery.REASON_API_CALL,
-                false);
-        assertTrue(mSelfRecovery.isRecoveryInProgress());
-        mSelfRecovery.onWifiStopped();
-        assertTrue(mSelfRecovery.isRecoveryInProgress());
-        mSelfRecovery.onRecoveryCompleted();
-        assertFalse(mSelfRecovery.isRecoveryInProgress());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SoftApBackupRestoreTest.java b/service/tests/wifitests/src/com/android/server/wifi/SoftApBackupRestoreTest.java
index c8ebf6d..5e767c5 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SoftApBackupRestoreTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SoftApBackupRestoreTest.java
@@ -26,9 +26,7 @@
 import android.net.MacAddress;
 import android.net.wifi.SoftApConfiguration;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiManager;
 import android.net.wifi.WifiMigration;
-import android.net.wifi.WifiSsid;
 import android.util.BackupUtils;
 import android.util.SparseIntArray;
 
@@ -80,7 +78,6 @@
     private static final int TEST_BAND_2G = SoftApConfiguration.BAND_2GHZ;
     private static final int TEST_BAND_5G = SoftApConfiguration.BAND_5GHZ;
     private static final boolean TEST_BRIDGED_OPPORTUNISTIC_SHUTDOWN_ENABLED = false;
-    private static final boolean TEST_AUTO_SHUTDOWN_ENABLED = false;
     private static final int TEST_MAC_RANDOMIZATIONSETTING =
             SoftApConfiguration.RANDOMIZATION_NONE;
     private static final SparseIntArray TEST_CHANNELS = new SparseIntArray() {{
@@ -96,7 +93,7 @@
      */
     public static void assertWifiConfigurationEqualSoftApConfiguration(
             WifiConfiguration backup, SoftApConfiguration restore) {
-        assertEquals(backup.SSID, restore.getWifiSsid().getUtf8Text());
+        assertEquals(backup.SSID, restore.getSsid());
         assertEquals(backup.BSSID, restore.getBssid());
         assertEquals(ApConfigUtil.convertWifiConfigBandToSoftApConfigBand(backup.apBand),
                 restore.getBand());
@@ -275,9 +272,27 @@
      * Verifies that the serialization/de-serialization for all customized configure field in .
      */
     @Test
-    public void testSoftApConfigBackupAndRestoreWithAllConfigInT() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        SoftApConfiguration config = generateExpectedSoftApConfigurationWithTestData(9);
+    public void testSoftApConfigBackupAndRestoreWithAllConfigInS() throws Exception {
+        assumeTrue(SdkLevel.isAtLeastS());
+        mTestBlockedList.add(MacAddress.fromString(TEST_BLOCKED_CLIENT));
+        mTestAllowedList.add(MacAddress.fromString(TEST_ALLOWED_CLIENT));
+        SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBand(SoftApConfiguration.BAND_5GHZ);
+        configBuilder.setChannel(40, SoftApConfiguration.BAND_5GHZ);
+        configBuilder.setPassphrase(TEST_PASSPHRASE, TEST_SECURITY);
+        configBuilder.setHiddenSsid(TEST_HIDDEN);
+        configBuilder.setMaxNumberOfClients(TEST_MAXNUMBEROFCLIENTS);
+        configBuilder.setShutdownTimeoutMillis(TEST_SHUTDOWNTIMEOUTMILLIS);
+        configBuilder.setClientControlByUserEnabled(TEST_CLIENTCONTROLENABLE);
+        configBuilder.setBlockedClientList(mTestBlockedList);
+        configBuilder.setAllowedClientList(mTestAllowedList);
+        configBuilder.setChannels(TEST_CHANNELS);
+        configBuilder.setMacRandomizationSetting(TEST_MAC_RANDOMIZATIONSETTING);
+        configBuilder.setBridgedModeOpportunisticShutdownEnabled(
+                TEST_BRIDGED_OPPORTUNISTIC_SHUTDOWN_ENABLED);
+        configBuilder.setIeee80211axEnabled(TEST_80211AX_ENABLED);
+        SoftApConfiguration config = configBuilder.build();
 
         byte[] data = mSoftApBackupRestore.retrieveBackupDataFromSoftApConfiguration(config);
         SoftApConfiguration restoredConfig =
@@ -292,64 +307,6 @@
      */
     @Test
     public void testSoftApConfigRestoreFromVersion5() throws Exception {
-        SoftApConfiguration.Builder configBuilder =
-                new SoftApConfiguration.Builder(generateExpectedSoftApConfigurationWithTestData(5));
-
-        // Toggle on when migrating.
-        when(mOemMigrationData.isSoftApTimeoutEnabled()).thenReturn(true);
-        SoftApConfiguration expectedConfig = configBuilder.setAutoShutdownEnabled(true).build();
-        SoftApConfiguration restoredConfig =
-                mSoftApBackupRestore.retrieveSoftApConfigurationFromBackupData(
-                retrieveSpecificVersionBackupDataFromSoftApConfiguration(expectedConfig, 5));
-        assertEquals(expectedConfig, restoredConfig);
-
-        // Toggle off when migrating.
-        when(mOemMigrationData.isSoftApTimeoutEnabled()).thenReturn(false);
-        expectedConfig = configBuilder.setAutoShutdownEnabled(false).build();
-        restoredConfig = mSoftApBackupRestore.retrieveSoftApConfigurationFromBackupData(
-                retrieveSpecificVersionBackupDataFromSoftApConfiguration(expectedConfig, 5));
-        assertEquals(expectedConfig, restoredConfig);
-    }
-
-    /**
-     * Verifies that the restore of version 6 backup data will read the auto shutdown with int.
-     */
-    @Test
-    public void testSoftApConfigRestoreFromVersion6() throws Exception {
-        SoftApConfiguration expectedConfig = generateExpectedSoftApConfigurationWithTestData(6);
-        SoftApConfiguration restoredConfig = mSoftApBackupRestore
-                .retrieveSoftApConfigurationFromBackupData(
-                retrieveSpecificVersionBackupDataFromSoftApConfiguration(expectedConfig, 6));
-        assertEquals(expectedConfig, restoredConfig);
-    }
-
-    /**
-     * Verifies that the restore of version 7
-     */
-    @Test
-    public void testSoftApConfigRestoreFromVersion7() throws Exception {
-        SoftApConfiguration expectedConfig = generateExpectedSoftApConfigurationWithTestData(7);
-        SoftApConfiguration restoredConfig = mSoftApBackupRestore
-                .retrieveSoftApConfigurationFromBackupData(
-                retrieveSpecificVersionBackupDataFromSoftApConfiguration(expectedConfig, 7));
-        assertEquals(expectedConfig, restoredConfig);
-    }
-
-    /**
-     * Verifies that the restore of version 8 (Android S)
-     */
-    @Test
-    public void testSoftApConfigRestoreFromVersion8() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        SoftApConfiguration expectedConfig = generateExpectedSoftApConfigurationWithTestData(8);
-        SoftApConfiguration restoredConfig = mSoftApBackupRestore
-                .retrieveSoftApConfigurationFromBackupData(
-                retrieveSpecificVersionBackupDataFromSoftApConfiguration(expectedConfig, 8));
-        assertEquals(expectedConfig, restoredConfig);
-    }
-
-    // Test util methods
-    private SoftApConfiguration generateExpectedSoftApConfigurationWithTestData(int version) {
         mTestBlockedList.add(MacAddress.fromString(TEST_BLOCKED_CLIENT));
         mTestAllowedList.add(MacAddress.fromString(TEST_ALLOWED_CLIENT));
         SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder();
@@ -363,75 +320,150 @@
         configBuilder.setClientControlByUserEnabled(TEST_CLIENTCONTROLENABLE);
         configBuilder.setBlockedClientList(mTestBlockedList);
         configBuilder.setAllowedClientList(mTestAllowedList);
-        if (version > 5) {
-            configBuilder.setAutoShutdownEnabled(TEST_AUTO_SHUTDOWN_ENABLED);
-        }
-        if (version > 7) { // Android S
-            configBuilder.setChannels(TEST_CHANNELS);
-            configBuilder.setMacRandomizationSetting(TEST_MAC_RANDOMIZATIONSETTING);
-            configBuilder.setBridgedModeOpportunisticShutdownEnabled(
-                    TEST_BRIDGED_OPPORTUNISTIC_SHUTDOWN_ENABLED);
-            configBuilder.setIeee80211axEnabled(TEST_80211AX_ENABLED);
-        }
-        return configBuilder.build();
+
+        // Toggle on when migrating.
+        when(mOemMigrationData.isSoftApTimeoutEnabled()).thenReturn(true);
+        SoftApConfiguration expectedConfig = configBuilder.setAutoShutdownEnabled(true).build();
+        SoftApConfiguration restoredConfig =
+                mSoftApBackupRestore.retrieveSoftApConfigurationFromBackupData(
+                        retrieveVersion5BackupDataFromSoftApConfiguration(expectedConfig));
+        assertEquals(expectedConfig, restoredConfig);
+
+        // Toggle off when migrating.
+        when(mOemMigrationData.isSoftApTimeoutEnabled()).thenReturn(false);
+        expectedConfig = configBuilder.setAutoShutdownEnabled(false).build();
+        restoredConfig = mSoftApBackupRestore.retrieveSoftApConfigurationFromBackupData(
+                retrieveVersion5BackupDataFromSoftApConfiguration(expectedConfig));
+        assertEquals(expectedConfig, restoredConfig);
     }
 
-
     /**
-     * Util method to write SoftApConfiguration to OutputStream for V5 to V8.
+     * This is a copy of the old serialization code (version 5)
      *
-     * Some release notes for each android.
-     *
-     * Android R: Version#4 ~ Version#7 (Start to use SoftApConfiguration)
-     * Android S: Version#8
-     * Android T: Version#9, start to support XML backup, no need to call this function.
+     * Changes: Version = 5, AutoShutdown tag is missing.
      */
-    private byte[] retrieveSpecificVersionBackupDataFromSoftApConfiguration(
-            SoftApConfiguration config, int version) throws Exception {
+    private byte[] retrieveVersion5BackupDataFromSoftApConfiguration(SoftApConfiguration config)
+            throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         DataOutputStream out = new DataOutputStream(baos);
 
-        out.writeInt(version);
-        WifiSsid wifiSsid = config.getWifiSsid();
-        if (wifiSsid != null) {
-            CharSequence utf8Ssid = wifiSsid.getUtf8Text();
-            BackupUtils.writeString(out, utf8Ssid != null
-                    ? utf8Ssid.toString() : WifiManager.UNKNOWN_SSID);
-        } else {
-            BackupUtils.writeString(out, null);
-        }
+        out.writeInt(5);
+        BackupUtils.writeString(out, config.getSsid());
         out.writeInt(config.getBand());
         out.writeInt(config.getChannel());
         BackupUtils.writeString(out, config.getPassphrase());
         out.writeInt(config.getSecurityType());
         out.writeBoolean(config.isHiddenSsid());
         out.writeInt(config.getMaxNumberOfClients());
-        // Start from version#7, ShutdownTimeoutMillis changed from int to Long.
-        if (version > 6) {
-            out.writeLong(config.getShutdownTimeoutMillis());
-        } else {
-            out.writeInt((int) config.getShutdownTimeoutMillis());
-        }
+        out.writeInt((int) config.getShutdownTimeoutMillis());
         out.writeBoolean(config.isClientControlByUserEnabled());
         writeMacAddressList(out, config.getBlockedClientList());
         writeMacAddressList(out, config.getAllowedClientList());
-        // Start from version#6, AutoShutdownEnabled stored in configuration
-        if (version > 5) {
-            out.writeBoolean(config.isAutoShutdownEnabled());
-        }
-        if (version > 7) { // Version#8 is backup version in android S.
-            out.writeBoolean(config.isBridgedModeOpportunisticShutdownEnabled());
-            out.writeInt(config.getMacRandomizationSetting());
-            SparseIntArray channels = config.getChannels();
-            int numOfChannels = channels.size();
-            out.writeInt(numOfChannels);
-            for (int i = 0; i < numOfChannels; i++) {
-                out.writeInt(channels.keyAt(i));
-                out.writeInt(channels.valueAt(i));
-            }
-            out.writeBoolean(config.isIeee80211axEnabled());
-        }
+        return baos.toByteArray();
+    }
 
+
+    /**
+     * Verifies that the restore of version 6 backup data will read the auto shutdown with int.
+     */
+    @Test
+    public void testSoftApConfigRestoreFromVersion6() throws Exception {
+        mTestBlockedList.add(MacAddress.fromString(TEST_BLOCKED_CLIENT));
+        mTestAllowedList.add(MacAddress.fromString(TEST_ALLOWED_CLIENT));
+        SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBand(TEST_BAND);
+        configBuilder.setChannel(TEST_CHANNEL, TEST_BAND);
+        configBuilder.setPassphrase(TEST_PASSPHRASE, TEST_SECURITY);
+        configBuilder.setHiddenSsid(TEST_HIDDEN);
+        configBuilder.setMaxNumberOfClients(TEST_MAXNUMBEROFCLIENTS);
+        configBuilder.setShutdownTimeoutMillis(TEST_SHUTDOWNTIMEOUTMILLIS);
+        configBuilder.setClientControlByUserEnabled(TEST_CLIENTCONTROLENABLE);
+        configBuilder.setBlockedClientList(mTestBlockedList);
+        configBuilder.setAllowedClientList(mTestAllowedList);
+
+        SoftApConfiguration expectedConfig = configBuilder.build();
+        SoftApConfiguration restoredConfig = mSoftApBackupRestore
+                .retrieveSoftApConfigurationFromBackupData(
+                retrieveVersion6BackupDataFromSoftApConfiguration(expectedConfig));
+        assertEquals(expectedConfig, restoredConfig);
+    }
+
+    /**
+     * Verifies that the restore of version 7
+     */
+    @Test
+    public void testSoftApConfigRestoreFromVersion7() throws Exception {
+        mTestBlockedList.add(MacAddress.fromString(TEST_BLOCKED_CLIENT));
+        mTestAllowedList.add(MacAddress.fromString(TEST_ALLOWED_CLIENT));
+        SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBand(TEST_BAND);
+        configBuilder.setChannel(TEST_CHANNEL, TEST_BAND);
+        configBuilder.setPassphrase(TEST_PASSPHRASE, TEST_SECURITY);
+        configBuilder.setHiddenSsid(TEST_HIDDEN);
+        configBuilder.setMaxNumberOfClients(TEST_MAXNUMBEROFCLIENTS);
+        configBuilder.setShutdownTimeoutMillis(TEST_SHUTDOWNTIMEOUTMILLIS);
+        configBuilder.setClientControlByUserEnabled(TEST_CLIENTCONTROLENABLE);
+        configBuilder.setBlockedClientList(mTestBlockedList);
+        configBuilder.setAllowedClientList(mTestAllowedList);
+
+        SoftApConfiguration expectedConfig = configBuilder.build();
+        SoftApConfiguration restoredConfig = mSoftApBackupRestore
+                .retrieveSoftApConfigurationFromBackupData(
+                retrieveVersion7BackupDataFromSoftApConfiguration(expectedConfig));
+        assertEquals(expectedConfig, restoredConfig);
+    }
+
+    /**
+     * This is a copy of the old serialization code (version 6)
+     *
+     * Changes: Version = 6, AutoShutdown use int type
+     */
+    private byte[] retrieveVersion6BackupDataFromSoftApConfiguration(SoftApConfiguration config)
+            throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        DataOutputStream out = new DataOutputStream(baos);
+
+        out.writeInt(6);
+        BackupUtils.writeString(out, config.getSsid());
+        out.writeInt(config.getBand());
+        out.writeInt(config.getChannel());
+        BackupUtils.writeString(out, config.getPassphrase());
+        out.writeInt(config.getSecurityType());
+        out.writeBoolean(config.isHiddenSsid());
+        out.writeInt(config.getMaxNumberOfClients());
+        out.writeInt((int) config.getShutdownTimeoutMillis());
+        out.writeBoolean(config.isClientControlByUserEnabled());
+        writeMacAddressList(out, config.getBlockedClientList());
+        writeMacAddressList(out, config.getAllowedClientList());
+        out.writeBoolean(config.isAutoShutdownEnabled());
+        return baos.toByteArray();
+    }
+
+    /**
+     * This is a copy of the old serialization code (version 6)
+     *
+     * Changes: Version = 7
+     */
+    private byte[] retrieveVersion7BackupDataFromSoftApConfiguration(SoftApConfiguration config)
+            throws Exception {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        DataOutputStream out = new DataOutputStream(baos);
+
+        out.writeInt(7);
+        BackupUtils.writeString(out, config.getSsid());
+        out.writeInt(config.getBand());
+        out.writeInt(config.getChannel());
+        BackupUtils.writeString(out, config.getPassphrase());
+        out.writeInt(config.getSecurityType());
+        out.writeBoolean(config.isHiddenSsid());
+        out.writeInt(config.getMaxNumberOfClients());
+        out.writeLong(config.getShutdownTimeoutMillis());
+        out.writeBoolean(config.isClientControlByUserEnabled());
+        writeMacAddressList(out, config.getBlockedClientList());
+        writeMacAddressList(out, config.getAllowedClientList());
+        out.writeBoolean(config.isAutoShutdownEnabled());
         return baos.toByteArray();
     }
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java
index 47cbd5b..0647b33 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java
@@ -41,7 +41,6 @@
 import static org.mockito.Mockito.anyBoolean;
 import static org.mockito.Mockito.anyInt;
 import static org.mockito.Mockito.anyLong;
-import static org.mockito.Mockito.argThat;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.eq;
 import static org.mockito.Mockito.inOrder;
@@ -53,10 +52,8 @@
 import static org.mockito.Mockito.when;
 
 import android.app.test.TestAlarmManager;
-import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
-import android.content.IntentFilter;
 import android.content.res.Resources;
 import android.net.MacAddress;
 import android.net.wifi.CoexUnsafeChannel;
@@ -66,12 +63,10 @@
 import android.net.wifi.SoftApConfiguration.Builder;
 import android.net.wifi.SoftApInfo;
 import android.net.wifi.WifiClient;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiScanner;
 import android.net.wifi.nl80211.NativeWifiClient;
-import android.os.BatteryManager;
 import android.os.UserHandle;
 import android.os.WorkSource;
 import android.os.test.TestLooper;
@@ -80,7 +75,6 @@
 
 import androidx.test.filters.SmallTest;
 
-import com.android.internal.util.WakeupMessage;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.coex.CoexManager;
 import com.android.wifi.resources.R;
@@ -111,8 +105,7 @@
     private static final String TEST_PASSWORD = "TestPassword";
     private static final String TEST_COUNTRY_CODE = "TestCountry";
     private static final String TEST_INTERFACE_NAME = "testif0";
-    private static final String TEST_FIRST_INSTANCE_NAME = "testif1";
-    private static final String TEST_SECOND_INSTANCE_NAME = "testif2";
+    private static final String TEST_SECOND_INTERFACE_NAME = "testif1";
     private static final String OTHER_INTERFACE_NAME = "otherif";
     private static final long TEST_DEFAULT_SHUTDOWN_TIMEOUT_MILLIS = 600_000;
     private static final long TEST_DEFAULT_SHUTDOWN_IDLE_INSTANCE_IN_BRIDGED_MODE_TIMEOUT_MILLIS =
@@ -136,7 +129,7 @@
     private static final NativeWifiClient TEST_NATIVE_CLIENT_2 = new NativeWifiClient(
             TEST_CLIENT_MAC_ADDRESS_2);
     private static final WifiClient TEST_CONNECTED_CLIENT_ON_SECOND_IFACE =
-            new WifiClient(TEST_CLIENT_MAC_ADDRESS_ON_SECOND_IFACE, TEST_SECOND_INSTANCE_NAME);
+            new WifiClient(TEST_CLIENT_MAC_ADDRESS_ON_SECOND_IFACE, TEST_SECOND_INTERFACE_NAME);
     private static final int TEST_AP_FREQUENCY = 2412;
     private static final int TEST_AP_FREQUENCY_5G = 5220;
     private static final int TEST_AP_BANDWIDTH_FROM_IFACE_CALLBACK =
@@ -156,15 +149,12 @@
 
     private TestLooper mLooper;
     private TestAlarmManager mAlarmManager;
-    private SoftApInfo mTestSoftApInfo; // Use for single Ap mode test case
-    private SoftApInfo mTestSoftApInfoOnFirstInstance; // Use for briged Ap mode test case
-    private SoftApInfo mTestSoftApInfoOnSecondInstance; // Use for briged Ap mode test case
+    private SoftApInfo mTestSoftApInfo;
+    private SoftApInfo mTestSoftApInfoOnSecondInterface;
     private Map<String, SoftApInfo> mTestSoftApInfoMap = new HashMap<>();
     private Map<String, List<WifiClient>> mTestWifiClientsMap = new HashMap<>();
-    private Map<String, List<WifiClient>> mTempConnectedClientListMap = new HashMap<>() {{
-            put(TEST_INTERFACE_NAME, new ArrayList());
-            put(TEST_FIRST_INSTANCE_NAME, new ArrayList());
-            put(TEST_SECOND_INSTANCE_NAME, new ArrayList()); }};
+    private List<WifiClient> mCurrentConnectedTestedClientListOnTestInterface = new ArrayList();
+    private List<WifiClient> mCurrentConnectedTestedClientListOnSecondInterface = new ArrayList();
     private SoftApCapability mTestSoftApCapability;
     private List<ClientModeManager> mTestClientModeManagers = new ArrayList<>();
 
@@ -188,13 +178,12 @@
     @Mock ConcreteClientModeManager mConcreteClientModeManager;
     @Mock WifiInfo mPrimaryWifiInfo;
     @Mock WifiInfo mSecondWifiInfo;
-    @Mock BatteryManager mBatteryManager;
 
     final ArgumentCaptor<WifiNative.InterfaceCallback> mWifiNativeInterfaceCallbackCaptor =
             ArgumentCaptor.forClass(WifiNative.InterfaceCallback.class);
 
-    final ArgumentCaptor<WifiNative.SoftApHalCallback> mSoftApHalCallbackCaptor =
-            ArgumentCaptor.forClass(WifiNative.SoftApHalCallback.class);
+    final ArgumentCaptor<WifiNative.SoftApListener> mSoftApListenerCaptor =
+            ArgumentCaptor.forClass(WifiNative.SoftApListener.class);
 
     // CoexListener will only be captured if SdkLevel is at least S
     private final ArgumentCaptor<CoexManager.CoexListener> mCoexListenerCaptor =
@@ -203,20 +192,17 @@
     private final ArgumentCaptor<ClientModeImplListener> mCmiListenerCaptor =
             ArgumentCaptor.forClass(ClientModeImplListener.class);
 
-    private final ArgumentCaptor<BroadcastReceiver> mBroadcastReceiverCaptor =
-            ArgumentCaptor.forClass(BroadcastReceiver.class);
-
     SoftApManager mSoftApManager;
 
     /** Old callback event from wificond */
     private void mockChannelSwitchEvent(int frequency, int bandwidth) {
-        mSoftApHalCallbackCaptor.getValue().onInfoChanged(
+        mSoftApListenerCaptor.getValue().onInfoChanged(
                 TEST_INTERFACE_NAME, frequency, bandwidth, 0, null);
     }
 
     /** New callback event from hostapd */
     private void mockApInfoChangedEvent(SoftApInfo apInfo) {
-        mSoftApHalCallbackCaptor.getValue().onInfoChanged(
+        mSoftApListenerCaptor.getValue().onInfoChanged(
                 apInfo.getApInstanceIdentifier(), apInfo.getFrequency(), apInfo.getBandwidth(),
                 apInfo.getWifiStandardInternal(), apInfo.getBssidInternal());
         mTestSoftApInfoMap.put(apInfo.getApInstanceIdentifier(), apInfo);
@@ -225,11 +211,16 @@
 
     private void mockClientConnectedEvent(MacAddress mac, boolean isConnected,
             String apIfaceInstance, boolean updateTheTestMap) {
-        mSoftApHalCallbackCaptor.getValue().onConnectedClientsChanged(
+        mSoftApListenerCaptor.getValue().onConnectedClientsChanged(
                 apIfaceInstance, mac, isConnected);
         if (mac == null || !updateTheTestMap) return;
         WifiClient client = new WifiClient(mac, apIfaceInstance);
-        List<WifiClient> targetList = mTempConnectedClientListMap.get(apIfaceInstance);
+        List<WifiClient> targetList;
+        if (apIfaceInstance.equals(TEST_INTERFACE_NAME)) {
+            targetList = mCurrentConnectedTestedClientListOnTestInterface;
+        } else {
+            targetList = mCurrentConnectedTestedClientListOnSecondInterface;
+        }
         if (isConnected) {
             targetList.add(client);
         } else {
@@ -238,58 +229,17 @@
         mTestWifiClientsMap.put(apIfaceInstance, targetList);
     }
 
-    private void mockSoftApInfoUpdateAndVerifyAfterSapStarted(
-            boolean isBridged, boolean isNeedToVerifyTimerScheduled) {
-        reset(mCallback);
-        if (!isBridged) {
-            mockApInfoChangedEvent(mTestSoftApInfo);
-            mLooper.dispatchAll();
-            verify(mCallback).onConnectedClientsOrInfoChanged(
-                    mTestSoftApInfoMap, mTestWifiClientsMap, false);
-        } else {
-            // SoftApInfo updated
-            mockApInfoChangedEvent(mTestSoftApInfoOnFirstInstance);
-            mockApInfoChangedEvent(mTestSoftApInfoOnSecondInstance);
-            mLooper.dispatchAll();
-            verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(
-                    mTestSoftApInfoMap, mTestWifiClientsMap, true);
-        }
-
-        if (isNeedToVerifyTimerScheduled) {
-            // Verify timer is scheduled
-            verify(mAlarmManager.getAlarmManager(), isBridged ? times(2) : times(1)).setExact(
-                    anyInt(), anyLong(),
-                    eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG
-                            + TEST_INTERFACE_NAME),
-                    any(), any());
-            if (isBridged) {
-                // Verify the bridged mode timer is scheduled
-                verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
-                        eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG
-                                  + TEST_FIRST_INSTANCE_NAME),
-                        any(), any());
-                verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
-                        eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG
-                                  + TEST_SECOND_INSTANCE_NAME),
-                        any(), any());
-            }
-        }
-    }
-
-
     /** Sets up test. */
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
         mLooper = new TestLooper();
 
-        when(mWifiNative.isItPossibleToCreateBridgedApIface(any())).thenReturn(true);
         when(mWifiNative.isApSetMacAddressSupported(any())).thenReturn(true);
         when(mWifiNative.setApMacAddress(any(), any())).thenReturn(true);
         when(mWifiNative.startSoftAp(eq(TEST_INTERFACE_NAME), any(), anyBoolean(),
-                any(WifiNative.SoftApHalCallback.class))).thenReturn(true);
-        when(mWifiNative.setupInterfaceForSoftApMode(any(), any(), anyInt(), anyBoolean(),
-                any()))
+                any(WifiNative.SoftApListener.class))).thenReturn(true);
+        when(mWifiNative.setupInterfaceForSoftApMode(any(), any(), anyInt(), anyBoolean()))
                 .thenReturn(TEST_INTERFACE_NAME);
         when(mFrameworkFacade.getIntegerSetting(
                 mContext, Settings.Global.SOFT_AP_TIMEOUT_ENABLED, 1)).thenReturn(1);
@@ -331,22 +281,18 @@
         when(mConcreteClientModeManager.syncRequestConnectionInfo())
                 .thenReturn(mPrimaryWifiInfo);
         when(mWifiNative.forceClientDisconnect(any(), any(), anyInt())).thenReturn(true);
-
-        // Init Test SoftAp infos
         mTestSoftApInfo = new SoftApInfo();
         mTestSoftApInfo.setFrequency(TEST_AP_FREQUENCY);
         mTestSoftApInfo.setBandwidth(TEST_AP_BANDWIDTH_IN_SOFTAPINFO);
         mTestSoftApInfo.setBssid(TEST_INTERFACE_MAC_ADDRESS);
         mTestSoftApInfo.setApInstanceIdentifier(TEST_INTERFACE_NAME);
         mTestSoftApInfo.setAutoShutdownTimeoutMillis(TEST_DEFAULT_SHUTDOWN_TIMEOUT_MILLIS);
-        mTestSoftApInfoOnFirstInstance = new SoftApInfo(mTestSoftApInfo);
-        mTestSoftApInfoOnFirstInstance.setApInstanceIdentifier(TEST_FIRST_INSTANCE_NAME);
-        mTestSoftApInfoOnSecondInstance = new SoftApInfo();
-        mTestSoftApInfoOnSecondInstance.setFrequency(TEST_AP_FREQUENCY_5G);
-        mTestSoftApInfoOnSecondInstance.setBandwidth(TEST_AP_BANDWIDTH_IN_SOFTAPINFO);
-        mTestSoftApInfoOnSecondInstance.setBssid(TEST_SECOND_INTERFACE_MAC_ADDRESS);
-        mTestSoftApInfoOnSecondInstance.setApInstanceIdentifier(TEST_SECOND_INSTANCE_NAME);
-        mTestSoftApInfoOnSecondInstance.setAutoShutdownTimeoutMillis(
+        mTestSoftApInfoOnSecondInterface = new SoftApInfo();
+        mTestSoftApInfoOnSecondInterface.setFrequency(TEST_AP_FREQUENCY_5G);
+        mTestSoftApInfoOnSecondInterface.setBandwidth(TEST_AP_BANDWIDTH_IN_SOFTAPINFO);
+        mTestSoftApInfoOnSecondInterface.setBssid(TEST_SECOND_INTERFACE_MAC_ADDRESS);
+        mTestSoftApInfoOnSecondInterface.setApInstanceIdentifier(TEST_SECOND_INTERFACE_NAME);
+        mTestSoftApInfoOnSecondInterface.setAutoShutdownTimeoutMillis(
                 TEST_DEFAULT_SHUTDOWN_TIMEOUT_MILLIS);
         // Default set up all features support.
         long testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT
@@ -359,13 +305,13 @@
                 SoftApConfiguration.BAND_2GHZ, TEST_SUPPORTED_24G_CHANNELS);
         mTestSoftApCapability.setSupportedChannelList(
                 SoftApConfiguration.BAND_5GHZ, TEST_SUPPORTED_5G_CHANNELS);
-        mTestSoftApCapability.setCountryCode(TEST_COUNTRY_CODE);
         when(mWifiApConfigStore.getApConfiguration()).thenReturn(mDefaultApConfig);
         when(mWifiNative.isHalStarted()).thenReturn(true);
 
         mTestSoftApInfoMap.clear();
         mTestWifiClientsMap.clear();
-        mTempConnectedClientListMap.forEach((key, value) -> value.clear());
+        mCurrentConnectedTestedClientListOnTestInterface.clear();
+        mCurrentConnectedTestedClientListOnSecondInterface.clear();
     }
 
     private SoftApConfiguration createDefaultApConfig() {
@@ -382,7 +328,6 @@
                 mFrameworkFacade,
                 mWifiNative,
                 mCoexManager,
-                mBatteryManager,
                 countryCode,
                 mListener,
                 mCallback,
@@ -469,8 +414,8 @@
                 WifiManager.SAP_START_FAILURE_GENERAL);
         verify(mListener).onStartFailure(mSoftApManager);
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(mContext).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        verify(mContext).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
 
         List<Intent> capturedIntents = intentCaptor.getAllValues();
         checkApStateChangedBroadcast(capturedIntents.get(0), WIFI_AP_STATE_FAILED,
@@ -486,7 +431,7 @@
     public void testSetupForSoftApModeNullApInterfaceNameFailureIncrementsMetrics()
             throws Exception {
         when(mWifiNative.setupInterfaceForSoftApMode(
-                    any(), any(), anyInt(), anyBoolean(), any())).thenReturn(null);
+                    any(), any(), anyInt(), anyBoolean())).thenReturn(null);
         when(mWifiApConfigStore.getApConfiguration()).thenReturn(null);
         SoftApModeConfiguration nullApConfig =
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
@@ -496,8 +441,8 @@
                 WifiManager.SAP_START_FAILURE_GENERAL);
         verify(mListener).onStartFailure(mSoftApManager);
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(mContext).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        verify(mContext).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
 
         checkApStateChangedBroadcast(intentCaptor.getValue(), WIFI_AP_STATE_FAILED,
                 WIFI_AP_STATE_DISABLED, WifiManager.SAP_START_FAILURE_GENERAL, null,
@@ -515,7 +460,7 @@
     public void testSetupForSoftApModeEmptyInterfaceNameFailureIncrementsMetrics()
             throws Exception {
         when(mWifiNative.setupInterfaceForSoftApMode(
-                    any(), any(), anyInt(), anyBoolean(), any())).thenReturn("");
+                    any(), any(), anyInt(), anyBoolean())).thenReturn("");
         SoftApModeConfiguration nullApConfig =
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
@@ -524,8 +469,8 @@
                 WifiManager.SAP_START_FAILURE_GENERAL);
         verify(mListener).onStartFailure(mSoftApManager);
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(mContext).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        verify(mContext).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
 
         checkApStateChangedBroadcast(intentCaptor.getValue(), WIFI_AP_STATE_FAILED,
                 WIFI_AP_STATE_DISABLED, WifiManager.SAP_START_FAILURE_GENERAL, "",
@@ -553,39 +498,8 @@
         verify(mWifiNative, never()).setApCountryCode(eq(TEST_INTERFACE_NAME), any());
 
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(mContext, times(2)).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
-
-        List<Intent> capturedIntents = intentCaptor.getAllValues();
-        checkApStateChangedBroadcast(capturedIntents.get(0), WIFI_AP_STATE_ENABLING,
-                WIFI_AP_STATE_DISABLED, HOTSPOT_NO_ERROR, TEST_INTERFACE_NAME,
-                softApConfig.getTargetMode());
-        checkApStateChangedBroadcast(capturedIntents.get(1), WIFI_AP_STATE_FAILED,
-                WIFI_AP_STATE_ENABLING, WifiManager.SAP_START_FAILURE_GENERAL, TEST_INTERFACE_NAME,
-                softApConfig.getTargetMode());
-    }
-
-    /**
-     * Tests that the generic error is propagated and properly reported when starting softap and no
-     * country code is provided.
-     */
-    @Test
-    public void startSoftApOn6GhzFailGeneralErrorForNoCountryCode() throws Exception {
-        Builder configBuilder = new SoftApConfiguration.Builder();
-        configBuilder.setBand(SoftApConfiguration.BAND_6GHZ);
-        configBuilder.setSsid(TEST_SSID);
-        configBuilder.setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        SoftApModeConfiguration softApConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
-                mTestSoftApCapability);
-
-        mSoftApManager = createSoftApManager(softApConfig, null, ROLE_SOFTAP_TETHERED);
-
-        verify(mWifiNative, never()).setApCountryCode(eq(TEST_INTERFACE_NAME), any());
-
-        ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(mContext, times(2)).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        verify(mContext, times(2)).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
 
         List<Intent> capturedIntents = intentCaptor.getAllValues();
         checkApStateChangedBroadcast(capturedIntents.get(0), WIFI_AP_STATE_ENABLING,
@@ -613,41 +527,6 @@
                 TEST_INTERFACE_NAME, TEST_COUNTRY_CODE.toUpperCase(Locale.ROOT)))
                 .thenReturn(false);
 
-        mSoftApManager = createSoftApManager(softApConfig, TEST_COUNTRY_CODE, ROLE_SOFTAP_TETHERED);
-
-        verify(mWifiNative).setApCountryCode(
-                TEST_INTERFACE_NAME, TEST_COUNTRY_CODE.toUpperCase(Locale.ROOT));
-
-        ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(mContext, times(2)).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
-
-        List<Intent> capturedIntents = intentCaptor.getAllValues();
-        checkApStateChangedBroadcast(capturedIntents.get(0), WIFI_AP_STATE_ENABLING,
-                WIFI_AP_STATE_DISABLED, HOTSPOT_NO_ERROR, TEST_INTERFACE_NAME,
-                softApConfig.getTargetMode());
-        checkApStateChangedBroadcast(capturedIntents.get(1), WIFI_AP_STATE_FAILED,
-                WIFI_AP_STATE_ENABLING, WifiManager.SAP_START_FAILURE_GENERAL, TEST_INTERFACE_NAME,
-                softApConfig.getTargetMode());
-    }
-
-    /**
-     * Tests that the generic error is propagated and properly reported when starting softap and the
-     * country code cannot be set.
-     */
-    @Test
-    public void startSoftApOn6GhzFailGeneralErrorForCountryCodeSetFailure() throws Exception {
-        Builder configBuilder = new SoftApConfiguration.Builder();
-        configBuilder.setBand(SoftApConfiguration.BAND_6GHZ);
-        configBuilder.setSsid(TEST_SSID);
-        configBuilder.setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        SoftApModeConfiguration softApConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
-                mTestSoftApCapability);
-
-        when(mWifiNative.setApCountryCode(
-                TEST_INTERFACE_NAME, TEST_COUNTRY_CODE.toUpperCase(Locale.ROOT)))
-                .thenReturn(false);
 
         mSoftApManager = createSoftApManager(softApConfig, TEST_COUNTRY_CODE, ROLE_SOFTAP_TETHERED);
 
@@ -655,8 +534,8 @@
                 TEST_INTERFACE_NAME, TEST_COUNTRY_CODE.toUpperCase(Locale.ROOT));
 
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(mContext, times(2)).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        verify(mContext, times(2)).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
 
         List<Intent> capturedIntents = intentCaptor.getAllValues();
         checkApStateChangedBroadcast(capturedIntents.get(0), WIFI_AP_STATE_ENABLING,
@@ -693,7 +572,6 @@
         Builder configBuilder = new SoftApConfiguration.Builder();
         configBuilder.setBand(mBand256G);
         configBuilder.setSsid(TEST_SSID);
-        configBuilder.setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
         SoftApModeConfiguration softApConfig = new SoftApModeConfiguration(
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
                 mTestSoftApCapability);
@@ -731,7 +609,6 @@
         Builder configBuilder = new SoftApConfiguration.Builder();
         configBuilder.setBand(mBand256G);
         configBuilder.setSsid(TEST_SSID);
-        configBuilder.setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
         SoftApModeConfiguration softApConfig = new SoftApModeConfiguration(
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
                 mTestSoftApCapability);
@@ -763,8 +640,8 @@
         mSoftApManager = createSoftApManager(softApConfig, TEST_COUNTRY_CODE, ROLE_SOFTAP_TETHERED);
 
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(mContext, times(2)).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        verify(mContext, times(2)).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
 
         List<Intent> capturedIntents = intentCaptor.getAllValues();
         checkApStateChangedBroadcast(capturedIntents.get(0), WIFI_AP_STATE_ENABLING,
@@ -781,7 +658,7 @@
     @Test
     public void startSoftApApInterfaceFailedToStart() throws Exception {
         when(mWifiNative.startSoftAp(eq(TEST_INTERFACE_NAME), any(), anyBoolean(),
-                any(WifiNative.SoftApHalCallback.class))).thenReturn(false);
+                any(WifiNative.SoftApListener.class))).thenReturn(false);
 
         SoftApModeConfiguration softApModeConfig =
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, mDefaultApConfig,
@@ -816,8 +693,8 @@
 
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
         order.verify(mCallback).onStateChanged(WifiManager.WIFI_AP_STATE_DISABLING, 0);
-        order.verify(mContext).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        order.verify(mContext).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
         checkApStateChangedBroadcast(intentCaptor.getValue(), WIFI_AP_STATE_DISABLING,
                 WIFI_AP_STATE_ENABLED, HOTSPOT_NO_ERROR, TEST_INTERFACE_NAME,
                 softApModeConfig.getTargetMode());
@@ -825,8 +702,8 @@
         order.verify(mCallback).onStateChanged(WifiManager.WIFI_AP_STATE_DISABLED, 0);
         verify(mSarManager).setSapWifiState(WifiManager.WIFI_AP_STATE_DISABLED);
         verify(mWifiDiagnostics).stopLogging(TEST_INTERFACE_NAME);
-        order.verify(mContext).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        order.verify(mContext).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
         checkApStateChangedBroadcast(intentCaptor.getValue(), WIFI_AP_STATE_DISABLED,
                 WIFI_AP_STATE_DISABLING, HOTSPOT_NO_ERROR, TEST_INTERFACE_NAME,
                 softApModeConfig.getTargetMode());
@@ -853,15 +730,15 @@
         mLooper.dispatchAll();
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
         order.verify(mCallback).onStateChanged(WifiManager.WIFI_AP_STATE_DISABLING, 0);
-        order.verify(mContext).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        order.verify(mContext).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
         checkApStateChangedBroadcast(intentCaptor.getValue(), WIFI_AP_STATE_DISABLING,
                 WIFI_AP_STATE_ENABLED, HOTSPOT_NO_ERROR, TEST_INTERFACE_NAME,
                 softApModeConfig.getTargetMode());
 
         order.verify(mCallback).onStateChanged(WifiManager.WIFI_AP_STATE_DISABLED, 0);
-        order.verify(mContext).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        order.verify(mContext).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
         checkApStateChangedBroadcast(intentCaptor.getValue(), WIFI_AP_STATE_DISABLED,
                 WIFI_AP_STATE_DISABLING, HOTSPOT_NO_ERROR, TEST_INTERFACE_NAME,
                 softApModeConfig.getTargetMode());
@@ -917,8 +794,8 @@
                 WifiManager.SAP_START_FAILURE_GENERAL);
         order.verify(mListener).onStopped(mSoftApManager);
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(mContext, times(3)).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        verify(mContext, times(3)).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
 
         List<Intent> capturedIntents = intentCaptor.getAllValues();
         checkApStateChangedBroadcast(capturedIntents.get(0), WIFI_AP_STATE_FAILED,
@@ -966,15 +843,15 @@
         reset(mContext, mCallback, mWifiNative);
 
         InOrder order = inOrder(mCallback, mListener, mContext);
-        mSoftApHalCallbackCaptor.getValue().onFailure();
+        mSoftApListenerCaptor.getValue().onFailure();
         mLooper.dispatchAll();
 
         order.verify(mCallback).onStateChanged(WifiManager.WIFI_AP_STATE_FAILED,
                 WifiManager.SAP_START_FAILURE_GENERAL);
         order.verify(mListener).onStopped(mSoftApManager);
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(mContext, times(3)).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        verify(mContext, times(3)).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
 
         List<Intent> capturedIntents = intentCaptor.getAllValues();
         checkApStateChangedBroadcast(capturedIntents.get(0), WIFI_AP_STATE_FAILED,
@@ -988,51 +865,15 @@
                 softApModeConfig.getTargetMode());
     }
 
-    /**
-     * Verify that onInstanceFailure from hostapd is handled by SoftApManager .
-     */
-    @Test
-    public void testHostapdOnInstanceFailureHandled() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        assumeTrue(SdkLevel.isAtLeastS());
-        SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, generateBridgedModeSoftApConfig(null),
-                mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig);
-        reset(mCallback);
-        // SoftApInfo updated
-        mockApInfoChangedEvent(mTestSoftApInfo);
-        mLooper.dispatchAll();
-        verify(mCallback).onConnectedClientsOrInfoChanged(
-                mTestSoftApInfoMap, mTestWifiClientsMap, true);
-        mockApInfoChangedEvent(mTestSoftApInfoOnSecondInstance);
-        mLooper.dispatchAll();
-        verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(
-                mTestSoftApInfoMap, mTestWifiClientsMap, true);
-
-        // Trigger onInstanceFailure
-        mSoftApHalCallbackCaptor.getValue().onInstanceFailure(TEST_SECOND_INSTANCE_NAME);
-        mLooper.dispatchAll();
-        // Verify the remove correct iface and instance
-        verify(mWifiNative).removeIfaceInstanceFromBridgedApIface(eq(TEST_INTERFACE_NAME),
-                eq(TEST_SECOND_INSTANCE_NAME));
-        mLooper.dispatchAll();
-        mTestSoftApInfoMap.clear();
-        mTestWifiClientsMap.clear();
-        mTestSoftApInfoMap.put(mTestSoftApInfo.getApInstanceIdentifier(), mTestSoftApInfo);
-        mTestWifiClientsMap.put(mTestSoftApInfo.getApInstanceIdentifier(),
-                new ArrayList<WifiClient>());
-        verify(mCallback, times(3)).onConnectedClientsOrInfoChanged(
-                mTestSoftApInfoMap, mTestWifiClientsMap, true);
-    }
-
     @Test
     public void updatesMetricsOnChannelSwitchedEvent() throws Exception {
         SoftApModeConfiguration apConfig =
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
 
         verify(mWifiMetrics).addSoftApChannelSwitchedEvent(
                 new ArrayList<>(mTestSoftApInfoMap.values()),
@@ -1053,7 +894,6 @@
         SoftApInfo testSoftApInfo = new SoftApInfo(mTestSoftApInfo);
         testSoftApInfo.setFrequency(5220);
         testSoftApInfo.setBandwidth(SoftApInfo.CHANNEL_WIDTH_20MHZ_NOHT);
-
         mockApInfoChangedEvent(testSoftApInfo);
         mLooper.dispatchAll();
 
@@ -1074,8 +914,8 @@
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
 
         verify(mWifiMetrics).addSoftApChannelSwitchedEvent(
                 new ArrayList<>(mTestSoftApInfoMap.values()),
@@ -1089,14 +929,13 @@
         SoftApConfiguration config = createDefaultApConfig();
         Builder configBuilder = new SoftApConfiguration.Builder(config);
         configBuilder.setBand(mBand256G);
-        configBuilder.setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
 
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
 
         verify(mWifiMetrics).addSoftApChannelSwitchedEvent(
                 new ArrayList<>(mTestSoftApInfoMap.values()),
@@ -1114,8 +953,12 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
 
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, false);
 
         verify(mWifiMetrics).addSoftApChannelSwitchedEvent(
                 new ArrayList<>(mTestSoftApInfoMap.values()),
@@ -1132,9 +975,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
-
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, false);
         verify(mWifiMetrics).addSoftApChannelSwitchedEvent(
                 new ArrayList<>(mTestSoftApInfoMap.values()),
                 apConfig.getTargetMode(), false);
@@ -1175,7 +1020,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, false);
         order.verify(mWifiMetrics).addSoftApChannelSwitchedEvent(
                 new ArrayList<>(mTestSoftApInfoMap.values()),
                 apConfig.getTargetMode(), false);
@@ -1197,7 +1046,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         reset(mCallback);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
@@ -1219,7 +1072,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, false);
 
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
@@ -1256,7 +1113,10 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                         mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        order.verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
         order.verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
@@ -1277,7 +1137,6 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
         reset(mCallback);
         /* Invalid values should be ignored */
         mockClientConnectedEvent(null, true, TEST_INTERFACE_NAME, false);
@@ -1295,12 +1154,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
-
-        // Get timer for verification
-        WakeupMessage timerOnTestInterface =
-                mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME);
-
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        order.verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
         order.verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
@@ -1308,7 +1166,7 @@
         order.verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(1, 1,
                 apConfig.getTargetMode(), mTestSoftApInfo);
         // Verify timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(eq(timerOnTestInterface));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
 
         mSoftApManager.stop();
         mLooper.dispatchAll();
@@ -1319,7 +1177,7 @@
         order.verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
                   mTestWifiClientsMap, false);
         // Verify timer is canceled after stop softap
-        verify(mAlarmManager.getAlarmManager()).cancel(eq(timerOnTestInterface));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
     }
 
     @Test
@@ -1338,8 +1196,8 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED,
                 configBuilder.build(), mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
-        reset(mCallback);
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, false);
         mLooper.dispatchAll();
 
@@ -1367,7 +1225,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED,
                 configBuilder.build(), mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
 
@@ -1409,7 +1271,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED,
                 configBuilder.build(), mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, false);
         reset(mCallback);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, false);
         mLooper.dispatchAll();
@@ -1438,8 +1304,12 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED,
                 configBuilder.build(), mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
         reset(mWifiMetrics);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         reset(mCallback);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, false);
         mLooper.dispatchAll();
@@ -1488,7 +1358,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED,
                 configBuilder.build(), mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         reset(mWifiMetrics);
         reset(mCallback);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, false);
@@ -1544,7 +1418,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED,
                 configBuilder.build(), mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
         verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
@@ -1553,8 +1431,7 @@
         verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(1, 1,
                 apConfig.getTargetMode(), mTestSoftApInfo);
         // Verify timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
 
         // Second client connect and max client set is 1.
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, true, TEST_INTERFACE_NAME, true);
@@ -1597,14 +1474,14 @@
                 .getInteger(R.integer
                 .config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond);
 
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+
+        // Verify timer is scheduled
+        verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
 
         // The single AP should not start the bridged mode timer
         verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_FIRST_INSTANCE_NAME),
-                any(), any());
-        verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_SECOND_INSTANCE_NAME),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_IDLE_IN_BRIDGED_MODE_TIMEOUT_TAG),
                 any(), any());
     }
 
@@ -1620,17 +1497,18 @@
         startSoftApAndVerifyEnabled(apConfig);
 
         reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+
         SoftApInfo expectedInfo = new SoftApInfo(mTestSoftApInfo);
         expectedInfo.setAutoShutdownTimeoutMillis(50000);
-        mockApInfoChangedEvent(expectedInfo);
-        mLooper.dispatchAll();
+        mTestSoftApInfoMap.put(TEST_INTERFACE_NAME, expectedInfo);
         verify(mCallback).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, false);
 
         // Verify timer is scheduled
         verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_INTERFACE_NAME),
-                any(), any());
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
     }
 
     @Test
@@ -1639,16 +1517,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
-
-        WakeupMessage timerOnTestInterface =
-                mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME);
-
         mSoftApManager.stop();
         mLooper.dispatchAll();
 
         // Verify timer is canceled
-        verify(mAlarmManager.getAlarmManager()).cancel(eq(timerOnTestInterface));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
     }
 
     @Test
@@ -1657,15 +1530,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
-
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
 
         // Verify timer is canceled
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
     }
 
     @Test
@@ -1675,21 +1544,19 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        order.verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
         order.verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
                   mTestWifiClientsMap, false);
         // Verify timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, false, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
         // Verify timer is scheduled again
         verify(mAlarmManager.getAlarmManager(), times(2)).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_INTERFACE_NAME),
-                any(), any());
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
     }
 
     @Test
@@ -1698,13 +1565,9 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
-
         doNothing().when(mFakeSoftApNotifier)
                 .showSoftApShutdownTimeoutExpiredNotification();
-        mAlarmManager.dispatch(
-                mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_INTERFACE_NAME);
+        mAlarmManager.dispatch(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG);
         mLooper.dispatchAll();
 
         verify(mWifiNative).teardownInterface(TEST_INTERFACE_NAME);
@@ -1718,8 +1581,6 @@
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
 
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
-
         SoftApConfiguration newConfig = new SoftApConfiguration.Builder(mDefaultApConfig)
                 .setAutoShutdownEnabled(false)
                 .build();
@@ -1727,8 +1588,7 @@
         mLooper.dispatchAll();
 
         // Verify timer is canceled
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
     }
 
     @Test
@@ -1742,20 +1602,6 @@
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
 
-        reset(mCallback);
-        SoftApInfo expectedInfo = new SoftApInfo(mTestSoftApInfo);
-        // the timeout is 0 when shutdown is disable
-        expectedInfo.setAutoShutdownTimeoutMillis(0);
-        mTestSoftApInfoMap.put(TEST_INTERFACE_NAME, expectedInfo);
-        mockApInfoChangedEvent(expectedInfo);
-        mLooper.dispatchAll();
-        verify(mCallback).onConnectedClientsOrInfoChanged(
-                mTestSoftApInfoMap, mTestWifiClientsMap, false);
-
-        // Verify timer is not scheduled
-        verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
-                any(), any(), any());
-
         SoftApConfiguration newConfig = new SoftApConfiguration.Builder(mDefaultApConfig)
                 .setAutoShutdownEnabled(true)
                 .build();
@@ -1764,8 +1610,7 @@
 
         // Verify timer is scheduled
         verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_INTERFACE_NAME),
-                any(), any());
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
     }
 
     @Test
@@ -1778,16 +1623,10 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        reset(mCallback);
-        SoftApInfo expectedInfo = new SoftApInfo(mTestSoftApInfo);
-        expectedInfo.setAutoShutdownTimeoutMillis(0);
-        mockApInfoChangedEvent(expectedInfo);
-        mLooper.dispatchAll();
-        verify(mCallback).onConnectedClientsOrInfoChanged(
-                mTestSoftApInfoMap, mTestWifiClientsMap, false);
+
         // Verify timer is not scheduled
-        verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(), any(),
-                any(), any());
+        verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
     }
 
     @Test
@@ -1801,15 +1640,6 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-
-        reset(mCallback);
-        SoftApInfo expectedInfo = new SoftApInfo(mTestSoftApInfo);
-        expectedInfo.setAutoShutdownTimeoutMillis(0);
-        mockApInfoChangedEvent(expectedInfo);
-        mLooper.dispatchAll();
-        verify(mCallback).onConnectedClientsOrInfoChanged(
-                mTestSoftApInfoMap, mTestWifiClientsMap, false);
-
         // add client
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
@@ -1818,8 +1648,7 @@
         mLooper.dispatchAll();
         // Verify timer is not scheduled
         verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_INTERFACE_NAME),
-                any(), any());
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
     }
 
     @Test
@@ -1863,9 +1692,6 @@
         configBuilder.setBand(SoftApConfiguration.BAND_2GHZ);
         configBuilder.setSsid(TEST_SSID);
         configBuilder.setBssid(TEST_CLIENT_MAC_ADDRESS);
-        if (SdkLevel.isAtLeastS()) {
-            configBuilder.setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE);
-        }
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
                 IFACE_IP_MODE_LOCAL_ONLY, configBuilder.build(), mTestSoftApCapability);
         ArgumentCaptor<MacAddress> mac = ArgumentCaptor.forClass(MacAddress.class);
@@ -1883,9 +1709,6 @@
         configBuilder.setBand(SoftApConfiguration.BAND_2GHZ);
         configBuilder.setSsid(TEST_SSID);
         configBuilder.setBssid(TEST_CLIENT_MAC_ADDRESS);
-        if (SdkLevel.isAtLeastS()) {
-            configBuilder.setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE);
-        }
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
                 IFACE_IP_MODE_LOCAL_ONLY, configBuilder.build(), mTestSoftApCapability);
         ArgumentCaptor<MacAddress> mac = ArgumentCaptor.forClass(MacAddress.class);
@@ -1904,9 +1727,6 @@
         configBuilder.setBand(SoftApConfiguration.BAND_2GHZ);
         configBuilder.setSsid(TEST_SSID);
         configBuilder.setBssid(TEST_CLIENT_MAC_ADDRESS);
-        if (SdkLevel.isAtLeastS()) {
-            configBuilder.setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE);
-        }
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
                 IFACE_IP_MODE_LOCAL_ONLY, configBuilder.build(), mTestSoftApCapability);
         ArgumentCaptor<MacAddress> mac = ArgumentCaptor.forClass(MacAddress.class);
@@ -1922,14 +1742,9 @@
 
     @Test
     public void setMacFailureWhenRandomMac() throws Exception {
-        SoftApConfiguration.Builder randomizedBssidConfigBuilder =
+        SoftApConfiguration randomizedBssidConfig =
                 new SoftApConfiguration.Builder(mDefaultApConfig)
-                .setBssid(TEST_CLIENT_MAC_ADDRESS);
-        if (SdkLevel.isAtLeastS()) {
-            randomizedBssidConfigBuilder.setMacRandomizationSetting(
-                    SoftApConfiguration.RANDOMIZATION_NONE);
-        }
-        SoftApConfiguration randomizedBssidConfig = randomizedBssidConfigBuilder.build();
+                .setBssid(TEST_CLIENT_MAC_ADDRESS).build();
         when(mWifiApConfigStore.randomizeBssidIfUnset(any(), any())).thenReturn(
                 randomizedBssidConfig);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
@@ -1959,7 +1774,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
         verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
@@ -1968,8 +1787,7 @@
         verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(1, 1,
                 apConfig.getTargetMode(), mTestSoftApInfo);
         // Verify timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
 
         reset(mWifiMetrics);
         // Second client connect and max client set is 1.
@@ -1994,7 +1812,9 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
         verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
                   mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
@@ -2006,8 +1826,7 @@
         verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(1, 1,
                 apConfig.getTargetMode(), mTestSoftApInfo);
         // Verify timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
 
         // Second client connect and max client set is 1.
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, true, TEST_INTERFACE_NAME, true);
@@ -2026,14 +1845,45 @@
                         any(), any(), anyInt());
     }
 
-    private SoftApConfiguration generateBridgedModeSoftApConfig(SoftApConfiguration config)
-            throws Exception {
-        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ ,
-                SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ};
-        Builder configBuilder = new SoftApConfiguration.Builder(
-                config != null ? config : mDefaultApConfig);
-        configBuilder.setBands(dual_bands);
-        return configBuilder.build();
+    @Test
+    public void testCapabilityChangeNotApplyForLohsMode() throws Exception {
+        mTestSoftApCapability.setMaxSupportedClients(2);
+        SoftApModeConfiguration apConfig =
+                new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_LOCAL_ONLY, null,
+                mTestSoftApCapability);
+        startSoftApAndVerifyEnabled(apConfig);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
+        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
+        mLooper.dispatchAll();
+
+        verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
+
+        verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(1, 1,
+                apConfig.getTargetMode(), mTestSoftApInfo);
+        // Verify timer is canceled at this point
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
+
+        // Second client connect and max client set is 1.
+        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, true, TEST_INTERFACE_NAME, true);
+        mLooper.dispatchAll();
+
+        verify(mCallback, times(3)).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
+        verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(2, 2,
+                apConfig.getTargetMode(), mTestSoftApInfo);
+
+        // Trigger Capability Change
+        mTestSoftApCapability.setMaxSupportedClients(1);
+        mSoftApManager.updateCapability(mTestSoftApCapability);
+        mLooper.dispatchAll();
+        // Verify Disconnect will NOT trigger even capability changed
+        verify(mWifiNative, never()).forceClientDisconnect(
+                        any(), any(), anyInt());
     }
 
     /** Starts soft AP and verifies that it is enabled successfully. */
@@ -2060,14 +1910,9 @@
         if (expectedConfig == null) {
             if (config == null) {
                 // Only generate randomized mac for default config since test case doesn't care it.
-                SoftApConfiguration.Builder randomizedBssidConfigBuilder =
+                randomizedBssidConfig =
                         new SoftApConfiguration.Builder(mDefaultApConfig)
-                        .setBssid(TEST_INTERFACE_MAC_ADDRESS);
-                if (SdkLevel.isAtLeastS()) {
-                    randomizedBssidConfigBuilder.setMacRandomizationSetting(
-                            SoftApConfiguration.RANDOMIZATION_NONE);
-                }
-                randomizedBssidConfig = randomizedBssidConfigBuilder.build();
+                        .setBssid(TEST_INTERFACE_MAC_ADDRESS).build();
                 when(mWifiApConfigStore.randomizeBssidIfUnset(any(), any())).thenReturn(
                         randomizedBssidConfig);
                 expectedConfig = new SoftApConfiguration.Builder(randomizedBssidConfig)
@@ -2101,15 +1946,14 @@
         verify(mFakeSoftApNotifier).dismissSoftApShutdownTimeoutExpiredNotification();
         order.verify(mWifiNative).setupInterfaceForSoftApMode(
                 mWifiNativeInterfaceCallbackCaptor.capture(), eq(TEST_WORKSOURCE),
-                eq(expectedConfig.getBand()), eq(expectedConfig.getBands().length > 1),
-                eq(mSoftApManager));
+                eq(expectedConfig.getBand()), eq(expectedConfig.getBands().length > 1));
         ArgumentCaptor<SoftApConfiguration> configCaptor =
                 ArgumentCaptor.forClass(SoftApConfiguration.class);
         order.verify(mCallback).onStateChanged(WifiManager.WIFI_AP_STATE_ENABLING, 0);
         order.verify(mWifiNative).startSoftAp(eq(TEST_INTERFACE_NAME),
                 configCaptor.capture(),
                 eq(softApConfig.getTargetMode() ==  WifiManager.IFACE_IP_MODE_TETHERED),
-                mSoftApHalCallbackCaptor.capture());
+                mSoftApListenerCaptor.capture());
         assertThat(configCaptor.getValue()).isEqualTo(expectedConfigWithFrameworkACS != null
                 ? expectedConfigWithFrameworkACS : expectedConfig);
         mWifiNativeInterfaceCallbackCaptor.getValue().onUp(TEST_INTERFACE_NAME);
@@ -2119,8 +1963,8 @@
                   eq(mTestWifiClientsMap), eq(expectedConfig.getBands().length > 1));
         verify(mSarManager).setSapWifiState(WifiManager.WIFI_AP_STATE_ENABLED);
         verify(mWifiDiagnostics).startLogging(TEST_INTERFACE_NAME);
-        verify(mContext, times(2)).sendBroadcastAsUser(intentCaptor.capture(),
-                eq(UserHandle.ALL), eq(android.Manifest.permission.ACCESS_WIFI_STATE));
+        verify(mContext, times(2)).sendStickyBroadcastAsUser(intentCaptor.capture(),
+                eq(UserHandle.ALL));
         List<Intent> capturedIntents = intentCaptor.getAllValues();
         checkApStateChangedBroadcast(capturedIntents.get(0), WIFI_AP_STATE_ENABLING,
                 WIFI_AP_STATE_DISABLED, HOTSPOT_NO_ERROR, TEST_INTERFACE_NAME,
@@ -2167,7 +2011,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 noClientControlCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
 
@@ -2177,8 +2025,7 @@
         verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(1, 1,
                 apConfig.getTargetMode(), mTestSoftApInfo);
         // Verify timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
 
         // Second client connect and max client set is 1.
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, true, TEST_INTERFACE_NAME, true);
@@ -2240,12 +2087,15 @@
         assumeTrue(SdkLevel.isAtLeastS());
         long testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT
                 | SoftApCapability.SOFTAP_FEATURE_WPA3_SAE;
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ, SoftApConfiguration.BAND_5GHZ};
         SoftApCapability testCapability = new SoftApCapability(testSoftApFeature);
         testCapability.setSupportedChannelList(
                 SoftApConfiguration.BAND_2GHZ, TEST_SUPPORTED_24G_CHANNELS);
         testCapability.setSupportedChannelList(
                 SoftApConfiguration.BAND_5GHZ, TEST_SUPPORTED_5G_CHANNELS);
-        SoftApConfiguration softApConfig = generateBridgedModeSoftApConfig(null);
+        SoftApConfiguration softApConfig = new SoftApConfiguration.Builder(mDefaultApConfig)
+                .setBands(dual_bands)
+                .build();
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
                 WifiManager.IFACE_IP_MODE_TETHERED, softApConfig,
                 testCapability);
@@ -2294,12 +2144,19 @@
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(), mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
 
+        // Verify timer is scheduled
+        verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
         verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
                   mTestWifiClientsMap, false);
         verify(mWifiMetrics).updateSoftApConfiguration(configBuilder.build(),
                 WifiManager.IFACE_IP_MODE_TETHERED, false);
 
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
 
         reset(mCallback);
         // Trigger Configuration Change
@@ -2313,12 +2170,10 @@
         verify(mCallback).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, false);
         // Verify timer is canceled at this point since timeout changed
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
         // Verify timer setup again
         verify(mAlarmManager.getAlarmManager(), times(2)).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_INTERFACE_NAME),
-                any(), any());
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
         verify(mWifiMetrics).updateSoftApConfiguration(configBuilder.build(),
                 WifiManager.IFACE_IP_MODE_TETHERED, false);
     }
@@ -2333,7 +2188,11 @@
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(), mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
 
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        // Verify timer is scheduled
+        verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
+
+        mLooper.dispatchAll();
 
         // Trigger Configuration Change
         configBuilder.setShutdownTimeoutMillis(500000);
@@ -2342,7 +2201,7 @@
         mLooper.dispatchAll();
         // Verify timer cancel will not apply since changed config need to apply via restart.
         verify(mAlarmManager.getAlarmManager(), never()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+                eq(mSoftApManager.mSoftApTimeoutMessage));
     }
 
     @Test
@@ -2355,7 +2214,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED,
                 configBuilder.build(), mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
 
@@ -2365,8 +2228,7 @@
         verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(1, 1,
                 apConfig.getTargetMode(), mTestSoftApInfo);
         // Verify timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
 
         // Second client connect and max client set is 2.
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, true, TEST_INTERFACE_NAME, true);
@@ -2396,18 +2258,22 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED,
                 configBuilder.build(), mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
 
+
         verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
                   mTestWifiClientsMap, false);
 
         verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(1, 1,
                 apConfig.getTargetMode(), mTestSoftApInfo);
         // Verify timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
 
         // Second client connect and max client set is 1.
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, true, TEST_INTERFACE_NAME, false);
@@ -2452,13 +2318,8 @@
     @Test
     public void testBssidUpdatedWhenSoftApInfoUpdate() throws Exception {
         MacAddress testBssid = MacAddress.fromString("aa:bb:cc:11:22:33");
-        SoftApConfiguration.Builder customizedBssidConfigBuilder = new SoftApConfiguration
-                .Builder(mDefaultApConfig).setBssid(testBssid);
-        if (SdkLevel.isAtLeastS()) {
-            customizedBssidConfigBuilder.setMacRandomizationSetting(
-                    SoftApConfiguration.RANDOMIZATION_NONE);
-        }
-        SoftApConfiguration customizedBssidConfig = customizedBssidConfigBuilder.build();
+        SoftApConfiguration customizedBssidConfig = new SoftApConfiguration
+                .Builder(mDefaultApConfig).setBssid(testBssid).build();
         when(mWifiNative.setApMacAddress(eq(TEST_INTERFACE_NAME), eq(testBssid))).thenReturn(true);
         mTestSoftApInfo.setBssid(testBssid);
         InOrder order = inOrder(mCallback, mWifiMetrics);
@@ -2466,7 +2327,10 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED,
                 customizedBssidConfig, mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        order.verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, false);
         order.verify(mWifiMetrics).addSoftApChannelSwitchedEvent(
                 new ArrayList<>(mTestSoftApInfoMap.values()),
                 apConfig.getTargetMode(), false);
@@ -2519,7 +2383,12 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(mTestSoftApInfoMap,
+                  mTestWifiClientsMap, false);
+
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
 
@@ -2529,8 +2398,7 @@
         verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(1, 1,
                 apConfig.getTargetMode(), mTestSoftApInfo);
         // Verify timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
 
         reset(mWifiMetrics);
         // Second client connect and max client set is 1.
@@ -2566,7 +2434,11 @@
                 new SoftApModeConfiguration(WifiManager.IFACE_IP_MODE_TETHERED, null,
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(false, true);
+        reset(mCallback);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, false);
         reset(mCallback);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
@@ -2577,8 +2449,7 @@
         verify(mWifiMetrics).addSoftApNumAssociatedStationsChangedEvent(1, 1,
                 apConfig.getTargetMode(), mTestSoftApInfo);
         // Verify timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
 
         reset(mWifiMetrics);
         // Second client connect and max client set is 1.
@@ -2605,13 +2476,18 @@
     @Test
     public void testSetupDualBandForSoftApModeApInterfaceName() throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
+        int[] dual_bands = new int[] {
+                SoftApConfiguration.BAND_2GHZ, SoftApConfiguration.BAND_5GHZ};
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setBands(dual_bands);
+        configBuilder.setSsid(TEST_SSID);
         SoftApModeConfiguration dualBandConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, generateBridgedModeSoftApConfig(null),
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
                 mTestSoftApCapability);
         mSoftApManager = createSoftApManager(dualBandConfig,
                 TEST_COUNTRY_CODE, ROLE_SOFTAP_TETHERED);
         verify(mWifiNative).setupInterfaceForSoftApMode(
-                any(), any(), eq(SoftApConfiguration.BAND_2GHZ), eq(true), eq(mSoftApManager));
+                any(), any(), eq(SoftApConfiguration.BAND_2GHZ), eq(true));
     }
 
     @Test
@@ -2621,12 +2497,12 @@
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
         reset(mCallback);
-        mockApInfoChangedEvent(mTestSoftApInfoOnFirstInstance);
+        mockApInfoChangedEvent(mTestSoftApInfo);
         mLooper.dispatchAll();
         verify(mCallback).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, false);
 
-        mockApInfoChangedEvent(mTestSoftApInfoOnSecondInstance);
+        mockApInfoChangedEvent(mTestSoftApInfoOnSecondInterface);
         mLooper.dispatchAll();
         verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, false);
@@ -2635,8 +2511,13 @@
     @Test
     public void schedulesTimeoutTimerOnStartInBridgedMode() throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ ,
+                SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ};
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, generateBridgedModeSoftApConfig(null),
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
 
@@ -2646,22 +2527,39 @@
                 .getInteger(R.integer
                 .config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond);
 
-        reset(mCallback);
+
+        // Verify timer is scheduled
+        verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
+
+        // Verify the bridged mode timer is scheduled
+        verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_IDLE_IN_BRIDGED_MODE_TIMEOUT_TAG),
+                any(), any());
+
         // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/, true);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
+
+        mockApInfoChangedEvent(mTestSoftApInfoOnSecondInterface);
+        mLooper.dispatchAll();
+        verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
+
         // Trigger the alarm
-        mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_SECOND_INSTANCE_NAME).onAlarm();
+        mSoftApManager.mSoftApBridgedModeIdleInstanceTimeoutMessage.onAlarm();
         mLooper.dispatchAll();
         // Verify the remove correct iface and instance
         verify(mWifiNative).removeIfaceInstanceFromBridgedApIface(eq(TEST_INTERFACE_NAME),
-                eq(TEST_SECOND_INSTANCE_NAME));
+                eq(TEST_SECOND_INTERFACE_NAME));
         mLooper.dispatchAll();
         mTestSoftApInfoMap.clear();
         mTestWifiClientsMap.clear();
 
-        mTestSoftApInfoMap.put(mTestSoftApInfoOnFirstInstance.getApInstanceIdentifier(),
-                mTestSoftApInfoOnFirstInstance);
-        mTestWifiClientsMap.put(mTestSoftApInfoOnFirstInstance.getApInstanceIdentifier(),
+        mTestSoftApInfoMap.put(mTestSoftApInfo.getApInstanceIdentifier(), mTestSoftApInfo);
+        mTestWifiClientsMap.put(mTestSoftApInfo.getApInstanceIdentifier(),
                 new ArrayList<WifiClient>());
 
         verify(mCallback, times(3)).onConnectedClientsOrInfoChanged(
@@ -2671,8 +2569,13 @@
     @Test
     public void schedulesTimeoutTimerWorkFlowInBridgedMode() throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
+        int[] dual_bands = new int[] {
+                SoftApConfiguration.BAND_2GHZ, SoftApConfiguration.BAND_5GHZ};
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, generateBridgedModeSoftApConfig(null),
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig);
 
@@ -2682,95 +2585,100 @@
                 .getInteger(R.integer
                 .config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond);
 
-        reset(mCallback);
-        // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/, true);
 
-        // One Client connected
-        reset(mCallback);
-        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_FIRST_INSTANCE_NAME, true);
+        // Verify timer is scheduled
+        verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
+
+        // Verify idle timer in bridged mode is scheduled
+        verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_IDLE_IN_BRIDGED_MODE_TIMEOUT_TAG),
+                any(), any());
+
+        // SoftApInfo updated
+        mockApInfoChangedEvent(mTestSoftApInfo);
         mLooper.dispatchAll();
         verify(mCallback).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, true);
-        // Verify whole SAP timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
-        // Verify correct instance timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_FIRST_INSTANCE_NAME)));
+
+        mockApInfoChangedEvent(mTestSoftApInfoOnSecondInterface);
+        mLooper.dispatchAll();
+        verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
+
+
+        // One Client connected
+        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, true, TEST_INTERFACE_NAME, true);
+        mLooper.dispatchAll();
+        verify(mCallback, times(3)).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
+        // Verify original timer is canceled at this point
+        verify(mAlarmManager.getAlarmManager()).cancel(eq(mSoftApManager.mSoftApTimeoutMessage));
         // Verify idle timer is NOT canceled at this point
-        verify(mAlarmManager.getAlarmManager(), never()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_SECOND_INSTANCE_NAME)));
+        verify(mAlarmManager.getAlarmManager(), never())
+                .cancel(eq(mSoftApManager.mSoftApBridgedModeIdleInstanceTimeoutMessage));
 
         // Second client connected to same interface
-        reset(mCallback);
-        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, true, TEST_FIRST_INSTANCE_NAME, true);
+        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, true, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
-        verify(mCallback).onConnectedClientsOrInfoChanged(
+        verify(mCallback, times(4)).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, true);
         // Verify idle timer is NOT canceled at this point
         verify(mAlarmManager.getAlarmManager(), never())
-                .cancel(eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_SECOND_INSTANCE_NAME)));
+                .cancel(eq(mSoftApManager.mSoftApBridgedModeIdleInstanceTimeoutMessage));
 
         // Second client disconnected from the current interface and connected to another one
-        reset(mCallback);
-        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, false, TEST_FIRST_INSTANCE_NAME, true);
+        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, false, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
-        verify(mCallback).onConnectedClientsOrInfoChanged(
+        verify(mCallback, times(5)).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, true);
-        reset(mCallback);
-        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, true, TEST_SECOND_INSTANCE_NAME, true);
+        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, true, TEST_SECOND_INTERFACE_NAME, true);
         mLooper.dispatchAll();
-        verify(mCallback).onConnectedClientsOrInfoChanged(
+        verify(mCallback, times(6)).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, true);
         // Verify idle timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_SECOND_INSTANCE_NAME)));
+        verify(mAlarmManager.getAlarmManager())
+                .cancel(eq(mSoftApManager.mSoftApBridgedModeIdleInstanceTimeoutMessage));
         // Second client disconnect
-        reset(mCallback);
         mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS_2, false,
-                TEST_SECOND_INSTANCE_NAME, true);
+                TEST_SECOND_INTERFACE_NAME, true);
         mLooper.dispatchAll();
-        verify(mCallback).onConnectedClientsOrInfoChanged(
+        verify(mCallback, times(7)).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, true);
         // Verify idle timer in bridged mode is scheduled again
         verify(mAlarmManager.getAlarmManager(), times(2)).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_SECOND_INSTANCE_NAME),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_IDLE_IN_BRIDGED_MODE_TIMEOUT_TAG),
                 any(), any());
         // Trigger the alarm
-        reset(mCallback);
-        mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_SECOND_INSTANCE_NAME).onAlarm();
+        mSoftApManager.mSoftApBridgedModeIdleInstanceTimeoutMessage.onAlarm();
         mLooper.dispatchAll();
         // Verify the remove correct iface and instance
         verify(mWifiNative).removeIfaceInstanceFromBridgedApIface(eq(TEST_INTERFACE_NAME),
-                eq(TEST_SECOND_INSTANCE_NAME));
+                eq(TEST_SECOND_INTERFACE_NAME));
 
         mTestSoftApInfoMap.clear();
         mTestWifiClientsMap.clear();
-        WifiClient client = new WifiClient(TEST_CLIENT_MAC_ADDRESS, TEST_FIRST_INSTANCE_NAME);
+        WifiClient client = new WifiClient(TEST_CLIENT_MAC_ADDRESS, TEST_INTERFACE_NAME);
         List<WifiClient> targetList = new ArrayList();
         targetList.add(client);
 
-        mTestSoftApInfoMap.put(mTestSoftApInfoOnFirstInstance.getApInstanceIdentifier(),
-                mTestSoftApInfoOnFirstInstance);
-        mTestWifiClientsMap.put(mTestSoftApInfoOnFirstInstance.getApInstanceIdentifier(),
-                targetList);
+        mTestSoftApInfoMap.put(mTestSoftApInfo.getApInstanceIdentifier(), mTestSoftApInfo);
+        mTestWifiClientsMap.put(mTestSoftApInfo.getApInstanceIdentifier(), targetList);
         mLooper.dispatchAll();
-        verify(mCallback).onConnectedClientsOrInfoChanged(
+        verify(mCallback, times(8)).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, true);
 
         // Force all client disconnected
         // reset the alarm mock
         reset(mAlarmManager.getAlarmManager());
-        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, false, TEST_FIRST_INSTANCE_NAME, true);
+        mockClientConnectedEvent(TEST_CLIENT_MAC_ADDRESS, false, TEST_INTERFACE_NAME, true);
         mLooper.dispatchAll();
         // Verify timer is scheduled
         verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_INTERFACE_NAME),
-                any(), any());
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
         // The single AP should not start the bridged mode timer.
         verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_FIRST_INSTANCE_NAME),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_IDLE_IN_BRIDGED_MODE_TIMEOUT_TAG),
                 any(), any());
     }
 
@@ -2778,43 +2686,11 @@
     public void schedulesTimeoutTimerOnStartInBridgedModeWhenOpportunisticShutdownDisabled()
             throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
-        Builder configBuilder = new SoftApConfiguration.Builder(
-                generateBridgedModeSoftApConfig(null));
-        configBuilder.setBridgedModeOpportunisticShutdownEnabled(false);
-        SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED,
-                configBuilder.build(),
-                mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig);
-
-        verify(mResources)
-                .getInteger(R.integer.config_wifiFrameworkSoftApShutDownTimeoutMilliseconds);
-        verify(mResources)
-                .getInteger(R.integer
-                .config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond);
-
-        // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/,
-                false /* no verify timer*/);
-        verify(mAlarmManager.getAlarmManager(), times(2)).setExact(
-                anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_INTERFACE_NAME),
-                any(), any());
-        // Verify the bridged mode timer is NOT scheduled
-        verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_FIRST_INSTANCE_NAME),
-                any(), any());
-        verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_SECOND_INSTANCE_NAME),
-                any(), any());
-    }
-
-    @Test
-    public void testBridgedModeOpportunisticShutdownConfigureChanged()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        Builder configBuilder = new SoftApConfiguration.Builder(
-                generateBridgedModeSoftApConfig(null));
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ ,
+                SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ};
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         configBuilder.setBridgedModeOpportunisticShutdownEnabled(false);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
@@ -2827,30 +2703,53 @@
                 .getInteger(R.integer
                 .config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond);
 
-        // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/,
-                false /* no verify timer*/);
-        verify(mAlarmManager.getAlarmManager(), times(2)).setExact(
-                anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_INTERFACE_NAME),
-                any(), any());
-        // Verify the bridged mode timer is NOT scheduled
-        verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_FIRST_INSTANCE_NAME),
-                any(), any());
-        verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_SECOND_INSTANCE_NAME),
-                any(), any());
 
+        // Verify timer is scheduled
+        verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
+
+        // Verify the bridged mode timer is scheduled
+        verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_IDLE_IN_BRIDGED_MODE_TIMEOUT_TAG),
+                any(), any());
+    }
+
+    @Test
+    public void testBridgedModeOpportunisticShutdownConfigureChanged()
+            throws Exception {
+        assumeTrue(SdkLevel.isAtLeastS());
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ ,
+                SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ};
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
+        configBuilder.setBridgedModeOpportunisticShutdownEnabled(false);
+        SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
+                mTestSoftApCapability);
+        startSoftApAndVerifyEnabled(apConfig);
+
+        verify(mResources)
+                .getInteger(R.integer.config_wifiFrameworkSoftApShutDownTimeoutMilliseconds);
+        verify(mResources)
+                .getInteger(R.integer
+                .config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond);
+
+
+        // Verify timer is scheduled
+        verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG), any(), any());
+
+        // Verify the bridged mode timer is scheduled
+        verify(mAlarmManager.getAlarmManager(), never()).setExact(anyInt(), anyLong(),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_IDLE_IN_BRIDGED_MODE_TIMEOUT_TAG),
+                any(), any());
         configBuilder.setBridgedModeOpportunisticShutdownEnabled(true);
         mSoftApManager.updateConfiguration(configBuilder.build());
         mLooper.dispatchAll();
         // Verify the bridged mode timer is scheduled
         verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_FIRST_INSTANCE_NAME),
-                any(), any());
-        verify(mAlarmManager.getAlarmManager()).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG + TEST_SECOND_INSTANCE_NAME),
+                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_IDLE_IN_BRIDGED_MODE_TIMEOUT_TAG),
                 any(), any());
     }
 
@@ -2880,9 +2779,12 @@
         assumeTrue(SdkLevel.isAtLeastS());
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, mark to unsafe. Let Wifi connect to 5200 (CH40)
         when(mPrimaryWifiInfo.getFrequency()).thenReturn(5200);
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ,
+                SoftApConfiguration.BAND_5GHZ};
         SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
-        Builder configBuilder = new SoftApConfiguration.Builder(
-                generateBridgedModeSoftApConfig(null));
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
                 testCapability);
@@ -2904,9 +2806,12 @@
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, mark to unsafe. Let Wifi connect to 5200 (CH40)
         when(mPrimaryWifiInfo.getFrequency()).thenReturn(5180);
         when(mSecondWifiInfo.getFrequency()).thenReturn(5200);
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ,
+                SoftApConfiguration.BAND_5GHZ};
         SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
-        Builder configBuilder = new SoftApConfiguration.Builder(
-                generateBridgedModeSoftApConfig(null));
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
                 testCapability);
@@ -2921,18 +2826,28 @@
         assumeTrue(SdkLevel.isAtLeastS());
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, mark to unsafe. Let Wifi connect to 5180 (CH36)
         when(mPrimaryWifiInfo.getFrequency()).thenReturn(5180);
-        SoftApConfiguration bridgedConfig = generateBridgedModeSoftApConfig(null);
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ,
+                SoftApConfiguration.BAND_5GHZ};
+        SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, bridgedConfig,
-                mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, bridgedConfig);
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
+                testCapability);
+        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
     }
 
     @Test
     public void testBridgedModeKeepDueToCoexIsSoftUnsafeWhenStartingSAP()
             throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
-        SoftApConfiguration bridgedConfig = generateBridgedModeSoftApConfig(null);
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ,
+                SoftApConfiguration.BAND_5GHZ};
+        SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
 
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149,
         // mark to unsafe but it doesn't change to hard unsafe.
@@ -2942,27 +2857,32 @@
         ));
 
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, bridgedConfig,
-                mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, bridgedConfig);
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
+                testCapability);
+        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
     }
 
     @Test
     public void testBridgedModeFallbackToSingleModeDueToCoexIsHardUnsafe()
             throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ,
+                SoftApConfiguration.BAND_5GHZ};
+        SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
+
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, mark to unsafe.
         when(mCoexManager.getCoexRestrictions()).thenReturn(WifiManager.COEX_RESTRICTION_SOFTAP);
         when(mCoexManager.getCoexUnsafeChannels()).thenReturn(Arrays.asList(
                 new CoexUnsafeChannel(WifiScanner.WIFI_BAND_5_GHZ, 36),
                 new CoexUnsafeChannel(WifiScanner.WIFI_BAND_5_GHZ, 149)
         ));
-        Builder configBuilder = new SoftApConfiguration.Builder(
-                generateBridgedModeSoftApConfig(null));
 
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
-                mTestSoftApCapability);
+                testCapability);
         // Reset band to 2.4G to generate expected configuration
         configBuilder.setBand(SoftApConfiguration.BAND_2GHZ);
         startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
@@ -2974,14 +2894,27 @@
         assumeTrue(SdkLevel.isAtLeastS());
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, mark to safe. Let Wifi connect to 5180 (CH36)
         when(mPrimaryWifiInfo.getFrequency()).thenReturn(5180);
-        SoftApConfiguration bridgedConfig = generateBridgedModeSoftApConfig(null);
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ,
+                SoftApConfiguration.BAND_5GHZ};
+        SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, bridgedConfig, mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, bridgedConfig);
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
+                testCapability);
+        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
 
-        reset(mCallback);
         // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/, true);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
+
+        mockApInfoChangedEvent(mTestSoftApInfoOnSecondInterface);
+        mLooper.dispatchAll();
+        verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
 
         // Test with soft unsafe channels
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, mark to unsafe.
@@ -3005,15 +2938,27 @@
         assumeTrue(SdkLevel.isAtLeastS());
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, mark to safe. Let Wifi connect to 5180 (CH36)
         when(mPrimaryWifiInfo.getFrequency()).thenReturn(5180);
-        SoftApConfiguration bridgedConfig = generateBridgedModeSoftApConfig(null);
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ,
+                SoftApConfiguration.BAND_5GHZ};
+        SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, bridgedConfig,
-                mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, bridgedConfig);
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
+                testCapability);
+        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
 
-        reset(mCallback);
         // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/, true);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
+
+        mockApInfoChangedEvent(mTestSoftApInfoOnSecondInterface);
+        mLooper.dispatchAll();
+        verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
 
         // Test with hard unsafe channels
         when(mCoexManager.getCoexRestrictions()).thenReturn(WifiManager.COEX_RESTRICTION_SOFTAP);
@@ -3023,23 +2968,21 @@
                 new CoexUnsafeChannel(WifiScanner.WIFI_BAND_5_GHZ, 149)
         ));
 
-        reset(mCallback);
         // Trigger coex unsafe channel changed
         mCoexListenerCaptor.getValue().onCoexUnsafeChannelsChanged();
         mLooper.dispatchAll();
         // Verify the remove correct iface and instance
         verify(mWifiNative).removeIfaceInstanceFromBridgedApIface(eq(TEST_INTERFACE_NAME),
-                eq(TEST_SECOND_INSTANCE_NAME));
+                eq(TEST_SECOND_INTERFACE_NAME));
         mLooper.dispatchAll();
         mTestSoftApInfoMap.clear();
         mTestWifiClientsMap.clear();
 
-        mTestSoftApInfoMap.put(mTestSoftApInfoOnFirstInstance.getApInstanceIdentifier(),
-                mTestSoftApInfoOnFirstInstance);
-        mTestWifiClientsMap.put(mTestSoftApInfoOnFirstInstance.getApInstanceIdentifier(),
+        mTestSoftApInfoMap.put(mTestSoftApInfo.getApInstanceIdentifier(), mTestSoftApInfo);
+        mTestWifiClientsMap.put(mTestSoftApInfo.getApInstanceIdentifier(),
                 new ArrayList<WifiClient>());
 
-        verify(mCallback).onConnectedClientsOrInfoChanged(
+        verify(mCallback, times(3)).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, true);
     }
 
@@ -3049,15 +2992,28 @@
         assumeTrue(SdkLevel.isAtLeastS());
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, mark to unsafe. Let Wifi connect to 5180 (CH36)
         when(mPrimaryWifiInfo.getFrequency()).thenReturn(5180);
-        SoftApConfiguration bridgedConfig = generateBridgedModeSoftApConfig(null);
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ,
+                SoftApConfiguration.BAND_5GHZ};
+        SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, bridgedConfig,
-                mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, bridgedConfig);
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
+                testCapability);
+        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
 
-        reset(mCallback);
         // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/, true);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
+
+        mockApInfoChangedEvent(mTestSoftApInfoOnSecondInterface);
+        mLooper.dispatchAll();
+        verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
+
 
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, only mark 36 is unsafe.
         when(mCoexManager.getCoexUnsafeChannels()).thenReturn(Arrays.asList(
@@ -3075,14 +3031,27 @@
     public void testBridgedModeKeepWhenWifiConnectedToAvailableChannel()
             throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
-        SoftApConfiguration bridgedConfig = generateBridgedModeSoftApConfig(null);
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ,
+                SoftApConfiguration.BAND_5GHZ};
+        SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, bridgedConfig, mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, bridgedConfig);
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
+                testCapability);
+        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
 
-        reset(mCallback);
         // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/, true);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
+
+        mockApInfoChangedEvent(mTestSoftApInfoOnSecondInterface);
+        mLooper.dispatchAll();
+        verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
 
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, mark to unsafe. Let Wifi connect to 5180 (CH36)
         when(mPrimaryWifiInfo.getFrequency()).thenReturn(5180);
@@ -3098,62 +3067,49 @@
     public void testBridgedModeShutDownInstanceDueToWifiConnectedToUnavailableChannel()
             throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
-        SoftApConfiguration bridgedConfig = generateBridgedModeSoftApConfig(null);
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ, SoftApConfiguration.BAND_5GHZ};
+        SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, bridgedConfig, mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, bridgedConfig);
+                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
+                testCapability);
+        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
 
-        reset(mCallback);
         // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/, true);
+        mockApInfoChangedEvent(mTestSoftApInfo);
+        mLooper.dispatchAll();
+        verify(mCallback).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
+
+        mockApInfoChangedEvent(mTestSoftApInfoOnSecondInterface);
+        mLooper.dispatchAll();
+        verify(mCallback, times(2)).onConnectedClientsOrInfoChanged(
+                mTestSoftApInfoMap, mTestWifiClientsMap, true);
 
         // TEST_SUPPORTED_5G_CHANNELS = 36, 149, mark to unsafe. Let Wifi connect to 5945 (6G)
         when(mPrimaryWifiInfo.getFrequency()).thenReturn(5945);
 
-        reset(mCallback);
         // Trigger wifi connected
         mCmiListenerCaptor.getValue().onL2Connected(mConcreteClientModeManager);
         mLooper.dispatchAll();
         // Verify the remove correct iface and instance
         verify(mWifiNative).removeIfaceInstanceFromBridgedApIface(eq(TEST_INTERFACE_NAME),
-                eq(TEST_SECOND_INSTANCE_NAME));
+                eq(TEST_SECOND_INTERFACE_NAME));
         mLooper.dispatchAll();
         mTestSoftApInfoMap.clear();
         mTestWifiClientsMap.clear();
 
-        mTestSoftApInfoMap.put(mTestSoftApInfoOnFirstInstance.getApInstanceIdentifier(),
-                mTestSoftApInfoOnFirstInstance);
-        mTestWifiClientsMap.put(mTestSoftApInfoOnFirstInstance.getApInstanceIdentifier(),
+        mTestSoftApInfoMap.put(mTestSoftApInfo.getApInstanceIdentifier(), mTestSoftApInfo);
+        mTestWifiClientsMap.put(mTestSoftApInfo.getApInstanceIdentifier(),
                 new ArrayList<WifiClient>());
 
-        verify(mCallback).onConnectedClientsOrInfoChanged(
+        verify(mCallback, times(3)).onConnectedClientsOrInfoChanged(
                 mTestSoftApInfoMap, mTestWifiClientsMap, true);
     }
 
     @Test
-    public void testBridgedModeDowngradeIfaceInstanceForRemoval() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, generateBridgedModeSoftApConfig(null),
-                mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig);
-
-        // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/, true);
-
-        // Instance for removal should always be 5GHz (i.e. the second instance).
-        assertThat(mSoftApManager.getBridgedApDowngradeIfaceInstanceForRemoval())
-                .isEqualTo(mTestSoftApInfoOnSecondInstance.getApInstanceIdentifier());
-
-        // Trigger onInstanceFailure to simulate instance removal
-        mSoftApHalCallbackCaptor.getValue().onInstanceFailure(TEST_SECOND_INSTANCE_NAME);
-        mLooper.dispatchAll();
-
-        // Bridged AP with a single instance should not be downgraded, so return null.
-        assertThat(mSoftApManager.getBridgedApDowngradeIfaceInstanceForRemoval()).isNull();
-    }
-
-    @Test
     public void testUpdateCountryCodeWhenConfigDisabled() throws Exception {
         when(mResources.getBoolean(R.bool.config_wifiSoftApDynamicCountryCodeUpdateSupported))
                 .thenReturn(false);
@@ -3201,8 +3157,10 @@
         assumeTrue(SdkLevel.isAtLeastS());
         when(mResources.getBoolean(R.bool.config_wifiStaWithBridgedSoftApConcurrencySupported))
                 .thenReturn(false);
-        Builder configBuilder = new SoftApConfiguration.Builder(
-                generateBridgedModeSoftApConfig(null));
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ, SoftApConfiguration.BAND_5GHZ};
+        Builder configBuilder = new SoftApConfiguration.Builder();
+        configBuilder.setSsid(TEST_SSID);
+        configBuilder.setBands(dual_bands);
 
         SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
                 WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
@@ -3213,41 +3171,14 @@
         startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
     }
 
-    @Test
-    public void testFallbackToSingleModeDueToUnableToCreateBridgedAp()
+    private SoftApConfiguration generateBridgedModeSoftApConfig(SoftApConfiguration config)
             throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
+        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ ,
+                SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ};
         Builder configBuilder = new SoftApConfiguration.Builder(
-                generateBridgedModeSoftApConfig(null));
-
-        SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
-                mTestSoftApCapability);
-        // Reset band to 2.4G | 5G to generate expected configuration since it should fallback to
-        // single AP mode
-        configBuilder.setBand(SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ);
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.isItPossibleToCreateBridgedApIface(any())).thenReturn(false);
-        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
-    }
-
-    @Test
-    public void testFallbackToSingleModeIfBridgedApWillTearDownExistingIface()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        Builder configBuilder = new SoftApConfiguration.Builder(
-                generateBridgedModeSoftApConfig(null));
-
-        SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
-                mTestSoftApCapability);
-        // Reset band to 2.4G | 5G to generate expected configuration since it should fallback to
-        // single AP mode
-        configBuilder.setBand(SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ);
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.isItPossibleToCreateBridgedApIface(any())).thenReturn(true);
-        when(mWifiNative.shouldDowngradeToSingleApForConcurrency(any())).thenReturn(true);
-        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
+                config != null ? config : mDefaultApConfig);
+        configBuilder.setBands(dual_bands);
+        return configBuilder.build();
     }
 
     @Test
@@ -3263,81 +3194,5 @@
                 mTestSoftApCapability);
         startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, bridgedConfig);
     }
-
-    @Test
-    public void testSchedulesTimeoutTimerWhenChargingChanged() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mResources.getBoolean(R.bool
-                  .config_wifiFrameworkSoftApDisableBridgedModeShutdownIdleInstanceWhenCharging))
-                .thenReturn(true);
-
-        SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, generateBridgedModeSoftApConfig(null),
-                mTestSoftApCapability);
-        startSoftApAndVerifyEnabled(apConfig);
-
-        verify(mResources)
-                .getInteger(R.integer.config_wifiFrameworkSoftApShutDownTimeoutMilliseconds);
-        verify(mResources)
-                .getInteger(R.integer
-                .config_wifiFrameworkSoftApShutDownIdleInstanceInBridgedModeTimeoutMillisecond);
-
-        reset(mCallback);
-        // SoftApInfo updated
-        mockSoftApInfoUpdateAndVerifyAfterSapStarted(true /* bridged mode*/, true);
-        WakeupMessage timerOnTestInterface =
-                mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME);
-        verify(mContext).registerReceiver(mBroadcastReceiverCaptor.capture(),
-                argThat((IntentFilter filter) ->
-                        filter.hasAction(Intent.ACTION_POWER_CONNECTED)
-                                && filter.hasAction(Intent.ACTION_POWER_DISCONNECTED)));
-        mBroadcastReceiverCaptor.getValue().onReceive(mContext,
-                new Intent(Intent.ACTION_POWER_CONNECTED));
-        mLooper.dispatchAll();
-        // Verify whole SAP timer is canceled at this point
-        verify(mAlarmManager.getAlarmManager(), never()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_INTERFACE_NAME)));
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_FIRST_INSTANCE_NAME)));
-        verify(mAlarmManager.getAlarmManager()).cancel(
-                eq(mSoftApManager.mSoftApTimeoutMessageMap.get(TEST_SECOND_INSTANCE_NAME)));
-
-        mBroadcastReceiverCaptor.getValue().onReceive(mContext,
-                new Intent(Intent.ACTION_POWER_DISCONNECTED));
-        mLooper.dispatchAll();
-        // Verify tethered instance timer is NOT re-scheduled (Keep 2 times)
-        verify(mAlarmManager.getAlarmManager(), times(2)).setExact(anyInt(), anyLong(),
-                    eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG
-                            + TEST_INTERFACE_NAME),
-                    any(), any());
-        // Verify AP instance timer is scheduled.
-        verify(mAlarmManager.getAlarmManager(), times(2)).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG
-                                  + TEST_FIRST_INSTANCE_NAME),
-                        any(), any());
-        verify(mAlarmManager.getAlarmManager(), times(2)).setExact(anyInt(), anyLong(),
-                eq(mSoftApManager.SOFT_AP_SEND_MESSAGE_TIMEOUT_TAG
-                                  + TEST_SECOND_INSTANCE_NAME),
-                        any(), any());
-    }
-
-    @Test
-    public void testForceToEnableBridgedModeWhenCountryCodeIsPendingToChanged()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        int[] dual_bands = {SoftApConfiguration.BAND_2GHZ,
-                SoftApConfiguration.BAND_5GHZ};
-        SoftApCapability testCapability = new SoftApCapability(mTestSoftApCapability);
-        testCapability.setCountryCode(null);
-        Builder configBuilder = new SoftApConfiguration.Builder();
-        configBuilder.setSsid(TEST_SSID);
-        configBuilder.setBands(dual_bands);
-
-        SoftApModeConfiguration apConfig = new SoftApModeConfiguration(
-                WifiManager.IFACE_IP_MODE_TETHERED, configBuilder.build(),
-                testCapability);
-        startSoftApAndVerifyEnabled(apConfig, TEST_COUNTRY_CODE, configBuilder.build());
-    }
-
 }
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SoftApNotifierTest.java b/service/tests/wifitests/src/com/android/server/wifi/SoftApNotifierTest.java
index 5f1cdfa..1e02f60 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SoftApNotifierTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SoftApNotifierTest.java
@@ -27,7 +27,6 @@
 import android.content.Context;
 import android.content.Intent;
 import android.content.res.Resources;
-import android.net.wifi.WifiContext;
 
 import androidx.test.filters.SmallTest;
 
@@ -45,8 +44,7 @@
 public class SoftApNotifierTest extends WifiBaseTest {
     private static final String TEST_SSID = "Test SSID";
 
-    @Mock
-    WifiContext mContext;
+    @Mock WifiContext mContext;
     @Mock Resources mResources;
     @Mock WifiNotificationManager mWifiNotificationManager;
     @Mock FrameworkFacade mFrameworkFacade;
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SoftApStoreDataTest.java b/service/tests/wifitests/src/com/android/server/wifi/SoftApStoreDataTest.java
index a3c79ca..7b0044a 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SoftApStoreDataTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SoftApStoreDataTest.java
@@ -33,7 +33,6 @@
 import android.net.wifi.SoftApConfiguration;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiMigration;
-import android.net.wifi.WifiSsid;
 import android.util.SparseIntArray;
 import android.util.Xml;
 
@@ -41,7 +40,6 @@
 
 import com.android.internal.util.FastXmlSerializer;
 import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.util.InformationElementUtil;
 import com.android.server.wifi.util.SettingsMigrationDataHolder;
 import com.android.server.wifi.util.WifiConfigStoreEncryptionUtil;
 
@@ -58,7 +56,6 @@
 import java.io.ByteArrayOutputStream;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.Arrays;
 
 /**
  * Unit tests for {@link com.android.server.wifi.SoftApStoreData}.
@@ -66,7 +63,6 @@
 @SmallTest
 public class SoftApStoreDataTest extends WifiBaseTest {
     private static final String TEST_SSID = "SSID";
-    private static final WifiSsid TEST_WIFI_SSID = WifiSsid.fromUtf8Text(TEST_SSID);
     private static final String TEST_BSSID = "aa:22:33:aa:bb:cc";
     private static final String TEST_PASSPHRASE = "TestPassphrase";
     private static final String TEST_WPA2_PASSPHRASE = "Wpa2Test";
@@ -84,7 +80,6 @@
     private static final boolean TEST_AUTO_SHUTDOWN_ENABLED = true;
     private static final int TEST_MAX_NUMBER_OF_CLIENTS = 10;
     private static final long TEST_SHUTDOWN_TIMEOUT_MILLIS = 600_000;
-    private static final long TEST_BRIDTED_MODE_SHUTDOWN_TIMEOUT_MILLIS = 300_000;
     private static final ArrayList<MacAddress> TEST_BLOCKEDLIST = new ArrayList<>();
     private static final String TEST_BLOCKED_CLIENT = "11:22:33:44:55:66";
     private static final ArrayList<MacAddress> TEST_ALLOWEDLIST = new ArrayList<>();
@@ -101,22 +96,10 @@
             }};
 
     private static final boolean TEST_80211AX_ENABLED = false;
-    private static final boolean TEST_80211BE_ENABLED = false;
     private static final boolean TEST_USER_CONFIGURATION = false;
-    private static final String TEST_TWO_VENDOR_ELEMENTS_HEX = "DD04AABBCCDDDD0401020304";
 
     private static final String TEST_CONFIG_STRING_FROM_WIFICONFIGURATION =
-            "<string name=\"WifiSsid\">"
-                    + TEST_WIFI_SSID.toString().replace("\"", "&quot;") + "</string>\n"
-                    + "<int name=\"Band\" value=\"" + TEST_OLD_BAND + "\" />\n"
-                    + "<int name=\"Channel\" value=\"" + TEST_CHANNEL + "\" />\n"
-                    + "<boolean name=\"HiddenSSID\" value=\"" + TEST_HIDDEN + "\" />\n"
-                    + "<int name=\"SecurityType\" value=\"" + TEST_SECURITY + "\" />\n"
-                    + "<string name=\"Wpa2Passphrase\">" + TEST_WPA2_PASSPHRASE + "</string>\n";
-
-    private static final String TEST_CONFIG_STRING_WITH_OLD_SSID_DESIGN =
-            "<string name=\"WifiSsid\">"
-                    + TEST_WIFI_SSID.toString().replace("\"", "&quot;") + "</string>\n"
+            "<string name=\"SSID\">" + TEST_SSID + "</string>\n"
                     + "<int name=\"Band\" value=\"" + TEST_OLD_BAND + "\" />\n"
                     + "<int name=\"Channel\" value=\"" + TEST_CHANNEL + "\" />\n"
                     + "<boolean name=\"HiddenSSID\" value=\"" + TEST_HIDDEN + "\" />\n"
@@ -124,8 +107,7 @@
                     + "<string name=\"Wpa2Passphrase\">" + TEST_WPA2_PASSPHRASE + "</string>\n";
 
     private static final String TEST_CONFIG_STRING_WITH_NEW_BAND_DESIGN_IN_R =
-            "<string name=\"WifiSsid\">"
-                    + TEST_WIFI_SSID.toString().replace("\"", "&quot;") + "</string>\n"
+            "<string name=\"SSID\">" + TEST_SSID + "</string>\n"
                     + "<int name=\"ApBand\" value=\"" + TEST_BAND + "\" />\n"
                     + "<int name=\"Channel\" value=\"" + TEST_CHANNEL + "\" />\n"
                     + "<boolean name=\"HiddenSSID\" value=\"" + TEST_HIDDEN + "\" />\n"
@@ -133,8 +115,7 @@
                     + "<string name=\"Passphrase\">" + TEST_PASSPHRASE + "</string>\n";
 
     private static final String TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_R =
-            "<string name=\"WifiSsid\">"
-                    + TEST_WIFI_SSID.toString().replace("\"", "&quot;") + "</string>\n"
+            "<string name=\"SSID\">" + TEST_SSID + "</string>\n"
                     + "<string name=\"Bssid\">" + TEST_BSSID + "</string>\n"
                     + "<int name=\"ApBand\" value=\"" + TEST_BAND + "\" />\n"
                     + "<int name=\"Channel\" value=\"" + TEST_CHANNEL + "\" />\n"
@@ -157,8 +138,7 @@
                     + "</AllowedClientList>\n";
 
     private static final String TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_R_EXCEPT_AUTO_SHUTDOWN =
-            "<string name=\"WifiSsid\">"
-                    + TEST_WIFI_SSID.toString().replace("\"", "&quot;") + "</string>\n"
+            "<string name=\"SSID\">" + TEST_SSID + "</string>\n"
                     + "<int name=\"ApBand\" value=\"" + TEST_BAND + "\" />\n"
                     + "<int name=\"Channel\" value=\"" + TEST_CHANNEL + "\" />\n"
                     + "<boolean name=\"HiddenSSID\" value=\"" + TEST_HIDDEN + "\" />\n"
@@ -178,8 +158,7 @@
                     + "</AllowedClientList>\n";
 
     private static final String TEST_CONFIG_STRING_WITH_INT_TYPE_SHUTDOWNTIMOUTMILLIS =
-            "<string name=\"WifiSsid\">"
-                    + TEST_WIFI_SSID.toString().replace("\"", "&quot;") + "</string>\n"
+            "<string name=\"SSID\">" + TEST_SSID + "</string>\n"
                     + "<int name=\"ApBand\" value=\"" + TEST_BAND + "\" />\n"
                     + "<int name=\"Channel\" value=\"" + TEST_CHANNEL + "\" />\n"
                     + "<boolean name=\"HiddenSSID\" value=\"" + TEST_HIDDEN + "\" />\n"
@@ -201,8 +180,7 @@
                     + "</AllowedClientList>\n";
 
     private static final String TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_R_EXCEPT_BSSID =
-            "<string name=\"WifiSsid\">"
-                    + TEST_WIFI_SSID.toString().replace("\"", "&quot;") + "</string>\n"
+            "<string name=\"SSID\">" + TEST_SSID + "</string>\n"
                     + "<int name=\"ApBand\" value=\"" + TEST_BAND + "\" />\n"
                     + "<int name=\"Channel\" value=\"" + TEST_CHANNEL + "\" />\n"
                     + "<boolean name=\"HiddenSSID\" value=\"" + TEST_HIDDEN + "\" />\n"
@@ -224,8 +202,7 @@
                     + "</AllowedClientList>\n";
 
     private static final String TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_S_EXCEPT_USER_CONFIGURATION =
-            "<string name=\"WifiSsid\">"
-                    + TEST_WIFI_SSID.toString().replace("\"", "&quot;") + "</string>\n"
+            "<string name=\"SSID\">" + TEST_SSID + "</string>\n"
                     + "<string name=\"Bssid\">" + TEST_BSSID + "</string>\n"
                     + "<boolean name=\"HiddenSSID\" value=\"" + TEST_HIDDEN + "\" />\n"
                     + "<int name=\"SecurityType\" value=\"" + TEST_SECURITY + "\" />\n"
@@ -261,22 +238,11 @@
                     + "<boolean name=\"80211axEnabled\" value=\""
                     + TEST_80211AX_ENABLED + "\" />\n";
 
-    private static final String TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_S =
+    private static final String TEST_CONFIG_STRING_WITH_ALL_CONFIG_LAST_VERSION =
             TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_S_EXCEPT_USER_CONFIGURATION
                     + "<boolean name=\"UserConfiguration\" value=\""
                     + TEST_USER_CONFIGURATION + "\" />\n";
 
-    private static final String TEST_CONFIG_STRING_WITH_ALL_CONFIG_LAST_VERSION =
-            TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_S
-                    + "<long name=\"BridgedModeOpportunisticShutdownTimeoutMillis\" value=\""
-                    + TEST_BRIDTED_MODE_SHUTDOWN_TIMEOUT_MILLIS + "\" />\n"
-                    + "<VendorElements>\n"
-                    + "<string name=\"VendorElement\">DD04AABBCCDD</string>\n"
-                    + "<string name=\"VendorElement\">DD0401020304</string>\n"
-                    + "</VendorElements>\n"
-                    + "<boolean name=\"80211beEnabled\" value=\""
-                    + TEST_80211BE_ENABLED + "\" />\n";
-
     @Mock private Context mContext;
     @Mock SoftApStoreData.DataSource mDataSource;
     @Mock private WifiMigration.SettingsMigrationData mOemMigrationData;
@@ -388,88 +354,24 @@
             softApConfigBuilder.setIeee80211axEnabled(TEST_80211AX_ENABLED);
             softApConfigBuilder.setUserConfiguration(TEST_USER_CONFIGURATION);
         }
-        if (SdkLevel.isAtLeastT()) {
-            softApConfigBuilder.setBridgedModeOpportunisticShutdownTimeoutMillis(
-                    TEST_BRIDTED_MODE_SHUTDOWN_TIMEOUT_MILLIS);
-            softApConfigBuilder.setVendorElements(Arrays.asList(
-                    InformationElementUtil.parseInformationElements(
-                            TEST_TWO_VENDOR_ELEMENTS_HEX)));
-            softApConfigBuilder.setIeee80211beEnabled(TEST_80211BE_ENABLED);
-        }
         when(mDataSource.toSerialize()).thenReturn(softApConfigBuilder.build());
         byte[] actualData = serializeData();
-        if (SdkLevel.isAtLeastT()) {
+        if (SdkLevel.isAtLeastS()) {
             assertEquals(TEST_CONFIG_STRING_WITH_ALL_CONFIG_LAST_VERSION, new String(actualData));
-        } else if (SdkLevel.isAtLeastS()) {
-            assertEquals(TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_S, new String(actualData));
         } else {
             assertEquals(TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_R, new String(actualData));
         }
     }
 
     /**
-     * Verify that the store data is serialized correctly, matches the predefined test XML data
-     * for a non-UTF-8 SSID.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void serializeSoftApNonUtf8() throws Exception {
-
-        SoftApConfiguration.Builder softApConfigBuilder = new SoftApConfiguration.Builder();
-        softApConfigBuilder.setSsid(TEST_SSID);
-        softApConfigBuilder.setBssid(MacAddress.fromString(TEST_BSSID));
-        softApConfigBuilder.setPassphrase(TEST_PASSPHRASE,
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        if (SdkLevel.isAtLeastS()) {
-            softApConfigBuilder.setChannels(TEST_CHANNELS);
-        } else {
-            softApConfigBuilder.setBand(TEST_BAND);
-        }
-        softApConfigBuilder.setClientControlByUserEnabled(TEST_CLIENT_CONTROL_BY_USER);
-        softApConfigBuilder.setMaxNumberOfClients(TEST_MAX_NUMBER_OF_CLIENTS);
-        softApConfigBuilder.setAutoShutdownEnabled(true);
-        softApConfigBuilder.setShutdownTimeoutMillis(TEST_SHUTDOWN_TIMEOUT_MILLIS);
-        softApConfigBuilder.setAllowedClientList(TEST_ALLOWEDLIST);
-        softApConfigBuilder.setBlockedClientList(TEST_BLOCKEDLIST);
-        if (SdkLevel.isAtLeastS()) {
-            softApConfigBuilder.setMacRandomizationSetting(TEST_MAC_RANDOMIZATIONSETTING);
-            softApConfigBuilder.setBridgedModeOpportunisticShutdownEnabled(
-                    TEST_BRIDGED_OPPORTUNISTIC_SHUTDOWN_ENABLED);
-            softApConfigBuilder.setIeee80211axEnabled(TEST_80211AX_ENABLED);
-            softApConfigBuilder.setUserConfiguration(TEST_USER_CONFIGURATION);
-        }
-        if (SdkLevel.isAtLeastT()) {
-            softApConfigBuilder.setBridgedModeOpportunisticShutdownTimeoutMillis(
-                    TEST_BRIDTED_MODE_SHUTDOWN_TIMEOUT_MILLIS);
-            softApConfigBuilder.setVendorElements(Arrays.asList(
-                    InformationElementUtil.parseInformationElements(
-                            TEST_TWO_VENDOR_ELEMENTS_HEX)));
-            softApConfigBuilder.setIeee80211beEnabled(TEST_80211BE_ENABLED);
-        }
-        when(mDataSource.toSerialize()).thenReturn(softApConfigBuilder.build());
-        byte[] actualData = serializeData();
-        if (SdkLevel.isAtLeastT()) {
-            assertEquals(TEST_CONFIG_STRING_WITH_ALL_CONFIG_LAST_VERSION, new String(actualData));
-        } else if (SdkLevel.isAtLeastS()) {
-            assertEquals(TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_S, new String(actualData));
-        } else {
-            assertEquals(TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_R, new String(actualData));
-        }
-    }
-
-
-    /**
      * Verify that the store data is deserialized correctly using the predefined test XML data.
      *
      * @throws Exception
      */
     @Test
     public void deserializeSoftAp() throws Exception {
-        if (SdkLevel.isAtLeastT()) {
+        if (SdkLevel.isAtLeastS()) {
             deserializeData(TEST_CONFIG_STRING_WITH_ALL_CONFIG_LAST_VERSION.getBytes());
-        } else if (SdkLevel.isAtLeastS()) {
-            deserializeData(TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_S.getBytes());
         } else {
             deserializeData(TEST_CONFIG_STRING_WITH_ALL_CONFIG_IN_R.getBytes());
         }
@@ -479,7 +381,7 @@
         verify(mDataSource).fromDeserialized(softapConfigCaptor.capture());
         SoftApConfiguration softApConfig = softapConfigCaptor.getValue();
         assertNotNull(softApConfig);
-        assertEquals(softApConfig.getWifiSsid(), TEST_WIFI_SSID);
+        assertEquals(softApConfig.getSsid(), TEST_SSID);
         assertEquals(softApConfig.getBssid().toString(), TEST_BSSID);
         assertEquals(softApConfig.getPassphrase(), TEST_PASSPHRASE);
         assertEquals(softApConfig.getSecurityType(), SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
@@ -505,9 +407,6 @@
             assertEquals(softApConfig.isIeee80211axEnabled(), TEST_80211AX_ENABLED);
             assertEquals(softApConfig.isUserConfiguration(), TEST_USER_CONFIGURATION);
         }
-        if (SdkLevel.isAtLeastT()) {
-            assertEquals(softApConfig.isIeee80211beEnabled(), TEST_80211BE_ENABLED);
-        }
     }
 
     /**
@@ -525,7 +424,7 @@
         verify(mDataSource).fromDeserialized(softapConfigCaptor.capture());
         SoftApConfiguration softApConfig = softapConfigCaptor.getValue();
         assertNotNull(softApConfig);
-        assertEquals(softApConfig.getWifiSsid(), TEST_WIFI_SSID);
+        assertEquals(softApConfig.getSsid(), TEST_SSID);
         assertEquals(softApConfig.getPassphrase(), TEST_PASSPHRASE);
         assertEquals(softApConfig.getSecurityType(), SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
         assertEquals(softApConfig.isHiddenSsid(), TEST_HIDDEN);
@@ -539,29 +438,7 @@
     }
 
     /**
-     * Verify that the old format for SSID is deserialized correctly.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void deserializeOldSsidSoftAp() throws Exception {
-        // Start with the old serialized data
-        deserializeData(TEST_CONFIG_STRING_WITH_OLD_SSID_DESIGN.getBytes());
-
-        ArgumentCaptor<SoftApConfiguration> softapConfigCaptor =
-                ArgumentCaptor.forClass(SoftApConfiguration.class);
-        verify(mDataSource).fromDeserialized(softapConfigCaptor.capture());
-        SoftApConfiguration softApConfig = softapConfigCaptor.getValue();
-        assertNotNull(softApConfig);
-        assertEquals(softApConfig.getWifiSsid(), TEST_WIFI_SSID);
-        assertEquals(softApConfig.getPassphrase(), TEST_WPA2_PASSPHRASE);
-        assertEquals(softApConfig.getSecurityType(), SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        assertEquals(softApConfig.isHiddenSsid(), TEST_HIDDEN);
-        assertEquals(softApConfig.getBand(), TEST_BAND);
-    }
-
-    /**
-     * Verify that the old format for band is deserialized correctly.
+     * Verify that the old format is deserialized correctly.
      *
      * @throws Exception
      */
@@ -575,7 +452,7 @@
         verify(mDataSource).fromDeserialized(softapConfigCaptor.capture());
         SoftApConfiguration softApConfig = softapConfigCaptor.getValue();
         assertNotNull(softApConfig);
-        assertEquals(softApConfig.getWifiSsid(), TEST_WIFI_SSID);
+        assertEquals(softApConfig.getSsid(), TEST_SSID);
         assertEquals(softApConfig.getPassphrase(), TEST_WPA2_PASSPHRASE);
         assertEquals(softApConfig.getSecurityType(), SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
         assertEquals(softApConfig.isHiddenSsid(), TEST_HIDDEN);
@@ -597,7 +474,7 @@
         verify(mDataSource).fromDeserialized(softapConfigCaptor.capture());
         SoftApConfiguration softApConfig = softapConfigCaptor.getValue();
         assertNotNull(softApConfig);
-        assertEquals(softApConfig.getWifiSsid(), TEST_WIFI_SSID);
+        assertEquals(softApConfig.getSsid(), TEST_SSID);
         assertEquals(softApConfig.getPassphrase(), TEST_PASSPHRASE);
         assertEquals(softApConfig.getSecurityType(), SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
         assertEquals(softApConfig.isHiddenSsid(), TEST_HIDDEN);
@@ -630,7 +507,7 @@
         SoftApConfiguration softApConfigDeserialized = softapConfigCaptor.getValue();
         assertNotNull(softApConfigDeserialized);
 
-        assertEquals(softApConfig.getWifiSsid(), softApConfigDeserialized.getWifiSsid());
+        assertEquals(softApConfig.getSsid(), softApConfigDeserialized.getSsid());
         assertEquals(softApConfig.getPassphrase(),
                 softApConfigDeserialized.getPassphrase());
         assertEquals(softApConfig.getSecurityType(),
@@ -667,7 +544,7 @@
         SoftApConfiguration softApConfigDeserialized = softapConfigCaptor.getValue();
         assertNotNull(softApConfigDeserialized);
 
-        assertEquals(softApConfig.getWifiSsid(), softApConfigDeserialized.getWifiSsid());
+        assertEquals(softApConfig.getSsid(), softApConfigDeserialized.getSsid());
         assertEquals(softApConfig.getPassphrase(),
                 softApConfigDeserialized.getPassphrase());
         assertEquals(softApConfig.getSecurityType(),
@@ -704,7 +581,7 @@
         SoftApConfiguration softApConfigDeserialized = softapConfigCaptor.getValue();
         assertNotNull(softApConfigDeserialized);
 
-        assertEquals(softApConfig.getWifiSsid(), softApConfigDeserialized.getWifiSsid());
+        assertEquals(softApConfig.getSsid(), softApConfigDeserialized.getSsid());
         assertEquals(softApConfig.getPassphrase(),
                 softApConfigDeserialized.getPassphrase());
         assertEquals(softApConfig.getSecurityType(),
@@ -733,7 +610,7 @@
         verify(mDataSource).fromDeserialized(softapConfigCaptor.capture());
         SoftApConfiguration softApConfig = softapConfigCaptor.getValue();
         assertNotNull(softApConfig);
-        assertEquals(softApConfig.getWifiSsid(), TEST_WIFI_SSID);
+        assertEquals(softApConfig.getSsid(), TEST_SSID);
         assertTrue(softApConfig.isAutoShutdownEnabled());
 
         // Toggle off when migrating.
@@ -743,7 +620,7 @@
         verify(mDataSource, times(2)).fromDeserialized(softapConfigCaptor.capture());
         softApConfig = softapConfigCaptor.getValue();
         assertNotNull(softApConfig);
-        assertEquals(softApConfig.getWifiSsid(), TEST_WIFI_SSID);
+        assertEquals(softApConfig.getSsid(), TEST_SSID);
         assertFalse(softApConfig.isAutoShutdownEnabled());
     }
 
@@ -762,7 +639,7 @@
         verify(mDataSource).fromDeserialized(softapConfigCaptor.capture());
         SoftApConfiguration softApConfig = softapConfigCaptor.getValue();
         assertNotNull(softApConfig);
-        assertEquals(softApConfig.getWifiSsid(), TEST_WIFI_SSID);
+        assertEquals(softApConfig.getSsid(), TEST_SSID);
         assertEquals(softApConfig.getPassphrase(), TEST_PASSPHRASE);
         assertEquals(softApConfig.getSecurityType(), SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
         assertEquals(softApConfig.isHiddenSsid(), TEST_HIDDEN);
@@ -790,7 +667,7 @@
         verify(mDataSource).fromDeserialized(softapConfigCaptor.capture());
         SoftApConfiguration softApConfig = softapConfigCaptor.getValue();
         assertNotNull(softApConfig);
-        assertEquals(softApConfig.getWifiSsid(), TEST_WIFI_SSID);
+        assertEquals(softApConfig.getSsid(), TEST_SSID);
         assertEquals(softApConfig.getBssid().toString(), TEST_BSSID);
         assertEquals(softApConfig.getPassphrase(), TEST_PASSPHRASE);
         assertEquals(softApConfig.getSecurityType(), SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
@@ -824,7 +701,7 @@
         verify(mDataSource).fromDeserialized(softapConfigCaptor.capture());
         SoftApConfiguration softApConfig = softapConfigCaptor.getValue();
         assertNotNull(softApConfig);
-        assertEquals(softApConfig.getWifiSsid(), TEST_WIFI_SSID);
+        assertEquals(softApConfig.getSsid(), TEST_SSID);
         assertEquals(softApConfig.getBssid().toString(), TEST_BSSID);
         assertEquals(softApConfig.getPassphrase(), TEST_PASSPHRASE);
         assertEquals(softApConfig.getSecurityType(), SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalAidlImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalAidlImplTest.java
deleted file mode 100644
index e185ecf..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalAidlImplTest.java
+++ /dev/null
@@ -1,2677 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DECORATED_IDENTITY;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP_ENROLLEE_RESPONDER;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA256;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA384;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_MBO;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_OCE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_PASSPOINT_TERMS_AND_CONDITIONS;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WAPI;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SAE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SUITE_B;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.when;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.app.test.MockAnswerUtil;
-import android.content.Context;
-import android.hardware.wifi.V1_0.WifiChannelWidthInMhz;
-import android.hardware.wifi.supplicant.AnqpData;
-import android.hardware.wifi.supplicant.AssociationRejectionData;
-import android.hardware.wifi.supplicant.BssTmData;
-import android.hardware.wifi.supplicant.BssidChangeReason;
-import android.hardware.wifi.supplicant.ConnectionCapabilities;
-import android.hardware.wifi.supplicant.DebugLevel;
-import android.hardware.wifi.supplicant.Hs20AnqpData;
-import android.hardware.wifi.supplicant.ISupplicant;
-import android.hardware.wifi.supplicant.ISupplicantStaIface;
-import android.hardware.wifi.supplicant.ISupplicantStaIfaceCallback;
-import android.hardware.wifi.supplicant.ISupplicantStaNetwork;
-import android.hardware.wifi.supplicant.IfaceInfo;
-import android.hardware.wifi.supplicant.IfaceType;
-import android.hardware.wifi.supplicant.KeyMgmtMask;
-import android.hardware.wifi.supplicant.LegacyMode;
-import android.hardware.wifi.supplicant.OceRssiBasedAssocRejectAttr;
-import android.hardware.wifi.supplicant.OsuMethod;
-import android.hardware.wifi.supplicant.PortRange;
-import android.hardware.wifi.supplicant.QosPolicyClassifierParams;
-import android.hardware.wifi.supplicant.QosPolicyClassifierParamsMask;
-import android.hardware.wifi.supplicant.QosPolicyData;
-import android.hardware.wifi.supplicant.QosPolicyRequestType;
-import android.hardware.wifi.supplicant.QosPolicyStatus;
-import android.hardware.wifi.supplicant.QosPolicyStatusCode;
-import android.hardware.wifi.supplicant.StaIfaceCallbackState;
-import android.hardware.wifi.supplicant.StaIfaceReasonCode;
-import android.hardware.wifi.supplicant.StaIfaceStatusCode;
-import android.hardware.wifi.supplicant.SupplicantStatusCode;
-import android.hardware.wifi.supplicant.WifiTechnology;
-import android.hardware.wifi.supplicant.WpaDriverCapabilitiesMask;
-import android.hardware.wifi.supplicant.WpsConfigError;
-import android.hardware.wifi.supplicant.WpsConfigMethods;
-import android.hardware.wifi.supplicant.WpsErrorIndication;
-import android.net.MacAddress;
-import android.net.NetworkAgent;
-import android.net.wifi.ScanResult;
-import android.net.wifi.SecurityParams;
-import android.net.wifi.SupplicantState;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiManager;
-import android.net.wifi.WifiSsid;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.ServiceSpecificException;
-import android.os.test.TestLooper;
-import android.text.TextUtils;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.server.wifi.MboOceController.BtmFrameData;
-import com.android.server.wifi.hotspot2.AnqpEvent;
-import com.android.server.wifi.hotspot2.IconEvent;
-import com.android.server.wifi.hotspot2.WnmData;
-import com.android.server.wifi.util.NativeUtil;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Captor;
-import org.mockito.InOrder;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-
-/**
- * Unit tests for SupplicantStaIfaceHalAidlImpl
- */
-@SmallTest
-public class SupplicantStaIfaceHalAidlImplTest extends WifiBaseTest {
-    private static final Map<Integer, String> NETWORK_ID_TO_SSID = new HashMap<Integer, String>() {{
-            put(1, "\"ssid1\"");
-            put(2, "\"ssid2\"");
-            put(3, "\"ssid3\"");
-        }};
-    private static final int SUPPLICANT_NETWORK_ID = 2;
-    private static final String SUPPLICANT_SSID = NETWORK_ID_TO_SSID.get(SUPPLICANT_NETWORK_ID);
-    private static final int ROAM_NETWORK_ID = 4;
-    private static final String BSSID = "fa:45:23:23:12:12";
-    private static final String WLAN0_IFACE_NAME = "wlan0";
-    private static final String WLAN1_IFACE_NAME = "wlan1";
-    private static final String P2P_IFACE_NAME = "p2p0";
-    private static final String ICON_FILE_NAME  = "blahblah";
-    private static final int ICON_FILE_SIZE = 72;
-    private static final String HS20_URL = "http://blahblah";
-    private static final long PMK_CACHE_EXPIRATION_IN_SEC = 1024;
-    private static final byte[] CONNECTED_MAC_ADDRESS_BYTES = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05};
-
-    private @Mock ISupplicant mISupplicantMock;
-    private @Mock IBinder mServiceBinderMock;
-    private @Mock ISupplicantStaIface mISupplicantStaIfaceMock;
-    private @Mock Context mContext;
-    private @Mock WifiMonitor mWifiMonitor;
-    private @Mock SupplicantStaNetworkHalAidlImpl mSupplicantStaNetworkMock;
-    private @Mock WifiNative.SupplicantDeathEventHandler mSupplicantHalDeathHandler;
-    private @Mock Clock mClock;
-    private @Mock WifiMetrics mWifiMetrics;
-    private @Mock WifiGlobals mWifiGlobals;
-    private @Mock PmkCacheManager mPmkCacheManager;
-
-    private @Captor ArgumentCaptor<List<SupplicantStaIfaceHal.QosPolicyRequest>>
-            mQosPolicyRequestListCaptor;
-
-    IfaceInfo[] mIfaceInfoList;
-    ISupplicantStaIfaceCallback mISupplicantStaIfaceCallback;
-
-    private TestLooper mLooper = new TestLooper();
-    private Handler mHandler = null;
-    private SupplicantStaIfaceHalSpy mDut;
-    private ArgumentCaptor<IBinder.DeathRecipient> mSupplicantDeathCaptor =
-            ArgumentCaptor.forClass(IBinder.DeathRecipient.class);
-
-    private class SupplicantStaIfaceHalSpy extends SupplicantStaIfaceHalAidlImpl {
-        SupplicantStaNetworkHalAidlImpl mStaNetwork;
-
-        SupplicantStaIfaceHalSpy() {
-            super(mContext, mWifiMonitor, mHandler, mClock, mWifiMetrics, mWifiGlobals);
-            mStaNetwork = mSupplicantStaNetworkMock;
-        }
-
-        @Override
-        protected ISupplicant getSupplicantMockable() {
-            return mISupplicantMock;
-        }
-
-        @Override
-        protected IBinder getServiceBinderMockable() {
-            return mServiceBinderMock;
-        }
-
-        @Override
-        protected SupplicantStaNetworkHalAidlImpl getStaNetworkHalMockable(
-                @NonNull String ifaceName, ISupplicantStaNetwork network) {
-            return mStaNetwork;
-        }
-
-        private void setStaNetworkMockable(SupplicantStaNetworkHalAidlImpl network) {
-            mStaNetwork = network;
-        }
-
-        @Override
-        public boolean initialize() {
-            return true;
-        }
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mIfaceInfoList = new IfaceInfo[3];
-        mIfaceInfoList[0] = createIfaceInfo(IfaceType.STA, WLAN0_IFACE_NAME);
-        mIfaceInfoList[1] = createIfaceInfo(IfaceType.STA, WLAN1_IFACE_NAME);
-        mIfaceInfoList[2] = createIfaceInfo(IfaceType.P2P, P2P_IFACE_NAME);
-        doReturn(CONNECTED_MAC_ADDRESS_BYTES).when(mISupplicantStaIfaceMock).getMacAddress();
-        mHandler = spy(new Handler(mLooper.getLooper()));
-        mDut = new SupplicantStaIfaceHalSpy();
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_success() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-    }
-
-    /**
-     * Tests the initialization flow, with a RemoteException thrown when addStaInterface is called.
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_remoteExceptionFailure() throws Exception {
-        executeAndValidateInitializationSequence(true, false);
-    }
-
-
-    /**
-     * Tests the initialization flow, with a null interface being returned by addStaInterface.
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_nullInterfaceFailure() throws Exception {
-        executeAndValidateInitializationSequence(false, true);
-    }
-
-    /**
-     * Ensures that we do not allow operations on an interface until it's setup.
-     */
-    @Test
-    public void testEnsureOperationFailsUntilSetupInterfaces() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        // Ensure that the cancelWps operation fails because the wlan1 interface is not set up.
-        assertFalse(mDut.cancelWps(WLAN1_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock, never()).cancelWps();
-
-        // Now setup the wlan1 interface and ensure that the cancelWps operation is successful.
-        assertTrue(mDut.setupIface(WLAN1_IFACE_NAME));
-        doNothing().when(mISupplicantStaIfaceMock).cancelWps();
-        assertTrue(mDut.cancelWps(WLAN1_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock).cancelWps();
-    }
-
-    /**
-     * Ensures that we reject the addition of an existing iface.
-     */
-    @Test
-    public void testDuplicateSetupIface_Fails() throws Exception {
-        executeAndValidateInitializationSequence();
-        // Trying setting up the wlan0 interface again & ensure it fails.
-        assertFalse(mDut.setupIface(WLAN0_IFACE_NAME));
-        verifyNoMoreInteractions(mISupplicantMock);
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal interface teardown.
-     */
-    @Test
-    public void testTeardownInterface() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        doNothing().when(mISupplicantMock).removeInterface(any());
-        assertTrue(mDut.teardownIface(WLAN0_IFACE_NAME));
-        verify(mISupplicantMock).removeInterface(any());
-
-        // Ensure that the cancelWps operation fails because there are no interfaces set up.
-        assertFalse(mDut.cancelWps(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock, never()).cancelWps();
-    }
-
-    /**
-     * Ensures that we reject removal of an invalid iface.
-     */
-    @Test
-    public void testInvalidTeardownInterface_Fails() throws Exception {
-        assertFalse(mDut.teardownIface(WLAN0_IFACE_NAME));
-        verifyNoMoreInteractions(mISupplicantMock);
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal initialization
-     * Asserts successful initialization of second interface
-     */
-    @Test
-    public void testSetupTwoInterfaces() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.setupIface(WLAN1_IFACE_NAME));
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal interface teardown.
-     * Asserts successful initialization of second interface.
-     */
-    @Test
-    public void testTeardownTwoInterfaces() throws Exception {
-        testSetupTwoInterfaces();
-        assertTrue(mDut.teardownIface(WLAN0_IFACE_NAME));
-        assertTrue(mDut.teardownIface(WLAN1_IFACE_NAME));
-
-        // Ensure that the cancelWps operation fails because there are no interfaces set up.
-        assertFalse(mDut.cancelWps(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock, never()).cancelWps();
-    }
-
-    /**
-     * Tests connection to a specified network with empty existing network.
-     */
-    @Test
-    public void testConnectWithEmptyExistingNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        executeAndValidateConnectSequence(0, false);
-    }
-
-    /**
-     * Tests that calling connectToNetwork with a different config removes the
-     * old network and replaces it with the new one.
-     */
-    @Test
-    public void testConnectToNetworkWithDifferentConfigReplacesNetworkInSupplicant()
-            throws Exception {
-        executeAndValidateInitializationSequence();
-        WifiConfiguration config = executeAndValidateConnectSequence(
-                SUPPLICANT_NETWORK_ID, false);
-        // Reset mocks for mISupplicantStaIfaceMock because we finished the first connection.
-        reset(mISupplicantStaIfaceMock);
-        setupMocksForConnectSequence(true);
-        // Make this network different by changing SSID.
-        config.SSID = "AnDifferentSSID";
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-        verify(mISupplicantStaIfaceMock).removeNetwork(SUPPLICANT_NETWORK_ID);
-        verify(mISupplicantStaIfaceMock).addNetwork();
-    }
-
-    /**
-     * Tests that calling connectToNetwork with the same config does not trigger the
-     * removal of the old network and addition of a new one.
-     */
-    @Test
-    public void connectToNetworkWithSameNetworkDoesNotRemoveNetworkFromSupplicant()
-            throws Exception {
-        executeAndValidateInitializationSequence();
-        WifiConfiguration config = executeAndValidateConnectSequence(SUPPLICANT_NETWORK_ID, false);
-        // Reset mocks for mISupplicantStaIfaceMock because we finished the first connection.
-        reset(mISupplicantStaIfaceMock);
-        setupMocksForConnectSequence(true /*haveExistingNetwork*/);
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-        verify(mISupplicantStaIfaceMock, never()).removeNetwork(anyInt());
-        verify(mISupplicantStaIfaceMock, never()).addNetwork();
-    }
-
-    /**
-     * Tests that calling connectToNetwork with the same network but a different bssid
-     * updates the bssid, but does not trigger the removal of the old network and addition
-     * of a new one.
-     */
-    @Test
-    public void connectToNetworkWithSameNetworkButDifferentBssidUpdatesNetworkFromSupplicant()
-            throws Exception {
-        executeAndValidateInitializationSequence();
-        WifiConfiguration config = executeAndValidateConnectSequence(SUPPLICANT_NETWORK_ID, false);
-        String testBssid = "11:22:33:44:55:66";
-        when(mSupplicantStaNetworkMock.setBssid(eq(testBssid))).thenReturn(true);
-
-        // Reset mocks for mISupplicantStaIfaceMock because we finished the first connection.
-        reset(mISupplicantStaIfaceMock);
-        setupMocksForConnectSequence(true /*haveExistingNetwork*/);
-        // Change the BSSID and connect to the same network.
-        assertFalse(TextUtils.equals(
-                testBssid, config.getNetworkSelectionStatus().getNetworkSelectionBSSID()));
-        config.getNetworkSelectionStatus().setNetworkSelectionBSSID(testBssid);
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-        verify(mSupplicantStaNetworkMock).setBssid(eq(testBssid));
-        verify(mISupplicantStaIfaceMock, never()).removeNetwork(anyInt());
-        verify(mISupplicantStaIfaceMock, never()).addNetwork();
-    }
-
-    /**
-     * Tests connection to a specified network failure due to network add.
-     */
-    @Test
-    public void testConnectFailureDueToNetworkAddFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        setupMocksForConnectSequence(false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantStaIfaceMock).addNetwork();
-        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
-    }
-
-    /**
-     * Tests connection to a specified network failure due to network save.
-     */
-    @Test
-    public void testConnectFailureDueToNetworkSaveFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        setupMocksForConnectSequence(true);
-
-        when(mSupplicantStaNetworkMock.saveWifiConfiguration(any(WifiConfiguration.class)))
-                .thenReturn(false);
-
-        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
-        // We should have removed the existing network once before connection and once more
-        // on failure to save network configuration.
-        verify(mISupplicantStaIfaceMock, times(2)).removeNetwork(anyInt());
-    }
-
-    /**
-     * Tests connection to a specified network failure due to exception in network save.
-     */
-    @Test
-    public void testConnectFailureDueToNetworkSaveException() throws Exception {
-        executeAndValidateInitializationSequence();
-        setupMocksForConnectSequence(true);
-
-        doThrow(new IllegalArgumentException())
-                .when(mSupplicantStaNetworkMock).saveWifiConfiguration(
-                any(WifiConfiguration.class));
-
-        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
-        // We should have removed the existing network once before connection and once more
-        // on failure to save network configuration.
-        verify(mISupplicantStaIfaceMock, times(2)).removeNetwork(anyInt());
-    }
-
-    /**
-     * Tests connection to a specified network failure due to network select.
-     */
-    @Test
-    public void testConnectFailureDueToNetworkSelectFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        setupMocksForConnectSequence(false);
-
-        when(mSupplicantStaNetworkMock.select()).thenReturn(false);
-
-        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
-    }
-
-    /**
-     * Tests roaming to the same network as the currently connected one.
-     */
-    @Test
-    public void testRoamToSameNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        executeAndValidateRoamSequence(true, false);
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
-    }
-
-    /**
-     * Tests roaming to a different network.
-     */
-    @Test
-    public void testRoamToDifferentNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        executeAndValidateRoamSequence(false, false);
-    }
-
-    /**
-     * Tests framework roaming to a linked network.
-     */
-    @Test
-    public void testRoamToLinkedNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        executeAndValidateRoamSequence(false, true);
-    }
-
-    /**
-     * Tests updating linked networks for a network id
-     */
-    @Test
-    public void testUpdateLinkedNetworks() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        final int frameworkNetId = 1;
-        final int supplicantNetId = 10;
-
-        // No current network in supplicant, return false
-        assertFalse(mDut.updateLinkedNetworks(
-                WLAN0_IFACE_NAME, SUPPLICANT_NETWORK_ID, null));
-
-        WifiConfiguration config = executeAndValidateConnectSequence(
-                frameworkNetId, false);
-
-        // Mismatched framework network id, return false
-        assertFalse(mDut.updateLinkedNetworks(WLAN0_IFACE_NAME, frameworkNetId + 1, null));
-
-        // Supplicant network id is invalid, return false
-        when(mSupplicantStaNetworkMock.getNetworkId()).thenReturn(-1);
-        assertFalse(mDut.updateLinkedNetworks(WLAN0_IFACE_NAME, frameworkNetId, null));
-
-        // Supplicant failed to return network list, return false
-        when(mSupplicantStaNetworkMock.getNetworkId()).thenReturn(supplicantNetId);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantStaIfaceMock).listNetworks();
-        assertFalse(mDut.updateLinkedNetworks(
-                WLAN0_IFACE_NAME, frameworkNetId, null));
-
-        // Supplicant returned a null network list, return false
-        doReturn(null).when(mISupplicantStaIfaceMock).listNetworks();
-        assertFalse(mDut.updateLinkedNetworks(
-                WLAN0_IFACE_NAME, frameworkNetId, null));
-
-        // Successfully link a network to the current network
-        int[] supplicantNetIds = new int[1];
-        supplicantNetIds[0] = supplicantNetId;
-        doReturn(supplicantNetIds).when(mISupplicantStaIfaceMock).listNetworks();
-        WifiConfiguration linkedConfig = new WifiConfiguration();
-        linkedConfig.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
-        Map<String, WifiConfiguration> linkedNetworks = new HashMap<>();
-        linkedNetworks.put(linkedConfig.getProfileKey(), linkedConfig);
-        SupplicantStaNetworkHalAidlImpl linkedNetworkHandle =
-                mock(SupplicantStaNetworkHalAidlImpl.class);
-        when(linkedNetworkHandle.getNetworkId()).thenReturn(supplicantNetId + 1);
-        when(linkedNetworkHandle.saveWifiConfiguration(linkedConfig)).thenReturn(true);
-        when(linkedNetworkHandle.select()).thenReturn(true);
-        mDut.setStaNetworkMockable(linkedNetworkHandle);
-        assertTrue(mDut.updateLinkedNetworks(
-                WLAN0_IFACE_NAME, frameworkNetId, linkedNetworks));
-
-        // Successfully remove linked network but not the current network from supplicant
-        supplicantNetIds = new int[2];
-        supplicantNetIds[0] = supplicantNetId;
-        supplicantNetIds[1] = supplicantNetId + 1;
-        doReturn(supplicantNetIds).when(mISupplicantStaIfaceMock).listNetworks();
-        doNothing().when(mISupplicantStaIfaceMock).removeNetwork(supplicantNetId + 1);
-        assertTrue(mDut.updateLinkedNetworks(
-                WLAN0_IFACE_NAME, frameworkNetId, null));
-        verify(mISupplicantStaIfaceMock).removeNetwork(supplicantNetId + 1);
-        verify(mISupplicantStaIfaceMock, never()).removeNetwork(supplicantNetId);
-    }
-
-    /**
-     * Tests roaming failure because of unable to set bssid.
-     */
-    @Test
-    public void testRoamFailureDueToBssidSet() throws Exception {
-        executeAndValidateInitializationSequence();
-        int connectedNetworkId = 5;
-        executeAndValidateConnectSequence(connectedNetworkId, false);
-        when(mSupplicantStaNetworkMock.setBssid(anyString())).thenReturn(false);
-
-        WifiConfiguration roamingConfig = new WifiConfiguration();
-        roamingConfig.networkId = connectedNetworkId;
-        roamingConfig.getNetworkSelectionStatus().setNetworkSelectionBSSID("45:34:23:23:ab:ed");
-        assertFalse(mDut.roamToNetwork(WLAN0_IFACE_NAME, roamingConfig));
-    }
-
-    /**
-     * Tests removal of all configured networks from wpa_supplicant.
-     */
-    @Test
-    public void testRemoveAllNetworks() throws Exception {
-        executeAndValidateInitializationSequence();
-        Set<Integer> keys = NETWORK_ID_TO_SSID.keySet();
-        int[] networks = new int[keys.size()];
-        int index = 0;
-        for (Integer e : keys) {
-            networks[index++] = e;
-        }
-
-        doReturn(networks).when(mISupplicantStaIfaceMock).listNetworks();
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public void answer(int id) {
-                assertTrue(NETWORK_ID_TO_SSID.containsKey(id));
-            }
-        }).when(mISupplicantStaIfaceMock).removeNetwork(anyInt());
-
-        assertTrue(mDut.removeAllNetworks(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock, times(NETWORK_ID_TO_SSID.size())).removeNetwork(anyInt());
-    }
-
-    /**
-     * Remove all networks while connected, verify that the current network info is resetted.
-     */
-    @Test
-    public void testRemoveAllNetworksWhileConnected() throws Exception {
-        String testBssid = "11:22:33:44:55:66";
-        when(mSupplicantStaNetworkMock.setBssid(eq(testBssid))).thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-
-        // Connect to a network and verify current network is set.
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, testBssid));
-        verify(mSupplicantStaNetworkMock).setBssid(eq(testBssid));
-        reset(mSupplicantStaNetworkMock);
-
-        // Remove all networks and verify current network info is resetted.
-        assertTrue(mDut.removeAllNetworks(WLAN0_IFACE_NAME));
-        assertFalse(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, testBssid));
-        verify(mSupplicantStaNetworkMock, never()).setBssid(eq(testBssid));
-    }
-
-    /**
-     * Tests roaming failure because of unable to reassociate.
-     */
-    @Test
-    public void testRoamFailureDueToReassociate() throws Exception {
-        executeAndValidateInitializationSequence();
-        int connectedNetworkId = 5;
-        executeAndValidateConnectSequence(connectedNetworkId, false);
-
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantStaIfaceMock).reassociate();
-        when(mSupplicantStaNetworkMock.setBssid(anyString())).thenReturn(true);
-
-        WifiConfiguration roamingConfig = new WifiConfiguration();
-        roamingConfig.networkId = connectedNetworkId;
-        roamingConfig.getNetworkSelectionStatus().setNetworkSelectionBSSID("45:34:23:23:ab:ed");
-        assertFalse(mDut.roamToNetwork(WLAN0_IFACE_NAME, roamingConfig));
-    }
-
-    /**
-     * Tests the retrieval of WPS NFC token.
-     */
-    @Test
-    public void testGetCurrentNetworkWpsNfcConfigurationToken() throws Exception {
-        String token = "45adbc1";
-        when(mSupplicantStaNetworkMock.getWpsNfcConfigurationToken()).thenReturn(token);
-
-        executeAndValidateInitializationSequence();
-        // Return null when not connected to the network.
-        assertTrue(mDut.getCurrentNetworkWpsNfcConfigurationToken(WLAN0_IFACE_NAME) == null);
-        verify(mSupplicantStaNetworkMock, never()).getWpsNfcConfigurationToken();
-        executeAndValidateConnectSequence(4, false);
-        assertEquals(token, mDut.getCurrentNetworkWpsNfcConfigurationToken(WLAN0_IFACE_NAME));
-        verify(mSupplicantStaNetworkMock).getWpsNfcConfigurationToken();
-    }
-
-    /**
-     * Tests the setting of BSSID.
-     */
-    @Test
-    public void testSetCurrentNetworkBssid() throws Exception {
-        String bssidStr = "34:34:12:12:12:90";
-        when(mSupplicantStaNetworkMock.setBssid(eq(bssidStr))).thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        // Fail when not connected to a network.
-        assertFalse(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, bssidStr));
-        verify(mSupplicantStaNetworkMock, never()).setBssid(eq(bssidStr));
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, bssidStr));
-        verify(mSupplicantStaNetworkMock).setBssid(eq(bssidStr));
-    }
-
-    /**
-     * Tests the sending identity response for the current network.
-     */
-    @Test
-    public void testSetCurrentNetworkEapIdentityResponse() throws Exception {
-        String identity = "blah@blah.com";
-        String encryptedIdentity = "blah2@blah.com";
-        when(mSupplicantStaNetworkMock.sendNetworkEapIdentityResponse(eq(identity),
-                eq(encryptedIdentity)))
-                .thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        // Fail when not connected to a network.
-        assertFalse(mDut.sendCurrentNetworkEapIdentityResponse(WLAN0_IFACE_NAME, identity,
-                encryptedIdentity));
-        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapIdentityResponse(eq(identity),
-                eq(encryptedIdentity));
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.sendCurrentNetworkEapIdentityResponse(WLAN0_IFACE_NAME, identity,
-                encryptedIdentity));
-        verify(mSupplicantStaNetworkMock).sendNetworkEapIdentityResponse(eq(identity),
-                eq(encryptedIdentity));
-    }
-
-    /**
-     * Tests the getting of anonymous identity for the current network.
-     */
-    @Test
-    public void testGetCurrentNetworkEapAnonymousIdentity() throws Exception {
-        String anonymousIdentity = "aaa@bbb.ccc";
-        when(mSupplicantStaNetworkMock.fetchEapAnonymousIdentity())
-                .thenReturn(anonymousIdentity);
-        executeAndValidateInitializationSequence();
-
-        // Return null when not connected to the network.
-        assertEquals(null, mDut.getCurrentNetworkEapAnonymousIdentity(WLAN0_IFACE_NAME));
-        executeAndValidateConnectSequence(4, false);
-        // Return anonymous identity for the current network.
-        assertEquals(
-                anonymousIdentity, mDut.getCurrentNetworkEapAnonymousIdentity(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Tests the sending gsm auth response for the current network.
-     */
-    @Test
-    public void testSetCurrentNetworkEapSimGsmAuthResponse() throws Exception {
-        String params = "test";
-        when(mSupplicantStaNetworkMock.sendNetworkEapSimGsmAuthResponse(eq(params)))
-                .thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        // Fail when not connected to a network.
-        assertFalse(mDut.sendCurrentNetworkEapSimGsmAuthResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapSimGsmAuthResponse(eq(params));
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.sendCurrentNetworkEapSimGsmAuthResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock).sendNetworkEapSimGsmAuthResponse(eq(params));
-    }
-
-    /**
-     * Tests the sending umts auth response for the current network.
-     */
-    @Test
-    public void testSetCurrentNetworkEapSimUmtsAuthResponse() throws Exception {
-        String params = "test";
-        when(mSupplicantStaNetworkMock.sendNetworkEapSimUmtsAuthResponse(eq(params)))
-                .thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        // Fail when not connected to a network.
-        assertFalse(mDut.sendCurrentNetworkEapSimUmtsAuthResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapSimUmtsAuthResponse(eq(params));
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.sendCurrentNetworkEapSimUmtsAuthResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock).sendNetworkEapSimUmtsAuthResponse(eq(params));
-    }
-
-    /**
-     * Tests the sending umts auts response for the current network.
-     */
-    @Test
-    public void testSetCurrentNetworkEapSimUmtsAutsResponse() throws Exception {
-        String params = "test";
-        when(mSupplicantStaNetworkMock.sendNetworkEapSimUmtsAutsResponse(eq(params)))
-                .thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        // Fail when not connected to a network.
-        assertFalse(mDut.sendCurrentNetworkEapSimUmtsAutsResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapSimUmtsAutsResponse(eq(params));
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.sendCurrentNetworkEapSimUmtsAutsResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock).sendNetworkEapSimUmtsAutsResponse(eq(params));
-    }
-
-    /**
-     * Tests the setting of WPS device type.
-     */
-    @Test
-    public void testSetWpsDeviceType() throws Exception {
-        String validDeviceTypeStr = "10-0050F204-5";
-        byte[] expectedDeviceType = { 0x0, 0xa, 0x0, 0x50, (byte) 0xf2, 0x04, 0x0, 0x05};
-        String invalidDeviceType1Str = "10-02050F204-5";
-        String invalidDeviceType2Str = "10-0050F204-534";
-        doNothing().when(mISupplicantStaIfaceMock).setWpsDeviceType(any(byte[].class));
-
-        executeAndValidateInitializationSequence();
-
-        // This should work.
-        assertTrue(mDut.setWpsDeviceType(WLAN0_IFACE_NAME, validDeviceTypeStr));
-        verify(mISupplicantStaIfaceMock).setWpsDeviceType(eq(expectedDeviceType));
-
-        // This should not work
-        assertFalse(mDut.setWpsDeviceType(WLAN0_IFACE_NAME, invalidDeviceType1Str));
-        assertFalse(mDut.setWpsDeviceType(WLAN0_IFACE_NAME, invalidDeviceType2Str));
-    }
-
-    /**
-     * Tests the setting of WPS config methods.
-     */
-    @Test
-    public void testSetWpsConfigMethods() throws Exception {
-        String validConfigMethodsStr = "physical_display virtual_push_button";
-        int expectedConfigMethods = WpsConfigMethods.PHY_DISPLAY | WpsConfigMethods.VIRT_PUSHBUTTON;
-        String invalidConfigMethodsStr = "physical_display virtual_push_button test";
-        doNothing().when(mISupplicantStaIfaceMock).setWpsConfigMethods(anyInt());
-
-        executeAndValidateInitializationSequence();
-
-        // This should work.
-        assertTrue(mDut.setWpsConfigMethods(WLAN0_IFACE_NAME, validConfigMethodsStr));
-        verify(mISupplicantStaIfaceMock).setWpsConfigMethods(eq(expectedConfigMethods));
-
-        // This should throw an illegal argument exception.
-        try {
-            assertFalse(mDut.setWpsConfigMethods(WLAN0_IFACE_NAME, invalidConfigMethodsStr));
-        } catch (IllegalArgumentException e) {
-            return;
-        }
-        assertTrue(false);
-    }
-
-    /**
-     * Tests the handling of ANQP done callback.
-     * Note: Since the ANQP element parsing methods are static, this can only test the negative test
-     * where all the parsing fails because the data is empty. It'll be non-trivial and unnecessary
-     * to test out the parsing logic here.
-     */
-    @Test
-    public void testAnqpDoneCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        mISupplicantStaIfaceCallback.onAnqpQueryDone(bssid, new AnqpData(), new Hs20AnqpData());
-
-        ArgumentCaptor<AnqpEvent> anqpEventCaptor = ArgumentCaptor.forClass(AnqpEvent.class);
-        verify(mWifiMonitor).broadcastAnqpDoneEvent(
-                eq(WLAN0_IFACE_NAME), anqpEventCaptor.capture());
-        assertEquals(
-                ByteBufferReader.readInteger(
-                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
-                anqpEventCaptor.getValue().getBssid());
-    }
-
-    /**
-     * Tests the handling of Icon done callback.
-     */
-    @Test
-    public void testIconDoneCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        byte[] iconData = new byte[ICON_FILE_SIZE];
-        new Random().nextBytes(iconData);
-        mISupplicantStaIfaceCallback.onHs20IconQueryDone(bssid, ICON_FILE_NAME, iconData);
-
-        ArgumentCaptor<IconEvent> iconEventCaptor = ArgumentCaptor.forClass(IconEvent.class);
-        verify(mWifiMonitor).broadcastIconDoneEvent(
-                eq(WLAN0_IFACE_NAME), iconEventCaptor.capture());
-        assertEquals(
-                ByteBufferReader.readInteger(
-                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
-                iconEventCaptor.getValue().getBSSID());
-        assertEquals(ICON_FILE_NAME, iconEventCaptor.getValue().getFileName());
-        assertArrayEquals(iconData, iconEventCaptor.getValue().getData());
-    }
-
-    /**
-     * Tests the handling of HS20 subscription remediation callback.
-     */
-    @Test
-    public void testHs20SubscriptionRemediationCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        byte osuMethod = OsuMethod.OMA_DM;
-        mISupplicantStaIfaceCallback.onHs20SubscriptionRemediation(
-                bssid, osuMethod, HS20_URL);
-
-        ArgumentCaptor<WnmData> wnmDataCaptor = ArgumentCaptor.forClass(WnmData.class);
-        verify(mWifiMonitor).broadcastWnmEvent(eq(WLAN0_IFACE_NAME), wnmDataCaptor.capture());
-        assertEquals(
-                ByteBufferReader.readInteger(
-                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
-                wnmDataCaptor.getValue().getBssid());
-        assertEquals(osuMethod, wnmDataCaptor.getValue().getMethod());
-        assertEquals(HS20_URL, wnmDataCaptor.getValue().getUrl());
-    }
-
-    /**
-     * Tests the handling of HS20 deauth imminent callback.
-     */
-    @Test
-    public void testHs20DeauthImminentCallbackWithEssReasonCode() throws Exception {
-        executeAndValidateHs20DeauthImminentCallback(true);
-    }
-
-    /**
-     * Tests the handling of HS20 deauth imminent callback.
-     */
-    @Test
-    public void testHs20DeauthImminentCallbackWithNonEssReasonCode() throws Exception {
-        executeAndValidateHs20DeauthImminentCallback(false);
-    }
-
-    /**
-     * Tests the handling of HS20 Terms & Conditions acceptance callback.
-     */
-    @Test
-    public void testHs20TermsAndConditionsAcceptance() throws Exception {
-        executeAndValidateHs20TermsAndConditionsCallback();
-    }
-
-    /**
-     * Tests the handling of state change notification without any configured network.
-     */
-    @Test
-    public void testStateChangeCallbackWithNoConfiguredNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.INACTIVE,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-
-        // Can't compare WifiSsid instances because they lack an equals.
-        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiConfiguration.INVALID_NETWORK_ID),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.INACTIVE));
-    }
-
-    /**
-     * Tests the handling of state change notification to associated after configuring a network.
-     */
-    @Test
-    public void testStateChangeToAssociatedCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        int frameworkNetworkId = 6;
-        executeAndValidateConnectSequence(frameworkNetworkId, false);
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.ASSOCIATED,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-
-        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.ASSOCIATED));
-    }
-
-    /**
-     * Tests the handling of state change notification to completed after configuring a network.
-     */
-    @Test
-    public void testStateChangeToCompletedCallback() throws Exception {
-        InOrder wifiMonitorInOrder = inOrder(mWifiMonitor);
-        executeAndValidateInitializationSequence();
-        int frameworkNetworkId = 6;
-        executeAndValidateConnectSequence(frameworkNetworkId, false);
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.COMPLETED,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)));
-
-        wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(false), eq(wifiSsid), eq(BSSID));
-        wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
-    }
-
-    /**
-     * Tests the handling of network disconnected notification.
-     */
-    @Test
-    public void testDisconnectedCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        // Set the SSID for the current connection.
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        int reasonCode = 5;
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor).broadcastNetworkDisconnectionEvent(
-                eq(WLAN0_IFACE_NAME), eq(true), eq(reasonCode), eq(SUPPLICANT_SSID), eq(BSSID));
-
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-        verify(mWifiMonitor).broadcastNetworkDisconnectionEvent(
-                eq(WLAN0_IFACE_NAME), eq(false), eq(reasonCode), eq(SUPPLICANT_SSID), eq(BSSID));
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords.
-     */
-    @Test
-    public void testAuthFailurePasswordOnDisconnect() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        executeAndValidateConnectSequenceWithKeyMgmt(
-                0, false, WifiConfiguration.SECURITY_TYPE_PSK, null);
-
-        int reasonCode = 3;
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0))
-                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt(), any(), any());
-
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-        verify(mWifiMonitor, times(0))
-                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt(), any(), any());
-
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.FOURWAY_HANDSHAKE,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD), eq(-1),
-                eq(SUPPLICANT_SSID), eq(MacAddress.fromString(BSSID)));
-    }
-
-    /**
-     * Tests the handling of EAP failure disconnects.
-     */
-    @Test
-    public void testAuthFailureEapOnDisconnect() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        executeAndValidateConnectSequenceWithKeyMgmt(
-                0, false, WifiConfiguration.SECURITY_TYPE_EAP, null);
-
-        int reasonCode = 3;
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0))
-                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt(), any(), any());
-
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-        verify(mWifiMonitor, times(0))
-                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt(), any(), any());
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.ASSOCIATED,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        // Ensure we don't lose our prev state with this state changed event.
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.DISCONNECTED,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE), eq(-1),
-                eq(SUPPLICANT_SSID), eq(MacAddress.fromString(BSSID)));
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords for WPA3-Personal networks
-     */
-    @Test
-    public void testWpa3AuthRejectionPassword() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        executeAndValidateConnectSequenceWithKeyMgmt(SUPPLICANT_NETWORK_ID, false,
-                WifiConfiguration.SECURITY_TYPE_SAE, null);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        int statusCode = StaIfaceStatusCode.UNSPECIFIED_FAILURE;
-        AssociationRejectionData rejectionData = createAssocRejectData(SUPPLICANT_SSID, BSSID,
-                statusCode, false);
-        mISupplicantStaIfaceCallback.onAssociationRejected(rejectionData);
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
-                eq(WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD), eq(-1), eq(SUPPLICANT_SSID),
-                eq(MacAddress.fromString(BSSID)));
-        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
-                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
-        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
-                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
-        AssocRejectEventInfo assocRejectEventInfo = assocRejectEventInfoCaptor.getValue();
-        assertNotNull(assocRejectEventInfo);
-        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
-        assertEquals(BSSID, assocRejectEventInfo.bssid);
-        assertEquals(SupplicantStaIfaceCallbackAidlImpl.halToFrameworkStatusCode(
-                statusCode), assocRejectEventInfo.statusCode);
-        assertFalse(assocRejectEventInfo.timedOut);
-        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
-        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
-    }
-
-    /**
-     * Tests the handling of association rejection for WPA3-Personal networks
-     */
-    @Test
-    public void testWpa3AuthRejectionEverConnected() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        WifiConfiguration config = executeAndValidateConnectSequenceWithKeyMgmt(
-                SUPPLICANT_NETWORK_ID, false,
-                WifiConfiguration.SECURITY_TYPE_SAE, null, true);
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        int statusCode = StaIfaceStatusCode.UNSPECIFIED_FAILURE;
-        AssociationRejectionData rejectionData = createAssocRejectData(SUPPLICANT_SSID, BSSID,
-                statusCode, false);
-        mISupplicantStaIfaceCallback.onAssociationRejected(rejectionData);
-        verify(mWifiMonitor, never()).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
-                anyInt(), anyInt(), any(), any());
-        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
-                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
-        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
-                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
-        AssocRejectEventInfo assocRejectEventInfo = assocRejectEventInfoCaptor.getValue();
-        assertNotNull(assocRejectEventInfo);
-        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
-        assertEquals(BSSID, assocRejectEventInfo.bssid);
-        assertEquals(SupplicantStaIfaceCallbackAidlImpl.halToFrameworkStatusCode(
-                statusCode), assocRejectEventInfo.statusCode);
-        assertFalse(assocRejectEventInfo.timedOut);
-        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
-        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords for WEP networks.
-     */
-    @Test
-    public void testWepAuthRejectionPassword() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        executeAndValidateConnectSequenceWithKeyMgmt(SUPPLICANT_NETWORK_ID, false,
-                WifiConfiguration.SECURITY_TYPE_WEP, "97CA326539");
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        int statusCode = StaIfaceStatusCode.CHALLENGE_FAIL;
-        AssociationRejectionData rejectionData = createAssocRejectData(SUPPLICANT_SSID, BSSID,
-                statusCode, false);
-        mISupplicantStaIfaceCallback.onAssociationRejected(rejectionData);
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
-                eq(WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD), eq(-1), eq(SUPPLICANT_SSID),
-                eq(MacAddress.fromString(BSSID)));
-        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
-                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
-        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
-                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
-        AssocRejectEventInfo assocRejectEventInfo =
-                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
-        assertNotNull(assocRejectEventInfo);
-        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
-        assertEquals(BSSID, assocRejectEventInfo.bssid);
-        assertEquals(SupplicantStaIfaceCallbackAidlImpl.halToFrameworkStatusCode(
-                statusCode), assocRejectEventInfo.statusCode);
-        assertFalse(assocRejectEventInfo.timedOut);
-        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
-        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords, edge case.
-     *
-     * If the network is removed during 4-way handshake, do not call it a password mismatch.
-     */
-    @Test
-    public void testNetworkRemovedDuring4way() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        int reasonCode = 3;
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.FOURWAY_HANDSHAKE,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        mISupplicantStaIfaceCallback.onNetworkRemoved(SUPPLICANT_NETWORK_ID);
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
-                anyInt(), any(), any());
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords, edge case.
-     *
-     * If the disconnect reason is "IE in 4way differs", do not call it a password mismatch.
-     */
-    @Test
-    public void testIeDiffers() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        int reasonCode = StaIfaceReasonCode.IE_IN_4WAY_DIFFERS;
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.FOURWAY_HANDSHAKE,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
-                anyInt(), any(), any());
-    }
-
-    /**
-     * Tests the handling of eap failure during disconnect.
-     */
-    @Test
-    public void testEapFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        int reasonCode = StaIfaceReasonCode.IEEE_802_1X_AUTH_FAILED;
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
-                anyInt(), any(), any());
-    }
-
-    /**
-     * Tests the handling of authentication timeout notification.
-     */
-    @Test
-    public void testAuthenticationTimeoutCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.COMPLETED,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        mISupplicantStaIfaceCallback.onAuthenticationTimeout(
-                NativeUtil.macAddressToByteArray(BSSID));
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
-                eq(WifiManager.ERROR_AUTH_FAILURE_TIMEOUT), eq(-1), eq(SUPPLICANT_SSID),
-                eq(MacAddress.fromString(BSSID)));
-    }
-
-    /**
-     * Tests the handling of bssid change notification.
-     */
-    @Test
-    public void testBssidChangedCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onBssidChanged(
-                BssidChangeReason.ASSOC_START, NativeUtil.macAddressToByteArray(BSSID));
-        verify(mWifiMonitor).broadcastTargetBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
-        verify(mWifiMonitor, never()).broadcastAssociatedBssidEvent(
-                eq(WLAN0_IFACE_NAME), eq(BSSID));
-
-        reset(mWifiMonitor);
-        mISupplicantStaIfaceCallback.onBssidChanged(
-                BssidChangeReason.ASSOC_COMPLETE, NativeUtil.macAddressToByteArray(BSSID));
-        verify(mWifiMonitor, never()).broadcastTargetBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
-        verify(mWifiMonitor).broadcastAssociatedBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
-
-        reset(mWifiMonitor);
-        mISupplicantStaIfaceCallback.onBssidChanged(
-                BssidChangeReason.DISASSOC, NativeUtil.macAddressToByteArray(BSSID));
-        verify(mWifiMonitor, never()).broadcastTargetBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
-        verify(mWifiMonitor, never()).broadcastAssociatedBssidEvent(
-                eq(WLAN0_IFACE_NAME), eq(BSSID));
-    }
-
-    /**
-     * Tests the handling of EAP failure notification.
-     */
-    @Test
-    public void testEapFailureCallback() throws Exception {
-        int eapFailureCode = WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED;
-        MacAddress bssid = MacAddress.fromString(BSSID);
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onEapFailure(bssid.toByteArray(), eapFailureCode);
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE),
-                eq(eapFailureCode), any(), eq(bssid));
-    }
-
-    /**
-     * Tests the handling of Wps success notification.
-     */
-    @Test
-    public void testWpsSuccessCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onWpsEventSuccess();
-        verify(mWifiMonitor).broadcastWpsSuccessEvent(eq(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Tests the handling of Wps fail notification.
-     */
-    @Test
-    public void testWpsFailureCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        short cfgError = WpsConfigError.MULTIPLE_PBC_DETECTED;
-        short errorInd = WpsErrorIndication.SECURITY_WEP_PROHIBITED;
-        mISupplicantStaIfaceCallback.onWpsEventFail(
-                NativeUtil.macAddressToByteArray(BSSID), cfgError, errorInd);
-        verify(mWifiMonitor).broadcastWpsFailEvent(eq(WLAN0_IFACE_NAME),
-                eq((int) cfgError), eq((int) errorInd));
-    }
-
-    /**
-     * Tests the handling of Wps fail notification.
-     */
-    @Test
-    public void testWpsTimeoutCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        short cfgError = WpsConfigError.MSG_TIMEOUT;
-        short errorInd = WpsErrorIndication.NO_ERROR;
-        mISupplicantStaIfaceCallback.onWpsEventFail(
-                NativeUtil.macAddressToByteArray(BSSID), cfgError, errorInd);
-        verify(mWifiMonitor).broadcastWpsTimeoutEvent(eq(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Tests the handling of Wps pbc overlap notification.
-     */
-    @Test
-    public void testWpsPbcOverlapCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onWpsEventPbcOverlap();
-        verify(mWifiMonitor).broadcastWpsOverlapEvent(eq(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Tests the handling of supplicant death notification.
-     */
-    @Test
-    public void testSupplicantDeathCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mSupplicantDeathCaptor.getValue());
-        assertTrue(mDut.isInitializationComplete());
-        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
-
-        mSupplicantDeathCaptor.getValue().binderDied();
-        mLooper.dispatchAll();
-
-        assertFalse(mDut.isInitializationComplete());
-        verify(mSupplicantHalDeathHandler).onDeath();
-    }
-
-    /**
-     * When wpa_supplicant is dead, we could end up getting a remote exception on a binder call
-     * and then the death notification.
-     */
-    @Test
-    public void testHandleRemoteExceptionAndDeathNotification() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
-        assertTrue(mDut.isInitializationComplete());
-
-        // Throw remote exception on a binder call.
-        doThrow(new RemoteException()).when(mISupplicantStaIfaceMock).setPowerSave(anyBoolean());
-        assertFalse(mDut.setPowerSave(WLAN0_IFACE_NAME, true));
-        verify(mISupplicantStaIfaceMock, times(1)).setPowerSave(true);
-
-        // Check that remote exception cleared all internal state.
-        assertFalse(mDut.isInitializationComplete());
-
-        // Ensure that further calls fail because the remote exception clears any state.
-        assertFalse(mDut.setPowerSave(WLAN0_IFACE_NAME, true));
-        verify(mISupplicantStaIfaceMock, times(1)).setPowerSave(true);
-        //.. No call to ISupplicantStaIface object
-
-        // Now trigger a death notification and ensure it's handled.
-        assertNotNull(mSupplicantDeathCaptor.getValue());
-        mSupplicantDeathCaptor.getValue().binderDied();
-        mLooper.dispatchAll();
-
-        // External death notification fires only once!
-        verify(mSupplicantHalDeathHandler).onDeath();
-    }
-
-    /**
-     * Tests the setting of log level.
-     */
-    @Test
-    public void testSetLogLevel() throws Exception {
-        doNothing().when(mISupplicantMock).setDebugParams(anyInt(), anyBoolean(), anyBoolean());
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.setLogLevel(true));
-
-        executeAndValidateInitializationSequence();
-
-        // This should work.
-        assertTrue(mDut.setLogLevel(true));
-        verify(mISupplicantMock)
-                .setDebugParams(eq(DebugLevel.DEBUG), eq(false), eq(false));
-    }
-
-    /**
-     * Tests the setting of log level with show key enabled.
-     */
-    @Test
-    public void testSetLogLevelWithShowKeyEnabled() throws Exception {
-        when(mWifiGlobals.getShowKeyVerboseLoggingModeEnabled())
-                .thenReturn(true);
-        doNothing().when(mISupplicantMock).setDebugParams(anyInt(), anyBoolean(), anyBoolean());
-
-        executeAndValidateInitializationSequence();
-
-        // This should work.
-        assertTrue(mDut.setLogLevel(true));
-        verify(mISupplicantMock)
-                .setDebugParams(eq(DebugLevel.DEBUG), eq(false), eq(true));
-    }
-
-    /**
-     * Tests that show key is not enabled when verbose logging is not enabled.
-     */
-    @Test
-    public void testVerboseLoggingDisabledWithShowKeyEnabled() throws Exception {
-        when(mWifiGlobals.getShowKeyVerboseLoggingModeEnabled())
-                .thenReturn(true);
-        doNothing().when(mISupplicantMock).setDebugParams(anyInt(), anyBoolean(), anyBoolean());
-
-        executeAndValidateInitializationSequence();
-
-        // If verbose logging is not enabled, show key should not be enabled.
-        assertTrue(mDut.setLogLevel(false));
-        verify(mISupplicantMock)
-                .setDebugParams(eq(DebugLevel.INFO), eq(false), eq(false));
-    }
-
-    /**
-     * Tests the setting of concurrency priority.
-     */
-    @Test
-    public void testConcurrencyPriority() throws Exception {
-        doNothing().when(mISupplicantMock).setConcurrencyPriority(anyInt());
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.setConcurrencyPriority(false));
-
-        executeAndValidateInitializationSequence();
-
-        // This should work.
-        assertTrue(mDut.setConcurrencyPriority(false));
-        verify(mISupplicantMock).setConcurrencyPriority(eq(IfaceType.P2P));
-        assertTrue(mDut.setConcurrencyPriority(true));
-        verify(mISupplicantMock).setConcurrencyPriority(eq(IfaceType.STA));
-    }
-
-    /**
-     * Tests the start of wps registrar.
-     */
-    @Test
-    public void testStartWpsRegistrar() throws Exception {
-        doNothing().when(mISupplicantStaIfaceMock)
-                .startWpsRegistrar(any(byte[].class), anyString());
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, null, null));
-
-        executeAndValidateInitializationSequence();
-
-        assertFalse(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, null, null));
-        verify(mISupplicantStaIfaceMock, never()).startWpsRegistrar(any(byte[].class), anyString());
-
-        assertFalse(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, new String(), "452233"));
-        verify(mISupplicantStaIfaceMock, never()).startWpsRegistrar(any(byte[].class), anyString());
-
-        assertTrue(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, "45:23:12:12:12:98", "562535"));
-        verify(mISupplicantStaIfaceMock).startWpsRegistrar(any(byte[].class), anyString());
-    }
-
-    /**
-     * Tests the start of wps PBC.
-     */
-    @Test
-    public void testStartWpsPbc() throws Exception {
-        doNothing().when(mISupplicantStaIfaceMock).startWpsPbc(any(byte[].class));
-        String bssid = "45:23:12:12:12:98";
-        byte[] bssidBytes = {0x45, 0x23, 0x12, 0x12, 0x12, (byte) 0x98};
-        byte[] anyBssidBytes = {0, 0, 0, 0, 0, 0};
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.startWpsPbc(WLAN0_IFACE_NAME, bssid));
-        verify(mISupplicantStaIfaceMock, never()).startWpsPbc(any(byte[].class));
-
-        executeAndValidateInitializationSequence();
-
-        assertTrue(mDut.startWpsPbc(WLAN0_IFACE_NAME, bssid));
-        verify(mISupplicantStaIfaceMock).startWpsPbc(eq(bssidBytes));
-
-        assertTrue(mDut.startWpsPbc(WLAN0_IFACE_NAME, null));
-        verify(mISupplicantStaIfaceMock).startWpsPbc(eq(anyBssidBytes));
-    }
-
-    /**
-     * Tests country code setter.
-     */
-    @Test
-    public void testSetCountryCode() throws Exception {
-        doNothing().when(mISupplicantStaIfaceMock).setCountryCode(any(byte[].class));
-        String testCountryCode = "US";
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.setCountryCode(WLAN0_IFACE_NAME, testCountryCode));
-        verify(mISupplicantStaIfaceMock, never()).setCountryCode(any(byte[].class));
-
-        executeAndValidateInitializationSequence();
-
-        assertTrue(mDut.setCountryCode(WLAN0_IFACE_NAME, testCountryCode));
-        verify(mISupplicantStaIfaceMock).setCountryCode(eq(testCountryCode.getBytes()));
-
-        // Bad input values should fail the call.
-        reset(mISupplicantStaIfaceMock);
-
-        assertFalse(mDut.setCountryCode(WLAN0_IFACE_NAME, null));
-        verify(mISupplicantStaIfaceMock, never()).setCountryCode(any(byte[].class));
-
-        assertFalse(mDut.setCountryCode(WLAN0_IFACE_NAME, "U"));
-        verify(mISupplicantStaIfaceMock, never()).setCountryCode(any(byte[].class));
-    }
-
-    /**
-     * Tests the terminate function and ensures that its callback gets called.
-     */
-    @Test
-    public void testTerminate() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public void answer(IBinder.DeathRecipient cb, int flags) throws RemoteException {
-                mHandler.post(() -> cb.binderDied());
-                mHandler.post(() -> mSupplicantDeathCaptor.getValue().binderDied());
-            }
-        }).when(mServiceBinderMock).linkToDeath(any(IBinder.DeathRecipient.class), anyInt());
-
-        mDut.terminate();
-        mLooper.dispatchAll();
-        verify(mISupplicantMock).terminate();
-
-        // Check that terminate cleared all internal state.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Helper function for tests involving getAdvancedCapabilities.
-     */
-    private void checkKeyMgmtCapabilities(int serviceCapabilities, long expectedCapabilities)
-            throws Exception {
-        executeAndValidateInitializationSequence();
-        doReturn(serviceCapabilities).when(mISupplicantStaIfaceMock).getKeyMgmtCapabilities();
-        expectedCapabilities = addDefaultKeyMgmtCap(expectedCapabilities);
-        assertEquals(expectedCapabilities, mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test WPA3-Personal SAE key management support.
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesWpa3Sae() throws Exception {
-        checkKeyMgmtCapabilities(KeyMgmtMask.SAE, WIFI_FEATURE_WPA3_SAE);
-    }
-
-    /**
-     * Test WPA3-Enterprise Suite-B-192 key management support.
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesWpa3SuiteB() throws Exception {
-        checkKeyMgmtCapabilities(KeyMgmtMask.SUITE_B_192, WIFI_FEATURE_WPA3_SUITE_B);
-    }
-
-    /**
-     * Test Enhanced Open (OWE) key management support.
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesOwe() throws Exception {
-        checkKeyMgmtCapabilities(KeyMgmtMask.OWE, WIFI_FEATURE_OWE);
-    }
-
-    /**
-     * Test Enhanced Open (OWE) and SAE key management support.
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesOweAndSae() throws Exception {
-        checkKeyMgmtCapabilities(KeyMgmtMask.OWE | KeyMgmtMask.SAE,
-                WIFI_FEATURE_OWE | WIFI_FEATURE_WPA3_SAE);
-    }
-
-    /**
-     * Test Easy Connect (DPP) key management support.
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesDpp() throws Exception {
-        checkKeyMgmtCapabilities(KeyMgmtMask.DPP, WIFI_FEATURE_DPP
-                        | WIFI_FEATURE_DPP_ENROLLEE_RESPONDER);
-    }
-
-    /**
-     * Test WAPI key management support.
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesWapi() throws Exception {
-        checkKeyMgmtCapabilities(KeyMgmtMask.WAPI_PSK, WIFI_FEATURE_WAPI);
-    }
-
-    /**
-     * Test FILS SHA256 key management support.
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesFilsSha256() throws Exception {
-        checkKeyMgmtCapabilities(KeyMgmtMask.FILS_SHA256, WIFI_FEATURE_FILS_SHA256);
-    }
-
-    /**
-     * Test FILS SHA384 key management support.
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesFilsSha384() throws Exception {
-        checkKeyMgmtCapabilities(KeyMgmtMask.FILS_SHA384, WIFI_FEATURE_FILS_SHA384);
-    }
-
-    /**
-     * Test adding PMK cache entry to the supplicant.
-     */
-    @Test
-    public void testSetPmkSuccess() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = testFrameworkNetworkId;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_EAP));
-        ArrayList<Byte> pmkCacheData = NativeUtil.byteArrayToArrayList("deadbeef".getBytes());
-        setupMocksForPmkCache(pmkCacheData);
-        setupMocksForConnectSequence(false);
-
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mPmkCacheManager).get(eq(testFrameworkNetworkId));
-        verify(mSupplicantStaNetworkMock).setPmkCache(eq(
-                NativeUtil.byteArrayFromArrayList(pmkCacheData)));
-        verify(mISupplicantStaIfaceCallback)
-                .onPmkCacheAdded(eq(PMK_CACHE_EXPIRATION_IN_SEC), eq(
-                        NativeUtil.byteArrayFromArrayList(pmkCacheData)));
-    }
-
-    /**
-     * Test adding PMK cache entry to the supplicant when SAE is selected
-     * for a PSK/SAE configuration.
-     */
-    @Test
-    public void testSetPmkWhenSaeIsSelected() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
-        config.networkId = testFrameworkNetworkId;
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_SAE));
-
-        ArrayList<Byte> pmkCacheData = NativeUtil.byteArrayToArrayList("deadbeef".getBytes());
-        byte[] cacheDataArr = NativeUtil.byteArrayFromArrayList(pmkCacheData);
-        setupMocksForPmkCache(pmkCacheData);
-        setupMocksForConnectSequence(false);
-
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mPmkCacheManager).get(eq(testFrameworkNetworkId));
-        verify(mSupplicantStaNetworkMock).setPmkCache(eq(cacheDataArr));
-        verify(mISupplicantStaIfaceCallback)
-                .onPmkCacheAdded(eq(PMK_CACHE_EXPIRATION_IN_SEC), eq(cacheDataArr));
-    }
-
-    /**
-     * Test PMK cache entry is not added to the supplicant when PSK is selected
-     * for a PSK/SAE configuration.
-     */
-    @Test
-    public void testAddPmkEntryNotCalledIfPskIsSelected() throws Exception {
-        int testFrameworkNetworkId = 9;
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
-        config.networkId = testFrameworkNetworkId;
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_PSK));
-
-        setupMocksForPmkCache();
-        setupMocksForConnectSequence(false);
-
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any());
-        verify(mISupplicantStaIfaceCallback, never())
-                .onPmkCacheAdded(anyLong(), any());
-    }
-
-    /**
-     * Test PMK cache entry is not added to the supplicant if no security
-     * params is selected.
-     */
-    @Test
-    public void testAddPmkEntryNotCalledIfNoSecurityParamsIsSelected() throws Exception {
-        int testFrameworkNetworkId = 9;
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
-        config.networkId = testFrameworkNetworkId;
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(null);
-
-        setupMocksForPmkCache();
-        setupMocksForConnectSequence(false);
-
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any());
-        verify(mISupplicantStaIfaceCallback, never())
-                .onPmkCacheAdded(anyLong(), any());
-    }
-
-    /**
-     * Test adding PMK cache entry is not called if there is no
-     * valid PMK cache for a corresponding configuration.
-     */
-    @Test
-    public void testAddPmkEntryNotCalledIfNoPmkCache() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = testFrameworkNetworkId;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
-
-        setupMocksForPmkCache(null);
-        setupMocksForConnectSequence(false);
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any(byte[].class));
-        verify(mISupplicantStaIfaceCallback, never()).onPmkCacheAdded(
-                anyLong(), any(byte[].class));
-    }
-
-    /**
-     * Tests that PMK cache entry is not added for PSK network.
-     */
-    @Test
-    public void testAddPmkEntryIsOmittedWithPskNetwork() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = testFrameworkNetworkId;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
-
-        setupMocksForPmkCache();
-        setupMocksForConnectSequence(false);
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mPmkCacheManager, never()).add(any(), anyInt(), anyLong(), any());
-        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any(byte[].class));
-        verify(mISupplicantStaIfaceCallback, never()).onPmkCacheAdded(
-                anyLong(), any(byte[].class));
-    }
-
-    /**
-     * Tests that PMK cache entry is not added for DPP network.
-     */
-    @Test
-    public void testAddPmkEntryIsOmittedWithDppNetwork() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = testFrameworkNetworkId;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_DPP);
-
-        setupMocksForPmkCache();
-        setupMocksForConnectSequence(false);
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mPmkCacheManager, never()).add(any(), anyInt(), anyLong(), any());
-        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any(byte[].class));
-        verify(mISupplicantStaIfaceCallback, never()).onPmkCacheAdded(
-                anyLong(), any(byte[].class));
-    }
-
-    /**
-     * Tests the handling of assoc reject for PMK cache
-     */
-    @Test
-    public void testRemovePmkEntryOnReceivingAssocReject() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = testFrameworkNetworkId;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
-
-        setupMocksForPmkCache();
-        setupMocksForConnectSequence(false);
-
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        int statusCode = 7;
-        AssociationRejectionData rejectionData = createAssocRejectData(SUPPLICANT_SSID, BSSID,
-                statusCode, false);
-        mISupplicantStaIfaceCallback.onAssociationRejected(rejectionData);
-        verify(mPmkCacheManager).remove(eq(testFrameworkNetworkId));
-    }
-
-    /**
-     * Test getConnectionCapabilities
-     */
-    @Test
-    public void testGetConnectionCapabilities() throws Exception {
-        executeAndValidateInitializationSequence();
-        int testWifiStandardWifiInfo = ScanResult.WIFI_STANDARD_LEGACY;
-        int testChannelBandwidth = ScanResult.CHANNEL_WIDTH_20MHZ;
-        int maxNumberTxSpatialStreams = 1;
-        int maxNumberRxSpatialStreams = 1;
-
-        ConnectionCapabilities halCap = new ConnectionCapabilities();
-        halCap.technology = WifiTechnology.LEGACY;
-        halCap.legacyMode = LegacyMode.B_MODE;
-        halCap.channelBandwidth = WifiChannelWidthInMhz.WIDTH_20;
-        halCap.maxNumberTxSpatialStreams = 1;
-        halCap.maxNumberRxSpatialStreams = 1;
-
-        doReturn(halCap).when(mISupplicantStaIfaceMock).getConnectionCapabilities();
-        WifiNative.ConnectionCapabilities expectedCap =
-                mDut.getConnectionCapabilities(WLAN0_IFACE_NAME);
-        assertEquals(testWifiStandardWifiInfo, expectedCap.wifiStandard);
-        assertEquals(true, expectedCap.is11bMode);
-        assertEquals(testChannelBandwidth, expectedCap.channelBandwidth);
-        assertEquals(maxNumberTxSpatialStreams, expectedCap.maxNumberTxSpatialStreams);
-        assertEquals(maxNumberRxSpatialStreams, expectedCap.maxNumberRxSpatialStreams);
-    }
-
-    /**
-     * Test Multi Band operation support (MBO).
-     */
-    @Test
-    public void testGetWpaDriverCapabilitiesMbo() throws Exception {
-        executeAndValidateInitializationSequence();
-        doReturn(WpaDriverCapabilitiesMask.MBO).when(mISupplicantStaIfaceMock)
-                .getWpaDriverCapabilities();
-        assertEquals(WIFI_FEATURE_MBO, mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test Optimized Connectivity support (OCE).
-     */
-    @Test
-    public void testGetWpaDriverCapabilitiesOce() throws Exception {
-        executeAndValidateInitializationSequence();
-        doReturn(WpaDriverCapabilitiesMask.MBO | WpaDriverCapabilitiesMask.OCE)
-                .when(mISupplicantStaIfaceMock).getWpaDriverCapabilities();
-        assertEquals(WIFI_FEATURE_MBO | WIFI_FEATURE_OCE,
-                mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test Trust On First Use support (TOFU).
-     */
-    @Test
-    public void testGetWpaDriverCapabilitiesTofu() throws Exception {
-        executeAndValidateInitializationSequence();
-        doReturn(WpaDriverCapabilitiesMask.TRUST_ON_FIRST_USE)
-                .when(mISupplicantStaIfaceMock).getWpaDriverCapabilities();
-        assertEquals(WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE,
-                mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test the handling of BSS transition request callback.
-     */
-    @Test
-    public void testBssTmHandlingDoneCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        mISupplicantStaIfaceCallback.onBssTmHandlingDone(new BssTmData());
-
-        ArgumentCaptor<BtmFrameData> btmFrameDataCaptor =
-                ArgumentCaptor.forClass(BtmFrameData.class);
-        verify(mWifiMonitor).broadcastBssTmHandlingDoneEvent(
-                eq(WLAN0_IFACE_NAME), btmFrameDataCaptor.capture());
-    }
-
-    /**
-     * Tests the configuring of FILS HLP packet in supplicant.
-     */
-    @Test
-    public void testAddHlpReq() throws Exception {
-        byte[] dstAddr = {0x45, 0x23, 0x12, 0x12, 0x12, 0x45};
-        byte[] hlpPacket = {0x00, 0x01, 0x02, 0x03, 0x04, 0x12, 0x15, 0x34, 0x55, 0x12,
-                0x12, 0x45, 0x23, 0x52, 0x32, 0x16, 0x15, 0x53, 0x62, 0x32, 0x32, 0x10};
-
-        doNothing().when(mISupplicantStaIfaceMock).filsHlpAddRequest(any(byte[].class),
-                any(byte[].class));
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.addHlpReq(WLAN0_IFACE_NAME, dstAddr, hlpPacket));
-        verify(mISupplicantStaIfaceMock, never()).filsHlpAddRequest(any(byte[].class),
-                any(byte[].class));
-
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        assertTrue(mDut.addHlpReq(WLAN0_IFACE_NAME, dstAddr, hlpPacket));
-        verify(mISupplicantStaIfaceMock).filsHlpAddRequest(eq(dstAddr), eq(hlpPacket));
-    }
-
-    /**
-     * Tests the flushing of FILS HLP packet from supplicant.
-     */
-    @Test
-    public void testFlushAllHlp() throws Exception {
-        doNothing().when(mISupplicantStaIfaceMock).filsHlpFlushRequest();
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.flushAllHlp(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock, never()).filsHlpFlushRequest();
-
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        assertTrue(mDut.flushAllHlp(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock).filsHlpFlushRequest();
-    }
-
-    /**
-     * Tests the handling of state change notification without
-     * any configured network.
-     */
-    @Test
-    public void testStateChangedCallbackWithNoConfiguredNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.INACTIVE,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-
-        // Can't compare WifiSsid instances because they lack an equality operator.
-        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiConfiguration.INVALID_NETWORK_ID),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.INACTIVE));
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords, edge case
-     * when onStateChanged() is used.
-     *
-     * If the network is removed during 4-way handshake, do not call it a password mismatch.
-     */
-    @Test
-    public void testNetworkRemovedDuring4wayWhenOnStateChangedIsUsed() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        int reasonCode = 3;
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.FOURWAY_HANDSHAKE,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        mISupplicantStaIfaceCallback.onNetworkRemoved(SUPPLICANT_NETWORK_ID);
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
-                anyInt(), any(), any());
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords when
-     * onStateChanged() is used, edge case.
-     *
-     * If the disconnect reason is "IE in 4way differs", do not call it a password mismatch.
-     */
-    @Test
-    public void testIeDiffersWhenOnStateChangedIsUsed() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        int reasonCode = StaIfaceReasonCode.IE_IN_4WAY_DIFFERS;
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.FOURWAY_HANDSHAKE,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), false);
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
-                anyInt(), any(), any());
-    }
-
-    /**
-     * Tests the handling of state change notification to
-     * completed (with FILS HLP IE sent) after configuring a network.
-     */
-    @Test
-    public void testStateChangeWithFilsHlpIESentToCompletedCallback() throws Exception {
-        InOrder wifiMonitorInOrder = inOrder(mWifiMonitor);
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        int frameworkNetworkId = 6;
-        executeAndValidateConnectSequence(frameworkNetworkId, false);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                StaIfaceCallbackState.COMPLETED,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)), true);
-
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)));
-
-        wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(true), eq(wifiSsid), eq(BSSID));
-        wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
-    }
-
-    /**
-     * Tests that we can disable a network after connecting to it.
-     */
-    @Test
-    public void testDisableNetworkAfterConnected() throws Exception {
-        when(mSupplicantStaNetworkMock.disable()).thenReturn(true);
-        executeAndValidateInitializationSequence();
-
-        // Connect to a network.
-        executeAndValidateConnectSequence(4, false);
-
-        // Disable it.
-        assertTrue(mDut.disableCurrentNetwork(WLAN0_IFACE_NAME));
-        verify(mSupplicantStaNetworkMock).disable();
-    }
-
-    /**
-     * Tests the handling of association rejection notification.
-     */
-    @Test
-    public void testAssociationRejectionCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        AssociationRejectionData assocRejectData = new AssociationRejectionData();
-        assocRejectData.ssid = NativeUtil.byteArrayFromArrayList(
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        assocRejectData.bssid = NativeUtil.macAddressToByteArray(BSSID);
-        assocRejectData.statusCode = 5;
-        assocRejectData.isOceRssiBasedAssocRejectAttrPresent = true;
-        assocRejectData.oceRssiBasedAssocRejectData = new OceRssiBasedAssocRejectAttr();
-        assocRejectData.oceRssiBasedAssocRejectData.retryDelayS = 10;
-        assocRejectData.oceRssiBasedAssocRejectData.deltaRssi = 20;
-        mISupplicantStaIfaceCallback.onAssociationRejected(assocRejectData);
-
-        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
-                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
-        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
-                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
-        AssocRejectEventInfo assocRejectEventInfo = assocRejectEventInfoCaptor.getValue();
-        assertNotNull(assocRejectEventInfo);
-        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
-        assertEquals(BSSID, assocRejectEventInfo.bssid);
-        assertEquals(SupplicantStaIfaceCallbackAidlImpl.halToFrameworkStatusCode(
-                assocRejectData.statusCode), assocRejectEventInfo.statusCode);
-        assertFalse(assocRejectEventInfo.timedOut);
-        assertNotNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
-        assertEquals(assocRejectData.oceRssiBasedAssocRejectData.retryDelayS,
-                assocRejectEventInfo.oceRssiBasedAssocRejectInfo.mRetryDelayS);
-        assertEquals(assocRejectData.oceRssiBasedAssocRejectData.deltaRssi,
-                assocRejectEventInfo.oceRssiBasedAssocRejectInfo.mDeltaRssi);
-        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
-    }
-
-    /**
-     * Tests the handling of network not found notification.
-     */
-    @Test
-    public void testNetworkNotFoundCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        mISupplicantStaIfaceCallback.onNetworkNotFound(NativeUtil.byteArrayFromArrayList(
-                NativeUtil.decodeSsid(SUPPLICANT_SSID)));
-
-        verify(mWifiMonitor).broadcastNetworkNotFoundEvent(
-                eq(WLAN0_IFACE_NAME), eq(SUPPLICANT_SSID));
-    }
-
-    /**
-     * Tests the behavior of {@link SupplicantStaIfaceHal#getCurrentNetworkSecurityParams(String)}
-     * @throws Exception
-     */
-    @Test
-    public void testGetCurrentNetworkSecurityParams() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        // Null current network should return null security params
-        assertNull(mDut.getCurrentNetworkSecurityParams(WLAN0_IFACE_NAME));
-
-        // Connecting to network with PSK candidate security params should return PSK params.
-        executeAndValidateConnectSequenceWithKeyMgmt(
-                0, false, WifiConfiguration.SECURITY_TYPE_PSK, "97CA326539");
-        assertTrue(mDut.getCurrentNetworkSecurityParams(WLAN0_IFACE_NAME)
-                .isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK));
-    }
-
-    /**
-     * Tests the behavior of
-     * {@link SupplicantStaIfaceHal#sendQosPolicyResponse(String, int, boolean, List)}
-     * @throws Exception
-     */
-    @Test
-    public void testSendQosPolicyResponse() throws Exception {
-        final int policyRequestId = 124;
-        final boolean morePolicies = true;
-        ArgumentCaptor<QosPolicyStatus[]> policyStatusListCaptor =
-                ArgumentCaptor.forClass(QosPolicyStatus[].class);
-
-        List<SupplicantStaIfaceHal.QosPolicyStatus> policyStatusList = new ArrayList();
-        policyStatusList.add(new SupplicantStaIfaceHal.QosPolicyStatus(
-                1, NetworkAgent.DSCP_POLICY_STATUS_SUCCESS));
-        policyStatusList.add(new SupplicantStaIfaceHal.QosPolicyStatus(
-                2, NetworkAgent.DSCP_POLICY_STATUS_REQUEST_DECLINED));
-        policyStatusList.add(new SupplicantStaIfaceHal.QosPolicyStatus(
-                3, NetworkAgent.DSCP_POLICY_STATUS_REQUESTED_CLASSIFIER_NOT_SUPPORTED));
-
-        QosPolicyStatus[] expectedHalPolicyStatusList = {
-                createQosPolicyStatus(1, QosPolicyStatusCode.QOS_POLICY_SUCCESS),
-                createQosPolicyStatus(2, QosPolicyStatusCode.QOS_POLICY_REQUEST_DECLINED),
-                createQosPolicyStatus(3, QosPolicyStatusCode.QOS_POLICY_CLASSIFIER_NOT_SUPPORTED)};
-
-        executeAndValidateInitializationSequence();
-        mDut.sendQosPolicyResponse(WLAN0_IFACE_NAME, policyRequestId, morePolicies,
-                policyStatusList);
-        verify(mISupplicantStaIfaceMock).sendQosPolicyResponse(eq(policyRequestId),
-                eq(morePolicies), policyStatusListCaptor.capture());
-        assertTrue(qosPolicyStatusListsAreEqual(expectedHalPolicyStatusList,
-                policyStatusListCaptor.getValue()));
-    }
-
-    /**
-     * Tests the behavior of
-     * {@link SupplicantStaIfaceCallbackAidlImpl#onQosPolicyReset()}
-     * @throws Exception
-     */
-    @Test
-    public void executeAndValidateQosPolicyResetCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onQosPolicyReset();
-        verify(mWifiMonitor).broadcastQosPolicyResetEvent(eq(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Tests the behavior of
-     * {@link SupplicantStaIfaceCallbackAidlImpl#onQosPolicyRequest(int, QosPolicyData[])}
-     * @throws Exception
-     */
-    @Test
-    public void executeAndValidateQosPolicyRequestCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        final int dialogToken = 124;
-        final int srcPort = 1337;
-        QosPolicyData qosPolicyData1 = createQosPolicyData(0,
-                QosPolicyRequestType.QOS_POLICY_ADD, 0, null, null, srcPort, null, null);
-        QosPolicyData qosPolicyData2 = createQosPolicyData(1,
-                QosPolicyRequestType.QOS_POLICY_REMOVE, 0, null, null, null, null, null);
-        QosPolicyData[] qosPolicyDataList = new QosPolicyData[]{qosPolicyData1, qosPolicyData2};
-
-        mISupplicantStaIfaceCallback.onQosPolicyRequest(dialogToken, qosPolicyDataList);
-        verify(mWifiMonitor).broadcastQosPolicyRequestEvent(eq(WLAN0_IFACE_NAME),
-                eq(dialogToken), mQosPolicyRequestListCaptor.capture());
-
-        List<SupplicantStaIfaceHal.QosPolicyRequest> qosPolicyRequestList =
-                mQosPolicyRequestListCaptor.getValue();
-        assertEquals(qosPolicyRequestList.size(), qosPolicyDataList.length);
-
-        assertEquals(0, qosPolicyRequestList.get(0).policyId);
-        assertEquals(SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD,
-                qosPolicyRequestList.get(0).requestType);
-        assertEquals(srcPort, qosPolicyRequestList.get(0).classifierParams.srcPort);
-
-        assertEquals(1, qosPolicyRequestList.get(1).policyId);
-        assertEquals(SupplicantStaIfaceHal.QOS_POLICY_REQUEST_REMOVE,
-                qosPolicyRequestList.get(1).requestType);
-    }
-
-    /**
-     * Tests the setting of EAP anonymous identity.
-     */
-    @Test
-    public void testSetEapAnonymousIdentity() throws Exception {
-        String anonymousIdentity = "abc@realm.org";
-        byte[] bytes = anonymousIdentity.getBytes();
-        when(mSupplicantStaNetworkMock.setEapAnonymousIdentity(any()))
-                .thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.setEapAnonymousIdentity(WLAN0_IFACE_NAME, anonymousIdentity));
-
-        ArgumentCaptor<byte[]> captor = ArgumentCaptor.forClass(byte[].class);
-        verify(mSupplicantStaNetworkMock).setEapAnonymousIdentity(captor.capture());
-        assertTrue(Arrays.equals(bytes, captor.getValue()));
-    }
-
-    private WifiConfiguration createTestWifiConfiguration() {
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = SUPPLICANT_NETWORK_ID;
-        return config;
-    }
-
-    private QosPolicyStatus createQosPolicyStatus(int policyId, int status) {
-        QosPolicyStatus policyStatus = new QosPolicyStatus();
-        policyStatus.policyId = (byte) policyId;
-        policyStatus.status = (byte) status;
-        return policyStatus;
-    }
-
-    private QosPolicyData createQosPolicyData(int policyId, int requestType, int dscp,
-            @Nullable byte[] srcIp, @Nullable byte[] dstIp, @Nullable Integer srcPort,
-            @Nullable int[] dstPortRange, @Nullable Integer protocol) {
-        QosPolicyClassifierParams classifierParams = new QosPolicyClassifierParams();
-        int paramMask = 0;
-        if (srcIp != null) {
-            classifierParams.srcIp = srcIp;
-            paramMask |= QosPolicyClassifierParamsMask.SRC_IP;
-        }
-        if (dstIp != null) {
-            classifierParams.dstIp = dstIp;
-            paramMask |= QosPolicyClassifierParamsMask.DST_IP;
-        }
-        if (srcPort != null) {
-            classifierParams.srcPort = srcPort;
-            paramMask |= QosPolicyClassifierParamsMask.SRC_PORT;
-        }
-        if (dstPortRange != null && dstPortRange.length == 2) {
-            PortRange portRange = new PortRange();
-            portRange.startPort = dstPortRange[0];
-            portRange.endPort = dstPortRange[1];
-            classifierParams.dstPortRange = portRange;
-            paramMask |= QosPolicyClassifierParamsMask.DST_PORT_RANGE;
-        }
-        if (protocol != null) {
-            classifierParams.protocolNextHdr = protocol.byteValue();
-            paramMask |= QosPolicyClassifierParamsMask.PROTOCOL_NEXT_HEADER;
-        }
-        classifierParams.classifierParamMask = paramMask;
-
-        QosPolicyData qosPolicyData = new QosPolicyData();
-        qosPolicyData.policyId = (byte) policyId;
-        qosPolicyData.requestType = (byte) requestType;
-        qosPolicyData.dscp = (byte) dscp;
-        qosPolicyData.classifierParams = classifierParams;
-        return qosPolicyData;
-    }
-
-    /**
-     * Indicate support for key mgmt features supported by default in HIDL HAL V1.4,
-     * i.e. the latest HIDL version before the conversion to AIDL.
-     */
-    private long addDefaultKeyMgmtCap(long capabilities) {
-        return capabilities | WIFI_FEATURE_PASSPOINT_TERMS_AND_CONDITIONS
-                | WIFI_FEATURE_DECORATED_IDENTITY;
-    }
-
-    /**
-     * Create AssociationRejectionData to send to the onAssociationRejected callback.
-     * Used for test cases that originally targeted the old 3-argument version of
-     * the callback, but were adapted to test the implementation that requires a single
-     * AssociationRejectionData argument.
-     */
-    private AssociationRejectionData createAssocRejectData(String ssid, String bssid,
-            int statusCode, boolean timedOut) {
-        AssociationRejectionData rejectionData = new AssociationRejectionData();
-        rejectionData.ssid = NativeUtil.byteArrayFromArrayList(
-                NativeUtil.decodeSsid(ssid));
-        rejectionData.bssid = NativeUtil.macAddressToByteArray(bssid);
-        rejectionData.statusCode = statusCode;
-        rejectionData.timedOut = timedOut;
-        rejectionData.isMboAssocDisallowedReasonCodePresent = false;
-        rejectionData.isOceRssiBasedAssocRejectAttrPresent = false;
-        return rejectionData;
-    }
-
-    private void executeAndValidateHs20DeauthImminentCallback(boolean isEss) throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        int reasonCode = isEss ? WnmData.ESS : WnmData.ESS + 1;
-        int reauthDelay = 5;
-        mISupplicantStaIfaceCallback.onHs20DeauthImminentNotice(
-                bssid, reasonCode, reauthDelay, HS20_URL);
-
-        ArgumentCaptor<WnmData> wnmDataCaptor = ArgumentCaptor.forClass(WnmData.class);
-        verify(mWifiMonitor).broadcastWnmEvent(eq(WLAN0_IFACE_NAME), wnmDataCaptor.capture());
-        assertEquals(
-                ByteBufferReader.readInteger(
-                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
-                wnmDataCaptor.getValue().getBssid());
-        assertEquals(isEss, wnmDataCaptor.getValue().isEss());
-        assertEquals(reauthDelay, wnmDataCaptor.getValue().getDelay());
-        assertEquals(HS20_URL, wnmDataCaptor.getValue().getUrl());
-    }
-
-    private void executeAndValidateHs20TermsAndConditionsCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        mISupplicantStaIfaceCallback.onHs20TermsAndConditionsAcceptanceRequestedNotification(
-                bssid, HS20_URL);
-
-        ArgumentCaptor<WnmData> wnmDataCaptor = ArgumentCaptor.forClass(WnmData.class);
-        verify(mWifiMonitor).broadcastWnmEvent(eq(WLAN0_IFACE_NAME), wnmDataCaptor.capture());
-        assertEquals(
-                ByteBufferReader.readInteger(
-                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
-                wnmDataCaptor.getValue().getBssid());
-        assertEquals(HS20_URL, wnmDataCaptor.getValue().getUrl());
-    }
-
-    /**
-     * Wrapper for successful initialization with executeAndValidateInitializationSequence.
-     */
-    private void executeAndValidateInitializationSequence() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-    }
-
-    /**
-     * Calls initialize and addP2pInterface to mock the startup sequence.
-     * The two arguments will each trigger a different failure in addStaInterface
-     * when set to true.
-     */
-    void executeAndValidateInitializationSequence(boolean causeRemoteException,
-            boolean getNullInterface) throws Exception {
-        boolean shouldSucceed = !causeRemoteException && !getNullInterface;
-        if (causeRemoteException) {
-            doThrow(new RemoteException()).when(mISupplicantMock).addStaInterface(anyString());
-        } else if (getNullInterface) {
-            doReturn(null).when(mISupplicantMock).addStaInterface(anyString());
-        } else {
-            doReturn(mISupplicantStaIfaceMock).when(mISupplicantMock).addStaInterface(anyString());
-        }
-
-        /** Callback registration */
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public void answer(ISupplicantStaIfaceCallback cb) throws RemoteException {
-                mISupplicantStaIfaceCallback = spy(cb);
-            }
-        }).when(mISupplicantStaIfaceMock).registerCallback(any(ISupplicantStaIfaceCallback.class));
-
-        // Initialize the SupplicantStaIfaceHal
-        assertTrue(mDut.initialize());
-        assertTrue(mDut.startDaemon());
-        verify(mServiceBinderMock).linkToDeath(mSupplicantDeathCaptor.capture(), anyInt());
-        assertTrue(mDut.isInitializationComplete());
-
-        // Attempt to setup the interface
-        assertEquals(shouldSucceed, mDut.setupIface(WLAN0_IFACE_NAME));
-        verify(mISupplicantMock).addStaInterface(anyString());
-        if (!causeRemoteException && !getNullInterface) {
-            verify(mISupplicantStaIfaceMock).registerCallback(
-                    any(ISupplicantStaIfaceCallback.class));
-        }
-    }
-
-    /**
-     * Create an IfaceInfo with given type and name
-     */
-    private IfaceInfo createIfaceInfo(int type, String name) {
-        IfaceInfo info = new IfaceInfo();
-        info.type = type;
-        info.name = name;
-        return info;
-    }
-
-    /**
-     * Setup mocks for connect sequence.
-     */
-    private void setupMocksForConnectSequence(final boolean haveExistingNetwork) throws Exception {
-        final int existingNetworkId = SUPPLICANT_NETWORK_ID;
-        doNothing().when(mISupplicantStaIfaceMock).disconnect();
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public int[] answer() throws RemoteException {
-                if (haveExistingNetwork) {
-                    int[] networks = {existingNetworkId};
-                    return networks;
-                } else {
-                    return new int[0];
-                }
-            }
-        }).when(mISupplicantStaIfaceMock).listNetworks();
-        doNothing().when(mISupplicantStaIfaceMock).removeNetwork(eq(existingNetworkId));
-        doReturn(mock(ISupplicantStaNetwork.class)).when(mISupplicantStaIfaceMock).addNetwork();
-        doReturn(true).when(mSupplicantStaNetworkMock)
-                .saveWifiConfiguration(any(WifiConfiguration.class));
-        doReturn(true).when(mSupplicantStaNetworkMock).select();
-    }
-
-    /**
-     * Helper function to validate the connect sequence.
-     */
-    private void validateConnectSequence(
-            final boolean haveExistingNetwork, int numNetworkAdditions) throws Exception {
-        if (haveExistingNetwork) {
-            verify(mISupplicantStaIfaceMock).removeNetwork(anyInt());
-        }
-        verify(mISupplicantStaIfaceMock, times(numNetworkAdditions)).addNetwork();
-        verify(mSupplicantStaNetworkMock, times(numNetworkAdditions))
-                .saveWifiConfiguration(any(WifiConfiguration.class));
-        verify(mSupplicantStaNetworkMock, times(numNetworkAdditions)).select();
-    }
-
-    /**
-     * Helper function to execute all the actions to perform connection to the network.
-     *
-     * @param newFrameworkNetworkId Framework Network Id of the new network to connect.
-     * @param haveExistingNetwork Removes the existing network.
-     * @return the WifiConfiguration object of the new network to connect.
-     */
-    private WifiConfiguration executeAndValidateConnectSequence(
-            final int newFrameworkNetworkId, final boolean haveExistingNetwork) throws Exception {
-        return executeAndValidateConnectSequenceWithKeyMgmt(newFrameworkNetworkId,
-                haveExistingNetwork, WifiConfiguration.SECURITY_TYPE_PSK, null);
-    }
-
-    /**
-     * Helper function to execute all the actions to perform connection to the network.
-     *
-     * @param newFrameworkNetworkId Framework Network Id of the new network to connect.
-     * @param haveExistingNetwork Removes the existing network.
-     * @param securityType The security type.
-     * @param wepKey if configurations are for a WEP network else null.
-     * @param hasEverConnected indicate that this configuration is ever connected or not.
-     * @return the WifiConfiguration object of the new network to connect.
-     */
-    private WifiConfiguration executeAndValidateConnectSequenceWithKeyMgmt(
-            final int newFrameworkNetworkId, final boolean haveExistingNetwork,
-            int securityType, String wepKey, boolean hasEverConnected) throws Exception {
-        setupMocksForConnectSequence(haveExistingNetwork);
-        WifiConfiguration config = new WifiConfiguration();
-        config.setSecurityParams(securityType);
-        config.networkId = newFrameworkNetworkId;
-        config.wepKeys[0] = wepKey;
-        config.wepTxKeyIndex = 0;
-        WifiConfiguration.NetworkSelectionStatus networkSelectionStatus =
-                new WifiConfiguration.NetworkSelectionStatus();
-        networkSelectionStatus.setCandidateSecurityParams(config.getSecurityParams(securityType));
-        networkSelectionStatus.setHasEverConnected(hasEverConnected);
-        config.setNetworkSelectionStatus(networkSelectionStatus);
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-        validateConnectSequence(haveExistingNetwork, 1);
-        return config;
-    }
-
-    /**
-     * Helper function to execute all the actions to perform connection to the network.
-     *
-     * @param newFrameworkNetworkId Framework Network Id of the new network to connect.
-     * @param haveExistingNetwork Removes the existing network.
-     * @param securityType The security type.
-     * @param wepKey if configurations are for a WEP network else null.
-     * @return the WifiConfiguration object of the new network to connect.
-     */
-    private WifiConfiguration executeAndValidateConnectSequenceWithKeyMgmt(
-            final int newFrameworkNetworkId, final boolean haveExistingNetwork,
-            int securityType, String wepKey) throws Exception {
-        return executeAndValidateConnectSequenceWithKeyMgmt(
-                newFrameworkNetworkId, haveExistingNetwork,
-                securityType, wepKey, false);
-    }
-
-    /**
-     * Setup mocks for roam sequence.
-     */
-    private void setupMocksForRoamSequence(String roamBssid) throws Exception {
-        doNothing().when(mISupplicantStaIfaceMock).reassociate();
-        when(mSupplicantStaNetworkMock.setBssid(eq(roamBssid))).thenReturn(true);
-    }
-
-    /**
-     * Helper function to execute all the actions to perform roaming to the network.
-     *
-     * @param sameNetwork Roam to the same network or not.
-     * @param linkedNetwork Roam to linked network or not.
-     */
-    private void executeAndValidateRoamSequence(boolean sameNetwork, boolean linkedNetwork)
-            throws Exception {
-        int connectedNetworkId = ROAM_NETWORK_ID;
-        String roamBssid = BSSID;
-        int roamNetworkId;
-        if (sameNetwork) {
-            roamNetworkId = connectedNetworkId;
-        } else {
-            roamNetworkId = connectedNetworkId + 1;
-        }
-        executeAndValidateConnectSequence(connectedNetworkId, false);
-        setupMocksForRoamSequence(roamBssid);
-
-        WifiConfiguration roamingConfig = new WifiConfiguration();
-        roamingConfig.networkId = roamNetworkId;
-        roamingConfig.getNetworkSelectionStatus().setNetworkSelectionBSSID(roamBssid);
-        SupplicantStaNetworkHalAidlImpl linkedNetworkHandle =
-                mock(SupplicantStaNetworkHalAidlImpl.class);
-        if (linkedNetwork) {
-            // Set the StaNetworkMockable to add a new handle for the linked network
-            int roamRemoteNetworkId = roamNetworkId + 1;
-            when(linkedNetworkHandle.getNetworkId()).thenReturn(roamRemoteNetworkId);
-            when(linkedNetworkHandle.saveWifiConfiguration(any())).thenReturn(true);
-            when(linkedNetworkHandle.select()).thenReturn(true);
-            mDut.setStaNetworkMockable(linkedNetworkHandle);
-            final HashMap<String, WifiConfiguration> linkedNetworks = new HashMap<>();
-            linkedNetworks.put(roamingConfig.getProfileKey(), roamingConfig);
-            assertTrue(mDut.updateLinkedNetworks(
-                    WLAN0_IFACE_NAME, connectedNetworkId, linkedNetworks));
-        }
-        assertTrue(mDut.roamToNetwork(WLAN0_IFACE_NAME, roamingConfig));
-
-        if (sameNetwork) {
-            verify(mSupplicantStaNetworkMock).setBssid(eq(roamBssid));
-            verify(mISupplicantStaIfaceMock).reassociate();
-        } else if (linkedNetwork) {
-            verify(mISupplicantStaIfaceMock, never()).removeNetwork(anyInt());
-            verify(mISupplicantStaIfaceMock, times(2)).addNetwork();
-            verify(mSupplicantStaNetworkMock).saveWifiConfiguration(any(WifiConfiguration.class));
-            verify(mSupplicantStaNetworkMock).select();
-            verify(linkedNetworkHandle).saveWifiConfiguration(any(WifiConfiguration.class));
-            verify(linkedNetworkHandle).select();
-            verify(mSupplicantStaNetworkMock, never()).setBssid(anyString());
-            verify(mISupplicantStaIfaceMock, never()).reassociate();
-        } else {
-            validateConnectSequence(false, 2);
-            verify(mSupplicantStaNetworkMock, never()).setBssid(anyString());
-            verify(mISupplicantStaIfaceMock, never()).reassociate();
-        }
-    }
-
-    private void setupMocksForPmkCache() throws Exception {
-        ArrayList<Byte> pmkCacheData = NativeUtil.byteArrayToArrayList("deadbeef".getBytes());
-        setupMocksForPmkCache(pmkCacheData);
-    }
-
-    private void setupMocksForPmkCache(ArrayList<Byte> pmkCacheData) throws Exception {
-        mDut.mPmkCacheManager = mPmkCacheManager;
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public List<ArrayList<Byte>> answer(int networkId) {
-                if (pmkCacheData == null) return null;
-
-                List<ArrayList<Byte>> pmkDataList = new ArrayList<>();
-                pmkDataList.add(pmkCacheData);
-                return pmkDataList;
-            }
-        }).when(mPmkCacheManager)
-                .get(anyInt());
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public boolean answer(WifiConfiguration config, Map<String, String> networkExtra)
-                    throws Exception {
-                config.networkId = SUPPLICANT_NETWORK_ID;
-                return true;
-            }
-        }).when(mSupplicantStaNetworkMock)
-                .loadWifiConfiguration(any(WifiConfiguration.class), any(Map.class));
-
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public boolean answer(byte[] serializedData) throws Exception {
-                mISupplicantStaIfaceCallback.onPmkCacheAdded(
-                        PMK_CACHE_EXPIRATION_IN_SEC, serializedData);
-                return true;
-            }
-        }).when(mSupplicantStaNetworkMock)
-                .setPmkCache(any(byte[].class));
-    }
-
-    /**
-     * Check that two unsorted QoS policy status lists contain the same entries.
-     * @return true if lists contain the same entries, false otherwise.
-     */
-    private boolean qosPolicyStatusListsAreEqual(
-            QosPolicyStatus[] expected, QosPolicyStatus[] actual) {
-        if (expected.length != actual.length) {
-            return false;
-        }
-
-        class PolicyStatusComparator implements Comparator<QosPolicyStatus> {
-            public int compare(QosPolicyStatus a, QosPolicyStatus b) {
-                if (a.policyId == b.policyId) {
-                    return 0;
-                }
-                return a.policyId < b.policyId ? -1 : 1;
-            }
-        }
-
-        List<QosPolicyStatus> expectedList = Arrays.asList(expected);
-        List<QosPolicyStatus> actualList = Arrays.asList(actual);
-        Collections.sort(expectedList, new PolicyStatusComparator());
-        Collections.sort(actualList, new PolicyStatusComparator());
-
-        for (int i = 0; i < expectedList.size(); i++) {
-            if (expectedList.get(i).policyId != actualList.get(i).policyId
-                    || expectedList.get(i).status != actualList.get(i).status) {
-                return false;
-            }
-        }
-        return true;
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalHidlImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalHidlImplTest.java
deleted file mode 100644
index 6d5183e..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalHidlImplTest.java
+++ /dev/null
@@ -1,3710 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP_ENROLLEE_RESPONDER;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA256;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA384;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_MBO;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_OCE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WAPI;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SAE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SUITE_B;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.anyShort;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.when;
-
-import android.annotation.NonNull;
-import android.app.test.MockAnswerUtil;
-import android.app.test.MockAnswerUtil.AnswerWithArguments;
-import android.content.Context;
-import android.hardware.wifi.V1_0.WifiChannelWidthInMhz;
-import android.hardware.wifi.supplicant.V1_0.ISupplicant;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantIface;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIface;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback.BssidChangeReason;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantStaNetwork;
-import android.hardware.wifi.supplicant.V1_0.IfaceType;
-import android.hardware.wifi.supplicant.V1_0.SupplicantStatus;
-import android.hardware.wifi.supplicant.V1_0.SupplicantStatusCode;
-import android.hardware.wifi.supplicant.V1_0.WpsConfigMethods;
-import android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback.BssTmData;
-import android.hardware.wifi.supplicant.V1_3.WifiTechnology;
-import android.hardware.wifi.supplicant.V1_4.ConnectionCapabilities;
-import android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.AssociationRejectionData;
-import android.hardware.wifi.supplicant.V1_4.LegacyMode;
-import android.hidl.manager.V1_0.IServiceManager;
-import android.hidl.manager.V1_0.IServiceNotification;
-import android.net.MacAddress;
-import android.net.wifi.ScanResult;
-import android.net.wifi.SecurityParams;
-import android.net.wifi.SupplicantState;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiManager;
-import android.net.wifi.WifiSsid;
-import android.os.Handler;
-import android.os.IHwBinder;
-import android.os.RemoteException;
-import android.os.test.TestLooper;
-import android.text.TextUtils;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.server.wifi.MboOceController.BtmFrameData;
-import com.android.server.wifi.hotspot2.AnqpEvent;
-import com.android.server.wifi.hotspot2.IconEvent;
-import com.android.server.wifi.hotspot2.WnmData;
-import com.android.server.wifi.util.NativeUtil;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InOrder;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-
-/**
- * Unit tests for SupplicantStaIfaceHalHidlImpl
- */
-@SmallTest
-public class SupplicantStaIfaceHalHidlImplTest extends WifiBaseTest {
-    private static final Map<Integer, String> NETWORK_ID_TO_SSID = new HashMap<Integer, String>() {{
-            put(1, "\"ssid1\"");
-            put(2, "\"ssid2\"");
-            put(3, "\"ssid3\"");
-        }};
-    private static final int SUPPLICANT_NETWORK_ID = 2;
-    private static final String SUPPLICANT_SSID = NETWORK_ID_TO_SSID.get(SUPPLICANT_NETWORK_ID);
-    private static final int ROAM_NETWORK_ID = 4;
-    private static final String BSSID = "fa:45:23:23:12:12";
-    private static final String WLAN0_IFACE_NAME = "wlan0";
-    private static final String WLAN1_IFACE_NAME = "wlan1";
-    private static final String P2P_IFACE_NAME = "p2p0";
-    private static final String ICON_FILE_NAME  = "blahblah";
-    private static final int ICON_FILE_SIZE = 72;
-    private static final String HS20_URL = "http://blahblah";
-    private static final long PMK_CACHE_EXPIRATION_IN_SEC = 1024;
-    private static final byte[] CONNECTED_MAC_ADDRESS_BYTES =
-            {0x00, 0x01, 0x02, 0x03, 0x04, 0x05};
-
-    private @Mock IServiceManager mServiceManagerMock;
-    private @Mock ISupplicant mISupplicantMock;
-    private android.hardware.wifi.supplicant.V1_1.ISupplicant mISupplicantMockV11;
-    private android.hardware.wifi.supplicant.V1_2.ISupplicant mISupplicantMockV12;
-    private android.hardware.wifi.supplicant.V1_3.ISupplicant mISupplicantMockV13;
-    private android.hardware.wifi.supplicant.V1_3.ISupplicant mISupplicantMockV14;
-    private @Mock ISupplicantIface mISupplicantIfaceMock;
-    private @Mock ISupplicantStaIface mISupplicantStaIfaceMock;
-    private @Mock android.hardware.wifi.supplicant.V1_1.ISupplicantStaIface
-            mISupplicantStaIfaceMockV11;
-    private @Mock android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
-            mISupplicantStaIfaceMockV12;
-    private @Mock android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-            mISupplicantStaIfaceMockV13;
-    private @Mock android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
-            mISupplicantStaIfaceMockV14;
-    private @Mock Context mContext;
-    private @Mock WifiMonitor mWifiMonitor;
-    private @Mock FrameworkFacade mFrameworkFacade;
-    private @Mock SupplicantStaNetworkHalHidlImpl mSupplicantStaNetworkMock;
-    private @Mock WifiNative.SupplicantDeathEventHandler mSupplicantHalDeathHandler;
-    private @Mock Clock mClock;
-    private @Mock WifiMetrics mWifiMetrics;
-    private @Mock WifiGlobals mWifiGlobals;
-    private @Mock PmkCacheManager mPmkCacheManager;
-
-    SupplicantStatus mStatusSuccess;
-    SupplicantStatus mStatusFailure;
-    android.hardware.wifi.supplicant.V1_4.SupplicantStatus mStatusSuccessV14;
-    android.hardware.wifi.supplicant.V1_4.SupplicantStatus mStatusFailureV14;
-    ISupplicant.IfaceInfo mStaIface0;
-    ISupplicant.IfaceInfo mStaIface1;
-    ISupplicant.IfaceInfo mP2pIface;
-    ArrayList<ISupplicant.IfaceInfo> mIfaceInfoList;
-    ISupplicantStaIfaceCallback mISupplicantStaIfaceCallback;
-    android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback
-            mISupplicantStaIfaceCallbackV11;
-    android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback
-            mISupplicantStaIfaceCallbackV12;
-    android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback
-            mISupplicantStaIfaceCallbackV13 = null;
-    android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback
-            mISupplicantStaIfaceCallbackV14 = null;
-
-    private TestLooper mLooper = new TestLooper();
-    private Handler mHandler = null;
-    private SupplicantStaIfaceHalSpy mDut;
-    private ArgumentCaptor<IHwBinder.DeathRecipient> mServiceManagerDeathCaptor =
-            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
-    private ArgumentCaptor<IHwBinder.DeathRecipient> mSupplicantDeathCaptor =
-            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
-    private ArgumentCaptor<IHwBinder.DeathRecipient> mSupplicantStaIfaceDeathCaptor =
-            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
-    private ArgumentCaptor<IServiceNotification.Stub> mServiceNotificationCaptor =
-            ArgumentCaptor.forClass(IServiceNotification.Stub.class);
-    private ArgumentCaptor<Long> mDeathRecipientCookieCaptor = ArgumentCaptor.forClass(Long.class);
-    private InOrder mInOrder;
-
-    private class SupplicantStaIfaceHalSpy extends SupplicantStaIfaceHalHidlImpl {
-        SupplicantStaNetworkHalHidlImpl mStaNetwork;
-
-        SupplicantStaIfaceHalSpy() {
-            super(mContext, mWifiMonitor, mFrameworkFacade,
-                    mHandler, mClock, mWifiMetrics, mWifiGlobals);
-            mStaNetwork = mSupplicantStaNetworkMock;
-        }
-
-        @Override
-        protected IServiceManager getServiceManagerMockable() throws RemoteException {
-            return mServiceManagerMock;
-        }
-
-        @Override
-        protected ISupplicant getSupplicantMockable() throws RemoteException {
-            return mISupplicantMock;
-        }
-
-        @Override
-        protected android.hardware.wifi.supplicant.V1_1.ISupplicant getSupplicantMockableV1_1()
-                throws RemoteException {
-            return mISupplicantMockV11;
-        }
-
-        @Override
-        protected ISupplicantStaIface getStaIfaceMockable(ISupplicantIface iface) {
-            return mISupplicantStaIfaceMock;
-        }
-
-        @Override
-        protected android.hardware.wifi.supplicant.V1_1.ISupplicantStaIface
-                getStaIfaceMockableV1_1(ISupplicantIface iface) {
-            return mISupplicantStaIfaceMockV11;
-        }
-
-        @Override
-        protected android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
-                getStaIfaceMockableV1_2(ISupplicantIface iface) {
-            return mISupplicantStaIfaceMockV12;
-        }
-
-        @Override
-        protected android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                getStaIfaceMockableV1_3(ISupplicantIface iface) {
-            return (mISupplicantMockV13 != null)
-                    ? mISupplicantStaIfaceMockV13
-                    : null;
-        }
-
-        @Override
-        protected android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
-                getStaIfaceMockableV1_4(ISupplicantIface iface) {
-            return (mISupplicantMockV14 != null)
-                    ? mISupplicantStaIfaceMockV14
-                    : null;
-        }
-
-        @Override
-        protected SupplicantStaNetworkHalHidlImpl getStaNetworkMockable(
-                @NonNull String ifaceName,
-                ISupplicantStaNetwork iSupplicantStaNetwork) {
-            return mStaNetwork;
-        }
-
-        private void setStaNetworkMockable(SupplicantStaNetworkHalHidlImpl network) {
-            mStaNetwork = network;
-        }
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mStatusSuccess = createSupplicantStatus(SupplicantStatusCode.SUCCESS);
-        mStatusFailure = createSupplicantStatus(SupplicantStatusCode.FAILURE_UNKNOWN);
-        mStatusSuccessV14 = createSupplicantStatusV1_4(
-                android.hardware.wifi.supplicant.V1_4.SupplicantStatusCode.SUCCESS);
-        mStatusFailureV14 = createSupplicantStatusV1_4(
-                android.hardware.wifi.supplicant.V1_4.SupplicantStatusCode.FAILURE_UNKNOWN);
-        mStaIface0 = createIfaceInfo(IfaceType.STA, WLAN0_IFACE_NAME);
-        mStaIface1 = createIfaceInfo(IfaceType.STA, WLAN1_IFACE_NAME);
-        mP2pIface = createIfaceInfo(IfaceType.P2P, P2P_IFACE_NAME);
-
-        mIfaceInfoList = new ArrayList<>();
-        mIfaceInfoList.add(mStaIface0);
-        mIfaceInfoList.add(mStaIface1);
-        mIfaceInfoList.add(mP2pIface);
-        when(mServiceManagerMock.getTransport(anyString(), anyString()))
-                .thenReturn(IServiceManager.Transport.EMPTY);
-        when(mServiceManagerMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
-                anyLong())).thenReturn(true);
-        when(mServiceManagerMock.registerForNotifications(anyString(), anyString(),
-                any(IServiceNotification.Stub.class))).thenReturn(true);
-        when(mISupplicantMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
-                anyLong())).thenReturn(true);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantStaIface.getMacAddressCallback cb) {
-                cb.onValues(mStatusSuccess, CONNECTED_MAC_ADDRESS_BYTES);
-            }
-        })
-        .when(mISupplicantStaIfaceMock)
-                .getMacAddress(any(ISupplicantStaIface.getMacAddressCallback.class));
-        when(mFrameworkFacade.startSupplicant()).thenReturn(true);
-        mHandler = spy(new Handler(mLooper.getLooper()));
-        mDut = new SupplicantStaIfaceHalSpy();
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHalHidlImpl initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_success() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false, false);
-    }
-
-    /**
-     * Tests the initialization flow, with a RemoteException occurring when 'getInterface' is called
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_remoteExceptionFailure() throws Exception {
-        executeAndValidateInitializationSequence(true, false, false, false);
-    }
-
-    /**
-     * Tests the initialization flow, with listInterfaces returning 0 interfaces.
-     * Ensures failure
-     */
-    @Test
-    public void testInitialize_zeroInterfacesFailure() throws Exception {
-        executeAndValidateInitializationSequence(false, true, false, false);
-    }
-
-    /**
-     * Tests the initialization flow, with a null interface being returned by getInterface.
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_nullInterfaceFailure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, true, false);
-    }
-
-    /**
-     * Tests the initialization flow, with a callback registration failure.
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_callbackRegistrationFailure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false, true);
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_successV1_1() throws Exception {
-        setupMocksForHalV1_1();
-        executeAndValidateInitializationSequenceV1_1(false, false);
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_successV1_2() throws Exception {
-        setupMocksForHalV1_2();
-        executeAndValidateInitializationSequenceV1_2();
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_successV1_3() throws Exception {
-        setupMocksForHalV1_3();
-        executeAndValidateInitializationSequenceV1_3();
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_successV1_4() throws Exception {
-        setupMocksForHalV1_4();
-        executeAndValidateInitializationSequenceV1_4();
-    }
-
-    /**
-     * Tests the initialization flow, with a RemoteException occurring when 'getInterface' is called
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_remoteExceptionFailureV1_1() throws Exception {
-        setupMocksForHalV1_1();
-        executeAndValidateInitializationSequenceV1_1(true, false);
-    }
-
-    /**
-     * Tests the initialization flow, with a null interface being returned by getInterface.
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_nullInterfaceFailureV1_1() throws Exception {
-        setupMocksForHalV1_1();
-        executeAndValidateInitializationSequenceV1_1(false, true);
-    }
-
-    /**
-     * Ensures that we do not allow operations on an interface until it's setup.
-     */
-    @Test
-    public void testEnsureOperationFailsUntilSetupInterfaces() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false, false);
-
-        // Ensure that the cancel wps operation is failed because wlan1 interface is not yet setup.
-        assertFalse(mDut.cancelWps(WLAN1_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock, never()).cancelWps();
-
-        // Now setup the wlan1 interface and Ensure that the cancel wps operation is successful.
-        assertTrue(mDut.setupIface(WLAN1_IFACE_NAME));
-        when(mISupplicantStaIfaceMock.cancelWps()).thenReturn(mStatusSuccess);
-        assertTrue(mDut.cancelWps(WLAN1_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock).cancelWps();
-    }
-
-    /**
-     * Ensures that reject addition of an existing iface.
-     */
-    @Test
-    public void testDuplicateSetupIfaceV1_1_Fails() throws Exception {
-        setupMocksForHalV1_1();
-        executeAndValidateInitializationSequenceV1_1(false, false);
-
-        // Trying setting up the wlan0 interface again & ensure it fails.
-        assertFalse(mDut.setupIface(WLAN0_IFACE_NAME));
-        verifyNoMoreInteractions(mISupplicantMockV11);
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal interface teardown.
-     */
-    @Test
-    public void testTeardownInterface() throws Exception {
-        testInitialize_success();
-        assertTrue(mDut.teardownIface(WLAN0_IFACE_NAME));
-
-        // Ensure that the cancel wps operation is failed because there are no interfaces setup.
-        assertFalse(mDut.cancelWps(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock, never()).cancelWps();
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal interface teardown.
-     */
-    @Test
-    public void testTeardownInterfaceV1_1() throws Exception {
-        testInitialize_successV1_1();
-
-        when(mISupplicantMockV11.removeInterface(any())).thenReturn(mStatusSuccess);
-        assertTrue(mDut.teardownIface(WLAN0_IFACE_NAME));
-        verify(mISupplicantMockV11).removeInterface(any());
-
-        // Ensure that the cancel wps operation is failed because there are no interfaces setup.
-        assertFalse(mDut.cancelWps(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock, never()).cancelWps();
-    }
-
-    /**
-     * Ensures that we reject removal of an invalid iface.
-     */
-    @Test
-    public void testInvalidTeardownInterfaceV1_1_Fails() throws Exception {
-        assertFalse(mDut.teardownIface(WLAN0_IFACE_NAME));
-        verifyNoMoreInteractions(mISupplicantMock);
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal initialization
-     * Asserts successful initialization of second interface
-     */
-    @Test
-    public void testSetupTwoInterfaces() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false, false);
-        assertTrue(mDut.setupIface(WLAN1_IFACE_NAME));
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal interface teardown.
-     * Asserts successful initialization of second interface
-     */
-    @Test
-    public void testTeardownTwoInterfaces() throws Exception {
-        testSetupTwoInterfaces();
-        assertTrue(mDut.teardownIface(WLAN0_IFACE_NAME));
-        assertTrue(mDut.teardownIface(WLAN1_IFACE_NAME));
-
-        // Ensure that the cancel wps operation is failed because there are no interfaces setup.
-        assertFalse(mDut.cancelWps(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock, never()).cancelWps();
-    }
-
-    /**
-     * Tests connection to a specified network with empty existing network.
-     */
-    @Test
-    public void testConnectWithEmptyExistingNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        executeAndValidateConnectSequence(0, false);
-    }
-
-    @Test
-    public void testConnectToNetworkWithDifferentConfigReplacesNetworkInSupplicant()
-            throws Exception {
-        executeAndValidateInitializationSequence();
-        WifiConfiguration config = executeAndValidateConnectSequence(
-                SUPPLICANT_NETWORK_ID, false);
-        // Reset mocks for mISupplicantStaIfaceMock because we finished the first connection.
-        reset(mISupplicantStaIfaceMock);
-        setupMocksForConnectSequence(true /*haveExistingNetwork*/);
-        // Make this network different by changing SSID.
-        config.SSID = "AnDifferentSSID";
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-        verify(mISupplicantStaIfaceMock).removeNetwork(SUPPLICANT_NETWORK_ID);
-        verify(mISupplicantStaIfaceMock)
-                .addNetwork(any(ISupplicantStaIface.addNetworkCallback.class));
-    }
-
-    @Test
-    public void connectToNetworkWithSameNetworkDoesNotRemoveNetworkFromSupplicant()
-            throws Exception {
-        executeAndValidateInitializationSequence();
-        WifiConfiguration config = executeAndValidateConnectSequence(SUPPLICANT_NETWORK_ID, false);
-        // Reset mocks for mISupplicantStaIfaceMock because we finished the first connection.
-        reset(mISupplicantStaIfaceMock);
-        setupMocksForConnectSequence(true /*haveExistingNetwork*/);
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-        verify(mISupplicantStaIfaceMock, never()).removeNetwork(anyInt());
-        verify(mISupplicantStaIfaceMock, never())
-                .addNetwork(any(ISupplicantStaIface.addNetworkCallback.class));
-    }
-
-    @Test
-    public void connectToNetworkWithSameNetworkButDifferentBssidUpdatesNetworkFromSupplicant()
-            throws Exception {
-        executeAndValidateInitializationSequence();
-        WifiConfiguration config = executeAndValidateConnectSequence(SUPPLICANT_NETWORK_ID, false);
-        String testBssid = "11:22:33:44:55:66";
-        when(mSupplicantStaNetworkMock.setBssid(eq(testBssid))).thenReturn(true);
-
-        // Reset mocks for mISupplicantStaIfaceMock because we finished the first connection.
-        reset(mISupplicantStaIfaceMock);
-        setupMocksForConnectSequence(true /*haveExistingNetwork*/);
-        // Change the BSSID and connect to the same network.
-        assertFalse(TextUtils.equals(
-                testBssid, config.getNetworkSelectionStatus().getNetworkSelectionBSSID()));
-        config.getNetworkSelectionStatus().setNetworkSelectionBSSID(testBssid);
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-        verify(mSupplicantStaNetworkMock).setBssid(eq(testBssid));
-        verify(mISupplicantStaIfaceMock, never()).removeNetwork(anyInt());
-        verify(mISupplicantStaIfaceMock, never())
-                .addNetwork(any(ISupplicantStaIface.addNetworkCallback.class));
-    }
-
-    /**
-     * Tests connection to a specified network failure due to network add.
-     */
-    @Test
-    public void testConnectFailureDueToNetworkAddFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        setupMocksForConnectSequence(false);
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public void answer(ISupplicantStaIface.addNetworkCallback cb) throws RemoteException {
-                cb.onValues(mStatusFailure, mock(ISupplicantStaNetwork.class));
-                return;
-            }
-        }).when(mISupplicantStaIfaceMock).addNetwork(
-                any(ISupplicantStaIface.addNetworkCallback.class));
-
-        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
-    }
-
-    /**
-     * Tests connection to a specified network failure due to network save.
-     */
-    @Test
-    public void testConnectFailureDueToNetworkSaveFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        setupMocksForConnectSequence(true);
-
-        when(mSupplicantStaNetworkMock.saveWifiConfiguration(any(WifiConfiguration.class)))
-                .thenReturn(false);
-
-        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
-        // We should have removed the existing network once before connection and once more
-        // on failure to save network configuration.
-        verify(mISupplicantStaIfaceMock, times(2)).removeNetwork(anyInt());
-    }
-
-    /**
-     * Tests connection to a specified network failure due to exception in network save.
-     */
-    @Test
-    public void testConnectFailureDueToNetworkSaveException() throws Exception {
-        executeAndValidateInitializationSequence();
-        setupMocksForConnectSequence(true);
-
-        doThrow(new IllegalArgumentException("Some error!!!"))
-                .when(mSupplicantStaNetworkMock).saveWifiConfiguration(
-                        any(WifiConfiguration.class));
-
-        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
-        // We should have removed the existing network once before connection and once more
-        // on failure to save network configuration.
-        verify(mISupplicantStaIfaceMock, times(2)).removeNetwork(anyInt());
-    }
-
-    /**
-     * Tests connection to a specified network failure due to network select.
-     */
-    @Test
-    public void testConnectFailureDueToNetworkSelectFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        setupMocksForConnectSequence(false);
-
-        when(mSupplicantStaNetworkMock.select()).thenReturn(false);
-
-        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
-    }
-
-    /**
-     * Tests roaming to the same network as the currently connected one.
-     */
-    @Test
-    public void testRoamToSameNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        executeAndValidateRoamSequence(true, false);
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
-    }
-
-    /**
-     * Tests roaming to a different network.
-     */
-    @Test
-    public void testRoamToDifferentNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        executeAndValidateRoamSequence(false, false);
-    }
-
-    /**
-     * Tests framework roaming to a linked network.
-     */
-    @Test
-    public void testRoamToLinkedNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        executeAndValidateRoamSequence(false, true);
-    }
-
-    /**
-     * Tests updating linked networks for a network id
-     */
-    @Test
-    public void testUpdateLinkedNetworks() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        final int frameworkNetId = 1;
-        final int supplicantNetId = 10;
-
-        // No current network in supplicant, return false
-        assertFalse(mDut.updateLinkedNetworks(
-                WLAN0_IFACE_NAME, SUPPLICANT_NETWORK_ID, null));
-
-        WifiConfiguration config = executeAndValidateConnectSequence(
-                frameworkNetId, false);
-
-        // Mismatched framework network id, return false
-        assertFalse(mDut.updateLinkedNetworks(WLAN0_IFACE_NAME, frameworkNetId + 1, null));
-
-        // Supplicant network id is invalid, return false
-        when(mSupplicantStaNetworkMock.getNetworkId()).thenReturn(-1);
-        assertFalse(mDut.updateLinkedNetworks(WLAN0_IFACE_NAME, frameworkNetId, null));
-
-        // Supplicant failed to return network list, return false
-        when(mSupplicantStaNetworkMock.getNetworkId()).thenReturn(supplicantNetId);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantStaIface.listNetworksCallback cb) {
-                cb.onValues(mStatusFailure, new ArrayList<>());
-            }
-        }).when(mISupplicantStaIfaceMock)
-                .listNetworks(any(ISupplicantStaIface.listNetworksCallback.class));
-        assertFalse(mDut.updateLinkedNetworks(
-                WLAN0_IFACE_NAME, frameworkNetId, null));
-
-        // Supplicant returned a null network list, return false
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantStaIface.listNetworksCallback cb) {
-                cb.onValues(mStatusSuccess, null);
-            }
-        }).when(mISupplicantStaIfaceMock)
-                .listNetworks(any(ISupplicantStaIface.listNetworksCallback.class));
-        assertFalse(mDut.updateLinkedNetworks(
-                WLAN0_IFACE_NAME, frameworkNetId, null));
-
-        // Successfully link a network to the current network
-        final ArrayList<Integer> supplicantNetIds = new ArrayList<>();
-        supplicantNetIds.add(supplicantNetId);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantStaIface.listNetworksCallback cb) {
-                cb.onValues(mStatusSuccess, supplicantNetIds);
-            }
-        }).when(mISupplicantStaIfaceMock)
-                .listNetworks(any(ISupplicantStaIface.listNetworksCallback.class));
-        WifiConfiguration linkedConfig = new WifiConfiguration();
-        linkedConfig.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
-        Map<String, WifiConfiguration> linkedNetworks = new HashMap<>();
-        linkedNetworks.put(linkedConfig.getProfileKey(), linkedConfig);
-        SupplicantStaNetworkHalHidlImpl linkedNetworkHandle =
-                mock(SupplicantStaNetworkHalHidlImpl.class);
-        when(linkedNetworkHandle.getNetworkId()).thenReturn(supplicantNetId + 1);
-        when(linkedNetworkHandle.saveWifiConfiguration(linkedConfig)).thenReturn(true);
-        when(linkedNetworkHandle.select()).thenReturn(true);
-        mDut.setStaNetworkMockable(linkedNetworkHandle);
-        assertTrue(mDut.updateLinkedNetworks(
-                WLAN0_IFACE_NAME, frameworkNetId, linkedNetworks));
-
-        // Successfully remove linked network but not the current network from supplicant
-        supplicantNetIds.add(supplicantNetId + 1);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantStaIface.listNetworksCallback cb) {
-                cb.onValues(mStatusSuccess, supplicantNetIds);
-            }
-        }).when(mISupplicantStaIfaceMock)
-                .listNetworks(any(ISupplicantStaIface.listNetworksCallback.class));
-        doAnswer(new AnswerWithArguments() {
-            public SupplicantStatus answer(int id) {
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantStaIfaceMock).removeNetwork(supplicantNetId + 1);
-        assertTrue(mDut.updateLinkedNetworks(
-                WLAN0_IFACE_NAME, frameworkNetId, null));
-        verify(mISupplicantStaIfaceMock).removeNetwork(supplicantNetId + 1);
-        verify(mISupplicantStaIfaceMock, never()).removeNetwork(supplicantNetId);
-    }
-
-    /**
-     * Tests roaming failure because of unable to set bssid.
-     */
-    @Test
-    public void testRoamFailureDueToBssidSet() throws Exception {
-        executeAndValidateInitializationSequence();
-        int connectedNetworkId = 5;
-        executeAndValidateConnectSequence(connectedNetworkId, false);
-        when(mSupplicantStaNetworkMock.setBssid(anyString())).thenReturn(false);
-
-        WifiConfiguration roamingConfig = new WifiConfiguration();
-        roamingConfig.networkId = connectedNetworkId;
-        roamingConfig.getNetworkSelectionStatus().setNetworkSelectionBSSID("45:34:23:23:ab:ed");
-        assertFalse(mDut.roamToNetwork(WLAN0_IFACE_NAME, roamingConfig));
-    }
-
-    /**
-     * Tests removal of all configured networks from wpa_supplicant.
-     */
-    @Test
-    public void testRemoveAllNetworks() throws Exception {
-        executeAndValidateInitializationSequence();
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public void answer(ISupplicantStaIface.listNetworksCallback cb) {
-                cb.onValues(mStatusSuccess, new ArrayList<>(NETWORK_ID_TO_SSID.keySet()));
-            }
-        }).when(mISupplicantStaIfaceMock)
-                .listNetworks(any(ISupplicantStaIface.listNetworksCallback.class));
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public SupplicantStatus answer(int id) {
-                assertTrue(NETWORK_ID_TO_SSID.containsKey(id));
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantStaIfaceMock).removeNetwork(anyInt());
-
-        assertTrue(mDut.removeAllNetworks(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMock, times(NETWORK_ID_TO_SSID.size())).removeNetwork(anyInt());
-    }
-
-    /**
-     * Remove all networks while connected, verify that the current network info is resetted.
-     */
-    @Test
-    public void testRemoveAllNetworksWhileConnected() throws Exception {
-        String testBssid = "11:22:33:44:55:66";
-        when(mSupplicantStaNetworkMock.setBssid(eq(testBssid))).thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-
-        // Connect to a network and verify current network is set.
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, testBssid));
-        verify(mSupplicantStaNetworkMock).setBssid(eq(testBssid));
-        reset(mSupplicantStaNetworkMock);
-
-        // Remove all networks and verify current network info is resetted.
-        assertTrue(mDut.removeAllNetworks(WLAN0_IFACE_NAME));
-        assertFalse(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, testBssid));
-        verify(mSupplicantStaNetworkMock, never()).setBssid(eq(testBssid));
-    }
-
-    /**
-     * Tests roaming failure because of unable to reassociate.
-     */
-    @Test
-    public void testRoamFailureDueToReassociate() throws Exception {
-        executeAndValidateInitializationSequence();
-        int connectedNetworkId = 5;
-        executeAndValidateConnectSequence(connectedNetworkId, false);
-
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public SupplicantStatus answer() throws RemoteException {
-                return mStatusFailure;
-            }
-        }).when(mISupplicantStaIfaceMock).reassociate();
-        when(mSupplicantStaNetworkMock.setBssid(anyString())).thenReturn(true);
-
-        WifiConfiguration roamingConfig = new WifiConfiguration();
-        roamingConfig.networkId = connectedNetworkId;
-        roamingConfig.getNetworkSelectionStatus().setNetworkSelectionBSSID("45:34:23:23:ab:ed");
-        assertFalse(mDut.roamToNetwork(WLAN0_IFACE_NAME, roamingConfig));
-    }
-
-    /**
-     * Tests the retrieval of WPS NFC token.
-     */
-    @Test
-    public void testGetCurrentNetworkWpsNfcConfigurationToken() throws Exception {
-        String token = "45adbc1";
-        when(mSupplicantStaNetworkMock.getWpsNfcConfigurationToken()).thenReturn(token);
-
-        executeAndValidateInitializationSequence();
-        // Return null when not connected to the network.
-        assertTrue(mDut.getCurrentNetworkWpsNfcConfigurationToken(WLAN0_IFACE_NAME) == null);
-        verify(mSupplicantStaNetworkMock, never()).getWpsNfcConfigurationToken();
-        executeAndValidateConnectSequence(4, false);
-        assertEquals(token, mDut.getCurrentNetworkWpsNfcConfigurationToken(WLAN0_IFACE_NAME));
-        verify(mSupplicantStaNetworkMock).getWpsNfcConfigurationToken();
-    }
-
-    /**
-     * Tests the setting of BSSID.
-     */
-    @Test
-    public void testSetCurrentNetworkBssid() throws Exception {
-        String bssidStr = "34:34:12:12:12:90";
-        when(mSupplicantStaNetworkMock.setBssid(eq(bssidStr))).thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        // Fail when not connected to a network.
-        assertFalse(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, bssidStr));
-        verify(mSupplicantStaNetworkMock, never()).setBssid(eq(bssidStr));
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, bssidStr));
-        verify(mSupplicantStaNetworkMock).setBssid(eq(bssidStr));
-    }
-
-    /**
-     * Tests the sending identity response for the current network.
-     */
-    @Test
-    public void testSetCurrentNetworkEapIdentityResponse() throws Exception {
-        String identity = "blah@blah.com";
-        String encryptedIdentity = "blah2@blah.com";
-        when(mSupplicantStaNetworkMock.sendNetworkEapIdentityResponse(eq(identity),
-                eq(encryptedIdentity)))
-                .thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        // Fail when not connected to a network.
-        assertFalse(mDut.sendCurrentNetworkEapIdentityResponse(WLAN0_IFACE_NAME, identity,
-                encryptedIdentity));
-        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapIdentityResponse(eq(identity),
-                eq(encryptedIdentity));
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.sendCurrentNetworkEapIdentityResponse(WLAN0_IFACE_NAME, identity,
-                encryptedIdentity));
-        verify(mSupplicantStaNetworkMock).sendNetworkEapIdentityResponse(eq(identity),
-                eq(encryptedIdentity));
-    }
-
-    /**
-     * Tests the getting of anonymous identity for the current network.
-     */
-    @Test
-    public void testGetCurrentNetworkEapAnonymousIdentity() throws Exception {
-        String anonymousIdentity = "aaa@bbb.ccc";
-        when(mSupplicantStaNetworkMock.fetchEapAnonymousIdentity())
-                .thenReturn(anonymousIdentity);
-        executeAndValidateInitializationSequence();
-
-        // Return null when not connected to the network.
-        assertEquals(null, mDut.getCurrentNetworkEapAnonymousIdentity(WLAN0_IFACE_NAME));
-        executeAndValidateConnectSequence(4, false);
-        // Return anonymous identity for the current network.
-        assertEquals(
-                anonymousIdentity, mDut.getCurrentNetworkEapAnonymousIdentity(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Tests the sending gsm auth response for the current network.
-     */
-    @Test
-    public void testSetCurrentNetworkEapSimGsmAuthResponse() throws Exception {
-        String params = "test";
-        when(mSupplicantStaNetworkMock.sendNetworkEapSimGsmAuthResponse(eq(params)))
-                .thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        // Fail when not connected to a network.
-        assertFalse(mDut.sendCurrentNetworkEapSimGsmAuthResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapSimGsmAuthResponse(eq(params));
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.sendCurrentNetworkEapSimGsmAuthResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock).sendNetworkEapSimGsmAuthResponse(eq(params));
-    }
-
-    /**
-     * Tests the sending umts auth response for the current network.
-     */
-    @Test
-    public void testSetCurrentNetworkEapSimUmtsAuthResponse() throws Exception {
-        String params = "test";
-        when(mSupplicantStaNetworkMock.sendNetworkEapSimUmtsAuthResponse(eq(params)))
-                .thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        // Fail when not connected to a network.
-        assertFalse(mDut.sendCurrentNetworkEapSimUmtsAuthResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapSimUmtsAuthResponse(eq(params));
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.sendCurrentNetworkEapSimUmtsAuthResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock).sendNetworkEapSimUmtsAuthResponse(eq(params));
-    }
-
-    /**
-     * Tests the sending umts auts response for the current network.
-     */
-    @Test
-    public void testSetCurrentNetworkEapSimUmtsAutsResponse() throws Exception {
-        String params = "test";
-        when(mSupplicantStaNetworkMock.sendNetworkEapSimUmtsAutsResponse(eq(params)))
-                .thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        // Fail when not connected to a network.
-        assertFalse(mDut.sendCurrentNetworkEapSimUmtsAutsResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapSimUmtsAutsResponse(eq(params));
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.sendCurrentNetworkEapSimUmtsAutsResponse(WLAN0_IFACE_NAME, params));
-        verify(mSupplicantStaNetworkMock).sendNetworkEapSimUmtsAutsResponse(eq(params));
-    }
-
-    /**
-     * Tests the setting of WPS device type.
-     */
-    @Test
-    public void testSetWpsDeviceType() throws Exception {
-        String validDeviceTypeStr = "10-0050F204-5";
-        byte[] expectedDeviceType = { 0x0, 0xa, 0x0, 0x50, (byte) 0xf2, 0x04, 0x0, 0x05};
-        String invalidDeviceType1Str = "10-02050F204-5";
-        String invalidDeviceType2Str = "10-0050F204-534";
-        when(mISupplicantStaIfaceMock.setWpsDeviceType(any(byte[].class)))
-                .thenReturn(mStatusSuccess);
-
-        executeAndValidateInitializationSequence();
-
-        // This should work.
-        assertTrue(mDut.setWpsDeviceType(WLAN0_IFACE_NAME, validDeviceTypeStr));
-        verify(mISupplicantStaIfaceMock).setWpsDeviceType(eq(expectedDeviceType));
-
-        // This should not work
-        assertFalse(mDut.setWpsDeviceType(WLAN0_IFACE_NAME, invalidDeviceType1Str));
-        // This should not work
-        assertFalse(mDut.setWpsDeviceType(WLAN0_IFACE_NAME, invalidDeviceType2Str));
-    }
-
-    /**
-     * Tests the setting of WPS config methods.
-     */
-    @Test
-    public void testSetWpsConfigMethods() throws Exception {
-        String validConfigMethodsStr = "physical_display virtual_push_button";
-        Short expectedConfigMethods =
-                WpsConfigMethods.PHY_DISPLAY | WpsConfigMethods.VIRT_PUSHBUTTON;
-        String invalidConfigMethodsStr = "physical_display virtual_push_button test";
-        when(mISupplicantStaIfaceMock.setWpsConfigMethods(anyShort())).thenReturn(mStatusSuccess);
-
-        executeAndValidateInitializationSequence();
-
-        // This should work.
-        assertTrue(mDut.setWpsConfigMethods(WLAN0_IFACE_NAME, validConfigMethodsStr));
-        verify(mISupplicantStaIfaceMock).setWpsConfigMethods(eq(expectedConfigMethods));
-
-        // This should throw an illegal argument exception.
-        try {
-            assertFalse(mDut.setWpsConfigMethods(WLAN0_IFACE_NAME, invalidConfigMethodsStr));
-        } catch (IllegalArgumentException e) {
-            return;
-        }
-        assertTrue(false);
-    }
-
-    /**
-     * Tests the handling of ANQP done callback.
-     * Note: Since the ANQP element parsing methods are static, this can only test the negative test
-     * where all the parsing fails because the data is empty. It'll be non-trivial and unnecessary
-     * to test out the parsing logic here.
-     */
-    @Test
-    public void testAnqpDoneCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        mISupplicantStaIfaceCallback.onAnqpQueryDone(
-                bssid, new ISupplicantStaIfaceCallback.AnqpData(),
-                new ISupplicantStaIfaceCallback.Hs20AnqpData());
-
-        ArgumentCaptor<AnqpEvent> anqpEventCaptor = ArgumentCaptor.forClass(AnqpEvent.class);
-        verify(mWifiMonitor).broadcastAnqpDoneEvent(
-                eq(WLAN0_IFACE_NAME), anqpEventCaptor.capture());
-        assertEquals(
-                ByteBufferReader.readInteger(
-                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
-                anqpEventCaptor.getValue().getBssid());
-    }
-
-    /**
-     * Tests the handling of ANQP done callback.
-     * Note: Since the ANQP element parsing methods are static, this can only test the negative test
-     * where all the parsing fails because the data is empty. It'll be non-trivial and unnecessary
-     * to test out the parsing logic here.
-     */
-    @Test
-    public void testAnqpDoneCallback_1_4() throws Exception {
-        setupMocksForHalV1_4();
-        executeAndValidateInitializationSequenceV1_4();
-        assertNotNull(mISupplicantStaIfaceCallbackV14);
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        mISupplicantStaIfaceCallbackV14.onAnqpQueryDone_1_4(
-                bssid,
-                new android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.AnqpData(),
-                new ISupplicantStaIfaceCallback.Hs20AnqpData());
-
-        ArgumentCaptor<AnqpEvent> anqpEventCaptor = ArgumentCaptor.forClass(AnqpEvent.class);
-        verify(mWifiMonitor).broadcastAnqpDoneEvent(
-                eq(WLAN0_IFACE_NAME), anqpEventCaptor.capture());
-        assertEquals(
-                ByteBufferReader.readInteger(
-                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
-                anqpEventCaptor.getValue().getBssid());
-    }
-
-    /**
-     * Tests the handling of Icon done callback.
-     */
-    @Test
-    public void testIconDoneCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        byte[] iconData = new byte[ICON_FILE_SIZE];
-        new Random().nextBytes(iconData);
-        mISupplicantStaIfaceCallback.onHs20IconQueryDone(
-                bssid, ICON_FILE_NAME, NativeUtil.byteArrayToArrayList(iconData));
-
-        ArgumentCaptor<IconEvent> iconEventCaptor = ArgumentCaptor.forClass(IconEvent.class);
-        verify(mWifiMonitor).broadcastIconDoneEvent(
-                eq(WLAN0_IFACE_NAME), iconEventCaptor.capture());
-        assertEquals(
-                ByteBufferReader.readInteger(
-                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
-                iconEventCaptor.getValue().getBSSID());
-        assertEquals(ICON_FILE_NAME, iconEventCaptor.getValue().getFileName());
-        assertArrayEquals(iconData, iconEventCaptor.getValue().getData());
-    }
-
-    /**
-     * Tests the handling of HS20 subscription remediation callback.
-     */
-    @Test
-    public void testHs20SubscriptionRemediationCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        byte osuMethod = ISupplicantStaIfaceCallback.OsuMethod.OMA_DM;
-        mISupplicantStaIfaceCallback.onHs20SubscriptionRemediation(
-                bssid, osuMethod, HS20_URL);
-
-        ArgumentCaptor<WnmData> wnmDataCaptor = ArgumentCaptor.forClass(WnmData.class);
-        verify(mWifiMonitor).broadcastWnmEvent(eq(WLAN0_IFACE_NAME), wnmDataCaptor.capture());
-        assertEquals(
-                ByteBufferReader.readInteger(
-                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
-                wnmDataCaptor.getValue().getBssid());
-        assertEquals(osuMethod, wnmDataCaptor.getValue().getMethod());
-        assertEquals(HS20_URL, wnmDataCaptor.getValue().getUrl());
-    }
-
-    /**
-     * Tests the handling of HS20 deauth imminent callback.
-     */
-    @Test
-    public void testHs20DeauthImminentCallbackWithEssReasonCode() throws Exception {
-        executeAndValidateHs20DeauthImminentCallback(true);
-    }
-
-    /**
-     * Tests the handling of HS20 deauth imminent callback.
-     */
-    @Test
-    public void testHs20DeauthImminentCallbackWithNonEssReasonCode() throws Exception {
-        executeAndValidateHs20DeauthImminentCallback(false);
-    }
-
-    /**
-     * Tests the handling of HS20 Terms & Conditions acceptance callback.
-     */
-    @Test
-    public void testHs20TermsAndConditionsAcceptance() throws Exception {
-        executeAndValidateHs20TermsAndConditionsCallback();
-    }
-
-    /**
-     * Tests the handling of state change notification without any configured network.
-     */
-    @Test
-    public void testStateChangeCallbackWithNoConfiguredNetwork() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.INACTIVE,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-
-        // Can't compare WifiSsid instances because they lack an equals.
-        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiConfiguration.INVALID_NETWORK_ID),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.INACTIVE));
-    }
-
-    /**
-     * Tests the handling of state change notification to associated after configuring a network.
-     */
-    @Test
-    public void testStateChangeToAssociatedCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        int frameworkNetworkId = 6;
-        executeAndValidateConnectSequence(frameworkNetworkId, false);
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATED,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-
-        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.ASSOCIATED));
-    }
-
-    /**
-     * Tests the handling of state change notification to completed after configuring a network.
-     */
-    @Test
-    public void testStateChangeToCompletedCallback() throws Exception {
-        InOrder wifiMonitorInOrder = inOrder(mWifiMonitor);
-        executeAndValidateInitializationSequence();
-        int frameworkNetworkId = 6;
-        executeAndValidateConnectSequence(frameworkNetworkId, false);
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.COMPLETED,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)));
-
-        wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(false), eq(wifiSsid), eq(BSSID));
-        wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
-    }
-
-    /**
-     * Tests the handling of network disconnected notification.
-     */
-    @Test
-    public void testDisconnectedCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        // Set the SSID for the current connection.
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        int reasonCode = 5;
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor).broadcastNetworkDisconnectionEvent(
-                eq(WLAN0_IFACE_NAME), eq(true), eq(reasonCode), eq(SUPPLICANT_SSID), eq(BSSID));
-
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-        verify(mWifiMonitor).broadcastNetworkDisconnectionEvent(
-                eq(WLAN0_IFACE_NAME), eq(false), eq(reasonCode), eq(SUPPLICANT_SSID), eq(BSSID));
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords.
-     */
-    @Test
-    public void testAuthFailurePasswordOnDisconnect() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        executeAndValidateConnectSequenceWithKeyMgmt(
-                0, false, WifiConfiguration.SECURITY_TYPE_PSK, null);
-
-        int reasonCode = 3;
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0))
-                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt(), any(), any());
-
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-        verify(mWifiMonitor, times(0))
-                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt(), any(), any());
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD), eq(-1),
-                eq(SUPPLICANT_SSID), eq(MacAddress.fromString(BSSID)));
-    }
-
-    /**
-     * Tests the handling of EAP failure disconnects.
-     */
-    @Test
-    public void testAuthFailureEapOnDisconnect() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        executeAndValidateConnectSequenceWithKeyMgmt(
-                0, false, WifiConfiguration.SECURITY_TYPE_EAP, null);
-
-        int reasonCode = 3;
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0))
-                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt(), any(), any());
-
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-        verify(mWifiMonitor, times(0))
-                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt(), any(), any());
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATED,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        // Ensure we don't lose our prev state with this state changed event.
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.DISCONNECTED,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE), eq(-1),
-                eq(SUPPLICANT_SSID), eq(MacAddress.fromString(BSSID)));
-    }
-
-    /**
-     * Tests the handling of EAP failure disconnects.
-     */
-    @Test
-    public void testOnlyOneAuthFailureEap() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        executeAndValidateConnectSequenceWithKeyMgmt(
-                0, false, WifiConfiguration.SECURITY_TYPE_EAP, null);
-
-        int reasonCode = 3;
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATED,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallback.onEapFailure();
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE), eq(-1),
-                eq(SUPPLICANT_SSID), eq(MacAddress.BROADCAST_ADDRESS));
-
-        // Ensure that the disconnect is ignored.
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-        verify(mWifiMonitor, times(1)).broadcastAuthenticationFailureEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE), eq(-1),
-                eq(SUPPLICANT_SSID), eq(MacAddress.BROADCAST_ADDRESS));
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords for WPA3-Personal networks
-     */
-    @Test
-    public void testWpa3AuthRejectionPassword() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        executeAndValidateConnectSequenceWithKeyMgmt(SUPPLICANT_NETWORK_ID, false,
-                WifiConfiguration.SECURITY_TYPE_SAE, null);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        int statusCode = ISupplicantStaIfaceCallback.StatusCode.UNSPECIFIED_FAILURE;
-        mISupplicantStaIfaceCallback.onAssociationRejected(
-                NativeUtil.macAddressToByteArray(BSSID), statusCode, false);
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
-                eq(WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD), eq(-1),
-                eq(SUPPLICANT_SSID), eq(MacAddress.fromString(BSSID)));
-        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
-                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
-        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
-                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
-        AssocRejectEventInfo assocRejectEventInfo =
-                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
-        assertNotNull(assocRejectEventInfo);
-        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
-        assertEquals(BSSID, assocRejectEventInfo.bssid);
-        assertEquals(statusCode, assocRejectEventInfo.statusCode);
-        assertFalse(assocRejectEventInfo.timedOut);
-        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
-        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
-    }
-
-    /**
-     * Tests the handling of association rejection for WPA3-Personal networks
-     */
-    @Test
-    public void testWpa3AuthRejectionEverConnected() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        WifiConfiguration config = executeAndValidateConnectSequenceWithKeyMgmt(
-                SUPPLICANT_NETWORK_ID, false,
-                WifiConfiguration.SECURITY_TYPE_SAE, null, true);
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        int statusCode = ISupplicantStaIfaceCallback.StatusCode.UNSPECIFIED_FAILURE;
-        mISupplicantStaIfaceCallback.onAssociationRejected(
-                NativeUtil.macAddressToByteArray(BSSID), statusCode, false);
-        verify(mWifiMonitor, never()).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
-                anyInt(), anyInt(), any(), any());
-        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
-                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
-        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
-                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
-        AssocRejectEventInfo assocRejectEventInfo =
-                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
-        assertNotNull(assocRejectEventInfo);
-        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
-        assertEquals(BSSID, assocRejectEventInfo.bssid);
-        assertEquals(statusCode, assocRejectEventInfo.statusCode);
-        assertFalse(assocRejectEventInfo.timedOut);
-        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
-        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords for WEP networks.
-     */
-    @Test
-    public void testWepAuthRejectionPassword() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        executeAndValidateConnectSequenceWithKeyMgmt(SUPPLICANT_NETWORK_ID, false,
-                WifiConfiguration.SECURITY_TYPE_WEP, "97CA326539");
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        int statusCode = ISupplicantStaIfaceCallback.StatusCode.CHALLENGE_FAIL;
-        mISupplicantStaIfaceCallback.onAssociationRejected(
-                NativeUtil.macAddressToByteArray(BSSID), statusCode, false);
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
-                eq(WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD), eq(-1),
-                eq(SUPPLICANT_SSID), eq(MacAddress.fromString(BSSID)));
-        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
-                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
-        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
-                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
-        AssocRejectEventInfo assocRejectEventInfo =
-                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
-        assertNotNull(assocRejectEventInfo);
-        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
-        assertEquals(BSSID, assocRejectEventInfo.bssid);
-        assertEquals(statusCode, assocRejectEventInfo.statusCode);
-        assertFalse(assocRejectEventInfo.timedOut);
-        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
-        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords, edge case.
-     *
-     * If the network is removed during 4-way handshake, do not call it a password mismatch.
-     */
-    @Test
-    public void testNetworkRemovedDuring4way() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        int reasonCode = 3;
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallback.onNetworkRemoved(SUPPLICANT_NETWORK_ID);
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
-                anyInt(), any(), any());
-    }
-
-     /**
-      * Tests the handling of incorrect network passwords, edge case.
-      *
-      * If the disconnect reason is "IE in 4way differs", do not call it a password mismatch.
-      */
-    @Test
-    public void testIeDiffers() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        int reasonCode = ISupplicantStaIfaceCallback.ReasonCode.IE_IN_4WAY_DIFFERS;
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
-                anyInt(), any(), any());
-    }
-
-    /**
-     * Tests the handling of eap failure during disconnect.
-     */
-    @Test
-    public void testEapFailure() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        int reasonCode = ISupplicantStaIfaceCallback.ReasonCode.IEEE_802_1X_AUTH_FAILED;
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
-        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
-                anyInt(), any(), any());
-    }
-
-    /**
-     * Tests the handling of association rejection notification.
-     */
-    @Test
-    public void testAssociationRejectionCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        int statusCode = 7;
-        mISupplicantStaIfaceCallback.onAssociationRejected(
-                NativeUtil.macAddressToByteArray(BSSID), statusCode, false);
-        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
-                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
-        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
-                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
-        AssocRejectEventInfo assocRejectEventInfo =
-                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
-        assertNotNull(assocRejectEventInfo);
-        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
-        assertEquals(BSSID, assocRejectEventInfo.bssid);
-        assertEquals(statusCode, assocRejectEventInfo.statusCode);
-        assertFalse(assocRejectEventInfo.timedOut);
-        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
-        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
-    }
-
-    /**
-     * Tests the handling of authentication timeout notification.
-     */
-    @Test
-    public void testAuthenticationTimeoutCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallback.onAuthenticationTimeout(
-                NativeUtil.macAddressToByteArray(BSSID));
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
-                eq(WifiManager.ERROR_AUTH_FAILURE_TIMEOUT), eq(-1),
-                eq(SUPPLICANT_SSID), eq(MacAddress.fromString(BSSID)));
-    }
-
-    /**
-     * Tests the handling of bssid change notification.
-     */
-    @Test
-    public void testBssidChangedCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onBssidChanged(
-                BssidChangeReason.ASSOC_START, NativeUtil.macAddressToByteArray(BSSID));
-        verify(mWifiMonitor).broadcastTargetBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
-        verify(mWifiMonitor, never()).broadcastAssociatedBssidEvent(
-                eq(WLAN0_IFACE_NAME), eq(BSSID));
-
-        reset(mWifiMonitor);
-        mISupplicantStaIfaceCallback.onBssidChanged(
-                BssidChangeReason.ASSOC_COMPLETE, NativeUtil.macAddressToByteArray(BSSID));
-        verify(mWifiMonitor, never()).broadcastTargetBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
-        verify(mWifiMonitor).broadcastAssociatedBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
-
-        reset(mWifiMonitor);
-        mISupplicantStaIfaceCallback.onBssidChanged(
-                BssidChangeReason.DISASSOC, NativeUtil.macAddressToByteArray(BSSID));
-        verify(mWifiMonitor, never()).broadcastTargetBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
-        verify(mWifiMonitor, never()).broadcastAssociatedBssidEvent(
-                eq(WLAN0_IFACE_NAME), eq(BSSID));
-    }
-
-    /**
-     * Tests the handling of EAP failure notification.
-     */
-    @Test
-    public void testEapFailureCallback() throws Exception {
-        int eapFailureCode = WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED;
-        testInitialize_successV1_1();
-        assertNotNull(mISupplicantStaIfaceCallbackV11);
-
-        mISupplicantStaIfaceCallbackV11.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallbackV11.onEapFailure_1_1(eapFailureCode);
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE),
-                eq(eapFailureCode), eq(SUPPLICANT_SSID), eq(MacAddress.BROADCAST_ADDRESS));
-    }
-
-    /**
-     * Tests the handling of EAP failure notification.
-     */
-    @Test
-    public void testEapFailureCallback1_3() throws Exception {
-        int eapFailureCode = WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED;
-        testInitialize_successV1_3();
-        assertNotNull(mISupplicantStaIfaceCallbackV13);
-
-        mISupplicantStaIfaceCallbackV13.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        mISupplicantStaIfaceCallbackV13.onEapFailure_1_3(eapFailureCode);
-        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE),
-                eq(eapFailureCode), eq(SUPPLICANT_SSID), eq(MacAddress.BROADCAST_ADDRESS));
-    }
-
-    /**
-     * Tests the handling of Wps success notification.
-     */
-    @Test
-    public void testWpsSuccessCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onWpsEventSuccess();
-        verify(mWifiMonitor).broadcastWpsSuccessEvent(eq(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Tests the handling of Wps fail notification.
-     */
-    @Test
-    public void testWpsFailureCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        short cfgError = ISupplicantStaIfaceCallback.WpsConfigError.MULTIPLE_PBC_DETECTED;
-        short errorInd = ISupplicantStaIfaceCallback.WpsErrorIndication.SECURITY_WEP_PROHIBITED;
-        mISupplicantStaIfaceCallback.onWpsEventFail(
-                NativeUtil.macAddressToByteArray(BSSID), cfgError, errorInd);
-        verify(mWifiMonitor).broadcastWpsFailEvent(eq(WLAN0_IFACE_NAME),
-                eq((int) cfgError), eq((int) errorInd));
-    }
-
-    /**
-     * Tests the handling of Wps fail notification.
-     */
-    @Test
-    public void testWpsTimeoutCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        short cfgError = ISupplicantStaIfaceCallback.WpsConfigError.MSG_TIMEOUT;
-        short errorInd = ISupplicantStaIfaceCallback.WpsErrorIndication.NO_ERROR;
-        mISupplicantStaIfaceCallback.onWpsEventFail(
-                NativeUtil.macAddressToByteArray(BSSID), cfgError, errorInd);
-        verify(mWifiMonitor).broadcastWpsTimeoutEvent(eq(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Tests the handling of Wps pbc overlap notification.
-     */
-    @Test
-    public void testWpsPbcOverlapCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        mISupplicantStaIfaceCallback.onWpsEventPbcOverlap();
-        verify(mWifiMonitor).broadcastWpsOverlapEvent(eq(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Tests the handling of service manager death notification.
-     */
-    @Test
-    public void testServiceManagerDeathCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mServiceManagerDeathCaptor.getValue());
-        assertTrue(mDut.isInitializationComplete());
-        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
-
-        mServiceManagerDeathCaptor.getValue().serviceDied(5L);
-        mLooper.dispatchAll();
-
-        assertFalse(mDut.isInitializationComplete());
-        verify(mSupplicantHalDeathHandler).onDeath();
-    }
-
-    /**
-     * Tests the handling of supplicant death notification.
-     */
-    @Test
-    public void testSupplicantDeathCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mSupplicantDeathCaptor.getValue());
-        assertTrue(mDut.isInitializationComplete());
-        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
-
-        mSupplicantDeathCaptor.getValue().serviceDied(mDeathRecipientCookieCaptor.getValue());
-        mLooper.dispatchAll();
-
-        assertFalse(mDut.isInitializationComplete());
-        verify(mSupplicantHalDeathHandler).onDeath();
-    }
-
-    /**
-     * Tests the handling of supplicant death notification.
-     */
-    @Test
-    public void testSupplicantStaleDeathCallback() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mSupplicantDeathCaptor.getValue());
-        assertTrue(mDut.isInitializationComplete());
-        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
-
-        mSupplicantDeathCaptor.getValue().serviceDied(mDeathRecipientCookieCaptor.getValue() - 1);
-        mLooper.dispatchAll();
-
-        assertTrue(mDut.isInitializationComplete());
-        verify(mSupplicantHalDeathHandler, never()).onDeath();
-    }
-
-    /**
-     * When wpa_supplicant is dead, we could end up getting a remote exception on a hwbinder call
-     * and then the death notification.
-     */
-    @Test
-    public void testHandleRemoteExceptionAndDeathNotification() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
-        assertTrue(mDut.isInitializationComplete());
-
-        // Throw remote exception on hwbinder call.
-        when(mISupplicantStaIfaceMock.setPowerSave(anyBoolean()))
-                .thenThrow(new RemoteException());
-        assertFalse(mDut.setPowerSave(WLAN0_IFACE_NAME, true));
-        verify(mISupplicantStaIfaceMock).setPowerSave(true);
-
-        // Check that remote exception cleared all internal state.
-        assertFalse(mDut.isInitializationComplete());
-
-        // Ensure that further calls fail because the remote exception clears any state.
-        assertFalse(mDut.setPowerSave(WLAN0_IFACE_NAME, true));
-        //.. No call to ISupplicantStaIface object
-
-        // Now trigger a death notification and ensure it's handled.
-        assertNotNull(mSupplicantDeathCaptor.getValue());
-        mSupplicantDeathCaptor.getValue().serviceDied(mDeathRecipientCookieCaptor.getValue());
-        mLooper.dispatchAll();
-
-        // External death notification fires only once!
-        verify(mSupplicantHalDeathHandler).onDeath();
-    }
-
-    /**
-     * Tests the setting of log level.
-     */
-    @Test
-    public void testSetLogLevel() throws Exception {
-        when(mISupplicantMock.setDebugParams(anyInt(), anyBoolean(), anyBoolean()))
-                .thenReturn(mStatusSuccess);
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.setLogLevel(true));
-
-        executeAndValidateInitializationSequence();
-
-        // This should work.
-        assertTrue(mDut.setLogLevel(true));
-        verify(mISupplicantMock)
-                .setDebugParams(eq(ISupplicant.DebugLevel.DEBUG), eq(false), eq(false));
-    }
-
-    /**
-     * Tests the setting of log level with show key enabled.
-     */
-    @Test
-    public void testSetLogLevelWithShowKeyEnabled() throws Exception {
-        when(mWifiGlobals.getShowKeyVerboseLoggingModeEnabled())
-                .thenReturn(true);
-        when(mISupplicantMock.setDebugParams(anyInt(), anyBoolean(), anyBoolean()))
-                .thenReturn(mStatusSuccess);
-
-        executeAndValidateInitializationSequence();
-
-        // This should work.
-        assertTrue(mDut.setLogLevel(true));
-        verify(mISupplicantMock)
-                .setDebugParams(eq(ISupplicant.DebugLevel.DEBUG), eq(false), eq(true));
-    }
-
-    /**
-     * Tests that show key is not enabled when verbose logging is not enabled.
-     */
-    @Test
-    public void testVerboseLoggingDisabledWithShowKeyEnabled() throws Exception {
-        when(mWifiGlobals.getShowKeyVerboseLoggingModeEnabled())
-                .thenReturn(true);
-        when(mISupplicantMock.setDebugParams(anyInt(), anyBoolean(), anyBoolean()))
-                .thenReturn(mStatusSuccess);
-
-        executeAndValidateInitializationSequence();
-
-        // If verbose logging is not enabled, show key should not be enabled.
-        assertTrue(mDut.setLogLevel(false));
-        verify(mISupplicantMock)
-                .setDebugParams(eq(ISupplicant.DebugLevel.INFO), eq(false), eq(false));
-    }
-
-    /**
-     * Tests the setting of concurrency priority.
-     */
-    @Test
-    public void testConcurrencyPriority() throws Exception {
-        when(mISupplicantMock.setConcurrencyPriority(anyInt())).thenReturn(mStatusSuccess);
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.setConcurrencyPriority(false));
-
-        executeAndValidateInitializationSequence();
-
-        // This should work.
-        assertTrue(mDut.setConcurrencyPriority(false));
-        verify(mISupplicantMock).setConcurrencyPriority(eq(IfaceType.P2P));
-        assertTrue(mDut.setConcurrencyPriority(true));
-        verify(mISupplicantMock).setConcurrencyPriority(eq(IfaceType.STA));
-    }
-
-    /**
-     * Tests the start of wps registrar.
-     */
-    @Test
-    public void testStartWpsRegistrar() throws Exception {
-        when(mISupplicantStaIfaceMock.startWpsRegistrar(any(byte[].class), anyString()))
-                .thenReturn(mStatusSuccess);
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, null, null));
-
-        executeAndValidateInitializationSequence();
-
-        assertFalse(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, null, null));
-        verify(mISupplicantStaIfaceMock, never()).startWpsRegistrar(any(byte[].class), anyString());
-
-        assertFalse(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, new String(), "452233"));
-        verify(mISupplicantStaIfaceMock, never()).startWpsRegistrar(any(byte[].class), anyString());
-
-        assertTrue(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, "45:23:12:12:12:98", "562535"));
-        verify(mISupplicantStaIfaceMock).startWpsRegistrar(any(byte[].class), anyString());
-    }
-
-    /**
-     * Tests the start of wps PBC.
-     */
-    @Test
-    public void testStartWpsPbc() throws Exception {
-        when(mISupplicantStaIfaceMock.startWpsPbc(any(byte[].class))).thenReturn(mStatusSuccess);
-        String bssid = "45:23:12:12:12:98";
-        byte[] bssidBytes = {0x45, 0x23, 0x12, 0x12, 0x12, (byte) 0x98};
-        byte[] anyBssidBytes = {0, 0, 0, 0, 0, 0};
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.startWpsPbc(WLAN0_IFACE_NAME, bssid));
-        verify(mISupplicantStaIfaceMock, never()).startWpsPbc(any(byte[].class));
-
-        executeAndValidateInitializationSequence();
-
-        assertTrue(mDut.startWpsPbc(WLAN0_IFACE_NAME, bssid));
-        verify(mISupplicantStaIfaceMock).startWpsPbc(eq(bssidBytes));
-
-        assertTrue(mDut.startWpsPbc(WLAN0_IFACE_NAME, null));
-        verify(mISupplicantStaIfaceMock).startWpsPbc(eq(anyBssidBytes));
-    }
-
-    /**
-     * Tests country code setter
-     */
-    @Test
-    public void testSetCountryCode() throws Exception {
-        when(mISupplicantStaIfaceMock.setCountryCode(any(byte[].class))).thenReturn(mStatusSuccess);
-        String testCountryCode = "US";
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.setCountryCode(WLAN0_IFACE_NAME, testCountryCode));
-        verify(mISupplicantStaIfaceMock, never()).setCountryCode(any(byte[].class));
-
-        executeAndValidateInitializationSequence();
-
-        assertTrue(mDut.setCountryCode(WLAN0_IFACE_NAME, testCountryCode));
-        verify(mISupplicantStaIfaceMock).setCountryCode(eq(testCountryCode.getBytes()));
-
-        // Bad input values should fail the call.
-        reset(mISupplicantStaIfaceMock);
-
-        assertFalse(mDut.setCountryCode(WLAN0_IFACE_NAME, null));
-        verify(mISupplicantStaIfaceMock, never()).setCountryCode(any(byte[].class));
-
-        assertFalse(mDut.setCountryCode(WLAN0_IFACE_NAME, "U"));
-        verify(mISupplicantStaIfaceMock, never()).setCountryCode(any(byte[].class));
-    }
-
-    /**
-     * Tests the start daemon for V1_0 service.
-     */
-    @Test
-    public void testStartDaemonV1_0() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.startDaemon());
-        verify(mFrameworkFacade).startSupplicant();
-    }
-
-    /**
-     * Tests the start daemon for V1_1 service.
-     */
-    @Test
-    public void testStartDaemonV1_1() throws Exception {
-        setupMocksForHalV1_1();
-
-        executeAndValidateInitializationSequenceV1_1(false, false);
-        assertTrue(mDut.startDaemon());
-        verify(mFrameworkFacade, never()).startSupplicant();
-    }
-
-    /**
-     * Tests the terminate for V1_0 service.
-     */
-    @Test
-    public void testTerminateV1_0() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public boolean answer(IHwBinder.DeathRecipient cb, long cookie) throws RemoteException {
-                mHandler.post(() -> cb.serviceDied(cookie));
-                return true;
-            }
-        }).when(mISupplicantMock).linkToDeath(any(IHwBinder.DeathRecipient.class), any(long.class));
-        mDut.terminate();
-        mLooper.dispatchAll();
-        verify(mFrameworkFacade).stopSupplicant();
-
-        // Check that terminate cleared all internal state.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Tests the start daemon for V1_1 service.
-     */
-    @Test
-    public void testTerminateV1_1() throws Exception {
-        setupMocksForHalV1_1();
-
-        executeAndValidateInitializationSequenceV1_1(false, false);
-
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public boolean answer(IHwBinder.DeathRecipient cb, long cookie) throws RemoteException {
-                mHandler.post(() -> cb.serviceDied(cookie));
-                return true;
-            }
-        }).when(mISupplicantMock).linkToDeath(any(IHwBinder.DeathRecipient.class), any(long.class));
-
-        mDut.terminate();
-        mLooper.dispatchAll();
-        verify(mFrameworkFacade, never()).stopSupplicant();
-        verify(mISupplicantMockV11).terminate();
-
-        // Check that terminate cleared all internal state.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    private class GetKeyMgmtCapabilitiesAnswer extends MockAnswerUtil.AnswerWithArguments {
-        private int mKeyMgmtCapabilities;
-
-        GetKeyMgmtCapabilitiesAnswer(int keyMgmtCapabilities) {
-            mKeyMgmtCapabilities = keyMgmtCapabilities;
-        }
-
-        public void answer(android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
-                .getKeyMgmtCapabilitiesCallback cb) {
-            cb.onValues(mStatusSuccess, mKeyMgmtCapabilities);
-        }
-    }
-
-    private class GetKeyMgmtCapabilities_1_3Answer extends MockAnswerUtil.AnswerWithArguments {
-        private int mKeyMgmtCapabilities;
-
-        GetKeyMgmtCapabilities_1_3Answer(int keyMgmtCapabilities) {
-            mKeyMgmtCapabilities = keyMgmtCapabilities;
-        }
-
-        public void answer(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                .getKeyMgmtCapabilities_1_3Callback cb) {
-            cb.onValues(mStatusSuccess, mKeyMgmtCapabilities);
-        }
-    }
-
-    /**
-     * Test get advanced capabilities API on old HAL, should return 0 (not supported)
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesOldHal() throws Exception {
-        setupMocksForHalV1_1();
-
-        executeAndValidateInitializationSequenceV1_1(false, false);
-
-        assertTrue(mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME) == 0);
-    }
-
-    /**
-     * Test WPA3-Personal SAE key may management support
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesWpa3Sae() throws Exception {
-        setupMocksForHalV1_2();
-
-        executeAndValidateInitializationSequenceV1_2();
-
-        doAnswer(new GetKeyMgmtCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_2
-                .ISupplicantStaNetwork.KeyMgmtMask.SAE))
-                .when(mISupplicantStaIfaceMockV12).getKeyMgmtCapabilities(any(
-                android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
-                        .getKeyMgmtCapabilitiesCallback.class));
-
-        assertEquals(WIFI_FEATURE_WPA3_SAE, mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test WPA3-Enterprise Suite-B-192 key may management support
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesWpa3SuiteB() throws Exception {
-        setupMocksForHalV1_2();
-
-        executeAndValidateInitializationSequenceV1_2();
-
-        doAnswer(new GetKeyMgmtCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_2
-                .ISupplicantStaNetwork.KeyMgmtMask.SUITE_B_192))
-                .when(mISupplicantStaIfaceMockV12).getKeyMgmtCapabilities(any(
-                android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
-                        .getKeyMgmtCapabilitiesCallback.class));
-
-        assertEquals(WIFI_FEATURE_WPA3_SUITE_B,
-                mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test Enhanced Open (OWE) key may management support
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesOwe() throws Exception {
-        setupMocksForHalV1_2();
-
-        executeAndValidateInitializationSequenceV1_2();
-
-        doAnswer(new GetKeyMgmtCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_2
-                .ISupplicantStaNetwork.KeyMgmtMask.OWE))
-                .when(mISupplicantStaIfaceMockV12).getKeyMgmtCapabilities(any(
-                android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
-                        .getKeyMgmtCapabilitiesCallback.class));
-
-        assertEquals(WIFI_FEATURE_OWE, mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test Enhanced Open (OWE) and SAE key may management support
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesOweAndSae() throws Exception {
-        setupMocksForHalV1_2();
-
-        executeAndValidateInitializationSequenceV1_2();
-
-        doAnswer(new GetKeyMgmtCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_2
-                .ISupplicantStaNetwork.KeyMgmtMask.OWE
-                | android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork.KeyMgmtMask.SAE))
-                .when(mISupplicantStaIfaceMockV12).getKeyMgmtCapabilities(any(
-                android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
-                        .getKeyMgmtCapabilitiesCallback.class));
-
-        assertEquals(WIFI_FEATURE_OWE | WIFI_FEATURE_WPA3_SAE,
-                mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test Easy Connect (DPP) key may management support
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesDpp() throws Exception {
-        setupMocksForHalV1_2();
-
-        executeAndValidateInitializationSequenceV1_2();
-
-        doAnswer(new GetKeyMgmtCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_2
-                .ISupplicantStaNetwork.KeyMgmtMask.DPP))
-                .when(mISupplicantStaIfaceMockV12).getKeyMgmtCapabilities(any(
-                android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
-                        .getKeyMgmtCapabilitiesCallback.class));
-
-        assertEquals(WIFI_FEATURE_DPP, mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test Easy Connect (DPP) Enrollee Responder mode supported on supplicant HAL V1_4
-     */
-    @Test
-    public void testGetDppEnrolleeResponderModeSupport() throws Exception {
-        setupMocksForHalV1_4();
-        executeAndValidateInitializationSequenceV1_4();
-
-        doAnswer(new GetKeyMgmtCapabilities_1_3Answer(android.hardware.wifi.supplicant.V1_2
-                .ISupplicantStaNetwork.KeyMgmtMask.DPP))
-                .when(mISupplicantStaIfaceMockV13).getKeyMgmtCapabilities_1_3(any(
-                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                        .getKeyMgmtCapabilities_1_3Callback.class));
-
-        assertTrue((WIFI_FEATURE_DPP_ENROLLEE_RESPONDER
-                & mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME))
-                == WIFI_FEATURE_DPP_ENROLLEE_RESPONDER);
-    }
-
-    /**
-     * Test Easy Connect (DPP) Enrollee Responder mode is not supported on supplicant HAL
-     * V1_3 or less.
-     */
-    @Test
-    public void testDppEnrolleeResponderModeNotSupportedOnHalV1_3OrLess() throws Exception {
-        setupMocksForHalV1_3();
-        executeAndValidateInitializationSequenceV1_3();
-
-        doAnswer(new GetKeyMgmtCapabilities_1_3Answer(android.hardware.wifi.supplicant.V1_2
-                .ISupplicantStaNetwork.KeyMgmtMask.DPP))
-                .when(mISupplicantStaIfaceMockV13).getKeyMgmtCapabilities_1_3(any(
-                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                        .getKeyMgmtCapabilities_1_3Callback.class));
-
-        assertFalse((WIFI_FEATURE_DPP_ENROLLEE_RESPONDER
-                & mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME))
-                == WIFI_FEATURE_DPP_ENROLLEE_RESPONDER);
-    }
-
-    /**
-     * Test WAPI key may management support
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesWapi() throws Exception {
-        setupMocksForHalV1_3();
-
-        executeAndValidateInitializationSequenceV1_3();
-
-        doAnswer(new GetKeyMgmtCapabilities_1_3Answer(android.hardware.wifi.supplicant.V1_3
-                .ISupplicantStaNetwork.KeyMgmtMask.WAPI_PSK))
-                .when(mISupplicantStaIfaceMockV13).getKeyMgmtCapabilities_1_3(any(
-                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                        .getKeyMgmtCapabilities_1_3Callback.class));
-
-        assertEquals(WIFI_FEATURE_WAPI, mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test FILS SHA256 key management support.
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesFilsSha256() throws Exception {
-        setupMocksForHalV1_3();
-
-        executeAndValidateInitializationSequenceV1_3();
-
-        doAnswer(new GetKeyMgmtCapabilities_1_3Answer(android.hardware.wifi.supplicant.V1_3
-                .ISupplicantStaNetwork.KeyMgmtMask.FILS_SHA256))
-                .when(mISupplicantStaIfaceMockV13).getKeyMgmtCapabilities_1_3(any(
-                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                        .getKeyMgmtCapabilities_1_3Callback.class));
-
-        assertEquals(WIFI_FEATURE_FILS_SHA256,
-                mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test FILS SHA384 key management support.
-     */
-    @Test
-    public void testGetKeyMgmtCapabilitiesFilsSha384() throws Exception {
-        setupMocksForHalV1_3();
-
-        executeAndValidateInitializationSequenceV1_3();
-
-        doAnswer(new GetKeyMgmtCapabilities_1_3Answer(android.hardware.wifi.supplicant.V1_3
-                .ISupplicantStaNetwork.KeyMgmtMask.FILS_SHA384))
-                .when(mISupplicantStaIfaceMockV13).getKeyMgmtCapabilities_1_3(any(
-                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                        .getKeyMgmtCapabilities_1_3Callback.class));
-
-        assertEquals(WIFI_FEATURE_FILS_SHA384,
-                mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test Easy Connect (DPP) calls return failure if hal version is less than 1_2
-     */
-    @Test
-    public void testDppFailsWithOldHal() throws Exception {
-        assertEquals(-1, mDut.addDppPeerUri(WLAN0_IFACE_NAME, "/blah"));
-        assertFalse(mDut.removeDppUri(WLAN0_IFACE_NAME, 0));
-        assertFalse(mDut.stopDppInitiator(WLAN0_IFACE_NAME));
-        assertFalse(mDut.startDppConfiguratorInitiator(WLAN0_IFACE_NAME,
-                1, 2, "Buckle", "My", "Shoe",
-                3, 4, null));
-        assertFalse(mDut.startDppEnrolleeInitiator(WLAN0_IFACE_NAME, 3, 14));
-        WifiNative.DppBootstrapQrCodeInfo bootstrapInfo =
-                mDut.generateDppBootstrapInfoForResponder(WLAN0_IFACE_NAME, "00:11:22:33:44:55",
-                        "PRODUCT_INFO", SupplicantStaIfaceHal.DppCurve.PRIME256V1);
-        assertEquals(-1, bootstrapInfo.bootstrapId);
-        assertFalse(mDut.startDppEnrolleeResponder(WLAN0_IFACE_NAME, 6));
-    }
-
-    /**
-     * Test adding PMK cache entry to the supplicant.
-     */
-    @Test
-    public void testSetPmkSuccess() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = testFrameworkNetworkId;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_EAP));
-        ArrayList<Byte> pmkCacheData = NativeUtil.byteArrayToArrayList("deadbeef".getBytes());
-
-        setupMocksForHalV1_3();
-        setupMocksForPmkCache(pmkCacheData, true);
-        setupMocksForConnectSequence(false);
-
-        executeAndValidateInitializationSequenceV1_3();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mPmkCacheManager).get(eq(testFrameworkNetworkId));
-        verify(mSupplicantStaNetworkMock).setPmkCache(eq(pmkCacheData));
-        verify(mISupplicantStaIfaceCallbackV13)
-                .onPmkCacheAdded(eq(PMK_CACHE_EXPIRATION_IN_SEC), eq(pmkCacheData));
-    }
-
-    /**
-     * Test adding PMK cache entry to the supplicant when SAE is selected
-     * for a PSK/SAE configuration.
-     */
-    @Test
-    public void testSetPmkWhenSaeIsSelected() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
-        config.networkId = testFrameworkNetworkId;
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_SAE));
-        ArrayList<Byte> pmkCacheData = NativeUtil.byteArrayToArrayList("deadbeef".getBytes());
-
-        setupMocksForHalV1_3();
-        setupMocksForPmkCache(pmkCacheData, true);
-        setupMocksForConnectSequence(false);
-
-        executeAndValidateInitializationSequenceV1_3();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mPmkCacheManager).get(eq(testFrameworkNetworkId));
-        verify(mSupplicantStaNetworkMock).setPmkCache(eq(pmkCacheData));
-        verify(mISupplicantStaIfaceCallbackV13)
-                .onPmkCacheAdded(eq(PMK_CACHE_EXPIRATION_IN_SEC), eq(pmkCacheData));
-    }
-
-    /**
-     * Test PMK cache entry is not added to the supplicant when PSK is selected
-     * for a PSK/SAE configuration.
-     */
-    @Test
-    public void testAddPmkEntryNotCalledIfPskIsSelected() throws Exception {
-        int testFrameworkNetworkId = 9;
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
-        config.networkId = testFrameworkNetworkId;
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_PSK));
-
-        setupMocksForHalV1_3();
-        setupMocksForPmkCache(true);
-        setupMocksForConnectSequence(false);
-
-        executeAndValidateInitializationSequenceV1_3();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any());
-        verify(mISupplicantStaIfaceCallbackV13, never())
-                .onPmkCacheAdded(anyLong(), any());
-    }
-
-    /**
-     * Test PMK cache entry is not added to the supplicant if no security
-     * params is selected.
-     */
-    @Test
-    public void testAddPmkEntryNotCalledIfNoSecurityParamsIsSelected() throws Exception {
-        int testFrameworkNetworkId = 9;
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
-        config.networkId = testFrameworkNetworkId;
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(null);
-
-        setupMocksForHalV1_3();
-        setupMocksForPmkCache(true);
-        setupMocksForConnectSequence(false);
-
-        executeAndValidateInitializationSequenceV1_3();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any());
-        verify(mISupplicantStaIfaceCallbackV13, never())
-                .onPmkCacheAdded(anyLong(), any());
-    }
-
-    /**
-     * Test adding PMK cache entry is not called if there is no
-     * valid PMK cache for a corresponding configuration.
-     */
-    @Test
-    public void testAddPmkEntryNotCalledIfNoPmkCache() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = testFrameworkNetworkId;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
-
-        setupMocksForHalV1_3();
-        setupMocksForPmkCache(null, true);
-        setupMocksForConnectSequence(false);
-        executeAndValidateInitializationSequenceV1_3();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any(ArrayList.class));
-        verify(mISupplicantStaIfaceCallbackV13, never()).onPmkCacheAdded(
-                anyLong(), any(ArrayList.class));
-    }
-
-    /**
-     * Test adding PMK cache entry returns faliure if this is a psk network.
-     */
-    @Test
-    public void testAddPmkEntryIsOmittedWithPskNetwork() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = testFrameworkNetworkId;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
-
-        setupMocksForHalV1_3();
-        setupMocksForPmkCache(true);
-        setupMocksForConnectSequence(false);
-        executeAndValidateInitializationSequenceV1_3();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mPmkCacheManager, never()).add(any(), anyInt(), anyLong(), any());
-        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any(ArrayList.class));
-        verify(mISupplicantStaIfaceCallbackV13, never()).onPmkCacheAdded(
-                anyLong(), any(ArrayList.class));
-    }
-
-    /**
-     * Test adding PMK cache entry returns faliure if HAL version is less than 1_3
-     */
-    @Test
-    public void testAddPmkEntryIsOmittedWithOldHal() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = testFrameworkNetworkId;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_EAP));
-        ArrayList<Byte> pmkCacheData = NativeUtil.byteArrayToArrayList("deadbeef".getBytes());
-        setupMocksForPmkCache(pmkCacheData, false);
-
-        setupMocksForConnectSequence(false);
-        executeAndValidateInitializationSequence();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-
-        verify(mSupplicantStaNetworkMock).setPmkCache(eq(pmkCacheData));
-        assertNull(mISupplicantStaIfaceCallbackV13);
-    }
-
-    /**
-     * Tests the handling of assoc reject for PMK cache
-     */
-    @Test
-    public void testRemovePmkEntryOnReceivingAssocReject() throws Exception {
-        int testFrameworkNetworkId = 9;
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = testFrameworkNetworkId;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
-
-        setupMocksForHalV1_3();
-        setupMocksForPmkCache(true);
-        setupMocksForConnectSequence(false);
-
-        executeAndValidateInitializationSequenceV1_3();
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-        mISupplicantStaIfaceCallbackV13.onStateChanged(
-                ISupplicantStaIfaceCallback.State.ASSOCIATING,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID));
-        int statusCode = 7;
-        mISupplicantStaIfaceCallbackV13.onAssociationRejected(
-                NativeUtil.macAddressToByteArray(BSSID), statusCode, false);
-        verify(mPmkCacheManager).remove(eq(testFrameworkNetworkId));
-    }
-
-    /**
-     * Test getConnectionCapabilities
-     * Should fail if running HAL lower than V1_3
-     */
-    @Test
-    public void testGetConnectionCapabilitiesV1_2() throws Exception {
-        setupMocksForHalV1_2();
-        executeAndValidateInitializationSequenceV1_2();
-        WifiNative.ConnectionCapabilities cap = mDut.getConnectionCapabilities(WLAN0_IFACE_NAME);
-        assertEquals(ScanResult.WIFI_STANDARD_UNKNOWN, cap.wifiStandard);
-    }
-
-    private class GetConnCapabilitiesAnswerV1_3 extends MockAnswerUtil.AnswerWithArguments {
-        private android.hardware.wifi.supplicant.V1_3.ConnectionCapabilities mConnCapabilities;
-
-        GetConnCapabilitiesAnswerV1_3(int wifiTechnology, int channelBandwidth,
-                int maxNumberTxSpatialStreams, int maxNumberRxSpatialStreams) {
-            mConnCapabilities = new android.hardware.wifi.supplicant.V1_3.ConnectionCapabilities();
-            mConnCapabilities.technology = wifiTechnology;
-            mConnCapabilities.channelBandwidth = channelBandwidth;
-            mConnCapabilities.maxNumberTxSpatialStreams = maxNumberTxSpatialStreams;
-            mConnCapabilities.maxNumberRxSpatialStreams = maxNumberRxSpatialStreams;
-        }
-
-        public void answer(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                .getConnectionCapabilitiesCallback cb) {
-            cb.onValues(mStatusSuccess, mConnCapabilities);
-        }
-    }
-
-    private class GetConnCapabilitiesAnswerV1_4 extends MockAnswerUtil.AnswerWithArguments {
-        private ConnectionCapabilities mConnCapabilities;
-
-        GetConnCapabilitiesAnswerV1_4(int wifiTechnology, int legacyMode, int channelBandwidth,
-                int maxNumberTxSpatialStreams, int maxNumberRxSpatialStreams) {
-            mConnCapabilities = new ConnectionCapabilities();
-            mConnCapabilities.V1_3.technology = wifiTechnology;
-            mConnCapabilities.legacyMode = legacyMode;
-            mConnCapabilities.V1_3.channelBandwidth = channelBandwidth;
-            mConnCapabilities.V1_3.maxNumberTxSpatialStreams = maxNumberTxSpatialStreams;
-            mConnCapabilities.V1_3.maxNumberRxSpatialStreams = maxNumberRxSpatialStreams;
-        }
-
-        public void answer(android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
-                .getConnectionCapabilities_1_4Callback cb) {
-            cb.onValues(mStatusSuccessV14, mConnCapabilities);
-        }
-    }
-
-    /**
-     * Test getConnectionCapabilities if running with HAL V1_3
-     */
-    @Test
-    public void testGetConnectionCapabilitiesV1_3() throws Exception {
-        setupMocksForHalV1_3();
-
-        executeAndValidateInitializationSequenceV1_3();
-        int testWifiTechnologyHal = WifiTechnology.VHT;
-        int testWifiStandardWifiInfo = ScanResult.WIFI_STANDARD_11AC;
-        int testChannelBandwidthHal = WifiChannelWidthInMhz.WIDTH_80P80;
-        int testChannelBandwidth = ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
-        int maxNumberTxSpatialStreams = 3;
-        int maxNumberRxSpatialStreams = 1;
-
-        doAnswer(new GetConnCapabilitiesAnswerV1_3(testWifiTechnologyHal, testChannelBandwidthHal,
-                maxNumberTxSpatialStreams, maxNumberRxSpatialStreams))
-                .when(mISupplicantStaIfaceMockV13).getConnectionCapabilities(any(
-                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                        .getConnectionCapabilitiesCallback.class));
-        WifiNative.ConnectionCapabilities cap = mDut.getConnectionCapabilities(WLAN0_IFACE_NAME);
-        assertEquals(testWifiStandardWifiInfo, cap.wifiStandard);
-        assertEquals(false, cap.is11bMode);
-        assertEquals(testChannelBandwidth, cap.channelBandwidth);
-        assertEquals(maxNumberTxSpatialStreams, cap.maxNumberTxSpatialStreams);
-        assertEquals(maxNumberRxSpatialStreams, cap.maxNumberRxSpatialStreams);
-    }
-
-    /**
-     * Test getConnectionCapabilities if running with HAL V1_4
-     */
-    @Test
-    public void testGetConnectionCapabilitiesV1_4() throws Exception {
-        setupMocksForHalV1_4();
-
-        executeAndValidateInitializationSequenceV1_4();
-        int testWifiTechnologyHal = WifiTechnology.LEGACY;
-        int testLegacyMode = LegacyMode.B_MODE;
-        int testWifiStandardWifiInfo = ScanResult.WIFI_STANDARD_LEGACY;
-        int testChannelBandwidthHal = WifiChannelWidthInMhz.WIDTH_20;
-        int testChannelBandwidth = ScanResult.CHANNEL_WIDTH_20MHZ;
-        int maxNumberTxSpatialStreams = 1;
-        int maxNumberRxSpatialStreams = 1;
-
-        doAnswer(new GetConnCapabilitiesAnswerV1_4(testWifiTechnologyHal, testLegacyMode,
-                testChannelBandwidthHal, maxNumberTxSpatialStreams, maxNumberRxSpatialStreams))
-                .when(mISupplicantStaIfaceMockV14).getConnectionCapabilities_1_4(any(
-                android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
-                        .getConnectionCapabilities_1_4Callback.class));
-        WifiNative.ConnectionCapabilities cap = mDut.getConnectionCapabilities(WLAN0_IFACE_NAME);
-        assertEquals(testWifiStandardWifiInfo, cap.wifiStandard);
-        assertEquals(true, cap.is11bMode);
-        assertEquals(testChannelBandwidth, cap.channelBandwidth);
-        assertEquals(maxNumberTxSpatialStreams, cap.maxNumberTxSpatialStreams);
-        assertEquals(maxNumberRxSpatialStreams, cap.maxNumberRxSpatialStreams);
-    }
-
-    private WifiConfiguration createTestWifiConfiguration() {
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = SUPPLICANT_NETWORK_ID;
-        return config;
-    }
-
-    private void executeAndValidateHs20DeauthImminentCallback(boolean isEss) throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        int reasonCode = isEss ? WnmData.ESS : WnmData.ESS + 1;
-        int reauthDelay = 5;
-        mISupplicantStaIfaceCallback.onHs20DeauthImminentNotice(
-                bssid, reasonCode, reauthDelay, HS20_URL);
-
-        ArgumentCaptor<WnmData> wnmDataCaptor = ArgumentCaptor.forClass(WnmData.class);
-        verify(mWifiMonitor).broadcastWnmEvent(eq(WLAN0_IFACE_NAME), wnmDataCaptor.capture());
-        assertEquals(
-                ByteBufferReader.readInteger(
-                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
-                wnmDataCaptor.getValue().getBssid());
-        assertEquals(isEss, wnmDataCaptor.getValue().isEss());
-        assertEquals(reauthDelay, wnmDataCaptor.getValue().getDelay());
-        assertEquals(HS20_URL, wnmDataCaptor.getValue().getUrl());
-    }
-
-    private void executeAndValidateHs20TermsAndConditionsCallback() throws Exception {
-        setupMocksForHalV1_4();
-        executeAndValidateInitializationSequenceV1_4();
-        assertNotNull(mISupplicantStaIfaceCallbackV14);
-
-        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
-        mISupplicantStaIfaceCallbackV14.onHs20TermsAndConditionsAcceptanceRequestedNotification(
-                bssid, HS20_URL);
-
-        //TODO: Add test logic once framework handling is implemented
-    }
-
-    private void executeAndValidateInitializationSequence() throws  Exception {
-        executeAndValidateInitializationSequence(false, false, false, false);
-    }
-
-    /**
-     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
-     * expected result. Verifies if ISupplicantStaIface manager is initialized or reset.
-     * Each of the arguments will cause a different failure mode when set true.
-     */
-    private void executeAndValidateInitializationSequence(boolean causeRemoteException,
-                                                          boolean getZeroInterfaces,
-                                                          boolean getNullInterface,
-                                                          boolean causeCallbackRegFailure)
-            throws Exception {
-        boolean shouldSucceed =
-                !causeRemoteException && !getZeroInterfaces && !getNullInterface
-                        && !causeCallbackRegFailure;
-        // Setup callback mock answers
-        ArrayList<ISupplicant.IfaceInfo> interfaces;
-        if (getZeroInterfaces) {
-            interfaces = new ArrayList<>();
-        } else {
-            interfaces = mIfaceInfoList;
-        }
-        doAnswer(new GetListInterfacesAnswer(interfaces)).when(mISupplicantMock)
-                .listInterfaces(any(ISupplicant.listInterfacesCallback.class));
-        if (causeRemoteException) {
-            doThrow(new RemoteException("Some error!!!"))
-                    .when(mISupplicantMock).getInterface(any(ISupplicant.IfaceInfo.class),
-                    any(ISupplicant.getInterfaceCallback.class));
-        } else {
-            doAnswer(new GetGetInterfaceAnswer(getNullInterface))
-                    .when(mISupplicantMock).getInterface(any(ISupplicant.IfaceInfo.class),
-                    any(ISupplicant.getInterfaceCallback.class));
-        }
-        /** Callback registration */
-        if (causeCallbackRegFailure) {
-            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-                public SupplicantStatus answer(ISupplicantStaIfaceCallback cb)
-                        throws RemoteException {
-                    return mStatusFailure;
-                }
-            }).when(mISupplicantStaIfaceMock)
-                    .registerCallback(any(ISupplicantStaIfaceCallback.class));
-        } else {
-            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-                public SupplicantStatus answer(ISupplicantStaIfaceCallback cb)
-                        throws RemoteException {
-                    mISupplicantStaIfaceCallback = cb;
-                    return mStatusSuccess;
-                }
-            }).when(mISupplicantStaIfaceMock)
-                    .registerCallback(any(ISupplicantStaIfaceCallback.class));
-        }
-
-        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantStaIfaceMock,
-                mWifiMonitor);
-        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
-        assertTrue(mDut.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
-                anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        // act: cause the onRegistration(...) callback to execute
-        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
-
-        assertTrue(mDut.isInitializationComplete());
-        assertEquals(shouldSucceed, mDut.setupIface(WLAN0_IFACE_NAME));
-        mInOrder.verify(mISupplicantMock).linkToDeath(mSupplicantDeathCaptor.capture(),
-                mDeathRecipientCookieCaptor.capture());
-        // verify: listInterfaces is called
-        mInOrder.verify(mISupplicantMock).listInterfaces(
-                any(ISupplicant.listInterfacesCallback.class));
-        if (!getZeroInterfaces) {
-            mInOrder.verify(mISupplicantMock)
-                    .getInterface(any(ISupplicant.IfaceInfo.class),
-                            any(ISupplicant.getInterfaceCallback.class));
-        }
-        if (!causeRemoteException && !getZeroInterfaces && !getNullInterface) {
-            mInOrder.verify(mISupplicantStaIfaceMock)
-                    .registerCallback(any(ISupplicantStaIfaceCallback.class));
-        }
-    }
-
-    /**
-     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
-     * expected result. Verifies if ISupplicantStaIface manager is initialized or reset.
-     * Each of the arguments will cause a different failure mode when set true.
-     */
-    private void executeAndValidateInitializationSequenceV1_1(boolean causeRemoteException,
-                                                               boolean getNullInterface)
-            throws Exception {
-        boolean shouldSucceed = !causeRemoteException && !getNullInterface;
-        // Setup callback mock answers
-        if (causeRemoteException) {
-            doThrow(new RemoteException("Some error!!!"))
-                    .when(mISupplicantMockV11).addInterface(any(ISupplicant.IfaceInfo.class),
-                    any(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                            .addInterfaceCallback.class));
-        } else {
-            doAnswer(new GetAddInterfaceAnswer(getNullInterface))
-                    .when(mISupplicantMockV11).addInterface(any(ISupplicant.IfaceInfo.class),
-                    any(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                            .addInterfaceCallback.class));
-        }
-        /** Callback registration */
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public SupplicantStatus answer(
-                    android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback cb)
-                    throws RemoteException {
-                mISupplicantStaIfaceCallbackV11 = cb;
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantStaIfaceMockV11)
-                .registerCallback_1_1(
-                any(android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback.class));
-
-        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantMockV11,
-                mISupplicantStaIfaceMockV11, mWifiMonitor);
-        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
-        assertTrue(mDut.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
-                anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        // act: cause the onRegistration(...) callback to execute
-        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
-
-        assertTrue(mDut.isInitializationComplete());
-        assertTrue(mDut.setupIface(WLAN0_IFACE_NAME) == shouldSucceed);
-        mInOrder.verify(mISupplicantMock).linkToDeath(mSupplicantDeathCaptor.capture(),
-                anyLong());
-        // verify: addInterface is called
-        mInOrder.verify(mISupplicantMockV11)
-                .addInterface(any(ISupplicant.IfaceInfo.class),
-                        any(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                                .addInterfaceCallback.class));
-        if (!causeRemoteException && !getNullInterface) {
-            mInOrder.verify(mISupplicantStaIfaceMockV11)
-                    .registerCallback_1_1(
-                    any(android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback.class));
-        }
-
-        // Ensure we don't try to use the listInterfaces method from 1.0 version.
-        verify(mISupplicantMock, never()).listInterfaces(
-                any(ISupplicant.listInterfacesCallback.class));
-        verify(mISupplicantMock, never()).getInterface(any(ISupplicant.IfaceInfo.class),
-                        any(ISupplicant.getInterfaceCallback.class));
-    }
-
-    /**
-     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
-     * expected result. Verifies if ISupplicantStaIface manager is initialized or reset.
-     * Each of the arguments will cause a different failure mode when set true.
-     */
-    private void executeAndValidateInitializationSequenceV1_2()
-            throws Exception {
-        // Setup callback mock answers
-        doAnswer(new GetAddInterfaceAnswerV1_2(false))
-                .when(mISupplicantMockV11).addInterface(any(ISupplicant.IfaceInfo.class),
-                any(android.hardware.wifi.supplicant.V1_2.ISupplicant
-                        .addInterfaceCallback.class));
-
-        /** Callback registration */
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public SupplicantStatus answer(
-                    android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback cb)
-                    throws RemoteException {
-                mISupplicantStaIfaceCallbackV11 = cb;
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantStaIfaceMockV12)
-                .registerCallback_1_1(
-                        any(android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback
-                                .class));
-
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public SupplicantStatus answer(
-                    android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback cb)
-                    throws RemoteException {
-                mISupplicantStaIfaceCallbackV12 = cb;
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantStaIfaceMockV12)
-                .registerCallback_1_2(
-                        any(android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback
-                                .class));
-
-        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantMockV11,
-                mISupplicantStaIfaceMockV12, mWifiMonitor);
-        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
-        assertTrue(mDut.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
-                anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        // act: cause the onRegistration(...) callback to execute
-        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
-
-        assertTrue(mDut.isInitializationComplete());
-        assertTrue(mDut.setupIface(WLAN0_IFACE_NAME));
-        mInOrder.verify(mISupplicantMock).linkToDeath(mSupplicantDeathCaptor.capture(),
-                anyLong());
-        // verify: addInterface is called
-        mInOrder.verify(mISupplicantMockV11)
-                .addInterface(any(ISupplicant.IfaceInfo.class),
-                        any(android.hardware.wifi.supplicant.V1_2.ISupplicant
-                                .addInterfaceCallback.class));
-
-        mInOrder.verify(mISupplicantStaIfaceMockV12)
-                .registerCallback_1_2(
-                        any(android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback
-                                .class));
-
-        // Ensure we don't try to use the listInterfaces method from 1.0 version.
-//        verify(mISupplicantMock, never()).listInterfaces(
-//                any(ISupplicant.listInterfacesCallback.class));
-//        verify(mISupplicantMock, never()).getInterface(any(ISupplicant.IfaceInfo.class),
-//                any(ISupplicant.getInterfaceCallback.class));
-    }
-
-    /**
-     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
-     * expected result. Verifies if ISupplicantStaIface manager is initialized or reset.
-     * Each of the arguments will cause a different failure mode when set true.
-     */
-    private void executeAndValidateInitializationSequenceV1_3()
-            throws Exception {
-        // Setup callback mock answers
-        doAnswer(new GetAddInterfaceAnswerV1_3(false))
-                .when(mISupplicantMockV11).addInterface(any(ISupplicant.IfaceInfo.class),
-                any(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                        .addInterfaceCallback.class));
-
-        /** Callback registration */
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public SupplicantStatus answer(
-                    android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback cb)
-                    throws RemoteException {
-                mISupplicantStaIfaceCallbackV13 = spy(cb);
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantStaIfaceMockV13)
-                .registerCallback_1_3(
-                        any(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback
-                                .class));
-
-        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantMockV11,
-                mISupplicantStaIfaceMockV13, mWifiMonitor);
-        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
-        assertTrue(mDut.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
-                anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        // act: cause the onRegistration(...) callback to execute
-        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
-
-        assertTrue(mDut.isInitializationComplete());
-        assertTrue(mDut.setupIface(WLAN0_IFACE_NAME));
-        mInOrder.verify(mISupplicantMock).linkToDeath(mSupplicantDeathCaptor.capture(),
-                anyLong());
-        // verify: addInterface is called
-        mInOrder.verify(mISupplicantMockV11)
-                .addInterface(any(ISupplicant.IfaceInfo.class),
-                        any(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                                .addInterfaceCallback.class));
-
-        mInOrder.verify(mISupplicantStaIfaceMockV13)
-                .registerCallback_1_3(
-                        any(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback
-                                .class));
-    }
-
-    /**
-     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
-     * expected result. Verifies if ISupplicantStaIface manager is initialized or reset.
-     * Each of the arguments will cause a different failure mode when set true.
-     */
-    private void executeAndValidateInitializationSequenceV1_4()
-            throws Exception {
-        // Setup callback mock answers
-        doAnswer(new GetAddInterfaceAnswerV1_4(false))
-                .when(mISupplicantMockV11).addInterface(any(ISupplicant.IfaceInfo.class),
-                any(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                        .addInterfaceCallback.class));
-
-        /** Callback registration */
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public android.hardware.wifi.supplicant.V1_4.SupplicantStatus answer(
-                    android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback cb)
-                    throws RemoteException {
-                mISupplicantStaIfaceCallbackV14 = spy(cb);
-                return mStatusSuccessV14;
-            }
-        }).when(mISupplicantStaIfaceMockV14)
-                .registerCallback_1_4(
-                        any(android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback
-                                .class));
-
-        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantMockV11,
-                mISupplicantStaIfaceMockV14, mWifiMonitor);
-        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
-        assertTrue(mDut.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
-                anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        // act: cause the onRegistration(...) callback to execute
-        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
-
-        assertTrue(mDut.isInitializationComplete());
-        assertTrue(mDut.setupIface(WLAN0_IFACE_NAME));
-        mInOrder.verify(mISupplicantMock).linkToDeath(mSupplicantDeathCaptor.capture(),
-                anyLong());
-        // verify: addInterface is called
-        mInOrder.verify(mISupplicantMockV11)
-                .addInterface(any(ISupplicant.IfaceInfo.class),
-                        any(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                                .addInterfaceCallback.class));
-
-        mInOrder.verify(mISupplicantStaIfaceMockV14)
-                .registerCallback_1_4(
-                        any(android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback
-                                .class));
-    }
-
-    private SupplicantStatus createSupplicantStatus(int code) {
-        SupplicantStatus status = new SupplicantStatus();
-        status.code = code;
-        return status;
-    }
-
-    private android.hardware.wifi.supplicant.V1_4.SupplicantStatus
-            createSupplicantStatusV1_4(int code) {
-        android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
-                new android.hardware.wifi.supplicant.V1_4.SupplicantStatus();
-        status.code = code;
-        return status;
-    }
-
-    /**
-     * Create an IfaceInfo with given type and name
-     */
-    private ISupplicant.IfaceInfo createIfaceInfo(int type, String name) {
-        ISupplicant.IfaceInfo info = new ISupplicant.IfaceInfo();
-        info.type = type;
-        info.name = name;
-        return info;
-    }
-
-    private class GetListInterfacesAnswer extends MockAnswerUtil.AnswerWithArguments {
-        private ArrayList<ISupplicant.IfaceInfo> mInterfaceList;
-
-        GetListInterfacesAnswer(ArrayList<ISupplicant.IfaceInfo> ifaces) {
-            mInterfaceList = ifaces;
-        }
-
-        public void answer(ISupplicant.listInterfacesCallback cb) {
-            cb.onValues(mStatusSuccess, mInterfaceList);
-        }
-    }
-
-    private class GetGetInterfaceAnswer extends MockAnswerUtil.AnswerWithArguments {
-        boolean mGetNullInterface;
-
-        GetGetInterfaceAnswer(boolean getNullInterface) {
-            mGetNullInterface = getNullInterface;
-        }
-
-        public void answer(ISupplicant.IfaceInfo iface, ISupplicant.getInterfaceCallback cb) {
-            if (mGetNullInterface) {
-                cb.onValues(mStatusSuccess, null);
-            } else {
-                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
-            }
-        }
-    }
-
-    private class GetAddInterfaceAnswer extends MockAnswerUtil.AnswerWithArguments {
-        boolean mGetNullInterface;
-
-        GetAddInterfaceAnswer(boolean getNullInterface) {
-            mGetNullInterface = getNullInterface;
-        }
-
-        public void answer(ISupplicant.IfaceInfo iface,
-                           android.hardware.wifi.supplicant.V1_1.ISupplicant
-                                   .addInterfaceCallback cb) {
-            if (mGetNullInterface) {
-                cb.onValues(mStatusSuccess, null);
-            } else {
-                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
-            }
-        }
-    }
-
-    private class GetAddInterfaceAnswerV1_2 extends MockAnswerUtil.AnswerWithArguments {
-        boolean mGetNullInterface;
-
-        GetAddInterfaceAnswerV1_2(boolean getNullInterface) {
-            mGetNullInterface = getNullInterface;
-        }
-
-        public void answer(ISupplicant.IfaceInfo iface,
-                android.hardware.wifi.supplicant.V1_2.ISupplicant
-                        .addInterfaceCallback cb) {
-            if (mGetNullInterface) {
-                cb.onValues(mStatusSuccess, null);
-            } else {
-                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
-            }
-        }
-    }
-
-    private class GetAddInterfaceAnswerV1_3 extends MockAnswerUtil.AnswerWithArguments {
-        boolean mGetNullInterface;
-
-        GetAddInterfaceAnswerV1_3(boolean getNullInterface) {
-            mGetNullInterface = getNullInterface;
-        }
-
-        public void answer(ISupplicant.IfaceInfo iface,
-                android.hardware.wifi.supplicant.V1_3.ISupplicant
-                        .addInterfaceCallback cb) {
-            if (mGetNullInterface) {
-                cb.onValues(mStatusSuccess, null);
-            } else {
-                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
-            }
-        }
-    }
-
-    private class GetAddInterfaceAnswerV1_4 extends MockAnswerUtil.AnswerWithArguments {
-        boolean mGetNullInterface;
-
-        GetAddInterfaceAnswerV1_4(boolean getNullInterface) {
-            mGetNullInterface = getNullInterface;
-        }
-
-        public void answer(ISupplicant.IfaceInfo iface,
-                android.hardware.wifi.supplicant.V1_4.ISupplicant
-                        .addInterfaceCallback cb) {
-            if (mGetNullInterface) {
-                cb.onValues(mStatusSuccess, null);
-            } else {
-                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
-            }
-        }
-    }
-
-    /**
-     * Setup mocks for connect sequence.
-     */
-    private void setupMocksForConnectSequence(final boolean haveExistingNetwork) throws Exception {
-        final int existingNetworkId = SUPPLICANT_NETWORK_ID;
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public SupplicantStatus answer() throws RemoteException {
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantStaIfaceMock).disconnect();
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public void answer(ISupplicantStaIface.listNetworksCallback cb) throws RemoteException {
-                if (haveExistingNetwork) {
-                    cb.onValues(mStatusSuccess, new ArrayList<>(Arrays.asList(existingNetworkId)));
-                } else {
-                    cb.onValues(mStatusSuccess, new ArrayList<>());
-                }
-            }
-        }).when(mISupplicantStaIfaceMock)
-                .listNetworks(any(ISupplicantStaIface.listNetworksCallback.class));
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public SupplicantStatus answer(int id) throws RemoteException {
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantStaIfaceMock).removeNetwork(eq(existingNetworkId));
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public void answer(ISupplicantStaIface.addNetworkCallback cb) throws RemoteException {
-                cb.onValues(mStatusSuccess, mock(ISupplicantStaNetwork.class));
-                return;
-            }
-        }).when(mISupplicantStaIfaceMock).addNetwork(
-                any(ISupplicantStaIface.addNetworkCallback.class));
-        when(mSupplicantStaNetworkMock.saveWifiConfiguration(any(WifiConfiguration.class)))
-                .thenReturn(true);
-        when(mSupplicantStaNetworkMock.select()).thenReturn(true);
-    }
-
-    /**
-     * Helper function to validate the connect sequence.
-     */
-    private void validateConnectSequence(
-            final boolean haveExistingNetwork, int numNetworkAdditions) throws Exception {
-        if (haveExistingNetwork) {
-            verify(mISupplicantStaIfaceMock).removeNetwork(anyInt());
-        }
-        verify(mISupplicantStaIfaceMock, times(numNetworkAdditions))
-                .addNetwork(any(ISupplicantStaIface.addNetworkCallback.class));
-        verify(mSupplicantStaNetworkMock, times(numNetworkAdditions))
-                .saveWifiConfiguration(any(WifiConfiguration.class));
-        verify(mSupplicantStaNetworkMock, times(numNetworkAdditions)).select();
-    }
-
-    /**
-     * Helper function to execute all the actions to perform connection to the network.
-     *
-     * @param newFrameworkNetworkId Framework Network Id of the new network to connect.
-     * @param haveExistingNetwork Removes the existing network.
-     * @return the WifiConfiguration object of the new network to connect.
-     */
-    private WifiConfiguration executeAndValidateConnectSequence(
-            final int newFrameworkNetworkId, final boolean haveExistingNetwork) throws Exception {
-        return executeAndValidateConnectSequenceWithKeyMgmt(newFrameworkNetworkId,
-                haveExistingNetwork, WifiConfiguration.SECURITY_TYPE_PSK, null);
-    }
-
-    /**
-     * Helper function to execute all the actions to perform connection to the network.
-     *
-     * @param newFrameworkNetworkId Framework Network Id of the new network to connect.
-     * @param haveExistingNetwork Removes the existing network.
-     * @param securityType The security type.
-     * @param wepKey if configurations are for a WEP network else null.
-     * @param hasEverConnected indicate that this configuration is ever connected or not.
-     * @return the WifiConfiguration object of the new network to connect.
-     */
-    private WifiConfiguration executeAndValidateConnectSequenceWithKeyMgmt(
-            final int newFrameworkNetworkId, final boolean haveExistingNetwork,
-            int securityType, String wepKey, boolean hasEverConnected) throws Exception {
-        setupMocksForConnectSequence(haveExistingNetwork);
-        WifiConfiguration config = new WifiConfiguration();
-        config.setSecurityParams(securityType);
-        config.networkId = newFrameworkNetworkId;
-        config.wepKeys[0] = wepKey;
-        config.wepTxKeyIndex = 0;
-        WifiConfiguration.NetworkSelectionStatus networkSelectionStatus =
-                new WifiConfiguration.NetworkSelectionStatus();
-        networkSelectionStatus.setCandidateSecurityParams(config.getSecurityParams(securityType));
-        networkSelectionStatus.setHasEverConnected(hasEverConnected);
-        config.setNetworkSelectionStatus(networkSelectionStatus);
-        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
-        validateConnectSequence(haveExistingNetwork, 1);
-        return config;
-    }
-
-    /**
-     * Helper function to execute all the actions to perform connection to the network.
-     *
-     * @param newFrameworkNetworkId Framework Network Id of the new network to connect.
-     * @param haveExistingNetwork Removes the existing network.
-     * @param securityType The security type.
-     * @param wepKey if configurations are for a WEP network else null.
-     * @return the WifiConfiguration object of the new network to connect.
-     */
-    private WifiConfiguration executeAndValidateConnectSequenceWithKeyMgmt(
-            final int newFrameworkNetworkId, final boolean haveExistingNetwork,
-            int securityType, String wepKey) throws Exception {
-        return executeAndValidateConnectSequenceWithKeyMgmt(
-                newFrameworkNetworkId, haveExistingNetwork,
-                securityType, wepKey, false);
-    }
-
-    /**
-     * Setup mocks for roam sequence.
-     */
-    private void setupMocksForRoamSequence(String roamBssid) throws Exception {
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public SupplicantStatus answer() throws RemoteException {
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantStaIfaceMock).reassociate();
-        when(mSupplicantStaNetworkMock.setBssid(eq(roamBssid))).thenReturn(true);
-    }
-
-    /**
-     * Helper function to execute all the actions to perform roaming to the network.
-     *
-     * @param sameNetwork Roam to the same network or not.
-     * @param linkedNetwork Roam to linked network or not.
-     */
-    private void executeAndValidateRoamSequence(boolean sameNetwork, boolean linkedNetwork)
-            throws Exception {
-        int connectedNetworkId = ROAM_NETWORK_ID;
-        String roamBssid = BSSID;
-        int roamNetworkId;
-        if (sameNetwork) {
-            roamNetworkId = connectedNetworkId;
-        } else {
-            roamNetworkId = connectedNetworkId + 1;
-        }
-        executeAndValidateConnectSequence(connectedNetworkId, false);
-        setupMocksForRoamSequence(roamBssid);
-
-        WifiConfiguration roamingConfig = new WifiConfiguration();
-        roamingConfig.networkId = roamNetworkId;
-        roamingConfig.getNetworkSelectionStatus().setNetworkSelectionBSSID(roamBssid);
-        SupplicantStaNetworkHalHidlImpl linkedNetworkHandle =
-                mock(SupplicantStaNetworkHalHidlImpl.class);
-        if (linkedNetwork) {
-            // Set the StaNetworkMockable to add a new handle for the linked network
-            int roamRemoteNetworkId = roamNetworkId + 1;
-            when(linkedNetworkHandle.getNetworkId()).thenReturn(roamRemoteNetworkId);
-            when(linkedNetworkHandle.saveWifiConfiguration(any())).thenReturn(true);
-            when(linkedNetworkHandle.select()).thenReturn(true);
-            mDut.setStaNetworkMockable(linkedNetworkHandle);
-            final HashMap<String, WifiConfiguration> linkedNetworks = new HashMap<>();
-            linkedNetworks.put(roamingConfig.getProfileKey(), roamingConfig);
-            assertTrue(mDut.updateLinkedNetworks(
-                    WLAN0_IFACE_NAME, connectedNetworkId, linkedNetworks));
-        }
-        assertTrue(mDut.roamToNetwork(WLAN0_IFACE_NAME, roamingConfig));
-
-        if (sameNetwork) {
-            verify(mSupplicantStaNetworkMock).setBssid(eq(roamBssid));
-            verify(mISupplicantStaIfaceMock).reassociate();
-        } else if (linkedNetwork) {
-            verify(mISupplicantStaIfaceMock, never()).removeNetwork(anyInt());
-            verify(mISupplicantStaIfaceMock, times(2))
-                    .addNetwork(any(ISupplicantStaIface.addNetworkCallback.class));
-            verify(mSupplicantStaNetworkMock).saveWifiConfiguration(any(WifiConfiguration.class));
-            verify(mSupplicantStaNetworkMock).select();
-            verify(linkedNetworkHandle).saveWifiConfiguration(any(WifiConfiguration.class));
-            verify(linkedNetworkHandle).select();
-            verify(mSupplicantStaNetworkMock, never()).setBssid(anyString());
-            verify(mISupplicantStaIfaceMock, never()).reassociate();
-        } else {
-            validateConnectSequence(false, 2);
-            verify(mSupplicantStaNetworkMock, never()).setBssid(anyString());
-            verify(mISupplicantStaIfaceMock, never()).reassociate();
-        }
-    }
-
-    /**
-     * Helper function to set up Hal cascadingly.
-     */
-    private void setupMocksForHalV1_1() throws Exception {
-        // V1_0 is set up by default, no need to do it.
-        when(mServiceManagerMock.getTransport(eq(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                .kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mISupplicantMockV11 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
-    }
-
-    private void setupMocksForHalV1_2() throws Exception {
-        setupMocksForHalV1_1();
-        when(mServiceManagerMock.getTransport(eq(android.hardware.wifi.supplicant.V1_2.ISupplicant
-                .kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mISupplicantMockV12 = mock(android.hardware.wifi.supplicant.V1_2.ISupplicant.class);
-    }
-
-    private void setupMocksForHalV1_3() throws Exception {
-        setupMocksForHalV1_2();
-        when(mServiceManagerMock.getTransport(eq(android.hardware.wifi.supplicant.V1_3.ISupplicant
-                .kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mISupplicantMockV13 = mock(android.hardware.wifi.supplicant.V1_3.ISupplicant.class);
-    }
-
-    private void setupMocksForHalV1_4() throws Exception {
-        setupMocksForHalV1_3();
-        when(mServiceManagerMock.getTransport(eq(android.hardware.wifi.supplicant.V1_4.ISupplicant
-                .kInterfaceName), anyString()))
-                .thenReturn(IServiceManager.Transport.HWBINDER);
-        mISupplicantMockV14 = mock(android.hardware.wifi.supplicant.V1_4.ISupplicant.class);
-    }
-
-    private void setupMocksForPmkCache(boolean isHalSupported) throws Exception {
-        ArrayList<Byte> pmkCacheData = NativeUtil.byteArrayToArrayList("deadbeef".getBytes());
-        setupMocksForPmkCache(pmkCacheData, isHalSupported);
-    }
-
-    private void setupMocksForPmkCache(ArrayList<Byte> pmkCacheData, boolean isHalSupported)
-            throws Exception {
-        mDut.mPmkCacheManager = mPmkCacheManager;
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public List<ArrayList<Byte>> answer(int networkId) {
-                if (pmkCacheData == null) return null;
-
-                List<ArrayList<Byte>> pmkDataList = new ArrayList<>();
-                pmkDataList.add(pmkCacheData);
-                return pmkDataList;
-            }
-        }).when(mPmkCacheManager)
-                .get(anyInt());
-
-        if (!isHalSupported) return;
-        /** Callback registration */
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public SupplicantStatus answer(
-                    android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback cb)
-                    throws RemoteException {
-                mISupplicantStaIfaceCallbackV13 = cb;
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantStaIfaceMockV13)
-                .registerCallback_1_3(
-                        any(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback
-                                .class));
-
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public boolean answer(WifiConfiguration config, Map<String, String> networkExtra)
-                    throws Exception {
-                config.networkId = SUPPLICANT_NETWORK_ID;
-                return true;
-            }
-        }).when(mSupplicantStaNetworkMock)
-                .loadWifiConfiguration(any(WifiConfiguration.class), any(Map.class));
-
-        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
-            public boolean answer(ArrayList<Byte> serializedData)
-                    throws Exception {
-                mISupplicantStaIfaceCallbackV13.onPmkCacheAdded(
-                        PMK_CACHE_EXPIRATION_IN_SEC, serializedData);
-                return true;
-            }
-        }).when(mSupplicantStaNetworkMock)
-                .setPmkCache(any(ArrayList.class));
-    }
-
-    private class GetWpaDriverCapabilitiesAnswer extends MockAnswerUtil.AnswerWithArguments {
-        private int mWpaDriverCapabilities;
-
-        GetWpaDriverCapabilitiesAnswer(int wpaDriverCapabilities) {
-            mWpaDriverCapabilities = wpaDriverCapabilities;
-        }
-
-        public void answer(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                .getWpaDriverCapabilitiesCallback cb) {
-            cb.onValues(mStatusSuccess, mWpaDriverCapabilities);
-        }
-    }
-
-    private class GetWpaDriverCapabilities_1_4Answer extends MockAnswerUtil.AnswerWithArguments {
-        private int mWpaDriverCapabilities;
-
-        GetWpaDriverCapabilities_1_4Answer(int wpaDriverCapabilities) {
-            mWpaDriverCapabilities = wpaDriverCapabilities;
-        }
-
-        public void answer(android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
-                .getWpaDriverCapabilities_1_4Callback cb) {
-            cb.onValues(mStatusSuccessV14, mWpaDriverCapabilities);
-        }
-    }
-
-    /**
-     * Test To get wpa driver capabilities API on old HAL, should
-     * return 0 (not supported)
-     */
-    @Test
-    public void tetGetWpaDriverCapabilitiesOldHal() throws Exception {
-        setupMocksForHalV1_2();
-
-        executeAndValidateInitializationSequenceV1_2();
-
-        assertEquals(0, mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test Multi Band operation support (MBO).
-     */
-    @Test
-    public void testGetWpaDriverCapabilitiesMbo() throws Exception {
-        setupMocksForHalV1_3();
-
-        executeAndValidateInitializationSequenceV1_3();
-
-        doAnswer(new GetWpaDriverCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_3
-                .WpaDriverCapabilitiesMask.MBO))
-                .when(mISupplicantStaIfaceMockV13).getWpaDriverCapabilities(any(
-                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                        .getWpaDriverCapabilitiesCallback.class));
-
-        assertEquals(WIFI_FEATURE_MBO, mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test Optimized Connectivity support (OCE).
-     */
-    @Test
-    public void testGetWpaDriverCapabilitiesOce() throws Exception {
-        setupMocksForHalV1_3();
-
-        executeAndValidateInitializationSequenceV1_3();
-
-        doAnswer(new GetWpaDriverCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_3
-                .WpaDriverCapabilitiesMask.MBO
-                | android.hardware.wifi.supplicant.V1_3
-                .WpaDriverCapabilitiesMask.OCE))
-                .when(mISupplicantStaIfaceMockV13).getWpaDriverCapabilities(any(
-                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
-                        .getWpaDriverCapabilitiesCallback.class));
-
-        assertEquals(WIFI_FEATURE_MBO | WIFI_FEATURE_OCE,
-                mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test getWpaDriverCapabilities_1_4
-     */
-    @Test
-    public void testGetWpaDriverCapabilities_1_4() throws Exception {
-        setupMocksForHalV1_4();
-
-        executeAndValidateInitializationSequenceV1_4();
-
-        doAnswer(new GetWpaDriverCapabilities_1_4Answer(android.hardware.wifi.supplicant.V1_3
-                .WpaDriverCapabilitiesMask.MBO
-                | android.hardware.wifi.supplicant.V1_3
-                .WpaDriverCapabilitiesMask.OCE))
-                .when(mISupplicantStaIfaceMockV14).getWpaDriverCapabilities_1_4(any(
-                android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
-                        .getWpaDriverCapabilities_1_4Callback.class));
-
-        assertEquals(WIFI_FEATURE_MBO | WIFI_FEATURE_OCE,
-                mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
-    }
-
-    /**
-     * Test the handling of BSS transition request callback.
-     */
-    @Test
-    public void testBssTmHandlingDoneCallback() throws Exception {
-        setupMocksForHalV1_3();
-        executeAndValidateInitializationSequenceV1_3();
-        assertNotNull(mISupplicantStaIfaceCallbackV13);
-        mISupplicantStaIfaceCallbackV13.onBssTmHandlingDone(new BssTmData());
-
-        ArgumentCaptor<BtmFrameData> btmFrameDataCaptor =
-                ArgumentCaptor.forClass(BtmFrameData.class);
-        verify(mWifiMonitor).broadcastBssTmHandlingDoneEvent(
-                eq(WLAN0_IFACE_NAME), btmFrameDataCaptor.capture());
-    }
-
-    /**
-     * Tests the configuring of FILS HLP packet in supplicant.
-     */
-    @Test
-    public void testAddHlpReq() throws Exception {
-        byte[] dstAddr = {0x45, 0x23, 0x12, 0x12, 0x12, 0x45};
-        byte[] hlpPacket = {0x00, 0x01, 0x02, 0x03, 0x04, 0x12, 0x15, 0x34, 0x55, 0x12,
-                0x12, 0x45, 0x23, 0x52, 0x32, 0x16, 0x15, 0x53, 0x62, 0x32, 0x32, 0x10};
-
-        setupMocksForHalV1_3();
-        when(mISupplicantStaIfaceMockV13.filsHlpAddRequest(any(byte[].class),
-                any(ArrayList.class))).thenReturn(mStatusSuccess);
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.addHlpReq(WLAN0_IFACE_NAME, dstAddr, hlpPacket));
-        verify(mISupplicantStaIfaceMockV13, never()).filsHlpAddRequest(any(byte[].class),
-                any(ArrayList.class));
-
-        executeAndValidateInitializationSequenceV1_3();
-        assertNotNull(mISupplicantStaIfaceCallbackV13);
-
-        ArrayList<Byte> hlpPayload = NativeUtil.byteArrayToArrayList(hlpPacket);
-        assertTrue(mDut.addHlpReq(WLAN0_IFACE_NAME, dstAddr, hlpPacket));
-        verify(mISupplicantStaIfaceMockV13).filsHlpAddRequest(eq(dstAddr), eq(hlpPayload));
-    }
-
-    /**
-     * Tests the flushing of FILS HLP packet from supplicant.
-     */
-    @Test
-    public void testFlushAllHlp() throws Exception {
-
-        setupMocksForHalV1_3();
-        when(mISupplicantStaIfaceMockV13.filsHlpFlushRequest()).thenReturn(mStatusSuccess);
-
-        // Fail before initialization is performed.
-        assertFalse(mDut.flushAllHlp(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMockV13, never()).filsHlpFlushRequest();
-
-        executeAndValidateInitializationSequenceV1_3();
-        assertNotNull(mISupplicantStaIfaceCallbackV13);
-
-        assertTrue(mDut.flushAllHlp(WLAN0_IFACE_NAME));
-        verify(mISupplicantStaIfaceMockV13).filsHlpFlushRequest();
-    }
-
-    /**
-     * Tests the handling of state change V13 notification without
-     * any configured network.
-     */
-    @Test
-    public void testonStateChangedV13CallbackWithNoConfiguredNetwork() throws Exception {
-        setupMocksForHalV1_3();
-        executeAndValidateInitializationSequenceV1_3();
-        assertNotNull(mISupplicantStaIfaceCallbackV13);
-
-        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
-                ISupplicantStaIfaceCallback.State.INACTIVE,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
-
-        // Can't compare WifiSsid instances because they lack an equals.
-        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(WifiConfiguration.INVALID_NETWORK_ID),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.INACTIVE));
-    }
-
-    /**
-     * Tests the handling of state change V13 notification to
-     * associated after configuring a network.
-     */
-    @Test
-    public void testStateChangeV13ToAssociatedCallback() throws Exception {
-        setupMocksForHalV1_3();
-        executeAndValidateInitializationSequenceV1_3();
-        int frameworkNetworkId = 6;
-        executeAndValidateConnectSequence(frameworkNetworkId, false);
-        assertNotNull(mISupplicantStaIfaceCallbackV13);
-
-        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
-                ISupplicantStaIfaceCallback.State.ASSOCIATED,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
-
-        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.ASSOCIATED));
-    }
-
-    /**
-     * Tests the handling of state change V13 notification to
-     * completed after configuring a network.
-     */
-    @Test
-    public void testStateChangeV13ToCompletedCallback() throws Exception {
-        InOrder wifiMonitorInOrder = inOrder(mWifiMonitor);
-        setupMocksForHalV1_3();
-        executeAndValidateInitializationSequenceV1_3();
-        assertNotNull(mISupplicantStaIfaceCallbackV13);
-        int frameworkNetworkId = 6;
-        executeAndValidateConnectSequence(frameworkNetworkId, false);
-
-        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
-                ISupplicantStaIfaceCallback.State.COMPLETED,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
-
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)));
-
-        wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(false), eq(wifiSsid), eq(BSSID));
-        wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
-    }
-
-    /**
-     * Tests the handling of incorrect network passwords, edge case
-     * when onStateChanged_1_3() is used.
-     *
-     * If the network is removed during 4-way handshake, do not call it a password mismatch.
-     */
-    @Test
-    public void testNetworkRemovedDuring4wayWhenonStateChangedV13IsUsed() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        setupMocksForHalV1_3();
-        executeAndValidateInitializationSequenceV1_3();
-        assertNotNull(mISupplicantStaIfaceCallbackV13);
-
-        int reasonCode = 3;
-
-        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
-                ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
-        mISupplicantStaIfaceCallback.onNetworkRemoved(SUPPLICANT_NETWORK_ID);
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
-                anyInt(), any(), any());
-    }
-
-     /**
-      * Tests the handling of incorrect network passwords when
-      * onStateChanged_1_3() is used, edge case.
-      *
-      * If the disconnect reason is "IE in 4way differs", do not call it a password mismatch.
-      */
-    @Test
-    public void testIeDiffersWhenonStateChangedV13IsUsed() throws Exception {
-        executeAndValidateInitializationSequence();
-        assertNotNull(mISupplicantStaIfaceCallback);
-        setupMocksForHalV1_3();
-        executeAndValidateInitializationSequenceV1_3();
-        assertNotNull(mISupplicantStaIfaceCallbackV13);
-
-        int reasonCode = ISupplicantStaIfaceCallback.ReasonCode.IE_IN_4WAY_DIFFERS;
-
-        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
-                ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE,
-                NativeUtil.macAddressToByteArray(BSSID),
-                SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
-        mISupplicantStaIfaceCallback.onDisconnected(
-                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
-        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
-                anyInt(), any(), any());
-    }
-
-    /**
-     * Tests the handling of state change V13 notification to
-     * completed (with FILS HLP IE sent) after configuring a
-     * network.
-     */
-    @Test
-    public void testStateChangeV13WithFilsHlpIESentToCompletedCallback() throws Exception {
-        InOrder wifiMonitorInOrder = inOrder(mWifiMonitor);
-        setupMocksForHalV1_3();
-        executeAndValidateInitializationSequenceV1_3();
-        assertNotNull(mISupplicantStaIfaceCallbackV13);
-        int frameworkNetworkId = 6;
-        executeAndValidateConnectSequence(frameworkNetworkId, false);
-
-        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
-                ISupplicantStaIfaceCallback.State.COMPLETED,
-                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
-                NativeUtil.decodeSsid(SUPPLICANT_SSID), true);
-
-        WifiSsid wifiSsid = WifiSsid.fromBytes(
-                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)));
-
-        wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(true), eq(wifiSsid), eq(BSSID));
-        wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
-                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
-                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
-    }
-
-    @Test
-    public void testDisableNetworkAfterConnected() throws Exception {
-        when(mSupplicantStaNetworkMock.disable()).thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-
-        // Connect to a network.
-        executeAndValidateConnectSequence(4, false);
-
-        // Disable it.
-        assertTrue(mDut.disableCurrentNetwork(WLAN0_IFACE_NAME));
-        verify(mSupplicantStaNetworkMock).disable();
-    }
-
-    /**
-     * Tests the handling of association rejection notification V1_4.
-     */
-    @Test
-    public void testAssociationRejectionCallback_1_4() throws Exception {
-        setupMocksForHalV1_4();
-        executeAndValidateInitializationSequenceV1_4();
-        assertNotNull(mISupplicantStaIfaceCallbackV14);
-        AssociationRejectionData assocRejectData = new AssociationRejectionData();
-        assocRejectData.ssid = NativeUtil.decodeSsid(SUPPLICANT_SSID);
-        assocRejectData.bssid = NativeUtil.macAddressToByteArray(BSSID);
-        assocRejectData.statusCode = 5;
-        assocRejectData.isOceRssiBasedAssocRejectAttrPresent = true;
-        assocRejectData.oceRssiBasedAssocRejectData.retryDelayS = 10;
-        assocRejectData.oceRssiBasedAssocRejectData.deltaRssi = 20;
-        mISupplicantStaIfaceCallbackV14.onAssociationRejected_1_4(assocRejectData);
-
-        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
-                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
-        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
-                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
-        AssocRejectEventInfo assocRejectEventInfo =
-                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
-        assertNotNull(assocRejectEventInfo);
-        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
-        assertEquals(BSSID, assocRejectEventInfo.bssid);
-        assertEquals(SupplicantStaIfaceCallbackHidlImpl.halToFrameworkStatusCode(
-                assocRejectData.statusCode), assocRejectEventInfo.statusCode);
-        assertFalse(assocRejectEventInfo.timedOut);
-        assertNotNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
-        assertEquals(assocRejectData.oceRssiBasedAssocRejectData.retryDelayS,
-                assocRejectEventInfo.oceRssiBasedAssocRejectInfo.mRetryDelayS);
-        assertEquals(assocRejectData.oceRssiBasedAssocRejectData.deltaRssi,
-                assocRejectEventInfo.oceRssiBasedAssocRejectInfo.mDeltaRssi);
-        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
-    }
-
-    /**
-     * Tests the handling of network not found notification.
-     */
-    @Test
-    public void testNetworkNotFoundCallback() throws Exception {
-        setupMocksForHalV1_4();
-        executeAndValidateInitializationSequenceV1_4();
-        assertNotNull(mISupplicantStaIfaceCallbackV14);
-        mISupplicantStaIfaceCallbackV14.onNetworkNotFound(NativeUtil.decodeSsid(SUPPLICANT_SSID));
-
-        verify(mWifiMonitor).broadcastNetworkNotFoundEvent(
-                eq(WLAN0_IFACE_NAME), eq(SUPPLICANT_SSID));
-
-    }
-
-    /**
-     * Tests the behavior of {@link SupplicantStaIfaceHal#getCurrentNetworkSecurityParams(String)}
-     * @throws Exception
-     */
-    @Test
-    public void testGetCurrentNetworkSecurityParams() throws Exception {
-        executeAndValidateInitializationSequence();
-
-        // Null current network should return null security params
-        assertNull(mDut.getCurrentNetworkSecurityParams(WLAN0_IFACE_NAME));
-
-        // Connecting to network with PSK candidate security params should return PSK params.
-        executeAndValidateConnectSequenceWithKeyMgmt(
-                0, false, WifiConfiguration.SECURITY_TYPE_PSK, "97CA326539");
-        assertTrue(mDut.getCurrentNetworkSecurityParams(WLAN0_IFACE_NAME)
-                .isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK));
-    }
-
-    /**
-     * Tests the setting of EAP anonymous identity.
-     */
-    @Test
-    public void testSetEapAnonymousIdentity() throws Exception {
-        String anonymousIdentity = "adb@realm.com";
-        ArrayList<Byte> bytes = NativeUtil.stringToByteArrayList(anonymousIdentity);
-        when(mSupplicantStaNetworkMock.setEapAnonymousIdentity(any()))
-                .thenReturn(true);
-
-        executeAndValidateInitializationSequence();
-        executeAndValidateConnectSequence(4, false);
-        assertTrue(mDut.setEapAnonymousIdentity(WLAN0_IFACE_NAME, anonymousIdentity));
-        verify(mSupplicantStaNetworkMock).setEapAnonymousIdentity(eq(bytes));
-    }
-
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java
index db712b8..a4c1303 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaIfaceHalTest.java
@@ -13,1210 +13,3615 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.android.server.wifi;
 
+import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP_ENROLLEE_RESPONDER;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA256;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_FILS_SHA384;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_MBO;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_OCE;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_WAPI;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SAE;
+import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SUITE_B;
+
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyBoolean;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.anyLong;
+import static org.mockito.Matchers.anyShort;
 import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.doNothing;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.reset;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
 import static org.mockito.Mockito.when;
 
+import android.annotation.NonNull;
+import android.app.test.MockAnswerUtil;
+import android.app.test.MockAnswerUtil.AnswerWithArguments;
 import android.content.Context;
-import android.net.DscpPolicy;
+import android.hardware.wifi.V1_0.WifiChannelWidthInMhz;
+import android.hardware.wifi.supplicant.V1_0.ISupplicant;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantIface;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIface;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback.BssidChangeReason;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantStaNetwork;
+import android.hardware.wifi.supplicant.V1_0.IfaceType;
+import android.hardware.wifi.supplicant.V1_0.SupplicantStatus;
+import android.hardware.wifi.supplicant.V1_0.SupplicantStatusCode;
+import android.hardware.wifi.supplicant.V1_0.WpsConfigMethods;
+import android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback.BssTmData;
+import android.hardware.wifi.supplicant.V1_3.WifiTechnology;
+import android.hardware.wifi.supplicant.V1_4.ConnectionCapabilities;
+import android.hardware.wifi.supplicant.V1_4.DppCurve;
+import android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.AssociationRejectionData;
+import android.hardware.wifi.supplicant.V1_4.LegacyMode;
+import android.hidl.manager.V1_0.IServiceManager;
+import android.hidl.manager.V1_0.IServiceNotification;
 import android.net.MacAddress;
+import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
+import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.util.HexEncoding;
+import android.net.wifi.WifiManager;
+import android.net.wifi.WifiSsid;
 import android.os.Handler;
-import android.util.Range;
+import android.os.IHwBinder;
+import android.os.RemoteException;
+import android.os.test.TestLooper;
+import android.text.TextUtils;
 
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyClassifierParams;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyRequest;
+import androidx.test.filters.SmallTest;
+
+import com.android.server.wifi.MboOceController.BtmFrameData;
+import com.android.server.wifi.SupplicantStaIfaceHal.PmkCacheStoreData;
+import com.android.server.wifi.hotspot2.AnqpEvent;
+import com.android.server.wifi.hotspot2.IconEvent;
+import com.android.server.wifi.hotspot2.WnmData;
+import com.android.server.wifi.util.NativeUtil;
 
 import org.junit.Before;
 import org.junit.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InOrder;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Random;
 
 /**
- * Unit tests for SupplicantStaIfaceHal, which functions as a wrapper for either
- * SupplicantStaIfaceHalHidlImpl or SupplicantStaIfaceHalAidlImpl, depending on
- * which service (HIDL or AIDL) is available. Test the initialization logic and
- * verify that calls to all public methods are forwarded to the actual implementation.
+ * Unit tests for SupplicantStaIfaceHal
  */
-public class SupplicantStaIfaceHalTest {
-    private SupplicantStaIfaceHalSpy mDut;
-    private @Mock SupplicantStaIfaceHalHidlImpl mStaIfaceHalHidlMock;
-    private @Mock SupplicantStaIfaceHalAidlImpl mStaIfaceHalAidlMock;
-    private @Mock WifiNative.SupplicantDeathEventHandler mSupplicantHalDeathHandler;
+@SmallTest
+public class SupplicantStaIfaceHalTest extends WifiBaseTest {
+    private static final String TAG = "SupplicantStaIfaceHalTest";
+    private static final Map<Integer, String> NETWORK_ID_TO_SSID = new HashMap<Integer, String>() {{
+            put(1, "\"ssid1\"");
+            put(2, "\"ssid2\"");
+            put(3, "\"ssid3\"");
+        }};
+    private static final int SUPPLICANT_NETWORK_ID = 2;
+    private static final String SUPPLICANT_SSID = NETWORK_ID_TO_SSID.get(SUPPLICANT_NETWORK_ID);
+    private static final int ROAM_NETWORK_ID = 4;
+    private static final String BSSID = "fa:45:23:23:12:12";
+    private static final String WLAN0_IFACE_NAME = "wlan0";
+    private static final String WLAN1_IFACE_NAME = "wlan1";
+    private static final String P2P_IFACE_NAME = "p2p0";
+    private static final String ICON_FILE_NAME  = "blahblah";
+    private static final int ICON_FILE_SIZE = 72;
+    private static final String HS20_URL = "http://blahblah";
+    private static final long PMK_CACHE_EXPIRATION_IN_SEC = 1024;
+    private static final byte[] CONNECTED_MAC_ADDRESS_BYTES =
+            {0x00, 0x01, 0x02, 0x03, 0x04, 0x05};
+
+    private @Mock IServiceManager mServiceManagerMock;
+    private @Mock ISupplicant mISupplicantMock;
+    private android.hardware.wifi.supplicant.V1_1.ISupplicant mISupplicantMockV1_1;
+    private android.hardware.wifi.supplicant.V1_2.ISupplicant mISupplicantMockV1_2;
+    private android.hardware.wifi.supplicant.V1_3.ISupplicant mISupplicantMockV13;
+    private android.hardware.wifi.supplicant.V1_3.ISupplicant mISupplicantMockV14;
+    private @Mock ISupplicantIface mISupplicantIfaceMock;
+    private @Mock ISupplicantStaIface mISupplicantStaIfaceMock;
+    private @Mock android.hardware.wifi.supplicant.V1_1.ISupplicantStaIface
+            mISupplicantStaIfaceMockV1_1;
+    private @Mock android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
+            mISupplicantStaIfaceMockV1_2;
+    private @Mock android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+            mISupplicantStaIfaceMockV13;
+    private @Mock android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
+            mISupplicantStaIfaceMockV14;
     private @Mock Context mContext;
     private @Mock WifiMonitor mWifiMonitor;
     private @Mock FrameworkFacade mFrameworkFacade;
-    private @Mock Handler mHandler;
+    private @Mock SupplicantStaNetworkHal mSupplicantStaNetworkMock;
+    private @Mock WifiNative.SupplicantDeathEventHandler mSupplicantHalDeathHandler;
     private @Mock Clock mClock;
     private @Mock WifiMetrics mWifiMetrics;
     private @Mock WifiGlobals mWifiGlobals;
 
-    private static final String IFACE_NAME = "wlan0";
-    private static final String BSSID = "fa:45:23:23:12:12";
-    private static final String PARAMS = "blahblah";
-    private static final String RESPONSE = "blahblahblah";
-    private static final String PIN = "5678";
-    private static final boolean ENABLE = true;
-    private static final int NETWORK_ID = 2;
-    private static final int PEER_ID = 3;
-    private static final int OWN_ID = 4;
-    private static final int MODE = 5;
+    SupplicantStatus mStatusSuccess;
+    SupplicantStatus mStatusFailure;
+    android.hardware.wifi.supplicant.V1_4.SupplicantStatus mStatusSuccessV14;
+    android.hardware.wifi.supplicant.V1_4.SupplicantStatus mStatusFailureV14;
+    ISupplicant.IfaceInfo mStaIface0;
+    ISupplicant.IfaceInfo mStaIface1;
+    ISupplicant.IfaceInfo mP2pIface;
+    ArrayList<ISupplicant.IfaceInfo> mIfaceInfoList;
+    ISupplicantStaIfaceCallback mISupplicantStaIfaceCallback;
+    android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback
+            mISupplicantStaIfaceCallbackV1_1;
+    android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback
+            mISupplicantStaIfaceCallbackV1_2;
+    android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback
+            mISupplicantStaIfaceCallbackV13 = null;
+    android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback
+            mISupplicantStaIfaceCallbackV14 = null;
 
-    private static final byte QOS_POLICY_ID = 12;
-    private static final int QOS_POLICY_REQUEST_TYPE =
-            SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD;
-    private static final byte QOS_POLICY_DSCP = 0;
-    private static final int QOS_POLICY_SRC_PORT = DscpPolicy.SOURCE_PORT_ANY;
-    private static final int[] QOS_POLICY_DST_PORT_RANGE = new int[]{0, 65535};
-    private static final int QOS_POLICY_PROTOCOL = DscpPolicy.PROTOCOL_ANY;
+    private TestLooper mLooper = new TestLooper();
+    private Handler mHandler = null;
+    private SupplicantStaIfaceHalSpy mDut;
+    private ArgumentCaptor<IHwBinder.DeathRecipient> mServiceManagerDeathCaptor =
+            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
+    private ArgumentCaptor<IHwBinder.DeathRecipient> mSupplicantDeathCaptor =
+            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
+    private ArgumentCaptor<IHwBinder.DeathRecipient> mSupplicantStaIfaceDeathCaptor =
+            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
+    private ArgumentCaptor<IServiceNotification.Stub> mServiceNotificationCaptor =
+            ArgumentCaptor.forClass(IServiceNotification.Stub.class);
+    private ArgumentCaptor<Long> mDeathRecipientCookieCaptor = ArgumentCaptor.forClass(Long.class);
+    private InOrder mInOrder;
 
     private class SupplicantStaIfaceHalSpy extends SupplicantStaIfaceHal {
+        SupplicantStaNetworkHal mStaNetwork;
+
         SupplicantStaIfaceHalSpy() {
             super(mContext, mWifiMonitor, mFrameworkFacade,
                     mHandler, mClock, mWifiMetrics, mWifiGlobals);
+            mStaNetwork = mSupplicantStaNetworkMock;
         }
 
         @Override
-        protected ISupplicantStaIfaceHal createStaIfaceHalMockable()  {
-            return mStaIfaceHalAidlMock;
-        }
-    }
-
-    /**
-     * Implementation of SupplicantStaIfaceHalSpy that uses the HIDL mock internally
-     * rather than the default AIDL mock.
-     */
-    private class SupplicantStaIfaceHidlHalSpy extends SupplicantStaIfaceHalSpy {
-        SupplicantStaIfaceHidlHalSpy() {
-            super();
+        protected IServiceManager getServiceManagerMockable() throws RemoteException {
+            return mServiceManagerMock;
         }
 
         @Override
-        protected ISupplicantStaIfaceHal createStaIfaceHalMockable()  {
-            return mStaIfaceHalHidlMock;
-        }
-    }
-
-    /**
-     * Implementation of SupplicantStaIfaceHalSpy that creates a null HAL internally.
-     */
-    private class SupplicantStaIfaceNullHalSpy extends SupplicantStaIfaceHalSpy {
-        SupplicantStaIfaceNullHalSpy() {
-            super();
+        protected ISupplicant getSupplicantMockable() throws RemoteException {
+            return mISupplicantMock;
         }
 
         @Override
-        protected ISupplicantStaIfaceHal createStaIfaceHalMockable()  {
-            return null;
+        protected android.hardware.wifi.supplicant.V1_1.ISupplicant getSupplicantMockableV1_1()
+                throws RemoteException {
+            return mISupplicantMockV1_1;
+        }
+
+        @Override
+        protected ISupplicantStaIface getStaIfaceMockable(ISupplicantIface iface) {
+            return mISupplicantStaIfaceMock;
+        }
+
+        @Override
+        protected android.hardware.wifi.supplicant.V1_1.ISupplicantStaIface
+                getStaIfaceMockableV1_1(ISupplicantIface iface) {
+            return mISupplicantStaIfaceMockV1_1;
+        }
+
+        @Override
+        protected android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
+                getStaIfaceMockableV1_2(ISupplicantIface iface) {
+            return mISupplicantStaIfaceMockV1_2;
+        }
+
+        @Override
+        protected android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                getStaIfaceMockableV1_3(ISupplicantIface iface) {
+            return (mISupplicantMockV13 != null)
+                    ? mISupplicantStaIfaceMockV13
+                    : null;
+        }
+
+        @Override
+        protected android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
+                getStaIfaceMockableV1_4(ISupplicantIface iface) {
+            return (mISupplicantMockV14 != null)
+                    ? mISupplicantStaIfaceMockV14
+                    : null;
+        }
+
+        @Override
+        protected SupplicantStaNetworkHal getStaNetworkMockable(
+                @NonNull String ifaceName,
+                ISupplicantStaNetwork iSupplicantStaNetwork) {
+            return mStaNetwork;
+        }
+
+        private void setStaNetworkMockable(SupplicantStaNetworkHal network) {
+            mStaNetwork = network;
         }
     }
 
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
+        mStatusSuccess = createSupplicantStatus(SupplicantStatusCode.SUCCESS);
+        mStatusFailure = createSupplicantStatus(SupplicantStatusCode.FAILURE_UNKNOWN);
+        mStatusSuccessV14 = createSupplicantStatusV1_4(
+                android.hardware.wifi.supplicant.V1_4.SupplicantStatusCode.SUCCESS);
+        mStatusFailureV14 = createSupplicantStatusV1_4(
+                android.hardware.wifi.supplicant.V1_4.SupplicantStatusCode.FAILURE_UNKNOWN);
+        mStaIface0 = createIfaceInfo(IfaceType.STA, WLAN0_IFACE_NAME);
+        mStaIface1 = createIfaceInfo(IfaceType.STA, WLAN1_IFACE_NAME);
+        mP2pIface = createIfaceInfo(IfaceType.P2P, P2P_IFACE_NAME);
+
+        mIfaceInfoList = new ArrayList<>();
+        mIfaceInfoList.add(mStaIface0);
+        mIfaceInfoList.add(mStaIface1);
+        mIfaceInfoList.add(mP2pIface);
+        when(mServiceManagerMock.getTransport(anyString(), anyString()))
+                .thenReturn(IServiceManager.Transport.EMPTY);
+        when(mServiceManagerMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
+                anyLong())).thenReturn(true);
+        when(mServiceManagerMock.registerForNotifications(anyString(), anyString(),
+                any(IServiceNotification.Stub.class))).thenReturn(true);
+        when(mISupplicantMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
+                anyLong())).thenReturn(true);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicantStaIface.getMacAddressCallback cb) {
+                cb.onValues(mStatusSuccess, CONNECTED_MAC_ADDRESS_BYTES);
+            }
+        })
+        .when(mISupplicantStaIfaceMock)
+                .getMacAddress(any(ISupplicantStaIface.getMacAddressCallback.class));
+        when(mFrameworkFacade.startSupplicant()).thenReturn(true);
+        mHandler = spy(new Handler(mLooper.getLooper()));
         mDut = new SupplicantStaIfaceHalSpy();
     }
 
     /**
-     * Initialize SupplicantStaIfaceHal with the AIDL implementation.
-     */
-    private void initializeWithAidlImpl(boolean shouldSucceed) {
-        when(mStaIfaceHalAidlMock.initialize()).thenReturn(shouldSucceed);
-        assertEquals(shouldSucceed, mDut.initialize());
-        verify(mStaIfaceHalAidlMock).initialize();
-        verify(mStaIfaceHalHidlMock, never()).initialize();
-    }
-
-    /**
-     * Initialize SupplicantStaIfaceHal with the HIDL implementation.
-     */
-    private void initializeWithHidlImpl(boolean shouldSucceed) {
-        mDut = new SupplicantStaIfaceHidlHalSpy();
-        when(mStaIfaceHalHidlMock.initialize()).thenReturn(shouldSucceed);
-        assertEquals(shouldSucceed, mDut.initialize());
-        verify(mStaIfaceHalAidlMock, never()).initialize();
-        verify(mStaIfaceHalHidlMock).initialize();
-    }
-
-    /**
-     * Tests successful initialization with the AIDL implementation.
+     * Sunny day scenario for SupplicantStaIfaceHal initialization
+     * Asserts successful initialization
      */
     @Test
-    public void testInitSuccessAidl() {
-        initializeWithAidlImpl(true);
+    public void testInitialize_success() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false, false);
     }
 
     /**
-     * Tests successful initialization with the HIDL implementation.
+     * Tests the initialization flow, with a RemoteException occurring when 'getInterface' is called
+     * Ensures initialization fails.
      */
     @Test
-    public void testInitSuccessHidl() {
-        initializeWithHidlImpl(true);
+    public void testInitialize_remoteExceptionFailure() throws Exception {
+        executeAndValidateInitializationSequence(true, false, false, false);
     }
 
     /**
-     * Tests failed initialization with the AIDL implementation.
+     * Tests the initialization flow, with listInterfaces returning 0 interfaces.
+     * Ensures failure
      */
     @Test
-    public void testInitFailureAidl() {
-        initializeWithAidlImpl(false);
+    public void testInitialize_zeroInterfacesFailure() throws Exception {
+        executeAndValidateInitializationSequence(false, true, false, false);
     }
 
     /**
-     * Tests failed initialization with the HIDL implementation.
+     * Tests the initialization flow, with a null interface being returned by getInterface.
+     * Ensures initialization fails.
      */
     @Test
-    public void testInitFailureHidl() {
-        initializeWithHidlImpl(false);
+    public void testInitialize_nullInterfaceFailure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, true, false);
     }
 
     /**
-     * Check that initialize() returns false if we receive a null implementation.
+     * Tests the initialization flow, with a callback registration failure.
+     * Ensures initialization fails.
      */
     @Test
-    public void testInitFailure_null() {
-        mDut = new SupplicantStaIfaceNullHalSpy();
-        assertFalse(mDut.initialize());
-        verify(mStaIfaceHalAidlMock, never()).initialize();
-        verify(mStaIfaceHalHidlMock, never()).initialize();
+    public void testInitialize_callbackRegistrationFailure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false, true);
     }
 
     /**
-     * Check that other functions cannot be called if we received a null implementation.
+     * Sunny day scenario for SupplicantStaIfaceHal initialization
+     * Asserts successful initialization
      */
     @Test
-    public void testCallAfterNullInitFailure() {
-        mDut = new SupplicantStaIfaceNullHalSpy();
-        assertFalse(mDut.initialize());
-        when(mStaIfaceHalAidlMock.setupIface(anyString())).thenReturn(true);
-        assertFalse(mDut.setupIface(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock, never()).setupIface(anyString());
-    }
-
-    // Now check that we can call all public methods. All of the arguments should get
-    // forwarded to the corresponding method in the implementation and we should return
-    // the implementation's result.
-
-    /**
-     * Test that we can call setupIface
-     */
-    @Test
-    public void testSetupIface() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setupIface(anyString())).thenReturn(true);
-        assertTrue(mDut.setupIface(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).setupIface(eq(IFACE_NAME));
+    public void testInitialize_successV1_1() throws Exception {
+        setupMocksForHalV1_1();
+        executeAndValidateInitializationSequenceV1_1(false, false);
     }
 
     /**
-     * Test that we can call teardownIface
+     * Sunny day scenario for SupplicantStaIfaceHal initialization
+     * Asserts successful initialization
      */
     @Test
-    public void testTeardownIface() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.teardownIface(anyString())).thenReturn(true);
-        assertTrue(mDut.teardownIface(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).teardownIface(eq(IFACE_NAME));
+    public void testInitialize_successV1_2() throws Exception {
+        setupMocksForHalV1_2();
+        executeAndValidateInitializationSequenceV1_2();
     }
 
     /**
-     * Test that we can call registerDeathHandler
+     * Sunny day scenario for SupplicantStaIfaceHal initialization
+     * Asserts successful initialization
      */
     @Test
-    public void testRegisterDeathHandler() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.registerDeathHandler(
-                any(WifiNative.SupplicantDeathEventHandler.class))).thenReturn(true);
-        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
-        verify(mStaIfaceHalAidlMock).registerDeathHandler(eq(mSupplicantHalDeathHandler));
+    public void testInitialize_successV1_3() throws Exception {
+        setupMocksForHalV1_3();
+        executeAndValidateInitializationSequenceV1_3();
     }
 
     /**
-     * Test that we can call deregisterDeathHandler
+     * Sunny day scenario for SupplicantStaIfaceHal initialization
+     * Asserts successful initialization
      */
     @Test
-    public void testDeregisterDeathHandler() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.deregisterDeathHandler()).thenReturn(true);
-        assertTrue(mDut.deregisterDeathHandler());
-        verify(mStaIfaceHalAidlMock).deregisterDeathHandler();
+    public void testInitialize_successV1_4() throws Exception {
+        setupMocksForHalV1_4();
+        executeAndValidateInitializationSequenceV1_4();
     }
 
     /**
-     * Test that we can call isInitializationStarted
+     * Tests the initialization flow, with a RemoteException occurring when 'getInterface' is called
+     * Ensures initialization fails.
      */
     @Test
-    public void testIsInitializationStarted() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.isInitializationStarted()).thenReturn(true);
-        assertTrue(mDut.isInitializationStarted());
-        verify(mStaIfaceHalAidlMock).isInitializationStarted();
+    public void testInitialize_remoteExceptionFailureV1_1() throws Exception {
+        setupMocksForHalV1_1();
+        executeAndValidateInitializationSequenceV1_1(true, false);
     }
 
     /**
-     * Test that we can call isInitializationComplete
+     * Tests the initialization flow, with a null interface being returned by getInterface.
+     * Ensures initialization fails.
      */
     @Test
-    public void testIsInitializationComplete() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.isInitializationComplete()).thenReturn(true);
-        assertTrue(mDut.isInitializationComplete());
-        verify(mStaIfaceHalAidlMock).isInitializationComplete();
+    public void testInitialize_nullInterfaceFailureV1_1() throws Exception {
+        setupMocksForHalV1_1();
+        executeAndValidateInitializationSequenceV1_1(false, true);
     }
 
     /**
-     * Test that we can call startDaemon
+     * Ensures that we do not allow operations on an interface until it's setup.
      */
     @Test
-    public void testStartDaemon() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.startDaemon()).thenReturn(true);
-        assertTrue(mDut.startDaemon());
-        verify(mStaIfaceHalAidlMock).startDaemon();
+    public void testEnsureOperationFailsUntilSetupInterfaces() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false, false);
+
+        // Ensure that the cancel wps operation is failed because wlan1 interface is not yet setup.
+        assertFalse(mDut.cancelWps(WLAN1_IFACE_NAME));
+        verify(mISupplicantStaIfaceMock, never()).cancelWps();
+
+        // Now setup the wlan1 interface and Ensure that the cancel wps operation is successful.
+        assertTrue(mDut.setupIface(WLAN1_IFACE_NAME));
+        when(mISupplicantStaIfaceMock.cancelWps()).thenReturn(mStatusSuccess);
+        assertTrue(mDut.cancelWps(WLAN1_IFACE_NAME));
+        verify(mISupplicantStaIfaceMock).cancelWps();
     }
 
     /**
-     * Test that we can call terminate
+     * Ensures that reject addition of an existing iface.
      */
     @Test
-    public void testTerminate() {
-        initializeWithAidlImpl(true);
-        doNothing().when(mStaIfaceHalAidlMock).terminate();
-        mDut.terminate();
-        verify(mStaIfaceHalAidlMock).terminate();
+    public void testDuplicateSetupIfaceV1_1_Fails() throws Exception {
+        setupMocksForHalV1_1();
+        executeAndValidateInitializationSequenceV1_1(false, false);
+
+        // Trying setting up the wlan0 interface again & ensure it fails.
+        assertFalse(mDut.setupIface(WLAN0_IFACE_NAME));
+        verifyNoMoreInteractions(mISupplicantMockV1_1);
     }
 
     /**
-     * Test that we can call connectToNetwork
+     * Sunny day scenario for SupplicantStaIfaceHal interface teardown.
      */
     @Test
-    public void testConnectToNetwork() {
-        initializeWithAidlImpl(true);
-        WifiConfiguration testConfig = new WifiConfiguration();
-        when(mStaIfaceHalAidlMock.connectToNetwork(anyString(), any(WifiConfiguration.class)))
-            .thenReturn(true);
-        assertTrue(mDut.connectToNetwork(IFACE_NAME, testConfig));
-        verify(mStaIfaceHalAidlMock).connectToNetwork(eq(IFACE_NAME), eq(testConfig));
+    public void testTeardownInterface() throws Exception {
+        testInitialize_success();
+        assertTrue(mDut.teardownIface(WLAN0_IFACE_NAME));
+
+        // Ensure that the cancel wps operation is failed because there are no interfaces setup.
+        assertFalse(mDut.cancelWps(WLAN0_IFACE_NAME));
+        verify(mISupplicantStaIfaceMock, never()).cancelWps();
     }
 
     /**
-     * Test that we can call roamToNetwork
+     * Sunny day scenario for SupplicantStaIfaceHal interface teardown.
      */
     @Test
-    public void testRoamToNetwork() {
-        initializeWithAidlImpl(true);
-        WifiConfiguration testConfig = mock(WifiConfiguration.class);
-        when(mStaIfaceHalAidlMock.roamToNetwork(anyString(), any(WifiConfiguration.class)))
-                .thenReturn(true);
-        assertTrue(mDut.roamToNetwork(IFACE_NAME, testConfig));
-        verify(mStaIfaceHalAidlMock).roamToNetwork(eq(IFACE_NAME), eq(testConfig));
+    public void testTeardownInterfaceV1_1() throws Exception {
+        testInitialize_successV1_1();
+
+        when(mISupplicantMockV1_1.removeInterface(any())).thenReturn(mStatusSuccess);
+        assertTrue(mDut.teardownIface(WLAN0_IFACE_NAME));
+        verify(mISupplicantMockV1_1).removeInterface(any());
+
+        // Ensure that the cancel wps operation is failed because there are no interfaces setup.
+        assertFalse(mDut.cancelWps(WLAN0_IFACE_NAME));
+        verify(mISupplicantStaIfaceMock, never()).cancelWps();
     }
 
     /**
-     * Test that we can call removeNetworkCachedData
+     * Ensures that we reject removal of an invalid iface.
      */
     @Test
-    public void testRemoveNetworkCachedData() {
-        initializeWithAidlImpl(true);
-        doNothing().when(mStaIfaceHalAidlMock).removeNetworkCachedData(anyInt());
-        mDut.removeNetworkCachedData(NETWORK_ID);
-        verify(mStaIfaceHalAidlMock).removeNetworkCachedData(eq(NETWORK_ID));
+    public void testInvalidTeardownInterfaceV1_1_Fails() throws Exception {
+        assertFalse(mDut.teardownIface(WLAN0_IFACE_NAME));
+        verifyNoMoreInteractions(mISupplicantMock);
     }
 
     /**
-     * Test that we can call removeNetworkCachedDataIfNeeded
+     * Sunny day scenario for SupplicantStaIfaceHal initialization
+     * Asserts successful initialization of second interface
      */
     @Test
-    public void testRemoveNetworkCachedDataIfNeeded() {
-        initializeWithAidlImpl(true);
-        MacAddress testAddress = MacAddress.fromString(BSSID);
-        doNothing().when(mStaIfaceHalAidlMock)
-                .removeNetworkCachedDataIfNeeded(anyInt(), any(MacAddress.class));
-        mDut.removeNetworkCachedDataIfNeeded(NETWORK_ID, testAddress);
-        verify(mStaIfaceHalAidlMock).removeNetworkCachedDataIfNeeded(
-                eq(NETWORK_ID), eq(testAddress));
+    public void testSetupTwoInterfaces() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false, false);
+        assertTrue(mDut.setupIface(WLAN1_IFACE_NAME));
     }
 
     /**
-     * Test that we can call removeAllNetworks
+     * Sunny day scenario for SupplicantStaIfaceHal interface teardown.
+     * Asserts successful initialization of second interface
      */
     @Test
-    public void testRemoveAllNetworks() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.removeAllNetworks(anyString())).thenReturn(true);
-        assertTrue(mDut.removeAllNetworks(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).removeAllNetworks(eq(IFACE_NAME));
+    public void testTeardownTwoInterfaces() throws Exception {
+        testSetupTwoInterfaces();
+        assertTrue(mDut.teardownIface(WLAN0_IFACE_NAME));
+        assertTrue(mDut.teardownIface(WLAN1_IFACE_NAME));
+
+        // Ensure that the cancel wps operation is failed because there are no interfaces setup.
+        assertFalse(mDut.cancelWps(WLAN0_IFACE_NAME));
+        verify(mISupplicantStaIfaceMock, never()).cancelWps();
     }
 
     /**
-     * Test that we can call disableCurrentNetwork
+     * Tests connection to a specified network with empty existing network.
      */
     @Test
-    public void testDisableCurrentNetwork() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.disableCurrentNetwork(anyString())).thenReturn(true);
-        assertTrue(mDut.disableCurrentNetwork(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).disableCurrentNetwork(eq(IFACE_NAME));
+    public void testConnectWithEmptyExistingNetwork() throws Exception {
+        executeAndValidateInitializationSequence();
+        executeAndValidateConnectSequence(0, false);
+    }
+
+    @Test
+    public void testConnectToNetworkWithDifferentConfigReplacesNetworkInSupplicant()
+            throws Exception {
+        executeAndValidateInitializationSequence();
+        WifiConfiguration config = executeAndValidateConnectSequence(
+                SUPPLICANT_NETWORK_ID, false);
+        // Reset mocks for mISupplicantStaIfaceMock because we finished the first connection.
+        reset(mISupplicantStaIfaceMock);
+        setupMocksForConnectSequence(true /*haveExistingNetwork*/);
+        // Make this network different by changing SSID.
+        config.SSID = "AnDifferentSSID";
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+        verify(mISupplicantStaIfaceMock).removeNetwork(SUPPLICANT_NETWORK_ID);
+        verify(mISupplicantStaIfaceMock)
+                .addNetwork(any(ISupplicantStaIface.addNetworkCallback.class));
+    }
+
+    @Test
+    public void connectToNetworkWithSameNetworkDoesNotRemoveNetworkFromSupplicant()
+            throws Exception {
+        executeAndValidateInitializationSequence();
+        WifiConfiguration config = executeAndValidateConnectSequence(SUPPLICANT_NETWORK_ID, false);
+        // Reset mocks for mISupplicantStaIfaceMock because we finished the first connection.
+        reset(mISupplicantStaIfaceMock);
+        setupMocksForConnectSequence(true /*haveExistingNetwork*/);
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+        verify(mISupplicantStaIfaceMock, never()).removeNetwork(anyInt());
+        verify(mISupplicantStaIfaceMock, never())
+                .addNetwork(any(ISupplicantStaIface.addNetworkCallback.class));
+    }
+
+    @Test
+    public void connectToNetworkWithSameNetworkButDifferentBssidUpdatesNetworkFromSupplicant()
+            throws Exception {
+        executeAndValidateInitializationSequence();
+        WifiConfiguration config = executeAndValidateConnectSequence(SUPPLICANT_NETWORK_ID, false);
+        String testBssid = "11:22:33:44:55:66";
+        when(mSupplicantStaNetworkMock.setBssid(eq(testBssid))).thenReturn(true);
+
+        // Reset mocks for mISupplicantStaIfaceMock because we finished the first connection.
+        reset(mISupplicantStaIfaceMock);
+        setupMocksForConnectSequence(true /*haveExistingNetwork*/);
+        // Change the BSSID and connect to the same network.
+        assertFalse(TextUtils.equals(
+                testBssid, config.getNetworkSelectionStatus().getNetworkSelectionBSSID()));
+        config.getNetworkSelectionStatus().setNetworkSelectionBSSID(testBssid);
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+        verify(mSupplicantStaNetworkMock).setBssid(eq(testBssid));
+        verify(mISupplicantStaIfaceMock, never()).removeNetwork(anyInt());
+        verify(mISupplicantStaIfaceMock, never())
+                .addNetwork(any(ISupplicantStaIface.addNetworkCallback.class));
     }
 
     /**
-     * Test that we can call setCurrentNetworkBssid
+     * Tests connection to a specified network failure due to network add.
      */
     @Test
-    public void testSetCurrentNetworkBssid() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setCurrentNetworkBssid(anyString(), anyString()))
-                .thenReturn(true);
-        assertTrue(mDut.setCurrentNetworkBssid(IFACE_NAME, BSSID));
-        verify(mStaIfaceHalAidlMock).setCurrentNetworkBssid(eq(IFACE_NAME), eq(BSSID));
+    public void testConnectFailureDueToNetworkAddFailure() throws Exception {
+        executeAndValidateInitializationSequence();
+        setupMocksForConnectSequence(false);
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public void answer(ISupplicantStaIface.addNetworkCallback cb) throws RemoteException {
+                cb.onValues(mStatusFailure, mock(ISupplicantStaNetwork.class));
+                return;
+            }
+        }).when(mISupplicantStaIfaceMock).addNetwork(
+                any(ISupplicantStaIface.addNetworkCallback.class));
+
+        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
     }
 
     /**
-     * Test that we can call getCurrentNetworkWpsNfcConfigurationToken
+     * Tests connection to a specified network failure due to network save.
      */
     @Test
-    public void testGetCurrentNetworkWpsNfcConfigurationToken() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.getCurrentNetworkWpsNfcConfigurationToken(anyString()))
-                .thenReturn(RESPONSE);
-        assertEquals(RESPONSE, mDut.getCurrentNetworkWpsNfcConfigurationToken(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).getCurrentNetworkWpsNfcConfigurationToken(eq(IFACE_NAME));
+    public void testConnectFailureDueToNetworkSaveFailure() throws Exception {
+        executeAndValidateInitializationSequence();
+        setupMocksForConnectSequence(true);
+
+        when(mSupplicantStaNetworkMock.saveWifiConfiguration(any(WifiConfiguration.class)))
+                .thenReturn(false);
+
+        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
+        // We should have removed the existing network once before connection and once more
+        // on failure to save network configuration.
+        verify(mISupplicantStaIfaceMock, times(2)).removeNetwork(anyInt());
     }
 
     /**
-     * Test that we can call getCurrentNetworkEapAnonymousIdentity
+     * Tests connection to a specified network failure due to exception in network save.
      */
     @Test
-    public void testGetCurrentNetworkEapAnonymousIdentity() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.getCurrentNetworkEapAnonymousIdentity(anyString()))
-                .thenReturn(RESPONSE);
-        assertEquals(RESPONSE, mDut.getCurrentNetworkEapAnonymousIdentity(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).getCurrentNetworkEapAnonymousIdentity(eq(IFACE_NAME));
+    public void testConnectFailureDueToNetworkSaveException() throws Exception {
+        executeAndValidateInitializationSequence();
+        setupMocksForConnectSequence(true);
+
+        doThrow(new IllegalArgumentException("Some error!!!"))
+                .when(mSupplicantStaNetworkMock).saveWifiConfiguration(
+                        any(WifiConfiguration.class));
+
+        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
+        // We should have removed the existing network once before connection and once more
+        // on failure to save network configuration.
+        verify(mISupplicantStaIfaceMock, times(2)).removeNetwork(anyInt());
     }
 
     /**
-     * Test that we can call sendCurrentNetworkEapIdentityResponse
+     * Tests connection to a specified network failure due to network select.
      */
     @Test
-    public void testSendCurrentNetworkEapIdentityResponse() {
-        initializeWithAidlImpl(true);
+    public void testConnectFailureDueToNetworkSelectFailure() throws Exception {
+        executeAndValidateInitializationSequence();
+        setupMocksForConnectSequence(false);
+
+        when(mSupplicantStaNetworkMock.select()).thenReturn(false);
+
+        assertFalse(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
+    }
+
+    /**
+     * Tests roaming to the same network as the currently connected one.
+     */
+    @Test
+    public void testRoamToSameNetwork() throws Exception {
+        executeAndValidateInitializationSequence();
+        executeAndValidateRoamSequence(true, false);
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, createTestWifiConfiguration()));
+    }
+
+    /**
+     * Tests roaming to a different network.
+     */
+    @Test
+    public void testRoamToDifferentNetwork() throws Exception {
+        executeAndValidateInitializationSequence();
+        executeAndValidateRoamSequence(false, false);
+    }
+
+    /**
+     * Tests roaming to a linked network.
+     */
+    @Test
+    public void testRoamToLinkedNetwork() throws Exception {
+        executeAndValidateInitializationSequence();
+        executeAndValidateRoamSequence(false, true);
+    }
+
+    /**
+     * Tests roaming failure because of unable to set bssid.
+     */
+    @Test
+    public void testRoamFailureDueToBssidSet() throws Exception {
+        executeAndValidateInitializationSequence();
+        int connectedNetworkId = 5;
+        executeAndValidateConnectSequence(connectedNetworkId, false);
+        when(mSupplicantStaNetworkMock.setBssid(anyString())).thenReturn(false);
+
+        WifiConfiguration roamingConfig = new WifiConfiguration();
+        roamingConfig.networkId = connectedNetworkId;
+        roamingConfig.getNetworkSelectionStatus().setNetworkSelectionBSSID("45:34:23:23:ab:ed");
+        assertFalse(mDut.roamToNetwork(WLAN0_IFACE_NAME, roamingConfig));
+    }
+
+    /**
+     * Tests removal of all configured networks from wpa_supplicant.
+     */
+    @Test
+    public void testRemoveAllNetworks() throws Exception {
+        executeAndValidateInitializationSequence();
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public void answer(ISupplicantStaIface.listNetworksCallback cb) {
+                cb.onValues(mStatusSuccess, new ArrayList<>(NETWORK_ID_TO_SSID.keySet()));
+            }
+        }).when(mISupplicantStaIfaceMock)
+                .listNetworks(any(ISupplicantStaIface.listNetworksCallback.class));
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public SupplicantStatus answer(int id) {
+                assertTrue(NETWORK_ID_TO_SSID.containsKey(id));
+                return mStatusSuccess;
+            }
+        }).when(mISupplicantStaIfaceMock).removeNetwork(anyInt());
+
+        assertTrue(mDut.removeAllNetworks(WLAN0_IFACE_NAME));
+        verify(mISupplicantStaIfaceMock, times(NETWORK_ID_TO_SSID.size())).removeNetwork(anyInt());
+    }
+
+    /**
+     * Remove all networks while connected, verify that the current network info is resetted.
+     */
+    @Test
+    public void testRemoveAllNetworksWhileConnected() throws Exception {
+        String testBssid = "11:22:33:44:55:66";
+        when(mSupplicantStaNetworkMock.setBssid(eq(testBssid))).thenReturn(true);
+
+        executeAndValidateInitializationSequence();
+
+        // Connect to a network and verify current network is set.
+        executeAndValidateConnectSequence(4, false);
+        assertTrue(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, testBssid));
+        verify(mSupplicantStaNetworkMock).setBssid(eq(testBssid));
+        reset(mSupplicantStaNetworkMock);
+
+        // Remove all networks and verify current network info is resetted.
+        assertTrue(mDut.removeAllNetworks(WLAN0_IFACE_NAME));
+        assertFalse(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, testBssid));
+        verify(mSupplicantStaNetworkMock, never()).setBssid(eq(testBssid));
+    }
+
+    /**
+     * Tests roaming failure because of unable to reassociate.
+     */
+    @Test
+    public void testRoamFailureDueToReassociate() throws Exception {
+        executeAndValidateInitializationSequence();
+        int connectedNetworkId = 5;
+        executeAndValidateConnectSequence(connectedNetworkId, false);
+
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public SupplicantStatus answer() throws RemoteException {
+                return mStatusFailure;
+            }
+        }).when(mISupplicantStaIfaceMock).reassociate();
+        when(mSupplicantStaNetworkMock.setBssid(anyString())).thenReturn(true);
+
+        WifiConfiguration roamingConfig = new WifiConfiguration();
+        roamingConfig.networkId = connectedNetworkId;
+        roamingConfig.getNetworkSelectionStatus().setNetworkSelectionBSSID("45:34:23:23:ab:ed");
+        assertFalse(mDut.roamToNetwork(WLAN0_IFACE_NAME, roamingConfig));
+    }
+
+    /**
+     * Tests the retrieval of WPS NFC token.
+     */
+    @Test
+    public void testGetCurrentNetworkWpsNfcConfigurationToken() throws Exception {
+        String token = "45adbc1";
+        when(mSupplicantStaNetworkMock.getWpsNfcConfigurationToken()).thenReturn(token);
+
+        executeAndValidateInitializationSequence();
+        // Return null when not connected to the network.
+        assertTrue(mDut.getCurrentNetworkWpsNfcConfigurationToken(WLAN0_IFACE_NAME) == null);
+        verify(mSupplicantStaNetworkMock, never()).getWpsNfcConfigurationToken();
+        executeAndValidateConnectSequence(4, false);
+        assertEquals(token, mDut.getCurrentNetworkWpsNfcConfigurationToken(WLAN0_IFACE_NAME));
+        verify(mSupplicantStaNetworkMock).getWpsNfcConfigurationToken();
+    }
+
+    /**
+     * Tests the setting of BSSID.
+     */
+    @Test
+    public void testSetCurrentNetworkBssid() throws Exception {
+        String bssidStr = "34:34:12:12:12:90";
+        when(mSupplicantStaNetworkMock.setBssid(eq(bssidStr))).thenReturn(true);
+
+        executeAndValidateInitializationSequence();
+        // Fail when not connected to a network.
+        assertFalse(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, bssidStr));
+        verify(mSupplicantStaNetworkMock, never()).setBssid(eq(bssidStr));
+        executeAndValidateConnectSequence(4, false);
+        assertTrue(mDut.setCurrentNetworkBssid(WLAN0_IFACE_NAME, bssidStr));
+        verify(mSupplicantStaNetworkMock).setBssid(eq(bssidStr));
+    }
+
+    /**
+     * Tests the sending identity response for the current network.
+     */
+    @Test
+    public void testSetCurrentNetworkEapIdentityResponse() throws Exception {
         String identity = "blah@blah.com";
         String encryptedIdentity = "blah2@blah.com";
-        when(mStaIfaceHalAidlMock.sendCurrentNetworkEapIdentityResponse(
-                anyString(), anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.sendCurrentNetworkEapIdentityResponse(
-                IFACE_NAME, identity, encryptedIdentity));
-        verify(mStaIfaceHalAidlMock).sendCurrentNetworkEapIdentityResponse(
-                eq(IFACE_NAME), eq(identity), eq(encryptedIdentity));
-    }
-
-    /**
-     * Test that we can call sendCurrentNetworkEapSimGsmAuthResponse
-     */
-    @Test
-    public void testSendCurrentNetworkEapSimGsmAuthResponse() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.sendCurrentNetworkEapSimGsmAuthResponse(anyString(), anyString()))
+        when(mSupplicantStaNetworkMock.sendNetworkEapIdentityResponse(eq(identity),
+                eq(encryptedIdentity)))
                 .thenReturn(true);
-        assertTrue(mDut.sendCurrentNetworkEapSimGsmAuthResponse(IFACE_NAME, PARAMS));
-        verify(mStaIfaceHalAidlMock).sendCurrentNetworkEapSimGsmAuthResponse(
-                eq(IFACE_NAME), eq(PARAMS));
+
+        executeAndValidateInitializationSequence();
+        // Fail when not connected to a network.
+        assertFalse(mDut.sendCurrentNetworkEapIdentityResponse(WLAN0_IFACE_NAME, identity,
+                encryptedIdentity));
+        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapIdentityResponse(eq(identity),
+                eq(encryptedIdentity));
+        executeAndValidateConnectSequence(4, false);
+        assertTrue(mDut.sendCurrentNetworkEapIdentityResponse(WLAN0_IFACE_NAME, identity,
+                encryptedIdentity));
+        verify(mSupplicantStaNetworkMock).sendNetworkEapIdentityResponse(eq(identity),
+                eq(encryptedIdentity));
     }
 
     /**
-     * Test that we can call sendCurrentNetworkEapSimGsmAuthFailure
+     * Tests the getting of anonymous identity for the current network.
      */
     @Test
-    public void testSendCurrentNetworkEapSimGsmAuthFailure() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.sendCurrentNetworkEapSimGsmAuthFailure(anyString()))
+    public void testGetCurrentNetworkEapAnonymousIdentity() throws Exception {
+        String anonymousIdentity = "aaa@bbb.ccc";
+        when(mSupplicantStaNetworkMock.fetchEapAnonymousIdentity())
+                .thenReturn(anonymousIdentity);
+        executeAndValidateInitializationSequence();
+
+        // Return null when not connected to the network.
+        assertEquals(null, mDut.getCurrentNetworkEapAnonymousIdentity(WLAN0_IFACE_NAME));
+        executeAndValidateConnectSequence(4, false);
+        // Return anonymous identity for the current network.
+        assertEquals(
+                anonymousIdentity, mDut.getCurrentNetworkEapAnonymousIdentity(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Tests the sending gsm auth response for the current network.
+     */
+    @Test
+    public void testSetCurrentNetworkEapSimGsmAuthResponse() throws Exception {
+        String params = "test";
+        when(mSupplicantStaNetworkMock.sendNetworkEapSimGsmAuthResponse(eq(params)))
                 .thenReturn(true);
-        assertTrue(mDut.sendCurrentNetworkEapSimGsmAuthFailure(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).sendCurrentNetworkEapSimGsmAuthFailure(eq(IFACE_NAME));
+
+        executeAndValidateInitializationSequence();
+        // Fail when not connected to a network.
+        assertFalse(mDut.sendCurrentNetworkEapSimGsmAuthResponse(WLAN0_IFACE_NAME, params));
+        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapSimGsmAuthResponse(eq(params));
+        executeAndValidateConnectSequence(4, false);
+        assertTrue(mDut.sendCurrentNetworkEapSimGsmAuthResponse(WLAN0_IFACE_NAME, params));
+        verify(mSupplicantStaNetworkMock).sendNetworkEapSimGsmAuthResponse(eq(params));
     }
 
     /**
-     * Test that we can call sendCurrentNetworkEapSimUmtsAuthResponse
+     * Tests the sending umts auth response for the current network.
      */
     @Test
-    public void testSendCurrentNetworkEapSimUmtsAuthResponse() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.sendCurrentNetworkEapSimUmtsAuthResponse(
-                anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.sendCurrentNetworkEapSimUmtsAuthResponse(IFACE_NAME, PARAMS));
-        verify(mStaIfaceHalAidlMock).sendCurrentNetworkEapSimUmtsAuthResponse(
-                eq(IFACE_NAME), eq(PARAMS));
-    }
-
-    /**
-     * Test that we can call sendCurrentNetworkEapSimUmtsAutsResponse
-     */
-    @Test
-    public void testSendCurrentNetworkEapSimUmtsAutsResponse() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.sendCurrentNetworkEapSimUmtsAutsResponse(
-                anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.sendCurrentNetworkEapSimUmtsAutsResponse(IFACE_NAME, PARAMS));
-        verify(mStaIfaceHalAidlMock).sendCurrentNetworkEapSimUmtsAutsResponse(
-                eq(IFACE_NAME), eq(PARAMS));
-    }
-
-    /**
-     * Test that we can call sendCurrentNetworkEapSimUmtsAuthFailure
-     */
-    @Test
-    public void testSendCurrentNetworkEapSimUmtsAuthFailure() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.sendCurrentNetworkEapSimUmtsAuthFailure(anyString()))
+    public void testSetCurrentNetworkEapSimUmtsAuthResponse() throws Exception {
+        String params = "test";
+        when(mSupplicantStaNetworkMock.sendNetworkEapSimUmtsAuthResponse(eq(params)))
                 .thenReturn(true);
-        assertTrue(mDut.sendCurrentNetworkEapSimUmtsAuthFailure(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).sendCurrentNetworkEapSimUmtsAuthFailure(eq(IFACE_NAME));
+
+        executeAndValidateInitializationSequence();
+        // Fail when not connected to a network.
+        assertFalse(mDut.sendCurrentNetworkEapSimUmtsAuthResponse(WLAN0_IFACE_NAME, params));
+        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapSimUmtsAuthResponse(eq(params));
+        executeAndValidateConnectSequence(4, false);
+        assertTrue(mDut.sendCurrentNetworkEapSimUmtsAuthResponse(WLAN0_IFACE_NAME, params));
+        verify(mSupplicantStaNetworkMock).sendNetworkEapSimUmtsAuthResponse(eq(params));
     }
 
     /**
-     * Test that we can call setWpsDeviceName
+     * Tests the sending umts auts response for the current network.
      */
     @Test
-    public void testSetWpsDeviceName() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setWpsDeviceName(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.setWpsDeviceName(IFACE_NAME, PARAMS));
-        verify(mStaIfaceHalAidlMock).setWpsDeviceName(eq(IFACE_NAME), eq(PARAMS));
-    }
-
-    /**
-     * Test that we can call setWpsDeviceType
-     */
-    @Test
-    public void testSetWpsDeviceType() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setWpsDeviceType(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.setWpsDeviceType(IFACE_NAME, PARAMS));
-        verify(mStaIfaceHalAidlMock).setWpsDeviceType(eq(IFACE_NAME), eq(PARAMS));
-    }
-
-    /**
-     * Test that we can call setWpsManufacturer
-     */
-    @Test
-    public void testSetWpsManufacturer() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setWpsManufacturer(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.setWpsManufacturer(IFACE_NAME, PARAMS));
-        verify(mStaIfaceHalAidlMock).setWpsManufacturer(eq(IFACE_NAME), eq(PARAMS));
-    }
-
-    /**
-     * Test that we can call setWpsModelName
-     */
-    @Test
-    public void testSetWpsModelName() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setWpsModelName(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.setWpsModelName(IFACE_NAME, PARAMS));
-        verify(mStaIfaceHalAidlMock).setWpsModelName(eq(IFACE_NAME), eq(PARAMS));
-    }
-
-    /**
-     * Test that we can call setWpsModelNumber
-     */
-    @Test
-    public void testSetWpsModelNumber() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setWpsModelNumber(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.setWpsModelNumber(IFACE_NAME, PARAMS));
-        verify(mStaIfaceHalAidlMock).setWpsModelNumber(eq(IFACE_NAME), eq(PARAMS));
-    }
-
-    /**
-     * Test that we can call setWpsSerialNumber
-     */
-    @Test
-    public void testSetWpsSerialNumber() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setWpsSerialNumber(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.setWpsSerialNumber(IFACE_NAME, PARAMS));
-        verify(mStaIfaceHalAidlMock).setWpsSerialNumber(eq(IFACE_NAME), eq(PARAMS));
-    }
-
-    /**
-     * Test that we can call setWpsConfigMethods
-     */
-    @Test
-    public void testSetWpsConfigMethods() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setWpsConfigMethods(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.setWpsConfigMethods(IFACE_NAME, PARAMS));
-        verify(mStaIfaceHalAidlMock).setWpsConfigMethods(eq(IFACE_NAME), eq(PARAMS));
-    }
-
-    /**
-     * Test that we can call reassociate
-     */
-    @Test
-    public void testReassociate() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.reassociate(anyString())).thenReturn(true);
-        assertTrue(mDut.reassociate(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).reassociate(eq(IFACE_NAME));
-    }
-
-    /**
-     * Test that we can call reconnect
-     */
-    @Test
-    public void testReconnect() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.reconnect(anyString())).thenReturn(true);
-        assertTrue(mDut.reconnect(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).reconnect(eq(IFACE_NAME));
-    }
-
-    /**
-     * Test that we can call disconnect
-     */
-    @Test
-    public void testDisconnect() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.disconnect(anyString())).thenReturn(true);
-        assertTrue(mDut.disconnect(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).disconnect(eq(IFACE_NAME));
-    }
-
-    /**
-     * Test that we can call setPowerSave
-     */
-    @Test
-    public void testSetPowerSave() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setPowerSave(anyString(), anyBoolean())).thenReturn(true);
-        assertTrue(mDut.setPowerSave(IFACE_NAME, ENABLE));
-        verify(mStaIfaceHalAidlMock).setPowerSave(eq(IFACE_NAME), eq(ENABLE));
-    }
-
-    /**
-     * Test that we can call initiateTdlsDiscover
-     */
-    @Test
-    public void testInitiateTdlsDiscover() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.initiateTdlsDiscover(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.initiateTdlsDiscover(IFACE_NAME, BSSID));
-        verify(mStaIfaceHalAidlMock).initiateTdlsDiscover(eq(IFACE_NAME), eq(BSSID));
-    }
-
-    /**
-     * Test that we can call initiateTdlsSetup
-     */
-    @Test
-    public void testInitiateTdlsSetup() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.initiateTdlsSetup(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.initiateTdlsSetup(IFACE_NAME, BSSID));
-        verify(mStaIfaceHalAidlMock).initiateTdlsSetup(eq(IFACE_NAME), eq(BSSID));
-    }
-
-    /**
-     * Test that we can call initiateTdlsTeardown
-     */
-    @Test
-    public void testInitiateTdlsTeardown() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.initiateTdlsTeardown(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.initiateTdlsTeardown(IFACE_NAME, BSSID));
-        verify(mStaIfaceHalAidlMock).initiateTdlsTeardown(eq(IFACE_NAME), eq(BSSID));
-    }
-
-    /**
-     * Test that we can call initiateAnqpQuery
-     */
-    @Test
-    public void testInitiateAnqpQuery() {
-        initializeWithAidlImpl(true);
-        ArrayList<Short> infoElements = new ArrayList<>();
-        ArrayList<Integer> hs20SubTypes = new ArrayList<>();
-        when(mStaIfaceHalAidlMock.initiateAnqpQuery(anyString(), anyString(),
-                any(ArrayList.class), any(ArrayList.class))).thenReturn(true);
-        assertTrue(mDut.initiateAnqpQuery(IFACE_NAME, BSSID, infoElements, hs20SubTypes));
-        verify(mStaIfaceHalAidlMock).initiateAnqpQuery(
-                eq(IFACE_NAME), eq(BSSID), eq(infoElements), eq(hs20SubTypes));
-    }
-
-    /**
-     * Test that we can call initiateVenueUrlAnqpQuery
-     */
-    @Test
-    public void testInitiateVenueUrlAnqpQuery() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.initiateVenueUrlAnqpQuery(anyString(), anyString()))
+    public void testSetCurrentNetworkEapSimUmtsAutsResponse() throws Exception {
+        String params = "test";
+        when(mSupplicantStaNetworkMock.sendNetworkEapSimUmtsAutsResponse(eq(params)))
                 .thenReturn(true);
-        assertTrue(mDut.initiateVenueUrlAnqpQuery(IFACE_NAME, BSSID));
-        verify(mStaIfaceHalAidlMock).initiateVenueUrlAnqpQuery(eq(IFACE_NAME), eq(BSSID));
+
+        executeAndValidateInitializationSequence();
+        // Fail when not connected to a network.
+        assertFalse(mDut.sendCurrentNetworkEapSimUmtsAutsResponse(WLAN0_IFACE_NAME, params));
+        verify(mSupplicantStaNetworkMock, never()).sendNetworkEapSimUmtsAutsResponse(eq(params));
+        executeAndValidateConnectSequence(4, false);
+        assertTrue(mDut.sendCurrentNetworkEapSimUmtsAutsResponse(WLAN0_IFACE_NAME, params));
+        verify(mSupplicantStaNetworkMock).sendNetworkEapSimUmtsAutsResponse(eq(params));
     }
 
     /**
-     * Test that we can call initiateHs20IconQuery
+     * Tests the setting of WPS device type.
      */
     @Test
-    public void testInitiateHs20IconQuery() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.initiateHs20IconQuery(anyString(), anyString(), anyString()))
+    public void testSetWpsDeviceType() throws Exception {
+        String validDeviceTypeStr = "10-0050F204-5";
+        byte[] expectedDeviceType = { 0x0, 0xa, 0x0, 0x50, (byte) 0xf2, 0x04, 0x0, 0x05};
+        String invalidDeviceType1Str = "10-02050F204-5";
+        String invalidDeviceType2Str = "10-0050F204-534";
+        when(mISupplicantStaIfaceMock.setWpsDeviceType(any(byte[].class)))
+                .thenReturn(mStatusSuccess);
+
+        executeAndValidateInitializationSequence();
+
+        // This should work.
+        assertTrue(mDut.setWpsDeviceType(WLAN0_IFACE_NAME, validDeviceTypeStr));
+        verify(mISupplicantStaIfaceMock).setWpsDeviceType(eq(expectedDeviceType));
+
+        // This should not work
+        assertFalse(mDut.setWpsDeviceType(WLAN0_IFACE_NAME, invalidDeviceType1Str));
+        // This should not work
+        assertFalse(mDut.setWpsDeviceType(WLAN0_IFACE_NAME, invalidDeviceType2Str));
+    }
+
+    /**
+     * Tests the setting of WPS config methods.
+     */
+    @Test
+    public void testSetWpsConfigMethods() throws Exception {
+        String validConfigMethodsStr = "physical_display virtual_push_button";
+        Short expectedConfigMethods =
+                WpsConfigMethods.PHY_DISPLAY | WpsConfigMethods.VIRT_PUSHBUTTON;
+        String invalidConfigMethodsStr = "physical_display virtual_push_button test";
+        when(mISupplicantStaIfaceMock.setWpsConfigMethods(anyShort())).thenReturn(mStatusSuccess);
+
+        executeAndValidateInitializationSequence();
+
+        // This should work.
+        assertTrue(mDut.setWpsConfigMethods(WLAN0_IFACE_NAME, validConfigMethodsStr));
+        verify(mISupplicantStaIfaceMock).setWpsConfigMethods(eq(expectedConfigMethods));
+
+        // This should throw an illegal argument exception.
+        try {
+            assertFalse(mDut.setWpsConfigMethods(WLAN0_IFACE_NAME, invalidConfigMethodsStr));
+        } catch (IllegalArgumentException e) {
+            return;
+        }
+        assertTrue(false);
+    }
+
+    /**
+     * Tests the handling of ANQP done callback.
+     * Note: Since the ANQP element parsing methods are static, this can only test the negative test
+     * where all the parsing fails because the data is empty. It'll be non-trivial and unnecessary
+     * to test out the parsing logic here.
+     */
+    @Test
+    public void testAnqpDoneCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
+        mISupplicantStaIfaceCallback.onAnqpQueryDone(
+                bssid, new ISupplicantStaIfaceCallback.AnqpData(),
+                new ISupplicantStaIfaceCallback.Hs20AnqpData());
+
+        ArgumentCaptor<AnqpEvent> anqpEventCaptor = ArgumentCaptor.forClass(AnqpEvent.class);
+        verify(mWifiMonitor).broadcastAnqpDoneEvent(
+                eq(WLAN0_IFACE_NAME), anqpEventCaptor.capture());
+        assertEquals(
+                ByteBufferReader.readInteger(
+                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
+                anqpEventCaptor.getValue().getBssid());
+    }
+
+    /**
+     * Tests the handling of ANQP done callback.
+     * Note: Since the ANQP element parsing methods are static, this can only test the negative test
+     * where all the parsing fails because the data is empty. It'll be non-trivial and unnecessary
+     * to test out the parsing logic here.
+     */
+    @Test
+    public void testAnqpDoneCallback_1_4() throws Exception {
+        setupMocksForHalV1_4();
+        executeAndValidateInitializationSequenceV1_4();
+        assertNotNull(mISupplicantStaIfaceCallbackV14);
+        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
+        mISupplicantStaIfaceCallbackV14.onAnqpQueryDone_1_4(
+                bssid,
+                new android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback.AnqpData(),
+                new ISupplicantStaIfaceCallback.Hs20AnqpData());
+
+        ArgumentCaptor<AnqpEvent> anqpEventCaptor = ArgumentCaptor.forClass(AnqpEvent.class);
+        verify(mWifiMonitor).broadcastAnqpDoneEvent(
+                eq(WLAN0_IFACE_NAME), anqpEventCaptor.capture());
+        assertEquals(
+                ByteBufferReader.readInteger(
+                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
+                anqpEventCaptor.getValue().getBssid());
+    }
+
+    /**
+     * Tests the handling of Icon done callback.
+     */
+    @Test
+    public void testIconDoneCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
+        byte[] iconData = new byte[ICON_FILE_SIZE];
+        new Random().nextBytes(iconData);
+        mISupplicantStaIfaceCallback.onHs20IconQueryDone(
+                bssid, ICON_FILE_NAME, NativeUtil.byteArrayToArrayList(iconData));
+
+        ArgumentCaptor<IconEvent> iconEventCaptor = ArgumentCaptor.forClass(IconEvent.class);
+        verify(mWifiMonitor).broadcastIconDoneEvent(
+                eq(WLAN0_IFACE_NAME), iconEventCaptor.capture());
+        assertEquals(
+                ByteBufferReader.readInteger(
+                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
+                iconEventCaptor.getValue().getBSSID());
+        assertEquals(ICON_FILE_NAME, iconEventCaptor.getValue().getFileName());
+        assertArrayEquals(iconData, iconEventCaptor.getValue().getData());
+    }
+
+    /**
+     * Tests the handling of HS20 subscription remediation callback.
+     */
+    @Test
+    public void testHs20SubscriptionRemediationCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
+        byte osuMethod = ISupplicantStaIfaceCallback.OsuMethod.OMA_DM;
+        mISupplicantStaIfaceCallback.onHs20SubscriptionRemediation(
+                bssid, osuMethod, HS20_URL);
+
+        ArgumentCaptor<WnmData> wnmDataCaptor = ArgumentCaptor.forClass(WnmData.class);
+        verify(mWifiMonitor).broadcastWnmEvent(eq(WLAN0_IFACE_NAME), wnmDataCaptor.capture());
+        assertEquals(
+                ByteBufferReader.readInteger(
+                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
+                wnmDataCaptor.getValue().getBssid());
+        assertEquals(osuMethod, wnmDataCaptor.getValue().getMethod());
+        assertEquals(HS20_URL, wnmDataCaptor.getValue().getUrl());
+    }
+
+    /**
+     * Tests the handling of HS20 deauth imminent callback.
+     */
+    @Test
+    public void testHs20DeauthImminentCallbackWithEssReasonCode() throws Exception {
+        executeAndValidateHs20DeauthImminentCallback(true);
+    }
+
+    /**
+     * Tests the handling of HS20 deauth imminent callback.
+     */
+    @Test
+    public void testHs20DeauthImminentCallbackWithNonEssReasonCode() throws Exception {
+        executeAndValidateHs20DeauthImminentCallback(false);
+    }
+
+    /**
+     * Tests the handling of HS20 Terms & Conditions acceptance callback.
+     */
+    @Test
+    public void testHs20TermsAndConditionsAcceptance() throws Exception {
+        executeAndValidateHs20TermsAndConditionsCallback();
+    }
+
+    /**
+     * Tests the handling of state change notification without any configured network.
+     */
+    @Test
+    public void testStateChangeCallbackWithNoConfiguredNetwork() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.INACTIVE,
+                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+
+        // Can't compare WifiSsid instances because they lack an equals.
+        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
+                eq(WLAN0_IFACE_NAME), eq(WifiConfiguration.INVALID_NETWORK_ID),
+                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.INACTIVE));
+    }
+
+    /**
+     * Tests the handling of state change notification to associated after configuring a network.
+     */
+    @Test
+    public void testStateChangeToAssociatedCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        int frameworkNetworkId = 6;
+        executeAndValidateConnectSequence(frameworkNetworkId, false);
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.ASSOCIATED,
+                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+
+        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
+                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
+                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.ASSOCIATED));
+    }
+
+    /**
+     * Tests the handling of state change notification to completed after configuring a network.
+     */
+    @Test
+    public void testStateChangeToCompletedCallback() throws Exception {
+        InOrder wifiMonitorInOrder = inOrder(mWifiMonitor);
+        executeAndValidateInitializationSequence();
+        int frameworkNetworkId = 6;
+        executeAndValidateConnectSequence(frameworkNetworkId, false);
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.COMPLETED,
+                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
+                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)));
+
+        wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
+                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(false), eq(wifiSsid), eq(BSSID));
+        wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
+                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
+                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
+    }
+
+    /**
+     * Tests the handling of network disconnected notification.
+     */
+    @Test
+    public void testDisconnectedCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        // Set the SSID for the current connection.
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.ASSOCIATING,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        int reasonCode = 5;
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
+        verify(mWifiMonitor).broadcastNetworkDisconnectionEvent(
+                eq(WLAN0_IFACE_NAME), eq(true), eq(reasonCode), eq(SUPPLICANT_SSID), eq(BSSID));
+
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
+        verify(mWifiMonitor).broadcastNetworkDisconnectionEvent(
+                eq(WLAN0_IFACE_NAME), eq(false), eq(reasonCode), eq(SUPPLICANT_SSID), eq(BSSID));
+    }
+
+    /**
+     * Tests the handling of incorrect network passwords.
+     */
+    @Test
+    public void testAuthFailurePasswordOnDisconnect() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+        executeAndValidateConnectSequenceWithKeyMgmt(
+                0, false, WifiConfiguration.SECURITY_TYPE_PSK, null);
+
+        int reasonCode = 3;
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
+        verify(mWifiMonitor, times(0))
+                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt());
+
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
+        verify(mWifiMonitor, times(0))
+                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt());
+
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
+
+        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
+                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD), eq(-1));
+    }
+
+    /**
+     * Tests the handling of EAP failure disconnects.
+     */
+    @Test
+    public void testAuthFailureEapOnDisconnect() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+        executeAndValidateConnectSequenceWithKeyMgmt(
+                0, false, WifiConfiguration.SECURITY_TYPE_EAP, null);
+
+        int reasonCode = 3;
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
+        verify(mWifiMonitor, times(0))
+                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt());
+
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
+        verify(mWifiMonitor, times(0))
+                .broadcastAuthenticationFailureEvent(any(), anyInt(), anyInt());
+
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.ASSOCIATED,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        // Ensure we don't lose our prev state with this state changed event.
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.DISCONNECTED,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
+
+        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
+                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE), eq(-1));
+    }
+
+    /**
+     * Tests the handling of EAP failure disconnects.
+     */
+    @Test
+    public void testOnlyOneAuthFailureEap() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+        executeAndValidateConnectSequenceWithKeyMgmt(
+                0, false, WifiConfiguration.SECURITY_TYPE_EAP, null);
+
+        int reasonCode = 3;
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.ASSOCIATED,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        mISupplicantStaIfaceCallback.onEapFailure();
+        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
+                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE), eq(-1));
+
+        // Ensure that the disconnect is ignored.
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
+        verify(mWifiMonitor, times(1)).broadcastAuthenticationFailureEvent(
+                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE), eq(-1));
+    }
+
+    /**
+     * Tests the handling of incorrect network passwords for WPA3-Personal networks
+     */
+    @Test
+    public void testWpa3AuthRejectionPassword() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        executeAndValidateConnectSequenceWithKeyMgmt(SUPPLICANT_NETWORK_ID, false,
+                WifiConfiguration.SECURITY_TYPE_SAE, null);
+
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.ASSOCIATING,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        int statusCode = ISupplicantStaIfaceCallback.StatusCode.UNSPECIFIED_FAILURE;
+        mISupplicantStaIfaceCallback.onAssociationRejected(
+                NativeUtil.macAddressToByteArray(BSSID), statusCode, false);
+        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
+                eq(WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD), eq(-1));
+        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
+                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
+        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
+                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
+        AssocRejectEventInfo assocRejectEventInfo =
+                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
+        assertNotNull(assocRejectEventInfo);
+        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
+        assertEquals(BSSID, assocRejectEventInfo.bssid);
+        assertEquals(statusCode, assocRejectEventInfo.statusCode);
+        assertFalse(assocRejectEventInfo.timedOut);
+        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
+        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
+    }
+
+    /**
+     * Tests the handling of association rejection for WPA3-Personal networks
+     */
+    @Test
+    public void testWpa3AuthRejectionEverConnected() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        WifiConfiguration config = executeAndValidateConnectSequenceWithKeyMgmt(
+                SUPPLICANT_NETWORK_ID, false,
+                WifiConfiguration.SECURITY_TYPE_SAE, null, true);
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.ASSOCIATING,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        int statusCode = ISupplicantStaIfaceCallback.StatusCode.UNSPECIFIED_FAILURE;
+        mISupplicantStaIfaceCallback.onAssociationRejected(
+                NativeUtil.macAddressToByteArray(BSSID), statusCode, false);
+        verify(mWifiMonitor, never()).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
+                anyInt(), anyInt());
+        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
+                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
+        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
+                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
+        AssocRejectEventInfo assocRejectEventInfo =
+                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
+        assertNotNull(assocRejectEventInfo);
+        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
+        assertEquals(BSSID, assocRejectEventInfo.bssid);
+        assertEquals(statusCode, assocRejectEventInfo.statusCode);
+        assertFalse(assocRejectEventInfo.timedOut);
+        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
+        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
+    }
+
+    /**
+     * Tests the handling of incorrect network passwords for WEP networks.
+     */
+    @Test
+    public void testWepAuthRejectionPassword() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        executeAndValidateConnectSequenceWithKeyMgmt(SUPPLICANT_NETWORK_ID, false,
+                WifiConfiguration.SECURITY_TYPE_WEP, "97CA326539");
+
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.ASSOCIATING,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        int statusCode = ISupplicantStaIfaceCallback.StatusCode.CHALLENGE_FAIL;
+        mISupplicantStaIfaceCallback.onAssociationRejected(
+                NativeUtil.macAddressToByteArray(BSSID), statusCode, false);
+        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
+                eq(WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD), eq(-1));
+        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
+                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
+        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
+                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
+        AssocRejectEventInfo assocRejectEventInfo =
+                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
+        assertNotNull(assocRejectEventInfo);
+        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
+        assertEquals(BSSID, assocRejectEventInfo.bssid);
+        assertEquals(statusCode, assocRejectEventInfo.statusCode);
+        assertFalse(assocRejectEventInfo.timedOut);
+        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
+        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
+    }
+
+    /**
+     * Tests the handling of incorrect network passwords, edge case.
+     *
+     * If the network is removed during 4-way handshake, do not call it a password mismatch.
+     */
+    @Test
+    public void testNetworkRemovedDuring4way() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        int reasonCode = 3;
+
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        mISupplicantStaIfaceCallback.onNetworkRemoved(SUPPLICANT_NETWORK_ID);
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
+        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
+                anyInt());
+    }
+
+     /**
+      * Tests the handling of incorrect network passwords, edge case.
+      *
+      * If the disconnect reason is "IE in 4way differs", do not call it a password mismatch.
+      */
+    @Test
+    public void testIeDiffers() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        int reasonCode = ISupplicantStaIfaceCallback.ReasonCode.IE_IN_4WAY_DIFFERS;
+
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
+        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
+                anyInt());
+    }
+
+    /**
+     * Tests the handling of eap failure during disconnect.
+     */
+    @Test
+    public void testEapFailure() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        int reasonCode = ISupplicantStaIfaceCallback.ReasonCode.IEEE_802_1X_AUTH_FAILED;
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), false, reasonCode);
+        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
+                anyInt());
+    }
+
+    /**
+     * Tests the handling of association rejection notification.
+     */
+    @Test
+    public void testAssociationRejectionCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        mISupplicantStaIfaceCallback.onStateChanged(
+                ISupplicantStaIfaceCallback.State.ASSOCIATING,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        int statusCode = 7;
+        mISupplicantStaIfaceCallback.onAssociationRejected(
+                NativeUtil.macAddressToByteArray(BSSID), statusCode, false);
+        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
+                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
+        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
+                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
+        AssocRejectEventInfo assocRejectEventInfo =
+                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
+        assertNotNull(assocRejectEventInfo);
+        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
+        assertEquals(BSSID, assocRejectEventInfo.bssid);
+        assertEquals(statusCode, assocRejectEventInfo.statusCode);
+        assertFalse(assocRejectEventInfo.timedOut);
+        assertNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
+        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
+    }
+
+    /**
+     * Tests the handling of authentification timeout notification.
+     */
+    @Test
+    public void testAuthenticationTimeoutCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        mISupplicantStaIfaceCallback.onAuthenticationTimeout(
+                NativeUtil.macAddressToByteArray(BSSID));
+        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(eq(WLAN0_IFACE_NAME),
+                eq(WifiManager.ERROR_AUTH_FAILURE_TIMEOUT), eq(-1));
+    }
+
+    /**
+     * Tests the handling of bssid change notification.
+     */
+    @Test
+    public void testBssidChangedCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        mISupplicantStaIfaceCallback.onBssidChanged(
+                BssidChangeReason.ASSOC_START, NativeUtil.macAddressToByteArray(BSSID));
+        verify(mWifiMonitor).broadcastTargetBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
+        verify(mWifiMonitor, never()).broadcastAssociatedBssidEvent(
+                eq(WLAN0_IFACE_NAME), eq(BSSID));
+
+        reset(mWifiMonitor);
+        mISupplicantStaIfaceCallback.onBssidChanged(
+                BssidChangeReason.ASSOC_COMPLETE, NativeUtil.macAddressToByteArray(BSSID));
+        verify(mWifiMonitor, never()).broadcastTargetBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
+        verify(mWifiMonitor).broadcastAssociatedBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
+
+        reset(mWifiMonitor);
+        mISupplicantStaIfaceCallback.onBssidChanged(
+                BssidChangeReason.DISASSOC, NativeUtil.macAddressToByteArray(BSSID));
+        verify(mWifiMonitor, never()).broadcastTargetBssidEvent(eq(WLAN0_IFACE_NAME), eq(BSSID));
+        verify(mWifiMonitor, never()).broadcastAssociatedBssidEvent(
+                eq(WLAN0_IFACE_NAME), eq(BSSID));
+    }
+
+    /**
+     * Tests the handling of EAP failure notification.
+     */
+    @Test
+    public void testEapFailureCallback() throws Exception {
+        int eapFailureCode = WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED;
+        testInitialize_successV1_1();
+        assertNotNull(mISupplicantStaIfaceCallbackV1_1);
+
+        mISupplicantStaIfaceCallbackV1_1.onEapFailure_1_1(eapFailureCode);
+        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
+                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE),
+                eq(eapFailureCode));
+    }
+
+    /**
+     * Tests the handling of EAP failure notification.
+     */
+    @Test
+    public void testEapFailureCallback1_3() throws Exception {
+        int eapFailureCode = WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED;
+        testInitialize_successV1_3();
+        assertNotNull(mISupplicantStaIfaceCallbackV13);
+
+        mISupplicantStaIfaceCallbackV13.onEapFailure_1_3(eapFailureCode);
+        verify(mWifiMonitor).broadcastAuthenticationFailureEvent(
+                eq(WLAN0_IFACE_NAME), eq(WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE),
+                eq(eapFailureCode));
+    }
+
+    /**
+     * Tests the handling of Wps success notification.
+     */
+    @Test
+    public void testWpsSuccessCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        mISupplicantStaIfaceCallback.onWpsEventSuccess();
+        verify(mWifiMonitor).broadcastWpsSuccessEvent(eq(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Tests the handling of Wps fail notification.
+     */
+    @Test
+    public void testWpsFailureCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        short cfgError = ISupplicantStaIfaceCallback.WpsConfigError.MULTIPLE_PBC_DETECTED;
+        short errorInd = ISupplicantStaIfaceCallback.WpsErrorIndication.SECURITY_WEP_PROHIBITED;
+        mISupplicantStaIfaceCallback.onWpsEventFail(
+                NativeUtil.macAddressToByteArray(BSSID), cfgError, errorInd);
+        verify(mWifiMonitor).broadcastWpsFailEvent(eq(WLAN0_IFACE_NAME),
+                eq((int) cfgError), eq((int) errorInd));
+    }
+
+    /**
+     * Tests the handling of Wps fail notification.
+     */
+    @Test
+    public void testWpsTimeoutCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        short cfgError = ISupplicantStaIfaceCallback.WpsConfigError.MSG_TIMEOUT;
+        short errorInd = ISupplicantStaIfaceCallback.WpsErrorIndication.NO_ERROR;
+        mISupplicantStaIfaceCallback.onWpsEventFail(
+                NativeUtil.macAddressToByteArray(BSSID), cfgError, errorInd);
+        verify(mWifiMonitor).broadcastWpsTimeoutEvent(eq(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Tests the handling of Wps pbc overlap notification.
+     */
+    @Test
+    public void testWpsPbcOverlapCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        mISupplicantStaIfaceCallback.onWpsEventPbcOverlap();
+        verify(mWifiMonitor).broadcastWpsOverlapEvent(eq(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Tests the handling of service manager death notification.
+     */
+    @Test
+    public void testServiceManagerDeathCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mServiceManagerDeathCaptor.getValue());
+        assertTrue(mDut.isInitializationComplete());
+        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
+
+        mServiceManagerDeathCaptor.getValue().serviceDied(5L);
+        mLooper.dispatchAll();
+
+        assertFalse(mDut.isInitializationComplete());
+        verify(mSupplicantHalDeathHandler).onDeath();
+    }
+
+    /**
+     * Tests the handling of supplicant death notification.
+     */
+    @Test
+    public void testSupplicantDeathCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mSupplicantDeathCaptor.getValue());
+        assertTrue(mDut.isInitializationComplete());
+        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
+
+        mSupplicantDeathCaptor.getValue().serviceDied(mDeathRecipientCookieCaptor.getValue());
+        mLooper.dispatchAll();
+
+        assertFalse(mDut.isInitializationComplete());
+        verify(mSupplicantHalDeathHandler).onDeath();
+    }
+
+    /**
+     * Tests the handling of supplicant death notification.
+     */
+    @Test
+    public void testSupplicantStaleDeathCallback() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mSupplicantDeathCaptor.getValue());
+        assertTrue(mDut.isInitializationComplete());
+        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
+
+        mSupplicantDeathCaptor.getValue().serviceDied(mDeathRecipientCookieCaptor.getValue() - 1);
+        mLooper.dispatchAll();
+
+        assertTrue(mDut.isInitializationComplete());
+        verify(mSupplicantHalDeathHandler, never()).onDeath();
+    }
+
+    /**
+     * When wpa_supplicant is dead, we could end up getting a remote exception on a hwbinder call
+     * and then the death notification.
+     */
+    @Test
+    public void testHandleRemoteExceptionAndDeathNotification() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertTrue(mDut.registerDeathHandler(mSupplicantHalDeathHandler));
+        assertTrue(mDut.isInitializationComplete());
+
+        // Throw remote exception on hwbinder call.
+        when(mISupplicantStaIfaceMock.setPowerSave(anyBoolean()))
+                .thenThrow(new RemoteException());
+        assertFalse(mDut.setPowerSave(WLAN0_IFACE_NAME, true));
+        verify(mISupplicantStaIfaceMock).setPowerSave(true);
+
+        // Check that remote exception cleared all internal state.
+        assertFalse(mDut.isInitializationComplete());
+
+        // Ensure that further calls fail because the remote exception clears any state.
+        assertFalse(mDut.setPowerSave(WLAN0_IFACE_NAME, true));
+        //.. No call to ISupplicantStaIface object
+
+        // Now trigger a death notification and ensure it's handled.
+        assertNotNull(mSupplicantDeathCaptor.getValue());
+        mSupplicantDeathCaptor.getValue().serviceDied(mDeathRecipientCookieCaptor.getValue());
+        mLooper.dispatchAll();
+
+        // External death notification fires only once!
+        verify(mSupplicantHalDeathHandler).onDeath();
+    }
+
+    /**
+     * Tests the setting of log level.
+     */
+    @Test
+    public void testSetLogLevel() throws Exception {
+        when(mISupplicantMock.setDebugParams(anyInt(), anyBoolean(), anyBoolean()))
+                .thenReturn(mStatusSuccess);
+
+        // Fail before initialization is performed.
+        assertFalse(mDut.setLogLevel(true));
+
+        executeAndValidateInitializationSequence();
+
+        // This should work.
+        assertTrue(mDut.setLogLevel(true));
+        verify(mISupplicantMock)
+                .setDebugParams(eq(ISupplicant.DebugLevel.DEBUG), eq(false), eq(false));
+    }
+
+    /**
+     * Tests the setting of log level with show key enabled.
+     */
+    @Test
+    public void testSetLogLevelWithShowKeyEnabled() throws Exception {
+        when(mWifiGlobals.getShowKeyVerboseLoggingModeEnabled())
                 .thenReturn(true);
-        assertTrue(mDut.initiateHs20IconQuery(IFACE_NAME, BSSID, PARAMS));
-        verify(mStaIfaceHalAidlMock).initiateHs20IconQuery(eq(IFACE_NAME), eq(BSSID), eq(PARAMS));
+        when(mISupplicantMock.setDebugParams(anyInt(), anyBoolean(), anyBoolean()))
+                .thenReturn(mStatusSuccess);
+
+        executeAndValidateInitializationSequence();
+
+        // This should work.
+        assertTrue(mDut.setLogLevel(true));
+        verify(mISupplicantMock)
+                .setDebugParams(eq(ISupplicant.DebugLevel.DEBUG), eq(false), eq(true));
     }
 
     /**
-     * Test that we can call getMacAddress
+     * Tests that show key is not enabled when verbose logging is not enabled.
      */
     @Test
-    public void testGetMacAddress() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.getMacAddress(anyString())).thenReturn(BSSID);
-        assertEquals(BSSID, mDut.getMacAddress(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).getMacAddress(eq(IFACE_NAME));
-    }
-
-    /**
-     * Test that we can call startRxFilter
-     */
-    @Test
-    public void testStartRxFilter() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.startRxFilter(anyString())).thenReturn(true);
-        assertTrue(mDut.startRxFilter(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).startRxFilter(eq(IFACE_NAME));
-    }
-
-    /**
-     * Test that we can call stopRxFilter
-     */
-    @Test
-    public void testStopRxFilter() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.stopRxFilter(anyString())).thenReturn(true);
-        assertTrue(mDut.stopRxFilter(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).stopRxFilter(eq(IFACE_NAME));
-    }
-
-    /**
-     * Test that we can call addRxFilter
-     */
-    @Test
-    public void testAddRxFilter() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.addRxFilter(anyString(), anyInt())).thenReturn(true);
-        assertTrue(mDut.addRxFilter(IFACE_NAME, MODE));
-        verify(mStaIfaceHalAidlMock).addRxFilter(eq(IFACE_NAME), eq(MODE));
-    }
-
-    /**
-     * Test that we can call removeRxFilter
-     */
-    @Test
-    public void testRemoveRxFilter() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.removeRxFilter(anyString(), anyInt())).thenReturn(true);
-        assertTrue(mDut.removeRxFilter(IFACE_NAME, MODE));
-        verify(mStaIfaceHalAidlMock).removeRxFilter(eq(IFACE_NAME), eq(MODE));
-    }
-
-    /**
-     * Test that we can call setBtCoexistenceMode
-     */
-    @Test
-    public void testSetBtCoexistenceMode() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setBtCoexistenceMode(anyString(), anyInt())).thenReturn(true);
-        assertTrue(mDut.setBtCoexistenceMode(IFACE_NAME, MODE));
-        verify(mStaIfaceHalAidlMock).setBtCoexistenceMode(eq(IFACE_NAME), eq(MODE));
-    }
-
-    /**
-     * Test that we can call setBtCoexistenceScanModeEnabled
-     */
-    @Test
-    public void testSetBtCoexistenceScanModeEnabled() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setBtCoexistenceScanModeEnabled(anyString(), anyBoolean()))
+    public void testVerboseLoggingDisabledWithShowKeyEnabled() throws Exception {
+        when(mWifiGlobals.getShowKeyVerboseLoggingModeEnabled())
                 .thenReturn(true);
-        assertTrue(mDut.setBtCoexistenceScanModeEnabled(IFACE_NAME, ENABLE));
-        verify(mStaIfaceHalAidlMock).setBtCoexistenceScanModeEnabled(eq(IFACE_NAME), eq(ENABLE));
+        when(mISupplicantMock.setDebugParams(anyInt(), anyBoolean(), anyBoolean()))
+                .thenReturn(mStatusSuccess);
+
+        executeAndValidateInitializationSequence();
+
+        // If verbose logging is not enabled, show key should not be enabled.
+        assertTrue(mDut.setLogLevel(false));
+        verify(mISupplicantMock)
+                .setDebugParams(eq(ISupplicant.DebugLevel.INFO), eq(false), eq(false));
     }
 
     /**
-     * Test that we can call setSuspendModeEnabled
+     * Tests the setting of concurrency priority.
      */
     @Test
-    public void testSetSuspendModeEnabled() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setSuspendModeEnabled(anyString(), anyBoolean()))
+    public void testConcurrencyPriority() throws Exception {
+        when(mISupplicantMock.setConcurrencyPriority(anyInt())).thenReturn(mStatusSuccess);
+
+        // Fail before initialization is performed.
+        assertFalse(mDut.setConcurrencyPriority(false));
+
+        executeAndValidateInitializationSequence();
+
+        // This should work.
+        assertTrue(mDut.setConcurrencyPriority(false));
+        verify(mISupplicantMock).setConcurrencyPriority(eq(IfaceType.P2P));
+        assertTrue(mDut.setConcurrencyPriority(true));
+        verify(mISupplicantMock).setConcurrencyPriority(eq(IfaceType.STA));
+    }
+
+    /**
+     * Tests the start of wps registrar.
+     */
+    @Test
+    public void testStartWpsRegistrar() throws Exception {
+        when(mISupplicantStaIfaceMock.startWpsRegistrar(any(byte[].class), anyString()))
+                .thenReturn(mStatusSuccess);
+
+        // Fail before initialization is performed.
+        assertFalse(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, null, null));
+
+        executeAndValidateInitializationSequence();
+
+        assertFalse(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, null, null));
+        verify(mISupplicantStaIfaceMock, never()).startWpsRegistrar(any(byte[].class), anyString());
+
+        assertFalse(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, new String(), "452233"));
+        verify(mISupplicantStaIfaceMock, never()).startWpsRegistrar(any(byte[].class), anyString());
+
+        assertTrue(mDut.startWpsRegistrar(WLAN0_IFACE_NAME, "45:23:12:12:12:98", "562535"));
+        verify(mISupplicantStaIfaceMock).startWpsRegistrar(any(byte[].class), anyString());
+    }
+
+    /**
+     * Tests the start of wps PBC.
+     */
+    @Test
+    public void testStartWpsPbc() throws Exception {
+        when(mISupplicantStaIfaceMock.startWpsPbc(any(byte[].class))).thenReturn(mStatusSuccess);
+        String bssid = "45:23:12:12:12:98";
+        byte[] bssidBytes = {0x45, 0x23, 0x12, 0x12, 0x12, (byte) 0x98};
+        byte[] anyBssidBytes = {0, 0, 0, 0, 0, 0};
+
+        // Fail before initialization is performed.
+        assertFalse(mDut.startWpsPbc(WLAN0_IFACE_NAME, bssid));
+        verify(mISupplicantStaIfaceMock, never()).startWpsPbc(any(byte[].class));
+
+        executeAndValidateInitializationSequence();
+
+        assertTrue(mDut.startWpsPbc(WLAN0_IFACE_NAME, bssid));
+        verify(mISupplicantStaIfaceMock).startWpsPbc(eq(bssidBytes));
+
+        assertTrue(mDut.startWpsPbc(WLAN0_IFACE_NAME, null));
+        verify(mISupplicantStaIfaceMock).startWpsPbc(eq(anyBssidBytes));
+    }
+
+    /**
+     * Tests country code setter
+     */
+    @Test
+    public void testSetCountryCode() throws Exception {
+        when(mISupplicantStaIfaceMock.setCountryCode(any(byte[].class))).thenReturn(mStatusSuccess);
+        String testCountryCode = "US";
+
+        // Fail before initialization is performed.
+        assertFalse(mDut.setCountryCode(WLAN0_IFACE_NAME, testCountryCode));
+        verify(mISupplicantStaIfaceMock, never()).setCountryCode(any(byte[].class));
+
+        executeAndValidateInitializationSequence();
+
+        assertTrue(mDut.setCountryCode(WLAN0_IFACE_NAME, testCountryCode));
+        verify(mISupplicantStaIfaceMock).setCountryCode(eq(testCountryCode.getBytes()));
+
+        // Bad input values should fail the call.
+        reset(mISupplicantStaIfaceMock);
+
+        assertFalse(mDut.setCountryCode(WLAN0_IFACE_NAME, null));
+        verify(mISupplicantStaIfaceMock, never()).setCountryCode(any(byte[].class));
+
+        assertFalse(mDut.setCountryCode(WLAN0_IFACE_NAME, "U"));
+        verify(mISupplicantStaIfaceMock, never()).setCountryCode(any(byte[].class));
+    }
+
+    /**
+     * Tests the start daemon for V1_0 service.
+     */
+    @Test
+    public void testStartDaemonV1_0() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertTrue(mDut.startDaemon());
+        verify(mFrameworkFacade).startSupplicant();
+    }
+
+    /**
+     * Tests the start daemon for V1_1 service.
+     */
+    @Test
+    public void testStartDaemonV1_1() throws Exception {
+        setupMocksForHalV1_1();
+
+        executeAndValidateInitializationSequenceV1_1(false, false);
+        assertTrue(mDut.startDaemon());
+        verify(mFrameworkFacade, never()).startSupplicant();
+    }
+
+    /**
+     * Tests the terminate for V1_0 service.
+     */
+    @Test
+    public void testTerminateV1_0() throws Exception {
+        executeAndValidateInitializationSequence();
+
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public boolean answer(IHwBinder.DeathRecipient cb, long cookie) throws RemoteException {
+                mHandler.post(() -> cb.serviceDied(cookie));
+                return true;
+            }
+        }).when(mISupplicantMock).linkToDeath(any(IHwBinder.DeathRecipient.class), any(long.class));
+        mDut.terminate();
+        mLooper.dispatchAll();
+        verify(mFrameworkFacade).stopSupplicant();
+
+        // Check that terminate cleared all internal state.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Tests the start daemon for V1_1 service.
+     */
+    @Test
+    public void testTerminateV1_1() throws Exception {
+        setupMocksForHalV1_1();
+
+        executeAndValidateInitializationSequenceV1_1(false, false);
+
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public boolean answer(IHwBinder.DeathRecipient cb, long cookie) throws RemoteException {
+                mHandler.post(() -> cb.serviceDied(cookie));
+                return true;
+            }
+        }).when(mISupplicantMock).linkToDeath(any(IHwBinder.DeathRecipient.class), any(long.class));
+
+        mDut.terminate();
+        mLooper.dispatchAll();
+        verify(mFrameworkFacade, never()).stopSupplicant();
+        verify(mISupplicantMockV1_1).terminate();
+
+        // Check that terminate cleared all internal state.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+    private class GetKeyMgmtCapabilitiesAnswer extends MockAnswerUtil.AnswerWithArguments {
+        private int mKeyMgmtCapabilities;
+
+        GetKeyMgmtCapabilitiesAnswer(int keyMgmtCapabilities) {
+            mKeyMgmtCapabilities = keyMgmtCapabilities;
+        }
+
+        public void answer(android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
+                .getKeyMgmtCapabilitiesCallback cb) {
+            cb.onValues(mStatusSuccess, mKeyMgmtCapabilities);
+        }
+    }
+
+    private class GetKeyMgmtCapabilities_1_3Answer extends MockAnswerUtil.AnswerWithArguments {
+        private int mKeyMgmtCapabilities;
+
+        GetKeyMgmtCapabilities_1_3Answer(int keyMgmtCapabilities) {
+            mKeyMgmtCapabilities = keyMgmtCapabilities;
+        }
+
+        public void answer(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                .getKeyMgmtCapabilities_1_3Callback cb) {
+            cb.onValues(mStatusSuccess, mKeyMgmtCapabilities);
+        }
+    }
+
+    /**
+     * Test get advanced capabilities API on old HAL, should return 0 (not supported)
+     */
+    @Test
+    public void testGetKeyMgmtCapabilitiesOldHal() throws Exception {
+        setupMocksForHalV1_1();
+
+        executeAndValidateInitializationSequenceV1_1(false, false);
+
+        assertTrue(mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME) == 0);
+    }
+
+    /**
+     * Test WPA3-Personal SAE key may management support
+     */
+    @Test
+    public void testGetKeyMgmtCapabilitiesWpa3Sae() throws Exception {
+        setupMocksForHalV1_2();
+
+        executeAndValidateInitializationSequenceV1_2();
+
+        doAnswer(new GetKeyMgmtCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_2
+                .ISupplicantStaNetwork.KeyMgmtMask.SAE))
+                .when(mISupplicantStaIfaceMockV1_2).getKeyMgmtCapabilities(any(
+                android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
+                        .getKeyMgmtCapabilitiesCallback.class));
+
+        assertEquals(WIFI_FEATURE_WPA3_SAE, mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test WPA3-Enterprise Suite-B-192 key may management support
+     */
+    @Test
+    public void testGetKeyMgmtCapabilitiesWpa3SuiteB() throws Exception {
+        setupMocksForHalV1_2();
+
+        executeAndValidateInitializationSequenceV1_2();
+
+        doAnswer(new GetKeyMgmtCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_2
+                .ISupplicantStaNetwork.KeyMgmtMask.SUITE_B_192))
+                .when(mISupplicantStaIfaceMockV1_2).getKeyMgmtCapabilities(any(
+                android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
+                        .getKeyMgmtCapabilitiesCallback.class));
+
+        assertEquals(WIFI_FEATURE_WPA3_SUITE_B,
+                mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test Enhanced Open (OWE) key may management support
+     */
+    @Test
+    public void testGetKeyMgmtCapabilitiesOwe() throws Exception {
+        setupMocksForHalV1_2();
+
+        executeAndValidateInitializationSequenceV1_2();
+
+        doAnswer(new GetKeyMgmtCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_2
+                .ISupplicantStaNetwork.KeyMgmtMask.OWE))
+                .when(mISupplicantStaIfaceMockV1_2).getKeyMgmtCapabilities(any(
+                android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
+                        .getKeyMgmtCapabilitiesCallback.class));
+
+        assertEquals(WIFI_FEATURE_OWE, mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test Enhanced Open (OWE) and SAE key may management support
+     */
+    @Test
+    public void testGetKeyMgmtCapabilitiesOweAndSae() throws Exception {
+        setupMocksForHalV1_2();
+
+        executeAndValidateInitializationSequenceV1_2();
+
+        doAnswer(new GetKeyMgmtCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_2
+                .ISupplicantStaNetwork.KeyMgmtMask.OWE
+                | android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork.KeyMgmtMask.SAE))
+                .when(mISupplicantStaIfaceMockV1_2).getKeyMgmtCapabilities(any(
+                android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
+                        .getKeyMgmtCapabilitiesCallback.class));
+
+        assertEquals(WIFI_FEATURE_OWE | WIFI_FEATURE_WPA3_SAE,
+                mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test Easy Connect (DPP) key may management support
+     */
+    @Test
+    public void testGetKeyMgmtCapabilitiesDpp() throws Exception {
+        setupMocksForHalV1_2();
+
+        executeAndValidateInitializationSequenceV1_2();
+
+        doAnswer(new GetKeyMgmtCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_2
+                .ISupplicantStaNetwork.KeyMgmtMask.DPP))
+                .when(mISupplicantStaIfaceMockV1_2).getKeyMgmtCapabilities(any(
+                android.hardware.wifi.supplicant.V1_2.ISupplicantStaIface
+                        .getKeyMgmtCapabilitiesCallback.class));
+
+        assertEquals(WIFI_FEATURE_DPP, mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test Easy Connect (DPP) Enrollee Responder mode supported on supplicant HAL V1_4
+     */
+    @Test
+    public void testGetDppEnrolleeResponderModeSupport() throws Exception {
+        setupMocksForHalV1_4();
+        executeAndValidateInitializationSequenceV1_4();
+
+        doAnswer(new GetKeyMgmtCapabilities_1_3Answer(android.hardware.wifi.supplicant.V1_2
+                .ISupplicantStaNetwork.KeyMgmtMask.DPP))
+                .when(mISupplicantStaIfaceMockV13).getKeyMgmtCapabilities_1_3(any(
+                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                        .getKeyMgmtCapabilities_1_3Callback.class));
+
+        assertTrue((WIFI_FEATURE_DPP_ENROLLEE_RESPONDER
+                & mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME))
+                == WIFI_FEATURE_DPP_ENROLLEE_RESPONDER);
+    }
+
+    /**
+     * Test Easy Connect (DPP) Enrollee Responder mode is not supported on supplicant HAL
+     * V1_3 or less.
+     */
+    @Test
+    public void testDppEnrolleeResponderModeNotSupportedOnHalV1_3OrLess() throws Exception {
+        setupMocksForHalV1_3();
+        executeAndValidateInitializationSequenceV1_3();
+
+        doAnswer(new GetKeyMgmtCapabilities_1_3Answer(android.hardware.wifi.supplicant.V1_2
+                .ISupplicantStaNetwork.KeyMgmtMask.DPP))
+                .when(mISupplicantStaIfaceMockV13).getKeyMgmtCapabilities_1_3(any(
+                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                        .getKeyMgmtCapabilities_1_3Callback.class));
+
+        assertFalse((WIFI_FEATURE_DPP_ENROLLEE_RESPONDER
+                & mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME))
+                == WIFI_FEATURE_DPP_ENROLLEE_RESPONDER);
+    }
+
+    /**
+     * Test WAPI key may management support
+     */
+    @Test
+    public void testGetKeyMgmtCapabilitiesWapi() throws Exception {
+        setupMocksForHalV1_3();
+
+        executeAndValidateInitializationSequenceV1_3();
+
+        doAnswer(new GetKeyMgmtCapabilities_1_3Answer(android.hardware.wifi.supplicant.V1_3
+                .ISupplicantStaNetwork.KeyMgmtMask.WAPI_PSK))
+                .when(mISupplicantStaIfaceMockV13).getKeyMgmtCapabilities_1_3(any(
+                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                        .getKeyMgmtCapabilities_1_3Callback.class));
+
+        assertEquals(WIFI_FEATURE_WAPI, mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test FILS SHA256 key management support.
+     */
+    @Test
+    public void testGetKeyMgmtCapabilitiesFilsSha256() throws Exception {
+        setupMocksForHalV1_3();
+
+        executeAndValidateInitializationSequenceV1_3();
+
+        doAnswer(new GetKeyMgmtCapabilities_1_3Answer(android.hardware.wifi.supplicant.V1_3
+                .ISupplicantStaNetwork.KeyMgmtMask.FILS_SHA256))
+                .when(mISupplicantStaIfaceMockV13).getKeyMgmtCapabilities_1_3(any(
+                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                        .getKeyMgmtCapabilities_1_3Callback.class));
+
+        assertEquals(WIFI_FEATURE_FILS_SHA256,
+                mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test FILS SHA384 key management support.
+     */
+    @Test
+    public void testGetKeyMgmtCapabilitiesFilsSha384() throws Exception {
+        setupMocksForHalV1_3();
+
+        executeAndValidateInitializationSequenceV1_3();
+
+        doAnswer(new GetKeyMgmtCapabilities_1_3Answer(android.hardware.wifi.supplicant.V1_3
+                .ISupplicantStaNetwork.KeyMgmtMask.FILS_SHA384))
+                .when(mISupplicantStaIfaceMockV13).getKeyMgmtCapabilities_1_3(any(
+                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                        .getKeyMgmtCapabilities_1_3Callback.class));
+
+        assertEquals(WIFI_FEATURE_FILS_SHA384,
+                mDut.getAdvancedCapabilities(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test Easy Connect (DPP) calls return failure if hal version is less than 1_2
+     */
+    @Test
+    public void testDppFailsWithOldHal() throws Exception {
+        assertEquals(-1, mDut.addDppPeerUri(WLAN0_IFACE_NAME, "/blah"));
+        assertFalse(mDut.removeDppUri(WLAN0_IFACE_NAME, 0));
+        assertFalse(mDut.stopDppInitiator(WLAN0_IFACE_NAME));
+        assertFalse(mDut.startDppConfiguratorInitiator(WLAN0_IFACE_NAME,
+                1, 2, "Buckle", "My", "Shoe",
+                3, 4));
+        assertFalse(mDut.startDppEnrolleeInitiator(WLAN0_IFACE_NAME, 3, 14));
+        WifiNative.DppBootstrapQrCodeInfo bootstrapInfo =
+                mDut.generateDppBootstrapInfoForResponder(WLAN0_IFACE_NAME, "00:11:22:33:44:55",
+                        "PRODUCT_INFO", DppCurve.PRIME256V1);
+        assertEquals(-1, bootstrapInfo.bootstrapId);
+        assertFalse(mDut.startDppEnrolleeResponder(WLAN0_IFACE_NAME, 6));
+    }
+
+    /**
+     * Test adding PMK cache entry to the supplicant.
+     */
+    @Test
+    public void testSetPmkSuccess() throws Exception {
+        int testFrameworkNetworkId = 9;
+        long testStartSeconds = PMK_CACHE_EXPIRATION_IN_SEC / 2;
+        WifiConfiguration config = new WifiConfiguration();
+        config.networkId = testFrameworkNetworkId;
+        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
+        config.getNetworkSelectionStatus().setCandidateSecurityParams(
+                SecurityParams.createSecurityParamsBySecurityType(
+                        WifiConfiguration.SECURITY_TYPE_EAP));
+        PmkCacheStoreData pmkCacheData =
+                new PmkCacheStoreData(PMK_CACHE_EXPIRATION_IN_SEC, new ArrayList<Byte>(),
+                        MacAddress.fromBytes(CONNECTED_MAC_ADDRESS_BYTES));
+        mDut.mPmkCacheEntries.put(testFrameworkNetworkId, pmkCacheData);
+        when(mClock.getElapsedSinceBootMillis()).thenReturn(testStartSeconds * 1000L);
+
+        setupMocksForHalV1_3();
+        setupMocksForPmkCache();
+        setupMocksForConnectSequence(false);
+
+        executeAndValidateInitializationSequenceV1_3();
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+
+        verify(mSupplicantStaNetworkMock).setPmkCache(eq(pmkCacheData.data));
+        verify(mISupplicantStaIfaceCallbackV13)
+                .onPmkCacheAdded(eq(PMK_CACHE_EXPIRATION_IN_SEC), eq(pmkCacheData.data));
+        // there is only one cache entry, the next expiration alarm should be the same as
+        // its expiration time.
+        verify(mHandler).postDelayed(
+                /* private listener */ any(),
+                eq(SupplicantStaIfaceHal.PMK_CACHE_EXPIRATION_ALARM_TAG),
+                eq((PMK_CACHE_EXPIRATION_IN_SEC - testStartSeconds) * 1000));
+    }
+
+    /**
+     * Test adding PMK cache entry to the supplicant when SAE is selected
+     * for a PSK/SAE configuration.
+     */
+    @Test
+    public void testSetPmkWhenSaeIsSelected() throws Exception {
+        int testFrameworkNetworkId = 9;
+        long testStartSeconds = PMK_CACHE_EXPIRATION_IN_SEC / 2;
+        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
+        config.networkId = testFrameworkNetworkId;
+        config.getNetworkSelectionStatus().setCandidateSecurityParams(
+                SecurityParams.createSecurityParamsBySecurityType(
+                        WifiConfiguration.SECURITY_TYPE_SAE));
+        PmkCacheStoreData pmkCacheData =
+                new PmkCacheStoreData(PMK_CACHE_EXPIRATION_IN_SEC, new ArrayList<Byte>(),
+                        MacAddress.fromBytes(CONNECTED_MAC_ADDRESS_BYTES));
+        mDut.mPmkCacheEntries.put(testFrameworkNetworkId, pmkCacheData);
+        when(mClock.getElapsedSinceBootMillis()).thenReturn(testStartSeconds * 1000L);
+
+        setupMocksForHalV1_3();
+        setupMocksForPmkCache();
+        setupMocksForConnectSequence(false);
+
+        executeAndValidateInitializationSequenceV1_3();
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+
+        verify(mSupplicantStaNetworkMock).setPmkCache(eq(pmkCacheData.data));
+        verify(mISupplicantStaIfaceCallbackV13)
+                .onPmkCacheAdded(eq(PMK_CACHE_EXPIRATION_IN_SEC), eq(pmkCacheData.data));
+        // there is only one cache entry, the next expiration alarm should be the same as
+        // its expiration time.
+        verify(mHandler).postDelayed(
+                /* private listener */ any(),
+                eq(SupplicantStaIfaceHal.PMK_CACHE_EXPIRATION_ALARM_TAG),
+                eq((PMK_CACHE_EXPIRATION_IN_SEC - testStartSeconds) * 1000));
+    }
+
+    /**
+     * Test PMK cache entry is not added to the supplicant when PSK is selected
+     * for a PSK/SAE configuration.
+     */
+    @Test
+    public void testAddPmkEntryNotCalledIfPskIsSelected() throws Exception {
+        int testFrameworkNetworkId = 9;
+        long testStartSeconds = PMK_CACHE_EXPIRATION_IN_SEC / 2;
+
+        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
+        config.networkId = testFrameworkNetworkId;
+        config.getNetworkSelectionStatus().setCandidateSecurityParams(
+                SecurityParams.createSecurityParamsBySecurityType(
+                        WifiConfiguration.SECURITY_TYPE_PSK));
+        PmkCacheStoreData pmkCacheData =
+                new PmkCacheStoreData(PMK_CACHE_EXPIRATION_IN_SEC, new ArrayList<Byte>(),
+                        MacAddress.fromBytes(CONNECTED_MAC_ADDRESS_BYTES));
+        mDut.mPmkCacheEntries.put(testFrameworkNetworkId, pmkCacheData);
+        when(mClock.getElapsedSinceBootMillis()).thenReturn(testStartSeconds * 1000L);
+
+        setupMocksForHalV1_3();
+        setupMocksForPmkCache();
+        setupMocksForConnectSequence(false);
+
+        executeAndValidateInitializationSequenceV1_3();
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+
+        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any());
+        verify(mISupplicantStaIfaceCallbackV13, never())
+                .onPmkCacheAdded(anyLong(), any());
+    }
+
+    /**
+     * Test PMK cache entry is not added to the supplicant if no security
+     * params is selected.
+     */
+    @Test
+    public void testAddPmkEntryNotCalledIfNoSecurityParamsIsSelected() throws Exception {
+        int testFrameworkNetworkId = 9;
+        long testStartSeconds = PMK_CACHE_EXPIRATION_IN_SEC / 2;
+
+        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
+        config.networkId = testFrameworkNetworkId;
+        config.getNetworkSelectionStatus().setCandidateSecurityParams(null);
+        PmkCacheStoreData pmkCacheData =
+                new PmkCacheStoreData(PMK_CACHE_EXPIRATION_IN_SEC, new ArrayList<Byte>(),
+                        MacAddress.fromBytes(CONNECTED_MAC_ADDRESS_BYTES));
+        mDut.mPmkCacheEntries.put(testFrameworkNetworkId, pmkCacheData);
+        when(mClock.getElapsedSinceBootMillis()).thenReturn(testStartSeconds * 1000L);
+
+        setupMocksForHalV1_3();
+        setupMocksForPmkCache();
+        setupMocksForConnectSequence(false);
+
+        executeAndValidateInitializationSequenceV1_3();
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+
+        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any());
+        verify(mISupplicantStaIfaceCallbackV13, never())
+                .onPmkCacheAdded(anyLong(), any());
+    }
+
+    /**
+     * Test adding PMK cache entry is not called if there is no
+     * valid PMK cache for a corresponding configuratoin.
+     */
+    @Test
+    public void testAddPmkEntryNotCalledIfNoPmkCache() throws Exception {
+        int testFrameworkNetworkId = 9;
+        long testStartSeconds = PMK_CACHE_EXPIRATION_IN_SEC / 2;
+        WifiConfiguration config = new WifiConfiguration();
+        config.networkId = testFrameworkNetworkId;
+        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
+        when(mClock.getElapsedSinceBootMillis()).thenReturn(testStartSeconds * 1000L);
+
+        setupMocksForHalV1_3();
+        setupMocksForPmkCache();
+        setupMocksForConnectSequence(false);
+        executeAndValidateInitializationSequenceV1_3();
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+
+        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any(ArrayList.class));
+        verify(mISupplicantStaIfaceCallbackV13, never()).onPmkCacheAdded(
+                anyLong(), any(ArrayList.class));
+        verify(mHandler, never()).postDelayed(
+                /* private listener */ any(),
+                eq(SupplicantStaIfaceHal.PMK_CACHE_EXPIRATION_ALARM_TAG),
+                anyLong());
+    }
+
+    /**
+     * Test adding PMK cache entry returns faliure if this is a psk network.
+     */
+    @Test
+    public void testAddPmkEntryIsOmittedWithPskNetwork() throws Exception {
+        int testFrameworkNetworkId = 9;
+        long testStartSeconds = PMK_CACHE_EXPIRATION_IN_SEC / 2;
+        WifiConfiguration config = new WifiConfiguration();
+        config.networkId = testFrameworkNetworkId;
+        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
+        PmkCacheStoreData pmkCacheData =
+                new PmkCacheStoreData(PMK_CACHE_EXPIRATION_IN_SEC, new ArrayList<Byte>(),
+                        MacAddress.fromBytes(CONNECTED_MAC_ADDRESS_BYTES));
+        mDut.mPmkCacheEntries.put(testFrameworkNetworkId, pmkCacheData);
+        when(mClock.getElapsedSinceBootMillis()).thenReturn(testStartSeconds * 1000L);
+
+        setupMocksForHalV1_3();
+        setupMocksForPmkCache();
+        setupMocksForConnectSequence(false);
+        executeAndValidateInitializationSequenceV1_3();
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+
+        verify(mSupplicantStaNetworkMock, never()).setPmkCache(any(ArrayList.class));
+        verify(mISupplicantStaIfaceCallbackV13, never()).onPmkCacheAdded(
+                anyLong(), any(ArrayList.class));
+        verify(mHandler, never()).postDelayed(
+                /* private listener */ any(),
+                eq(SupplicantStaIfaceHal.PMK_CACHE_EXPIRATION_ALARM_TAG),
+                anyLong());
+    }
+
+    /**
+     * Test adding PMK cache entry returns faliure if HAL version is less than 1_3
+     */
+    @Test
+    public void testAddPmkEntryIsOmittedWithOldHal() throws Exception {
+        int testFrameworkNetworkId = 9;
+        long testStartSeconds = PMK_CACHE_EXPIRATION_IN_SEC / 2;
+        WifiConfiguration config = new WifiConfiguration();
+        config.networkId = testFrameworkNetworkId;
+        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
+        config.getNetworkSelectionStatus().setCandidateSecurityParams(
+                SecurityParams.createSecurityParamsBySecurityType(
+                        WifiConfiguration.SECURITY_TYPE_EAP));
+        PmkCacheStoreData pmkCacheData =
+                new PmkCacheStoreData(PMK_CACHE_EXPIRATION_IN_SEC, new ArrayList<Byte>(),
+                        MacAddress.fromBytes(CONNECTED_MAC_ADDRESS_BYTES));
+        mDut.mPmkCacheEntries.put(testFrameworkNetworkId, pmkCacheData);
+        when(mClock.getElapsedSinceBootMillis()).thenReturn(testStartSeconds * 1000L);
+
+        setupMocksForConnectSequence(false);
+        executeAndValidateInitializationSequence();
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+
+        verify(mSupplicantStaNetworkMock).setPmkCache(eq(pmkCacheData.data));
+        assertNull(mISupplicantStaIfaceCallbackV13);
+        verify(mHandler, never()).postDelayed(
+                /* private listener */ any(),
+                eq(SupplicantStaIfaceHal.PMK_CACHE_EXPIRATION_ALARM_TAG),
+                anyLong());
+    }
+
+    /**
+     * Tests the handling of assoc reject for PMK cache
+     */
+    @Test
+    public void testRemovePmkEntryOnReceivingAssocReject() throws Exception {
+        int testFrameworkNetworkId = 9;
+        long testStartSeconds = PMK_CACHE_EXPIRATION_IN_SEC / 2;
+        WifiConfiguration config = new WifiConfiguration();
+        config.networkId = testFrameworkNetworkId;
+        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
+        PmkCacheStoreData pmkCacheData =
+                new PmkCacheStoreData(PMK_CACHE_EXPIRATION_IN_SEC, new ArrayList<Byte>(),
+                        MacAddress.fromBytes(CONNECTED_MAC_ADDRESS_BYTES));
+        mDut.mPmkCacheEntries.put(testFrameworkNetworkId, pmkCacheData);
+        when(mClock.getElapsedSinceBootMillis()).thenReturn(testStartSeconds * 1000L);
+
+        setupMocksForHalV1_3();
+        setupMocksForPmkCache();
+        setupMocksForConnectSequence(false);
+
+        executeAndValidateInitializationSequenceV1_3();
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+        mISupplicantStaIfaceCallbackV13.onStateChanged(
+                ISupplicantStaIfaceCallback.State.ASSOCIATING,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID));
+        int statusCode = 7;
+        mISupplicantStaIfaceCallbackV13.onAssociationRejected(
+                NativeUtil.macAddressToByteArray(BSSID), statusCode, false);
+
+        assertNull(mDut.mPmkCacheEntries.get(testFrameworkNetworkId));
+    }
+
+    /**
+     * Tests the PMK cache is removed and not set if MAC address is changed.
+     */
+    @Test
+    public void testRemovePmkEntryOnMacAddressChanged() throws Exception {
+        int testFrameworkNetworkId = 9;
+        long testStartSeconds = PMK_CACHE_EXPIRATION_IN_SEC / 2;
+        WifiConfiguration config = new WifiConfiguration();
+        config.networkId = testFrameworkNetworkId;
+        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
+        // Assume we have a PMK cache with a different MAC address.
+        final byte[] previouisConnectedMacAddressBytes =
+                {0x00, 0x01, 0x02, 0x03, 0x04, 0x09};
+        PmkCacheStoreData pmkCacheData =
+                new PmkCacheStoreData(PMK_CACHE_EXPIRATION_IN_SEC, new ArrayList<Byte>(),
+                        MacAddress.fromBytes(previouisConnectedMacAddressBytes));
+        mDut.mPmkCacheEntries.put(testFrameworkNetworkId, pmkCacheData);
+        when(mClock.getElapsedSinceBootMillis()).thenReturn(testStartSeconds * 1000L);
+
+        setupMocksForHalV1_3();
+        setupMocksForPmkCache();
+        setupMocksForConnectSequence(false);
+
+        // When MAC is not changed, PMK cache should NOT be removed.
+        mDut.removeNetworkCachedDataIfNeeded(testFrameworkNetworkId,
+                MacAddress.fromBytes(previouisConnectedMacAddressBytes));
+        assertEquals(pmkCacheData, mDut.mPmkCacheEntries.get(testFrameworkNetworkId));
+
+        // When MAC is changed, PMK cache should be removed.
+        mDut.removeNetworkCachedDataIfNeeded(testFrameworkNetworkId,
+                MacAddress.fromBytes(CONNECTED_MAC_ADDRESS_BYTES));
+        assertNull(mDut.mPmkCacheEntries.get(testFrameworkNetworkId));
+    }
+
+    /**
+     * Test getConnectionCapabilities
+     * Should fail if running HAL lower than V1_3
+     */
+    @Test
+    public void testGetConnectionCapabilitiesV1_2() throws Exception {
+        setupMocksForHalV1_2();
+        executeAndValidateInitializationSequenceV1_2();
+        WifiNative.ConnectionCapabilities cap = mDut.getConnectionCapabilities(WLAN0_IFACE_NAME);
+        assertEquals(ScanResult.WIFI_STANDARD_UNKNOWN, cap.wifiStandard);
+    }
+
+    private class GetConnCapabilitiesAnswerV1_3 extends MockAnswerUtil.AnswerWithArguments {
+        private android.hardware.wifi.supplicant.V1_3.ConnectionCapabilities mConnCapabilities;
+
+        GetConnCapabilitiesAnswerV1_3(int wifiTechnology, int channelBandwidth,
+                int maxNumberTxSpatialStreams, int maxNumberRxSpatialStreams) {
+            mConnCapabilities = new android.hardware.wifi.supplicant.V1_3.ConnectionCapabilities();
+            mConnCapabilities.technology = wifiTechnology;
+            mConnCapabilities.channelBandwidth = channelBandwidth;
+            mConnCapabilities.maxNumberTxSpatialStreams = maxNumberTxSpatialStreams;
+            mConnCapabilities.maxNumberRxSpatialStreams = maxNumberRxSpatialStreams;
+        }
+
+        public void answer(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                .getConnectionCapabilitiesCallback cb) {
+            cb.onValues(mStatusSuccess, mConnCapabilities);
+        }
+    }
+
+    private class GetConnCapabilitiesAnswerV1_4 extends MockAnswerUtil.AnswerWithArguments {
+        private ConnectionCapabilities mConnCapabilities;
+
+        GetConnCapabilitiesAnswerV1_4(int wifiTechnology, int legacyMode, int channelBandwidth,
+                int maxNumberTxSpatialStreams, int maxNumberRxSpatialStreams) {
+            mConnCapabilities = new ConnectionCapabilities();
+            mConnCapabilities.V1_3.technology = wifiTechnology;
+            mConnCapabilities.legacyMode = legacyMode;
+            mConnCapabilities.V1_3.channelBandwidth = channelBandwidth;
+            mConnCapabilities.V1_3.maxNumberTxSpatialStreams = maxNumberTxSpatialStreams;
+            mConnCapabilities.V1_3.maxNumberRxSpatialStreams = maxNumberRxSpatialStreams;
+        }
+
+        public void answer(android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
+                .getConnectionCapabilities_1_4Callback cb) {
+            cb.onValues(mStatusSuccessV14, mConnCapabilities);
+        }
+    }
+
+    /**
+     * Test getConnectionCapabilities if running with HAL V1_3
+     */
+    @Test
+    public void testGetConnectionCapabilitiesV1_3() throws Exception {
+        setupMocksForHalV1_3();
+
+        executeAndValidateInitializationSequenceV1_3();
+        int testWifiTechnologyHal = WifiTechnology.VHT;
+        int testWifiStandardWifiInfo = ScanResult.WIFI_STANDARD_11AC;
+        int testChannelBandwidthHal = WifiChannelWidthInMhz.WIDTH_80P80;
+        int testChannelBandwidth = ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
+        int maxNumberTxSpatialStreams = 3;
+        int maxNumberRxSpatialStreams = 1;
+
+        doAnswer(new GetConnCapabilitiesAnswerV1_3(testWifiTechnologyHal, testChannelBandwidthHal,
+                maxNumberTxSpatialStreams, maxNumberRxSpatialStreams))
+                .when(mISupplicantStaIfaceMockV13).getConnectionCapabilities(any(
+                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                        .getConnectionCapabilitiesCallback.class));
+        WifiNative.ConnectionCapabilities cap = mDut.getConnectionCapabilities(WLAN0_IFACE_NAME);
+        assertEquals(testWifiStandardWifiInfo, cap.wifiStandard);
+        assertEquals(false, cap.is11bMode);
+        assertEquals(testChannelBandwidth, cap.channelBandwidth);
+        assertEquals(maxNumberTxSpatialStreams, cap.maxNumberTxSpatialStreams);
+        assertEquals(maxNumberRxSpatialStreams, cap.maxNumberRxSpatialStreams);
+    }
+
+    /**
+     * Test getConnectionCapabilities if running with HAL V1_4
+     */
+    @Test
+    public void testGetConnectionCapabilitiesV1_4() throws Exception {
+        setupMocksForHalV1_4();
+
+        executeAndValidateInitializationSequenceV1_4();
+        int testWifiTechnologyHal = WifiTechnology.LEGACY;
+        int testLegacyMode = LegacyMode.B_MODE;
+        int testWifiStandardWifiInfo = ScanResult.WIFI_STANDARD_LEGACY;
+        int testChannelBandwidthHal = WifiChannelWidthInMhz.WIDTH_20;
+        int testChannelBandwidth = ScanResult.CHANNEL_WIDTH_20MHZ;
+        int maxNumberTxSpatialStreams = 1;
+        int maxNumberRxSpatialStreams = 1;
+
+        doAnswer(new GetConnCapabilitiesAnswerV1_4(testWifiTechnologyHal, testLegacyMode,
+                testChannelBandwidthHal, maxNumberTxSpatialStreams, maxNumberRxSpatialStreams))
+                .when(mISupplicantStaIfaceMockV14).getConnectionCapabilities_1_4(any(
+                android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
+                        .getConnectionCapabilities_1_4Callback.class));
+        WifiNative.ConnectionCapabilities cap = mDut.getConnectionCapabilities(WLAN0_IFACE_NAME);
+        assertEquals(testWifiStandardWifiInfo, cap.wifiStandard);
+        assertEquals(true, cap.is11bMode);
+        assertEquals(testChannelBandwidth, cap.channelBandwidth);
+        assertEquals(maxNumberTxSpatialStreams, cap.maxNumberTxSpatialStreams);
+        assertEquals(maxNumberRxSpatialStreams, cap.maxNumberRxSpatialStreams);
+    }
+
+    private WifiConfiguration createTestWifiConfiguration() {
+        WifiConfiguration config = new WifiConfiguration();
+        config.networkId = SUPPLICANT_NETWORK_ID;
+        return config;
+    }
+
+    private void executeAndValidateHs20DeauthImminentCallback(boolean isEss) throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+
+        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
+        int reasonCode = isEss ? WnmData.ESS : WnmData.ESS + 1;
+        int reauthDelay = 5;
+        mISupplicantStaIfaceCallback.onHs20DeauthImminentNotice(
+                bssid, reasonCode, reauthDelay, HS20_URL);
+
+        ArgumentCaptor<WnmData> wnmDataCaptor = ArgumentCaptor.forClass(WnmData.class);
+        verify(mWifiMonitor).broadcastWnmEvent(eq(WLAN0_IFACE_NAME), wnmDataCaptor.capture());
+        assertEquals(
+                ByteBufferReader.readInteger(
+                        ByteBuffer.wrap(bssid), ByteOrder.BIG_ENDIAN, bssid.length),
+                wnmDataCaptor.getValue().getBssid());
+        assertEquals(isEss, wnmDataCaptor.getValue().isEss());
+        assertEquals(reauthDelay, wnmDataCaptor.getValue().getDelay());
+        assertEquals(HS20_URL, wnmDataCaptor.getValue().getUrl());
+    }
+
+    private void executeAndValidateHs20TermsAndConditionsCallback() throws Exception {
+        setupMocksForHalV1_4();
+        executeAndValidateInitializationSequenceV1_4();
+        assertNotNull(mISupplicantStaIfaceCallbackV14);
+
+        byte[] bssid = NativeUtil.macAddressToByteArray(BSSID);
+        mISupplicantStaIfaceCallbackV14.onHs20TermsAndConditionsAcceptanceRequestedNotification(
+                bssid, HS20_URL);
+
+        //TODO: Add test logic once framework handling is implemented
+    }
+
+    private void executeAndValidateInitializationSequence() throws  Exception {
+        executeAndValidateInitializationSequence(false, false, false, false);
+    }
+
+    /**
+     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
+     * expected result. Verifies if ISupplicantStaIface manager is initialized or reset.
+     * Each of the arguments will cause a different failure mode when set true.
+     */
+    private void executeAndValidateInitializationSequence(boolean causeRemoteException,
+                                                          boolean getZeroInterfaces,
+                                                          boolean getNullInterface,
+                                                          boolean causeCallbackRegFailure)
+            throws Exception {
+        boolean shouldSucceed =
+                !causeRemoteException && !getZeroInterfaces && !getNullInterface
+                        && !causeCallbackRegFailure;
+        // Setup callback mock answers
+        ArrayList<ISupplicant.IfaceInfo> interfaces;
+        if (getZeroInterfaces) {
+            interfaces = new ArrayList<>();
+        } else {
+            interfaces = mIfaceInfoList;
+        }
+        doAnswer(new GetListInterfacesAnswer(interfaces)).when(mISupplicantMock)
+                .listInterfaces(any(ISupplicant.listInterfacesCallback.class));
+        if (causeRemoteException) {
+            doThrow(new RemoteException("Some error!!!"))
+                    .when(mISupplicantMock).getInterface(any(ISupplicant.IfaceInfo.class),
+                    any(ISupplicant.getInterfaceCallback.class));
+        } else {
+            doAnswer(new GetGetInterfaceAnswer(getNullInterface))
+                    .when(mISupplicantMock).getInterface(any(ISupplicant.IfaceInfo.class),
+                    any(ISupplicant.getInterfaceCallback.class));
+        }
+        /** Callback registration */
+        if (causeCallbackRegFailure) {
+            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+                public SupplicantStatus answer(ISupplicantStaIfaceCallback cb)
+                        throws RemoteException {
+                    return mStatusFailure;
+                }
+            }).when(mISupplicantStaIfaceMock)
+                    .registerCallback(any(ISupplicantStaIfaceCallback.class));
+        } else {
+            doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+                public SupplicantStatus answer(ISupplicantStaIfaceCallback cb)
+                        throws RemoteException {
+                    mISupplicantStaIfaceCallback = cb;
+                    return mStatusSuccess;
+                }
+            }).when(mISupplicantStaIfaceMock)
+                    .registerCallback(any(ISupplicantStaIfaceCallback.class));
+        }
+
+        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantStaIfaceMock,
+                mWifiMonitor);
+        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
+        assertTrue(mDut.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
+                anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        // act: cause the onRegistration(...) callback to execute
+        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
+
+        assertTrue(mDut.isInitializationComplete());
+        assertEquals(shouldSucceed, mDut.setupIface(WLAN0_IFACE_NAME));
+        mInOrder.verify(mISupplicantMock).linkToDeath(mSupplicantDeathCaptor.capture(),
+                mDeathRecipientCookieCaptor.capture());
+        // verify: listInterfaces is called
+        mInOrder.verify(mISupplicantMock).listInterfaces(
+                any(ISupplicant.listInterfacesCallback.class));
+        if (!getZeroInterfaces) {
+            mInOrder.verify(mISupplicantMock)
+                    .getInterface(any(ISupplicant.IfaceInfo.class),
+                            any(ISupplicant.getInterfaceCallback.class));
+        }
+        if (!causeRemoteException && !getZeroInterfaces && !getNullInterface) {
+            mInOrder.verify(mISupplicantStaIfaceMock)
+                    .registerCallback(any(ISupplicantStaIfaceCallback.class));
+        }
+    }
+
+    /**
+     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
+     * expected result. Verifies if ISupplicantStaIface manager is initialized or reset.
+     * Each of the arguments will cause a different failure mode when set true.
+     */
+    private void executeAndValidateInitializationSequenceV1_1(boolean causeRemoteException,
+                                                               boolean getNullInterface)
+            throws Exception {
+        boolean shouldSucceed = !causeRemoteException && !getNullInterface;
+        // Setup callback mock answers
+        if (causeRemoteException) {
+            doThrow(new RemoteException("Some error!!!"))
+                    .when(mISupplicantMockV1_1).addInterface(any(ISupplicant.IfaceInfo.class),
+                    any(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                            .addInterfaceCallback.class));
+        } else {
+            doAnswer(new GetAddInterfaceAnswer(getNullInterface))
+                    .when(mISupplicantMockV1_1).addInterface(any(ISupplicant.IfaceInfo.class),
+                    any(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                            .addInterfaceCallback.class));
+        }
+        /** Callback registration */
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public SupplicantStatus answer(
+                    android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback cb)
+                    throws RemoteException {
+                mISupplicantStaIfaceCallbackV1_1 = cb;
+                return mStatusSuccess;
+            }
+        }).when(mISupplicantStaIfaceMockV1_1)
+                .registerCallback_1_1(
+                any(android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback.class));
+
+        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantMockV1_1,
+                mISupplicantStaIfaceMockV1_1, mWifiMonitor);
+        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
+        assertTrue(mDut.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
+                anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        // act: cause the onRegistration(...) callback to execute
+        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
+
+        assertTrue(mDut.isInitializationComplete());
+        assertTrue(mDut.setupIface(WLAN0_IFACE_NAME) == shouldSucceed);
+        mInOrder.verify(mISupplicantMock).linkToDeath(mSupplicantDeathCaptor.capture(),
+                anyLong());
+        // verify: addInterface is called
+        mInOrder.verify(mISupplicantMockV1_1)
+                .addInterface(any(ISupplicant.IfaceInfo.class),
+                        any(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                                .addInterfaceCallback.class));
+        if (!causeRemoteException && !getNullInterface) {
+            mInOrder.verify(mISupplicantStaIfaceMockV1_1)
+                    .registerCallback_1_1(
+                    any(android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback.class));
+        }
+
+        // Ensure we don't try to use the listInterfaces method from 1.0 version.
+        verify(mISupplicantMock, never()).listInterfaces(
+                any(ISupplicant.listInterfacesCallback.class));
+        verify(mISupplicantMock, never()).getInterface(any(ISupplicant.IfaceInfo.class),
+                        any(ISupplicant.getInterfaceCallback.class));
+    }
+
+    /**
+     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
+     * expected result. Verifies if ISupplicantStaIface manager is initialized or reset.
+     * Each of the arguments will cause a different failure mode when set true.
+     */
+    private void executeAndValidateInitializationSequenceV1_2()
+            throws Exception {
+        // Setup callback mock answers
+        doAnswer(new GetAddInterfaceAnswerV1_2(false))
+                .when(mISupplicantMockV1_1).addInterface(any(ISupplicant.IfaceInfo.class),
+                any(android.hardware.wifi.supplicant.V1_2.ISupplicant
+                        .addInterfaceCallback.class));
+
+        /** Callback registration */
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public SupplicantStatus answer(
+                    android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback cb)
+                    throws RemoteException {
+                mISupplicantStaIfaceCallbackV1_1 = cb;
+                return mStatusSuccess;
+            }
+        }).when(mISupplicantStaIfaceMockV1_2)
+                .registerCallback_1_1(
+                        any(android.hardware.wifi.supplicant.V1_1.ISupplicantStaIfaceCallback
+                                .class));
+
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public SupplicantStatus answer(
+                    android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback cb)
+                    throws RemoteException {
+                mISupplicantStaIfaceCallbackV1_2 = cb;
+                return mStatusSuccess;
+            }
+        }).when(mISupplicantStaIfaceMockV1_2)
+                .registerCallback_1_2(
+                        any(android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback
+                                .class));
+
+        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantMockV1_1,
+                mISupplicantStaIfaceMockV1_2, mWifiMonitor);
+        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
+        assertTrue(mDut.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
+                anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        // act: cause the onRegistration(...) callback to execute
+        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
+
+        assertTrue(mDut.isInitializationComplete());
+        assertTrue(mDut.setupIface(WLAN0_IFACE_NAME));
+        mInOrder.verify(mISupplicantMock).linkToDeath(mSupplicantDeathCaptor.capture(),
+                anyLong());
+        // verify: addInterface is called
+        mInOrder.verify(mISupplicantMockV1_1)
+                .addInterface(any(ISupplicant.IfaceInfo.class),
+                        any(android.hardware.wifi.supplicant.V1_2.ISupplicant
+                                .addInterfaceCallback.class));
+
+        mInOrder.verify(mISupplicantStaIfaceMockV1_2)
+                .registerCallback_1_2(
+                        any(android.hardware.wifi.supplicant.V1_2.ISupplicantStaIfaceCallback
+                                .class));
+
+        // Ensure we don't try to use the listInterfaces method from 1.0 version.
+//        verify(mISupplicantMock, never()).listInterfaces(
+//                any(ISupplicant.listInterfacesCallback.class));
+//        verify(mISupplicantMock, never()).getInterface(any(ISupplicant.IfaceInfo.class),
+//                any(ISupplicant.getInterfaceCallback.class));
+    }
+
+    /**
+     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
+     * expected result. Verifies if ISupplicantStaIface manager is initialized or reset.
+     * Each of the arguments will cause a different failure mode when set true.
+     */
+    private void executeAndValidateInitializationSequenceV1_3()
+            throws Exception {
+        // Setup callback mock answers
+        doAnswer(new GetAddInterfaceAnswerV1_3(false))
+                .when(mISupplicantMockV1_1).addInterface(any(ISupplicant.IfaceInfo.class),
+                any(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                        .addInterfaceCallback.class));
+
+        /** Callback registration */
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public SupplicantStatus answer(
+                    android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback cb)
+                    throws RemoteException {
+                mISupplicantStaIfaceCallbackV13 = spy(cb);
+                return mStatusSuccess;
+            }
+        }).when(mISupplicantStaIfaceMockV13)
+                .registerCallback_1_3(
+                        any(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback
+                                .class));
+
+        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantMockV1_1,
+                mISupplicantStaIfaceMockV13, mWifiMonitor);
+        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
+        assertTrue(mDut.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
+                anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        // act: cause the onRegistration(...) callback to execute
+        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
+
+        assertTrue(mDut.isInitializationComplete());
+        assertTrue(mDut.setupIface(WLAN0_IFACE_NAME));
+        mInOrder.verify(mISupplicantMock).linkToDeath(mSupplicantDeathCaptor.capture(),
+                anyLong());
+        // verify: addInterface is called
+        mInOrder.verify(mISupplicantMockV1_1)
+                .addInterface(any(ISupplicant.IfaceInfo.class),
+                        any(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                                .addInterfaceCallback.class));
+
+        mInOrder.verify(mISupplicantStaIfaceMockV13)
+                .registerCallback_1_3(
+                        any(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback
+                                .class));
+    }
+
+    /**
+     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
+     * expected result. Verifies if ISupplicantStaIface manager is initialized or reset.
+     * Each of the arguments will cause a different failure mode when set true.
+     */
+    private void executeAndValidateInitializationSequenceV1_4()
+            throws Exception {
+        // Setup callback mock answers
+        doAnswer(new GetAddInterfaceAnswerV1_4(false))
+                .when(mISupplicantMockV1_1).addInterface(any(ISupplicant.IfaceInfo.class),
+                any(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                        .addInterfaceCallback.class));
+
+        /** Callback registration */
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public android.hardware.wifi.supplicant.V1_4.SupplicantStatus answer(
+                    android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback cb)
+                    throws RemoteException {
+                mISupplicantStaIfaceCallbackV14 = spy(cb);
+                return mStatusSuccessV14;
+            }
+        }).when(mISupplicantStaIfaceMockV14)
+                .registerCallback_1_4(
+                        any(android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback
+                                .class));
+
+        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantMockV1_1,
+                mISupplicantStaIfaceMockV14, mWifiMonitor);
+        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
+        assertTrue(mDut.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(mServiceManagerDeathCaptor.capture(),
+                anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        // act: cause the onRegistration(...) callback to execute
+        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
+
+        assertTrue(mDut.isInitializationComplete());
+        assertTrue(mDut.setupIface(WLAN0_IFACE_NAME));
+        mInOrder.verify(mISupplicantMock).linkToDeath(mSupplicantDeathCaptor.capture(),
+                anyLong());
+        // verify: addInterface is called
+        mInOrder.verify(mISupplicantMockV1_1)
+                .addInterface(any(ISupplicant.IfaceInfo.class),
+                        any(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                                .addInterfaceCallback.class));
+
+        mInOrder.verify(mISupplicantStaIfaceMockV14)
+                .registerCallback_1_4(
+                        any(android.hardware.wifi.supplicant.V1_4.ISupplicantStaIfaceCallback
+                                .class));
+    }
+
+    private SupplicantStatus createSupplicantStatus(int code) {
+        SupplicantStatus status = new SupplicantStatus();
+        status.code = code;
+        return status;
+    }
+
+    private android.hardware.wifi.supplicant.V1_4.SupplicantStatus
+            createSupplicantStatusV1_4(int code) {
+        android.hardware.wifi.supplicant.V1_4.SupplicantStatus status =
+                new android.hardware.wifi.supplicant.V1_4.SupplicantStatus();
+        status.code = code;
+        return status;
+    }
+
+    /**
+     * Create an IfaceInfo with given type and name
+     */
+    private ISupplicant.IfaceInfo createIfaceInfo(int type, String name) {
+        ISupplicant.IfaceInfo info = new ISupplicant.IfaceInfo();
+        info.type = type;
+        info.name = name;
+        return info;
+    }
+
+    private class GetListInterfacesAnswer extends MockAnswerUtil.AnswerWithArguments {
+        private ArrayList<ISupplicant.IfaceInfo> mInterfaceList;
+
+        GetListInterfacesAnswer(ArrayList<ISupplicant.IfaceInfo> ifaces) {
+            mInterfaceList = ifaces;
+        }
+
+        public void answer(ISupplicant.listInterfacesCallback cb) {
+            cb.onValues(mStatusSuccess, mInterfaceList);
+        }
+    }
+
+    private class GetGetInterfaceAnswer extends MockAnswerUtil.AnswerWithArguments {
+        boolean mGetNullInterface;
+
+        GetGetInterfaceAnswer(boolean getNullInterface) {
+            mGetNullInterface = getNullInterface;
+        }
+
+        public void answer(ISupplicant.IfaceInfo iface, ISupplicant.getInterfaceCallback cb) {
+            if (mGetNullInterface) {
+                cb.onValues(mStatusSuccess, null);
+            } else {
+                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
+            }
+        }
+    }
+
+    private class GetAddInterfaceAnswer extends MockAnswerUtil.AnswerWithArguments {
+        boolean mGetNullInterface;
+
+        GetAddInterfaceAnswer(boolean getNullInterface) {
+            mGetNullInterface = getNullInterface;
+        }
+
+        public void answer(ISupplicant.IfaceInfo iface,
+                           android.hardware.wifi.supplicant.V1_1.ISupplicant
+                                   .addInterfaceCallback cb) {
+            if (mGetNullInterface) {
+                cb.onValues(mStatusSuccess, null);
+            } else {
+                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
+            }
+        }
+    }
+
+    private class GetAddInterfaceAnswerV1_2 extends MockAnswerUtil.AnswerWithArguments {
+        boolean mGetNullInterface;
+
+        GetAddInterfaceAnswerV1_2(boolean getNullInterface) {
+            mGetNullInterface = getNullInterface;
+        }
+
+        public void answer(ISupplicant.IfaceInfo iface,
+                android.hardware.wifi.supplicant.V1_2.ISupplicant
+                        .addInterfaceCallback cb) {
+            if (mGetNullInterface) {
+                cb.onValues(mStatusSuccess, null);
+            } else {
+                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
+            }
+        }
+    }
+
+    private class GetAddInterfaceAnswerV1_3 extends MockAnswerUtil.AnswerWithArguments {
+        boolean mGetNullInterface;
+
+        GetAddInterfaceAnswerV1_3(boolean getNullInterface) {
+            mGetNullInterface = getNullInterface;
+        }
+
+        public void answer(ISupplicant.IfaceInfo iface,
+                android.hardware.wifi.supplicant.V1_3.ISupplicant
+                        .addInterfaceCallback cb) {
+            if (mGetNullInterface) {
+                cb.onValues(mStatusSuccess, null);
+            } else {
+                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
+            }
+        }
+    }
+
+    private class GetAddInterfaceAnswerV1_4 extends MockAnswerUtil.AnswerWithArguments {
+        boolean mGetNullInterface;
+
+        GetAddInterfaceAnswerV1_4(boolean getNullInterface) {
+            mGetNullInterface = getNullInterface;
+        }
+
+        public void answer(ISupplicant.IfaceInfo iface,
+                android.hardware.wifi.supplicant.V1_4.ISupplicant
+                        .addInterfaceCallback cb) {
+            if (mGetNullInterface) {
+                cb.onValues(mStatusSuccess, null);
+            } else {
+                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
+            }
+        }
+    }
+
+    /**
+     * Setup mocks for connect sequence.
+     */
+    private void setupMocksForConnectSequence(final boolean haveExistingNetwork) throws Exception {
+        final int existingNetworkId = SUPPLICANT_NETWORK_ID;
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public SupplicantStatus answer() throws RemoteException {
+                return mStatusSuccess;
+            }
+        }).when(mISupplicantStaIfaceMock).disconnect();
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public void answer(ISupplicantStaIface.listNetworksCallback cb) throws RemoteException {
+                if (haveExistingNetwork) {
+                    cb.onValues(mStatusSuccess, new ArrayList<>(Arrays.asList(existingNetworkId)));
+                } else {
+                    cb.onValues(mStatusSuccess, new ArrayList<>());
+                }
+            }
+        }).when(mISupplicantStaIfaceMock)
+                .listNetworks(any(ISupplicantStaIface.listNetworksCallback.class));
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public SupplicantStatus answer(int id) throws RemoteException {
+                return mStatusSuccess;
+            }
+        }).when(mISupplicantStaIfaceMock).removeNetwork(eq(existingNetworkId));
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public void answer(ISupplicantStaIface.addNetworkCallback cb) throws RemoteException {
+                cb.onValues(mStatusSuccess, mock(ISupplicantStaNetwork.class));
+                return;
+            }
+        }).when(mISupplicantStaIfaceMock).addNetwork(
+                any(ISupplicantStaIface.addNetworkCallback.class));
+        when(mSupplicantStaNetworkMock.saveWifiConfiguration(any(WifiConfiguration.class)))
                 .thenReturn(true);
-        assertTrue(mDut.setSuspendModeEnabled(IFACE_NAME, ENABLE));
-        verify(mStaIfaceHalAidlMock).setSuspendModeEnabled(eq(IFACE_NAME), eq(ENABLE));
+        when(mSupplicantStaNetworkMock.select()).thenReturn(true);
     }
 
     /**
-     * Test that we can call setCountryCode
+     * Helper function to validate the connect sequence.
      */
-    @Test
-    public void testSetCountryCode() {
-        initializeWithAidlImpl(true);
-        String countryCode = "MX";
-        when(mStaIfaceHalAidlMock.setCountryCode(anyString(), anyString()))
-                .thenReturn(true);
-        assertTrue(mDut.setCountryCode(IFACE_NAME, countryCode));
-        verify(mStaIfaceHalAidlMock).setCountryCode(eq(IFACE_NAME), eq(countryCode));
+    private void validateConnectSequence(
+            final boolean haveExistingNetwork, int numNetworkAdditions) throws Exception {
+        if (haveExistingNetwork) {
+            verify(mISupplicantStaIfaceMock).removeNetwork(anyInt());
+        }
+        verify(mISupplicantStaIfaceMock, times(numNetworkAdditions))
+                .addNetwork(any(ISupplicantStaIface.addNetworkCallback.class));
+        verify(mSupplicantStaNetworkMock, times(numNetworkAdditions))
+                .saveWifiConfiguration(any(WifiConfiguration.class));
+        verify(mSupplicantStaNetworkMock, times(numNetworkAdditions)).select();
     }
 
     /**
-     * Test that we can call flushAllHlp
+     * Helper function to execute all the actions to perform connection to the network.
+     *
+     * @param newFrameworkNetworkId Framework Network Id of the new network to connect.
+     * @param haveExistingNetwork Removes the existing network.
+     * @return the WifiConfiguration object of the new network to connect.
      */
-    @Test
-    public void testFlushAllHlp() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.flushAllHlp(anyString())).thenReturn(true);
-        assertTrue(mDut.flushAllHlp(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).flushAllHlp(eq(IFACE_NAME));
+    private WifiConfiguration executeAndValidateConnectSequence(
+            final int newFrameworkNetworkId, final boolean haveExistingNetwork) throws Exception {
+        return executeAndValidateConnectSequenceWithKeyMgmt(newFrameworkNetworkId,
+                haveExistingNetwork, WifiConfiguration.SECURITY_TYPE_PSK, null);
     }
 
     /**
-     * Test that we can call addHlpReq
+     * Helper function to execute all the actions to perform connection to the network.
+     *
+     * @param newFrameworkNetworkId Framework Network Id of the new network to connect.
+     * @param haveExistingNetwork Removes the existing network.
+     * @param securityType The security type.
+     * @param wepKey if configurations are for a WEP network else null.
+     * @param hasEverConnected indicate that this configuration is ever connected or not.
+     * @return the WifiConfiguration object of the new network to connect.
+     */
+    private WifiConfiguration executeAndValidateConnectSequenceWithKeyMgmt(
+            final int newFrameworkNetworkId, final boolean haveExistingNetwork,
+            int securityType, String wepKey, boolean hasEverConnected) throws Exception {
+        setupMocksForConnectSequence(haveExistingNetwork);
+        WifiConfiguration config = new WifiConfiguration();
+        config.setSecurityParams(securityType);
+        config.networkId = newFrameworkNetworkId;
+        config.wepKeys[0] = wepKey;
+        config.wepTxKeyIndex = 0;
+        WifiConfiguration.NetworkSelectionStatus networkSelectionStatus =
+                new WifiConfiguration.NetworkSelectionStatus();
+        networkSelectionStatus.setCandidateSecurityParams(config.getSecurityParams(securityType));
+        networkSelectionStatus.setHasEverConnected(hasEverConnected);
+        config.setNetworkSelectionStatus(networkSelectionStatus);
+        assertTrue(mDut.connectToNetwork(WLAN0_IFACE_NAME, config));
+        validateConnectSequence(haveExistingNetwork, 1);
+        return config;
+    }
+
+    /**
+     * Helper function to execute all the actions to perform connection to the network.
+     *
+     * @param newFrameworkNetworkId Framework Network Id of the new network to connect.
+     * @param haveExistingNetwork Removes the existing network.
+     * @param securityType The security type.
+     * @param wepKey if configurations are for a WEP network else null.
+     * @return the WifiConfiguration object of the new network to connect.
+     */
+    private WifiConfiguration executeAndValidateConnectSequenceWithKeyMgmt(
+            final int newFrameworkNetworkId, final boolean haveExistingNetwork,
+            int securityType, String wepKey) throws Exception {
+        return executeAndValidateConnectSequenceWithKeyMgmt(
+                newFrameworkNetworkId, haveExistingNetwork,
+                securityType, wepKey, false);
+    }
+
+    /**
+     * Setup mocks for roam sequence.
+     */
+    private void setupMocksForRoamSequence(String roamBssid) throws Exception {
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public SupplicantStatus answer() throws RemoteException {
+                return mStatusSuccess;
+            }
+        }).when(mISupplicantStaIfaceMock).reassociate();
+        when(mSupplicantStaNetworkMock.setBssid(eq(roamBssid))).thenReturn(true);
+    }
+
+    /**
+     * Helper function to execute all the actions to perform roaming to the network.
+     *
+     * @param sameNetwork Roam to the same network or not.
+     * @param linkedNetwork Roam to linked network or not.
+     */
+    private void executeAndValidateRoamSequence(boolean sameNetwork, boolean linkedNetwork)
+            throws Exception {
+        int connectedNetworkId = ROAM_NETWORK_ID;
+        String roamBssid = BSSID;
+        int roamNetworkId;
+        if (sameNetwork) {
+            roamNetworkId = connectedNetworkId;
+        } else {
+            roamNetworkId = connectedNetworkId + 1;
+        }
+        executeAndValidateConnectSequence(connectedNetworkId, false);
+        setupMocksForRoamSequence(roamBssid);
+
+        WifiConfiguration roamingConfig = new WifiConfiguration();
+        roamingConfig.networkId = roamNetworkId;
+        roamingConfig.getNetworkSelectionStatus().setNetworkSelectionBSSID(roamBssid);
+        SupplicantStaNetworkHal linkedNetworkHandle = mock(SupplicantStaNetworkHal.class);
+        if (linkedNetwork) {
+            when(linkedNetworkHandle.getNetworkId()).thenReturn(roamNetworkId);
+            when(linkedNetworkHandle.saveWifiConfiguration(any())).thenReturn(true);
+            when(linkedNetworkHandle.select()).thenReturn(true);
+            mDut.setStaNetworkMockable(linkedNetworkHandle);
+            final HashMap<String, WifiConfiguration> linkedNetworks = new HashMap<>();
+            linkedNetworks.put(roamingConfig.getProfileKey(), roamingConfig);
+            assertTrue(mDut.updateLinkedNetworks(
+                    WLAN0_IFACE_NAME, connectedNetworkId, linkedNetworks));
+        }
+        assertTrue(mDut.roamToNetwork(WLAN0_IFACE_NAME, roamingConfig));
+
+        if (sameNetwork) {
+            verify(mSupplicantStaNetworkMock).setBssid(eq(roamBssid));
+            verify(mISupplicantStaIfaceMock).reassociate();
+        } else if (linkedNetwork) {
+            verify(mISupplicantStaIfaceMock, never()).removeNetwork(anyInt());
+            verify(mISupplicantStaIfaceMock, times(2))
+                    .addNetwork(any(ISupplicantStaIface.addNetworkCallback.class));
+            verify(mSupplicantStaNetworkMock).saveWifiConfiguration(any(WifiConfiguration.class));
+            verify(mSupplicantStaNetworkMock).select();
+            verify(linkedNetworkHandle).saveWifiConfiguration(any(WifiConfiguration.class));
+            verify(linkedNetworkHandle).select();
+            verify(mSupplicantStaNetworkMock, never()).setBssid(anyString());
+            verify(mISupplicantStaIfaceMock, never()).reassociate();
+        } else {
+            validateConnectSequence(false, 2);
+            verify(mSupplicantStaNetworkMock, never()).setBssid(anyString());
+            verify(mISupplicantStaIfaceMock, never()).reassociate();
+        }
+    }
+
+    /**
+     * Helper function to set up Hal cascadingly.
+     */
+    private void setupMocksForHalV1_1() throws Exception {
+        // V1_0 is set up by default, no need to do it.
+        when(mServiceManagerMock.getTransport(eq(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                .kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mISupplicantMockV1_1 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
+    }
+
+    private void setupMocksForHalV1_2() throws Exception {
+        setupMocksForHalV1_1();
+        when(mServiceManagerMock.getTransport(eq(android.hardware.wifi.supplicant.V1_2.ISupplicant
+                .kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mISupplicantMockV1_2 = mock(android.hardware.wifi.supplicant.V1_2.ISupplicant.class);
+    }
+
+    private void setupMocksForHalV1_3() throws Exception {
+        setupMocksForHalV1_2();
+        when(mServiceManagerMock.getTransport(eq(android.hardware.wifi.supplicant.V1_3.ISupplicant
+                .kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mISupplicantMockV13 = mock(android.hardware.wifi.supplicant.V1_3.ISupplicant.class);
+    }
+
+    private void setupMocksForHalV1_4() throws Exception {
+        setupMocksForHalV1_3();
+        when(mServiceManagerMock.getTransport(eq(android.hardware.wifi.supplicant.V1_4.ISupplicant
+                .kInterfaceName), anyString()))
+                .thenReturn(IServiceManager.Transport.HWBINDER);
+        mISupplicantMockV14 = mock(android.hardware.wifi.supplicant.V1_4.ISupplicant.class);
+    }
+
+    private void setupMocksForPmkCache() throws Exception {
+        /** Callback registration */
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public SupplicantStatus answer(
+                    android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback cb)
+                    throws RemoteException {
+                mISupplicantStaIfaceCallbackV13 = cb;
+                return mStatusSuccess;
+            }
+        }).when(mISupplicantStaIfaceMockV13)
+                .registerCallback_1_3(
+                        any(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIfaceCallback
+                                .class));
+
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public boolean answer(WifiConfiguration config, Map<String, String> networkExtra)
+                    throws Exception {
+                config.networkId = SUPPLICANT_NETWORK_ID;
+                return true;
+            }
+        }).when(mSupplicantStaNetworkMock)
+                .loadWifiConfiguration(any(WifiConfiguration.class), any(Map.class));
+
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public boolean answer(ArrayList<Byte> serializedData)
+                    throws Exception {
+                mISupplicantStaIfaceCallbackV13.onPmkCacheAdded(
+                        PMK_CACHE_EXPIRATION_IN_SEC, serializedData);
+                return true;
+            }
+        }).when(mSupplicantStaNetworkMock)
+                .setPmkCache(any(ArrayList.class));
+    }
+
+    private class GetWpaDriverCapabilitiesAnswer extends MockAnswerUtil.AnswerWithArguments {
+        private int mWpaDriverCapabilities;
+
+        GetWpaDriverCapabilitiesAnswer(int wpaDriverCapabilities) {
+            mWpaDriverCapabilities = wpaDriverCapabilities;
+        }
+
+        public void answer(android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                .getWpaDriverCapabilitiesCallback cb) {
+            cb.onValues(mStatusSuccess, mWpaDriverCapabilities);
+        }
+    }
+
+    private class GetWpaDriverCapabilities_1_4Answer extends MockAnswerUtil.AnswerWithArguments {
+        private int mWpaDriverCapabilities;
+
+        GetWpaDriverCapabilities_1_4Answer(int wpaDriverCapabilities) {
+            mWpaDriverCapabilities = wpaDriverCapabilities;
+        }
+
+        public void answer(android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
+                .getWpaDriverCapabilities_1_4Callback cb) {
+            cb.onValues(mStatusSuccessV14, mWpaDriverCapabilities);
+        }
+    }
+
+    /**
+     * Test To get wpa driver capabilities API on old HAL, should
+     * return 0 (not supported)
      */
     @Test
-    public void addHlpReq() {
-        initializeWithAidlImpl(true);
+    public void tetGetWpaDriverCapabilitiesOldHal() throws Exception {
+        setupMocksForHalV1_2();
+
+        executeAndValidateInitializationSequenceV1_2();
+
+        assertEquals(0, mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test Multi Band operation support (MBO).
+     */
+    @Test
+    public void testGetWpaDriverCapabilitiesMbo() throws Exception {
+        setupMocksForHalV1_3();
+
+        executeAndValidateInitializationSequenceV1_3();
+
+        doAnswer(new GetWpaDriverCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_3
+                .WpaDriverCapabilitiesMask.MBO))
+                .when(mISupplicantStaIfaceMockV13).getWpaDriverCapabilities(any(
+                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                        .getWpaDriverCapabilitiesCallback.class));
+
+        assertEquals(WIFI_FEATURE_MBO, mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test Optimized Connectivity support (OCE).
+     */
+    @Test
+    public void testGetWpaDriverCapabilitiesOce() throws Exception {
+        setupMocksForHalV1_3();
+
+        executeAndValidateInitializationSequenceV1_3();
+
+        doAnswer(new GetWpaDriverCapabilitiesAnswer(android.hardware.wifi.supplicant.V1_3
+                .WpaDriverCapabilitiesMask.MBO
+                | android.hardware.wifi.supplicant.V1_3
+                .WpaDriverCapabilitiesMask.OCE))
+                .when(mISupplicantStaIfaceMockV13).getWpaDriverCapabilities(any(
+                android.hardware.wifi.supplicant.V1_3.ISupplicantStaIface
+                        .getWpaDriverCapabilitiesCallback.class));
+
+        assertEquals(WIFI_FEATURE_MBO | WIFI_FEATURE_OCE,
+                mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test getWpaDriverCapabilities_1_4
+     */
+    @Test
+    public void testGetWpaDriverCapabilities_1_4() throws Exception {
+        setupMocksForHalV1_4();
+
+        executeAndValidateInitializationSequenceV1_4();
+
+        doAnswer(new GetWpaDriverCapabilities_1_4Answer(android.hardware.wifi.supplicant.V1_3
+                .WpaDriverCapabilitiesMask.MBO
+                | android.hardware.wifi.supplicant.V1_3
+                .WpaDriverCapabilitiesMask.OCE))
+                .when(mISupplicantStaIfaceMockV14).getWpaDriverCapabilities_1_4(any(
+                android.hardware.wifi.supplicant.V1_4.ISupplicantStaIface
+                        .getWpaDriverCapabilities_1_4Callback.class));
+
+        assertEquals(WIFI_FEATURE_MBO | WIFI_FEATURE_OCE,
+                mDut.getWpaDriverFeatureSet(WLAN0_IFACE_NAME));
+    }
+
+    /**
+     * Test the handling of BSS transition request callback.
+     */
+    @Test
+    public void testBssTmHandlingDoneCallback() throws Exception {
+        setupMocksForHalV1_3();
+        executeAndValidateInitializationSequenceV1_3();
+        assertNotNull(mISupplicantStaIfaceCallbackV13);
+        mISupplicantStaIfaceCallbackV13.onBssTmHandlingDone(new BssTmData());
+
+        ArgumentCaptor<BtmFrameData> btmFrameDataCaptor =
+                ArgumentCaptor.forClass(BtmFrameData.class);
+        verify(mWifiMonitor).broadcastBssTmHandlingDoneEvent(
+                eq(WLAN0_IFACE_NAME), btmFrameDataCaptor.capture());
+    }
+
+    /**
+     * Tests the configuring of FILS HLP packet in supplicant.
+     */
+    @Test
+    public void testAddHlpReq() throws Exception {
         byte[] dstAddr = {0x45, 0x23, 0x12, 0x12, 0x12, 0x45};
         byte[] hlpPacket = {0x00, 0x01, 0x02, 0x03, 0x04, 0x12, 0x15, 0x34, 0x55, 0x12,
                 0x12, 0x45, 0x23, 0x52, 0x32, 0x16, 0x15, 0x53, 0x62, 0x32, 0x32, 0x10};
-        when(mStaIfaceHalAidlMock.addHlpReq(anyString(), any(byte[].class), any(byte[].class)))
-                .thenReturn(true);
-        assertTrue(mDut.addHlpReq(IFACE_NAME, dstAddr, hlpPacket));
-        verify(mStaIfaceHalAidlMock).addHlpReq(eq(IFACE_NAME), eq(dstAddr), eq(hlpPacket));
+
+        setupMocksForHalV1_3();
+        when(mISupplicantStaIfaceMockV13.filsHlpAddRequest(any(byte[].class),
+                any(ArrayList.class))).thenReturn(mStatusSuccess);
+
+        // Fail before initialization is performed.
+        assertFalse(mDut.addHlpReq(WLAN0_IFACE_NAME, dstAddr, hlpPacket));
+        verify(mISupplicantStaIfaceMockV13, never()).filsHlpAddRequest(any(byte[].class),
+                any(ArrayList.class));
+
+        executeAndValidateInitializationSequenceV1_3();
+        assertNotNull(mISupplicantStaIfaceCallbackV13);
+
+        ArrayList<Byte> hlpPayload = NativeUtil.byteArrayToArrayList(hlpPacket);
+        assertTrue(mDut.addHlpReq(WLAN0_IFACE_NAME, dstAddr, hlpPacket));
+        verify(mISupplicantStaIfaceMockV13).filsHlpAddRequest(eq(dstAddr), eq(hlpPayload));
     }
 
     /**
-     * Test that we can call startWpsRegistrar
+     * Tests the flushing of FILS HLP packet from supplicant.
      */
     @Test
-    public void testStartWpsRegistrar() {
-        initializeWithAidlImpl(true);
-        String pin = "5678";
-        when(mStaIfaceHalAidlMock.startWpsRegistrar(anyString(), anyString(), anyString()))
-                .thenReturn(true);
-        assertTrue(mDut.startWpsRegistrar(IFACE_NAME, BSSID, pin));
-        verify(mStaIfaceHalAidlMock).startWpsRegistrar(eq(IFACE_NAME), eq(BSSID), eq(pin));
+    public void testFlushAllHlp() throws Exception {
+
+        setupMocksForHalV1_3();
+        when(mISupplicantStaIfaceMockV13.filsHlpFlushRequest()).thenReturn(mStatusSuccess);
+
+        // Fail before initialization is performed.
+        assertFalse(mDut.flushAllHlp(WLAN0_IFACE_NAME));
+        verify(mISupplicantStaIfaceMockV13, never()).filsHlpFlushRequest();
+
+        executeAndValidateInitializationSequenceV1_3();
+        assertNotNull(mISupplicantStaIfaceCallbackV13);
+
+        assertTrue(mDut.flushAllHlp(WLAN0_IFACE_NAME));
+        verify(mISupplicantStaIfaceMockV13).filsHlpFlushRequest();
     }
 
     /**
-     * Test that we can call startWpsPbc
+     * Tests the handling of state change V13 notification without
+     * any configured network.
      */
     @Test
-    public void testStartWpsPbc() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.startWpsPbc(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.startWpsPbc(IFACE_NAME, BSSID));
-        verify(mStaIfaceHalAidlMock).startWpsPbc(eq(IFACE_NAME), eq(BSSID));
+    public void testonStateChangedV13CallbackWithNoConfiguredNetwork() throws Exception {
+        setupMocksForHalV1_3();
+        executeAndValidateInitializationSequenceV1_3();
+        assertNotNull(mISupplicantStaIfaceCallbackV13);
+
+        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
+                ISupplicantStaIfaceCallback.State.INACTIVE,
+                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
+
+        // Can't compare WifiSsid instances because they lack an equals.
+        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
+                eq(WLAN0_IFACE_NAME), eq(WifiConfiguration.INVALID_NETWORK_ID),
+                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.INACTIVE));
     }
 
     /**
-     * Test that we can call startWpsPinKeypad
+     * Tests the handling of state change V13 notification to
+     * associated after configuring a network.
      */
     @Test
-    public void testStartWpsPinKeypad() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.startWpsPinKeypad(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.startWpsPinKeypad(IFACE_NAME, PIN));
-        verify(mStaIfaceHalAidlMock).startWpsPinKeypad(eq(IFACE_NAME), eq(PIN));
+    public void testStateChangeV13ToAssociatedCallback() throws Exception {
+        setupMocksForHalV1_3();
+        executeAndValidateInitializationSequenceV1_3();
+        int frameworkNetworkId = 6;
+        executeAndValidateConnectSequence(frameworkNetworkId, false);
+        assertNotNull(mISupplicantStaIfaceCallbackV13);
+
+        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
+                ISupplicantStaIfaceCallback.State.ASSOCIATED,
+                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
+
+        verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
+                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
+                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.ASSOCIATED));
     }
 
     /**
-     * Test that we can call startWpsPinDisplay
+     * Tests the handling of state change V13 notification to
+     * completed after configuring a network.
      */
     @Test
-    public void testStartWpsPinDisplay() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.startWpsPinDisplay(anyString(), anyString())).thenReturn(PIN);
-        assertEquals(PIN, mDut.startWpsPinDisplay(IFACE_NAME, BSSID));
-        verify(mStaIfaceHalAidlMock).startWpsPinDisplay(eq(IFACE_NAME), eq(BSSID));
+    public void testStateChangeV13ToCompletedCallback() throws Exception {
+        InOrder wifiMonitorInOrder = inOrder(mWifiMonitor);
+        setupMocksForHalV1_3();
+        executeAndValidateInitializationSequenceV1_3();
+        assertNotNull(mISupplicantStaIfaceCallbackV13);
+        int frameworkNetworkId = 6;
+        executeAndValidateConnectSequence(frameworkNetworkId, false);
+
+        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
+                ISupplicantStaIfaceCallback.State.COMPLETED,
+                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
+
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
+                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)));
+
+        wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
+                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(false), eq(wifiSsid), eq(BSSID));
+        wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
+                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
+                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
     }
 
     /**
-     * Test that we can call cancelWps
+     * Tests the handling of incorrect network passwords, edge case
+     * when onStateChanged_1_3() is used.
+     *
+     * If the network is removed during 4-way handshake, do not call it a password mismatch.
      */
     @Test
-    public void testCancelWps() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.cancelWps(anyString())).thenReturn(true);
-        assertTrue(mDut.cancelWps(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).cancelWps(eq(IFACE_NAME));
+    public void testNetworkRemovedDuring4wayWhenonStateChangedV13IsUsed() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+        setupMocksForHalV1_3();
+        executeAndValidateInitializationSequenceV1_3();
+        assertNotNull(mISupplicantStaIfaceCallbackV13);
+
+        int reasonCode = 3;
+
+        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
+                ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
+        mISupplicantStaIfaceCallback.onNetworkRemoved(SUPPLICANT_NETWORK_ID);
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
+        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
+                anyInt());
+    }
+
+     /**
+      * Tests the handling of incorrect network passwords when
+      * onStateChanged_1_3() is used, edge case.
+      *
+      * If the disconnect reason is "IE in 4way differs", do not call it a password mismatch.
+      */
+    @Test
+    public void testIeDiffersWhenonStateChangedV13IsUsed() throws Exception {
+        executeAndValidateInitializationSequence();
+        assertNotNull(mISupplicantStaIfaceCallback);
+        setupMocksForHalV1_3();
+        executeAndValidateInitializationSequenceV1_3();
+        assertNotNull(mISupplicantStaIfaceCallbackV13);
+
+        int reasonCode = ISupplicantStaIfaceCallback.ReasonCode.IE_IN_4WAY_DIFFERS;
+
+        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
+                ISupplicantStaIfaceCallback.State.FOURWAY_HANDSHAKE,
+                NativeUtil.macAddressToByteArray(BSSID),
+                SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID), false);
+        mISupplicantStaIfaceCallback.onDisconnected(
+                NativeUtil.macAddressToByteArray(BSSID), true, reasonCode);
+        verify(mWifiMonitor, times(0)).broadcastAuthenticationFailureEvent(any(), anyInt(),
+                anyInt());
     }
 
     /**
-     * Test that we can call setExternalSim
+     * Tests the handling of state change V13 notification to
+     * completed (with FILS HLP IE sent) after configuring a
+     * network.
      */
     @Test
-    public void testSetExternalSim() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setExternalSim(anyString(), anyBoolean())).thenReturn(true);
-        assertTrue(mDut.setExternalSim(IFACE_NAME, ENABLE));
-        verify(mStaIfaceHalAidlMock).setExternalSim(eq(IFACE_NAME), eq(ENABLE));
+    public void testStateChangeV13WithFilsHlpIESentToCompletedCallback() throws Exception {
+        InOrder wifiMonitorInOrder = inOrder(mWifiMonitor);
+        setupMocksForHalV1_3();
+        executeAndValidateInitializationSequenceV1_3();
+        assertNotNull(mISupplicantStaIfaceCallbackV13);
+        int frameworkNetworkId = 6;
+        executeAndValidateConnectSequence(frameworkNetworkId, false);
+
+        mISupplicantStaIfaceCallbackV13.onStateChanged_1_3(
+                ISupplicantStaIfaceCallback.State.COMPLETED,
+                NativeUtil.macAddressToByteArray(BSSID), SUPPLICANT_NETWORK_ID,
+                NativeUtil.decodeSsid(SUPPLICANT_SSID), true);
+
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(
+                NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(SUPPLICANT_SSID)));
+
+        wifiMonitorInOrder.verify(mWifiMonitor).broadcastNetworkConnectionEvent(
+                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId), eq(true), eq(wifiSsid), eq(BSSID));
+        wifiMonitorInOrder.verify(mWifiMonitor).broadcastSupplicantStateChangeEvent(
+                eq(WLAN0_IFACE_NAME), eq(frameworkNetworkId),
+                any(WifiSsid.class), eq(BSSID), eq(SupplicantState.COMPLETED));
+    }
+
+    @Test
+    public void testDisableNetworkAfterConnected() throws Exception {
+        when(mSupplicantStaNetworkMock.disable()).thenReturn(true);
+
+        executeAndValidateInitializationSequence();
+
+        // Connect to a network.
+        executeAndValidateConnectSequence(4, false);
+
+        // Disable it.
+        assertTrue(mDut.disableCurrentNetwork(WLAN0_IFACE_NAME));
+        verify(mSupplicantStaNetworkMock).disable();
     }
 
     /**
-     * Test that we can call enableAutoReconnect
+     * Tests the handling of association rejection notification V1_4.
      */
     @Test
-    public void testEnableAutoReconnect() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.enableAutoReconnect(anyString(), anyBoolean()))
-                .thenReturn(true);
-        assertTrue(mDut.enableAutoReconnect(IFACE_NAME, ENABLE));
-        verify(mStaIfaceHalAidlMock).enableAutoReconnect(eq(IFACE_NAME), eq(ENABLE));
+    public void testAssociationRejectionCallback_1_4() throws Exception {
+        setupMocksForHalV1_4();
+        executeAndValidateInitializationSequenceV1_4();
+        assertNotNull(mISupplicantStaIfaceCallbackV14);
+        AssociationRejectionData assocRejectData = new AssociationRejectionData();
+        assocRejectData.ssid = NativeUtil.decodeSsid(SUPPLICANT_SSID);
+        assocRejectData.bssid = NativeUtil.macAddressToByteArray(BSSID);
+        assocRejectData.statusCode = 5;
+        assocRejectData.isOceRssiBasedAssocRejectAttrPresent = true;
+        assocRejectData.oceRssiBasedAssocRejectData.retryDelayS = 10;
+        assocRejectData.oceRssiBasedAssocRejectData.deltaRssi = 20;
+        mISupplicantStaIfaceCallbackV14.onAssociationRejected_1_4(assocRejectData);
+
+        ArgumentCaptor<AssocRejectEventInfo> assocRejectEventInfoCaptor =
+                ArgumentCaptor.forClass(AssocRejectEventInfo.class);
+        verify(mWifiMonitor).broadcastAssociationRejectionEvent(
+                eq(WLAN0_IFACE_NAME), assocRejectEventInfoCaptor.capture());
+        AssocRejectEventInfo assocRejectEventInfo =
+                (AssocRejectEventInfo) assocRejectEventInfoCaptor.getValue();
+        assertNotNull(assocRejectEventInfo);
+        assertEquals(SUPPLICANT_SSID, assocRejectEventInfo.ssid);
+        assertEquals(BSSID, assocRejectEventInfo.bssid);
+        assertEquals(assocRejectData.statusCode, assocRejectEventInfo.statusCode);
+        assertFalse(assocRejectEventInfo.timedOut);
+        assertNotNull(assocRejectEventInfo.oceRssiBasedAssocRejectInfo);
+        assertEquals(assocRejectData.oceRssiBasedAssocRejectData.retryDelayS,
+                assocRejectEventInfo.oceRssiBasedAssocRejectInfo.mRetryDelayS);
+        assertEquals(assocRejectData.oceRssiBasedAssocRejectData.deltaRssi,
+                assocRejectEventInfo.oceRssiBasedAssocRejectInfo.mDeltaRssi);
+        assertNull(assocRejectEventInfo.mboAssocDisallowedInfo);
     }
 
     /**
-     * Test that we can call setLogLevel
+     * Tests the handling of network not found notification.
      */
     @Test
-    public void testSetLogLevel() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setLogLevel(anyBoolean())).thenReturn(true);
-        assertTrue(mDut.setLogLevel(ENABLE));
-        verify(mStaIfaceHalAidlMock).setLogLevel(eq(ENABLE));
+    public void testNetworkNotFoundCallback() throws Exception {
+        setupMocksForHalV1_4();
+        executeAndValidateInitializationSequenceV1_4();
+        assertNotNull(mISupplicantStaIfaceCallbackV14);
+        mISupplicantStaIfaceCallbackV14.onNetworkNotFound(NativeUtil.decodeSsid(SUPPLICANT_SSID));
+
+        verify(mWifiMonitor).broadcastNetworkNotFoundEvent(
+                eq(WLAN0_IFACE_NAME), eq(SUPPLICANT_SSID));
+
     }
 
-    /**
-     * Test that we can call setConcurrencyPriority
-     */
-    @Test
-    public void testSetConcurrencyPriority() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setConcurrencyPriority(anyBoolean())).thenReturn(true);
-        assertTrue(mDut.setConcurrencyPriority(ENABLE));
-        verify(mStaIfaceHalAidlMock).setConcurrencyPriority(eq(ENABLE));
-    }
-
-    /**
-     * Test that we can call getAdvancedCapabilities
-     */
-    @Test
-    public void testGetAdvancedCapabilities() {
-        initializeWithAidlImpl(true);
-        long capabilities = 0X1234;
-        when(mStaIfaceHalAidlMock.getAdvancedCapabilities(anyString())).thenReturn(capabilities);
-        assertEquals(capabilities, mDut.getAdvancedCapabilities(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).getAdvancedCapabilities(eq(IFACE_NAME));
-    }
-
-    /**
-     * Test that we can call getWpaDriverFeatureSet
-     */
-    @Test
-    public void testGetWpaDriverFeatureSet() {
-        initializeWithAidlImpl(true);
-        long capabilities = 0X1234;
-        when(mStaIfaceHalAidlMock.getWpaDriverFeatureSet(anyString())).thenReturn(capabilities);
-        assertEquals(capabilities, mDut.getWpaDriverFeatureSet(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).getWpaDriverFeatureSet(eq(IFACE_NAME));
-    }
-
-    /**
-     * Test that we can call getConnectionCapabilities
-     */
-    @Test
-    public void testGetConnectionCapabilities() {
-        initializeWithAidlImpl(true);
-        WifiNative.ConnectionCapabilities capabilities =
-                mock(WifiNative.ConnectionCapabilities.class);
-        when(mStaIfaceHalAidlMock.getConnectionCapabilities(anyString())).thenReturn(capabilities);
-        assertEquals(capabilities, mDut.getConnectionCapabilities(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).getConnectionCapabilities(eq(IFACE_NAME));
-    }
-
-    /**
-     * Test that we can call addDppPeerUri
-     */
-    @Test
-    public void testAddDppPeerUri() {
-        initializeWithAidlImpl(true);
-        String uri = "/blah";
-        when(mStaIfaceHalAidlMock.addDppPeerUri(anyString(), anyString())).thenReturn(NETWORK_ID);
-        assertEquals(NETWORK_ID, mDut.addDppPeerUri(IFACE_NAME, uri));
-        verify(mStaIfaceHalAidlMock).addDppPeerUri(eq(IFACE_NAME), eq(uri));
-    }
-
-    /**
-     * Test that we can call removeDppUri
-     */
-    @Test
-    public void testRemoveDppUri() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.removeDppUri(anyString(), anyInt())).thenReturn(true);
-        assertTrue(mDut.removeDppUri(IFACE_NAME, NETWORK_ID));
-        verify(mStaIfaceHalAidlMock).removeDppUri(eq(IFACE_NAME), eq(NETWORK_ID));
-    }
-
-    /**
-     * Test that we can call stopDppInitiator
-     */
-    @Test
-    public void testStopDppInitiator() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.stopDppInitiator(anyString())).thenReturn(true);
-        assertTrue(mDut.stopDppInitiator(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).stopDppInitiator(eq(IFACE_NAME));
-    }
-
-    /**
-     * Test that we can call startDppConfiguratorInitiator
-     */
-    @Test
-    public void testStartDppConfiguratorInitiator() {
-        initializeWithAidlImpl(true);
-        int netRole = 1;
-        int securityAkm = 2;
-        String ssid = "someSsid";
-        String password = "somePassword";
-        String psk = "somePsk";
-        String sKey = "3077020101042088a442d945b0c2fcd6346e4b47dd5cd1abebcc3b251"
-                + "a2e6a615111d918b3e749a00a06082a8648ce3d030107a14403420004d34506c1c2fd500c38768b"
-                + "76293cb208f203cc92b42976c31e1b51914c5200400b521ef3f608a163875c203b34430ad4aa52d"
-                + "b3e95eacb7481782328d4fb45af";
-        byte[] key = HexEncoding.decode(sKey.toCharArray(), false);
-        when(mStaIfaceHalAidlMock.startDppConfiguratorInitiator(anyString(), anyInt(), anyInt(),
-                anyString(), anyString(), anyString(), anyInt(), anyInt(),
-                any(byte[].class))).thenReturn(true);
-        assertTrue(mDut.startDppConfiguratorInitiator(IFACE_NAME, PEER_ID, OWN_ID, ssid,
-                password, psk, netRole, securityAkm, key));
-        verify(mStaIfaceHalAidlMock).startDppConfiguratorInitiator(eq(IFACE_NAME), eq(PEER_ID),
-                eq(OWN_ID), eq(ssid), eq(password), eq(psk), eq(netRole), eq(securityAkm), eq(key));
-    }
-
-    /**
-     * Test that we can call startDppEnrolleeInitiator
-     */
-    @Test
-    public void testStartDppEnrolleeInitiator() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.startDppEnrolleeInitiator(anyString(), anyInt(), anyInt()))
-                .thenReturn(true);
-        assertTrue(mDut.startDppEnrolleeInitiator(IFACE_NAME, PEER_ID, OWN_ID));
-        verify(mStaIfaceHalAidlMock).startDppEnrolleeInitiator(
-                eq(IFACE_NAME), eq(PEER_ID), eq(OWN_ID));
-    }
-
-    /**
-     * Test that we can call generateDppBootstrapInfoForResponder
-     */
-    @Test
-    public void testGenerateDppBootstrapInfoForResponder() {
-        initializeWithAidlImpl(true);
-        WifiNative.DppBootstrapQrCodeInfo qrCodeInfo = new WifiNative.DppBootstrapQrCodeInfo();
-        when(mStaIfaceHalAidlMock.generateDppBootstrapInfoForResponder(anyString(), anyString(),
-                anyString(), anyInt())).thenReturn(qrCodeInfo);
-        assertEquals(qrCodeInfo, mDut.generateDppBootstrapInfoForResponder(
-                IFACE_NAME, BSSID, PARAMS, MODE));
-        verify(mStaIfaceHalAidlMock).generateDppBootstrapInfoForResponder(
-                eq(IFACE_NAME), eq(BSSID), eq(PARAMS), eq(MODE));
-    }
-
-    /**
-     * Test that we can call startDppEnrolleeResponder
-     */
-    @Test
-    public void startDppEnrolleeResponder() {
-        initializeWithAidlImpl(true);
-        int listenChannel = 5;
-        when(mStaIfaceHalAidlMock.startDppEnrolleeResponder(anyString(), anyInt()))
-                .thenReturn(true);
-        assertTrue(mDut.startDppEnrolleeResponder(IFACE_NAME, listenChannel));
-        verify(mStaIfaceHalAidlMock).startDppEnrolleeResponder(eq(IFACE_NAME), eq(listenChannel));
-    }
-
-    /**
-     * Test that we can call stopDppResponder
-     */
-    @Test
-    public void testStopDppResponder() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.stopDppResponder(anyString(), anyInt())).thenReturn(true);
-        assertTrue(mDut.stopDppResponder(IFACE_NAME, NETWORK_ID));
-        verify(mStaIfaceHalAidlMock).stopDppResponder(eq(IFACE_NAME), eq(NETWORK_ID));
-    }
-
-    /**
-     * Test that we can call registerDppCallback
-     */
-    @Test
-    public void registerDppCallback() {
-        initializeWithAidlImpl(true);
-        WifiNative.DppEventCallback dppCallback = mock(WifiNative.DppEventCallback.class);
-        doNothing().when(mStaIfaceHalAidlMock).registerDppCallback(
-                any(WifiNative.DppEventCallback.class));
-        mDut.registerDppCallback(dppCallback);
-        verify(mStaIfaceHalAidlMock).registerDppCallback(dppCallback);
-    }
-
-    /**
-     * Test that we can call setMboCellularDataStatus
-     */
-    @Test
-    public void testSetMboCellularDataStatus() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setMboCellularDataStatus(anyString(), anyBoolean()))
-                .thenReturn(true);
-        assertTrue(mDut.setMboCellularDataStatus(IFACE_NAME, ENABLE));
-        verify(mStaIfaceHalAidlMock).setMboCellularDataStatus(eq(IFACE_NAME), eq(ENABLE));
-    }
-
-    /**
-     * Test that we can call updateOnLinkedNetworkRoaming
-     */
-    @Test
-    public void testUpdateOnLinkedNetworkRoaming() {
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.updateOnLinkedNetworkRoaming(anyString(), anyInt(), anyBoolean()))
-                .thenReturn(true);
-        assertTrue(mDut.updateOnLinkedNetworkRoaming(IFACE_NAME, NETWORK_ID, ENABLE));
-        verify(mStaIfaceHalAidlMock).updateOnLinkedNetworkRoaming(
-                eq(IFACE_NAME), eq(NETWORK_ID), eq(ENABLE));
-    }
-
-    /**
-     * Test that we can call updateLinkedNetworks
-     */
-    @Test
-    public void testUpdateLinkedNetworks() {
-        initializeWithAidlImpl(true);
-        Map<String, WifiConfiguration> linkedConfigurations =
-                new HashMap<String, WifiConfiguration>();
-        when(mStaIfaceHalAidlMock.updateLinkedNetworks(anyString(), anyInt(), any(Map.class)))
-                .thenReturn(true);
-        assertTrue(mDut.updateLinkedNetworks(IFACE_NAME, NETWORK_ID, linkedConfigurations));
-        verify(mStaIfaceHalAidlMock).updateLinkedNetworks(
-                eq(IFACE_NAME), eq(NETWORK_ID), eq(linkedConfigurations));
-    }
-
-    /**
-     * Test that we can call getCurrentNetworkSecurityParams
-     */
-    @Test
-    public void testGetCurrentNetworkSecurityParams() {
-        initializeWithAidlImpl(true);
-        SecurityParams params = mock(SecurityParams.class);
-        when(mStaIfaceHalAidlMock.getCurrentNetworkSecurityParams(anyString())).thenReturn(params);
-        assertEquals(params, mDut.getCurrentNetworkSecurityParams(IFACE_NAME));
-        verify(mStaIfaceHalAidlMock).getCurrentNetworkSecurityParams(eq(IFACE_NAME));
-    }
-
-    /*
-     * Test the creation of a valid QosPolicyRequest object.
-     */
-    @Test
-    public void testCreateValidQosPolicyRequest() {
-        byte[] srcIp = new byte[]{127, 0, 0, 1};
-        QosPolicyRequest request = new QosPolicyRequest(QOS_POLICY_ID, QOS_POLICY_REQUEST_TYPE,
-                QOS_POLICY_DSCP, new QosPolicyClassifierParams(true, srcIp, false, null,
-                        QOS_POLICY_SRC_PORT, QOS_POLICY_DST_PORT_RANGE, QOS_POLICY_PROTOCOL));
-        assertEquals(QOS_POLICY_ID, request.policyId);
-        assertEquals(QOS_POLICY_DSCP, request.dscp);
-        assertTrue(request.isAddRequest());
-        assertFalse(request.isRemoveRequest());
-
-        assertTrue(request.classifierParams.isValid);
-        assertTrue(request.classifierParams.hasSrcIp);
-        assertFalse(request.classifierParams.hasDstIp);
-
-        assertEquals(QOS_POLICY_SRC_PORT, request.classifierParams.srcPort);
-        assertEquals(QOS_POLICY_PROTOCOL, request.classifierParams.protocol);
-        assertEquals(new Range(QOS_POLICY_DST_PORT_RANGE[0], QOS_POLICY_DST_PORT_RANGE[1]),
-                request.classifierParams.dstPortRange);
-        assertTrue(Arrays.equals(srcIp, request.classifierParams.srcIp.getAddress()));
-    }
-
-    /*
-     * Test that a QosPolicyRequest object is marked as invalid if an invalid
-     * srcIp is passed in during construction.
-     */
-    @Test
-    public void testCreateQosPolicyRequestWithInvalidSrcIp() {
-        byte[] srcIp = new byte[]{53};
-        QosPolicyRequest request = new QosPolicyRequest(QOS_POLICY_ID, QOS_POLICY_REQUEST_TYPE,
-                QOS_POLICY_DSCP, new QosPolicyClassifierParams(true, srcIp, false, null,
-                QOS_POLICY_SRC_PORT, QOS_POLICY_DST_PORT_RANGE, QOS_POLICY_PROTOCOL));
-        assertEquals(QOS_POLICY_ID, request.policyId);
-        assertEquals(QOS_POLICY_DSCP, request.dscp);
-        assertTrue(request.isAddRequest());
-        assertFalse(request.isRemoveRequest());
-        assertFalse(request.classifierParams.isValid);
-    }
-
-    /*
-     * Test that a QosPolicyRequest object is marked as invalid if an invalid
-     * dstIp is passed in during construction.
-     */
-    @Test
-    public void testCreateQosPolicyRequestWithInvalidDstIp() {
-        byte[] dstIp = new byte[]{53};
-        QosPolicyRequest request = new QosPolicyRequest(QOS_POLICY_ID, QOS_POLICY_REQUEST_TYPE,
-                QOS_POLICY_DSCP, new QosPolicyClassifierParams(false, null, true, dstIp,
-                QOS_POLICY_SRC_PORT, QOS_POLICY_DST_PORT_RANGE, QOS_POLICY_PROTOCOL));
-        assertEquals(QOS_POLICY_ID, request.policyId);
-        assertEquals(QOS_POLICY_DSCP, request.dscp);
-        assertTrue(request.isAddRequest());
-        assertFalse(request.isRemoveRequest());
-        assertFalse(request.classifierParams.isValid);
-    }
-
-    /*
-     * Test that a QosPolicyRequest object is marked as invalid if an invalid
-     * dstPortRange is passed in during construction.
-     */
-    @Test
-    public void testCreateQosPolicyRequestWithInvalidDstPortRange() {
-        int[] dstPortRange = new int[]{250, 131};
-        QosPolicyRequest request = new QosPolicyRequest(QOS_POLICY_ID, QOS_POLICY_REQUEST_TYPE,
-                QOS_POLICY_DSCP, new QosPolicyClassifierParams(false, null, false, null,
-                QOS_POLICY_SRC_PORT, dstPortRange, QOS_POLICY_PROTOCOL));
-        assertEquals(QOS_POLICY_ID, request.policyId);
-        assertEquals(QOS_POLICY_DSCP, request.dscp);
-        assertTrue(request.isAddRequest());
-        assertFalse(request.isRemoveRequest());
-        assertFalse(request.classifierParams.isValid);
-    }
-
-    /**
-     * Test that we can call setEapAnonymousIdentity
-     */
-    @Test
-    public void testSetEapAnonymousIdentity() {
-        final String anonymousIdentity = "abc@realm.net";
-        initializeWithAidlImpl(true);
-        when(mStaIfaceHalAidlMock.setEapAnonymousIdentity(anyString(), anyString()))
-                .thenReturn(true);
-        assertTrue(mDut.setEapAnonymousIdentity(IFACE_NAME, anonymousIdentity));
-        verify(mStaIfaceHalAidlMock).setEapAnonymousIdentity(eq(IFACE_NAME), eq(anonymousIdentity));
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkCallbackAidlImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkCallbackAidlImplTest.java
deleted file mode 100644
index 78b9316..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkCallbackAidlImplTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.validateMockitoUsage;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.withSettings;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.dx.mockito.inline.extended.ExtendedMockito;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.MockitoSession;
-import org.mockito.quality.Strictness;
-
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-
-/**
- * Unit tests for SupplicantStaNetworkHalAidlImpl
- */
-@SmallTest
-public class SupplicantStaNetworkCallbackAidlImplTest extends WifiBaseTest {
-    private static final int TEST_NETWORK_ID = 9;
-    private static final String TEST_SSID = "TestSsid";
-    private static final String TEST_INTERFACE = "wlan1";
-
-    @Mock private SupplicantStaNetworkHalAidlImpl mSupplicantStaNetworkHalAidlImpl;
-    @Mock private Object mLock;
-    @Mock private WifiMonitor mWifiMonitor;
-    @Mock private CertificateFactory mCertificateFactory;
-    @Mock private X509Certificate mX509Certificate;
-
-    private MockitoSession mSession;
-    private SupplicantStaNetworkCallbackAidlImpl mSupplicantStaNetworkCallbackAidlImpl;
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        // static mocking
-        mSession = ExtendedMockito.mockitoSession()
-                .mockStatic(CertificateFactory.class, withSettings().lenient())
-                .strictness(Strictness.LENIENT)
-                .startMocking();
-        when(CertificateFactory.getInstance(any())).thenReturn(mCertificateFactory);
-        when(mCertificateFactory.generateCertificate(any())).thenReturn(mX509Certificate);
-        when(mX509Certificate.getBasicConstraints()).thenReturn(0);
-
-        mSupplicantStaNetworkCallbackAidlImpl =  new SupplicantStaNetworkCallbackAidlImpl(
-                mSupplicantStaNetworkHalAidlImpl, TEST_NETWORK_ID, TEST_SSID, TEST_INTERFACE,
-                mLock, mWifiMonitor);
-    }
-
-    /**
-     * Called after each test
-     */
-    @After
-    public void cleanup() {
-        validateMockitoUsage();
-        if (mSession != null) {
-            mSession.finishMocking();
-        }
-    }
-
-    /** verify onServerCertificateAvailable sunny case. */
-    @Test
-    public void testOnCertificateSuccess() throws Exception {
-        mSupplicantStaNetworkCallbackAidlImpl.onServerCertificateAvailable(
-                0, "subject".getBytes(), "certHash".getBytes(), "cert".getBytes());
-        verify(mWifiMonitor).broadcastCertificationEvent(
-                eq(TEST_INTERFACE), eq(TEST_NETWORK_ID),
-                eq(TEST_SSID), eq(0), eq(mX509Certificate));
-    }
-
-    /** verify onServerCertificateAvailable with illegal arguments. */
-    @Test
-    public void testOnCertificateIllegalInput() throws Exception {
-        // Illegal argument: negative depth.
-        mSupplicantStaNetworkCallbackAidlImpl.onServerCertificateAvailable(
-                -1, "subject".getBytes(), "certHash".getBytes(), "cert".getBytes());
-        verify(mWifiMonitor, never()).broadcastCertificationEvent(
-                any(), anyInt(), any(), anyInt(), any());
-
-        // Illegal argument: depth over 100.
-        mSupplicantStaNetworkCallbackAidlImpl.onServerCertificateAvailable(
-                101, "subject".getBytes(), "certHash".getBytes(), "cert".getBytes());
-        verify(mWifiMonitor, never()).broadcastCertificationEvent(
-                any(), anyInt(), any(), anyInt(), any());
-
-        // Illegal argument: null subject
-        mSupplicantStaNetworkCallbackAidlImpl.onServerCertificateAvailable(
-                0, null, "certHash".getBytes(), "cert".getBytes());
-        verify(mWifiMonitor, never()).broadcastCertificationEvent(
-                any(), anyInt(), any(), anyInt(), any());
-
-        // Illegal argument: null cert hash
-        mSupplicantStaNetworkCallbackAidlImpl.onServerCertificateAvailable(
-                0, "subject".getBytes(), null, "cert".getBytes());
-        verify(mWifiMonitor, never()).broadcastCertificationEvent(
-                any(), anyInt(), any(), anyInt(), any());
-
-        // Illegal argument: null cert.
-        mSupplicantStaNetworkCallbackAidlImpl.onServerCertificateAvailable(
-                0, "subject".getBytes(), "certHash".getBytes(), null);
-        verify(mWifiMonitor, never()).broadcastCertificationEvent(
-                any(), anyInt(), any(), anyInt(), any());
-    }
-
-    /** verify onServerCertificateAvailable with CertificateException. */
-    @Test
-    public void testOnCertificateWithCertificateException() throws Exception {
-        doThrow(new CertificateException())
-                .when(mCertificateFactory).generateCertificate(any());
-        mSupplicantStaNetworkCallbackAidlImpl.onServerCertificateAvailable(
-                0, "subject".getBytes(), "certHash".getBytes(), "cert".getBytes());
-        verify(mWifiMonitor, never()).broadcastCertificationEvent(
-                any(), anyInt(), any(), anyInt(), any());
-    }
-
-    /** verify onServerCertificateAvailable with IllegalArgumentException. */
-    @Test
-    public void testOnCertificateWithIllegalArgumentException() throws Exception {
-        doThrow(new IllegalArgumentException())
-                .when(mCertificateFactory).generateCertificate(any());
-        mSupplicantStaNetworkCallbackAidlImpl.onServerCertificateAvailable(
-                0, "subject".getBytes(), "certHash".getBytes(), "cert".getBytes());
-        verify(mWifiMonitor, never()).broadcastCertificationEvent(
-                any(), anyInt(), any(), anyInt(), any());
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalAidlImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalAidlImplTest.java
deleted file mode 100644
index 500ceae..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalAidlImplTest.java
+++ /dev/null
@@ -1,1640 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.app.test.MockAnswerUtil.AnswerWithArguments;
-import android.content.Context;
-import android.hardware.wifi.supplicant.GroupCipherMask;
-import android.hardware.wifi.supplicant.GsmRand;
-import android.hardware.wifi.supplicant.ISupplicantStaNetwork;
-import android.hardware.wifi.supplicant.ISupplicantStaNetworkCallback;
-import android.hardware.wifi.supplicant.KeyMgmtMask;
-import android.hardware.wifi.supplicant.NetworkRequestEapSimGsmAuthParams;
-import android.hardware.wifi.supplicant.NetworkRequestEapSimUmtsAuthParams;
-import android.hardware.wifi.supplicant.NetworkResponseEapSimGsmAuthParams;
-import android.hardware.wifi.supplicant.NetworkResponseEapSimUmtsAuthParams;
-import android.hardware.wifi.supplicant.PairwiseCipherMask;
-import android.hardware.wifi.supplicant.SaeH2eMode;
-import android.hardware.wifi.supplicant.SupplicantStatusCode;
-import android.net.wifi.SecurityParams;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiEnterpriseConfig;
-import android.net.wifi.WifiManager;
-import android.os.RemoteException;
-import android.os.ServiceSpecificException;
-import android.text.TextUtils;
-import android.util.Log;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.util.NativeUtil;
-import com.android.wifi.resources.R;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.BitSet;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-
-/**
- * Unit tests for SupplicantStaNetworkHalAidlImpl
- */
-@SmallTest
-public class SupplicantStaNetworkHalAidlImplTest extends WifiBaseTest {
-    private static final String IFACE_NAME = "wlan0";
-    private static final Map<String, String> NETWORK_EXTRAS_VALUES = new HashMap<>();
-    static {
-        NETWORK_EXTRAS_VALUES.put("key1", "value1");
-        NETWORK_EXTRAS_VALUES.put("key2", "value2");
-    }
-    private static final String NETWORK_EXTRAS_SERIALIZED =
-            "%7B%22key1%22%3A%22value1%22%2C%22key2%22%3A%22value2%22%7D";
-    private static final String ANONYMOUS_IDENTITY = "aaa@bbb.cc.ddd";
-    private static final String TEST_DECORATED_IDENTITY_PREFIX = "androidwifi.dev!";
-    private static final byte[] TEST_SELECTED_RCOI_BYTE_ARRAY =
-            {(byte) 0xaa, (byte) 0xbb, (byte) 0xcc};
-    private static final long TEST_SELECTED_RCOI_LONG = 0xaabbccL;
-
-    private SupplicantStaNetworkHalAidlImpl mSupplicantNetwork;
-    @Mock private ISupplicantStaNetwork mISupplicantStaNetworkMock;
-    @Mock private Context mContext;
-    @Mock private WifiMonitor mWifiMonitor;
-    @Mock private WifiGlobals mWifiGlobals;
-    private long mAdvanceKeyMgmtFeatures = 0;
-
-    private SupplicantNetworkVariables mSupplicantVariables;
-    private MockResources mResources;
-    private ISupplicantStaNetworkCallback mISupplicantStaNetworkCallback;
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mSupplicantVariables = new SupplicantNetworkVariables();
-        setupISupplicantNetworkMock();
-
-        mResources = new MockResources();
-        when(mContext.getResources()).thenReturn(mResources);
-        when(mWifiGlobals.isWpa3SaeUpgradeOffloadEnabled()).thenReturn(true);
-
-        mAdvanceKeyMgmtFeatures |= WifiManager.WIFI_FEATURE_WPA3_SUITE_B;
-        mSupplicantNetwork = new SupplicantStaNetworkHalAidlImpl(
-                mISupplicantStaNetworkMock, IFACE_NAME, mContext, mWifiMonitor,
-                mWifiGlobals, mAdvanceKeyMgmtFeatures);
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testOweNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createOweNetwork();
-        config.updateIdentifier = "46";
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testOpenNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenHiddenNetwork();
-        config.updateIdentifier = "45";
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the saving/loading of WifiConfiguration to wpa_supplicant with SAE password.
-     */
-    @Test
-    public void testSaePasswordNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork();
-        testWifiConfigurationSaveLoad(config);
-        verify(mISupplicantStaNetworkMock).setSaePassword(any(String.class));
-        verify(mISupplicantStaNetworkMock, never()).getSaePassword();
-        verify(mISupplicantStaNetworkMock, never()).setPsk(any(byte[].class));
-        verify(mISupplicantStaNetworkMock, never()).getPsk();
-    }
-
-    /**
-     * Tests the saving/loading of WifiConfiguration to wpa_supplicant with psk passphrase.
-     */
-    @Test
-    public void testPskPassphraseNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-
-        // Set the new defaults
-        testWifiConfigurationSaveLoad(config);
-        verify(mISupplicantStaNetworkMock).setPskPassphrase(anyString());
-        verify(mISupplicantStaNetworkMock).getPskPassphrase();
-        verify(mISupplicantStaNetworkMock, never()).setPsk(any(byte[].class));
-        verify(mISupplicantStaNetworkMock, never()).getPsk();
-        verify(mISupplicantStaNetworkMock)
-                .setPairwiseCipher(PairwiseCipherMask.TKIP
-                        | PairwiseCipherMask.CCMP);
-        verify(mISupplicantStaNetworkMock)
-                .setGroupCipher(GroupCipherMask.WEP40
-                        | GroupCipherMask.WEP104
-                        | GroupCipherMask.TKIP
-                        | GroupCipherMask.CCMP);
-    }
-
-    /**
-     * Tests the saving/loading of WifiConfiguration to wpa_supplicant with raw psk.
-     */
-    @Test
-    public void testPskNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        config.preSharedKey = "945ef00c463c2a7c2496376b13263d1531366b46377179a4b17b393687450779";
-        testWifiConfigurationSaveLoad(config);
-        verify(mISupplicantStaNetworkMock).setPsk(any(byte[].class));
-        verify(mISupplicantStaNetworkMock).getPsk();
-        verify(mISupplicantStaNetworkMock, never()).setPskPassphrase(anyString());
-        verify(mISupplicantStaNetworkMock).getPskPassphrase();
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant removes enclosing quotes of psk
-     * passphrase
-     */
-    @Test
-    public void testPskNetworkWifiConfigurationSaveRemovesPskQuotes() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        config.preSharedKey = "\"quoted_psd\"";
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        assertEquals(mSupplicantVariables.pskPassphrase,
-                NativeUtil.removeEnclosingQuotes(config.preSharedKey));
-    }
-
-    /**
-     * Tests the saving/loading of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testWepNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createWepHiddenNetwork();
-        config.BSSID = " *NOT USED* "; // we want the other bssid!
-        config.getNetworkSelectionStatus().setNetworkSelectionBSSID("34:45:19:09:45:66");
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testEapPeapGtcNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        config.enterpriseConfig =
-                WifiConfigurationTestUtil.createPEAPWifiEnterpriseConfigWithGTCPhase2();
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testEapTlsNoneNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        config.enterpriseConfig =
-                WifiConfigurationTestUtil.createTLSWifiEnterpriseConfigWithNonePhase2();
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testEapTlsNoneClientCertNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        config.enterpriseConfig =
-                WifiConfigurationTestUtil.createTLSWifiEnterpriseConfigWithNonePhase2();
-        config.enterpriseConfig.setClientCertificateAlias("test_alias");
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testEapTlsNoneClientCertNetworkWithOcspWifiConfigurationSaveLoad()
-            throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        config.enterpriseConfig =
-                WifiConfigurationTestUtil.createTLSWifiEnterpriseConfigWithNonePhase2();
-        config.enterpriseConfig.setClientCertificateAlias("test_alias");
-        config.enterpriseConfig.setOcsp(WifiEnterpriseConfig.OCSP_REQUIRE_CERT_STATUS);
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testEapTlsAkaNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        config.enterpriseConfig =
-                WifiConfigurationTestUtil.createTLSWifiEnterpriseConfigWithAkaPhase2();
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the saving/loading of WifiConfiguration to wpa_supplicant with Suite-B-192
-     */
-    @Test
-    public void testEapSuiteBRsaNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapSuiteBNetwork();
-        config.enableSuiteBCiphers(false, true);
-
-        testWifiConfigurationSaveLoad(config);
-        verify(mISupplicantStaNetworkMock, never()).enableSuiteBEapOpenSslCiphers();
-        verify(mISupplicantStaNetworkMock).enableTlsSuiteBEapPhase1Param(anyBoolean());
-    }
-
-    /**
-     * Tests the saving/loading of WifiConfiguration to wpa_supplicant with Suite-B-192
-     */
-    @Test
-    public void testEapSuiteBEcdsaNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapSuiteBNetwork();
-        config.enableSuiteBCiphers(true, false);
-
-        testWifiConfigurationSaveLoad(config);
-        verify(mISupplicantStaNetworkMock).enableSuiteBEapOpenSslCiphers();
-        verify(mISupplicantStaNetworkMock, never())
-                .enableTlsSuiteBEapPhase1Param(anyBoolean());
-    }
-
-    /**
-     * Tests the saving/loading of WifiConfiguration with FILS AKM to wpa_supplicant.
-     */
-    @Test
-    public void testTLSWifiEnterpriseConfigWithFilsEapErp() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        config.enterpriseConfig =
-                WifiConfigurationTestUtil.createTLSWifiEnterpriseConfigWithNonePhase2();
-        config.enableFils(true, false);
-        config.enterpriseConfig.setFieldValue(WifiEnterpriseConfig.EAP_ERP, "1");
-        testWifiConfigurationSaveLoad(config);
-        // Check the supplicant variables to ensure that we have added the FILS AKM.
-        assertTrue((mSupplicantVariables.keyMgmtMask & KeyMgmtMask.FILS_SHA256)
-                == KeyMgmtMask.FILS_SHA256);
-        verify(mISupplicantStaNetworkMock).setEapErp(eq(true));
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testWapiPskNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createWapiPskNetwork();
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testWapiPskHexNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createWapiPskNetwork();
-        config.preSharedKey =
-                "1234567890abcdef0"
-                        + "1234567890abcdef0";
-        // WAPI should accept a hex bytes whose length is not exact 32.
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the saving of WifiConfiguration to wpa_supplicant.
-     */
-    @Test
-    public void testWapiCertNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createWapiCertNetwork();
-        testWifiConfigurationSaveLoad(config);
-    }
-
-    /**
-     * Tests the failure to save ssid.
-     */
-    @Test
-    public void testSsidSaveFailure() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createWepHiddenNetwork();
-        // Assume that the default params are used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantStaNetworkMock).setSsid(any(byte[].class));
-        assertFalse(mSupplicantNetwork.saveWifiConfiguration(config));
-    }
-
-    /**
-     * Tests the failure to save invalid bssid (less than 6 bytes in the
-     * {@link WifiConfiguration#BSSID} being saved).
-     */
-    @Test
-    public void testInvalidBssidSaveFailure() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createWepHiddenNetwork();
-        config.getNetworkSelectionStatus().setNetworkSelectionBSSID("45:34:23:12");
-        // Assume that the default params are used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        try {
-            assertFalse(mSupplicantNetwork.saveWifiConfiguration(config));
-        } catch (IllegalArgumentException e) {
-            // Expect exception to be thrown
-            return;
-        }
-        assertTrue(false);
-    }
-
-    /**
-     * Tests the parsing of GSM auth response parameters.
-     */
-    @Test
-    public void testSendNetworkEapSimGsmAuthResponseWith2KcSresPair() throws Exception {
-        final byte[] kc = new byte[]{0x45, 0x45, 0x32, 0x34, 0x45, 0x10, 0x34, 0x12};
-        final byte[] sres = new byte[]{0x12, 0x10, 0x32, 0x23};
-
-        // Send 2 kc/sres pairs for this request.
-        String paramsStr = ":" + NativeUtil.hexStringFromByteArray(kc)
-                + ":" + NativeUtil.hexStringFromByteArray(sres)
-                + ":" + NativeUtil.hexStringFromByteArray(kc)
-                + ":" + NativeUtil.hexStringFromByteArray(sres);
-
-        ArgumentCaptor<NetworkResponseEapSimGsmAuthParams[]> paramCaptor =
-                ArgumentCaptor.forClass(NetworkResponseEapSimGsmAuthParams[].class);
-        doNothing().when(mISupplicantStaNetworkMock).sendNetworkEapSimGsmAuthResponse(
-                paramCaptor.capture());
-        assertTrue(mSupplicantNetwork.sendNetworkEapSimGsmAuthResponse(paramsStr));
-
-        NetworkResponseEapSimGsmAuthParams[] captured = paramCaptor.getValue();
-        assertEquals(2, captured.length);
-        assertArrayEquals(kc, captured[0].kc);
-        assertArrayEquals(sres, captured[0].sres);
-        assertArrayEquals(kc, captured[1].kc);
-        assertArrayEquals(sres, captured[1].sres);
-    }
-
-    /**
-     * Tests the parsing of GSM auth response parameters.
-     */
-    @Test
-    public void testSendNetworkEapSimGsmAuthResponseWith3KcSresPair() throws Exception {
-        final byte[] kc1 = new byte[]{0x45, 0x45, 0x32, 0x34, 0x45, 0x10, 0x34, 0x12};
-        final byte[] sres1 = new byte[]{0x12, 0x10, 0x32, 0x23};
-        final byte[] kc2 = new byte[]{0x45, 0x34, 0x12, 0x34, 0x45, 0x10, 0x34, 0x12};
-        final byte[] sres2 = new byte[]{0x12, 0x23, 0x12, 0x23};
-        final byte[] kc3 = new byte[]{0x25, 0x34, 0x12, 0x14, 0x45, 0x10, 0x34, 0x12};
-        final byte[] sres3 = new byte[]{0x42, 0x23, 0x22, 0x23};
-
-        // Send 3 kc/sres pairs for this request.
-        String paramsStr = ":" + NativeUtil.hexStringFromByteArray(kc1)
-                + ":" + NativeUtil.hexStringFromByteArray(sres1)
-                + ":" + NativeUtil.hexStringFromByteArray(kc2)
-                + ":" + NativeUtil.hexStringFromByteArray(sres2)
-                + ":" + NativeUtil.hexStringFromByteArray(kc3)
-                + ":" + NativeUtil.hexStringFromByteArray(sres3);
-
-        ArgumentCaptor<NetworkResponseEapSimGsmAuthParams[]> paramCaptor =
-                ArgumentCaptor.forClass(NetworkResponseEapSimGsmAuthParams[].class);
-        doNothing().when(mISupplicantStaNetworkMock).sendNetworkEapSimGsmAuthResponse(
-                paramCaptor.capture());
-        assertTrue(mSupplicantNetwork.sendNetworkEapSimGsmAuthResponse(paramsStr));
-
-        NetworkResponseEapSimGsmAuthParams[] captured = paramCaptor.getValue();
-        assertEquals(3, captured.length);
-        assertArrayEquals(kc1, captured[0].kc);
-        assertArrayEquals(sres1, captured[0].sres);
-        assertArrayEquals(kc2, captured[1].kc);
-        assertArrayEquals(sres2, captured[1].sres);
-        assertArrayEquals(kc3, captured[2].kc);
-        assertArrayEquals(sres3, captured[2].sres);
-    }
-
-    /**
-     * Tests the parsing of invalid GSM auth response parameters (invalid kc & sres lengths).
-     */
-    @Test
-    public void testSendInvalidKcSresLenNetworkEapSimGsmAuthResponse() throws Exception {
-        final byte[] kc1 = new byte[]{0x45, 0x45, 0x32, 0x34, 0x45, 0x10, 0x34};
-        final byte[] sres1 = new byte[]{0x12, 0x10, 0x23};
-        final byte[] kc2 = new byte[]{0x45, 0x34, 0x12, 0x34, 0x45, 0x10, 0x34, 0x12};
-        final byte[] sres2 = new byte[]{0x12, 0x23, 0x12, 0x23};
-
-        // Send 2 kc/sres pairs for this request.
-        String paramsStr = ":" + NativeUtil.hexStringFromByteArray(kc1)
-                + ":" + NativeUtil.hexStringFromByteArray(sres1)
-                + ":" + NativeUtil.hexStringFromByteArray(kc2)
-                + ":" + NativeUtil.hexStringFromByteArray(sres2);
-
-        assertFalse(mSupplicantNetwork.sendNetworkEapSimGsmAuthResponse(paramsStr));
-        verify(mISupplicantStaNetworkMock, never())
-                .sendNetworkEapSimGsmAuthResponse(any(NetworkResponseEapSimGsmAuthParams[].class));
-    }
-
-    /**
-     * Tests the parsing of invalid GSM auth response parameters (invalid number of kc/sres pairs).
-     */
-    @Test
-    public void testSendInvalidKcSresPairNumNetworkEapSimGsmAuthResponse() throws Exception {
-        final byte[] kc = new byte[]{0x45, 0x34, 0x12, 0x34, 0x45, 0x10, 0x34, 0x12};
-        final byte[] sres = new byte[]{0x12, 0x23, 0x12, 0x23};
-
-        // Send 1 kc/sres pair for this request.
-        String paramsStr = ":" + NativeUtil.hexStringFromByteArray(kc)
-                + ":" + NativeUtil.hexStringFromByteArray(sres);
-
-        assertFalse(mSupplicantNetwork.sendNetworkEapSimGsmAuthResponse(paramsStr));
-        verify(mISupplicantStaNetworkMock, never())
-                .sendNetworkEapSimGsmAuthResponse(any(NetworkResponseEapSimGsmAuthParams[].class));
-    }
-
-    /**
-     * Tests the parsing of UMTS auth response parameters.
-     */
-    @Test
-    public void testSendNetworkEapSimUmtsAuthResponse() throws Exception {
-        final byte[] ik = new byte[]{0x45, 0x45, 0x32, 0x34, 0x45, 0x10, 0x34, 0x12, 0x23, 0x34,
-                0x33, 0x23, 0x34, 0x10, 0x40, 0x34};
-        final byte[] ck = new byte[]{0x12, 0x10, 0x32, 0x23, 0x45, 0x10, 0x34, 0x12, 0x23, 0x34,
-                0x33, 0x23, 0x34, 0x10, 0x40, 0x34};
-        final byte[] res = new byte[]{0x12, 0x10, 0x32, 0x23, 0x45, 0x10, 0x34, 0x12, 0x23, 0x34};
-        String paramsStr = ":" + NativeUtil.hexStringFromByteArray(ik)
-                + ":" + NativeUtil.hexStringFromByteArray(ck)
-                + ":" + NativeUtil.hexStringFromByteArray(res);
-
-        ArgumentCaptor<NetworkResponseEapSimUmtsAuthParams> paramCaptor =
-                ArgumentCaptor.forClass(NetworkResponseEapSimUmtsAuthParams.class);
-        doNothing().when(mISupplicantStaNetworkMock).sendNetworkEapSimUmtsAuthResponse(
-                paramCaptor.capture());
-        assertTrue(mSupplicantNetwork.sendNetworkEapSimUmtsAuthResponse(paramsStr));
-        assertArrayEquals(ik, paramCaptor.getValue().ik);
-        assertArrayEquals(ck, paramCaptor.getValue().ck);
-        assertArrayEquals(res, paramCaptor.getValue().res);
-    }
-
-    /**
-     * Tests the parsing of invalid UMTS auth response parameters (invalid ik, ck lengths).
-     */
-    @Test
-    public void testSendInvalidNetworkEapSimUmtsAuthResponse() throws Exception {
-        final byte[] ik = new byte[]{0x45, 0x45, 0x32, 0x34, 0x45, 0x10, 0x34, 0x12};
-        final byte[] ck = new byte[]{0x12, 0x10, 0x32, 0x23, 0x45, 0x10, 0x34, 0x12, 0x23, 0x34,
-                0x33, 0x23, 0x34, 0x10, 0x40};
-        final byte[] res = new byte[]{0x12, 0x10, 0x32, 0x23, 0x45, 0x10, 0x34, 0x12, 0x23, 0x34};
-        String paramsStr = ":" + NativeUtil.hexStringFromByteArray(ik)
-                + ":" + NativeUtil.hexStringFromByteArray(ck)
-                + ":" + NativeUtil.hexStringFromByteArray(res);
-
-        assertFalse(mSupplicantNetwork.sendNetworkEapSimUmtsAuthResponse(paramsStr));
-        verify(mISupplicantStaNetworkMock, never())
-                .sendNetworkEapSimUmtsAuthResponse(any(NetworkResponseEapSimUmtsAuthParams.class));
-    }
-
-    /**
-     * Tests the parsing of UMTS auts response parameters.
-     */
-    @Test
-    public void testSendNetworkEapSimUmtsAutsResponse() throws Exception {
-        final byte[] auts = new byte[]{0x45, 0x45, 0x32, 0x34, 0x45, 0x10, 0x34, 0x12, 0x23, 0x34,
-                0x33, 0x23, 0x34, 0x10};
-        String paramsStr = ":" + NativeUtil.hexStringFromByteArray(auts);
-
-        ArgumentCaptor<byte[]> autsCaptor = ArgumentCaptor.forClass(byte[].class);
-        doNothing().when(mISupplicantStaNetworkMock).sendNetworkEapSimUmtsAutsResponse(
-                autsCaptor.capture());
-        assertTrue(mSupplicantNetwork.sendNetworkEapSimUmtsAutsResponse(paramsStr));
-        assertArrayEquals(auts, autsCaptor.getValue());
-    }
-
-    /**
-     * Tests the parsing of invalid UMTS auts response parameters (invalid auts length).
-     */
-    @Test
-    public void testSendInvalidNetworkEapSimUmtsAutsResponse() throws Exception {
-        final byte[] auts = new byte[]{0x45, 0x45, 0x32, 0x34, 0x45, 0x10, 0x34, 0x12, 0x23};
-        String paramsStr = ":" + NativeUtil.hexStringFromByteArray(auts);
-
-        assertFalse(mSupplicantNetwork.sendNetworkEapSimUmtsAutsResponse(paramsStr));
-        verify(mISupplicantStaNetworkMock, never())
-                .sendNetworkEapSimUmtsAutsResponse(any(byte[].class));
-    }
-
-    /**
-     * Tests the parsing of identity string.
-     */
-    @Test
-    public void testSendNetworkEapIdentityResponse() throws Exception {
-        final String identityStr = "test@test.com";
-        final String encryptedIdentityStr = "test2@test.com";
-
-        ArgumentCaptor<byte[]> idCaptor = ArgumentCaptor.forClass(byte[].class);
-        ArgumentCaptor<byte[]> encryptedIdCaptor = ArgumentCaptor.forClass(byte[].class);
-        doNothing().when(mISupplicantStaNetworkMock).sendNetworkEapIdentityResponse(
-                idCaptor.capture(), encryptedIdCaptor.capture());
-        assertTrue(mSupplicantNetwork.sendNetworkEapIdentityResponse(identityStr,
-                encryptedIdentityStr));
-
-        assertEquals(identityStr, NativeUtil.stringFromByteArray(idCaptor.getValue()));
-        assertEquals(encryptedIdentityStr,
-                NativeUtil.stringFromByteArray(encryptedIdCaptor.getValue()));
-    }
-
-    /**
-     * Tests the addition of FT flags when the device supports it.
-     */
-    @Test
-    public void testAddFtPskFlags() throws Exception {
-        mResources.setBoolean(R.bool.config_wifi_fast_bss_transition_enabled, true);
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        // Assume that the default params are used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        // Check the supplicant variables to ensure that we have added the FT flags.
-        assertTrue((mSupplicantVariables.keyMgmtMask & KeyMgmtMask.FT_PSK)
-                == KeyMgmtMask.FT_PSK);
-
-        WifiConfiguration loadConfig = new WifiConfiguration();
-        Map<String, String> networkExtras = new HashMap<>();
-        assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
-        // The FT flags should be stripped out when reading it back.
-        WifiConfigurationTestUtil.assertConfigurationEqualForSupplicant(config, loadConfig);
-    }
-
-    /**
-     * Tests the addition of FT flags when the device supports it.
-     */
-    @Test
-    public void testAddFtEapFlags() throws Exception {
-        mResources.setBoolean(R.bool.config_wifi_fast_bss_transition_enabled, true);
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        // Check the supplicant variables to ensure that we have added the FT flags.
-        assertTrue((mSupplicantVariables.keyMgmtMask & KeyMgmtMask.FT_EAP)
-                == KeyMgmtMask.FT_EAP);
-
-        WifiConfiguration loadConfig = new WifiConfiguration();
-        Map<String, String> networkExtras = new HashMap<>();
-        assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
-        // The FT flags should be stripped out when reading it back.
-        WifiConfigurationTestUtil.assertConfigurationEqualForSupplicant(config, loadConfig);
-    }
-
-    /**
-     * Tests the addition of SHA256 flags (WPA_PSK_SHA256)
-     */
-    @Test
-    public void testAddPskSha256Flags() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        // Check the supplicant variables to ensure that we have added the SHA256 flags.
-        assertTrue((mSupplicantVariables.keyMgmtMask & KeyMgmtMask.WPA_PSK_SHA256)
-                == KeyMgmtMask.WPA_PSK_SHA256);
-
-        WifiConfiguration loadConfig = new WifiConfiguration();
-        Map<String, String> networkExtras = new HashMap<>();
-        assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
-        // The SHA256 flags should be stripped out when reading it back.
-        WifiConfigurationTestUtil.assertConfigurationEqualForSupplicant(config, loadConfig);
-    }
-
-    /**
-     * Tests the addition of SHA256 flags (WPA_EAP_SHA256)
-     */
-    @Test
-    public void testAddEapSha256Flags() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        // Check the supplicant variables to ensure that we have added the SHA256 flags.
-        assertTrue((mSupplicantVariables.keyMgmtMask & KeyMgmtMask.WPA_EAP_SHA256)
-                == KeyMgmtMask.WPA_EAP_SHA256);
-
-        WifiConfiguration loadConfig = new WifiConfiguration();
-        Map<String, String> networkExtras = new HashMap<>();
-        assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
-        // The SHA256 flags should be stripped out when reading it back.
-        WifiConfigurationTestUtil.assertConfigurationEqualForSupplicant(config, loadConfig);
-    }
-
-    /**
-     * Tests the addition of multiple AKM when the device supports it.
-     */
-    @Test
-    public void testAddPskSaeAkmWhenAutoUpgradeOffloadIsSupported() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        // Check the supplicant variables to ensure that we have added the FT flags.
-        assertEquals(KeyMgmtMask.WPA_PSK, (mSupplicantVariables.keyMgmtMask & KeyMgmtMask.WPA_PSK));
-        assertEquals(KeyMgmtMask.SAE, (mSupplicantVariables.keyMgmtMask & KeyMgmtMask.SAE));
-
-        WifiConfiguration loadConfig = new WifiConfiguration();
-        Map<String, String> networkExtras = new HashMap<>();
-        assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
-        // The additional SAE AMK should be stripped out when reading it back.
-        WifiConfigurationTestUtil.assertConfigurationEqualForSupplicant(config, loadConfig);
-    }
-
-    /**
-     * Tests the PMF is disabled when the device supports multiple AKMs.
-     */
-    @Test
-    public void testPmfDisabledWhenAutoUpgradeOffloadIsSupportedAndSaeSelected() throws Exception {
-        when(mWifiGlobals.isWpa3SaeUpgradeOffloadEnabled()).thenReturn(true);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_SAE));
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        // PSK and SAE is set and PMF is disable when SAE is selected.
-        assertEquals(KeyMgmtMask.WPA_PSK, (mSupplicantVariables.keyMgmtMask & KeyMgmtMask.WPA_PSK));
-        assertEquals(KeyMgmtMask.SAE, (mSupplicantVariables.keyMgmtMask & KeyMgmtMask.SAE));
-        assertEquals(false, mSupplicantVariables.requirePmf);
-    }
-
-    /**
-     * Tests the PMF is kept when the device does not support multiple AKMs.
-     */
-    @Test
-    public void testPmfEnabledWhenAutoUpgradeOffloadNotSupportedAndSaeSelected() throws Exception {
-        when(mWifiGlobals.isWpa3SaeUpgradeOffloadEnabled()).thenReturn(false);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_SAE));
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        // Only SAE is set and PMF is enabled when SAE is selected.
-        assertEquals(0, (mSupplicantVariables.keyMgmtMask & KeyMgmtMask.WPA_PSK));
-        assertEquals(KeyMgmtMask.SAE, (mSupplicantVariables.keyMgmtMask & KeyMgmtMask.SAE));
-        assertEquals(true, mSupplicantVariables.requirePmf);
-    }
-
-    /**
-     * Tests the addition of multiple AKM when the device does not support it.
-     */
-    @Test
-    public void testAddPskSaeAkmWhenAutoUpgradeOffloadIsNotSupported() throws Exception {
-        when(mWifiGlobals.isWpa3SaeUpgradeOffloadEnabled()).thenReturn(false);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        // Check the supplicant variables to ensure that we have added the FT flags.
-        assertEquals(KeyMgmtMask.WPA_PSK, (mSupplicantVariables.keyMgmtMask & KeyMgmtMask.WPA_PSK));
-        assertEquals(0, (mSupplicantVariables.keyMgmtMask & KeyMgmtMask.SAE));
-
-        WifiConfiguration loadConfig = new WifiConfiguration();
-        Map<String, String> networkExtras = new HashMap<>();
-        assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
-        WifiConfigurationTestUtil.assertConfigurationEqualForSupplicant(config, loadConfig);
-    }
-
-    /**
-     * Tests the retrieval of WPS NFC token.
-     */
-    @Test
-    public void testGetWpsNfcConfigurationToken() throws Exception {
-        byte[] token = {0x45, 0x34};
-        when(mISupplicantStaNetworkMock.getWpsNfcConfigurationToken()).thenReturn(token);
-        assertEquals("4534", mSupplicantNetwork.getWpsNfcConfigurationToken());
-    }
-
-    /**
-     * Tests that callback registration failure triggers a failure in saving network config.
-     */
-    @Test
-    public void testSaveFailureDueToCallbackReg() throws Exception {
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantStaNetworkMock)
-                .registerCallback(any(ISupplicantStaNetworkCallback.class));
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertFalse(mSupplicantNetwork.saveWifiConfiguration(config));
-    }
-
-    /**
-     * Tests the network gsm auth callback.
-     */
-    @Test
-    public void testNetworkEapGsmAuthCallback() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        assertNotNull(mISupplicantStaNetworkCallback);
-
-        // Now trigger eap gsm callback and ensure that the event is broadcast via WifiMonitor.
-        NetworkRequestEapSimGsmAuthParams params = new NetworkRequestEapSimGsmAuthParams();
-        GsmRand[] rands = new GsmRand[3];
-        String[] expectedRands = new String[3];
-        Random random = new Random();
-        for (int i = 0; i < rands.length; i++) {
-            rands[i] = new GsmRand();
-            rands[i].data = new byte[16];
-            random.nextBytes(rands[i].data);
-            expectedRands[i] = NativeUtil.hexStringFromByteArray(rands[i].data);
-        }
-        params.rands = rands;
-
-        mISupplicantStaNetworkCallback.onNetworkEapSimGsmAuthRequest(params);
-        verify(mWifiMonitor).broadcastNetworkGsmAuthRequestEvent(
-                eq(IFACE_NAME), eq(config.networkId), eq(config.SSID), eq(expectedRands));
-    }
-
-    /**
-     * Tests the network umts auth callback.
-     */
-    @Test
-    public void testNetworkEapUmtsAuthCallback() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        assertNotNull(mISupplicantStaNetworkCallback);
-
-        // Now trigger eap gsm callback and ensure that the event is broadcast via WifiMonitor.
-        NetworkRequestEapSimUmtsAuthParams params = new NetworkRequestEapSimUmtsAuthParams();
-        Random random = new Random();
-        params.autn = new byte[16];
-        params.rand = new byte[16];
-        random.nextBytes(params.autn);
-        random.nextBytes(params.rand);
-
-        String[] expectedRands = {
-                NativeUtil.hexStringFromByteArray(params.rand),
-                NativeUtil.hexStringFromByteArray(params.autn)
-        };
-
-        mISupplicantStaNetworkCallback.onNetworkEapSimUmtsAuthRequest(params);
-        verify(mWifiMonitor).broadcastNetworkUmtsAuthRequestEvent(
-                eq(IFACE_NAME), eq(config.networkId), eq(config.SSID), eq(expectedRands));
-    }
-
-    /**
-     * Tests the network identity callback.
-     */
-    @Test
-    public void testNetworkIdentityCallback() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        assertNotNull(mISupplicantStaNetworkCallback);
-
-        // Now trigger identity request callback and ensure that the event is broadcast via
-        // WifiMonitor.
-        mISupplicantStaNetworkCallback.onNetworkEapIdentityRequest();
-        verify(mWifiMonitor).broadcastNetworkIdentityRequestEvent(
-                eq(IFACE_NAME), eq(config.networkId), eq(config.SSID));
-    }
-
-    private void testWifiConfigurationSaveLoad(WifiConfiguration config) {
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        // Save the configuration using the supplicant network HAL
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        WifiConfiguration loadConfig = new WifiConfiguration();
-        Map<String, String> networkExtras = new HashMap<>();
-        assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
-        WifiConfigurationTestUtil.assertConfigurationEqualForSupplicant(config, loadConfig);
-        assertEquals(config.getProfileKey(),
-                networkExtras.get(SupplicantStaNetworkHalHidlImpl.ID_STRING_KEY_CONFIG_KEY));
-        assertEquals(
-                config.creatorUid,
-                Integer.parseInt(networkExtras.get(
-                        SupplicantStaNetworkHalHidlImpl.ID_STRING_KEY_CREATOR_UID)));
-        // There is no getter for this one, so check the supplicant variable.
-        if (!TextUtils.isEmpty(config.updateIdentifier)) {
-            assertEquals(Integer.parseInt(config.updateIdentifier),
-                    mSupplicantVariables.updateIdentifier);
-        }
-        // There is no getter for this one, so check the supplicant variable.
-        String oppKeyCaching =
-                config.enterpriseConfig.getFieldValue(WifiEnterpriseConfig.OPP_KEY_CACHING);
-        if (!TextUtils.isEmpty(oppKeyCaching)) {
-            assertEquals(
-                    Integer.parseInt(oppKeyCaching) == 1 ? true : false,
-                    mSupplicantVariables.eapProactiveKeyCaching);
-        }
-        // There is no getter for this one, so check the supplicant variable.
-        String eapErp =
-                config.enterpriseConfig.getFieldValue(WifiEnterpriseConfig.EAP_ERP);
-        if (!TextUtils.isEmpty(eapErp)) {
-            assertEquals(
-                    Integer.parseInt(eapErp) == 1 ? true : false,
-                    mSupplicantVariables.eapErp);
-        }
-    }
-
-    /**
-     * Verifies that createNetworkExtra() & parseNetworkExtra correctly writes a serialized and
-     * URL-encoded JSON object.
-     */
-    @Test
-    public void testNetworkExtra() {
-        assertEquals(NETWORK_EXTRAS_SERIALIZED,
-                SupplicantStaNetworkHalHidlImpl.createNetworkExtra(NETWORK_EXTRAS_VALUES));
-        assertEquals(NETWORK_EXTRAS_VALUES,
-                SupplicantStaNetworkHalHidlImpl.parseNetworkExtra(NETWORK_EXTRAS_SERIALIZED));
-    }
-
-    /**
-     * Verifies that fetachEapAnonymousIdentity() can get the anonymous identity from supplicant.
-     */
-    @Test
-    public void testFetchEapAnonymousIdentity() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        config.enterpriseConfig.setAnonymousIdentity(ANONYMOUS_IDENTITY);
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        assertEquals(ANONYMOUS_IDENTITY, mSupplicantNetwork.fetchEapAnonymousIdentity());
-    }
-
-    /**
-     * Verifies that setPmkCache can set PMK cache
-     */
-    @Test
-    public void testSetPmkCache() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        config.enterpriseConfig =
-                WifiConfigurationTestUtil.createTLSWifiEnterpriseConfigWithNonePhase2();
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        byte[] serializedData = {0x12, 0x34, 0x56};
-        assertTrue(mSupplicantNetwork.setPmkCache(serializedData));
-        assertEquals(serializedData, mSupplicantVariables.serializedPmkCache);
-    }
-
-    /** Verifies that setSaeH2eMode works with SaeH2eOnlyMode enabled */
-    @Test
-    public void testEnableSaeH2eOnlyMode() throws Exception {
-        when(mWifiGlobals.isWpa3SaeH2eSupported()).thenReturn(true);
-        WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork();
-        config.enableSaeH2eOnlyMode(true);
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        verify(mISupplicantStaNetworkMock).setSaeH2eMode(eq(SaeH2eMode.H2E_MANDATORY));
-    }
-
-    /** Verifies that setSaeH2eMode works with SaeH2eOnlyMode disabled */
-    @Test
-    public void testDisableSaeH2eOnlyMode() throws Exception {
-        when(mWifiGlobals.isWpa3SaeH2eSupported()).thenReturn(true);
-        WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork();
-        config.enableSaeH2eOnlyMode(false);
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        verify(mISupplicantStaNetworkMock).setSaeH2eMode(eq(SaeH2eMode.H2E_OPTIONAL));
-    }
-
-    /** Verifies that setSaeH2eMode works when Wpa3SaeH2e is not supported */
-    @Test
-    public void testDisableSaeH2eOnlyModeWhenH2eNotSupported() throws Exception {
-        when(mWifiGlobals.isWpa3SaeH2eSupported()).thenReturn(false);
-        WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork();
-        config.enableSaeH2eOnlyMode(false);
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        verify(mISupplicantStaNetworkMock).setSaeH2eMode(eq(SaeH2eMode.DISABLED));
-    }
-
-    /**
-     * Tests the saving/loading of WifiConfiguration to wpa_supplicant with psk passphrase
-     */
-    @Test
-    public void testSaeNetworkWifiConfigurationSaveLoad() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork();
-
-        // Set the new defaults
-        testWifiConfigurationSaveLoad(config);
-        verify(mISupplicantStaNetworkMock).setSaePassword(anyString());
-        verify(mISupplicantStaNetworkMock, never()).setPsk(any(byte[].class));
-        verify(mISupplicantStaNetworkMock, never()).getPsk();
-        verify(mISupplicantStaNetworkMock)
-                .setPairwiseCipher(PairwiseCipherMask.CCMP
-                        | PairwiseCipherMask.GCMP_128
-                        | PairwiseCipherMask.GCMP_256);
-        verify(mISupplicantStaNetworkMock)
-                .setGroupCipher(GroupCipherMask.CCMP
-                        | GroupCipherMask.GCMP_128
-                        | GroupCipherMask.GCMP_256);
-    }
-
-    private int getExpectedPairwiseCiphers(WifiConfiguration config) {
-        int halMaskValue = 0;
-
-        // The default security params are used in the test.
-        BitSet allowedPairwiseCiphers = config.getDefaultSecurityParams()
-                .getAllowedPairwiseCiphers();
-
-        if (allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.GCMP_128)) {
-            halMaskValue |= PairwiseCipherMask.GCMP_128;
-        }
-
-        if (allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.SMS4)) {
-            halMaskValue |= PairwiseCipherMask.SMS4;
-        }
-
-        if (allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.GCMP_256)) {
-            halMaskValue |= PairwiseCipherMask.GCMP_256;
-        }
-
-        if (allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.CCMP)) {
-            halMaskValue |= PairwiseCipherMask.CCMP;
-        }
-
-        return halMaskValue;
-    }
-
-    private int getExpectedGroupCiphers(WifiConfiguration config) {
-        int halMaskValue = 0;
-
-        // The default security params are used in the test.
-        BitSet allowedGroupCiphers = config.getDefaultSecurityParams().getAllowedGroupCiphers();
-
-        if (allowedGroupCiphers.get(WifiConfiguration.GroupCipher.GCMP_128)) {
-            halMaskValue |= GroupCipherMask.GCMP_128;
-        }
-
-        if (allowedGroupCiphers.get(WifiConfiguration.GroupCipher.GCMP_256)) {
-            halMaskValue |= GroupCipherMask.GCMP_256;
-        }
-
-        if (allowedGroupCiphers.get(WifiConfiguration.GroupCipher.CCMP)) {
-            halMaskValue |= GroupCipherMask.CCMP;
-        }
-
-        return halMaskValue;
-    }
-
-    /**
-     * Tests the saving/loading of WifiConfiguration supported cipher values
-     */
-    @Test
-    public void testSupportedCiphers() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork();
-        int expectedHalPairwiseCiphers = getExpectedPairwiseCiphers(config);
-        int expectedHalGroupCiphers = getExpectedGroupCiphers(config);
-
-        // Assume that the default params are used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        WifiConfiguration loadConfig = new WifiConfiguration();
-        Map<String, String> networkExtras = new HashMap<>();
-        assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
-        verify(mISupplicantStaNetworkMock).setPairwiseCipher(expectedHalPairwiseCiphers);
-        verify(mISupplicantStaNetworkMock).setGroupCipher(expectedHalGroupCiphers);
-    }
-
-    /**
-     * Tests the saving/loading of WifiConfiguration supported cipher values
-     * when the GCMP-256 cipher is not supported.
-     *
-     * GCMP-256 is supported only if WPA3 SUITE-B is supported.
-     */
-    @Test
-    public void testSupportedCiphersNoGcmp256() throws Exception {
-        // Reinitialize mSupplicantNetwork without support for WPA3 SUITE-B
-        mAdvanceKeyMgmtFeatures = 0;
-        mSupplicantNetwork = new SupplicantStaNetworkHalAidlImpl(
-                mISupplicantStaNetworkMock, IFACE_NAME, mContext, mWifiMonitor,
-                mWifiGlobals, mAdvanceKeyMgmtFeatures);
-        WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork();
-        int expectedHalPairwiseCiphers = getExpectedPairwiseCiphers(config);
-        expectedHalPairwiseCiphers &= ~PairwiseCipherMask.GCMP_256;
-        int expectedHalGroupCiphers = getExpectedGroupCiphers(config);
-        expectedHalGroupCiphers &= ~GroupCipherMask.GCMP_256;
-
-        // Assume that the default params are used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        WifiConfiguration loadConfig = new WifiConfiguration();
-        Map<String, String> networkExtras = new HashMap<>();
-        assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
-        verify(mISupplicantStaNetworkMock).setPairwiseCipher(expectedHalPairwiseCiphers);
-        verify(mISupplicantStaNetworkMock).setGroupCipher(expectedHalGroupCiphers);
-    }
-
-    /**
-     * Tests the appending decorated identity prefix to anonymous identity and saving to
-     * wpa_supplicant.
-     */
-    @Test
-    public void testEapNetworkSetsDecoratedIdentityPrefix() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        config.enterpriseConfig.setAnonymousIdentity(ANONYMOUS_IDENTITY);
-        config.enterpriseConfig.setDecoratedIdentityPrefix(TEST_DECORATED_IDENTITY_PREFIX);
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        WifiConfiguration loadConfig = new WifiConfiguration();
-        Map<String, String> networkExtras = new HashMap<>();
-        assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
-        assertEquals(TEST_DECORATED_IDENTITY_PREFIX
-                        + config.enterpriseConfig.getAnonymousIdentity(),
-                loadConfig.enterpriseConfig.getAnonymousIdentity());
-        assertEquals(TEST_DECORATED_IDENTITY_PREFIX + ANONYMOUS_IDENTITY,
-                mSupplicantNetwork.fetchEapAnonymousIdentity());
-    }
-
-    /**
-     * Tests setting the selected RCOI on Passpoint networks and saving to wpa_supplicant.
-     */
-    @Test
-    public void testEapNetworkSetsSelectedRcoi() throws Exception {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPasspointNetwork();
-        config.enterpriseConfig.setAnonymousIdentity(ANONYMOUS_IDENTITY);
-        config.enterpriseConfig.setSelectedRcoi(TEST_SELECTED_RCOI_LONG);
-        // Assume that the default params is used for this test.
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                config.getDefaultSecurityParams());
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-        assertTrue(Arrays.equals(TEST_SELECTED_RCOI_BYTE_ARRAY, mSupplicantVariables.selectedRcoi));
-    }
-
-    /**
-     * Sets up the AIDL interface mock with all the setters/getter values.
-     * Note: This only sets up the mock to return success on all methods.
-     */
-    private void setupISupplicantNetworkMock() throws Exception {
-        /** SSID */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] ssid) throws RemoteException {
-                mSupplicantVariables.ssid = ssid;
-            }
-        }).when(mISupplicantStaNetworkMock).setSsid(any(byte[].class));
-        doAnswer(new AnswerWithArguments() {
-            public byte[] answer() throws RemoteException {
-                return mSupplicantVariables.ssid;
-            }
-        }).when(mISupplicantStaNetworkMock).getSsid();
-
-        /** Network Id */
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                return mSupplicantVariables.networkId;
-            }
-        }).when(mISupplicantStaNetworkMock).getId();
-
-        /** BSSID */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] bssid) throws RemoteException {
-                mSupplicantVariables.bssid = bssid;
-            }
-        }).when(mISupplicantStaNetworkMock).setBssid(any(byte[].class));
-        doAnswer(new AnswerWithArguments() {
-            public byte[] answer() throws RemoteException {
-                return mSupplicantVariables.bssid;
-            }
-        }).when(mISupplicantStaNetworkMock).getBssid();
-
-        /** Scan SSID (Is Hidden Network?) */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(boolean enable) throws RemoteException {
-                mSupplicantVariables.scanSsid = enable;
-            }
-        }).when(mISupplicantStaNetworkMock).setScanSsid(any(boolean.class));
-        doAnswer(new AnswerWithArguments() {
-            public boolean answer() throws RemoteException {
-                return mSupplicantVariables.scanSsid;
-            }
-        }).when(mISupplicantStaNetworkMock).getScanSsid();
-
-        /** Require PMF*/
-        doAnswer(new AnswerWithArguments() {
-            public void answer(boolean enable) throws RemoteException {
-                mSupplicantVariables.requirePmf = enable;
-            }
-        }).when(mISupplicantStaNetworkMock).setRequirePmf(any(boolean.class));
-        doAnswer(new AnswerWithArguments() {
-            public boolean answer() throws RemoteException {
-                return mSupplicantVariables.requirePmf;
-            }
-        }).when(mISupplicantStaNetworkMock).getRequirePmf();
-
-        /** SAE password */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String saePassword) throws RemoteException {
-                mSupplicantVariables.pskPassphrase = saePassword;
-            }
-        }).when(mISupplicantStaNetworkMock).setSaePassword(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.pskPassphrase;
-            }
-        }).when(mISupplicantStaNetworkMock).getSaePassword();
-
-        /** PSK passphrase */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String pskPassphrase) throws RemoteException {
-                mSupplicantVariables.pskPassphrase = pskPassphrase;
-            }
-        }).when(mISupplicantStaNetworkMock).setPskPassphrase(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.pskPassphrase;
-            }
-        }).when(mISupplicantStaNetworkMock).getPskPassphrase();
-
-        /** PSK */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] psk) throws RemoteException {
-                mSupplicantVariables.psk = psk;
-            }
-        }).when(mISupplicantStaNetworkMock).setPsk(any(byte[].class));
-        doAnswer(new AnswerWithArguments() {
-            public byte[] answer() throws RemoteException {
-                return mSupplicantVariables.psk;
-            }
-        }).when(mISupplicantStaNetworkMock).getPsk();
-
-        /** WEP keys **/
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int keyIdx, byte[] key) throws RemoteException {
-                mSupplicantVariables.wepKey[keyIdx] = NativeUtil.byteArrayToArrayList(key);
-            }
-        }).when(mISupplicantStaNetworkMock).setWepKey(any(int.class), any(byte[].class));
-        doAnswer(new AnswerWithArguments() {
-            public byte[] answer(int keyIdx) throws RemoteException {
-                ArrayList<Byte> key = mSupplicantVariables.wepKey[keyIdx];
-                if (key != null) {
-                    return NativeUtil.byteArrayFromArrayList(key);
-                } else {
-                    return new byte[0];
-                }
-            }
-        }).when(mISupplicantStaNetworkMock).getWepKey(any(int.class));
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int keyIdx) throws RemoteException {
-                mSupplicantVariables.wepTxKeyIdx = keyIdx;
-            }
-        }).when(mISupplicantStaNetworkMock).setWepTxKeyIdx(any(int.class));
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                return mSupplicantVariables.wepTxKeyIdx;
-            }
-        }).when(mISupplicantStaNetworkMock).getWepTxKeyIdx();
-
-        /** allowedKeyManagement */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int mask) throws RemoteException {
-                mSupplicantVariables.keyMgmtMask = mask;
-            }
-        }).when(mISupplicantStaNetworkMock).setKeyMgmt(any(int.class));
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                return mSupplicantVariables.keyMgmtMask;
-            }
-        }).when(mISupplicantStaNetworkMock).getKeyMgmt();
-
-        /** allowedProtocols */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int mask) throws RemoteException {
-                mSupplicantVariables.protoMask = mask;
-            }
-        }).when(mISupplicantStaNetworkMock).setProto(any(int.class));
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                return mSupplicantVariables.protoMask;
-            }
-        }).when(mISupplicantStaNetworkMock).getProto();
-
-        /** allowedAuthAlgorithms */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int mask) throws RemoteException {
-                mSupplicantVariables.authAlgMask = mask;
-            }
-        }).when(mISupplicantStaNetworkMock).setAuthAlg(any(int.class));
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                return mSupplicantVariables.authAlgMask;
-            }
-        }).when(mISupplicantStaNetworkMock).getAuthAlg();
-
-        /** allowedGroupCiphers */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int mask) throws RemoteException {
-                mSupplicantVariables.groupCipherMask = mask;
-            }
-        }).when(mISupplicantStaNetworkMock).setGroupCipher(any(int.class));
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                return mSupplicantVariables.groupCipherMask;
-            }
-        }).when(mISupplicantStaNetworkMock).getGroupCipher();
-
-        /** allowedPairwiseCiphers */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int mask) throws RemoteException {
-                mSupplicantVariables.pairwiseCipherMask = mask;
-            }
-        }).when(mISupplicantStaNetworkMock).setPairwiseCipher(any(int.class));
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                return mSupplicantVariables.pairwiseCipherMask;
-            }
-        }).when(mISupplicantStaNetworkMock).getPairwiseCipher();
-
-        /** allowedGroupManagementCiphers */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int mask) throws RemoteException {
-                mSupplicantVariables.groupManagementCipherMask = mask;
-            }
-        }).when(mISupplicantStaNetworkMock).setGroupMgmtCipher(any(int.class));
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                return mSupplicantVariables.groupManagementCipherMask;
-            }
-        }).when(mISupplicantStaNetworkMock).getGroupMgmtCipher();
-
-        /** metadata: idstr */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String idStr) throws RemoteException {
-                mSupplicantVariables.idStr = idStr;
-            }
-        }).when(mISupplicantStaNetworkMock).setIdStr(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.idStr;
-            }
-        }).when(mISupplicantStaNetworkMock).getIdStr();
-
-        /** UpdateIdentifier */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int identifier) throws RemoteException {
-                mSupplicantVariables.updateIdentifier = identifier;
-            }
-        }).when(mISupplicantStaNetworkMock).setUpdateIdentifier(any(int.class));
-
-        /** EAP method */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int method) throws RemoteException {
-                Log.i("TwilightTest", "Received EAP method: " + String.valueOf(method));
-                mSupplicantVariables.eapMethod = method;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapMethod(any(int.class));
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                // Return failure if not set
-                if (mSupplicantVariables.eapMethod == -1) {
-                    throw new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN);
-                } else {
-                    return mSupplicantVariables.eapMethod;
-                }
-            }
-        }).when(mISupplicantStaNetworkMock).getEapMethod();
-
-        /** EAP Phase 2 method */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int method) throws RemoteException {
-                mSupplicantVariables.eapPhase2Method = method;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapPhase2Method(any(int.class));
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                // Return failure if not set
-                if (mSupplicantVariables.eapPhase2Method == -1) {
-                    throw new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN);
-                } else {
-                    return mSupplicantVariables.eapPhase2Method;
-                }
-            }
-        }).when(mISupplicantStaNetworkMock).getEapPhase2Method();
-
-        /** EAP Identity */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] identity) throws RemoteException {
-                mSupplicantVariables.eapIdentity = identity;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapIdentity(any(byte[].class));
-        doAnswer(new AnswerWithArguments() {
-            public byte[] answer() throws RemoteException {
-                return mSupplicantVariables.eapIdentity;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapIdentity();
-
-        /** EAP Anonymous Identity */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] identity) throws RemoteException {
-                mSupplicantVariables.eapAnonymousIdentity = identity;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapAnonymousIdentity(any(byte[].class));
-        doAnswer(new AnswerWithArguments() {
-            public byte[] answer() throws RemoteException {
-                return mSupplicantVariables.eapAnonymousIdentity;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapAnonymousIdentity();
-
-        /** EAP Password */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] password) throws RemoteException {
-                mSupplicantVariables.eapPassword = password;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapPassword(any(byte[].class));
-        doAnswer(new AnswerWithArguments() {
-            public byte[] answer() throws RemoteException {
-                return mSupplicantVariables.eapPassword;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapPassword();
-
-        /** EAP Client Cert */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String cert) throws RemoteException {
-                mSupplicantVariables.eapClientCert = cert;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapClientCert(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.eapClientCert;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapClientCert();
-
-        /** EAP CA Cert */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String cert) throws RemoteException {
-                mSupplicantVariables.eapCACert = cert;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapCACert(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.eapCACert;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapCACert();
-
-        /** EAP Subject Match */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String match) throws RemoteException {
-                mSupplicantVariables.eapSubjectMatch = match;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapSubjectMatch(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.eapSubjectMatch;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapSubjectMatch();
-
-        /** EAP Engine */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(boolean enable) throws RemoteException {
-                mSupplicantVariables.eapEngine = enable;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapEngine(any(boolean.class));
-        doAnswer(new AnswerWithArguments() {
-            public boolean answer() throws RemoteException {
-                return mSupplicantVariables.eapEngine;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapEngine();
-
-        /** EAP Engine ID */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String id) throws RemoteException {
-                mSupplicantVariables.eapEngineID = id;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapEngineID(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.eapEngineID;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapEngineId();
-
-        /** EAP Private Key */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String key) throws RemoteException {
-                mSupplicantVariables.eapPrivateKeyId = key;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapPrivateKeyId(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.eapPrivateKeyId;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapPrivateKeyId();
-
-        /** EAP Alt Subject Match */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String match) throws RemoteException {
-                mSupplicantVariables.eapAltSubjectMatch = match;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapAltSubjectMatch(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.eapAltSubjectMatch;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapAltSubjectMatch();
-
-        /** EAP Domain Suffix Match */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String match) throws RemoteException {
-                mSupplicantVariables.eapDomainSuffixMatch = match;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapDomainSuffixMatch(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.eapDomainSuffixMatch;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapDomainSuffixMatch();
-
-        /** EAP CA Path*/
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String path) throws RemoteException {
-                mSupplicantVariables.eapCAPath = path;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapCAPath(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.eapCAPath;
-            }
-        }).when(mISupplicantStaNetworkMock).getEapCAPath();
-
-        /** EAP Proactive Key Caching */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(boolean enable) throws RemoteException {
-                mSupplicantVariables.eapProactiveKeyCaching = enable;
-            }
-        }).when(mISupplicantStaNetworkMock).setProactiveKeyCaching(any(boolean.class));
-
-        /** Callback registration */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantStaNetworkCallback cb) throws RemoteException {
-                mISupplicantStaNetworkCallback = cb;
-            }
-        }).when(mISupplicantStaNetworkMock)
-                .registerCallback(any(ISupplicantStaNetworkCallback.class));
-
-        /** OCSP */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int ocsp) throws RemoteException {
-                mSupplicantVariables.ocsp = ocsp;
-            }
-        }).when(mISupplicantStaNetworkMock).setOcsp(any(int.class));
-        doAnswer(new AnswerWithArguments() {
-            public int answer() throws RemoteException {
-                return mSupplicantVariables.ocsp;
-            }
-        }).when(mISupplicantStaNetworkMock).getOcsp();
-
-        /** PMK cache */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] serializedData) throws RemoteException {
-                mSupplicantVariables.serializedPmkCache = serializedData;
-            }
-        }).when(mISupplicantStaNetworkMock).setPmkCache(any(byte[].class));
-
-        /** WAPI Cert */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String cert) throws RemoteException {
-                mSupplicantVariables.wapiCertSuite = cert;
-            }
-        }).when(mISupplicantStaNetworkMock).setWapiCertSuite(any(String.class));
-        doAnswer(new AnswerWithArguments() {
-            public String answer() throws RemoteException {
-                return mSupplicantVariables.wapiCertSuite;
-            }
-        }).when(mISupplicantStaNetworkMock).getWapiCertSuite();
-
-        /** EAP ERP */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(boolean enable) throws RemoteException {
-                mSupplicantVariables.eapErp = enable;
-            }
-        }).when(mISupplicantStaNetworkMock).setEapErp(any(boolean.class));
-
-        /** setSaeH2eMode */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte mode) throws RemoteException {
-                mSupplicantVariables.saeH2eMode = mode;
-            }
-        }).when(mISupplicantStaNetworkMock).setSaeH2eMode(any(byte.class));
-
-        /** Selected RCOI */
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] selectedRcoi) throws RemoteException {
-                mSupplicantVariables.selectedRcoi = selectedRcoi;
-            }
-        }).when(mISupplicantStaNetworkMock).setRoamingConsortiumSelection(any(byte[].class));
-    }
-
-    // Private class to to store/inspect values set via the AIDL mock.
-    private class SupplicantNetworkVariables {
-        public byte[] ssid;
-        public int networkId;
-        public byte[/* 6 */] bssid;
-        public int keyMgmtMask;
-        public int protoMask;
-        public int authAlgMask;
-        public int groupCipherMask;
-        public int pairwiseCipherMask;
-        public int groupManagementCipherMask;
-        public boolean scanSsid;
-        public boolean requirePmf;
-        public String idStr;
-        public int updateIdentifier;
-        public String pskPassphrase;
-        public byte[] psk;
-        public ArrayList<Byte>[] wepKey = new ArrayList[4];
-        public int wepTxKeyIdx;
-        public int eapMethod = -1;
-        public int eapPhase2Method = -1;
-        public byte[] eapIdentity;
-        public byte[] eapAnonymousIdentity;
-        public byte[] eapPassword;
-        public String eapCACert;
-        public String eapCAPath;
-        public String eapClientCert;
-        public String eapPrivateKeyId;
-        public String eapSubjectMatch;
-        public String eapAltSubjectMatch;
-        public boolean eapEngine;
-        public String eapEngineID;
-        public String eapDomainSuffixMatch;
-        public boolean eapProactiveKeyCaching;
-        public int ocsp;
-        public byte[] serializedPmkCache;
-        public String wapiCertSuite;
-        public boolean eapErp;
-        public byte saeH2eMode;
-        public byte[] selectedRcoi;
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalHidlImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java
similarity index 96%
rename from service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalHidlImplTest.java
rename to service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java
index 9f1a5f4..dea8a00 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalHidlImplTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java
@@ -41,7 +41,6 @@
 import android.hardware.wifi.supplicant.V1_0.ISupplicantStaNetworkCallback.NetworkRequestEapSimUmtsAuthParams;
 import android.hardware.wifi.supplicant.V1_0.SupplicantStatus;
 import android.hardware.wifi.supplicant.V1_0.SupplicantStatusCode;
-import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiManager;
@@ -66,10 +65,10 @@
 import java.util.Random;
 
 /**
- * Unit tests for SupplicantStaNetworkHalHidlImpl
+ * Unit tests for SupplicantStaNetworkHal
  */
 @SmallTest
-public class SupplicantStaNetworkHalHidlImplTest extends WifiBaseTest {
+public class SupplicantStaNetworkHalTest extends WifiBaseTest {
     private static final String IFACE_NAME = "wlan0";
     private static final Map<String, String> NETWORK_EXTRAS_VALUES = new HashMap<>();
     static {
@@ -80,7 +79,7 @@
             "%7B%22key1%22%3A%22value1%22%2C%22key2%22%3A%22value2%22%7D";
     private static final String ANONYMOUS_IDENTITY = "aaa@bbb.cc.ddd";
 
-    private SupplicantStaNetworkHalHidlImpl mSupplicantNetwork;
+    private SupplicantStaNetworkHal mSupplicantNetwork;
     private SupplicantStatus mStatusSuccess;
     private SupplicantStatus mStatusFailure;
     private android.hardware.wifi.supplicant.V1_4.SupplicantStatus mStatusSuccessV14;
@@ -116,7 +115,7 @@
      * Spy used to return the V1_2 ISupplicantStaNetwork mock object to simulate the 1.2 HAL running
      * on the device.
      */
-    private class SupplicantStaNetworkHalSpyV1_2 extends SupplicantStaNetworkHalHidlImpl {
+    private class SupplicantStaNetworkHalSpyV1_2 extends SupplicantStaNetworkHal {
         SupplicantStaNetworkHalSpyV1_2(ISupplicantStaNetwork iSupplicantStaNetwork,
                 String ifaceName,
                 Context context, WifiMonitor monitor, WifiGlobals wifiGlobals,
@@ -981,52 +980,6 @@
     }
 
     /**
-     * Tests the PMF is disabled when the device supports multiple AKMs.
-     */
-    @Test
-    public void testPmfDisabledWhenAutoUpgradeOffloadIsSupportedAndSaeSelected() throws Exception {
-        createSupplicantStaNetwork(SupplicantStaNetworkVersion.V1_4);
-        when(mWifiGlobals.isWpa3SaeUpgradeOffloadEnabled()).thenReturn(true);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_SAE));
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        // PSK and SAE is set and PMF is disable when SAE is selected.
-        assertEquals(ISupplicantStaNetwork.KeyMgmtMask.WPA_PSK,
-                (mSupplicantVariables.keyMgmtMask & ISupplicantStaNetwork.KeyMgmtMask.WPA_PSK));
-        assertEquals(android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork.KeyMgmtMask.SAE,
-                (mSupplicantVariables.keyMgmtMask & android.hardware.wifi.supplicant.V1_2
-                .ISupplicantStaNetwork.KeyMgmtMask.SAE));
-        assertEquals(false, mSupplicantVariables.requirePmf);
-    }
-
-    /**
-     * Tests the PMF is kept when the device does not support multiple AKMs.
-     */
-    @Test
-    public void testPmfEnabledWhenAutoUpgradeOffloadNotSupportedAndSaeSelected() throws Exception {
-        createSupplicantStaNetwork(SupplicantStaNetworkVersion.V1_4);
-        when(mWifiGlobals.isWpa3SaeUpgradeOffloadEnabled()).thenReturn(false);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskSaeNetwork();
-        config.getNetworkSelectionStatus().setCandidateSecurityParams(
-                SecurityParams.createSecurityParamsBySecurityType(
-                        WifiConfiguration.SECURITY_TYPE_SAE));
-        assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
-
-        // Only SAE is set and PMF is enabled when SAE is selected.
-        assertEquals(0,
-                (mSupplicantVariables.keyMgmtMask & ISupplicantStaNetwork.KeyMgmtMask.WPA_PSK));
-        assertEquals(android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork.KeyMgmtMask.SAE,
-                (mSupplicantVariables.keyMgmtMask & android.hardware.wifi.supplicant.V1_2
-                .ISupplicantStaNetwork.KeyMgmtMask.SAE));
-        assertEquals(true, mSupplicantVariables.requirePmf);
-    }
-
-    /**
      * Tests the retrieval of WPS NFC token.
      */
     @Test
@@ -1186,11 +1139,11 @@
         assertTrue(mSupplicantNetwork.loadWifiConfiguration(loadConfig, networkExtras));
         WifiConfigurationTestUtil.assertConfigurationEqualForSupplicant(config, loadConfig);
         assertEquals(config.getProfileKey(),
-                networkExtras.get(SupplicantStaNetworkHalHidlImpl.ID_STRING_KEY_CONFIG_KEY));
+                networkExtras.get(SupplicantStaNetworkHal.ID_STRING_KEY_CONFIG_KEY));
         assertEquals(
                 config.creatorUid,
                 Integer.parseInt(networkExtras.get(
-                        SupplicantStaNetworkHalHidlImpl.ID_STRING_KEY_CREATOR_UID)));
+                        SupplicantStaNetworkHal.ID_STRING_KEY_CREATOR_UID)));
         // There is no getter for this one, so check the supplicant variable.
         if (!TextUtils.isEmpty(config.updateIdentifier)) {
             assertEquals(Integer.parseInt(config.updateIdentifier),
@@ -1221,13 +1174,13 @@
     @Test
     public void testNetworkExtra() {
         assertEquals(NETWORK_EXTRAS_SERIALIZED,
-                SupplicantStaNetworkHalHidlImpl.createNetworkExtra(NETWORK_EXTRAS_VALUES));
+                SupplicantStaNetworkHal.createNetworkExtra(NETWORK_EXTRAS_VALUES));
         assertEquals(NETWORK_EXTRAS_VALUES,
-                SupplicantStaNetworkHalHidlImpl.parseNetworkExtra(NETWORK_EXTRAS_SERIALIZED));
+                SupplicantStaNetworkHal.parseNetworkExtra(NETWORK_EXTRAS_SERIALIZED));
     }
 
     /**
-     * Verifies that fetchEapAnonymousIdentity() can get the anonymous identity from supplicant.
+     * Verifies that fetachEapAnonymousIdentity() can get the anonymous identity from supplicant.
      */
     @Test
     public void testFetchEapAnonymousIdentity() {
@@ -1240,8 +1193,8 @@
         assertEquals(ANONYMOUS_IDENTITY, mSupplicantNetwork.fetchEapAnonymousIdentity());
     }
 
-    /**
-     * Verifies that setPmkCache can set PMK cache
+    /** Verifies that setPmkCache can set PMK cache
+     *
      */
     @Test
     public void testSetPmkCache() {
@@ -2336,7 +2289,7 @@
     private void createSupplicantStaNetwork(SupplicantStaNetworkVersion version) {
         switch (version) {
             case V1_0:
-                mSupplicantNetwork = new SupplicantStaNetworkHalHidlImpl(
+                mSupplicantNetwork = new SupplicantStaNetworkHal(
                         mISupplicantStaNetworkMock, IFACE_NAME, mContext, mWifiMonitor,
                         mWifiGlobals, mAdvanceKeyMgmtFeatures);
                 break;
@@ -2356,7 +2309,7 @@
                         mWifiGlobals, mAdvanceKeyMgmtFeatures);
                 break;
         }
-        mSupplicantNetwork.enableVerboseLogging(true, false);
+        mSupplicantNetwork.enableVerboseLogging(true);
     }
 
     // Private class to to store/inspect values set via the HIDL mock.
diff --git a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStateTrackerTest.java b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStateTrackerTest.java
index 2ea2785..d13ebc0 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/SupplicantStateTrackerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/SupplicantStateTrackerTest.java
@@ -49,7 +49,7 @@
 
     private static final String TAG = "SupplicantStateTrackerTest";
     private static final String SSID = "\"GoogleGuest\"";
-    private static final WifiSsid WIFI_SSID = WifiSsid.fromUtf8Text(SSID);
+    private static final WifiSsid WIFI_SSID = WifiSsid.createFromAsciiEncoded(SSID);
     private static final String BSSID = "01:02:03:04:05:06";
     private static final String TEST_IFACE = "wlan_test";
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/ThroughputPredictorTest.java b/service/tests/wifitests/src/com/android/server/wifi/ThroughputPredictorTest.java
index 029fbf9..1409a43 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/ThroughputPredictorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/ThroughputPredictorTest.java
@@ -21,7 +21,6 @@
 import static com.android.server.wifi.util.InformationElementUtil.BssLoad.MIN_CHANNEL_UTILIZATION;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.validateMockitoUsage;
 import static org.mockito.Mockito.when;
 
@@ -68,16 +67,12 @@
                 .thenReturn(true);
         when(mDeviceCapabilities.isWifiStandardSupported(ScanResult.WIFI_STANDARD_11AX))
                 .thenReturn(false);
-        when(mDeviceCapabilities.isWifiStandardSupported(ScanResult.WIFI_STANDARD_11BE))
-                .thenReturn(false);
         when(mDeviceCapabilities.isChannelWidthSupported(ScanResult.CHANNEL_WIDTH_40MHZ))
                 .thenReturn(true);
         when(mDeviceCapabilities.isChannelWidthSupported(ScanResult.CHANNEL_WIDTH_80MHZ))
                 .thenReturn(true);
         when(mDeviceCapabilities.isChannelWidthSupported(ScanResult.CHANNEL_WIDTH_160MHZ))
                 .thenReturn(false);
-        when(mDeviceCapabilities.isChannelWidthSupported(ScanResult.CHANNEL_WIDTH_320MHZ))
-                .thenReturn(false);
         when(mDeviceCapabilities.getMaxNumberTxSpatialStreams()).thenReturn(2);
         when(mDeviceCapabilities.getMaxNumberRxSpatialStreams()).thenReturn(2);
 
@@ -98,40 +93,6 @@
     }
 
     @Test
-    public void verify6GhzRssiBoost() {
-        // First make sure the boost is disabled
-        when(mResource.getBoolean(R.bool.config_wifiEnable6GhzBeaconRssiBoost)).thenReturn(false);
-        int predicted_5Ghz_80MHz = mThroughputPredictor.predictThroughput(mDeviceCapabilities,
-                ScanResult.WIFI_STANDARD_11AX, ScanResult.CHANNEL_WIDTH_80MHZ, -70, 5160, 1,
-                0, 0, false);
-        int predicted_6Ghz_20MHz = mThroughputPredictor.predictThroughput(mDeviceCapabilities,
-                ScanResult.WIFI_STANDARD_11AX, ScanResult.CHANNEL_WIDTH_20MHZ, -70, 5975, 1,
-                0, 0, false);
-        int predicted_6Ghz_80MHz = mThroughputPredictor.predictThroughput(mDeviceCapabilities,
-                ScanResult.WIFI_STANDARD_11AX, ScanResult.CHANNEL_WIDTH_80MHZ, -70, 5975, 1,
-                0, 0, false);
-
-        // verify that after the boost is enabled, only the 6Ghz 80MHz bandwidth score is increased.
-        when(mResource.getBoolean(R.bool.config_wifiEnable6GhzBeaconRssiBoost)).thenReturn(true);
-        int newPredicted_5Ghz_80MHz = mThroughputPredictor.predictThroughput(mDeviceCapabilities,
-                ScanResult.WIFI_STANDARD_11AX, ScanResult.CHANNEL_WIDTH_80MHZ, -70, 5160, 1,
-                0, 0, false);
-        int newPredicted_6Ghz_20MHz = mThroughputPredictor.predictThroughput(mDeviceCapabilities,
-                ScanResult.WIFI_STANDARD_11AX, ScanResult.CHANNEL_WIDTH_20MHZ, -70, 5975, 1,
-                0, 0, false);
-        int newPredicted_6Ghz_80MHz = mThroughputPredictor.predictThroughput(mDeviceCapabilities,
-                ScanResult.WIFI_STANDARD_11AX, ScanResult.CHANNEL_WIDTH_80MHZ, -70, 5975, 1,
-                0, 0, false);
-
-        assertEquals("5Ghz AP should not get RSSI boost",
-                predicted_5Ghz_80MHz, newPredicted_5Ghz_80MHz);
-        assertEquals("6Ghz AP with 20MHz bandwidth should not get RSSI boost",
-                predicted_6Ghz_20MHz, newPredicted_6Ghz_20MHz);
-        assertTrue("6Ghz AP with 80MHz bandwidth should get RSSI boost",
-                predicted_6Ghz_80MHz < newPredicted_6Ghz_80MHz);
-    }
-
-    @Test
     public void verifyVeryLowRssi() {
         int predictedThroughputMbps = mThroughputPredictor.predictThroughput(mDeviceCapabilities,
                 ScanResult.WIFI_STANDARD_11AC, ScanResult.CHANNEL_WIDTH_20MHZ, -200, 2412, 1,
@@ -183,19 +144,19 @@
     }
 
     @Test
-    public void verifyHighRssiMinChannelUtilizationAx6g320Mhz4ss() {
-        when(mDeviceCapabilities.isWifiStandardSupported(ScanResult.WIFI_STANDARD_11BE))
+    public void verifyHighRssiMinChannelUtilizationAx5g160Mhz4ss() {
+        when(mDeviceCapabilities.isWifiStandardSupported(ScanResult.WIFI_STANDARD_11AX))
                 .thenReturn(true);
-        when(mDeviceCapabilities.isChannelWidthSupported(ScanResult.CHANNEL_WIDTH_320MHZ))
+        when(mDeviceCapabilities.isChannelWidthSupported(ScanResult.CHANNEL_WIDTH_160MHZ))
                 .thenReturn(true);
         when(mDeviceCapabilities.getMaxNumberTxSpatialStreams()).thenReturn(4);
         when(mDeviceCapabilities.getMaxNumberRxSpatialStreams()).thenReturn(4);
 
         int predictedThroughputMbps = mThroughputPredictor.predictThroughput(mDeviceCapabilities,
-                ScanResult.WIFI_STANDARD_11BE, ScanResult.CHANNEL_WIDTH_320MHZ, 0, 6180, 4,
+                ScanResult.WIFI_STANDARD_11AX, ScanResult.CHANNEL_WIDTH_160MHZ, 0, 5180, 4,
                 MIN_CHANNEL_UTILIZATION, INVALID, false);
 
-        assertEquals(11529, predictedThroughputMbps);
+        assertEquals(4803, predictedThroughputMbps);
     }
 
     @Test
@@ -396,14 +357,6 @@
     }
 
     @Test
-    public void verifyMaxThroughputBe320Mhz2ss() {
-        mConnectionCap.wifiStandard = ScanResult.WIFI_STANDARD_11BE;
-        mConnectionCap.channelBandwidth = ScanResult.CHANNEL_WIDTH_320MHZ;
-        mConnectionCap.maxNumberRxSpatialStreams = 2;
-        assertEquals(5764, mThroughputPredictor.predictMaxRxThroughput(mConnectionCap));
-    }
-
-    @Test
     public void verifyMaxThroughputUnknownStandard() {
         mConnectionCap.wifiStandard = ScanResult.WIFI_STANDARD_UNKNOWN;
         mConnectionCap.channelBandwidth = ScanResult.CHANNEL_WIDTH_80MHZ;
diff --git a/service/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java b/service/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java
index 2c2ad51..2f6bae4 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/VelocityBasedConnectedScoreTest.java
@@ -91,7 +91,6 @@
         mClock = new FakeClock();
         mVelocityBasedConnectedScore = new VelocityBasedConnectedScore(
             new ScoringParams(mContext), mClock);
-        mVelocityBasedConnectedScore.onRoleChanged(ActiveModeManager.ROLE_CLIENT_PRIMARY);
     }
 
     /**
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WaitingStateTest.java b/service/tests/wifitests/src/com/android/server/wifi/WaitingStateTest.java
deleted file mode 100644
index bf67d58..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/WaitingStateTest.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import android.os.Looper;
-import android.os.Message;
-import android.os.test.TestLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.internal.util.State;
-import com.android.internal.util.StateMachine;
-import com.android.server.wifi.util.WaitingState;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Unit test harness for WaitingState.
- */
-@SmallTest
-public class WaitingStateTest {
-    private TestLooper mTestLooper;
-
-    private class TestState extends State {
-        private final String mName;
-
-        public boolean enterTriggered = false;
-        public boolean exitTriggered = false;
-        public List<Integer> commandList = new ArrayList<>();
-
-        public void resetTestFlags() {
-            enterTriggered = false;
-            exitTriggered = false;
-            commandList.clear();
-        }
-
-        TestState(String name) {
-            super();
-            mName = name;
-        }
-
-        @Override
-        public String getName() {
-            return mName;
-        }
-
-        @Override
-        public void enter() {
-            enterTriggered = true;
-        }
-
-        @Override
-        public void exit() {
-            exitTriggered = true;
-        }
-
-        @Override
-        public boolean processMessage(Message msg) {
-            commandList.add(msg.what);
-            return HANDLED;
-        }
-    }
-
-    /**
-     * A
-     * -- B
-     * C
-     *
-     * External transition behavior: B --> A triggers exit/enter on A (see b/220588514)
-     */
-    private class ExternalTransitionStateMachine extends StateMachine {
-        public TestState A = new TestState("A");
-        public TestState B = new TestState("B");
-        public TestState C = new TestState("C");
-
-        ExternalTransitionStateMachine(String name, Looper looper) {
-            super(name, looper);
-
-            addState(A);
-            addState(B, A);
-            addState(C);
-
-            setInitialState(A);
-        }
-
-        public void resetTestFlags() {
-            A.resetTestFlags();
-            B.resetTestFlags();
-            C.resetTestFlags();
-        }
-    }
-
-    /**
-     * Acontainer
-     * -- A
-     * -- B
-     * C
-     *
-     * Pseudo-local transition (achieved via refactoring): B --> A will not trigger exit/enter
-     *                                                     on Acontainer.
-     */
-    private class PseudoLocalTransitionStateMachine extends StateMachine {
-        public TestState Acontainer = new TestState("Acontainer");
-        public TestState A = new TestState("A");
-        public TestState B = new TestState("B");
-        public WaitingState Bwaiting;
-        public TestState C = new TestState("C");
-
-        PseudoLocalTransitionStateMachine(String name, Looper looper, boolean useWaitingState) {
-            super(name, looper);
-
-            addState(Acontainer);
-            addState(A, Acontainer);
-            if (useWaitingState) {
-                Bwaiting = new WaitingState(this);
-                addState(Bwaiting, Acontainer);
-            } else {
-                addState(B, Acontainer);
-            }
-            addState(C);
-
-            setInitialState(A);
-        }
-
-        public void resetTestFlags() {
-            Acontainer.resetTestFlags();
-            A.resetTestFlags();
-            B.resetTestFlags();
-            C.resetTestFlags();
-        }
-    }
-
-    private void initializeStateMachine(StateMachine sm) {
-        sm.setDbg(true);
-        sm.start();
-    }
-
-    private void transitionToState(StateMachine sm, State destState) {
-        sm.transitionTo(destState);
-        sm.sendMessage(0); // to trigger the transition
-        mTestLooper.dispatchAll();
-    }
-
-    private void verifyEnterExit(TestState state, boolean enterExpected, boolean exitExpected) {
-        assertEquals(state.getName() + " mismatch on Enter expectations", enterExpected,
-                state.enterTriggered);
-        assertEquals(state.getName() + " mismatch on Exit expectations", exitExpected,
-                state.exitTriggered);
-    }
-
-    /**
-     * Initializes mocks.
-     */
-    @Before
-    public void setup() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mTestLooper = new TestLooper();
-    }
-
-    /**
-     * Validate the external transition state machine expectations.
-     */
-    @Test
-    public void testExternalTransitionStateMachine() {
-        ExternalTransitionStateMachine sm = new ExternalTransitionStateMachine(
-                "ExternalTransitionStateMachine", mTestLooper.getLooper());
-        initializeStateMachine(sm);
-        mTestLooper.dispatchAll();
-
-        // initial transition to the default state
-        verifyEnterExit(sm.A, true, false);
-        sm.resetTestFlags();
-
-        // A -> B: local transition
-        transitionToState(sm, sm.B);
-        verifyEnterExit(sm.A, false, false);
-        verifyEnterExit(sm.B, true, false);
-        sm.resetTestFlags();
-
-        // B -> A: external transition
-        transitionToState(sm, sm.A);
-        verifyEnterExit(sm.B, false, true);
-        verifyEnterExit(sm.A, true, true); // the external transition
-        sm.resetTestFlags();
-
-        // A -> C
-        transitionToState(sm, sm.C);
-        verifyEnterExit(sm.A, false, true);
-        verifyEnterExit(sm.C, true, false);
-        sm.resetTestFlags();
-
-        // C -> A
-        transitionToState(sm, sm.A);
-        verifyEnterExit(sm.C, false, true);
-        verifyEnterExit(sm.A, true, false);
-        sm.resetTestFlags();
-
-        // (A ->) B -> C
-        transitionToState(sm, sm.B);
-        sm.resetTestFlags();
-        transitionToState(sm, sm.C);
-        verifyEnterExit(sm.B, false, true);
-        verifyEnterExit(sm.A, false, true);
-        verifyEnterExit(sm.C, true, false);
-        sm.resetTestFlags();
-
-        // C -> B
-        transitionToState(sm, sm.B);
-        verifyEnterExit(sm.C, false, true);
-        verifyEnterExit(sm.A, true, false);
-        verifyEnterExit(sm.B, true, false);
-        sm.resetTestFlags();
-    }
-
-    /**
-     * Validate the pseudo-local transition state machine expectations.
-     */
-    @Test
-    public void testPseudoLocalTransitionStateMachine() {
-        PseudoLocalTransitionStateMachine sm = new PseudoLocalTransitionStateMachine(
-                "PseudoLocalTransitionStateMachine", mTestLooper.getLooper(), false);
-        initializeStateMachine(sm);
-        mTestLooper.dispatchAll();
-
-        // initial transition to the default state
-        verifyEnterExit(sm.Acontainer, true, false);
-        verifyEnterExit(sm.A, true, false);
-        sm.resetTestFlags();
-
-        // A -> B
-        transitionToState(sm, sm.B);
-        verifyEnterExit(sm.Acontainer, false, false);
-        verifyEnterExit(sm.A, false, true);
-        verifyEnterExit(sm.B, true, false);
-        sm.resetTestFlags();
-
-        // B -> A
-        transitionToState(sm, sm.A);
-        verifyEnterExit(sm.Acontainer, false, false);
-        verifyEnterExit(sm.B, false, true);
-        verifyEnterExit(sm.A, true, false);
-        sm.resetTestFlags();
-
-        // A -> C
-        transitionToState(sm, sm.C);
-        verifyEnterExit(sm.A, false, true);
-        verifyEnterExit(sm.Acontainer, false, true);
-        verifyEnterExit(sm.C, true, false);
-        sm.resetTestFlags();
-
-        // C -> A
-        transitionToState(sm, sm.A);
-        verifyEnterExit(sm.C, false, true);
-        verifyEnterExit(sm.Acontainer, true, false);
-        verifyEnterExit(sm.A, true, false);
-        sm.resetTestFlags();
-
-        // (A ->) B -> C
-        transitionToState(sm, sm.B);
-        sm.resetTestFlags();
-        transitionToState(sm, sm.C);
-        verifyEnterExit(sm.B, false, true);
-        verifyEnterExit(sm.Acontainer, false, true);
-        verifyEnterExit(sm.C, true, false);
-        sm.resetTestFlags();
-
-        // C -> B
-        transitionToState(sm, sm.B);
-        verifyEnterExit(sm.C, false, true);
-        verifyEnterExit(sm.Acontainer, true, false);
-        verifyEnterExit(sm.B, true, false);
-        sm.resetTestFlags();
-    }
-
-    /**
-     * Validate that the WaitingState transition command works and that it defers commands.
-     */
-    @Test
-    public void testWaitingStateTransitionAndDeferral() {
-        PseudoLocalTransitionStateMachine sm = new PseudoLocalTransitionStateMachine(
-                "PseudoLocalTransitionStateMachine", mTestLooper.getLooper(), true);
-        initializeStateMachine(sm);
-        mTestLooper.dispatchAll();
-
-        // initial transition to the default state
-        verifyEnterExit(sm.Acontainer, true, false);
-        verifyEnterExit(sm.A, true, false);
-        sm.resetTestFlags();
-
-        // execute commands and validate that they're run
-        sm.sendMessage(10);
-        sm.sendMessage(20);
-        sm.sendMessage(15);
-        mTestLooper.dispatchAll();
-        assertArrayEquals("Sequence of commands", new Integer[]{10, 20, 15},
-                sm.A.commandList.toArray());
-        sm.resetTestFlags();
-
-        // transition to the waiting state
-        transitionToState(sm, sm.Bwaiting);
-        mTestLooper.dispatchAll();
-        verifyEnterExit(sm.Acontainer, false, false);
-        verifyEnterExit(sm.A, false, true);
-        sm.resetTestFlags();
-
-        // execute commands - nothing should be run
-        sm.sendMessage(50);
-        sm.sendMessage(70);
-        sm.sendMessage(60);
-        mTestLooper.dispatchAll();
-        assertTrue("Nothing run in Acontainer", sm.Acontainer.commandList.isEmpty());
-        assertTrue("Nothing run in A", sm.A.commandList.isEmpty());
-        sm.resetTestFlags();
-
-        // transition back to A
-        sm.Bwaiting.sendTransitionStateCommand(sm.A);
-        mTestLooper.dispatchAll();
-        verifyEnterExit(sm.Acontainer, false, false);
-        verifyEnterExit(sm.A, true, false);
-        assertArrayEquals("Sequence of deferred commands now executed", new Integer[]{50, 70, 60},
-                sm.A.commandList.toArray());
-        sm.resetTestFlags();
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WakeupControllerTest.java b/service/tests/wifitests/src/com/android/server/wifi/WakeupControllerTest.java
index 280aa13..f08ba74 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WakeupControllerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WakeupControllerTest.java
@@ -37,8 +37,6 @@
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiNetworkSuggestion;
 import android.net.wifi.WifiScanner;
-import android.net.wifi.WifiSsid;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.Handler;
 import android.os.test.TestLooper;
 import android.provider.Settings;
@@ -46,6 +44,7 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.server.wifi.ActiveModeWarden.PrimaryClientModeManagerChangedCallback;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.server.wifi.util.WifiConfigStoreEncryptionUtil;
 
 import org.junit.After;
@@ -142,7 +141,6 @@
         // scanlistener input
         mTestScanResult = new ScanResult();
         mTestScanResult.SSID = SAVED_SSID;
-        mTestScanResult.setWifiSsid(WifiSsid.fromUtf8Text(SAVED_SSID));
         mTestScanResult.capabilities = "";
         mTestScanResult.frequency = 2412;
         ScanResult[] scanResults = new ScanResult[1];
@@ -208,19 +206,17 @@
         }
     }
 
-    private ScanResult createOpenScanResult(String utf8Ssid, int frequency) {
+    private ScanResult createOpenScanResult(String ssid, int frequency) {
         ScanResult scanResult = new ScanResult();
-        scanResult.SSID = utf8Ssid;
-        scanResult.setWifiSsid(WifiSsid.fromUtf8Text(utf8Ssid));
+        scanResult.SSID = ssid;
         scanResult.capabilities = "";
         scanResult.frequency = frequency;
         return scanResult;
     }
 
-    private ScanResult createOweScanResult(String utf8Ssid, int frequency) {
+    private ScanResult createOweScanResult(String ssid, int frequency) {
         ScanResult scanResult = new ScanResult();
-        scanResult.SSID = utf8Ssid;
-        scanResult.setWifiSsid(WifiSsid.fromUtf8Text(utf8Ssid));
+        scanResult.SSID = ssid;
         scanResult.capabilities = "OWE";
         scanResult.frequency = frequency;
         return scanResult;
@@ -391,7 +387,7 @@
     public void startInitializesWakeupLockWithSavedScanResults() {
         String ssid1 = "ssid 1";
         String ssid2 = "ssid 2";
-        String quotedSsid = ScanResultUtil.createQuotedSsid(ssid1);
+        String quotedSsid = ScanResultUtil.createQuotedSSID(ssid1);
 
         // saved configs
         WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork(quotedSsid);
@@ -426,7 +422,7 @@
     public void startInitializesWakeupLockWithNetworkSuggestions() {
         String ssid1 = "ssid 1";
         String ssid2 = "ssid 2";
-        String quotedSsid = ScanResultUtil.createQuotedSsid(ssid1);
+        String quotedSsid = ScanResultUtil.createQuotedSSID(ssid1);
 
         // suggestions
         WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork(quotedSsid);
@@ -467,8 +463,8 @@
         String ssid1 = "ssid 1";
         String ssid2 = "ssid 2";
         String ssid3 = "ssid 3";
-        String quotedSsid1 = ScanResultUtil.createQuotedSsid(ssid1);
-        String quotedSsid2 = ScanResultUtil.createQuotedSsid(ssid2);
+        String quotedSsid1 = ScanResultUtil.createQuotedSSID(ssid1);
+        String quotedSsid2 = ScanResultUtil.createQuotedSSID(ssid2);
 
         // saved config + suggestion
         WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork(quotedSsid1);
@@ -510,7 +506,7 @@
     @Test
     public void getGoodSavedNetworksAndSuggestionsIgnoreInvalidatedCaptivePortal() {
         String ssid1 = "ssid 1";
-        String quotedSsid1 = ScanResultUtil.createQuotedSsid(ssid1);
+        String quotedSsid1 = ScanResultUtil.createQuotedSSID(ssid1);
 
         // saved captive portal config without validated network
         WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork(quotedSsid1);
@@ -531,7 +527,7 @@
     @Test
     public void getGoodSavedNetworksAndSuggestionsIncludeValidatedCaptivePortal() {
         String ssid1 = "ssid 1";
-        String quotedSsid1 = ScanResultUtil.createQuotedSsid(ssid1);
+        String quotedSsid1 = ScanResultUtil.createQuotedSSID(ssid1);
 
         // saved captive portal config with validated network
         WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork(quotedSsid1);
@@ -556,10 +552,10 @@
 
         // saved configs
         WifiConfiguration openNetworkDfs = WifiConfigurationTestUtil
-                .createOpenNetwork(ScanResultUtil.createQuotedSsid(ssidDfs));
+                .createOpenNetwork(ScanResultUtil.createQuotedSSID(ssidDfs));
         openNetworkDfs.getNetworkSelectionStatus().setHasEverConnected(true);
         WifiConfiguration openNetwork24 = WifiConfigurationTestUtil
-                .createOpenNetwork(ScanResultUtil.createQuotedSsid(ssid24));
+                .createOpenNetwork(ScanResultUtil.createQuotedSSID(ssid24));
         openNetwork24.getNetworkSelectionStatus().setHasEverConnected(true);
 
         when(mWifiConfigManager.getSavedNetworks(anyInt()))
@@ -589,7 +585,7 @@
     public void onResultsUpdatesWakeupLockForSavedNetworks() {
         // saved config
         WifiConfiguration openNetwork = WifiConfigurationTestUtil
-                .createOpenNetwork(ScanResultUtil.createQuotedSsid(SAVED_SSID));
+                .createOpenNetwork(ScanResultUtil.createQuotedSSID(SAVED_SSID));
         openNetwork.getNetworkSelectionStatus().setHasEverConnected(true);
         when(mWifiConfigManager.getSavedNetworks(anyInt()))
                 .thenReturn(Collections.singletonList(openNetwork));
@@ -617,7 +613,7 @@
     public void onResultsUpdatesWakeupLockForNetworkSuggestions() {
         // suggestions
         WifiConfiguration openNetwork = WifiConfigurationTestUtil
-                .createOpenNetwork(ScanResultUtil.createQuotedSsid(SAVED_SSID));
+                .createOpenNetwork(ScanResultUtil.createQuotedSSID(SAVED_SSID));
         WifiNetworkSuggestion openNetworkSuggestion =
                 new WifiNetworkSuggestion(openNetwork, null, false, false, true, true,
                         TEST_PRIORITY_GROUP);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WakeupEvaluatorTest.java b/service/tests/wifitests/src/com/android/server/wifi/WakeupEvaluatorTest.java
index d256106..381ee82 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WakeupEvaluatorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WakeupEvaluatorTest.java
@@ -27,12 +27,12 @@
 
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiManager;
-import android.net.wifi.WifiSsid;
-import android.net.wifi.util.ScanResultUtil;
 import android.util.ArraySet;
 
 import androidx.test.filters.SmallTest;
 
+import com.android.server.wifi.util.ScanResultUtil;
+
 import com.google.android.collect.Sets;
 
 import org.junit.After;
@@ -74,7 +74,6 @@
     private ScanResult makeScanResult(String ssid, int frequency, int level) {
         ScanResult scanResult = new ScanResult();
         scanResult.SSID = ssid;
-        scanResult.setWifiSsid(WifiSsid.fromUtf8Text(ssid));
         scanResult.frequency = frequency;
         scanResult.level = level;
         scanResult.capabilities = "[]";
@@ -86,10 +85,10 @@
         Set<ScanResultMatchInfo> networks = new ArraySet<>();
         networks.add(ScanResultMatchInfo.fromWifiConfiguration(
                 WifiConfigurationTestUtil.createOpenNetwork(
-                        ScanResultUtil.createQuotedSsid(SAVED_SSID_1))));
+                        ScanResultUtil.createQuotedSSID(SAVED_SSID_1))));
         networks.add(ScanResultMatchInfo.fromWifiConfiguration(
                 WifiConfigurationTestUtil.createOpenNetwork(
-                        ScanResultUtil.createQuotedSsid(SAVED_SSID_2))));
+                        ScanResultUtil.createQuotedSSID(SAVED_SSID_2))));
         return networks;
     }
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WakeupOnboardingTest.java b/service/tests/wifitests/src/com/android/server/wifi/WakeupOnboardingTest.java
index c60c89a..8c4809c 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WakeupOnboardingTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WakeupOnboardingTest.java
@@ -31,7 +31,6 @@
 import android.content.BroadcastReceiver;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.net.wifi.WifiContext;
 import android.os.Handler;
 import android.os.test.TestLooper;
 import android.provider.Settings;
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java
index 087b719..fcddf7a 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiApConfigStoreTest.java
@@ -16,10 +16,7 @@
 
 package com.android.server.wifi;
 
-import static android.net.wifi.SoftApConfiguration.RANDOMIZATION_NON_PERSISTENT;
-import static android.net.wifi.SoftApConfiguration.RANDOMIZATION_PERSISTENT;
 import static android.net.wifi.SoftApConfiguration.SECURITY_TYPE_WPA2_PSK;
-import static android.net.wifi.SoftApConfiguration.SECURITY_TYPE_WPA3_SAE;
 import static android.net.wifi.SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION;
 
 import static com.google.common.truth.Truth.assertThat;
@@ -39,9 +36,7 @@
 
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
 import android.net.MacAddress;
-import android.net.wifi.SoftApCapability;
 import android.net.wifi.SoftApConfiguration;
 import android.net.wifi.SoftApConfiguration.Builder;
 import android.net.wifi.WifiInfo;
@@ -102,9 +97,6 @@
     @Mock private WifiConfigStore mWifiConfigStore;
     @Mock private WifiConfigManager mWifiConfigManager;
     @Mock private ActiveModeWarden mActiveModeWarden;
-    @Mock private PackageManager mPackageManager;
-    @Mock private SoftApCapability mSoftApCapability;
-
     private Random mRandom;
     private MockResources mResources;
     @Mock private ApplicationInfo mMockApplInfo;
@@ -134,7 +126,6 @@
         when(mActiveModeWarden.isStaApConcurrencySupported())
                 .thenReturn(false);
         when(mContext.getResources()).thenReturn(mResources);
-        when(mContext.getPackageManager()).thenReturn(mPackageManager);
 
         // build the known good 2G channel list: TEST_DEFAULT_2G_CHANNEL_LIST
         mKnownGood2GChannelList = new ArrayList(Arrays.asList(1, 2, 3, 4, 5, 6));
@@ -143,8 +134,6 @@
         when(mWifiInjector.getMacAddressUtil()).thenReturn(mMacAddressUtil);
         when(mMacAddressUtil.calculatePersistentMac(any(), any())).thenReturn(TEST_RANDOMIZED_MAC);
         mResources.setBoolean(R.bool.config_wifi_ap_mac_randomization_supported, true);
-        mResources.setBoolean(
-                R.bool.config_wifiSoftapAutoAppendLowerBandsToBandConfigurationEnabled, true);
     }
 
     private void setupAllBandsSupported() {
@@ -193,7 +182,7 @@
     }
 
     private void verifyApConfig(SoftApConfiguration config1, SoftApConfiguration config2) {
-        assertEquals(config1.getWifiSsid(), config2.getWifiSsid());
+        assertEquals(config1.getSsid(), config2.getSsid());
         assertEquals(config1.getPassphrase(), config2.getPassphrase());
         assertEquals(config1.getSecurityType(), config2.getSecurityType());
         assertEquals(config1.getBand(), config2.getBand());
@@ -209,7 +198,7 @@
 
     private void verifyDefaultApConfig(SoftApConfiguration config, String expectedSsid,
             boolean isSaeSupport, boolean isMacRandomizationSupport, boolean isBridgedApSupport) {
-        String[] splitSsid = config.getWifiSsid().getUtf8Text().toString().split("_");
+        String[] splitSsid = config.getSsid().split("_");
         assertEquals(2, splitSsid.length);
         assertEquals(expectedSsid, splitSsid[0]);
         assertEquals(SoftApConfiguration.BAND_2GHZ, config.getBand());
@@ -223,13 +212,8 @@
         }
         assertEquals(15, config.getPassphrase().length());
         if (isMacRandomizationSupport) {
-            if (SdkLevel.isAtLeastT()) {
-                assertEquals(config.getMacRandomizationSettingInternal(),
-                        SoftApConfiguration.RANDOMIZATION_NON_PERSISTENT);
-            } else {
-                assertEquals(config.getMacRandomizationSettingInternal(),
-                        SoftApConfiguration.RANDOMIZATION_PERSISTENT);
-            }
+            assertEquals(config.getMacRandomizationSettingInternal(),
+                    SoftApConfiguration.RANDOMIZATION_PERSISTENT);
         } else {
             assertEquals(config.getMacRandomizationSettingInternal(),
                     SoftApConfiguration.RANDOMIZATION_NONE);
@@ -257,7 +241,7 @@
 
     private void verifyDefaultLocalOnlyApConfig(SoftApConfiguration config, String expectedSsid,
             int expectedApBand, boolean isSaeSupport, boolean isMacRandomizationSupport) {
-        String[] splitSsid = config.getWifiSsid().getUtf8Text().toString().split("_");
+        String[] splitSsid = config.getSsid().split("_");
         assertEquals(2, splitSsid.length);
         assertEquals(expectedSsid, splitSsid[0]);
         assertEquals(expectedApBand, config.getBand());
@@ -271,13 +255,8 @@
         assertEquals(15, config.getPassphrase().length());
         assertFalse(config.isAutoShutdownEnabled());
         if (isMacRandomizationSupport) {
-            if (SdkLevel.isAtLeastT()) {
-                assertEquals(config.getMacRandomizationSettingInternal(),
-                        SoftApConfiguration.RANDOMIZATION_NON_PERSISTENT);
-            } else {
-                assertEquals(config.getMacRandomizationSettingInternal(),
-                        SoftApConfiguration.RANDOMIZATION_PERSISTENT);
-            }
+            assertEquals(config.getMacRandomizationSettingInternal(),
+                    SoftApConfiguration.RANDOMIZATION_PERSISTENT);
         } else {
             assertEquals(config.getMacRandomizationSettingInternal(),
                     SoftApConfiguration.RANDOMIZATION_NONE);
@@ -351,9 +330,6 @@
                 true                              /* Hidden SSID */);
         store.setApConfiguration(expectedConfig);
         verifyApConfig(expectedConfig, store.getApConfiguration());
-        // Verify the persistent randomized MAC address has been added
-        assertEquals(TEST_RANDOMIZED_MAC, store.getApConfiguration()
-                .getPersistentRandomizedMacAddress());
         verifyApConfig(expectedConfig, mDataStoreSource.toSerialize());
         verify(mWifiConfigManager, times(2)).saveToStore(true);
         verify(mBackupManagerProxy, times(2)).notifyDataChanged();
@@ -536,7 +512,7 @@
     public void generateLocalOnlyHotspotConfigIsValid() throws Exception {
         WifiApConfigStore store = createWifiApConfigStore();
         SoftApConfiguration config = store
-                .generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability);
+                .generateLocalOnlyHotspotConfig(mContext, SoftApConfiguration.BAND_2GHZ, null);
         verifyDefaultLocalOnlyApConfig(config, TEST_DEFAULT_HOTSPOT_SSID,
                 SoftApConfiguration.BAND_2GHZ);
 
@@ -545,19 +521,13 @@
     }
 
     /**
-     * Verify a proper local only hotspot config is generated for 5Ghz band when overlay configured
-     * and there are available 5g channels.
+     * Verify a proper local only hotspot config is generated for 5Ghz band.
      */
     @Test
-    public void generateLocalOnlyHotspotConfigWhenOverlayConfigureTo5G() throws Exception {
-        //leslea
-        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)).thenReturn(true);
-        when(mSoftApCapability.getSupportedChannelList(SoftApConfiguration.BAND_5GHZ))
-                .thenReturn(new int[] {36});
-        mResources.setBoolean(R.bool.config_wifi_local_only_hotspot_5ghz, true);
+    public void generateLocalOnlyHotspotConfigIsValid5G() throws Exception {
         WifiApConfigStore store = createWifiApConfigStore();
         SoftApConfiguration config = store
-                .generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability);
+                .generateLocalOnlyHotspotConfig(mContext, SoftApConfiguration.BAND_5GHZ, null);
         verifyDefaultLocalOnlyApConfig(config, TEST_DEFAULT_HOTSPOT_SSID,
                 SoftApConfiguration.BAND_5GHZ);
 
@@ -565,138 +535,27 @@
         assertTrue(WifiApConfigStore.validateApWifiConfiguration(config, true, mContext));
     }
 
-    /**
-     * Verify a proper local only hotspot config is generated for 2Ghz band when overlay configured
-     * but there is no available 5g channel.
-     */
-    @Test
-    public void generateLocalOnlyHotspotConfigWhenOverlayConfigureTo5GButNoAvailable5GChannel()
-            throws Exception {
-        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)).thenReturn(true);
-        mResources.setBoolean(R.bool.config_wifi_local_only_hotspot_5ghz, true);
-        WifiApConfigStore store = createWifiApConfigStore();
-        SoftApConfiguration config = store
-                .generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability);
-        verifyDefaultLocalOnlyApConfig(config, TEST_DEFAULT_HOTSPOT_SSID,
-                SoftApConfiguration.BAND_2GHZ);
-
-        // verify that the config passes the validateApWifiConfiguration check
-        assertTrue(WifiApConfigStore.validateApWifiConfiguration(config, true, mContext));
-    }
-
-    /**
-     * Verify a proper local only hotspot config is generated for 6Ghz band when overlay configured
-     * and there are available 6g channels.
-     */
-    @Test
-    public void generateLocalOnlyHotspotConfigWhenOverlayConfigureTo6G() throws Exception {
-        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)).thenReturn(true);
-        when(mSoftApCapability.getSupportedChannelList(SoftApConfiguration.BAND_6GHZ))
-                .thenReturn(new int[] {1});
-        mResources.setBoolean(R.bool.config_wifiLocalOnlyHotspot6ghz, true);
-        WifiApConfigStore store = createWifiApConfigStore();
-        SoftApConfiguration config = store
-                .generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability);
-        verifyDefaultLocalOnlyApConfig(config, TEST_DEFAULT_HOTSPOT_SSID,
-                SoftApConfiguration.BAND_6GHZ);
-
-        SoftApConfiguration updatedConfig = new SoftApConfiguration.Builder(config)
-                .setPassphrase("somepassword", SECURITY_TYPE_WPA3_SAE)
-                .build();
-
-        // verify that the config passes the validateApWifiConfiguration check
-        assertTrue(WifiApConfigStore.validateApWifiConfiguration(updatedConfig, true, mContext));
-    }
-
-    /**
-     * Verify a proper local only hotspot config is generated for 2Ghz band when overlay configured
-     * but there is no available 6g channel.
-     */
-    @Test
-    public void generateLocalOnlyHotspotConfigWhenOverlayConfigureTo6GButNoAvailable6GChannel()
-            throws Exception {
-        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)).thenReturn(true);
-        mResources.setBoolean(R.bool.config_wifiLocalOnlyHotspot6ghz, true);
-        WifiApConfigStore store = createWifiApConfigStore();
-        SoftApConfiguration config = store
-                .generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability);
-        verifyDefaultLocalOnlyApConfig(config, TEST_DEFAULT_HOTSPOT_SSID,
-                SoftApConfiguration.BAND_2GHZ);
-
-        // verify that the config passes the validateApWifiConfiguration check
-        assertTrue(WifiApConfigStore.validateApWifiConfiguration(config, true, mContext));
-    }
-
-    @Test
-    public void generateLohsConfig_forwardsCustomBand() throws Exception {
-        WifiApConfigStore store = createWifiApConfigStore();
-        SoftApConfiguration.Builder customConfigBuilder = new SoftApConfiguration.Builder()
-                .setBand(SoftApConfiguration.BAND_5GHZ);
-        SoftApConfiguration softApConfig = store.generateLocalOnlyHotspotConfig(
-                mContext, customConfigBuilder.build(), mSoftApCapability);
-        assertThat(softApConfig.getBand()).isEqualTo(SoftApConfiguration.BAND_5GHZ);
-
-        // Test 6G band
-        customConfigBuilder.setBand(SoftApConfiguration.BAND_6GHZ);
-        softApConfig = store.generateLocalOnlyHotspotConfig(
-                mContext, customConfigBuilder.build(), mSoftApCapability);
-        assertThat(softApConfig.getBand()).isEqualTo(SoftApConfiguration.BAND_6GHZ);
-    }
-
     @Test
     public void generateLohsConfig_forwardsCustomMac() throws Exception {
         WifiApConfigStore store = createWifiApConfigStore();
-        SoftApConfiguration.Builder customConfigBuilder = new SoftApConfiguration.Builder()
-                .setBssid(TEST_SAP_BSSID_MAC);
-        if (SdkLevel.isAtLeastS()) {
-            customConfigBuilder.setMacRandomizationSetting(
-                    SoftApConfiguration.RANDOMIZATION_NONE);
-        }
-        SoftApConfiguration customConfig = customConfigBuilder.build();
+        SoftApConfiguration customConfig = new SoftApConfiguration.Builder()
+                .setBssid(TEST_SAP_BSSID_MAC)
+                .build();
         SoftApConfiguration softApConfig = store.generateLocalOnlyHotspotConfig(
-                mContext, customConfig, mSoftApCapability);
+                mContext, SoftApConfiguration.BAND_2GHZ, customConfig);
         assertThat(softApConfig.getBssid().toString()).isNotEmpty();
         assertThat(softApConfig.getBssid()).isEqualTo(TEST_SAP_BSSID_MAC);
     }
 
     @Test
-    public void randomizeBssid_randomizesPersistWhenEnabled() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
+    public void randomizeBssid_randomizesWhenEnabled() throws Exception {
         mResources.setBoolean(R.bool.config_wifi_ap_mac_randomization_supported, true);
-        SoftApConfiguration baseConfig = new SoftApConfiguration.Builder()
-                .setMacRandomizationSetting(RANDOMIZATION_PERSISTENT).build();
+        SoftApConfiguration baseConfig = new SoftApConfiguration.Builder().build();
 
         WifiApConfigStore store = createWifiApConfigStore();
         SoftApConfiguration config = store.randomizeBssidIfUnset(mContext, baseConfig);
 
         assertEquals(TEST_RANDOMIZED_MAC, config.getBssid());
-
-        // The MAC is persist when configuration doesn't be changed.
-        config = store.randomizeBssidIfUnset(mContext, baseConfig);
-
-        assertEquals(TEST_RANDOMIZED_MAC, config.getBssid());
-    }
-
-    @Test
-    public void randomizeBssid_randomizesNonPersistWhenEnabled() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        mResources.setBoolean(R.bool.config_wifi_ap_mac_randomization_supported, true);
-        SoftApConfiguration baseConfig = new SoftApConfiguration.Builder()
-                .setMacRandomizationSetting(RANDOMIZATION_NON_PERSISTENT).build();
-
-        WifiApConfigStore store = createWifiApConfigStore();
-        SoftApConfiguration config = store.randomizeBssidIfUnset(mContext, baseConfig);
-
-        // Verify that some randomized MAC address is still generated
-        MacAddress firstRandomizedMAC = config.getBssid();
-        assertNotNull(config.getBssid());
-        assertNotEquals(WifiInfo.DEFAULT_MAC_ADDRESS, firstRandomizedMAC.toString());
-
-        // Call again and verify it will randomize again.
-        config = store.randomizeBssidIfUnset(mContext, baseConfig);
-        assertNotNull(config.getBssid());
-        assertNotEquals(firstRandomizedMAC, config.getBssid());
-        assertNotEquals(WifiInfo.DEFAULT_MAC_ADDRESS, config.getBssid().toString());
     }
 
     @Test
@@ -730,9 +589,6 @@
         mResources.setBoolean(R.bool.config_wifi_ap_mac_randomization_supported, true);
         Builder baseConfigBuilder = new SoftApConfiguration.Builder();
         baseConfigBuilder.setBssid(TEST_SAP_BSSID_MAC);
-        if (SdkLevel.isAtLeastS()) {
-            baseConfigBuilder.setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE);
-        }
 
         WifiApConfigStore store = createWifiApConfigStore();
         SoftApConfiguration config = store.randomizeBssidIfUnset(mContext,
@@ -776,61 +632,50 @@
     }
 
     /**
-     * Verify the SSID check in validateApWifiConfiguration.
+     * Verify the SSID checks in validateApWifiConfiguration.
+     *
+     * Cases to check and verify they trigger failed verification:
+     * null SoftApConfiguration.SSID
+     * empty SoftApConfiguration.SSID
+     * invalid WifiConfiguaration.SSID length
+     *
+     * Additionally check a valid SSID with a random (within valid ranges) length.
      */
     @Test
     public void testSsidVerificationInValidateApWifiConfigurationCheck() {
         Builder configBuilder = new SoftApConfiguration.Builder();
         configBuilder.setSsid(null);
-        // Invalid due to null SSID.
+        assertFalse(WifiApConfigStore.validateApWifiConfiguration(
+                configBuilder.build(), true, mContext));
+        // check a string if it's larger than 32 bytes with UTF-8 encode
+        // Case 1 : one byte per character (use english words and Arabic numerals)
+        configBuilder.setSsid(generateRandomString(WifiApConfigStore.SSID_MAX_LEN + 1));
+        assertFalse(WifiApConfigStore.validateApWifiConfiguration(
+                configBuilder.build(), true, mContext));
+        // Case 2 : two bytes per character
+        configBuilder.setSsid(TEST_STRING_UTF8_WITH_34_BYTES);
+        assertFalse(WifiApConfigStore.validateApWifiConfiguration(
+                configBuilder.build(), true, mContext));
+        // Case 3 : three bytes per character
+        configBuilder.setSsid(TEST_STRING_UTF8_WITH_33_BYTES);
         assertFalse(WifiApConfigStore.validateApWifiConfiguration(
                 configBuilder.build(), true, mContext));
 
-        // SSID is set, so the config is now valid.
-        configBuilder.setSsid("ssid");
+        // now check a valid SSID within 32 bytes
+        // Case 1 :  one byte per character with random length
+        int validLength = WifiApConfigStore.SSID_MAX_LEN - WifiApConfigStore.SSID_MIN_LEN;
+        configBuilder.setSsid(generateRandomString(
+                mRandom.nextInt(validLength) + WifiApConfigStore.SSID_MIN_LEN));
         assertTrue(WifiApConfigStore.validateApWifiConfiguration(
                 configBuilder.build(), true, mContext));
-    }
-
-    /**
-     * Verify the 6GHz restrictions on security types.
-     */
-    @Test
-    public void test6ghzRestrictionsSecurityTypes() {
-        Builder configBuilder = new SoftApConfiguration.Builder();
-        configBuilder.setSsid("ssid");
-        configBuilder.setBand(SoftApConfiguration.BAND_6GHZ);
-
-        // OPEN
-        configBuilder.setPassphrase(null, SoftApConfiguration.SECURITY_TYPE_OPEN);
-        assertFalse(WifiApConfigStore.validateApWifiConfiguration(
-                configBuilder.build(), true, mContext));
-
-        // WPA2
-        configBuilder.setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        assertFalse(WifiApConfigStore.validateApWifiConfiguration(
-                configBuilder.build(), true, mContext));
-
-        // WPA3 SAE (should succeed)
-        configBuilder.setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
+        // Case 2 : two bytes per character
+        configBuilder.setSsid(TEST_STRING_UTF8_WITH_32_BYTES);
         assertTrue(WifiApConfigStore.validateApWifiConfiguration(
                 configBuilder.build(), true, mContext));
-
-        // WPA3 SAE-Transition
-        configBuilder.setPassphrase("somepassword",
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION);
-        assertFalse(WifiApConfigStore.validateApWifiConfiguration(
+        // Case 3 : three bytes per character
+        configBuilder.setSsid(TEST_STRING_UTF8_WITH_30_BYTES);
+        assertTrue(WifiApConfigStore.validateApWifiConfiguration(
                 configBuilder.build(), true, mContext));
-
-        if (SdkLevel.isAtLeastT()) {
-            // WPA3 OWE-Transition
-            if (SdkLevel.isAtLeastT()) {
-                configBuilder.setPassphrase(null,
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION);
-                assertFalse(WifiApConfigStore.validateApWifiConfiguration(
-                        configBuilder.build(), true, mContext));
-            }
-        }
     }
 
     /**
@@ -861,8 +706,8 @@
         // Builder will auto check auth type and passphrase
 
         // test random (valid length)
-        int maxLen = WifiApConfigStore.PSK_SAE_ASCII_MAX_LEN;
-        int minLen = WifiApConfigStore.PSK_ASCII_MIN_LEN;
+        int maxLen = WifiApConfigStore.PSK_MAX_LEN;
+        int minLen = WifiApConfigStore.PSK_MIN_LEN;
         configBuilder.setPassphrase(
                 generateRandomString(mRandom.nextInt(maxLen - minLen) + minLen),
                 SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
@@ -870,21 +715,6 @@
                 configBuilder.build(), true, mContext));
     }
 
-    @Test
-    public void testSaeNetworkConfigInValidateApWifiConfigurationCheck() {
-        Builder configBuilder = new SoftApConfiguration.Builder();
-        configBuilder.setSsid(TEST_DEFAULT_HOTSPOT_SSID);
-
-        // test random (invalid length)
-        int maxLen = WifiApConfigStore.PSK_SAE_ASCII_MAX_LEN;
-        configBuilder.setPassphrase(
-                generateRandomString(maxLen + 1),
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        assertFalse(WifiApConfigStore.validateApWifiConfiguration(
-                configBuilder.build(), true, mContext));
-
-    }
-
     /**
      * Verify the WPA2_PSK network checks in validateApWifiConfiguration.
      *
@@ -929,9 +759,9 @@
         mResources.setBoolean(R.bool.config_wifi_softap_sae_supported, true);
         WifiApConfigStore store = createWifiApConfigStore();
         SoftApConfiguration config = store
-                .generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability);
+                .generateLocalOnlyHotspotConfig(mContext, SoftApConfiguration.BAND_5GHZ, null);
         verifyDefaultLocalOnlyApConfig(config, TEST_DEFAULT_HOTSPOT_SSID,
-                SoftApConfiguration.BAND_2GHZ, true);
+                SoftApConfiguration.BAND_5GHZ, true);
 
         // verify that the config passes the validateApWifiConfiguration check
         assertTrue(WifiApConfigStore.validateApWifiConfiguration(config, true, mContext));
@@ -947,9 +777,9 @@
         mResources.setBoolean(R.bool.config_wifi_ap_mac_randomization_supported, true);
         WifiApConfigStore store = createWifiApConfigStore();
         SoftApConfiguration config = store
-                .generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability);
+                .generateLocalOnlyHotspotConfig(mContext, SoftApConfiguration.BAND_5GHZ, null);
         verifyDefaultLocalOnlyApConfig(config, TEST_DEFAULT_HOTSPOT_SSID,
-                SoftApConfiguration.BAND_2GHZ, true, true);
+                SoftApConfiguration.BAND_5GHZ, true, true);
 
         // verify that the config passes the validateApWifiConfiguration check
         assertTrue(WifiApConfigStore.validateApWifiConfiguration(config, true, mContext));
@@ -966,9 +796,9 @@
         mResources.setBoolean(R.bool.config_wifi_ap_mac_randomization_supported, false);
         WifiApConfigStore store = createWifiApConfigStore();
         SoftApConfiguration config = store
-                .generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability);
+                .generateLocalOnlyHotspotConfig(mContext, SoftApConfiguration.BAND_5GHZ, null);
         verifyDefaultLocalOnlyApConfig(config, TEST_DEFAULT_HOTSPOT_SSID,
-                SoftApConfiguration.BAND_2GHZ, true, false);
+                SoftApConfiguration.BAND_5GHZ, true, false);
 
         // verify that the config passes the validateApWifiConfiguration check
         assertTrue(WifiApConfigStore.validateApWifiConfiguration(config, true, mContext));
@@ -990,9 +820,9 @@
                 .setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE).build();
         storeMacRandomizationSupported.setApConfiguration(disableMacRandomizationConfig);
         SoftApConfiguration config = storeMacRandomizationSupported
-                .generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability);
+                .generateLocalOnlyHotspotConfig(mContext, SoftApConfiguration.BAND_5GHZ, null);
         verifyDefaultLocalOnlyApConfig(config, TEST_DEFAULT_HOTSPOT_SSID,
-                SoftApConfiguration.BAND_2GHZ, true, false);
+                SoftApConfiguration.BAND_5GHZ, true, false);
 
         // verify that the config passes the validateApWifiConfiguration check
         assertTrue(WifiApConfigStore.validateApWifiConfiguration(config, true, mContext));
@@ -1121,7 +951,7 @@
                 R.bool.config_wifiSoftapResetAutoShutdownTimerConfig, true);
         configBuilder.setShutdownTimeoutMillis(8888);
         resetedConfig = store.resetToDefaultForUnsupportedConfig(configBuilder.build());
-        assertEquals(-1, resetedConfig.getShutdownTimeoutMillis());
+        assertEquals(resetedConfig.getShutdownTimeoutMillis(), 0);
 
         // Test max client setting when force client disconnect doesn't support
         mResources.setBoolean(R.bool.config_wifiSofapClientForceDisconnectSupported, false);
@@ -1177,14 +1007,9 @@
     @Test
     public void testBssidDenyIfCallerWithoutPrivileged() throws Exception {
         WifiApConfigStore store = createWifiApConfigStore();
-        SoftApConfiguration.Builder configBuilder =
-                new SoftApConfiguration.Builder(store.getApConfiguration())
-                .setBssid(TEST_SAP_BSSID_MAC);
-        if (SdkLevel.isAtLeastS()) {
-            configBuilder.setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE);
-        }
-        assertFalse(WifiApConfigStore.validateApWifiConfiguration(configBuilder.build(),
-                false, mContext));
+        SoftApConfiguration config = new SoftApConfiguration.Builder(store.getApConfiguration())
+                .setBssid(TEST_SAP_BSSID_MAC).build();
+        assertFalse(WifiApConfigStore.validateApWifiConfiguration(config, false, mContext));
     }
 
     /**
@@ -1193,14 +1018,9 @@
     @Test
     public void testBssidAllowIfCallerOwnPrivileged() throws Exception {
         WifiApConfigStore store = createWifiApConfigStore();
-        SoftApConfiguration.Builder configBuilder =
-                new SoftApConfiguration.Builder(store.getApConfiguration())
-                .setBssid(TEST_SAP_BSSID_MAC);
-        if (SdkLevel.isAtLeastS()) {
-            configBuilder.setMacRandomizationSetting(SoftApConfiguration.RANDOMIZATION_NONE);
-        }
-        assertTrue(WifiApConfigStore.validateApWifiConfiguration(configBuilder.build(),
-                true, mContext));
+        SoftApConfiguration config = new SoftApConfiguration.Builder(store.getApConfiguration())
+                .setBssid(TEST_SAP_BSSID_MAC).build();
+        assertTrue(WifiApConfigStore.validateApWifiConfiguration(config, true, mContext));
     }
 
     @Test
@@ -1253,70 +1073,28 @@
                 SoftApConfiguration.BAND_5GHZ,    /* AP band */
                 0,                                /* AP channel */
                 true                              /* Hidden SSID */);
-        // Test 5G only band config will be appended 2.4G band into config
-        SoftApConfiguration.Builder testConfigBuilder =
-                new SoftApConfiguration.Builder(config5Gonly);
-        SoftApConfiguration.Builder expectedConfigBuilder =
-                new SoftApConfiguration.Builder(testConfigBuilder.build())
-                .setBand(SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ);
-        store.setApConfiguration(testConfigBuilder.build());
-        verifyApConfig(expectedConfigBuilder.build(), store.getApConfiguration());
 
-        // Test 6G only band config will be appended 2.4G & 5G band into config.
-        testConfigBuilder.setBand(SoftApConfiguration.BAND_6GHZ);
+        SoftApConfiguration expectedConfig = new SoftApConfiguration.Builder(config5Gonly)
+                .setBand(SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ)
+                .build();
+        store.setApConfiguration(config5Gonly);
+        verifyApConfig(expectedConfig, store.getApConfiguration());
 
-        expectedConfigBuilder.setBand(SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ
-                | SoftApConfiguration.BAND_6GHZ);
-        store.setApConfiguration(testConfigBuilder.build());
-        verifyApConfig(expectedConfigBuilder.build(), store.getApConfiguration());
-
-        // Dual bands test case
         if (SdkLevel.isAtLeastS()) {
-            testConfigBuilder.setBands(new int[] {SoftApConfiguration.BAND_2GHZ,
-                    SoftApConfiguration.BAND_5GHZ}).build();
+            SoftApConfiguration bridgedConfig2GAnd5G = new SoftApConfiguration.Builder(config5Gonly)
+                    .setBands(new int[] {SoftApConfiguration.BAND_2GHZ,
+                            SoftApConfiguration.BAND_5GHZ})
+                    .build();
 
-            expectedConfigBuilder.setBands(new int[] {SoftApConfiguration.BAND_2GHZ,
-                    SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ});
-            store.setApConfiguration(testConfigBuilder.build());
-            verifyApConfig(expectedConfigBuilder.build(), store.getApConfiguration());
-
-            testConfigBuilder.setBands(new int[] {SoftApConfiguration.BAND_2GHZ,
-                    SoftApConfiguration.BAND_6GHZ}).build();
-
-            expectedConfigBuilder.setBands(new int[] {SoftApConfiguration.BAND_2GHZ,
-                    SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ
-                            | SoftApConfiguration.BAND_6GHZ});
-            store.setApConfiguration(testConfigBuilder.build());
-            verifyApConfig(expectedConfigBuilder.build(), store.getApConfiguration());
+            SoftApConfiguration expectedBridgedConfig = new SoftApConfiguration
+                    .Builder(bridgedConfig2GAnd5G)
+                    .setBands(new int[] {SoftApConfiguration.BAND_2GHZ,
+                            SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ})
+                    .build();
         }
     }
 
     @Test
-    public void testSanitizePersistentApConfigWhenAutoAppendDisabled() throws Exception {
-        // Test when resource disabled
-        mResources.setBoolean(
-                R.bool.config_wifiSoftapAutoAppendLowerBandsToBandConfigurationEnabled,
-                false);
-        SoftApConfiguration config5Gonly = setupApConfig(
-                "ConfiguredAP",                   /* SSID */
-                "randomKey",                      /* preshared key */
-                SECURITY_TYPE_WPA2_PSK,           /* security type */
-                SoftApConfiguration.BAND_5GHZ,    /* AP band */
-                0,                                /* AP channel */
-                true                              /* Hidden SSID */);
-        WifiApConfigStore store_disableAutoAppendBand = createWifiApConfigStore();
-        store_disableAutoAppendBand.setApConfiguration(config5Gonly);
-        verifyApConfig(config5Gonly, store_disableAutoAppendBand.getApConfiguration());
-
-        SoftApConfiguration config6Gonly =
-                new SoftApConfiguration.Builder(config5Gonly)
-                .setBand(SoftApConfiguration.BAND_6GHZ).build();
-
-        store_disableAutoAppendBand.setApConfiguration(config6Gonly);
-        verifyApConfig(config6Gonly, store_disableAutoAppendBand.getApConfiguration());
-    }
-
-    @Test
     public void testForceApBaneChannel() throws Exception {
         int testBand = SoftApConfiguration.BAND_5GHZ; // Not default
         int testChannal = 149;
@@ -1346,65 +1124,4 @@
         assertEquals(expectedConfig.getBand(), SoftApConfiguration.BAND_2GHZ);
         assertEquals(expectedConfig.getChannel(), 0);
     }
-
-    private void verifyUpgradeConfiguration(WifiApConfigStore store, boolean isBridgedSupported,
-            boolean isUpgradeEnabledInOverlayConfig) throws Exception {
-        mResources.setBoolean(R.bool.config_wifiBridgedSoftApSupported, isBridgedSupported);
-        mResources.setBoolean(R.bool.config_wifiSoftapAutoUpgradeToBridgedConfigWhenSupported,
-                isUpgradeEnabledInOverlayConfig);
-        SoftApConfiguration singleConfig2G = setupApConfig(
-                "ConfiguredAP",                   /* SSID */
-                "randomKey",                      /* preshared key */
-                SECURITY_TYPE_WPA2_PSK,           /* security type */
-                SoftApConfiguration.BAND_2GHZ,    /* AP band */
-                0,                                /* AP channel */
-                true                              /* Hidden SSID */);
-        SoftApConfiguration bridgedConfig2GAnd5G = new SoftApConfiguration.Builder(singleConfig2G)
-                .setBands(new int[] {SoftApConfiguration.BAND_2GHZ,
-                        SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ})
-                .build();
-
-        final SoftApConfiguration upgradedConfig = store.upgradeSoftApConfiguration(singleConfig2G);
-        if (isBridgedSupported && isUpgradeEnabledInOverlayConfig) {
-            assertEquals(bridgedConfig2GAnd5G, upgradedConfig);
-        } else {
-            assertEquals(singleConfig2G, upgradedConfig);
-        }
-    }
-
-    @Test
-    public void testUpgradeSoftApConfiguration() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        WifiApConfigStore store = createWifiApConfigStore();
-        verifyUpgradeConfiguration(store, true, true);
-        verifyUpgradeConfiguration(store, false, true);
-        verifyUpgradeConfiguration(store, true, false);
-        verifyUpgradeConfiguration(store, false, false);
-    }
-
-    @Test
-    public void testPersistentRandomizedMacAddress() throws Exception {
-        WifiApConfigStore store = createWifiApConfigStore();
-        assertEquals(TEST_RANDOMIZED_MAC, store.getApConfiguration()
-                .getPersistentRandomizedMacAddress());
-        assertEquals(TEST_RANDOMIZED_MAC,
-                store.generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability)
-                .getPersistentRandomizedMacAddress());
-        assertEquals(TEST_RANDOMIZED_MAC,
-                store.generateLocalOnlyHotspotConfig(mContext, store.getApConfiguration(),
-                mSoftApCapability).getPersistentRandomizedMacAddress());
-    }
-
-    @Test
-    public void testPersistentRandomizedMacAddressWhenCalculatedMacIsNull() throws Exception {
-        when(mMacAddressUtil.calculatePersistentMac(any(), any())).thenReturn(null);
-        WifiApConfigStore store = createWifiApConfigStore();
-        assertNotNull(store.getApConfiguration().getPersistentRandomizedMacAddress());
-        assertNotNull(
-                store.generateLocalOnlyHotspotConfig(mContext, null, mSoftApCapability)
-                .getPersistentRandomizedMacAddress());
-        assertNotNull(
-                store.generateLocalOnlyHotspotConfig(mContext, store.getApConfiguration(),
-                mSoftApCapability).getPersistentRandomizedMacAddress());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java
index e58b515..112abca 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java
@@ -106,7 +106,7 @@
                     + "<boolean name=\"HiddenSSID\" value=\"false\" />\n"
                     + "<boolean name=\"RequirePMF\" value=\"false\" />\n"
                     // Valid Value: 01
-                    + "<byte-array name=\"AllowedKeyMgmt\" num=\"3\">010004</byte-array>\n"
+                    + "<byte-array name=\"AllowedKeyMgmt\" num=\"3\">010002</byte-array>\n"
                     // Valid Value: 03
                     + "<byte-array name=\"AllowedProtocols\" num=\"1\">13</byte-array>\n"
                     // Valid Value: 01
@@ -253,7 +253,6 @@
                     + "<boolean name=\"AutoJoinEnabled\" value=\"false\" />\n"
                     + "<int name=\"DeletionPriority\" value=\"0\" />\n"
                     + "<int name=\"NumRebootsSinceLastUse\" value=\"0\" />\n"
-                    + "<boolean name=\"RepeaterEnabled\" value=\"false\" />\n"
                     + "<SecurityParamsList>\n"
                     + "<SecurityParams>\n"
                     + "<int name=\"SecurityType\" value=\"2\" />\n"
@@ -282,7 +281,7 @@
         when(mWifiPermissionsUtil.checkConfigOverridePermission(anyInt())).thenReturn(true);
         mWifiBackupRestore = new WifiBackupRestore(mWifiPermissionsUtil);
         // Enable verbose logging before tests to check the backup data dumps.
-        mWifiBackupRestore.enableVerboseLogging(true);
+        mWifiBackupRestore.enableVerboseLogging(1);
     }
 
     @After
@@ -985,46 +984,6 @@
     }
 
     /**
-     * Verify that a network that has never been connected to due to a wrong password
-     * is not serialized. Networks that have connected, or that have not connected for a
-     * different reason, should be serialized and deserialized correctly.
-     */
-    @Test
-    public void testNeverConnectedDueToWrongPasswordRestore() {
-        List<WifiConfiguration> configurations = new ArrayList<>();
-        List<WifiConfiguration> expectedConfigurations = new ArrayList<>();
-
-        // Never connected due to wrong password. Should not be in |expectedConfigurations|.
-        WifiConfiguration neverConnectedWrongPass = WifiConfigurationTestUtil.createWepNetwork();
-        neverConnectedWrongPass.getNetworkSelectionStatus().setHasEverConnected(false);
-        neverConnectedWrongPass.getNetworkSelectionStatus().setNetworkSelectionDisableReason(
-                WifiConfiguration.NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD);
-        configurations.add(neverConnectedWrongPass);
-
-        // Has connected but has wrong password. Should be in |expectedConfigurations|.
-        WifiConfiguration hasConnectedWrongPass = WifiConfigurationTestUtil.createWepNetwork();
-        hasConnectedWrongPass.getNetworkSelectionStatus().setHasEverConnected(true);
-        hasConnectedWrongPass.getNetworkSelectionStatus().setNetworkSelectionDisableReason(
-                WifiConfiguration.NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD);
-        configurations.add(hasConnectedWrongPass);
-        expectedConfigurations.add(hasConnectedWrongPass);
-
-        // Never connected for some other reason. Should be in |expectedConfigurations|.
-        WifiConfiguration neverConnectedOtherReason = WifiConfigurationTestUtil.createWepNetwork();
-        neverConnectedOtherReason.getNetworkSelectionStatus().setHasEverConnected(false);
-        neverConnectedOtherReason.getNetworkSelectionStatus().setNetworkSelectionDisableReason(
-                WifiConfiguration.NetworkSelectionStatus.DISABLED_NO_INTERNET_TEMPORARY);
-        configurations.add(neverConnectedOtherReason);
-        expectedConfigurations.add(neverConnectedOtherReason);
-
-        byte[] backupData = mWifiBackupRestore.retrieveBackupDataFromConfigurations(configurations);
-        List<WifiConfiguration> retrievedConfigurations =
-                mWifiBackupRestore.retrieveConfigurationsFromBackupData(backupData);
-        WifiConfigurationTestUtil.assertConfigurationsEqualForBackup(
-                expectedConfigurations, retrievedConfigurations);
-    }
-
-    /**
      * Verifying that backup data containing some unknown keys is properly restored.
      * The backup data used here is a PII masked version of a backup data seen in a reported bug.
      */
@@ -1272,11 +1231,10 @@
             out.write("        " + "wep_tx_keyidx=" + configuration.wepTxKeyIndex + "\n");
         }
         Map<String, String> extras = new HashMap<>();
-        extras.put(SupplicantStaNetworkHalHidlImpl.ID_STRING_KEY_CONFIG_KEY,
-                configuration.getKey());
-        extras.put(SupplicantStaNetworkHalHidlImpl.ID_STRING_KEY_CREATOR_UID,
+        extras.put(SupplicantStaNetworkHal.ID_STRING_KEY_CONFIG_KEY, configuration.getKey());
+        extras.put(SupplicantStaNetworkHal.ID_STRING_KEY_CREATOR_UID,
                 Integer.toString(configuration.creatorUid));
-        String idString = "\"" + SupplicantStaNetworkHalHidlImpl.createNetworkExtra(extras) + "\"";
+        String idString = "\"" + SupplicantStaNetworkHal.createNetworkExtra(extras) + "\"";
         if (idString != null) {
             out.write("        " + "id_str=" + idString + "\n");
         }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiBlocklistMonitorTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiBlocklistMonitorTest.java
index f848258..a0f4a8a 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiBlocklistMonitorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiBlocklistMonitorTest.java
@@ -16,39 +16,26 @@
 
 package com.android.server.wifi;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import android.content.Context;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
 import android.net.wifi.WifiConfiguration.NetworkSelectionStatus.DisableReasonInfo;
-import android.net.wifi.WifiSsid;
 import android.util.LocalLog;
 
 import androidx.test.filters.SmallTest;
 
-import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.wifi.resources.R;
 
 import org.junit.Before;
 import org.junit.Test;
-import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -61,14 +48,12 @@
 public class WifiBlocklistMonitorTest {
     private static final int TEST_NUM_MAX_FIRMWARE_SUPPORT_BSSIDS = 3;
     private static final int TEST_NUM_MAX_FIRMWARE_SUPPORT_SSIDS = 3;
-    private static final String TEST_SSID_1 = "\"TestSSID1\"";
-    private static final String TEST_SSID_2 = "\"TestSSID2\"";
-    private static final String TEST_SSID_3 = "\"TestSSID3\"";
+    private static final String TEST_SSID_1 = "TestSSID1";
+    private static final String TEST_SSID_2 = "TestSSID2";
+    private static final String TEST_SSID_3 = "TestSSID3";
     private static final String TEST_BSSID_1 = "0a:08:5c:67:89:00";
     private static final String TEST_BSSID_2 = "0a:08:5c:67:89:01";
     private static final String TEST_BSSID_3 = "0a:08:5c:67:89:02";
-    private static final int TEST_DEVICE_OWNER_UID = 123123;
-    private static final String TEST_DEVICE_OWNER_PACKAGE_NAME = "DEVICE_OWNER";
     private static final long TEST_ELAPSED_UPDATE_NETWORK_SELECTION_TIME_MILLIS = 29457631;
     private static final int TEST_GOOD_RSSI = -50;
     private static final int TEST_SUFFICIENT_RSSI = -67;
@@ -97,8 +82,7 @@
                     Map.entry(WifiBlocklistMonitor.REASON_FRAMEWORK_DISCONNECT_MBO_OCE, 1),
                     Map.entry(WifiBlocklistMonitor.REASON_FRAMEWORK_DISCONNECT_FAST_RECONNECT, 1),
                     Map.entry(WifiBlocklistMonitor.REASON_FRAMEWORK_DISCONNECT_CONNECTED_SCORE, 1),
-                    Map.entry(WifiBlocklistMonitor.REASON_NONLOCAL_DISCONNECT_CONNECTING, 2),
-                    Map.entry(WifiBlocklistMonitor.REASON_FAILURE_NO_RESPONSE, 1)
+                    Map.entry(WifiBlocklistMonitor.REASON_NONLOCAL_DISCONNECT_CONNECTING, 2)
             );
     private static final int NUM_FAILURES_TO_BLOCKLIST =
             BLOCK_REASON_TO_DISABLE_THRESHOLD_MAP.get(TEST_L2_FAILURE);
@@ -111,7 +95,6 @@
     @Mock private WifiScoreCard mWifiScoreCard;
     @Mock private ScoringParams mScoringParams;
     @Mock private WifiMetrics mWifiMetrics;
-    @Mock private WifiPermissionsUtil mWifiPermissionsUtil;
     @Mock private WifiScoreCard.PerNetwork mPerNetwork;
     @Mock private WifiScoreCard.NetworkConnectionStats mRecentStats;
 
@@ -128,7 +111,6 @@
         when(mWifiConnectivityHelper.getMaxNumAllowlistSsid())
                 .thenReturn(TEST_NUM_MAX_FIRMWARE_SUPPORT_SSIDS);
         when(mScoringParams.getSufficientRssi(anyInt())).thenReturn(TEST_SUFFICIENT_RSSI);
-        when(mScoringParams.getGoodRssi(anyInt())).thenReturn(TEST_GOOD_RSSI);
         mResources = new MockResources();
         mResources.setInteger(R.integer.config_wifiBssidBlocklistMonitorBaseBlockDurationMs,
                 (int) BASE_BLOCKLIST_DURATION);
@@ -177,11 +159,6 @@
                 BLOCK_REASON_TO_DISABLE_THRESHOLD_MAP.get(
                         WifiBlocklistMonitor.REASON_NONLOCAL_DISCONNECT_CONNECTING));
         mResources.setInteger(
-                R.integer.config_wifiBssidBlocklistMonitorNoResponseThreshold,
-                BLOCK_REASON_TO_DISABLE_THRESHOLD_MAP.get(
-                        WifiBlocklistMonitor.REASON_FAILURE_NO_RESPONSE));
-
-        mResources.setInteger(
                 R.integer.config_wifiDisableReasonAssociationRejectionThreshold,
                 NetworkSelectionStatus.DISABLE_REASON_INFOS
                         .get(NetworkSelectionStatus.DISABLED_ASSOCIATION_REJECTION)
@@ -202,18 +179,14 @@
         when(mContext.getResources()).thenReturn(mResources);
         when(mPerNetwork.getRecentStats()).thenReturn(mRecentStats);
         when(mWifiScoreCard.lookupNetwork(anyString())).thenReturn(mPerNetwork);
-        when(mWifiPermissionsUtil.isAdmin(TEST_DEVICE_OWNER_UID,
-                TEST_DEVICE_OWNER_PACKAGE_NAME)).thenReturn(true);
-
         mWifiBlocklistMonitor = new WifiBlocklistMonitor(mContext, mWifiConnectivityHelper,
                 mWifiLastResortWatchdog, mClock, mLocalLog, mWifiScoreCard, mScoringParams,
-                mWifiMetrics, mWifiPermissionsUtil);
+                mWifiMetrics);
     }
 
     private void verifyAddTestBssidToBlocklist() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
         mWifiBlocklistMonitor.handleBssidConnectionFailure(
-                TEST_BSSID_1, config,
+                TEST_BSSID_1, TEST_SSID_1,
                 WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA, TEST_GOOD_RSSI);
         assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
     }
@@ -221,17 +194,15 @@
     // Verify adding 2 BSSID for SSID_1 and 1 BSSID for SSID_2 to the blocklist.
     private void verifyAddMultipleBssidsToBlocklist() {
         when(mClock.getWallClockMillis()).thenReturn(0L);
-        WifiConfiguration config1 = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
-        WifiConfiguration config2 = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_2);
         mWifiBlocklistMonitor.handleBssidConnectionFailure(TEST_BSSID_1,
-                config1, WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA,
+                TEST_SSID_1, WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA,
                 TEST_GOOD_RSSI);
         when(mClock.getWallClockMillis()).thenReturn(1L);
         mWifiBlocklistMonitor.handleBssidConnectionFailure(TEST_BSSID_2,
-                config1, WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA,
+                TEST_SSID_1, WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA,
                 TEST_GOOD_RSSI);
         mWifiBlocklistMonitor.handleBssidConnectionFailure(TEST_BSSID_3,
-                config2, WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA,
+                TEST_SSID_2, WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA,
                 TEST_GOOD_RSSI);
 
         // Verify that we have 3 BSSIDs in the blocklist.
@@ -248,9 +219,8 @@
 
     private void handleBssidConnectionFailureMultipleTimes(String bssid, String ssid, int reason,
             int times) {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(ssid);
         for (int i = 0; i < times; i++) {
-            mWifiBlocklistMonitor.handleBssidConnectionFailure(bssid, config, reason,
+            mWifiBlocklistMonitor.handleBssidConnectionFailure(bssid, ssid, reason,
                     TEST_GOOD_RSSI);
         }
     }
@@ -445,82 +415,12 @@
         assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
     }
 
-    @Test
-    public void testSsidsDoNotBlocklist_NotAddedToBssidBlocklist() {
-        // config1 is normal network
-        WifiConfiguration config1 = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
-
-        // config 2 is a enterprise owned network
-        WifiConfiguration config2 = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_2);
-        config2.creatorUid = TEST_DEVICE_OWNER_UID;
-        config2.creatorName = TEST_DEVICE_OWNER_PACKAGE_NAME;
-
-        // add both networks to "do not blocklist"
-        List<WifiSsid> expectedSsids = new ArrayList<>();
-        expectedSsids.add(WifiSsid.fromString(config1.SSID));
-        expectedSsids.add(WifiSsid.fromString(config2.SSID));
-        mWifiBlocklistMonitor.setSsidsAllowlist(expectedSsids);
-        assertEquals(expectedSsids,
-                mWifiBlocklistMonitor.getSsidsAllowlist());
-
-        // verify that BSSID for config1 still gets block because it's not enterprise owned
-        mWifiBlocklistMonitor.handleBssidConnectionFailure(TEST_BSSID_1, config1,
-                WifiBlocklistMonitor.REASON_WRONG_PASSWORD,
-                TEST_GOOD_RSSI);
-        assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
-
-        // verify that BSSID for config2 do not get blocked when failing.
-        mWifiBlocklistMonitor.handleBssidConnectionFailure(TEST_BSSID_2, config2,
-                WifiBlocklistMonitor.REASON_WRONG_PASSWORD,
-                TEST_GOOD_RSSI);
-        assertFalse(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_2));
-
-        // Verify that setting the "do not blocklist" to empty list will make the BSSID
-        // blockable again.
-        mWifiBlocklistMonitor.setSsidsAllowlist(Collections.EMPTY_LIST);
-        assertEquals(Collections.EMPTY_LIST,
-                mWifiBlocklistMonitor.getSsidsAllowlist());
-        mWifiBlocklistMonitor.handleBssidConnectionFailure(TEST_BSSID_2, config2,
-                WifiBlocklistMonitor.REASON_WRONG_PASSWORD,
-                TEST_GOOD_RSSI);
-        assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_2));
-    }
-
-    @Test
-    public void testSsidsDoNotBlocklist_ConfigNotDisabled() {
-        // Create 2 test networks
-        WifiConfiguration openNetwork1 = WifiConfigurationTestUtil.createOpenNetwork();
-        WifiConfiguration openNetwork2 = WifiConfigurationTestUtil.createOpenNetwork();
-        openNetwork2.creatorUid = TEST_DEVICE_OWNER_UID;
-        openNetwork2.creatorName = TEST_DEVICE_OWNER_PACKAGE_NAME;
-
-        // Add SSID of openNetwork2 to the "do not blocklist"
-        List<WifiSsid> expectedSsids = new ArrayList<>();
-        expectedSsids.add(WifiSsid.fromString(openNetwork2.SSID));
-        mWifiBlocklistMonitor.setSsidsAllowlist(expectedSsids);
-        assertEquals(expectedSsids, mWifiBlocklistMonitor.getSsidsAllowlist());
-
-        // verify that openNetwork1 gets disabled due to wrong password
-        assertTrue(mWifiBlocklistMonitor.updateNetworkSelectionStatus(openNetwork1,
-                NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD));
-
-        // verify that openNetwork2 will not get disabled due to wrong password
-        assertFalse(mWifiBlocklistMonitor.updateNetworkSelectionStatus(openNetwork2,
-                NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD));
-
-        // Except if the reason is DISABLED_BY_WIFI_MANAGER, then openNetwork2 should still get
-        // disabled
-        assertTrue(mWifiBlocklistMonitor.updateNetworkSelectionStatus(openNetwork2,
-                NetworkSelectionStatus.DISABLED_BY_WIFI_MANAGER));
-    }
-
     /**
      * Verify that only abnormal disconnects that happened in a window of time right after
      * connection gets counted in the WifiBlocklistMonitor.
      */
     @Test
     public void testAbnormalDisconnectRecencyCheck() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
         // does some setup so that 1 failure is enough to add the BSSID to blocklist.
         when(mWifiScoreCard.getBssidBlocklistStreak(TEST_SSID_1, TEST_BSSID_1,
                 WifiBlocklistMonitor.REASON_ABNORMAL_DISCONNECT)).thenReturn(1);
@@ -529,7 +429,7 @@
         when(mWifiScoreCard.getBssidConnectionTimestampMs(TEST_SSID_1, TEST_BSSID_1))
                 .thenReturn(0L);
         when(mClock.getWallClockMillis()).thenReturn(ABNORMAL_DISCONNECT_TIME_WINDOW_MS + 1);
-        assertFalse(mWifiBlocklistMonitor.handleBssidConnectionFailure(TEST_BSSID_1, config,
+        assertFalse(mWifiBlocklistMonitor.handleBssidConnectionFailure(TEST_BSSID_1, TEST_SSID_1,
                 WifiBlocklistMonitor.REASON_ABNORMAL_DISCONNECT, TEST_GOOD_RSSI));
         verify(mWifiScoreCard, never()).incrementBssidBlocklistStreak(TEST_SSID_1, TEST_BSSID_1,
                 WifiBlocklistMonitor.REASON_ABNORMAL_DISCONNECT);
@@ -537,7 +437,7 @@
         // simulate another abnormal disconnect within the time window and verify the BSSID is
         // added to blocklist.
         when(mClock.getWallClockMillis()).thenReturn(ABNORMAL_DISCONNECT_TIME_WINDOW_MS);
-        assertTrue(mWifiBlocklistMonitor.handleBssidConnectionFailure(TEST_BSSID_1, config,
+        assertTrue(mWifiBlocklistMonitor.handleBssidConnectionFailure(TEST_BSSID_1, TEST_SSID_1,
                 WifiBlocklistMonitor.REASON_ABNORMAL_DISCONNECT, TEST_GOOD_RSSI));
         verify(mWifiScoreCard).incrementBssidBlocklistStreak(TEST_SSID_1, TEST_BSSID_1,
                 WifiBlocklistMonitor.REASON_ABNORMAL_DISCONNECT);
@@ -549,11 +449,10 @@
      */
     @Test
     public void testBlocklistStreakExpeditesAddingToBlocklist() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
         when(mWifiScoreCard.getBssidBlocklistStreak(anyString(), anyString(), anyInt()))
                 .thenReturn(1);
         assertTrue(mWifiBlocklistMonitor.handleBssidConnectionFailure(
-                TEST_BSSID_1, config, TEST_L2_FAILURE, TEST_GOOD_RSSI));
+                TEST_BSSID_1, TEST_SSID_1, TEST_L2_FAILURE, TEST_GOOD_RSSI));
         assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
     }
 
@@ -819,12 +718,11 @@
     @Test
     public void testMostRecentBlocklistEntriesAreSentToFirmware() {
         // Add BSSIDs to blocklist
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
         String bssid = "0a:08:5c:67:89:0";
         for (int i = 0; i < 10; i++) {
             when(mClock.getWallClockMillis()).thenReturn((long) i);
             mWifiBlocklistMonitor.handleBssidConnectionFailure(bssid + i,
-                    config, WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA,
+                    TEST_SSID_1, WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA,
                     TEST_GOOD_RSSI);
 
             // This will build a List of BSSIDs starting from the latest added ones that is at
@@ -926,10 +824,9 @@
      */
     @Test
     public void testBlockBssidForDurationMs() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
         when(mClock.getWallClockMillis()).thenReturn(0L);
         long testDuration = 5500L;
-        mWifiBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_1, config, testDuration,
+        mWifiBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_1, TEST_SSID_1, testDuration,
                 TEST_FRAMEWORK_BLOCK_REASON, TEST_GOOD_RSSI);
         assertEquals(1, mWifiBlocklistMonitor.updateAndGetBssidBlocklist().size());
 
@@ -938,7 +835,7 @@
         assertEquals(0, mWifiBlocklistMonitor.updateAndGetBssidBlocklist().size());
 
         // Add the BSSID to blocklist again.
-        mWifiBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_1, config, testDuration,
+        mWifiBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_1, TEST_SSID_1, testDuration,
                 TEST_FRAMEWORK_BLOCK_REASON, TEST_GOOD_RSSI);
         assertEquals(1, mWifiBlocklistMonitor.updateAndGetBssidBlocklist().size());
 
@@ -952,11 +849,10 @@
      */
     @Test
     public void testBlockBssidForDurationMsInvalidInputs() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
         // test invalid BSSID
         when(mClock.getWallClockMillis()).thenReturn(0L);
         long testDuration = 5500L;
-        mWifiBlocklistMonitor.blockBssidForDurationMs(null, config, testDuration,
+        mWifiBlocklistMonitor.blockBssidForDurationMs(null, TEST_SSID_1, testDuration,
                 TEST_FRAMEWORK_BLOCK_REASON, TEST_GOOD_RSSI);
         assertEquals(0, mWifiBlocklistMonitor.updateAndGetBssidBlocklist().size());
 
@@ -966,12 +862,12 @@
         assertEquals(0, mWifiBlocklistMonitor.updateAndGetBssidBlocklist().size());
 
         // test invalid duration
-        mWifiBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_1, config, -1,
+        mWifiBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_1, TEST_SSID_1, -1,
                 TEST_FRAMEWORK_BLOCK_REASON, TEST_GOOD_RSSI);
         assertEquals(0, mWifiBlocklistMonitor.updateAndGetBssidBlocklist().size());
     }
 
-    private List<ScanDetail> simulateRssiUpdate(String bssid, int rssi) {
+    private void simulateRssiUpdate(String bssid, int rssi) {
         ScanDetail scanDetail = mock(ScanDetail.class);
         ScanResult scanResult = mock(ScanResult.class);
         scanResult.BSSID = bssid;
@@ -979,72 +875,46 @@
         when(scanDetail.getScanResult()).thenReturn(scanResult);
         List<ScanDetail> scanDetails = new ArrayList<>();
         scanDetails.add(scanDetail);
-        return mWifiBlocklistMonitor.tryEnablingBlockedBssids(scanDetails);
+        mWifiBlocklistMonitor.tryEnablingBlockedBssids(scanDetails);
     }
 
     /**
-     * Verify that if the RSSI is low when the BSSID is blocked, a RSSI improvement to suffient
-     * RSSI will remove the BSSID from blocklist.
+     * Verify that if the RSSI is low when the BSSID is blocked, a RSSI improvement will remove
+     * the BSSID from blocklist.
      */
     @Test
-    public void testUnblockBssidAfterRssiBreachSufficient() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
+    public void testUnblockBssidAfterRssiImproves() {
         when(mClock.getWallClockMillis()).thenReturn(0L);
         // verify TEST_BSSID_1 is blocked
         mWifiBlocklistMonitor.handleBssidConnectionFailure(
-                TEST_BSSID_1, config, WifiBlocklistMonitor.REASON_EAP_FAILURE,
+                TEST_BSSID_1, TEST_SSID_1, WifiBlocklistMonitor.REASON_EAP_FAILURE,
                 TEST_SUFFICIENT_RSSI - MIN_RSSI_DIFF_TO_UNBLOCK_BSSID);
         assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
 
         // verify the blocklist is not cleared when the rssi improvement is not large enough.
-        List<ScanDetail> enabledDetails =
-                simulateRssiUpdate(TEST_BSSID_1, TEST_SUFFICIENT_RSSI - 1);
-        assertTrue(enabledDetails.isEmpty());
+        simulateRssiUpdate(TEST_BSSID_1, TEST_SUFFICIENT_RSSI - 1);
         assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
 
         // verify TEST_BSSID_1 is removed from the blocklist after RSSI improves
-        enabledDetails = simulateRssiUpdate(TEST_BSSID_1, TEST_SUFFICIENT_RSSI);
-        assertEquals(1, enabledDetails.size());
+        simulateRssiUpdate(TEST_BSSID_1, TEST_SUFFICIENT_RSSI);
         assertEquals(0, mWifiBlocklistMonitor.updateAndGetBssidBlocklist().size());
     }
 
     /**
-     * Verify that if the RSSI is sufficient when the BSSID is blocked, a RSSI improvement to good
-     * RSSI will remove the BSSID from blocklist.
+     * Verify that if the RSSI is already good when the BSSID is blocked, a RSSI improvement will
+     * not remove the BSSID from blocklist.
      */
     @Test
-    public void testUnblockBssidAfterRssiBreachGood() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
+    public void testBssidNotUnblockedIfRssiAlreadyGood() {
         when(mClock.getWallClockMillis()).thenReturn(0L);
         // verify TEST_BSSID_1 is blocked
         mWifiBlocklistMonitor.handleBssidConnectionFailure(
-                TEST_BSSID_1, config, WifiBlocklistMonitor.REASON_EAP_FAILURE,
+                TEST_BSSID_1, TEST_SSID_1, WifiBlocklistMonitor.REASON_EAP_FAILURE,
                 TEST_SUFFICIENT_RSSI);
         assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
 
         // verify TEST_BSSID_1 is not removed from blocklist
-        List<ScanDetail> enabledDetails = simulateRssiUpdate(TEST_BSSID_1, TEST_GOOD_RSSI);
-        assertEquals(1, enabledDetails.size());
-        assertEquals(0, mWifiBlocklistMonitor.updateAndGetBssidBlocklist().size());
-    }
-
-    /**
-     * Verify that if the RSSI is already sufficient when the BSSID is blocked, a RSSI improvement
-     * will not remove the BSSID from blocklist.
-     */
-    @Test
-    public void testBssidNotUnblockedIfRssiAlreadySufficient() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
-        when(mClock.getWallClockMillis()).thenReturn(0L);
-        // verify TEST_BSSID_1 is blocked
-        mWifiBlocklistMonitor.handleBssidConnectionFailure(
-                TEST_BSSID_1, config, WifiBlocklistMonitor.REASON_EAP_FAILURE,
-                TEST_SUFFICIENT_RSSI);
-        assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
-
-        // verify TEST_BSSID_1 is not removed from blocklist
-        List<ScanDetail> enabledDetails = simulateRssiUpdate(TEST_BSSID_1, TEST_GOOD_RSSI - 1);
-        assertTrue(enabledDetails.isEmpty());
+        simulateRssiUpdate(TEST_BSSID_1, TEST_GOOD_RSSI);
         assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
     }
 
@@ -1054,15 +924,13 @@
      */
     @Test
     public void testRssiImprovementNotUnblockBssidForSomeFailureReasons() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
         when(mClock.getWallClockMillis()).thenReturn(0L);
         mWifiBlocklistMonitor.handleBssidConnectionFailure(
-                TEST_BSSID_1, config, WifiBlocklistMonitor.REASON_WRONG_PASSWORD,
+                TEST_BSSID_1, TEST_SSID_1, WifiBlocklistMonitor.REASON_WRONG_PASSWORD,
                 TEST_SUFFICIENT_RSSI - MIN_RSSI_DIFF_TO_UNBLOCK_BSSID);
         assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
 
-        List<ScanDetail> enabledDetails = simulateRssiUpdate(TEST_BSSID_1, TEST_SUFFICIENT_RSSI);
-        assertTrue(enabledDetails.isEmpty());
+        simulateRssiUpdate(TEST_BSSID_1, TEST_SUFFICIENT_RSSI);
         assertTrue(mWifiBlocklistMonitor.updateAndGetBssidBlocklist().contains(TEST_BSSID_1));
     }
 
@@ -1071,13 +939,12 @@
      */
     @Test
     public void testGetFailureReasonsForSsid() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(TEST_SSID_1);
         // Null input should not crash
         mWifiBlocklistMonitor.getFailureReasonsForSsid(null).size();
         assertEquals(0, mWifiBlocklistMonitor.getFailureReasonsForSsid(TEST_SSID_1).size());
-        mWifiBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_1, config, 1000,
+        mWifiBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_1, TEST_SSID_1, 1000,
                 WifiBlocklistMonitor.REASON_AP_UNABLE_TO_HANDLE_NEW_STA, TEST_GOOD_RSSI);
-        mWifiBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_2, config, 1000,
+        mWifiBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_2, TEST_SSID_1, 1000,
                 WifiBlocklistMonitor.REASON_ABNORMAL_DISCONNECT, TEST_GOOD_RSSI);
 
         assertEquals(2, mWifiBlocklistMonitor.getFailureReasonsForSsid(TEST_SSID_1).size());
@@ -1392,7 +1259,7 @@
                 R.integer.config_wifiDisableReasonDhcpFailureThreshold, newThreshold);
         mWifiBlocklistMonitor = new WifiBlocklistMonitor(mContext, mWifiConnectivityHelper,
                 mWifiLastResortWatchdog, mClock, mLocalLog, mWifiScoreCard, mScoringParams,
-                mWifiMetrics, mWifiPermissionsUtil);
+                mWifiMetrics);
 
         // Verify that the threshold is updated in the copied version
         assertEquals(newThreshold, mWifiBlocklistMonitor.getNetworkSelectionDisableThreshold(
@@ -1413,24 +1280,4 @@
                     mWifiBlocklistMonitor.getNetworkSelectionDisableThreshold(i));
         }
     }
-
-    /**
-     * Verifies that an oversize allowlist is trimmed to the max allowlist size when updating
-     * the firmware roaming configuration.
-     */
-    @Test
-    public void testUpdateFirmwareRoamingConfigurationTrimsOversizeAllowlist() {
-        int maxAllowlistSize = 4;
-        when(mWifiConnectivityHelper.getMaxNumAllowlistSsid()).thenReturn(maxAllowlistSize);
-        when(mWifiConnectivityHelper.isFirmwareRoamingSupported()).thenReturn(true);
-        Set<String> allowList = Set.of("ssid1", "ssid2", "ssid3", "ssid4", "ssid5");
-        mWifiBlocklistMonitor.setAllowlistSsids("ssid0", new ArrayList<>(allowList));
-        mWifiBlocklistMonitor.updateFirmwareRoamingConfiguration(Set.of("ssid0"));
-
-        ArgumentCaptor<ArrayList> ssidAllowlistCaptor = ArgumentCaptor.forClass(ArrayList.class);
-        verify(mWifiConnectivityHelper).setFirmwareRoamingConfiguration(
-                any(), ssidAllowlistCaptor.capture());
-
-        assertEquals(maxAllowlistSize, ssidAllowlistCaptor.getValue().size());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiCandidatesTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiCandidatesTest.java
index fb0a7e0..c602b6a 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiCandidatesTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiCandidatesTest.java
@@ -19,26 +19,15 @@
 import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
 import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SAE;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.validateMockitoUsage;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.withSettings;
+import static com.android.server.wifi.util.NativeUtil.removeEnclosingQuotes;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import android.content.Context;
 import android.net.MacAddress;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiSsid;
 
 import androidx.test.filters.SmallTest;
 
@@ -102,13 +91,13 @@
         mConfig1 = WifiConfigurationTestUtil.createOpenNetwork();
 
         mScanResult1 = new ScanResult();
-        mScanResult1.setWifiSsid(WifiSsid.fromString(mConfig1.SSID));
+        mScanResult1.SSID = removeEnclosingQuotes(mConfig1.SSID);
         mScanResult1.capabilities = "[ESS]";
         mScanResult1.BSSID = "00:00:00:00:00:01";
 
         mConfig2 = WifiConfigurationTestUtil.createEphemeralNetwork();
         mScanResult2 = new ScanResult();
-        mScanResult2.setWifiSsid(WifiSsid.fromString(mConfig2.SSID));
+        mScanResult2.SSID = removeEnclosingQuotes(mConfig2.SSID);
         mScanResult2.capabilities = "[ESS]";
 
         doReturn(mScanResult1).when(mScanDetail1).getScanResult();
@@ -175,7 +164,6 @@
     public void testQuotingBotch() throws Exception {
         // Unfortunately ScanResult.SSID is not quoted; make sure we catch that
         mScanResult1.SSID = mConfig1.SSID;
-        mScanResult1.setWifiSsid(WifiSsid.fromUtf8Text(mConfig1.SSID));
         mWifiCandidates.add(mScanDetail1, mConfig1, 2, 0.0, true, 100);
 
         // Should not have added this one
@@ -264,9 +252,7 @@
         // method chaining may be used).
         assertTrue(mWifiCandidates == mWifiCandidates.setPicky(true));
         try {
-            // As in testQuotingBotch()
-            mScanResult1.SSID = mConfig1.SSID;
-            mScanResult1.setWifiSsid(WifiSsid.fromUtf8Text(mConfig1.SSID));
+            mScanResult1.SSID = mConfig1.SSID; // As in testQuotingBotch()
             mWifiCandidates.add(mScanDetail1, mConfig1, 2, 0.0, false, 100);
             fail("Exception not raised in picky mode");
         } catch (IllegalArgumentException e) {
@@ -338,7 +324,6 @@
         mConfig2 = new WifiConfiguration(mConfig1);
         // Make a second scan result, same network, different BSSID.
         mScanResult2.SSID = mScanResult1.SSID;
-        mScanResult2.setWifiSsid(mScanResult1.getWifiSsid());
         mScanResult2.BSSID = mScanResult1.BSSID.replace('1', '2');
         // Add both
         mWifiCandidates.add(mScanDetail1, mConfig1, 2, 0.0, false, 100);
@@ -372,7 +357,6 @@
         mConfig2 = new WifiConfiguration(mConfig1);
         // And the scan result
         mScanResult2.SSID = mScanResult1.SSID;
-        mScanResult2.setWifiSsid(mScanResult1.getWifiSsid());
         mScanResult2.BSSID = mScanResult1.BSSID;
         // Try adding them both, in a known order
         assertTrue(mWifiCandidates.add(mScanDetail2, mConfig2, 2, 0.0, false, 100));
@@ -394,7 +378,6 @@
     public void testMultiplePasspointCandidatesWithSameFQDN() {
         // Create a Passpoint WifiConfig
         mScanResult2.SSID = mScanResult1.SSID;
-        mScanResult2.setWifiSsid(mScanResult1.getWifiSsid());
         mScanResult2.BSSID = mScanResult1.BSSID.replace('1', '2');
         // Add candidates with different scanDetail for same passpoint WifiConfig.
         assertTrue(mWifiCandidates.add(mScanDetail1, mConfig1, 2, 0.0, false, 100));
@@ -413,31 +396,14 @@
                 .keyFromScanDetailAndConfig(mScanDetail1, mConfig1);
         WifiCandidates.Candidate candidate;
         // Make sure the CarrierOrPrivileged false is remembered
-        assertTrue(mWifiCandidates.add(key, mConfig1, 0, -50, 2412,
-                ScanResult.CHANNEL_WIDTH_20MHZ, 0.0, false, false, 100));
+        assertTrue(mWifiCandidates.add(key, mConfig1, 0, -50, 2412, 0.0, false, false, 100));
         candidate = mWifiCandidates.getCandidates().get(0);
         assertFalse(candidate.isCarrierOrPrivileged());
         mWifiCandidates.remove(candidate);
         // Make sure the CarrierOrPrivileged true is remembered
-        assertTrue(mWifiCandidates.add(key, mConfig1, 0, -50, 2412,
-                ScanResult.CHANNEL_WIDTH_20MHZ, 0.0, false, true, 100));
+        assertTrue(mWifiCandidates.add(key, mConfig1, 0, -50, 2412, 0.0, false, true, 100));
         candidate = mWifiCandidates.getCandidates().get(0);
         assertTrue(candidate.isCarrierOrPrivileged());
         mWifiCandidates.remove(candidate);
     }
-
-    @Test
-    public void testAddCandidateFrequencyAndChannelWidth() {
-        int testFrequency = 5975;
-        int testChannelWidth = ScanResult.CHANNEL_WIDTH_80MHZ;
-        WifiCandidates.Key key = mWifiCandidates
-                .keyFromScanDetailAndConfig(mScanDetail1, mConfig1);
-        WifiCandidates.Candidate candidate;
-
-        assertTrue(mWifiCandidates.add(key, mConfig1, 0, -50, testFrequency,
-                testChannelWidth, 0.0, false, false, 100));
-        candidate = mWifiCandidates.getCandidates().get(0);
-        assertEquals(testFrequency, candidate.getFrequency());
-        assertEquals(testChannelWidth, candidate.getChannelWidth());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiCarrierInfoManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiCarrierInfoManagerTest.java
index 9624ead..e0aec3b 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiCarrierInfoManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiCarrierInfoManagerTest.java
@@ -28,32 +28,15 @@
 import static com.android.server.wifi.WifiCarrierInfoManager.NOTIFICATION_USER_DISALLOWED_CARRIER_INTENT_ACTION;
 import static com.android.server.wifi.WifiCarrierInfoManager.NOTIFICATION_USER_DISMISSED_INTENT_ACTION;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 import static org.junit.Assume.assumeTrue;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyBoolean;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyLong;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.lenient;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
+import static org.mockito.Mockito.*;
 
+import android.app.AlertDialog;
 import android.app.Notification;
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.pm.PackageInfo;
@@ -62,14 +45,12 @@
 import android.database.ContentObserver;
 import android.net.Uri;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.hotspot2.PasspointConfiguration;
 import android.net.wifi.hotspot2.pps.Credential;
 import android.os.Handler;
-import android.os.ParcelUuid;
 import android.os.PersistableBundle;
 import android.os.UserHandle;
 import android.os.test.TestLooper;
@@ -80,6 +61,7 @@
 import android.telephony.TelephonyManager;
 import android.util.Base64;
 import android.util.Pair;
+import android.view.Window;
 
 import androidx.test.filters.SmallTest;
 
@@ -136,8 +118,6 @@
     private static final String TEST_PACKAGE = "com.test12345";
     private static final String ANONYMOUS_IDENTITY = "anonymous@wlan.mnc456.mcc123.3gppnetwork.org";
     private static final String CARRIER_NAME = "Google";
-    private static final ParcelUuid GROUP_UUID = ParcelUuid
-            .fromString("0000110B-0000-1000-8000-00805F9B34FB");
 
     @Mock CarrierConfigManager mCarrierConfigManager;
     @Mock WifiContext mContext;
@@ -157,13 +137,12 @@
     @Mock WifiNotificationManager mWifiNotificationManager;
     @Mock Notification.Builder mNotificationBuilder;
     @Mock Notification mNotification;
-    @Mock WifiDialogManager mWifiDialogManager;
-    @Mock WifiDialogManager.DialogHandle mDialogHandle;
+    @Mock AlertDialog.Builder mAlertDialogBuilder;
+    @Mock AlertDialog mAlertDialog;
     @Mock WifiCarrierInfoManager.OnUserApproveCarrierListener mListener;
     @Mock WifiMetrics mWifiMetrics;
     @Mock WifiCarrierInfoManager.OnCarrierOffloadDisabledListener mOnCarrierOffloadDisabledListener;
     @Mock Clock mClock;
-    @Mock WifiNetworkSuggestionsManager mWifiNetworkSuggestionsManager;
 
     private List<SubscriptionInfo> mSubInfoList;
 
@@ -185,10 +164,20 @@
                 .thenReturn(mCarrierConfigManager);
         when(mContext.getResources()).thenReturn(mResources);
         when(mContext.getWifiOverlayApkPkgName()).thenReturn("test.com.android.wifi.resources");
+        when(mFrameworkFacade.makeAlertDialogBuilder(any()))
+                .thenReturn(mAlertDialogBuilder);
         when(mFrameworkFacade.makeNotificationBuilder(any(), anyString()))
                 .thenReturn(mNotificationBuilder);
         when(mFrameworkFacade.getBroadcast(any(), anyInt(), any(), anyInt()))
                 .thenReturn(mock(PendingIntent.class));
+        when(mAlertDialogBuilder.setTitle(any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.setMessage(any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.setPositiveButton(any(), any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.setNegativeButton(any(), any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.setOnDismissListener(any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.setOnCancelListener(any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.create()).thenReturn(mAlertDialog);
+        when(mAlertDialog.getWindow()).thenReturn(mock(Window.class));
         when(mNotificationBuilder.setSmallIcon(any())).thenReturn(mNotificationBuilder);
         when(mNotificationBuilder.setTicker(any())).thenReturn(mNotificationBuilder);
         when(mNotificationBuilder.setContentTitle(any())).thenReturn(mNotificationBuilder);
@@ -201,15 +190,10 @@
         when(mNotificationBuilder.addAction(any())).thenReturn(mNotificationBuilder);
         when(mNotificationBuilder.setTimeoutAfter(anyLong())).thenReturn(mNotificationBuilder);
         when(mNotificationBuilder.build()).thenReturn(mNotification);
-        when(mWifiDialogManager.createSimpleDialog(any(), any(), any(), any(), any(), any(), any()))
-                .thenReturn(mDialogHandle);
         when(mWifiInjector.makeWifiCarrierInfoStoreManagerData(any()))
                 .thenReturn(mWifiCarrierInfoStoreManagerData);
         when(mWifiInjector.getWifiConfigManager()).thenReturn(mWifiConfigManager);
         when(mWifiInjector.getWifiNotificationManager()).thenReturn(mWifiNotificationManager);
-        when(mWifiInjector.getWifiDialogManager()).thenReturn(mWifiDialogManager);
-        when(mWifiInjector.getWifiNetworkSuggestionsManager())
-                .thenReturn(mWifiNetworkSuggestionsManager);
         mWifiCarrierInfoManager = new WifiCarrierInfoManager(mTelephonyManager,
                 mSubscriptionManager, mWifiInjector, mFrameworkFacade, mContext, mWifiConfigStore,
                 new Handler(mLooper.getLooper()), mWifiMetrics, mClock);
@@ -237,7 +221,6 @@
                 .thenReturn(mNonDataTelephonyManager);
         when(mTelephonyManager.getSimApplicationState(anyInt()))
                 .thenReturn(TelephonyManager.SIM_STATE_LOADED);
-        when(mTelephonyManager.getActiveModemCount()).thenReturn(2);
         when(mCarrierConfigManager.getConfigForSubId(anyInt()))
                 .thenReturn(generateTestCarrierConfig(false));
         when(mSubscriptionManager.getActiveSubscriptionInfoList()).thenReturn(mSubInfoList);
@@ -268,7 +251,6 @@
                 .thenReturn(TelephonyManager.SIM_STATE_LOADED);
         when(mSubscriptionManager.getActiveSubscriptionIdList())
                 .thenReturn(new int[]{DATA_SUBID, NON_DATA_SUBID});
-        when(mSubscriptionManager.getSubscriptionsInGroup(GROUP_UUID)).thenReturn(mSubInfoList);
 
         // setup resource strings for IMSI protection notification.
         when(mResources.getString(eq(R.string.wifi_suggestion_imsi_privacy_title), anyString()))
@@ -603,13 +585,12 @@
         MockitoSession session = ExtendedMockito.mockitoSession().mockStatic(
                 Cipher.class).startMocking();
         try {
-            lenient().when(Cipher.getInstance(anyString())).thenReturn(cipher);
+            when(Cipher.getInstance(anyString())).thenReturn(cipher);
             when(cipher.doFinal(any(byte[].class))).thenReturn(permanentIdentity.getBytes());
             when(mDataTelephonyManager.getSubscriberId()).thenReturn(imsi);
             when(mDataTelephonyManager.getSimOperator()).thenReturn("321456");
-            ImsiEncryptionInfo info = mock(ImsiEncryptionInfo.class);
-            when(info.getPublicKey()).thenReturn(key);
-            when(info.getKeyIdentifier()).thenReturn(null);
+            ImsiEncryptionInfo info = new ImsiEncryptionInfo("321", "456",
+                    TelephonyManager.KEY_TYPE_WLAN, null, key, null);
             when(mDataTelephonyManager.getCarrierInfoForImsiEncryption(
                     eq(TelephonyManager.KEY_TYPE_WLAN)))
                     .thenReturn(info);
@@ -638,12 +619,12 @@
         MockitoSession session = ExtendedMockito.mockitoSession().mockStatic(
                 Cipher.class).startMocking();
         try {
-            lenient().when(Cipher.getInstance(anyString())).thenReturn(cipher);
+            when(Cipher.getInstance(anyString())).thenReturn(cipher);
             when(cipher.doFinal(any(byte[].class))).thenThrow(BadPaddingException.class);
             when(mDataTelephonyManager.getSubscriberId()).thenReturn(imsi);
             when(mDataTelephonyManager.getSimOperator()).thenReturn("321456");
-            ImsiEncryptionInfo info = mock(ImsiEncryptionInfo.class);
-            when(info.getPublicKey()).thenReturn(null);
+            ImsiEncryptionInfo info = new ImsiEncryptionInfo("321", "456",
+                    TelephonyManager.KEY_TYPE_WLAN, keyIdentifier, (PublicKey) null, null);
             when(mDataTelephonyManager.getCarrierInfoForImsiEncryption(
                     eq(TelephonyManager.KEY_TYPE_WLAN)))
                     .thenReturn(info);
@@ -1704,7 +1685,7 @@
         sendBroadcastForUserActionOnImsi(NOTIFICATION_USER_DISALLOWED_CARRIER_INTENT_ACTION,
                 CARRIER_NAME, DATA_CARRIER_ID);
         verify(mWifiNotificationManager).cancel(SystemMessage.NOTE_CARRIER_SUGGESTION_AVAILABLE);
-        verify(mDialogHandle, never()).launchDialog();
+        verify(mAlertDialog, never()).show();
 
         verify(mWifiConfigManager).saveToStore(true);
         assertTrue(mCarrierInfoDataSource.hasNewDataToSerialize());
@@ -1774,11 +1755,13 @@
         validateUserApprovalDialog(CARRIER_NAME);
 
         // Simulate user clicking on disallow in the dialog.
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> dialogCallbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        verify(mWifiDialogManager).createSimpleDialog(
-                any(), any(), any(), any(), any(), dialogCallbackCaptor.capture(), any());
-        dialogCallbackCaptor.getValue().onNegativeButtonClicked();
+        ArgumentCaptor<DialogInterface.OnClickListener> clickListenerCaptor =
+                ArgumentCaptor.forClass(DialogInterface.OnClickListener.class);
+        verify(mAlertDialogBuilder, atLeastOnce()).setNegativeButton(
+                any(), clickListenerCaptor.capture());
+        assertNotNull(clickListenerCaptor.getValue());
+        clickListenerCaptor.getValue().onClick(mAlertDialog, 0);
+        mLooper.dispatchAll();
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
         verify(mContext).sendBroadcast(intentCaptor.capture());
         assertEquals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, intentCaptor.getValue().getAction());
@@ -1812,12 +1795,14 @@
         verify(mWifiNotificationManager).cancel(SystemMessage.NOTE_CARRIER_SUGGESTION_AVAILABLE);
         validateUserApprovalDialog(CARRIER_NAME);
 
-        // Simulate user dismissing the dialog via home/back button.
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> dialogCallbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        verify(mWifiDialogManager).createSimpleDialog(
-                any(), any(), any(), any(), any(), dialogCallbackCaptor.capture(), any());
-        dialogCallbackCaptor.getValue().onCancelled();
+        // Simulate user clicking on dismissal in the dialog.
+        ArgumentCaptor<DialogInterface.OnDismissListener> dismissListenerCaptor =
+                ArgumentCaptor.forClass(DialogInterface.OnDismissListener.class);
+        verify(mAlertDialogBuilder, atLeastOnce()).setOnDismissListener(
+                dismissListenerCaptor.capture());
+        assertNotNull(dismissListenerCaptor.getValue());
+        dismissListenerCaptor.getValue().onDismiss(mAlertDialog);
+        mLooper.dispatchAll();
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
         verify(mContext).sendBroadcast(intentCaptor.capture());
         assertEquals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, intentCaptor.getValue().getAction());
@@ -1857,11 +1842,13 @@
         validateUserApprovalDialog(CARRIER_NAME);
 
         // Simulate user clicking on allow in the dialog.
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> dialogCallbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        verify(mWifiDialogManager).createSimpleDialog(
-                any(), any(), any(), any(), any(), dialogCallbackCaptor.capture(), any());
-        dialogCallbackCaptor.getValue().onPositiveButtonClicked();
+        ArgumentCaptor<DialogInterface.OnClickListener> clickListenerCaptor =
+                ArgumentCaptor.forClass(DialogInterface.OnClickListener.class);
+        verify(mAlertDialogBuilder, atLeastOnce()).setPositiveButton(
+                any(), clickListenerCaptor.capture());
+        assertNotNull(clickListenerCaptor.getValue());
+        clickListenerCaptor.getValue().onClick(mAlertDialog, 0);
+        mLooper.dispatchAll();
         ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
         verify(mContext).sendBroadcast(intentCaptor.capture());
         assertEquals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, intentCaptor.getValue().getAction());
@@ -1992,16 +1979,16 @@
     }
 
     private void validateUserApprovalDialog(String... anyOfExpectedAppNames) {
-        verify(mDialogHandle, atLeastOnce()).launchDialog();
-        ArgumentCaptor<String> messageCaptor = ArgumentCaptor.forClass(String.class);
-        verify(mWifiDialogManager, atLeastOnce()).createSimpleDialog(
-                any(), messageCaptor.capture(), any(), any(), any(), any(), any());
-        String message = messageCaptor.getValue();
-        assertNotNull(message);
+        verify(mAlertDialog, atLeastOnce()).show();
+        ArgumentCaptor<CharSequence> contentCaptor =
+                ArgumentCaptor.forClass(CharSequence.class);
+        verify(mAlertDialogBuilder, atLeastOnce()).setMessage(contentCaptor.capture());
+        CharSequence content = contentCaptor.getValue();
+        assertNotNull(content);
 
         boolean foundMatch = false;
         for (int i = 0; i < anyOfExpectedAppNames.length; i++) {
-            foundMatch = message.contains(anyOfExpectedAppNames[i]);
+            foundMatch = content.toString().contains(anyOfExpectedAppNames[i]);
             if (foundMatch) break;
         }
         assertTrue(foundMatch);
@@ -2207,25 +2194,4 @@
         verify(mOnCarrierOffloadDisabledListener, times(2))
                 .onCarrierOffloadDisabled(DATA_SUBID, true);
     }
-
-    @Test
-    public void testGetActiveSubsctionIdInGroup() {
-        assertEquals(DATA_SUBID, mWifiCarrierInfoManager
-                .getActiveSubscriptionIdInGroup(GROUP_UUID));
-    }
-
-    @Test
-    public void testCarrierPrivilegedListenerChange() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        TelephonyManager.CarrierPrivilegesCallback carrierPrivilegesCallback;
-        ArgumentCaptor<TelephonyManager.CarrierPrivilegesCallback> callbackArgumentCaptor =
-                ArgumentCaptor.forClass(TelephonyManager.CarrierPrivilegesCallback.class);
-        verify(mTelephonyManager, times(2))
-                .registerCarrierPrivilegesCallback(anyInt(), any(),
-                        callbackArgumentCaptor.capture());
-        carrierPrivilegesCallback = callbackArgumentCaptor.getValue();
-        carrierPrivilegesCallback.onCarrierPrivilegesChanged(Collections.emptySet(),
-                Collections.emptySet());
-        verify(mWifiNetworkSuggestionsManager).updateCarrierPrivilegedApps(any());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
index 190e432..29c6d2b 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java
@@ -23,8 +23,6 @@
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-import static org.mockito.ArgumentMatchers.anyObject;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.anyBoolean;
 import static org.mockito.Mockito.anyInt;
@@ -52,19 +50,16 @@
 import android.content.Intent;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
-import android.net.DhcpOption;
 import android.net.IpConfiguration;
 import android.net.MacAddress;
 import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiScanner;
-import android.net.wifi.WifiSsid;
 import android.os.Handler;
 import android.os.Process;
 import android.os.UserHandle;
@@ -80,7 +75,6 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.dx.mockito.inline.extended.ExtendedMockito;
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.WifiScoreCard.PerNetwork;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.UserActionEvent;
 import com.android.server.wifi.util.LruConnectionTracker;
@@ -101,8 +95,6 @@
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.security.Principal;
-import java.security.cert.X509Certificate;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
@@ -162,7 +154,6 @@
             NetworkSelectionStatus.DISABLED_NO_INTERNET_TEMPORARY;
     private static final int TEST_NETWORK_SELECTION_PERM_DISABLE_REASON =
             NetworkSelectionStatus.DISABLED_BY_WIFI_MANAGER;
-    private static final String TEST_PACKAGE_NAME = "com.test.xxxx";
 
     @Mock private Context mContext;
     @Mock private Clock mClock;
@@ -295,7 +286,6 @@
         when(mWifiPermissionsUtil.isProfileOwner(anyInt(), any())).thenReturn(false);
         when(mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(anyInt()))
                 .thenReturn(true);
-        when(mWifiPermissionsUtil.isDeviceInDemoMode(any())).thenReturn(false);
         when(mWifiLastResortWatchdog.shouldIgnoreSsidUpdate()).thenReturn(false);
         when(mMacAddressUtil.calculatePersistentMac(any(), any())).thenReturn(TEST_RANDOMIZED_MAC);
         when(mWifiScoreCard.lookupNetwork(any())).thenReturn(mPerNetwork);
@@ -309,20 +299,6 @@
                 wifiContext, mock(WifiConfigStore.class), mock(Handler.class),
                 mWifiMetrics, mClock));
         mLruConnectionTracker = new LruConnectionTracker(100, mContext);
-
-        when(mWifiInjector.getClock()).thenReturn(mClock);
-        when(mWifiInjector.getUserManager()).thenReturn(mUserManager);
-        when(mWifiInjector.getWifiCarrierInfoManager()).thenReturn(mWifiCarrierInfoManager);
-        when(mWifiInjector.getWifiMetrics()).thenReturn(mWifiMetrics);
-        when(mWifiInjector.getWifiBlocklistMonitor()).thenReturn(mWifiBlocklistMonitor);
-        when(mWifiInjector.getWifiLastResortWatchdog()).thenReturn(mWifiLastResortWatchdog);
-        when(mWifiInjector.getWifiScoreCard()).thenReturn(mWifiScoreCard);
-        when(mWifiInjector.getWifiPermissionsUtil()).thenReturn(mWifiPermissionsUtil);
-        when(mWifiInjector.getFrameworkFacade()).thenReturn(mFrameworkFacade);
-        when(mWifiInjector.getDeviceConfigFacade()).thenReturn(mDeviceConfigFacade);
-        when(mWifiInjector.getMacAddressUtil()).thenReturn(mMacAddressUtil);
-        when(mWifiInjector.getBuildProperties()).thenReturn(mBuildProperties);
-
         createWifiConfigManager();
         mWifiConfigManager.addOnNetworkUpdateListener(mWcmListener);
         // static mocking
@@ -349,15 +325,6 @@
         when(mWifiPermissionsUtil.isDeviceOwner(anyInt())).thenReturn(result);
     }
 
-    private void mockIsAdmin(boolean result) {
-        when(mWifiPermissionsUtil.isAdmin(anyInt(), any())).thenReturn(result);
-    }
-
-    private void mockIsOrganizationOwnedDeviceAdmin(boolean result) {
-        when(mWifiPermissionsUtil.isOrganizationOwnedDeviceAdmin(anyInt(), any()))
-                .thenReturn(result);
-    }
-
     /**
      * Called after each test
      */
@@ -669,28 +636,6 @@
     }
 
     /**
-     * Verify that add or update networks when WifiConfiguration has RepeaterEnabled set,
-     * requires Network Settings Permission.
-     */
-    @Test
-    public void testAddOrUpdateNetworkRepeaterEnabled() throws Exception {
-        // Create an open network
-        WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork();
-        openNetwork.setRepeaterEnabled(true);
-
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
-
-        NetworkUpdateResult result = addNetworkToWifiConfigManager(openNetwork);
-        assertEquals(WifiConfiguration.INVALID_NETWORK_ID, result.getNetworkId());
-
-        // Now try with the permission is granted
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
-
-        result = addNetworkToWifiConfigManager(openNetwork);
-        assertNotEquals(WifiConfiguration.INVALID_NETWORK_ID, result.getNetworkId());
-    }
-
-    /**
      * Verifies the modification of a single network using
      * {@link WifiConfigManager#addOrUpdateNetwork(WifiConfiguration, int)}
      */
@@ -807,16 +752,16 @@
     }
 
     /**
-     * Verifies that the organization owned device admin could modify other other fields in the
-     * Wificonfiguration but not the macRandomizationSetting field for networks they do not own.
+     * Verifies that the device owner could modify other other fields in the Wificonfiguration
+     * but not the macRandomizationSetting field.
      */
     @Test
-    public void testCannotUpdateMacRandomizationSettingWithoutPermissionDO() {
+    public void testCannotUpdateMacRandomizationSettingWithoutPermission() {
         ArgumentCaptor<WifiConfiguration> wifiConfigCaptor =
                 ArgumentCaptor.forClass(WifiConfiguration.class);
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
         when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(false);
-        mockIsOrganizationOwnedDeviceAdmin(true);
+        mockIsDeviceOwner(true);
         WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork();
         openNetwork.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_AUTO;
 
@@ -837,42 +782,6 @@
     }
 
     /**
-     * Verifies that the admin could set and modify the macRandomizationSetting field
-     * for networks they own.
-     */
-    @Test
-    public void testCanUpdateMacRandomizationSettingForAdminNetwork() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        ArgumentCaptor<WifiConfiguration> wifiConfigCaptor =
-                ArgumentCaptor.forClass(WifiConfiguration.class);
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(false);
-        mockIsOrganizationOwnedDeviceAdmin(true);
-        mockIsAdmin(true);
-        WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork();
-        openNetwork.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_NONE;
-
-        verifyAddNetworkToWifiConfigManager(openNetwork);
-        verify(mWcmListener).onNetworkAdded(wifiConfigCaptor.capture());
-        assertEquals(openNetwork.networkId, wifiConfigCaptor.getValue().networkId);
-        assertEquals(wifiConfigCaptor.getValue().macRandomizationSetting,
-                WifiConfiguration.RANDOMIZATION_NONE);
-        reset(mWcmListener);
-
-        // Change macRandomizationSetting for the network and verify success
-        openNetwork.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_AUTO;
-        NetworkUpdateResult networkUpdateResult =
-                mWifiConfigManager.addOrUpdateNetwork(openNetwork, TEST_CREATOR_UID);
-        assertNotEquals(WifiConfiguration.INVALID_NETWORK_ID, networkUpdateResult.getNetworkId());
-        verify(mWcmListener).onNetworkUpdated(
-                wifiConfigCaptor.capture(), wifiConfigCaptor.capture());
-        WifiConfiguration newConfig = wifiConfigCaptor.getAllValues().get(1);
-        assertEquals(WifiConfiguration.RANDOMIZATION_AUTO, newConfig.macRandomizationSetting);
-        assertEquals(openNetwork.networkId, newConfig.networkId);
-        reset(mWcmListener);
-    }
-
-    /**
      * Verifies that mac randomization settings could be modified by a caller with NETWORK_SETTINGS
      * permission.
      */
@@ -916,6 +825,7 @@
                 ArgumentCaptor.forClass(WifiConfiguration.class);
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
         when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(true);
+        mockIsDeviceOwner(true);
         WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork();
         openNetwork.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_AUTO;
         List<WifiConfiguration> networks = new ArrayList<>();
@@ -938,25 +848,6 @@
     }
 
     /**
-     * Verifies that mac randomization settings could be disabled by a caller when
-     * demo mode is enabled.
-     */
-    @Test
-    public void testCanAddConfigWithDisabledMacRandomizationWhenInDemoMode() {
-        ArgumentCaptor<WifiConfiguration> wifiConfigCaptor =
-                ArgumentCaptor.forClass(WifiConfiguration.class);
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.isDeviceInDemoMode(any())).thenReturn(true);
-        WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork();
-        openNetwork.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_NONE;
-
-        verifyAddNetworkToWifiConfigManager(openNetwork);
-        verify(mWcmListener).onNetworkAdded(wifiConfigCaptor.capture());
-        assertEquals(openNetwork.networkId, wifiConfigCaptor.getValue().networkId);
-    }
-
-    /**
      * Verify that the mac randomization setting could be modified by the creator of a passpoint
      * network.
      */
@@ -966,6 +857,7 @@
                 ArgumentCaptor.forClass(WifiConfiguration.class);
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
         when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(false);
+        mockIsDeviceOwner(false);
         WifiConfiguration passpointNetwork = WifiConfigurationTestUtil.createPasspointNetwork();
         // Disable MAC randomization and verify this is added in successfully.
         passpointNetwork.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_NONE;
@@ -1111,7 +1003,7 @@
 
     /**
      * Verifies the addition of a single suggestion network using
-     * {@link WifiConfigManager#addOrUpdateNetwork(WifiConfiguration, int, String, boolean)} and verifies
+     * {@link WifiConfigManager#addOrUpdateNetwork(WifiConfiguration, int, String)} and verifies
      * that the {@link WifiConfigManager#getSavedNetworks()} does not return this network.
      */
     @Test
@@ -1143,7 +1035,7 @@
 
     /**
      * Verifies the addition of a single specifier network using
-     * {@link WifiConfigManager#addOrUpdateNetwork(WifiConfiguration, int, String, boolean)} and verifies
+     * {@link WifiConfigManager#addOrUpdateNetwork(WifiConfiguration, int, String)} and verifies
      * that the {@link WifiConfigManager#getSavedNetworks()} does not return this network.
      */
     @Test
@@ -1703,7 +1595,7 @@
         NetworkUpdateResult result = verifyAddNetworkToWifiConfigManager(openNetwork);
 
         mWifiConfigManager
-                .updateBeforeConnect(result.getNetworkId(), TEST_CREATOR_UID, TEST_PACKAGE_NAME);
+                .updateBeforeConnect(result.getNetworkId(), TEST_CREATOR_UID);
 
         WifiConfiguration retrievedNetwork =
                 mWifiConfigManager.getConfiguredNetwork(result.getNetworkId());
@@ -2005,8 +1897,8 @@
         ScanDetail eapSuiteBNetworkScanDetail = createScanDetailForNetwork(eapSuiteBNetwork);
 
         // Now mix and match parameters from different scan details.
-        openNetworkScanDetail.getScanResult().setWifiSsid(
-                wepNetworkScanDetail.getScanResult().getWifiSsid());
+        openNetworkScanDetail.getScanResult().SSID =
+                wepNetworkScanDetail.getScanResult().SSID;
         wepNetworkScanDetail.getScanResult().capabilities =
                 pskNetworkScanDetail.getScanResult().capabilities;
         pskNetworkScanDetail.getScanResult().capabilities =
@@ -2354,114 +2246,111 @@
     }
 
     /**
-     * Verify that the non-persistent randomization allowlist works for Passpoint (by checking FQDN)
+     * Verify that the aggressive randomization allowlist works for passpoints. (by checking FQDN)
      */
     @Test
-    public void testShouldUseNonPersistentRandomizationPasspoint() {
+    public void testshouldUseEnhancedRandomizationPasspoint() {
         WifiConfiguration c = WifiConfigurationTestUtil.createPasspointNetwork();
         // Adds SSID to the allowlist.
         Set<String> ssidList = new HashSet<>();
         ssidList.add(c.SSID);
-        when(mDeviceConfigFacade.getNonPersistentMacRandomizationSsidAllowlist())
+        when(mDeviceConfigFacade.getAggressiveMacRandomizationSsidAllowlist())
                 .thenReturn(ssidList);
 
         // Verify that if for passpoint networks we don't check for the SSID to be in the allowlist
-        assertFalse(mWifiConfigManager.shouldUseNonPersistentRandomization(c));
+        assertFalse(mWifiConfigManager.shouldUseEnhancedRandomization(c));
 
         // instead we check for the FQDN
         ssidList.clear();
         ssidList.add(c.FQDN);
-        assertTrue(mWifiConfigManager.shouldUseNonPersistentRandomization(c));
+        assertTrue(mWifiConfigManager.shouldUseEnhancedRandomization(c));
     }
 
     /**
      * Verify that macRandomizationSetting == RANDOMIZATION_NON_PERSISTENT enables
-     * non-persistent MAC randomization.
+     * enhanced MAC randomization.
      */
     @Test
-    public void testShouldUseNonPersistentRandomization_randomizationNonPersistent() {
+    public void testShouldUseEnhancedRandomization_randomizationEnhanced() {
         WifiConfiguration c = WifiConfigurationTestUtil.createPasspointNetwork();
         c.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_NON_PERSISTENT;
-        assertTrue(mWifiConfigManager.shouldUseNonPersistentRandomization(c));
+        assertTrue(mWifiConfigManager.shouldUseEnhancedRandomization(c));
     }
 
     /**
-     * Verify that macRandomizationSetting = RANDOMIZATION_PERSISTENT disables non-persistent
+     * Verify that macRandomizationSetting = RANDOMIZATION_PERSISTENT disables enhanced
      * randomization.
      */
     @Test
-    public void testShouldUseNonPersistentRandomization_randomizationPersistent() {
+    public void testShouldUseEnhancedRandomization_randomizationPersistent() {
         WifiConfiguration c = WifiConfigurationTestUtil.createPasspointNetwork();
         c.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_PERSISTENT;
-        assertFalse(mWifiConfigManager.shouldUseNonPersistentRandomization(c));
+        assertFalse(mWifiConfigManager.shouldUseEnhancedRandomization(c));
     }
 
     /**
-     * Verify that shouldUseNonPersistentRandomization returns true for an open network that has
-     * been connected before and never had captive portal detected.
+     * Verify that shouldUseEnhancedRandomization returns true for an open network that has been
+     * connected before and never had captive portal detected.
      */
     @Test
-    public void testShouldUseNonPersistentRandomization_openNetworkNoCaptivePortal() {
-        when(mDeviceConfigFacade.allowNonPersistentMacRandomizationOnOpenSsids()).thenReturn(true);
+    public void testShouldUseEnhancedRandomization_openNetworkNoCaptivePortal() {
+        when(mDeviceConfigFacade.allowEnhancedMacRandomizationOnOpenSsids()).thenReturn(true);
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
 
-        // verify non-persistent randomization is not enabled because the config has never been
-        // connected.
+        // verify enhanced randomization is not enabled because the config has never been connected.
         assertTrue(config.getNetworkSelectionStatus().hasNeverDetectedCaptivePortal());
-        assertFalse(mWifiConfigManager.shouldUseNonPersistentRandomization(config));
+        assertFalse(mWifiConfigManager.shouldUseEnhancedRandomization(config));
 
         config.getNetworkSelectionStatus().setHasEverConnected(true);
-        assertTrue(mWifiConfigManager.shouldUseNonPersistentRandomization(config));
+        assertTrue(mWifiConfigManager.shouldUseEnhancedRandomization(config));
     }
 
     /**
-     * Verify that non-persistent randomization on open networks could be turned on/off by 2 feature
+     * Verify that enhanced randomization on open networks could be turned on/off by 2 feature
      * flags.
      */
     @Test
-    public void testShouldUseNonPersistentRandomization_openNetworkFeatureFlag() {
+    public void testShouldUseEnhancedRandomization_openNetworkFeatureFlag() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         config.getNetworkSelectionStatus().setHasEverConnected(true);
 
-        // Test with both feature flags off, and expected no non-persistent randomization.
-        when(mDeviceConfigFacade.allowNonPersistentMacRandomizationOnOpenSsids()).thenReturn(false);
-        mResources.setBoolean(R.bool.config_wifiAllowNonPersistentMacRandomizationOnOpenSsids,
-                false);
-        assertFalse(mWifiConfigManager.shouldUseNonPersistentRandomization(config));
+        // Test with both feature flags off, and expected no enhanced randomization.
+        when(mDeviceConfigFacade.allowEnhancedMacRandomizationOnOpenSsids()).thenReturn(false);
+        mResources.setBoolean(R.bool.config_wifiAllowEnhancedMacRandomizationOnOpenSsids, false);
+        assertFalse(mWifiConfigManager.shouldUseEnhancedRandomization(config));
 
-        // Verify either feature flag turned on will enable non-persistent randomization.
-        when(mDeviceConfigFacade.allowNonPersistentMacRandomizationOnOpenSsids()).thenReturn(true);
-        assertTrue(mWifiConfigManager.shouldUseNonPersistentRandomization(config));
+        // Verify either feature flag turned on will enable enhanced randomization.
+        when(mDeviceConfigFacade.allowEnhancedMacRandomizationOnOpenSsids()).thenReturn(true);
+        assertTrue(mWifiConfigManager.shouldUseEnhancedRandomization(config));
 
-        when(mDeviceConfigFacade.allowNonPersistentMacRandomizationOnOpenSsids()).thenReturn(false);
-        mResources.setBoolean(R.bool.config_wifiAllowNonPersistentMacRandomizationOnOpenSsids,
-                true);
-        assertTrue(mWifiConfigManager.shouldUseNonPersistentRandomization(config));
+        when(mDeviceConfigFacade.allowEnhancedMacRandomizationOnOpenSsids()).thenReturn(false);
+        mResources.setBoolean(R.bool.config_wifiAllowEnhancedMacRandomizationOnOpenSsids, true);
+        assertTrue(mWifiConfigManager.shouldUseEnhancedRandomization(config));
     }
 
     /**
-     * Verify that when DeviceConfigFacade#isNonPersistentMacRandomizationEnabled returns true, any
-     * networks that already use randomized MAC use non-persistent MAC randomization instead.
+     * Verify that when DeviceConfigFacade#isEnhancedMacRandomizationEnabled returns true, any
+     * networks that already use randomized MAC use enhanced MAC randomization instead.
      */
     @Test
-    public void testNonPersistentMacRandomizationIsEnabledGlobally() {
+    public void testEnhanecedMacRandomizationIsEnabledGlobally() {
         when(mFrameworkFacade.getIntegerSetting(eq(mContext),
-                eq(WifiConfigManager.NON_PERSISTENT_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG),
+                eq(WifiConfigManager.ENHANCED_MAC_RANDOMIZATION_FEATURE_FORCE_ENABLE_FLAG),
                 anyInt())).thenReturn(1);
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(mWifiConfigManager.shouldUseNonPersistentRandomization(config));
+        assertTrue(mWifiConfigManager.shouldUseEnhancedRandomization(config));
 
         config.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_NONE;
-        assertFalse(mWifiConfigManager.shouldUseNonPersistentRandomization(config));
+        assertFalse(mWifiConfigManager.shouldUseEnhancedRandomization(config));
     }
 
     /**
-     * Verify that when non-persistent MAC randomization is enabled the MAC address changes after 24
-     * hours of the first connection this MAC address is used.
+     * Verify that when enhanced MAC randomization is enabled the MAC address changes after 24 hours
+     * of the first connection this MAC address is used.
      */
     @Test
-    public void testNonPersistentMacRandomizationEvery24Hours() {
-        setUpWifiConfigurationForNonPersistentRandomization();
+    public void testEnhancedMacRandomizationEvery24Hours() {
+        setUpWifiConfigurationForEnhancedRandomization();
         WifiConfiguration config = getFirstInternalWifiConfiguration();
 
         assertEquals(TEST_WALLCLOCK_CREATION_TIME_MILLIS, config.randomizedMacLastModifiedTimeMs);
@@ -2492,18 +2381,18 @@
      */
     @Test
     public void testRandomizedMacUpdateAndRestore() {
-        setUpWifiConfigurationForNonPersistentRandomization();
-        // get the non-persistent randomized MAC address.
+        setUpWifiConfigurationForEnhancedRandomization();
+        // get the aggressive randomized MAC address.
         WifiConfiguration config = getFirstInternalWifiConfiguration();
         final MacAddress randMac = config.getRandomizedMacAddress();
         assertNotEquals(WifiInfo.DEFAULT_MAC_ADDRESS, randMac.toString());
         assertEquals(TEST_WALLCLOCK_CREATION_TIME_MILLIS
-                + WifiConfigManager.NON_PERSISTENT_MAC_WAIT_AFTER_DISCONNECT_MS,
+                + WifiConfigManager.ENHANCED_MAC_WAIT_AFTER_DISCONNECT_MS,
                 config.randomizedMacExpirationTimeMs);
 
         // verify the new randomized mac should be different from the original mac.
         when(mClock.getWallClockMillis()).thenReturn(TEST_WALLCLOCK_CREATION_TIME_MILLIS
-                + WifiConfigManager.NON_PERSISTENT_MAC_WAIT_AFTER_DISCONNECT_MS + 1);
+                + WifiConfigManager.ENHANCED_MAC_WAIT_AFTER_DISCONNECT_MS + 1);
         MacAddress randMac2 = mWifiConfigManager.getRandomizedMacAndUpdateIfNeeded(config);
 
         // verify internal WifiConfiguration has MacAddress updated correctly by comparing the
@@ -2512,11 +2401,11 @@
         assertEquals(randMac2, config.getRandomizedMacAddress());
         assertNotEquals(randMac, randMac2);
 
-        // Now disable non-persistent randomization and verify the randomized MAC is changed back to
+        // Now disable aggressive randomization and verify the randomized MAC is changed back to
         // the persistent MAC.
         Set<String> blocklist = new HashSet<>();
         blocklist.add(config.SSID);
-        when(mDeviceConfigFacade.getNonPersistentMacRandomizationSsidBlocklist())
+        when(mDeviceConfigFacade.getAggressiveMacRandomizationSsidBlocklist())
                 .thenReturn(blocklist);
         MacAddress persistentMac = mWifiConfigManager.getRandomizedMacAndUpdateIfNeeded(config);
 
@@ -2534,50 +2423,49 @@
      */
     @Test
     public void testUpdateRandomizedMacExpireTime() {
-        setUpWifiConfigurationForNonPersistentRandomization();
+        setUpWifiConfigurationForEnhancedRandomization();
         WifiConfiguration config = getFirstInternalWifiConfiguration();
         when(mClock.getWallClockMillis()).thenReturn(0L);
 
-        // verify that |NON_PERSISTENT_MAC_REFRESH_MS_MIN| is honored as the lower bound.
-        long dhcpLeaseTimeInSeconds =
-                (WifiConfigManager.NON_PERSISTENT_MAC_REFRESH_MS_MIN / 1000) - 1;
+        // verify that |ENHANCED_MAC_REFRESH_MS_MIN| is honored as the lower bound.
+        long dhcpLeaseTimeInSeconds = (WifiConfigManager.ENHANCED_MAC_REFRESH_MS_MIN / 1000) - 1;
         mWifiConfigManager.updateRandomizedMacExpireTime(config, dhcpLeaseTimeInSeconds);
         config = getFirstInternalWifiConfiguration();
-        assertEquals(WifiConfigManager.NON_PERSISTENT_MAC_REFRESH_MS_MIN,
+        assertEquals(WifiConfigManager.ENHANCED_MAC_REFRESH_MS_MIN,
                 config.randomizedMacExpirationTimeMs);
 
-        // verify that |NON_PERSISTENT_MAC_REFRESH_MS_MAX| is honored as the upper bound.
-        dhcpLeaseTimeInSeconds = (WifiConfigManager.NON_PERSISTENT_MAC_REFRESH_MS_MAX / 1000) + 1;
+        // verify that |ENHANCED_MAC_REFRESH_MS_MAX| is honored as the upper bound.
+        dhcpLeaseTimeInSeconds = (WifiConfigManager.ENHANCED_MAC_REFRESH_MS_MAX / 1000) + 1;
         mWifiConfigManager.updateRandomizedMacExpireTime(config, dhcpLeaseTimeInSeconds);
         config = getFirstInternalWifiConfiguration();
-        assertEquals(WifiConfigManager.NON_PERSISTENT_MAC_REFRESH_MS_MAX,
+        assertEquals(WifiConfigManager.ENHANCED_MAC_REFRESH_MS_MAX,
                 config.randomizedMacExpirationTimeMs);
 
         // finally verify setting a valid value between the upper and lower bounds.
-        dhcpLeaseTimeInSeconds = (WifiConfigManager.NON_PERSISTENT_MAC_REFRESH_MS_MIN / 1000) + 5;
+        dhcpLeaseTimeInSeconds = (WifiConfigManager.ENHANCED_MAC_REFRESH_MS_MIN / 1000) + 5;
         mWifiConfigManager.updateRandomizedMacExpireTime(config, dhcpLeaseTimeInSeconds);
         config = getFirstInternalWifiConfiguration();
-        assertEquals(WifiConfigManager.NON_PERSISTENT_MAC_REFRESH_MS_MIN + 5000,
+        assertEquals(WifiConfigManager.ENHANCED_MAC_REFRESH_MS_MIN + 5000,
                 config.randomizedMacExpirationTimeMs);
     }
 
     /**
-     * Verifies that the expiration time of the currently used non-persistent MAC is set to the
+     * Verifies that the expiration time of the currently used aggressive MAC is set to the
      * maximum of some predefined time and the remaining DHCP lease duration at disconnect.
      */
     @Test
     public void testRandomizedMacExpirationTimeUpdatedAtDisconnect() {
-        setUpWifiConfigurationForNonPersistentRandomization();
+        setUpWifiConfigurationForEnhancedRandomization();
         WifiConfiguration config = getFirstInternalWifiConfiguration();
         when(mClock.getWallClockMillis()).thenReturn(0L);
 
         // First set the DHCP expiration time to be longer than the predefined time.
-        long dhcpLeaseTimeInSeconds = (WifiConfigManager.NON_PERSISTENT_MAC_WAIT_AFTER_DISCONNECT_MS
+        long dhcpLeaseTimeInSeconds = (WifiConfigManager.ENHANCED_MAC_WAIT_AFTER_DISCONNECT_MS
                 / 1000) + 1;
         mWifiConfigManager.updateRandomizedMacExpireTime(config, dhcpLeaseTimeInSeconds);
         config = getFirstInternalWifiConfiguration();
         long expirationTime = config.randomizedMacExpirationTimeMs;
-        assertEquals(WifiConfigManager.NON_PERSISTENT_MAC_WAIT_AFTER_DISCONNECT_MS + 1000,
+        assertEquals(WifiConfigManager.ENHANCED_MAC_WAIT_AFTER_DISCONNECT_MS + 1000,
                 expirationTime);
 
         // Verify that network disconnect does not update the expiration time since the remaining
@@ -2591,7 +2479,7 @@
         when(mClock.getWallClockMillis()).thenReturn(5000L);
         mWifiConfigManager.updateNetworkAfterDisconnect(config.networkId);
         config = getFirstInternalWifiConfiguration();
-        assertEquals(WifiConfigManager.NON_PERSISTENT_MAC_WAIT_AFTER_DISCONNECT_MS + 5000,
+        assertEquals(WifiConfigManager.ENHANCED_MAC_WAIT_AFTER_DISCONNECT_MS + 5000,
                 config.randomizedMacExpirationTimeMs);
     }
 
@@ -2601,35 +2489,35 @@
      */
     @Test
     public void testRandomizedMacIsNotUpdatedDueToTimeConstraint() {
-        setUpWifiConfigurationForNonPersistentRandomization();
+        setUpWifiConfigurationForEnhancedRandomization();
         // get the persistent randomized MAC address.
         WifiConfiguration config = getFirstInternalWifiConfiguration();
         final MacAddress randMac = config.getRandomizedMacAddress();
         assertNotEquals(WifiInfo.DEFAULT_MAC_ADDRESS, randMac.toString());
         assertEquals(TEST_WALLCLOCK_CREATION_TIME_MILLIS
-                + WifiConfigManager.NON_PERSISTENT_MAC_WAIT_AFTER_DISCONNECT_MS,
+                + WifiConfigManager.ENHANCED_MAC_WAIT_AFTER_DISCONNECT_MS,
                 config.randomizedMacExpirationTimeMs);
 
         // verify that the randomized MAC is unchanged.
         when(mClock.getWallClockMillis()).thenReturn(TEST_WALLCLOCK_CREATION_TIME_MILLIS
-                + WifiConfigManager.NON_PERSISTENT_MAC_WAIT_AFTER_DISCONNECT_MS);
+                + WifiConfigManager.ENHANCED_MAC_WAIT_AFTER_DISCONNECT_MS);
         MacAddress newMac = mWifiConfigManager.getRandomizedMacAndUpdateIfNeeded(config);
         assertEquals(randMac, newMac);
     }
 
     /**
-     * Verifies that non-persistent randomization SSID lists from DeviceConfig and overlay are being
+     * Verifies that aggressive randomization SSID lists from DeviceConfig and overlay are being
      * combined together properly.
      */
     @Test
-    public void testPerDeviceNonPersistentRandomizationSsids() {
+    public void testPerDeviceAggressiveRandomizationSsids() {
         // This will add the SSID to allowlist using DeviceConfig.
-        setUpWifiConfigurationForNonPersistentRandomization();
+        setUpWifiConfigurationForEnhancedRandomization();
         WifiConfiguration config = getFirstInternalWifiConfiguration();
         MacAddress randMac = config.getRandomizedMacAddress();
 
-        // add to non-persistent randomization blocklist using overlay.
-        mResources.setStringArray(R.array.config_wifi_non_persistent_randomization_ssid_blocklist,
+        // add to aggressive randomization blocklist using overlay.
+        mResources.setStringArray(R.array.config_wifi_aggressive_randomization_ssid_blocklist,
                 new String[] {config.SSID});
         MacAddress persistentMac = mWifiConfigManager.getRandomizedMacAndUpdateIfNeeded(config);
         // verify that now the persistent randomized MAC is used.
@@ -2642,13 +2530,13 @@
         return configs.get(0);
     }
 
-    private void setUpWifiConfigurationForNonPersistentRandomization() {
-        // sets up a WifiConfiguration for non-persistent randomization.
+    private void setUpWifiConfigurationForEnhancedRandomization() {
+        // sets up a WifiConfiguration for aggressive randomization.
         WifiConfiguration c = WifiConfigurationTestUtil.createOpenNetwork();
-        // Adds the WifiConfiguration to non-persistent randomization allowlist.
+        // Adds the WifiConfiguration to aggressive randomization allowlist.
         Set<String> ssidList = new HashSet<>();
         ssidList.add(c.SSID);
-        when(mDeviceConfigFacade.getNonPersistentMacRandomizationSsidAllowlist())
+        when(mDeviceConfigFacade.getAggressiveMacRandomizationSsidAllowlist())
                 .thenReturn(ssidList);
         NetworkUpdateResult result = verifyAddNetworkToWifiConfigManager(c);
         mWifiConfigManager.updateNetworkAfterDisconnect(result.getNetworkId());
@@ -3010,14 +2898,6 @@
                         otherNetwork.getProfileKey()));
             }
         }
-
-        // Verify that testGetLinkedNetworksWithoutMasking returns configs with
-        // candidate security type PSK
-        for (WifiConfiguration network : mWifiConfigManager.getLinkedNetworksWithoutMasking(
-                network1.networkId).values()) {
-            assertTrue(network.getNetworkSelectionStatus().getCandidateSecurityParams()
-                    .isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK));
-        }
     }
 
     /**
@@ -4334,7 +4214,6 @@
         WifiConfiguration network1 = WifiConfigurationTestUtil.createWepHiddenNetwork();
         WifiConfiguration network2 = WifiConfigurationTestUtil.createPskHiddenNetwork();
         WifiConfiguration network3 = WifiConfigurationTestUtil.createOpenHiddenNetwork();
-        network3.allowAutojoin = false;
         verifyAddNetworkToWifiConfigManager(network1);
         verifyAddNetworkToWifiConfigManager(network2);
         verifyAddNetworkToWifiConfigManager(network3);
@@ -4349,16 +4228,11 @@
 
         // Retrieve the hidden network list & verify the order of the networks returned.
         List<WifiScanner.ScanSettings.HiddenNetwork> hiddenNetworks =
-                mWifiConfigManager.retrieveHiddenNetworkList(false);
+                mWifiConfigManager.retrieveHiddenNetworkList();
         assertEquals(3, hiddenNetworks.size());
         assertEquals(network3.SSID, hiddenNetworks.get(0).ssid);
         assertEquals(network2.SSID, hiddenNetworks.get(1).ssid);
         assertEquals(network1.SSID, hiddenNetworks.get(2).ssid);
-
-        hiddenNetworks = mWifiConfigManager.retrieveHiddenNetworkList(true);
-        assertEquals(2, hiddenNetworks.size());
-        assertEquals(network2.SSID, hiddenNetworks.get(0).ssid);
-        assertEquals(network1.SSID, hiddenNetworks.get(1).ssid);
     }
 
     /**
@@ -5426,7 +5300,7 @@
             network = mWifiConfigManager.getConfiguredNetwork(networkId);
         }
         network.setIpConfiguration(ipConfiguration);
-        mockIsAdmin(withDeviceOwnerPolicy || withProfileOwnerPolicy);
+        mockIsDeviceOwner(withDeviceOwnerPolicy);
         when(mWifiPermissionsUtil.isProfileOwner(anyInt(), any()))
                 .thenReturn(withProfileOwnerPolicy);
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt()))
@@ -5446,9 +5320,14 @@
     private void createWifiConfigManager() {
         mWifiConfigManager =
                 new WifiConfigManager(
-                        mContext, mWifiKeyStore, mWifiConfigStore,
+                        mContext, mClock, mUserManager, mWifiCarrierInfoManager,
+                        mWifiKeyStore, mWifiConfigStore,
+                        mWifiPermissionsUtil, mMacAddressUtil, mWifiMetrics, mWifiBlocklistMonitor,
+                        mWifiLastResortWatchdog,
                         mNetworkListSharedStoreData, mNetworkListUserStoreData,
-                        mRandomizedMacStoreData, mLruConnectionTracker, mWifiInjector);
+                        mRandomizedMacStoreData,
+                        mFrameworkFacade, mDeviceConfigFacade,
+                        mWifiScoreCard, mLruConnectionTracker, mBuildProperties);
         mWifiConfigManager.enableVerboseLogging(true);
     }
 
@@ -5748,7 +5627,7 @@
         triggerStoreReadIfNeeded();
         when(mClock.getWallClockMillis()).thenReturn(TEST_WALLCLOCK_CREATION_TIME_MILLIS);
         NetworkUpdateResult result =
-                mWifiConfigManager.addOrUpdateNetwork(configuration, uid, packageName, false);
+                mWifiConfigManager.addOrUpdateNetwork(configuration, uid, packageName);
         setDefaults(configuration);
         setCreationDebugParams(
                 configuration, uid, packageName != null ? packageName : TEST_CREATOR_NAME);
@@ -6300,8 +6179,7 @@
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(TEST_CREATOR_UID))
                 .thenReturn(true);
 
-        mWifiConfigManager.updateBeforeConnect(config.networkId, TEST_CREATOR_UID,
-                TEST_PACKAGE_NAME);
+        mWifiConfigManager.updateBeforeConnect(config.networkId, TEST_CREATOR_UID);
 
         config = mWifiConfigManager.getConfiguredNetwork(config.networkId);
         // network became enabled
@@ -6338,8 +6216,7 @@
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(TEST_CREATOR_UID))
                 .thenReturn(false);
 
-        mWifiConfigManager.updateBeforeConnect(config.networkId, TEST_CREATOR_UID,
-                TEST_PACKAGE_NAME);
+        mWifiConfigManager.updateBeforeConnect(config.networkId, TEST_CREATOR_UID);
 
         config = mWifiConfigManager.getConfiguredNetwork(config.networkId);
         // network became enabled
@@ -6373,8 +6250,7 @@
                 .thenReturn(false);
         when(mUserManager.isSameProfileGroup(any(), any())).thenReturn(false);
 
-        mWifiConfigManager.updateBeforeConnect(config.networkId, TEST_OTHER_USER_UID,
-                TEST_PACKAGE_NAME);
+        mWifiConfigManager.updateBeforeConnect(config.networkId, TEST_OTHER_USER_UID);
 
         // network still disabled
         assertFalse(config.getNetworkSelectionStatus().isNetworkEnabled());
@@ -6392,8 +6268,7 @@
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
 
         NetworkUpdateResult result =
-                mWifiConfigManager.updateBeforeSaveNetwork(config, TEST_CREATOR_UID,
-                TEST_PACKAGE_NAME);
+                mWifiConfigManager.updateBeforeSaveNetwork(config, TEST_CREATOR_UID);
 
         assertTrue(result.isSuccess());
 
@@ -6417,8 +6292,7 @@
                 .thenReturn(false);
 
         NetworkUpdateResult result =
-                mWifiConfigManager.updateBeforeSaveNetwork(config, TEST_OTHER_USER_UID,
-                TEST_PACKAGE_NAME);
+                mWifiConfigManager.updateBeforeSaveNetwork(config, TEST_OTHER_USER_UID);
 
         assertFalse(result.isSuccess());
         assertNull(mWifiConfigManager.getConfiguredNetwork(config.networkId));
@@ -6431,8 +6305,7 @@
         verifyAddNetworkToWifiConfigManager(WifiConfigurationTestUtil.createOpenNetwork());
 
         NetworkUpdateResult result =
-                mWifiConfigManager.updateBeforeSaveNetwork(null, TEST_OTHER_USER_UID,
-                TEST_PACKAGE_NAME);
+                mWifiConfigManager.updateBeforeSaveNetwork(null, TEST_OTHER_USER_UID);
 
         assertFalse(result.isSuccess());
     }
@@ -6446,7 +6319,6 @@
         WifiConfiguration ephemeralCarrierNetwork = WifiConfigurationTestUtil.createPskNetwork();
         ephemeralCarrierNetwork.ephemeral = true;
         ephemeralCarrierNetwork.subscriptionId = DATA_SUBID;
-        ephemeralCarrierNetwork.creatorName = TEST_CREATOR_NAME;
         WifiConfiguration ephemeralNonCarrierNetwork = WifiConfigurationTestUtil.createPskNetwork();
         ephemeralNonCarrierNetwork.ephemeral = true;
         verifyAddNetworkToWifiConfigManager(savedPskNetwork);
@@ -6454,17 +6326,9 @@
         verifyAddEphemeralNetworkToWifiConfigManager(ephemeralNonCarrierNetwork);
 
         List<WifiConfiguration> networks = Arrays.asList(savedPskNetwork,
-                ephemeralNonCarrierNetwork, ephemeralCarrierNetwork);
-        mWifiConfigManager.removeEphemeralCarrierNetworks(Set.of(TEST_CREATOR_NAME));
-        List<WifiConfiguration> retrievedNetworks =
-                mWifiConfigManager.getConfiguredNetworksWithPasswords();
-        WifiConfigurationTestUtil.assertConfigurationsEqualForConfigManagerAddOrUpdate(
-                networks, retrievedNetworks);
-
-        networks = Arrays.asList(savedPskNetwork,
                 ephemeralNonCarrierNetwork);
-        mWifiConfigManager.removeEphemeralCarrierNetworks(Collections.emptySet());
-        retrievedNetworks =
+        mWifiConfigManager.removeEphemeralCarrierNetworks();
+        List<WifiConfiguration> retrievedNetworks =
                 mWifiConfigManager.getConfiguredNetworksWithPasswords();
         WifiConfigurationTestUtil.assertConfigurationsEqualForConfigManagerAddOrUpdate(
                 networks, retrievedNetworks);
@@ -6663,9 +6527,6 @@
         int baseSecurityType = baseConfig.getDefaultSecurityParams().getSecurityType();
         int upgradableSecurityType = upgradableConfig.getDefaultSecurityParams().getSecurityType();
 
-        // The source guarantees that base configuration has necessary auto-upgrade type.
-        WifiConfigurationUtil.addUpgradableSecurityTypeIfNecessary(baseConfig);
-
         // Set up the store data.
         List<WifiConfiguration> sharedNetworks = new ArrayList<WifiConfiguration>() {
             {
@@ -6766,7 +6627,6 @@
         int disabledType = testNetwork.getDefaultSecurityParams().getSecurityType();
         NetworkUpdateResult result = verifyAddNetworkToWifiConfigManager(testNetwork);
         int networkId = result.getNetworkId();
-        mWifiConfigManager.addOnNetworkUpdateListener(mListener);
 
         WifiConfiguration configBefore = mWifiConfigManager.getConfiguredNetwork(networkId);
         assertTrue(configBefore.getSecurityParams(disabledType).isEnabled());
@@ -6775,7 +6635,6 @@
 
         WifiConfiguration configAfter = mWifiConfigManager.getConfiguredNetwork(networkId);
         assertFalse(configAfter.getSecurityParams(disabledType).isEnabled());
-        verify(mListener).onSecurityParamsUpdate(any(), eq(configAfter.getSecurityParamsList()));
     }
 
     /**
@@ -7128,12 +6987,10 @@
      */
     @Test
     public void testRemoveExcessNetworksOnAdd() {
-        final int maxNumWifiConfigs = 8;
-        mResources.setInteger(R.integer.config_wifiMaxNumWifiConfigurations, maxNumWifiConfigs);
+        mResources.setInteger(R.integer.config_wifiMaxNumWifiConfigurations, 9);
         List<WifiConfiguration> configsInDeletionOrder = new ArrayList<>();
         WifiConfiguration currentConfig = WifiConfigurationTestUtil.createPskNetwork();
         currentConfig.status = WifiConfiguration.Status.CURRENT;
-        currentConfig.isCurrentlyConnected = true;
         WifiConfiguration lessDeletionPriorityConfig = WifiConfigurationTestUtil.createPskNetwork();
         lessDeletionPriorityConfig.setDeletionPriority(1);
         WifiConfiguration newlyAddedConfig = WifiConfigurationTestUtil.createPskNetwork();
@@ -7150,7 +7007,13 @@
         WifiConfiguration noAssociationConfig = WifiConfigurationTestUtil.createOpenNetwork();
         noAssociationConfig.numRebootsSinceLastUse = 1;
         noAssociationConfig.numAssociation = 0;
+        WifiConfiguration invalidKeyMgmtConfig = WifiConfigurationTestUtil.createEapNetwork();
+        invalidKeyMgmtConfig.allowedKeyManagement.clear(WifiConfiguration.KeyMgmt.IEEE8021X);
+        invalidKeyMgmtConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA2_PSK);
+        noAssociationConfig.numRebootsSinceLastUse = 1;
+        noAssociationConfig.numAssociation = 0;
 
+        configsInDeletionOrder.add(invalidKeyMgmtConfig);
         configsInDeletionOrder.add(noAssociationConfig);
         configsInDeletionOrder.add(oneRebootOpenConfig);
         configsInDeletionOrder.add(oneRebootSaeConfig);
@@ -7160,18 +7023,12 @@
         configsInDeletionOrder.add(lessDeletionPriorityConfig);
         configsInDeletionOrder.add(currentConfig);
 
-        for (WifiConfiguration config : configsInDeletionOrder) {
-            verifyAddNetworkToWifiConfigManager(config);
-        }
-        assertEquals(mWifiConfigManager.getConfiguredNetworks().size(), maxNumWifiConfigs);
-
         // Add carrier configs to flush out the other configs, since they are deleted last.
         for (WifiConfiguration configToDelete : configsInDeletionOrder) {
             WifiConfiguration carrierConfig = WifiConfigurationTestUtil.createPskNetwork();
             carrierConfig.carrierId = 1;
             verifyAddNetworkToWifiConfigManager(carrierConfig);
 
-            assertEquals(mWifiConfigManager.getConfiguredNetworks().size(), maxNumWifiConfigs);
             for (WifiConfiguration savedConfig : mWifiConfigManager.getConfiguredNetworks()) {
                 if (savedConfig.networkId == configToDelete.networkId) {
                     fail("Config was not deleted: " + configToDelete);
@@ -7262,314 +7119,4 @@
         NetworkUpdateResult updateResult = addNetworkToWifiConfigManager(config);
         assertTrue(result.getNetworkId() == updateResult.getNetworkId());
     }
-
-    private WifiConfiguration prepareTofuEapConfig(int eapMethod, int phase2Method) {
-        WifiConfiguration config = new WifiConfiguration();
-        config.SSID = "\"TofuSsid\"";
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
-        config.enterpriseConfig.setEapMethod(eapMethod);
-        config.enterpriseConfig.setPhase2Method(phase2Method);
-        config.enterpriseConfig.enableTrustOnFirstUse(true);
-        return config;
-    }
-
-    private void verifyAddTofuEnterpriseConfig(boolean isTofuSupported) {
-        long featureSet = isTofuSupported ? WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE : 0L;
-        when(mPrimaryClientModeManager.getSupportedFeatures()).thenReturn(featureSet);
-
-        WifiConfiguration config = prepareTofuEapConfig(
-                WifiEnterpriseConfig.Eap.PEAP, WifiEnterpriseConfig.Phase2.NONE);
-        NetworkUpdateResult result = addNetworkToWifiConfigManager(config);
-        if (isTofuSupported) {
-            assertTrue(result.getNetworkId() != WifiConfiguration.INVALID_NETWORK_ID);
-        } else {
-            assertEquals(WifiConfiguration.INVALID_NETWORK_ID,
-                    WifiConfiguration.INVALID_NETWORK_ID);
-        }
-
-        // The config uses EAP-SIM type which does not use Server Cert.
-        config = prepareTofuEapConfig(
-                WifiEnterpriseConfig.Eap.SIM, WifiEnterpriseConfig.Phase2.NONE);
-        config.enterpriseConfig.enableTrustOnFirstUse(true);
-        result = addNetworkToWifiConfigManager(config);
-        assertEquals(WifiConfiguration.INVALID_NETWORK_ID, result.getNetworkId());
-
-        // The config alraedy has Root CA cert.
-        config = prepareTofuEapConfig(
-                WifiEnterpriseConfig.Eap.PEAP, WifiEnterpriseConfig.Phase2.NONE);
-        config.enterpriseConfig.setCaPath("/path/to/ca");
-        config.enterpriseConfig.enableTrustOnFirstUse(true);
-        result = addNetworkToWifiConfigManager(config);
-        assertEquals(WifiConfiguration.INVALID_NETWORK_ID, result.getNetworkId());
-    }
-
-    /**
-     * Verifies the addition of a network with Trust On First Use support.
-     */
-    @Test
-    public void testAddTofuEnterpriseConfigWithTofuSupport() {
-        verifyAddTofuEnterpriseConfig(true);
-    }
-
-    /**
-     * Verifies the addition of a network without Trust On First Use support.
-     */
-    @Test
-    public void testAddTofuEnterpriseConfigWithoutTofuSupport() {
-        verifyAddTofuEnterpriseConfig(false);
-    }
-
-    @Test
-    public void testCustomDhcpOptions() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        byte[] oui1 = new byte[]{0x01, 0x02, 0x03};
-        byte[] oui2 = new byte[]{0x04, 0x05, 0x06};
-        byte[] oui3 = new byte[]{0x07, 0x08, 0x09};
-
-        ArrayList<DhcpOption> option1 = new ArrayList<DhcpOption>(
-                Arrays.asList(new DhcpOption((byte) 0x10, new byte[]{0x11, 0x12})));
-        ArrayList<DhcpOption> option2 = new ArrayList<DhcpOption>(
-                Arrays.asList(new DhcpOption((byte) 0x13, new byte[]{0x14, 0x15})));
-        ArrayList<DhcpOption> option3 = new ArrayList<DhcpOption>(
-                Arrays.asList(new DhcpOption((byte) 0x16, new byte[]{0x17})));
-        ArrayList<DhcpOption> option23 = new ArrayList<DhcpOption>();
-        option23.addAll(option2);
-        option23.addAll(option3);
-
-        mWifiConfigManager.addCustomDhcpOptions(WifiSsid.fromString(TEST_SSID), oui1, option1);
-        mWifiConfigManager.addCustomDhcpOptions(WifiSsid.fromString(TEST_SSID), oui2, option2);
-        mWifiConfigManager.addCustomDhcpOptions(WifiSsid.fromString(TEST_SSID), oui3, option3);
-        mLooper.dispatchAll();
-        assertEquals(1, mWifiConfigManager.getCustomDhcpOptions(
-                WifiSsid.fromString(TEST_SSID), Arrays.asList(oui1)).size());
-        assertEquals(1, mWifiConfigManager.getCustomDhcpOptions(
-                WifiSsid.fromString(TEST_SSID), Arrays.asList(oui2)).size());
-        assertEquals(2, mWifiConfigManager.getCustomDhcpOptions(
-                WifiSsid.fromString(TEST_SSID), Arrays.asList(oui2, oui3)).size());
-
-        mWifiConfigManager.removeCustomDhcpOptions(WifiSsid.fromString(TEST_SSID), oui1);
-        mLooper.dispatchAll();
-        assertEquals(0, mWifiConfigManager.getCustomDhcpOptions(
-                WifiSsid.fromString(TEST_SSID), Arrays.asList(oui1)).size());
-        List<DhcpOption> actual2 = mWifiConfigManager
-                .getCustomDhcpOptions(WifiSsid.fromString(TEST_SSID), Arrays.asList(oui2));
-        assertEquals(option2, actual2);
-        List<DhcpOption> actual23 = mWifiConfigManager
-                .getCustomDhcpOptions(WifiSsid.fromString(TEST_SSID), Arrays.asList(oui2, oui3));
-        assertTrue(option23.size() == actual23.size());
-        assertTrue(option23.containsAll(actual23));
-        assertTrue(actual23.containsAll(option23));
-    }
-
-    @Test
-    public void testAddOnNetworkUpdateListenerNull() throws Exception {
-        ArgumentCaptor<WifiConfiguration> wifiConfigCaptor =
-                ArgumentCaptor.forClass(WifiConfiguration.class);
-        mWifiConfigManager.addOnNetworkUpdateListener(mListener);
-        mWifiConfigManager.addOnNetworkUpdateListener(null);
-        WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork();
-        verifyAddNetworkToWifiConfigManager(openNetwork);
-        NetworkUpdateResult result =
-                mWifiConfigManager.addOrUpdateNetwork(openNetwork, TEST_CREATOR_UID);
-        verify(mListener).onNetworkAdded(wifiConfigCaptor.capture());
-        assertEquals(openNetwork.networkId, wifiConfigCaptor.getValue().networkId);
-    }
-
-    @Test
-    public void testRemoveOnNetworkUpdateListenerNull() throws Exception {
-        mWifiConfigManager.addOnNetworkUpdateListener(mListener);
-        mWifiConfigManager.addOnNetworkUpdateListener(null);
-        mWifiConfigManager.removeOnNetworkUpdateListener(null);
-        mWifiConfigManager.removeOnNetworkUpdateListener(mListener);
-        WifiConfiguration openNetwork = WifiConfigurationTestUtil.createOpenNetwork();
-        verifyAddNetworkToWifiConfigManager(openNetwork);
-        NetworkUpdateResult result =
-                mWifiConfigManager.addOrUpdateNetwork(openNetwork, TEST_CREATOR_UID);
-        verify(mListener, never()).onNetworkAdded(anyObject());
-    }
-
-    private int verifyAddNetwork(WifiConfiguration config, boolean expectNew) {
-        NetworkUpdateResult result = addNetworkToWifiConfigManager(config);
-        assertTrue(result.getNetworkId() != WifiConfiguration.INVALID_NETWORK_ID);
-        assertEquals(expectNew, result.isNewNetwork());
-        return result.getNetworkId();
-    }
-
-    @Test
-    public void testUpdateCaCertificateSuccess() throws Exception {
-        when(mPrimaryClientModeManager.getSupportedFeatures()).thenReturn(
-                WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE);
-
-        int openNetId = verifyAddNetwork(WifiConfigurationTestUtil.createOpenNetwork(), true);
-        int eapPeapNetId = verifyAddNetwork(prepareTofuEapConfig(
-                WifiEnterpriseConfig.Eap.PEAP, WifiEnterpriseConfig.Phase2.NONE), true);
-        int eapSimNetId = verifyAddNetwork(WifiConfigurationTestUtil.createEapNetwork(
-                WifiEnterpriseConfig.Eap.SIM, WifiEnterpriseConfig.Phase2.NONE), true);
-        assertTrue(mWifiConfigManager.updateCaCertificate(eapPeapNetId, FakeKeys.CA_CERT0,
-                FakeKeys.CA_CERT1));
-        WifiConfiguration config = mWifiConfigManager.getConfiguredNetwork(eapPeapNetId);
-        assertFalse(config.enterpriseConfig.isTrustOnFirstUseEnabled());
-        assertFalse(config.enterpriseConfig.isUserApproveNoCaCert());
-        assertEquals(FakeKeys.CA_CERT0, config.enterpriseConfig.getCaCertificate());
-    }
-
-    @Test
-    public void testUpdateCaCertificateWithoutAltSubjectNames() throws Exception {
-        when(mPrimaryClientModeManager.getSupportedFeatures()).thenReturn(
-                WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE);
-
-        verifyAddNetwork(WifiConfigurationTestUtil.createOpenNetwork(), true);
-        int eapPeapNetId = verifyAddNetwork(prepareTofuEapConfig(
-                WifiEnterpriseConfig.Eap.PEAP, WifiEnterpriseConfig.Phase2.NONE), true);
-        verifyAddNetwork(WifiConfigurationTestUtil.createEapNetwork(
-                WifiEnterpriseConfig.Eap.SIM, WifiEnterpriseConfig.Phase2.NONE), true);
-
-        X509Certificate mockServerCert = mock(X509Certificate.class);
-        Principal mockSubjectDn = mock(Principal.class);
-        when(mockServerCert.getSubjectDN()).thenReturn(mockSubjectDn);
-        when(mockSubjectDn.getName()).thenReturn(
-                "C=TW,ST=Taiwan,L=Taipei,O=Google,CN=mockServerCert");
-
-        assertTrue(mWifiConfigManager.updateCaCertificate(eapPeapNetId, FakeKeys.CA_CERT0,
-                mockServerCert));
-        WifiConfiguration config = mWifiConfigManager.getConfiguredNetwork(eapPeapNetId);
-        assertFalse(config.enterpriseConfig.isTrustOnFirstUseEnabled());
-        assertFalse(config.enterpriseConfig.isUserApproveNoCaCert());
-        assertEquals("mockServerCert", config.enterpriseConfig.getDomainSuffixMatch());
-        assertEquals("", config.enterpriseConfig.getAltSubjectMatch());
-    }
-
-    @Test
-    public void testUpdateCaCertificateWithAltSubjectNames() throws Exception {
-        when(mPrimaryClientModeManager.getSupportedFeatures()).thenReturn(
-                WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE);
-
-        verifyAddNetwork(WifiConfigurationTestUtil.createOpenNetwork(), true);
-        int eapPeapNetId = verifyAddNetwork(prepareTofuEapConfig(
-                WifiEnterpriseConfig.Eap.PEAP, WifiEnterpriseConfig.Phase2.NONE), true);
-        verifyAddNetwork(WifiConfigurationTestUtil.createEapNetwork(
-                WifiEnterpriseConfig.Eap.SIM, WifiEnterpriseConfig.Phase2.NONE), true);
-
-        X509Certificate mockServerCert = mock(X509Certificate.class);
-        Principal mockSubjectDn = mock(Principal.class);
-        when(mockServerCert.getSubjectDN()).thenReturn(mockSubjectDn);
-        when(mockSubjectDn.getName()).thenReturn(
-                "C=TW,ST=Taiwan,L=Taipei,O=Google,CN=mockServerCert");
-        List<List<?>> altNames = new ArrayList<>();
-        // DNS name 1 with type 2
-        altNames.add(Arrays.asList(new Object[]{2, "wifi.android"}));
-        // EMail with type 1
-        altNames.add(Arrays.asList(new Object[]{1, "test@wifi.com"}));
-        // DNS name 2 with type 2
-        altNames.add(Arrays.asList(new Object[]{2, "network.android"}));
-        // RID name 2 with type 8, this one should be ignored.
-        altNames.add(Arrays.asList(new Object[]{8, "1.2.3.4"}));
-        // URI name with type 6
-        altNames.add(Arrays.asList(new Object[]{6, "http://test.android.com"}));
-        when(mockServerCert.getSubjectAlternativeNames()).thenReturn(altNames);
-
-        assertTrue(mWifiConfigManager.updateCaCertificate(eapPeapNetId, FakeKeys.CA_CERT0,
-                mockServerCert));
-        WifiConfiguration config = mWifiConfigManager.getConfiguredNetwork(eapPeapNetId);
-        assertFalse(config.enterpriseConfig.isTrustOnFirstUseEnabled());
-        assertFalse(config.enterpriseConfig.isUserApproveNoCaCert());
-        assertEquals("", config.enterpriseConfig.getDomainSuffixMatch());
-        assertEquals("DNS:wifi.android;EMAIL:test@wifi.com;DNS:network.android;"
-                + "URI:http://test.android.com",
-                config.enterpriseConfig.getAltSubjectMatch());
-    }
-
-    @Test
-    public void testUpdateCaCertificateFaiulreInvalidArgument() throws Exception {
-        when(mPrimaryClientModeManager.getSupportedFeatures()).thenReturn(
-                WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE);
-
-        int openNetId = verifyAddNetwork(WifiConfigurationTestUtil.createOpenNetwork(), true);
-        int eapPeapNetId = verifyAddNetwork(prepareTofuEapConfig(
-                WifiEnterpriseConfig.Eap.PEAP, WifiEnterpriseConfig.Phase2.NONE), true);
-        int eapSimNetId = verifyAddNetwork(WifiConfigurationTestUtil.createEapNetwork(
-                WifiEnterpriseConfig.Eap.SIM, WifiEnterpriseConfig.Phase2.NONE), true);
-
-        // Invalid network id
-        assertFalse(mWifiConfigManager.updateCaCertificate(-1, FakeKeys.CA_CERT0,
-                FakeKeys.CA_CERT1));
-
-        // Not an enterprise network
-        assertFalse(mWifiConfigManager.updateCaCertificate(openNetId, FakeKeys.CA_CERT0,
-                FakeKeys.CA_CERT1));
-
-        // Not a certificate baseed enterprise network
-        assertFalse(mWifiConfigManager.updateCaCertificate(eapSimNetId, FakeKeys.CA_CERT0,
-                FakeKeys.CA_CERT1));
-
-        // No cert
-        assertFalse(mWifiConfigManager.updateCaCertificate(eapPeapNetId, null, null));
-
-        // No valid subject
-        X509Certificate mockServerCert = mock(X509Certificate.class);
-        Principal mockSubjectDn = mock(Principal.class);
-        when(mockServerCert.getSubjectDN()).thenReturn(mockSubjectDn);
-        when(mockSubjectDn.getName()).thenReturn("");
-        assertFalse(mWifiConfigManager.updateCaCertificate(eapPeapNetId, FakeKeys.CA_CERT0,
-                mockServerCert));
-    }
-
-    @Test
-    public void testUpdateCaCertificateSuccessWithSelfSignedCertificate() throws Exception {
-        when(mPrimaryClientModeManager.getSupportedFeatures()).thenReturn(
-                WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE);
-
-        int openNetId = verifyAddNetwork(WifiConfigurationTestUtil.createOpenNetwork(), true);
-        int eapPeapNetId = verifyAddNetwork(prepareTofuEapConfig(
-                WifiEnterpriseConfig.Eap.PEAP, WifiEnterpriseConfig.Phase2.NONE), true);
-        int eapSimNetId = verifyAddNetwork(WifiConfigurationTestUtil.createEapNetwork(
-                WifiEnterpriseConfig.Eap.SIM, WifiEnterpriseConfig.Phase2.NONE), true);
-
-        X509Certificate mockCaCert = mock(X509Certificate.class);
-        when(mockCaCert.getBasicConstraints()).thenReturn(-1);
-        assertTrue(mWifiConfigManager.updateCaCertificate(eapPeapNetId, mockCaCert,
-                FakeKeys.CA_CERT1));
-        WifiConfiguration config = mWifiConfigManager.getConfiguredNetwork(eapPeapNetId);
-        assertFalse(config.enterpriseConfig.isTrustOnFirstUseEnabled());
-        assertFalse(config.enterpriseConfig.isUserApproveNoCaCert());
-        assertEquals(mockCaCert, config.enterpriseConfig.getCaCertificate());
-    }
-
-    @Test
-    public void testUpdateCaCertificateFailureWithSelfSignedCertificateAndTofuNotEnabled()
-            throws Exception {
-        when(mPrimaryClientModeManager.getSupportedFeatures()).thenReturn(
-                WifiManager.WIFI_FEATURE_TRUST_ON_FIRST_USE);
-
-        int openNetId = verifyAddNetwork(WifiConfigurationTestUtil.createOpenNetwork(), true);
-        int eapPeapNetId = verifyAddNetwork(WifiConfigurationTestUtil.createEapNetwork(
-                WifiEnterpriseConfig.Eap.PEAP, WifiEnterpriseConfig.Phase2.NONE), true);
-        int eapSimNetId = verifyAddNetwork(WifiConfigurationTestUtil.createEapNetwork(
-                WifiEnterpriseConfig.Eap.SIM, WifiEnterpriseConfig.Phase2.NONE), true);
-
-        X509Certificate mockCaCert = mock(X509Certificate.class);
-        when(mockCaCert.getBasicConstraints()).thenReturn(-1);
-        assertFalse(mWifiConfigManager.updateCaCertificate(eapPeapNetId, mockCaCert,
-                FakeKeys.CA_CERT1));
-        WifiConfiguration config = mWifiConfigManager.getConfiguredNetwork(eapPeapNetId);
-        assertEquals(null, config.enterpriseConfig.getCaCertificate());
-    }
-
-    @Test
-    public void testUpdateNetworkWithCreatorOverride() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        int openNetId = verifyAddNetwork(WifiConfigurationTestUtil.createOpenNetwork(), true);
-
-        assertEquals(TEST_CREATOR_UID, mWifiConfigManager
-                .getConfiguredNetwork(openNetId).creatorUid);
-        config.networkId = openNetId;
-        NetworkUpdateResult result = mWifiConfigManager.addOrUpdateNetwork(
-                config, TEST_UPDATE_UID, TEST_UPDATE_NAME, true);
-        assertEquals(openNetId, result.getNetworkId());
-
-        assertEquals(TEST_UPDATE_UID, mWifiConfigManager
-                .getConfiguredNetwork(openNetId).creatorUid);
-        assertEquals(TEST_UPDATE_NAME, mWifiConfigManager
-                .getConfiguredNetwork(openNetId).creatorName);
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
index 9fe5b16..c3d1481 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigStoreTest.java
@@ -104,7 +104,6 @@
                     + "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
                     + "<int name=\"DeletionPriority\" value=\"0\" />\n"
                     + "<int name=\"NumRebootsSinceLastUse\" value=\"0\" />\n"
-                    + "<boolean name=\"RepeaterEnabled\" value=\"false\" />\n"
                     + "<SecurityParamsList>\n"
                     + "<SecurityParams>\n"
                     + "<int name=\"SecurityType\" value=\"0\" />\n"
@@ -120,7 +119,6 @@
                     + "</SecurityParams>\n"
                     + "</SecurityParamsList>\n"
                     + "<boolean name=\"Trusted\" value=\"true\" />\n"
-                    + "<boolean name=\"IsRestricted\" value=\"false\" />\n"
                     + "<boolean name=\"OemPaid\" value=\"false\" />\n"
                     + "<boolean name=\"OemPrivate\" value=\"false\" />\n"
                     + "<boolean name=\"CarrierMerged\" value=\"false\" />\n"
@@ -147,22 +145,6 @@
                     + "<int name=\"CarrierId\" value=\"-1\" />\n"
                     + "<boolean name=\"IsMostRecentlyConnected\" value=\"false\" />\n"
                     + "<int name=\"SubscriptionId\" value=\"%d\" />\n"
-                    + "<DppPrivateEcKey>\n"
-                    + "<byte-array name=\"EncryptedData\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"IV\" num=\"0\"></byte-array>\n"
-                    + "</DppPrivateEcKey>\n"
-                    + "<DppConnector>\n"
-                    + "<byte-array name=\"EncryptedData\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"IV\" num=\"0\"></byte-array>\n"
-                    + "</DppConnector>\n"
-                    + "<DppCSignKey>\n"
-                    + "<byte-array name=\"EncryptedData\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"IV\" num=\"0\"></byte-array>\n"
-                    + "</DppCSignKey>\n"
-                    + "<DppNetAccessKey>\n"
-                    + "<byte-array name=\"EncryptedData\" num=\"0\"></byte-array>\n"
-                    + "<byte-array name=\"IV\" num=\"0\"></byte-array>\n"
-                    + "</DppNetAccessKey>\n"
                     + "</WifiConfiguration>\n"
                     + "<NetworkStatus>\n"
                     + "<string name=\"SelectionStatus\">NETWORK_SELECTION_ENABLED</string>\n"
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
index eefa46b..847afe4 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java
@@ -680,7 +680,7 @@
             WifiConfiguration configuration, String bssid, int level, int frequency,
             long tsf, long seen) {
         String caps = getScanResultCapsForNetwork(configuration);
-        WifiSsid ssid = WifiSsid.fromString(configuration.SSID);
+        WifiSsid ssid = WifiSsid.createFromAsciiEncoded(configuration.getPrintableSsid());
         return new ScanDetail(ssid, bssid, caps, level, frequency, tsf, seen);
     }
 
@@ -692,7 +692,7 @@
             WifiConfiguration configuration, String bssid, int level, int frequency,
             long tsf, long seen) {
         String caps = getScanResultCapsForWpa2Wpa3TransitionNetwork();
-        WifiSsid ssid = WifiSsid.fromUtf8Text(configuration.getPrintableSsid());
+        WifiSsid ssid = WifiSsid.createFromAsciiEncoded(configuration.getPrintableSsid());
         return new ScanDetail(ssid, bssid, caps, level, frequency, tsf, seen);
     }
 
@@ -771,7 +771,6 @@
         assertEquals(expected.oemPaid, actual.oemPaid);
         assertEquals(expected.oemPrivate, actual.oemPrivate);
         assertEquals(expected.carrierMerged, actual.carrierMerged);
-        assertEquals(expected.restricted, actual.restricted);
         assertEquals(0, actual.numAssociation);
         assertEquals(expected.creatorUid, actual.creatorUid);
         assertEquals(expected.creatorName, actual.creatorName);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java
index e3b3253..c71fb1a 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java
@@ -30,7 +30,6 @@
 import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiEnterpriseConfig;
-import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiNetworkSpecifier;
 import android.net.wifi.WifiScanner;
@@ -64,7 +63,6 @@
     static final List<UserInfo> PROFILES = Arrays.asList(
             new UserInfo(CURRENT_USER_ID, "owner", 0),
             new UserInfo(CURRENT_USER_MANAGED_PROFILE_USER_ID, "managed profile", 0));
-    private static final long SUPPORTED_FEATURES_ALL = Long.MAX_VALUE;
 
     /**
      * Verify that new WifiEnterpriseConfig is detected.
@@ -191,25 +189,25 @@
     @Test
     public void testValidatePositiveCases_AsciiSsidString() {
         assertTrue(WifiConfigurationUtil.validate(
-                WifiConfigurationTestUtil.createOpenNetwork(), SUPPORTED_FEATURES_ALL,
+                WifiConfigurationTestUtil.createOpenNetwork(),
                 WifiConfigurationUtil.VALIDATE_FOR_ADD));
         assertTrue(WifiConfigurationUtil.validate(
-                WifiConfigurationTestUtil.createPskNetwork(), SUPPORTED_FEATURES_ALL,
+                WifiConfigurationTestUtil.createPskNetwork(),
                 WifiConfigurationUtil.VALIDATE_FOR_ADD));
         assertTrue(WifiConfigurationUtil.validate(
-                WifiConfigurationTestUtil.createWepNetwork(), SUPPORTED_FEATURES_ALL,
+                WifiConfigurationTestUtil.createWepNetwork(),
                 WifiConfigurationUtil.VALIDATE_FOR_ADD));
         assertTrue(WifiConfigurationUtil.validate(
-                WifiConfigurationTestUtil.createEapNetwork(), SUPPORTED_FEATURES_ALL,
+                WifiConfigurationTestUtil.createEapNetwork(),
                 WifiConfigurationUtil.VALIDATE_FOR_ADD));
         assertTrue(WifiConfigurationUtil.validate(
-                WifiConfigurationTestUtil.createOweNetwork(), SUPPORTED_FEATURES_ALL,
+                WifiConfigurationTestUtil.createOweNetwork(),
                 WifiConfigurationUtil.VALIDATE_FOR_ADD));
         assertTrue(WifiConfigurationUtil.validate(
-                WifiConfigurationTestUtil.createSaeNetwork(), SUPPORTED_FEATURES_ALL,
+                WifiConfigurationTestUtil.createSaeNetwork(),
                 WifiConfigurationUtil.VALIDATE_FOR_ADD));
         assertTrue(WifiConfigurationUtil.validate(
-                WifiConfigurationTestUtil.createEapSuiteBNetwork(), SUPPORTED_FEATURES_ALL,
+                WifiConfigurationTestUtil.createEapSuiteBNetwork(),
                 WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
@@ -222,8 +220,7 @@
         WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
         config.SSID = "abcd1234555a";
         config.preSharedKey = "abcd123455151234556788990034556667332345667322344556676743233445";
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -233,10 +230,9 @@
     public void testValidatePositiveCases_AnyBssidString() {
         WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
         config.BSSID = "any";
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         assertTrue(WifiConfigurationUtil.validate(
-                config, SUPPORTED_FEATURES_ALL, WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
+                config, WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
     }
 
     /**
@@ -246,14 +242,12 @@
     @Test
     public void testValidatePositiveCases_MaskedPskString() {
         WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.preSharedKey = WifiConfigurationUtil.PASSWORD_MASK;
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         assertTrue(WifiConfigurationUtil.validate(
-                config, SUPPORTED_FEATURES_ALL, WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
+                config, WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
     }
 
     /**
@@ -263,11 +257,9 @@
     @Test
     public void testValidatePositiveCases_OnlyUpdateIgnoresNullSsid() {
         WifiConfiguration config = new WifiConfiguration();
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         assertTrue(WifiConfigurationUtil.validate(
-                config, SUPPORTED_FEATURES_ALL, WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
-
+                config, WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
     }
 
     /**
@@ -276,15 +268,12 @@
     @Test
     public void testValidateNegativeCases_BadAsciiSsidLength() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.SSID = "\"abcdfefeeretretyetretetetetetrertertrsreqwrwe\"";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         config.SSID = "\"\"";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -293,15 +282,12 @@
     @Test
     public void testValidateNegativeCases_BadUtf8SsidLength() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.SSID = "\"가하아너너ㅓ저저ㅓ어아아다자저ㅓ더타아어어러두어\"";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         config.SSID = "\"\"";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -311,12 +297,10 @@
     @Test
     public void testValidateNegativeCases_MalformedAsciiSsidString() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.SSID = "\"ab";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -325,15 +309,12 @@
     @Test
     public void testValidateNegativeCases_BadHexSsidLength() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.SSID = "abcdfe012345632423343543453456464545656464545646454ace34534545634535";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         config.SSID = "";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -343,12 +324,10 @@
     @Test
     public void testValidateNegativeCases_MalformedHexSsidString() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.SSID = "hello";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -357,16 +336,13 @@
     @Test
     public void testValidateNegativeCases_BadAsciiPskLength() {
         WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.preSharedKey = "\"abcdffeeretretyetreteteteabe34tetrertertrsraaaaaaaaaaa345eqwrweewq"
                 + "weqe\"";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         config.preSharedKey = "\"454\"";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -375,16 +351,13 @@
     @Test
     public void testValidateNegativeCases_BadAsciiSaeLength() {
         WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.preSharedKey = "\"abcdffeeretretyetreteteteabe34tetrertertrsraaaaaaaaaaa345eqwrweewq"
                 + "weqe\"";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         config.preSharedKey = "\"\"";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -394,12 +367,10 @@
     @Test
     public void testValidateNegativeCases_MalformedAsciiPskString() {
         WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.preSharedKey = "\"abcdfefeeretrety";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -409,12 +380,10 @@
     @Test
     public void testValidateNegativeCases_MalformedAsciiSaeString() {
         WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.preSharedKey = "\"abcdfefeeretrety";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -423,15 +392,12 @@
     @Test
     public void testValidateNegativeCases_BadHexPskLength() {
         WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.preSharedKey = "abcd123456788990013453445345465465476546";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         config.preSharedKey = "";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -441,12 +407,10 @@
     @Test
     public void testValidateNegativeCases_MalformedHexPskString() {
         WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.preSharedKey = "adbdfgretrtyrtyrty";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -456,12 +420,10 @@
     @Test
     public void testValidateNegativeCases_MalformedHexSaeString() {
         WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.preSharedKey = "adbdfgretrtyrtyrty";
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -471,17 +433,15 @@
     @Test
     public void testValidatePositiveCases_MaskedWepKeysString() {
         WifiConfiguration config = WifiConfigurationTestUtil.createWepNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.wepKeys = new String[]{ WifiConfigurationUtil.PASSWORD_MASK,
                 WifiConfigurationUtil.PASSWORD_MASK,
                 WifiConfigurationUtil.PASSWORD_MASK,
                 WifiConfigurationUtil.PASSWORD_MASK};
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         assertTrue(WifiConfigurationUtil.validate(
-                config, SUPPORTED_FEATURES_ALL, WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
+                config, WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
     }
 
     /**
@@ -490,19 +450,15 @@
     @Test
     public void testValidateNegativeCases_BadWepKeysLength() {
         WifiConfiguration config = WifiConfigurationTestUtil.createWepNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.wepKeys = new String[] {"\"abcd\""};
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         config.wepKeys = new String[] {"456"};
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         // Error scenario in b/169638868.
         config.wepKeys = new String[] {""};
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -511,12 +467,10 @@
     @Test
     public void testValidateNegativeCases_BadWepTxKeysIndex() {
         WifiConfiguration config = WifiConfigurationTestUtil.createWepNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         // Should be < wepKeys.length
         config.wepTxKeyIndex = config.wepKeys.length;
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -525,12 +479,10 @@
     @Test
     public void testValidateNegativeCases_BadKeyMgmtPskEap() {
         WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -539,12 +491,10 @@
     @Test
     public void testValidateNegativeCases_BadKeyMgmtOpenPsk() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -553,12 +503,10 @@
     @Test
     public void testValidateNegativeCases_BadKeyMgmt() {
         WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -567,13 +515,11 @@
     @Test
     public void testValidateNegativeCases_BadSuiteBKeyMgmt() {
         WifiConfiguration config = WifiConfigurationTestUtil.createEapSuiteBNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.allowedKeyManagement.clear(WifiConfiguration.KeyMgmt.IEEE8021X);
         config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA2_PSK);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -586,13 +532,11 @@
         IpConfiguration ipConfig =
                 WifiConfigurationTestUtil.createStaticIpConfigurationWithPacProxy();
         config.setIpConfiguration(ipConfig);
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         ipConfig.setStaticIpConfiguration(null);
         config.setIpConfiguration(ipConfig);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -601,12 +545,10 @@
     @Test
     public void testValidateNegativeCases_InvalidKeyMgmt() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.FT_EAP + 1);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -615,12 +557,10 @@
     @Test
     public void testValidateNegativeCases_InvalidKeyMgmtWithPreSharedKey() {
         WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OSEN);
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
         // Verify we reset the KeyMgmt
         assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_PSK));
         assertFalse(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.OSEN));
@@ -632,12 +572,10 @@
     @Test
     public void testValidateNegativeCases_InvalidProtocol() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.allowedProtocols.set(4);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -647,12 +585,10 @@
     @Test
     public void testValidateNegativeCases_InvalidAuthAlgorithm() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.LEAP + 3);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -662,12 +598,10 @@
     @Test
     public void testValidateNegativeCases_InvalidGroupCipher() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GTK_NOT_USED + 4);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -677,12 +611,10 @@
     @Test
     public void testValidateNegativeCases_InvalidPairwiseCipher() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP + 4);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -951,18 +883,18 @@
     }
 
     /**
-     * Verify that WifiConfigurationUtil.isSameNetwork returns false when two WifiConfiguration
+     * Verify that WifiConfigurationUtil.isSameNetwork returns true when two WifiConfiguration
      * objects have the different EAP anonymous(pseudonym) identity in EAP-SIM.
      */
     @Test
-    public void testIsSameNetworkReturnsFalseOnDifferentEapAnonymousIdentityInEapSim() {
+    public void testIsSameNetworkReturnsTrueOnDifferentEapAnonymousIdentityInEapSim() {
         WifiConfiguration network1 = WifiConfigurationTestUtil.createEapNetwork(TEST_SSID);
         WifiConfiguration network2 = WifiConfigurationTestUtil.createEapNetwork(TEST_SSID);
         network1.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.SIM);
         network2.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.SIM);
         network1.enterpriseConfig.setAnonymousIdentity("Identity1");
         network2.enterpriseConfig.setAnonymousIdentity("Identity2");
-        assertFalse(WifiConfigurationUtil.isSameNetwork(network1, network2));
+        assertTrue(WifiConfigurationUtil.isSameNetwork(network1, network2));
     }
 
     /**
@@ -1296,16 +1228,13 @@
         config.SSID = "\"someNetwork\"";
         config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP);
         // EAP method is kept as Eap.NONE - should not crash, but return invalid ID
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
 
         config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
     }
 
     /**
@@ -1316,52 +1245,26 @@
     public void testValidateNegativeCases_NoIdentityOrPasswordEnterpriseConfig() {
         WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
         config.enterpriseConfig.setIdentity(null);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config,
                 WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
 
         config = WifiConfigurationTestUtil.createEapNetwork();
         config.enterpriseConfig.setPassword(null);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config,
                 WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
 
         config = WifiConfigurationTestUtil.createWpa3EnterpriseNetwork(TEST_SSID);
         config.enterpriseConfig.setIdentity(null);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertFalse(WifiConfigurationUtil.validate(config,
                 WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
 
         config = WifiConfigurationTestUtil.createWpa3EnterpriseNetwork(TEST_SSID);
         config.enterpriseConfig.setPassword(null);
-        assertFalse(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
-                WifiConfigurationUtil.VALIDATE_FOR_ADD));
-        assertTrue(WifiConfigurationUtil.validate(config, SUPPORTED_FEATURES_ALL,
+        assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD));
+        assertTrue(WifiConfigurationUtil.validate(config,
                 WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
     }
-
-    /**
-     * Verify that the validate method fails to validate WifiConfiguration with DPP AKM
-     * security type if DPP AKM is not supported by the device, and succeeds if it is supported.
-     */
-    @Test
-    public void testValidateSecurityTypeDppAkm() {
-        long supportedFeatures = SUPPORTED_FEATURES_ALL & ~WifiManager.WIFI_FEATURE_DPP_AKM;
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        config.setSecurityParams(WifiInfo.SECURITY_TYPE_DPP);
-
-        assertFalse(WifiConfigurationUtil.validate(config, supportedFeatures,
-                  WifiConfigurationUtil.VALIDATE_FOR_ADD));
-        assertFalse(WifiConfigurationUtil.validate(config, supportedFeatures,
-                  WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
-
-        supportedFeatures = WifiManager.WIFI_FEATURE_DPP_AKM;
-        assertTrue(WifiConfigurationUtil.validate(config, supportedFeatures,
-                  WifiConfigurationUtil.VALIDATE_FOR_ADD));
-        assertTrue(WifiConfigurationUtil.validate(config, supportedFeatures,
-                  WifiConfigurationUtil.VALIDATE_FOR_UPDATE));
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java
index 734dd7f0..ad889fc 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java
@@ -26,13 +26,11 @@
 import static com.android.server.wifi.ClientModeImpl.WIFI_WORK_SOURCE;
 import static com.android.server.wifi.WifiConfigurationTestUtil.generateWifiConfig;
 
-import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.anyBoolean;
 import static org.mockito.Mockito.anyInt;
@@ -49,7 +47,6 @@
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.eq;
 import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.lenient;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.reset;
@@ -58,7 +55,6 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
 import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.withSettings;
 
 import android.app.AlarmManager;
 import android.app.test.MockAnswerUtil.AnswerWithArguments;
@@ -67,12 +63,10 @@
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.net.MacAddress;
-import android.net.wifi.IPnoScanResultsCallback;
 import android.net.wifi.ScanResult;
 import android.net.wifi.ScanResult.InformationElement;
 import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiNetworkSuggestion;
@@ -84,9 +78,7 @@
 import android.net.wifi.WifiScanner.ScanSettings;
 import android.net.wifi.WifiSsid;
 import android.net.wifi.hotspot2.PasspointConfiguration;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.Handler;
-import android.os.IBinder;
 import android.os.IPowerManager;
 import android.os.IThermalService;
 import android.os.Looper;
@@ -96,17 +88,15 @@
 import android.os.SystemClock;
 import android.os.WorkSource;
 import android.os.test.TestLooper;
-import android.util.ArraySet;
 import android.util.LocalLog;
 
 import androidx.test.filters.SmallTest;
 
-import com.android.dx.mockito.inline.extended.ExtendedMockito;
 import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.ActiveModeWarden.ExternalClientModeManagerRequestListener;
 import com.android.server.wifi.hotspot2.PasspointManager;
-import com.android.server.wifi.proto.nano.WifiMetricsProto;
 import com.android.server.wifi.util.LruConnectionTracker;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.wifi.resources.R;
 
 import org.junit.After;
@@ -118,8 +108,6 @@
 import org.mockito.InOrder;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.mockito.MockitoSession;
-import org.mockito.quality.Strictness;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
@@ -163,7 +151,7 @@
         mLooper = new TestLooper(mClock::getElapsedSinceBootMillis);
         mTestHandler = new TestHandler(mLooper.getLooper());
         when(mContext.getSystemService(WifiScanner.class)).thenReturn(mWifiScanner);
-        when(mWifiNetworkSuggestionsManager.retrieveHiddenNetworkList(anyBoolean()))
+        when(mWifiNetworkSuggestionsManager.retrieveHiddenNetworkList())
                 .thenReturn(new ArrayList<>());
         when(mWifiNetworkSuggestionsManager.getAllApprovedNetworkSuggestions())
                 .thenReturn(new HashSet<>());
@@ -203,17 +191,6 @@
         Comparator<WifiConfiguration> comparator =
                 Comparator.comparingInt(mLruConnectionTracker::getAgeIndexOfNetwork);
         when(mWifiConfigManager.getScanListComparator()).thenReturn(comparator);
-
-        // Need to mock WifiInjector since some code used in WifiConnectivityManager calls
-        // WifiInjector.getInstance().
-        mSession = ExtendedMockito.mockitoSession()
-                .strictness(Strictness.LENIENT)
-                .mockStatic(WifiInjector.class, withSettings().lenient())
-                .startMocking();
-        WifiInjector wifiInjector = mock(WifiInjector.class);
-        when(wifiInjector.getActiveModeWarden()).thenReturn(mActiveModeWarden);
-        when(wifiInjector.getWifiGlobals()).thenReturn(mWifiGlobals);
-        lenient().when(WifiInjector.getInstance()).thenReturn(wifiInjector);
     }
 
     private void setUpResources(MockResources resources) {
@@ -229,10 +206,6 @@
         resources.setIntArray(
                 R.array.config_wifiDisconnectedScanIntervalScheduleSec,
                 VALID_DISCONNECTED_SINGLE_SCAN_SCHEDULE_SEC);
-        resources.setIntArray(R.array.config_wifiConnectedScanType,
-                VALID_CONNECTED_SINGLE_SCAN_TYPE);
-        resources.setIntArray(R.array.config_wifiDisconnectedScanType,
-                VALID_DISCONNECTED_SINGLE_SCAN_TYPE);
         resources.setIntArray(
                 R.array.config_wifiSingleSavedNetworkConnectedScanIntervalScheduleSec,
                 SCHEDULE_EMPTY_SEC);
@@ -253,7 +226,6 @@
         resources.setInteger(R.integer.config_wifiPnoScanLowRssiNetworkRetryMaxDelaySec,
                 LOW_RSSI_NETWORK_RETRY_MAX_DELAY_SEC);
         resources.setBoolean(R.bool.config_wifiEnable6ghzPscScanning, true);
-        resources.setBoolean(R.bool.config_wifiUseHalApiToDisableFwRoaming, true);
     }
 
     /**
@@ -264,9 +236,6 @@
         verify(mScoringParams, atLeast(0)).getEntryRssi(anyInt());
         verifyNoMoreInteractions(mScoringParams);
         validateMockitoUsage();
-        if (mSession != null) {
-            mSession.finishMocking();
-        }
     }
 
     private WifiContext mContext;
@@ -292,8 +261,6 @@
     @Mock private ScoringParams mScoringParams;
     @Mock private WifiScoreCard mWifiScoreCard;
     @Mock private PasspointManager mPasspointManager;
-    @Mock private FrameworkFacade mFacade;
-    @Mock private MultiInternetManager mMultiInternetManager;
     @Mock private WifiScoreCard.PerNetwork mPerNetwork;
     @Mock private WifiScoreCard.PerNetwork mPerNetwork1;
     @Mock private PasspointConfiguration mPasspointConfiguration;
@@ -305,7 +272,6 @@
     @Mock private ConcreteClientModeManager mPrimaryClientModeManager;
     @Mock private ConcreteClientModeManager mSecondaryClientModeManager;
     @Mock private WifiGlobals mWifiGlobals;
-    @Mock private ExternalPnoScanRequestManager mExternalPnoScanRequestManager;
     @Mock WifiCandidates.Candidate mCandidate1;
     @Mock WifiCandidates.Candidate mCandidate2;
     private WifiConfiguration mCandidateWifiConfig1;
@@ -318,9 +284,6 @@
             mSuggestionUpdateListenerCaptor;
     @Captor ArgumentCaptor<ActiveModeWarden.ModeChangeCallback> mModeChangeCallbackCaptor;
     @Captor ArgumentCaptor<BroadcastReceiver> mBroadcastReceiverCaptor;
-    @Captor ArgumentCaptor<MultiInternetManager.ConnectionStatusListener>
-            mMultiInternetConnectionStatusListenerCaptor;
-    private MockitoSession mSession;
     private MockResources mResources;
 
     private static final int CANDIDATE_NETWORK_ID = 0;
@@ -332,23 +295,14 @@
     private static final int TEST_FREQUENCY = 2420;
     private static final long CURRENT_SYSTEM_TIME_MS = 1000;
     private static final int MAX_BSSID_BLOCKLIST_SIZE = 16;
-
-    // Scan schedule and corresponding scan types
     private static final int[] VALID_CONNECTED_SINGLE_SCAN_SCHEDULE_SEC = {10, 30, 50};
     private static final int[] VALID_CONNECTED_SINGLE_SAVED_NETWORK_SCHEDULE_SEC = {15, 35, 55};
     private static final int[] VALID_DISCONNECTED_SINGLE_SCAN_SCHEDULE_SEC = {25, 40, 60};
-    private static final int[] VALID_CONNECTED_SINGLE_SCAN_TYPE = {1, 0, 0};
-    private static final int[] VALID_CONNECTED_SINGLE_SAVED_NETWORK_TYPE = {2, 0, 1};
-    private static final int[] VALID_DISCONNECTED_SINGLE_SCAN_TYPE = {2, 1, 1};
-    private static final int[] VALID_EXTERNAL_SINGLE_SCAN_SCHEDULE_SEC = {40, 80};
-    private static final int[] VALID_EXTERNAL_SINGLE_SCAN_TYPE = {1, 0};
-
     private static final int[] SCHEDULE_EMPTY_SEC = {};
     private static final int[] INVALID_SCHEDULE_NEGATIVE_VALUES_SEC = {10, -10, 20};
     private static final int[] INVALID_SCHEDULE_ZERO_VALUES_SEC = {10, 0, 20};
     private static final int MAX_SCAN_INTERVAL_IN_SCHEDULE_SEC = 60;
     private static final int[] DEFAULT_SINGLE_SCAN_SCHEDULE_SEC = {20, 40, 80, 160};
-    private static final int[] DEFAULT_SINGLE_SCAN_TYPE = {2, 2, 2, 2};
     private static final int MAX_SCAN_INTERVAL_IN_DEFAULT_SCHEDULE_SEC = 160;
     private static final int TEST_FREQUENCY_1 = 2412;
     private static final int TEST_FREQUENCY_2 = 5180;
@@ -368,9 +322,6 @@
     private static final int LOW_RSSI_NETWORK_RETRY_START_DELAY_SEC = 20;
     private static final int LOW_RSSI_NETWORK_RETRY_MAX_DELAY_SEC = 80;
     private static final int SCAN_TRIGGER_TIMES = 7;
-    private static final long NETWORK_CHANGE_TRIGGER_PNO_THROTTLE_MS = 3000; // 3 seconds
-    private static final int TEST_FREQUENCY_2G = 2412;
-    private static final int TEST_FREQUENCY_5G = 5262;
 
     /**
     * A test Handler that stores one single incoming Message with delayed time internally, to be
@@ -475,7 +426,7 @@
         // This unfortunately needs to be a somewhat valid scan result, otherwise
         // |ScanDetailUtil.toScanDetail| raises exceptions.
         final ScanResult[] scanResults = new ScanResult[1];
-        scanResults[0] = new ScanResult(WifiSsid.fromUtf8Text(CANDIDATE_SSID),
+        scanResults[0] = new ScanResult(WifiSsid.createFromAsciiEncoded(CANDIDATE_SSID),
                 CANDIDATE_SSID, CANDIDATE_BSSID, 1245, 0, "some caps",
                 -78, 2450, 1025, 22, 33, 20, 0, 0, true);
         scanResults[0].informationElements = new InformationElement[1];
@@ -508,7 +459,6 @@
         when(cmm.isConnected()).thenReturn(false);
         when(cmm.isDisconnected()).thenReturn(true);
         when(cmm.isSupplicantTransientState()).thenReturn(false);
-        when(cmm.enableRoaming(anyBoolean())).thenReturn(true);
     }
 
     WifiNetworkSelector mockWifiNetworkSelector() {
@@ -541,7 +491,7 @@
         mCandidateList = new ArrayList<WifiCandidates.Candidate>();
         mCandidateList.add(mCandidate1);
         when(ns.getCandidatesFromScan(any(), any(), any(), anyBoolean(), anyBoolean(),
-                anyBoolean(), any(), anyBoolean())).thenReturn(mCandidateList);
+                anyBoolean())).thenReturn(mCandidateList);
         when(ns.selectNetwork(any()))
                 .then(new AnswerWithArguments() {
                     public WifiConfiguration answer(List<WifiCandidates.Candidate> candidateList) {
@@ -567,7 +517,6 @@
     WifiConfigManager mockWifiConfigManager() {
         WifiConfigManager wifiConfigManager = mock(WifiConfigManager.class);
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        config.getNetworkSelectionStatus().setHasEverConnected(true);
         List<WifiConfiguration> networkList = new ArrayList<>();
         networkList.add(config);
         when(wifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(null);
@@ -583,9 +532,7 @@
                 mWifiLastResortWatchdog, mOpenNetworkNotifier,
                 mWifiMetrics, mTestHandler, mClock,
                 mLocalLog, mWifiScoreCard, mWifiBlocklistMonitor, mWifiChannelUtilization,
-                mPasspointManager, mMultiInternetManager, mDeviceConfigFacade, mActiveModeWarden,
-                mFacade, mWifiGlobals, mExternalPnoScanRequestManager);
-        mLooper.dispatchAll();
+                mPasspointManager, mDeviceConfigFacade, mActiveModeWarden, mWifiGlobals);
         verify(mActiveModeWarden, atLeastOnce()).registerModeChangeCallback(
                 mModeChangeCallbackCaptor.capture());
         verify(mContext, atLeastOnce()).registerReceiver(
@@ -594,8 +541,6 @@
                 mNetworkUpdateListenerCaptor.capture());
         verify(mWifiNetworkSuggestionsManager, atLeastOnce()).addOnSuggestionUpdateListener(
                 mSuggestionUpdateListenerCaptor.capture());
-        verify(mMultiInternetManager, atLeastOnce()).setConnectionStatusListener(
-                mMultiInternetConnectionStatusListenerCaptor.capture());
         return wCm;
     }
 
@@ -688,7 +633,6 @@
 
         verify(mPrimaryClientModeManager).startConnectToNetwork(
                 CANDIDATE_NETWORK_ID, Process.WIFI_UID, "any");
-        verify(mPrimaryClientModeManager).enableRoaming(true);
         verify(mActiveModeWarden).stopAllClientModeManagersInRole(ROLE_CLIENT_SECONDARY_TRANSIENT);
         verify(mActiveModeWarden, never()).requestSecondaryTransientClientModeManager(
                 any(), any(), any(), any());
@@ -849,7 +793,6 @@
         verify(mbbCmm, never()).startConnectToNetwork(anyInt(), anyInt(), any());
         verify(mPrimaryClientModeManager).startConnectToNetwork(
                 eq(CANDIDATE_NETWORK_ID), anyInt(), any());
-        verify(mPrimaryClientModeManager).enableRoaming(true);
     }
 
     /**
@@ -869,7 +812,7 @@
         when(mActiveModeWarden.isStaStaConcurrencySupportedForRestrictedConnections())
                 .thenReturn(true);
         when(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                any(), eq(ROLE_CLIENT_SECONDARY_LONG_LIVED), eq(false))).thenReturn(true);
+                any(), eq(ROLE_CLIENT_SECONDARY_LONG_LIVED))).thenReturn(true);
         doAnswer(new AnswerWithArguments() {
             public void answer(ExternalClientModeManagerRequestListener listener,
                     WorkSource requestorWs, String ssid, String bssid) {
@@ -969,8 +912,6 @@
         // STA + STA is not supported.
         when(mActiveModeWarden.isStaStaConcurrencySupportedForRestrictedConnections())
                 .thenReturn(false);
-        when(mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet())
-                .thenReturn(false);
 
         // Set WiFi to disconnected state
         mWifiConnectivityManager.handleConnectionStateChanged(
@@ -1104,12 +1045,10 @@
 
         // Simulate connection failing on the secondary
         clearInvocations(mSecondaryClientModeManager, mPrimaryClientModeManager, mWifiNS);
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(CANDIDATE_SSID);
         mWifiConnectivityManager.handleConnectionAttemptEnded(
                 mSecondaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID,
-                config);
+                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION, CANDIDATE_BSSID,
+                CANDIDATE_SSID);
         // verify connection is never restarted when a connection on the secondary STA fails.
         verify(mWifiNS, never()).selectNetwork(any());
         verify(mSecondaryClientModeManager, never()).startConnectToNetwork(
@@ -1239,204 +1178,6 @@
     }
 
     /**
-     * Create scan data with different bands of 2G and 5G.
-     */
-    private ScanData createScanDataWithDifferentBands() {
-        // Create 4 scan results.
-        ScanData[] scanDatas =
-                ScanTestUtil.createScanDatas(new int[][]{{5150, 5175, 2412, 2400}}, new int[]{0});
-        // WCM barfs if the scan result does not have an IE.
-        return scanDatas[0];
-    }
-
-    /**
-     * Setup all the mocks for the positive case, individual negative test cases below override
-     * specific params.
-     */
-    private void setupMocksForMultiInternetTests() {
-        mScanData = createScanDataWithDifferentBands();
-        when(mWifiConnectivityHelper.isFirmwareRoamingSupported()).thenReturn(true);
-        when(mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet()).thenReturn(true);
-        when(mActiveModeWarden.getPrimaryClientModeManagerNullable())
-                .thenReturn(mPrimaryClientModeManager);
-        when(mCandidate1.isOemPaid()).thenReturn(false);
-        when(mCandidate1.isOemPrivate()).thenReturn(false);
-        ScanResultMatchInfo matchInfo = mock(ScanResultMatchInfo.class);
-        when(matchInfo.getDefaultSecurityParams()).thenReturn(
-                mCandidateWifiConfig1.getDefaultSecurityParams());
-        WifiCandidates.Key key = new WifiCandidates.Key(matchInfo,
-                MacAddress.fromString(CANDIDATE_BSSID), 0);
-        when(mCandidate1.getKey()).thenReturn(key);
-        when(mCandidate1.getScanRssi()).thenReturn(-40);
-        when(mCandidate1.getFrequency()).thenReturn(TEST_FREQUENCY);
-        when(mCandidate1.getKey()).thenReturn(key);
-
-        mCandidateWifiConfig1.oemPaid = false;
-        mCandidateWifiConfig1.oemPrivate = false;
-        mCandidateWifiConfig1.ephemeral = true;
-        mCandidateWifiConfig1.dbsSecondaryInternet = true;
-        when(mWifiNS.selectNetwork(argThat(
-                candidates -> (candidates != null)), eq(false))).thenReturn(mCandidateWifiConfig1);
-        when(mActiveModeWarden.isStaStaConcurrencySupportedForRestrictedConnections())
-                .thenReturn(true);
-        when(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                any(), eq(ROLE_CLIENT_SECONDARY_LONG_LIVED), eq(false))).thenReturn(true);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ExternalClientModeManagerRequestListener listener,
-                    WorkSource requestorWs, String ssid, String bssid) {
-                listener.onAnswer(mSecondaryClientModeManager);
-            }
-        }).when(mActiveModeWarden).requestSecondaryLongLivedClientModeManager(
-                any(), any(), any(), any());
-        when(mSecondaryClientModeManager.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_LONG_LIVED);
-    }
-
-    @Test
-    public void multiInternetSecondaryConnectionRequestSucceedsWithDbsApOnly() {
-        setupMocksForMultiInternetTests();
-        when(mMultiInternetManager.isStaConcurrencyForMultiInternetMultiApAllowed())
-                .thenReturn(false);
-
-        // Set screen to on
-        setScreenState(true);
-
-        when(mCandidate1.isSecondaryInternet()).thenReturn(true);
-        mCandidateWifiConfig1.ephemeral = true;
-        mCandidateWifiConfig1.dbsSecondaryInternet = true;
-
-        // Set up the scan candidates
-        MacAddress macAddress = MacAddress.fromString(CANDIDATE_BSSID);
-        ScanResult result1 = new ScanResult(WifiSsid.fromUtf8Text(CANDIDATE_SSID),
-                TEST_SSID, TEST_CONNECTED_BSSID, 1245, 0, "some caps", -78, 2450,
-                1025, 22, 33, 20, 0, 0, true);
-        ScanResultMatchInfo matchInfo1 = ScanResultMatchInfo.fromScanResult(result1);
-        WifiCandidates.Key key = new WifiCandidates.Key(matchInfo1, macAddress,
-                TEST_CONNECTED_NETWORK_ID,
-                WifiConfiguration.SECURITY_TYPE_OPEN);
-        WifiCandidates.Candidate otherCandidate = mock(WifiCandidates.Candidate.class);
-        when(otherCandidate.getKey()).thenReturn(key);
-        List<WifiCandidates.Candidate> candidateList = new ArrayList<>();
-        candidateList.add(mCandidate1);
-        candidateList.add(otherCandidate);
-        when(mWifiNS.getCandidatesFromScan(any(), any(), any(), anyBoolean(), anyBoolean(),
-                anyBoolean(), any(), anyBoolean())).thenReturn(candidateList);
-
-        // Set WiFi to disconnected state to trigger scan
-        mWifiConnectivityManager.handleConnectionStateChanged(
-                mPrimaryClientModeManager,
-                WifiConnectivityManager.WIFI_STATE_DISCONNECTED);
-        mLooper.dispatchAll();
-        // Verify a connection starting
-        verify(mWifiNS).selectNetwork((List<WifiCandidates.Candidate>)
-                argThat(new WifiCandidatesListSizeMatcher(2)));
-        verify(mPrimaryClientModeManager).startConnectToNetwork(anyInt(), anyInt(), any());
-
-        WifiInfo info1 = getWifiInfo();
-        info1.setNetworkId(TEST_CONNECTED_NETWORK_ID);
-        info1.setSSID(WifiSsid.fromUtf8Text(TEST_SSID));
-        info1.setBSSID(TEST_CONNECTED_BSSID);
-        info1.setFrequency(TEST_FREQUENCY_5G);
-        info1.setCurrentSecurityType(WifiConfiguration.SECURITY_TYPE_OPEN);
-        when(mPrimaryClientModeManager.isConnected()).thenReturn(true);
-        when(mPrimaryClientModeManager.isDisconnected()).thenReturn(false);
-        when(mPrimaryClientModeManager.syncRequestConnectionInfo()).thenReturn(info1);
-        when(mMultiInternetManager.hasPendingConnectionRequests()).thenReturn(true);
-        WorkSource testWorkSource = new WorkSource();
-        // Set the connection pending status
-        mMultiInternetConnectionStatusListenerCaptor.getValue().onStatusChange(
-                MultiInternetManager.MULTI_INTERNET_STATE_CONNECTION_REQUESTED,
-                testWorkSource);
-        mMultiInternetConnectionStatusListenerCaptor.getValue().onStartScan(testWorkSource);
-        verify(mSecondaryClientModeManager, times(2)).startConnectToNetwork(
-                CANDIDATE_NETWORK_ID, Process.WIFI_UID, CANDIDATE_BSSID);
-        verify(mSecondaryClientModeManager, times(2)).enableRoaming(false);
-        verify(mActiveModeWarden, times(2)).requestSecondaryLongLivedClientModeManager(
-                any(), any(), any(), any());
-
-        // Simulate connection failing on the secondary
-        clearInvocations(mSecondaryClientModeManager, mPrimaryClientModeManager, mWifiNS);
-        mWifiConnectivityManager.handleConnectionAttemptEnded(
-                mSecondaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID,
-                WifiConfigurationTestUtil.createPskNetwork(CANDIDATE_SSID));
-        // verify connection is never restarted when a connection on the secondary STA fails.
-        verify(mWifiNS, never()).selectNetwork(any());
-        verify(mSecondaryClientModeManager, never()).startConnectToNetwork(
-                anyInt(), anyInt(), any());
-        verify(mPrimaryClientModeManager, never()).startConnectToNetwork(
-                anyInt(), anyInt(), any());
-    }
-
-    @Test
-    public void multiInternetSecondaryConnectionRequestSucceedsWithMultiApAllowed() {
-        setupMocksForMultiInternetTests();
-        when(mMultiInternetManager.isStaConcurrencyForMultiInternetMultiApAllowed())
-                .thenReturn(true);
-
-        // Set screen to on
-        setScreenState(true);
-
-        when(mCandidate1.isSecondaryInternet()).thenReturn(true);
-        mCandidateWifiConfig1.ephemeral = true;
-        mCandidateWifiConfig1.dbsSecondaryInternet = true;
-
-        // Set up the scan candidates
-        MacAddress macAddress = MacAddress.fromString(CANDIDATE_BSSID);
-        WifiCandidates.Key key = new WifiCandidates.Key(mock(ScanResultMatchInfo.class),
-                macAddress, 0, WifiConfiguration.SECURITY_TYPE_OPEN);
-        WifiCandidates.Candidate otherCandidate = mock(WifiCandidates.Candidate.class);
-        when(otherCandidate.getKey()).thenReturn(key);
-        List<WifiCandidates.Candidate> candidateList = new ArrayList<>();
-        candidateList.add(mCandidate1);
-        candidateList.add(otherCandidate);
-        when(mWifiNS.getCandidatesFromScan(any(), any(), any(), anyBoolean(), anyBoolean(),
-                anyBoolean(), any(), anyBoolean())).thenReturn(candidateList);
-
-        // Set WiFi to disconnected state to trigger scan
-        mWifiConnectivityManager.handleConnectionStateChanged(
-                mPrimaryClientModeManager,
-                WifiConnectivityManager.WIFI_STATE_DISCONNECTED);
-        mLooper.dispatchAll();
-        // Verify a connection starting
-        verify(mWifiNS).selectNetwork((List<WifiCandidates.Candidate>)
-                argThat(new WifiCandidatesListSizeMatcher(2)));
-        verify(mPrimaryClientModeManager).startConnectToNetwork(anyInt(), anyInt(), any());
-
-        WifiInfo info1 = getWifiInfo();
-        info1.setFrequency(TEST_FREQUENCY_5G);
-        when(mPrimaryClientModeManager.isConnected()).thenReturn(true);
-        when(mPrimaryClientModeManager.isDisconnected()).thenReturn(false);
-        when(mPrimaryClientModeManager.syncRequestConnectionInfo()).thenReturn(info1);
-        when(mMultiInternetManager.hasPendingConnectionRequests()).thenReturn(true);
-        WorkSource testWorkSource = new WorkSource();
-        // Set the connection pending status
-        mMultiInternetConnectionStatusListenerCaptor.getValue().onStatusChange(
-                MultiInternetManager.MULTI_INTERNET_STATE_CONNECTION_REQUESTED,
-                testWorkSource);
-        mMultiInternetConnectionStatusListenerCaptor.getValue().onStartScan(testWorkSource);
-        verify(mSecondaryClientModeManager, times(2)).startConnectToNetwork(
-                CANDIDATE_NETWORK_ID, Process.WIFI_UID, CANDIDATE_BSSID);
-        verify(mSecondaryClientModeManager, times(2)).enableRoaming(false);
-        verify(mActiveModeWarden, times(2)).requestSecondaryLongLivedClientModeManager(
-                any(), any(), any(), any());
-
-        // Simulate connection failing on the secondary
-        clearInvocations(mSecondaryClientModeManager, mPrimaryClientModeManager, mWifiNS);
-        mWifiConnectivityManager.handleConnectionAttemptEnded(
-                mSecondaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID,
-                WifiConfigurationTestUtil.createPskNetwork(CANDIDATE_SSID));
-        // verify connection is never restarted when a connection on the secondary STA fails.
-        verify(mWifiNS, never()).selectNetwork(any());
-        verify(mSecondaryClientModeManager, never()).startConnectToNetwork(
-                anyInt(), anyInt(), any());
-        verify(mPrimaryClientModeManager, never()).startConnectToNetwork(
-                anyInt(), anyInt(), any());
-    }
-
-    /**
      *  Wifi enters disconnected state while screen is on.
      *
      * Expected behavior: WifiConnectivityManager calls
@@ -1857,26 +1598,6 @@
         verify(mWifiMetrics, never()).incrementNumConnectivityWatchdogPnoBad();
     }
 
-    @Test
-    public void testNetworkConnectionCancelWatchdogTimer() {
-        // Set screen to off
-        setScreenState(false);
-
-        // Set WiFi to disconnected state to trigger PNO scan
-        mWifiConnectivityManager.handleConnectionStateChanged(
-                mPrimaryClientModeManager,
-                WifiConnectivityManager.WIFI_STATE_DISCONNECTED);
-
-        // Verify the watchdog alarm has been set
-        assertTrue(mAlarmManager.isPending(WifiConnectivityManager.WATCHDOG_TIMER_TAG));
-
-        // Set WiFi to connected
-        setWifiStateConnected();
-
-        // Verify the watchdog alarm has been canceled
-        assertFalse(mAlarmManager.isPending(WifiConnectivityManager.WATCHDOG_TIMER_TAG));
-    }
-
     /**
      * Verify that 2 scans that are sufficiently far apart are required to initiate a connection
      * when the high mobility scanning optimization is enabled.
@@ -1983,7 +1704,7 @@
         candidateList.add(mCandidate1);
         candidateList.add(otherCandidate);
         when(mWifiNS.getCandidatesFromScan(any(), any(), any(), anyBoolean(), anyBoolean(),
-                anyBoolean(), any(), anyBoolean())).thenReturn(candidateList);
+                anyBoolean())).thenReturn(candidateList);
 
         // Set WiFi to disconnected state to trigger scan
         mWifiConnectivityManager.handleConnectionStateChanged(
@@ -1996,15 +1717,13 @@
         verify(mPrimaryClientModeManager).startConnectToNetwork(anyInt(), anyInt(), any());
 
         // Simulate the connection failing
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(CANDIDATE_SSID);
         mWifiConnectivityManager.handleConnectionAttemptEnded(
                 mPrimaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID,
-                config);
+                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION, CANDIDATE_BSSID,
+                CANDIDATE_SSID);
         // Verify the failed BSSID is added to blocklist
         verify(mWifiBlocklistMonitor).blockBssidForDurationMs(eq(CANDIDATE_BSSID),
-                eq(config), anyLong(), anyInt(), anyInt());
+                eq(CANDIDATE_SSID), anyLong(), anyInt(), anyInt());
         // Verify another connection starting
         verify(mWifiNS).selectNetwork((List<WifiCandidates.Candidate>)
                 argThat(new WifiCandidatesListSizeMatcher(1)));
@@ -2014,9 +1733,8 @@
         // Simulate the second connection also failing
         mWifiConnectivityManager.handleConnectionAttemptEnded(
                 mPrimaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID_2,
-                config);
+                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION, CANDIDATE_BSSID_2,
+                CANDIDATE_SSID);
         // Verify there are no more connections
         verify(mWifiNS).selectNetwork((List<WifiCandidates.Candidate>)
                 argThat(new WifiCandidatesListSizeMatcher(0)));
@@ -2024,47 +1742,6 @@
                 anyInt(), anyInt(), any());
     }
 
-    @Test
-    public void testRetryConnectionEapFailureIgnoreSameNetwork() {
-        // Setup WifiNetworkSelector to return 2 valid candidates with the same
-        // ScanResultMatchInfo so they are the same network, but different BSSID.
-        ScanResultMatchInfo matchInfo = ScanResultMatchInfo.fromWifiConfiguration(
-                mCandidateWifiConfig1);
-        WifiCandidates.Key key = new WifiCandidates.Key(matchInfo,
-                MacAddress.fromString(CANDIDATE_BSSID), 0);
-        WifiCandidates.Key key2 = new WifiCandidates.Key(matchInfo,
-                MacAddress.fromString(CANDIDATE_BSSID_2), 0);
-        WifiCandidates.Candidate candidate1 = mock(WifiCandidates.Candidate.class);
-        when(candidate1.getKey()).thenReturn(key);
-        WifiCandidates.Candidate candidate2 = mock(WifiCandidates.Candidate.class);
-        when(candidate2.getKey()).thenReturn(key2);
-        List<WifiCandidates.Candidate> candidateList = new ArrayList<>();
-        candidateList.add(candidate1);
-        candidateList.add(candidate2);
-        when(mWifiNS.getCandidatesFromScan(any(), any(), any(), anyBoolean(), anyBoolean(),
-                anyBoolean(), any(), anyBoolean())).thenReturn(candidateList);
-
-        // Set WiFi to disconnected state to trigger scan
-        mWifiConnectivityManager.handleConnectionStateChanged(
-                mPrimaryClientModeManager,
-                WifiConnectivityManager.WIFI_STATE_DISCONNECTED);
-        mLooper.dispatchAll();
-        // Verify a connection starting
-        verify(mWifiNS).selectNetwork((List<WifiCandidates.Candidate>)
-                argThat(new WifiCandidatesListSizeMatcher(2)));
-        verify(mPrimaryClientModeManager).startConnectToNetwork(anyInt(), anyInt(), any());
-
-        // Simulate the connection failing
-        mWifiConnectivityManager.handleConnectionAttemptEnded(
-                mPrimaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_AUTHENTICATION_FAILURE,
-                WifiMetricsProto.ConnectionEvent.AUTH_FAILURE_EAP_FAILURE, CANDIDATE_BSSID,
-                mCandidateWifiConfig1);
-        mLooper.dispatchAll();
-        // verify no there is no retry.
-        verify(mPrimaryClientModeManager).startConnectToNetwork(anyInt(), anyInt(), any());
-    }
-
     private class WifiCandidatesListSizeMatcher implements
             ArgumentMatcher<List<WifiCandidates.Candidate>> {
         int mSize;
@@ -2093,7 +1770,7 @@
         candidateList.add(mCandidate1);
         candidateList.add(otherCandidate);
         when(mWifiNS.getCandidatesFromScan(any(), any(), any(), anyBoolean(), anyBoolean(),
-                anyBoolean(), any(), anyBoolean())).thenReturn(candidateList);
+                anyBoolean())).thenReturn(candidateList);
 
         // Set WiFi to disconnected state to trigger scan
         mWifiConnectivityManager.handleConnectionStateChanged(
@@ -2107,12 +1784,10 @@
 
         // Simulate the connection failing after the cache timeout period.
         when(mClock.getElapsedSinceBootMillis()).thenReturn(TEMP_BSSID_BLOCK_DURATION_MS + 1L);
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(CANDIDATE_SSID);
         mWifiConnectivityManager.handleConnectionAttemptEnded(
                 mPrimaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID,
-                config);
+                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION, CANDIDATE_BSSID,
+                CANDIDATE_SSID);
         // verify there are no additional connections.
         verify(mPrimaryClientModeManager).startConnectToNetwork(anyInt(), anyInt(), any());
     }
@@ -2133,7 +1808,7 @@
         candidateList.add(mCandidate1);
         candidateList.add(otherCandidate);
         when(mWifiNS.getCandidatesFromScan(any(), any(), any(), anyBoolean(), anyBoolean(),
-                anyBoolean(), any(), anyBoolean())).thenReturn(candidateList);
+                anyBoolean())).thenReturn(candidateList);
 
         // Set WiFi to disconnected state to trigger scan
         mWifiConnectivityManager.handleConnectionStateChanged(
@@ -2149,12 +1824,10 @@
         mWifiConnectivityManager.clearCachedCandidates();
 
         // Simulate the connection failing
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(CANDIDATE_SSID);
         mWifiConnectivityManager.handleConnectionAttemptEnded(
                 mPrimaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID,
-                config);
+                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION, CANDIDATE_BSSID,
+                CANDIDATE_SSID);
 
         // Verify there no re-attempt to connect
         verify(mPrimaryClientModeManager).startConnectToNetwork(anyInt(), anyInt(), any());
@@ -2176,7 +1849,7 @@
         candidateList.add(mCandidate1);
         candidateList.add(otherCandidate);
         when(mWifiNS.getCandidatesFromScan(any(), any(), any(), anyBoolean(), anyBoolean(),
-                anyBoolean(), any(), anyBoolean())).thenReturn(candidateList);
+                anyBoolean())).thenReturn(candidateList);
 
         // Set WiFi to disconnected state to trigger scan
         mWifiConnectivityManager.handleConnectionStateChanged(
@@ -2198,12 +1871,10 @@
                 .thenReturn(candidateOtherConfig);
 
         // Simulate the connection failing
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(CANDIDATE_SSID);
         mWifiConnectivityManager.handleConnectionAttemptEnded(
                 mPrimaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID,
-                config);
+                WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_REJECTION, CANDIDATE_BSSID,
+                CANDIDATE_SSID);
 
         // Verify no more connections since there are 0 valid candidates remaining.
         verify(mWifiNS).selectNetwork((List<WifiCandidates.Candidate>)
@@ -2267,9 +1938,9 @@
         List<ScanDetail> expectedOpenNetworks = new ArrayList<>();
         expectedOpenNetworks.add(
                 new ScanDetail(
-                        new ScanResult(WifiSsid.fromUtf8Text(CANDIDATE_SSID),
+                        new ScanResult(WifiSsid.createFromAsciiEncoded(CANDIDATE_SSID),
                                 CANDIDATE_SSID, CANDIDATE_BSSID, 1245, 0, "some caps", -78, 2450,
-                                1025, 22, 33, 20, 0, 0, true)));
+                                1025, 22, 33, 20, 0, 0, true), null));
 
         when(mWifiNS.getFilteredScanDetailsForOpenUnsavedNetworks())
                 .thenReturn(expectedOpenNetworks);
@@ -2291,14 +1962,14 @@
     public void wifiDisconnected_noCandidatesInScan_openNetworkNotifierScanResultsHandled() {
         // no connection candidates from scan.
         when(mWifiNS.getCandidatesFromScan(any(), any(), any(), anyBoolean(), anyBoolean(),
-                anyBoolean(), any(), anyBoolean())).thenReturn(null);
+                anyBoolean())).thenReturn(null);
 
         List<ScanDetail> expectedOpenNetworks = new ArrayList<>();
         expectedOpenNetworks.add(
                 new ScanDetail(
-                        new ScanResult(WifiSsid.fromUtf8Text(CANDIDATE_SSID),
+                        new ScanResult(WifiSsid.createFromAsciiEncoded(CANDIDATE_SSID),
                                 CANDIDATE_SSID, CANDIDATE_BSSID, 1245, 0, "some caps", -78, 2450,
-                                1025, 22, 33, 20, 0, 0, true)));
+                                1025, 22, 33, 20, 0, 0, true), null));
 
         when(mWifiNS.getFilteredScanDetailsForOpenUnsavedNetworks())
                 .thenReturn(expectedOpenNetworks);
@@ -2319,12 +1990,10 @@
     @Test
     public void wifiConnected_openNetworkNotifierHandlesConnection() {
         // Set WiFi to connected state
-        mWifiInfo.setSSID(WifiSsid.fromUtf8Text(CANDIDATE_SSID));
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(CANDIDATE_SSID);
+        mWifiInfo.setSSID(WifiSsid.createFromAsciiEncoded(CANDIDATE_SSID));
         mWifiConnectivityManager.handleConnectionAttemptEnded(
                 mPrimaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_NONE,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID, config);
+                WifiMetrics.ConnectionEvent.FAILURE_NONE, CANDIDATE_BSSID, CANDIDATE_SSID);
         verify(mOpenNetworkNotifier).handleWifiConnected(CANDIDATE_SSID);
     }
 
@@ -2353,12 +2022,10 @@
      */
     @Test
     public void wifiConnectionEndsWithFailure_openNetworkNotifierHandlesConnectionFailure() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(CANDIDATE_SSID);
         mWifiConnectivityManager.handleConnectionAttemptEnded(
                 mPrimaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_CONNECT_NETWORK_FAILED,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID,
-                config);
+                WifiMetrics.ConnectionEvent.FAILURE_CONNECT_NETWORK_FAILED, CANDIDATE_BSSID,
+                CANDIDATE_SSID);
 
         verify(mOpenNetworkNotifier).handleConnectionFailure();
     }
@@ -2372,11 +2039,9 @@
      */
     @Test
     public void wifiConnectionEndsWithSuccess_openNetworkNotifierDoesNotHandleConnectionFailure() {
-        WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(CANDIDATE_SSID);
         mWifiConnectivityManager.handleConnectionAttemptEnded(
                 mPrimaryClientModeManager,
-                WifiMetrics.ConnectionEvent.FAILURE_NONE,
-                WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN, CANDIDATE_BSSID, config);
+                WifiMetrics.ConnectionEvent.FAILURE_NONE, CANDIDATE_BSSID, CANDIDATE_SSID);
 
         verify(mOpenNetworkNotifier, never()).handleConnectionFailure();
     }
@@ -2437,8 +2102,7 @@
                     setScreenState(true);
                 }, currentTimeStamp);
         verifyScanTimesAndIntervals(1 /* scanTimes */, intervals,
-                VALID_DISCONNECTED_SINGLE_SCAN_SCHEDULE_SEC,
-                VALID_DISCONNECTED_SINGLE_SCAN_TYPE);
+                VALID_DISCONNECTED_SINGLE_SCAN_SCHEDULE_SEC);
 
         // Verify the initial scan state is awaiting for response
         assertEquals(WifiConnectivityManager.INITIAL_SCAN_STATE_AWAITING_RESPONSE,
@@ -2454,7 +2118,6 @@
     public void checkPeriodicScanIntervalWhenDisconnectedWithEmptySchedule() throws Exception {
         mResources.setIntArray(R.array.config_wifiDisconnectedScanIntervalScheduleSec,
                 SCHEDULE_EMPTY_SEC);
-        mResources.setIntArray(R.array.config_wifiDisconnectedScanType, SCHEDULE_EMPTY_SEC);
 
         checkWorkingWithDefaultSchedule();
     }
@@ -2468,8 +2131,6 @@
         mResources.setIntArray(
                 R.array.config_wifiDisconnectedScanIntervalScheduleSec,
                 INVALID_SCHEDULE_ZERO_VALUES_SEC);
-        mResources.setIntArray(R.array.config_wifiDisconnectedScanType,
-                INVALID_SCHEDULE_NEGATIVE_VALUES_SEC);
 
         checkWorkingWithDefaultSchedule();
     }
@@ -2483,8 +2144,6 @@
         mResources.setIntArray(
                 R.array.config_wifiDisconnectedScanIntervalScheduleSec,
                 INVALID_SCHEDULE_NEGATIVE_VALUES_SEC);
-        mResources.setIntArray(R.array.config_wifiDisconnectedScanType,
-                INVALID_SCHEDULE_NEGATIVE_VALUES_SEC);
 
         checkWorkingWithDefaultSchedule();
     }
@@ -2497,8 +2156,6 @@
         mResources.setIntArray(
                 R.array.config_wifiDisconnectedScanIntervalScheduleSec,
                 INVALID_SCHEDULE_ZERO_VALUES_SEC);
-        mResources.setIntArray(R.array.config_wifiDisconnectedScanType, SCHEDULE_EMPTY_SEC);
-
         when(mDeviceConfigFacade.isWifiBatterySaverEnabled()).thenReturn(true);
         when(mPowerManagerService.isPowerSaveMode()).thenReturn(true);
         checkWorkingWithDefaultScheduleWithMultiplier(POWER_SAVE_SCAN_INTERVAL_MULTIPLIER);
@@ -2518,36 +2175,16 @@
     }
 
     private void verifyScanTimesAndIntervals(int scanTimes, List<Long> intervals,
-            int[] intervalSchedule, int[] scheduleScanType) {
+            int[] intervalSchedule) {
         // Verify the scans actually happened for expected times, one scan for state change and
         // each for scan timer triggered.
         verify(mWifiScanner, times(scanTimes)).startScan(anyObject(), anyObject(), anyObject(),
                 anyObject());
 
-        // Verify scans are happening using the expected scan type.
-        Map<Integer, Integer> scanTypeToTimesMap = new HashMap<>();
-        for (int i = 0; i < scanTimes; i++) {
-            int expected = getByIndexOrLast(scheduleScanType, i);
-            scanTypeToTimesMap.put(expected, 1 + scanTypeToTimesMap.getOrDefault(expected, 0));
-        }
-        for (Map.Entry<Integer, Integer> entry : scanTypeToTimesMap.entrySet()) {
-            verify(mWifiScanner, times(entry.getValue())).startScan(
-                    argThat(new ArgumentMatcher<ScanSettings>() {
-                        @Override
-                        public boolean matches(ScanSettings scanSettings) {
-                            return scanSettings.type == entry.getKey();
-                        }
-                    }), any(), any(), any());
-        }
-
         // Verify the scan intervals are same as expected interval schedule.
         for (int i = 0; i < intervals.size(); i++) {
             long expected = (long) (getByIndexOrLast(intervalSchedule, i) * 1000);
-            // TestHandler#sendMessageAtTime is not perfectly mocked and uses
-            // SystemClock.uptimeMillis() to generate |intervals|. This sometimes results in error
-            // margins of ~1ms and cause flaky test failures.
-            assertTrue("Interval " + i + " not in 1ms error margin",
-                    Math.abs(expected - intervals.get(i).longValue()) < 2);
+            assertEquals("Interval " + i, expected, intervals.get(i).longValue());
         }
     }
 
@@ -2612,7 +2249,7 @@
 
         verifyScanTimesAndIntervals(SCAN_TRIGGER_TIMES + 1, intervals,
                 Arrays.stream(DEFAULT_SINGLE_SCAN_SCHEDULE_SEC).map(i -> (int) (i * multiplier))
-                .toArray(), DEFAULT_SINGLE_SCAN_TYPE);
+                .toArray());
     }
 
     /**
@@ -2643,63 +2280,7 @@
                 }, currentTimeStamp);
 
         verifyScanTimesAndIntervals(SCAN_TRIGGER_TIMES + 1, intervals,
-                VALID_DISCONNECTED_SINGLE_SCAN_SCHEDULE_SEC, VALID_DISCONNECTED_SINGLE_SCAN_TYPE);
-    }
-
-    @Test
-    public void checkSetExternalPeriodicScanInterval() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        long currentTimeStamp = CURRENT_SYSTEM_TIME_MS;
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp);
-
-        mWifiConnectivityManager.setExternalScreenOnScanSchedule(
-                VALID_EXTERNAL_SINGLE_SCAN_SCHEDULE_SEC, VALID_EXTERNAL_SINGLE_SCAN_TYPE);
-        // Set screen to ON
-        setScreenState(true);
-
-        // Wait for max periodic scan interval so that any impact triggered
-        // by screen state change can settle
-        currentTimeStamp += MAX_SCAN_INTERVAL_IN_SCHEDULE_SEC * 1000;
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp);
-
-        List<Long> intervals = triggerPeriodicScansAndGetIntervals(SCAN_TRIGGER_TIMES,
-                () -> {
-                    mWifiConnectivityManager.handleConnectionStateChanged(
-                            mPrimaryClientModeManager,
-                            WifiConnectivityManager.WIFI_STATE_DISCONNECTED);
-                }, currentTimeStamp);
-
-        verifyScanTimesAndIntervals(SCAN_TRIGGER_TIMES + 1, intervals,
-                VALID_EXTERNAL_SINGLE_SCAN_SCHEDULE_SEC, VALID_EXTERNAL_SINGLE_SCAN_TYPE);
-    }
-
-    @Test
-    public void testSetOneShotScreenOnConnectivityScanDelayMillis() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        int scanDelayMs = 12345;
-        mWifiConnectivityManager.setOneShotScreenOnConnectivityScanDelayMillis(scanDelayMs);
-
-        // Toggle screen to ON
-        assertEquals(0, mTestHandler.getIntervals().size());
-        setScreenState(false);
-        setScreenState(true);
-        assertEquals(1, mTestHandler.getIntervals().size());
-        assertTrue("Delay is not in 1ms error margin",
-                Math.abs(scanDelayMs - mTestHandler.getIntervals().get(0).longValue()) < 2);
-
-        // Toggle again and there should be no more delayed scan
-        setScreenState(false);
-        setScreenState(true);
-        assertEquals(1, mTestHandler.getIntervals().size());
-
-        // set the scan delay and verify again
-        scanDelayMs = 23455;
-        mWifiConnectivityManager.setOneShotScreenOnConnectivityScanDelayMillis(scanDelayMs);
-        setScreenState(false);
-        setScreenState(true);
-        assertEquals(2, mTestHandler.getIntervals().size());
-        assertTrue("Delay is not in 1ms error margin",
-                Math.abs(scanDelayMs - mTestHandler.getIntervals().get(1).longValue()) < 2);
+                VALID_DISCONNECTED_SINGLE_SCAN_SCHEDULE_SEC);
     }
 
     /**
@@ -2714,15 +2295,6 @@
         long currentTimeStamp = CURRENT_SYSTEM_TIME_MS;
         when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp);
 
-        if (SdkLevel.isAtLeastT()) {
-            // verify that setting the external scan schedule and then setting to null again should
-            // result in no-op, and not affect the scan schedule at all.
-            mWifiConnectivityManager.setExternalScreenOnScanSchedule(
-                    VALID_EXTERNAL_SINGLE_SCAN_SCHEDULE_SEC, VALID_EXTERNAL_SINGLE_SCAN_TYPE);
-            mWifiConnectivityManager.setExternalScreenOnScanSchedule(
-                    null, null);
-        }
-
         // Set screen to ON
         setScreenState(true);
 
@@ -2735,42 +2307,7 @@
                     setWifiStateConnected();
                 }, currentTimeStamp);
         verifyScanTimesAndIntervals(SCAN_TRIGGER_TIMES + 1, intervals,
-                VALID_CONNECTED_SINGLE_SCAN_SCHEDULE_SEC, VALID_CONNECTED_SINGLE_SCAN_TYPE);
-    }
-
-    /**
-     *  Verify that scan interval for screen on and wifi is connected to the only network known to
-     *  the device.
-     */
-    @Test
-    public void checkPeriodicScanIntervalWhenConnectedAndOnlySingleNetwork() {
-        long currentTimeStamp = CURRENT_SYSTEM_TIME_MS;
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(currentTimeStamp);
-        mResources.setIntArray(
-                R.array.config_wifiSingleSavedNetworkConnectedScanIntervalScheduleSec,
-                VALID_CONNECTED_SINGLE_SAVED_NETWORK_SCHEDULE_SEC);
-        mResources.setIntArray(
-                R.array.config_wifiSingleSavedNetworkConnectedScanType,
-                VALID_CONNECTED_SINGLE_SAVED_NETWORK_TYPE);
-        WifiConfiguration wifiConfiguration = new WifiConfiguration();
-        wifiConfiguration.networkId = TEST_CONNECTED_NETWORK_ID;
-        List<WifiConfiguration> wifiConfigurationList = new ArrayList<WifiConfiguration>();
-        wifiConfigurationList.add(wifiConfiguration);
-        when(mWifiConfigManager.getSavedNetworks(anyInt())).thenReturn(wifiConfigurationList);
-
-        // Set screen to ON
-        setScreenState(true);
-        // Wait for max scanning interval so that any impact triggered
-        // by screen state change can settle
-        currentTimeStamp += MAX_SCAN_INTERVAL_IN_SCHEDULE_SEC * 1000;
-        List<Long> intervals = triggerPeriodicScansAndGetIntervals(SCAN_TRIGGER_TIMES,
-                () -> {
-                    // Set WiFi to connected state to trigger periodic scan
-                    setWifiStateConnected();
-                }, currentTimeStamp);
-        verifyScanTimesAndIntervals(SCAN_TRIGGER_TIMES + 1, intervals,
-                VALID_CONNECTED_SINGLE_SAVED_NETWORK_SCHEDULE_SEC,
-                VALID_CONNECTED_SINGLE_SAVED_NETWORK_TYPE);
+                VALID_CONNECTED_SINGLE_SCAN_SCHEDULE_SEC);
     }
 
     /**
@@ -3633,7 +3170,7 @@
         int i = 0;
         for (ScanResult scanResult : mScanData.getResults()) {
             scanResult.SSID = TEST_SSID + i;
-            updateNetworks.add(ScanResultUtil.createQuotedSsid(scanResult.SSID));
+            updateNetworks.add(ScanResultUtil.createQuotedSSID(scanResult.SSID));
             i++;
         }
         updateNetworks.add(TEST_FQDN);
@@ -3666,24 +3203,15 @@
      */
     @Test
     public void verifyBlocklistRefreshedAfterScanResults() {
-        WifiConfiguration disabledConfig = WifiConfigurationTestUtil.createPskNetwork();
-        List<ScanDetail> mockScanDetails = new ArrayList<>();
-        mockScanDetails.add(mock(ScanDetail.class));
-        when(mWifiBlocklistMonitor.tryEnablingBlockedBssids(any())).thenReturn(mockScanDetails);
-        when(mWifiConfigManager.getSavedNetworkForScanDetail(any())).thenReturn(
-                disabledConfig);
-
         when(mWifiConnectivityHelper.isFirmwareRoamingSupported()).thenReturn(true);
 
-        InOrder inOrder = inOrder(mWifiBlocklistMonitor, mWifiConfigManager);
+        InOrder inOrder = inOrder(mWifiBlocklistMonitor);
         // Force a connectivity scan
         inOrder.verify(mWifiBlocklistMonitor, never())
                 .updateAndGetBssidBlocklistForSsids(anySet());
         mWifiConnectivityManager.forceConnectivityScan(WIFI_WORK_SOURCE);
 
         inOrder.verify(mWifiBlocklistMonitor).tryEnablingBlockedBssids(any());
-        inOrder.verify(mWifiConfigManager).updateNetworkSelectionStatus(disabledConfig.networkId,
-                WifiConfiguration.NetworkSelectionStatus.DISABLED_NONE);
         inOrder.verify(mWifiBlocklistMonitor).updateAndGetBssidBlocklistForSsids(anySet());
     }
 
@@ -3832,7 +3360,6 @@
 
         verify(mPrimaryClientModeManager).startConnectToNetwork(
                 CANDIDATE_NETWORK_ID, Process.WIFI_UID, CANDIDATE_BSSID);
-        verify(mPrimaryClientModeManager).enableRoaming(false);
 
         verify(mWifiMetrics).noteFirstNetworkSelectionAfterBoot(true);
     }
@@ -4076,7 +3603,7 @@
      * on a DBS supported device.
      *
      * Expected behavior: WifiConnectivityManager invokes
-     * {@link WifiNetworkSelector#getCandidatesFromScan(List, Set, List, boolean, boolean, Set, boolean)}
+     * {@link WifiNetworkSelector#getCandidatesFromScan(List, Set, List, boolean, boolean, boolean)}
      * boolean, boolean, boolean)} after filtering out the scan results obtained via DBS scan.
      */
     @Test
@@ -4096,13 +3623,12 @@
                     List<ScanDetail> scanDetails, Set<String> bssidBlocklist,
                     List<WifiNetworkSelector.ClientModeManagerState> cmmStates,
                     boolean untrustedNetworkAllowed,
-                    boolean oemPaidNetworkAllowed, boolean oemPrivateNetworkAllowed,
-                    Set<Integer> restrictedNetworkAllowedUids, boolean multiInternetNetworkAllowed)
+                    boolean oemPaidNetworkAllowed, boolean oemPrivateNetworkAllowed)
                     throws Exception {
                 capturedScanDetails.addAll(scanDetails);
                 return null;
             }}).when(mWifiNS).getCandidatesFromScan(
-                    any(), any(), any(), anyBoolean(), eq(true), eq(false), any(), eq(false));
+                    any(), any(), any(), anyBoolean(), eq(true), eq(false));
 
         mWifiConnectivityManager.setTrustedConnectionAllowed(true);
         mWifiConnectivityManager.setOemPaidConnectionAllowed(true, new WorkSource());
@@ -4156,13 +3682,12 @@
                     List<ScanDetail> scanDetails, Set<String> bssidBlocklist,
                     List<WifiNetworkSelector.ClientModeManagerState> cmmStates,
                     boolean untrustedNetworkAllowed,
-                    boolean oemPaidNetworkAllowed, boolean oemPrivateNetworkAllowed,
-                    Set<Integer> restrictedNetworkAllowedUids, boolean multiInternetNetworkAllowed)
+                    boolean oemPaidNetworkAllowed, boolean oemPrivateNetworkAllowed)
                     throws Exception {
                 capturedScanDetails.addAll(scanDetails);
                 return null;
             }}).when(mWifiNS).getCandidatesFromScan(
-                any(), any(), any(), anyBoolean(), eq(false), eq(true), any(), eq(false));
+                any(), any(), any(), anyBoolean(), eq(false), eq(true));
 
         mWifiConnectivityManager.setTrustedConnectionAllowed(true);
         mWifiConnectivityManager.setOemPrivateConnectionAllowed(true, new WorkSource());
@@ -4539,120 +4064,6 @@
         verify(mWifiScanner, times(1)).startScan(any(), any(), any(), any());
     }
 
-    @Test
-    public void testSetAndClearExternalPnoScanRequest() {
-        int testUid = 123;
-        String testPackage = "TestPackage";
-        IBinder binder = mock(IBinder.class);
-        IPnoScanResultsCallback callback = mock(IPnoScanResultsCallback.class);
-        List<WifiSsid> requestedSsids = Arrays.asList(
-                WifiSsid.fromString("\"TEST_SSID_1\""),
-                WifiSsid.fromString("\"TEST_SSID_2\""));
-        int[] frequencies = new int[] {TEST_FREQUENCY};
-        mWifiConnectivityManager.setExternalPnoScanRequest(testUid, testPackage, binder, callback,
-                requestedSsids, frequencies);
-        verify(mExternalPnoScanRequestManager).setRequest(testUid, testPackage, binder, callback,
-                requestedSsids, frequencies);
-        mWifiConnectivityManager.clearExternalPnoScanRequest(testUid);
-        verify(mExternalPnoScanRequestManager).removeRequest(testUid);
-    }
-
-    /**
-     * When location is disabled external PNO SSIDs should not get scanned.
-     */
-    @Test
-    public void testExternalPnoScanRequest_gatedBylocationMode() {
-        when(mWifiScoreCard.lookupNetwork(any())).thenReturn(mock(WifiScoreCard.PerNetwork.class));
-        mResources.setBoolean(R.bool.config_wifiPnoFrequencyCullingEnabled, true);
-        mWifiConnectivityManager.setLocationModeEnabled(false);
-        // mock saved networks list to be empty
-        when(mWifiConfigManager.getSavedNetworks(anyInt())).thenReturn(Collections.EMPTY_LIST);
-
-
-        // Mock a couple external requested PNO SSIDs
-        Set<String> requestedSsids = new ArraySet<>();
-        requestedSsids.add("\"Test_SSID_1\"");
-        requestedSsids.add("\"Test_SSID_2\"");
-        when(mExternalPnoScanRequestManager.getExternalPnoScanSsids()).thenReturn(requestedSsids);
-        Set<Integer> frequencies = new ArraySet<>();
-        frequencies.add(TEST_FREQUENCY);
-        when(mExternalPnoScanRequestManager.getExternalPnoScanFrequencies())
-                .thenReturn(frequencies);
-
-        assertEquals(Collections.EMPTY_LIST, mWifiConnectivityManager.retrievePnoNetworkList());
-
-        // turn location mode on and now PNO scan should include the requested SSIDs
-        mWifiConnectivityManager.setLocationModeEnabled(true);
-        List<WifiScanner.PnoSettings.PnoNetwork> pnoNetworks =
-                mWifiConnectivityManager.retrievePnoNetworkList();
-        assertEquals(2, pnoNetworks.size());
-        assertEquals("\"Test_SSID_1\"", pnoNetworks.get(0).ssid);
-        assertEquals("\"Test_SSID_2\"", pnoNetworks.get(1).ssid);
-        assertArrayEquals(new int[] {TEST_FREQUENCY}, pnoNetworks.get(0).frequencies);
-        assertArrayEquals(new int[] {TEST_FREQUENCY}, pnoNetworks.get(1).frequencies);
-    }
-
-    /**
-     * Test external requested PNO SSIDs get handled properly when there are existing saved networks
-     * with same SSID.
-     */
-    @Test
-    public void testExternalPnoScanRequest_withSavedNetworks() {
-        mWifiConnectivityManager.setLocationModeEnabled(true);
-        // Create and add 3 networks.
-        WifiConfiguration network1 = WifiConfigurationTestUtil.createPasspointNetwork();
-        network1.ephemeral = true;
-        network1.getNetworkSelectionStatus().setHasEverConnected(false);
-        WifiConfiguration network2 = WifiConfigurationTestUtil.createPskNetwork();
-        network2.getNetworkSelectionStatus().setHasEverConnected(true);
-        WifiConfiguration network3 = WifiConfigurationTestUtil.createPskNetwork();
-        List<WifiConfiguration> networkList = new ArrayList<>();
-        networkList.add(network1);
-        networkList.add(network2);
-        networkList.add(network3);
-        mLruConnectionTracker.addNetwork(network3);
-        mLruConnectionTracker.addNetwork(network2);
-        mLruConnectionTracker.addNetwork(network1);
-        when(mWifiConfigManager.getSavedNetworks(anyInt())).thenReturn(networkList);
-
-        // Mock a couple external requested PNO SSIDs. network3.SSID is in both saved networks
-        // and external requested networks.
-        Set<String> requestedSsids = new ArraySet<>();
-        requestedSsids.add("\"Test_SSID_1\"");
-        requestedSsids.add(network2.SSID);
-        when(mExternalPnoScanRequestManager.getExternalPnoScanSsids()).thenReturn(requestedSsids);
-
-        List<WifiScanner.PnoSettings.PnoNetwork> pnoNetworks =
-                mWifiConnectivityManager.retrievePnoNetworkList();
-        // There should be 3 SSIDs in total: network1, network2, and Test_SSID_1.
-        // network1 should be included in PNO even if it's never connected because it's ephemeral.
-        // network3 should not get included because it's saved and never connected before.
-        assertEquals(3, pnoNetworks.size());
-        // Verify the order. Test_SSID_1 and network2 should be in the front because they are
-        // requested by an external app. Verify network2.SSID only appears once.
-        assertEquals("\"Test_SSID_1\"", pnoNetworks.get(0).ssid);
-        assertEquals(network2.SSID, pnoNetworks.get(1).ssid);
-        assertEquals(network1.SSID, pnoNetworks.get(2).ssid);
-    }
-
-    @Test
-    public void testExternalPnoScanRequest_reportResults() {
-        setWifiEnabled(true);
-        mWifiConnectivityManager.setLocationModeEnabled(true);
-
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(0L);
-        // starts a PNO scan
-        mWifiConnectivityManager.handleConnectionStateChanged(
-                mPrimaryClientModeManager,
-                WifiConnectivityManager.WIFI_STATE_DISCONNECTED);
-        mWifiConnectivityManager.setTrustedConnectionAllowed(true);
-
-        InOrder inOrder = inOrder(mWifiScanner, mExternalPnoScanRequestManager);
-
-        inOrder.verify(mWifiScanner).startDisconnectedPnoScan(any(), any(), any(), any());
-        inOrder.verify(mExternalPnoScanRequestManager).onPnoNetworkFound(any());
-    }
-
     /**
      * Verify no network is network selection disabled, auto-join disabled using.
      * {@link WifiConnectivityManager#retrievePnoNetworkList()}.
@@ -4663,10 +4074,6 @@
         WifiConfiguration network1 = WifiConfigurationTestUtil.createEapNetwork();
         WifiConfiguration network2 = WifiConfigurationTestUtil.createPskNetwork();
         WifiConfiguration network3 = WifiConfigurationTestUtil.createOpenHiddenNetwork();
-        network1.getNetworkSelectionStatus().setHasEverConnected(true);
-        network2.getNetworkSelectionStatus().setHasEverConnected(true);
-        network3.getNetworkSelectionStatus().setHasEverConnected(true);
-
         List<WifiConfiguration> networkList = new ArrayList<>();
         networkList.add(network1);
         networkList.add(network2);
@@ -4717,8 +4124,6 @@
         // Create 2 networks.
         WifiConfiguration network1 = WifiConfigurationTestUtil.createEapNetwork();
         WifiConfiguration network2 = WifiConfigurationTestUtil.createPskNetwork();
-        network1.getNetworkSelectionStatus().setHasEverConnected(true);
-        network2.getNetworkSelectionStatus().setHasEverConnected(true);
         List<WifiConfiguration> networkList = new ArrayList<>();
         networkList.add(network1);
         networkList.add(network2);
@@ -4773,21 +4178,13 @@
      */
     @Test
     public void testRetrievePnoListOrder() {
-        //Create 4 networks.
+        //Create 3 networks.
         WifiConfiguration network1 = WifiConfigurationTestUtil.createEapNetwork();
         WifiConfiguration network2 = WifiConfigurationTestUtil.createPskNetwork();
         WifiConfiguration network3 = WifiConfigurationTestUtil.createOpenHiddenNetwork();
-        WifiConfiguration network4 = WifiConfigurationTestUtil.createPskNetwork();
-
-        // mark all networks except network4 as connected before
-        network1.getNetworkSelectionStatus().setHasEverConnected(true);
-        network2.getNetworkSelectionStatus().setHasEverConnected(true);
-        network3.getNetworkSelectionStatus().setHasEverConnected(true);
-
         mLruConnectionTracker.addNetwork(network1);
         mLruConnectionTracker.addNetwork(network2);
         mLruConnectionTracker.addNetwork(network3);
-        mLruConnectionTracker.addNetwork(network4);
         List<WifiConfiguration> networkList = new ArrayList<>();
         networkList.add(network1);
         networkList.add(network2);
@@ -4795,9 +4192,6 @@
         when(mWifiConfigManager.getSavedNetworks(anyInt())).thenReturn(networkList);
         List<WifiScanner.PnoSettings.PnoNetwork> pnoNetworks =
                 mWifiConnectivityManager.retrievePnoNetworkList();
-
-        // Verify correct order of networks. Note that network4 should not appear for PNO scan
-        // since it had not been connected before.
         assertEquals(3, pnoNetworks.size());
         assertEquals(network3.SSID, pnoNetworks.get(0).ssid);
         assertEquals(network2.SSID, pnoNetworks.get(1).ssid);
@@ -4826,8 +4220,6 @@
     public void testFetchChannelSetForPartialScanMaxCount() {
         WifiConfiguration configuration1 = WifiConfigurationTestUtil.createOpenNetwork();
         WifiConfiguration configuration2 = WifiConfigurationTestUtil.createOpenNetwork();
-        configuration1.getNetworkSelectionStatus().setHasEverConnected(true);
-        configuration2.getNetworkSelectionStatus().setHasEverConnected(true);
         when(mWifiConfigManager.getSavedNetworks(anyInt()))
                 .thenReturn(Arrays.asList(configuration1, configuration2));
 
@@ -4909,7 +4301,6 @@
     public void restartPnoScanForNetworkChanges() {
         setWifiEnabled(true);
 
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(0L);
         // starts a PNO scan
         mWifiConnectivityManager.handleConnectionStateChanged(
                 mPrimaryClientModeManager,
@@ -4923,20 +4314,12 @@
         // Add or update suggestions.
         mSuggestionUpdateListenerCaptor.getValue().onSuggestionsAddedOrUpdated(
                 Arrays.asList(mWifiNetworkSuggestion));
+        // Ensure that we restarted PNO.
+        inOrder.verify(mWifiScanner).stopPnoScan(any());
+        inOrder.verify(mWifiScanner).startDisconnectedPnoScan(any(), any(), any(), any());
+
         // Add saved network
         mNetworkUpdateListenerCaptor.getValue().onNetworkAdded(new WifiConfiguration());
-        // Ensure that we don't immediately restarted PNO.
-        inOrder.verify(mWifiScanner, never()).stopPnoScan(any());
-        inOrder.verify(mWifiScanner, never()).startDisconnectedPnoScan(any(), any(), any(), any());
-
-        // Verify there is only 1 delayed scan scheduled
-        assertEquals(1, mTestHandler.getIntervals().size());
-        assertEquals(NETWORK_CHANGE_TRIGGER_PNO_THROTTLE_MS,
-                (long) mTestHandler.getIntervals().get(0));
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(mTestHandler.getIntervals().get(0));
-        // Now advance the test handler and fire the periodic scan timer
-        mTestHandler.timeAdvance();
-
         // Ensure that we restarted PNO.
         inOrder.verify(mWifiScanner).stopPnoScan(any());
         inOrder.verify(mWifiScanner).startDisconnectedPnoScan(any(), any(), any(), any());
@@ -4977,8 +4360,7 @@
                         new WifiNetworkSelector.ClientModeManagerState(
                                 "wlan1", false, true, wifiInfo2));
         verify(mWifiNS).getCandidatesFromScan(any(), any(),
-                eq(expectedCmmStates), anyBoolean(), anyBoolean(), anyBoolean(), any(),
-                anyBoolean());
+                eq(expectedCmmStates), anyBoolean(), anyBoolean(), anyBoolean());
     }
 
     @Test
@@ -5001,7 +4383,7 @@
                 .thenReturn(Arrays.asList(primaryCmm));
         // Second STA creation is allowed.
         when(mActiveModeWarden.canRequestMoreClientModeManagersInRole(
-                eq(oemPaidWs), eq(ROLE_CLIENT_SECONDARY_LONG_LIVED), eq(false))).thenReturn(true);
+                eq(oemPaidWs), eq(ROLE_CLIENT_SECONDARY_LONG_LIVED))).thenReturn(true);
 
         // Set WiFi to disconnected state to trigger scan
         mWifiConnectivityManager.handleConnectionStateChanged(
@@ -5014,8 +4396,7 @@
                 new WifiNetworkSelector.ClientModeManagerState(
                         "unknown", false, true, new WifiInfo()));
         verify(mWifiNS).getCandidatesFromScan(any(), any(),
-                eq(expectedCmmStates), anyBoolean(), anyBoolean(), anyBoolean(), any(),
-                anyBoolean());
+                eq(expectedCmmStates), anyBoolean(), anyBoolean(), anyBoolean());
     }
 
     private void setWifiEnabled(boolean enable) {
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiCountryCodeTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiCountryCodeTest.java
index d8b756f..448ed6d 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiCountryCodeTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiCountryCodeTest.java
@@ -31,7 +31,6 @@
 
 import androidx.test.filters.SmallTest;
 
-import com.android.modules.utils.build.SdkLevel;
 import com.android.wifi.resources.R;
 
 import org.junit.Before;
@@ -57,23 +56,16 @@
     private static final String TEST_COUNTRY_CODE = "JP";
     private String mDefaultCountryCode = "US";
     private String mTelephonyCountryCode = "JP";
-    private String mWorldModeCountryCode = "00";
     private boolean mRevertCountryCodeOnCellularLoss = true;
-    // Default assume true since it was a design before R
-    private boolean mDriverSupportedNl80211RegChangedEvent = false;
-    private boolean mForcedSoftApRestateWhenCountryCodeChanged = false;
     @Mock Context mContext;
     MockResources mResources = new MockResources();
     @Mock TelephonyManager mTelephonyManager;
     @Mock ActiveModeWarden mActiveModeWarden;
     @Mock ConcreteClientModeManager mClientModeManager;
-    @Mock SoftApManager mSoftApManager;
     @Mock ClientModeImplMonitor mClientModeImplMonitor;
     @Mock WifiNative mWifiNative;
     @Mock WifiSettingsConfigStore mSettingsConfigStore;
     @Mock WifiInfo mWifiInfo;
-    @Mock WifiCountryCode.ChangeListener mExternalChangeListener;
-    @Mock SoftApModeConfiguration mSoftApModeConfiguration;
     private WifiCountryCode mWifiCountryCode;
     private List<ClientModeManager> mClientManagerList;
 
@@ -106,6 +98,13 @@
         when(mContext.getSystemService(Context.TELEPHONY_SERVICE))
                 .thenReturn(mTelephonyManager);
 
+        doAnswer((invocation) -> {
+            mChangeListenerCaptor.getValue()
+                    .onDriverCountryCodeChanged(mSetCountryCodeCaptor.getValue());
+            return true;
+        }).when(mClientModeManager).setCountryCode(
+                    mSetCountryCodeCaptor.capture());
+
         doAnswer(new AnswerWithArguments() {
             public void answer(WifiSettingsConfigStore.Key<String> key, Object countryCode) {
                 when(mSettingsConfigStore.get(WIFI_DEFAULT_COUNTRY_CODE))
@@ -121,21 +120,6 @@
     private void createWifiCountryCode() {
         mResources.setBoolean(R.bool.config_wifi_revert_country_code_on_cellular_loss,
                 mRevertCountryCodeOnCellularLoss);
-        mResources.setBoolean(R.bool.config_wifiDriverSupportedNl80211RegChangedEvent,
-                mDriverSupportedNl80211RegChangedEvent);
-        mResources.setBoolean(R.bool.config_wifiForcedSoftApRestartWhenCountryCodeChanged,
-                mForcedSoftApRestateWhenCountryCodeChanged);
-        mResources.setString(R.string.config_wifiDriverWorldModeCountryCode, mWorldModeCountryCode);
-        doAnswer((invocation) -> {
-            mChangeListenerCaptor.getValue()
-                    .onSetCountryCodeSucceeded(mSetCountryCodeCaptor.getValue());
-            if (mDriverSupportedNl80211RegChangedEvent) {
-                mChangeListenerCaptor.getValue()
-                        .onDriverCountryCodeChanged(mSetCountryCodeCaptor.getValue());
-            }
-            return true;
-        }).when(mClientModeManager).setCountryCode(
-                    mSetCountryCodeCaptor.capture());
         when(mContext.getResources()).thenReturn(mResources);
         mWifiCountryCode = new WifiCountryCode(
                 mContext,
@@ -162,7 +146,7 @@
         // Wifi get L2 connected.
         mClientModeImplListenerCaptor.getValue().onConnectionStart(mClientModeManager);
         verify(mClientModeManager).setCountryCode(anyString());
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
     }
 
     /**
@@ -177,7 +161,7 @@
         // Wifi get L2 connected.
         mClientModeImplListenerCaptor.getValue().onConnectionStart(mClientModeManager);
         verify(mClientModeManager).setCountryCode(anyString());
-        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
     }
 
     /**
@@ -187,13 +171,13 @@
     @Test
     public void useTelephonyCountryCodeOnChange() throws Exception {
         mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
-        assertEquals(null, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(null, mWifiCountryCode.getCountryCodeSentToDriver());
         // Supplicant started.
         mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
         // Wifi get L2 connected.
         mClientModeImplListenerCaptor.getValue().onConnectionStart(mClientModeManager);
         verify(mClientModeManager).setCountryCode(anyString());
-        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
     }
 
     /**
@@ -204,12 +188,12 @@
     public void telephonyCountryCodeChangeAfterSupplicantStarts() throws Exception {
         // Start in scan only mode.
         mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
 
         // Supplicant starts.
         when(mClientModeManager.getRole()).thenReturn(ROLE_CLIENT_PRIMARY);
         mModeChangeCallbackCaptor.getValue().onActiveModeManagerRoleChanged(mClientModeManager);
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
 
         // Telephony country code arrives.
         mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
@@ -217,7 +201,7 @@
         mClientModeImplListenerCaptor.getValue().onConnectionStart(mClientModeManager);
 
         verify(mClientModeManager, times(3)).setCountryCode(anyString());
-        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
     }
 
 
@@ -229,12 +213,12 @@
     public void telephonyCountryCodeChangeAfterSupplicantStop() throws Exception {
         // Start in scan only mode.
         mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
 
         // Supplicant starts.
         when(mClientModeManager.getRole()).thenReturn(ROLE_CLIENT_PRIMARY);
         mModeChangeCallbackCaptor.getValue().onActiveModeManagerRoleChanged(mClientModeManager);
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
 
         // Telephony country code arrives.
         mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
@@ -242,7 +226,7 @@
         mClientModeImplListenerCaptor.getValue().onConnectionStart(mClientModeManager);
 
         verify(mClientModeManager, times(3)).setCountryCode(anyString());
-        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
 
         // Remove mode manager.
         mModeChangeCallbackCaptor.getValue().onActiveModeManagerRemoved(mClientModeManager);
@@ -250,7 +234,7 @@
         // Send Telephony country code again - should be ignored.
         mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
         verify(mClientModeManager, times(3)).setCountryCode(anyString());
-        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCode());
+        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
 
         // Now try removing the mode manager again - should not crash.
         mModeChangeCallbackCaptor.getValue().onActiveModeManagerRemoved(mClientModeManager);
@@ -273,7 +257,7 @@
         // Telephony country code arrives.
         mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
         // Telephony country code won't be applied at this time.
-        assertEquals("00", mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals("00", mWifiCountryCode.getCountryCodeSentToDriver());
         // Wifi is not forced to disconnect
         verify(mClientModeManager, times(0)).disconnect();
 
@@ -284,14 +268,14 @@
             mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
         }
         // Telephony country code still won't be applied.
-        assertEquals("00", mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals("00", mWifiCountryCode.getCountryCodeSentToDriver());
         // Wifi is forced to disconnect
         verify(mClientModeManager, times(1)).disconnect();
 
         mClientModeImplListenerCaptor.getValue().onConnectionEnd(mClientModeManager);
         // Telephony country is applied after supplicant is ready.
         verify(mClientModeManager, times(2)).setCountryCode(anyString());
-        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
     }
 
     /**
@@ -308,7 +292,7 @@
         // Telephony country code arrives.
         mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
         // Telephony country code won't be applied at this time.
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
 
         // Create secondary CMM
         ConcreteClientModeManager secondaryClientModeManager =
@@ -319,20 +303,20 @@
         mClientModeImplListenerCaptor.getValue().onConnectionStart(secondaryClientModeManager);
 
         // Telephony country code still not applied.
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
 
         // Disconnection on primary
         mClientModeImplListenerCaptor.getValue().onConnectionEnd(mClientModeManager);
 
         // Telephony country code still not applied.
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
 
         // Disconnection on secondary
         mClientModeImplListenerCaptor.getValue().onConnectionEnd(secondaryClientModeManager);
 
         // Telephony coutry is applied after both of them are disconnected.
         verify(mClientModeManager, times(2)).setCountryCode(anyString());
-        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
+        assertEquals(mTelephonyCountryCode, mWifiCountryCode.getCountryCodeSentToDriver());
     }
 
     /**
@@ -413,15 +397,14 @@
         mWifiCountryCode.dump(null, pw, null);
         String dumpCountryCodeStr = sw.toString();
 
+        assertTrue(dumpCountryCodeStr.contains("mDriverCountryCode"));
         assertTrue(dumpCountryCodeStr.contains("mTelephonyCountryCode"));
         assertTrue(dumpCountryCodeStr.contains("DefaultCountryCode(system property)"));
         assertTrue(dumpCountryCodeStr.contains("DefaultCountryCode(config store)"));
         assertTrue(dumpCountryCodeStr.contains("mTelephonyCountryTimestamp"));
+        assertTrue(dumpCountryCodeStr.contains("mDriverCountryTimestamp"));
         assertTrue(dumpCountryCodeStr.contains("mReadyTimestamp"));
         assertTrue(dumpCountryCodeStr.contains("mReady"));
-        assertTrue(dumpCountryCodeStr.contains("mDriverCountryCode"));
-        assertTrue(dumpCountryCodeStr.contains("mDriverCountryCodeUpdatedTimestamp"));
-
     }
 
     /**
@@ -430,37 +413,11 @@
      */
     @Test
     public void setDefaultCountryCode() throws Exception {
-        // Supplicant started, it will update default country code (US) to driver
+        // Supplicant started.
         mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        verify(mClientModeManager).setCountryCode(eq(mDefaultCountryCode));
-        // Remove mode manager.
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRemoved(mClientModeManager);
-        // Update default country code (JP) to driver
         mWifiCountryCode.setDefaultCountryCode(TEST_COUNTRY_CODE);
-        // Supplicant started again, it will update new default country code (JP) to driver
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
         verify(mClientModeManager).setCountryCode(eq(TEST_COUNTRY_CODE));
-        assertEquals(TEST_COUNTRY_CODE, mWifiCountryCode.getCurrentDriverCountryCode());
-        verify(mSettingsConfigStore).put(eq(WIFI_DEFAULT_COUNTRY_CODE), eq(TEST_COUNTRY_CODE));
-        assertEquals(TEST_COUNTRY_CODE, mSettingsConfigStore.get(WIFI_DEFAULT_COUNTRY_CODE));
-    }
-
-    /**
-     * Test set Default country code
-     * @throws Exception
-     */
-    @Test
-    public void testDefaultCountryCodeNotUsedWhenDriverCountryCodeExist() throws Exception {
-        // Supplicant started, it will update default country code (US) to driver
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        // The driver country code is mDefaultCountryCode now.
-        verify(mClientModeManager).setCountryCode(eq(mDefaultCountryCode));
-        // Update default country code (JP) to driver
-        mWifiCountryCode.setDefaultCountryCode(TEST_COUNTRY_CODE);
-        // It still use the last driver country code when default country code changed
-        verify(mClientModeManager, times(2)).setCountryCode(eq(mDefaultCountryCode));
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
-        // But default country code updated to new country code - JP
+        assertEquals(TEST_COUNTRY_CODE, mWifiCountryCode.getCountryCodeSentToDriver());
         verify(mSettingsConfigStore).put(eq(WIFI_DEFAULT_COUNTRY_CODE), eq(TEST_COUNTRY_CODE));
         assertEquals(TEST_COUNTRY_CODE, mSettingsConfigStore.get(WIFI_DEFAULT_COUNTRY_CODE));
     }
@@ -478,182 +435,10 @@
         assertEquals(WifiCountryCode.isValid("0U"), true);
     }
 
-    /**
-     * Test driver country code is null when there is no active mode.
-     */
-    @Test
-    public void testDriverCountryCodeIsNullWhenNoModeActive() throws Exception {
-        // Supplicant started, it will update default country code (US) to driver
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        assertEquals(mWifiCountryCode.getCurrentDriverCountryCode(), mDefaultCountryCode);
-        // Remove mode manager.
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRemoved(mClientModeManager);
-        assertNull(mWifiCountryCode.getCurrentDriverCountryCode());
-    }
-
-    /**
-     * Test driver country code updated correctly
-     * when config_wifiDriverSupportedNl80211RegChangedEvent is true.
-     */
-    @Test
-    public void testDriverCountryCodeUpdateWhenOverlayisTrue() throws Exception {
-        mDriverSupportedNl80211RegChangedEvent = true;
-        createWifiCountryCode();
-        // Supplicant started.
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        // Wifi get L2 connected.
-        mClientModeImplListenerCaptor.getValue().onConnectionStart(mClientModeManager);
-        verify(mClientModeManager).setCountryCode(anyString());
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiNative, never()).countryCodeChanged(any());
-        } else {
-            verify(mWifiNative).countryCodeChanged(mDefaultCountryCode);
-        }
-    }
-
-    @Test
-    public void testCountryCodeChangedWillNotifyExternalListener()
-            throws Exception {
-        // External caller register the listener
-        mWifiCountryCode.registerListener(mExternalChangeListener);
-        // Supplicant started.
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        // Wifi get L2 connected.
-        mClientModeImplListenerCaptor.getValue().onConnectionStart(mClientModeManager);
-        verify(mClientModeManager).setCountryCode(anyString());
-        verify(mWifiNative).countryCodeChanged(mDefaultCountryCode);
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
-        verify(mExternalChangeListener).onDriverCountryCodeChanged(mDefaultCountryCode);
-    }
-
-    @Test
-    public void testNotifyExternalListenerWhenOverlayisTrueButCountryCodeSameAsLastActiveOne()
-            throws Exception {
-        mDriverSupportedNl80211RegChangedEvent = true;
-        createWifiCountryCode();
-        // External caller register the listener
-        mWifiCountryCode.registerListener(mExternalChangeListener);
-        // Supplicant started.
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        // Wifi get L2 connected.
-        mClientModeImplListenerCaptor.getValue().onConnectionStart(mClientModeManager);
-        verify(mClientModeManager).setCountryCode(mDefaultCountryCode);
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
-        verify(mExternalChangeListener).onDriverCountryCodeChanged(mDefaultCountryCode);
-        if (SdkLevel.isAtLeastT()) {
-            // First time it should not trigger since last active country code is null.
-            verify(mWifiNative, never()).countryCodeChanged(any());
-        }
-        // Remove and add client mode manager again.
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRemoved(mClientModeManager);
-        assertNull(mWifiCountryCode.getCurrentDriverCountryCode());
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        verify(mClientModeManager, times(2)).setCountryCode(mDefaultCountryCode);
-        // Second time it would notify the wificond since it is same as last active country code
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiNative).countryCodeChanged(mDefaultCountryCode);
-        } else {
-            verify(mWifiNative, times(2)).countryCodeChanged(mDefaultCountryCode);
-        }
-        assertEquals(mDefaultCountryCode, mWifiCountryCode.getCurrentDriverCountryCode());
-        verify(mExternalChangeListener, times(2)).onDriverCountryCodeChanged(mDefaultCountryCode);
-    }
-
     @Test
     public void testSetTelephonyCountryCodeAndUpdateWithEmptyCCReturnFalseWhenDefaultSIMCCExist()
             throws Exception {
         when(mTelephonyManager.getNetworkCountryIso()).thenReturn(mTelephonyCountryCode);
         assertFalse(mWifiCountryCode.setTelephonyCountryCodeAndUpdate(""));
     }
-
-    @Test
-    public void testClientModeManagerAndSoftApManagerDoesntImpactEachOther()
-            throws Exception {
-        // Supplicant started.
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        mChangeListenerCaptor.getValue().onSetCountryCodeSucceeded(mDefaultCountryCode);
-        verify(mClientModeManager).setCountryCode(anyString());
-
-        // SoftApManager activated, it shouldn't impact to client mode, the times keep 1.
-        when(mSoftApManager.getRole()).thenReturn(ActiveModeManager.ROLE_SOFTAP_TETHERED);
-        when(mSoftApManager.updateCountryCode(anyString())).thenReturn(true);
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mSoftApManager);
-        verify(mClientModeManager).setCountryCode(anyString());
-        // Verify the SoftAp enable shouldn't trigger the update CC event.
-        verify(mSoftApManager, never()).updateCountryCode(anyString());
-
-        // Remove and add client mode manager again.
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerRemoved(mClientModeManager);
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mClientModeManager);
-        // Verify the SoftApManager doesn't impact when client mode changed
-        verify(mSoftApManager, never()).updateCountryCode(anyString());
-        verify(mClientModeManager, times(2)).setCountryCode(anyString());
-
-        // Override the mClientModeManager.setCountryCode mock in setUp, do not update driver
-        // country code, so both client mode manager and ap mode manager will update country code.
-        doAnswer((invocation) -> {
-            return true;
-        }).when(mClientModeManager).setCountryCode(mSetCountryCodeCaptor.capture());
-        // Test telephony CC changed, check both of client mode and softap mode update the CC.
-        mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
-        verify(mClientModeManager).setCountryCode(mTelephonyCountryCode);
-        verify(mSoftApManager).updateCountryCode(mTelephonyCountryCode);
-    }
-
-    @Test
-    public void testCountryCodeChangedWhenSoftApManagerActive()
-            throws Exception {
-        // SoftApManager actived
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mSoftApManager);
-        // Simulate the country code set succeeded via SoftApManager
-        mChangeListenerCaptor.getValue().onSetCountryCodeSucceeded(mDefaultCountryCode);
-        verify(mSoftApManager, never()).updateCountryCode(anyString());
-        mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
-        verify(mSoftApManager).updateCountryCode(mTelephonyCountryCode);
-    }
-
-    @Test
-    public void testCountryCodeChangedWhenSoftApManagerActiveAndForceSoftApRestartButCCisWorld()
-            throws Exception {
-        mForcedSoftApRestateWhenCountryCodeChanged = true;
-        when(mSoftApManager.getSoftApModeConfiguration()).thenReturn(mSoftApModeConfiguration);
-        createWifiCountryCode();
-        // SoftApManager actived
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mSoftApManager);
-        // Simulate the country code set succeeded via SoftApManager
-        mChangeListenerCaptor.getValue().onSetCountryCodeSucceeded(
-                mWorldModeCountryCode);
-        verify(mSoftApManager, never()).updateCountryCode(anyString());
-        mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
-        verify(mSoftApManager).updateCountryCode(mTelephonyCountryCode);
-        verify(mSoftApManager, never()).getSoftApModeConfiguration();
-        verify(mActiveModeWarden, never()).stopSoftAp(anyInt());
-        verify(mActiveModeWarden, never()).startSoftAp(any(), any());
-    }
-
-    @Test
-    public void testCountryCodeChangedWhenSoftApManagerActiveAndForceSoftApRestart()
-            throws Exception {
-        mForcedSoftApRestateWhenCountryCodeChanged = true;
-        when(mSoftApManager.getSoftApModeConfiguration()).thenReturn(mSoftApModeConfiguration);
-        createWifiCountryCode();
-        // SoftApManager actived
-        mModeChangeCallbackCaptor.getValue().onActiveModeManagerAdded(mSoftApManager);
-        // Simulate the country code set succeeded via SoftApManager
-        mChangeListenerCaptor.getValue().onSetCountryCodeSucceeded(mDefaultCountryCode);
-        verify(mSoftApManager, never()).updateCountryCode(anyString());
-        mWifiCountryCode.setTelephonyCountryCodeAndUpdate(mTelephonyCountryCode);
-        verify(mSoftApManager).getSoftApModeConfiguration();
-        verify(mActiveModeWarden).stopSoftAp(anyInt());
-        verify(mActiveModeWarden).startSoftAp(eq(mSoftApModeConfiguration), any());
-    }
-
-    @Test
-    public void testSetOverrideCountryCodeAndOnCountryCodeChangePending() {
-        // External caller register the listener
-        mWifiCountryCode.registerListener(mExternalChangeListener);
-        mWifiCountryCode.setOverrideCountryCode(TEST_COUNTRY_CODE);
-        verify(mExternalChangeListener).onCountryCodeChangePending(TEST_COUNTRY_CODE);
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiDataStallTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiDataStallTest.java
index 2d22ec2..16b9d2b 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiDataStallTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiDataStallTest.java
@@ -65,6 +65,7 @@
 
     @Mock Context mContext;
     MockResources mMockResources = new MockResources();
+    @Mock FrameworkFacade mFrameworkFacade;
     @Mock WifiChannelUtilization mWifiChannelUtilization;
     @Mock WifiMetrics mWifiMetrics;
     WifiDataStall mWifiDataStall;
@@ -85,8 +86,6 @@
     private final WifiLinkLayerStats mOldLlStats = new WifiLinkLayerStats();
     private final WifiLinkLayerStats mNewLlStats = new WifiLinkLayerStats();
     private MockitoSession mSession;
-    private long mTxBytes = 0L;
-    private long mRxBytes = 0L;
     /**
      * Sets up for unit test
      */
@@ -144,7 +143,7 @@
         when(mWifiInfo.getFrequency()).thenReturn(5850);
         when(mWifiInfo.getBSSID()).thenReturn("5G_WiFi");
 
-        mWifiDataStall = new WifiDataStall(mWifiMetrics, mContext,
+        mWifiDataStall = new WifiDataStall(mFrameworkFacade, mWifiMetrics, mContext,
                 mDeviceConfigFacade, mWifiChannelUtilization, mClock, mHandler,
                 mThroughputPredictor, mActiveModeWarden, mClientModeImplMonitor);
         mOldLlStats.txmpdu_be = 1000;
@@ -187,8 +186,10 @@
     }
 
     private void setUpWifiBytes(long txBytes, long rxBytes) {
-        mTxBytes = txBytes;
-        mRxBytes = rxBytes;
+        lenient().when(mFrameworkFacade.getTotalTxBytes()).thenReturn(txBytes);
+        lenient().when(mFrameworkFacade.getTotalRxBytes()).thenReturn(rxBytes);
+        lenient().when(mFrameworkFacade.getMobileTxBytes()).thenReturn((long) 0);
+        lenient().when(mFrameworkFacade.getMobileRxBytes()).thenReturn((long) 0);
     }
 
     /**
@@ -293,14 +294,14 @@
     @Test
     public void verifyThroughputNoRxLinkSpeed() throws Exception {
         mWifiDataStall.checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                mCapabilities, null, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes);
+                mCapabilities, null, mNewLlStats, mWifiInfo);
         verify(mWifiMetrics).incrementChannelUtilizationCount(10, 5850);
         verify(mWifiMetrics).incrementThroughputKbpsCount(50_000, 150_000, 5850);
         assertEquals(50_000, mWifiDataStall.getTxThroughputKbps());
         assertEquals(150_000, mWifiDataStall.getRxThroughputKbps());
         when(mWifiInfo.getRxLinkSpeedMbps()).thenReturn(-1);
         mWifiDataStall.checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes);
+                mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo);
         assertEquals(960, mWifiDataStall.getTxThroughputKbps());
         assertEquals(-1, mWifiDataStall.getRxThroughputKbps());
         verify(mWifiMetrics).incrementThroughputKbpsCount(960, -1, 5850);
@@ -310,7 +311,7 @@
         when(mClock.getElapsedSinceBootMillis()).thenReturn(10L);
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         verify(mWifiMetrics).incrementThroughputKbpsCount(960, 9609, 5850);
         verifyUpdateWifiIsUnusableLinkLayerStats();
         when(mClock.getElapsedSinceBootMillis()).thenReturn(
@@ -318,7 +319,7 @@
         setUpWifiBytes(TEST_WIFI_BYTES, TEST_WIFI_BYTES);
         assertEquals(WifiIsUnusableEvent.TYPE_DATA_STALL_BAD_TX, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(false, mWifiDataStall.isThroughputSufficient());
         assertEquals(960, mWifiDataStall.getTxThroughputKbps());
         assertEquals(9609, mWifiDataStall.getRxThroughputKbps());
@@ -370,14 +371,14 @@
 
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         verifyUpdateWifiIsUnusableLinkLayerStats();
         when(mClock.getElapsedSinceBootMillis()).thenReturn(
                 10L + DeviceConfigFacade.DEFAULT_DATA_STALL_DURATION_MS);
         setUpWifiBytes(TEST_WIFI_BYTES, TEST_WIFI_BYTES);
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(true, mWifiDataStall.isThroughputSufficient());
         assertEquals(833132, mWifiDataStall.getTxThroughputKbps());
         assertEquals(9609, mWifiDataStall.getRxThroughputKbps());
@@ -394,7 +395,7 @@
 
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(true, mWifiDataStall.isThroughputSufficient());
         verifyUpdateWifiIsUnusableLinkLayerStats();
 
@@ -404,7 +405,7 @@
         setUpWifiBytes(TEST_WIFI_BYTES, TEST_WIFI_BYTES);
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(true, mWifiDataStall.isThroughputSufficient());
         verify(mWifiMetrics, never()).logWifiIsUnusableEvent(TEST_IFACE_NAME,
                 WifiIsUnusableEvent.TYPE_DATA_STALL_BAD_TX);
@@ -420,14 +421,14 @@
         when(mClock.getElapsedSinceBootMillis()).thenReturn(10L);
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         verifyUpdateWifiIsUnusableLinkLayerStats();
         when(mClock.getElapsedSinceBootMillis()).thenReturn(
                 10L + DeviceConfigFacade.DEFAULT_DATA_STALL_DURATION_MS);
         setUpWifiBytes(TEST_WIFI_BYTES, TEST_WIFI_BYTES);
         assertEquals(WifiIsUnusableEvent.TYPE_DATA_STALL_TX_WITHOUT_RX, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(false, mWifiDataStall.isThroughputSufficient());
         assertEquals(4804, mWifiDataStall.getTxThroughputKbps());
         assertEquals(960, mWifiDataStall.getRxThroughputKbps());
@@ -449,14 +450,14 @@
 
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         verifyUpdateWifiIsUnusableLinkLayerStats();
         when(mClock.getElapsedSinceBootMillis()).thenReturn(
                 10L + DeviceConfigFacade.DEFAULT_DATA_STALL_DURATION_MS);
         setUpWifiBytes(TEST_WIFI_BYTES, TEST_WIFI_BYTES);
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(true, mWifiDataStall.isThroughputSufficient());
         assertEquals(9128, mWifiDataStall.getTxThroughputKbps());
         assertEquals(-1, mWifiDataStall.getRxThroughputKbps());
@@ -474,7 +475,7 @@
 
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         verifyUpdateWifiIsUnusableLinkLayerStats();
         assertEquals(960, mWifiDataStall.getTxThroughputKbps());
         assertEquals(960, mWifiDataStall.getRxThroughputKbps());
@@ -485,7 +486,7 @@
         setUpWifiBytes(TEST_WIFI_BYTES, TEST_WIFI_BYTES);
         assertEquals(WifiIsUnusableEvent.TYPE_DATA_STALL_BOTH, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(false, mWifiDataStall.isThroughputSufficient());
         assertEquals(960, mWifiDataStall.getTxThroughputKbps());
         assertEquals(960, mWifiDataStall.getRxThroughputKbps());
@@ -505,7 +506,7 @@
 
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(false, mWifiDataStall.isThroughputSufficient());
         assertEquals(960, mWifiDataStall.getTxThroughputKbps());
         assertEquals(960, mWifiDataStall.getRxThroughputKbps());
@@ -519,7 +520,7 @@
         setUpWifiBytes(TEST_WIFI_BYTES, TEST_WIFI_BYTES);
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(true, mWifiDataStall.isThroughputSufficient());
         assertEquals(8943, mWifiDataStall.getTxThroughputKbps());
         assertEquals(9414, mWifiDataStall.getRxThroughputKbps());
@@ -536,14 +537,14 @@
                 DeviceConfigFacade.DEFAULT_DATA_STALL_DURATION_MS + 1);
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         verifyUpdateWifiIsUnusableLinkLayerStats();
         when(mClock.getElapsedSinceBootMillis()).thenReturn(
                 10L + DeviceConfigFacade.DEFAULT_DATA_STALL_DURATION_MS);
         setUpWifiBytes(TEST_WIFI_BYTES, TEST_WIFI_BYTES);
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(false, mWifiDataStall.isThroughputSufficient());
         verify(mWifiMetrics, never()).logWifiIsUnusableEvent(TEST_IFACE_NAME,
                 WifiIsUnusableEvent.TYPE_DATA_STALL_BAD_TX);
@@ -561,14 +562,14 @@
         when(mDeviceConfigFacade.getDataStallTxTputThrKbps()).thenReturn(800);
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         verifyUpdateWifiIsUnusableLinkLayerStats();
         when(mClock.getElapsedSinceBootMillis()).thenReturn(
                 10L + DeviceConfigFacade.DEFAULT_DATA_STALL_DURATION_MS);
         setUpWifiBytes(TEST_WIFI_BYTES, TEST_WIFI_BYTES);
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         assertEquals(false, mWifiDataStall.isThroughputSufficient());
         verify(mWifiMetrics, never()).logWifiIsUnusableEvent(TEST_IFACE_NAME,
                 WifiIsUnusableEvent.TYPE_DATA_STALL_BAD_TX);
@@ -581,7 +582,7 @@
     public void verifyNoDataStallWhenNoFail() throws Exception {
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         verify(mWifiMetrics, never()).resetWifiIsUnusableLinkLayerStats();
         verifyUpdateWifiIsUnusableLinkLayerStats();
         verify(mWifiMetrics, never()).logWifiIsUnusableEvent(any(), anyInt());
@@ -598,7 +599,7 @@
                 + WifiDataStall.MAX_MS_DELTA_FOR_DATA_STALL + 1;
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         verifyUpdateWifiIsUnusableLinkLayerStats();
         verify(mWifiMetrics, never()).logWifiIsUnusableEvent(any(), anyInt());
     }
@@ -611,7 +612,7 @@
         mNewLlStats.lostmpdu_be = mOldLlStats.lostmpdu_be - 1;
         assertEquals(WifiIsUnusableEvent.TYPE_UNKNOWN, mWifiDataStall
                 .checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes));
+                        mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo));
         verify(mWifiMetrics).resetWifiIsUnusableLinkLayerStats();
         verify(mWifiMetrics, never()).updateWifiIsUnusableLinkLayerStats(
                 anyLong(), anyLong(), anyLong(), anyLong(), anyLong());
@@ -632,22 +633,23 @@
         // Expect 1st throughput sufficiency check to return true
         // because it hits mLastTxBytes == 0 || mLastRxBytes == 0
         mWifiDataStall.checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes);
+                mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo);
         verify(mWifiMetrics, times(1)).incrementConnectionDuration(
                 1000, true, true);
 
         // Expect 2nd throughput sufficiency check to return false
         mWifiDataStall.checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes);
+                mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo);
         verify(mWifiMetrics, times(1)).incrementConnectionDuration(
                 1000, false, true);
 
+
         mNewLlStats.timeStampInMs = mOldLlStats.timeStampInMs + 2000;
         phoneStateListener.onDataConnectionStateChanged(
                 TelephonyManager.DATA_DISCONNECTED, TelephonyManager.NETWORK_TYPE_LTE);
         assertEquals(false, mWifiDataStall.isCellularDataAvailable());
         mWifiDataStall.checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes);
+                mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo);
         verify(mWifiMetrics, times(1)).incrementConnectionDuration(
                 2000, false, false);
 
@@ -655,7 +657,7 @@
         // too large poll interval
         mNewLlStats.timeStampInMs = mOldLlStats.timeStampInMs + 10000;
         mWifiDataStall.checkDataStallAndThroughputSufficiency(TEST_IFACE_NAME,
-                mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo, mTxBytes, mRxBytes);
+                mCapabilities, mOldLlStats, mNewLlStats, mWifiInfo);
         verify(mWifiMetrics, never()).incrementConnectionDuration(
                 10000, false, false);
         setWifiEnabled(false);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiDiagnosticsTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiDiagnosticsTest.java
index 57c51af..7cff275 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiDiagnosticsTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiDiagnosticsTest.java
@@ -165,13 +165,13 @@
         mWifiDiagnostics = new WifiDiagnostics(
                 mContext, mWifiInjector, mWifiNative, mBuildProperties, mLastMileLogger, mClock,
                 mTestLooper.getLooper());
-        mWifiNative.enableVerboseLogging(false, false);
+        mWifiNative.enableVerboseLogging(false);
     }
 
     /** Verifies that startLogging() registers a logging event handler. */
     @Test
     public void startLoggingRegistersLogEventHandler() throws Exception {
-        mWifiDiagnostics.enableVerboseLogging(false, false);
+        mWifiDiagnostics.enableVerboseLogging(false);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         verify(mWifiNative).setLoggingEventHandler(anyObject());
     }
@@ -186,14 +186,14 @@
         final boolean verbosityToggle = false;  // even default mode registers handler
 
         when(mWifiNative.setLoggingEventHandler(anyObject())).thenReturn(false);
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         verify(mWifiNative).setLoggingEventHandler(anyObject());
         mWifiDiagnostics.stopLogging(STA_IF_NAME);
         reset(mWifiNative);
 
         when(mWifiNative.setLoggingEventHandler(anyObject())).thenReturn(true);
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         verify(mWifiNative).setLoggingEventHandler(anyObject());
     }
@@ -203,12 +203,12 @@
     public void startLoggingDoesNotRegisterLogEventHandlerIfPriorAttemptSucceeded()
             throws Exception {
         when(mWifiNative.setLoggingEventHandler(anyObject())).thenReturn(true);
-        mWifiDiagnostics.enableVerboseLogging(false, false);
+        mWifiDiagnostics.enableVerboseLogging(false);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         verify(mWifiNative).setLoggingEventHandler(anyObject());
         reset(mWifiNative);
 
-        mWifiDiagnostics.enableVerboseLogging(false, false);
+        mWifiDiagnostics.enableVerboseLogging(false);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         verify(mWifiNative, never()).setLoggingEventHandler(anyObject());
     }
@@ -223,7 +223,7 @@
     @Test
     public void startLoggingStopsAndRestartsRingBufferLoggingInVerboseMode() throws Exception {
         final boolean verbosityToggle = true;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         verify(mWifiNative).startLoggingRingBuffer(
                 eq(WifiDiagnostics.VERBOSE_NO_LOG), anyInt(), anyInt(), anyInt(),
@@ -236,7 +236,7 @@
     @Test
     public void startLoggingStopsAndThenStartRingBufferLoggingInNormalMode() throws Exception {
         final boolean verbosityToggle = false;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         verify(mWifiNative).startLoggingRingBuffer(
                 eq(WifiDiagnostics.VERBOSE_NO_LOG), anyInt(), anyInt(), anyInt(),
@@ -251,7 +251,7 @@
     public void stopLoggingResetsLogHandlerIfHandlerWasRegistered() throws Exception {
         final boolean verbosityToggle = false;  // even default mode registers handler
 
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         when(mWifiNative.setLoggingEventHandler(anyObject())).thenReturn(true);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         reset(mWifiNative);
@@ -273,7 +273,7 @@
         final boolean verbosityToggle = false;  // even default mode registers handler
 
         when(mWifiNative.setLoggingEventHandler(anyObject())).thenReturn(true);
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         reset(mWifiNative);
 
@@ -292,7 +292,7 @@
     @Test
     public void canCaptureAndStoreRingBufferData() throws Exception {
         final boolean verbosityToggle = false;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
 
         final byte[] data = new byte[SMALL_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE];
@@ -312,7 +312,7 @@
     @Test
     public void loggerDiscardsExtraneousData() throws Exception {
         final boolean verbosityToggle = false;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
 
         final byte[] data1 = new byte[SMALL_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE];
@@ -342,7 +342,7 @@
     @Test
     public void reportConnectionFailureIsIgnoredWithoutVerboseMode() {
         final boolean verbosityToggle = false;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startPktFateMonitoring(STA_IF_NAME);
         mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_FAILED,
                 mClientModeManager);
@@ -356,7 +356,7 @@
     @Test
     public void reportConnectionFailureFetchesFatesInVerboseMode() {
         final boolean verbosityToggle = true;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startPktFateMonitoring(STA_IF_NAME);
         mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_FAILED,
                 mClientModeManager);
@@ -367,7 +367,7 @@
     @Test
     public void reportConnectionEventPropagatesStartToLastMileLogger() {
         final boolean verbosityToggle = false;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_STARTED,
                 mClientModeManager);
@@ -378,7 +378,7 @@
     @Test
     public void reportConnectionEventPropagatesSuccessToLastMileLogger() {
         final boolean verbosityToggle = false;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_SUCCEEDED,
                 mClientModeManager);
@@ -389,7 +389,7 @@
     @Test
     public void reportConnectionEventPropagatesFailureToLastMileLogger() {
         final boolean verbosityToggle = false;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_FAILED,
                 mClientModeManager);
@@ -403,7 +403,7 @@
     @Test
     public void reportConnectionEventPropagatesTimeoutToLastMileLogger() {
         final boolean verbosityToggle = true;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_TIMEOUT,
                 mClientModeManager);
@@ -418,7 +418,7 @@
     public void loggerFetchesTxFatesEvenIfFetchingRxFatesFails() {
         final boolean verbosityToggle = true;
         when(mClientModeManager.getRxPktFates()).thenReturn(new ArrayList<>());
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startPktFateMonitoring(STA_IF_NAME);
         mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_FAILED,
                 mClientModeManager);
@@ -433,7 +433,7 @@
     public void loggerFetchesRxFatesEvenIfFetchingTxFatesFails() {
         final boolean verbosityToggle = true;
         when(mClientModeManager.getTxPktFates()).thenReturn(new ArrayList<>());
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startPktFateMonitoring(STA_IF_NAME);
         mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_FAILED,
                 mClientModeManager);
@@ -449,7 +449,7 @@
         final boolean verbosityToggle = false;
         StringWriter sw = new StringWriter();
         PrintWriter pw = new PrintWriter(sw);
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startPktFateMonitoring(STA_IF_NAME);
         mWifiDiagnostics.dump(new FileDescriptor(), pw, new String[]{"bogus", "args"});
         verify(mClientModeManager).getTxPktFates();
@@ -482,7 +482,7 @@
     @Test
     public void dumpSucceedsWhenFatesHaveBeenFetchedButAreEmpty() {
         final boolean verbosityToggle = true;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, verbosityToggle);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startPktFateMonitoring(STA_IF_NAME);
         mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_FAILED,
                 mClientModeManager);
@@ -501,10 +501,10 @@
     }
 
     private String getDumpString(boolean verbose) {
-        mWifiDiagnostics.enableVerboseLogging(verbose, verbose);
+        mWifiDiagnostics.enableVerboseLogging(verbose);
         mWifiDiagnostics.startPktFateMonitoring(STA_IF_NAME);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
-        mWifiNative.enableVerboseLogging(verbose, verbose);
+        mWifiNative.enableVerboseLogging(verbose);
         when(mClientModeManager.getTxPktFates()).thenReturn(Arrays.asList(
                 new WifiNative.TxFateReport(
                         WifiLoggerHal.TX_PKT_FATE_ACKED, 2, WifiLoggerHal.FRAME_TYPE_ETHERNET_II,
@@ -630,7 +630,7 @@
     @Test
     public void dumpOmitsFatesIfVerboseIsDisabledAfterFetch() {
         final boolean verbosityToggle = true;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startPktFateMonitoring(STA_IF_NAME);
         when(mClientModeManager.getTxPktFates()).thenReturn(Arrays.asList(
                 new WifiNative.TxFateReport(
@@ -648,7 +648,7 @@
         verify(mClientModeManager).getRxPktFates();
 
         final boolean newVerbosityToggle = false;
-        mWifiDiagnostics.enableVerboseLogging(newVerbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(newVerbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
 
         StringWriter sw = new StringWriter();
@@ -665,7 +665,7 @@
     @Test
     public void ringBufferSizeIsSmallByDefault() throws Exception {
         final boolean verbosityToggle = false;
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.onRingBufferData(
                 mFakeRbs, new byte[SMALL_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE + 1]);
@@ -682,7 +682,7 @@
         when(mBuildProperties.isUserdebugBuild()).thenReturn(true);
         when(mBuildProperties.isEngBuild()).thenReturn(false);
         when(mBuildProperties.isUserBuild()).thenReturn(false);
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.onRingBufferData(
                 mFakeRbs, new byte[SMALL_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE + 1]);
@@ -699,7 +699,7 @@
         when(mBuildProperties.isEngBuild()).thenReturn(true);
         when(mBuildProperties.isUserdebugBuild()).thenReturn(false);
         when(mBuildProperties.isUserBuild()).thenReturn(false);
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.onRingBufferData(
                 mFakeRbs, new byte[SMALL_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE + 1]);
@@ -713,7 +713,7 @@
     public void ringBufferSizeIsLargeInVerboseMode() throws Exception {
         final boolean verbosityToggle = true;
 
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.onRingBufferData(
                 mFakeRbs, new byte[LARGE_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE]);
@@ -725,9 +725,9 @@
     /** Verifies that we use large ring buffers when switched from normal to verbose mode. */
     @Test
     public void startLoggingGrowsRingBuffersIfNeeded() throws Exception {
-        mWifiDiagnostics.enableVerboseLogging(false /* verbose disabled */, false);
+        mWifiDiagnostics.enableVerboseLogging(false /* verbose disabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
-        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */, true);
+        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.onRingBufferData(
                 mFakeRbs, new byte[LARGE_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE]);
@@ -741,13 +741,13 @@
     @Test
     public void startLoggingShrinksRingBuffersIfNeeded() throws Exception {
 
-        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */, true);
+        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.onRingBufferData(
                 mFakeRbs, new byte[SMALL_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE + 1]);
 
         // Existing data is nuked (too large).
-        mWifiDiagnostics.enableVerboseLogging(false /* verbose disabled */, false);
+        mWifiDiagnostics.enableVerboseLogging(false /* verbose disabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.triggerBugReportDataCapture(WifiDiagnostics.REPORT_REASON_NONE);
         mTestLooper.dispatchAll();
@@ -791,7 +791,7 @@
     /** Verifies that we capture the firmware and driver dumps if verbose is enabled. */
     @Test
     public void captureBugReportTakesFirmwareAndDriverDumpsInVerboseMode() {
-        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */, true);
+        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.triggerBugReportDataCapture(WifiDiagnostics.REPORT_REASON_NONE);
         mTestLooper.dispatchAll();
@@ -804,7 +804,7 @@
     public void dumpIncludesDriverStateDumpIfAvailable() {
         when(mWifiNative.getDriverStateDump()).thenReturn(new byte[]{0, 1, 2});
 
-        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */, true);
+        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.triggerBugReportDataCapture(WifiDiagnostics.REPORT_REASON_NONE);
         mTestLooper.dispatchAll();
@@ -819,7 +819,7 @@
     /** Verifies that the dump skips driver state, if driver state was not provided by HAL. */
     @Test
     public void dumpOmitsDriverStateDumpIfUnavailable() {
-        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */, true);
+        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.triggerBugReportDataCapture(WifiDiagnostics.REPORT_REASON_NONE);
         mTestLooper.dispatchAll();
@@ -836,13 +836,13 @@
     public void dumpOmitsDriverStateDumpIfVerboseDisabledAfterCapture() {
         when(mWifiNative.getDriverStateDump()).thenReturn(new byte[]{0, 1, 2});
 
-        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */, true);
+        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.triggerBugReportDataCapture(WifiDiagnostics.REPORT_REASON_NONE);
         mTestLooper.dispatchAll();
         verify(mWifiNative).getDriverStateDump();
 
-        mWifiDiagnostics.enableVerboseLogging(false /* verbose disabled */, false);
+        mWifiDiagnostics.enableVerboseLogging(false /* verbose disabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
 
         StringWriter sw = new StringWriter();
@@ -856,7 +856,7 @@
     public void dumpIncludesFirmwareMemoryDumpIfAvailable() {
         when(mWifiNative.getFwMemoryDump()).thenReturn(new byte[]{0, 1, 2});
 
-        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */, true);
+        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.triggerBugReportDataCapture(WifiDiagnostics.REPORT_REASON_NONE);
         mTestLooper.dispatchAll();
@@ -871,7 +871,7 @@
     /** Verifies that the dump skips firmware memory, if firmware memory was not provided by HAL. */
     @Test
     public void dumpOmitsFirmwareMemoryDumpIfUnavailable() {
-        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */, true);
+        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.triggerBugReportDataCapture(WifiDiagnostics.REPORT_REASON_NONE);
         mTestLooper.dispatchAll();
@@ -888,13 +888,13 @@
     public void dumpOmitsFirmwareMemoryDumpIfVerboseDisabledAfterCapture() {
         when(mWifiNative.getFwMemoryDump()).thenReturn(new byte[]{0, 1, 2});
 
-        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */, true);
+        mWifiDiagnostics.enableVerboseLogging(true /* verbose enabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.triggerBugReportDataCapture(WifiDiagnostics.REPORT_REASON_NONE);
         mTestLooper.dispatchAll();
         verify(mWifiNative).getFwMemoryDump();
 
-        mWifiDiagnostics.enableVerboseLogging(false /* verbose disabled */, false);
+        mWifiDiagnostics.enableVerboseLogging(false /* verbose disabled */);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
 
         StringWriter sw = new StringWriter();
@@ -997,7 +997,7 @@
     public void canCaptureAndStoreRingBufferDataInSoftApMode() throws Exception {
         final boolean verbosityToggle = false;
 
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(AP_IF_NAME);
 
         final byte[] data = new byte[SMALL_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE];
@@ -1018,7 +1018,7 @@
     public void canCaptureAndStoreRingBufferDataInConcurrencyMode() throws Exception {
         final boolean verbosityToggle = false;
 
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.startLogging(AP_IF_NAME);
 
@@ -1042,7 +1042,7 @@
         final boolean verbosityToggle = false;
         final byte[] data = new byte[SMALL_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE];
 
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.startLogging(AP_IF_NAME);
 
@@ -1075,7 +1075,7 @@
         final boolean verbosityToggle = false;
         final byte[] data = new byte[SMALL_RING_BUFFER_SIZE_KB * BYTES_PER_KBYTE];
 
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         mWifiDiagnostics.startLogging(STA_IF_NAME);
         mWifiDiagnostics.startLogging(AP_IF_NAME);
 
@@ -1105,7 +1105,7 @@
     public void verifyStopLoggingOnAllInterfacesClearTheResources() throws Exception {
         final boolean verbosityToggle = false;
 
-        mWifiDiagnostics.enableVerboseLogging(verbosityToggle, false);
+        mWifiDiagnostics.enableVerboseLogging(verbosityToggle);
         when(mWifiNative.setLoggingEventHandler(any())).thenReturn(true);
         when(mWifiNative.resetLogHandler()).thenReturn(true);
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiDialogManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiDialogManagerTest.java
deleted file mode 100644
index 0f432fa..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiDialogManagerTest.java
+++ /dev/null
@@ -1,690 +0,0 @@
-/*
- * Copyright 2022 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.server.wifi;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.app.ActivityOptions;
-import android.content.ComponentName;
-import android.content.Intent;
-import android.net.wifi.WifiContext;
-import android.net.wifi.WifiManager;
-import android.os.Bundle;
-import android.os.UserHandle;
-import android.view.Display;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.test.filters.SmallTest;
-
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.WifiDialogManager.DialogHandle;
-import com.android.server.wifi.WifiDialogManager.P2pInvitationReceivedDialogCallback;
-import com.android.server.wifi.WifiDialogManager.SimpleDialogCallback;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-/**
- * Unit tests for {@link WifiDialogManager}.
- */
-@SmallTest
-public class WifiDialogManagerTest extends WifiBaseTest {
-    private static final int TIMEOUT_MILLIS = 30_000;
-    private static final String TEST_TITLE = "Title";
-    private static final String TEST_MESSAGE = "Message";
-    private static final String TEST_POSITIVE_BUTTON_TEXT = "Yes";
-    private static final String TEST_NEGATIVE_BUTTON_TEXT = "No";
-    private static final String TEST_NEUTRAL_BUTTON_TEXT = "Maybe";
-    private static final String TEST_DEVICE_NAME = "TEST_DEVICE_NAME";
-    private static final String WIFI_DIALOG_APK_PKG_NAME = "WifiDialogApkPkgName";
-
-    @Mock WifiContext mWifiContext;
-    @Mock WifiThreadRunner mWifiThreadRunner;
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        when(mWifiContext.getWifiDialogApkPkgName()).thenReturn(WIFI_DIALOG_APK_PKG_NAME);
-        doThrow(SecurityException.class).when(mWifiContext).startActivityAsUser(any(), any(),
-                any());
-    }
-
-    private void dispatchMockWifiThreadRunner(WifiThreadRunner wifiThreadRunner) {
-        ArgumentCaptor<Runnable> runnableArgumentCaptor = ArgumentCaptor.forClass(Runnable.class);
-        verify(wifiThreadRunner, atLeastOnce()).post(runnableArgumentCaptor.capture());
-        runnableArgumentCaptor.getValue().run();
-    }
-
-    /**
-     * Helper method to synchronously call {@link DialogHandle#launchDialog(long)}.
-     * @param dialogHandle     Dialog handle to call on.
-     * @param timeoutMs        Timeout for {@link DialogHandle#launchDialog(long)}.
-     * @param wifiThreadRunner Main Wi-Fi thread runner of the WifiDialogManager.
-     */
-    private void launchDialogSynchronous(
-            @NonNull DialogHandle dialogHandle,
-            long timeoutMs,
-            @NonNull WifiThreadRunner wifiThreadRunner) {
-        dialogHandle.launchDialog(timeoutMs);
-        ArgumentCaptor<Runnable> launchRunnableArgumentCaptor =
-                ArgumentCaptor.forClass(Runnable.class);
-        verify(wifiThreadRunner, atLeastOnce()).post(launchRunnableArgumentCaptor.capture());
-        launchRunnableArgumentCaptor.getValue().run();
-    }
-
-    /**
-     * Helper method to synchronously call {@link DialogHandle#dismissDialog()}.
-     * @param dialogHandle     Dialog handle to call on.
-     * @param wifiThreadRunner Main Wi-Fi thread runner of the WifiDialogManager.
-     */
-    private void dismissDialogSynchronous(
-            @NonNull DialogHandle dialogHandle,
-            @NonNull WifiThreadRunner wifiThreadRunner) {
-        dialogHandle.dismissDialog();
-        ArgumentCaptor<Runnable> dismissRunnableArgumentCaptor =
-                ArgumentCaptor.forClass(Runnable.class);
-        verify(wifiThreadRunner, atLeastOnce()).post(dismissRunnableArgumentCaptor.capture());
-        dismissRunnableArgumentCaptor.getValue().run();
-    }
-
-    /**
-     * Helper method to verify startActivityAsUser was called a given amount of times and return the
-     * last Intent that was sent.
-     */
-    @NonNull
-    private Intent verifyStartActivityAsUser(
-            int times,
-            @NonNull WifiContext wifiContext) {
-        ArgumentCaptor<Intent> intentArgumentCaptor = ArgumentCaptor.forClass(Intent.class);
-        verify(wifiContext, times(times))
-                .startActivityAsUser(intentArgumentCaptor.capture(), eq(UserHandle.CURRENT));
-        return intentArgumentCaptor.getValue();
-    }
-
-    /**
-     * Helper method to verify display-specific startActivityAsUser was called a given amount of
-     * times and return the last Intent that was sent.
-     */
-    @NonNull
-    private Intent verifyStartActivityAsUser(
-            int times,
-            int displayId,
-            @NonNull WifiContext wifiContext) {
-        ArgumentCaptor<Intent> intentArgumentCaptor = ArgumentCaptor.forClass(Intent.class);
-        ArgumentCaptor<Bundle> bundleArgumentCaptor = ArgumentCaptor.forClass(Bundle.class);
-        verify(wifiContext, times(times)).startActivityAsUser(intentArgumentCaptor.capture(),
-                bundleArgumentCaptor.capture(), eq(UserHandle.CURRENT));
-        assertEquals(ActivityOptions.makeBasic().setLaunchDisplayId(
-                        displayId).toBundle().toString(),
-                bundleArgumentCaptor.getValue().toString()); // since can't compare Bundles
-        return intentArgumentCaptor.getValue();
-    }
-
-    /**
-     * Helper method to verify the contents of a dismiss Intent
-     */
-    private void verifyDismissIntent(@NonNull Intent dismissIntent) {
-        assertThat(dismissIntent.getAction()).isEqualTo(WifiManager.ACTION_DISMISS_DIALOG);
-        ComponentName component = dismissIntent.getComponent();
-        assertThat(component.getPackageName()).isEqualTo(WIFI_DIALOG_APK_PKG_NAME);
-        assertThat(component.getClassName())
-                .isEqualTo(WifiDialogManager.WIFI_DIALOG_ACTIVITY_CLASSNAME);
-        assertThat(dismissIntent.hasExtra(WifiManager.EXTRA_DIALOG_ID)).isTrue();
-        int dialogId = dismissIntent.getIntExtra(WifiManager.EXTRA_DIALOG_ID,
-                WifiManager.INVALID_DIALOG_ID);
-        assertThat(dialogId).isNotEqualTo(WifiManager.INVALID_DIALOG_ID);
-    }
-
-    /**
-     * Helper method to verify the contents of a launch Intent for a simple dialog.
-     * @return dialog id of the Intent.
-     */
-    private int verifySimpleDialogLaunchIntent(
-            @NonNull Intent launchIntent,
-            @Nullable String expectedTitle,
-            @Nullable String expectedMessage,
-            @Nullable String expectedPositiveButtonText,
-            @Nullable String expectedNegativeButtonText,
-            @Nullable String expectedNeutralButtonText) {
-        assertThat(launchIntent.getAction()).isEqualTo(WifiManager.ACTION_LAUNCH_DIALOG);
-        ComponentName component = launchIntent.getComponent();
-        assertThat(component.getPackageName()).isEqualTo(WIFI_DIALOG_APK_PKG_NAME);
-        assertThat(component.getClassName())
-                .isEqualTo(WifiDialogManager.WIFI_DIALOG_ACTIVITY_CLASSNAME);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_DIALOG_ID)).isTrue();
-        int dialogId = launchIntent.getIntExtra(WifiManager.EXTRA_DIALOG_ID,
-                WifiManager.INVALID_DIALOG_ID);
-        assertThat(dialogId).isNotEqualTo(WifiManager.INVALID_DIALOG_ID);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_DIALOG_TYPE)).isTrue();
-        assertThat(launchIntent.getIntExtra(WifiManager.EXTRA_DIALOG_TYPE,
-                WifiManager.DIALOG_TYPE_UNKNOWN))
-                .isEqualTo(WifiManager.DIALOG_TYPE_SIMPLE);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_DIALOG_TITLE)).isTrue();
-        assertThat(launchIntent.getStringExtra(WifiManager.EXTRA_DIALOG_TITLE))
-                .isEqualTo(expectedTitle);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_DIALOG_MESSAGE)).isTrue();
-        assertThat(launchIntent.getStringExtra(WifiManager.EXTRA_DIALOG_MESSAGE))
-                .isEqualTo(expectedMessage);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_DIALOG_POSITIVE_BUTTON_TEXT)).isTrue();
-        assertThat(launchIntent.getStringExtra(WifiManager.EXTRA_DIALOG_POSITIVE_BUTTON_TEXT))
-                .isEqualTo(expectedPositiveButtonText);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_DIALOG_NEGATIVE_BUTTON_TEXT)).isTrue();
-        assertThat(launchIntent.getStringExtra(WifiManager.EXTRA_DIALOG_NEGATIVE_BUTTON_TEXT))
-                .isEqualTo(expectedNegativeButtonText);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_DIALOG_NEUTRAL_BUTTON_TEXT)).isTrue();
-        assertThat(launchIntent.getStringExtra(WifiManager.EXTRA_DIALOG_NEUTRAL_BUTTON_TEXT))
-                .isEqualTo(expectedNeutralButtonText);
-        return dialogId;
-    }
-
-    /**
-     * Verifies that launching a simple dialog will result in the correct callback methods invoked
-     * when a response is received.
-     */
-    @Test
-    public void testSimpleDialog_launchAndResponse_notifiesCallback() {
-        SimpleDialogCallback callback = mock(SimpleDialogCallback.class);
-        WifiThreadRunner callbackThreadRunner = mock(WifiThreadRunner.class);
-        WifiDialogManager wifiDialogManager =
-                new WifiDialogManager(mWifiContext, mWifiThreadRunner);
-
-        // Positive
-        DialogHandle dialogHandle = wifiDialogManager.createSimpleDialog(TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        Intent intent = verifyStartActivityAsUser(1, mWifiContext);
-        int dialogId = verifySimpleDialogLaunchIntent(intent, TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT);
-        wifiDialogManager.replyToSimpleDialog(dialogId, WifiManager.DIALOG_REPLY_POSITIVE);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(1)).onPositiveButtonClicked();
-        verify(callback, times(0)).onNegativeButtonClicked();
-        verify(callback, times(0)).onNeutralButtonClicked();
-        verify(callback, times(0)).onCancelled();
-
-        // Positive again -- callback should be removed from callback list, so a second notification
-        // should be ignored.
-        wifiDialogManager.replyToSimpleDialog(dialogId, WifiManager.DIALOG_REPLY_POSITIVE);
-        verify(callback, times(1)).onPositiveButtonClicked();
-        verify(callback, times(0)).onNegativeButtonClicked();
-        verify(callback, times(0)).onNeutralButtonClicked();
-        verify(callback, times(0)).onCancelled();
-
-        // Negative
-        dialogHandle = wifiDialogManager.createSimpleDialog(TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(2, mWifiContext);
-        dialogId = verifySimpleDialogLaunchIntent(intent, TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT);
-        wifiDialogManager.replyToSimpleDialog(dialogId, WifiManager.DIALOG_REPLY_NEGATIVE);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(1)).onPositiveButtonClicked();
-        verify(callback, times(1)).onNegativeButtonClicked();
-        verify(callback, times(0)).onNeutralButtonClicked();
-        verify(callback, times(0)).onCancelled();
-
-        // Neutral
-        dialogHandle = wifiDialogManager.createSimpleDialog(
-                TEST_TITLE, TEST_MESSAGE, TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT,
-                TEST_NEUTRAL_BUTTON_TEXT, callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(3, mWifiContext);
-        dialogId = verifySimpleDialogLaunchIntent(intent, TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT);
-        wifiDialogManager.replyToSimpleDialog(dialogId, WifiManager.DIALOG_REPLY_NEUTRAL);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(1)).onPositiveButtonClicked();
-        verify(callback, times(1)).onNegativeButtonClicked();
-        verify(callback, times(1)).onNeutralButtonClicked();
-        verify(callback, times(0)).onCancelled();
-
-        // Cancelled
-        dialogHandle = wifiDialogManager.createSimpleDialog(TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(4, mWifiContext);
-        dialogId = verifySimpleDialogLaunchIntent(intent, TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT);
-        wifiDialogManager.replyToSimpleDialog(dialogId, WifiManager.DIALOG_REPLY_CANCELLED);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(1)).onPositiveButtonClicked();
-        verify(callback, times(1)).onNegativeButtonClicked();
-        verify(callback, times(1)).onNeutralButtonClicked();
-        verify(callback, times(1)).onCancelled();
-    }
-
-    /**
-     * Verifies that launching a simple dialog and dismissing it will send a dismiss intent and
-     * prevent future replies to the original dialog id from notifying the callback.
-     */
-    @Test
-    public void testSimpleDialog_launchAndDismiss_dismissesDialog() {
-        SimpleDialogCallback callback = mock(SimpleDialogCallback.class);
-        WifiThreadRunner callbackThreadRunner = mock(WifiThreadRunner.class);
-        WifiDialogManager wifiDialogManager =
-                new WifiDialogManager(mWifiContext, mWifiThreadRunner);
-
-        // Launch and dismiss dialog.
-        DialogHandle dialogHandle = wifiDialogManager.createSimpleDialog(TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        Intent intent = verifyStartActivityAsUser(1, mWifiContext);
-        int dialogId = verifySimpleDialogLaunchIntent(intent, TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT);
-        dismissDialogSynchronous(dialogHandle, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(2, mWifiContext);
-        verifyDismissIntent(intent);
-
-        // A reply to the same dialog id should not trigger callback
-        wifiDialogManager.replyToSimpleDialog(dialogId, WifiManager.DIALOG_REPLY_POSITIVE);
-        verify(callbackThreadRunner, never()).post(any());
-        verify(callback, times(0)).onPositiveButtonClicked();
-
-        // Another call to dismiss should not send another dismiss intent.
-        dismissDialogSynchronous(dialogHandle, mWifiThreadRunner);
-        verifyStartActivityAsUser(2, mWifiContext);
-
-        // Launch dialog again
-        dialogHandle = wifiDialogManager.createSimpleDialog(TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(3, mWifiContext);
-        dialogId = verifySimpleDialogLaunchIntent(intent, TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT);
-
-        // Callback should receive replies to the corresponding dialogId now.
-        wifiDialogManager.replyToSimpleDialog(dialogId, WifiManager.DIALOG_REPLY_POSITIVE);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(1)).onPositiveButtonClicked();
-    }
-
-    /**
-     * Verifies the right callback is notified for a response to a simple dialog.
-     */
-    @Test
-    public void testSimpleDialog_multipleDialogs_responseMatchedToCorrectCallback() {
-        WifiThreadRunner callbackThreadRunner = mock(WifiThreadRunner.class);
-        WifiDialogManager wifiDialogManager =
-                new WifiDialogManager(mWifiContext, mWifiThreadRunner);
-
-        // Launch Dialog1
-        SimpleDialogCallback callback1 = mock(SimpleDialogCallback.class);
-        DialogHandle dialogHandle1 = wifiDialogManager.createSimpleDialog(TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT,
-                callback1, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle1, 0, mWifiThreadRunner);
-        Intent intent = verifyStartActivityAsUser(1, mWifiContext);
-        int dialogId1 = verifySimpleDialogLaunchIntent(intent, TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT);
-
-        // Launch Dialog2
-        SimpleDialogCallback callback2 = mock(SimpleDialogCallback.class);
-        DialogHandle dialogHandle2 = wifiDialogManager.createSimpleDialog(TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT,
-                callback2, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle2, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(2, mWifiContext);
-        int dialogId2 = verifySimpleDialogLaunchIntent(intent, TEST_TITLE, TEST_MESSAGE,
-                TEST_POSITIVE_BUTTON_TEXT, TEST_NEGATIVE_BUTTON_TEXT, TEST_NEUTRAL_BUTTON_TEXT);
-
-        // callback1 notified
-        wifiDialogManager.replyToSimpleDialog(dialogId1, WifiManager.DIALOG_REPLY_POSITIVE);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback1, times(1)).onPositiveButtonClicked();
-        verify(callback2, times(0)).onPositiveButtonClicked();
-
-        // callback2 notified
-        wifiDialogManager.replyToSimpleDialog(dialogId2, WifiManager.DIALOG_REPLY_POSITIVE);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback1, times(1)).onPositiveButtonClicked();
-        verify(callback2, times(1)).onPositiveButtonClicked();
-    }
-
-    /**
-     * Helper method to verify the contents of a launch Intent for a P2P Invitation Received dialog.
-     * @return dialog id of the Intent.
-     */
-    private int verifyP2pInvitationReceivedDialogLaunchIntent(
-            @NonNull Intent launchIntent,
-            String expectedDeviceName,
-            boolean expectedIsPinRequested,
-            @Nullable String expectedDisplayPin) {
-        assertThat(launchIntent.getAction()).isEqualTo(WifiManager.ACTION_LAUNCH_DIALOG);
-        ComponentName component = launchIntent.getComponent();
-        assertThat(component.getPackageName()).isEqualTo(WIFI_DIALOG_APK_PKG_NAME);
-        assertThat(component.getClassName())
-                .isEqualTo(WifiDialogManager.WIFI_DIALOG_ACTIVITY_CLASSNAME);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_DIALOG_ID)).isTrue();
-        int dialogId = launchIntent.getIntExtra(WifiManager.EXTRA_DIALOG_ID, -1);
-        assertThat(dialogId).isNotEqualTo(-1);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_DIALOG_TYPE)).isTrue();
-        assertThat(launchIntent.getIntExtra(WifiManager.EXTRA_DIALOG_TYPE,
-                WifiManager.DIALOG_TYPE_UNKNOWN))
-                .isEqualTo(WifiManager.DIALOG_TYPE_P2P_INVITATION_RECEIVED);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_P2P_DEVICE_NAME)).isTrue();
-        assertThat(launchIntent.getStringExtra(WifiManager.EXTRA_P2P_DEVICE_NAME))
-                .isEqualTo(expectedDeviceName);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_P2P_PIN_REQUESTED)).isTrue();
-        assertThat(launchIntent.getBooleanExtra(WifiManager.EXTRA_P2P_PIN_REQUESTED, false))
-                .isEqualTo(expectedIsPinRequested);
-        assertThat(launchIntent.hasExtra(WifiManager.EXTRA_P2P_DISPLAY_PIN)).isTrue();
-        assertThat(launchIntent.getStringExtra(WifiManager.EXTRA_P2P_DISPLAY_PIN))
-                .isEqualTo(expectedDisplayPin);
-        return dialogId;
-    }
-
-    /**
-     * Verifies that launching a P2P Invitation Received dialog with a callback will result in the
-     * correct callback methods invoked when a response is received.
-     */
-    @Test
-    public void testP2pInvitationReceivedDialog_launchAndResponse_notifiesCallback() {
-        P2pInvitationReceivedDialogCallback callback =
-                mock(P2pInvitationReceivedDialogCallback.class);
-        WifiThreadRunner callbackThreadRunner = mock(WifiThreadRunner.class);
-        WifiDialogManager wifiDialogManager =
-                new WifiDialogManager(mWifiContext, mWifiThreadRunner);
-
-        // Accept without PIN
-        DialogHandle dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        Intent intent = verifyStartActivityAsUser(1, mWifiContext);
-        int dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, false, null);
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, true, null);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(1)).onAccepted(null);
-
-        // Callback should be removed from callback list, so a second notification should be ignored
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, true, "012345");
-        verify(callback, times(0)).onAccepted("012345");
-
-        // Accept with PIN
-        dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, true, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(2, mWifiContext);
-        dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, true, null);
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, true, "012345");
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(1)).onAccepted("012345");
-
-        // Accept with PIN but PIN was not requested
-        dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, 123, callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        if (SdkLevel.isAtLeastT()) {
-            verifyStartActivityAsUser(1, 123, mWifiContext);
-        }
-        intent = verifyStartActivityAsUser(3, mWifiContext);
-        dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, false, null);
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, true, "012345");
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(2)).onAccepted("012345");
-
-        // Accept without PIN but PIN was requested
-        dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, true, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(4, mWifiContext);
-        dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, true, null);
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, true, null);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(2)).onAccepted(null);
-
-        // Decline without PIN
-        dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(5, mWifiContext);
-        dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, false, null);
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, false, null);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(1)).onDeclined();
-
-        // Decline with PIN
-        dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, true, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(6, mWifiContext);
-        dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, true, null);
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, false, "012345");
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(2)).onDeclined();
-
-        // Decline with PIN but PIN was not requested
-        dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(7, mWifiContext);
-        dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, false, null);
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, false, "012345");
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(3)).onDeclined();
-
-        // Decline without PIN but PIN was requested
-        dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, true, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(8, mWifiContext);
-        dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, true, null);
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, false, null);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(4)).onDeclined();
-    }
-
-    /**
-     * Verifies that launching a simple dialog and dismissing it will send a dismiss intent and
-     * prevent future replies to the original dialog id from notifying the callback.
-     */
-    @Test
-    public void testP2pInvitationReceivedDialog_launchAndDismiss_dismissesDialog() {
-        P2pInvitationReceivedDialogCallback callback =
-                mock(P2pInvitationReceivedDialogCallback.class);
-        WifiThreadRunner callbackThreadRunner = mock(WifiThreadRunner.class);
-        WifiDialogManager wifiDialogManager =
-                new WifiDialogManager(mWifiContext, mWifiThreadRunner);
-
-        // Launch and dismiss dialog.
-        DialogHandle dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        Intent intent = verifyStartActivityAsUser(1, mWifiContext);
-        int dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, false, null);
-        dismissDialogSynchronous(dialogHandle, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(2, mWifiContext);
-        verifyDismissIntent(intent);
-
-        // A reply to the same dialog id should not trigger callback
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, true, null);
-        verify(callbackThreadRunner, never()).post(any());
-        verify(callback, times(0)).onAccepted(null);
-
-        // Another call to dismiss should not send another dismiss intent.
-        dismissDialogSynchronous(dialogHandle, mWifiThreadRunner);
-        verifyStartActivityAsUser(2, mWifiContext);
-
-        // Launch dialog again
-        dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(3, mWifiContext);
-        dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, false, null);
-
-        // Callback should receive replies to the corresponding dialogId now.
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, true, null);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback, times(1)).onAccepted(null);
-    }
-
-    /**
-     * Verifies the right callback is notified for a response to a P2P Invitation Received dialog.
-     */
-    @Test
-    public void testP2pInvitationReceivedDialog_multipleDialogs_responseMatchedToCorrectCallback() {
-        WifiDialogManager wifiDialogManager =
-                new WifiDialogManager(mWifiContext, mWifiThreadRunner);
-
-        // Launch Dialog1
-        P2pInvitationReceivedDialogCallback callback1 =
-                mock(P2pInvitationReceivedDialogCallback.class);
-        WifiThreadRunner callbackThreadRunner = mock(WifiThreadRunner.class);
-        DialogHandle dialogHandle1 = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, Display.DEFAULT_DISPLAY,
-                callback1, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle1, 0, mWifiThreadRunner);
-        Intent intent1 = verifyStartActivityAsUser(1, mWifiContext);
-        int dialogId1 = verifyP2pInvitationReceivedDialogLaunchIntent(intent1,
-                TEST_DEVICE_NAME, false, null);
-
-        // Launch Dialog2
-        P2pInvitationReceivedDialogCallback callback2 =
-                mock(P2pInvitationReceivedDialogCallback.class);
-        DialogHandle dialogHandle2 = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, Display.DEFAULT_DISPLAY,
-                callback2, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle2, 0, mWifiThreadRunner);
-        Intent intent2 = verifyStartActivityAsUser(2, mWifiContext);
-        int dialogId2 = verifyP2pInvitationReceivedDialogLaunchIntent(intent2,
-                TEST_DEVICE_NAME, false, null);
-
-        // callback1 notified
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId1, true, null);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback1, times(1)).onAccepted(null);
-        verify(callback2, times(0)).onAccepted(null);
-
-        // callback2 notified
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId2, true, null);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback1, times(1)).onAccepted(null);
-        verify(callback2, times(1)).onAccepted(null);
-    }
-
-    /**
-     * Verifies that a P2P Invitation Received dialog is cancelled after the specified timeout
-     */
-    @Test
-    public void testP2pInvitationReceivedDialog_timeout_cancelsDialog() {
-        WifiDialogManager wifiDialogManager =
-                new WifiDialogManager(mWifiContext, mWifiThreadRunner);
-
-        // Launch Dialog without timeout.
-        P2pInvitationReceivedDialogCallback callback =
-                mock(P2pInvitationReceivedDialogCallback.class);
-        WifiThreadRunner callbackThreadRunner = mock(WifiThreadRunner.class);
-        DialogHandle dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, 0, mWifiThreadRunner);
-        Intent intent = verifyStartActivityAsUser(1, mWifiContext);
-        int dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, false, null);
-
-        // Verify cancel runnable wasn't posted.
-        verify(mWifiThreadRunner, never()).postDelayed(any(Runnable.class), anyInt());
-
-        // Launch Dialog with timeout
-        callback = mock(P2pInvitationReceivedDialogCallback.class);
-        dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, TIMEOUT_MILLIS, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(2, mWifiContext);
-        dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, false, null);
-
-        // Verify the timeout runnable was posted and run it.
-        ArgumentCaptor<Runnable> runnableArgumentCaptor = ArgumentCaptor.forClass(Runnable.class);
-        verify(mWifiThreadRunner, times(1))
-                .postDelayed(runnableArgumentCaptor.capture(), eq((long) TIMEOUT_MILLIS));
-        runnableArgumentCaptor.getValue().run();
-
-        // Verify that a dismiss Intent was sent and the callback was declined.
-        intent = verifyStartActivityAsUser(3, mWifiContext);
-        assertThat(intent.getAction()).isEqualTo(WifiManager.ACTION_DISMISS_DIALOG);
-        ComponentName component = intent.getComponent();
-        assertThat(component.getPackageName()).isEqualTo(WIFI_DIALOG_APK_PKG_NAME);
-        assertThat(component.getClassName())
-                .isEqualTo(WifiDialogManager.WIFI_DIALOG_ACTIVITY_CLASSNAME);
-        assertThat(intent.hasExtra(WifiManager.EXTRA_DIALOG_ID)).isTrue();
-        assertThat(intent.getIntExtra(WifiManager.EXTRA_DIALOG_ID, -1)).isEqualTo(dialogId);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-        verify(callback).onDeclined();
-
-        // Launch Dialog with timeout
-        callback = mock(P2pInvitationReceivedDialogCallback.class);
-        dialogHandle = wifiDialogManager.createP2pInvitationReceivedDialog(
-                TEST_DEVICE_NAME, false, null, Display.DEFAULT_DISPLAY,
-                callback, callbackThreadRunner);
-        launchDialogSynchronous(dialogHandle, TIMEOUT_MILLIS, mWifiThreadRunner);
-        intent = verifyStartActivityAsUser(4, mWifiContext);
-        dialogId = verifyP2pInvitationReceivedDialogLaunchIntent(intent,
-                TEST_DEVICE_NAME, false, null);
-        // Reply before the timeout is over
-        wifiDialogManager.replyToP2pInvitationReceivedDialog(dialogId, true, null);
-        dispatchMockWifiThreadRunner(callbackThreadRunner);
-
-        // Verify callback was replied to, and the cancel runnable was posted but then removed.
-        verify(callback).onAccepted(null);
-        verify(callback, never()).onDeclined();
-        verify(mWifiThreadRunner, times(2))
-                .postDelayed(runnableArgumentCaptor.capture(), eq((long) TIMEOUT_MILLIS));
-        verify(mWifiThreadRunner).removeCallbacks(runnableArgumentCaptor.getValue());
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiGlobalsTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiGlobalsTest.java
index 12a91ff..e3e9274 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiGlobalsTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiGlobalsTest.java
@@ -52,7 +52,6 @@
         mResources = new MockResources();
         mResources.setInteger(R.integer.config_wifiPollRssiIntervalMilliseconds, 3000);
         mResources.setInteger(R.integer.config_wifiClientModeImplNumLogRecs, 200);
-        mResources.setBoolean(R.bool.config_wifiSaveFactoryMacToWifiConfigStore, true);
         when(mContext.getResources()).thenReturn(mResources);
 
         mWifiGlobals = new WifiGlobals(mContext);
@@ -123,9 +122,4 @@
     public void testNumLogRecsNormalIsSetCorrectly() throws Exception {
         assertEquals(200, mWifiGlobals.getClientModeImplNumLogRecs());
     }
-
-    @Test
-    public void testSaveFactoryMacToConfigStoreEnabled() throws Exception {
-        assertEquals(true, mWifiGlobals.isSaveFactoryMacToConfigStoreEnabled());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiHealthMonitorTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiHealthMonitorTest.java
index b186ab7..8fe1c07 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiHealthMonitorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiHealthMonitorTest.java
@@ -77,8 +77,8 @@
 @SmallTest
 public class WifiHealthMonitorTest extends WifiBaseTest {
 
-    static final WifiSsid TEST_SSID_1 = WifiSsid.fromUtf8Text("Joe's Place");
-    static final WifiSsid TEST_SSID_2 = WifiSsid.fromUtf8Text("Poe's Place");
+    static final WifiSsid TEST_SSID_1 = WifiSsid.createFromAsciiEncoded("Joe's Place");
+    static final WifiSsid TEST_SSID_2 = WifiSsid.createFromAsciiEncoded("Poe's Place");
     static final MacAddress TEST_BSSID_1 = MacAddress.fromString("aa:bb:cc:dd:ee:ff");
     private static final long CURRENT_ELAPSED_TIME_MS = 1000;
     private static final String WIFI_IFACE_NAME = "wlanTest";
@@ -176,7 +176,7 @@
         mWifiConfigManager = mockConfigManager();
 
         mWifiScoreCard = new WifiScoreCard(mClock, "some seed", mDeviceConfigFacade,
-                mContext);
+                mFrameworkFacade, mContext);
         mAlarmManager = new TestAlarmManager();
         when(mContext.getSystemService(Context.ALARM_SERVICE))
                 .thenReturn(mAlarmManager.getAlarmManager());
@@ -238,7 +238,7 @@
         mWifiHealthMonitor = new WifiHealthMonitor(mContext, mWifiInjector, mClock,
                 mWifiConfigManager, mWifiScoreCard, new Handler(mLooper.getLooper()), mWifiNative,
                 "some seed", mDeviceConfigFacade, mActiveModeWarden);
-        mLooper.dispatchAll();
+
         ArgumentCaptor<ModeChangeCallback> modeChangeCallbackArgumentCaptor =
                 ArgumentCaptor.forClass(ModeChangeCallback.class);
         verify(mActiveModeWarden).registerModeChangeCallback(
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiInjectorTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiInjectorTest.java
index ff27317..6af10d0 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiInjectorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiInjectorTest.java
@@ -16,8 +16,6 @@
 
 package com.android.server.wifi;
 
-import android.net.wifi.WifiContext;
-
 import androidx.test.filters.SmallTest;
 
 import org.junit.Before;
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java
index ba1dc64..ec699ab 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiLastResortWatchdogTest.java
@@ -79,7 +79,7 @@
     private static final int TEST_NETWORK_ID = 47;
     private static final int TEST_NETWORK_ID_2 = 54;
     private static final WifiSsid TEST_WIFI_SSID =
-            WifiSsid.fromBytes(new byte[]{'a', 'b', 'c'});
+            WifiSsid.createFromByteArray(new byte[]{'a', 'b', 'c'});
 
     @Before
     public void setUp() throws Exception {
@@ -118,7 +118,7 @@
         long timeStamp = System.currentTimeMillis();
         for (int index = 0; index < ssids.length; index++) {
             String ssid = ssids[index].replaceAll("^\"+", "").replaceAll("\"+$", "");
-            ScanDetail scanDetail = new ScanDetail(WifiSsid.fromUtf8Text(ssid),
+            ScanDetail scanDetail = new ScanDetail(WifiSsid.createFromAsciiEncoded(ssid),
                     bssids[index], caps[index], levels[index], frequencies[index], timeStamp,
                     0);
             WifiConfiguration config = null;
@@ -142,7 +142,7 @@
         long timeStamp = System.currentTimeMillis();
         for (int index = 0; index < ssids.length; index++) {
             String ssid = ssids[index].replaceAll("^\"+", "").replaceAll("\"+$", "");
-            ScanDetail scanDetail = new ScanDetail(WifiSsid.fromUtf8Text(ssid),
+            ScanDetail scanDetail = new ScanDetail(WifiSsid.createFromAsciiEncoded(ssid),
                     bssids[index], caps[index], levels[index], frequencies[index], timeStamp,
                     0);
             WifiConfiguration config = null;
@@ -1654,7 +1654,7 @@
         List<Pair<ScanDetail, WifiConfiguration>> candidates =
                 new ArrayList<Pair<ScanDetail, WifiConfiguration>>();
         String ssid = mSsids[0].replaceAll("^\"+", "").replaceAll("\"+$", "");
-        ScanDetail scanDetail = new ScanDetail(WifiSsid.fromUtf8Text(ssid),
+        ScanDetail scanDetail = new ScanDetail(WifiSsid.createFromAsciiEncoded(ssid),
                 mBssids[0], mCaps[0], mLevels[0], mFrequencies[0], System.currentTimeMillis(), 0);
         WifiConfiguration config = mock(WifiConfiguration.class);
         WifiConfiguration.NetworkSelectionStatus networkSelectionStatus =
@@ -1691,7 +1691,7 @@
         List<Pair<ScanDetail, WifiConfiguration>> candidates =
                 new ArrayList<Pair<ScanDetail, WifiConfiguration>>();
         String ssid = mSsids[0].replaceAll("^\"+", "").replaceAll("\"+$", "");
-        ScanDetail scanDetail = new ScanDetail(WifiSsid.fromUtf8Text(ssid),
+        ScanDetail scanDetail = new ScanDetail(WifiSsid.createFromAsciiEncoded(ssid),
                 mBssids[0], mCaps[0], mLevels[0], mFrequencies[0], System.currentTimeMillis(), 0);
         WifiConfiguration configHasEverConnectedFalse = mock(WifiConfiguration.class);
         WifiConfiguration.NetworkSelectionStatus networkSelectionStatusFalse =
@@ -1739,7 +1739,7 @@
         List<Pair<ScanDetail, WifiConfiguration>> candidates =
                 new ArrayList<Pair<ScanDetail, WifiConfiguration>>();
         String ssid = mSsids[0].replaceAll("^\"+", "").replaceAll("\"+$", "");
-        ScanDetail scanDetail = new ScanDetail(WifiSsid.fromUtf8Text(ssid),
+        ScanDetail scanDetail = new ScanDetail(WifiSsid.createFromAsciiEncoded(ssid),
                 mBssids[0], mCaps[0], mLevels[0], mFrequencies[0], System.currentTimeMillis(), 0);
 
         WifiConfiguration configHasEverConnectedTrue = mock(WifiConfiguration.class);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiLockManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiLockManagerTest.java
index 15e35dc..cac37ea 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiLockManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiLockManagerTest.java
@@ -19,7 +19,6 @@
 import static android.content.Intent.ACTION_SCREEN_OFF;
 import static android.content.Intent.ACTION_SCREEN_ON;
 
-import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_LOCAL_ONLY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_PRIMARY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_TRANSIENT;
 
@@ -42,6 +41,8 @@
 
 import androidx.test.filters.SmallTest;
 
+import com.android.server.wifi.ActiveModeWarden.PrimaryClientModeManagerChangedCallback;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
@@ -52,8 +53,6 @@
 
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.List;
 import java.util.NoSuchElementException;
 
 /** Unit tests for {@link WifiLockManager}. */
@@ -87,6 +86,7 @@
     TestLooper mLooper;
     Handler mHandler;
     @Captor ArgumentCaptor<BroadcastReceiver> mBroadcastReceiverCaptor;
+    @Captor ArgumentCaptor<PrimaryClientModeManagerChangedCallback> mPrimaryChangedCallbackCaptor;
 
     /**
      * Method to setup a WifiLockManager for the tests.
@@ -115,6 +115,8 @@
                 mActiveModeWarden, mFrameworkFacade, mHandler, mClock, mWifiMetrics);
         verify(mContext, atLeastOnce()).registerReceiver(
                 mBroadcastReceiverCaptor.capture(), any(), any(), any());
+        verify(mActiveModeWarden).registerPrimaryClientModeManagerChangedCallback(
+                mPrimaryChangedCallbackCaptor.capture());
     }
 
     private void acquireWifiLockSuccessful(int lockMode, String tag, IBinder binder, WorkSource ws)
@@ -394,7 +396,7 @@
                 mBinder, mWorkSource);
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK, false);
+        verify(mClientModeManager).setPowerSave(false);
     }
 
     /**
@@ -404,21 +406,18 @@
     @Test
     public void testHiPerfLockReleaseCauseEnablePS() throws Exception {
         InOrder inOrder = inOrder(mClientModeManager);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
 
         acquireWifiLockSuccessful(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "",
                 mBinder, mWorkSource);
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         releaseWifiLockSuccessful(mBinder);
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_HIGH_PERF),
                 anyLong());
     }
@@ -430,24 +429,21 @@
     @Test
     public void testHiPerfLockAcquireReleaseTwice() throws Exception {
         InOrder inOrder = inOrder(mClientModeManager);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
 
         // Acquire the first lock
         acquireWifiLockSuccessful(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "",
                 mBinder, mWorkSource);
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         // Now acquire another lock
         acquireWifiLockSuccessful(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "",
                 mBinder2, mWorkSource);
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         // Release the first lock
         releaseWifiLockSuccessful(mBinder);
@@ -456,8 +452,7 @@
 
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         // Release the second lock
         releaseWifiLockSuccessful(mBinder2);
@@ -465,8 +460,7 @@
                 anyLong());
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_HIGH_PERF),
                 anyLong());
     }
@@ -482,38 +476,33 @@
         WorkSource scanOnlyLockWS = new WorkSource(DEFAULT_TEST_UID_2);
 
         InOrder inOrder = inOrder(mClientModeManager);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
 
         // Acquire the first lock as FULL
         assertTrue(mWifiLockManager.acquireWifiLock(WifiManager.WIFI_MODE_FULL, "",
                 fullLockBinder, fullLockWS));
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         // Now acquire another lock with SCAN-ONLY
         assertTrue(mWifiLockManager.acquireWifiLock(WifiManager.WIFI_MODE_SCAN_ONLY, "",
                 scanOnlyLockBinder, scanOnlyLockWS));
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         // Release the FULL lock
         releaseWifiLockSuccessful_noBatteryStats(fullLockBinder);
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         // Release the SCAN-ONLY lock
         releaseWifiLockSuccessful_noBatteryStats(scanOnlyLockBinder);
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
     }
 
     /**
@@ -527,24 +516,20 @@
         WorkSource fullLockWS = new WorkSource(DEFAULT_TEST_UID_1);
 
         InOrder inOrder = inOrder(mClientModeManager);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(false);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(false);
         acquireWifiLockSuccessful(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "",
                 mBinder, mWorkSource);
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         // Now attempting adding some other lock, WifiLockManager should retry setPowerSave()
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
         assertTrue(mWifiLockManager.acquireWifiLock(WifiManager.WIFI_MODE_FULL, "",
                 fullLockBinder, fullLockWS));
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
     }
 
     /**
@@ -558,36 +543,30 @@
         WorkSource fullLockWS = new WorkSource(DEFAULT_TEST_UID_1);
 
         InOrder inOrder = inOrder(mClientModeManager);
-        when(mClientModeManager.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false)).thenReturn(true);
-        when(mClientModeManager.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true)).thenReturn(false);
+        when(mClientModeManager.setPowerSave(false)).thenReturn(true);
+        when(mClientModeManager.setPowerSave(true)).thenReturn(false);
 
         acquireWifiLockSuccessful(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "",
                 mBinder, mWorkSource);
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         releaseWifiLockSuccessful(mBinder);
         verify(mWifiMetrics).addWifiLockAcqSession(eq(WifiManager.WIFI_MODE_FULL_HIGH_PERF),
                 anyLong());
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics, never()).addWifiLockActiveSession(anyInt(), anyLong());
 
         // Now attempting adding some other lock, WifiLockManager should retry setPowerSave()
-        when(mClientModeManager.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true)).thenReturn(true);
+        when(mClientModeManager.setPowerSave(true)).thenReturn(true);
         assertTrue(mWifiLockManager.acquireWifiLock(WifiManager.WIFI_MODE_FULL, "",
                 fullLockBinder, fullLockWS));
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_HIGH_PERF),
                 anyLong());
     }
@@ -598,8 +577,7 @@
      */
     @Test
     public void testForceHiPerf() throws Exception {
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
         InOrder inOrder = inOrder(mClientModeManager);
         mWifiLockManager.updateWifiClientConnected(mClientModeManager, true);
         assertTrue(mWifiLockManager.acquireWifiLock(WifiManager.WIFI_MODE_SCAN_ONLY, "",
@@ -609,13 +587,11 @@
         assertTrue(mWifiLockManager.forceHiPerfMode(true));
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
         assertTrue(mWifiLockManager.forceHiPerfMode(false));
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_HIGH_PERF),
                 anyLong());
     }
@@ -625,36 +601,31 @@
      */
     @Test
     public void testForceHiPerfAcqRelHiPerf() throws Exception {
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
         InOrder inOrder = inOrder(mClientModeManager);
 
         acquireWifiLockSuccessful(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "",
                 mBinder, mWorkSource);
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         assertTrue(mWifiLockManager.forceHiPerfMode(true));
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         releaseWifiLockSuccessful(mBinder);
         verify(mWifiMetrics).addWifiLockAcqSession(eq(WifiManager.WIFI_MODE_FULL_HIGH_PERF),
                 anyLong());
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         assertTrue(mWifiLockManager.forceHiPerfMode(false));
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_HIGH_PERF),
                 anyLong());
     }
@@ -664,22 +635,19 @@
      */
     @Test
     public void testForceHiPerfTwice() throws Exception {
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
         mWifiLockManager.updateWifiClientConnected(mClientModeManager, true);
         InOrder inOrder = inOrder(mClientModeManager);
 
         assertTrue(mWifiLockManager.forceHiPerfMode(true));
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         assertTrue(mWifiLockManager.forceHiPerfMode(true));
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
     }
 
     /**
@@ -687,8 +655,7 @@
      */
     @Test
     public void testForceHiPerfFailure() throws Exception {
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(false);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(false);
         mWifiLockManager.updateWifiClientConnected(mClientModeManager, true);
         InOrder inOrder = inOrder(mClientModeManager);
 
@@ -700,8 +667,7 @@
         assertFalse(mWifiLockManager.forceHiPerfMode(true));
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
     }
 
     /**
@@ -771,7 +737,7 @@
                 mBinder, mWorkSource);
 
         verify(mClientModeManager).setLowLatencyMode(true);
-        verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK, false);
+        verify(mClientModeManager).setPowerSave(false);
     }
 
     /**
@@ -789,7 +755,7 @@
         acquireWifiLockSuccessful(WifiManager.WIFI_MODE_FULL_LOW_LATENCY, "",
                 mBinder, mWorkSource);
 
-        verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK, false);
+        verify(mClientModeManager).setPowerSave(false);
         verify(mClientModeManager, never()).setLowLatencyMode(anyBoolean());
     }
 
@@ -807,23 +773,20 @@
 
         // Make sure setLowLatencyMode() is successful
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
 
         InOrder inOrder = inOrder(mClientModeManager);
 
         acquireWifiLockSuccessful(WifiManager.WIFI_MODE_FULL_LOW_LATENCY, "",
                 mBinder, mWorkSource);
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         releaseLowLatencyWifiLockSuccessful(mBinder);
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(false);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_LOW_LATENCY),
                 anyLong());
     }
@@ -874,16 +837,14 @@
         // Succeed to setLowLatencyMode()
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
         // Fail to setPowerSave()
-        when(mClientModeManager.setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false)).thenReturn(false);
+        when(mClientModeManager.setPowerSave(false)).thenReturn(false);
 
         acquireWifiLockSuccessful(WifiManager.WIFI_MODE_FULL_LOW_LATENCY, "",
                 mBinder, mWorkSource);
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
         inOrder.verify(mClientModeManager).setLowLatencyMode(false);
     }
 
@@ -901,8 +862,7 @@
 
         // Make sure setLowLatencyMode() is successful
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
 
         InOrder inOrder = inOrder(mClientModeManager);
 
@@ -911,15 +871,13 @@
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         setScreenState(false);
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(false);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_LOW_LATENCY),
                 anyLong());
     }
@@ -938,8 +896,7 @@
 
         // Make sure setLowLatencyMode() is successful
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
 
         InOrder inOrder = inOrder(mClientModeManager);
 
@@ -950,8 +907,7 @@
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         /* App going to background */
         mUidImportanceListener.onUidImportance(DEFAULT_TEST_UID_1,
@@ -960,8 +916,7 @@
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(false);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_LOW_LATENCY),
                 anyLong());
     }
@@ -991,8 +946,7 @@
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager, never()).setLowLatencyMode(anyBoolean());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         /* App going to foreground */
         mUidImportanceListener.onUidImportance(DEFAULT_TEST_UID_1,
@@ -1002,8 +956,7 @@
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
     }
 
     /**
@@ -1022,8 +975,7 @@
 
         // Make sure setLowLatencyMode()/setPowerSave() is successful
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
 
         InOrder inOrder = inOrder(mClientModeManager);
 
@@ -1036,8 +988,7 @@
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager, never()).setLowLatencyMode(anyBoolean());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         /* App going to foreground */
         mUidImportanceListener.onUidImportance(DEFAULT_TEST_UID_1,
@@ -1047,13 +998,11 @@
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
 
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_HIGH_PERF),
                 anyLong());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
     }
 
     /**
@@ -1063,8 +1012,7 @@
     @Test
     public void testForceLowLatency() throws Exception {
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
         when(mClientModeManager.getSupportedFeatures())
                 .thenReturn((long) WifiManager.WIFI_FEATURE_LOW_LATENCY);
 
@@ -1078,14 +1026,12 @@
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
         assertTrue(mWifiLockManager.forceLowLatencyMode(false));
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(false);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_LOW_LATENCY),
                 anyLong());
     }
@@ -1096,8 +1042,7 @@
     @Test
     public void testForceLowLatencyScreenOff() throws Exception {
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
         setScreenState(false);
         when(mClientModeManager.getSupportedFeatures())
                 .thenReturn((long) WifiManager.WIFI_FEATURE_LOW_LATENCY);
@@ -1111,22 +1056,19 @@
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         setScreenState(true);
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager, never()).setLowLatencyMode(anyBoolean());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         setScreenState(false);
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager, never()).setLowLatencyMode(anyBoolean());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
     }
 
     /**
@@ -1135,8 +1077,7 @@
     @Test
     public void testForceLowLatencyAcqRelLowLatency() throws Exception {
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
         setScreenState(true);
         when(mFrameworkFacade.isAppForeground(any(), anyInt())).thenReturn(true);
         when(mClientModeManager.getSupportedFeatures())
@@ -1149,29 +1090,25 @@
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         assertTrue(mWifiLockManager.forceLowLatencyMode(true));
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager, never()).setLowLatencyMode(anyBoolean());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         releaseLowLatencyWifiLockSuccessful(mBinder);
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager, never()).setLowLatencyMode(anyBoolean());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
 
         assertTrue(mWifiLockManager.forceLowLatencyMode(false));
         assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(false);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_LOW_LATENCY),
                 anyLong());
     }
@@ -1182,8 +1119,7 @@
     @Test
     public void testForceLowLatencyTwice() throws Exception {
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
         when(mClientModeManager.getSupportedFeatures())
                 .thenReturn((long) WifiManager.WIFI_FEATURE_LOW_LATENCY);
         mWifiLockManager.updateWifiClientConnected(mClientModeManager, true);
@@ -1194,15 +1130,13 @@
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         assertTrue(mWifiLockManager.forceLowLatencyMode(true));
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager, never()).setLowLatencyMode(anyBoolean());
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
     }
 
     /**
@@ -1211,8 +1145,7 @@
     @Test
     public void testForceHiPerfLowLatency() throws Exception {
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
         when(mClientModeManager.getSupportedFeatures())
                 .thenReturn((long) WifiManager.WIFI_FEATURE_LOW_LATENCY);
         mWifiLockManager.updateWifiClientConnected(mClientModeManager, true);
@@ -1221,20 +1154,17 @@
         assertTrue(mWifiLockManager.forceHiPerfMode(true));
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         assertTrue(mWifiLockManager.forceLowLatencyMode(true));
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
 
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_HIGH_PERF),
                 anyLong());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
     }
 
     /**
@@ -1243,8 +1173,7 @@
     @Test
     public void testForceLowLatencyHiPerf() throws Exception {
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
         when(mClientModeManager.getSupportedFeatures())
                 .thenReturn((long) WifiManager.WIFI_FEATURE_LOW_LATENCY);
         mWifiLockManager.updateWifiClientConnected(mClientModeManager, true);
@@ -1255,19 +1184,16 @@
         assertEquals(WifiManager.WIFI_MODE_FULL_LOW_LATENCY,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
 
         assertTrue(mWifiLockManager.forceHiPerfMode(true));
         assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF,
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(false);
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                true);
+        inOrder.verify(mClientModeManager).setPowerSave(true);
         verify(mWifiMetrics).addWifiLockActiveSession(eq(WifiManager.WIFI_MODE_FULL_LOW_LATENCY),
                 anyLong());
-        inOrder.verify(mClientModeManager).setPowerSave(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK,
-                false);
+        inOrder.verify(mClientModeManager).setPowerSave(false);
     }
 
     /**
@@ -1291,8 +1217,7 @@
                 mWifiLockManager.getStrongestLockMode());
         inOrder.verify(mClientModeManager).setLowLatencyMode(true);
         // Since setLowLatencyMode() failed, no call to setPowerSave()
-        inOrder.verify(mClientModeManager, never()).setPowerSave(
-                eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK), anyBoolean());
+        inOrder.verify(mClientModeManager, never()).setPowerSave(anyBoolean());
     }
 
     /**
@@ -1338,44 +1263,55 @@
         verify(mBatteryStats).reportFullWifiLockReleasedFromSource(mWorkSource);
     }
 
+    /**
+     * Test acquiring locks while device is connected, then disconnecting from the AP
+     * Expected: Upon disconnection, lock becomes ineffective
+     */
     @Test
-    public void testWifiLockActiveWithAnyConnection() {
-        when(mClientModeManager.getRole()).thenReturn(ROLE_CLIENT_PRIMARY);
-        when(mClientModeManager2.getRole()).thenReturn(ROLE_CLIENT_LOCAL_ONLY);
-        List<ClientModeManager> clientModeManagers = new ArrayList<>();
-        clientModeManagers.add(mClientModeManager);
-        clientModeManagers.add(mClientModeManager2);
-        when(mActiveModeWarden.getClientModeManagers()).thenReturn(clientModeManagers);
+    public void testSwitchPrimaryClientModeManagerWhileConnected() throws Exception {
+        // Set screen on, and app foreground
+        setScreenState(true);
+        when(mFrameworkFacade.isAppForeground(any(), anyInt())).thenReturn(true);
 
-        // acquire the lock and assert it's not active since there's no wifi connection yet.
-        mWifiLockManager.acquireWifiLock(WifiManager.WIFI_MODE_FULL_HIGH_PERF, "", mBinder,
-                mWorkSource);
-        assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD, mWifiLockManager.getStrongestLockMode());
+        // all operations succeed
+        when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
+        when(mClientModeManager.getSupportedFeatures())
+                .thenReturn(WifiManager.WIFI_FEATURE_LOW_LATENCY);
+        when(mClientModeManager2.setLowLatencyMode(anyBoolean())).thenReturn(true);
+        when(mClientModeManager2.setPowerSave(anyBoolean())).thenReturn(true);
+        when(mClientModeManager2.getSupportedFeatures())
+                .thenReturn(WifiManager.WIFI_FEATURE_LOW_LATENCY);
 
-        // mock a single connection on the local only CMM and verify the lock is active
-        when(mClientModeManager.isConnected()).thenReturn(false);
+        // CMM1 is created
+        mPrimaryChangedCallbackCaptor.getValue().onChange(null, mClientModeManager);
+        // acquire low latency lock
+        acquireWifiLockSuccessful(WifiManager.WIFI_MODE_FULL_LOW_LATENCY, "", mBinder, mWorkSource);
+        // verify CMM1 enabled low latency mode
+        verify(mClientModeManager).setLowLatencyMode(true);
+
+        // CMM2 is connected
         when(mClientModeManager2.isConnected()).thenReturn(true);
         mWifiLockManager.updateWifiClientConnected(mClientModeManager2, true);
-        assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF, mWifiLockManager.getStrongestLockMode());
+        // verify CMM1 didn't disable low latency mode
+        verify(mClientModeManager, never()).setLowLatencyMode(false);
+        // verify CMM2 didn't enable low latency mode
+        verify(mClientModeManager2, never()).setLowLatencyMode(anyBoolean());
 
-        // make another connection and verify the lock is still active.
-        when(mClientModeManager.isConnected()).thenReturn(true);
-        when(mClientModeManager2.isConnected()).thenReturn(true);
-        mWifiLockManager.updateWifiClientConnected(mClientModeManager, true);
-        assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF, mWifiLockManager.getStrongestLockMode());
+        // CMM1 becomes secondary transient
+        when(mClientModeManager.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_TRANSIENT);
+        mPrimaryChangedCallbackCaptor.getValue().onChange(mClientModeManager, null);
 
-        // disconnect the primary, but keep the secondary connected. Verify that the lock is still
-        // active.
-        when(mClientModeManager.isConnected()).thenReturn(false);
-        when(mClientModeManager2.isConnected()).thenReturn(true);
-        mWifiLockManager.updateWifiClientConnected(mClientModeManager, false);
-        assertEquals(WifiManager.WIFI_MODE_FULL_HIGH_PERF, mWifiLockManager.getStrongestLockMode());
+        // CMM1 low latency disabled
+        verify(mClientModeManager).setLowLatencyMode(false);
 
-        // disconnect the secondary. Now verify no more lock is held.
-        when(mClientModeManager.isConnected()).thenReturn(false);
-        when(mClientModeManager2.isConnected()).thenReturn(false);
-        mWifiLockManager.updateWifiClientConnected(mClientModeManager2, false);
-        assertEquals(WifiManager.WIFI_MODE_NO_LOCKS_HELD, mWifiLockManager.getStrongestLockMode());
+        // CMM2 becomes primary
+        when(mClientModeManager2.getRole()).thenReturn(ROLE_CLIENT_PRIMARY);
+        when(mActiveModeWarden.getPrimaryClientModeManager()).thenReturn(mClientModeManager2);
+        mPrimaryChangedCallbackCaptor.getValue().onChange(null, mClientModeManager2);
+
+        // CMM2 low latency enabled
+        verify(mClientModeManager2).setLowLatencyMode(true);
     }
 
     /**
@@ -1390,8 +1326,7 @@
         long releaseTime      = 4000;
 
         // Make sure setPowerSave() is successful
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
 
         InOrder inOrder = inOrder(mWifiMetrics);
 
@@ -1434,8 +1369,7 @@
 
         // Make sure setLowLatencyMode()/setPowerSave() is successful
         when(mClientModeManager.setLowLatencyMode(anyBoolean())).thenReturn(true);
-        when(mClientModeManager.setPowerSave(eq(ClientMode.POWER_SAVE_CLIENT_WIFI_LOCK),
-                anyBoolean())).thenReturn(true);
+        when(mClientModeManager.setPowerSave(anyBoolean())).thenReturn(true);
 
         // Set condition for activation of low-latency (except connection to AP)
         setScreenState(true);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
index 045f8e5..6084a6c 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
@@ -62,7 +62,6 @@
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
-import android.net.MacAddress;
 import android.net.wifi.EAPConstants;
 import android.net.wifi.IOnWifiUsabilityStatsListener;
 import android.net.wifi.ScanResult;
@@ -383,7 +382,7 @@
     private static final boolean TEST_VAL_IS_LOCATION_ENABLED = true;
     private static final boolean IS_SCANNING_ALWAYS_ENABLED = true;
     private static final boolean IS_VERBOSE_LOGGING_ENABLED = true;
-    private static final boolean IS_NON_PERSISTENT_MAC_RANDOMIZATION_FORCE_ENABLED = true;
+    private static final boolean IS_ENHANCED_MAC_RANDOMIZATION_FORCE_ENABLED = true;
     private static final boolean IS_WIFI_WAKE_ENABLED = true;
     private static final int NUM_EMPTY_SCAN_RESULTS = 19;
     private static final int NUM_NON_EMPTY_SCAN_RESULTS = 23;
@@ -609,7 +608,6 @@
         NetworkDetail mockNetworkDetail = mock(NetworkDetail.class);
         ScanResult scanResult = new ScanResult();
         scanResult.SSID = ssid;
-        scanResult.setWifiSsid(WifiSsid.fromUtf8Text(ssid));
         scanResult.BSSID = bssid;
         when(mockScanDetail.getNetworkDetail()).thenReturn(mockNetworkDetail);
         when(mockScanDetail.getScanResult()).thenReturn(scanResult);
@@ -635,7 +633,6 @@
         NetworkDetail mockNetworkDetail = mock(NetworkDetail.class);
         ScanResult scanResult = new ScanResult();
         scanResult.SSID = ssid;
-        scanResult.setWifiSsid(WifiSsid.fromUtf8Text(ssid));
         scanResult.BSSID = bssid;
         scanResult.hessid = hessid;
         scanResult.capabilities = "PSK";
@@ -769,8 +766,8 @@
         mWifiMetrics.setIsLocationEnabled(TEST_VAL_IS_LOCATION_ENABLED);
         mWifiMetrics.setIsScanningAlwaysEnabled(IS_SCANNING_ALWAYS_ENABLED);
         mWifiMetrics.setVerboseLoggingEnabled(IS_VERBOSE_LOGGING_ENABLED);
-        mWifiMetrics.setNonPersistentMacRandomizationForceEnabled(
-                IS_NON_PERSISTENT_MAC_RANDOMIZATION_FORCE_ENABLED);
+        mWifiMetrics.setEnhancedMacRandomizationForceEnabled(
+                IS_ENHANCED_MAC_RANDOMIZATION_FORCE_ENABLED);
         mWifiMetrics.setWifiWakeEnabled(IS_WIFI_WAKE_ENABLED);
 
         for (int i = 0; i < NUM_EMPTY_SCAN_RESULTS; i++) {
@@ -1320,7 +1317,7 @@
         assertEquals("mDecodedProto.isScanningAlwaysEnabled == IS_SCANNING_ALWAYS_ENABLED",
                 IS_SCANNING_ALWAYS_ENABLED, mDecodedProto.isScanningAlwaysEnabled);
         assertEquals(IS_VERBOSE_LOGGING_ENABLED, mDecodedProto.isVerboseLoggingEnabled);
-        assertEquals(IS_NON_PERSISTENT_MAC_RANDOMIZATION_FORCE_ENABLED,
+        assertEquals(IS_ENHANCED_MAC_RANDOMIZATION_FORCE_ENABLED,
                 mDecodedProto.isEnhancedMacRandomizationForceEnabled);
         assertEquals(IS_WIFI_WAKE_ENABLED, mDecodedProto.isWifiWakeEnabled);
         assertEquals("mDecodedProto.numEmptyScanResults == NUM_EMPTY_SCAN_RESULTS",
@@ -1612,18 +1609,6 @@
 
     }
 
-    @Test
-    public void testHalCrashSoftApFailureCount() throws Exception {
-        mWifiMetrics.incrementNumHalCrashes();
-        mWifiMetrics.incrementNumSetupSoftApInterfaceFailureDueToHostapd();
-        ExtendedMockito.verify(() -> WifiStatsLog.write(
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__SOFT_AP_FAILURE_HOSTAPD));
-        ExtendedMockito.verify(() -> WifiStatsLog.write(
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED,
-                WifiStatsLog.WIFI_SETUP_FAILURE_CRASH_REPORTED__TYPE__HAL_CRASH));
-    }
-
     /**
      *  Assert deserialized metrics Scan Return Entry equals count
      */
@@ -2605,7 +2590,7 @@
     private static final int AUTH_FAILURE_REASON = WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD;
     private static final int NUM_TEST_STA_EVENTS = 19;
     private static final String   sSSID = "\"SomeTestSsid\"";
-    private static final WifiSsid sWifiSsid = WifiSsid.fromUtf8Text(sSSID);
+    private static final WifiSsid sWifiSsid = WifiSsid.createFromAsciiEncoded(sSSID);
     private static final String   sBSSID = "01:02:03:04:05:06";
 
     private final StateChangeResult mStateDisconnected =
@@ -2620,20 +2605,19 @@
     private final WifiConfiguration mTestWifiConfig = createComplexWifiConfig();
     // <msg.what> <msg.arg1> <msg.arg2>
     private int[][] mTestStaMessageInts = {
-        {WifiMonitor.ASSOCIATION_REJECTION_EVENT,   0, 0},
-        {WifiMonitor.AUTHENTICATION_FAILURE_EVENT,  0, 0},
-        {WifiMonitor.NETWORK_CONNECTION_EVENT,      0, 0},
-        {WifiMonitor.NETWORK_DISCONNECTION_EVENT,   0, 0},
-        {WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0},
-        {WifiMonitor.ASSOCIATED_BSSID_EVENT,        0, 0},
-        {WifiMonitor.TARGET_BSSID_EVENT,            0, 0},
-        {WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0},
-        {WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0, 0}
+        {WifiMonitor.ASSOCIATION_REJECTION_EVENT,   0,                   0},
+        {WifiMonitor.AUTHENTICATION_FAILURE_EVENT,  AUTH_FAILURE_REASON, -1},
+        {WifiMonitor.NETWORK_CONNECTION_EVENT,      0,                   0},
+        {WifiMonitor.NETWORK_DISCONNECTION_EVENT,   0,                   0},
+        {WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0,                   0},
+        {WifiMonitor.ASSOCIATED_BSSID_EVENT,        0,                   0},
+        {WifiMonitor.TARGET_BSSID_EVENT,            0,                   0},
+        {WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0,                   0},
+        {WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, 0,                   0}
     };
     private Object[] mTestStaMessageObjs = {
         new AssocRejectEventInfo(sSSID, sBSSID, ASSOC_STATUS, ASSOC_TIMEOUT),
-        new AuthenticationFailureEventInfo(sSSID, MacAddress.fromString(sBSSID),
-                AUTH_FAILURE_REASON, -1),
+        null,
         null,
         new DisconnectEventInfo(sSSID, sBSSID, DEAUTH_REASON, LOCAL_GEN),
         mStateDisconnected,
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiMonitorTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiMonitorTest.java
index d6454b4..38e69f9 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiMonitorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiMonitorTest.java
@@ -28,8 +28,6 @@
 
 import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback.WpsConfigError;
 import android.hardware.wifi.supplicant.V1_0.ISupplicantStaIfaceCallback.WpsErrorIndication;
-import android.net.DscpPolicy;
-import android.net.MacAddress;
 import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiManager;
@@ -41,8 +39,6 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.server.wifi.MboOceController.BtmFrameData;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyClassifierParams;
-import com.android.server.wifi.SupplicantStaIfaceHal.QosPolicyRequest;
 import com.android.server.wifi.hotspot2.AnqpEvent;
 import com.android.server.wifi.hotspot2.IconEvent;
 import com.android.server.wifi.hotspot2.WnmData;
@@ -51,10 +47,6 @@
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * Unit tests for {@link com.android.server.wifi.WifiMonitor}.
  */
@@ -173,8 +165,7 @@
         ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
         verify(mHandlerSpy).handleMessage(messageCaptor.capture());
         assertEquals(WifiMonitor.WPS_FAIL_EVENT, messageCaptor.getValue().what);
-        assertEquals(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR,
-                messageCaptor.getValue().arg1);
+        assertEquals(WifiManager.ERROR, messageCaptor.getValue().arg1);
         assertEquals(WpsConfigError.MSG_TIMEOUT, messageCaptor.getValue().arg2);
     }
 
@@ -366,17 +357,13 @@
         mWifiMonitor.registerHandler(
                 WLAN_IFACE_NAME, WifiMonitor.AUTHENTICATION_FAILURE_EVENT, mHandlerSpy);
         int reason = WifiManager.ERROR_AUTH_FAILURE_WRONG_PSWD;
-        MacAddress bssid = MacAddress.fromString(BSSID);
-        AuthenticationFailureEventInfo expected = new AuthenticationFailureEventInfo(SSID, bssid,
-                reason, -1);
-        mWifiMonitor.broadcastAuthenticationFailureEvent(WLAN_IFACE_NAME, reason, -1,
-                SSID, bssid);
+        mWifiMonitor.broadcastAuthenticationFailureEvent(WLAN_IFACE_NAME, reason, -1);
         mLooper.dispatchAll();
 
         ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
         verify(mHandlerSpy).handleMessage(messageCaptor.capture());
         assertEquals(WifiMonitor.AUTHENTICATION_FAILURE_EVENT, messageCaptor.getValue().what);
-        assertEquals(expected, messageCaptor.getValue().obj);
+        assertEquals(reason, messageCaptor.getValue().arg1);
     }
 
     /**
@@ -387,18 +374,15 @@
         mWifiMonitor.registerHandler(
                 WLAN_IFACE_NAME, WifiMonitor.AUTHENTICATION_FAILURE_EVENT, mHandlerSpy);
         int reason = WifiManager.ERROR_AUTH_FAILURE_EAP_FAILURE;
-        int errorCode = WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED;
-        MacAddress bssid = MacAddress.fromString(BSSID);
-        AuthenticationFailureEventInfo expected = new AuthenticationFailureEventInfo(SSID, bssid,
-                reason, errorCode);
-        mWifiMonitor.broadcastAuthenticationFailureEvent(WLAN_IFACE_NAME, reason, errorCode,
-                SSID, bssid);
+	int errorCode = WifiNative.EAP_SIM_VENDOR_SPECIFIC_CERT_EXPIRED;
+        mWifiMonitor.broadcastAuthenticationFailureEvent(WLAN_IFACE_NAME, reason, errorCode);
         mLooper.dispatchAll();
 
         ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
         verify(mHandlerSpy).handleMessage(messageCaptor.capture());
         assertEquals(WifiMonitor.AUTHENTICATION_FAILURE_EVENT, messageCaptor.getValue().what);
-        assertEquals(expected, messageCaptor.getValue().obj);
+        assertEquals(reason, messageCaptor.getValue().arg1);
+	assertEquals(errorCode, messageCaptor.getValue().arg2);
     }
 
     /**
@@ -457,7 +441,7 @@
         mWifiMonitor.registerHandler(
                 WLAN_IFACE_NAME, WifiMonitor.NETWORK_CONNECTION_EVENT, mHandlerSpy);
         int networkId = NETWORK_ID;
-        WifiSsid wifiSsid = WifiSsid.fromBytes(new byte[]{'a', 'b', 'c'});
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(new byte[]{'a', 'b', 'c'});
         String bssid = BSSID;
         mWifiMonitor.broadcastNetworkConnectionEvent(WLAN_IFACE_NAME, networkId, false,
                 wifiSsid, bssid);
@@ -508,7 +492,7 @@
         mWifiMonitor.registerHandler(
                 WLAN_IFACE_NAME, WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT, mHandlerSpy);
         int networkId = NETWORK_ID;
-        WifiSsid wifiSsid = WifiSsid.fromUtf8Text(SSID);
+        WifiSsid wifiSsid = WifiSsid.createFromAsciiEncoded(SSID);
         String bssid = BSSID;
         SupplicantState newState = SupplicantState.ASSOCIATED;
         mWifiMonitor.broadcastSupplicantStateChangeEvent(
@@ -630,7 +614,7 @@
         mWifiMonitor.registerHandler(
                 WLAN_IFACE_NAME, WifiMonitor.NETWORK_CONNECTION_EVENT, mHandlerSpy);
         int networkId = NETWORK_ID;
-        WifiSsid wifiSsid = WifiSsid.fromBytes(new byte[]{'a', 'b', 'c'});
+        WifiSsid wifiSsid = WifiSsid.createFromByteArray(new byte[]{'a', 'b', 'c'});
         String bssid = BSSID;
         mWifiMonitor.broadcastNetworkConnectionEvent(WLAN_IFACE_NAME, networkId, true,
                 wifiSsid, bssid);
@@ -739,93 +723,4 @@
         String ssid = (String) messageCaptor.getValue().obj;
         assertEquals(SSID, ssid);
     }
-
-    /**
-     * Broadcast Certification event.
-     */
-    @Test
-    public void testBroadcastCertificateEvent() {
-        final int depth = 2;
-        mWifiMonitor.registerHandler(
-                WLAN_IFACE_NAME, WifiMonitor.TOFU_ROOT_CA_CERTIFICATE, mHandlerSpy);
-        mWifiMonitor.broadcastCertificationEvent(
-                WLAN_IFACE_NAME, NETWORK_ID, SSID, depth, FakeKeys.CA_CERT0);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandlerSpy).handleMessage(messageCaptor.capture());
-        assertEquals(WifiMonitor.TOFU_ROOT_CA_CERTIFICATE, messageCaptor.getValue().what);
-        assertEquals(NETWORK_ID, messageCaptor.getValue().arg1);
-        assertEquals(depth, messageCaptor.getValue().arg2);
-        X509Certificate cert = (X509Certificate) messageCaptor.getValue().obj;
-        assertEquals(FakeKeys.CA_CERT0, cert);
-    }
-
-    /**
-     * Broadcast Auxiliary Supplicant event.
-     */
-    @Test
-    public void testBroadcastAuxiliarySupplicantEvent() {
-        SupplicantEventInfo expectedInfo = new SupplicantEventInfo(
-                SupplicantStaIfaceHal.SUPPLICANT_EVENT_EAP_METHOD_SELECTED,
-                MacAddress.fromString(BSSID), "method=5");
-        mWifiMonitor.registerHandler(
-                WLAN_IFACE_NAME, WifiMonitor.AUXILIARY_SUPPLICANT_EVENT, mHandlerSpy);
-        mWifiMonitor.broadcastAuxiliarySupplicantEvent(WLAN_IFACE_NAME, expectedInfo.eventCode,
-                expectedInfo.bssid, expectedInfo.reasonString);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandlerSpy).handleMessage(messageCaptor.capture());
-        assertEquals(WifiMonitor.AUXILIARY_SUPPLICANT_EVENT, messageCaptor.getValue().what);
-        SupplicantEventInfo info = (SupplicantEventInfo) messageCaptor.getValue().obj;
-        assertEquals(expectedInfo.eventCode, info.eventCode);
-        assertEquals(expectedInfo.bssid, info.bssid);
-        assertEquals(expectedInfo.reasonString, info.reasonString);
-    }
-
-    /**
-     * Broadcast QoS policy reset event.
-     */
-    @Test
-    public void testBroadcastQosPolicyResetEvent() {
-        mWifiMonitor.registerHandler(
-                WLAN_IFACE_NAME, WifiMonitor.QOS_POLICY_RESET_EVENT, mHandlerSpy);
-        mWifiMonitor.broadcastQosPolicyResetEvent(WLAN_IFACE_NAME);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandlerSpy).handleMessage(messageCaptor.capture());
-        assertEquals(WifiMonitor.QOS_POLICY_RESET_EVENT, messageCaptor.getValue().what);
-    }
-
-    /**
-     * Broadcast QoS policy request event.
-     */
-    @Test
-    public void testBroadcastQosPolicyRequestEvent() {
-        int dialogToken = 124;
-        int numPolicyRequests = 5;
-        List<QosPolicyRequest> policyRequestList = new ArrayList();
-        for (int i = 0; i < numPolicyRequests; i++) {
-            policyRequestList.add(new QosPolicyRequest(
-                    (byte) i, SupplicantStaIfaceHal.QOS_POLICY_REQUEST_ADD, (byte) 0,
-                    new QosPolicyClassifierParams(false, null, false, null,
-                            DscpPolicy.SOURCE_PORT_ANY, new int[]{125, 150},
-                            DscpPolicy.PROTOCOL_ANY)));
-        }
-
-        mWifiMonitor.registerHandler(
-                WLAN_IFACE_NAME, WifiMonitor.QOS_POLICY_REQUEST_EVENT, mHandlerSpy);
-        mWifiMonitor.broadcastQosPolicyRequestEvent(
-                WLAN_IFACE_NAME, dialogToken, policyRequestList);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandlerSpy).handleMessage(messageCaptor.capture());
-        assertEquals(WifiMonitor.QOS_POLICY_REQUEST_EVENT, messageCaptor.getValue().what);
-        assertEquals(dialogToken, messageCaptor.getValue().arg1);
-        assertEquals(numPolicyRequests,
-                ((List<QosPolicyRequest>) messageCaptor.getValue().obj).size());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiMulticastLockManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiMulticastLockManagerTest.java
index 8464293..cde1d2a 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiMulticastLockManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiMulticastLockManagerTest.java
@@ -27,7 +27,6 @@
 import android.os.IBinder;
 import android.os.RemoteException;
 import android.os.WorkSource;
-import android.os.test.TestLooper;
 
 import androidx.test.filters.SmallTest;
 
@@ -51,7 +50,6 @@
     private static final String WL_1_TAG = "Wakelock-1";
     private static final String WL_2_TAG = "Wakelock-2";
 
-    private TestLooper mLooper;
     @Mock ConcreteClientModeManager mClientModeManager;
     @Mock ConcreteClientModeManager mClientModeManager2;
     @Spy FakeFilterController mFilterController = new FakeFilterController();
@@ -67,7 +65,6 @@
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
-        mLooper = new TestLooper();
 
         when(mClientModeManager.getMcastLockManagerFilterController())
                 .thenReturn(mFilterController);
@@ -78,8 +75,7 @@
         when(mClientModeManager2.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_TRANSIENT);
 
         when(mActiveModeWarden.getPrimaryClientModeManager()).thenReturn(mClientModeManager);
-        mManager = new WifiMulticastLockManager(mActiveModeWarden, mBatteryStats,
-                mLooper.getLooper());
+        mManager = new WifiMulticastLockManager(mActiveModeWarden, mBatteryStats);
 
         verify(mActiveModeWarden).registerPrimaryClientModeManagerChangedCallback(
                 mPrimaryChangedCallbackCaptor.capture());
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNativeInterfaceManagementTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNativeInterfaceManagementTest.java
index 3ae6ff6..b7082e2 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiNativeInterfaceManagementTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNativeInterfaceManagementTest.java
@@ -21,7 +21,6 @@
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.Mockito.anyBoolean;
 import static org.mockito.Mockito.anyInt;
 import static org.mockito.Mockito.atLeastOnce;
@@ -38,7 +37,6 @@
 
 import android.app.test.MockAnswerUtil;
 import android.net.wifi.SoftApConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiScanner;
 import android.net.wifi.nl80211.WifiNl80211Manager;
 import android.os.Handler;
@@ -53,7 +51,6 @@
 import com.android.server.wifi.WifiNative.VendorHalDeathEventHandler;
 import com.android.server.wifi.util.NetdWrapper;
 import com.android.server.wifi.util.NetdWrapper.NetdEventObserver;
-import com.android.wifi.resources.R;
 
 import org.junit.After;
 import org.junit.Before;
@@ -75,9 +72,6 @@
     private static final String IFACE_NAME_0 = "mockWlan0";
     private static final String IFACE_NAME_1 = "mockWlan1";
     private static final WorkSource TEST_WORKSOURCE = new WorkSource();
-    private static final long TEST_SUPPORTED_FEATURES = 0;
-
-    MockResources mResources;
 
     @Mock private WifiVendorHal mWifiVendorHal;
     @Mock private WifiNl80211Manager mWificondControl;
@@ -89,15 +83,10 @@
     @Mock private WifiMetrics mWifiMetrics;
     @Mock BuildProperties mBuildProperties;
     @Mock private WifiInjector mWifiInjector;
-    @Mock private WifiContext mContext;
 
     @Mock private WifiNative.StatusListener mStatusListener;
     @Mock private WifiNative.InterfaceCallback mIfaceCallback0;
     @Mock private WifiNative.InterfaceCallback mIfaceCallback1;
-
-    @Mock private WifiSettingsConfigStore mWifiSettingsConfigStore;
-    @Mock private SoftApManager mSoftApManager;
-
     private TestLooper mLooper;
 
     private ArgumentCaptor<VendorHalDeathEventHandler> mWifiVendorHalDeathHandlerCaptor =
@@ -139,7 +128,7 @@
         when(mWifiVendorHal.startVendorHal()).thenReturn(true);
         when(mWifiVendorHal.createStaIface(any(), any())).thenReturn(IFACE_NAME_0);
         when(mWifiVendorHal.createApIface(any(), any(), anyInt(),
-                anyBoolean(), any())).thenReturn(IFACE_NAME_0);
+                anyBoolean())).thenReturn(IFACE_NAME_0);
         when(mWifiVendorHal.getBridgedApInstances(any())).thenReturn(
                 new ArrayList<String>() {{ add((IFACE_NAME_0)); }});
         when(mWifiVendorHal.removeStaIface(any())).thenReturn(true);
@@ -180,15 +169,6 @@
         when(mHostapdHal.registerApCallback(any(), any())).thenReturn(true);
 
         when(mWifiInjector.makeNetdWrapper()).thenReturn(mNetdWrapper);
-        when(mWifiInjector.getSettingsConfigStore()).thenReturn(mWifiSettingsConfigStore);
-        when(mWifiInjector.getContext()).thenReturn(mContext);
-        mResources = getMockResources();
-        mResources.setBoolean(R.bool.config_wifiNetworkCentricQosPolicyFeatureEnabled, false);
-        when(mContext.getResources()).thenReturn(mResources);
-
-        when(mWifiSettingsConfigStore.get(
-                eq(WifiSettingsConfigStore.WIFI_NATIVE_SUPPORTED_FEATURES)))
-                .thenReturn(TEST_SUPPORTED_FEATURES);
 
         mInOrder = inOrder(mWifiVendorHal, mWificondControl, mSupplicantStaIfaceHal, mHostapdHal,
                 mWifiMonitor, mNetdWrapper, mIfaceCallback0, mIfaceCallback1, mWifiMetrics);
@@ -214,11 +194,6 @@
                 mWifiMetrics);
     }
 
-    private MockResources getMockResources() {
-        MockResources resources = new MockResources();
-        return resources;
-    }
-
     /**
      * Verifies the setup of a single client interface.
      */
@@ -231,24 +206,6 @@
     }
 
     /**
-     * Verifies the setup of a single client interface when the overlay indicates that the
-     * network-centric QoS policy feature is enabled.
-     */
-    @Test
-    public void testSetupClientInterfaceWithQosPolicyFeatureEnabled() throws Exception {
-        mResources.setBoolean(R.bool.config_wifiNetworkCentricQosPolicyFeatureEnabled, true);
-        when(mSupplicantStaIfaceHal
-                .setNetworkCentricQosPolicyFeatureEnabled(anyString(), anyBoolean()))
-                .thenReturn(true);
-        executeAndValidateSetupClientInterface(
-                false, false, IFACE_NAME_0, mIfaceCallback0, mIfaceDestroyedListenerCaptor0,
-                mNetworkObserverCaptor0);
-        assertEquals(Set.of(IFACE_NAME_0), mWifiNative.getClientInterfaceNames());
-        verify(mSupplicantStaIfaceHal)
-                .setNetworkCentricQosPolicyFeatureEnabled(IFACE_NAME_0, true);
-    }
-
-    /**
      * Verifies the setup of a single client interface (for scan).
      */
     @Test
@@ -497,13 +454,13 @@
         // The iface name will remain the same.
         doAnswer(new MockAnswerUtil.AnswerWithArguments() {
             public String answer(InterfaceDestroyedListener destroyedListener, WorkSource ws,
-                    int band, boolean isBridged, SoftApManager softApManager) {
+                    int band, boolean isBridged) {
                 mIfaceDestroyedListenerCaptor0.getValue().onDestroyed(IFACE_NAME_0);
                 return IFACE_NAME_0;
             }
-        }).when(mWifiVendorHal).createApIface(any(), any(), anyInt(), eq(false), any());
-        assertEquals(IFACE_NAME_0, mWifiNative.setupInterfaceForSoftApMode(mIfaceCallback1,
-                TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        }).when(mWifiVendorHal).createApIface(any(), any(), anyInt(), eq(false));
+        assertEquals(IFACE_NAME_0, mWifiNative.setupInterfaceForSoftApMode(
+                mIfaceCallback1, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false));
 
         mInOrder.verify(mHostapdHal).isInitializationStarted();
         mInOrder.verify(mHostapdHal).initialize();
@@ -512,8 +469,7 @@
         mInOrder.verify(mHostapdHal).registerDeathHandler(any());
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).createApIface(
-                mIfaceDestroyedListenerCaptor1.capture(), eq(TEST_WORKSOURCE), anyInt(), eq(false),
-                eq(mSoftApManager));
+                mIfaceDestroyedListenerCaptor1.capture(), eq(TEST_WORKSOURCE), anyInt(), eq(false));
         // Creation of AP interface should trigger the STA interface destroy
         validateOnDestroyedClientInterface(
                 false, true, IFACE_NAME_0, mIfaceCallback0, mNetworkObserverCaptor0.getValue());
@@ -572,7 +528,6 @@
         mInOrder.verify(mNetdWrapper).registerObserver(mNetworkObserverCaptor1.capture());
         mInOrder.verify(mWifiMonitor).startMonitoring(IFACE_NAME_0);
         mInOrder.verify(mNetdWrapper).isInterfaceUp(IFACE_NAME_0);
-        mInOrder.verify(mWifiVendorHal).enableLinkLayerStats(IFACE_NAME_0);
         mInOrder.verify(mNetdWrapper).clearInterfaceAddresses(IFACE_NAME_0);
         mInOrder.verify(mNetdWrapper).setInterfaceIpv6PrivacyExtensions(IFACE_NAME_0, true);
         mInOrder.verify(mNetdWrapper).disableIpv6(IFACE_NAME_0);
@@ -767,15 +722,14 @@
         // The iface name will remain the same.
         doAnswer(new MockAnswerUtil.AnswerWithArguments() {
             public String answer(InterfaceDestroyedListener destroyedListener, WorkSource ws,
-                    int band, boolean isBridged, SoftApManager softApManager) {
+                    int band, boolean isBriger) {
                 mIfaceDestroyedListenerCaptor0.getValue().onDestroyed(IFACE_NAME_0);
                 return IFACE_NAME_0;
             }
-        }).when(mWifiVendorHal).createApIface(any(), any(), anyInt(), eq(false), any());
-        when(mWifiVendorHal.isVendorHalSupported()).thenReturn(true);
+        }).when(mWifiVendorHal).createApIface(any(), any(), anyInt(), eq(false));
 
-        assertEquals(IFACE_NAME_0, mWifiNative.setupInterfaceForSoftApMode(mIfaceCallback1,
-                TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        assertEquals(IFACE_NAME_0, mWifiNative.setupInterfaceForSoftApMode(
+                mIfaceCallback1, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false));
         mInOrder.verify(mHostapdHal).isInitializationStarted();
         mInOrder.verify(mHostapdHal).initialize();
         mInOrder.verify(mHostapdHal).startDaemon();
@@ -783,8 +737,7 @@
         mInOrder.verify(mHostapdHal).registerDeathHandler(any());
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).createApIface(
-                mIfaceDestroyedListenerCaptor1.capture(), eq(TEST_WORKSOURCE), anyInt(), eq(false),
-                eq(mSoftApManager));
+                mIfaceDestroyedListenerCaptor1.capture(), eq(TEST_WORKSOURCE), anyInt(), eq(false));
         // Creation of AP interface should trigger the STA interface destroy
         validateOnDestroyedClientInterface(
                 false, true, IFACE_NAME_0, mIfaceCallback0, mNetworkObserverCaptor0.getValue());
@@ -876,7 +829,7 @@
 
         // Start softap
         assertTrue(mWifiNative.startSoftAp(IFACE_NAME_0, new SoftApConfiguration.Builder().build(),
-                true, mock(WifiNative.SoftApHalCallback.class)));
+                true, mock(WifiNative.SoftApListener.class)));
 
         mInOrder.verify(mHostapdHal).isApInfoCallbackSupported();
         mInOrder.verify(mHostapdHal).registerApCallback(any(), any());
@@ -903,7 +856,7 @@
 
         // Start softap
         assertTrue(mWifiNative.startSoftAp(IFACE_NAME_0, new SoftApConfiguration.Builder().build(),
-                true, mock(WifiNative.SoftApHalCallback.class)));
+                true, mock(WifiNative.SoftApListener.class)));
 
         mInOrder.verify(mHostapdHal).isApInfoCallbackSupported();
         mInOrder.verify(mWificondControl).registerApCallback(any(), any(), any());
@@ -1082,7 +1035,7 @@
     public void testSetupSoftApInterfaceFailureInStartHal() throws Exception {
         when(mWifiVendorHal.startVendorHal()).thenReturn(false);
         assertNull(mWifiNative.setupInterfaceForSoftApMode(mIfaceCallback0, TEST_WORKSOURCE,
-                  SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+                  SoftApConfiguration.BAND_2GHZ, false));
 
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).startVendorHal();
@@ -1101,7 +1054,7 @@
     public void testSetupSoftApInterfaceFailureInStartHostapd() throws Exception {
         when(mHostapdHal.startDaemon()).thenReturn(false);
         assertNull(mWifiNative.setupInterfaceForSoftApMode(mIfaceCallback0, TEST_WORKSOURCE,
-                SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+                SoftApConfiguration.BAND_2GHZ, false));
 
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).startVendorHal();
@@ -1125,10 +1078,9 @@
      */
     @Test
     public void testSetupSoftApInterfaceFailureInHalCreateApIface() throws Exception {
-        when(mWifiVendorHal.createApIface(any(), any(), anyInt(), anyBoolean(), any()))
-                .thenReturn(null);
-        assertNull(mWifiNative.setupInterfaceForSoftApMode(mIfaceCallback0, TEST_WORKSOURCE,
-                SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        when(mWifiVendorHal.createApIface(any(), any(), anyInt(), anyBoolean())).thenReturn(null);
+        assertNull(mWifiNative.setupInterfaceForSoftApMode(
+                mIfaceCallback0, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false));
 
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).startVendorHal();
@@ -1142,8 +1094,7 @@
         mInOrder.verify(mHostapdHal).isInitializationComplete();
         mInOrder.verify(mHostapdHal).registerDeathHandler(any());
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
-        mInOrder.verify(mWifiVendorHal).createApIface(any(), any(), anyInt(), anyBoolean(),
-                eq(mSoftApManager));
+        mInOrder.verify(mWifiVendorHal).createApIface(any(), any(), anyInt(), anyBoolean());
         mInOrder.verify(mWifiMetrics).incrementNumSetupSoftApInterfaceFailureDueToHal();
 
         // To test if the failure is handled cleanly, invoke teardown and ensure that
@@ -1158,8 +1109,8 @@
     @Test
     public void testSetupSoftApInterfaceFailureInHalGetBridgedInstances() throws Exception {
         when(mWifiVendorHal.getBridgedApInstances(any())).thenReturn(null);
-        assertNull(mWifiNative.setupInterfaceForSoftApMode(mIfaceCallback0, TEST_WORKSOURCE,
-                SoftApConfiguration.BAND_2GHZ, true, mSoftApManager));
+        assertNull(mWifiNative.setupInterfaceForSoftApMode(
+                mIfaceCallback0, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, true));
 
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).startVendorHal();
@@ -1174,8 +1125,7 @@
         mInOrder.verify(mHostapdHal).registerDeathHandler(any());
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).createApIface(
-                mIfaceDestroyedListenerCaptor0.capture(), eq(TEST_WORKSOURCE), anyInt(), eq(true),
-                eq(mSoftApManager));
+                mIfaceDestroyedListenerCaptor0.capture(), eq(TEST_WORKSOURCE), anyInt(), eq(true));
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).getBridgedApInstances(any());
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
@@ -1200,8 +1150,8 @@
     public void testSetupSoftApInterfaceFailureInWificondSetupInterfaceForSoftapMode()
             throws Exception {
         when(mWificondControl.setupInterfaceForSoftApMode(any())).thenReturn(false);
-        assertNull(mWifiNative.setupInterfaceForSoftApMode(mIfaceCallback0, TEST_WORKSOURCE,
-                SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        assertNull(mWifiNative.setupInterfaceForSoftApMode(
+                mIfaceCallback0, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false));
 
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).startVendorHal();
@@ -1216,8 +1166,7 @@
         mInOrder.verify(mHostapdHal).registerDeathHandler(any());
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).createApIface(
-                mIfaceDestroyedListenerCaptor0.capture(), eq(TEST_WORKSOURCE), anyInt(), eq(false),
-                eq(mSoftApManager));
+                mIfaceDestroyedListenerCaptor0.capture(), eq(TEST_WORKSOURCE), anyInt(), eq(false));
         mInOrder.verify(mWificondControl).setupInterfaceForSoftApMode(any());
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).removeApIface(any());
@@ -1329,7 +1278,6 @@
         mInOrder.verify(mNetdWrapper).registerObserver(mNetworkObserverCaptor0.capture());
         mInOrder.verify(mWifiMonitor).startMonitoring(IFACE_NAME_0);
         mInOrder.verify(mNetdWrapper).isInterfaceUp(IFACE_NAME_0);
-        mInOrder.verify(mWifiVendorHal).enableLinkLayerStats(eq(IFACE_NAME_0));
         mInOrder.verify(mNetdWrapper).clearInterfaceAddresses(IFACE_NAME_0);
         mInOrder.verify(mNetdWrapper).setInterfaceIpv6PrivacyExtensions(IFACE_NAME_0, true);
         mInOrder.verify(mNetdWrapper).disableIpv6(IFACE_NAME_0);
@@ -1338,8 +1286,8 @@
         mInOrder.verify(mSupplicantStaIfaceHal).getWpaDriverFeatureSet(IFACE_NAME_0);
 
         // Now setup an AP interface.
-        assertEquals(IFACE_NAME_0, mWifiNative.setupInterfaceForSoftApMode(mIfaceCallback1,
-                TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        assertEquals(IFACE_NAME_0, mWifiNative.setupInterfaceForSoftApMode(
+                mIfaceCallback1, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false));
 
         mInOrder.verify(mHostapdHal).isInitializationStarted();
         mInOrder.verify(mHostapdHal).initialize();
@@ -1378,8 +1326,8 @@
         when(mPropertyService.getString(any(), any())).thenReturn(IFACE_NAME_0);
 
         // First setup an AP interface and verify.
-        assertEquals(IFACE_NAME_0, mWifiNative.setupInterfaceForSoftApMode(mIfaceCallback0,
-                TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        assertEquals(IFACE_NAME_0, mWifiNative.setupInterfaceForSoftApMode(
+                mIfaceCallback0, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false));
 
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         if (SdkLevel.isAtLeastS()) {
@@ -1425,7 +1373,6 @@
         mInOrder.verify(mNetdWrapper).registerObserver(mNetworkObserverCaptor1.capture());
         mInOrder.verify(mWifiMonitor).startMonitoring(IFACE_NAME_0);
         mInOrder.verify(mNetdWrapper).isInterfaceUp(IFACE_NAME_0);
-        mInOrder.verify(mWifiVendorHal).enableLinkLayerStats(eq(IFACE_NAME_0));
         mInOrder.verify(mNetdWrapper).clearInterfaceAddresses(IFACE_NAME_0);
         mInOrder.verify(mNetdWrapper).setInterfaceIpv6PrivacyExtensions(IFACE_NAME_0, true);
         mInOrder.verify(mNetdWrapper).disableIpv6(IFACE_NAME_0);
@@ -1581,7 +1528,6 @@
         mInOrder.verify(mNetdWrapper).registerObserver(networkObserverCaptor.capture());
         mInOrder.verify(mWifiMonitor).startMonitoring(ifaceName);
         mInOrder.verify(mNetdWrapper).isInterfaceUp(ifaceName);
-        mInOrder.verify(mWifiVendorHal).enableLinkLayerStats(ifaceName);
         mInOrder.verify(mNetdWrapper).clearInterfaceAddresses(ifaceName);
         mInOrder.verify(mNetdWrapper).setInterfaceIpv6PrivacyExtensions(ifaceName, true);
         mInOrder.verify(mNetdWrapper).disableIpv6(ifaceName);
@@ -1665,7 +1611,6 @@
         mInOrder.verify(mNetdWrapper).registerObserver(networkObserverCaptor.capture());
         mInOrder.verify(mWifiMonitor).startMonitoring(ifaceName);
         mInOrder.verify(mNetdWrapper).isInterfaceUp(ifaceName);
-        mInOrder.verify(mWifiVendorHal).enableLinkLayerStats(ifaceName);
         mInOrder.verify(mSupplicantStaIfaceHal).getAdvancedCapabilities(ifaceName);
         mInOrder.verify(mWifiVendorHal).getSupportedFeatureSet(ifaceName);
         mInOrder.verify(mSupplicantStaIfaceHal).getWpaDriverFeatureSet(ifaceName);
@@ -1722,11 +1667,10 @@
             ArgumentCaptor<InterfaceDestroyedListener> destroyedListenerCaptor,
             ArgumentCaptor<NetdEventObserver> networkObserverCaptor, boolean isBridged)
             throws Exception {
-        when(mWifiVendorHal.createApIface(any(), any(), anyInt(), eq(isBridged), any()))
+        when(mWifiVendorHal.createApIface(any(), any(), anyInt(), eq(isBridged)))
                 .thenReturn(ifaceName);
         assertEquals(ifaceName, mWifiNative.setupInterfaceForSoftApMode(
-                callback, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, isBridged,
-                mSoftApManager));
+                callback, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, isBridged));
 
         validateSetupSoftApInterface(
                 existingStaIface, existingApIface, ifaceName, destroyedListenerCaptor,
@@ -1756,7 +1700,7 @@
         mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
         mInOrder.verify(mWifiVendorHal).createApIface(
                 destroyedListenerCaptor.capture(), eq(TEST_WORKSOURCE),
-                eq(SoftApConfiguration.BAND_2GHZ), eq(isBridged), eq(mSoftApManager));
+                eq(SoftApConfiguration.BAND_2GHZ), eq(isBridged));
         if (isBridged) {
             mInOrder.verify(mWifiVendorHal).isVendorHalSupported();
             mInOrder.verify(mWifiVendorHal).getBridgedApInstances(eq(ifaceName));
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java
index 3264e69..9df7ae1 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNativeTest.java
@@ -19,8 +19,6 @@
 import static android.net.wifi.WifiScanner.WIFI_BAND_24_GHZ;
 import static android.net.wifi.WifiScanner.WIFI_BAND_5_GHZ;
 
-import static com.android.server.wifi.WifiSettingsConfigStore.WIFI_NATIVE_SUPPORTED_FEATURES;
-
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -35,7 +33,6 @@
 import static org.mockito.Mockito.anyBoolean;
 import static org.mockito.Mockito.anyInt;
 import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
@@ -46,7 +43,6 @@
 import android.net.wifi.CoexUnsafeChannel;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiScanner;
 import android.net.wifi.nl80211.NativeScanResult;
 import android.net.wifi.nl80211.RadioChainInfo;
@@ -63,13 +59,11 @@
 import com.android.server.wifi.coex.CoexManager;
 import com.android.server.wifi.util.NativeUtil;
 import com.android.server.wifi.util.NetdWrapper;
-import com.android.wifi.resources.R;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.AdditionalMatchers;
 import org.mockito.ArgumentCaptor;
-import org.mockito.InOrder;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
@@ -239,16 +233,11 @@
         return result;
     }
 
-    public static final long WIFI_TEST_FEATURE = 0x800000000L;
-
     private static final RadioChainInfo MOCK_NATIVE_RADIO_CHAIN_INFO_1 = new RadioChainInfo(1, -89);
     private static final RadioChainInfo MOCK_NATIVE_RADIO_CHAIN_INFO_2 = new RadioChainInfo(0, -78);
     private static final WorkSource TEST_WORKSOURCE = new WorkSource();
     private static final WorkSource TEST_WORKSOURCE2 = new WorkSource();
 
-    MockResources mResources;
-
-    @Mock private WifiContext mContext;
     @Mock private WifiVendorHal mWifiVendorHal;
     @Mock private WifiNl80211Manager mWificondControl;
     @Mock private SupplicantStaIfaceHal mStaIfaceHal;
@@ -265,8 +254,6 @@
     @Mock BuildProperties mBuildProperties;
     @Mock private WifiNative.InterfaceCallback mInterfaceCallback;
     @Mock private WifiCountryCode.ChangeListener mWifiCountryCodeChangeListener;
-    @Mock WifiSettingsConfigStore mSettingsConfigStore;
-    @Mock private SoftApManager mSoftApManager;
 
     ArgumentCaptor<WifiNl80211Manager.ScanEventCallback> mScanCallbackCaptor =
             ArgumentCaptor.forClass(WifiNl80211Manager.ScanEventCallback.class);
@@ -281,6 +268,7 @@
         when(mWifiVendorHal.isVendorHalSupported()).thenReturn(true);
         when(mWifiVendorHal.startVendorHal()).thenReturn(true);
         when(mWifiVendorHal.startVendorHalSta()).thenReturn(true);
+        when(mWifiVendorHal.startVendorHalAp()).thenReturn(true);
         when(mWifiVendorHal.createStaIface(any(), any())).thenReturn(WIFI_IFACE_NAME);
 
         when(mBuildProperties.isEngBuild()).thenReturn(false);
@@ -299,14 +287,6 @@
         when(mWifiInjector.makeNetdWrapper()).thenReturn(mNetdWrapper);
         when(mWifiInjector.getCoexManager()).thenReturn(mCoexManager);
 
-        when(mWifiInjector.getSettingsConfigStore()).thenReturn(mSettingsConfigStore);
-        when(mWifiInjector.getContext()).thenReturn(mContext);
-        mResources = getMockResources();
-        mResources.setBoolean(R.bool.config_wifiNetworkCentricQosPolicyFeatureEnabled, false);
-        when(mContext.getResources()).thenReturn(mResources);
-        when(mSettingsConfigStore.get(eq(WIFI_NATIVE_SUPPORTED_FEATURES)))
-                .thenReturn(WIFI_TEST_FEATURE);
-
         mWifiNative = new WifiNative(
                 mWifiVendorHal, mStaIfaceHal, mHostapdHal, mWificondControl,
                 mWifiMonitor, mPropertyService, mWifiMetrics,
@@ -314,11 +294,6 @@
         mWifiNative.initialize();
     }
 
-    private MockResources getMockResources() {
-        MockResources resources = new MockResources();
-        return resources;
-    }
-
     /**
      * Verifies that TxFateReport's constructor sets all of the TxFateReport fields.
      */
@@ -641,28 +616,13 @@
     // TODO(b/28005116): Add test for the success case of getDriverStateDump().
 
     /**
-     * Verifies getWifiLinkLayerStats() calls underlying WifiVendorHal.
-     *
-     */
-    @Test
-    public void testGetWifiLinkLayerStatsForClientInConnectivityMode() throws Exception {
-        mWifiNative.setupInterfaceForClientInConnectivityMode(null, TEST_WORKSOURCE);
-        mWifiNative.getWifiLinkLayerStats(WIFI_IFACE_NAME);
-        mWifiNative.getWifiLinkLayerStats(WIFI_IFACE_NAME);
-        verify(mWifiVendorHal, times(2)).getWifiLinkLayerStats(eq(WIFI_IFACE_NAME));
-    }
-
-    /**
      * Verifies client mode + scan success.
      */
     @Test
     public void testClientModeScanSuccess() {
-        InOrder order = inOrder(mWificondControl, mNetdWrapper, mWifiVendorHal);
         mWifiNative.setupInterfaceForClientInConnectivityMode(null, TEST_WORKSOURCE);
-        order.verify(mWificondControl).setupInterfaceForClientMode(eq(WIFI_IFACE_NAME), any(),
+        verify(mWificondControl).setupInterfaceForClientMode(eq(WIFI_IFACE_NAME), any(),
                 mScanCallbackCaptor.capture(), any());
-        order.verify(mNetdWrapper).isInterfaceUp(eq(WIFI_IFACE_NAME));
-        order.verify(mWifiVendorHal).enableLinkLayerStats(eq(WIFI_IFACE_NAME));
 
         mScanCallbackCaptor.getValue().onScanResultReady();
         verify(mWifiMonitor).broadcastScanResultEvent(WIFI_IFACE_NAME);
@@ -713,12 +673,9 @@
      */
     @Test
     public void testScanModeScanSuccess() {
-        InOrder order = inOrder(mWificondControl, mNetdWrapper, mWifiVendorHal);
         mWifiNative.setupInterfaceForClientInScanMode(null, TEST_WORKSOURCE);
-        order.verify(mWificondControl).setupInterfaceForClientMode(eq(WIFI_IFACE_NAME), any(),
+        verify(mWificondControl).setupInterfaceForClientMode(eq(WIFI_IFACE_NAME), any(),
                 mScanCallbackCaptor.capture(), any());
-        order.verify(mNetdWrapper).isInterfaceUp(eq(WIFI_IFACE_NAME));
-        order.verify(mWifiVendorHal).enableLinkLayerStats(eq(WIFI_IFACE_NAME));
 
         mScanCallbackCaptor.getValue().onScanResultReady();
         verify(mWifiMonitor).broadcastScanResultEvent(WIFI_IFACE_NAME);
@@ -786,8 +743,7 @@
         verify(mWifiVendorHal, times(3)).setCoexUnsafeChannels(unsafeChannels, restrictions);
 
         mWifiNative.teardownAllInterfaces();
-        mWifiNative.setupInterfaceForSoftApMode(null, TEST_WORKSOURCE, WIFI_BAND_24_GHZ, false,
-                mSoftApManager);
+        mWifiNative.setupInterfaceForSoftApMode(null, TEST_WORKSOURCE, WIFI_BAND_24_GHZ, false);
         verify(mWifiVendorHal, times(4)).setCoexUnsafeChannels(unsafeChannels, restrictions);
     }
 
@@ -1234,29 +1190,11 @@
 
     @Test
     public void testIsItPossibleToCreateIface() {
-        // HAL not started
-        when(mWifiVendorHal.isHalStarted()).thenReturn(false);
-        // Using any() here since SparseArray doesn't support Object.equals().
-        when(mWifiVendorHal.canDeviceSupportCreateTypeCombo(any())).thenReturn(true);
-        when(mWifiVendorHal.isItPossibleToCreateStaIface(any())).thenReturn(false);
-        assertTrue(mWifiNative.isItPossibleToCreateStaIface(new WorkSource()));
-
-        when(mWifiVendorHal.isItPossibleToCreateApIface(any())).thenReturn(false);
-        assertTrue(mWifiNative.isItPossibleToCreateApIface(new WorkSource()));
-
-        when(mWifiVendorHal.isItPossibleToCreateBridgedApIface(any())).thenReturn(false);
-        assertTrue(mWifiNative.isItPossibleToCreateBridgedApIface(new WorkSource()));
-
-        // HAL started
-        when(mWifiVendorHal.isHalStarted()).thenReturn(true);
-        when(mWifiVendorHal.isItPossibleToCreateStaIface(any())).thenReturn(true);
-        assertTrue(mWifiNative.isItPossibleToCreateStaIface(new WorkSource()));
-
         when(mWifiVendorHal.isItPossibleToCreateApIface(any())).thenReturn(true);
         assertTrue(mWifiNative.isItPossibleToCreateApIface(new WorkSource()));
 
-        when(mWifiVendorHal.isItPossibleToCreateBridgedApIface(any())).thenReturn(true);
-        assertTrue(mWifiNative.isItPossibleToCreateBridgedApIface(new WorkSource()));
+        when(mWifiVendorHal.isItPossibleToCreateStaIface(any())).thenReturn(true);
+        assertTrue(mWifiNative.isItPossibleToCreateStaIface(new WorkSource()));
     }
 
     @Test
@@ -1361,28 +1299,6 @@
         }
     }
 
-    /**
-     * Verifies setEapAnonymousIdentity() sunny case.
-     */
-    @Test
-    public void testSetEapAnonymousIdentitySuccess() throws Exception {
-        when(mStaIfaceHal.setEapAnonymousIdentity(any(), any())).thenReturn(true);
-        final String anonymousIdentity = "abc@realm.com";
-        assertTrue(mWifiNative.setEapAnonymousIdentity(WIFI_IFACE_NAME, anonymousIdentity));
-        verify(mStaIfaceHal).setEapAnonymousIdentity(eq(WIFI_IFACE_NAME),
-                eq(anonymousIdentity));
-    }
-
-    /**
-     * Verifies that setEapAnonymousIdentity() fails with null anonymous identity.
-     */
-    @Test
-    public void testSetEapAnonymousIdentityFailureWithNullString() throws Exception {
-        when(mStaIfaceHal.setEapAnonymousIdentity(any(), any())).thenReturn(true);
-        assertFalse(mWifiNative.setEapAnonymousIdentity(WIFI_IFACE_NAME, null));
-        verify(mStaIfaceHal, never()).setEapAnonymousIdentity(any(), any());
-    }
-
     @Test
     public void testSetApCountryCodeSuccessful() {
         when(mWifiVendorHal.setApCountryCode(any(), any())).thenReturn(true);
@@ -1432,35 +1348,4 @@
                 .onSetCountryCodeSucceeded(testCountryCode);
         }
     }
-
-    /**
-     * Tests notifyWifiCondCountryCodeChanged
-     */
-    @Test
-    public void testNotifyWifiCondCountryCodeChanged() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        String testCountryCode = "US";
-        mWifiNative.countryCodeChanged(testCountryCode);
-        verify(mWificondControl).notifyCountryCodeChanged(testCountryCode);
-    }
-
-    /**
-     * Tests that getSupportedFeatureSet() guaranteed to include the feature set stored in config
-     * store even when interface doesn't exist.
-     *
-     */
-    @Test
-    public void testGetSupportedFeatureSetWhenInterfaceDoesntExist() throws Exception {
-        long featureSet = mWifiNative.getSupportedFeatureSet(null);
-        assertEquals(featureSet, WIFI_TEST_FEATURE);
-    }
-
-    /**
-     * Verifies that isSoftApInstanceDiedHandlerSupported() calls underlying HostapdHal.
-     */
-    @Test
-    public void testIsSoftApInstanceDiedHandlerSupported() throws Exception {
-        mWifiNative.isSoftApInstanceDiedHandlerSupported();
-        verify(mHostapdHal).isSoftApInstanceDiedHandlerSupported();
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
index 0905926..b5e0e0e 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkFactoryTest.java
@@ -16,6 +16,9 @@
 
 package com.android.server.wifi;
 
+import static android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND;
+import static android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND_SERVICE;
+import static android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE;
 import static android.content.Intent.ACTION_SCREEN_OFF;
 import static android.content.Intent.ACTION_SCREEN_ON;
 
@@ -29,8 +32,6 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.anyInt;
 import static org.mockito.Mockito.anyList;
@@ -60,6 +61,7 @@
 import android.app.AlarmManager;
 import android.app.AlarmManager.OnAlarmListener;
 import android.app.AppOpsManager;
+import android.app.test.MockAnswerUtil;
 import android.companion.CompanionDeviceManager;
 import android.content.BroadcastReceiver;
 import android.content.Context;
@@ -77,14 +79,12 @@
 import android.net.wifi.INetworkRequestUserSelectionCallback;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiNetworkSpecifier;
 import android.net.wifi.WifiScanner;
 import android.net.wifi.WifiScanner.ScanListener;
 import android.net.wifi.WifiScanner.ScanSettings;
 import android.net.wifi.WifiSsid;
-import android.net.wifi.util.ScanResultUtil;
 import android.os.IBinder;
 import android.os.PatternMatcher;
 import android.os.PowerManager;
@@ -102,6 +102,7 @@
 import com.android.server.wifi.WifiNetworkFactory.AccessPoint;
 import com.android.server.wifi.proto.nano.WifiMetricsProto;
 import com.android.server.wifi.util.ActionListenerWrapper;
+import com.android.server.wifi.util.ScanResultUtil;
 import com.android.server.wifi.util.WifiConfigStoreEncryptionUtil;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.wifi.resources.R;
@@ -155,7 +156,7 @@
     private static final String TEST_BSSID_OUI_MASK = "ff:ff:ff:00:00:00";
     private static final String TEST_WPA_PRESHARED_KEY = "\"password123\"";
 
-    @Mock WifiContext mContext;
+    @Mock Context mContext;
     @Mock Resources mResources;
     @Mock ActivityManager mActivityManager;
     @Mock AlarmManager mAlarmManager;
@@ -167,7 +168,6 @@
     @Mock WifiConfigManager mWifiConfigManager;
     @Mock WifiConfigStore mWifiConfigStore;
     @Mock WifiPermissionsUtil mWifiPermissionsUtil;
-    @Mock FrameworkFacade mFrameworkFacade;
     @Mock WifiScanner mWifiScanner;
     @Mock PackageManager mPackageManager;
     @Mock IBinder mAppBinder;
@@ -175,13 +175,11 @@
     @Mock ConcreteClientModeManager mClientModeManager;
     @Mock ConnectivityManager mConnectivityManager;
     @Mock WifiMetrics mWifiMetrics;
-    @Mock WifiNative mWifiNative;
     @Mock NetworkProvider mNetworkProvider;
     @Mock ActiveModeWarden mActiveModeWarden;
     @Mock ConnectHelper mConnectHelper;
     @Mock PowerManager mPowerManager;
     @Mock ClientModeImplMonitor mCmiMonitor;
-    @Mock MultiInternetManager mMultiInternetManager;
     private @Mock ClientModeManager mPrimaryClientModeManager;
     private @Mock WifiGlobals mWifiGlobals;
     private MockitoSession mStaticMockSession = null;
@@ -248,39 +246,35 @@
         when(mResources.getBoolean(
                 eq(R.bool.config_wifiUseHalApiToDisableFwRoaming)))
                 .thenReturn(true);
-        when(mResources.getBoolean(
-                eq(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled)))
-                .thenReturn(false);
         when(mPackageManager.getNameForUid(TEST_UID_1)).thenReturn(TEST_PACKAGE_NAME_1);
         when(mPackageManager.getNameForUid(TEST_UID_2)).thenReturn(TEST_PACKAGE_NAME_2);
         when(mPackageManager.getApplicationInfoAsUser(any(), anyInt(), any()))
                 .thenReturn(new ApplicationInfo());
         when(mPackageManager.getApplicationLabel(any())).thenReturn(TEST_APP_NAME);
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, false);
-        mockPackageImportance(TEST_PACKAGE_NAME_2, true, false);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND_SERVICE);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_2))
+                .thenReturn(IMPORTANCE_FOREGROUND_SERVICE);
         when(mWifiInjector.getWifiScanner()).thenReturn(mWifiScanner);
         when(mWifiInjector.getActiveModeWarden()).thenReturn(mActiveModeWarden);
         when(mWifiInjector.getWifiGlobals()).thenReturn(mWifiGlobals);
         when(mWifiGlobals.isWpa3SaeUpgradeEnabled()).thenReturn(true);
         when(mWifiGlobals.isOweUpgradeEnabled()).thenReturn(true);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false)))
+        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString()))
                 .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID_1));
         when(mWifiScanner.getSingleScanResults()).thenReturn(Collections.emptyList());
         when(mNetworkRequestMatchCallback.asBinder()).thenReturn(mAppBinder);
 
         when(mActiveModeWarden.hasPrimaryClientModeManager()).thenReturn(true);
         when(mActiveModeWarden.getPrimaryClientModeManager()).thenReturn(mPrimaryClientModeManager);
-        doAnswer(invocation -> {
-            Object[] args = invocation.getArguments();
-            ActiveModeWarden.ExternalClientModeManagerRequestListener requestListener =
-                    (ActiveModeWarden.ExternalClientModeManagerRequestListener) args[0];
-            requestListener.onAnswer(mClientModeManager);
-            return null;
-        }).when(mActiveModeWarden).requestLocalOnlyClientModeManager(any(), any(), any(), any(),
-                anyBoolean());
+        doAnswer(new MockAnswerUtil.AnswerWithArguments() {
+            public void answer(
+                    ActiveModeWarden.ExternalClientModeManagerRequestListener requestListener,
+                    WorkSource ws, String ssid, String bssid) {
+                requestListener.onAnswer(mClientModeManager);
+            }
+        }).when(mActiveModeWarden).requestLocalOnlyClientModeManager(any(), any(), any(), any());
         when(mClientModeManager.getRole()).thenReturn(ActiveModeManager.ROLE_CLIENT_PRIMARY);
-        when(mFrameworkFacade.getSettingsWorkSource(any())).thenReturn(
-                new WorkSource(Process.SYSTEM_UID, "system-service"));
 
         when(mPrimaryClientModeManager.getSupportedFeatures()).thenReturn(
                 WifiManager.WIFI_FEATURE_WPA3_SAE | WifiManager.WIFI_FEATURE_OWE);
@@ -289,8 +283,7 @@
                 mNetworkCapabilities, mActivityManager, mAlarmManager, mAppOpsManager,
                 mClock, mWifiInjector, mWifiConnectivityManager,
                 mWifiConfigManager, mWifiConfigStore, mWifiPermissionsUtil, mWifiMetrics,
-                mWifiNative, mActiveModeWarden, mConnectHelper, mCmiMonitor, mFrameworkFacade,
-                mMultiInternetManager);
+                mActiveModeWarden, mConnectHelper, mCmiMonitor);
 
         verify(mContext, atLeastOnce()).registerReceiver(
                 mBroadcastReceiverCaptor.capture(), any(), any(), any());
@@ -335,14 +328,6 @@
         }
     }
 
-    private void mockPackageImportance(String packageName, boolean isFgAppOrService,
-            boolean isFgApp) {
-        when(mFrameworkFacade.isRequestFromForegroundAppOrService(any(), eq(packageName)))
-                .thenReturn(isFgAppOrService);
-        when(mFrameworkFacade.isRequestFromForegroundApp(any(), eq(packageName)))
-                .thenReturn(isFgApp);
-    }
-
     /**
      * Validates handling of needNetworkFor.
      */
@@ -428,8 +413,8 @@
     @Test
     public void testHandleAcceptNetworkRequestFromWithInvalidWifiNetworkSpecifier()
             throws Exception {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, false, false);
-
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_GONE);
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(TEST_UID_1))
                 .thenReturn(true);
         doThrow(new SecurityException()).when(mAppOpsManager).checkPackage(anyInt(), anyString());
@@ -446,7 +431,8 @@
      */
     @Test
     public void testHandleAcceptNetworkRequestFromWithInternetCapability() throws Exception {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, true);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND);
 
         attachDefaultWifiNetworkSpecifierAndAppInfo(TEST_UID_1, false);
         mNetworkRequest.networkCapabilities.addCapability(
@@ -463,7 +449,8 @@
      */
     @Test
     public void testHandleAcceptNetworkRequestFromNonFgAppOrSvcWithSpecifier() throws Exception {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, false, false);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND_SERVICE + 1);
 
         attachDefaultWifiNetworkSpecifierAndAppInfo(TEST_UID_1, false);
 
@@ -478,7 +465,8 @@
      */
     @Test
     public void testHandleAcceptNetworkRequestFromFgAppWithSpecifier() {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, true);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND);
 
         attachDefaultWifiNetworkSpecifierAndAppInfo(TEST_UID_1, false);
 
@@ -491,7 +479,8 @@
      */
     @Test
     public void testHandleAcceptNetworkRequestFromNetworkSettingAppWithSpecifier() {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, false, false);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_GONE);
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(TEST_UID_1))
                 .thenReturn(true);
 
@@ -506,7 +495,10 @@
      */
     @Test
     public void testHandleAcceptNetworkRequestFromFgAppWithSpecifierWithPendingRequestFromFgSvc() {
-        mockPackageImportance(TEST_PACKAGE_NAME_2, true, true);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND_SERVICE);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_2))
+                .thenReturn(IMPORTANCE_FOREGROUND);
 
         // Handle request 1.
         attachDefaultWifiNetworkSpecifierAndAppInfo(TEST_UID_1, false);
@@ -524,6 +516,10 @@
      */
     @Test
     public void testHandleAcceptNetworkRequestFromFgSvcWithSpecifierWithPendingRequestFromFgSvc() {
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND_SERVICE);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_2))
+                .thenReturn(IMPORTANCE_FOREGROUND_SERVICE);
 
         // Handle request 1.
         attachDefaultWifiNetworkSpecifierAndAppInfo(TEST_UID_1, false);
@@ -541,8 +537,10 @@
      */
     @Test
     public void testHandleAcceptNetworkRequestFromFgAppWithSpecifierWithPendingRequestFromFgApp() {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, true);
-        mockPackageImportance(TEST_PACKAGE_NAME_2, true, true);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_2))
+                .thenReturn(IMPORTANCE_FOREGROUND);
 
         // Handle request 1.
         attachDefaultWifiNetworkSpecifierAndAppInfo(TEST_UID_1, false);
@@ -561,7 +559,10 @@
     @Test
     public void testHandleAcceptNetworkRequestFromFgSvcWithSpecifierWithPendingRequestFromFgApp()
             throws Exception {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, true);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_2))
+                .thenReturn(IMPORTANCE_FOREGROUND_SERVICE);
 
         // Handle request 1.
         attachDefaultWifiNetworkSpecifierAndAppInfo(TEST_UID_1, false);
@@ -585,7 +586,10 @@
     public void
             testHandleAcceptNetworkRequestFromFgSvcWithSpecifierWithSamePendingRequestFromFgApp()
             throws Exception {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, true);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_2))
+                .thenReturn(IMPORTANCE_FOREGROUND_SERVICE);
 
         // Handle request 1.
         attachDefaultWifiNetworkSpecifierAndAppInfo(TEST_UID_1, false);
@@ -605,8 +609,10 @@
     public void
             testHandleAcceptNetworkRequestFromFgAppWithSpecifierWithConnectedRequestFromFgApp()
             throws Exception {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, true);
-        mockPackageImportance(TEST_PACKAGE_NAME_2, true, true);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_2))
+                .thenReturn(IMPORTANCE_FOREGROUND);
 
         // Connect to request 1
         sendNetworkRequestAndSetupForConnectionStatus(TEST_SSID_1);
@@ -629,7 +635,10 @@
     public void
             testHandleAcceptNetworkRequestFromFgSvcWithSpecifierWithConnectedRequestFromFgApp()
             throws Exception {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, true);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_2))
+                .thenReturn(IMPORTANCE_FOREGROUND_SERVICE);
 
         // Connect to request 1
         sendNetworkRequestAndSetupForConnectionStatus(TEST_SSID_1);
@@ -656,7 +665,10 @@
     public void
             testHandleAcceptNetworkRequestFromFgSvcWithSpecifierWithSameConnectedRequestFromFgApp()
             throws Exception {
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, true);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_1))
+                .thenReturn(IMPORTANCE_FOREGROUND);
+        when(mActivityManager.getPackageImportance(TEST_PACKAGE_NAME_2))
+                .thenReturn(IMPORTANCE_FOREGROUND_SERVICE);
 
         // Connect to request 1
         sendNetworkRequestAndSetupForConnectionStatus(TEST_SSID_1);
@@ -1267,7 +1279,6 @@
         sendUserSelectionSelect(networkRequestUserSelectionCallback, selectedNetwork);
         mLooper.dispatchAll();
 
-        // verify(mWifiConnectivityManager, times(2)).isStaConcurrencyForMultiInternetEnabled();
         // Verify we did not attempt to trigger a connection or disable connectivity manager.
         verifyNoMoreInteractions(mClientModeManager, mWifiConnectivityManager, mWifiConfigManager);
     }
@@ -1302,7 +1313,7 @@
         verify(mClientModeManager).disconnect();
         verify(mConnectHelper).connectToNetwork(eq(mClientModeManager),
                 eq(new NetworkUpdateResult(TEST_NETWORK_ID_1)),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), eq(TEST_PACKAGE_NAME_1));
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -1401,13 +1412,12 @@
         verify(mWifiConnectivityManager).setSpecificNetworkRequestInProgress(true);
 
         // verify we don't try to add the network to WifiConfigManager.
-        verify(mWifiConfigManager, never())
-                .addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false));
+        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(), anyInt(), anyString());
 
         verify(mClientModeManager).disconnect();
         verify(mConnectHelper).connectToNetwork(eq(mClientModeManager),
                 eq(new NetworkUpdateResult(TEST_NETWORK_ID_1)),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), eq(TEST_PACKAGE_NAME_1));
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -1457,7 +1467,7 @@
         verify(mClientModeManager).disconnect();
         verify(mConnectHelper).connectToNetwork(eq(mClientModeManager),
                 eq(new NetworkUpdateResult(TEST_NETWORK_ID_1)),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), eq(TEST_PACKAGE_NAME_1));
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -1508,7 +1518,7 @@
         verify(mClientModeManager).disconnect();
         verify(mConnectHelper).connectToNetwork(eq(mClientModeManager),
                 eq(new NetworkUpdateResult(TEST_NETWORK_ID_1)),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), eq(TEST_PACKAGE_NAME_1));
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -1569,7 +1579,7 @@
         verify(mClientModeManager).disconnect();
         verify(mConnectHelper).connectToNetwork(eq(mClientModeManager),
                 eq(new NetworkUpdateResult(TEST_NETWORK_ID_1)),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), eq(TEST_PACKAGE_NAME_1));
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -1636,7 +1646,7 @@
         verify(mClientModeManager).disconnect();
         verify(mConnectHelper).connectToNetwork(eq(mClientModeManager),
                 eq(new NetworkUpdateResult(TEST_NETWORK_ID_1)),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), eq(TEST_PACKAGE_NAME_1));
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -1704,8 +1714,7 @@
         // Send failure message beyond the retry limit to trigger the failure handling.
         for (int i = 0; i <= WifiNetworkFactory.USER_SELECTED_NETWORK_CONNECT_RETRY_MAX; i++) {
             assertNotNull(mConnectionTimeoutAlarmListenerArgumentCaptor.getValue());
-            mConnectListenerArgumentCaptor.getValue()
-                    .sendFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+            mConnectListenerArgumentCaptor.getValue().sendFailure(WifiManager.ERROR);
         }
         mLooper.dispatchAll();
 
@@ -2286,8 +2295,6 @@
      */
     @Test
     public void testHandleNetworkRequestWithSpecifierGetUid() throws Exception {
-        assertTrue(mWifiNetworkFactory.getSpecificNetworkRequestUids(
-                new WifiConfiguration(), "").isEmpty());
         assertEquals(Integer.valueOf(Process.INVALID_UID),
                 mWifiNetworkFactory.getSpecificNetworkRequestUidAndPackageName(
                         new WifiConfiguration(), new String()).first);
@@ -2300,8 +2307,6 @@
         // connected to a different network.
         WifiConfiguration connectedNetwork = new WifiConfiguration(mSelectedNetwork);
         connectedNetwork.SSID += "test";
-        assertTrue(mWifiNetworkFactory.getSpecificNetworkRequestUids(
-                new WifiConfiguration(), "").isEmpty());
         assertEquals(Integer.valueOf(Process.INVALID_UID),
                 mWifiNetworkFactory.getSpecificNetworkRequestUidAndPackageName(
                         new WifiConfiguration(), new String()).first);
@@ -2311,9 +2316,6 @@
         // connected to the correct network.
         connectedNetwork = new WifiConfiguration(mSelectedNetwork);
         String connectedBssid = TEST_BSSID_1;
-        assertEquals(Set.of(TEST_UID_1),
-                mWifiNetworkFactory.getSpecificNetworkRequestUids(
-                        connectedNetwork, connectedBssid));
         assertEquals(Integer.valueOf(TEST_UID_1),
                 mWifiNetworkFactory.getSpecificNetworkRequestUidAndPackageName(
                         connectedNetwork, connectedBssid).first);
@@ -2328,8 +2330,7 @@
     @Test
     public void testHandleNewNetworkRequestWithSpecifierWhenAwaitingCmRetrieval() throws Exception {
         doNothing().when(mActiveModeWarden).requestLocalOnlyClientModeManager(
-                any(), any(), any(), any(), anyBoolean());
-        WorkSource ws = new WorkSource(TEST_UID_1, TEST_PACKAGE_NAME_1);
+                any(), any(), any(), any());
 
         when(mClock.getElapsedSinceBootMillis()).thenReturn(0L);
 
@@ -2349,8 +2350,8 @@
                 ArgumentCaptor.forClass(
                         ActiveModeWarden.ExternalClientModeManagerRequestListener.class);
         verify(mActiveModeWarden).requestLocalOnlyClientModeManager(
-                cmListenerCaptor.capture(), eq(ws),
-                eq("\"" + TEST_SSID_1 + "\""), eq(TEST_BSSID_1), eq(true));
+                cmListenerCaptor.capture(), eq(new WorkSource(TEST_UID_1, TEST_PACKAGE_NAME_1)),
+                eq("\"" + TEST_SSID_1 + "\""), eq(TEST_BSSID_1));
         assertNotNull(cmListenerCaptor.getValue());
 
         NetworkRequest oldRequest = new NetworkRequest(mNetworkRequest);
@@ -2375,7 +2376,7 @@
 
         // Ensure we request a new ClientModeManager.
         verify(mActiveModeWarden, times(2)).requestLocalOnlyClientModeManager(
-                any(), any(), any(), any(), anyBoolean());
+                any(), any(), any(), any());
 
         // Now return the CM instance for the previous request.
         cmListenerCaptor.getValue().onAnswer(mClientModeManager);
@@ -2385,7 +2386,7 @@
         verify(mConnectHelper).connectToNetwork(
                 eq(mClientModeManager),
                 eq(new NetworkUpdateResult(TEST_NETWORK_ID_1)),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -2415,7 +2416,6 @@
         // Remove the stale request1 & ensure nothing happens.
         mWifiNetworkFactory.releaseNetworkFor(oldRequest);
 
-        // verify(mWifiConnectivityManager, times(2)).isStaConcurrencyForMultiInternetEnabled();
         verifyNoMoreInteractions(mWifiConnectivityManager, mWifiScanner, mClientModeManager,
                 mAlarmManager, mNetworkRequestMatchCallback);
 
@@ -2443,7 +2443,7 @@
 
         // Ensure we don't request a new ClientModeManager.
         verify(mActiveModeWarden, never()).requestLocalOnlyClientModeManager(
-                any(), any(), any(), any(), anyBoolean());
+                any(), any(), any(), any());
 
         // Ignore stale callbacks.
         WifiConfiguration selectedNetwork = WifiConfigurationTestUtil.createOpenNetwork();
@@ -2460,7 +2460,6 @@
         // Remove the stale request1 & ensure nothing happens.
         mWifiNetworkFactory.releaseNetworkFor(oldRequest);
 
-        // verify(mWifiConnectivityManager, times(2)).isStaConcurrencyForMultiInternetEnabled();
         verifyNoMoreInteractions(mWifiConnectivityManager, mWifiScanner, mClientModeManager,
                 mAlarmManager, mNetworkRequestMatchCallback);
 
@@ -2484,7 +2483,7 @@
 
         // Ensure we don't request a new ClientModeManager.
         verify(mActiveModeWarden, times(1)).requestLocalOnlyClientModeManager(
-                any(), any(), any(), any(), anyBoolean());
+                any(), any(), any(), any());
 
         verify(mNetworkRequestMatchCallback).onAbort();
         verify(mNetworkRequestMatchCallback, atLeastOnce()).asBinder();
@@ -2497,7 +2496,6 @@
         // Remove the stale request1 & ensure nothing happens.
         mWifiNetworkFactory.releaseNetworkFor(oldRequest);
 
-        // verify(mWifiConnectivityManager, times(3)).isStaConcurrencyForMultiInternetEnabled();
         verifyNoMoreInteractions(mWifiConnectivityManager, mWifiScanner, mClientModeManager,
                 mAlarmManager, mNetworkRequestMatchCallback);
 
@@ -2530,9 +2528,9 @@
         attachDefaultWifiNetworkSpecifierAndAppInfo(TEST_UID_2, false);
         mWifiNetworkFactory.needNetworkFor(mNetworkRequest);
 
-        // Ensure we do request a new ClientModeManager.
+        // Ensure we don't request a new ClientModeManager.
         verify(mActiveModeWarden, times(1)).requestLocalOnlyClientModeManager(
-                any(), any(), any(), any(), anyBoolean());
+                any(), any(), any(), any());
 
         verify(mWifiConnectivityManager, times(1)).setSpecificNetworkRequestInProgress(true);
         verify(mWifiScanner, times(2)).getSingleScanResults();
@@ -2623,7 +2621,6 @@
         mNetworkRequest.networkCapabilities.setNetworkSpecifier(specifier1);
         mWifiNetworkFactory.releaseNetworkFor(mNetworkRequest);
 
-        // verify(mWifiConnectivityManager, times(4)).isStaConcurrencyForMultiInternetEnabled();
         verifyNoMoreInteractions(mWifiConnectivityManager, mWifiScanner, mClientModeManager,
                 mAlarmManager);
 
@@ -2635,6 +2632,7 @@
         verify(mWifiConnectivityManager).setSpecificNetworkRequestInProgress(false);
         verify(mClientModeManager).enableRoaming(true);
         verify(mActiveModeWarden).removeClientModeManager(any());
+
         verifyNoMoreInteractions(mWifiConnectivityManager, mWifiScanner, mClientModeManager,
                 mAlarmManager);
     }
@@ -2658,7 +2656,7 @@
 
         // Send second request & we simulate the user rejecting the request.
         reset(mNetworkRequestMatchCallback, mWifiScanner, mAlarmManager);
-        sendNetworkRequestAndSetupForUserSelection(TEST_SSID_2, false);
+        sendNetworkRequestAndSetupForUserSelection(TEST_SSID_2);
         WifiNetworkSpecifier specifier2 =
                 (WifiNetworkSpecifier) mNetworkRequest.networkCapabilities.getNetworkSpecifier();
         mNetworkRequestUserSelectionCallback.getValue().reject();
@@ -2848,7 +2846,7 @@
 
         // 2. Simulate user forgeting the network.
         when(mWifiConfigManager.isNetworkTemporarilyDisabledByUser(
-                ScanResultUtil.createQuotedSsid(mTestScanDatas[0].getResults()[0].SSID)))
+                ScanResultUtil.createQuotedSSID(mTestScanDatas[0].getResults()[0].SSID)))
                 .thenReturn(true);
 
         // 3. Second request for the same access point (user approval bypass).
@@ -2873,19 +2871,18 @@
         validateScanResults(matchedScanResultsCaptor.getValue(), matchingScanResult);
         // Verify that we did not send a connection attempt to ModeImplProxy.
         verify(mConnectHelper, never()).connectToNetwork(any(), any(),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
-     * Verify that we don't bypass user approval for a specific request for an access point of
-     * a open network that was not approved previously, even if the network (not access point)
-     * had been approved.
+     * Verify that we don't bypass user approval for a specific request for an access point that was
+     * not approved previously.
      */
     @Test
-    public void testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchNotApprovedForOpenNetwork()
+    public void testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchNotApproved()
             throws Exception {
         // 1. First request (no user approval bypass)
-        sendNetworkRequestAndSetupForConnectionStatus(TEST_SSID_1, true);
+        sendNetworkRequestAndSetupForConnectionStatus();
 
         mWifiNetworkFactory.removeCallback(mNetworkRequestMatchCallback);
         mWifiNetworkFactory.releaseNetworkFor(mNetworkRequest);
@@ -2917,66 +2914,19 @@
         validateScanResults(matchedScanResultsCaptor.getValue(), matchingScanResult);
         // Verify that we did not send a connection attempt to ClientModeManager.
         verify(mConnectHelper, never()).connectToNetwork(any(), any(),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
-     * Verify that we don't bypass user approval for a specific request for a open network
+     * Verify that we don't bypass user approval for a specific request for a network
      * (not access point) that was approved previously.
      */
     @Test
-    public void testNetworkSpecifierMatchSuccessUsingLiteralSsidMatchNotApprovedForOpenNetwork()
+    public void testNetworkSpecifierMatchSuccessUsingLiteralSsidMatchApproved()
             throws Exception {
         // 1. First request (no user approval bypass)
-        sendNetworkRequestAndSetupForConnectionStatus(TEST_SSID_1, true);
-
-        mWifiNetworkFactory.removeCallback(mNetworkRequestMatchCallback);
-        mWifiNetworkFactory.releaseNetworkFor(mNetworkRequest);
-        reset(mNetworkRequestMatchCallback, mWifiScanner, mAlarmManager, mClientModeManager,
-                mConnectHelper);
-
-        // 2. Second request for the same network (but not specific access point)
-        ScanResult matchingScanResult = mTestScanDatas[0].getResults()[0];
-        PatternMatcher ssidPatternMatch =
-                new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
-        // match-all.
-        Pair<MacAddress, MacAddress> bssidPatternMatch =
-                Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
-        attachWifiNetworkSpecifierAndAppInfo(
-                ssidPatternMatch, bssidPatternMatch, WifiConfigurationTestUtil.createOpenNetwork(),
-                TEST_UID_1, TEST_PACKAGE_NAME_1);
-        mWifiNetworkFactory.needNetworkFor(mNetworkRequest);
-        when(mNetworkRequestMatchCallback.asBinder()).thenReturn(mAppBinder);
-        mWifiNetworkFactory.addCallback(mNetworkRequestMatchCallback);
-        verifyPeriodicScans(0, PERIODIC_SCAN_INTERVAL_MS);
-        ArgumentCaptor<List<ScanResult>> matchedScanResultsCaptor =
-                ArgumentCaptor.forClass(List.class);
-        // Verify we triggered the match callback.
-        matchedScanResultsCaptor = ArgumentCaptor.forClass(List.class);
-        verify(mNetworkRequestMatchCallback).onMatch(matchedScanResultsCaptor.capture());
-        assertNotNull(matchedScanResultsCaptor.getValue());
-        validateScanResults(matchedScanResultsCaptor.getValue(), matchingScanResult);
-        // Verify that we did not send a connection attempt to ClientModeManager.
-        verify(mConnectHelper, never()).connectToNetwork(any(), any(),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
-    }
-
-    /**
-     * Verify that we bypass user approval for a specific request for a non-open network
-     * (not access point) that was approved previously.
-     */
-    private void testNetworkSpecifierMatchSuccessUsingLiteralSsidMatchApproved(
-            boolean bypassActivated) throws Exception {
-        ArgumentCaptor<WifiConfiguration> configurationArgumentCaptor =
-                ArgumentCaptor.forClass(WifiConfiguration.class);
-        // 1. First request (no user approval bypass)
         sendNetworkRequestAndSetupForConnectionStatus();
 
-        verify(mWifiConfigManager).addOrUpdateNetwork(
-                configurationArgumentCaptor.capture(), anyInt(), anyString(), eq(false));
-        // BSSID should be non-null when the user selects the network
-        assertNotNull(configurationArgumentCaptor.getValue().BSSID);
-
         mWifiNetworkFactory.removeCallback(mNetworkRequestMatchCallback);
         mWifiNetworkFactory.releaseNetworkFor(mNetworkRequest);
         reset(mNetworkRequestMatchCallback, mWifiScanner, mAlarmManager, mClientModeManager,
@@ -2993,46 +2943,19 @@
                 ssidPatternMatch, bssidPatternMatch, WifiConfigurationTestUtil.createPskNetwork(),
                 TEST_UID_1, TEST_PACKAGE_NAME_1);
         mWifiNetworkFactory.needNetworkFor(mNetworkRequest);
-
-        // Connection does not happen yet since it is waiting for scan results.
-        verify(mConnectHelper, never()).connectToNetwork(any(), any(),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
-
-        // simulate scan results coming in and verify we auto connect to the network
         when(mNetworkRequestMatchCallback.asBinder()).thenReturn(mAppBinder);
         mWifiNetworkFactory.addCallback(mNetworkRequestMatchCallback);
         verifyPeriodicScans(0, PERIODIC_SCAN_INTERVAL_MS);
         ArgumentCaptor<List<ScanResult>> matchedScanResultsCaptor =
                 ArgumentCaptor.forClass(List.class);
-        // Verify the match callback is not triggered since the UI is not started.
+        // Verify we triggered the match callback.
         matchedScanResultsCaptor = ArgumentCaptor.forClass(List.class);
-        verify(mNetworkRequestMatchCallback, bypassActivated ? never() : times(1)).onMatch(
-                matchedScanResultsCaptor.capture());
-
-        // Verify we added a WIfiConfiguration with non-null BSSID, and a connection is initiated.
-        verify(mWifiConfigManager, bypassActivated ? times(2) : times(1)).addOrUpdateNetwork(
-                configurationArgumentCaptor.capture(), anyInt(), anyString(), eq(false));
-        assertNotNull(configurationArgumentCaptor.getAllValues().get(0).BSSID);
-        if (bypassActivated) {
-            assertNotNull(configurationArgumentCaptor.getAllValues().get(1).BSSID);
-            verify(mConnectHelper).connectToNetwork(any(), any(),
-                    mConnectListenerArgumentCaptor.capture(), anyInt(), any());
-        }
-    }
-
-    @Test
-    public void testNetworkSpecifierMatchSuccessUsingLiteralSsidMatchApprovedNoStaSta()
-            throws Exception {
-        testNetworkSpecifierMatchSuccessUsingLiteralSsidMatchApproved(true);
-    }
-
-    @Test
-    public void testNetworkSpecifierMatchSuccessUsingLiteralSsidMatchApprovedYesStaSta()
-            throws Exception {
-        when(mResources.getBoolean(
-                eq(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled)))
-                .thenReturn(true);
-        testNetworkSpecifierMatchSuccessUsingLiteralSsidMatchApproved(false);
+        verify(mNetworkRequestMatchCallback).onMatch(matchedScanResultsCaptor.capture());
+        assertNotNull(matchedScanResultsCaptor.getValue());
+        validateScanResults(matchedScanResultsCaptor.getValue(), matchingScanResult);
+        // Verify that we did not send a connection attempt to ClientModeManager.
+        verify(mConnectHelper, never()).connectToNetwork(any(), any(),
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -3077,7 +3000,7 @@
         validateScanResults(matchedScanResultsCaptor.getValue(), matchingScanResult);
         // Verify that we did not send a connection attempt to ClientModeManager.
         verify(mConnectHelper, never()).connectToNetwork(any(), any(),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -3121,7 +3044,7 @@
         validateScanResults(matchedScanResultsCaptor.getValue(), matchingScanResult);
         // Verify that we did not send a connection attempt to ClientModeManager.
         verify(mConnectHelper, never()).connectToNetwork(any(), any(),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -3184,7 +3107,7 @@
         verify(mNetworkRequestMatchCallback, never()).onMatch(anyList());
         // Verify that we sent a connection attempt to ClientModeManager
         verify(mConnectHelper).connectToNetwork(eq(mClientModeManager),  any(),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
+                mConnectListenerArgumentCaptor.capture(), anyInt());
     }
 
     /**
@@ -3220,15 +3143,15 @@
      * Verify the user approval bypass for a specific request for an access point that was already
      * approved previously and the scan result is present in the cached scan results.
      */
-    private void testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApproved(
-            boolean bypassActivated) throws Exception {
+    @Test
+    public void testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApproved()
+            throws Exception {
         // 1. First request (no user approval bypass)
         sendNetworkRequestAndSetupForConnectionStatus();
 
         mWifiNetworkFactory.removeCallback(mNetworkRequestMatchCallback);
         reset(mNetworkRequestMatchCallback, mWifiScanner, mAlarmManager, mClientModeManager,
                 mConnectHelper);
-        mWifiNetworkFactory.releaseNetworkFor(mNetworkRequest);
 
         // 2. Second request for the same access point (user approval bypass).
         ScanResult matchingScanResult = mTestScanDatas[0].getResults()[0];
@@ -3244,41 +3167,24 @@
         mWifiNetworkFactory.needNetworkFor(mNetworkRequest);
 
         // Verify we did not trigger the UI for the second request.
-        verify(mContext, times(bypassActivated ? 1 : 2)).startActivityAsUser(any(), any());
+        verify(mContext, times(1)).startActivityAsUser(any(), any());
         // Verify we did not trigger a scan.
-        verify(mWifiScanner, bypassActivated ? never() : times(1)).startScan(any(), any(), any(),
-                any());
+        verify(mWifiScanner, never()).startScan(any(), any(), any(), any());
         // Verify we did not trigger the match callback.
         verify(mNetworkRequestMatchCallback, never()).onMatch(anyList());
         // Verify that we sent a connection attempt to ClientModeManager
-        if (bypassActivated) {
-            verify(mConnectHelper).connectToNetwork(eq(mClientModeManager), any(),
-                    mConnectListenerArgumentCaptor.capture(), anyInt(), any());
+        verify(mConnectHelper).connectToNetwork(eq(mClientModeManager),  any(),
+                mConnectListenerArgumentCaptor.capture(), anyInt());
 
-            verify(mWifiMetrics).incrementNetworkRequestApiNumUserApprovalBypass();
-        }
-    }
-
-    @Test
-    public void testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApprovedNoStaSta()
-            throws Exception {
-        testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApproved(true);
-    }
-
-    @Test
-    public void testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApprovedYesStaSta()
-            throws Exception {
-        when(mResources.getBoolean(
-                eq(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled)))
-                .thenReturn(true);
-        testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApproved(false);
+        verify(mWifiMetrics).incrementNetworkRequestApiNumUserApprovalBypass();
     }
 
     /**
      * Verify the user approval bypass for a specific request for an access point that was already
      * approved previously via CDM and the scan result is present in the cached scan results.
      */
-    private void
+    @Test
+    public void
             testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApprovedViaCDM()
             throws Exception {
         // Setup scan data for WPA-PSK networks.
@@ -3312,28 +3218,11 @@
         verify(mNetworkRequestMatchCallback, never()).onMatch(anyList());
         // Verify that we sent a connection attempt to ClientModeManager
         verify(mConnectHelper).connectToNetwork(eq(mClientModeManager),  any(),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
+                mConnectListenerArgumentCaptor.capture(), anyInt());
 
         verify(mWifiMetrics).incrementNetworkRequestApiNumUserApprovalBypass();
     }
 
-    @Test
-    public void
-            testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApprovedViaCDMNoStaSta()
-            throws Exception {
-        testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApprovedViaCDM();
-    }
-
-    @Test
-    public void
-            testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApprovedViaCDMYesStaSta()
-            throws Exception {
-        when(mResources.getBoolean(
-                eq(R.bool.config_wifiMultiStaLocalOnlyConcurrencyEnabled)))
-                .thenReturn(true);
-        testNetworkSpecifierMatchSuccessUsingLiteralSsidAndBssidMatchApprovedViaCDM();
-    }
-
     /**
      * Verify the user approval bypass for a specific request for an access point that was already
      * approved previously via shell command and the scan result is present in the cached scan
@@ -3371,7 +3260,7 @@
         verify(mNetworkRequestMatchCallback, never()).onMatch(anyList());
         // Verify that we sent a connection attempt to ClientModeManager
         verify(mConnectHelper).connectToNetwork(eq(mClientModeManager),  any(),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
+                mConnectListenerArgumentCaptor.capture(), anyInt());
 
         verify(mWifiMetrics).incrementNetworkRequestApiNumUserApprovalBypass();
     }
@@ -3421,177 +3310,29 @@
                 matchedScanResultsCaptor.getValue().size());
     }
 
-    /**
-     * Validates a new network request from a normal app for same network which is already connected
-     * by another request, the connection will be shared with the new request without reconnection.
-     */
-    @Test
-    public void testShareConnectedNetworkWithoutCarModePriority() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, true);
-        mockPackageImportance(TEST_PACKAGE_NAME_2, true, true);
-
-        // Connect to request 1
-        sendNetworkRequestAndSetupForConnectionStatus(TEST_SSID_1);
-        // Send network connection success indication.
-        assertNotNull(mSelectedNetwork);
-        mSelectedNetwork.BSSID = TEST_BSSID_1;
-        mWifiNetworkFactory.handleConnectionAttemptEnded(
-                WifiMetrics.ConnectionEvent.FAILURE_NONE, mSelectedNetwork, TEST_BSSID_1);
-
-        reset(mClientModeManager);
-        reset(mConnectHelper);
-        reset(mWifiConnectivityManager);
-
-        // Setup for connected network
-        when(mClientModeManager.getRole()).thenReturn(ActiveModeManager.ROLE_CLIENT_PRIMARY);
-        when(mWifiScanner.getSingleScanResults())
-                .thenReturn(Arrays.asList(mTestScanDatas[0].getResults()));
-        when(mClientModeManager.getConnectedBssid()).thenReturn(TEST_BSSID_1);
-        when(mClientModeManager.getConnectedWifiConfiguration()).thenReturn(mSelectedNetwork);
-
-        // Setup network specifier for same networks.
-        PatternMatcher ssidPatternMatch =
-                new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
-        Pair<MacAddress, MacAddress> bssidPatternMatch =
-                Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
-        attachWifiNetworkSpecifierAndAppInfo(
-                ssidPatternMatch, bssidPatternMatch, mSelectedNetwork, TEST_UID_2,
-                TEST_PACKAGE_NAME_2);
-        mWifiNetworkFactory.needNetworkFor(new NetworkRequest(mNetworkRequest));
-
-        validateUiStartParams(true);
-
-        when(mNetworkRequestMatchCallback.asBinder()).thenReturn(mAppBinder);
-        mWifiNetworkFactory.addCallback(mNetworkRequestMatchCallback);
-        verify(mNetworkRequestMatchCallback, atLeastOnce()).onUserSelectionCallbackRegistration(
-                mNetworkRequestUserSelectionCallback.capture());
-
-        verify(mNetworkRequestMatchCallback, atLeastOnce()).onMatch(anyList());
-
-        INetworkRequestUserSelectionCallback networkRequestUserSelectionCallback =
-                mNetworkRequestUserSelectionCallback.getValue();
-        assertNotNull(networkRequestUserSelectionCallback);
-
-        // Now trigger user selection to one of the network.
-        sendUserSelectionSelect(networkRequestUserSelectionCallback, mSelectedNetwork);
-        mLooper.dispatchAll();
-
-        // Verify no reconnection
-        verify(mWifiConnectivityManager, never()).setSpecificNetworkRequestInProgress(true);
-        verify(mClientModeManager, never()).disconnect();
-        verify(mConnectHelper, never()).connectToNetwork(any(), any(), any(), anyInt(), any());
-
-        // Verify the network will be shared with new request.
-        assertEquals(2, mWifiNetworkFactory
-                .getSpecificNetworkRequestUids(mSelectedNetwork, TEST_BSSID_1).size());
-    }
-
-    /**
-     * Validates a new network request with Car Mode Priority for same network which is already
-     * connected by another request, the connection will disconnect and reconnect.
-     */
-    @Test
-    public void testShareConnectedNetworkWithCarModePriority() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        mockPackageImportance(TEST_PACKAGE_NAME_1, true, true);
-        mockPackageImportance(TEST_PACKAGE_NAME_2, true, true);
-        when(mWifiPermissionsUtil.checkEnterCarModePrioritized(TEST_UID_2)).thenReturn(true);
-
-        // Connect to request 1
-        sendNetworkRequestAndSetupForConnectionStatus(TEST_SSID_1);
-        // Send network connection success indication.
-        assertNotNull(mSelectedNetwork);
-        mSelectedNetwork.BSSID = TEST_BSSID_1;
-        mWifiNetworkFactory.handleConnectionAttemptEnded(
-                WifiMetrics.ConnectionEvent.FAILURE_NONE, mSelectedNetwork, TEST_BSSID_1);
-
-        reset(mClientModeManager);
-        reset(mConnectHelper);
-        reset(mWifiConnectivityManager);
-
-        // Setup for connected network
-        when(mClientModeManager.getRole()).thenReturn(ActiveModeManager.ROLE_CLIENT_PRIMARY);
-        when(mWifiScanner.getSingleScanResults())
-                .thenReturn(Arrays.asList(mTestScanDatas[0].getResults()));
-        when(mClientModeManager.getConnectedBssid()).thenReturn(TEST_BSSID_1);
-        when(mClientModeManager.getConnectedWifiConfiguration()).thenReturn(mSelectedNetwork);
-
-        // Setup network specifier for same networks.
-        PatternMatcher ssidPatternMatch =
-                new PatternMatcher(TEST_SSID_1, PatternMatcher.PATTERN_LITERAL);
-        Pair<MacAddress, MacAddress> bssidPatternMatch =
-                Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
-        attachWifiNetworkSpecifierAndAppInfo(
-                ssidPatternMatch, bssidPatternMatch, mSelectedNetwork, TEST_UID_2,
-                TEST_PACKAGE_NAME_2);
-        mWifiNetworkFactory.needNetworkFor(new NetworkRequest(mNetworkRequest));
-
-        validateUiStartParams(true);
-
-        when(mNetworkRequestMatchCallback.asBinder()).thenReturn(mAppBinder);
-        mWifiNetworkFactory.addCallback(mNetworkRequestMatchCallback);
-        verify(mNetworkRequestMatchCallback, atLeastOnce()).onUserSelectionCallbackRegistration(
-                mNetworkRequestUserSelectionCallback.capture());
-
-        verify(mNetworkRequestMatchCallback, atLeastOnce()).onMatch(anyList());
-
-        INetworkRequestUserSelectionCallback networkRequestUserSelectionCallback =
-                mNetworkRequestUserSelectionCallback.getValue();
-        assertNotNull(networkRequestUserSelectionCallback);
-
-        // Now trigger user selection to one of the network.
-        sendUserSelectionSelect(networkRequestUserSelectionCallback, mSelectedNetwork);
-        mLooper.dispatchAll();
-
-        // Verify disconnect and reconnect
-        verify(mWifiConnectivityManager).setSpecificNetworkRequestInProgress(true);
-        verify(mClientModeManager).disconnect();
-        verify(mConnectHelper).connectToNetwork(any(), any(), any(), anyInt(), any());
-
-        // Verify the network will be only available to car mode app.
-        assertEquals(1, mWifiNetworkFactory
-                .getSpecificNetworkRequestUids(mSelectedNetwork, TEST_BSSID_1).size());
-    }
-
     private void sendNetworkRequestAndSetupForConnectionStatus() throws RemoteException {
         sendNetworkRequestAndSetupForConnectionStatus(TEST_SSID_1);
     }
 
-    private void sendNetworkRequestAndSetupForConnectionStatus(String targetSsid)
-            throws RemoteException {
-        sendNetworkRequestAndSetupForConnectionStatus(targetSsid, false);
-    }
-
     // Helper method to setup the necessary pre-requisite steps for tracking connection status.
-    private void sendNetworkRequestAndSetupForConnectionStatus(String targetSsid,
-            boolean isOpenNetwork)
+    private void sendNetworkRequestAndSetupForConnectionStatus(String targetSsid)
             throws RemoteException {
         when(mClock.getElapsedSinceBootMillis()).thenReturn(0L);
 
-        sendNetworkRequestAndSetupForUserSelection(targetSsid, isOpenNetwork);
+        sendNetworkRequestAndSetupForUserSelection(targetSsid);
 
         INetworkRequestUserSelectionCallback networkRequestUserSelectionCallback =
                 mNetworkRequestUserSelectionCallback.getValue();
         assertNotNull(networkRequestUserSelectionCallback);
 
         // Now trigger user selection to one of the network.
-        mSelectedNetwork = isOpenNetwork
-                ? WifiConfigurationTestUtil.createOpenNetwork()
-                : WifiConfigurationTestUtil.createPskNetwork();
+        mSelectedNetwork = WifiConfigurationTestUtil.createPskNetwork();
         mSelectedNetwork.SSID = "\"" + targetSsid + "\"";
-        mSelectedNetwork.preSharedKey = TEST_WPA_PRESHARED_KEY;
         sendUserSelectionSelect(networkRequestUserSelectionCallback, mSelectedNetwork);
         mLooper.dispatchAll();
 
         verify(mActiveModeWarden, atLeastOnce()).requestLocalOnlyClientModeManager(
-                any(), any(), any(), any(), anyBoolean());
-        if (SdkLevel.isAtLeastS()) {
-            verify(mClientModeManager, atLeastOnce()).getConnectedWifiConfiguration();
-            verify(mClientModeManager, atLeastOnce()).getConnectingWifiConfiguration();
-            verify(mClientModeManager, atLeastOnce()).getConnectingBssid();
-            verify(mClientModeManager, atLeastOnce()).getConnectedBssid();
-        }
+                any(), any(), any(), any());
 
         // Cancel the periodic scan timer.
         mInOrder.verify(mAlarmManager).cancel(mPeriodicScanListenerArgumentCaptor.getValue());
@@ -3607,7 +3348,7 @@
         verify(mConnectHelper, atLeastOnce()).connectToNetwork(
                 eq(mClientModeManager),
                 eq(new NetworkUpdateResult(TEST_NETWORK_ID_1)),
-                mConnectListenerArgumentCaptor.capture(), anyInt(), any());
+                mConnectListenerArgumentCaptor.capture(), anyInt());
         if (mClientModeManager.getRole() == ActiveModeManager.ROLE_CLIENT_PRIMARY) {
             verify(mWifiMetrics, atLeastOnce())
                     .incrementNetworkRequestApiNumConnectOnPrimaryIface();
@@ -3624,15 +3365,14 @@
     }
 
     private void sendNetworkRequestAndSetupForUserSelection() throws RemoteException {
-        sendNetworkRequestAndSetupForUserSelection(TEST_SSID_1, false);
+        sendNetworkRequestAndSetupForUserSelection(TEST_SSID_1);
     }
 
     // Helper method to setup the necessary pre-requisite steps for user selection.
-    private void sendNetworkRequestAndSetupForUserSelection(String targetSsid,
-            boolean isOpenNetwork)
+    private void sendNetworkRequestAndSetupForUserSelection(String targetSsid)
             throws RemoteException {
         // Setup scan data for WPA-PSK networks.
-        setupScanData(isOpenNetwork ? SCAN_RESULT_TYPE_OPEN : SCAN_RESULT_TYPE_WPA_PSK,
+        setupScanData(SCAN_RESULT_TYPE_WPA_PSK,
                 TEST_SSID_1, TEST_SSID_2, TEST_SSID_3, TEST_SSID_4);
 
         // Setup network specifier for WPA-PSK networks.
@@ -3640,9 +3380,7 @@
                 new PatternMatcher(targetSsid, PatternMatcher.PATTERN_LITERAL);
         Pair<MacAddress, MacAddress> bssidPatternMatch =
                 Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
-        WifiConfiguration wifiConfiguration = isOpenNetwork
-                ? WifiConfigurationTestUtil.createOpenNetwork()
-                : WifiConfigurationTestUtil.createPskNetwork();
+        WifiConfiguration wifiConfiguration = WifiConfigurationTestUtil.createPskNetwork();
         wifiConfiguration.preSharedKey = TEST_WPA_PRESHARED_KEY;
         attachWifiNetworkSpecifierAndAppInfo(
                 ssidPatternMatch, bssidPatternMatch, wifiConfiguration, TEST_UID_1,
@@ -3800,22 +3538,22 @@
 
         // Scan results have increasing RSSI.
         scanResults[0].SSID = ssid1;
-        scanResults[0].setWifiSsid(WifiSsid.fromUtf8Text(ssid1));
+        scanResults[0].wifiSsid = WifiSsid.createFromAsciiEncoded(ssid1);
         scanResults[0].BSSID = TEST_BSSID_1;
         scanResults[0].capabilities = caps;
         scanResults[0].level = -45;
         scanResults[1].SSID = ssid2;
-        scanResults[1].setWifiSsid(WifiSsid.fromUtf8Text(ssid2));
+        scanResults[1].wifiSsid = WifiSsid.createFromAsciiEncoded(ssid2);
         scanResults[1].BSSID = TEST_BSSID_2;
         scanResults[1].capabilities = caps;
         scanResults[1].level = -35;
         scanResults[2].SSID = ssid3;
-        scanResults[2].setWifiSsid(WifiSsid.fromUtf8Text(ssid3));
+        scanResults[2].wifiSsid = WifiSsid.createFromAsciiEncoded(ssid3);
         scanResults[2].BSSID = TEST_BSSID_3;
         scanResults[2].capabilities = caps;
         scanResults[2].level = -25;
         scanResults[3].SSID = ssid4;
-        scanResults[3].setWifiSsid(WifiSsid.fromUtf8Text(ssid4));
+        scanResults[3].wifiSsid = WifiSsid.createFromAsciiEncoded(ssid4);
         scanResults[3].BSSID = TEST_BSSID_4;
         scanResults[3].capabilities = caps;
         scanResults[3].level = -15;
@@ -3847,7 +3585,7 @@
                     eq(mClientModeManager),
                     eq(new NetworkUpdateResult(TEST_NETWORK_ID_1)),
                     mConnectListenerArgumentCaptor.capture(),
-                    anyInt(), any());
+                    anyInt());
 
             // Start the new connection timeout alarm.
             mInOrder.verify(mAlarmManager).set(eq(AlarmManager.ELAPSED_REALTIME_WAKEUP),
@@ -3909,8 +3647,8 @@
     private void validateConnectParams(String ssid, String bssid) {
         ArgumentCaptor<WifiConfiguration> wifiConfigurationCaptor =
                 ArgumentCaptor.forClass(WifiConfiguration.class);
-        verify(mWifiConfigManager).addOrUpdateNetwork(wifiConfigurationCaptor.capture(),
-                eq(TEST_UID_1), eq(TEST_PACKAGE_NAME_1), eq(false));
+        verify(mWifiConfigManager).addOrUpdateNetwork(
+                wifiConfigurationCaptor.capture(), eq(TEST_UID_1), eq(TEST_PACKAGE_NAME_1));
         WifiConfiguration network =  wifiConfigurationCaptor.getValue();
         assertNotNull(network);
         WifiConfiguration expectedWifiConfiguration =
@@ -3945,7 +3683,6 @@
         for (int i = 0; i < ssids.length; i++) {
             for (int j = i * nums; j < (i + 1) * nums; j++) {
                 scanResults[j].SSID = ssids[i];
-                scanResults[j].setWifiSsid(WifiSsid.fromUtf8Text(ssids[i]));
                 scanResults[j].BSSID = baseBssid + Integer.toHexString(16 + j);
                 scanResults[j].capabilities = caps;
                 scanResults[j].level = -45;
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkScoreCacheTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkScoreCacheTest.java
new file mode 100644
index 0000000..ced2fc9
--- /dev/null
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkScoreCacheTest.java
@@ -0,0 +1,218 @@
+/*
+ * Copyright (C) 2016 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.server.wifi;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.when;
+
+import android.content.Context;
+import android.net.NetworkKey;
+import android.net.RssiCurve;
+import android.net.ScoredNetwork;
+import android.net.WifiKey;
+import android.net.wifi.ScanResult;
+import android.net.wifi.WifiSsid;
+import android.os.Handler;
+import android.os.HandlerThread;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.server.wifi.WifiNetworkScoreCache.CacheListener;
+
+import com.google.common.collect.ImmutableList;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/** Unit tests for {@link WifiNetworkScoreCache}. */
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class WifiNetworkScoreCacheTest {
+
+    public static final String SSID = "ssid";
+    public static final String SSID2 = "ssid2";
+    public static final String SSID3 = "ssid3";
+    public static final String FORMATTED_SSID = "\"" + SSID + "\"";
+    public static final String FORMATTED_SSID2 = "\"" + SSID2 + "\"";
+    public static final String FORMATTED_SSID3 = "\"" + SSID3 + "\"";
+    public static final String BSSID = "AA:AA:AA:AA:AA:AA";
+
+    public static final WifiKey VALID_KEY = new WifiKey(FORMATTED_SSID, BSSID);
+
+    public static final ScanResult VALID_SCAN_RESULT = buildScanResult(SSID, BSSID);
+
+    @Mock
+    private Context mMockApplicationContext;
+    @Mock
+    private Context mMockContext; // isn't used, can be null
+    @Mock
+    private RssiCurve mMockRssiCurve;
+
+
+    private CacheListener mCacheListener;
+    private CountDownLatch mLatch;
+    private Handler mHandler;
+    private List<ScoredNetwork> mUpdatedNetworksCaptor;
+    private ScoredNetwork mValidScoredNetwork;
+    private WifiNetworkScoreCache mScoreCache;
+
+    private static ScanResult buildScanResult(String ssid, String bssid) {
+        return new ScanResult(
+                WifiSsid.createFromAsciiEncoded(ssid),
+                bssid,
+                "" /* caps */,
+                0 /* level */,
+                0 /* frequency */,
+                0 /* tsf */,
+                0 /* distCm */,
+                0 /* distSdCm*/);
+    }
+
+    private static ScoredNetwork buildScoredNetwork(WifiKey key, RssiCurve curve) {
+        return new ScoredNetwork(new NetworkKey(key), curve);
+    }
+
+    // Called from setup
+    private void initializeCacheWithValidScoredNetwork() {
+        mScoreCache.onScoresUpdated(ImmutableList.of(mValidScoredNetwork));
+    }
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+
+        when(mMockContext.getApplicationContext()).thenReturn(mMockApplicationContext);
+
+        mValidScoredNetwork = buildScoredNetwork(VALID_KEY, mMockRssiCurve);
+        mScoreCache = new WifiNetworkScoreCache(mMockContext);
+        initializeCacheWithValidScoredNetwork();
+
+        HandlerThread thread = new HandlerThread("WifiNetworkScoreCacheTest Handler Thread");
+        thread.start();
+        mHandler = new Handler(thread.getLooper());
+        mLatch = new CountDownLatch(1);
+        mCacheListener = new CacheListener(mHandler) {
+            @Override
+            public void networkCacheUpdated(List<ScoredNetwork> updatedNetworks) {
+                mUpdatedNetworksCaptor = updatedNetworks;
+                mLatch.countDown();
+            }
+        };
+    }
+
+
+    @Test
+    public void isScoredNetworkShouldReturnTrueAfterUpdateScoresIsCalled() {
+        assertThat(mScoreCache.isScoredNetwork(VALID_SCAN_RESULT)).isTrue();
+    }
+
+    @Test
+    public void isScoredNetworkShouldReturnFalseAfterClearScoresIsCalled() {
+        mScoreCache.onScoresInvalidated();
+        assertThat(mScoreCache.isScoredNetwork(VALID_SCAN_RESULT)).isFalse();
+    }
+
+    @Test
+    public void onScoresUpdatedShouldAddNewNetwork() {
+        WifiKey key2 = new WifiKey("\"ssid2\"", BSSID);
+        ScoredNetwork network2 = buildScoredNetwork(key2, mMockRssiCurve);
+        ScanResult result2 = buildScanResult("ssid2", BSSID);
+
+        mScoreCache.onScoresUpdated(ImmutableList.of(network2));
+
+        assertThat(mScoreCache.isScoredNetwork(VALID_SCAN_RESULT)).isTrue();
+        assertThat(mScoreCache.isScoredNetwork(result2)).isTrue();
+    }
+
+    @Test
+    public void hasScoreCurveShouldReturnTrue() {
+        assertThat(mScoreCache.hasScoreCurve(VALID_SCAN_RESULT)).isTrue();
+    }
+
+    @Test
+    public void hasScoreCurveShouldReturnFalseWhenNoCachedNetwork() {
+        ScanResult unscored = buildScanResult("fake", BSSID);
+        assertThat(mScoreCache.hasScoreCurve(unscored)).isFalse();
+    }
+
+    @Test
+    public void hasScoreCurveShouldReturnFalseWhenScoredNetworkHasNoCurve() {
+        ScoredNetwork noCurve = buildScoredNetwork(VALID_KEY, null /* rssiCurve */);
+        mScoreCache.onScoresUpdated(ImmutableList.of(noCurve));
+
+        assertThat(mScoreCache.hasScoreCurve(VALID_SCAN_RESULT)).isFalse();
+    }
+
+    @Test
+    public void getMeteredHintShouldReturnFalse() {
+        assertThat(mScoreCache.getMeteredHint(VALID_SCAN_RESULT)).isFalse();
+    }
+
+    @Test
+    public void getMeteredHintShouldReturnTrue() {
+        ScoredNetwork network = new ScoredNetwork(
+                new NetworkKey(VALID_KEY), mMockRssiCurve, true /* metered Hint */);
+        mScoreCache.onScoresUpdated(ImmutableList.of(network));
+
+        assertThat(mScoreCache.getMeteredHint(VALID_SCAN_RESULT)).isTrue();
+    }
+
+    @Test
+    public void onScoresUpdatedShouldInvokeCacheListener_networkCacheUpdated() {
+        mScoreCache = new WifiNetworkScoreCache(mMockContext, mCacheListener);
+        initializeCacheWithValidScoredNetwork();
+
+        try {
+            mLatch.await(1, TimeUnit.SECONDS); // wait for listener to be executed
+        } catch (InterruptedException e) {
+            fail("Interrupted Exception while waiting for listener to be invoked.");
+        }
+        // One network should be updated.
+        assertThat(mUpdatedNetworksCaptor.size()).isEqualTo(1);
+        assertThat(mUpdatedNetworksCaptor.get(0)).isEqualTo(mValidScoredNetwork);
+    }
+
+    @Test
+    public void leastRecentlyUsedScore_shouldBeEvictedFromCache() {
+        mScoreCache = new WifiNetworkScoreCache(mMockContext, mCacheListener, 2 /* maxCacheSize */);
+
+        ScoredNetwork network1 = mValidScoredNetwork;
+        ScoredNetwork network2 = buildScoredNetwork(
+                new WifiKey(FORMATTED_SSID2, BSSID), mMockRssiCurve);
+        ScoredNetwork network3 = buildScoredNetwork(
+                new WifiKey(FORMATTED_SSID3, BSSID), mMockRssiCurve);
+        mScoreCache.onScoresUpdated(ImmutableList.of(network1));
+        mScoreCache.onScoresUpdated(ImmutableList.of(network2));
+
+        // First score should be evicted because max cache size has been reached.
+        mScoreCache.onScoresUpdated(ImmutableList.of(network3));
+
+        assertThat(mScoreCache.hasScoreCurve(buildScanResult(SSID2, BSSID))).isTrue();
+        assertThat(mScoreCache.hasScoreCurve(buildScanResult(SSID3, BSSID))).isTrue();
+        assertThat(mScoreCache.hasScoreCurve(VALID_SCAN_RESULT)).isFalse();
+    }
+}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
index f06e11a..3d1eb30 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTest.java
@@ -28,27 +28,20 @@
 
 import static org.hamcrest.Matchers.*;
 import static org.junit.Assert.*;
-import static org.junit.Assume.assumeTrue;
 import static org.mockito.Mockito.*;
 
 import android.annotation.NonNull;
-import android.app.admin.DevicePolicyManager;
-import android.app.admin.WifiSsidPolicy;
 import android.content.Context;
 import android.net.wifi.ScanResult;
-import android.net.wifi.SecurityParams;
 import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiSsid;
 import android.os.SystemClock;
-import android.util.ArraySet;
 import android.util.LocalLog;
 
 import androidx.test.filters.SmallTest;
 
 import com.android.dx.mockito.inline.extended.ExtendedMockito;
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.WifiNetworkSelector.ClientModeManagerState;
 import com.android.server.wifi.WifiNetworkSelectorTestUtil.ScanDetailsAndWifiConfigs;
 import com.android.server.wifi.proto.nano.WifiMetricsProto;
@@ -66,7 +59,6 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -94,7 +86,6 @@
         // static mocking
         mSession = ExtendedMockito.mockitoSession()
                 .mockStatic(WifiInjector.class, withSettings().lenient())
-                .mockStatic(WifiInfo.class, withSettings().lenient())
                 .startMocking();
         when(WifiInjector.getInstance()).thenReturn(mWifiInjector);
         setupContext();
@@ -178,7 +169,6 @@
         public void nominateNetworks(List<ScanDetail> scanDetails,
                 boolean untrustedNetworkAllowed, boolean oemPaidNetworkAllowed,
                 boolean oemPrivateNetworkAllowed,
-                Set<Integer> restrictedNetworkAllowedUids,
                 @NonNull OnConnectableListener onConnectableListener) {
             List<ScanDetail> myScanDetails = mScanDetailsAndWifiConfigs.getScanDetails();
             WifiConfiguration[] configs = mScanDetailsAndWifiConfigs.getWifiConfigs();
@@ -247,10 +237,9 @@
          */
         @Override
         public void nominateNetworks(List<ScanDetail> scanDetails,
-                boolean untrustedNetworkAllowed, boolean oemPaidNetworkAllowed,
-                boolean oemPrivateNetworkAllowed,
-                Set<Integer> restrictedNetworkAllowedUids,
-                @NonNull OnConnectableListener onConnectableListener) {
+                    boolean untrustedNetworkAllowed, boolean oemPaidNetworkAllowed,
+                    boolean oemPrivateNetworkAllowed,
+                    @NonNull OnConnectableListener onConnectableListener) {
             if (!mNominatorShouldSelectCandidate) {
                 return;
             }
@@ -294,7 +283,6 @@
     @Mock private WifiChannelUtilization mWifiChannelUtilization;
     @Mock private WifiGlobals mWifiGlobals;
     @Mock private ScanRequestProxy mScanRequestProxy;
-    @Mock private DevicePolicyManager mDevicePolicyManager;
     private ScoringParams mScoringParams;
     private LocalLog mLocalLog;
     private int mThresholdMinimumRssi2G;
@@ -309,7 +297,6 @@
 
     private void setupContext() {
         when(mContext.getResources()).thenReturn(mResource);
-        when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager);
     }
 
     private int setupIntegerResource(int resourceName, int value) {
@@ -368,22 +355,6 @@
     }
 
     @Test
-    public void testNetworkInsufficientWhenMetered() {
-        // mock current network to be connected
-        WifiConfiguration testConfig = WifiConfigurationTestUtil.createOpenNetwork();
-        when(mWifiInfo.getSupplicantState()).thenReturn(SupplicantState.COMPLETED);
-        when(mWifiConfigManager.getConfiguredNetwork(anyInt()))
-                .thenReturn(testConfig);
-
-        // verify the current network is sufficient
-        assertTrue(mWifiNetworkSelector.isNetworkSufficient(mWifiInfo));
-
-        // verify the current network is no longer sufficient after setting "isUsable" to false.
-        testConfig.meteredOverride = WifiConfiguration.METERED_OVERRIDE_METERED;
-        assertFalse(mWifiNetworkSelector.isNetworkSufficient(mWifiInfo));
-    }
-
-    @Test
     public void testNetworkInsufficientWhenMarkedUnusable() {
         // mock current network to be connected
         WifiConfiguration testConfig = WifiConfigurationTestUtil.createOpenNetwork();
@@ -447,7 +418,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         assertEquals("Expect null configuration", null, candidate);
         assertTrue(mWifiNetworkSelector.getConnectableScanDetails().isEmpty());
@@ -480,7 +451,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         assertEquals("Expect null configuration", null, candidate);
         assertTrue(mWifiNetworkSelector.getConnectableScanDetails().isEmpty());
@@ -514,7 +485,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()
@@ -524,7 +495,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, true, false, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         assertEquals("Expect null configuration", null, candidate);
@@ -563,7 +534,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         WifiConfigurationTestUtil.assertConfigurationEqual(savedConfigs[0], candidate);
 
@@ -574,7 +545,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         ScanResult chosenScanResult = scanDetails.get(0).getScanResult();
@@ -613,7 +584,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         when(mWifiInfo.getSupplicantState()).thenReturn(SupplicantState.COMPLETED);
         when(mWifiInfo.getNetworkId()).thenReturn(0);
@@ -630,7 +601,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, true, false, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         ScanResult chosenScanResult = scanDetails.get(0).getScanResult();
@@ -668,7 +639,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         when(mWifiInfo.getSupplicantState()).thenReturn(SupplicantState.COMPLETED);
         when(mWifiInfo.getNetworkId()).thenReturn(0);
@@ -692,7 +663,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, true, false, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         ScanResult chosenScanResult = scanDetails.get(0).getScanResult();
@@ -725,7 +696,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         verify(mWifiMetrics).incrementNetworkSelectionFilteredBssidCount(0);
 
@@ -763,7 +734,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         verify(mWifiMetrics).incrementNetworkSelectionFilteredBssidCount(1);
         assertEquals("Expect null configuration", null, candidate);
@@ -771,208 +742,6 @@
     }
 
     /**
-     * Admin allowlist restricted SSID is filtered out for network selection.
-     *
-     * ClientModeImpl is disconnected.
-     * scanDetails contains a network which is admin allowlist restricted.
-     *
-     * Expected behavior: no network recommended by Network Selector
-     */
-    @Test
-    public void filterOutAdminAllowlistRestrictedSsid() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        String[] ssids = {"\"test1\""};
-        String[] bssids = {"6c:f3:7f:ae:8c:f3"};
-        int[] freqs = {5180};
-        String[] caps = {"[WPA2-PSK][ESS]"};
-        int[] levels = {mThresholdQualifiedRssi5G + 8};
-        int[] securities = {SECURITY_PSK};
-        WifiSsidPolicy policy = new WifiSsidPolicy(
-                WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_ALLOWLIST,
-                new ArraySet<>(Arrays.asList(WifiSsid.fromUtf8Text("test2"),
-                        WifiSsid.fromUtf8Text("test3"))));
-        when(mDevicePolicyManager.getWifiSsidPolicy()).thenReturn(policy);
-
-        ScanDetailsAndWifiConfigs scanDetailsAndConfigs =
-                WifiNetworkSelectorTestUtil.setupScanDetailsAndConfigStore(ssids, bssids,
-                        freqs, caps, levels, securities, mWifiConfigManager, mClock);
-        List<ScanDetail> scanDetails = scanDetailsAndConfigs.getScanDetails();
-        HashSet<String> blocklist = new HashSet<String>();
-
-        List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
-                scanDetails, blocklist,
-                Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
-        WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
-        assertEquals("Expect null configuration", null, candidate);
-    }
-
-    /**
-     * Admin denylist restricted SSID is filtered out for network selection.
-     *
-     * ClientModeImpl is disconnected.
-     * scanDetails contains a network which is admin denylist restricted.
-     *
-     * Expected behavior: no network recommended by Network Selector
-     */
-    @Test
-    public void filterOutAdminDenylistRestrictedSsid() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        String[] ssids = {"\"test1\""};
-        String[] bssids = {"6c:f3:7f:ae:8c:f3"};
-        int[] freqs = {5180};
-        String[] caps = {"[WPA2-PSK][ESS]"};
-        int[] levels = {mThresholdQualifiedRssi5G + 8};
-        int[] securities = {SECURITY_PSK};
-        WifiSsidPolicy policy = new WifiSsidPolicy(
-                WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_DENYLIST,
-                new ArraySet<>(Arrays.asList(WifiSsid.fromUtf8Text("test1"),
-                        WifiSsid.fromUtf8Text("test2"))));
-        when(mDevicePolicyManager.getWifiSsidPolicy()).thenReturn(policy);
-
-        ScanDetailsAndWifiConfigs scanDetailsAndConfigs =
-                WifiNetworkSelectorTestUtil.setupScanDetailsAndConfigStore(ssids, bssids,
-                        freqs, caps, levels, securities, mWifiConfigManager, mClock);
-        List<ScanDetail> scanDetails = scanDetailsAndConfigs.getScanDetails();
-        HashSet<String> blocklist = new HashSet<String>();
-
-        List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
-                scanDetails, blocklist,
-                Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
-        WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
-        assertEquals("Expect null configuration", null, candidate);
-    }
-
-    /**
-     * Admin security type restricted network is filtered out for network selection.
-     *
-     * ClientModeImpl is disconnected.
-     * scanDetails contains a network which is admin security type restricted.
-     *
-     * Expected behavior: no network recommended by Network Selector
-     */
-    @Test
-    public void filterOutAdminSecurityTypeRestrictedSsid() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        String[] ssids = {"\"test1\""};
-        String[] bssids = {"6c:f3:7f:ae:8c:f3"};
-        int[] freqs = {5180};
-        String[] caps = {"[WPA2-PSK][ESS]"};
-        int[] levels = {mThresholdQualifiedRssi5G + 8};
-        int[] securities = {SECURITY_PSK};
-        int securityLevel = DevicePolicyManager.WIFI_SECURITY_ENTERPRISE_EAP;
-
-        when(mDevicePolicyManager.getMinimumRequiredWifiSecurityLevel()).thenReturn(securityLevel);
-        when(WifiInfo.convertWifiConfigurationSecurityType(
-                WifiConfiguration.SECURITY_TYPE_PSK)).thenReturn(WifiInfo.SECURITY_TYPE_PSK);
-        when(WifiInfo.convertSecurityTypeToDpmWifiSecurity(WifiInfo.SECURITY_TYPE_PSK)).thenReturn(
-                DevicePolicyManager.WIFI_SECURITY_PERSONAL);
-
-        ScanDetailsAndWifiConfigs scanDetailsAndConfigs =
-                WifiNetworkSelectorTestUtil.setupScanDetailsAndConfigStore(ssids, bssids,
-                        freqs, caps, levels, securities, mWifiConfigManager, mClock);
-        List<ScanDetail> scanDetails = scanDetailsAndConfigs.getScanDetails();
-        HashSet<String> blocklist = new HashSet<String>();
-
-        List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
-                scanDetails, blocklist,
-                Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
-        WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
-        assertEquals("Expect null configuration", null, candidate);
-    }
-
-    /**
-     * Unknown security type network is filtered out for network selection when
-     * admin security type restriction is set.
-     *
-     * ClientModeImpl is disconnected.
-     * scanDetails contains a network which has an unknown security type
-     * and admin set the security type restriction.
-     *
-     * Expected behavior: no network recommended by Network Selector
-     */
-    @Test
-    public void filterOutUnknownSecurityTypeSsidsWhenAdminSecurityTypeRestrictionSet() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        String[] ssids = {"\"test1\""};
-        String[] bssids = {"6c:f3:7f:ae:8c:f3"};
-        int[] freqs = {5180};
-        String[] caps = {"[WPA2-PSK][ESS]"};
-        int[] levels = {mThresholdQualifiedRssi5G + 8};
-        int[] securities = {SECURITY_PSK};
-        int securityLevel = DevicePolicyManager.WIFI_SECURITY_ENTERPRISE_EAP;
-
-        when(mDevicePolicyManager.getMinimumRequiredWifiSecurityLevel()).thenReturn(securityLevel);
-
-        when(WifiInfo.convertWifiConfigurationSecurityType(
-                WifiConfiguration.SECURITY_TYPE_PSK)).thenReturn(WifiInfo.SECURITY_TYPE_UNKNOWN);
-        when(WifiInfo.convertSecurityTypeToDpmWifiSecurity(
-                WifiInfo.SECURITY_TYPE_UNKNOWN)).thenReturn(WifiInfo.DPM_SECURITY_TYPE_UNKNOWN);
-
-        ScanDetailsAndWifiConfigs scanDetailsAndConfigs =
-                WifiNetworkSelectorTestUtil.setupScanDetailsAndConfigStore(ssids, bssids,
-                        freqs, caps, levels, securities, mWifiConfigManager, mClock);
-        List<ScanDetail> scanDetails = scanDetailsAndConfigs.getScanDetails();
-        HashSet<String> blocklist = new HashSet<String>();
-
-        List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
-                scanDetails, blocklist,
-                Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
-        WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
-        assertEquals("Expect null configuration", null, candidate);
-    }
-
-    /**
-     * Only the unknown security type network is filtered out for network selection when
-     * admin security type restriction is set. Other networks are not affected.
-     *
-     * ClientModeImpl is disconnected.
-     * scanDetails contains a network which has an unknown security type
-     * and a network with a known security type and admin set the security type restriction.
-     *
-     * Expected behavior: network with known security type recommended by Network Selector
-     */
-    @Test
-    public void filterOutOnlyUnknownSecurityTypeSsidsWhenAdminSecurityTypeRestrictionSet() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        String[] ssids = {"\"test1\"", "\"test2\""};
-        String[] bssids = {"6c:f3:7f:ae:8c:f3", "6c:f3:7f:ae:8c:f4"};
-        int[] freqs = {2437, 2457};
-        String[] caps = {"[WPA2-EAP/SHA1-CCMP][ESS]", "[WPA2-PSK][ESS]"};
-        int[] levels = {mThresholdMinimumRssi2G + 20, mThresholdMinimumRssi2G + RSSI_BUMP};
-        int[] securities = {SECURITY_EAP, SECURITY_PSK};
-        int securityLevel = DevicePolicyManager.WIFI_SECURITY_ENTERPRISE_EAP;
-
-        when(mDevicePolicyManager.getMinimumRequiredWifiSecurityLevel()).thenReturn(securityLevel);
-
-        when(WifiInfo.convertWifiConfigurationSecurityType(
-                WifiConfiguration.SECURITY_TYPE_PSK)).thenReturn(WifiInfo.SECURITY_TYPE_UNKNOWN);
-        when(WifiInfo.convertSecurityTypeToDpmWifiSecurity(
-                WifiInfo.SECURITY_TYPE_UNKNOWN)).thenReturn(WifiInfo.DPM_SECURITY_TYPE_UNKNOWN);
-        when(WifiInfo.convertWifiConfigurationSecurityType(
-                WifiConfiguration.SECURITY_TYPE_EAP)).thenReturn(WifiInfo.SECURITY_TYPE_EAP);
-        when(WifiInfo.convertSecurityTypeToDpmWifiSecurity(WifiInfo.SECURITY_TYPE_EAP)).thenReturn(
-                DevicePolicyManager.WIFI_SECURITY_ENTERPRISE_EAP);
-
-        ScanDetailsAndWifiConfigs scanDetailsAndConfigs =
-                WifiNetworkSelectorTestUtil.setupScanDetailsAndConfigStore(ssids, bssids,
-                        freqs, caps, levels, securities, mWifiConfigManager, mClock);
-        List<ScanDetail> scanDetails = scanDetailsAndConfigs.getScanDetails();
-        WifiConfiguration[] wifiConfigs = scanDetailsAndConfigs.getWifiConfigs();
-        WifiConfiguration knownSecurityTypeNetwork = wifiConfigs[0];
-        HashSet<String> blocklist = new HashSet<String>();
-
-        List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
-                scanDetails, blocklist,
-                Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
-        WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
-    }
-
-    /**
      * Wifi network selector doesn't recommend any network if the currently connected one
      * doesn't show up in the scan results.
      *
@@ -1000,7 +769,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         when(mWifiInfo.getSupplicantState()).thenReturn(SupplicantState.COMPLETED);
@@ -1025,7 +794,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, true, false, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         // The second network selection is skipped since current connected network is
@@ -1063,12 +832,9 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
-        WifiConfiguration[] configs = scanDetailsAndConfigs.getWifiConfigs();
-        configs[0].getNetworkSelectionStatus().setLastUsedSecurityParams(
-                configs[0].getNetworkSelectionStatus().getCandidateSecurityParams());
         when(mWifiInfo.getSupplicantState()).thenReturn(SupplicantState.COMPLETED);
         when(mWifiInfo.getNetworkId()).thenReturn(0); // 0 is current network
         when(mWifiInfo.getBSSID()).thenReturn(bssids[0]);
@@ -1093,7 +859,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, true, false, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         assertEquals(2, candidates.size());
         assertEquals(100, candidates.get(0).getPredictedThroughputMbps());
     }
@@ -1132,7 +898,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         ArgumentCaptor<Integer> nominatorIdCaptor = ArgumentCaptor.forClass(int.class);
@@ -1157,7 +923,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         verify(mWifiMetrics, atLeastOnce()).setNominatorForNetwork(eq(candidate.networkId),
@@ -1209,7 +975,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         WifiConfigurationTestUtil.assertConfigurationEqual(userChoice, candidate);
 
@@ -1223,7 +989,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         candidate = mWifiNetworkSelector.selectNetwork(candidates);
         WifiConfigurationTestUtil.assertConfigurationEqual(networkSelectorChoice, candidate);
     }
@@ -1263,7 +1029,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         WifiConfigurationTestUtil.assertConfigurationEqual(userChoice, candidate);
 
@@ -1274,7 +1040,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         // Should now select the non user choice network.
@@ -1320,7 +1086,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         ArgumentCaptor<Integer> nominatorIdCaptor = ArgumentCaptor.forClass(int.class);
@@ -1632,7 +1398,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                true, true, true, Collections.emptySet(), false);
+                true, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         assertNotNull("Result should be not null", candidate);
         WifiNetworkSelectorTestUtil.verifySelectedScanResult(mWifiConfigManager,
@@ -1673,7 +1439,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, true, false, mWifiInfo)),
-                true, true, true, Collections.emptySet(), false);
+                true, true, true);
         candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         // PlaceholderNominator always return the first network in the scan results
@@ -1710,7 +1476,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         List<ScanDetail> expectedOpenUnsavedNetworks = new ArrayList<>();
         expectedOpenUnsavedNetworks.add(scanDetails.get(1));
@@ -1744,7 +1510,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 unSavedScanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         assertEquals("Expect open unsaved networks",
                 unSavedScanDetails,
@@ -1758,7 +1524,7 @@
         candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 savedScanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         candidate = mWifiNetworkSelector.selectNetwork(candidates);
         // Saved networks are filtered out.
         assertTrue(mWifiNetworkSelector.getFilteredScanDetailsForOpenUnsavedNetworks().isEmpty());
@@ -1787,7 +1553,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         List<ScanDetail> expectedOpenUnsavedNetworks = new ArrayList<>();
         expectedOpenUnsavedNetworks.add(scanDetails.get(1));
@@ -1818,7 +1584,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         assertTrue(mWifiNetworkSelector.getFilteredScanDetailsForOpenUnsavedNetworks().isEmpty());
     }
@@ -1859,7 +1625,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         List<ScanDetail> expectedOpenUnsavedNetworks = new ArrayList<>();
         expectedOpenUnsavedNetworks.add(scanDetails.get(1));
@@ -1894,7 +1660,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         List<ScanDetail> expectedOpenUnsavedNetworks = new ArrayList<>();
         expectedOpenUnsavedNetworks.add(scanDetails.get(1));
@@ -1924,7 +1690,7 @@
                 setUpTwoNetworks(-35, -40),
                 EMPTY_BLOCKLIST,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                true, true, true, Collections.emptySet(), false);
+                true, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         verify(mCandidateScorer, atLeastOnce()).scoreCandidates(any());
@@ -2061,11 +1827,11 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                true, true, true, Collections.emptySet(), false);
+                true, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         // Check if the wifiConfig is updated with the latest
         verify(mWifiConfigManager).addOrUpdateNetwork(existingConfig,
-                existingConfig.creatorUid, existingConfig.creatorName, false);
+                existingConfig.creatorUid, existingConfig.creatorName);
         assertEquals(ssids[0], candidate.SSID);
     }
 
@@ -2091,7 +1857,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         // Expect one privileged and one regular candidate.
         assertEquals(2, candidates.size());
         boolean foundCarrierOrPrivilegedAppCandidate = false;
@@ -2140,7 +1906,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
         verify(mWifiMetrics, times(1))
                 .incrementNetworkSelectionFilteredBssidCountDueToMboAssocDisallowInd();
@@ -2266,7 +2032,7 @@
                         TEST_IFACE_NAME, true, false, mWifiInfo),
                         new ClientModeManagerState(
                                 TEST_IFACE_NAME_SECONDARY, true, false, mSecondaryWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
 
         ScanResult chosenScanResult = scanDetails.get(0).getScanResult();
@@ -2333,7 +2099,7 @@
                                 TEST_IFACE_NAME, true, false, mWifiInfo),
                         new ClientModeManagerState(
                                 TEST_IFACE_NAME_SECONDARY, true, false, mSecondaryWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         assertNull(mWifiNetworkSelector.selectNetwork(candidates));
     }
 
@@ -2344,8 +2110,8 @@
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
                 true, // untrustedNetworkAllowed
                 true, // oemPaid
-                true, // oemPrivate
-                Collections.emptySet(), false);
+                true // oemPrivate
+        );
         WifiConfiguration wifiConfiguration = mWifiNetworkSelector.selectNetwork(candidates);
         assertNotNull(wifiConfiguration);
     }
@@ -2400,7 +2166,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         assertEquals(2, candidates.size());
 
         // Verify that SAE network is selected if offload is supported.
@@ -2455,7 +2221,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         // PSK type is disabled, PSK network is not matched.
         assertEquals(1, candidates.size());
 
@@ -2488,7 +2254,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         assertEquals(2, candidates.size());
 
         // Verify that PSK network is selected.
@@ -2520,7 +2286,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         // The SAE-only network should be filtered.
         assertEquals(1, candidates.size());
 
@@ -2554,7 +2320,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         assertEquals(2, candidates.size());
 
         // Verify that OWE network is selected (assume offload is not supported.).
@@ -2597,7 +2363,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         // OPEN type is disabled, OPEN network is not matched.
         assertEquals(1, candidates.size());
 
@@ -2629,7 +2395,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         assertEquals(2, candidates.size());
 
         // Verify that OPEN network is selected.
@@ -2661,7 +2427,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         // The OWE-only network should be filtered.
         assertEquals(1, candidates.size());
 
@@ -2693,7 +2459,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         assertEquals(2, candidates.size());
 
         // Verify that WPA2 Enterprise network is selected (assume offload is not supported.).
@@ -2736,7 +2502,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         // WPA2 Enterprise type is disabled, WPA2 Enterprise network is not matched.
         assertEquals(1, candidates.size());
 
@@ -2807,7 +2573,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, blocklist,
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         assertNotNull(candidates);
         if (expectedSecurityParamType == -1) {
             assertEquals(0, candidates.size());
@@ -2845,7 +2611,7 @@
         List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector.getCandidatesFromScan(
                 scanDetails, new HashSet<>(),
                 Arrays.asList(new ClientModeManagerState(TEST_IFACE_NAME, false, true, mWifiInfo)),
-                false, true, true, Collections.emptySet(), false);
+                false, true, true);
         assertEquals(2, candidates.size());
 
         // Verify that PSK network is still selected if offload is not supported
@@ -2857,29 +2623,4 @@
         assertTrue(networkSelectorChoice.getNetworkSelectionStatus().getCandidateSecurityParams()
                 .isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK));
     }
-
-    /**
-     * Verify network selection for the user selected network.
-     */
-    @Test
-    public void testNetworkSelectionForUserSelectedNetwork() {
-        when(mClientModeManager.getSupportedFeatures()).thenReturn(WIFI_FEATURE_WPA3_SAE);
-        when(mWifiGlobals.isWpa3SaeUpgradeEnabled()).thenReturn(true);
-
-        ScanDetailsAndWifiConfigs scanDetailsAndConfigs = setupAutoUpgradeNetworks(
-                WifiConfigurationTestUtil.createPskSaeNetwork(TEST_AUTO_UPGRADE_SSID),
-                new String[] {"[RSN-PSK+SAE-CCMP][ESS]", "[RSN-PSK+SAE-CCMP][ESS]"});
-        List<ScanDetail> scanDetails = scanDetailsAndConfigs.getScanDetails();
-        WifiConfiguration[] savedConfigs = scanDetailsAndConfigs.getWifiConfigs();
-        WifiConfiguration userSelectedConfig = savedConfigs[0];
-        List<WifiCandidates.Candidate> candidates = mWifiNetworkSelector
-                .getCandidatesForUserSelection(userSelectedConfig, scanDetails);
-        WifiConfiguration candidate = mWifiNetworkSelector.selectNetwork(candidates);
-
-        ArgumentCaptor<SecurityParams> paramsCaptor =
-                ArgumentCaptor.forClass(SecurityParams.class);
-        verify(mWifiConfigManager).setNetworkCandidateScanResult(
-                eq(userSelectedConfig.networkId), any(), eq(0), paramsCaptor.capture());
-        assertTrue(paramsCaptor.getValue().isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE));
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTestUtil.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTestUtil.java
index 59e62ca..464cc90 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTestUtil.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSelectorTestUtil.java
@@ -21,29 +21,25 @@
 import static com.android.server.wifi.WifiConfigurationTestUtil.SECURITY_WAPI_PSK;
 import static com.android.server.wifi.WifiConfigurationTestUtil.generateWifiConfig;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
 
 import android.app.test.MockAnswerUtil.AnswerWithArguments;
+import android.net.NetworkKey;
+import android.net.RssiCurve;
+import android.net.ScoredNetwork;
+import android.net.WifiKey;
 import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiSsid;
-import android.net.wifi.util.ScanResultUtil;
 import android.text.TextUtils;
 
 import com.android.server.wifi.hotspot2.NetworkDetail;
 import com.android.server.wifi.util.InformationElementUtil;
 import com.android.server.wifi.util.NativeUtil;
+import com.android.server.wifi.util.ScanResultUtil;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -57,7 +53,6 @@
  */
 public class WifiNetworkSelectorTestUtil {
     private static final String TAG = "WifiNetworkSelectorTestUtil";
-    private static final long SUPPORTED_FEATURES_ALL = Long.MAX_VALUE;
     /**
      * A class that holds a list of scanDetail and their associated WifiConfiguration.
      */
@@ -219,7 +214,7 @@
         long timeStamp = clock.getElapsedSinceBootMillis();
         for (int index = 0; index < ssids.length; index++) {
             byte[] ssid = NativeUtil.byteArrayFromArrayList(NativeUtil.decodeSsid(ssids[index]));
-            ScanDetail scanDetail = new ScanDetail(WifiSsid.fromBytes(ssid),
+            ScanDetail scanDetail = new ScanDetail(WifiSsid.createFromByteArray(ssid),
                     bssids[index], caps[index], levels[index], freqs[index], timeStamp, 0);
             scanDetailList.add(scanDetail);
         }
@@ -250,7 +245,7 @@
                 InformationElementUtil.parseInformationElements(iesByteStream[index]);
             NetworkDetail nd = new NetworkDetail(bssids[index], ies, new ArrayList<String>(),
                     freqs[index]);
-            ScanDetail scanDetail = new ScanDetail(nd, WifiSsid.fromBytes(ssid),
+            ScanDetail scanDetail = new ScanDetail(nd, WifiSsid.createFromByteArray(ssid),
                     bssids[index], caps[index], levels[index], freqs[index], timeStamp,
                     ies, new ArrayList<String>(),
                     ScanResults.generateIERawDatafromScanResultIE(ies));
@@ -292,7 +287,7 @@
                     || (securities[index] & SECURITY_WAPI_PSK) != 0) {
                 configs[index].preSharedKey = "\"PA55W0RD\""; // needed to validate with PSK
             }
-            if (!WifiConfigurationUtil.validate(configs[index], SUPPORTED_FEATURES_ALL, true)) {
+            if (!WifiConfigurationUtil.validate(configs[index], true)) {
                 throw new IllegalArgumentException("Invalid generated config: " + configs[index]);
             }
         }
@@ -315,7 +310,7 @@
                     public WifiConfiguration answer(ScanDetail scanDetail) {
                         for (WifiConfiguration config : configs) {
                             if (TextUtils.equals(config.SSID,
-                                    ScanResultUtil.createQuotedSsid(scanDetail.getSSID()))) {
+                                    ScanResultUtil.createQuotedSSID(scanDetail.getSSID()))) {
                                 return config;
                             }
                         }
@@ -441,6 +436,47 @@
         }
     }
 
+
+    /**
+     * Configure the score cache for externally scored networks
+     *
+     * @param scoreCache   Wifi network score cache to be configured
+     * @param scanDetails  a list of ScanDetail
+     * @param scores       scores of the networks
+     * @param meteredHints hints of if the networks are metered
+     */
+    public static void configureScoreCache(WifiNetworkScoreCache scoreCache,
+            List<ScanDetail> scanDetails, Integer[] scores, boolean[] meteredHints) {
+        List<ScoredNetwork> networks = new ArrayList<>();
+
+        for (int i = 0; i < scanDetails.size(); i++) {
+            ScanDetail scanDetail = scanDetails.get(i);
+            ScanResult scanResult = scanDetail.getScanResult();
+            WifiKey wifiKey = new WifiKey("\"" + scanResult.SSID + "\"", scanResult.BSSID);
+            NetworkKey ntwkKey = new NetworkKey(wifiKey);
+            RssiCurve rssiCurve;
+
+            if (scores != null) { // fixed score
+                byte rssiScore;
+                Integer score = scores[i];
+
+                if (scores[i] == null) {
+                    rssiScore = WifiNetworkScoreCache.INVALID_NETWORK_SCORE;
+                } else {
+                    rssiScore = scores[i].byteValue();
+                }
+                rssiCurve = new RssiCurve(-100, 100, new byte[] {rssiScore});
+            } else {
+                rssiCurve = new RssiCurve(-80, 20, new byte[] {-10, 0, 10, 20, 30, 40});
+            }
+            ScoredNetwork scoredNetwork = new ScoredNetwork(ntwkKey, rssiCurve, meteredHints[i]);
+
+            networks.add(scoredNetwork);
+        }
+
+        scoreCache.onScoresUpdated(networks);
+    }
+
     /**
      * Setup WifiConfigManager mock for ephemeral networks.
      *
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
index 6ac3632..000c100 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiNetworkSuggestionsManagerTest.java
@@ -18,15 +18,14 @@
 
 import static android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND;
 import static android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND_SERVICE;
+import static android.app.ActivityManager.RunningAppProcessInfo.IMPORTANCE_SERVICE;
 import static android.app.AppOpsManager.MODE_ALLOWED;
 import static android.app.AppOpsManager.MODE_IGNORED;
 import static android.app.AppOpsManager.OPSTR_CHANGE_WIFI_STATE;
-import static android.net.wifi.WifiManager.ACTION_REMOVE_SUGGESTION_LINGER;
 
 import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn;
 import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession;
 import static com.android.dx.mockito.inline.extended.ExtendedMockito.when;
-import static com.android.server.wifi.WifiNetworkSuggestionsManager.DEFAULT_LINGER_DELAY_MS;
 import static com.android.server.wifi.WifiNetworkSuggestionsManager.NOTIFICATION_USER_ALLOWED_APP_INTENT_ACTION;
 import static com.android.server.wifi.WifiNetworkSuggestionsManager.NOTIFICATION_USER_DISALLOWED_APP_INTENT_ACTION;
 import static com.android.server.wifi.WifiNetworkSuggestionsManager.NOTIFICATION_USER_DISMISSED_INTENT_ACTION;
@@ -37,41 +36,26 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeFalse;
 import static org.junit.Assume.assumeTrue;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyBoolean;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyLong;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.argThat;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.calls;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.isNull;
-import static org.mockito.Mockito.lenient;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.nullable;
-import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
+import static org.mockito.Mockito.*;
 
 import android.app.ActivityManager;
+import android.app.AlertDialog;
 import android.app.AppOpsManager;
 import android.app.Notification;
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
 import android.content.Context;
+import android.content.DialogInterface;
 import android.content.Intent;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
 import android.content.res.Resources;
+import android.net.NetworkScoreManager;
 import android.net.wifi.EAPConstants;
 import android.net.wifi.ISuggestionConnectionStatusListener;
 import android.net.wifi.ISuggestionUserApprovalStatusListener;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiNetworkSuggestion;
@@ -82,7 +66,6 @@
 import android.net.wifi.hotspot2.pps.HomeSp;
 import android.os.Handler;
 import android.os.IBinder;
-import android.os.ParcelUuid;
 import android.os.RemoteException;
 import android.os.UserHandle;
 import android.os.test.TestLooper;
@@ -90,6 +73,7 @@
 import android.telephony.TelephonyManager;
 import android.test.suitebuilder.annotation.SmallTest;
 import android.view.LayoutInflater;
+import android.view.Window;
 
 import com.android.dx.mockito.inline.extended.ExtendedMockito;
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
@@ -132,10 +116,8 @@
 
     private static final String TEST_PACKAGE_1 = "com.test12345";
     private static final String TEST_PACKAGE_2 = "com.test54321";
-    private static final String TEST_PACKAGE_3 = "com.test54321";
     private static final String TEST_APP_NAME_1 = "test12345";
     private static final String TEST_APP_NAME_2 = "test54321";
-    private static final String TEST_APP_NAME_3 = "test66666";
     private static final String TEST_FEATURE = "testFeature";
     private static final String TEST_BSSID = "00:11:22:33:44:55";
     private static final String TEST_FQDN = "FQDN";
@@ -144,7 +126,6 @@
     private static final String TEST_CARRIER_NAME = "test_carrier";
     private static final int TEST_UID_1 = 5667;
     private static final int TEST_UID_2 = 4537;
-    private static final int TEST_UID_3 = 7837;
     private static final int VALID_CARRIER_ID = 100;
     private static final int TEST_SUBID = 1;
     private static final int TEST_NETWORK_ID = 110;
@@ -155,14 +136,13 @@
     private static final String TEST_ANONYMOUS_IDENTITY = "AnonymousIdentity";
     private static final String USER_CONNECT_CHOICE = "SomeNetworkProfileId";
     private static final int TEST_RSSI = -50;
-    private static final ParcelUuid GROUP_UUID = ParcelUuid
-            .fromString("0000110B-0000-1000-8000-00805F9B34FB");
 
     private @Mock WifiContext mContext;
     private @Mock Resources mResources;
     private @Mock AppOpsManager mAppOpsManager;
     private @Mock WifiNotificationManager mWifiNotificationManager;
-    private @Mock WifiDialogManager mWifiDialogManager;
+    private @Mock NetworkScoreManager mNetworkScoreManager;
+    private @Mock PackageManager mPackageManager;
     private @Mock WifiPermissionsUtil mWifiPermissionsUtil;
     private @Mock WifiInjector mWifiInjector;
     private @Mock FrameworkFacade mFrameworkFacade;
@@ -178,7 +158,8 @@
     private @Mock ActivityManager mActivityManager;
     private @Mock WifiScoreCard mWifiScoreCard;
     private @Mock WifiKeyStore mWifiKeyStore;
-    private @Mock WifiDialogManager.DialogHandle mDialogHandle;
+    private @Mock AlertDialog.Builder mAlertDialogBuilder;
+    private @Mock AlertDialog mAlertDialog;
     private @Mock Notification.Builder mNotificationBuilder;
     private @Mock Notification mNotification;
     private @Mock LruConnectionTracker mLruConnectionTracker;
@@ -225,7 +206,14 @@
         when(mWifiInjector.getActiveModeWarden()).thenReturn(mActiveModeWarden);
         when(mWifiInjector.getWifiGlobals()).thenReturn(mWifiGlobals);
         when(mWifiInjector.getWifiNotificationManager()).thenReturn(mWifiNotificationManager);
-        when(mWifiInjector.getWifiDialogManager()).thenReturn(mWifiDialogManager);
+        when(mAlertDialogBuilder.setTitle(any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.setMessage(any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.setPositiveButton(any(), any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.setNegativeButton(any(), any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.setOnDismissListener(any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.setOnCancelListener(any())).thenReturn(mAlertDialogBuilder);
+        when(mAlertDialogBuilder.create()).thenReturn(mAlertDialog);
+        when(mAlertDialog.getWindow()).thenReturn(mock(Window.class));
         when(mNotificationBuilder.setSmallIcon(any())).thenReturn(mNotificationBuilder);
         when(mNotificationBuilder.setTicker(any())).thenReturn(mNotificationBuilder);
         when(mNotificationBuilder.setContentTitle(any())).thenReturn(mNotificationBuilder);
@@ -237,14 +225,16 @@
         when(mNotificationBuilder.addAction(any())).thenReturn(mNotificationBuilder);
         when(mNotificationBuilder.setTimeoutAfter(anyLong())).thenReturn(mNotificationBuilder);
         when(mNotificationBuilder.build()).thenReturn(mNotification);
-        when(mWifiDialogManager.createSimpleDialog(any(), any(), any(), any(), any(), any(), any()))
-                .thenReturn(mDialogHandle);
+        when(mFrameworkFacade.makeAlertDialogBuilder(any()))
+                .thenReturn(mAlertDialogBuilder);
         when(mFrameworkFacade.makeNotificationBuilder(any(), anyString()))
                 .thenReturn(mNotificationBuilder);
         when(mFrameworkFacade.getBroadcast(any(), anyInt(), any(), anyInt()))
                 .thenReturn(mock(PendingIntent.class));
         when(mContext.getResources()).thenReturn(mResources);
         when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager);
+        when(mContext.getSystemService(NetworkScoreManager.class)).thenReturn(mNetworkScoreManager);
+        when(mContext.getPackageManager()).thenReturn(mPackageManager);
         when(mContext.getSystemService(ActivityManager.class)).thenReturn(mActivityManager);
         when(mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
                 .thenReturn(mock(LayoutInflater.class));
@@ -272,11 +262,19 @@
         when(mResources.getText(eq(R.string.wifi_suggestion_action_disallow_app)))
                 .thenReturn("blah");
 
+
+        // Our app Info. Needed for notification builder.
+        ApplicationInfo ourAppInfo = new ApplicationInfo();
+        when(mContext.getApplicationInfo()).thenReturn(ourAppInfo);
         // test app info
-        when(mFrameworkFacade.getAppName(any(), eq(TEST_PACKAGE_1), eq(TEST_UID_1)))
-            .thenReturn(TEST_APP_NAME_1);
-        when(mFrameworkFacade.getAppName(any(), eq(TEST_PACKAGE_2), eq(TEST_UID_2)))
-                .thenReturn(TEST_APP_NAME_2);
+        ApplicationInfo appInfO1 = new ApplicationInfo();
+        when(mPackageManager.getApplicationInfoAsUser(eq(TEST_PACKAGE_1), eq(0), any()))
+            .thenReturn(appInfO1);
+        when(mPackageManager.getApplicationLabel(appInfO1)).thenReturn(TEST_APP_NAME_1);
+        ApplicationInfo appInfO2 = new ApplicationInfo();
+        when(mPackageManager.getApplicationInfoAsUser(eq(TEST_PACKAGE_2), eq(0), any()))
+            .thenReturn(appInfO2);
+        when(mPackageManager.getApplicationLabel(appInfO2)).thenReturn(TEST_APP_NAME_2);
         when(mWifiCarrierInfoManager.getCarrierIdForPackageWithCarrierPrivileges(any())).thenReturn(
                 TelephonyManager.UNKNOWN_CARRIER_ID);
         when(mWifiCarrierInfoManager.isSubIdMatchingCarrierId(anyInt(), anyInt())).thenReturn(true);
@@ -286,8 +284,6 @@
                 .thenReturn(false);
         when(mWifiCarrierInfoManager.areMergedCarrierWifiNetworksAllowed(anyInt())).thenReturn(
                 false);
-        when(mWifiCarrierInfoManager.getActiveSubscriptionIdInGroup(GROUP_UUID))
-                .thenReturn(TEST_SUBID);
 
         when(mWifiKeyStore.updateNetworkKeys(any(), any())).thenReturn(true);
 
@@ -296,7 +292,9 @@
                         mWifiInjector, mWifiPermissionsUtil, mWifiConfigManager, mWifiConfigStore,
                         mWifiMetrics, mWifiCarrierInfoManager, mWifiKeyStore,
                         mLruConnectionTracker, mClock);
-        mLooper.dispatchAll();
+        verify(mContext).getResources();
+        verify(mContext).getSystemService(Context.APP_OPS_SERVICE);
+        verify(mContext).getPackageManager();
         verify(mContext).registerReceiver(mBroadcastReceiverCaptor.capture(), any(), any(), any());
 
         ArgumentCaptor<NetworkSuggestionStoreData.DataSource> dataSourceArgumentCaptor =
@@ -311,7 +309,7 @@
                 mUserApproveCarrierListenerArgumentCaptor.capture());
         verify(mWifiConfigManager).addOnNetworkUpdateListener(mNetworkListenerCaptor.capture());
 
-        mWifiNetworkSuggestionsManager.enableVerboseLogging(true);
+        mWifiNetworkSuggestionsManager.enableVerboseLogging(1);
     }
 
     @After
@@ -412,11 +410,11 @@
 
         // Now remove all of them.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.remove(networkSuggestionList1, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                mWifiNetworkSuggestionsManager.remove(networkSuggestionList1,
+                        TEST_UID_1, TEST_PACKAGE_1));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.remove(networkSuggestionList2, TEST_UID_2,
-                        TEST_PACKAGE_2, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                mWifiNetworkSuggestionsManager.remove(networkSuggestionList2,
+                        TEST_UID_2, TEST_PACKAGE_2));
         verify(mPasspointManager).removeProvider(eq(TEST_UID_2), eq(false),
                 eq(passpointConfiguration.getUniqueId()), isNull());
         verify(mWifiScoreCard).removeNetwork(anyString());
@@ -452,7 +450,7 @@
                         TEST_PACKAGE_1, TEST_FEATURE));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
     }
 
     @Test
@@ -488,8 +486,7 @@
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(
                         new ArrayList<WifiNetworkSuggestion>() {{ add(removingSuggestion); }},
-                        TEST_UID_1, TEST_PACKAGE_1,
-                        WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_UID_1, TEST_PACKAGE_1));
         // Make sure remove the keyStore with the internal config
         verify(mWifiKeyStore).removeKeys(networkSuggestion1.wifiConfiguration.enterpriseConfig);
         verify(mLruConnectionTracker).removeNetwork(any());
@@ -572,6 +569,7 @@
                         TEST_PACKAGE_1, TEST_FEATURE));
     }
 
+
     @Test
     public void testAddOemPrivateNetworkSuggestionOnPreSDevices() {
         assumeFalse(SdkLevel.isAtLeastS());
@@ -611,18 +609,6 @@
                         TEST_PACKAGE_1, TEST_FEATURE));
     }
 
-    @Test
-    public void testSetSubscriptionGroupOnPreTDevices() {
-        assumeFalse(SdkLevel.isAtLeastT());
-        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
-                WifiConfigurationTestUtil.createEapNetwork(), null, false, false, true, true,
-                DEFAULT_PRIORITY_GROUP);
-        networkSuggestion.wifiConfiguration.setSubscriptionGroup(GROUP_UUID);
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_INVALID,
-                mWifiNetworkSuggestionsManager.add(List.of(networkSuggestion), TEST_UID_1,
-                        TEST_PACKAGE_1, TEST_FEATURE));
-    }
-
     /**
      * Verify successful removal of all network suggestions.
      */
@@ -661,11 +647,11 @@
         // Now remove all of them by sending an empty list.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(new ArrayList<>(), TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         verify(mLruConnectionTracker).removeNetwork(any());
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(new ArrayList<>(), TEST_UID_2,
-                        TEST_PACKAGE_2, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_2));
         verify(mPasspointManager).removeProvider(eq(TEST_UID_2), eq(false),
                 eq(passpointConfiguration.getUniqueId()), isNull());
 
@@ -691,7 +677,7 @@
                         TEST_PACKAGE_1, TEST_FEATURE));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList1, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.add(networkSuggestionList1, TEST_UID_1,
                         TEST_PACKAGE_1, TEST_FEATURE));
@@ -754,7 +740,6 @@
         // Set user connect choice, Anonymous Identity and auto join.
         WifiConfiguration config = new WifiConfiguration(eapSimConfig);
         config.fromWifiNetworkSuggestion = true;
-        config.shared = false;
         config.ephemeral = true;
         config.creatorName = TEST_PACKAGE_1;
         config.creatorUid = TEST_UID_1;
@@ -802,7 +787,7 @@
         assertEquals(TEST_RSSI, matchedSuggestion.connectChoiceRssi);
 
         // Verify we did not update config in WCM.
-        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(), anyInt(), any(), eq(false));
+        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(), anyInt(), any());
     }
 
     /**
@@ -834,15 +819,14 @@
         configInWcm.creatorUid = TEST_UID_1;
         configInWcm.creatorName = TEST_PACKAGE_1;
         configInWcm.fromWifiNetworkSuggestion = true;
-        configInWcm.shared = false;
         setupGetConfiguredNetworksFromWcm(configInWcm);
 
         // Modify the original suggestion to mark it metered.
         networkSuggestion.wifiConfiguration.meteredOverride =
                 WifiConfiguration.METERED_OVERRIDE_METERED;
 
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), eq(TEST_UID_1), eq(TEST_PACKAGE_1),
-                eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+        when(mWifiConfigManager.addOrUpdateNetwork(any(), eq(TEST_UID_1), eq(TEST_PACKAGE_1)))
+                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         // Replace attempt should success.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.add(networkSuggestionList1, TEST_UID_1,
@@ -855,7 +839,7 @@
         ArgumentCaptor<WifiConfiguration> configCaptor =
                 ArgumentCaptor.forClass(WifiConfiguration.class);
         verify(mWifiConfigManager).addOrUpdateNetwork(
-                configCaptor.capture(), eq(TEST_UID_1), eq(TEST_PACKAGE_1), eq(false));
+                configCaptor.capture(), eq(TEST_UID_1), eq(TEST_PACKAGE_1));
         assertNotNull(configCaptor.getValue());
         assertEquals(WifiConfiguration.METERED_OVERRIDE_METERED,
                 configCaptor.getValue().meteredOverride);
@@ -899,7 +883,7 @@
         // The remove should succeed.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
 
         // Now add 2 more.
         networkSuggestionList = new ArrayList<>();
@@ -957,7 +941,7 @@
         // Remove should fail because the network list is different.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList2, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
     }
 
     /**
@@ -1008,8 +992,8 @@
                 mWifiNetworkSuggestionsManager.add(List.of(networkSuggestion),
                         TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID,
-                mWifiNetworkSuggestionsManager.remove(Collections.singletonList(null), TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                mWifiNetworkSuggestionsManager.remove(Collections.singletonList(null),
+                        TEST_UID_1, TEST_PACKAGE_1));
     }
 
     /**
@@ -1371,7 +1355,7 @@
         // remove the suggestion & ensure lookup fails.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(List.of(), TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         assertTrue(mWifiNetworkSuggestionsManager
                 .getNetworkSuggestionsForScanDetail(scanDetail).isEmpty());
     }
@@ -1429,7 +1413,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -1469,7 +1452,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -1485,7 +1467,7 @@
 
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         verify(mWifiConfigManager).removeSuggestionConfiguredNetwork(
                 argThat(new WifiConfigMatcher(networkSuggestion.wifiConfiguration)));
         mInorder.verify(mWifiPermissionsUtil)
@@ -1571,7 +1553,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -1616,7 +1597,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -1674,7 +1654,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion1.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -1736,7 +1715,6 @@
         mWifiNetworkSuggestionsManager.setHasUserApprovedForApp(true, TEST_UID_2, TEST_PACKAGE_2);
         WifiConfiguration connectNetwork = new WifiConfiguration(config);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -1799,7 +1777,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion1.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -1853,7 +1830,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -1895,7 +1871,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -1940,7 +1915,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -2016,7 +1990,7 @@
                         TEST_PACKAGE_1, TEST_FEATURE));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
 
         // Verify config store interactions.
         verify(mWifiConfigManager, times(2)).saveToStore(true);
@@ -2066,7 +2040,10 @@
 
         ExtendedWifiNetworkSuggestion extendedWifiNetworkSuggestion2 =
                 ExtendedWifiNetworkSuggestion.fromWns(networkSuggestion2, appInfo, true);
-        assertEquals(WifiConfiguration.RANDOMIZATION_PERSISTENT,
+        // For simplicity, the networkSuggestion2 is created through the constructor and has
+        // macRandomizationSetting = RANDOMIZATION_AUTO. Suggestions created through the formal
+        // Builder API should have RANDOMIZATION_PERSISTENT as default.
+        assertEquals(WifiConfiguration.RANDOMIZATION_AUTO,
                 extendedWifiNetworkSuggestion2.createInternalWifiConfiguration(
                         mWifiCarrierInfoManager).macRandomizationSetting);
     }
@@ -2123,7 +2100,6 @@
         connectNetwork.providerFriendlyName = TEST_FRIENDLY_NAME;
         connectNetwork.setPasspointUniqueId(passpointConfiguration.getUniqueId());
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -2217,7 +2193,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -2227,7 +2202,7 @@
         // Now remove the network suggestion and ensure we did trigger a disconnect.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         verify(mWifiConfigManager).removeSuggestionConfiguredNetwork(
                 argThat(new WifiConfigMatcher(connectNetwork)));
     }
@@ -2254,7 +2229,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -2264,7 +2238,7 @@
         // Now remove all network suggestion and ensure we did trigger a disconnect.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(new ArrayList<>(), TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         verify(mWifiConfigManager).removeSuggestionConfiguredNetwork(
                 argThat(new WifiConfigMatcher(connectNetwork)));
     }
@@ -2304,7 +2278,6 @@
         // Simulate connecting to the network.
         WifiConfiguration connectNetwork = new WifiConfiguration(config);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -2361,11 +2334,11 @@
         // Now remove first add, nothing happens.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList1, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         // Stop watching app-ops changes on last remove.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList2, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         assertTrue(mWifiNetworkSuggestionsManager.getAllNetworkSuggestions().isEmpty());
         mInorder.verify(mAppOpsManager).stopWatchingMode(mAppOpChangedListenerCaptor.getValue());
 
@@ -2547,10 +2520,10 @@
         // Remove all suggestions from TEST_PACKAGE_1 & TEST_PACKAGE_2, we should continue to track.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList1, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList2, TEST_UID_2,
-                        TEST_PACKAGE_2, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_2));
 
         assertTrue(mDataSource.hasNewDataToSerialize());
         Map<String, PerAppInfo> networkSuggestionsMapToWrite = mDataSource.toSerialize();
@@ -2613,10 +2586,10 @@
         // Remove all suggestions from TEST_PACKAGE_1 & TEST_PACKAGE_2, we should continue to track.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList1, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList2, TEST_UID_2,
-                        TEST_PACKAGE_2, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_2));
 
         assertTrue(mDataSource.hasNewDataToSerialize());
         Map<String, PerAppInfo> networkSuggestionsMapToWrite = mDataSource.toSerialize();
@@ -2891,7 +2864,7 @@
         // App remove all network suggestions, expect empty list.
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(new ArrayList<>(), TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         storedNetworkSuggestionListPerApp =
                 mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1);
         assertEquals(storedNetworkSuggestionListPerApp.size(), 0);
@@ -2912,9 +2885,6 @@
         WifiNetworkSuggestion hiddenNetworkSuggestion2 = createWifiNetworkSuggestion(
                 WifiConfigurationTestUtil.createPskHiddenNetwork(), null, true, false, true, true,
                 DEFAULT_PRIORITY_GROUP);
-        WifiNetworkSuggestion hiddenNetworkSuggestion3 = createWifiNetworkSuggestion(
-                WifiConfigurationTestUtil.createPskHiddenNetwork(), null, true, false, true, false,
-                DEFAULT_PRIORITY_GROUP);
         List<WifiNetworkSuggestion> networkSuggestionList1 =
                 new ArrayList<WifiNetworkSuggestion>() {{
                     add(networkSuggestion);
@@ -2924,28 +2894,17 @@
                 new ArrayList<WifiNetworkSuggestion>() {{
                     add(hiddenNetworkSuggestion2);
                 }};
-        List<WifiNetworkSuggestion> networkSuggestionList3 =
-                new ArrayList<WifiNetworkSuggestion>() {{
-                    add(hiddenNetworkSuggestion3);
-                }};
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.add(networkSuggestionList1, TEST_UID_1,
                         TEST_PACKAGE_1, TEST_FEATURE));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.add(networkSuggestionList2, TEST_UID_2,
                         TEST_PACKAGE_2, TEST_FEATURE));
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.add(networkSuggestionList3, TEST_UID_3,
-                        TEST_PACKAGE_3, TEST_FEATURE));
         mWifiNetworkSuggestionsManager.setHasUserApprovedForApp(true, TEST_UID_1, TEST_PACKAGE_1);
         mWifiNetworkSuggestionsManager.setHasUserApprovedForApp(false, TEST_UID_2, TEST_PACKAGE_2);
-        mWifiNetworkSuggestionsManager.setHasUserApprovedForApp(true, TEST_UID_3, TEST_PACKAGE_3);
         List<WifiScanner.ScanSettings.HiddenNetwork> hiddenNetworks =
-                mWifiNetworkSuggestionsManager.retrieveHiddenNetworkList(true /* autoJoinOnly */);
-        assertEquals(2, hiddenNetworks.size());
-        hiddenNetworks =
-                mWifiNetworkSuggestionsManager.retrieveHiddenNetworkList(false /* autoJoinOnly */);
-        assertEquals(3, hiddenNetworks.size());
+                mWifiNetworkSuggestionsManager.retrieveHiddenNetworkList();
+        assertEquals(1, hiddenNetworks.size());
         assertEquals(hiddenNetworkSuggestion1.wifiConfiguration.SSID, hiddenNetworks.get(0).ssid);
     }
 
@@ -2971,11 +2930,13 @@
         validateUserApprovalDialog(TEST_APP_NAME_1);
 
         // Simulate user clicking on allow in the dialog.
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> dialogCallbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        verify(mWifiDialogManager).createSimpleDialog(
-                any(), any(), any(), any(), any(), dialogCallbackCaptor.capture(), any());
-        dialogCallbackCaptor.getValue().onPositiveButtonClicked();
+        ArgumentCaptor<DialogInterface.OnClickListener> clickListenerCaptor =
+                ArgumentCaptor.forClass(DialogInterface.OnClickListener.class);
+        verify(mAlertDialogBuilder, atLeastOnce()).setPositiveButton(
+                any(), clickListenerCaptor.capture());
+        assertNotNull(clickListenerCaptor.getValue());
+        clickListenerCaptor.getValue().onClick(mAlertDialog, 0);
+        mLooper.dispatchAll();
 
         // Verify config store interactions.
         verify(mWifiConfigManager, times(2)).saveToStore(true);
@@ -3013,11 +2974,13 @@
         validateUserApprovalDialog(TEST_APP_NAME_1);
 
         // Simulate user clicking on disallow in the dialog.
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> dialogCallbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        verify(mWifiDialogManager).createSimpleDialog(
-                any(), any(), any(), any(), any(), dialogCallbackCaptor.capture(), any());
-        dialogCallbackCaptor.getValue().onNegativeButtonClicked();
+        ArgumentCaptor<DialogInterface.OnClickListener> clickListenerCaptor =
+                ArgumentCaptor.forClass(DialogInterface.OnClickListener.class);
+        verify(mAlertDialogBuilder, atLeastOnce()).setNegativeButton(
+                any(), clickListenerCaptor.capture());
+        assertNotNull(clickListenerCaptor.getValue());
+        clickListenerCaptor.getValue().onClick(mAlertDialog, 0);
+        mLooper.dispatchAll();
         // Ensure we turn off CHANGE_WIFI_STATE app-ops.
         verify(mAppOpsManager).setMode(
                 OPSTR_CHANGE_WIFI_STATE, TEST_UID_1, TEST_PACKAGE_1, MODE_IGNORED);
@@ -3068,12 +3031,13 @@
                         TEST_PACKAGE_1, TEST_FEATURE));
         validateUserApprovalDialog(TEST_APP_NAME_1);
 
-        // Simulate user dismissing the dialog via home/back button.
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> dialogCallbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        verify(mWifiDialogManager).createSimpleDialog(
-                any(), any(), any(), any(), any(), dialogCallbackCaptor.capture(), any());
-        dialogCallbackCaptor.getValue().onCancelled();
+        // Simulate user clicking on allow in the dialog.
+        ArgumentCaptor<DialogInterface.OnDismissListener> dismissListenerCaptor =
+                ArgumentCaptor.forClass(DialogInterface.OnDismissListener.class);
+        verify(mAlertDialogBuilder, atLeastOnce()).setOnDismissListener(
+                dismissListenerCaptor.capture());
+        assertNotNull(dismissListenerCaptor.getValue());
+        dismissListenerCaptor.getValue().onDismiss(mAlertDialog);
         mLooper.dispatchAll();
 
         // Verify no new config store or app-op interactions.
@@ -3088,6 +3052,52 @@
         validateUserApprovalNotification(TEST_APP_NAME_1);
     }
 
+    @Test
+    public void testAddNetworkSuggestions_activeFgScorer_doesNotRequestForApproval() {
+        // Fg app
+        when(mActivityManager.getPackageImportance(any())).thenReturn(IMPORTANCE_FOREGROUND);
+        // Active scorer
+        when(mNetworkScoreManager.getActiveScorerPackage()).thenReturn(TEST_PACKAGE_1);
+
+        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
+                WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
+                DEFAULT_PRIORITY_GROUP);
+        List<WifiNetworkSuggestion> networkSuggestionList =
+                new ArrayList<WifiNetworkSuggestion>() {{
+                    add(networkSuggestion);
+                }};
+
+        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
+                mWifiNetworkSuggestionsManager.add(networkSuggestionList, TEST_UID_1,
+                        TEST_PACKAGE_1, TEST_FEATURE));
+
+        verifyZeroInteractions(mAlertDialog);
+        verifyZeroInteractions(mWifiNotificationManager);
+    }
+
+    @Test
+    public void testAddNetworkSuggestions_activeBgScorer_doesNotRequestForApproval() {
+        // Bg app
+        when(mActivityManager.getPackageImportance(any())).thenReturn(IMPORTANCE_SERVICE);
+        // Active scorer
+        when(mNetworkScoreManager.getActiveScorerPackage()).thenReturn(TEST_PACKAGE_1);
+
+        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
+                WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
+                DEFAULT_PRIORITY_GROUP);
+        List<WifiNetworkSuggestion> networkSuggestionList =
+                new ArrayList<WifiNetworkSuggestion>() {{
+                    add(networkSuggestion);
+                }};
+
+        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
+                mWifiNetworkSuggestionsManager.add(networkSuggestionList, TEST_UID_1,
+                        TEST_PACKAGE_1, TEST_FEATURE));
+
+        verifyZeroInteractions(mAlertDialog);
+        verifyZeroInteractions(mWifiNotificationManager);
+    }
+
     /**
      * Verify handling of user clicking allow on the user approval notification when first time
      * add suggestions.
@@ -3123,6 +3133,27 @@
         verifyNoMoreInteractions(mWifiNotificationManager);
     }
 
+    @Test
+    public void getNetworkSuggestionsForScanDetail_exemptsActiveScorerFromUserApproval() {
+        when(mNetworkScoreManager.getActiveScorerPackage()).thenReturn(TEST_PACKAGE_1);
+        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
+                WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
+                DEFAULT_PRIORITY_GROUP);
+        List<WifiNetworkSuggestion> networkSuggestionList =
+                new ArrayList<WifiNetworkSuggestion>() {{
+                    add(networkSuggestion);
+                }};
+        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
+                mWifiNetworkSuggestionsManager.add(networkSuggestionList, TEST_UID_1,
+                        TEST_PACKAGE_1, TEST_FEATURE));
+
+        mWifiNetworkSuggestionsManager.getNetworkSuggestionsForScanDetail(
+                createScanDetailForNetwork(networkSuggestion.wifiConfiguration));
+
+        verifyZeroInteractions(mWifiNotificationManager);
+        verifyZeroInteractions(mAlertDialog);
+    }
+
     /**
      * Verify handling of user clicking Disallow on the user approval notification when first time
      * add suggestions.
@@ -3212,7 +3243,6 @@
         connectNetwork.FQDN = TEST_FQDN;
         connectNetwork.providerFriendlyName = TEST_FRIENDLY_NAME;
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -3261,16 +3291,16 @@
     }
 
     private void validateUserApprovalDialog(String... anyOfExpectedAppNames) {
-        verify(mDialogHandle, atLeastOnce()).launchDialog();
-        ArgumentCaptor<String> messageCaptor = ArgumentCaptor.forClass(String.class);
-        verify(mWifiDialogManager, atLeastOnce()).createSimpleDialog(
-                any(), messageCaptor.capture(), any(), any(), any(), any(), any());
-        String message = messageCaptor.getValue();
-        assertNotNull(message);
+        verify(mAlertDialog, atLeastOnce()).show();
+        ArgumentCaptor<CharSequence> contentCaptor =
+                ArgumentCaptor.forClass(CharSequence.class);
+        verify(mAlertDialogBuilder, atLeastOnce()).setMessage(contentCaptor.capture());
+        CharSequence content = contentCaptor.getValue();
+        assertNotNull(content);
 
         boolean foundMatch = false;
         for (int i = 0; i < anyOfExpectedAppNames.length; i++) {
-            foundMatch = message.contains(anyOfExpectedAppNames[i]);
+            foundMatch = content.toString().contains(anyOfExpectedAppNames[i]);
             if (foundMatch) break;
         }
         assertTrue(foundMatch);
@@ -3405,6 +3435,31 @@
         assertTrue(ewns.isEmpty());
     }
 
+    @Test
+    public void getNetworkSuggestionsForFqdn_activeScorer_doesNotRequestForUserApproval() {
+        when(mNetworkScoreManager.getActiveScorerPackage()).thenReturn(TEST_PACKAGE_1);
+        PasspointConfiguration passpointConfiguration =
+                createTestConfigWithUserCredential(TEST_FQDN, TEST_FRIENDLY_NAME);
+        WifiConfiguration placeholderConfig = createPlaceholderConfigForPasspoint(TEST_FQDN,
+                passpointConfiguration.getUniqueId());
+        placeholderConfig.FQDN = TEST_FQDN;
+        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(placeholderConfig,
+                passpointConfiguration, true, false, true, true, DEFAULT_PRIORITY_GROUP);
+        List<WifiNetworkSuggestion> networkSuggestionList = Arrays.asList(networkSuggestion);
+        placeholderConfig.creatorUid = TEST_UID_1;
+        when(mPasspointManager.addOrUpdateProvider(any(PasspointConfiguration.class),
+                anyInt(), anyString(), eq(true), eq(true))).thenReturn(true);
+        assertEquals(mWifiNetworkSuggestionsManager.add(networkSuggestionList, TEST_UID_1,
+                TEST_PACKAGE_1, TEST_FEATURE), WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS);
+
+        Set<ExtendedWifiNetworkSuggestion> ewns =
+                mWifiNetworkSuggestionsManager.getNetworkSuggestionsForFqdn(TEST_FQDN);
+
+        assertEquals(1, ewns.size());
+        verifyZeroInteractions(mAlertDialog);
+        verifyZeroInteractions(mWifiNotificationManager);
+    }
+
     /**
      * Verify return true when allow user manually connect and user approved the app
      */
@@ -3520,9 +3575,6 @@
         networkSuggestion1.wifiConfiguration.fromWifiNetworkSuggestion = true;
         networkSuggestion2.wifiConfiguration.fromWifiNetworkSuggestion = true;
         networkSuggestion3.wifiConfiguration.fromWifiNetworkSuggestion = true;
-        networkSuggestion1.wifiConfiguration.shared = false;
-        networkSuggestion2.wifiConfiguration.shared = false;
-        networkSuggestion3.wifiConfiguration.shared = false;
         networkSuggestion1.wifiConfiguration.creatorName = TEST_PACKAGE_1;
         networkSuggestion2.wifiConfiguration.creatorName = TEST_PACKAGE_1;
         networkSuggestion3.wifiConfiguration.creatorName = TEST_PACKAGE_1;
@@ -3563,8 +3615,6 @@
                 DEFAULT_PRIORITY_GROUP);
         networkSuggestion1.wifiConfiguration.carrierId = TEST_CARRIER_ID;
         networkSuggestion2.wifiConfiguration.carrierId = TEST_CARRIER_ID;
-        networkSuggestion1.wifiConfiguration.shared = false;
-        networkSuggestion2.wifiConfiguration.shared = false;
         WifiConfiguration configuration = networkSuggestion1.wifiConfiguration;
 
         // Suggestion1 has SIM present, suggestion2 has SIM absent
@@ -3626,15 +3676,12 @@
     }
 
     private void setupGetConfiguredNetworksFromWcm(WifiConfiguration...configs) {
-        List<WifiConfiguration> wcmConfigs = new ArrayList<>();
         for (int i = 0; i < configs.length; i++) {
-            WifiConfiguration config = new WifiConfiguration(configs[i]);
-            config.shared = false;
+            WifiConfiguration config = configs[i];
             when(mWifiConfigManager.getConfiguredNetwork(config.getProfileKey()))
                     .thenReturn(config);
-            wcmConfigs.add(config);
         }
-        when(mWifiConfigManager.getConfiguredNetworks()).thenReturn(wcmConfigs);
+        when(mWifiConfigManager.getConfiguredNetworks()).thenReturn(Arrays.asList(configs));
     }
 
     /**
@@ -3701,7 +3748,7 @@
                 DEFAULT_PRIORITY_GROUP);
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(List.of(suggestionToRemove), TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
     }
 
     /**
@@ -3771,9 +3818,6 @@
      */
     @Test
     public void testSimStateChangeWillResetCarrierPrivilegedApp() {
-        if (SdkLevel.isAtLeastT()) {
-            return;
-        }
         WifiConfiguration config =
                 WifiConfigurationTestUtil.createEapNetwork(WifiEnterpriseConfig.Eap.SIM,
                         WifiEnterpriseConfig.Phase2.NONE);
@@ -3791,49 +3835,7 @@
         verify(mWifiNotificationManager, never()).notify(anyInt(), any());
         when(mWifiCarrierInfoManager.getCarrierIdForPackageWithCarrierPrivileges(TEST_PACKAGE_1))
                 .thenReturn(TelephonyManager.UNKNOWN_CARRIER_ID);
-        mWifiNetworkSuggestionsManager.updateCarrierPrivilegedApps();
-        assertEquals(0,  mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1).size());
-        verify(mWifiConfigManager, times(2)).saveToStore(true);
-        status = mWifiNetworkSuggestionsManager
-                .add(networkSuggestionList, TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE);
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_NOT_ALLOWED, status);
-        networkSuggestionList.clear();
-        networkSuggestionList.add(createWifiNetworkSuggestion(
-                WifiConfigurationTestUtil.createOpenNetwork(), null, true, false, true, true,
-                DEFAULT_PRIORITY_GROUP));
-        status = mWifiNetworkSuggestionsManager
-                .add(networkSuggestionList, TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE);
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS, status);
-        verify(mWifiNotificationManager).notify(anyInt(), any());
-    }
-
-    /**
-     * Verify when SIM changes, the app loses carrier privilege. Suggestions from this app will be
-     * removed. If this app suggests again, it will be considered as normal suggestor.
-     */
-    @Test
-    public void testCarrierPrivilegedChangeWillResetCarrierPrivilegedApp() {
-        if (!SdkLevel.isAtLeastT()) {
-            return;
-        }
-        WifiConfiguration config =
-                WifiConfigurationTestUtil.createEapNetwork(WifiEnterpriseConfig.Eap.SIM,
-                        WifiEnterpriseConfig.Phase2.NONE);
-        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
-                config, null, true, false, true, true, DEFAULT_PRIORITY_GROUP);
-        List<WifiNetworkSuggestion> networkSuggestionList = new ArrayList<>();
-        networkSuggestionList.add(networkSuggestion);
-        when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1))
-                .thenReturn(false);
-        when(mWifiCarrierInfoManager.getCarrierIdForPackageWithCarrierPrivileges(TEST_PACKAGE_1))
-                .thenReturn(VALID_CARRIER_ID);
-        int status = mWifiNetworkSuggestionsManager
-                .add(networkSuggestionList, TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE);
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS, status);
-        verify(mWifiNotificationManager, never()).notify(anyInt(), any());
-        when(mWifiCarrierInfoManager.getCarrierIdForPackageWithCarrierPrivileges(TEST_PACKAGE_1))
-                .thenReturn(TelephonyManager.UNKNOWN_CARRIER_ID);
-        mWifiNetworkSuggestionsManager.updateCarrierPrivilegedApps(Collections.emptySet());
+        mWifiNetworkSuggestionsManager.resetCarrierPrivilegedApps();
         assertEquals(0,  mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1).size());
         verify(mWifiConfigManager, times(2)).saveToStore(true);
         status = mWifiNetworkSuggestionsManager
@@ -3864,7 +3866,6 @@
         WifiConfiguration configuration =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         configuration.fromWifiNetworkSuggestion = true;
-        configuration.shared = false;
         configuration.ephemeral = true;
         configuration.creatorName = TEST_PACKAGE_1;
         configuration.creatorUid = TEST_UID_1;
@@ -3920,7 +3921,6 @@
         config.providerFriendlyName = TEST_FRIENDLY_NAME;
         config.setPasspointUniqueId(passpointConfiguration.getUniqueId());
         config.fromWifiNetworkSuggestion = true;
-        config.shared = false;
         config.ephemeral = true;
         config.creatorName = TEST_PACKAGE_1;
         config.creatorUid = TEST_UID_1;
@@ -3962,12 +3962,12 @@
                 add(nonPasspointSuggestion);
                 }};
         ScanResult passpointScanResult = new ScanResult();
-        passpointScanResult.wifiSsid = WifiSsid.fromUtf8Text("passpoint");
+        passpointScanResult.wifiSsid = WifiSsid.createFromAsciiEncoded("passpoint");
         List<ScanResult> ppSrList = new ArrayList<>() {{
                 add(passpointScanResult);
                 }};
         ScanResult nonPasspointScanResult = new ScanResult();
-        nonPasspointScanResult.wifiSsid = WifiSsid.fromUtf8Text(
+        nonPasspointScanResult.wifiSsid = WifiSsid.createFromAsciiEncoded(
                 nonPasspointSuggestion.wifiConfiguration.SSID);
         List<ScanResult> nonPpSrList = new ArrayList<>() {{
                 add(nonPasspointScanResult);
@@ -4013,7 +4013,7 @@
                 add(nonPasspointSuggestion);
                 }};
         ScanResult nonPasspointScanResult = new ScanResult();
-        nonPasspointScanResult.wifiSsid = WifiSsid.fromUtf8Text("non-passpoint");
+        nonPasspointScanResult.wifiSsid = WifiSsid.createFromAsciiEncoded("non-passpoint");
         List<ScanResult> allSrList = new ArrayList<>() {{
                 add(nonPasspointScanResult);
             }};
@@ -4050,7 +4050,7 @@
                 add(nonPasspointSuggestion);
             }};
         ScanResult nonPasspointScanResult = new ScanResult();
-        nonPasspointScanResult.wifiSsid = WifiSsid.fromUtf8Text("non-passpoint");
+        nonPasspointScanResult.wifiSsid = WifiSsid.createFromAsciiEncoded("non-passpoint");
         List<ScanResult> allSrList = new ArrayList<>() {{
                 add(nonPasspointScanResult);
             }};
@@ -4118,17 +4118,17 @@
 
         // Simulate user approved carrier
         eapSimConfig.fromWifiNetworkSuggestion = true;
-        eapSimConfig.shared = false;
         eapSimConfig.creatorUid = TEST_UID_1;
         eapSimConfig.creatorName = TEST_PACKAGE_1;
         when(mWifiConfigManager.getConfiguredNetwork(anyString())).thenReturn(eapSimConfig);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false)))
+        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString()))
                 .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         mUserApproveCarrierListenerArgumentCaptor.getValue().onUserAllowed(TEST_CARRIER_ID);
         when(mWifiCarrierInfoManager.hasUserApprovedImsiPrivacyExemptionForCarrier(TEST_CARRIER_ID))
                 .thenReturn(true);
         verify(mPasspointManager).enableAutojoin(anyString(), any(), eq(true));
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false));
+        verify(mWifiConfigManager).addOrUpdateNetwork(any(), anyInt(), anyString());
+        verify(mWifiConfigManager).allowAutojoin(anyInt(), eq(true));
         matchedSuggestions = mWifiNetworkSuggestionsManager
                 .getNetworkSuggestionsForScanDetail(createScanDetailForNetwork(eapSimConfig));
 
@@ -4138,40 +4138,6 @@
         verify(mWifiConfigManager, atLeastOnce()).saveToStore(true);
     }
 
-    @Test
-    public void testNotSendImsiProtectionNotificationOnPeapNetwork() {
-        when(mWifiCarrierInfoManager.getCarrierIdForPackageWithCarrierPrivileges(TEST_PACKAGE_1))
-                .thenReturn(TEST_CARRIER_ID);
-        when(mWifiCarrierInfoManager.getMatchingSubId(TEST_CARRIER_ID)).thenReturn(TEST_SUBID);
-        when(mWifiCarrierInfoManager.getCarrierNameForSubId(TEST_SUBID))
-                .thenReturn(TEST_CARRIER_NAME);
-        when(mWifiCarrierInfoManager.requiresImsiEncryption(TEST_SUBID)).thenReturn(false);
-        when(mWifiCarrierInfoManager.hasUserApprovedImsiPrivacyExemptionForCarrier(TEST_CARRIER_ID))
-                .thenReturn(false);
-        when(mPasspointManager.addOrUpdateProvider(any(), anyInt(), anyString(), anyBoolean(),
-                anyBoolean())).thenReturn(true);
-
-        WifiConfiguration eapSimConfig = WifiConfigurationTestUtil.createEapNetwork(
-                WifiEnterpriseConfig.Eap.PEAP, WifiEnterpriseConfig.Phase2.AKA);
-        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
-                eapSimConfig, null, true, false, true, true, DEFAULT_PRIORITY_GROUP);
-        List<WifiNetworkSuggestion> networkSuggestionList =
-                Arrays.asList(networkSuggestion);
-
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.add(networkSuggestionList, TEST_UID_1,
-                        TEST_PACKAGE_1, TEST_FEATURE));
-
-        verifyNoMoreInteractions(mWifiNotificationManager);
-        Set<ExtendedWifiNetworkSuggestion> matchedSuggestions = mWifiNetworkSuggestionsManager
-                .getNetworkSuggestionsForScanDetail(createScanDetailForNetwork(eapSimConfig));
-        verify(mWifiCarrierInfoManager, never())
-                .sendImsiProtectionExemptionNotificationIfRequired(TEST_CARRIER_ID);
-        for (ExtendedWifiNetworkSuggestion ewns : matchedSuggestions) {
-            assertTrue(ewns.isAutojoinEnabled);
-        }
-    }
-
     /**
      * Verify adding invalid suggestions will return right error reason code.
      */
@@ -4246,6 +4212,25 @@
         assertEquals(network1.SSID, pnoNetwork.get(0).SSID);
     }
 
+    @Test
+    public void getAllScanOptimizationSuggestionNetworks_returnsActiveScorerWithoutUserApproval() {
+        when(mNetworkScoreManager.getActiveScorerPackage()).thenReturn(TEST_PACKAGE_1);
+        WifiConfiguration network = WifiConfigurationTestUtil.createOpenNetwork();
+        WifiNetworkSuggestion networkSuggestion =
+                createWifiNetworkSuggestion(network, null, false, false, true, true,
+                        DEFAULT_PRIORITY_GROUP);
+        List<WifiNetworkSuggestion> networkSuggestionList = Arrays.asList(networkSuggestion);
+        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
+                mWifiNetworkSuggestionsManager
+                        .add(networkSuggestionList, TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE));
+        mWifiNetworkSuggestionsManager.setHasUserApprovedForApp(false, TEST_UID_1, TEST_PACKAGE_1);
+
+        List<WifiConfiguration> networks =
+                mWifiNetworkSuggestionsManager.getAllScanOptimizationSuggestionNetworks();
+
+        assertEquals(1, networks.size());
+    }
+
     /**
      * Verify if a suggestion is mostRecently connected, flag will be persist.
      */
@@ -4300,7 +4285,7 @@
 
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(networkSuggestionList1, TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         verify(listener).onSuggestionsRemoved(networkSuggestionList1);
     }
 
@@ -4505,7 +4490,7 @@
         List<ScanDetail> scanDetails = Arrays.asList(scanDetail1, scanDetail2);
         // Secure suggestions is auto-join disabled, should not be ignored.
         List<WifiNetworkSuggestion> suggestionList = Arrays.asList(suggestion1, suggestion2);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false)))
+        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString()))
                 .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.add(suggestionList, TEST_UID_1,
@@ -4710,7 +4695,7 @@
                         TEST_PACKAGE_1, TEST_FEATURE));
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL,
                 mWifiNetworkSuggestionsManager.remove(Arrays.asList(networkSuggestion), TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         assertTrue(mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1).isEmpty());
         assertFalse(mWifiNetworkSuggestionsManager.registerSuggestionConnectionStatusListener(
                 mConnectionStatusListener, TEST_PACKAGE_1, TEST_UID_1));
@@ -4724,7 +4709,7 @@
         assertFalse(mWifiNetworkSuggestionsManager.get(TEST_PACKAGE_1, TEST_UID_1).isEmpty());
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(Arrays.asList(networkSuggestion), TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         assertTrue(mWifiNetworkSuggestionsManager.registerSuggestionConnectionStatusListener(
                 mConnectionStatusListener, TEST_PACKAGE_1, TEST_UID_1));
     }
@@ -4748,7 +4733,6 @@
         WifiConfiguration connectNetwork =
                 new WifiConfiguration(networkSuggestion.wifiConfiguration);
         connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
         connectNetwork.ephemeral = true;
         connectNetwork.creatorName = TEST_PACKAGE_1;
         connectNetwork.creatorUid = TEST_UID_1;
@@ -4765,7 +4749,7 @@
 
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
                 mWifiNetworkSuggestionsManager.remove(Arrays.asList(networkSuggestion), TEST_UID_1,
-                        TEST_PACKAGE_1, WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                        TEST_PACKAGE_1));
         verify(mWifiConfigManager).removeSuggestionConfiguredNetwork(
                 argThat(new WifiConfigMatcher(connectNetwork)));
         mInorder.verify(mWifiPermissionsUtil).doesUidBelongToCurrentUserOrDeviceOwner(anyInt());
@@ -4805,7 +4789,6 @@
         WifiConfiguration configuration =
                 new WifiConfiguration(eapSimConfig);
         configuration.fromWifiNetworkSuggestion = true;
-        configuration.shared = false;
         configuration.ephemeral = true;
         configuration.creatorName = TEST_PACKAGE_1;
         configuration.creatorUid = TEST_UID_1;
@@ -4848,7 +4831,6 @@
         WifiConfiguration configuration =
                 new WifiConfiguration(config);
         configuration.fromWifiNetworkSuggestion = true;
-        configuration.shared = false;
         configuration.ephemeral = true;
         configuration.creatorName = TEST_PACKAGE_1;
         configuration.creatorUid = TEST_UID_1;
@@ -5015,88 +4997,6 @@
         assertEquals(0, ewns.size());
     }
 
-    /**
-     * Verify we return the merged network suggestion matches the target ScanDetail when merged
-     * network is allowed .
-     */
-    @Test
-    public void testGetMergedNetworkSuggestionsWithSubscriptionGroupForScanDetail() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.checkNetworkCarrierProvisioningPermission(TEST_UID_1))
-                .thenReturn(true);
-        when(mWifiCarrierInfoManager.areMergedCarrierWifiNetworksAllowed(TEST_SUBID))
-                .thenReturn(true);
-        when(mWifiCarrierInfoManager.getBestMatchSubscriptionId(any()))
-                .thenReturn(TEST_SUBID);
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        ScanDetail scanDetail = createScanDetailForNetwork(config);
-        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
-                config, null, false, false, true, true,
-                DEFAULT_PRIORITY_GROUP);
-        config.setSubscriptionGroup(GROUP_UUID);
-        config.carrierMerged = true;
-        config.meteredOverride = WifiConfiguration.METERED_OVERRIDE_METERED;
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.add(List.of(networkSuggestion), TEST_UID_1,
-                        TEST_PACKAGE_1, TEST_FEATURE));
-
-        Set<ExtendedWifiNetworkSuggestion> ewns = mWifiNetworkSuggestionsManager
-                .getNetworkSuggestionsForScanDetail(scanDetail);
-        assertEquals(1, ewns.size());
-        assertEquals(TEST_SUBID, ewns.iterator().next()
-                .createInternalWifiConfiguration(mWifiCarrierInfoManager).subscriptionId);
-
-        // Change to disallow merged network, no matching suggestion should return.
-        when(mWifiCarrierInfoManager.areMergedCarrierWifiNetworksAllowed(TEST_SUBID))
-                .thenReturn(false);
-        ewns = mWifiNetworkSuggestionsManager
-                .getNetworkSuggestionsForScanDetail(scanDetail);
-        assertEquals(0, ewns.size());
-    }
-
-    @Test
-    public void testAddNonRandomizedNetworkSuggestionForcedToRandomized() {
-        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
-                WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
-                DEFAULT_PRIORITY_GROUP);
-        networkSuggestion.wifiConfiguration.macRandomizationSetting =
-                WifiConfiguration.RANDOMIZATION_NONE;
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.add(List.of(networkSuggestion),
-                        TEST_UID_1, TEST_PACKAGE_1, TEST_FEATURE));
-        assertEquals(WifiConfiguration.RANDOMIZATION_PERSISTENT,
-                networkSuggestion.wifiConfiguration.macRandomizationSetting);
-    }
-
-    @Test
-    public void testAddNonRandomizedPasspointSuggestionForcedToRandomized() {
-        PasspointConfiguration passpointConfiguration =
-                createTestConfigWithUserCredential(TEST_FQDN, TEST_FRIENDLY_NAME);
-        WifiConfiguration placeholderConfig = createPlaceholderConfigForPasspoint(TEST_FQDN,
-                passpointConfiguration.getUniqueId());
-        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
-                placeholderConfig, passpointConfiguration, false, false, true, true,
-                DEFAULT_PRIORITY_GROUP);
-        networkSuggestion.passpointConfiguration.setMacRandomizationEnabled(false);
-        networkSuggestion.passpointConfiguration.setNonPersistentMacRandomizationEnabled(false);
-        List<WifiNetworkSuggestion> networkSuggestionList =
-                new ArrayList<WifiNetworkSuggestion>() {{
-                    add(networkSuggestion);
-                }};
-        when(mPasspointManager.addOrUpdateProvider(any(), anyInt(), anyString(), anyBoolean(),
-                anyBoolean())).thenReturn(true);
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.add(networkSuggestionList, TEST_UID_1,
-                        TEST_PACKAGE_1, TEST_FEATURE));
-
-        ArgumentCaptor<PasspointConfiguration> passpointConfigCaptor =
-                ArgumentCaptor.forClass(PasspointConfiguration.class);
-        verify(mPasspointManager).addOrUpdateProvider(passpointConfigCaptor.capture(),
-                anyInt(), anyString(), anyBoolean(), anyBoolean());
-        assertTrue(passpointConfigCaptor.getValue().isMacRandomizationEnabled());
-        assertFalse(passpointConfigCaptor.getValue().isNonPersistentMacRandomizationEnabled());
-    }
-
     @Test
     public void testIncompleteEnterpriseNetworkSuggestion() {
         WifiConfiguration config = new WifiConfiguration();
@@ -5118,163 +5018,17 @@
                         TEST_PACKAGE_1, TEST_FEATURE));
     }
 
-    /**
-     * Verify successful removal of network suggestions with linger action when suggestion is
-     * currently connected. Should trigger linger and delay remove WifiConfiguration.
-     */
-    @Test
-    public void testRemoveNetworkSuggestionsWithActionCurrentlyConnected() {
-        WifiNetworkSuggestion networkSuggestion1 = createWifiNetworkSuggestion(
-                WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
-                DEFAULT_PRIORITY_GROUP);
-
-        List<WifiNetworkSuggestion> networkSuggestionList1 =
-                new ArrayList<WifiNetworkSuggestion>() {{
-                    add(networkSuggestion1);
-                }};
-
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.add(networkSuggestionList1, TEST_UID_1,
-                        TEST_PACKAGE_1, TEST_FEATURE));
-
-        // Now remove suggestion with lingering which is currently connected.
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(0L);
-        when(mPrimaryClientModeManager.getConnectedWifiConfiguration())
-                .thenReturn(networkSuggestion1.wifiConfiguration);
-        when(mWifiConfigManager.getConfiguredNetwork(any()))
-                .thenReturn(networkSuggestion1.wifiConfiguration);
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.remove(List.of(networkSuggestion1),
-                        TEST_UID_1, TEST_PACKAGE_1, ACTION_REMOVE_SUGGESTION_LINGER));
-        verify(mWifiScoreCard).removeNetwork(anyString());
-        verify(mLruConnectionTracker).removeNetwork(any());
-        verify(mPrimaryClientModeManager).setShouldReduceNetworkScore(true);
-        verify(mWifiConfigManager, never()).removeSuggestionConfiguredNetwork(any());
-        when(mClock.getElapsedSinceBootMillis()).thenReturn((long) DEFAULT_LINGER_DELAY_MS + 1);
-        mLooper.moveTimeForward(DEFAULT_LINGER_DELAY_MS + 1);
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager).removeSuggestionConfiguredNetwork(
-                argThat(new WifiConfigMatcher(networkSuggestion1.wifiConfiguration)));
-
-        verify(mWifiMetrics, times(2)).incrementNetworkSuggestionApiNumModification();
-        verify(mWifiMetrics, times(1)).addNetworkSuggestionPriorityGroup(anyInt());
-        ArgumentCaptor<List<Integer>> maxSizesCaptor = ArgumentCaptor.forClass(List.class);
-        verify(mWifiMetrics, times(2)).noteNetworkSuggestionApiListSizeHistogram(
-                maxSizesCaptor.capture());
-        verify(mWifiConfigManager).removeConnectChoiceFromAllNetworks(anyString());
-        assertNotNull(maxSizesCaptor.getValue());
-        assertEquals(maxSizesCaptor.getValue(), new ArrayList<Integer>() {{ add(1); }});
-    }
-
-    /**
-     * Verify successful removal of network suggestions with linger action when suggestion is not
-     * currently connected. Should remove WifiConfiguration immeditaly.
-     */
-    @Test
-    public void testRemoveNetworkSuggestionsWithActionNotConnected() {
-        WifiNetworkSuggestion networkSuggestion1 = createWifiNetworkSuggestion(
-                WifiConfigurationTestUtil.createOpenNetwork(), null, false, false, true, true,
-                DEFAULT_PRIORITY_GROUP);
-
-        List<WifiNetworkSuggestion> networkSuggestionList1 =
-                new ArrayList<WifiNetworkSuggestion>() {{
-                    add(networkSuggestion1);
-                }};
-
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.add(networkSuggestionList1, TEST_UID_1,
-                        TEST_PACKAGE_1, TEST_FEATURE));
-
-        // Now remove suggestion with lingering which is currently connected.
-        when(mWifiConfigManager.getConfiguredNetwork(any()))
-                .thenReturn(networkSuggestion1.wifiConfiguration);
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.remove(List.of(networkSuggestion1),
-                        TEST_UID_1, TEST_PACKAGE_1, ACTION_REMOVE_SUGGESTION_LINGER));
-        verify(mWifiScoreCard).removeNetwork(anyString());
-        verify(mLruConnectionTracker).removeNetwork(any());
-        verify(mPrimaryClientModeManager, never()).setShouldReduceNetworkScore(true);
-        verify(mWifiConfigManager).removeSuggestionConfiguredNetwork(
-                argThat(new WifiConfigMatcher(networkSuggestion1.wifiConfiguration)));
-
-        verify(mWifiMetrics, times(2)).incrementNetworkSuggestionApiNumModification();
-        verify(mWifiMetrics, times(1)).addNetworkSuggestionPriorityGroup(anyInt());
-        ArgumentCaptor<List<Integer>> maxSizesCaptor = ArgumentCaptor.forClass(List.class);
-        verify(mWifiMetrics, times(2)).noteNetworkSuggestionApiListSizeHistogram(
-                maxSizesCaptor.capture());
-        verify(mWifiConfigManager).removeConnectChoiceFromAllNetworks(anyString());
-        assertNotNull(maxSizesCaptor.getValue());
-        assertEquals(maxSizesCaptor.getValue(), new ArrayList<Integer>() {{ add(1); }});
-    }
-
     private static WifiNetworkSuggestion createWifiNetworkSuggestion(WifiConfiguration config,
             PasspointConfiguration passpointConfiguration,
             boolean isAppInteractionRequired,
             boolean isUserInteractionRequired,
             boolean isUserAllowedToManuallyConnect,
             boolean isInitialAutoJoinEnabled, int priorityGroup) {
-        config.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_PERSISTENT;
+        if (!SdkLevel.isAtLeastS()) {
+            config.macRandomizationSetting = WifiConfiguration.RANDOMIZATION_PERSISTENT;
+        }
         return new WifiNetworkSuggestion(config, passpointConfiguration, isAppInteractionRequired,
                 isUserInteractionRequired, isUserAllowedToManuallyConnect, isInitialAutoJoinEnabled,
                 priorityGroup);
     }
-
-    @Test
-    public void testSuggestionWithBothSubscriptionIdAndSubscriptionGroupSetIsInvalid() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        config.setSubscriptionGroup(GROUP_UUID);
-        config.subscriptionId = TEST_SUBID;
-        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
-                config, null, false, false, true, true,
-                DEFAULT_PRIORITY_GROUP);
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_INVALID,
-                mWifiNetworkSuggestionsManager.add(List.of(networkSuggestion), TEST_UID_1,
-                TEST_PACKAGE_1, TEST_FEATURE));
-    }
-
-    @Test
-    public void testOnNetworkConnectionSuccessWithMatchAndNetworkTransitionDisable()
-            throws Exception {
-        assertTrue(mWifiNetworkSuggestionsManager.registerSuggestionConnectionStatusListener(
-                mConnectionStatusListener, TEST_PACKAGE_1, TEST_UID_1));
-        WifiNetworkSuggestion networkSuggestion = createWifiNetworkSuggestion(
-                WifiConfigurationTestUtil.createPskNetwork(), null, true, false, true, true,
-                DEFAULT_PRIORITY_GROUP);
-        List<WifiNetworkSuggestion> networkSuggestionList =
-                new ArrayList<WifiNetworkSuggestion>() {{
-                    add(networkSuggestion);
-                }};
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiNetworkSuggestionsManager.add(networkSuggestionList, TEST_UID_1,
-                        TEST_PACKAGE_1, TEST_FEATURE));
-        mWifiNetworkSuggestionsManager.setHasUserApprovedForApp(true, TEST_UID_1, TEST_PACKAGE_1);
-
-        // Simulate connecting to the network.
-        WifiConfiguration connectNetwork =
-                new WifiConfiguration(networkSuggestion.wifiConfiguration);
-        connectNetwork.fromWifiNetworkSuggestion = true;
-        connectNetwork.shared = false;
-        connectNetwork.ephemeral = true;
-        connectNetwork.creatorName = TEST_PACKAGE_1;
-        connectNetwork.creatorUid = TEST_UID_1;
-        WifiConfiguration updated = new WifiConfiguration(connectNetwork);
-        updated.setSecurityParamsEnabled(WifiConfiguration.SECURITY_TYPE_PSK, false);
-
-        // Update to handle Network Transition Disable
-        mNetworkListenerCaptor.getValue().onSecurityParamsUpdate(connectNetwork,
-                updated.getSecurityParamsList());
-        mWifiNetworkSuggestionsManager.handleConnectionAttemptEnded(
-                WifiMetrics.ConnectionEvent.FAILURE_NONE, updated, TEST_BSSID);
-
-        verify(mWifiMetrics).incrementNetworkSuggestionApiNumConnectSuccess();
-
-        // Verify that the correct broadcast was sent out.
-        mInorder.verify(mWifiPermissionsUtil).enforceCanAccessScanResults(eq(TEST_PACKAGE_1),
-                eq(TEST_FEATURE), eq(TEST_UID_1), nullable(String.class));
-        validatePostConnectionBroadcastSent(TEST_PACKAGE_1, networkSuggestion);
-
-        // Verify no more broadcast were sent out.
-        mInorder.verifyNoMoreInteractions();
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java
index 8ce079b..0df19c0 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiScoreCardTest.java
@@ -31,7 +31,6 @@
 import static com.android.server.wifi.WifiScoreCard.CNT_CONNECTION_DURATION_SEC;
 import static com.android.server.wifi.WifiScoreCard.CNT_CONNECTION_FAILURE;
 import static com.android.server.wifi.WifiScoreCard.CNT_CONSECUTIVE_CONNECTION_FAILURE;
-import static com.android.server.wifi.WifiScoreCard.CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE;
 import static com.android.server.wifi.WifiScoreCard.CNT_DISCONNECTION_NONLOCAL;
 import static com.android.server.wifi.WifiScoreCard.CNT_DISCONNECTION_NONLOCAL_CONNECTING;
 import static com.android.server.wifi.WifiScoreCard.CNT_SHORT_CONNECTION_NONLOCAL;
@@ -85,8 +84,8 @@
 @SmallTest
 public class WifiScoreCardTest extends WifiBaseTest {
 
-    static final WifiSsid TEST_SSID_1 = WifiSsid.fromUtf8Text("Joe's Place");
-    static final WifiSsid TEST_SSID_2 = WifiSsid.fromUtf8Text("Poe's Ravn");
+    static final WifiSsid TEST_SSID_1 = WifiSsid.createFromAsciiEncoded("Joe's Place");
+    static final WifiSsid TEST_SSID_2 = WifiSsid.createFromAsciiEncoded("Poe's Ravn");
 
     static final MacAddress TEST_BSSID_1 = MacAddress.fromString("aa:bb:cc:dd:ee:ff");
     static final MacAddress TEST_BSSID_2 = MacAddress.fromString("1:2:3:4:5:6");
@@ -106,6 +105,7 @@
     @Mock Clock mClock;
     @Mock WifiScoreCard.MemoryStore mMemoryStore;
     @Mock DeviceConfigFacade mDeviceConfigFacade;
+    @Mock FrameworkFacade mFrameworkFacade;
     @Mock Context mContext;
     @Mock Resources mResources;
 
@@ -150,7 +150,7 @@
         mWifiInfo.setMaxSupportedRxLinkSpeedMbps(866);
         millisecondsPass(0);
         mWifiScoreCard = new WifiScoreCard(mClock, "some seed", mDeviceConfigFacade,
-                mContext);
+                mFrameworkFacade, mContext);
         mWifiScoreCard.mPersistentHistograms = true; // TODO - remove when ready
         when(mDeviceConfigFacade.getConnectionFailureHighThrPercent()).thenReturn(
                 DeviceConfigFacade.DEFAULT_CONNECTION_FAILURE_HIGH_THR_PERCENT);
@@ -197,6 +197,10 @@
         when(mDeviceConfigFacade.getBandwidthEstimatorLargeTimeConstantSec()).thenReturn(6);
         when(mDeviceConfigFacade.getTrafficStatsThresholdMaxKbyte()).thenReturn(4000);
         mWifiScoreCard.enableVerboseLogging(true);
+        when(mFrameworkFacade.getMobileRxBytes()).thenReturn(0L);
+        when(mFrameworkFacade.getMobileTxBytes()).thenReturn(0L);
+        when(mFrameworkFacade.getTotalRxBytes()).thenReturn(0L);
+        when(mFrameworkFacade.getTotalTxBytes()).thenReturn(0L);
         when(mContext.getResources()).thenReturn(mResources);
         when(mResources.getIntArray(R.array.config_wifiRssiLevelThresholds))
                 .thenReturn(new int[]{-88, -77, -66, -55});
@@ -600,7 +604,6 @@
         assertEquals(diag, 0, dailyStats.getCount(CNT_ASSOCIATION_REJECTION));
         assertEquals(diag, 0, dailyStats.getCount(CNT_ASSOCIATION_TIMEOUT));
         assertEquals(diag, 0, dailyStats.getCount(CNT_AUTHENTICATION_FAILURE));
-        assertEquals(diag, 0, dailyStats.getCount(CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE));
         List<Integer> frequencies = perNetwork.getFrequencies(Long.MAX_VALUE);
         assertEquals(diag, 2, frequencies.size());
         List<Integer> expectedFrequencies = new ArrayList<>(Arrays.asList(2432, 5805));
@@ -918,7 +921,6 @@
         assertEquals(1, dailyStats.getCount(CNT_ASSOCIATION_TIMEOUT));
         assertEquals(0, dailyStats.getCount(CNT_AUTHENTICATION_FAILURE));
         assertEquals(1, dailyStats.getCount(CNT_CONSECUTIVE_CONNECTION_FAILURE));
-        assertEquals(0, dailyStats.getCount(CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE));
     }
 
     /**
@@ -939,7 +941,6 @@
         assertEquals(0, dailyStats.getCount(CNT_ASSOCIATION_TIMEOUT));
         assertEquals(0, dailyStats.getCount(CNT_AUTHENTICATION_FAILURE));
         assertEquals(2, dailyStats.getCount(CNT_CONSECUTIVE_CONNECTION_FAILURE));
-        assertEquals(0, dailyStats.getCount(CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE));
     }
 
 
@@ -961,7 +962,6 @@
         assertEquals(0, dailyStats.getCount(CNT_ASSOCIATION_TIMEOUT));
         assertEquals(1, dailyStats.getCount(CNT_AUTHENTICATION_FAILURE));
         assertEquals(1, dailyStats.getCount(CNT_CONSECUTIVE_CONNECTION_FAILURE));
-        assertEquals(0, dailyStats.getCount(CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE));
 
         makeNormalConnectionExample();
         assertEquals(0, dailyStats.getCount(CNT_CONSECUTIVE_CONNECTION_FAILURE));
@@ -1002,11 +1002,9 @@
         assertEquals(0, dailyStats.getCount(CNT_ASSOCIATION_TIMEOUT));
         assertEquals(1, dailyStats.getCount(CNT_AUTHENTICATION_FAILURE));
         assertEquals(1, dailyStats.getCount(CNT_CONSECUTIVE_CONNECTION_FAILURE));
-        assertEquals(1, dailyStats.getCount(CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE));
 
         makeNormalConnectionExample();
         assertEquals(0, dailyStats.getCount(CNT_CONSECUTIVE_CONNECTION_FAILURE));
-        assertEquals(0, dailyStats.getCount(CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE));
     }
 
     private void makeDisconnectionConnectingExample(boolean nonlocal) {
@@ -1037,7 +1035,6 @@
         assertEquals(0, dailyStats.getCount(CNT_ASSOCIATION_REJECTION));
         assertEquals(0, dailyStats.getCount(CNT_ASSOCIATION_TIMEOUT));
         assertEquals(0, dailyStats.getCount(CNT_AUTHENTICATION_FAILURE));
-        assertEquals(0, dailyStats.getCount(CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE));
     }
 
     /**
@@ -1239,16 +1236,14 @@
         PerNetwork perNetwork = mWifiScoreCard.lookupNetwork(mWifiInfo.getSSID());
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR; i++) {
             addTotalBytes(txBytes, rxBytes);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
         }
         mWifiInfo.setFrequency(5210);
         txBytes = 5_000_000L;
         rxBytes = 1000L;
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR + 2; i++) {
             addTotalBytes(txBytes, rxBytes);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
         }
     }
 
@@ -1299,7 +1294,6 @@
         assertEquals(diag, 0, dailyStats.getCount(CNT_ASSOCIATION_REJECTION));
         assertEquals(diag, 0, dailyStats.getCount(CNT_ASSOCIATION_TIMEOUT));
         assertEquals(diag, 0, dailyStats.getCount(CNT_AUTHENTICATION_FAILURE));
-        assertEquals(diag, 0, dailyStats.getCount(CNT_CONSECUTIVE_WRONG_PASSWORD_FAILURE));
     }
 
     /**
@@ -1597,11 +1591,15 @@
     private void addTotalBytes(long txBytes, long rxBytes) {
         mTotalTxBytes += txBytes;
         mTotalRxBytes += rxBytes;
+        when(mFrameworkFacade.getTotalTxBytes()).thenReturn(mTotalTxBytes);
+        when(mFrameworkFacade.getTotalRxBytes()).thenReturn(mTotalRxBytes);
     }
 
     private void subtractTotalBytes(long txBytes, long rxBytes) {
         mTotalTxBytes -= txBytes;
         mTotalRxBytes -= rxBytes;
+        when(mFrameworkFacade.getTotalTxBytes()).thenReturn(mTotalTxBytes);
+        when(mFrameworkFacade.getTotalRxBytes()).thenReturn(mTotalRxBytes);
     }
 
     @Test
@@ -1626,8 +1624,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR - 1; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
         }
 
         assertEquals(10_000, perNetwork.getTxLinkBandwidthKbps());
@@ -1638,8 +1635,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR - 1; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
         }
 
         assertEquals(3_200, perNetwork.getTxLinkBandwidthKbps());
@@ -1661,8 +1657,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR - 2; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
         }
         // Add BANDWIDTH_STATS_COUNT_THR - 2 polls at BSSID 2 at 2nd level
         mWifiInfo.setBSSID(TEST_BSSID_2.toString());
@@ -1673,8 +1668,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR - 2; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
         }
 
         // Add BANDWIDTH_STATS_COUNT_THR - 2 polls at BSSID 2 at 3rd level
@@ -1683,8 +1677,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR - 2; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
         }
 
         assertEquals(23_619, perNetwork.getTxLinkBandwidthKbps());
@@ -1713,8 +1706,7 @@
                 addTotalBytes(txBytes, rxBytes);
             }
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
             perNetwork.updateBwMetrics(reportedKbps, l2Kbps);
         }
 
@@ -1743,8 +1735,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
             perNetwork.updateBwMetrics(reportedKbps, l2Kbps);
         }
         // Add BANDWIDTH_STATS_COUNT_THR polls at 2nd level and 1st band
@@ -1753,8 +1744,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
             perNetwork.updateBwMetrics(reportedKbps, l2Kbps);
         }
 
@@ -1766,8 +1756,7 @@
         for (int i = 0; i < (2 * BANDWIDTH_STATS_COUNT_THR); i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
             perNetwork.updateBwMetrics(reportedKbps, l2Kbps);
         }
 
@@ -1815,8 +1804,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR + 2; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
             perNetwork.updateBwMetrics(reportedKbps, l2Kbps);
         }
         // Report a larger on_time so that the calculated BW won't overflows at 2G
@@ -1825,8 +1813,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR + 2; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
             perNetwork.updateBwMetrics(reportedKbps, l2Kbps);
         }
 
@@ -1847,8 +1834,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR + 2; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
             perNetwork.updateBwMetrics(reportedKbps, l2Kbps);
         }
         stats = mWifiScoreCard.dumpBandwidthEstimatorStats();
@@ -1871,8 +1857,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR + 2; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
         }
         assertEquals(10_000, perNetwork.getTxLinkBandwidthKbps());
         assertEquals(10_000, perNetwork.getRxLinkBandwidthKbps());
@@ -1896,8 +1881,7 @@
         for (int i = 0; i < BANDWIDTH_STATS_COUNT_THR; i++) {
             addTotalBytes(txBytes, rxBytes);
             millisecondsPass(3_000);
-            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo, mTotalTxBytes,
-                    mTotalRxBytes);
+            perNetwork.updateLinkBandwidth(mOldLlStats, mNewLlStats, mWifiInfo);
         }
 
         // Expect cold-start value
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java
index 8352ed7..64f4c84 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiScoreReportTest.java
@@ -62,9 +62,6 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
 import org.mockito.ArgumentCaptor;
 import org.mockito.ArgumentMatcher;
 import org.mockito.Captor;
@@ -73,13 +70,10 @@
 import org.mockito.verification.VerificationMode;
 
 import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.List;
 
 /**
  * Unit tests for {@link com.android.server.wifi.WifiScoreReport}.
  */
-@RunWith(Parameterized.class)
 @SmallTest
 public class WifiScoreReportTest extends WifiBaseTest {
     class FakeClock extends Clock {
@@ -130,7 +124,6 @@
     @Mock WifiGlobals mWifiGlobals;
     @Mock ActiveModeWarden mActiveModeWarden;
     @Mock WifiConnectivityManager mWifiConnectivityManager;
-    @Mock WifiConfigManager mWifiConfigManager;
     @Captor ArgumentCaptor<WifiManager.ScoreUpdateObserver> mExternalScoreUpdateObserverCbCaptor;
     private TestLooper mLooper;
 
@@ -149,17 +142,6 @@
         }
     }
 
-    @Parameterized.Parameter(0)
-    public boolean mIsPrimary;
-
-    @Parameters(name = "{0}")
-    public static List<Boolean> isPrimaryValueList() {
-        if (SdkLevel.isAtLeastT()) {
-            return Arrays.asList(true, false);
-        }
-        return Arrays.asList(true);
-    }
-
     /**
      * Sets up resource values for testing
      *
@@ -223,7 +205,7 @@
         mLooper = new TestLooper();
         when(mActiveModeWarden.canRequestSecondaryTransientClientModeManager()).thenReturn(true);
         when(mWifiGlobals.getWifiLowConnectedScoreThresholdToTriggerScanForMbb()).thenReturn(
-                getTransitionScore());
+                ConnectedScore.WIFI_TRANSITION_SCORE);
         when(mWifiGlobals.getWifiLowConnectedScoreScanPeriodSeconds()).thenReturn(
                 TEST_LOW_CONNECTED_SCORE_SCAN_PERIOD_SECONDS);
         when(mContext.getResources()).thenReturn(mResources);
@@ -243,9 +225,8 @@
                 mDeviceConfigFacade, mContext,
                 mAdaptiveConnectivityEnabledSettingObserver, TEST_IFACE_NAME,
                 mExternalScoreUpdateObserverProxy, mWifiSettingsStore,
-                mWifiGlobals, mActiveModeWarden, mWifiConnectivityManager, mWifiConfigManager);
-        mWifiScoreReport.onRoleChanged(mIsPrimary ? ActiveModeManager.ROLE_CLIENT_PRIMARY
-                : ActiveModeManager.ROLE_CLIENT_SECONDARY_LONG_LIVED);
+                mWifiGlobals, mActiveModeWarden, mWifiConnectivityManager);
+        mWifiScoreReport.onRoleChanged(ActiveModeManager.ROLE_CLIENT_PRIMARY);
         mWifiScoreReport.setNetworkAgent(mNetworkAgent);
         when(mDeviceConfigFacade.getMinConfirmationDurationSendLowScoreMs()).thenReturn(
                 DeviceConfigFacade.DEFAULT_MIN_CONFIRMATION_DURATION_SEND_LOW_SCORE_MS);
@@ -308,16 +289,6 @@
         verifySentAnyNetworkScore(times(1));
     }
 
-    private int getTransitionScore() {
-        return mIsPrimary ? ConnectedScore.WIFI_TRANSITION_SCORE
-                : ConnectedScore.WIFI_SECONDARY_TRANSITION_SCORE;
-    }
-
-    private int getMaxScore() {
-        return mIsPrimary ? ConnectedScore.WIFI_MAX_SCORE
-                : ConnectedScore.WIFI_SECONDARY_MAX_SCORE;
-    }
-
     /**
      * Test for score reporting
      *
@@ -516,7 +487,6 @@
      */
     @Test
     public void allowLowRssiIfDataIsMoving() throws Exception {
-        assumeTrue(mIsPrimary);
         mWifiInfo.setRssi(-80);
         mWifiInfo.setLinkSpeed(6); // Mbps
         mWifiInfo.setSuccessfulTxPacketsPerSecond(5.1); // proportional to pps
@@ -525,7 +495,7 @@
             mWifiScoreReport.calculateAndReportScore();
         }
         int score = mWifiInfo.getScore();
-        assertTrue(score > getTransitionScore());
+        assertTrue(score > ConnectedScore.WIFI_TRANSITION_SCORE);
         verify(mWifiConnectivityManager, never()).forceConnectivityScan(any());
     }
 
@@ -552,14 +522,14 @@
             mWifiScoreReport.calculateAndReportScore();
         }
         int score = mWifiInfo.getScore();
-        assertTrue(score < getTransitionScore());
+        assertTrue(score < ConnectedScore.WIFI_TRANSITION_SCORE);
         if (SdkLevel.isAtLeastS()) {
             ArgumentCaptor<NetworkScore> scoreCaptor = ArgumentCaptor.forClass(NetworkScore.class);
             verify(mNetworkAgent, times(2)).sendNetworkScore(scoreCaptor.capture());
             NetworkScore ns = scoreCaptor.getValue();
             assertEquals(score, ns.getLegacyInt());
             assertTrue(ns.isExiting());
-            if (mIsPrimary) assertTrue(ns.isTransportPrimary());
+            assertTrue(ns.isTransportPrimary());
         } else {
             verify(mNetworkAgent).sendNetworkScore(score);
         }
@@ -581,7 +551,7 @@
             mWifiScoreReport.calculateAndReportScore();
         }
         assertTrue("wifi score should be high",
-                mWifiInfo.getScore() >= getTransitionScore());
+                mWifiInfo.getScore() >= ConnectedScore.WIFI_TRANSITION_SCORE);
         verify(mWifiConnectivityManager, never()).forceConnectivityScan(any());
 
         // Then simulate low RSSI and traffic, and verify score becomes low and a scan is triggered.
@@ -590,7 +560,7 @@
             mWifiScoreReport.calculateAndReportScore();
         }
         assertTrue("wifi score should be low",
-                mWifiInfo.getScore() < getTransitionScore());
+                mWifiInfo.getScore() < ConnectedScore.WIFI_TRANSITION_SCORE);
         verify(mWifiConnectivityManager).forceConnectivityScan(WIFI_WORK_SOURCE);
 
         // move time forward slightly, not passing enough time to do another scan.
@@ -621,13 +591,13 @@
             mWifiScoreReport.calculateAndReportScore();
         }
         int score = mWifiInfo.getScore();
-        assertTrue(score < getTransitionScore());
+        assertTrue(score < ConnectedScore.WIFI_TRANSITION_SCORE);
         verify(mWifiConnectivityManager, never()).forceConnectivityScan(any());
 
         // when the external score is cleared, scan should be triggered.
         mWifiScoreReport.clearWifiConnectedNetworkScorer();
         mWifiScoreReport.calculateAndReportScore();
-        assertTrue(score < getTransitionScore());
+        assertTrue(score < ConnectedScore.WIFI_TRANSITION_SCORE);
         verify(mWifiConnectivityManager).forceConnectivityScan(any());
         verify(mWifiGlobals).setUsingExternalScorer(false);
     }
@@ -647,7 +617,7 @@
         }
         int score = mWifiInfo.getScore();
         verifySentNetworkScore(score);
-        assertTrue(oops, score < getTransitionScore());
+        assertTrue(oops, score < ConnectedScore.WIFI_TRANSITION_SCORE);
     }
 
     /**
@@ -657,7 +627,6 @@
      */
     @Test
     public void stayOnIfRssiDoesNotGetBelowEntryThreshold() throws Exception {
-        assumeTrue(mIsPrimary);
         String oops = "didNotStickLanding";
         int minScore = 100;
         mWifiInfo.setLinkSpeed(6); // Mbps
@@ -674,7 +643,7 @@
             oops += ":" + mWifiInfo.getScore();
             if (mWifiInfo.getScore() < minScore) minScore = mWifiInfo.getScore();
         }
-        assertTrue(oops, minScore > getTransitionScore());
+        assertTrue(oops, minScore > ConnectedScore.WIFI_TRANSITION_SCORE);
     }
 
     /**
@@ -686,7 +655,6 @@
      */
     @Test
     public void allowTerribleRssiIfDataIsMovingWell() throws Exception {
-        assumeTrue(mIsPrimary);
         mWifiInfo.setSuccessfulTxPacketsPerSecond(
                 mScoringParams.getYippeeSkippyPacketsPerSecond() + 0.1);
         mWifiInfo.setSuccessfulRxPacketsPerSecond(
@@ -696,19 +664,19 @@
         for (int r = -30; r >= -120; r -= 2) {
             mWifiInfo.setRssi(r);
             mWifiScoreReport.calculateAndReportScore();
-            assertTrue(mWifiInfo.getScore() > getTransitionScore());
+            assertTrue(mWifiInfo.getScore() > ConnectedScore.WIFI_TRANSITION_SCORE);
         }
         // If the throughput dips, we should let go
         mWifiInfo.setSuccessfulRxPacketsPerSecond(
                 mScoringParams.getYippeeSkippyPacketsPerSecond() - 0.1);
         mWifiScoreReport.calculateAndReportScore();
-        assertTrue(mWifiInfo.getScore() < getTransitionScore());
+        assertTrue(mWifiInfo.getScore() < ConnectedScore.WIFI_TRANSITION_SCORE);
         // And even if throughput improves again, once we have decided to let go, disregard
         // the good rates.
         mWifiInfo.setSuccessfulRxPacketsPerSecond(
                 mScoringParams.getYippeeSkippyPacketsPerSecond() + 0.1);
         mWifiScoreReport.calculateAndReportScore();
-        assertTrue(mWifiInfo.getScore() < getTransitionScore());
+        assertTrue(mWifiInfo.getScore() < ConnectedScore.WIFI_TRANSITION_SCORE);
     }
 
     /**
@@ -731,7 +699,6 @@
      */
     @Test
     public void eventuallyAskForNudCheckWhenNudKnobIsOne() throws Exception {
-        assumeTrue(mIsPrimary);
         String oops = "nud=1";
         long lastAskedMillis = 0; // Check that we don't send too soon
         int asks = 0; // Keep track of how many time we asked
@@ -743,7 +710,7 @@
             mWifiScoreReport.calculateAndReportScore();
             boolean ask = mWifiScoreReport.shouldCheckIpLayer();
             if (ask) {
-                assertTrue(mWifiInfo.getScore() < getTransitionScore());
+                assertTrue(mWifiInfo.getScore() < ConnectedScore.WIFI_TRANSITION_SCORE);
                 assertTrue(oops, mClock.mWallClockMillis >= lastAskedMillis + 5000);
                 lastAskedMillis = mClock.mWallClockMillis;
                 oops += " " + lastAskedMillis + ":" + mWifiInfo.getScore();
@@ -760,7 +727,6 @@
      */
     @Test
     public void askForMoreNudChecksWhenNudKnobIsBigger() throws Exception {
-        assumeTrue(mIsPrimary);
         String oops = "nud=10";
         long lastAskedMillis = 0; // Check that we don't send too soon
         int asks = 0; // Keep track of how many time we asked
@@ -772,9 +738,7 @@
             mWifiScoreReport.calculateAndReportScore();
             boolean ask = mWifiScoreReport.shouldCheckIpLayer();
             if (ask) {
-                assertTrue("rssi " + rssi + " score " + mWifiInfo.getScore()
-                        + " higher than " + getTransitionScore(),
-                        mWifiInfo.getScore() < getTransitionScore());
+                assertTrue(mWifiInfo.getScore() < ConnectedScore.WIFI_TRANSITION_SCORE);
                 assertTrue(oops, mClock.mWallClockMillis >= lastAskedMillis + 5000);
                 lastAskedMillis = mClock.mWallClockMillis;
                 oops += " " + lastAskedMillis + ":" + mWifiInfo.getScore();
@@ -863,7 +827,7 @@
             mWifiInfo.setRssi(rssi);
             mWifiScoreReport.calculateAndReportScore();
         }
-        assertTrue(mWifiInfo.getScore() < getTransitionScore());
+        assertTrue(mWifiInfo.getScore() < ConnectedScore.WIFI_TRANSITION_SCORE);
 
         // Then, set high RSSI value to exceed the transition score
         mWifiInfo.setRssi(-50);
@@ -871,11 +835,11 @@
         for (int i = 0; i < 8; i++) {
             mWifiScoreReport.calculateAndReportScore();
         }
-        assertTrue(mWifiInfo.getScore() < getTransitionScore());
+        assertTrue(mWifiInfo.getScore() < ConnectedScore.WIFI_TRANSITION_SCORE);
 
         // 9 seconds elapse
         mWifiScoreReport.calculateAndReportScore();
-        assertTrue(mWifiInfo.getScore() > getTransitionScore());
+        assertTrue(mWifiInfo.getScore() > ConnectedScore.WIFI_TRANSITION_SCORE);
     }
 
     /**
@@ -892,14 +856,14 @@
             mWifiInfo.setRssi(rssi);
             mWifiScoreReport.calculateAndReportScore();
         }
-        assertTrue(mWifiInfo.getScore() < getTransitionScore());
+        assertTrue(mWifiInfo.getScore() < ConnectedScore.WIFI_TRANSITION_SCORE);
 
         // Then, set high RSSI value to exceed the transition score
         mWifiInfo.setRssi(-50);
         // Reset the internal timer so that no need to wait for 9 seconds
         mWifiScoreReport.reset();
         mWifiScoreReport.calculateAndReportScore();
-        assertTrue(mWifiInfo.getScore() > getTransitionScore());
+        assertTrue(mWifiInfo.getScore() > ConnectedScore.WIFI_TRANSITION_SCORE);
     }
 
     /**
@@ -1059,11 +1023,11 @@
         mExternalScoreUpdateObserverCbCaptor.getValue().notifyScoreUpdate(-1, 49);
         if (SdkLevel.isAtLeastS()) {
             NetworkScore score = mWifiScoreReport.getScore();
-            assertEquals(getMaxScore(), score.getLegacyInt());
-            if (mIsPrimary) assertTrue(score.isTransportPrimary());
+            assertEquals(ConnectedScore.WIFI_MAX_SCORE, score.getLegacyInt());
+            assertTrue(score.isTransportPrimary());
             assertFalse(score.isExiting());
         } else {
-            assertEquals(getMaxScore(), mWifiScoreReport.getLegacyIntScore());
+            assertEquals(ConnectedScore.WIFI_MAX_SCORE, mWifiScoreReport.getLegacyIntScore());
         }
 
         // Incorrect session ID
@@ -1071,11 +1035,11 @@
                 scorerImpl.mSessionId + 10, 49);
         if (SdkLevel.isAtLeastS()) {
             NetworkScore score = mWifiScoreReport.getScore();
-            assertEquals(getMaxScore(), score.getLegacyInt());
-            if (mIsPrimary) assertTrue(score.isTransportPrimary());
+            assertEquals(ConnectedScore.WIFI_MAX_SCORE, score.getLegacyInt());
+            assertTrue(score.isTransportPrimary());
             assertFalse(score.isExiting());
         } else {
-            assertEquals(getMaxScore(), mWifiScoreReport.getLegacyIntScore());
+            assertEquals(ConnectedScore.WIFI_MAX_SCORE, mWifiScoreReport.getLegacyIntScore());
         }
 
         mExternalScoreUpdateObserverCbCaptor.getValue().notifyScoreUpdate(
@@ -1085,7 +1049,7 @@
         if (SdkLevel.isAtLeastS()) {
             NetworkScore score = mWifiScoreReport.getScore();
             assertEquals(score.getLegacyInt(), 49);
-            if (mIsPrimary) assertTrue(score.isTransportPrimary());
+            assertTrue(score.isTransportPrimary());
             assertTrue(score.isExiting());
         } else {
             assertEquals(49, mWifiScoreReport.getLegacyIntScore());
@@ -1098,7 +1062,7 @@
         if (SdkLevel.isAtLeastS()) {
             NetworkScore score = mWifiScoreReport.getScore();
             assertEquals(score.getLegacyInt(), 59);
-            if (mIsPrimary) assertTrue(score.isTransportPrimary());
+            assertTrue(score.isTransportPrimary());
             assertFalse(score.isExiting());
         } else {
             assertEquals(59, mWifiScoreReport.getLegacyIntScore());
@@ -1259,9 +1223,9 @@
     @Test
     public void testOnStartInitialScoreInWifiInfoIsMaxScore() throws Exception {
         when(mNetwork.getNetId()).thenReturn(TEST_NETWORK_ID);
-        mWifiScoreReport.setWifiConnectedNetworkScorer(mAppBinder, mWifiConnectedNetworkScorer);
         mWifiScoreReport.startConnectedNetworkScorer(TEST_NETWORK_ID, TEST_USER_SELECTED);
-        assertEquals(getMaxScore(), mWifiInfo.getScore());
+        mWifiScoreReport.setWifiConnectedNetworkScorer(mAppBinder, mWifiConnectedNetworkScorer);
+        assertEquals(ConnectedScore.WIFI_MAX_SCORE, mWifiInfo.getScore());
     }
 
     /**
@@ -1480,7 +1444,7 @@
             NetworkScore ns = scoreCaptor.getValue();
             assertEquals(51, ns.getLegacyInt());
             assertFalse(ns.isExiting());
-            if (mIsPrimary) assertTrue(ns.isTransportPrimary());
+            assertTrue(ns.isTransportPrimary());
         } else {
             verify(mNetworkAgent).sendNetworkScore(51);
         }
@@ -1506,7 +1470,7 @@
             NetworkScore ns = scoreCaptor.getValue();
             assertEquals(51, ns.getLegacyInt());
             assertFalse(ns.isExiting());
-            if (mIsPrimary) assertTrue(ns.isTransportPrimary());
+            assertTrue(ns.isTransportPrimary());
         } else {
             verify(mNetworkAgent).sendNetworkScore(51);
         }
@@ -1629,7 +1593,7 @@
             NetworkScore ns = scoreCaptor.getValue();
             assertEquals(60, ns.getLegacyInt());
             assertFalse(ns.isExiting());
-            if (mIsPrimary) assertTrue(ns.isTransportPrimary());
+            assertTrue(ns.isTransportPrimary());
         }
 
         mExternalScoreUpdateObserverCbCaptor.getValue().notifyStatusUpdate(
@@ -1643,7 +1607,7 @@
             NetworkScore ns = scoreCaptor.getValue();
             assertEquals(60, ns.getLegacyInt());
             assertTrue(ns.isExiting());
-            if (mIsPrimary) assertTrue(ns.isTransportPrimary());
+            assertTrue(ns.isTransportPrimary());
         }
     }
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
index 097c1a4..f437a7b 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiServiceImplTest.java
@@ -23,13 +23,11 @@
 import static android.net.wifi.WifiAvailableChannel.FILTER_REGULATORY;
 import static android.net.wifi.WifiAvailableChannel.OP_MODE_STA;
 import static android.net.wifi.WifiConfiguration.METERED_OVERRIDE_METERED;
-import static android.net.wifi.WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT;
 import static android.net.wifi.WifiManager.COEX_RESTRICTION_SOFTAP;
 import static android.net.wifi.WifiManager.COEX_RESTRICTION_WIFI_AWARE;
 import static android.net.wifi.WifiManager.COEX_RESTRICTION_WIFI_DIRECT;
 import static android.net.wifi.WifiManager.DEVICE_MOBILITY_STATE_STATIONARY;
 import static android.net.wifi.WifiManager.EASY_CONNECT_CRYPTOGRAPHY_CURVE_PRIME256V1;
-import static android.net.wifi.WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE;
 import static android.net.wifi.WifiManager.IFACE_IP_MODE_CONFIGURATION_ERROR;
 import static android.net.wifi.WifiManager.IFACE_IP_MODE_LOCAL_ONLY;
 import static android.net.wifi.WifiManager.IFACE_IP_MODE_TETHERED;
@@ -52,7 +50,6 @@
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_LOCAL_ONLY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_PRIMARY;
 import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_LONG_LIVED;
-import static com.android.server.wifi.ActiveModeManager.ROLE_CLIENT_SECONDARY_TRANSIENT;
 import static com.android.server.wifi.LocalOnlyHotspotRequestInfo.HOTSPOT_NO_ERROR;
 import static com.android.server.wifi.SelfRecovery.REASON_API_CALL;
 import static com.android.server.wifi.WifiConfigurationTestUtil.SECURITY_NONE;
@@ -65,13 +62,11 @@
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThrows;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.junit.Assume.assumeTrue;
 import static org.mockito.AdditionalAnswers.returnsSecondArg;
 import static org.mockito.AdditionalMatchers.aryEq;
-import static org.mockito.ArgumentMatchers.anySet;
 import static org.mockito.ArgumentMatchers.notNull;
 import static org.mockito.ArgumentMatchers.nullable;
 import static org.mockito.Matchers.any;
@@ -104,11 +99,8 @@
 import android.Manifest;
 import android.app.ActivityManager;
 import android.app.AppOpsManager;
-import android.app.admin.DevicePolicyManager;
-import android.app.admin.WifiSsidPolicy;
 import android.app.test.MockAnswerUtil.AnswerWithArguments;
 import android.bluetooth.BluetoothAdapter;
-import android.content.AttributionSource;
 import android.content.BroadcastReceiver;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -119,24 +111,18 @@
 import android.content.pm.PackageManager;
 import android.content.res.Resources;
 import android.net.DhcpInfo;
-import android.net.DhcpOption;
 import android.net.DhcpResultsParcelable;
 import android.net.MacAddress;
 import android.net.NetworkStack;
 import android.net.Uri;
 import android.net.wifi.CoexUnsafeChannel;
 import android.net.wifi.IActionListener;
-import android.net.wifi.IBooleanListener;
 import android.net.wifi.ICoexCallback;
 import android.net.wifi.IDppCallback;
-import android.net.wifi.IInterfaceCreationInfoCallback;
-import android.net.wifi.ILastCallerListener;
 import android.net.wifi.ILocalOnlyHotspotCallback;
 import android.net.wifi.INetworkRequestMatchCallback;
 import android.net.wifi.IOnWifiActivityEnergyInfoListener;
-import android.net.wifi.IOnWifiDriverCountryCodeChangedListener;
 import android.net.wifi.IOnWifiUsabilityStatsListener;
-import android.net.wifi.IPnoScanResultsCallback;
 import android.net.wifi.IScanResultsCallback;
 import android.net.wifi.ISoftApCallback;
 import android.net.wifi.ISubsystemRestartCallback;
@@ -147,14 +133,11 @@
 import android.net.wifi.IWifiVerboseLoggingStatusChangedListener;
 import android.net.wifi.ScanResult;
 import android.net.wifi.SecurityParams;
-import android.net.wifi.SoftApCapability;
 import android.net.wifi.SoftApConfiguration;
 import android.net.wifi.SoftApInfo;
-import android.net.wifi.WifiAvailableChannel;
 import android.net.wifi.WifiClient;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiConfiguration.KeyMgmt;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
@@ -169,14 +152,12 @@
 import android.net.wifi.hotspot2.pps.HomeSp;
 import android.os.Binder;
 import android.os.Build;
-import android.os.Bundle;
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.IBinder;
 import android.os.IPowerManager;
 import android.os.IThermalService;
 import android.os.Parcel;
-import android.os.ParcelFileDescriptor;
 import android.os.PowerManager;
 import android.os.Process;
 import android.os.RemoteException;
@@ -189,7 +170,6 @@
 import android.telephony.PhoneStateListener;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
-import android.util.Pair;
 
 import androidx.test.filters.SmallTest;
 
@@ -257,7 +237,6 @@
     private static final String WIFI_IFACE_NAME = "wlan0";
     private static final String WIFI_IFACE_NAME2 = "wlan1";
     private static final String TEST_COUNTRY_CODE = "US";
-    private static final String TEST_NEW_COUNTRY_CODE = "TW";
     private static final String TEST_FACTORY_MAC = "10:22:34:56:78:92";
     private static final MacAddress TEST_FACTORY_MAC_ADDR = MacAddress.fromString(TEST_FACTORY_MAC);
     private static final String TEST_FQDN = "testfqdn";
@@ -292,7 +271,6 @@
     private static final int TEST_NETWORK_ID = 567;
     private static final WorkSource TEST_SETTINGS_WORKSOURCE = new WorkSource();
     private static final int TEST_SUB_ID = 1;
-    private static final byte[] TEST_OUI = new byte[]{0x01, 0x02, 0x03};
 
     private SoftApInfo mTestSoftApInfo;
     private List<SoftApInfo> mTestSoftApInfoList;
@@ -311,8 +289,6 @@
     private String mLohsInterfaceName;
     private ApplicationInfo mApplicationInfo;
     private List<ClientModeManager> mClientModeManagers;
-    private Bundle mExtras = new Bundle();
-    private Bundle mAttribution = new Bundle();
     private static final String DPP_URI = "DPP:some_dpp_uri";
     private static final String DPP_PRODUCT_INFO = "DPP:some_dpp_uri_info";
 
@@ -322,7 +298,6 @@
     final ArgumentCaptor<SoftApModeConfiguration> mSoftApModeConfigCaptor =
             ArgumentCaptor.forClass(SoftApModeConfiguration.class);
 
-    @Mock Bundle mBundle;
     @Mock WifiContext mContext;
     @Mock Context mContextAsUser;
     @Mock WifiInjector mWifiInjector;
@@ -368,7 +343,6 @@
     @Mock CoexManager mCoexManager;
     @Mock IOnWifiUsabilityStatsListener mOnWifiUsabilityStatsListener;
     @Mock WifiConfigManager mWifiConfigManager;
-    @Mock WifiBlocklistMonitor mWifiBlocklistMonitor;
     @Mock WifiScoreCard mWifiScoreCard;
     @Mock WifiHealthMonitor mWifiHealthMonitor;
     @Mock PasspointManager mPasspointManager;
@@ -392,9 +366,6 @@
     @Mock WifiNetworkFactory mWifiNetworkFactory;
     @Mock UntrustedWifiNetworkFactory mUntrustedWifiNetworkFactory;
     @Mock OemWifiNetworkFactory mOemWifiNetworkFactory;
-    @Mock RestrictedWifiNetworkFactory mRestrictedWifiNetworkFactory;
-    @Mock MultiInternetManager mMultiInternetManager;
-    @Mock MultiInternetWifiNetworkFactory mMultiInternetWifiNetworkFactory;
     @Mock WifiDiagnostics mWifiDiagnostics;
     @Mock WifiP2pConnection mWifiP2pConnection;
     @Mock SimRequiredNotifier mSimRequiredNotifier;
@@ -409,15 +380,9 @@
     @Mock LastCallerInfoManager mLastCallerInfoManager;
     @Mock BuildProperties mBuildProperties;
     @Mock LinkProbeManager mLinkProbeManager;
-    @Mock IOnWifiDriverCountryCodeChangedListener mIOnWifiDriverCountryCodeChangedListener;
-    @Mock WifiShellCommand mWifiShellCommand;
-    @Mock DevicePolicyManager mDevicePolicyManager;
-    @Mock HalDeviceManager mHalDeviceManager;
-    @Mock WifiDialogManager mWifiDialogManager;
 
     @Captor ArgumentCaptor<Intent> mIntentCaptor;
-
-    private MockitoSession mSession;
+    @Captor ArgumentCaptor<Runnable> mOnStoppedListenerCaptor;
 
     WifiConfiguration mWifiConfig;
 
@@ -425,10 +390,6 @@
 
     @Before public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
-        mSession = mockitoSession()
-                .mockStatic(SubscriptionManager.class)
-                .startMocking();
-
         mLog = spy(new LogcatLog(TAG));
         mLooper = new TestLooper();
         mApplicationInfo = new ApplicationInfo();
@@ -446,11 +407,6 @@
         when(mWifiInjector.getUntrustedWifiNetworkFactory())
                 .thenReturn(mUntrustedWifiNetworkFactory);
         when(mWifiInjector.getOemWifiNetworkFactory()).thenReturn(mOemWifiNetworkFactory);
-        when(mWifiInjector.getRestrictedWifiNetworkFactory())
-                .thenReturn(mRestrictedWifiNetworkFactory);
-        when(mWifiInjector.getMultiInternetWifiNetworkFactory())
-                .thenReturn(mMultiInternetWifiNetworkFactory);
-        when(mWifiInjector.getMultiInternetManager()).thenReturn(mMultiInternetManager);
         when(mWifiInjector.getWifiDiagnostics()).thenReturn(mWifiDiagnostics);
         when(mWifiInjector.getActiveModeWarden()).thenReturn(mActiveModeWarden);
         when(mWifiInjector.getWifiHandlerThread()).thenReturn(mHandlerThread);
@@ -458,7 +414,6 @@
         when(mWifiInjector.getWifiNotificationManager()).thenReturn(mWifiNotificationManager);
         when(mWifiInjector.getBuildProperties()).thenReturn(mBuildProperties);
         when(mWifiInjector.getLinkProbeManager()).thenReturn(mLinkProbeManager);
-        when(mWifiInjector.makeWifiShellCommand(any())).thenReturn(mWifiShellCommand);
         when(mHandlerThread.getThreadHandler()).thenReturn(new Handler(mLooper.getLooper()));
         when(mHandlerThread.getLooper()).thenReturn(mLooper.getLooper());
         when(mContext.getResources()).thenReturn(mResources);
@@ -471,7 +426,7 @@
         doNothing().when(mFrameworkFacade).registerContentObserver(eq(mContext), any(),
                 anyBoolean(), any());
         when(mFrameworkFacade.getSettingsWorkSource(any())).thenReturn(TEST_SETTINGS_WORKSOURCE);
-        when(mContext.getSystemService(ActivityManager.class)).thenReturn(mActivityManager);
+        when(mContext.getSystemService(Context.ACTIVITY_SERVICE)).thenReturn(mActivityManager);
         when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager);
         IPowerManager powerManagerService = mock(IPowerManager.class);
         IThermalService thermalService = mock(IThermalService.class);
@@ -501,12 +456,13 @@
         when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager);
         when(mWifiInjector.getCoexManager()).thenReturn(mCoexManager);
         when(mWifiInjector.getWifiConfigManager()).thenReturn(mWifiConfigManager);
-        when(mWifiInjector.getWifiBlocklistMonitor()).thenReturn(mWifiBlocklistMonitor);
         when(mWifiInjector.getPasspointManager()).thenReturn(mPasspointManager);
         when(mActiveModeWarden.getPrimaryClientModeManager()).thenReturn(mClientModeManager);
         when(mClientModeManager.getInterfaceName()).thenReturn(WIFI_IFACE_NAME);
         when(mWifiInjector.getWifiScoreCard()).thenReturn(mWifiScoreCard);
         when(mWifiInjector.getWifiHealthMonitor()).thenReturn(mWifiHealthMonitor);
+        when(mWifiInjector.getWifiNetworkScoreCache())
+                .thenReturn(mock(WifiNetworkScoreCache.class));
 
         mWifiThreadRunner = new WifiThreadRunner(new Handler(mLooper.getLooper()));
         mWifiThreadRunner.setTimeoutsAreErrors(true);
@@ -547,24 +503,15 @@
                 .thenReturn(Collections.emptyList());
         when(mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(anyInt()))
                 .thenReturn(true);
-        // Defaulting apps to target SDK level that's prior to T. This is need for to test for
-        // backward compatibility of API changes.
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(true);
         when(mWifiInjector.getWifiCarrierInfoManager()).thenReturn(mWifiCarrierInfoManager);
         when(mWifiInjector.getOpenNetworkNotifier()).thenReturn(mOpenNetworkNotifier);
         when(mClientSoftApCallback.asBinder()).thenReturn(mAppBinder);
         when(mAnotherSoftApCallback.asBinder()).thenReturn(mAnotherAppBinder);
-        when(mIOnWifiDriverCountryCodeChangedListener.asBinder()).thenReturn(mAppBinder);
         when(mWifiInjector.getSarManager()).thenReturn(mSarManager);
         mClientModeManagers = Arrays.asList(mClientModeManager, mock(ClientModeManager.class));
         when(mActiveModeWarden.getClientModeManagers()).thenReturn(mClientModeManagers);
         when(mWifiInjector.getSelfRecovery()).thenReturn(mSelfRecovery);
         when(mWifiInjector.getLastCallerInfoManager()).thenReturn(mLastCallerInfoManager);
-        when(mUserManager.getUserRestrictions()).thenReturn(mBundle);
-        when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager);
-        when(mWifiInjector.getHalDeviceManager()).thenReturn(mHalDeviceManager);
-        when(mWifiInjector.getWifiDialogManager()).thenReturn(mWifiDialogManager);
 
         doAnswer(new AnswerWithArguments() {
             public void answer(Runnable onStoppedListener) throws Throwable {
@@ -637,9 +584,6 @@
     @After
     public void cleanup() {
         validateMockitoUsage();
-        if (mSession != null) {
-            mSession.finishMocking();
-        }
     }
 
     private void stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(TestLooper looper) {
@@ -703,12 +647,11 @@
      */
     @Test
     public void testWifiMetricsDump() {
-        mWifiServiceImpl.checkAndStartWifi();
-        mLooper.dispatchAll();
+        mLooper.startAutoDispatch();
         mWifiServiceImpl.dump(new FileDescriptor(), new PrintWriter(new StringWriter()),
                 new String[]{mWifiMetrics.PROTO_DUMP_ARG});
-        mLooper.dispatchAll();
-        verify(mWifiMetrics).setNonPersistentMacRandomizationForceEnabled(anyBoolean());
+        mLooper.stopAutoDispatchAndIgnoreExceptions();
+        verify(mWifiMetrics).setEnhancedMacRandomizationForceEnabled(anyBoolean());
         verify(mWifiMetrics).setIsScanningAlwaysEnabled(anyBoolean());
         verify(mWifiMetrics).setVerboseLoggingEnabled(anyBoolean());
         verify(mWifiMetrics)
@@ -722,33 +665,15 @@
      */
     @Test
     public void testDumpNullArgs() {
-        mWifiServiceImpl.checkAndStartWifi();
-        mLooper.dispatchAll();
+        mLooper.startAutoDispatch();
         mWifiServiceImpl.dump(new FileDescriptor(), new PrintWriter(new StringWriter()), null);
-        mLooper.dispatchAll();
+        mLooper.stopAutoDispatchAndIgnoreExceptions();
+
         verify(mWifiDiagnostics).captureBugReportData(
                 WifiDiagnostics.REPORT_REASON_USER_ACTION);
         verify(mWifiDiagnostics).dump(any(), any(), any());
     }
 
-    @Test
-    public void testWifiShellCommandIgnoredBeforeBoot() {
-        // needed to mock this to call "handleBootCompleted"
-        when(mWifiInjector.getPasspointProvisionerHandlerThread())
-                .thenReturn(mock(HandlerThread.class));
-
-        // verify shell command can't be called before boot complete
-        ParcelFileDescriptor mockDescriptor = mock(ParcelFileDescriptor.class);
-        assertEquals(-1, mWifiServiceImpl.handleShellCommand(mockDescriptor,
-                mockDescriptor, mockDescriptor, new String[0]));
-
-        // verify shell command can now be called after boot complete
-        mWifiServiceImpl.handleBootCompleted();
-        mLooper.dispatchAll();
-        assertEquals(0, mWifiServiceImpl.handleShellCommand(mockDescriptor,
-                mockDescriptor, mockDescriptor, new String[0]));
-    }
-
     /**
      * Verify that metrics is incremented correctly for Privileged Apps.
      */
@@ -765,13 +690,12 @@
         mLooper.dispatchAll();
         assertTrue(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, false));
         mLooper.dispatchAll();
-        verify(mWifiConnectivityManager).setAutoJoinEnabledExternal(true);
         inorder.verify(mWifiMetrics).logUserActionEvent(UserActionEvent.EVENT_TOGGLE_WIFI_ON);
         inorder.verify(mWifiMetrics).incrementNumWifiToggles(eq(true), eq(true));
         inorder.verify(mWifiMetrics).logUserActionEvent(eq(UserActionEvent.EVENT_TOGGLE_WIFI_OFF),
                 anyInt());
         inorder.verify(mWifiMetrics).incrementNumWifiToggles(eq(true), eq(false));
-        verify(mLastCallerInfoManager).put(eq(WifiManager.API_WIFI_ENABLED), anyInt(),
+        verify(mLastCallerInfoManager).put(eq(LastCallerInfoManager.WIFI_ENABLED), anyInt(),
                 anyInt(), anyInt(), anyString(), eq(false));
     }
 
@@ -987,240 +911,6 @@
     }
 
     /**
-     * Verify that a user (NETWORK_SETTINGS) cannot enable wifi if DISALLOW_CHANGE_WIFI_STATE
-     * user restriction is set.
-     */
-    @Test
-    public void testSetWifiEnabledFromUserFailsWhenUserRestrictionSet() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-
-        when(mSettingsStore.handleWifiToggled(eq(true))).thenReturn(true);
-        when(mSettingsStore.isAirplaneModeOn()).thenReturn(false);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_CHANGE_WIFI_STATE),
-                any())).thenReturn(true);
-
-        assertFalse(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        verify(mActiveModeWarden, never()).wifiToggled(any());
-    }
-
-    /**
-     * Verify that apps targeting pre-Q SDK cannot enable wifi if DISALLOW_CHANGE_WIFI_STATE
-     * user restriction is set.
-     */
-    @Test
-    public void testSetWifiEnabledFromAppTargetingBelowQSdkFailsWhenUserRestrictionSet()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.Q), anyInt())).thenReturn(true);
-
-        when(mSettingsStore.handleWifiToggled(eq(true))).thenReturn(true);
-        when(mSettingsStore.isAirplaneModeOn()).thenReturn(false);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_CHANGE_WIFI_STATE),
-                any())).thenReturn(true);
-
-        assertFalse(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        verify(mActiveModeWarden, never()).wifiToggled(any());
-    }
-
-    /**
-     * Verify that wifi can be enabled by the DO apps even when DISALLOW_CHANGE_WIFI_STATE
-     * user restriction is set.
-     */
-    @Test
-    public void testSetWifiEnabledSuccessForDOAppsWhenUserRestrictionSet() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isDeviceOwner(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(true);
-
-        when(mSettingsStore.handleWifiToggled(eq(true))).thenReturn(true);
-        when(mSettingsStore.isAirplaneModeOn()).thenReturn(false);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_CHANGE_WIFI_STATE),
-                any())).thenReturn(true);
-
-        assertTrue(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        verify(mActiveModeWarden).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-    }
-
-    /**
-     * Verify that a dialog is shown for third-party apps targeting pre-Q SDK enabling Wi-Fi.
-     */
-    @Test
-    public void testSetWifiEnabledDialogForThirdPartyAppsTargetingBelowQSdk() throws Exception {
-        when(mResources.getBoolean(
-                R.bool.config_showConfirmationDialogForThirdPartyAppsEnablingWifi))
-                .thenReturn(true);
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.Q), anyInt())).thenReturn(true);
-        when(mSettingsStore.handleWifiToggled(eq(true))).thenReturn(true);
-        when(mSettingsStore.isAirplaneModeOn()).thenReturn(false);
-        ApplicationInfo applicationInfo = mock(ApplicationInfo.class);
-        when(mPackageManager.getApplicationInfo(any(), anyInt())).thenReturn(applicationInfo);
-        String appName = "appName";
-        when(applicationInfo.loadLabel(any())).thenReturn(appName);
-        String title = "appName wants to enable Wi-Fi.";
-        String message = "Enable Wi-Fi?";
-        String positiveButtonText = "Yes";
-        String negativeButtonText = "No";
-        when(mResources.getString(R.string.wifi_enable_request_dialog_title, appName))
-                .thenReturn(title);
-        when(mResources.getString(R.string.wifi_enable_request_dialog_message)).thenReturn(message);
-        when(mResources.getString(R.string.wifi_enable_request_dialog_positive_button))
-                .thenReturn(positiveButtonText);
-        when(mResources.getString(R.string.wifi_enable_request_dialog_negative_button))
-                .thenReturn(negativeButtonText);
-
-        // Verify the negative reply does not enable wifi
-        WifiDialogManager.DialogHandle dialogHandle = mock(WifiDialogManager.DialogHandle.class);
-        when(mWifiDialogManager.createSimpleDialog(any(), any(), any(), any(), any(), any(), any()))
-                .thenReturn(dialogHandle);
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> callbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        assertTrue(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        verify(mActiveModeWarden, times(0)).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-        mLooper.dispatchAll();
-        verify(mWifiDialogManager, times(1)).createSimpleDialog(
-                eq(title),
-                eq(message),
-                eq(positiveButtonText),
-                eq(negativeButtonText),
-                eq(null),
-                callbackCaptor.capture(),
-                any());
-        verify(dialogHandle).launchDialog();
-        callbackCaptor.getValue().onNegativeButtonClicked();
-        verify(mActiveModeWarden, times(0)).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-
-        // Verify the cancel reply does not enable wifi.
-        dialogHandle = mock(WifiDialogManager.DialogHandle.class);
-        when(mWifiDialogManager.createSimpleDialog(any(), any(), any(), any(), any(), any(), any()))
-                .thenReturn(dialogHandle);
-        assertTrue(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        mLooper.dispatchAll();
-        verify(mActiveModeWarden, times(0)).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-        callbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        verify(mWifiDialogManager, times(2)).createSimpleDialog(
-                eq(title),
-                eq(message),
-                eq(positiveButtonText),
-                eq(negativeButtonText),
-                eq(null),
-                callbackCaptor.capture(),
-                any());
-        verify(dialogHandle).launchDialog();
-        callbackCaptor.getValue().onCancelled();
-        verify(mActiveModeWarden, times(0)).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-
-        // Verify the positive reply will enable wifi.
-        dialogHandle = mock(WifiDialogManager.DialogHandle.class);
-        when(mWifiDialogManager.createSimpleDialog(any(), any(), any(), any(), any(), any(), any()))
-                .thenReturn(dialogHandle);
-        assertTrue(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        mLooper.dispatchAll();
-        verify(mActiveModeWarden, times(0)).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-        callbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        verify(mWifiDialogManager, times(3)).createSimpleDialog(
-                eq(title),
-                eq(message),
-                eq(positiveButtonText),
-                eq(negativeButtonText),
-                eq(null),
-                callbackCaptor.capture(),
-                any());
-        verify(dialogHandle).launchDialog();
-        callbackCaptor.getValue().onPositiveButtonClicked();
-        verify(mActiveModeWarden, times(1)).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-
-        // Verify disabling wifi works without dialog.
-        when(mSettingsStore.handleWifiToggled(eq(false))).thenReturn(true);
-        dialogHandle = mock(WifiDialogManager.DialogHandle.class);
-        when(mWifiDialogManager.createSimpleDialog(any(), any(), any(), any(), any(), any(), any()))
-                .thenReturn(dialogHandle);
-        assertTrue(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, false));
-        mLooper.dispatchAll();
-        verify(mActiveModeWarden, times(2)).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-        verify(dialogHandle, never()).launchDialog();
-
-        // Verify wifi becoming enabled will dismiss any outstanding dialogs.
-        dialogHandle = mock(WifiDialogManager.DialogHandle.class);
-        when(mWifiDialogManager.createSimpleDialog(any(), any(), any(), any(), any(), any(), any()))
-                .thenReturn(dialogHandle);
-        assertTrue(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        mLooper.dispatchAll();
-        verify(mActiveModeWarden, times(2)).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-        callbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-        verify(mWifiDialogManager, times(4)).createSimpleDialog(
-                eq(title),
-                eq(message),
-                eq(positiveButtonText),
-                eq(negativeButtonText),
-                eq(null),
-                callbackCaptor.capture(),
-                any());
-        verify(dialogHandle).launchDialog();
-        when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(true);
-        // Enabled by privileged app
-        assertTrue(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        mLooper.dispatchAll();
-        verify(mActiveModeWarden, times(3)).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-        verify(dialogHandle).dismissDialog();
-
-        // Verify wifi already enabled will not trigger dialog.
-        when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(false);
-        dialogHandle = mock(WifiDialogManager.DialogHandle.class);
-        when(mWifiDialogManager.createSimpleDialog(any(), any(), any(), any(), any(), any(), any()))
-                .thenReturn(dialogHandle);
-        when(mActiveModeWarden.getWifiState()).thenReturn(WifiManager.WIFI_STATE_ENABLED);
-        assertTrue(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        mLooper.dispatchAll();
-        verify(mActiveModeWarden, times(3)).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-        verify(dialogHandle, never()).launchDialog();
-    }
-
-    /**
-     * Verify that no dialog is shown for non-third-party apps targeting pre-Q SDK enabling Wi-Fi.
-     */
-    @Test
-    public void testSetWifiEnabledNoDialogForNonThirdPartyAppsTargetingBelowQSdk() {
-        when(mResources.getBoolean(
-                R.bool.config_showConfirmationDialogForThirdPartyAppsEnablingWifi))
-                .thenReturn(true);
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.Q), anyInt())).thenReturn(true);
-        when(mSettingsStore.handleWifiToggled(eq(true))).thenReturn(true);
-        when(mSettingsStore.isAirplaneModeOn()).thenReturn(false);
-        when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(true);
-
-        assertTrue(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        verify(mActiveModeWarden).wifiToggled(
-                eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
-    }
-
-    /**
      * Helper to verify registering for state changes.
      */
     private void verifyApRegistration() {
@@ -1772,7 +1462,7 @@
     public void testWifiFullyStartsWhenDeviceBootsWithWifiEnabled() {
         when(mSettingsStore.handleWifiToggled(true)).thenReturn(true);
         when(mSettingsStore.isWifiToggleEnabled()).thenReturn(true);
-        when(mActiveModeWarden.getWifiState()).thenReturn(WIFI_STATE_DISABLED);
+        when(mClientModeManager.syncGetWifiState()).thenReturn(WIFI_STATE_DISABLED);
         when(mContext.getPackageName()).thenReturn(ANDROID_SYSTEM_PACKAGE);
         when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
                 anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
@@ -1939,7 +1629,7 @@
         WifiConfigurationTestUtil.assertConfigurationEqualForSoftAp(
                 config,
                 mSoftApModeConfigCaptor.getValue().getSoftApConfiguration().toWifiConfiguration());
-        verify(mLastCallerInfoManager).put(eq(WifiManager.API_SOFT_AP), anyInt(),
+        verify(mLastCallerInfoManager).put(eq(LastCallerInfoManager.SOFT_AP), anyInt(),
                 anyInt(), anyInt(), anyString(), eq(true));
     }
 
@@ -2015,7 +1705,7 @@
         verify(mActiveModeWarden).startSoftAp(mSoftApModeConfigCaptor.capture(),
                 eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
         assertNull(mSoftApModeConfigCaptor.getValue().getSoftApConfiguration());
-        verify(mLastCallerInfoManager).put(eq(WifiManager.API_TETHERED_HOTSPOT), anyInt(),
+        verify(mLastCallerInfoManager).put(eq(LastCallerInfoManager.TETHERED_HOTSPOT), anyInt(),
                 anyInt(), anyInt(), anyString(), eq(true));
     }
 
@@ -2048,36 +1738,6 @@
     }
 
     /**
-     * Verify that while the DISALLOW_WIFI_TETHERING user restriction is set, softap does not start.
-     */
-    @Test
-    public void testStartTetheredHotspotWithUserRestriction() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mBundle.getBoolean(UserManager.DISALLOW_WIFI_TETHERING)).thenReturn(true);
-        mWifiServiceImpl.checkAndStartWifi();
-        mLooper.dispatchAll();
-        SoftApConfiguration config = createValidSoftApConfiguration();
-        mLooper.startAutoDispatch();
-        boolean result = mWifiServiceImpl.startTetheredHotspot(config, TEST_PACKAGE_NAME);
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-        assertFalse(result);
-        verify(mActiveModeWarden, never()).startSoftAp(any(), any());
-    }
-
-    /**
-     * Verify that when the DISALLOW_WIFI_TETHERING user restriction is set, softap stops.
-     */
-    @Test
-    public void testTetheredHotspotDisabledWhenUserRestrictionSet() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mBundle.getBoolean(UserManager.DISALLOW_WIFI_TETHERING)).thenReturn(true);
-        mLooper.startAutoDispatch();
-        mWifiServiceImpl.onUserRestrictionsChanged();
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-        verify(mActiveModeWarden).stopSoftAp(WifiManager.IFACE_IP_MODE_TETHERED);
-    }
-
-    /**
      * Verify isWifiBandSupported for 24GHz with an overlay override config
      */
     @Test
@@ -2394,7 +2054,7 @@
 
         SoftApConfiguration config = new SoftApConfiguration.Builder()
                 .setSsid("TestAp")
-                .setPassphrase("thisIsABadPassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE)
+                .setPassphrase("thisIsABadPassword", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
                 .setBand(SoftApConfiguration.BAND_6GHZ)
                 .build();
 
@@ -2417,7 +2077,7 @@
 
         SoftApConfiguration config = new SoftApConfiguration.Builder()
                 .setSsid("TestAp")
-                .setPassphrase("thisIsABadPassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE)
+                .setPassphrase("thisIsABadPassword", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
                 .setBand(SoftApConfiguration.BAND_6GHZ)
                 .build();
 
@@ -2439,7 +2099,7 @@
 
         SoftApConfiguration config = new SoftApConfiguration.Builder()
                 .setSsid("TestAp")
-                .setPassphrase("thisIsABadPassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE)
+                .setPassphrase("thisIsABadPassword", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
                 .setBand(SoftApConfiguration.BAND_6GHZ)
                 .build();
 
@@ -2603,7 +2263,7 @@
         boolean result = mWifiServiceImpl.stopSoftAp();
         assertTrue(result);
         verify(mActiveModeWarden).stopSoftAp(WifiManager.IFACE_IP_MODE_TETHERED);
-        verify(mLastCallerInfoManager).put(eq(WifiManager.API_SOFT_AP), anyInt(),
+        verify(mLastCallerInfoManager).put(eq(LastCallerInfoManager.SOFT_AP), anyInt(),
                 anyInt(), anyInt(), anyString(), eq(false));
     }
 
@@ -2675,7 +2335,7 @@
 
     private WifiInfo setupForGetConnectionInfo() {
         WifiInfo wifiInfo = new WifiInfo();
-        wifiInfo.setSSID(WifiSsid.fromUtf8Text(TEST_SSID));
+        wifiInfo.setSSID(WifiSsid.createFromAsciiEncoded(TEST_SSID));
         wifiInfo.setBSSID(TEST_BSSID);
         wifiInfo.setNetworkId(TEST_NETWORK_ID);
         wifiInfo.setFQDN(TEST_FQDN);
@@ -2911,8 +2571,6 @@
                 anyString(), nullable(String.class), anyInt(), nullable(String.class));
         when(mWifiPermissionsUtil.isProfileOwner(Binder.getCallingUid(), TEST_PACKAGE_NAME))
                 .thenReturn(true);
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(true);
 
         mLooper.startAutoDispatch();
         ParceledListSlice<WifiConfiguration> configs =
@@ -2924,63 +2582,20 @@
     }
 
     /**
-     * Test that admin may retrieve all networks but mac address is set to default for networks
-     * they do not own.
+     * Test that privileged network list are exposed null to an app that does not have the
+     * appropriate permissions.
      */
     @Test
-    public void testGetConfiguredNetworksAdmin_ReturnsNetworksWithDefaultMac() {
-        final int callerUid = Binder.getCallingUid();
-        WifiConfiguration callerNetwork = WifiConfigurationTestUtil.generateWifiConfig(
-                0, callerUid, "\"red\"", true, true, null, null, SECURITY_NONE);
-        WifiConfiguration nonCallerNetwork = WifiConfigurationTestUtil.generateWifiConfig(
-                2, 1200000, "\"blue\"", true, true, null, null, SECURITY_NONE);
-        callerNetwork.setRandomizedMacAddress(TEST_FACTORY_MAC_ADDR);
-
-        when(mWifiConfigManager.getSavedNetworks(callerUid)).thenReturn(Arrays.asList(
-                callerNetwork, nonCallerNetwork));
-
-        when(mWifiPermissionsUtil.isProfileOwner(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(true);
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(true);
-
-        mLooper.startAutoDispatch();
-        ParceledListSlice<WifiConfiguration> configs =
-                mWifiServiceImpl.getConfiguredNetworks(TEST_PACKAGE_NAME, TEST_FEATURE_ID, false);
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        WifiConfigurationTestUtil.assertConfigurationsEqualForBackup(
-                Arrays.asList(callerNetwork, nonCallerNetwork), configs.getList());
-
-        for (WifiConfiguration config : configs.getList()) {
-            if (config.getProfileKey().equals(callerNetwork.getProfileKey())) {
-                assertEquals(TEST_FACTORY_MAC, config.getRandomizedMacAddress().toString());
-            } else {
-                assertEquals(WifiInfo.DEFAULT_MAC_ADDRESS,
-                        config.getRandomizedMacAddress().toString());
-            }
-        }
-    }
-
-    /**
-     * Test that privileged network list are exposed null to an app that targets T or later and does
-     * not have nearby devices permission.
-     */
-    @Test
-    public void testPrivilegedConfiguredNetworkListNullOnSecurityExceptionPostT() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(false);
+    public void testPrivilegedConfiguredNetworkListAreEmptyFromAppWithoutPermission() {
         when(mWifiConfigManager.getConfiguredNetworksWithPasswords())
                 .thenReturn(TEST_WIFI_CONFIGURATION_LIST);
 
-        doThrow(new SecurityException()).when(mWifiPermissionsUtil).enforceNearbyDevicesPermission(
-                any(), anyBoolean(), any());
+        doThrow(new SecurityException()).when(mWifiPermissionsUtil).enforceCanAccessScanResults(
+                anyString(), nullable(String.class), anyInt(), nullable(String.class));
 
         mLooper.startAutoDispatch();
         ParceledListSlice<WifiConfiguration> configs =
-                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID,
-                        mExtras);
+                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID);
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         assertNull(configs);
@@ -3000,8 +2615,7 @@
 
         mLooper.startAutoDispatch();
         ParceledListSlice<WifiConfiguration> configs =
-                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID,
-                        mExtras);
+                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID);
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         assertNull(configs);
@@ -3018,8 +2632,7 @@
 
         mLooper.startAutoDispatch();
         ParceledListSlice<WifiConfiguration> configs =
-                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID,
-                        mExtras);
+                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID);
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         WifiConfigurationTestUtil.assertConfigurationsEqualForBackup(
@@ -3188,7 +2801,7 @@
     private void registerLOHSRequestFull() {
         setupLohsPermissions();
         int result = mWifiServiceImpl.startLocalOnlyHotspot(mLohsCallback, TEST_PACKAGE_NAME,
-                TEST_FEATURE_ID, null, mExtras);
+                TEST_FEATURE_ID, null);
         assertEquals(LocalOnlyHotspotCallback.REQUEST_REGISTERED, result);
         verifyCheckChangePermission(TEST_PACKAGE_NAME);
     }
@@ -3217,7 +2830,7 @@
                 .enforceCallingOrSelfPermission(eq(android.Manifest.permission.CHANGE_WIFI_STATE),
                                                 eq("WifiService"));
         mWifiServiceImpl.startLocalOnlyHotspot(
-                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null, mExtras);
+                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null);
     }
 
     /**
@@ -3231,39 +2844,7 @@
                                                                       eq(TEST_FEATURE_ID),
                                                                       anyInt());
         mWifiServiceImpl.startLocalOnlyHotspot(
-                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null, mExtras);
-    }
-
-    /**
-     * Verify that a call to startLocalOnlyHotspot throws a SecurityException if the caller targets
-     * Android T or later and does not have nearby devices permission.
-     */
-    @Test(expected = SecurityException.class)
-    public void testStartLocalOnlyHotspotThrowsExceptionWithoutNearbyDevicesPermissionOnT() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(false);
-        doThrow(new SecurityException())
-                .when(mWifiPermissionsUtil).enforceNearbyDevicesPermission(
-                        any(), anyBoolean(), any());
-        mWifiServiceImpl.startLocalOnlyHotspot(
-                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null, mExtras);
-    }
-
-    /**
-     * Verify that a call to startLocalOnlyHotspot will not check nearby devices permission if the
-     * caller does not target T.
-     */
-    @Test
-    public void testStartLocalOnlyHotspotDoesNotCheckNearbyPermissionIfTargetPreT() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(true);
-        mWifiServiceImpl.startLocalOnlyHotspot(
-                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null, mExtras);
-        verify(mWifiPermissionsUtil, never()).enforceNearbyDevicesPermission(any(), anyBoolean(),
-                any());
+                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null);
     }
 
     /**
@@ -3274,7 +2855,7 @@
     public void testStartLocalOnlyHotspotThrowsSecurityExceptionWithoutLocationEnabled() {
         when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(false);
         mWifiServiceImpl.startLocalOnlyHotspot(
-                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null, mExtras);
+                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null);
     }
 
     /**
@@ -3286,7 +2867,7 @@
 
         when(mFrameworkFacade.isAppForeground(any(), anyInt())).thenReturn(false);
         int result = mWifiServiceImpl.startLocalOnlyHotspot(
-                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null, mExtras);
+                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null);
         assertEquals(LocalOnlyHotspotCallback.ERROR_INCOMPATIBLE_MODE, result);
     }
 
@@ -3361,7 +2942,7 @@
         when(mFrameworkFacade.isAppForeground(any(), anyInt())).thenReturn(true);
         mLooper.dispatchAll();
         int returnCode = mWifiServiceImpl.startLocalOnlyHotspot(
-                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null, mExtras);
+                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null);
         assertEquals(ERROR_INCOMPATIBLE_MODE, returnCode);
     }
 
@@ -3376,7 +2957,7 @@
                 eq(UserManager.DISALLOW_CONFIG_TETHERING), any()))
                 .thenReturn(true);
         int returnCode = mWifiServiceImpl.startLocalOnlyHotspot(
-                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null, mExtras);
+                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null);
         assertEquals(ERROR_TETHERING_DISALLOWED, returnCode);
     }
 
@@ -3391,7 +2972,7 @@
 
         // now do the second request that will fail
         mWifiServiceImpl.startLocalOnlyHotspot(
-                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null, mExtras);
+                mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null);
     }
 
     /**
@@ -3454,15 +3035,83 @@
     public void testStartLocalOnlyHotspotAt2Ghz() {
         SoftApConfiguration lohsConfig = createValidSoftApConfiguration();
         when(mWifiApConfigStore.generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(null), any())).thenReturn(lohsConfig);
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(null))).thenReturn(lohsConfig);
         mLooper.startAutoDispatch();
         registerLOHSRequestFull();
         stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(mLooper);
         verify(mWifiApConfigStore).generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(null), any());
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(null));
         verifyLohsBand(SoftApConfiguration.BAND_2GHZ);
     }
 
+    /**
+     * Verify that startLocalOnlyHotspot will start access point at 6 GHz if properly configured
+     * and if feasible, even if the 5GHz is enabled.
+     */
+    @Test
+    public void testStartLocalOnlyHotspotAt6Ghz() {
+        when(mResources.getBoolean(
+                eq(R.bool.config_wifi_local_only_hotspot_5ghz)))
+                .thenReturn(true);
+        when(mResources.getBoolean(
+                eq(R.bool.config_wifiLocalOnlyHotspot6ghz)))
+                .thenReturn(true);
+        setup5GhzSupported();
+        setup6GhzSupported();
+
+        when(mResources.getBoolean(
+                eq(R.bool.config_wifiSoftap6ghzSupported)))
+                .thenReturn(true);
+        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)).thenReturn(true);
+        SoftApConfiguration lohsConfig = createValidSoftApConfiguration();
+        SoftApConfiguration customizedConfig = new SoftApConfiguration.Builder(lohsConfig)
+                .setBand(SoftApConfiguration.BAND_6GHZ).build();
+        when(mWifiApConfigStore.generateLocalOnlyHotspotConfig(
+                eq(mContext), eq(SoftApConfiguration.BAND_6GHZ), eq(null)))
+                .thenReturn(customizedConfig);
+        mLooper.startAutoDispatch();
+        registerLOHSRequestFull();
+        stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(mLooper);
+        verify(mWifiApConfigStore).generateLocalOnlyHotspotConfig(
+                eq(mContext), eq(SoftApConfiguration.BAND_6GHZ), eq(null));
+        verifyLohsBand(SoftApConfiguration.BAND_6GHZ);
+    }
+
+    /**
+     * Verify that startLocalOnlyHotspot will start access point at 5 GHz if both 5GHz and 6GHz
+     * are enabled, but SoftAp is not supported for 6GHz.
+     */
+    @Test
+    public void testStartLocalOnlyHotspotAt5Ghz() {
+        when(mResources.getBoolean(
+                eq(R.bool.config_wifi_local_only_hotspot_5ghz)))
+                .thenReturn(true);
+
+        setup5GhzSupported();
+        setup6GhzSupported();
+
+        when(mResources.getBoolean(
+                eq(R.bool.config_wifiSoftap6ghzSupported)))
+                .thenReturn(false);
+        when(mResources.getBoolean(
+                eq(R.bool.config_wifiLocalOnlyHotspot6ghz)))
+                .thenReturn(true);
+
+        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)).thenReturn(true);
+        SoftApConfiguration lohsConfig = createValidSoftApConfiguration();
+        SoftApConfiguration customizedConfig = new SoftApConfiguration.Builder(lohsConfig)
+                .setBand(SoftApConfiguration.BAND_5GHZ).build();
+        when(mWifiApConfigStore.generateLocalOnlyHotspotConfig(
+                eq(mContext), eq(SoftApConfiguration.BAND_5GHZ), eq(null)))
+                .thenReturn(customizedConfig);
+        mLooper.startAutoDispatch();
+        registerLOHSRequestFull();
+        stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(mLooper);
+        verify(mWifiApConfigStore).generateLocalOnlyHotspotConfig(
+                eq(mContext), eq(SoftApConfiguration.BAND_5GHZ), eq(null));
+        verifyLohsBand(SoftApConfiguration.BAND_5GHZ);
+    }
+
     private void verifyLohsBand(int expectedBand) {
         verify(mActiveModeWarden).startSoftAp(mSoftApModeConfigCaptor.capture(),
                 eq(TEST_SETTINGS_WORKSOURCE));
@@ -3519,7 +3168,7 @@
         setupLohsPermissions();
         setupWardenForCustomLohs();
         mWifiServiceImpl.startLocalOnlyHotspot(mLohsCallback, TEST_PACKAGE_NAME, TEST_FEATURE_ID,
-                customConfig, mExtras);
+                customConfig);
     }
 
     private static void nopDeathCallback(LocalOnlyHotspotRequestInfo requestor) {
@@ -3535,11 +3184,10 @@
                 .build();
 
         setupForCustomLohs();
-        mWifiServiceImpl.registerLOHSForTest(mPid,
-                new LocalOnlyHotspotRequestInfo(mLooper.getLooper(), new WorkSource(),
-                        sharedCallback, WifiServiceImplTest::nopDeathCallback, null));
+        mWifiServiceImpl.registerLOHSForTest(mPid, new LocalOnlyHotspotRequestInfo(
+                new WorkSource(), sharedCallback, WifiServiceImplTest::nopDeathCallback, null));
         assertThat(mWifiServiceImpl.startLocalOnlyHotspot(exclusiveCallback, TEST_PACKAGE_NAME,
-                TEST_FEATURE_ID, exclusiveConfig, mExtras)).isEqualTo(ERROR_GENERIC);
+                TEST_FEATURE_ID, exclusiveConfig)).isEqualTo(ERROR_GENERIC);
         stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(mLooper);
         assertThat(sharedCallback.mIsStarted).isTrue();
         assertThat(exclusiveCallback.mIsStarted).isFalse();
@@ -3555,12 +3203,12 @@
                 .build();
 
         setupForCustomLohs();
-        mWifiServiceImpl.registerLOHSForTest(mPid,
-                new LocalOnlyHotspotRequestInfo(mLooper.getLooper(), new WorkSource(),
-                        exclusiveCallback, WifiServiceImplTest::nopDeathCallback, exclusiveConfig));
+        mWifiServiceImpl.registerLOHSForTest(mPid, new LocalOnlyHotspotRequestInfo(
+                new WorkSource(), exclusiveCallback, WifiServiceImplTest::nopDeathCallback,
+                exclusiveConfig));
         stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(mLooper);
         assertThat(mWifiServiceImpl.startLocalOnlyHotspot(sharedCallback, TEST_PACKAGE_NAME,
-                TEST_FEATURE_ID, null, mExtras)).isEqualTo(ERROR_GENERIC);
+                TEST_FEATURE_ID, null)).isEqualTo(ERROR_GENERIC);
         assertThat(exclusiveCallback.mIsStarted).isTrue();
         assertThat(sharedCallback.mIsStarted).isFalse();
     }
@@ -3572,21 +3220,21 @@
                 .setPassphrase("passphrase", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
                 .build();
         when(mWifiApConfigStore.generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(config), any())).thenReturn(config);
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(config))).thenReturn(config);
         FakeLohsCallback callback = new FakeLohsCallback();
         mLooper.startAutoDispatch();
         setupForCustomLohs();
         assertThat(
                 mWifiServiceImpl.startLocalOnlyHotspot(callback, TEST_PACKAGE_NAME, TEST_FEATURE_ID,
-                        config, mExtras)).isEqualTo(REQUEST_REGISTERED);
+                        config)).isEqualTo(REQUEST_REGISTERED);
         stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(mLooper);
         verify(mWifiApConfigStore).generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(config), any());
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(config));
         // Use app's worksouce.
         verify(mActiveModeWarden).startSoftAp(any(),
                 eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
         assertThat(callback.mIsStarted).isTrue();
-        assertThat(callback.mSoftApConfig.getWifiSsid().getUtf8Text()).isEqualTo("customSsid");
+        assertThat(callback.mSoftApConfig.getSsid()).isEqualTo("customSsid");
         assertThat(callback.mSoftApConfig.getSecurityType())
                 .isEqualTo(SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
         assertThat(callback.mSoftApConfig.getPassphrase()).isEqualTo("passphrase");
@@ -3598,21 +3246,21 @@
                 .setSsid("customSsid")
                 .build();
         when(mWifiApConfigStore.generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(config), any())).thenReturn(config);
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(config))).thenReturn(config);
         FakeLohsCallback callback = new FakeLohsCallback();
         mLooper.startAutoDispatch();
         setupForCustomLohs();
         assertThat(
                 mWifiServiceImpl.startLocalOnlyHotspot(callback, TEST_PACKAGE_NAME, TEST_FEATURE_ID,
-                        config, mExtras)).isEqualTo(REQUEST_REGISTERED);
+                        config)).isEqualTo(REQUEST_REGISTERED);
         stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(mLooper);
         verify(mWifiApConfigStore).generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(config), any());
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(config));
         // Use app's worksouce.
         verify(mActiveModeWarden).startSoftAp(any(),
                 eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
         assertThat(callback.mIsStarted).isTrue();
-        assertThat(callback.mSoftApConfig.getWifiSsid().getUtf8Text()).isEqualTo("customSsid");
+        assertThat(callback.mSoftApConfig.getSsid()).isEqualTo("customSsid");
         assertThat(callback.mSoftApConfig.getSecurityType())
                 .isEqualTo(SoftApConfiguration.SECURITY_TYPE_OPEN);
         assertThat(callback.mSoftApConfig.getPassphrase()).isNull();
@@ -3625,7 +3273,7 @@
                 .setPassphrase("passphrase", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
                 .build();
         when(mWifiApConfigStore.generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(customizedConfig), any()))
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(customizedConfig)))
                 .thenReturn(lohsConfig);
         mLooper.startAutoDispatch();
         FakeLohsCallback callback = new FakeLohsCallback();
@@ -3633,43 +3281,38 @@
         setupForCustomLohs();
         assertThat(
                 mWifiServiceImpl.startLocalOnlyHotspot(callback, TEST_PACKAGE_NAME, TEST_FEATURE_ID,
-                        customizedConfig, mExtras)).isEqualTo(REQUEST_REGISTERED);
+                        customizedConfig)).isEqualTo(REQUEST_REGISTERED);
         stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(mLooper);
         verify(mWifiApConfigStore).generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(customizedConfig), any());
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(customizedConfig));
         // Use app's worksouce.
         verify(mActiveModeWarden).startSoftAp(any(),
                 eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
         assertThat(callback.mIsStarted).isTrue();
-        assertThat(callback.mSoftApConfig.getWifiSsid()).isNotNull();
+        assertThat(callback.mSoftApConfig.getSsid()).isNotEmpty();
     }
 
     @Test
     public void testCustomLohs_ForwardsBssid() {
         mLooper.startAutoDispatch();
         SoftApConfiguration lohsConfig = createValidSoftApConfiguration();
-        SoftApConfiguration.Builder customizedConfigBuilder =
-                new SoftApConfiguration.Builder(lohsConfig)
-                .setBssid(MacAddress.fromString("aa:bb:cc:dd:ee:ff"));
-        if (SdkLevel.isAtLeastS()) {
-            customizedConfigBuilder.setMacRandomizationSetting(
-                    SoftApConfiguration.RANDOMIZATION_NONE);
-        }
-        SoftApConfiguration customizedConfig = customizedConfigBuilder.build();
+        SoftApConfiguration customizedConfig = new SoftApConfiguration.Builder(lohsConfig)
+                .setBssid(MacAddress.fromString("aa:bb:cc:dd:ee:ff"))
+                .build();
         when(mWifiApConfigStore.generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(customizedConfig), any()))
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(customizedConfig)))
                 .thenReturn(customizedConfig);
         FakeLohsCallback callback = new FakeLohsCallback();
 
         setupForCustomLohs();
         assertThat(
                 mWifiServiceImpl.startLocalOnlyHotspot(callback, TEST_PACKAGE_NAME, TEST_FEATURE_ID,
-                        customizedConfig, mExtras)).isEqualTo(REQUEST_REGISTERED);
+                        customizedConfig)).isEqualTo(REQUEST_REGISTERED);
         stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(mLooper);
 
         // Use app's worksouce.
         verify(mWifiApConfigStore).generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(customizedConfig), any());
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(customizedConfig));
         verify(mActiveModeWarden).startSoftAp(any(),
                 eq(new WorkSource(Binder.getCallingUid(), TEST_PACKAGE_NAME)));
         assertThat(callback.mIsStarted).isTrue();
@@ -4200,12 +3843,12 @@
             throws Exception {
         SoftApConfiguration lohsConfig = createValidSoftApConfiguration();
         when(mWifiApConfigStore.generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(null), any())).thenReturn(lohsConfig);
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(null))).thenReturn(lohsConfig);
         mLooper.startAutoDispatch();
         registerLOHSRequestFull();
         stopAutoDispatchWithDispatchAllBeforeStopAndIgnoreExceptions(mLooper);
         verify(mWifiApConfigStore).generateLocalOnlyHotspotConfig(
-                eq(mContext), eq(null), any());
+                eq(mContext), eq(SoftApConfiguration.BAND_2GHZ), eq(null));
         mWifiServiceImpl.registerLOHSForTest(TEST_PID, mRequestInfo);
 
         mWifiServiceImpl.updateInterfaceIpState(WIFI_IFACE_NAME, IFACE_IP_MODE_LOCAL_ONLY);
@@ -4350,7 +3993,7 @@
         when(callback2.asBinder()).thenReturn(mock(IBinder.class));
 
         int result = mWifiServiceImpl.startLocalOnlyHotspot(
-                callback2, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null, mExtras);
+                callback2, TEST_PACKAGE_NAME, TEST_FEATURE_ID, null);
         assertEquals(LocalOnlyHotspotCallback.REQUEST_REGISTERED, result);
         mLooper.dispatchAll();
 
@@ -4424,8 +4067,7 @@
                 any(PasspointConfiguration.class), anyInt(), eq(TEST_PACKAGE_NAME), eq(false),
                 eq(true))).thenReturn(true);
         mLooper.startAutoDispatch();
-        assertEquals(0,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(0, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
         verifyCheckChangePermission(TEST_PACKAGE_NAME);
         verify(mPasspointManager).addOrUpdateProvider(
@@ -4437,8 +4079,7 @@
                 any(PasspointConfiguration.class), anyInt(), eq(TEST_PACKAGE_NAME), anyBoolean(),
                 anyBoolean())).thenReturn(false);
         mLooper.startAutoDispatch();
-        assertEquals(-1,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(-1, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
         verifyCheckChangePermission(TEST_PACKAGE_NAME);
         verify(mPasspointManager).addOrUpdateProvider(
@@ -4703,42 +4344,6 @@
         verify(mWifiBackupRestore, never()).retrieveConfigurationsFromBackupData(any(byte[].class));
     }
 
-    private void testRestoreNetworkConfiguration(int configNum, int batchNum) {
-        List<WifiConfiguration> configurations = new ArrayList<>();
-        when(mResources.getInteger(
-                eq(R.integer.config_wifiConfigurationRestoreNetworksBatchNum)))
-                .thenReturn(batchNum);
-        WifiConfiguration config = new WifiConfiguration();
-        config.SSID = TEST_SSID;
-        for (int i = 0; i < configNum; i++) {
-            configurations.add(config);
-        }
-        reset(mWifiConfigManager);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt()))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
-        mWifiServiceImpl.restoreNetworks(configurations);
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager, times(configNum)).addOrUpdateNetwork(eq(config), anyInt());
-        verify(mWifiConfigManager, times(configNum)).enableNetwork(
-                eq(TEST_NETWORK_ID), eq(false), anyInt(), eq(null));
-        verify(mWifiConfigManager, times(configNum)).allowAutojoin(eq(TEST_NETWORK_ID),
-                anyBoolean());
-    }
-
-    /**
-     * Verify that a call to
-     * {@link WifiServiceImpl#restoreNetworks(List<WifiConfiguration> configurations)}
-     * trigeering the process of the network restoration in batches.
-     */
-    @Test
-    public void testRestoreNetworksWithBatch() {
-        testRestoreNetworkConfiguration(0 /* configNum */, 50 /* batchNum*/);
-        testRestoreNetworkConfiguration(1 /* configNum */, 50 /* batchNum*/);
-        testRestoreNetworkConfiguration(20 /* configNum */, 50 /* batchNum*/);
-        testRestoreNetworkConfiguration(700 /* configNum */, 50 /* batchNum*/);
-        testRestoreNetworkConfiguration(700 /* configNum */, 0 /* batchNum*/);
-    }
-
     /**
      * Verify that a call to {@link WifiServiceImpl#restoreSupplicantBackupData(byte[], byte[])} is
      * only allowed from callers with the signature only NETWORK_SETTINGS permission.
@@ -4790,8 +4395,7 @@
         when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
             anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
         InOrder inorder = inOrder(mWifiApConfigStore);
-        SoftApConfiguration testConfig = new SoftApConfiguration.Builder()
-                .setSsid("test").build();
+        SoftApConfiguration testConfig = new SoftApConfiguration.Builder().setSsid("test").build();
         byte[] testData = testConfig.toString().getBytes();
         when(mSoftApBackupRestore.retrieveSoftApConfigurationFromBackupData(testData))
                 .thenReturn(testConfig);
@@ -4988,11 +4592,11 @@
     public void testConnectNetworkWithoutPrivilegedPermission() throws Exception {
         try {
             mWifiServiceImpl.connect(mock(WifiConfiguration.class), TEST_NETWORK_ID,
-                    mock(IActionListener.class), TEST_PACKAGE_NAME);
+                    mock(IActionListener.class));
             fail();
         } catch (SecurityException e) {
             mLooper.dispatchAll();
-            verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt(), any());
+            verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt());
         }
     }
 
@@ -5018,12 +4622,11 @@
     @Test
     public void testSaveNetworkWithoutPrivilegedPermission() throws Exception {
         try {
-            mWifiServiceImpl.save(mock(WifiConfiguration.class), mock(IActionListener.class),
-                    TEST_PACKAGE_NAME);
+            mWifiServiceImpl.save(mock(WifiConfiguration.class), mock(IActionListener.class));
             fail();
         } catch (SecurityException e) {
             mLooper.dispatchAll();
-            verify(mWifiConfigManager, never()).updateBeforeSaveNetwork(any(), anyInt(), any());
+            verify(mWifiConfigManager, never()).updateBeforeSaveNetwork(any(), anyInt());
         }
     }
 
@@ -5041,12 +4644,11 @@
         WifiConfiguration config = new WifiConfiguration();
         config.SSID = TEST_SSID;
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(config);
-        mWifiServiceImpl.connect(config, TEST_NETWORK_ID, mock(IActionListener.class),
-                TEST_PACKAGE_NAME);
+        mWifiServiceImpl.connect(config, TEST_NETWORK_ID, mock(IActionListener.class));
         mLooper.dispatchAll();
         verify(mWifiConfigManager).addOrUpdateNetwork(eq(config), anyInt());
         verify(mConnectHelper).connectToNetwork(any(NetworkUpdateResult.class),
-                any(ActionListenerWrapper.class), anyInt(), any());
+                any(ActionListenerWrapper.class), anyInt());
         verify(mWifiMetrics).logUserActionEvent(eq(UserActionEvent.EVENT_ADD_OR_UPDATE_NETWORK),
                 anyInt());
     }
@@ -5083,14 +4685,13 @@
         when(mActiveModeWarden.getClientModeManagers()).thenReturn(clientModeManagers);
 
         // Verify that the localOnlyCmm is not stopped since security type is different
-        mWifiServiceImpl.connect(config, TEST_NETWORK_ID, mock(IActionListener.class),
-                TEST_PACKAGE_NAME);
+        mWifiServiceImpl.connect(config, TEST_NETWORK_ID, mock(IActionListener.class));
         mLooper.dispatchAll();
         verify(primaryCmm, never()).stop();
         verify(localOnlyCmm, never()).stop();
         verify(mWifiConfigManager).addOrUpdateNetwork(eq(config), anyInt());
         verify(mConnectHelper).connectToNetwork(any(NetworkUpdateResult.class),
-                any(ActionListenerWrapper.class), anyInt(), any());
+                any(ActionListenerWrapper.class), anyInt());
         verify(mWifiMetrics).logUserActionEvent(eq(UserActionEvent.EVENT_ADD_OR_UPDATE_NETWORK),
                 anyInt());
 
@@ -5099,14 +4700,13 @@
         when(localOnlyCmm.getConnectedWifiConfiguration()).thenReturn(localOnlyConfig);
 
         // Verify that the localOnlyCmm is stopped this time
-        mWifiServiceImpl.connect(config, TEST_NETWORK_ID, mock(IActionListener.class),
-                TEST_PACKAGE_NAME);
+        mWifiServiceImpl.connect(config, TEST_NETWORK_ID, mock(IActionListener.class));
         mLooper.dispatchAll();
         verify(primaryCmm, never()).stop();
         verify(localOnlyCmm).stop();
         verify(mWifiConfigManager, times(2)).addOrUpdateNetwork(eq(config), anyInt());
         verify(mConnectHelper, times(2)).connectToNetwork(any(NetworkUpdateResult.class),
-                any(ActionListenerWrapper.class), anyInt(), any());
+                any(ActionListenerWrapper.class), anyInt());
         verify(mWifiMetrics, times(2)).logUserActionEvent(
                 eq(UserActionEvent.EVENT_ADD_OR_UPDATE_NETWORK), anyInt());
     }
@@ -5122,7 +4722,7 @@
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(mWifiConfig);
 
         mWifiServiceImpl.connect(mWifiConfig, WifiConfiguration.INVALID_NETWORK_ID,
-                mActionListener, TEST_PACKAGE_NAME);
+                mActionListener);
         mLooper.dispatchAll();
 
         ArgumentCaptor<WifiConfiguration> configCaptor =
@@ -5130,7 +4730,7 @@
         verify(mWifiConfigManager).addOrUpdateNetwork(configCaptor.capture(), anyInt());
         assertThat(configCaptor.getValue().networkId).isEqualTo(TEST_NETWORK_ID);
 
-        verify(mConnectHelper).connectToNetwork(eq(result), any(), anyInt(), any());
+        verify(mConnectHelper).connectToNetwork(eq(result), any(), anyInt());
         verify(mContextAsUser).sendBroadcastWithMultiplePermissions(
                 mIntentCaptor.capture(),
                 aryEq(new String[]{
@@ -5155,14 +4755,14 @@
         when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true);
 
         mWifiServiceImpl.connect(mWifiConfig, WifiConfiguration.INVALID_NETWORK_ID,
-                mActionListener, TEST_PACKAGE_NAME);
+                mActionListener);
         mLooper.dispatchAll();
 
         verify(mWifiConfigManager).addOrUpdateNetwork(eq(mWifiConfig), anyInt());
 
-        verify(mClientModeManager, never()).connectNetwork(any(), any(), anyInt(), any());
+        verify(mClientModeManager, never()).connectNetwork(any(), any(), anyInt());
         verify(mContextAsUser, never()).sendBroadcastWithMultiplePermissions(any(), any());
-        verify(mActionListener).onFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+        verify(mActionListener).onFailure(WifiManager.ERROR);
         verify(mActionListener, never()).onSuccess();
     }
 
@@ -5174,13 +4774,13 @@
         when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true);
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(mWifiConfig);
 
-        mWifiServiceImpl.connect(null, TEST_NETWORK_ID, mActionListener, TEST_PACKAGE_NAME);
+        mWifiServiceImpl.connect(null, TEST_NETWORK_ID, mActionListener);
         mLooper.dispatchAll();
 
         verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(), anyInt());
 
         verify(mConnectHelper).connectToNetwork(
-                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt(), any());
+                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt());
         verify(mContextAsUser, never()).sendBroadcastWithMultiplePermissions(any(), any());
         verify(mWifiMetrics).logUserActionEvent(eq(UserActionEvent.EVENT_MANUAL_CONNECT), anyInt());
     }
@@ -5197,13 +4797,13 @@
         when(mWifiCarrierInfoManager.getBestMatchSubscriptionId(any())).thenReturn(TEST_SUB_ID);
         when(mWifiCarrierInfoManager.isSimReady(TEST_SUB_ID)).thenReturn(true);
 
-        mWifiServiceImpl.connect(null, TEST_NETWORK_ID, mActionListener, TEST_PACKAGE_NAME);
+        mWifiServiceImpl.connect(null, TEST_NETWORK_ID, mActionListener);
         mLooper.dispatchAll();
 
         verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(), anyInt());
 
         verify(mConnectHelper).connectToNetwork(
-                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt(), any());
+                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt());
         verify(mContextAsUser, never()).sendBroadcastWithMultiplePermissions(any(), any());
         verify(mWifiMetrics).logUserActionEvent(eq(UserActionEvent.EVENT_MANUAL_CONNECT), anyInt());
     }
@@ -5220,12 +4820,12 @@
         when(mWifiCarrierInfoManager.getBestMatchSubscriptionId(any())).thenReturn(TEST_SUB_ID);
         when(mWifiCarrierInfoManager.isSimReady(TEST_SUB_ID)).thenReturn(false);
 
-        mWifiServiceImpl.connect(null, TEST_NETWORK_ID, mActionListener, TEST_PACKAGE_NAME);
+        mWifiServiceImpl.connect(null, TEST_NETWORK_ID, mActionListener);
         mLooper.dispatchAll();
 
         verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(), anyInt());
 
-        verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt(), any());
+        verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt());
         verify(mContextAsUser, never()).sendBroadcastWithMultiplePermissions(any(), any());
         verify(mWifiMetrics).logUserActionEvent(eq(UserActionEvent.EVENT_MANUAL_CONNECT), anyInt());
     }
@@ -5244,47 +4844,17 @@
         when(mWifiCarrierInfoManager.requiresImsiEncryption(TEST_SUB_ID)).thenReturn(true);
         when(mWifiCarrierInfoManager.isImsiEncryptionInfoAvailable(TEST_SUB_ID)).thenReturn(false);
 
-        mWifiServiceImpl.connect(null, TEST_NETWORK_ID, mActionListener, TEST_PACKAGE_NAME);
+        mWifiServiceImpl.connect(null, TEST_NETWORK_ID, mActionListener);
         mLooper.dispatchAll();
 
         verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(), anyInt());
 
-        verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt(), any());
+        verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt());
         verify(mContextAsUser, never()).sendBroadcastWithMultiplePermissions(any(), any());
         verify(mWifiMetrics).logUserActionEvent(eq(UserActionEvent.EVENT_MANUAL_CONNECT), anyInt());
     }
 
     /**
-     * Verify that connecting to an admin restricted network fails to connect but saves the network
-     */
-    @Test
-    public void connectToAdminRestrictedNetwork_failure() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true);
-        NetworkUpdateResult result = new NetworkUpdateResult(TEST_NETWORK_ID);
-        when(mWifiConfigManager.addOrUpdateNetwork(eq(mWifiConfig), anyInt()))
-                .thenReturn(result);
-        when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(mWifiConfig);
-        when(mWifiPermissionsUtil.isAdminRestrictedNetwork(mWifiConfig)).thenReturn(true);
-
-        mWifiServiceImpl.connect(mWifiConfig, WifiConfiguration.INVALID_NETWORK_ID,
-                mActionListener, TEST_PACKAGE_NAME);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<WifiConfiguration> configCaptor =
-                ArgumentCaptor.forClass(WifiConfiguration.class);
-        verify(mWifiConfigManager).addOrUpdateNetwork(configCaptor.capture(), anyInt());
-        assertThat(configCaptor.getValue().networkId).isEqualTo(TEST_NETWORK_ID);
-
-        verify(mWifiConfigManager).addOrUpdateNetwork(eq(mWifiConfig), anyInt());
-        verify(mClientModeManager, never()).connectNetwork(any(), any(), anyInt(), any());
-        verify(mActionListener).onFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
-        verify(mActionListener, never()).onSuccess();
-    }
-
-    /**
      * Verify that the SAVE_NETWORK message received from an app with
      * one of the privileged permission is forwarded to ClientModeManager.
      */
@@ -5293,13 +4863,11 @@
         when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
             anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
-        when(mWifiConfigManager.updateBeforeSaveNetwork(any(), anyInt(), any()))
+        when(mWifiConfigManager.updateBeforeSaveNetwork(any(), anyInt()))
                 .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
-        mWifiServiceImpl.save(mock(WifiConfiguration.class), mock(IActionListener.class),
-                TEST_PACKAGE_NAME);
+        mWifiServiceImpl.save(mock(WifiConfiguration.class), mock(IActionListener.class));
         mLooper.dispatchAll();
-        verify(mWifiConfigManager).updateBeforeSaveNetwork(any(WifiConfiguration.class), anyInt(),
-                any());
+        verify(mWifiConfigManager).updateBeforeSaveNetwork(any(WifiConfiguration.class), anyInt());
         verify(mWifiMetrics).logUserActionEvent(eq(UserActionEvent.EVENT_ADD_OR_UPDATE_NETWORK),
                 anyInt());
     }
@@ -5311,15 +4879,15 @@
         when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true);
 
         NetworkUpdateResult result = new NetworkUpdateResult(TEST_NETWORK_ID);
-        when(mWifiConfigManager.updateBeforeSaveNetwork(eq(mWifiConfig), anyInt(), any()))
+        when(mWifiConfigManager.updateBeforeSaveNetwork(eq(mWifiConfig), anyInt()))
                 .thenReturn(result);
 
-        mWifiServiceImpl.save(mWifiConfig, mActionListener, TEST_PACKAGE_NAME);
+        mWifiServiceImpl.save(mWifiConfig, mActionListener);
         mLooper.dispatchAll();
 
-        verify(mWifiConfigManager).updateBeforeSaveNetwork(eq(mWifiConfig), anyInt(), any());
+        verify(mWifiConfigManager).updateBeforeSaveNetwork(eq(mWifiConfig), anyInt());
 
-        verify(mClientModeManager).saveNetwork(eq(result), any(), anyInt(), any());
+        verify(mClientModeManager).saveNetwork(eq(result), any(), anyInt());
         verify(mContextAsUser).sendBroadcastWithMultiplePermissions(
                 mIntentCaptor.capture(),
                 aryEq(new String[]{
@@ -5339,18 +4907,18 @@
     public void saveNetwork_failure() throws Exception {
         when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
                 anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mWifiConfigManager.updateBeforeSaveNetwork(eq(mWifiConfig), anyInt(), any()))
+        when(mWifiConfigManager.updateBeforeSaveNetwork(eq(mWifiConfig), anyInt()))
                 .thenReturn(NetworkUpdateResult.makeFailed());
         when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true);
 
-        mWifiServiceImpl.save(mWifiConfig, mActionListener, TEST_PACKAGE_NAME);
+        mWifiServiceImpl.save(mWifiConfig, mActionListener);
         mLooper.dispatchAll();
 
-        verify(mWifiConfigManager).updateBeforeSaveNetwork(eq(mWifiConfig), anyInt(), any());
+        verify(mWifiConfigManager).updateBeforeSaveNetwork(eq(mWifiConfig), anyInt());
 
-        verify(mClientModeManager, never()).saveNetwork(any(), any(), anyInt(), any());
+        verify(mClientModeManager, never()).saveNetwork(any(), any(), anyInt());
         verify(mContext, never()).sendBroadcastWithMultiplePermissions(any(), any());
-        verify(mActionListener).onFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+        verify(mActionListener).onFailure(WifiManager.ERROR);
         verify(mActionListener, never()).onSuccess();
     }
 
@@ -5388,8 +4956,7 @@
 
         verify(mWifiConfigManager).removeNetwork(eq(TEST_NETWORK_ID), anyInt(), any());
         verify(mActionListener).onSuccess();
-        verify(mActionListener, never())
-                .onFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+        verify(mActionListener, never()).onFailure(WifiManager.ERROR);
 
         verify(mContextAsUser).sendBroadcastWithMultiplePermissions(
                 mIntentCaptor.capture(),
@@ -5421,8 +4988,7 @@
 
         verify(mWifiConfigManager).removeNetwork(eq(TEST_NETWORK_ID), anyInt(), any());
         verify(mActionListener).onSuccess();
-        verify(mActionListener, never())
-                .onFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+        verify(mActionListener, never()).onFailure(WifiManager.ERROR);
 
         verify(mContextAsUser).sendBroadcastWithMultiplePermissions(
                 mIntentCaptor.capture(),
@@ -5451,7 +5017,7 @@
         mLooper.dispatchAll();
 
         verify(mActionListener, never()).onSuccess();
-        verify(mActionListener).onFailure(WifiManager.ActionListener.FAILURE_INTERNAL_ERROR);
+        verify(mActionListener).onFailure(WifiManager.ERROR);
         verify(mWifiConfigManager).removeNetwork(eq(TEST_NETWORK_ID), anyInt(), any());
         verify(mContextAsUser, never()).sendBroadcastWithMultiplePermissions(any(), any());
     }
@@ -5923,7 +5489,7 @@
         verify(mWifiConfigManager).resetSimNetworks();
         verify(mWifiConfigManager).stopRestrictingAutoJoinToSubscriptionId();
         verify(mSimRequiredNotifier, never()).dismissSimRequiredNotification();
-        verify(mWifiNetworkSuggestionsManager).updateCarrierPrivilegedApps();
+        verify(mWifiNetworkSuggestionsManager).resetCarrierPrivilegedApps();
         verify(mWifiConfigManager, never()).removeAllEphemeralOrPasspointConfiguredNetworks();
         verify(mWifiNetworkSuggestionsManager).resetSimNetworkSuggestions();
         verify(mPasspointManager).resetSimPasspointNetwork();
@@ -5953,7 +5519,7 @@
         verify(mWifiNetworkSuggestionsManager, never()).resetSimNetworkSuggestions();
         verify(mWifiConfigManager, never()).stopRestrictingAutoJoinToSubscriptionId();
         verify(mSimRequiredNotifier).dismissSimRequiredNotification();
-        verify(mWifiNetworkSuggestionsManager).updateCarrierPrivilegedApps();
+        verify(mWifiNetworkSuggestionsManager).resetCarrierPrivilegedApps();
         verify(mWifiConfigManager, never()).removeAllEphemeralOrPasspointConfiguredNetworks();
         verify(mWifiConfigManager).enableTemporaryDisabledNetworks();
         verify(mWifiConnectivityManager).forceConnectivityScan(any());
@@ -5978,8 +5544,8 @@
         verify(mWifiConfigManager).resetSimNetworks();
         verify(mWifiConfigManager).stopRestrictingAutoJoinToSubscriptionId();
         verify(mSimRequiredNotifier, never()).dismissSimRequiredNotification();
-        verify(mWifiNetworkSuggestionsManager).updateCarrierPrivilegedApps();
-        verify(mWifiConfigManager).removeEphemeralCarrierNetworks(anySet());
+        verify(mWifiNetworkSuggestionsManager).resetCarrierPrivilegedApps();
+        verify(mWifiConfigManager).removeEphemeralCarrierNetworks();
         verify(mWifiNetworkSuggestionsManager).resetSimNetworkSuggestions();
         verify(mPasspointManager).resetSimPasspointNetwork();
         verify(mWifiDataStall).resetPhoneStateListener();
@@ -6187,17 +5753,16 @@
     public void testAddOrUpdateNetworkIsNotAllowedForAppsTargetingQSdk() throws Exception {
         doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
                 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
+        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any())).thenReturn(
                 new NetworkUpdateResult(0));
 
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         mLooper.startAutoDispatch();
-        assertEquals(-1,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(-1, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         verifyCheckChangePermission(TEST_PACKAGE_NAME);
-        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any());
         verify(mWifiMetrics, never()).incrementNumAddOrUpdateNetworkCalls();
     }
 
@@ -6208,109 +5773,22 @@
     public void testAddOrUpdateNetworkIsAllowedForAppsTargetingBelowQSdk() throws Exception {
         doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
                 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
+        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any())).thenReturn(
                 new NetworkUpdateResult(0));
         when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
                 eq(Build.VERSION_CODES.Q), anyInt())).thenReturn(true);
 
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         mLooper.startAutoDispatch();
-        assertEquals(0,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(0, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         verifyCheckChangePermission(TEST_PACKAGE_NAME);
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any());
         verify(mWifiMetrics).incrementNumAddOrUpdateNetworkCalls();
     }
 
     /**
-     * Verify that add or update networks is not allowed for apps targeting below Q SDK
-     * when DISALLOW_ADD_WIFI_CONFIG user restriction is set.
-     */
-    @Test
-    public void testAddOrUpdateNetworkIsNotAllowedForAppsTargetingBelowQSdkWithUserRestriction()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
-                new NetworkUpdateResult(0));
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.Q), anyInt())).thenReturn(true);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_ADD_WIFI_CONFIG),
-                any())).thenReturn(true);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        mLooper.startAutoDispatch();
-        assertEquals(-1,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        verifyCheckChangePermission(TEST_PACKAGE_NAME);
-        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
-        verify(mWifiMetrics, never()).incrementNumAddOrUpdateNetworkCalls();
-    }
-
-    /**
-     * Verify that add or update networks is not allowed for camera app when
-     * DISALLOW_CONFIG_WIFI user restriction is set.
-     */
-    @Test
-    public void testAddOrUpdateNetworkIsNotAllowedForCameraDisallowConfigWifi() throws Exception {
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(true);
-        when(mWifiPermissionsUtil.checkCameraPermission(Binder.getCallingUid())).thenReturn(true);
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(false);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
-                new NetworkUpdateResult(0));
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_CONFIG_WIFI),
-                any())).thenReturn(true);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        mLooper.startAutoDispatch();
-        assertEquals(-1,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        verifyCheckChangePermission(TEST_PACKAGE_NAME);
-        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
-        verify(mWifiMetrics, never()).incrementNumAddOrUpdateNetworkCalls();
-    }
-
-    /**
-     * Verify that add or update networks is not allowed for camera app when
-     * DISALLOW_ADD_WIFI_CONFIG user restriction is set.
-     */
-    @Test
-    public void testAddOrUpdateNetworkIsNotAllowedForCameraDisallowAddWifiConfig()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(true);
-        when(mWifiPermissionsUtil.checkCameraPermission(Binder.getCallingUid())).thenReturn(true);
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(false);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
-                new NetworkUpdateResult(0));
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_ADD_WIFI_CONFIG),
-                any())).thenReturn(true);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        mLooper.startAutoDispatch();
-        assertEquals(-1,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        verifyCheckChangePermission(TEST_PACKAGE_NAME);
-        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
-        verify(mWifiMetrics, never()).incrementNumAddOrUpdateNetworkCalls();
-    }
-
-    /**
      * Verify that add or update networks is allowed for settings app.
      */
     @Test
@@ -6318,13 +5796,12 @@
         when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
                 anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
         mApplicationInfo.targetSdkVersion = Build.VERSION_CODES.P;
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
+        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any())).thenReturn(
                 new NetworkUpdateResult(0));
 
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         mLooper.startAutoDispatch();
-        assertEquals(0,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(0, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         // Ensure that we don't check for change permission.
@@ -6332,7 +5809,7 @@
                 android.Manifest.permission.CHANGE_WIFI_STATE, "WifiService");
         verify(mAppOpsManager, never()).noteOp(
                 AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any());
         verify(mWifiMetrics).incrementNumAddOrUpdateNetworkCalls();
     }
 
@@ -6344,17 +5821,16 @@
         doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
                 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
         when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(true);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
+        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any())).thenReturn(
                 new NetworkUpdateResult(0));
 
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         mLooper.startAutoDispatch();
-        assertEquals(0,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(0, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         verifyCheckChangePermission(TEST_PACKAGE_NAME);
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any());
         verify(mWifiMetrics).incrementNumAddOrUpdateNetworkCalls();
     }
 
@@ -6365,7 +5841,7 @@
     public void testAddOrUpdateNetworkIsAllowedForAppsWithSystemAlertPermission() throws Exception {
         doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
                 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
+        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any())).thenReturn(
                 new NetworkUpdateResult(0));
 
         when(mWifiPermissionsUtil.checkSystemAlertWindowPermission(
@@ -6373,13 +5849,12 @@
 
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         mLooper.startAutoDispatch();
-        assertEquals(0,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(0, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         verifyCheckChangePermission(TEST_PACKAGE_NAME);
         verify(mWifiPermissionsUtil).checkSystemAlertWindowPermission(anyInt(), anyString());
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any());
         verify(mWifiMetrics).incrementNumAddOrUpdateNetworkCalls();
     }
 
@@ -6392,19 +5867,16 @@
                 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
         when(mWifiPermissionsUtil.isDeviceOwner(Binder.getCallingUid(), TEST_PACKAGE_NAME))
                 .thenReturn(true);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
+        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any())).thenReturn(
                 new NetworkUpdateResult(0));
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(true);
 
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         mLooper.startAutoDispatch();
-        assertEquals(0,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(0, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         verifyCheckChangePermission(TEST_PACKAGE_NAME);
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any());
         verify(mWifiMetrics).incrementNumAddOrUpdateNetworkCalls();
     }
 
@@ -6417,55 +5889,28 @@
                 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
         when(mWifiPermissionsUtil.isProfileOwner(Binder.getCallingUid(), TEST_PACKAGE_NAME))
                 .thenReturn(true);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
-                new NetworkUpdateResult(0));
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(true);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        mLooper.startAutoDispatch();
-        assertEquals(0,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        verifyCheckChangePermission(TEST_PACKAGE_NAME);
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
-        verify(mWifiMetrics).incrementNumAddOrUpdateNetworkCalls();
-    }
-
-    /**
-     * Verify that add or update networks is allowed for an admin app.
-     */
-    @Test
-    public void testAddOrUpdateNetworkIsAllowedForAdminApp() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(true);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
+        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any())).thenReturn(
                 new NetworkUpdateResult(0));
 
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         mLooper.startAutoDispatch();
-        assertEquals(0,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(0, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         verifyCheckChangePermission(TEST_PACKAGE_NAME);
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any());
         verify(mWifiMetrics).incrementNumAddOrUpdateNetworkCalls();
     }
 
     private void verifyAddOrUpdateNetworkPrivilegedDoesNotThrowException() {
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false)))
+        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString()))
                 .thenReturn(new NetworkUpdateResult(0));
         mLooper.startAutoDispatch();
         mWifiServiceImpl.addOrUpdateNetworkPrivileged(config, TEST_PACKAGE_NAME);
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any());
         verify(mWifiMetrics).incrementNumAddOrUpdateNetworkCalls();
     }
 
@@ -6504,11 +5949,21 @@
     }
 
     /**
-     * Verify that an admin app is allowed to call addOrUpdateNetworkPrivileged.
+     * Verify that a Device Owner (DO) app is allowed to call addOrUpdateNetworkPrivileged.
      */
     @Test
-    public void testAddOrUpdateNetworkPrivilegedIsAllowedForAdminApp() throws Exception {
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
+    public void testAddOrUpdateNetworkPrivilegedIsAllowedForDOApp() throws Exception {
+        when(mWifiPermissionsUtil.isDeviceOwner(Binder.getCallingUid(), TEST_PACKAGE_NAME))
+                .thenReturn(true);
+        verifyAddOrUpdateNetworkPrivilegedDoesNotThrowException();
+    }
+
+    /**
+     * Verify that a Profile Owner (PO) app is allowed to call addOrUpdateNetworkPrivileged.
+     */
+    @Test
+    public void testAddOrUpdateNetworkPrivilegedIsAllowedForPOApp() throws Exception {
+        when(mWifiPermissionsUtil.isProfileOwner(Binder.getCallingUid(), TEST_PACKAGE_NAME))
                 .thenReturn(true);
         verifyAddOrUpdateNetworkPrivilegedDoesNotThrowException();
     }
@@ -6520,7 +5975,7 @@
     @Test
     public void testAddOrUpdateNetworkInvalidConfiguration() throws Exception {
         when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(true);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false)))
+        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString()))
                 .thenReturn(new NetworkUpdateResult(-1));
         WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
         mLooper.startAutoDispatch();
@@ -6545,18 +6000,18 @@
 
         doAnswer(new AnswerWithArguments() {
             public void answer(NetworkUpdateResult result, ActionListenerWrapper callback,
-                    int callingUid, String packageName) {
+                    int callingUid) {
                 callback.sendSuccess(); // return success
             }
         }).when(mConnectHelper).connectToNetwork(
-                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt(), any());
+                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt());
 
         mLooper.startAutoDispatch();
         assertTrue(mWifiServiceImpl.enableNetwork(TEST_NETWORK_ID, true, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatch();
 
         verify(mConnectHelper).connectToNetwork(
-                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt(), any());
+                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt());
         verify(mWifiMetrics).incrementNumEnableNetworkCalls();
     }
 
@@ -6575,18 +6030,18 @@
 
         doAnswer(new AnswerWithArguments() {
             public void answer(NetworkUpdateResult result, ActionListenerWrapper callback,
-                    int callingUid, String packageName) {
+                    int callingUid) {
                 callback.sendSuccess(); // return success
             }
         }).when(mConnectHelper).connectToNetwork(
-                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt(), any());
+                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt());
 
         mLooper.startAutoDispatch();
         assertTrue(mWifiServiceImpl.enableNetwork(TEST_NETWORK_ID, true, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatch();
 
         verify(mConnectHelper).connectToNetwork(
-                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt(), any());
+                eq(new NetworkUpdateResult(TEST_NETWORK_ID)), any(), anyInt());
         verify(mWifiMetrics).incrementNumEnableNetworkCalls();
     }
 
@@ -6625,28 +6080,7 @@
         mWifiServiceImpl.enableNetwork(TEST_NETWORK_ID, true, TEST_PACKAGE_NAME);
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
-        verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt(), any());
-        verify(mWifiMetrics, never()).incrementNumEnableNetworkCalls();
-    }
-
-    /**
-     * Verify that enableNetwork is not allowed for admin restricted network
-     */
-    @Test
-    public void testEnableNetworkNotAllowedForAdminRestrictedNetwork() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isSystem(TEST_PACKAGE_NAME, Process.myUid())).thenReturn(true);
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(config);
-        when(mWifiPermissionsUtil.isAdminRestrictedNetwork(config)).thenReturn(true);
-
-        mLooper.startAutoDispatch();
-        mWifiServiceImpl.enableNetwork(TEST_NETWORK_ID, true, TEST_PACKAGE_NAME);
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt(), any());
+        verify(mConnectHelper, never()).connectToNetwork(any(), any(), anyInt());
         verify(mWifiMetrics, never()).incrementNumEnableNetworkCalls();
     }
 
@@ -6678,122 +6112,6 @@
     }
 
     /**
-     * Ensure that we invoke {@link WifiNetworkSuggestionsManager} to add network
-     * suggestions for carrier app when DISALLOW_ADD_WIFI_CONFIG user restriction is set.
-     */
-    @Test
-    public void testAddNetworkSuggestionsIsAllowedForCarrierAppWithUserRestriction() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiNetworkSuggestionsManager.add(any(), anyInt(), anyString(),
-                nullable(String.class))).thenReturn(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_ADD_WIFI_CONFIG),
-                any())).thenReturn(true);
-        when(mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(anyString())).thenReturn(
-                TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS);
-
-        mLooper.startAutoDispatch();
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiServiceImpl.addNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME,
-                        TEST_FEATURE_ID));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        verify(mWifiNetworkSuggestionsManager).add(
-                any(), eq(Binder.getCallingUid()), eq(TEST_PACKAGE_NAME), eq(TEST_FEATURE_ID));
-    }
-
-    /**
-     * Ensure that we invoke {@link WifiNetworkSuggestionsManager} to add network
-     * suggestions for privileged app when DISALLOW_ADD_WIFI_CONFIG user restriction is set.
-     */
-    @Test
-    public void testAddNetworkSuggestionsIsAllowedForPrivilegedAppWithUserRestriction() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiNetworkSuggestionsManager.add(any(), anyInt(), anyString(),
-                nullable(String.class))).thenReturn(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_ADD_WIFI_CONFIG),
-                any())).thenReturn(true);
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-
-        mLooper.startAutoDispatch();
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiServiceImpl.addNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME,
-                        TEST_FEATURE_ID));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        verify(mWifiNetworkSuggestionsManager).add(
-                any(), eq(Binder.getCallingUid()), eq(TEST_PACKAGE_NAME), eq(TEST_FEATURE_ID));
-    }
-
-    /**
-     * Ensure that we invoke {@link WifiNetworkSuggestionsManager} to add network
-     * suggestions for system app when DISALLOW_ADD_WIFI_CONFIG user restriction is set.
-     */
-    @Test
-    public void testAddNetworkSuggestionsIsAllowedForSystemAppWithUserRestriction() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiNetworkSuggestionsManager.add(any(), anyInt(), anyString(),
-                nullable(String.class))).thenReturn(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_ADD_WIFI_CONFIG),
-                any())).thenReturn(true);
-        when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(true);
-
-        mLooper.startAutoDispatch();
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiServiceImpl.addNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME,
-                        TEST_FEATURE_ID));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        verify(mWifiNetworkSuggestionsManager).add(
-                any(), eq(Binder.getCallingUid()), eq(TEST_PACKAGE_NAME), eq(TEST_FEATURE_ID));
-    }
-
-    /**
-     * Ensure that we invoke {@link WifiNetworkSuggestionsManager} to add network
-     * suggestions for admin app when DISALLOW_ADD_WIFI_CONFIG user restriction is set.
-     */
-    @Test
-    public void testAddNetworkSuggestionsIsAllowedForAdminAppWithUserRestriction() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiNetworkSuggestionsManager.add(any(), anyInt(), anyString(),
-                nullable(String.class))).thenReturn(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_ADD_WIFI_CONFIG),
-                any())).thenReturn(true);
-        when(mWifiPermissionsUtil.isAdmin(anyInt(), anyString())).thenReturn(true);
-
-        mLooper.startAutoDispatch();
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiServiceImpl.addNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME,
-                        TEST_FEATURE_ID));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        verify(mWifiNetworkSuggestionsManager).add(
-                any(), eq(Binder.getCallingUid()), eq(TEST_PACKAGE_NAME), eq(TEST_FEATURE_ID));
-    }
-
-    /**
-     * Ensure that we don't invoke {@link WifiNetworkSuggestionsManager} to add network
-     * suggestions for normal app when DISALLOW_ADD_WIFI_CONFIG user restriction is set.
-     */
-    @Test
-    public void testAddNetworkSuggestionsIsNotAllowedForNormalAppWithUserRestriction() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiNetworkSuggestionsManager.add(any(), anyInt(), anyString(),
-                nullable(String.class))).thenReturn(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_ADD_WIFI_CONFIG),
-                any())).thenReturn(true);
-
-        mLooper.startAutoDispatch();
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_RESTRICTED_BY_ADMIN,
-                mWifiServiceImpl.addNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME,
-                        TEST_FEATURE_ID));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        verify(mWifiNetworkSuggestionsManager, never()).add(any(), eq(Binder.getCallingUid()),
-                eq(TEST_PACKAGE_NAME), eq(TEST_FEATURE_ID));
-    }
-
-    /**
      * Ensure that we don't invoke {@link WifiNetworkSuggestionsManager} to add network
      * suggestions when the looper sync call times out.
      */
@@ -6817,25 +6135,22 @@
      */
     @Test
     public void testRemoveNetworkSuggestions() {
-        when(mWifiNetworkSuggestionsManager.remove(any(), anyInt(), anyString(), anyInt()))
+        when(mWifiNetworkSuggestionsManager.remove(any(), anyInt(), anyString()))
                 .thenReturn(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID);
         mLooper.startAutoDispatch();
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID,
-                mWifiServiceImpl.removeNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME,
-                        ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                mWifiServiceImpl.removeNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
-        when(mWifiNetworkSuggestionsManager.remove(any(), anyInt(), anyString(),
-                anyInt()))
+        when(mWifiNetworkSuggestionsManager.remove(any(), anyInt(), anyString()))
                 .thenReturn(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS);
         mLooper.startAutoDispatch();
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiServiceImpl.removeNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME,
-                        ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                mWifiServiceImpl.removeNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         verify(mWifiNetworkSuggestionsManager, times(2)).remove(any(), anyInt(),
-                eq(TEST_PACKAGE_NAME), eq(ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                eq(TEST_PACKAGE_NAME));
     }
 
     /**
@@ -6848,26 +6163,11 @@
 
         mLooper.startAutoDispatch();
         assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL,
-                mWifiServiceImpl.removeNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME,
-                ACTION_REMOVE_SUGGESTION_DISCONNECT));
+                mWifiServiceImpl.removeNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         verify(mWifiNetworkSuggestionsManager, never()).remove(any(), anyInt(),
-                eq(TEST_PACKAGE_NAME), eq(ACTION_REMOVE_SUGGESTION_DISCONNECT));
-    }
-
-    /**
-     * Ensure that we don't invoke {@link WifiNetworkSuggestionsManager} to remove network
-     * suggestions when the action is invalid.
-     */
-    @Test
-    public void testRemoveNetworkSuggestionsFailureWithInvalidAction() {
-        mLooper.startAutoDispatch();
-        assertEquals(WifiManager.STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID,
-                mWifiServiceImpl.removeNetworkSuggestions(mock(List.class), TEST_PACKAGE_NAME, 0));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-        verify(mWifiNetworkSuggestionsManager, never()).remove(any(), anyInt(),
-                eq(TEST_PACKAGE_NAME), anyInt());
+                eq(TEST_PACKAGE_NAME));
     }
 
     @Test(expected = SecurityException.class)
@@ -6885,8 +6185,8 @@
     @Test
     public void testRemoveNonCallerConfiguredNetworks_NetworksRemoved() {
         final int callerUid = Binder.getCallingUid();
-        when(mWifiPermissionsUtil.isOrganizationOwnedDeviceAdmin(
-                Binder.getCallingUid(), TEST_PACKAGE_NAME)).thenReturn(true);
+        when(mWifiPermissionsUtil.isDeviceOwner(Binder.getCallingUid(), TEST_PACKAGE_NAME))
+                .thenReturn(true);
 
         mLooper.startAutoDispatch();
         mWifiServiceImpl.removeNonCallerConfiguredNetworks(TEST_PACKAGE_NAME);
@@ -7148,7 +6448,9 @@
         // For these tests, always use distinct interface names for LOHS and tethered.
         mLohsInterfaceName = WIFI_IFACE_NAME2;
 
+        mLooper.startAutoDispatch();
         setupLocalOnlyHotspot();
+        mLooper.stopAutoDispatchAndIgnoreExceptions();
         reset(mActiveModeWarden);
 
         when(mActiveModeWarden.canRequestMoreSoftApManagers(
@@ -7401,8 +6703,6 @@
                 eq(Build.VERSION_CODES.R), anyInt())).thenReturn(false);
         when(mWifiPermissionsUtil.isDeviceOwner(Binder.getCallingUid(), TEST_PACKAGE_NAME))
                 .thenReturn(true);
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(true);
         PasspointConfiguration config = new PasspointConfiguration();
         HomeSp homeSp = new HomeSp();
         homeSp.setFqdn("test.com");
@@ -7429,98 +6729,6 @@
                 eq(Build.VERSION_CODES.R), anyInt())).thenReturn(false);
         when(mWifiPermissionsUtil.isProfileOwner(Binder.getCallingUid(), TEST_PACKAGE_NAME))
                 .thenReturn(true);
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(true);
-        PasspointConfiguration config = new PasspointConfiguration();
-        HomeSp homeSp = new HomeSp();
-        homeSp.setFqdn("test.com");
-        config.setHomeSp(homeSp);
-
-        when(mPasspointManager.addOrUpdateProvider(
-                config, Binder.getCallingUid(), TEST_PACKAGE_NAME, false, true))
-                .thenReturn(true);
-        mLooper.startAutoDispatch();
-        assertTrue(mWifiServiceImpl.addOrUpdatePasspointConfiguration(config, TEST_PACKAGE_NAME));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-        verify(mPasspointManager).addOrUpdateProvider(any(), anyInt(), anyString(), anyBoolean(),
-                anyBoolean());
-    }
-
-    /**
-     * Verify that addOrUpdatePasspointConfiguration is not allowed for apps targeting below R SDK
-     * when the DISALLOW_ADD_WIFI_CONFIG user restriction is set.
-     */
-    @Test
-    public void addOrUpdatePasspointConfigIsNotAllowedForAppsTargetingBelowRSdkWithUserRestriction()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.R), anyInt())).thenReturn(true);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_ADD_WIFI_CONFIG),
-                any())).thenReturn(true);
-        PasspointConfiguration config = new PasspointConfiguration();
-        HomeSp homeSp = new HomeSp();
-        homeSp.setFqdn("test.com");
-        config.setHomeSp(homeSp);
-
-        when(mPasspointManager.addOrUpdateProvider(
-                config, Binder.getCallingUid(), TEST_PACKAGE_NAME, false, true))
-                .thenReturn(true);
-        mLooper.startAutoDispatch();
-        assertFalse(mWifiServiceImpl.addOrUpdatePasspointConfiguration(config, TEST_PACKAGE_NAME));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-        verify(mPasspointManager, never())
-                .addOrUpdateProvider(any(), anyInt(), anyString(), anyBoolean(), anyBoolean());
-    }
-
-    /**
-     * Verify that addOrUpdatePasspointConfiguration is not allowed for system apps
-     * when the DISALLOW_ADD_WIFI_CONFIG user restriction is set.
-     */
-    @Test
-    public void addOrUpdatePasspointConfigIsNotAllowedForSystemAppWithUserRestriction()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.R), anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(true);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_ADD_WIFI_CONFIG),
-                any())).thenReturn(true);
-        PasspointConfiguration config = new PasspointConfiguration();
-        HomeSp homeSp = new HomeSp();
-        homeSp.setFqdn("test.com");
-        config.setHomeSp(homeSp);
-
-        when(mPasspointManager.addOrUpdateProvider(
-                config, Binder.getCallingUid(), TEST_PACKAGE_NAME, false, true))
-                .thenReturn(true);
-        mLooper.startAutoDispatch();
-        assertFalse(mWifiServiceImpl.addOrUpdatePasspointConfiguration(config, TEST_PACKAGE_NAME));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-        verify(mPasspointManager, never())
-                .addOrUpdateProvider(any(), anyInt(), anyString(), anyBoolean(), anyBoolean());
-    }
-
-    /**
-     * Verify that addOrUpdatePasspointConfiguration is allowed for admin apps
-     * when the DISALLOW_ADD_WIFI_CONFIG user restriction is set.
-     */
-    @Test
-    public void addOrUpdatePasspointConfigIsAllowedSystemAlertAdminAppWithUserRestriction()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.R), anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.isAdmin(Binder.getCallingUid(), TEST_PACKAGE_NAME))
-                .thenReturn(true);
-        when(mUserManager.hasUserRestrictionForUser(eq(UserManager.DISALLOW_ADD_WIFI_CONFIG),
-                any())).thenReturn(true);
         PasspointConfiguration config = new PasspointConfiguration();
         HomeSp homeSp = new HomeSp();
         homeSp.setFqdn("test.com");
@@ -7577,118 +6785,17 @@
         assertFalse(succeeded);
     }
 
-    @Test(expected = SecurityException.class)
-    public void testAllowAutojoinGlobalFailureNoPermission() throws Exception {
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(false);
-        when(mWifiPermissionsUtil.isDeviceOwner(anyInt(), anyString())).thenReturn(false);
-        when(mWifiPermissionsUtil.isProfileOwner(anyInt(), anyString())).thenReturn(false);
-        mWifiServiceImpl.allowAutojoinGlobal(true);
-    }
-
     @Test
-    public void testAllowAutojoinGlobalWithPermission() throws Exception {
-        // verify allowAutojoinGlobal with MANAGE_WIFI_NETWORK_SELECTION
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(true);
-        when(mWifiPermissionsUtil.isDeviceOwner(anyInt(), anyString())).thenReturn(false);
-        when(mWifiPermissionsUtil.isProfileOwner(anyInt(), anyString())).thenReturn(false);
-        mWifiServiceImpl.allowAutojoinGlobal(true);
-
-        // verify allowAutojoinGlobal with NETWORK_SETTINGS
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(false);
-        when(mWifiPermissionsUtil.isDeviceOwner(anyInt(), anyString())).thenReturn(false);
-        when(mWifiPermissionsUtil.isProfileOwner(anyInt(), anyString())).thenReturn(false);
-        mWifiServiceImpl.allowAutojoinGlobal(true);
-
-        // verify allowAutojoinGlobal with DO
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(false);
-        when(mWifiPermissionsUtil.isDeviceOwner(anyInt(), anyString())).thenReturn(true);
-        when(mWifiPermissionsUtil.isProfileOwner(anyInt(), anyString())).thenReturn(false);
-        mWifiServiceImpl.allowAutojoinGlobal(true);
-
-        // verify allowAutojoinGlobal with PO
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(false);
-        when(mWifiPermissionsUtil.isDeviceOwner(anyInt(), anyString())).thenReturn(false);
-        when(mWifiPermissionsUtil.isProfileOwner(anyInt(), anyString())).thenReturn(true);
-        mWifiServiceImpl.allowAutojoinGlobal(true);
-    }
-
-    @Test
-    public void testQueryAutojoinGlobal_Exceptions() {
-        // good inputs should result in no exceptions.
-        IBooleanListener listener = mock(IBooleanListener.class);
-        // null listener ==> IllegalArgumentException
-        assertThrows(IllegalArgumentException.class,
-                () -> mWifiServiceImpl.queryAutojoinGlobal(null));
-
-        // No permission ==> SecurityException
-        assertThrows(SecurityException.class,
-                () -> mWifiServiceImpl.queryAutojoinGlobal(listener));
-    }
-
-    @Test
-    public void testQueryAutojoinGlobal_GoodCase() throws RemoteException {
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
-        IBooleanListener listener = mock(IBooleanListener.class);
-
-        InOrder inOrder = inOrder(listener);
-        when(mWifiConnectivityManager.getAutoJoinEnabledExternal()).thenReturn(true);
-        mWifiServiceImpl.queryAutojoinGlobal(listener);
-        mLooper.dispatchAll();
-        inOrder.verify(listener).onResult(true);
-
-        when(mWifiConnectivityManager.getAutoJoinEnabledExternal()).thenReturn(false);
-        mWifiServiceImpl.queryAutojoinGlobal(listener);
-        mLooper.dispatchAll();
-        inOrder.verify(listener).onResult(false);
-    }
-
-    @Test(expected = SecurityException.class)
-    public void testSetSsidsDoNotBlocklist_NoPermission() throws Exception {
-        // by default no permissions are given so the call should fail.
-        mWifiServiceImpl.setSsidsAllowlist(TEST_PACKAGE_NAME,
-                Collections.EMPTY_LIST);
-    }
-
-    @Test
-    public void testSetSsidsDoNotBlocklist_WithPermission() throws Exception {
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
-
-        // verify setting an empty list
-        mWifiServiceImpl.setSsidsAllowlist(TEST_PACKAGE_NAME,
-                Collections.EMPTY_LIST);
-        mLooper.dispatchAll();
-        verify(mWifiBlocklistMonitor).setSsidsAllowlist(Collections.EMPTY_LIST);
-
-        // verify setting a list of valid SSIDs
-        List<WifiSsid> expectedSsids = new ArrayList<>();
-        expectedSsids.add(WifiSsid.fromString(TEST_SSID_WITH_QUOTES));
-        mWifiServiceImpl.setSsidsAllowlist(TEST_PACKAGE_NAME, expectedSsids);
-        mLooper.dispatchAll();
-        verify(mWifiBlocklistMonitor).setSsidsAllowlist(expectedSsids);
-    }
-
-    @Test
-    public void testSetSsidsDoNotBlocklist_WithPermissionAndroidT()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(true);
-
-        List<WifiSsid> expectedSsids = new ArrayList<>();
-        expectedSsids.add(WifiSsid.fromString(TEST_SSID_WITH_QUOTES));
-        mWifiServiceImpl.setSsidsAllowlist(TEST_PACKAGE_NAME, expectedSsids);
-        mLooper.dispatchAll();
-        verify(mWifiBlocklistMonitor).setSsidsAllowlist(expectedSsids);
+    public void testAllowAutojoinGlobalFailureNoNetworkSettingsPermission() throws Exception {
+        doThrow(new SecurityException()).when(mContext)
+                .enforceCallingOrSelfPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
+                        eq("WifiService"));
+        try {
+            mWifiServiceImpl.allowAutojoinGlobal(true);
+            fail("Expected SecurityException");
+        } catch (SecurityException e) {
+            // Test succeeded
+        }
     }
 
     @Test
@@ -7831,9 +6938,6 @@
 
         verify(mWifiNetworkFactory).register();
         verify(mUntrustedWifiNetworkFactory).register();
-        verify(mOemWifiNetworkFactory).register();
-        verify(mRestrictedWifiNetworkFactory).register();
-        verify(mMultiInternetWifiNetworkFactory).register();
         verify(mPasspointManager).initializeProvisioner(any());
         verify(mWifiP2pConnection).handleBootCompleted();
         verify(mWifiCountryCode).registerListener(any(WifiCountryCode.ChangeListener.class));
@@ -8023,7 +7127,7 @@
      */
     @Test
     public void getWifiActivityEnergyInfoAsyncFeatureUnsupported() throws Exception {
-        when(mWifiNative.getSupportedFeatureSet(anyString())).thenReturn(0L);
+        when(mClientModeManager.getSupportedFeatures()).thenReturn(0L);
         mLooper.startAutoDispatch();
         mWifiServiceImpl.getWifiActivityEnergyInfoAsync(mOnWifiActivityEnergyInfoListener);
         mLooper.stopAutoDispatch();
@@ -8036,7 +7140,7 @@
      */
     @Test
     public void getWifiActivityEnergyInfoAsyncSuccess() throws Exception {
-        when(mWifiNative.getSupportedFeatureSet(anyString())).thenReturn(Long.MAX_VALUE);
+        when(mClientModeManager.getSupportedFeatures()).thenReturn(Long.MAX_VALUE);
         setupReportActivityInfo();
         mLooper.startAutoDispatch();
         mWifiServiceImpl.getWifiActivityEnergyInfoAsync(mOnWifiActivityEnergyInfoListener);
@@ -8049,6 +7153,9 @@
 
     @Test
     public void testCarrierConfigChangeUpdateSoftApCapability() throws Exception {
+        MockitoSession staticMockSession = mockitoSession()
+                .mockStatic(SubscriptionManager.class)
+                .startMocking();
         lenient().when(SubscriptionManager.getActiveDataSubscriptionId())
                 .thenReturn(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID);
         mWifiServiceImpl.checkAndStartWifi();
@@ -8063,12 +7170,15 @@
         Intent intent = new Intent(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED);
         mBroadcastReceiverCaptor.getValue().onReceive(mContext, intent);
         mLooper.dispatchAll();
-        verify(mActiveModeWarden).updateSoftApCapability(any(),
-                eq(WifiManager.IFACE_IP_MODE_TETHERED));
+        verify(mActiveModeWarden).updateSoftApCapability(any());
+        staticMockSession.finishMocking();
     }
 
     @Test
     public void testPhoneActiveDataSubscriptionIdChangedUpdateSoftApCapability() throws Exception {
+        MockitoSession staticMockSession = mockitoSession()
+                .mockStatic(SubscriptionManager.class)
+                .startMocking();
         lenient().when(SubscriptionManager.getActiveDataSubscriptionId())
                 .thenReturn(SubscriptionManager.DEFAULT_SUBSCRIPTION_ID);
         mWifiServiceImpl.checkAndStartWifi();
@@ -8086,8 +7196,8 @@
         assertNotNull(mPhoneStateListener);
         mPhoneStateListener.onActiveDataSubscriptionIdChanged(2);
         mLooper.dispatchAll();
-        verify(mActiveModeWarden).updateSoftApCapability(any(),
-                eq(WifiManager.IFACE_IP_MODE_TETHERED));
+        verify(mActiveModeWarden).updateSoftApCapability(any());
+        staticMockSession.finishMocking();
     }
 
     /**
@@ -8214,78 +7324,12 @@
         verify(mActiveModeWarden).clearWifiConnectedNetworkScorer();
     }
 
-    /**
-     * Verify that a call to addWifiCustomDhcpOptions throws a SecurityException if
-     * the caller does not have NETWORK_SETTINGS or OVERRIDE_WIFI_CONFIG permission.
-     */
-    @Test
-    public void testAddCustomDhcpOptionsThrowsSecurityExceptionOnMissingPermissions() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mContext.checkCallingOrSelfPermission(android.Manifest.permission.NETWORK_SETTINGS))
-                .thenReturn(PackageManager.PERMISSION_DENIED);
-        when(mContext.checkCallingOrSelfPermission(
-                android.Manifest.permission.OVERRIDE_WIFI_CONFIG))
-                .thenReturn(PackageManager.PERMISSION_DENIED);
-        try {
-            mWifiServiceImpl.addCustomDhcpOptions(WifiSsid.fromString(TEST_SSID_WITH_QUOTES),
-                    TEST_OUI, new ArrayList<DhcpOption>());
-            fail("expected SecurityException");
-        } catch (SecurityException expected) {
-        }
-    }
-
-    /**
-     * Verify that a call to removeWifiCustomDhcpOptions throws a SecurityException if
-     * the caller does not have NETWORK_SETTINGS or OVERRIDE_WIFI_CONFIG permission.
-     */
-    @Test
-    public void testRemoveCustomDhcpOptionsThrowsSecurityExceptionOnMissingPermissions() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mContext.checkCallingOrSelfPermission(android.Manifest.permission.NETWORK_SETTINGS))
-                .thenReturn(PackageManager.PERMISSION_DENIED);
-        when(mContext.checkCallingOrSelfPermission(
-                android.Manifest.permission.OVERRIDE_WIFI_CONFIG))
-                .thenReturn(PackageManager.PERMISSION_DENIED);
-        try {
-            mWifiServiceImpl.removeCustomDhcpOptions(WifiSsid.fromString(TEST_SSID_WITH_QUOTES),
-                    TEST_OUI);
-            fail("expected SecurityException");
-        } catch (SecurityException expected) {
-        }
-    }
-
-    /**
-     * Verify that addWifiCustomDhcpOptions adds DHCP option.
-     */
-    @Test
-    public void testAddCustomDhcpOptionsAndVerify() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        mWifiServiceImpl.addCustomDhcpOptions(WifiSsid.fromString(TEST_SSID_WITH_QUOTES), TEST_OUI,
-                new ArrayList<DhcpOption>());
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager).addCustomDhcpOptions(
-                WifiSsid.fromString(TEST_SSID_WITH_QUOTES), TEST_OUI, new ArrayList<DhcpOption>());
-    }
-
-    /**
-     * Verify that removeWifiCustomDhcpOptions removes DHCP option.
-     */
-    @Test
-    public void testRemoveCustomDhcpOptionsAndVerify() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        mWifiServiceImpl.removeCustomDhcpOptions(WifiSsid.fromString(TEST_SSID_WITH_QUOTES),
-                TEST_OUI);
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager).removeCustomDhcpOptions(
-                WifiSsid.fromString(TEST_SSID_WITH_QUOTES), TEST_OUI);
-    }
-
     private long testGetSupportedFeaturesCaseForRtt(
-            long supportedFeaturesFromWifiNative, boolean rttDisabled) {
+            long supportedFeaturesFromClientModeManager, boolean rttDisabled) {
         when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI_RTT)).thenReturn(
                 !rttDisabled);
-        when(mWifiNative.getSupportedFeatureSet(anyString()))
-                .thenReturn(supportedFeaturesFromWifiNative);
+        when(mClientModeManager.getSupportedFeatures())
+                .thenReturn(supportedFeaturesFromClientModeManager);
         mLooper.startAutoDispatch();
         long supportedFeatures = mWifiServiceImpl.getSupportedFeatures();
         mLooper.stopAutoDispatchAndIgnoreExceptions();
@@ -8331,7 +7375,7 @@
     }
 
     private long testGetSupportedFeaturesCaseForMacRandomization(
-            long supportedFeaturesFromWifiNative, boolean apMacRandomizationEnabled,
+            long supportedFeaturesFromClientModeManager, boolean apMacRandomizationEnabled,
             boolean staConnectedMacRandomizationEnabled, boolean p2pMacRandomizationEnabled) {
         when(mResources.getBoolean(
                 R.bool.config_wifi_connected_mac_randomization_supported))
@@ -8342,8 +7386,8 @@
         when(mResources.getBoolean(
                 R.bool.config_wifi_p2p_mac_randomization_supported))
                 .thenReturn(p2pMacRandomizationEnabled);
-        when(mWifiNative.getSupportedFeatureSet(anyString()))
-                .thenReturn(supportedFeaturesFromWifiNative);
+        when(mClientModeManager.getSupportedFeatures())
+                .thenReturn(supportedFeaturesFromClientModeManager);
         mLooper.startAutoDispatch();
         long supportedFeatures = mWifiServiceImpl.getSupportedFeatures();
         mLooper.stopAutoDispatchAndIgnoreExceptions();
@@ -8392,21 +7436,21 @@
      */
     @Test
     public void syncGetSupportedFeaturesForStaApConcurrency() {
-        long supportedFeaturesFromWifiNative = WifiManager.WIFI_FEATURE_OWE;
-        when(mWifiNative.getSupportedFeatureSet(anyString()))
-                .thenReturn(supportedFeaturesFromWifiNative);
+        long supportedFeaturesFromClientModeManager = WifiManager.WIFI_FEATURE_OWE;
+        when(mClientModeManager.getSupportedFeatures())
+                .thenReturn(supportedFeaturesFromClientModeManager);
 
         when(mActiveModeWarden.isStaApConcurrencySupported())
                 .thenReturn(false);
         mLooper.startAutoDispatch();
-        assertEquals(supportedFeaturesFromWifiNative,
+        assertEquals(supportedFeaturesFromClientModeManager,
                         mWifiServiceImpl.getSupportedFeatures());
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         when(mActiveModeWarden.isStaApConcurrencySupported())
                 .thenReturn(true);
         mLooper.startAutoDispatch();
-        assertEquals(supportedFeaturesFromWifiNative | WifiManager.WIFI_FEATURE_AP_STA,
+        assertEquals(supportedFeaturesFromClientModeManager | WifiManager.WIFI_FEATURE_AP_STA,
                 mWifiServiceImpl.getSupportedFeatures());
         mLooper.stopAutoDispatchAndIgnoreExceptions();
     }
@@ -8436,24 +7480,12 @@
     @Test
     public void testStartTemporarilyDisablingAllNonCarrierMergedWifi() {
         assumeTrue(SdkLevel.isAtLeastS());
-        List<ClientModeManager> cmmList = new ArrayList<>();
-        ConcreteClientModeManager localOnlyCmm = mock(ConcreteClientModeManager.class);
-        ConcreteClientModeManager secondaryTransientCmm = mock(ConcreteClientModeManager.class);
-        when(localOnlyCmm.getRole()).thenReturn(ROLE_CLIENT_LOCAL_ONLY);
-        when(secondaryTransientCmm.getRole()).thenReturn(ROLE_CLIENT_SECONDARY_TRANSIENT);
-        cmmList.add(mClientModeManager);
-        cmmList.add(localOnlyCmm);
-        cmmList.add(secondaryTransientCmm);
-        when(mActiveModeWarden.getClientModeManagers()).thenReturn(cmmList);
         when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETUP_WIZARD),
                 anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-
         mWifiServiceImpl.startRestrictingAutoJoinToSubscriptionId(1);
         mLooper.dispatchAll();
         verify(mWifiConfigManager).startRestrictingAutoJoinToSubscriptionId(1);
         verify(mWifiConnectivityManager).clearCachedCandidates();
-        verify(localOnlyCmm, never()).disconnect();
-        verify(secondaryTransientCmm).disconnect();
         verify(mClientModeManager).disconnect();
     }
 
@@ -8489,29 +7521,6 @@
         verify(mWifiConfigManager).stopRestrictingAutoJoinToSubscriptionId();
     }
 
-    @Test(expected = SecurityException.class)
-    public void testGetCountryCodeThrowsException() {
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.checkCallersCoarseLocationPermission(
-                any(), any(), anyInt(), any())).thenReturn(false);
-        mWifiServiceImpl.getCountryCode(TEST_PACKAGE_NAME, TEST_FEATURE_ID);
-    }
-
-    @Test
-    public void testGetCountryCode() {
-        // verify get country code with network settings permission.
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
-        when(mWifiPermissionsUtil.checkCallersCoarseLocationPermission(
-                any(), any(), anyInt(), any())).thenReturn(false);
-        mWifiServiceImpl.getCountryCode(TEST_PACKAGE_NAME, TEST_FEATURE_ID);
-
-        // verify get country code with coarse location permission.
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.checkCallersCoarseLocationPermission(
-                any(), any(), anyInt(), any())).thenReturn(true);
-        mWifiServiceImpl.getCountryCode(TEST_PACKAGE_NAME, TEST_FEATURE_ID);
-    }
-
     /**
      * Verifies that syncGetSupportedFeatures() adds capabilities based on interface
      * combination.
@@ -8520,26 +7529,26 @@
     public void syncGetSupportedFeaturesForStaStaConcurrency() {
         assumeTrue(SdkLevel.isAtLeastS());
 
-        long supportedFeaturesFromWifiNative = WifiManager.WIFI_FEATURE_OWE;
-        when(mWifiNative.getSupportedFeatureSet(anyString()))
-                .thenReturn(supportedFeaturesFromWifiNative);
+        long supportedFeaturesFromClientModeManager = WifiManager.WIFI_FEATURE_OWE;
+        when(mClientModeManager.getSupportedFeatures())
+                .thenReturn(supportedFeaturesFromClientModeManager);
 
         mLooper.startAutoDispatch();
-        assertEquals(supportedFeaturesFromWifiNative,
+        assertEquals(supportedFeaturesFromClientModeManager,
                 mWifiServiceImpl.getSupportedFeatures());
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         when(mActiveModeWarden.isStaStaConcurrencySupportedForLocalOnlyConnections())
                 .thenReturn(true);
         mLooper.startAutoDispatch();
-        assertEquals(supportedFeaturesFromWifiNative
+        assertEquals(supportedFeaturesFromClientModeManager
                         | WifiManager.WIFI_FEATURE_ADDITIONAL_STA_LOCAL_ONLY,
                 mWifiServiceImpl.getSupportedFeatures());
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         when(mActiveModeWarden.isStaStaConcurrencySupportedForMbb()).thenReturn(true);
         mLooper.startAutoDispatch();
-        assertEquals(supportedFeaturesFromWifiNative
+        assertEquals(supportedFeaturesFromClientModeManager
                         | WifiManager.WIFI_FEATURE_ADDITIONAL_STA_LOCAL_ONLY
                         | WifiManager.WIFI_FEATURE_ADDITIONAL_STA_MBB,
                 mWifiServiceImpl.getSupportedFeatures());
@@ -8547,14 +7556,11 @@
 
         when(mActiveModeWarden.isStaStaConcurrencySupportedForRestrictedConnections())
                 .thenReturn(true);
-        when(mActiveModeWarden.isStaStaConcurrencySupportedForMultiInternet())
-                .thenReturn(true);
         mLooper.startAutoDispatch();
-        assertEquals(supportedFeaturesFromWifiNative
+        assertEquals(supportedFeaturesFromClientModeManager
                         | WifiManager.WIFI_FEATURE_ADDITIONAL_STA_LOCAL_ONLY
                         | WifiManager.WIFI_FEATURE_ADDITIONAL_STA_MBB
-                        | WifiManager.WIFI_FEATURE_ADDITIONAL_STA_RESTRICTED
-                        | WifiManager.WIFI_FEATURE_ADDITIONAL_STA_MULTI_INTERNET,
+                        | WifiManager.WIFI_FEATURE_ADDITIONAL_STA_RESTRICTED,
                 mWifiServiceImpl.getSupportedFeatures());
         mLooper.stopAutoDispatchAndIgnoreExceptions();
     }
@@ -8660,7 +7666,7 @@
     }
 
     private List<ScanResult> createScanResultList() {
-        return Collections.singletonList(new ScanResult(WifiSsid.fromUtf8Text(TEST_SSID),
+        return Collections.singletonList(new ScanResult(WifiSsid.createFromAsciiEncoded(TEST_SSID),
                 TEST_SSID, TEST_BSSID, 1245, 0, TEST_CAP, -78, 2450, 1025, 22, 33, 20, 0, 0, true));
     }
 
@@ -8686,10 +7692,9 @@
 
     @Test
     public void testDumpShouldDumpWakeupController() {
-        mWifiServiceImpl.checkAndStartWifi();
-        mLooper.dispatchAll();
+        mLooper.startAutoDispatch();
         mWifiServiceImpl.dump(new FileDescriptor(), new PrintWriter(new StringWriter()), null);
-        mLooper.dispatchAll();
+        mLooper.stopAutoDispatchAndIgnoreExceptions();
         verify(mWakeupController).dump(any(), any(), any());
     }
 
@@ -9155,8 +8160,10 @@
                 anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
 
         // First set flag to not allow
-        when(mWifiGlobals.isInsecureEnterpriseConfigurationAllowed()).thenReturn(false);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any(), eq(false))).thenReturn(
+        when(mResources.getBoolean(
+                R.bool.config_wifiAllowInsecureEnterpriseConfigurationsForSettingsAndSUW))
+                .thenReturn(false);
+        when(mWifiConfigManager.addOrUpdateNetwork(any(),  anyInt(), any())).thenReturn(
                 new NetworkUpdateResult(0));
 
         // Create an insecure Enterprise network
@@ -9166,20 +8173,20 @@
 
         // Verify operation fails
         mLooper.startAutoDispatch();
-        assertEquals(-1,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(-1, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
-        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any());
 
         // Set flag to allow
-        when(mWifiGlobals.isInsecureEnterpriseConfigurationAllowed()).thenReturn(true);
+        when(mResources.getBoolean(
+                R.bool.config_wifiAllowInsecureEnterpriseConfigurationsForSettingsAndSUW))
+                .thenReturn(true);
 
         // Verify operation succeeds
         mLooper.startAutoDispatch();
-        assertEquals(0,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(0, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager).addOrUpdateNetwork(any(),  anyInt(), any());
     }
 
 
@@ -9192,7 +8199,9 @@
     @Test
     public void testAddInsecureEnterpirseNetworkWithNoNetworkSettingsPerm() throws Exception {
         // First set flag to not allow
-        when(mWifiGlobals.isInsecureEnterpriseConfigurationAllowed()).thenReturn(false);
+        when(mResources.getBoolean(
+                R.bool.config_wifiAllowInsecureEnterpriseConfigurationsForSettingsAndSUW))
+                .thenReturn(false);
 
         // Create an insecure Enterprise network
         WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
@@ -9201,25 +8210,25 @@
 
         // Verify operation fails
         mLooper.startAutoDispatch();
-        assertEquals(-1,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(-1, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
-        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any());
 
         // Set flag to allow
-        when(mWifiGlobals.isInsecureEnterpriseConfigurationAllowed()).thenReturn(true);
+        when(mResources.getBoolean(
+                R.bool.config_wifiAllowInsecureEnterpriseConfigurationsForSettingsAndSUW))
+                .thenReturn(true);
 
         // Verify operation still fails
         mLooper.startAutoDispatch();
-        assertEquals(-1,
-                mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution));
+        assertEquals(-1, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME));
         mLooper.stopAutoDispatchAndIgnoreExceptions();
-        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any(), eq(false));
+        verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(),  anyInt(), any());
     }
 
     private List<WifiConfiguration> setupMultiTypeConfigs(
             long featureFlags, boolean saeAutoUpgradeEnabled, boolean oweAutoUpgradeEnabled) {
-        when(mWifiNative.getSupportedFeatureSet(anyString())).thenReturn(featureFlags);
+        when(mClientModeManager.getSupportedFeatures()).thenReturn(featureFlags);
         when(mWifiGlobals.isWpa3SaeUpgradeEnabled()).thenReturn(saeAutoUpgradeEnabled);
         when(mWifiGlobals.isOweUpgradeEnabled()).thenReturn(oweAutoUpgradeEnabled);
 
@@ -9305,8 +8314,7 @@
         ParceledListSlice<WifiConfiguration> configs =
                 mWifiServiceImpl.getConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID, false);
         ParceledListSlice<WifiConfiguration> privilegedConfigs =
-                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID,
-                        mExtras);
+                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID);
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         List<WifiConfiguration> expectedConfigs = generateExpectedConfigs(
@@ -9337,8 +8345,7 @@
         ParceledListSlice<WifiConfiguration> configs =
                 mWifiServiceImpl.getConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID, false);
         ParceledListSlice<WifiConfiguration> privilegedConfigs =
-                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID,
-                        mExtras);
+                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID);
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         List<WifiConfiguration> expectedConfigs = generateExpectedConfigs(
@@ -9369,8 +8376,7 @@
         ParceledListSlice<WifiConfiguration> configs =
                 mWifiServiceImpl.getConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID, false);
         ParceledListSlice<WifiConfiguration> privilegedConfigs =
-                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID,
-                        mExtras);
+                mWifiServiceImpl.getPrivilegedConfiguredNetworks(TEST_PACKAGE, TEST_FEATURE_ID);
         mLooper.stopAutoDispatchAndIgnoreExceptions();
 
         List<WifiConfiguration> expectedConfigs = generateExpectedConfigs(
@@ -9380,1201 +8386,4 @@
         WifiConfigurationTestUtil.assertConfigurationsEqualForBackup(
                 expectedConfigs, privilegedConfigs.getList());
     }
-
-    private void trySetTargetSdkToT() {
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                    eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(false);
-        }
-    }
-
-    @Test (expected = SecurityException.class)
-    public void testGetPrivilegedConnectedNetworkNoPermission() {
-        trySetTargetSdkToT();
-        if (SdkLevel.isAtLeastT()) {
-            doThrow(new SecurityException())
-                    .when(mWifiPermissionsUtil).enforceNearbyDevicesPermission(
-                            any(), anyBoolean(), any());
-        } else {
-            doThrow(new SecurityException()).when(mWifiPermissionsUtil)
-                    .enforceCanAccessScanResults(any(), any(), anyInt(), any());
-        }
-
-        mWifiServiceImpl.getPrivilegedConnectedNetwork(TEST_PACKAGE_NAME, TEST_FEATURE_ID, mExtras);
-        mLooper.dispatchAll();
-    }
-
-    @Test
-    public void testGetPrivilegedConnectedNetworkNotConnected() {
-        trySetTargetSdkToT();
-        when(mClientModeManager.syncRequestConnectionInfo()).thenReturn(new WifiInfo());
-
-        mLooper.startAutoDispatch();
-        assertNull(mWifiServiceImpl.getPrivilegedConnectedNetwork(
-                TEST_PACKAGE_NAME, TEST_FEATURE_ID, mExtras));
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil).enforceNearbyDevicesPermission(any(), eq(true), any());
-        } else {
-            verify(mWifiPermissionsUtil).enforceCanAccessScanResults(any(), any(), anyInt(), any());
-        }
-    }
-
-    @Test
-    public void testGetPrivilegedConnectedNetworkSuccess() {
-        // mock testConfig as the currently connected network
-        trySetTargetSdkToT();
-        WifiConfiguration testConfig = WifiConfigurationTestUtil.createPskSaeNetwork();
-        testConfig.networkId = TEST_NETWORK_ID;
-        testConfig.setRandomizedMacAddress(TEST_FACTORY_MAC_ADDR);
-        WifiInfo wifiInfo = new WifiInfo();
-        wifiInfo.setNetworkId(testConfig.networkId);
-        when(mClientModeManager.syncRequestConnectionInfo()).thenReturn(wifiInfo);
-        when(mWifiConfigManager.getConfiguredNetworkWithPassword(testConfig.networkId)).thenReturn(
-                testConfig);
-
-        mLooper.startAutoDispatch();
-        WifiConfiguration result = mWifiServiceImpl.getPrivilegedConnectedNetwork(
-                TEST_PACKAGE_NAME, TEST_FEATURE_ID, mExtras);
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil).enforceNearbyDevicesPermission(any(), eq(true), any());
-        } else {
-            verify(mWifiPermissionsUtil).enforceCanAccessScanResults(any(), any(), anyInt(), any());
-        }
-        verify(mWifiConfigManager).getConfiguredNetworkWithPassword(testConfig.networkId);
-        // verify the credentials match
-        assertEquals(testConfig.networkId, result.networkId);
-        assertEquals(testConfig.SSID, result.SSID);
-        assertEquals(testConfig.preSharedKey, result.preSharedKey);
-        // verify the randomized MAC address is filtered out
-        assertEquals(WifiInfo.DEFAULT_MAC_ADDRESS, result.getRandomizedMacAddress().toString());
-    }
-
-    /**
-     * Verify that a call to isWifiPasspointEnabled throws a SecurityException if the
-     * caller does not have the ACCESS_WIFI_STATE permission.
-     */
-    @Test (expected = SecurityException.class)
-    public void testIsWifiPasspointEnabledWithoutPermissions() {
-        doThrow(new SecurityException()).when(mContext)
-                .enforceCallingOrSelfPermission(eq(ACCESS_WIFI_STATE),
-                        eq("WifiService"));
-
-        mWifiServiceImpl.isWifiPasspointEnabled();
-    }
-
-    /**
-     * Verify that the call to setWifiPasspointEnabled is not redirected to
-     * specific API when the caller doesn't have
-     * NETWORK_SETTINGS permissions and NETWORK_SETUP_WIZARD.
-     */
-    @Test(expected = SecurityException.class)
-    public void testSetWifiPasspointEnabledWithoutPermissions() {
-        mLooper.startAutoDispatch();
-        mWifiServiceImpl.setWifiPasspointEnabled(false);
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-    }
-
-    /**
-     * Verify that the call to setWifiPasspointEnabled is redirected to
-     * specific API when the caller have
-     * NETWORK_SETTINGS permissions and NETWORK_SETUP_WIZARD.
-     */
-    @Test
-    public void testSetWifiPasspointEnabledWithPermissions() {
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        mLooper.startAutoDispatch();
-        mWifiServiceImpl.setWifiPasspointEnabled(false);
-        mLooper.dispatchAll();
-        mLooper.stopAutoDispatchAndIgnoreExceptions();
-        verify(mPasspointManager).setWifiPasspointEnabled(false);
-    }
-
-    @Test(expected = SecurityException.class)
-    public void testSetScreenOnScanSchedule_NoPermission() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(false);
-        mWifiServiceImpl.setScreenOnScanSchedule(null, null);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testSetScreenOnScanSchedule_BadInput1() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(true);
-        // test that both arrays need to be null or non-null. Never one null one non-null.
-        mWifiServiceImpl.setScreenOnScanSchedule(null, new int[] {1});
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testSetScreenOnScanSchedule_BadInput2() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(true);
-        // test that the input should not be empty arrays.
-        mWifiServiceImpl.setScreenOnScanSchedule(new int[0], new int[0]);
-    }
-
-    @Test
-    public void testSetScreenOnScanSchedule_Success() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(true);
-        int[] expectedSchedule = new int[] {20, 40, 80};
-        int[] expectedType = new int[] {2, 2, 1};
-        mWifiServiceImpl.setScreenOnScanSchedule(expectedSchedule, expectedType);
-        mLooper.dispatchAll();
-        verify(mWifiConnectivityManager).setExternalScreenOnScanSchedule(
-                expectedSchedule, expectedType);
-        verify(mLastCallerInfoManager).put(eq(WifiManager.API_SET_SCAN_SCHEDULE), anyInt(),
-                anyInt(), anyInt(), any(), eq(true));
-
-        mWifiServiceImpl.setScreenOnScanSchedule(null, null);
-        mLooper.dispatchAll();
-        verify(mWifiConnectivityManager).setExternalScreenOnScanSchedule(null, null);
-        verify(mLastCallerInfoManager).put(eq(WifiManager.API_SET_SCAN_SCHEDULE), anyInt(),
-                anyInt(), anyInt(), any(), eq(false));
-    }
-
-    @Test
-    public void testSetOneShotScreenOnConnectivityScanDelayMillis() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        int delayMs = 1234;
-
-        // verify permission checks
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(false);
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt()))
-                .thenReturn(false);
-        assertThrows(SecurityException.class,
-                () -> mWifiServiceImpl.setOneShotScreenOnConnectivityScanDelayMillis(delayMs));
-
-        // verify correct input
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(true);
-        assertThrows(IllegalArgumentException.class,
-                () -> mWifiServiceImpl.setOneShotScreenOnConnectivityScanDelayMillis(-1));
-
-        // verify correct call
-        mWifiServiceImpl.setOneShotScreenOnConnectivityScanDelayMillis(delayMs);
-        mLooper.dispatchAll();
-        verify(mWifiConnectivityManager).setOneShotScreenOnConnectivityScanDelayMillis(delayMs);
-    }
-
-    @Test(expected = SecurityException.class)
-    public void testSetExternalPnoScanRequest_NoPermission() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        IPnoScanResultsCallback callback = mock(IPnoScanResultsCallback.class);
-        List<WifiSsid> ssids = new ArrayList<>();
-        ssids.add(WifiSsid.fromString("\"TEST_SSID_1\""));
-        int[] frequencies = new int[] {TEST_AP_FREQUENCY};
-
-        mWifiServiceImpl.setExternalPnoScanRequest(mAppBinder, callback, ssids, frequencies,
-                TEST_PACKAGE_NAME, TEST_FEATURE_ID);
-    }
-
-    @Test
-    public void testSetExternalPnoScanRequest_Success() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiNative.getSupportedFeatureSet(anyString()))
-                .thenReturn(WifiManager.WIFI_FEATURE_PNO);
-        when(mWifiPermissionsUtil.checkRequestCompanionProfileAutomotiveProjectionPermission(
-                anyInt())).thenReturn(true);
-        when(mWifiPermissionsUtil.checkCallersLocationPermission(
-                any(), any(), anyInt(), anyBoolean(), any())).thenReturn(true);
-        IPnoScanResultsCallback callback = mock(IPnoScanResultsCallback.class);
-        List<WifiSsid> ssids = new ArrayList<>();
-        ssids.add(WifiSsid.fromString("\"TEST_SSID_1\""));
-        int[] frequencies = new int[] {TEST_AP_FREQUENCY};
-
-        mWifiServiceImpl.setExternalPnoScanRequest(mAppBinder, callback, ssids, frequencies,
-                TEST_PACKAGE_NAME, TEST_FEATURE_ID);
-        mLooper.dispatchAll();
-        verify(mWifiConnectivityManager).setExternalPnoScanRequest(anyInt(), any(), any(),
-                eq(callback), eq(ssids), eq(frequencies));
-    }
-
-    @Test
-    public void testSetExternalPnoScanRequest_PnoNotSupported() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiNative.getSupportedFeatureSet(anyString())).thenReturn(0L);
-        when(mWifiPermissionsUtil.checkRequestCompanionProfileAutomotiveProjectionPermission(
-                anyInt())).thenReturn(true);
-        when(mWifiPermissionsUtil.checkCallersLocationPermission(
-                any(), any(), anyInt(), anyBoolean(), any())).thenReturn(true);
-        IPnoScanResultsCallback callback = mock(IPnoScanResultsCallback.class);
-        List<WifiSsid> ssids = new ArrayList<>();
-        ssids.add(WifiSsid.fromString("\"TEST_SSID_1\""));
-        int[] frequencies = new int[] {TEST_AP_FREQUENCY};
-
-        mWifiServiceImpl.setExternalPnoScanRequest(mAppBinder, callback, ssids, frequencies,
-                TEST_PACKAGE_NAME, TEST_FEATURE_ID);
-        mLooper.dispatchAll();
-        verify(callback).onRegisterFailed(WifiManager.PnoScanResultsCallback
-                .REGISTER_PNO_CALLBACK_PNO_NOT_SUPPORTED);
-    }
-
-    @Test
-    public void testClearExternalPnoScanRequest() {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        mWifiServiceImpl.clearExternalPnoScanRequest();
-        mLooper.dispatchAll();
-        verify(mWifiConnectivityManager).clearExternalPnoScanRequest(anyInt());
-    }
-
-    @Test
-    public void testGetLastCallerInfoForApi_Exceptions() {
-        // good inputs should result in no exceptions.
-        ILastCallerListener listener = mock(ILastCallerListener.class);
-        // null listener ==> IllegalArgumentException
-        assertThrows(IllegalArgumentException.class,
-                () -> mWifiServiceImpl.getLastCallerInfoForApi(
-                        WifiManager.API_WIFI_ENABLED, null));
-
-        // invalid ApiType ==> IllegalArgumentException
-        assertThrows(IllegalArgumentException.class,
-                () -> mWifiServiceImpl.getLastCallerInfoForApi(WifiManager.API_MAX + 1, listener));
-
-        // No permission ==> SecurityException
-        assertThrows(SecurityException.class,
-                () -> mWifiServiceImpl.getLastCallerInfoForApi(
-                        WifiManager.API_WIFI_ENABLED, listener));
-    }
-
-    @Test
-    public void testGetLastCallerInfoForApi_GoodCase() throws RemoteException {
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
-        ILastCallerListener listener = mock(ILastCallerListener.class);
-        LastCallerInfoManager.LastCallerInfo expected =
-                new LastCallerInfoManager.LastCallerInfo(0, 1, 2, TEST_PACKAGE_NAME, true);
-        when(mLastCallerInfoManager.get(WifiManager.API_WIFI_ENABLED)).thenReturn(expected);
-
-        InOrder inOrder = inOrder(listener);
-        mWifiServiceImpl.getLastCallerInfoForApi(WifiManager.API_WIFI_ENABLED, listener);
-        mLooper.dispatchAll();
-        inOrder.verify(listener).onResult(TEST_PACKAGE_NAME, true);
-
-        // Verify null is returned as packageName if there's no information about this ApiType.
-        mWifiServiceImpl.getLastCallerInfoForApi(WifiManager.API_SOFT_AP, listener);
-        mLooper.dispatchAll();
-        inOrder.verify(listener).onResult(null, false);
-    }
-
-    /**
-     * Verify that a call to registerDriverCountryCodeChangedListener throws a SecurityException
-     * if the caller doesnot have ACCESS_COARSE_LOCATION permission.
-     */
-    @Test(expected = SecurityException.class)
-    public void registerDriverCountryCodeChangedListenerThrowsSecurityExceptionWithoutPermission() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doThrow(new SecurityException())
-                .when(mWifiPermissionsUtil).enforceCoarseLocationPermission(eq(TEST_PACKAGE_NAME),
-                                                                      eq(TEST_FEATURE_ID),
-                                                                      anyInt());
-        mWifiServiceImpl.registerDriverCountryCodeChangedListener(
-                mIOnWifiDriverCountryCodeChangedListener, TEST_PACKAGE_NAME, TEST_FEATURE_ID);
-    }
-
-    /**
-     * Verify that a call registerDriverCountryCodeChangedListener throws an
-     * IllegalArgumentException if the parameters are not provided.
-     */
-    @Test
-    public void registerDriverCountryCodeChangedListenerThrowsIllegalArgumentException() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        try {
-            mWifiServiceImpl.registerDriverCountryCodeChangedListener(
-                    null, TEST_PACKAGE_NAME, TEST_FEATURE_ID);
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Verifies that we handle driver country code changed listener registration failure if we
-     * encounter an exception while linking to death.
-     */
-    @Test
-    public void registerDriverCountryCodeChangedListenerFailureOnLinkToDeath() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        doThrow(new RemoteException())
-                .when(mAppBinder).linkToDeath(any(IBinder.DeathRecipient.class), anyInt());
-        mWifiServiceImpl.registerDriverCountryCodeChangedListener(
-                mIOnWifiDriverCountryCodeChangedListener, TEST_PACKAGE_NAME, TEST_FEATURE_ID);
-        mLooper.dispatchAll();
-        verify(mIOnWifiDriverCountryCodeChangedListener, never())
-                .onDriverCountryCodeChanged(anyString());
-    }
-
-    /**
-     * Verify that a call to registerDriverCountryCodeChangedListener succeeded.
-     */
-    private void verifyRegisterDriverCountryCodeChangedListenerSucceededAndTriggerListener(
-            IOnWifiDriverCountryCodeChangedListener listener)
-            throws Exception {
-        doNothing()
-                .when(mWifiPermissionsUtil).enforceCoarseLocationPermission(eq(TEST_PACKAGE_NAME),
-                                                                      eq(TEST_FEATURE_ID),
-                                                                      anyInt());
-        when(mWifiCountryCode.getCurrentDriverCountryCode()).thenReturn(TEST_COUNTRY_CODE);
-        mWifiServiceImpl.registerDriverCountryCodeChangedListener(
-                listener, TEST_PACKAGE_NAME, TEST_FEATURE_ID);
-        mLooper.dispatchAll();
-        verify(listener)
-                .onDriverCountryCodeChanged(TEST_COUNTRY_CODE);
-    }
-
-    /**
-     * Verify that DriverCountryCodeChanged will be dropped if register permission was removed.
-     */
-    @Test
-    public void testDriverCountryCodeChangedDropWhenRegisterPermissionRemoved() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.checkCallersCoarseLocationPermission(
-                eq(TEST_PACKAGE_NAME), eq(TEST_FEATURE_ID), anyInt(), any())).thenReturn(true);
-        verifyRegisterDriverCountryCodeChangedListenerSucceededAndTriggerListener(
-                mIOnWifiDriverCountryCodeChangedListener);
-        mWifiServiceImpl.mCountryCodeTracker.onDriverCountryCodeChanged(TEST_NEW_COUNTRY_CODE);
-        mLooper.dispatchAll();
-        verify(mIOnWifiDriverCountryCodeChangedListener)
-                .onDriverCountryCodeChanged(TEST_NEW_COUNTRY_CODE);
-        // remove permission
-        when(mWifiPermissionsUtil.checkCallersCoarseLocationPermission(
-                eq(TEST_PACKAGE_NAME), eq(TEST_FEATURE_ID), anyInt(), any())).thenReturn(false);
-        reset(mIOnWifiDriverCountryCodeChangedListener);
-        mWifiServiceImpl.mCountryCodeTracker.onDriverCountryCodeChanged(TEST_COUNTRY_CODE);
-        mLooper.dispatchAll();
-        verify(mIOnWifiDriverCountryCodeChangedListener, never())
-                .onDriverCountryCodeChanged(TEST_COUNTRY_CODE);
-    }
-
-    /**
-     * Verify that unregisterDriverCountryCodeChangedListener removes listener from registered
-     * listener list
-     */
-    @Test
-    public void unregisterDriverCountryCodeChangedListenerRemovesListener() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.checkCallersCoarseLocationPermission(
-                eq(TEST_PACKAGE_NAME), eq(TEST_FEATURE_ID), anyInt(), any())).thenReturn(true);
-        verifyRegisterDriverCountryCodeChangedListenerSucceededAndTriggerListener(
-                mIOnWifiDriverCountryCodeChangedListener);
-        mWifiServiceImpl.mCountryCodeTracker.onDriverCountryCodeChanged(TEST_NEW_COUNTRY_CODE);
-        mLooper.dispatchAll();
-        verify(mIOnWifiDriverCountryCodeChangedListener)
-                .onDriverCountryCodeChanged(TEST_NEW_COUNTRY_CODE);
-        mWifiServiceImpl.unregisterDriverCountryCodeChangedListener(
-                mIOnWifiDriverCountryCodeChangedListener);
-        mLooper.dispatchAll();
-        reset(mIOnWifiDriverCountryCodeChangedListener);
-        mWifiServiceImpl.mCountryCodeTracker.onDriverCountryCodeChanged(TEST_COUNTRY_CODE);
-        mLooper.dispatchAll();
-        verify(mIOnWifiDriverCountryCodeChangedListener, never())
-                .onDriverCountryCodeChanged(anyString());
-    }
-
-
-    /**
-     * Verify that onFailed is called when enabling Lohs with non-supported configuration.
-     */
-    @Test
-    public void testFailureCallbacksTriggeredWhenSoftApFailsBecauseNonSupportedConfiguration()
-            throws Exception {
-        when(mResources.getBoolean(R.bool.config_wifiSoftap6ghzSupported)).thenReturn(false);
-        setupForCustomLohs();
-        SoftApConfiguration lohsConfig = createValidSoftApConfiguration();
-        SoftApConfiguration customizedConfig = new SoftApConfiguration.Builder(lohsConfig)
-                .setBand(SoftApConfiguration.BAND_6GHZ)
-                .setPassphrase("thisIsABadPassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE)
-                .build();
-        when(mWifiApConfigStore.generateLocalOnlyHotspotConfig(
-                any(), any(), any())).thenReturn(customizedConfig);
-        // Expect the result is registered but it should get failure because non-supported
-        // configuration
-        int result = mWifiServiceImpl.startLocalOnlyHotspot(mLohsCallback, TEST_PACKAGE_NAME,
-                TEST_FEATURE_ID, customizedConfig, mExtras);
-        assertEquals(LocalOnlyHotspotCallback.REQUEST_REGISTERED, result);
-        mLooper.dispatchAll();
-        verify(mLohsCallback).onHotspotFailed(ERROR_GENERIC);
-    }
-    /**
-     * Registers a soft AP callback, then verifies that the current soft AP state and num clients
-     * are sent to caller immediately after callback is registered.
-     */
-    private void registerLohsSoftApCallbackAndVerify(ISoftApCallback callback, Bundle bundle)
-            throws Exception {
-        mWifiServiceImpl.registerLocalOnlyHotspotSoftApCallback(mClientSoftApCallback, bundle);
-        mLooper.dispatchAll();
-        verify(mClientSoftApCallback).onStateChanged(WIFI_AP_STATE_DISABLED, 0);
-        verify(mClientSoftApCallback).onConnectedClientsOrInfoChanged(
-                new HashMap<String, SoftApInfo>(),
-                new HashMap<String, List<WifiClient>>(), false, true);
-        verify(mClientSoftApCallback).onCapabilityChanged(
-                ApConfigUtil.updateCapabilityFromResource(mContext));
-        // Don't need to invoke callback when register.
-        verify(mClientSoftApCallback, never()).onBlockedClientConnecting(any(), anyInt());
-    }
-
-    /**
-     * Verify that unregisterLocalOnlyHotspotSoftApCallback removes callback from registered
-     * callbacks list.
-     */
-    @Test
-    public void unregisterLohsSoftApCallbackRemovesCallback() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        registerLohsSoftApCallbackAndVerify(mClientSoftApCallback, mExtras);
-
-        mWifiServiceImpl.unregisterLocalOnlyHotspotSoftApCallback(mClientSoftApCallback, mExtras);
-        mLooper.dispatchAll();
-
-        reset(mClientSoftApCallback);
-        mLohsApCallback.onConnectedClientsOrInfoChanged(
-                mTestSoftApInfos, mTestSoftApClients, false);
-        mLooper.dispatchAll();
-        verify(mClientSoftApCallback, never()).onConnectedClientsOrInfoChanged(
-                any(), any(), anyBoolean(), anyBoolean());
-    }
-
-    /**
-     * Verify that unregisterLocalOnlyHotspotSoftApCallback is no-op if callback not registered.
-     */
-    @Test
-    public void unregisterLohsSoftApCallbackDoesNotRemoveCallbackIfCallbackNotMatching()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        registerLohsSoftApCallbackAndVerify(mClientSoftApCallback, mExtras);
-
-        mWifiServiceImpl.unregisterLocalOnlyHotspotSoftApCallback(mAnotherSoftApCallback, mExtras);
-        mLooper.dispatchAll();
-        mLohsApCallback.onConnectedClientsOrInfoChanged(
-                mTestSoftApInfos, mTestSoftApClients, false);
-        mLooper.dispatchAll();
-        verify(mClientSoftApCallback).onConnectedClientsOrInfoChanged(
-                eq(mTestSoftApInfos), eq(mTestSoftApClients), eq(false), eq(false));
-    }
-
-    /**
-     * Registers two lohs callbacks, remove one then verify the right callback is being called
-     * on events.
-     */
-    @Test
-    public void correctLohsCallbackIsCalledAfterAddingTwoCallbacksAndRemovingOne()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        WifiClient testWifiClient = new WifiClient(MacAddress.fromString("22:33:44:55:66:77"),
-                WIFI_IFACE_NAME2);
-        registerLohsSoftApCallbackAndVerify(mClientSoftApCallback, mExtras);
-        mLooper.dispatchAll();
-
-        reset(mClientSoftApCallback);
-        when(mClientSoftApCallback.asBinder()).thenReturn(mAppBinder);
-        // Change state from default before registering the second callback
-        mLohsApCallback.onStateChanged(WIFI_AP_STATE_ENABLED, 0);
-        mLohsApCallback.onConnectedClientsOrInfoChanged(
-                mTestSoftApInfos, mTestSoftApClients, false);
-        mLohsApCallback.onBlockedClientConnecting(testWifiClient, 0);
-
-
-        // Register another callback and verify the new state is returned in the immediate callback
-        mWifiServiceImpl.registerLocalOnlyHotspotSoftApCallback(mAnotherSoftApCallback, mExtras);
-        mLooper.dispatchAll();
-        verify(mAnotherSoftApCallback).onStateChanged(WIFI_AP_STATE_ENABLED, 0);
-        verify(mAnotherSoftApCallback).onConnectedClientsOrInfoChanged(
-                eq(mTestSoftApInfos), eq(mTestSoftApClients), eq(false), eq(true));
-        // Verify only first callback will receive onBlockedClientConnecting since it call after
-        // first callback register but before another callback register.
-        verify(mClientSoftApCallback).onBlockedClientConnecting(testWifiClient, 0);
-        verify(mAnotherSoftApCallback, never()).onBlockedClientConnecting(testWifiClient, 0);
-
-        // unregister the fisrt callback
-        mWifiServiceImpl.unregisterLocalOnlyHotspotSoftApCallback(mClientSoftApCallback, mExtras);
-        mLooper.dispatchAll();
-
-        // Update soft AP state and verify the remaining callback receives the event
-        mLohsApCallback.onStateChanged(WIFI_AP_STATE_FAILED,
-                SAP_START_FAILURE_NO_CHANNEL);
-        mLooper.dispatchAll();
-        verify(mClientSoftApCallback, never()).onStateChanged(WIFI_AP_STATE_FAILED,
-                SAP_START_FAILURE_NO_CHANNEL);
-        verify(mAnotherSoftApCallback).onStateChanged(WIFI_AP_STATE_FAILED,
-                SAP_START_FAILURE_NO_CHANNEL);
-    }
-
-    /**
-     * Verify that wifi service registers for lohs callers BinderDeath event
-     */
-    @Test
-    public void registersForBinderDeathOnRegisterLohsSoftApCallback() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        registerLohsSoftApCallbackAndVerify(mClientSoftApCallback, mExtras);
-        verify(mAppBinder).linkToDeath(any(IBinder.DeathRecipient.class), anyInt());
-    }
-
-    /**
-     * Verify that we un-register the lohs soft AP callback on receiving BinderDied event.
-     */
-    @Test
-    public void unregistersLohsSoftApCallbackOnBinderDied() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        ArgumentCaptor<IBinder.DeathRecipient> drCaptor =
-                ArgumentCaptor.forClass(IBinder.DeathRecipient.class);
-        registerLohsSoftApCallbackAndVerify(mClientSoftApCallback, mExtras);
-        verify(mAppBinder).linkToDeath(drCaptor.capture(), anyInt());
-
-        drCaptor.getValue().binderDied();
-        mLooper.dispatchAll();
-        reset(mClientSoftApCallback);
-        // Verify callback is removed from the list as well
-        Map<String, List<WifiClient>> mTestSoftApClients = mock(Map.class);
-        Map<String, SoftApInfo> mTestSoftApInfos = mock(Map.class);
-        mLohsApCallback.onConnectedClientsOrInfoChanged(
-                mTestSoftApInfos, mTestSoftApClients, false);
-        mLooper.dispatchAll();
-        verify(mClientSoftApCallback, never()).onConnectedClientsOrInfoChanged(
-                any(), any(), anyBoolean(), anyBoolean());
-    }
-
-    /**
-     * Verify that a call to registerLocalOnlyHotspotSoftApCallback throws a SecurityException
-     * if the caller target Android T or later and does not have nearby devices permission.
-     */
-    @Test(expected = SecurityException.class)
-    public void testRegisterLocalOnlyHotspotSoftApCallbackThrowsExceptionWithoutPermissionOnT() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(false);
-        doThrow(new SecurityException())
-                .when(mWifiPermissionsUtil).enforceNearbyDevicesPermission(
-                        any(), anyBoolean(), any());
-        mWifiServiceImpl.registerLocalOnlyHotspotSoftApCallback(mClientSoftApCallback, mExtras);
-    }
-
-    /**
-     * Verify that a call to unregisterLocalOnlyHotspotSoftApCallback throws a SecurityException
-     * if the caller targets Android T or later and does not have nearby devices permission.
-     */
-    @Test(expected = SecurityException.class)
-    public void testUnregisterLocalOnlyHotspotSoftApCallbackThrowsExceptionWithoutPermissionOnT() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(false);
-        doThrow(new SecurityException())
-                .when(mWifiPermissionsUtil).enforceNearbyDevicesPermission(
-                        any(), anyBoolean(), any());
-        mWifiServiceImpl.unregisterLocalOnlyHotspotSoftApCallback(mClientSoftApCallback, mExtras);
-    }
-
-    /**
-     * Verify getStaConcurrencyForMultiInternetMode
-     */
-    @Test
-    public void testGetStaConcurrencyForMultiInternetMode() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mMultiInternetManager.getStaConcurrencyForMultiInternetMode()).thenReturn(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_DBS_AP);
-        mLooper.startAutoDispatch();
-        final int mode = mWifiServiceImpl.getStaConcurrencyForMultiInternetMode();
-        verify(mMultiInternetManager).getStaConcurrencyForMultiInternetMode();
-        assertEquals(WifiManager.WIFI_MULTI_INTERNET_MODE_DBS_AP, mode);
-    }
-
-    /**
-     * Verify that a call to setStaConcurrencyForMultiInternetMode throws a SecurityException
-     * if the caller target Android T or later and does not have network settings permission.
-     */
-    @Test(expected = SecurityException.class)
-    public void testSetStaConcurrencyForMultiInternetModeThrowsExceptionWithoutPermissionOnT() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.checkNetworkSetupWizardPermission(anyInt())).thenReturn(false);
-        doThrow(new SecurityException()).when(mContext)
-                .enforceCallingOrSelfPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                                                eq("WifiService"));
-        mLooper.startAutoDispatch();
-        mWifiServiceImpl.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_DBS_AP);
-    }
-
-    /**
-     * Verify setStaConcurrencyForMultiInternetMode
-     */
-    @Test
-    public void testSetStaConcurrencyForMultiInternetMode() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        when(mMultiInternetManager.setStaConcurrencyForMultiInternetMode(anyInt()))
-                .thenReturn(true);
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETUP_WIZARD),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        mLooper.startAutoDispatch();
-        assertTrue(mWifiServiceImpl.setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP));
-        verify(mMultiInternetManager).setStaConcurrencyForMultiInternetMode(
-                WifiManager.WIFI_MULTI_INTERNET_MODE_MULTI_AP);
-    }
-
-    /**
-     * Verify attribution is passed in correctly by WifiManager#addOrUpdateNetwork.
-     */
-    @Test
-    public void testAddOrUpdateNetworkAttribution_InvalidAttributions() {
-        assumeTrue(SdkLevel.isAtLeastS());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.isTrusted(any(Context.class))).thenReturn(true);
-        mAttribution.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, attributionSource);
-        mWifiServiceImpl = spy(mWifiServiceImpl);
-        lenient().when(mWifiServiceImpl.getMockableCallingUid()).thenReturn(Process.SYSTEM_UID);
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork(TEST_SSID);
-        assertThrows(SecurityException.class, () -> {
-            mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, null);
-        });
-
-        assertThrows(SecurityException.class, () -> {
-            mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, new Bundle());
-        });
-
-        assertThrows(SecurityException.class, () -> {
-            Bundle nullEntry = new Bundle();
-            nullEntry.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, null);
-            mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, nullEntry);
-        });
-
-        assertThrows(SecurityException.class, () -> {
-            Bundle incorrectEntry = new Bundle();
-            incorrectEntry.putInt(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, 10);
-            mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, incorrectEntry);
-        });
-
-        when(attributionSource.checkCallingUid()).thenReturn(false);
-        assertThrows(SecurityException.class, () -> {
-            mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution);
-        });
-        when(attributionSource.checkCallingUid()).thenReturn(true); // restore
-
-        // single first attributions should not fail - even if (theoretically, doesn't happen in
-        // practice) are not trusted. I.e. this call checks that this method isn't called.
-        AttributionSource freshAs = mock(AttributionSource.class);
-        Bundle freshAttribution = new Bundle();
-        freshAttribution.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, freshAs);
-        when(freshAs.checkCallingUid()).thenReturn(true);
-        when(freshAs.isTrusted(any(Context.class))).thenReturn(false);
-        mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, freshAttribution);
-        verify(freshAs, never()).isTrusted(any());
-
-        AttributionSource originalCaller = mock(AttributionSource.class);
-        when(originalCaller.getUid()).thenReturn(OTHER_TEST_UID);
-        when(originalCaller.getPackageName()).thenReturn(TEST_PACKAGE_NAME_OTHER);
-        when(originalCaller.isTrusted(any(Context.class))).thenReturn(false);
-        when(attributionSource.getNext()).thenReturn(originalCaller);
-        assertThrows(SecurityException.class, () -> {
-            mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution);
-        });
-    }
-
-    /**
-     * Verify attribution passed to WifiManager#addOrUpdateNetwork is parsed when there's no chain.
-     */
-    @Test
-    public void testAddOrUpdateNetworkAttribution_CorrectParsingNoChainSystemServer() {
-        assumeTrue(SdkLevel.isAtLeastS());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.isTrusted(any(Context.class))).thenReturn(true);
-        mAttribution.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, attributionSource);
-        mWifiServiceImpl = spy(mWifiServiceImpl);
-        lenient().when(mWifiServiceImpl.getMockableCallingUid()).thenReturn(Process.SYSTEM_UID);
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false)))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
-        when(attributionSource.getUid()).thenReturn(Process.SYSTEM_UID);
-        when(attributionSource.getPackageName()).thenReturn(TEST_PACKAGE_NAME);
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork(TEST_SSID);
-
-        mWifiThreadRunner.prepareForAutoDispatch();
-        mLooper.startAutoDispatch();
-        mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution);
-        mLooper.stopAutoDispatch();
-        verify(mWifiConfigManager).addOrUpdateNetwork(config, Process.SYSTEM_UID,
-                TEST_PACKAGE_NAME, false);
-    }
-
-    /**
-     * Verify attribution passed to WifiManager#addOrUpdateNetwork is parsed when there's no chain.
-     */
-    @Test
-    public void testAddOrUpdateNetworkAttribution_CorrectParsingNoChainNonSystemServer() {
-        assumeTrue(SdkLevel.isAtLeastS());
-        mWifiServiceImpl = spy(mWifiServiceImpl);
-        lenient().when(mWifiServiceImpl.getMockableCallingUid()).thenReturn(TEST_UID);
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false)))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork(TEST_SSID);
-
-        mWifiThreadRunner.prepareForAutoDispatch();
-        mLooper.startAutoDispatch();
-        mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, null);
-        mLooper.stopAutoDispatch();
-        verify(mWifiConfigManager).addOrUpdateNetwork(config, TEST_UID, TEST_PACKAGE_NAME, false);
-    }
-
-    /**
-     * Verify attribution passed to WifiManager#addOrUpdateNetwork is parsed when there's a chain.
-     */
-    @Test
-    public void testAddOrUpdateNetworkAttribution_CorrectParsingWithChain() {
-        assumeTrue(SdkLevel.isAtLeastS());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.isTrusted(any(Context.class))).thenReturn(true);
-        mAttribution.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, attributionSource);
-        mWifiServiceImpl = spy(mWifiServiceImpl);
-        lenient().when(mWifiServiceImpl.getMockableCallingUid()).thenReturn(Process.SYSTEM_UID);
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false)))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
-
-        when(attributionSource.getUid()).thenReturn(TEST_UID);
-        when(attributionSource.getPackageName()).thenReturn(TEST_PACKAGE_NAME);
-        AttributionSource originalCaller = mock(AttributionSource.class);
-        when(originalCaller.getUid()).thenReturn(OTHER_TEST_UID);
-        when(originalCaller.getPackageName()).thenReturn(TEST_PACKAGE_NAME_OTHER);
-        when(originalCaller.isTrusted(any(Context.class))).thenReturn(true);
-        when(attributionSource.getNext()).thenReturn(originalCaller);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork(TEST_SSID);
-
-        mWifiThreadRunner.prepareForAutoDispatch();
-        mLooper.startAutoDispatch();
-        mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution);
-        mLooper.stopAutoDispatch();
-        verify(mWifiConfigManager).addOrUpdateNetwork(config, OTHER_TEST_UID,
-                TEST_PACKAGE_NAME_OTHER, false);
-    }
-
-    /**
-     * Verify attribution passed to WifiManager#addOrUpdateNetwork is parsed when there's a chain,
-     * When calling from {@link WifiManager#updateNetwork(WifiConfiguration)}, the creator will be
-     * overridden by original caller.
-     */
-    @Test
-    public void testAddOrUpdateNetworkAttribution_CorrectParsingWithChain_WithUpdateNetwork() {
-        assumeTrue(SdkLevel.isAtLeastS());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.isTrusted(any(Context.class))).thenReturn(true);
-        mAttribution.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, attributionSource);
-        mWifiServiceImpl = spy(mWifiServiceImpl);
-        lenient().when(mWifiServiceImpl.getMockableCallingUid()).thenReturn(Process.SYSTEM_UID);
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString(), eq(true)))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
-
-        when(attributionSource.getUid()).thenReturn(TEST_UID);
-        when(attributionSource.getPackageName()).thenReturn(TEST_PACKAGE_NAME);
-        AttributionSource originalCaller = mock(AttributionSource.class);
-        when(originalCaller.getUid()).thenReturn(OTHER_TEST_UID);
-        when(originalCaller.getPackageName()).thenReturn(TEST_PACKAGE_NAME_OTHER);
-        when(originalCaller.isTrusted(any(Context.class))).thenReturn(true);
-        when(attributionSource.getNext()).thenReturn(originalCaller);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork(TEST_SSID);
-        config.networkId = TEST_NETWORK_ID;
-
-        mWifiThreadRunner.prepareForAutoDispatch();
-        mLooper.startAutoDispatch();
-        mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution);
-        mLooper.stopAutoDispatch();
-        verify(mWifiConfigManager).addOrUpdateNetwork(config, OTHER_TEST_UID,
-                TEST_PACKAGE_NAME_OTHER, true);
-    }
-
-    /**
-     * Verify attribution passed to WifiManager#addOrUpdateNetwork is parsed when there's a chain.
-     * However, if the call is not made from the system server then the attribution is ignored and
-     * the attribution is simply to the calling app as before.
-     */
-    @Test
-    public void testAddOrUpdateNetworkAttribution_CorrectParsingWithChainButNotFromSystemServer() {
-        assumeTrue(SdkLevel.isAtLeastS());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.isTrusted(any(Context.class))).thenReturn(true);
-        mAttribution.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, attributionSource);
-        mWifiServiceImpl = spy(mWifiServiceImpl);
-        lenient().when(mWifiServiceImpl.getMockableCallingUid()).thenReturn(TEST_UID);
-        when(mContext.checkPermission(eq(android.Manifest.permission.NETWORK_SETTINGS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt(), anyString(), eq(false)))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
-
-        when(attributionSource.getUid()).thenReturn(TEST_UID);
-        when(attributionSource.getPackageName()).thenReturn(TEST_PACKAGE_NAME);
-        AttributionSource originalCaller = mock(AttributionSource.class);
-        when(originalCaller.getUid()).thenReturn(OTHER_TEST_UID);
-        when(originalCaller.getPackageName()).thenReturn(TEST_PACKAGE_NAME_OTHER);
-        when(originalCaller.isTrusted(any(Context.class))).thenReturn(true);
-        when(attributionSource.getNext()).thenReturn(originalCaller);
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork(TEST_SSID);
-
-        mWifiThreadRunner.prepareForAutoDispatch();
-        mLooper.startAutoDispatch();
-        mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME, mAttribution);
-        mLooper.stopAutoDispatch();
-        verify(mWifiConfigManager).addOrUpdateNetwork(config, TEST_UID,
-                TEST_PACKAGE_NAME, false);
-    }
-
-    /**
-     * Test that notifyWifiSsidPolicyChanged disconnects the current network
-     * due to SSID allowlist restriction
-     */
-    @Test
-    public void testNotifyWifiSsidPolicyChangedWithAllowlistRestriction()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        WifiInfo wifiInfo = new WifiInfo();
-        wifiInfo.setSSID(WifiSsid.fromUtf8Text(TEST_SSID));
-        wifiInfo.setBSSID(TEST_BSSID);
-        wifiInfo.setNetworkId(TEST_NETWORK_ID);
-        wifiInfo.setCurrentSecurityType(WifiConfiguration.SECURITY_TYPE_PSK);
-
-        when(mContext.checkPermission(eq(android.Manifest.permission.MANAGE_DEVICE_ADMINS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mActiveModeWarden.getClientModeManagers()).thenReturn(
-                Collections.singletonList(mClientModeManager));
-        when(mClientModeManager.syncRequestConnectionInfo()).thenReturn(wifiInfo);
-
-        mWifiServiceImpl.notifyWifiSsidPolicyChanged(WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_ALLOWLIST,
-                Arrays.asList(WifiSsid.fromUtf8Text("SSID")));
-        mLooper.dispatchAll();
-
-        verify(mClientModeManager).disconnect();
-    }
-
-    /**
-     * Test that notifyWifiSsidPolicyChanged disconnects the current network
-     * due to SSID denylist restriction
-     */
-    @Test
-    public void testNotifyWifiSsidPolicyChangedWithDenylistRestriction()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        WifiInfo wifiInfo = new WifiInfo();
-        wifiInfo.setSSID(WifiSsid.fromUtf8Text(TEST_SSID));
-        wifiInfo.setBSSID(TEST_BSSID);
-        wifiInfo.setNetworkId(TEST_NETWORK_ID);
-        wifiInfo.setCurrentSecurityType(WifiConfiguration.SECURITY_TYPE_PSK);
-
-        when(mContext.checkPermission(eq(android.Manifest.permission.MANAGE_DEVICE_ADMINS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mActiveModeWarden.getClientModeManagers()).thenReturn(
-                Collections.singletonList(mClientModeManager));
-        when(mClientModeManager.syncRequestConnectionInfo()).thenReturn(wifiInfo);
-
-        mWifiServiceImpl.notifyWifiSsidPolicyChanged(WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_DENYLIST,
-                Arrays.asList(WifiSsid.fromUtf8Text(TEST_SSID)));
-        mLooper.dispatchAll();
-
-        verify(mClientModeManager).disconnect();
-    }
-
-    /**
-     * Test that notifyWifiSsidPolicyChanged does not disconnect the current network
-     * due to SSID restriction for Passpoint networks
-     */
-    @Test
-    public void testNotifyWifiSsidPolicyChangedWithSsidRestrictionForPasspoint()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        WifiInfo wifiInfo = setupForGetConnectionInfo();
-        wifiInfo.setCurrentSecurityType(WifiConfiguration.SECURITY_TYPE_PASSPOINT_R1_R2);
-
-        when(mContext.checkPermission(eq(android.Manifest.permission.MANAGE_DEVICE_ADMINS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mActiveModeWarden.getClientModeManagers()).thenReturn(
-                Collections.singletonList(mClientModeManager));
-        when(mClientModeManager.syncRequestConnectionInfo()).thenReturn(wifiInfo);
-
-        mWifiServiceImpl.notifyWifiSsidPolicyChanged(WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_ALLOWLIST,
-                Arrays.asList(WifiSsid.fromUtf8Text("SSID")));
-        mLooper.dispatchAll();
-
-        verify(mClientModeManager, never()).disconnect();
-    }
-
-    /**
-     * Test that notifyWifiSsidPolicyChanged does not disconnect the current network
-     * due to SSID restriction for Osu networks
-     */
-    @Test
-    public void testNotifyWifiSsidPolicyChangedWithSsidRestrictionForOsu()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        WifiInfo wifiInfo = new WifiInfo();
-        wifiInfo.setSSID(WifiSsid.fromUtf8Text(TEST_SSID));
-        wifiInfo.setBSSID(TEST_BSSID);
-        wifiInfo.setNetworkId(TEST_NETWORK_ID);
-        wifiInfo.setCurrentSecurityType(WifiConfiguration.SECURITY_TYPE_PASSPOINT_R3);
-        wifiInfo.setOsuAp(true);
-
-        when(mContext.checkPermission(eq(android.Manifest.permission.MANAGE_DEVICE_ADMINS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mActiveModeWarden.getClientModeManagers()).thenReturn(
-                Collections.singletonList(mClientModeManager));
-        when(mClientModeManager.syncRequestConnectionInfo()).thenReturn(wifiInfo);
-
-        mWifiServiceImpl.notifyWifiSsidPolicyChanged(WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_DENYLIST,
-                Arrays.asList(WifiSsid.fromUtf8Text(TEST_SSID)));
-        mLooper.dispatchAll();
-
-        verify(mClientModeManager, never()).disconnect();
-    }
-
-    /**
-     * Test that notifyMinimumRequiredWifiSecurityLevelChanged disconnects the current network
-     * due to minimum security level restriction
-     */
-    @Test
-    public void testNotifyMinimumRequiredWifiSecurityLevelChangedWithSecurityLevelRestriction()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        WifiInfo wifiInfo = setupForGetConnectionInfo();
-        wifiInfo.setCurrentSecurityType(WifiConfiguration.SECURITY_TYPE_PSK);
-
-        when(mContext.checkPermission(eq(android.Manifest.permission.MANAGE_DEVICE_ADMINS),
-                anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-        when(mActiveModeWarden.getClientModeManagers()).thenReturn(
-                Collections.singletonList(mClientModeManager));
-        when(mClientModeManager.syncRequestConnectionInfo()).thenReturn(wifiInfo);
-
-        mWifiServiceImpl.notifyMinimumRequiredWifiSecurityLevelChanged(
-                DevicePolicyManager.WIFI_SECURITY_ENTERPRISE_EAP);
-        mLooper.dispatchAll();
-
-        verify(mClientModeManager).disconnect();
-    }
-
-    @Test
-    public void testIsItPossibleToCreateInterfaceInvalidConditions() {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        when(mWifiPermissionsUtil.checkManageWifiInterfacesPermission(anyInt())).thenReturn(true);
-        IInterfaceCreationInfoCallback.Stub mockCallback = mock(
-                IInterfaceCreationInfoCallback.Stub.class);
-
-        assertThrows(IllegalArgumentException.class,
-                () -> mWifiServiceImpl.reportCreateInterfaceImpact(null,
-                        WifiManager.WIFI_INTERFACE_TYPE_AP, true, mockCallback));
-        assertThrows(IllegalArgumentException.class,
-                () -> mWifiServiceImpl.reportCreateInterfaceImpact(TEST_PACKAGE_NAME,
-                        WifiManager.WIFI_INTERFACE_TYPE_AP, true, null));
-        assertThrows(IllegalArgumentException.class,
-                () -> mWifiServiceImpl.reportCreateInterfaceImpact(TEST_PACKAGE_NAME,
-                        /* clearly invalid value */ 100, true, mockCallback));
-
-        mWifiServiceImpl = spy(mWifiServiceImpl);
-        when(mWifiServiceImpl.getMockableCallingUid()).thenReturn(TEST_UID);
-        doThrow(new SecurityException()).when(mWifiPermissionsUtil).checkPackage(TEST_UID,
-                TEST_PACKAGE_NAME);
-        assertThrows(SecurityException.class,
-                () -> mWifiServiceImpl.reportCreateInterfaceImpact(TEST_PACKAGE_NAME,
-                        WifiManager.WIFI_INTERFACE_TYPE_AP, false, mockCallback));
-
-        when(mWifiPermissionsUtil.checkManageWifiInterfacesPermission(anyInt())).thenReturn(false);
-        assertThrows(SecurityException.class,
-                () -> mWifiServiceImpl.reportCreateInterfaceImpact(TEST_PACKAGE_NAME,
-                        WifiManager.WIFI_INTERFACE_TYPE_AP, false, mockCallback));
-
-        when(mWifiPermissionsUtil.checkManageWifiInterfacesPermission(anyInt())).thenReturn(true);
-        doThrow(new SecurityException()).when(mContext)
-                .enforceCallingOrSelfPermission(eq(ACCESS_WIFI_STATE),
-                        eq("WifiService"));
-        assertThrows(SecurityException.class,
-                () -> mWifiServiceImpl.reportCreateInterfaceImpact(TEST_PACKAGE_NAME,
-                        WifiManager.WIFI_INTERFACE_TYPE_AP, false, mockCallback));
-    }
-
-    @Test
-    public void testIsItPossibleToCreateInterface() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        IInterfaceCreationInfoCallback.Stub mockCallback = mock(
-                IInterfaceCreationInfoCallback.Stub.class);
-        final int interfaceToCreate = WifiManager.WIFI_INTERFACE_TYPE_AWARE;
-        final int interfaceToCreateInternal = HalDeviceManager.HDM_CREATE_IFACE_NAN;
-        mWifiServiceImpl = spy(mWifiServiceImpl);
-        when(mWifiServiceImpl.getMockableCallingUid()).thenReturn(TEST_UID);
-        when(mWifiPermissionsUtil.checkManageWifiInterfacesPermission(TEST_UID)).thenReturn(true);
-        final WorkSource ws = new WorkSource(TEST_UID, TEST_PACKAGE_NAME);
-        final WorkSource wsOther = new WorkSource(OTHER_TEST_UID, TEST_PACKAGE_NAME_OTHER);
-        final String[] packagesOther = {TEST_PACKAGE_NAME_OTHER};
-
-        ArgumentCaptor<Boolean> boolCaptor = ArgumentCaptor.forClass(Boolean.class);
-        ArgumentCaptor<int[]> intArrayCaptor = ArgumentCaptor.forClass(int[].class);
-        ArgumentCaptor<String[]> stringArrayCaptor = ArgumentCaptor.forClass(String[].class);
-
-        // 3 results: failure, success with no side effects, success with side effects
-        when(mHalDeviceManager.reportImpactToCreateIface(interfaceToCreateInternal, true, ws))
-                .thenReturn(null)
-                .thenReturn(Collections.emptyList())
-                .thenReturn(List.of(Pair.create(HalDeviceManager.HDM_CREATE_IFACE_P2P, wsOther)));
-        mWifiServiceImpl.reportCreateInterfaceImpact(TEST_PACKAGE_NAME, interfaceToCreate, true,
-                mockCallback);
-        mWifiServiceImpl.reportCreateInterfaceImpact(TEST_PACKAGE_NAME, interfaceToCreate, true,
-                mockCallback);
-        mWifiServiceImpl.reportCreateInterfaceImpact(TEST_PACKAGE_NAME, interfaceToCreate, true,
-                mockCallback);
-        mLooper.dispatchAll();
-        verify(mHalDeviceManager, times(3)).reportImpactToCreateIface(
-                interfaceToCreateInternal, true, ws);
-        verify(mockCallback, times(3)).onResults(boolCaptor.capture(), intArrayCaptor.capture(),
-                stringArrayCaptor.capture());
-        verify(mPackageManager).makeUidVisible(TEST_UID, OTHER_TEST_UID);
-
-        // result 0: failure
-        assertFalse(boolCaptor.getAllValues().get(0));
-        assertNull(intArrayCaptor.getAllValues().get(0));
-        assertNull(stringArrayCaptor.getAllValues().get(0));
-
-        // result 1: success with no side effects
-        assertTrue(boolCaptor.getAllValues().get(1));
-        assertEquals(0, intArrayCaptor.getAllValues().get(1).length);
-        assertEquals(0, stringArrayCaptor.getAllValues().get(1).length);
-
-        // result 2: success with no side effects
-        assertTrue(boolCaptor.getAllValues().get(2));
-        assertEquals(1, intArrayCaptor.getAllValues().get(2).length);
-        assertEquals(WifiManager.WIFI_INTERFACE_TYPE_DIRECT,
-                intArrayCaptor.getAllValues().get(2)[0]);
-        assertArrayEquals(packagesOther, stringArrayCaptor.getAllValues().get(2));
-    }
-
-    @Test
-    public void testTetheredSoftApTrackerWhenCountryCodeChanged() throws Exception {
-        // needed to mock this to call "handleBootCompleted"
-        when(mWifiInjector.getPasspointProvisionerHandlerThread())
-                .thenReturn(mock(HandlerThread.class));
-        mWifiServiceImpl.handleBootCompleted();
-        mLooper.dispatchAll();
-
-        registerSoftApCallbackAndVerify(mClientSoftApCallback);
-        reset(mClientSoftApCallback);
-        when(mWifiPermissionsUtil.checkCallersCoarseLocationPermission(
-                eq(TEST_PACKAGE_NAME), eq(TEST_FEATURE_ID), anyInt(), any())).thenReturn(true);
-        if (SdkLevel.isAtLeastT()) {
-            verifyRegisterDriverCountryCodeChangedListenerSucceededAndTriggerListener(
-                    mIOnWifiDriverCountryCodeChangedListener);
-            reset(mIOnWifiDriverCountryCodeChangedListener);
-        }
-        ArgumentCaptor<SoftApCapability> capabilityArgumentCaptor = ArgumentCaptor.forClass(
-                SoftApCapability.class);
-        // Country code update with HAL started
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        // Channel 9 - 2452Mhz
-        WifiAvailableChannel channels2g = new WifiAvailableChannel(2452,
-                WifiAvailableChannel.OP_MODE_SAP);
-        when(mWifiNative.isHalSupported()).thenReturn(true);
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.getUsableChannels(eq(WifiScanner.WIFI_BAND_24_GHZ), anyInt(), anyInt()))
-                .thenReturn(new ArrayList<>(Arrays.asList(channels2g)));
-        mWifiServiceImpl.mCountryCodeTracker.onCountryCodeChangePending(TEST_COUNTRY_CODE);
-        mLooper.dispatchAll();
-        mWifiServiceImpl.mCountryCodeTracker.onDriverCountryCodeChanged(TEST_COUNTRY_CODE);
-        mLooper.dispatchAll();
-        if (SdkLevel.isAtLeastT()) {
-            verify(mIOnWifiDriverCountryCodeChangedListener)
-                    .onDriverCountryCodeChanged(TEST_COUNTRY_CODE);
-        }
-        verify(mClientSoftApCallback).onCapabilityChanged(capabilityArgumentCaptor.capture());
-        assertEquals(1, capabilityArgumentCaptor.getValue()
-                .getSupportedChannelList(SoftApConfiguration.BAND_2GHZ).length);
-        assertEquals(9, capabilityArgumentCaptor.getValue()
-                .getSupportedChannelList(SoftApConfiguration.BAND_2GHZ)[0]);
-        reset(mClientSoftApCallback);
-        // Country code update with HAL not started
-        when(mWifiNative.isHalStarted()).thenReturn(false);
-        mWifiServiceImpl.mCountryCodeTracker.onCountryCodeChangePending(TEST_NEW_COUNTRY_CODE);
-        mLooper.dispatchAll();
-        if (SdkLevel.isAtLeastT()) {
-            verify(mIOnWifiDriverCountryCodeChangedListener, never())
-                    .onDriverCountryCodeChanged(TEST_NEW_COUNTRY_CODE);
-        }
-        verify(mClientSoftApCallback)
-                .onCapabilityChanged(capabilityArgumentCaptor.capture());
-        // The supported channels in soft AP capability got invalidated.
-        assertEquals(0, capabilityArgumentCaptor.getValue()
-                .getSupportedChannelList(SoftApConfiguration.BAND_2GHZ).length);
-    }
-
-    /**
-     * Verify that change network connection state is not allowed for App target below Q SDK from
-     * guest user
-     */
-    @Test
-    public void testNotAllowedToChangeWifiOpsTargetBelowQSdkFromGuestUser() throws Exception {
-        doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager)
-                .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(),
-                eq(Build.VERSION_CODES.Q), anyInt())).thenReturn(true);
-        when(mWifiPermissionsUtil.isGuestUser()).thenReturn(true);
-
-        assertFalse(mWifiServiceImpl.setWifiEnabled(TEST_PACKAGE_NAME, true));
-        verify(mWifiMetrics, never()).incrementNumWifiToggles(anyBoolean(), anyBoolean());
-
-        assertFalse(mWifiServiceImpl.disconnect(TEST_PACKAGE_NAME));
-        assertFalse(mWifiServiceImpl.reconnect(TEST_PACKAGE_NAME));
-        assertFalse(mWifiServiceImpl.reassociate(TEST_PACKAGE_NAME));
-
-        assertTrue(mWifiServiceImpl.getConfiguredNetworks(TEST_PACKAGE_NAME, TEST_FEATURE_ID,
-                false).getList().isEmpty());
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager, never()).getConfiguredNetworks();
-
-        assertFalse(mWifiServiceImpl.removeNetwork(0, TEST_PACKAGE_NAME));
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager, never()).removeNetwork(anyInt(), anyInt(), anyString());
-
-        assertFalse(mWifiServiceImpl.enableNetwork(0, false, TEST_PACKAGE_NAME));
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager, never()).enableNetwork(anyInt(), anyBoolean(), anyInt(),
-                anyString());
-        verify(mWifiMetrics, never()).incrementNumEnableNetworkCalls();
-
-        assertFalse(mWifiServiceImpl.disableNetwork(0, TEST_PACKAGE_NAME));
-        mLooper.dispatchAll();
-        verify(mWifiConfigManager, never()).disableNetwork(anyInt(), anyInt(), anyString());
-
-        PasspointConfiguration passpointConfig = new PasspointConfiguration();
-        HomeSp homeSp = new HomeSp();
-        homeSp.setFqdn("test.com");
-        passpointConfig.setHomeSp(homeSp);
-        assertFalse(mWifiServiceImpl.addOrUpdatePasspointConfiguration(passpointConfig,
-                TEST_PACKAGE_NAME));
-        mLooper.dispatchAll();
-        verify(mPasspointManager, never()).addOrUpdateProvider(any(), anyInt(), anyString(),
-                anyBoolean(), anyBoolean());
-
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork(TEST_SSID);
-        assertEquals(-1, mWifiServiceImpl.addOrUpdateNetwork(config, TEST_PACKAGE_NAME,
-                mAttribution));
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiShellCommandTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiShellCommandTest.java
index 255b8e1..385eedf 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiShellCommandTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiShellCommandTest.java
@@ -16,12 +16,10 @@
 
 package com.android.server.wifi;
 
-import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_OEM_PAID;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_OEM_PRIVATE;
 import static android.net.NetworkCapabilities.NET_CAPABILITY_TRUSTED;
 import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
-import static android.net.wifi.WifiManager.ACTION_REMOVE_SUGGESTION_DISCONNECT;
 import static android.net.wifi.WifiManager.WIFI_STATE_ENABLED;
 
 import static com.android.server.wifi.WifiShellCommand.SHELL_PACKAGE_NAME;
@@ -45,17 +43,12 @@
 import static org.mockito.Mockito.when;
 
 import android.net.ConnectivityManager;
-import android.net.MacAddress;
-import android.net.NetworkRequest;
 import android.net.wifi.SoftApConfiguration;
 import android.net.wifi.SupplicantState;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiNetworkSpecifier;
 import android.net.wifi.WifiNetworkSuggestion;
 import android.os.Binder;
-import android.os.PatternMatcher;
 import android.os.Process;
 
 import androidx.test.filters.SmallTest;
@@ -138,6 +131,15 @@
 
     @Test
     public void testSetIpReachDisconnect() {
+        // not allowed for unrooted shell.
+        mWifiShellCommand.exec(
+                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
+                new String[]{"set-ipreach-disconnect", "enabled"});
+        verify(mWifiGlobals, never()).setIpReachabilityDisconnectEnabled(anyBoolean());
+        assertFalse(mWifiShellCommand.getErrPrintWriter().toString().isEmpty());
+
+        BinderUtil.setUid(Process.ROOT_UID);
+
         mWifiShellCommand.exec(
                 new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
                 new String[]{"set-ipreach-disconnect", "enabled"});
@@ -158,6 +160,15 @@
 
     @Test
     public void testGetIpReachDisconnect() {
+        // not allowed for unrooted shell.
+        mWifiShellCommand.exec(
+                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
+                new String[]{"get-ipreach-disconnect"});
+        verify(mWifiGlobals, never()).getIpReachabilityDisconnectEnabled();
+        assertFalse(mWifiShellCommand.getErrPrintWriter().toString().isEmpty());
+
+        BinderUtil.setUid(Process.ROOT_UID);
+
         when(mWifiGlobals.getIpReachabilityDisconnectEnabled()).thenReturn(true);
         mWifiShellCommand.exec(
                 new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
@@ -269,15 +280,6 @@
         assertEquals(bssid, sd.getBSSIDString());
         assertEquals(2412, sd.getScanResult().frequency);
         assertEquals(-55, sd.getScanResult().level);
-
-        // Test with "hello world" SSID encoded in hexadecimal UTF-8
-        String hexSsid = "68656c6c6f20776f726c64";
-        mWifiShellCommand.exec(new Binder(), new FileDescriptor(), new FileDescriptor(),
-                new FileDescriptor(),
-                new String[]{"add-fake-scan", "-x", hexSsid, bssid, capabilities, freq, dbm});
-        verify(mWifiNative, times(2)).addFakeScanDetail(scanDetailCaptor.capture());
-        sd = scanDetailCaptor.getValue();
-        assertEquals("hello world", sd.getScanResult().SSID);
     }
 
     @Test
@@ -540,7 +542,7 @@
                 softApConfigurationCaptor.getValue().getBand());
         assertEquals(SoftApConfiguration.SECURITY_TYPE_WPA2_PSK,
                 softApConfigurationCaptor.getValue().getSecurityType());
-        assertEquals("ap1", softApConfigurationCaptor.getValue().getWifiSsid().getUtf8Text());
+        assertEquals("ap1", softApConfigurationCaptor.getValue().getSsid());
         assertEquals("xyzabc321", softApConfigurationCaptor.getValue().getPassphrase());
     }
 
@@ -552,32 +554,6 @@
         verify(mWifiService).stopSoftAp();
     }
 
-    @Test
-    public void testStartLohs() {
-        BinderUtil.setUid(Process.ROOT_UID);
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"start-lohs", "ap1", "wpa2", "xyzabc321", "-b", "5"});
-        ArgumentCaptor<SoftApConfiguration> softApConfigurationCaptor = ArgumentCaptor.forClass(
-                SoftApConfiguration.class);
-        verify(mWifiService).startLocalOnlyHotspot(any(), eq(SHELL_PACKAGE_NAME), any(),
-                softApConfigurationCaptor.capture(), any());
-        assertEquals(SoftApConfiguration.BAND_5GHZ,
-                softApConfigurationCaptor.getValue().getBand());
-        assertEquals(SoftApConfiguration.SECURITY_TYPE_WPA2_PSK,
-                softApConfigurationCaptor.getValue().getSecurityType());
-        assertEquals("ap1", softApConfigurationCaptor.getValue().getSsid());
-        assertEquals("xyzabc321", softApConfigurationCaptor.getValue().getPassphrase());
-    }
-
-    @Test
-    public void testStopLohs() {
-        BinderUtil.setUid(Process.ROOT_UID);
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"stop-lohs"});
-        verify(mWifiService).stopLocalOnlyHotspot();
-    }
 
     @Test
     public void testSetScanAlwaysAvailable() {
@@ -620,7 +596,7 @@
             return (sL.size() == 1)
                     && (sL.get(0).getSsid().equals("ssid1234"))
                     && (sL.get(0).isUntrusted());
-        }), eq(SHELL_PACKAGE_NAME), eq(ACTION_REMOVE_SUGGESTION_DISCONNECT));
+        }), eq(SHELL_PACKAGE_NAME));
         verify(mConnectivityManager).unregisterNetworkCallback(
                 any(ConnectivityManager.NetworkCallback.class));
     }
@@ -655,7 +631,7 @@
             return (sL.size() == 1)
                     && (sL.get(0).getSsid().equals("ssid1234"))
                     && (sL.get(0).isOemPaid());
-        }), eq(SHELL_PACKAGE_NAME), eq(ACTION_REMOVE_SUGGESTION_DISCONNECT));
+        }), eq(SHELL_PACKAGE_NAME));
         verify(mConnectivityManager).unregisterNetworkCallback(
                 any(ConnectivityManager.NetworkCallback.class));
     }
@@ -690,13 +666,13 @@
             return (sL.size() == 1)
                     && (sL.get(0).getSsid().equals("ssid1234"))
                     && (sL.get(0).isOemPrivate());
-        }), eq(SHELL_PACKAGE_NAME), eq(ACTION_REMOVE_SUGGESTION_DISCONNECT));
+        }), eq(SHELL_PACKAGE_NAME));
         verify(mConnectivityManager).unregisterNetworkCallback(
                 any(ConnectivityManager.NetworkCallback.class));
     }
 
     @Test
-    public void testAddSuggestionWithNonPersistentMacRandomization() {
+    public void testAddSuggestionWithEnhancedMacRandomization() {
         // default
         mWifiShellCommand.exec(
                 new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
@@ -708,7 +684,7 @@
                     == WifiConfiguration.RANDOMIZATION_PERSISTENT);
         }), eq(SHELL_PACKAGE_NAME), any());
 
-        // using non-persistent MAC randomization.
+        // using enhanced MAC randomization.
         if (SdkLevel.isAtLeastS()) {
             mWifiShellCommand.exec(
                     new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
@@ -821,7 +797,6 @@
 
     @Test
     public void testConnectNetworkWithNoneMacRandomization() {
-        BinderUtil.setUid(Process.ROOT_UID);
         mWifiShellCommand.exec(
                 new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
                 new String[]{"connect-network", "ssid1234", "open", "-r", "none"});
@@ -829,14 +804,13 @@
             return (wifiConfiguration.SSID.equals("\"ssid1234\"")
                     && wifiConfiguration.macRandomizationSetting
                     == WifiConfiguration.RANDOMIZATION_NONE);
-        }), eq(-1), any(), any());
+        }), eq(-1), any());
     }
 
     @Test
     public void testConnectNetworkWithNonPersistentMacRandomizationOnSAndAbove() {
         assumeTrue(SdkLevel.isAtLeastS());
 
-        BinderUtil.setUid(Process.ROOT_UID);
         mWifiShellCommand.exec(
                 new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
                 new String[]{"connect-network", "ssid1234", "open", "-r", "non_persistent"});
@@ -844,52 +818,19 @@
             return (wifiConfiguration.SSID.equals("\"ssid1234\"")
                     && wifiConfiguration.macRandomizationSetting
                     == WifiConfiguration.RANDOMIZATION_NON_PERSISTENT);
-        }), eq(-1), any(), any());
+        }), eq(-1), any());
     }
 
     @Test
     public void testConnectNetworkWithNonPersistentMacRandomizationOnR() {
         assumeFalse(SdkLevel.isAtLeastS());
 
-        BinderUtil.setUid(Process.ROOT_UID);
         assertEquals(-1, mWifiShellCommand.exec(
                 new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
                 new String[]{"connect-network", "ssid1234", "open", "-r", "non_persistent"}));
     }
 
     @Test
-    public void testConnectNetworkWithHexSsid() {
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"connect-network", "012345", "open", "-x"});
-        verify(mWifiService, never()).connect(argThat(wifiConfiguration ->
-                (wifiConfiguration.SSID.equals("012345"))), eq(-1), any());
-
-        BinderUtil.setUid(Process.ROOT_UID);
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"connect-network", "012345", "open", "-x"});
-        verify(mWifiService).connect(argThat(wifiConfiguration ->
-                (wifiConfiguration.SSID.equals("012345"))), eq(-1), any(), any());
-    }
-
-    @Test
-    public void testAddNetworkWithHexSsid() {
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"add-network", "012345", "open", "-x"});
-        verify(mWifiService, never()).save(argThat(wifiConfiguration ->
-                (wifiConfiguration.SSID.equals("012345"))), any());
-
-        BinderUtil.setUid(Process.ROOT_UID);
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"add-network", "012345", "open", "-x"});
-        verify(mWifiService).save(argThat(wifiConfiguration ->
-                (wifiConfiguration.SSID.equals("012345"))), any(), any());
-    }
-
-    @Test
     public void testEnableScanning() {
         BinderUtil.setUid(Process.ROOT_UID);
         mWifiShellCommand.exec(
@@ -906,101 +847,4 @@
                 new String[]{"enable-scanning", "enabled", "-h"});
         verify(mScanRequestProxy).enableScanning(true, true);
     }
-
-    @Test
-    public void testAddNetworkRequest() {
-        BinderUtil.setUid(Process.ROOT_UID);
-        final String testSsid = "ssid";
-        final String testBssid = "80:01:02:03:04:05";
-        final String testPassphrase = "password";
-
-        // Open
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"add-request", testSsid, "open"});
-        verify(mConnectivityManager).requestNetwork(eq(
-                new NetworkRequest.Builder()
-                        .addTransportType(TRANSPORT_WIFI)
-                        .removeCapability(NET_CAPABILITY_INTERNET)
-                        .setNetworkSpecifier(new WifiNetworkSpecifier.Builder()
-                                .setSsid(testSsid)
-                                .build())
-                        .build()),
-                (ConnectivityManager.NetworkCallback) any());
-
-        // OWE
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"add-request", testSsid, "owe", testPassphrase});
-        verify(mConnectivityManager).requestNetwork(eq(
-                new NetworkRequest.Builder()
-                        .addTransportType(TRANSPORT_WIFI)
-                        .removeCapability(NET_CAPABILITY_INTERNET)
-                        .setNetworkSpecifier(new WifiNetworkSpecifier.Builder()
-                                .setSsid(testSsid)
-                                .setIsEnhancedOpen(true)
-                                .build())
-                        .build()),
-                (ConnectivityManager.NetworkCallback) any());
-
-        // WPA2
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"add-request", testSsid, "wpa2", testPassphrase});
-        verify(mConnectivityManager).requestNetwork(eq(
-                new NetworkRequest.Builder()
-                        .addTransportType(TRANSPORT_WIFI)
-                        .removeCapability(NET_CAPABILITY_INTERNET)
-                        .setNetworkSpecifier(new WifiNetworkSpecifier.Builder()
-                                .setSsid(testSsid)
-                                .setWpa2Passphrase(testPassphrase)
-                                .build())
-                        .build()),
-                (ConnectivityManager.NetworkCallback) any());
-
-        // WPA3
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"add-request", testSsid, "wpa3", testPassphrase});
-        verify(mConnectivityManager).requestNetwork(eq(
-                new NetworkRequest.Builder()
-                        .addTransportType(TRANSPORT_WIFI)
-                        .removeCapability(NET_CAPABILITY_INTERNET)
-                        .setNetworkSpecifier(new WifiNetworkSpecifier.Builder()
-                                .setSsid(testSsid)
-                                .setWpa3Passphrase(testPassphrase)
-                                .build())
-                        .build()),
-                (ConnectivityManager.NetworkCallback) any());
-
-        // Test bssid flag
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"add-request", testSsid, "open", "-b", testBssid});
-        verify(mConnectivityManager).requestNetwork(eq(
-                new NetworkRequest.Builder()
-                        .addTransportType(TRANSPORT_WIFI)
-                        .removeCapability(NET_CAPABILITY_INTERNET)
-                        .setNetworkSpecifier(new WifiNetworkSpecifier.Builder()
-                                .setSsid(testSsid)
-                                .setBssid(MacAddress.fromString(testBssid))
-                                .build())
-                        .build()),
-                (ConnectivityManager.NetworkCallback) any());
-
-        // Test glob flag
-        mWifiShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                new String[]{"add-request", "-g", testSsid, "open"});
-        verify(mConnectivityManager).requestNetwork(eq(
-                new NetworkRequest.Builder()
-                        .addTransportType(TRANSPORT_WIFI)
-                        .removeCapability(NET_CAPABILITY_INTERNET)
-                        .setNetworkSpecifier(new WifiNetworkSpecifier.Builder()
-                                .setSsidPattern(new PatternMatcher(
-                                        testSsid, PatternMatcher.PATTERN_ADVANCED_GLOB))
-                                .build())
-                        .build()),
-                (ConnectivityManager.NetworkCallback) any());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java b/service/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
index d0a23d3..a32f3d3 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
@@ -16,9 +16,6 @@
 
 package com.android.server.wifi;
 
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_AP;
-import static com.android.server.wifi.HalDeviceManager.HDM_CREATE_IFACE_STA;
-
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -207,8 +204,6 @@
     private WifiNative.VendorHalRadioModeChangeEventHandler mVendorHalRadioModeChangeHandler;
     @Mock
     private WifiGlobals mWifiGlobals;
-    @Mock
-    private SoftApManager mSoftApManager;
 
     /**
      * Spy used to return the V1_1 IWifiChip mock object to simulate the 1.1 HAL running on the
@@ -389,8 +384,7 @@
         }).when(mHalDeviceManager).stop();
         when(mHalDeviceManager.createStaIface(any(), any(), any()))
                 .thenReturn(mIWifiStaIface);
-        when(mHalDeviceManager.createApIface(anyLong(), any(), any(), any(), anyBoolean(),
-                eq(mSoftApManager)))
+        when(mHalDeviceManager.createApIface(anyLong(), any(), any(), any(), anyBoolean()))
                 .thenReturn(mIWifiApIface);
         when(mHalDeviceManager.removeIface(any())).thenReturn(true);
         when(mHalDeviceManager.getChip(any(IWifiIface.class)))
@@ -476,7 +470,26 @@
         verify(mIWifiChip).registerEventCallback(any(IWifiChipEventCallback.class));
 
         verify(mHalDeviceManager, never()).createApIface(
-                anyLong(), any(), any(), any(), anyBoolean(), eq(mSoftApManager));
+                anyLong(), any(), any(), any(), anyBoolean());
+    }
+
+    /**
+     * Tests the successful starting of HAL in AP mode using
+     * {@link WifiVendorHal#startVendorHalAp()}.
+     */
+    @Test
+    public void testStartHalSuccessInApMode() throws Exception {
+        assertTrue(mWifiVendorHal.startVendorHalAp());
+        assertTrue(mWifiVendorHal.isHalStarted());
+
+        verify(mHalDeviceManager).start();
+        verify(mHalDeviceManager).createApIface(
+                anyLong(), any(), any(), any(), anyBoolean());
+        verify(mHalDeviceManager).getChip(eq(mIWifiApIface));
+        verify(mHalDeviceManager).isReady();
+        verify(mHalDeviceManager).isStarted();
+
+        verify(mHalDeviceManager, never()).createStaIface(any(), any(), any());
     }
 
     /**
@@ -499,7 +512,7 @@
 
         verify(mHalDeviceManager, never()).createStaIface(any(), any(), any());
         verify(mHalDeviceManager, never()).createApIface(
-                anyLong(), any(), any(), any(), anyBoolean(), eq(mSoftApManager));
+                anyLong(), any(), any(), any(), anyBoolean());
         verify(mHalDeviceManager, never()).getChip(any(IWifiIface.class));
         verify(mIWifiStaIface, never())
                 .registerEventCallback(any(IWifiStaIfaceEventCallback.class));
@@ -520,7 +533,7 @@
         verify(mHalDeviceManager).stop();
 
         verify(mHalDeviceManager, never()).createApIface(
-                anyLong(), any(), any(), any(), anyBoolean(), eq(mSoftApManager));
+                anyLong(), any(), any(), any(), anyBoolean());
         verify(mHalDeviceManager, never()).getChip(any(IWifiIface.class));
         verify(mIWifiStaIface, never())
                 .registerEventCallback(any(IWifiStaIfaceEventCallback.class));
@@ -543,7 +556,7 @@
         verify(mIWifiStaIface).registerEventCallback(any(IWifiStaIfaceEventCallback.class));
 
         verify(mHalDeviceManager, never()).createApIface(
-                anyLong(), any(), any(), any(), anyBoolean(), eq(mSoftApManager));
+                anyLong(), any(), any(), any(), anyBoolean());
     }
 
     /**
@@ -564,7 +577,7 @@
 
         verify(mHalDeviceManager, never()).getChip(any(IWifiIface.class));
         verify(mHalDeviceManager, never()).createApIface(
-                anyLong(), any(), any(), any(), anyBoolean(), eq(mSoftApManager));
+                anyLong(), any(), any(), any(), anyBoolean());
     }
 
     /**
@@ -586,7 +599,26 @@
         verify(mIWifiChip).registerEventCallback(any(IWifiChipEventCallback.class));
 
         verify(mHalDeviceManager, never()).createApIface(
-                anyLong(), any(), any(), any(), anyBoolean(), eq(mSoftApManager));
+                anyLong(), any(), any(), any(), anyBoolean());
+    }
+
+    /**
+     * Tests the failure to start HAL in AP mode using
+     * {@link WifiVendorHal#startVendorHalAp()}.
+     */
+    @Test
+    public void testStartHalFailureInApMode() throws Exception {
+        when(mHalDeviceManager.createApIface(anyLong(), any(), any(), any(), anyBoolean()))
+                .thenReturn(null);
+        assertFalse(mWifiVendorHal.startVendorHalAp());
+        assertFalse(mWifiVendorHal.isHalStarted());
+
+        verify(mHalDeviceManager).start();
+        verify(mHalDeviceManager).createApIface(anyLong(), any(), any(), any(), anyBoolean());
+        verify(mHalDeviceManager).stop();
+
+        verify(mHalDeviceManager, never()).createStaIface(any(), any(), any());
+        verify(mHalDeviceManager, never()).getChip(any(IWifiIface.class));
     }
 
     /**
@@ -609,7 +641,7 @@
         verify(mHalDeviceManager, times(2)).isStarted();
 
         verify(mHalDeviceManager, never()).createApIface(
-                anyLong(), any(), any(), any(), anyBoolean(), eq(mSoftApManager));
+                anyLong(), any(), any(), any(), anyBoolean());
     }
 
     /**
@@ -618,10 +650,7 @@
      */
     @Test
     public void testStopHalInApMode() {
-        assertTrue(mWifiVendorHal.startVendorHal());
-        assertNotNull(mWifiVendorHal.createApIface(null, null,
-                SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
-
+        assertTrue(mWifiVendorHal.startVendorHalAp());
         assertTrue(mWifiVendorHal.isHalStarted());
 
         mWifiVendorHal.stopVendorHal();
@@ -630,7 +659,7 @@
         verify(mHalDeviceManager).start();
         verify(mHalDeviceManager).stop();
         verify(mHalDeviceManager).createApIface(
-                anyLong(), any(), any(), any(), anyBoolean(), eq(mSoftApManager));
+                anyLong(), any(), any(), any(), anyBoolean());
         verify(mHalDeviceManager).getChip(eq(mIWifiApIface));
         verify(mHalDeviceManager, times(2)).isReady();
         verify(mHalDeviceManager, times(2)).isStarted();
@@ -681,14 +710,12 @@
 
         assertTrue(mWifiVendorHal.startVendorHal());
         assertNotNull(mWifiVendorHal.createApIface(
-                externalLister, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false,
-                mSoftApManager));
+                externalLister, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false));
         assertTrue(mWifiVendorHal.isHalStarted());
 
         verify(mHalDeviceManager).start();
         verify(mHalDeviceManager).createApIface(anyLong(),
-                internalListenerCaptor.capture(), any(), eq(TEST_WORKSOURCE), eq(false),
-                eq(mSoftApManager));
+                internalListenerCaptor.capture(), any(), eq(TEST_WORKSOURCE), eq(false));
         verify(mHalDeviceManager).getChip(eq(mIWifiApIface));
         verify(mHalDeviceManager).isReady();
         verify(mHalDeviceManager).isStarted();
@@ -710,7 +737,7 @@
     @Test
     public void testEnterLogging() {
         mWifiVendorHal.mLog = spy(mWifiLog);
-        mWifiVendorHal.enableVerboseLogging(true, false);
+        mWifiVendorHal.enableVerboseLogging(true);
         mWifiVendorHal.installPacketFilter(TEST_IFACE_NAME, new byte[0]);
         verify(mWifiVendorHal.mLog).trace(eq("filter length %"), eq(1));
     }
@@ -722,8 +749,8 @@
     public void testEnterSilenceWhenNotEnabled() {
         mWifiVendorHal.mLog = spy(mWifiLog);
         mWifiVendorHal.installPacketFilter(TEST_IFACE_NAME, new byte[0]);
-        mWifiVendorHal.enableVerboseLogging(true, false);
-        mWifiVendorHal.enableVerboseLogging(false, false);
+        mWifiVendorHal.enableVerboseLogging(true);
+        mWifiVendorHal.enableVerboseLogging(false);
         mWifiVendorHal.installPacketFilter(TEST_IFACE_NAME, new byte[0]);
         verify(mWifiVendorHal.mLog, never()).trace(eq("filter length %"), anyInt());
     }
@@ -1020,6 +1047,31 @@
     }
 
     /**
+     * Test enablement of link layer stats after startup
+     *
+     * Request link layer stats before HAL start
+     * - should not make it to the HAL layer
+     * Start the HAL in STA mode
+     * Request link layer stats twice more
+     * - enable request should make it to the HAL layer
+     * - HAL layer should have been called to make the requests (i.e., two calls total)
+     */
+    @Test
+    public void testLinkLayerStatsEnableAfterStartup() throws Exception {
+        doNothing().when(mIWifiStaIface).getLinkLayerStats(any());
+
+        assertNull(mWifiVendorHal.getWifiLinkLayerStats(TEST_IFACE_NAME));
+        assertTrue(mWifiVendorHal.startVendorHalSta());
+        assertTrue(mWifiVendorHal.isHalStarted());
+
+        verify(mHalDeviceManager).start();
+        mWifiVendorHal.getWifiLinkLayerStats(TEST_IFACE_NAME);
+        mWifiVendorHal.getWifiLinkLayerStats(TEST_IFACE_NAME);
+        verify(mIWifiStaIface).enableLinkLayerStatsCollection(false); // mLinkLayerStatsDebug
+        verify(mIWifiStaIface, times(2)).getLinkLayerStats(any());
+    }
+
+    /**
      * Test getLinkLayerStats_1_3 gets called when the hal version is V1_3.
      */
     @Test
@@ -1053,9 +1105,7 @@
     public void testLinkLayerStatsNotEnabledAndHarmlessInApMode() throws Exception {
         doNothing().when(mIWifiStaIface).getLinkLayerStats(any());
 
-        assertTrue(mWifiVendorHal.startVendorHal());
-        assertNotNull(mWifiVendorHal.createApIface(null, null,
-                SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        assertTrue(mWifiVendorHal.startVendorHalAp());
         assertTrue(mWifiVendorHal.isHalStarted());
         assertNull(mWifiVendorHal.getWifiLinkLayerStats(TEST_IFACE_NAME));
 
@@ -1841,9 +1891,7 @@
         when(mIWifiApIface.setCountryCode(any()))
                 .thenReturn(mWifiStatusSuccess);
 
-        assertTrue(mWifiVendorHal.startVendorHal());
-        assertNotNull(mWifiVendorHal.createApIface(null, null,
-                SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        assertTrue(mWifiVendorHal.startVendorHalAp());
 
         assertFalse(mWifiVendorHal.setApCountryCode(TEST_IFACE_NAME, null));
         assertFalse(mWifiVendorHal.setApCountryCode(TEST_IFACE_NAME, ""));
@@ -1864,9 +1912,7 @@
         mWifiVendorHal.mVerboseLog = mWifiLog;
         when(mIWifiApIface.setCountryCode(any()))
                 .thenThrow(new RemoteException("oops"));
-        assertTrue(mWifiVendorHal.startVendorHal());
-        assertNotNull(mWifiVendorHal.createApIface(null, null,
-                SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        assertTrue(mWifiVendorHal.startVendorHalAp());
         assertFalse(mWifiVendorHal.setApCountryCode(TEST_IFACE_NAME, "CA"));
         assertTrue(mWifiVendorHal.isHalStarted());
         verify(mWifiLog).err("% RemoteException in HIDL call %");
@@ -1901,9 +1947,7 @@
         )).thenReturn(mWifiStatusSuccess);
 
         assertFalse(mWifiVendorHal.startLoggingRingBuffer(1, 0x42, 0, 0, "One"));
-        assertTrue(mWifiVendorHal.startVendorHal());
-        assertNotNull(mWifiVendorHal.createApIface(null, null,
-                SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        assertTrue(mWifiVendorHal.startVendorHalAp());
         assertTrue(mWifiVendorHal.startLoggingRingBuffer(1, 0x42, 11, 3000, "One"));
 
         verify(mIWifiChip).startLoggingToDebugRingBuffer("One", 1, 11, 3000);
@@ -2524,9 +2568,7 @@
                 any(IWifiChip.getDebugHostWakeReasonStatsCallback.class));
 
         // This should work in both AP & STA mode.
-        assertTrue(mWifiVendorHal.startVendorHal());
-        assertNotNull(mWifiVendorHal.createApIface(null, null,
-                SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        assertTrue(mWifiVendorHal.startVendorHalAp());
 
         assertNull(mWifiVendorHal.getWlanWakeReasonCount());
         verify(mIWifiChip).getDebugHostWakeReasonStats(
@@ -2571,9 +2613,7 @@
         }).when(mIWifiChip).requestDriverDebugDump(any(
                 IWifiChip.requestDriverDebugDumpCallback.class));
 
-        assertTrue(mWifiVendorHal.startVendorHal());
-        assertNotNull(mWifiVendorHal.createApIface(null, null,
-                SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+        assertTrue(mWifiVendorHal.startVendorHalAp());
         assertArrayEquals(sample, mWifiVendorHal.getDriverStateDump());
     }
 
@@ -3299,9 +3339,9 @@
 
         assertTrue(mWifiVendorHal.startVendorHal());
         assertNull(mWifiVendorHal.createApIface(
-                null, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false, mSoftApManager));
+                null, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false));
         verify(mHalDeviceManager).createApIface(
-                anyLong(), any(), any(), eq(TEST_WORKSOURCE), eq(false), eq(mSoftApManager));
+                anyLong(), any(), any(), eq(TEST_WORKSOURCE), eq(false));
     }
 
     /**
@@ -3324,9 +3364,9 @@
     public void testCreateRemoveApIface() throws RemoteException {
         assertTrue(mWifiVendorHal.startVendorHal());
         String ifaceName = mWifiVendorHal.createApIface(
-                null, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false, mSoftApManager);
+                null, TEST_WORKSOURCE, SoftApConfiguration.BAND_2GHZ, false);
         verify(mHalDeviceManager).createApIface(
-                anyLong(), any(), any(), eq(TEST_WORKSOURCE), eq(false), eq(mSoftApManager));
+                anyLong(), any(), any(), eq(TEST_WORKSOURCE), eq(false));
         assertEquals(TEST_IFACE_NAME, ifaceName);
         assertTrue(mWifiVendorHal.removeApIface(ifaceName));
         verify(mHalDeviceManager).removeIface(eq(mIWifiApIface));
@@ -3817,18 +3857,17 @@
 
     @Test
     public void testIsItPossibleToCreateIface() {
-        when(mHalDeviceManager.isItPossibleToCreateIface(eq(HDM_CREATE_IFACE_AP),
-                any())).thenReturn(true);
+        when(mHalDeviceManager.isItPossibleToCreateIface(eq(IfaceType.AP), any())).thenReturn(true);
         assertTrue(mWifiVendorHal.isItPossibleToCreateApIface(new WorkSource()));
 
-        when(mHalDeviceManager.isItPossibleToCreateIface(eq(HDM_CREATE_IFACE_STA), any()))
+        when(mHalDeviceManager.isItPossibleToCreateIface(eq(IfaceType.STA), any()))
                 .thenReturn(true);
         assertTrue(mWifiVendorHal.isItPossibleToCreateStaIface(new WorkSource()));
     }
 
     @Test
     public void testIsStaApConcurrencySupported() {
-        when(mHalDeviceManager.canDeviceSupportCreateTypeCombo(
+        when(mHalDeviceManager.canSupportIfaceCombo(
                 argThat(ifaceCombo -> ifaceCombo.get(IfaceType.STA) == 1
                         && ifaceCombo.get(IfaceType.AP) == 1))).thenReturn(true);
         assertTrue(mWifiVendorHal.isStaApConcurrencySupported());
@@ -3836,7 +3875,7 @@
 
     @Test
     public void testIsStaStaConcurrencySupported() {
-        when(mHalDeviceManager.canDeviceSupportCreateTypeCombo(
+        when(mHalDeviceManager.canSupportIfaceCombo(
                 argThat(ifaceCombo -> ifaceCombo.get(IfaceType.STA) == 2))).thenReturn(true);
         assertTrue(mWifiVendorHal.isStaStaConcurrencySupported());
     }
@@ -3967,7 +4006,7 @@
         ScanResult scanResult = new ScanResult();
         scanResult.SSID = NativeUtil.encodeSsid(staScanResult.ssid);
         scanResult.BSSID = NativeUtil.macAddressFromByteArray(staScanResult.bssid);
-        scanResult.wifiSsid = WifiSsid.fromBytes(ssid);
+        scanResult.wifiSsid = WifiSsid.createFromByteArray(ssid);
         scanResult.frequency = staScanResult.frequency;
         scanResult.level = staScanResult.rssi;
         scanResult.timestamp = staScanResult.timeStampInUs;
@@ -4000,7 +4039,7 @@
 
     private void assertScanResultEqual(ScanResult expected, ScanResult actual) {
         assertEquals(expected.SSID, actual.SSID);
-        assertEquals(expected.wifiSsid, actual.wifiSsid);
+        assertEquals(expected.wifiSsid.getHexString(), actual.wifiSsid.getHexString());
         assertEquals(expected.BSSID, actual.BSSID);
         assertEquals(expected.frequency, actual.frequency);
         assertEquals(expected.level, actual.level);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/WrongPasswordNotifierTest.java b/service/tests/wifitests/src/com/android/server/wifi/WrongPasswordNotifierTest.java
index 76b4f4c..2656cbb 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/WrongPasswordNotifierTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/WrongPasswordNotifierTest.java
@@ -26,9 +26,6 @@
 import android.content.pm.ActivityInfo;
 import android.content.pm.ResolveInfo;
 import android.content.res.Resources;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
-import android.net.wifi.WifiSsid;
 import android.os.UserHandle;
 import android.provider.Settings;
 
@@ -50,7 +47,7 @@
  */
 @SmallTest
 public class WrongPasswordNotifierTest extends WifiBaseTest {
-    private static final WifiSsid TEST_SSID = WifiSsid.fromUtf8Text("Test SSID");
+    private static final String TEST_SSID = "Test SSID";
     private static final String TEST_SETTINGS_PACKAGE = "android";
 
     @Mock WifiContext mContext;
@@ -104,17 +101,14 @@
     public void onWrongPasswordError() throws Exception {
         when(mFrameworkFacade.makeNotificationBuilder(any(),
                 eq(WifiService.NOTIFICATION_NETWORK_ALERTS))).thenReturn(mNotificationBuilder);
-        WifiConfiguration config = new WifiConfiguration();
-        config.SSID = TEST_SSID.toString();
-        mWrongPassNotifier.onWrongPasswordError(config);
+        mWrongPassNotifier.onWrongPasswordError(TEST_SSID);
         verify(mWifiNotificationManager).notify(eq(WrongPasswordNotifier.NOTIFICATION_ID), any());
         ArgumentCaptor<Intent> intent = ArgumentCaptor.forClass(Intent.class);
         verify(mFrameworkFacade).getActivity(
                 any(Context.class), anyInt(), intent.capture(), anyInt());
         assertEquals(Settings.ACTION_WIFI_SETTINGS, intent.getValue().getAction());
         assertEquals(TEST_SETTINGS_PACKAGE, intent.getValue().getPackage());
-        assertEquals(TEST_SSID.getUtf8Text(),
-                intent.getValue().getStringExtra("wifi_start_connect_ssid"));
+        assertEquals(TEST_SSID, intent.getValue().getStringExtra("wifi_start_connect_ssid"));
     }
 
     /**
diff --git a/service/tests/wifitests/src/com/android/server/wifi/aware/TestUtils.java b/service/tests/wifitests/src/com/android/server/wifi/aware/TestUtils.java
index 21b308f..3c0f23e 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/aware/TestUtils.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/aware/TestUtils.java
@@ -19,7 +19,6 @@
 import android.net.wifi.aware.ConfigRequest;
 import android.net.wifi.aware.PublishConfig;
 import android.net.wifi.aware.SubscribeConfig;
-import android.net.wifi.aware.WifiAwareDataPathSecurityConfig;
 import android.util.SparseIntArray;
 
 /**
@@ -50,8 +49,7 @@
 
         public boolean enableAndConfigure(short transactionId, ConfigRequest configRequest,
                 boolean notifyIdentityChange, boolean initialConfiguration, boolean isInteractive,
-                boolean isIdle, boolean rangingEnabled, boolean isInstantCommunicationEnabled,
-                int instantModeChannel) {
+                boolean isIdle, boolean rangingEnabled, boolean isInstantCommunicationEnabled) {
             addTransactionId(transactionId);
             return true;
         }
@@ -104,17 +102,15 @@
         }
 
         public boolean initiateDataPath(short transactionId, int peerId, int channelRequestType,
-                int channel, byte[] peer, String interfaceName,
-                boolean isOutOfBand, byte[] appInfo, Capabilities capabilities,
-                WifiAwareDataPathSecurityConfig securityConfig) {
+                int channel, byte[] peer, String interfaceName, byte[] pmk, String passphrase,
+                boolean isOutOfBand, byte[] appInfo, Capabilities capabilities) {
             addTransactionId(transactionId);
             return true;
         }
 
         public boolean respondToDataPathRequest(short transactionId, boolean accept, int ndpId,
-                String interfaceName, byte[] appInfo,
-                boolean isOutOfBand, Capabilities capabilities,
-                WifiAwareDataPathSecurityConfig securityConfig) {
+                String interfaceName, byte[] pmk, String passphrase, byte[] appInfo,
+                boolean isOutOfBand, Capabilities capabilities) {
             addTransactionId(transactionId);
             return true;
         }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java
index f69d43e..9282760 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java
@@ -17,8 +17,6 @@
 package com.android.server.wifi.aware;
 
 import static android.hardware.wifi.V1_0.NanDataPathChannelCfg.CHANNEL_NOT_REQUESTED;
-import static android.net.wifi.ScanResult.CHANNEL_WIDTH_80MHZ;
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128;
 
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.junit.Assert.assertArrayEquals;
@@ -44,7 +42,6 @@
 import android.Manifest;
 import android.app.test.TestAlarmManager;
 import android.content.Context;
-import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.hardware.wifi.V1_0.NanStatusType;
 import android.net.ConnectivityManager;
@@ -56,7 +53,6 @@
 import android.net.NetworkSpecifier;
 import android.net.wifi.WifiManager;
 import android.net.wifi.aware.AttachCallback;
-import android.net.wifi.aware.AwareResources;
 import android.net.wifi.aware.ConfigRequest;
 import android.net.wifi.aware.DiscoverySession;
 import android.net.wifi.aware.DiscoverySessionCallback;
@@ -69,30 +65,23 @@
 import android.net.wifi.aware.SubscribeConfig;
 import android.net.wifi.aware.SubscribeDiscoverySession;
 import android.net.wifi.aware.TlvBufferUtils;
-import android.net.wifi.aware.WifiAwareChannelInfo;
 import android.net.wifi.aware.WifiAwareManager;
 import android.net.wifi.aware.WifiAwareNetworkInfo;
 import android.net.wifi.aware.WifiAwareNetworkSpecifier;
 import android.net.wifi.aware.WifiAwareSession;
 import android.net.wifi.util.HexEncoding;
-import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Messenger;
 import android.os.PowerManager;
 import android.os.Process;
-import android.os.UserHandle;
 import android.os.test.TestLooper;
 
 import androidx.test.filters.SmallTest;
 
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.Clock;
-import com.android.server.wifi.HalDeviceManager;
-import com.android.server.wifi.InterfaceConflictManager;
 import com.android.server.wifi.MockResources;
 import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.WifiInjector;
 import com.android.server.wifi.aware.WifiAwareDataPathStateManager.WifiAwareNetworkAgent;
 import com.android.server.wifi.util.NetdWrapper;
 import com.android.server.wifi.util.WifiPermissionsUtil;
@@ -127,10 +116,6 @@
     private static final String sAwareInterfacePrefix = "aware_data";
     private static final String TEST_PACKAGE_NAME = "com.android.somePackage";
     private static final String TEST_FEATURE_ID = "com.android.someFeature";
-    private static final int MAX_NDP_SESSION = 8;
-
-    private static final WifiAwareChannelInfo AWARE_CHANNEL_INFO =
-            new WifiAwareChannelInfo(5750, CHANNEL_WIDTH_80MHZ, 2);
 
     private TestLooper mMockLooper;
     private Handler mMockLooperHandler;
@@ -142,7 +127,6 @@
     @Mock private Context mMockContext;
     @Mock private ConnectivityManager mMockCm;
     @Mock private NetdWrapper mMockNetdWrapper;
-    @Mock private InterfaceConflictManager mInterfaceConflictManager;
     @Mock private WifiAwareDataPathStateManager.NetworkInterfaceWrapper mMockNetworkInterface;
     @Mock private IWifiAwareEventCallback mMockCallback;
     @Mock IWifiAwareDiscoverySessionCallback mMockSessionCallback;
@@ -152,12 +136,10 @@
     @Mock private WifiManager mMockWifiManager;
     TestAlarmManager mAlarmManager;
     @Mock private PowerManager mMockPowerManager;
-    @Mock private WifiInjector mWifiInjector;
 
     @Rule
     public ErrorCollector collector = new ErrorCollector();
     private MockResources mResources;
-    private Bundle mExtras = new Bundle();
 
     /**
      * Initialize mocks.
@@ -182,21 +164,16 @@
                 Context.POWER_SERVICE);
         when(mMockContext.getSystemService(PowerManager.class)).thenReturn(mMockPowerManager);
 
-        when(mInterfaceConflictManager.manageInterfaceConflictForStateMachine(any(), any(), any(),
-                any(), any(), eq(HalDeviceManager.HDM_CREATE_IFACE_NAN), any())).thenReturn(
-                InterfaceConflictManager.ICM_EXECUTE_COMMAND);
-
         // by default pretend to be an old API: i.e. allow Responders configured as *ANY*. This
         // allows older (more extrensive) tests to run.
         when(mWifiPermissionsUtil.isTargetSdkLessThan(anyString(), anyInt(), anyInt()))
             .thenReturn(true);
         when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true);
 
-        mDut = new WifiAwareStateManager(mWifiInjector);
+        mDut = new WifiAwareStateManager();
         mDut.setNative(mMockNativeManager, mMockNative);
         mDut.start(mMockContext, mMockLooper.getLooper(), mAwareMetricsMock,
-                mWifiPermissionsUtil, mPermissionsWrapperMock, mClock, mMockNetdWrapper,
-                mInterfaceConflictManager);
+                mWifiPermissionsUtil, mPermissionsWrapperMock, mClock, mMockNetdWrapper);
         mDut.startLate();
         mMockLooper.dispatchAll();
 
@@ -232,7 +209,6 @@
 
         Capabilities capabilities = new Capabilities();
         capabilities.maxNdiInterfaces = numNdis;
-        capabilities.supportedCipherSuites = WIFI_AWARE_CIPHER_SUITE_NCS_SK_128;
 
         ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
         ArgumentCaptor<String> interfaceName = ArgumentCaptor.forClass(String.class);
@@ -308,7 +284,47 @@
      * Validate that trying to specify port info on subscriber results in failure.
      */
     @Test
-    public void testDataPathWithPortInfoOnSubscriber() throws Exception {
+    public void testDataPathWithPortInfoOnPublisher() throws Exception {
+        final int clientId = 123;
+        final byte pubSubId = 55;
+        final int requestorId = 1341234;
+        final String passphrase = "SomeSecurePassword";
+        final int ndpId = 1;
+        final byte[] peerDiscoveryMac = HexEncoding.decode("000102030405".toCharArray(), false);
+
+        InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback);
+        InOrder inOrderM = inOrder(mAwareMetricsMock);
+
+        // (0) initialize
+        DataPathEndPointInfo res = initDataPathEndPoint(true, clientId, pubSubId, requestorId,
+                peerDiscoveryMac, inOrder, inOrderM, false);
+
+        // (1) request network
+        NetworkRequest nr = getSessionNetworkRequestMore(clientId, res.mSessionId, res.mPeerHandle,
+                null, passphrase, true, 0, 5, 6);
+
+        Message reqNetworkMsg = Message.obtain();
+        reqNetworkMsg.what = NetworkProvider.CMD_REQUEST_NETWORK;
+        reqNetworkMsg.obj = nr;
+        reqNetworkMsg.arg1 = 0;
+        res.mMessenger.send(reqNetworkMsg);
+        mMockLooper.dispatchAll();
+        inOrderM.verify(mAwareMetricsMock, never()).recordNdpRequestType(anyInt());
+
+        // (2) provide a request
+        mDut.onDataPathRequestNotification(pubSubId, peerDiscoveryMac, ndpId, null);
+        mMockLooper.dispatchAll();
+
+        // do not respond/create a data-path!
+        verify(mMockNative, never()).respondToDataPathRequest(anyShort(), anyBoolean(), anyInt(),
+                anyString(), any(), anyString(), any(), anyBoolean(), any());
+    }
+
+    /**
+     * Validate that trying to specify invalid port info results in failure.
+     */
+    @Test
+    public void testDataPathWithPortInfoInvalidPort() throws Exception {
         final int clientId = 123;
         final byte pubSubId = 55;
         final int requestorId = 1341234;
@@ -324,7 +340,7 @@
 
         // (1) request network
         NetworkRequest nr = getSessionNetworkRequestMore(clientId, res.mSessionId, res.mPeerHandle,
-                null, passphrase, false, 0, 5, 6);
+                null, passphrase, false, 0, -3, 6);
 
         Message reqNetworkMsg = Message.obtain();
         reqNetworkMsg.what = NetworkProvider.CMD_REQUEST_NETWORK;
@@ -336,61 +352,17 @@
 
         // do not create a data-path!
         verify(mMockNative, never()).initiateDataPath(anyShort(), anyInt(), anyInt(), anyInt(),
-                any(), anyString(), anyBoolean(), any(), any(),
-                any());
-
-
-    }
-
-    /**
-     * Validate that trying to specify invalid port info results in failure.
-     */
-    @Test
-    public void testDataPathWithPortInfoInvalidPort() throws Exception {
-        final int clientId = 123;
-        final byte pubSubId = 55;
-        final int requestorId = 1341234;
-        final int ndpId = 1;
-        final String passphrase = "SomeSecurePassword";
-        final byte[] peerDiscoveryMac = HexEncoding.decode("000102030405".toCharArray(), false);
-
-        InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback);
-        InOrder inOrderM = inOrder(mAwareMetricsMock);
-
-        // (0) initialize
-        DataPathEndPointInfo res = initDataPathEndPoint(true, clientId, pubSubId, requestorId,
-                peerDiscoveryMac, inOrder, inOrderM, false);
-
-        // (1) request network
-        NetworkRequest nr = getSessionNetworkRequestMore(clientId, res.mSessionId, res.mPeerHandle,
-                null, passphrase, true, 0, -3, 6);
-
-        Message reqNetworkMsg = Message.obtain();
-        reqNetworkMsg.what = NetworkProvider.CMD_REQUEST_NETWORK;
-        reqNetworkMsg.obj = nr;
-        reqNetworkMsg.arg1 = 0;
-        res.mMessenger.send(reqNetworkMsg);
-        mMockLooper.dispatchAll();
-        inOrderM.verify(mAwareMetricsMock, never()).recordNdpRequestType(anyInt());
-
-        // (2) provide a request
-        mDut.onDataPathRequestNotification(pubSubId, peerDiscoveryMac, ndpId, null);
-        mMockLooper.dispatchAll();
-
-        // (3) reject the request
-        verify(mMockNative).respondToDataPathRequest(anyShort(), eq(false), anyInt(),
-                anyString(), any(), anyBoolean(), any(), any());
+                any(), anyString(), any(), anyString(), anyBoolean(), any(), any());
     }
 
     /**
      * Validate that trying to specify port info without security results in failure.
      */
     @Test
-    public void testDataPathWithPortInfoButNoSecurityOnPublisher() throws Exception {
+    public void testDataPathWithPortInfoButNoSecurityOnSubscriber() throws Exception {
         final int clientId = 123;
         final byte pubSubId = 55;
         final int requestorId = 1341234;
-        final int ndpId = 1;
         final byte[] peerDiscoveryMac = HexEncoding.decode("000102030405".toCharArray(), false);
 
         InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback);
@@ -402,7 +374,7 @@
 
         // (1) request network
         NetworkRequest nr = getSessionNetworkRequestMore(clientId, res.mSessionId, res.mPeerHandle,
-                null, null, true, 0, 10, 6);
+                null, null, false, 0, 10, 6);
 
         Message reqNetworkMsg = Message.obtain();
         reqNetworkMsg.what = NetworkProvider.CMD_REQUEST_NETWORK;
@@ -412,13 +384,9 @@
         mMockLooper.dispatchAll();
         inOrderM.verify(mAwareMetricsMock, never()).recordNdpRequestType(anyInt());
 
-        // (2) provide a request
-        mDut.onDataPathRequestNotification(pubSubId, peerDiscoveryMac, ndpId, null);
-        mMockLooper.dispatchAll();
-
-        // (3) reject the request
-        verify(mMockNative).respondToDataPathRequest(anyShort(), eq(false), anyInt(),
-                anyString(), any(), anyBoolean(), any(), any());
+        // do not create a data-path!
+        verify(mMockNative, never()).initiateDataPath(anyShort(), anyInt(), anyInt(), anyInt(),
+                any(), anyString(), any(), anyString(), anyBoolean(), any(), any());
     }
 
     /**
@@ -469,7 +437,7 @@
 
         // (4) verify that responder aborts (i.e. refuses request)
         inOrder.verify(mMockNative).respondToDataPathRequest(transactionId.capture(), eq(false),
-                eq(ndpId), eq(""), eq(null), eq(false), any(), any());
+                eq(ndpId), eq(""), eq(null), eq(null), eq(null), eq(false), any());
         mDut.onRespondToDataPathSetupRequestResponse(transactionId.getValue(), true, 0);
         mMockLooper.dispatchAll();
 
@@ -501,8 +469,6 @@
         final int[] startOrder = {0, 1, 2};
         final int[] endOrder = {1, 0, 2};
         int networkRequestId = 0;
-        int expectAvailableNdp = MAX_NDP_SESSION;
-        AwareResources awareResources;
 
         mResources.setBoolean(R.bool.config_wifiAllowMultipleNetworksOnSameAwareNdi, true);
 
@@ -510,7 +476,7 @@
                 ArgumentCaptor.forClass(WifiAwareNetworkAgent.class);
         ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
         InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback,
-                mMockNetdWrapper, mMockNetworkInterface, mMockContext);
+                mMockNetdWrapper, mMockNetworkInterface);
         InOrder inOrderM = inOrder(mAwareMetricsMock);
 
         NetworkRequest[] nrs = new NetworkRequest[3];
@@ -547,19 +513,15 @@
             inOrder.verify(mMockNative).initiateDataPath(transactionId.capture(),
                     eq(requestorId + i),
                     eq(CHANNEL_NOT_REQUESTED), anyInt(), eq(peerDiscoveryMac),
-                    eq(interfaceName),
-                    eq(false), any(), any(), any());
+                    eq(interfaceName), eq(null),
+                    eq(null), eq(false), any(), any());
 
             mDut.onInitiateDataPathResponseSuccess(transactionId.getValue(), ndpId + i);
             mMockLooper.dispatchAll();
-            if (SdkLevel.isAtLeastT()) {
-                awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-                assertEquals(--expectAvailableNdp, awareResources.getAvailableDataPathsCount());
-            }
 
             // (2) get confirmation
             mDut.onDataPathConfirmNotification(ndpId + i, peerDataPathMac, true, 0,
-                    buildTlv(port, transportProtocol, true), List.of(AWARE_CHANNEL_INFO));
+                    buildTlv(port, transportProtocol, true), null);
             mMockLooper.dispatchAll();
             if (first) {
                 inOrder.verify(mMockNetdWrapper).setInterfaceUp(anyString());
@@ -580,7 +542,6 @@
             assertEquals(port, netInfo.getPort());
             assertEquals(transportProtocol, netInfo.getTransportProtocol());
             assertEquals(i + 1, mDut.mDataPathMgr.getNumOfNdps());
-            assertEquals(AWARE_CHANNEL_INFO, netInfo.getChannelInfoList().get(0));
         }
 
         // (3) end data-path (unless didn't get confirmation)
@@ -593,10 +554,6 @@
 
             agentBinders[i].onNetworkUnwanted();
             mMockLooper.dispatchAll();
-            if (SdkLevel.isAtLeastT()) {
-                awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-                assertEquals(++expectAvailableNdp, awareResources.getAvailableDataPathsCount());
-            }
 
             inOrder.verify(mMockNative).endDataPath(transactionId.capture(), eq(ndpId + i));
 
@@ -629,14 +586,12 @@
         final byte[] peerDataPathMac = HexEncoding.decode("0A0B0C0D0E0F".toCharArray(), false);
         final byte[] allZeros = HexEncoding.decode("000000000000".toCharArray(), false);
         NetworkRequest[] nrs = new NetworkRequest[numRequestsPre + numRequestsPost + 1];
-        int expectedAvailableNdps = MAX_NDP_SESSION;
-        AwareResources awareResources;
 
         ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
         ArgumentCaptor<WifiAwareNetworkAgent> agentCaptor =
                 ArgumentCaptor.forClass(WifiAwareNetworkAgent.class);
         InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback,
-                mMockNetdWrapper, mMockNetworkInterface, mMockContext);
+                mMockNetdWrapper, mMockNetworkInterface);
         InOrder inOrderM = inOrder(mAwareMetricsMock);
 
         // (1) initialize all clients
@@ -666,8 +621,7 @@
         // (3) verify the start NDP HAL request
         inOrder.verify(mMockNative).initiateDataPath(transactionId.capture(), eq(0),
                 eq(CHANNEL_NOT_REQUESTED), anyInt(), eq(peerDiscoveryMac),
-                eq(sAwareInterfacePrefix + "0"), eq(true), any(), any(),
-                any());
+                eq(sAwareInterfacePrefix + "0"), eq(null), eq(null), eq(true), any(), any());
 
         // (4) unregister request #0 (the primary)
         Message endNetworkReqMsg = Message.obtain();
@@ -679,10 +633,6 @@
         // (5) respond to the registration request
         mDut.onInitiateDataPathResponseSuccess(transactionId.getValue(), ndpId);
         mMockLooper.dispatchAll();
-        if (SdkLevel.isAtLeastT()) {
-            awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-            assertEquals(--expectedAvailableNdps, awareResources.getAvailableDataPathsCount());
-        }
 
         // (6) unregister request #1
         endNetworkReqMsg = Message.obtain();
@@ -753,10 +703,6 @@
         mMockLooper.dispatchAll();
 
         // (10) verify that NDP torn down
-        if (SdkLevel.isAtLeastT()) {
-            awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-            assertEquals(++expectedAvailableNdps, awareResources.getAvailableDataPathsCount());
-        }
         inOrder.verify(mMockNative).endDataPath(transactionId.capture(), eq(ndpId));
 
         mDut.onEndDataPathResponse(transactionId.getValue(), true, 0);
@@ -780,8 +726,6 @@
         final int ndpId = 5;
         final byte[] peerDiscoveryMac = HexEncoding.decode("000102030405".toCharArray(), false);
         final byte[] peerDataPathMac = HexEncoding.decode("0A0B0C0D0E0F".toCharArray(), false);
-        int expectedAvailableNdps = MAX_NDP_SESSION;
-        AwareResources awareResources;
 
         ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
         ArgumentCaptor<String> ifNameCaptor = ArgumentCaptor.forClass(String.class);
@@ -789,7 +733,7 @@
                 WifiAwareNetworkAgent.class);
 
         InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback,
-                mMockNetdWrapper, mMockNetworkInterface, mMockContext);
+                mMockNetdWrapper, mMockNetworkInterface);
         InOrder inOrderM = inOrder(mAwareMetricsMock);
 
         // (1) initialize all clients
@@ -820,18 +764,12 @@
             if (i < numNdis) {
                 inOrder.verify(mMockNative).initiateDataPath(transactionId.capture(), eq(0),
                         eq(CHANNEL_NOT_REQUESTED), anyInt(), eq(peerDiscoveryMac),
-                        ifNameCaptor.capture(), eq(true), any(), any(),
-                        any());
+                        ifNameCaptor.capture(), eq(pmk), eq(null), eq(true), any(), any());
                 interfaces.add(ifNameCaptor.getValue());
 
                 mDut.onInitiateDataPathResponseSuccess(transactionId.getValue(), ndpId + i);
                 mDut.onDataPathConfirmNotification(ndpId + i, peerDataPathMac, true, 0, null, null);
                 mMockLooper.dispatchAll();
-                if (SdkLevel.isAtLeastT()) {
-                    awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-                    assertEquals(--expectedAvailableNdps,
-                            awareResources.getAvailableDataPathsCount());
-                }
 
                 inOrder.verify(mMockNetdWrapper).setInterfaceUp(anyString());
                 inOrder.verify(mMockNetdWrapper).enableIpv6(anyString());
@@ -870,8 +808,6 @@
         final int numNdis = 5;
         final int clientId = 123;
         final int ndpId = 5;
-        int expectedAvailableNdps = MAX_NDP_SESSION;
-        AwareResources awareResources;
 
         ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
         ArgumentCaptor<String> ifNameCaptor = ArgumentCaptor.forClass(String.class);
@@ -879,7 +815,7 @@
                 WifiAwareNetworkAgent.class);
 
         InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback,
-                mMockNetdWrapper, mMockNetworkInterface, mMockContext);
+                mMockNetdWrapper, mMockNetworkInterface);
         InOrder inOrderM = inOrder(mAwareMetricsMock);
 
         // (1) initialize all clients
@@ -915,18 +851,13 @@
             if (i < numNdis) {
                 inOrder.verify(mMockNative).initiateDataPath(transactionId.capture(), eq(0),
                         eq(CHANNEL_NOT_REQUESTED), anyInt(), eq(peerDiscoveryMac),
-                        ifNameCaptor.capture(), eq(true), any(), any(), any());
+                        ifNameCaptor.capture(), eq(pmk), eq(null), eq(true), any(), any());
                 interfaces.add(ifNameCaptor.getValue());
 
                 mDut.onInitiateDataPathResponseSuccess(transactionId.getValue(), ndpId + i);
                 mDut.onDataPathConfirmNotification(ndpId + i, peerDataPathMac, true, 0, null, null);
                 mMockLooper.dispatchAll();
 
-                if (SdkLevel.isAtLeastT()) {
-                    awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-                    assertEquals(--expectedAvailableNdps,
-                            awareResources.getAvailableDataPathsCount());
-                }
                 inOrder.verify(mMockNetdWrapper).setInterfaceUp(anyString());
                 inOrder.verify(mMockNetdWrapper).enableIpv6(anyString());
                 inOrder.verify(mMockNetworkInterface).setConnected(agentCaptor.capture());
@@ -965,8 +896,6 @@
         final int clientId = 123;
         final int ndpId = 5;
         final int numberNdp = 3;
-        int expectedAvailableNdps = MAX_NDP_SESSION;
-        AwareResources awareResources = null;
 
         mResources.setBoolean(R.bool.config_wifiAllowMultipleNetworksOnSameAwareNdi, true);
 
@@ -976,7 +905,7 @@
                 WifiAwareNetworkAgent.class);
 
         InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback,
-                mMockNetdWrapper, mMockNetworkInterface, mMockContext);
+                mMockNetdWrapper, mMockNetworkInterface);
         InOrder inOrderM = inOrder(mAwareMetricsMock);
 
         // (1) initialize all clients
@@ -1012,18 +941,12 @@
 
             inOrder.verify(mMockNative).initiateDataPath(transactionId.capture(), eq(0),
                     eq(CHANNEL_NOT_REQUESTED), anyInt(), eq(peerDiscoveryMac),
-                    ifNameCaptor.capture(), eq(true), any(), any(),
-                    any());
+                    ifNameCaptor.capture(), eq(pmk), eq(null), eq(true), any(), any());
             interfaces.add(ifNameCaptor.getValue());
 
             mDut.onInitiateDataPathResponseSuccess(transactionId.getValue(), ndpId + i);
             mDut.onDataPathConfirmNotification(ndpId + i, peerDataPathMac, true, 0, null, null);
             mMockLooper.dispatchAll();
-            if (SdkLevel.isAtLeastT()) {
-                awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-                assertEquals(--expectedAvailableNdps, awareResources.getAvailableDataPathsCount());
-            }
-
             if (first) {
                 inOrder.verify(mMockNetdWrapper).setInterfaceUp(anyString());
                 inOrder.verify(mMockNetdWrapper).enableIpv6(anyString());
@@ -1408,8 +1331,8 @@
                 ns.sessionId,
                 ns.peerId,
                 ns.peerMac,
-                ns.getWifiAwareDataPathSecurityConfig().getPmk(),
-                ns.getWifiAwareDataPathSecurityConfig().getPskPassphrase(),
+                ns.pmk,
+                ns.passphrase,
                 0,
                 0);
         nr.networkCapabilities.setNetworkSpecifier(ns);
@@ -1433,7 +1356,7 @@
             mDut.onDataPathRequestNotification(pubSubId, peerDiscoveryMac, ndpId, null);
             mMockLooper.dispatchAll();
             inOrder.verify(mMockNative).respondToDataPathRequest(anyShort(), eq(false),
-                    eq(ndpId), eq(""), eq(null), anyBoolean(), any(), any());
+                    eq(ndpId), eq(""), eq(null), eq(null), eq(null), anyBoolean(), any());
         }
 
         verifyNoMoreInteractions(mMockNative, mAwareMetricsMock, mMockNetdWrapper);
@@ -1469,8 +1392,8 @@
                 ns.sessionId,
                 ns.peerId,
                 ns.peerMac,
-                ns.getWifiAwareDataPathSecurityConfig().getPmk(),
-                ns.getWifiAwareDataPathSecurityConfig().getPskPassphrase(),
+                ns.pmk,
+                ns.passphrase,
                 0,
                 0);
         nr.networkCapabilities.setNetworkSpecifier(ns);
@@ -1496,7 +1419,7 @@
             mDut.onDataPathRequestNotification(pubSubId, peerDiscoveryMac, ndpId, null);
             mMockLooper.dispatchAll();
             inOrder.verify(mMockNative).respondToDataPathRequest(anyShort(), eq(false),
-                    eq(ndpId), eq(""), eq(null), anyBoolean(), any(), any());
+                    eq(ndpId), eq(""), eq(null), eq(null), eq(null), anyBoolean(), any());
         }
 
         verifyNoMoreInteractions(mMockNative, mAwareMetricsMock, mMockNetdWrapper);
@@ -1532,8 +1455,8 @@
                 ns.sessionId,
                 ns.peerId,
                 ns.peerMac,
-                ns.getWifiAwareDataPathSecurityConfig().getPmk(),
-                ns.getWifiAwareDataPathSecurityConfig().getPskPassphrase(),
+                ns.pmk,
+                ns.passphrase,
                 0,
                 0);
         nr.networkCapabilities.setNetworkSpecifier(ns);
@@ -1558,7 +1481,7 @@
             mDut.onDataPathRequestNotification(pubSubId, peerDiscoveryMac, ndpId, null);
             mMockLooper.dispatchAll();
             inOrder.verify(mMockNative).respondToDataPathRequest(anyShort(), eq(false),
-                    eq(ndpId), eq(""), eq(null), anyBoolean(), any(), any());
+                    eq(ndpId), eq(""), eq(null), eq(null), eq(null), anyBoolean(), any());
         }
 
         verifyNoMoreInteractions(mMockNative, mAwareMetricsMock, mMockNetdWrapper);
@@ -1588,14 +1511,12 @@
         final byte[] pmk = "01234567890123456789012345678901".getBytes();
         final String passphrase = "some passphrase";
         final byte[] peerDiscoveryMac = HexEncoding.decode("000102030405".toCharArray(), false);
-        int expectedAvailableNdps = MAX_NDP_SESSION;
-        AwareResources awareResources;
 
         ArgumentCaptor<WifiAwareNetworkAgent> agentCaptor =
                 ArgumentCaptor.forClass(WifiAwareNetworkAgent.class);
         ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
         InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback,
-                mMockNetdWrapper, mMockNetworkInterface, mMockContext);
+                mMockNetdWrapper, mMockNetworkInterface);
         InOrder inOrderM = inOrder(mAwareMetricsMock);
         WifiAwareNetworkAgent networkAgent = null;
 
@@ -1607,7 +1528,7 @@
 
         if (immediateHalFailure) {
             when(mMockNative.initiateDataPath(anyShort(), anyInt(), anyInt(), anyInt(), any(),
-                    any(), anyBoolean(), any(), any(), any())).thenReturn(false);
+                    any(), any(), any(), anyBoolean(), any(), any())).thenReturn(false);
 
         }
 
@@ -1638,9 +1559,8 @@
         inOrder.verify(mMockNative).initiateDataPath(transactionId.capture(),
                 eq(useDirect ? 0 : requestorId),
                 eq(CHANNEL_NOT_REQUESTED), anyInt(), eq(peerDiscoveryMac),
-                eq(sAwareInterfacePrefix + "0"),
-                eq(useDirect), any(), any(),
-                any());
+                eq(sAwareInterfacePrefix + "0"), eq(providePmk ? pmk : null),
+                eq(providePassphrase ? passphrase : null), eq(useDirect), any(), any());
         if (immediateHalFailure) {
             // short-circuit the rest of this test
             inOrderM.verify(mAwareMetricsMock).recordNdpStatus(eq(NanStatusType.INTERNAL_FAILURE),
@@ -1652,10 +1572,6 @@
 
         mDut.onInitiateDataPathResponseSuccess(transactionId.getValue(), ndpId);
         mMockLooper.dispatchAll();
-        if (SdkLevel.isAtLeastT()) {
-            awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-            assertEquals(--expectedAvailableNdps, awareResources.getAvailableDataPathsCount());
-        }
 
         // (2) get confirmation OR timeout
         boolean timeout = false;
@@ -1704,11 +1620,6 @@
             }
             if (timeout) {
                 verifyRequestDeclaredUnfullfillable(nr);
-                if (SdkLevel.isAtLeastT()) {
-                    awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-                    assertEquals(++expectedAvailableNdps,
-                            awareResources.getAvailableDataPathsCount());
-                }
                 inOrder.verify(mMockNative).endDataPath(transactionId.capture(), eq(ndpId));
                 mDut.onEndDataPathResponse(transactionId.getValue(), true, 0);
             } else {
@@ -1733,10 +1644,6 @@
                     WifiAwareStateManager.HAL_DATA_PATH_CONFIRM_TIMEOUT_TAG));
             mMockLooper.dispatchAll();
             verifyRequestDeclaredUnfullfillable(nr);
-            if (SdkLevel.isAtLeastT()) {
-                awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-                assertEquals(++expectedAvailableNdps, awareResources.getAvailableDataPathsCount());
-            }
             inOrder.verify(mMockNative).endDataPath(transactionId.capture(), eq(ndpId));
             mDut.onEndDataPathResponse(transactionId.getValue(), true, 0);
             mMockLooper.dispatchAll();
@@ -1752,15 +1659,11 @@
             res.mMessenger.send(endNetworkReqMsg);
 
             networkAgent.onNetworkUnwanted();
-            mMockLooper.dispatchAll();
-            if (SdkLevel.isAtLeastT()) {
-                awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-                assertEquals(++expectedAvailableNdps, awareResources.getAvailableDataPathsCount());
-            }
-            inOrder.verify(mMockNative).endDataPath(transactionId.capture(), eq(ndpId));
             mDut.onEndDataPathResponse(transactionId.getValue(), true, 0);
             mDut.onDataPathEndNotification(ndpId);
             mMockLooper.dispatchAll();
+
+            inOrder.verify(mMockNative).endDataPath(transactionId.capture(), eq(ndpId));
             inOrder.verify(mMockNetdWrapper).setInterfaceDown(anyString());
             inOrderM.verify(mAwareMetricsMock).recordNdpSessionDuration(anyLong());
         }
@@ -1780,14 +1683,12 @@
         final String passphrase = "some passphrase";
         final byte[] peerDiscoveryMac = HexEncoding.decode("000102030405".toCharArray(), false);
         final byte[] peerDataPathMac = HexEncoding.decode("0A0B0C0D0E0F".toCharArray(), false);
-        int expectedAvailableNdps = MAX_NDP_SESSION;
-        AwareResources awareResources;
 
         ArgumentCaptor<WifiAwareNetworkAgent> agentCaptor =
                 ArgumentCaptor.forClass(WifiAwareNetworkAgent.class);
         ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
         InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback,
-                mMockNetdWrapper, mMockNetworkInterface, mMockContext);
+                mMockNetdWrapper, mMockNetworkInterface);
         InOrder inOrderM = inOrder(mAwareMetricsMock);
 
         if (providePmk) {
@@ -1825,14 +1726,10 @@
         mDut.onDataPathRequestNotification(pubSubId, peerDiscoveryMac, ndpId, null);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).respondToDataPathRequest(transactionId.capture(), eq(true),
-                eq(ndpId), eq(sAwareInterfacePrefix + "0"),
-                eq(null), eq(useDirect), any(), any());
+                eq(ndpId), eq(sAwareInterfacePrefix + "0"), eq(providePmk ? pmk : null),
+                eq(providePassphrase ? passphrase : null), eq(null), eq(useDirect), any());
         mDut.onRespondToDataPathSetupRequestResponse(transactionId.getValue(), true, 0);
         mMockLooper.dispatchAll();
-        if (SdkLevel.isAtLeastT()) {
-            awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-            assertEquals(--expectedAvailableNdps, awareResources.getAvailableDataPathsCount());
-        }
 
         // (3) get confirmation OR timeout
         if (getConfirmation) {
@@ -1858,10 +1755,6 @@
                     WifiAwareStateManager.HAL_DATA_PATH_CONFIRM_TIMEOUT_TAG));
             mMockLooper.dispatchAll();
             verifyRequestDeclaredUnfullfillable(nr);
-            if (SdkLevel.isAtLeastT()) {
-                awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-                assertEquals(++expectedAvailableNdps, awareResources.getAvailableDataPathsCount());
-            }
             inOrder.verify(mMockNative).endDataPath(transactionId.capture(), eq(ndpId));
             mDut.onEndDataPathResponse(transactionId.getValue(), true, 0);
             mMockLooper.dispatchAll();
@@ -1877,17 +1770,12 @@
             res.mMessenger.send(endNetworkMsg);
 
             agentCaptor.getValue().onNetworkUnwanted();
-            mMockLooper.dispatchAll();
-            if (SdkLevel.isAtLeastT()) {
-                awareResources = validateCorrectAwareResourcesChangeBroadcast(inOrder);
-                assertEquals(++expectedAvailableNdps, awareResources.getAvailableDataPathsCount());
-            }
-            inOrder.verify(mMockNative).endDataPath(transactionId.capture(), eq(ndpId));
 
             mDut.onEndDataPathResponse(transactionId.getValue(), true, 0);
             mDut.onDataPathEndNotification(ndpId);
             mMockLooper.dispatchAll();
 
+            inOrder.verify(mMockNative).endDataPath(transactionId.capture(), eq(ndpId));
             inOrder.verify(mMockNetdWrapper).setInterfaceDown(anyString());
             inOrderM.verify(mAwareMetricsMock).recordNdpSessionDuration(anyLong());
         }
@@ -1928,7 +1816,7 @@
 
         mgr.attach(mMockLooperHandler, configRequest, mockCallback, null);
         inOrderS.verify(mockAwareService).connect(any(), any(), any(),
-                clientProxyCallback.capture(), eq(configRequest), eq(false), any());
+                clientProxyCallback.capture(), eq(configRequest), eq(false));
         IWifiAwareEventCallback iwaec = clientProxyCallback.getValue();
         iwaec.onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
@@ -1937,12 +1825,12 @@
             sessionCaptor.getValue().publish(publishConfig, mockSessionCallback,
                     mMockLooperHandler);
             inOrderS.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                    sessionProxyCallback.capture(), any());
+                    sessionProxyCallback.capture());
         } else {
             sessionCaptor.getValue().subscribe(subscribeConfig, mockSessionCallback,
                     mMockLooperHandler);
             inOrderS.verify(mockAwareService).subscribe(any(), any(), eq(clientId),
-                    eq(subscribeConfig), sessionProxyCallback.capture(), any());
+                    eq(subscribeConfig), sessionProxyCallback.capture());
         }
         sessionProxyCallback.getValue().onSessionStarted(sessionId);
         mMockLooper.dispatchAll();
@@ -2008,7 +1896,7 @@
 
         mgr.attach(mMockLooperHandler, configRequest, mockCallback, null);
         verify(mockAwareService).connect(any(), any(), any(),
-                clientProxyCallback.capture(), eq(configRequest), eq(false), any());
+                clientProxyCallback.capture(), eq(configRequest), eq(false));
         clientProxyCallback.getValue().onConnectSuccess(clientId);
         mMockLooper.dispatchAll();
         verify(mockCallback).onAttached(sessionCaptor.capture());
@@ -2098,8 +1986,6 @@
 
         Capabilities capabilities = new Capabilities();
         capabilities.maxNdiInterfaces = maxNdiInterfaces;
-        capabilities.supportedCipherSuites = WIFI_AWARE_CIPHER_SUITE_NCS_SK_128;
-        capabilities.maxNdpSessions = MAX_NDP_SESSION;
 
         if (startUpSequence) {
             // (0) start/registrations
@@ -2122,13 +2008,13 @@
 
         // (3) create client
         mDut.connect(clientId, Process.myUid(), pid, TEST_PACKAGE_NAME, TEST_FEATURE_ID,
-                mMockCallback, configRequest, false, mExtras);
+                mMockCallback, configRequest, false);
         mMockLooper.dispatchAll();
 
         if (startUpSequence) {
             inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                     eq(configRequest), eq(false), eq(true), eq(true),
-                    eq(false), eq(false), eq(false), anyInt());
+                    eq(false), eq(false), eq(false));
             mDut.onConfigSuccessResponse(transactionId.getValue());
             mMockLooper.dispatchAll();
         }
@@ -2329,8 +2215,8 @@
             mDut.onDataPathRequestNotification(pubSubId, peerDiscoveryMac, ndpId, null);
             mMockLooper.dispatchAll();
             inOrder.verify(mMockNative).respondToDataPathRequest(transactionId.capture(), eq(true),
-                    eq(ndpId), eq(sAwareInterfacePrefix + "0"),
-                    eq(null), eq(false), any(), any());
+                    eq(ndpId), eq(sAwareInterfacePrefix + "0"), eq(providePmk ? pmk : null),
+                    eq(providePassphrase ? passphrase : null), eq(null), eq(false), any());
             mDut.onRespondToDataPathSetupRequestResponse(transactionId.getValue(), true, 0);
             mMockLooper.dispatchAll();
 
@@ -2470,8 +2356,7 @@
 
         // (4) Initiator request succeed
         verify(mMockNative).initiateDataPath(transactionId.capture(), anyInt(), anyInt(), anyInt(),
-                any(), interfaceName1.capture(), anyBoolean(), any(), any(),
-                any());
+                any(), interfaceName1.capture(), any(), anyString(), anyBoolean(), any(), any());
         mDut.onInitiateDataPathResponseSuccess(transactionId.getValue(), ndpId);
 
         // (5) provide a request from peer
@@ -2480,8 +2365,7 @@
 
         // (6) make sure framework respond with the right accepts any peer request.
         verify(mMockNative).respondToDataPathRequest(anyShort(), eq(true), eq(ndpId2),
-                interfaceName2.capture(), any(), anyBoolean(), any(),
-                any());
+                interfaceName2.capture(), eq(null), eq(passphrase), any(), anyBoolean(), any());
 
         assertNotEquals(interfaceName1.getValue(), interfaceName2.getValue());
     }
@@ -2546,8 +2430,7 @@
 
         // (4) make sure framework respond with the peer specific request.
         verify(mMockNative).respondToDataPathRequest(transactionId.capture(), eq(true), eq(ndpId),
-                interfaceName1.capture(), any(), anyBoolean(), any(),
-                any());
+                interfaceName1.capture(), eq(null), eq(passphrase1), any(), anyBoolean(), any());
         mDut.onRespondToDataPathSetupRequestResponse(transactionId.getValue(), true, 0);
         mMockLooper.dispatchAll();
 
@@ -2557,26 +2440,8 @@
 
         // (6) make sure framework respond with the right accepts any peer request.
         verify(mMockNative).respondToDataPathRequest(anyShort(), eq(true), eq(ndpId2),
-                interfaceName2.capture(), any(), anyBoolean(), any(),
-                any());
+                interfaceName2.capture(), eq(null), eq(passphrase), any(), anyBoolean(), any());
 
         assertNotEquals(interfaceName1.getValue(), interfaceName2.getValue());
     }
-
-    /**
-     * Validates that the broadcast sent on Aware status change is correct.
-     */
-    private AwareResources validateCorrectAwareResourcesChangeBroadcast(InOrder inOrder) {
-        if (!SdkLevel.isAtLeastT()) {
-            return null;
-        }
-        ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class);
-
-        inOrder.verify(mMockContext, atLeastOnce()).sendBroadcastAsUser(captor.capture(),
-                eq(UserHandle.ALL), anyString());
-        Intent intent = captor.getValue();
-        collector.checkThat("intent action", intent.getAction(),
-                equalTo(WifiAwareManager.ACTION_WIFI_AWARE_RESOURCE_CHANGED));
-        return intent.getParcelableExtra(WifiAwareManager.EXTRA_AWARE_RESOURCES);
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareMetricsTest.java b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareMetricsTest.java
index fe3e29a..f271f77 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareMetricsTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareMetricsTest.java
@@ -243,25 +243,25 @@
         // uid1: session 1
         clients.put(10,
                 new WifiAwareClientState(mMockContext, 10, uid1, 0, null, null, null, null, false,
-                        mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil, null));
+                        mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil));
         mDut.recordAttachSession(uid1, false, clients);
 
         // uid1: session 2
         clients.put(11,
                 new WifiAwareClientState(mMockContext, 11, uid1, 0, null, null, null, null, false,
-                        mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil, null));
+                        mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil));
         mDut.recordAttachSession(uid1, false, clients);
 
         // uid2: session 1
         clients.put(12,
                 new WifiAwareClientState(mMockContext, 12, uid2, 0, null, null, null, null, false,
-                        mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil, null));
+                        mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil));
         mDut.recordAttachSession(uid2, false, clients);
 
         // uid2: session 2
         clients.put(13,
                 new WifiAwareClientState(mMockContext, 13, uid2, 0, null, null, null, null, true,
-                        mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil, null));
+                        mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil));
         mDut.recordAttachSession(uid2, true, clients);
 
         // uid2: delete session 1
@@ -277,7 +277,7 @@
         // uid2: session 3
         clients.put(14,
                 new WifiAwareClientState(mMockContext, 14, uid2, 0, null, null, null, null, false,
-                        mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil, null));
+                        mClock.getElapsedSinceBootMillis(), mWifiPermissionsUtil));
         mDut.recordAttachSession(uid2, false, clients);
 
         // a few failures
@@ -320,60 +320,60 @@
 
         setTime(5);
         WifiAwareClientState client1 = new WifiAwareClientState(mMockContext, 10, uid1, 0, null,
-                null, null, null, false, 0, mWifiPermissionsUtil, null);
+                null, null, null, false, 0, mWifiPermissionsUtil);
         WifiAwareClientState client2 = new WifiAwareClientState(mMockContext, 11, uid2, 0, null,
-                null, null, null, false, 0, mWifiPermissionsUtil, null);
+                null, null, null, false, 0, mWifiPermissionsUtil);
         WifiAwareClientState client3 = new WifiAwareClientState(mMockContext, 12, uid3, 0, null,
-                null, null, null, false, 0, mWifiPermissionsUtil, null);
+                null, null, null, false, 0, mWifiPermissionsUtil);
         clients.put(10, client1);
         clients.put(11, client2);
         clients.put(12, client3);
 
         // uid1: publish session 1
         client1.addSession(new WifiAwareDiscoverySessionState(null, 100, (byte) 0, null, true,
-                false, mClock.getElapsedSinceBootMillis(), false, 0));
+                false, mClock.getElapsedSinceBootMillis()));
         mDut.recordDiscoverySession(uid1, clients);
         mDut.recordDiscoveryStatus(uid1, NanStatusType.SUCCESS, true);
 
         // uid1: publish session 2
         client1.addSession(new WifiAwareDiscoverySessionState(null, 101, (byte) 0, null, true,
-                false, mClock.getElapsedSinceBootMillis(), false, 0));
+                false, mClock.getElapsedSinceBootMillis()));
         mDut.recordDiscoverySession(uid1, clients);
         mDut.recordDiscoveryStatus(uid1, NanStatusType.SUCCESS, true);
 
         // uid3: publish session 3 with ranging
         client3.addSession(new WifiAwareDiscoverySessionState(null, 111, (byte) 0, null, true,
-                true, mClock.getElapsedSinceBootMillis(), false, 0));
+                true, mClock.getElapsedSinceBootMillis()));
         mDut.recordDiscoverySessionWithRanging(uid3, false, -1, -1, clients);
         mDut.recordDiscoveryStatus(uid3, NanStatusType.SUCCESS, true);
 
         // uid2: subscribe session 1
         client2.addSession(new WifiAwareDiscoverySessionState(null, 102, (byte) 0, null, false,
-                false, mClock.getElapsedSinceBootMillis(), false, 0));
+                false, mClock.getElapsedSinceBootMillis()));
         mDut.recordDiscoverySession(uid2, clients);
         mDut.recordDiscoveryStatus(uid2, NanStatusType.SUCCESS, false);
 
         // uid2: publish session 2
         client2.addSession(new WifiAwareDiscoverySessionState(null, 103, (byte) 0, null, true,
-                false, mClock.getElapsedSinceBootMillis(), false, 0));
+                false, mClock.getElapsedSinceBootMillis()));
         mDut.recordDiscoverySession(uid2, clients);
         mDut.recordDiscoveryStatus(uid2, NanStatusType.SUCCESS, false);
 
         // uid3: subscribe session 3 with ranging: min
         client3.addSession(new WifiAwareDiscoverySessionState(null, 112, (byte) 0, null, false,
-                true, mClock.getElapsedSinceBootMillis(), false, 0));
+                true, mClock.getElapsedSinceBootMillis()));
         mDut.recordDiscoverySessionWithRanging(uid3, true, 10, -1, clients);
         mDut.recordDiscoveryStatus(uid3, NanStatusType.SUCCESS, false);
 
         // uid3: subscribe session 3 with ranging: max
         client3.addSession(new WifiAwareDiscoverySessionState(null, 113, (byte) 0, null, false,
-                true, mClock.getElapsedSinceBootMillis(), false, 0));
+                true, mClock.getElapsedSinceBootMillis()));
         mDut.recordDiscoverySessionWithRanging(uid3, true, -1, 50, clients);
         mDut.recordDiscoveryStatus(uid3, NanStatusType.SUCCESS, false);
 
         // uid3: subscribe session 3 with ranging: minmax
         client3.addSession(new WifiAwareDiscoverySessionState(null, 114, (byte) 0, null, false,
-                true, mClock.getElapsedSinceBootMillis(), false, 0));
+                true, mClock.getElapsedSinceBootMillis()));
         mDut.recordDiscoverySessionWithRanging(uid3, true, 0, 110, clients);
         mDut.recordDiscoveryStatus(uid3, NanStatusType.SUCCESS, false);
 
@@ -392,7 +392,7 @@
         // uid2: subscribe session 3
         mDut.recordDiscoverySession(uid2, clients);
         client2.addSession(new WifiAwareDiscoverySessionState(null, 104, (byte) 0, null, false,
-                false, mClock.getElapsedSinceBootMillis(), false, 0));
+                false, mClock.getElapsedSinceBootMillis()));
 
         // a few failures
         mDut.recordDiscoveryStatus(uid1, NanStatusType.INTERNAL_FAILURE, true);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeApiTest.java b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeApiTest.java
index 7092e0f..f2d4d0e 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeApiTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeApiTest.java
@@ -18,8 +18,6 @@
 
 import static android.hardware.wifi.V1_0.NanCipherSuiteType.SHARED_KEY_128_MASK;
 import static android.hardware.wifi.V1_0.NanCipherSuiteType.SHARED_KEY_256_MASK;
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128;
-import static android.net.wifi.aware.Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256;
 
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.junit.Assert.assertTrue;
@@ -46,7 +44,6 @@
 import android.net.wifi.aware.ConfigRequest;
 import android.net.wifi.aware.PublishConfig;
 import android.net.wifi.aware.SubscribeConfig;
-import android.net.wifi.aware.WifiAwareDataPathSecurityConfig;
 import android.os.RemoteException;
 import android.util.Pair;
 
@@ -90,7 +87,6 @@
 
     private MockableWifiAwareNativeApi mDut;
     private boolean mIsInterface12;
-    private static final Capabilities CAP = new Capabilities();
 
     /**
      * Initializes mocks.
@@ -118,8 +114,6 @@
         mIsInterface12 = false;
 
         mDut = new MockableWifiAwareNativeApi(mWifiAwareNativeManagerMock);
-        CAP.supportedCipherSuites = WIFI_AWARE_CIPHER_SUITE_NCS_SK_128
-                | WIFI_AWARE_CIPHER_SUITE_NCS_SK_256;
     }
 
     /**
@@ -445,8 +439,8 @@
                 /* usePmk */ false,
                 /* usePassphrase */ false,
                 /* isOutOfBand */ false,
-                /* publicCipherSuites */ 0,
-                /* halCipherSuite */ 0);
+                /* supportedCipherSuites */ SHARED_KEY_256_MASK,
+                /* expectedCipherSuite */ SHARED_KEY_256_MASK);
     }
 
     /**
@@ -458,8 +452,8 @@
                 /* usePmk */ true,
                 /* usePassphrase */ false,
                 /* isOutOfBand */ false,
-                /* publicCipherSuites */ WIFI_AWARE_CIPHER_SUITE_NCS_SK_256,
-                /* halCipherSuite */ SHARED_KEY_256_MASK);
+                /* supportedCipherSuites */ SHARED_KEY_128_MASK,
+                /* expectedCipherSuite */ SHARED_KEY_128_MASK);
 
     }
 
@@ -472,8 +466,8 @@
                 /* usePmk */ false,
                 /* usePassphrase */ true,
                 /* isOutOfBand */ false,
-                /* publicCipherSuites */ WIFI_AWARE_CIPHER_SUITE_NCS_SK_128,
-                /* halCipherSuite */ SHARED_KEY_128_MASK);
+                /* supportedCipherSuites */ SHARED_KEY_256_MASK | SHARED_KEY_128_MASK,
+                /* expectedCipherSuite */ SHARED_KEY_256_MASK);
     }
 
     /**
@@ -485,8 +479,8 @@
                 /* usePmk */ true,
                 /* usePassphrase */ false,
                 /* isOutOfBand */ true,
-                /* supportedCipherSuites */ WIFI_AWARE_CIPHER_SUITE_NCS_SK_128,
-                /* expectedCipherSuite */ SHARED_KEY_128_MASK);
+                /* supportedCipherSuites */ 0,
+                /* expectedCipherSuite */ 0);
     }
 
     /**
@@ -499,8 +493,8 @@
                 /* usePassphrase */ false,
                 /* accept */ true,
                 /* isOutOfBand */ false,
-                /* publicCipherSuites */  WIFI_AWARE_CIPHER_SUITE_NCS_SK_256,
-                /* halCipherSuite */ SHARED_KEY_256_MASK);
+                /* supportedCipherSuites */ SHARED_KEY_128_MASK,
+                /* expectedCipherSuite */ SHARED_KEY_128_MASK);
     }
 
     /**
@@ -513,8 +507,8 @@
                 /* usePassphrase */ false,
                 /* accept */ true,
                 /* isOutOfBand */ false,
-                /* publicCipherSuites */ WIFI_AWARE_CIPHER_SUITE_NCS_SK_128,
-                /* halCipherSuite */ SHARED_KEY_128_MASK);
+                /* supportedCipherSuites */ SHARED_KEY_256_MASK | SHARED_KEY_128_MASK,
+                /* expectedCipherSuite */ SHARED_KEY_256_MASK);
     }
 
     /**
@@ -528,8 +522,8 @@
                 /* usePassphrase */ true,
                 /* accept */ true,
                 /* isOutOfBand */ false,
-                /* publicCipherSuites */ WIFI_AWARE_CIPHER_SUITE_NCS_SK_256,
-                /* halCipherSuite */ SHARED_KEY_256_MASK);
+                /* supportedCipherSuites */ SHARED_KEY_256_MASK,
+                /* expectedCipherSuite */ SHARED_KEY_256_MASK);
     }
 
     /**
@@ -542,8 +536,8 @@
                 /* usePassphrase */ false,
                 /* accept */ true,
                 /* isOutOfBand */ true,
-                /* publicCipherSuites */ WIFI_AWARE_CIPHER_SUITE_NCS_SK_128,
-                /* halCipherSuite */ SHARED_KEY_128_MASK);
+                /* supportedCipherSuites */ 0,
+                /* expectedCipherSuite */ 0);
     }
 
     /**
@@ -556,8 +550,8 @@
                 /* usePassphrase */ false,
                 /* accept */ false,
                 /* isOutOfBand */ true,
-                /* publicCipherSuites */ WIFI_AWARE_CIPHER_SUITE_NCS_SK_128,
-                /* halCipherSuite */ 0);
+                /* supportedCipherSuites */ 0,
+                /* expectedCipherSuite */ 0);
     }
 
     /**
@@ -616,7 +610,7 @@
         mIsInterface12 = isHal12;
 
         mDut.enableAndConfigure(transactionId, configRequest, notifyIdentityChange,
-                initialConfiguration, isInteractive, isIdle, false, false, 2437);
+                initialConfiguration, isInteractive, isIdle, false, false);
 
         ArgumentCaptor<NanEnableRequest> enableReqCaptor = ArgumentCaptor.forClass(
                 NanEnableRequest.class);
@@ -660,7 +654,7 @@
     }
 
     private void validateInitiateDataPath(boolean usePmk, boolean usePassphrase,
-            boolean isOutOfBand, int publicCipherSuites, int halCipherSuite)
+            boolean isOutOfBand, int supportedCipherSuites, int expectedCipherSuite)
             throws Exception {
         short tid = 44;
         int peerId = 555;
@@ -673,24 +667,15 @@
         String passphrase = "blahblah";
         final byte[] appInfo = "Out-of-band info".getBytes();
 
+        Capabilities cap = new Capabilities();
+        cap.supportedCipherSuites = supportedCipherSuites;
+
         ArgumentCaptor<android.hardware.wifi.V1_0.NanInitiateDataPathRequest> captor =
                 ArgumentCaptor.forClass(
                         android.hardware.wifi.V1_0.NanInitiateDataPathRequest.class);
-        WifiAwareDataPathSecurityConfig securityConfig = null;
-        if (usePassphrase) {
-            securityConfig = new WifiAwareDataPathSecurityConfig
-                    .Builder(publicCipherSuites)
-                    .setPskPassphrase(passphrase)
-                    .build();
-        } else if (usePmk) {
-            securityConfig = new WifiAwareDataPathSecurityConfig
-                    .Builder(publicCipherSuites)
-                    .setPmk(pmk)
-                    .build();
-        }
 
         mDut.initiateDataPath(tid, peerId, channelRequestType, channel, peer, interfaceName,
-                isOutOfBand, appInfo, CAP, securityConfig);
+                usePmk ? pmk : null, usePassphrase ? passphrase : null, isOutOfBand, appInfo, cap);
 
         verify(mIWifiNanIfaceMock).initiateDataPathRequest(eq(tid), captor.capture());
 
@@ -706,7 +691,7 @@
             collector.checkThat("securityConfig.securityType",
                     NanDataPathSecurityType.PMK,
                     equalTo(nidpr.securityConfig.securityType));
-            collector.checkThat("securityConfig.cipherType", halCipherSuite,
+            collector.checkThat("securityConfig.cipherType", expectedCipherSuite,
                     equalTo(nidpr.securityConfig.cipherType));
             collector.checkThat("securityConfig.pmk", pmk, equalTo(nidpr.securityConfig.pmk));
             collector.checkThat("securityConfig.passphrase.length", 0,
@@ -717,7 +702,7 @@
             collector.checkThat("securityConfig.securityType",
                     NanDataPathSecurityType.PASSPHRASE,
                     equalTo(nidpr.securityConfig.securityType));
-            collector.checkThat("securityConfig.cipherType", halCipherSuite,
+            collector.checkThat("securityConfig.cipherType", expectedCipherSuite,
                     equalTo(nidpr.securityConfig.cipherType));
             collector.checkThat("securityConfig.passphrase", passphrase.getBytes(),
                     equalTo(convertArrayListToNativeByteArray(nidpr.securityConfig.passphrase)));
@@ -737,7 +722,7 @@
     }
 
     private void validateRespondToDataPathRequest(boolean usePmk, boolean usePassphrase,
-            boolean accept, boolean isOutOfBand, int publicCipherSuites, int halCipherSuite)
+            boolean accept, boolean isOutOfBand, int supportedCipherSuites, int expectedCipherSuite)
             throws Exception {
         short tid = 33;
         int ndpId = 44;
@@ -746,24 +731,15 @@
         String passphrase = "blahblah";
         final byte[] appInfo = "Out-of-band info".getBytes();
 
+        Capabilities cap = new Capabilities();
+        cap.supportedCipherSuites = supportedCipherSuites;
+
         ArgumentCaptor<android.hardware.wifi.V1_0.NanRespondToDataPathIndicationRequest> captor =
                 ArgumentCaptor.forClass(
                         android.hardware.wifi.V1_0.NanRespondToDataPathIndicationRequest.class);
-        WifiAwareDataPathSecurityConfig securityConfig = null;
-        if (usePassphrase) {
-            securityConfig = new WifiAwareDataPathSecurityConfig
-                    .Builder(publicCipherSuites)
-                    .setPskPassphrase(passphrase)
-                    .build();
-        } else if (usePmk) {
-            securityConfig = new WifiAwareDataPathSecurityConfig
-                    .Builder(publicCipherSuites)
-                    .setPmk(pmk)
-                    .build();
-        }
 
-        mDut.respondToDataPathRequest(tid, accept, ndpId, interfaceName,
-                appInfo, isOutOfBand, CAP, securityConfig);
+        mDut.respondToDataPathRequest(tid, accept, ndpId, interfaceName, usePmk ? pmk : null,
+                usePassphrase ? passphrase : null, appInfo, isOutOfBand, cap);
 
         verify(mIWifiNanIfaceMock).respondToDataPathIndicationRequest(eq(tid), captor.capture());
 
@@ -778,7 +754,7 @@
                 collector.checkThat("securityConfig.securityType",
                         NanDataPathSecurityType.PMK,
                         equalTo(nrtdpir.securityConfig.securityType));
-                collector.checkThat("securityConfig.cipherType", halCipherSuite,
+                collector.checkThat("securityConfig.cipherType", expectedCipherSuite,
                         equalTo(nrtdpir.securityConfig.cipherType));
                 collector.checkThat("securityConfig.pmk", pmk, equalTo(nrtdpir.securityConfig.pmk));
                 collector.checkThat("securityConfig.passphrase.length", 0,
@@ -789,7 +765,7 @@
                 collector.checkThat("securityConfig.securityType",
                         NanDataPathSecurityType.PASSPHRASE,
                         equalTo(nrtdpir.securityConfig.securityType));
-                collector.checkThat("securityConfig.cipherType", halCipherSuite,
+                collector.checkThat("securityConfig.cipherType", expectedCipherSuite,
                         equalTo(nrtdpir.securityConfig.cipherType));
                 collector.checkThat("securityConfig.passphrase", passphrase.getBytes(),
                         equalTo(convertArrayListToNativeByteArray(
diff --git a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeManagerTest.java
index 8c9fdf8..4019ecd 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareNativeManagerTest.java
@@ -59,7 +59,6 @@
     @Mock private IWifiNanIface mWifiNanIfaceMock;
     @Mock android.hardware.wifi.V1_2.IWifiNanIface mIWifiNanIface12Mock;
     @Mock android.hardware.wifi.V1_5.IWifiNanIface mIWifiNanIface15Mock;
-    @Mock android.hardware.wifi.V1_6.IWifiNanIface mIWifiNanIface16Mock;
     @Mock private Handler mHandlerMock;
     private ArgumentCaptor<HalDeviceManager.ManagerStatusListener> mManagerStatusListenerCaptor =
             ArgumentCaptor.forClass(HalDeviceManager.ManagerStatusListener.class);
@@ -87,11 +86,6 @@
         public android.hardware.wifi.V1_5.IWifiNanIface mockableCastTo_1_5(IWifiNanIface iface) {
             return (iface == mIWifiNanIface15Mock) ? mIWifiNanIface15Mock : null;
         }
-
-        @Override
-        public android.hardware.wifi.V1_6.IWifiNanIface mockableCastTo_1_6(IWifiNanIface iface) {
-            return (iface == mIWifiNanIface16Mock) ? mIWifiNanIface16Mock : null;
-        }
     }
 
     @Before
@@ -143,7 +137,7 @@
         when(mHalDeviceManager.isStarted()).thenReturn(false);
         mManagerStatusListenerCaptor.getValue().onStatusChanged();
 
-        mInOrder.verify(mWifiAwareStateManagerMock).disableUsage(false);
+        mInOrder.verify(mWifiAwareStateManagerMock).disableUsage(true);
 
         // 3. onStatusChange (ready/started) + available -> enableUsage
         when(mHalDeviceManager.isStarted()).thenReturn(true);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareServiceImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareServiceImplTest.java
index 3528745..0f2ce17 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareServiceImplTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareServiceImplTest.java
@@ -19,10 +19,9 @@
 import static com.android.server.wifi.WifiSettingsConfigStore.WIFI_VERBOSE_LOGGING_ENABLED;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
 import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
@@ -37,18 +36,14 @@
 import android.app.AppOpsManager;
 import android.content.Context;
 import android.content.pm.PackageManager;
-import android.net.wifi.WifiScanner;
+import android.hardware.wifi.V1_0.NanCipherSuiteType;
 import android.net.wifi.aware.Characteristics;
 import android.net.wifi.aware.ConfigRequest;
 import android.net.wifi.aware.IWifiAwareDiscoverySessionCallback;
 import android.net.wifi.aware.IWifiAwareEventCallback;
 import android.net.wifi.aware.IWifiAwareMacAddressProvider;
-import android.net.wifi.aware.MacAddrMapping;
 import android.net.wifi.aware.PublishConfig;
 import android.net.wifi.aware.SubscribeConfig;
-import android.net.wifi.aware.WifiAwareDataPathSecurityConfig;
-import android.os.Build;
-import android.os.Bundle;
 import android.os.HandlerThread;
 import android.os.IBinder;
 import android.os.RemoteException;
@@ -59,8 +54,6 @@
 import androidx.test.filters.SmallTest;
 
 import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.HalDeviceManager;
-import com.android.server.wifi.InterfaceConflictManager;
 import com.android.server.wifi.WifiBaseTest;
 import com.android.server.wifi.WifiSettingsConfigStore;
 import com.android.server.wifi.util.NetdWrapper;
@@ -75,6 +68,9 @@
 import org.mockito.MockitoAnnotations;
 
 import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -89,7 +85,6 @@
     private String mPackageName = "some.package";
     private String mFeatureId = "some.feature";
     private TestLooper mMockLooper;
-    private Bundle mExtras = new Bundle();
 
     @Mock
     private Context mContextMock;
@@ -110,8 +105,8 @@
     @Mock private WifiAwareMetrics mAwareMetricsMock;
     @Mock private WifiPermissionsUtil mWifiPermissionsUtil;
     @Mock private WifiPermissionsWrapper mPermissionsWrapperMock;
-    @Mock private WifiSettingsConfigStore mWifiSettingsConfigStore;
-    @Mock private InterfaceConflictManager mInterfaceConflictManager;
+    @Mock
+    WifiSettingsConfigStore mWifiSettingsConfigStore;
 
     /**
      * Using instead of spy to avoid native crash failures - possibly due to
@@ -155,13 +150,6 @@
                 .thenReturn(true);
         when(mAwareStateManagerMock.getCharacteristics()).thenReturn(getCharacteristics());
         when(mWifiSettingsConfigStore.get(eq(WIFI_VERBOSE_LOGGING_ENABLED))).thenReturn(true);
-        // mock target SDK version to be pre-T by default to keep existing tests working.
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(any(), eq(Build.VERSION_CODES.TIRAMISU),
-                anyInt())).thenReturn(true);
-
-        when(mInterfaceConflictManager.manageInterfaceConflictForStateMachine(any(), any(), any(),
-                any(), any(), eq(HalDeviceManager.HDM_CREATE_IFACE_NAN), any())).thenReturn(
-                InterfaceConflictManager.ICM_EXECUTE_COMMAND);
 
         mDut = new WifiAwareServiceImplSpy(mContextMock);
         mDut.fakeUid = mDefaultUid;
@@ -169,12 +157,10 @@
                 mAwareMetricsMock, mWifiPermissionsUtil, mPermissionsWrapperMock,
                 mWifiSettingsConfigStore,
                 mock(WifiAwareNativeManager.class), mock(WifiAwareNativeApi.class),
-                mock(WifiAwareNativeCallback.class), mock(NetdWrapper.class),
-                mInterfaceConflictManager);
+                mock(WifiAwareNativeCallback.class), mock(NetdWrapper.class));
         mMockLooper.dispatchAll();
         verify(mAwareStateManagerMock).start(eq(mContextMock), any(), eq(mAwareMetricsMock),
-                eq(mWifiPermissionsUtil), eq(mPermissionsWrapperMock), any(), any(),
-                eq(mInterfaceConflictManager));
+                eq(mWifiPermissionsUtil), eq(mPermissionsWrapperMock), any(), any());
     }
 
     /**
@@ -199,7 +185,7 @@
     @Test
     public void testInstantCommunicationMode() {
         mDut.isInstantCommunicationModeEnabled();
-        verify(mAwareStateManagerMock).isInstantCommModeGlobalEnable();
+        verify(mAwareStateManagerMock).isInstantCommunicationModeEnabled();
 
         // Non-system package could not enable this mode.
         when(mWifiPermissionsUtil.isSystem(anyString(), anyInt())).thenReturn(false);
@@ -229,11 +215,13 @@
         ConfigRequest configRequest = new ConfigRequest.Builder().setMasterPreference(55).build();
         String callingPackage = "com.google.somePackage";
         String callingFeatureId = "com.google.someFeature";
+        assertFalse(mDut.isDeviceAttached());
         mDut.connect(mBinderMock, callingPackage, callingFeatureId, mCallbackMock,
-                configRequest, false, mExtras);
+                configRequest, false);
 
         verify(mAwareStateManagerMock).connect(anyInt(), anyInt(), anyInt(), eq(callingPackage),
-                eq(callingFeatureId), eq(mCallbackMock), eq(configRequest), eq(false), any());
+                eq(callingFeatureId), eq(mCallbackMock), eq(configRequest), eq(false));
+        assertTrue(mDut.isDeviceAttached());
     }
 
     /**
@@ -244,10 +232,12 @@
     @Test
     public void testDisconnect() throws Exception {
         int clientId = doConnect();
+        assertTrue(mDut.isDeviceAttached());
         mDut.disconnect(clientId, mBinderMock);
 
         verify(mAwareStateManagerMock).disconnect(clientId);
         validateInternalStateCleanedUp(clientId);
+        assertFalse(mDut.isDeviceAttached());
     }
 
     /**
@@ -302,8 +292,7 @@
 
         PublishConfig publishConfig = new PublishConfig.Builder().setServiceName("valid.value")
                 .build();
-        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mSessionCallbackMock,
-                mExtras);
+        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mSessionCallbackMock);
 
         verify(mAwareStateManagerMock).publish(clientId, publishConfig, mSessionCallbackMock);
         assertTrue("SecurityException for invalid access from wrong UID thrown", failsAsExpected);
@@ -323,7 +312,7 @@
         IWifiAwareDiscoverySessionCallback mockCallback = mock(
                 IWifiAwareDiscoverySessionCallback.class);
 
-        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mockCallback, mExtras);
+        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mockCallback);
     }
 
     /**
@@ -340,7 +329,7 @@
         IWifiAwareDiscoverySessionCallback mockCallback = mock(
                 IWifiAwareDiscoverySessionCallback.class);
 
-        mDut.subscribe(mPackageName, mFeatureId, clientId, subscribeConfig, mockCallback, mExtras);
+        mDut.subscribe(mPackageName, mFeatureId, clientId, subscribeConfig, mockCallback);
     }
 
 
@@ -372,9 +361,9 @@
 
         int prevId = 0;
         for (int i = 0; i < loopCount; ++i) {
-            mDut.connect(mBinderMock, "", "", mCallbackMock, null, false, mExtras);
+            mDut.connect(mBinderMock, "", "", mCallbackMock, null, false);
             inOrder.verify(mAwareStateManagerMock).connect(clientIdCaptor.capture(), anyInt(),
-                    anyInt(), any(), any(), eq(mCallbackMock), any(), eq(false), any());
+                    anyInt(), any(), any(), eq(mCallbackMock), any(), eq(false));
             int id = clientIdCaptor.getValue();
             if (i != 0) {
                 assertTrue("Client ID incrementing", id > prevId);
@@ -407,44 +396,11 @@
         IWifiAwareDiscoverySessionCallback mockCallback = mock(
                 IWifiAwareDiscoverySessionCallback.class);
 
-        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mockCallback, mExtras);
+        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mockCallback);
 
         verify(mAwareStateManagerMock).publish(clientId, publishConfig, mockCallback);
     }
 
-    @Test
-    public void testPublishPostT() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        setTargetSdkToT();
-
-        PublishConfig publishConfig = new PublishConfig.Builder().setServiceName("something.valid")
-                .setRangingEnabled(true).build();
-        int clientId = doConnect();
-        IWifiAwareDiscoverySessionCallback mockCallback = mock(
-                IWifiAwareDiscoverySessionCallback.class);
-
-        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mockCallback, mExtras);
-
-        verify(mAwareStateManagerMock).publish(clientId, publishConfig, mockCallback);
-        verify(mWifiPermissionsUtil).enforceNearbyDevicesPermission(any(), eq(true), any());
-    }
-
-    @Test(expected = SecurityException.class)
-    public void testPublishExceptionPostT() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        setTargetSdkToT();
-        // app has no nearby permission
-        doThrow(new SecurityException()).when(mWifiPermissionsUtil)
-                .enforceNearbyDevicesPermission(any(), anyBoolean(), any());
-        PublishConfig publishConfig = new PublishConfig.Builder().setServiceName("something.valid")
-                .setRangingEnabled(true).build();
-        int clientId = doConnect();
-        IWifiAwareDiscoverySessionCallback mockCallback = mock(
-                IWifiAwareDiscoverySessionCallback.class);
-
-        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mockCallback, mExtras);
-    }
-
     /**
      * Validate that publish() verifies the input PublishConfig and fails on an invalid service
      * name.
@@ -535,50 +491,11 @@
         IWifiAwareDiscoverySessionCallback mockCallback = mock(
                 IWifiAwareDiscoverySessionCallback.class);
 
-        mDut.subscribe(mPackageName, mFeatureId, clientId, subscribeConfig, mockCallback, mExtras);
+        mDut.subscribe(mPackageName, mFeatureId, clientId, subscribeConfig, mockCallback);
 
         verify(mAwareStateManagerMock).subscribe(clientId, subscribeConfig, mockCallback);
     }
 
-    private void setTargetSdkToT() {
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(any(),
-                eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(false);
-    }
-
-    @Test
-    public void testSubscribePostT() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        setTargetSdkToT();
-
-        SubscribeConfig subscribeConfig = new SubscribeConfig.Builder()
-                .setServiceName("something.valid").setMaxDistanceMm(100).build();
-        int clientId = doConnect();
-        IWifiAwareDiscoverySessionCallback mockCallback = mock(
-                IWifiAwareDiscoverySessionCallback.class);
-
-        mDut.subscribe(mPackageName, mFeatureId, clientId, subscribeConfig, mockCallback, mExtras);
-
-        verify(mAwareStateManagerMock).subscribe(clientId, subscribeConfig, mockCallback);
-        verify(mWifiPermissionsUtil, never()).enforceLocationPermission(any(), any(), anyInt());
-        verify(mWifiPermissionsUtil).enforceNearbyDevicesPermission(any(), eq(true), any());
-    }
-
-    @Test(expected = SecurityException.class)
-    public void testSubscribeExceptionPostT() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        setTargetSdkToT();
-        // app has no nearby permission
-        doThrow(new SecurityException()).when(mWifiPermissionsUtil)
-                .enforceNearbyDevicesPermission(any(), anyBoolean(), any());
-        SubscribeConfig subscribeConfig = new SubscribeConfig.Builder()
-                .setServiceName("something.valid").setMaxDistanceMm(100).build();
-        int clientId = doConnect();
-        IWifiAwareDiscoverySessionCallback mockCallback = mock(
-                IWifiAwareDiscoverySessionCallback.class);
-
-        mDut.subscribe(mPackageName, mFeatureId, clientId, subscribeConfig, mockCallback, mExtras);
-    }
-
     /**
      * Validate that subscribe() verifies the input SubscribeConfig and fails on an invalid service
      * name.
@@ -696,10 +613,10 @@
     @Test
     public void testRequestMacAddress() {
         int uid = 1005;
-        int[] peerIdArray = new int[0];
+        List<Integer> list = new ArrayList<>();
         IWifiAwareMacAddressProvider callback = new IWifiAwareMacAddressProvider() { // placeholder
             @Override
-            public void macAddress(MacAddrMapping[] peerIdToMacList) throws RemoteException {
+            public void macAddress(Map peerIdToMacMap) throws RemoteException {
                 // empty
             }
 
@@ -709,9 +626,9 @@
             }
         };
 
-        mDut.requestMacAddresses(uid, peerIdArray, callback);
+        mDut.requestMacAddresses(uid, list, callback);
 
-        verify(mAwareStateManagerMock).requestMacAddresses(uid, peerIdArray, callback);
+        verify(mAwareStateManagerMock).requestMacAddresses(uid, list, callback);
     }
 
     @Test(expected = SecurityException.class)
@@ -719,10 +636,9 @@
         doThrow(new SecurityException()).when(mContextMock).enforceCallingOrSelfPermission(
                 eq(Manifest.permission.NETWORK_STACK), anyString());
 
-        mDut.requestMacAddresses(1005, new int[0], new IWifiAwareMacAddressProvider() {
+        mDut.requestMacAddresses(1005, new ArrayList<>(), new IWifiAwareMacAddressProvider() {
             @Override
-            public void macAddress(MacAddrMapping[] peerIdToMacList) throws RemoteException {
-                // empty
+            public void macAddress(Map peerIdToMacMap) throws RemoteException {
             }
 
             @Override
@@ -751,7 +667,7 @@
         cap.maxNdpSessions = 1;
         cap.maxAppInfoLen = 255;
         cap.maxQueuedTransmitMessages = 6;
-        cap.supportedCipherSuites = Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256;
+        cap.supportedCipherSuites = NanCipherSuiteType.SHARED_KEY_256_MASK;
         cap.isInstantCommunicationModeSupported = true;
 
         Characteristics characteristics = cap.toPublicCharacteristics();
@@ -760,47 +676,11 @@
         assertEquals(characteristics.getMaxMatchFilterLength(), maxMatchFilter);
         assertEquals(characteristics.getSupportedCipherSuites(),
                 Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256);
-        assertEquals(characteristics.getNumberOfSupportedDataPaths(), 1);
-        assertEquals(characteristics.getNumberOfSupportedDataInterfaces(), 1);
-        assertEquals(characteristics.getNumberOfSupportedPublishSessions(), 2);
-        assertEquals(characteristics.getNumberOfSupportedSubscribeSessions(), 2);
         if (SdkLevel.isAtLeastS()) {
             assertEquals(characteristics.isInstantCommunicationModeSupported(), true);
         }
     }
 
-    @Test
-    public void testPublishWifiValidSecurityConfig() {
-        WifiAwareDataPathSecurityConfig securityConfig = new WifiAwareDataPathSecurityConfig
-                .Builder(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256)
-                .setPskPassphrase("somePassphrase").build();
-        PublishConfig publishConfig = new PublishConfig.Builder().setServiceName("something.valid")
-                .setDataPathSecurityConfig(securityConfig)
-                .setRangingEnabled(true).build();
-        int clientId = doConnect();
-        IWifiAwareDiscoverySessionCallback mockCallback = mock(
-                IWifiAwareDiscoverySessionCallback.class);
-
-        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mockCallback, mExtras);
-
-        verify(mAwareStateManagerMock).publish(clientId, publishConfig, mockCallback);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testPublishWifiInvalidSecurityConfig() {
-        WifiAwareDataPathSecurityConfig securityConfig = new WifiAwareDataPathSecurityConfig
-                .Builder(Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_128)
-                .setPskPassphrase("somePassphrase").build();
-        PublishConfig publishConfig = new PublishConfig.Builder().setServiceName("something.valid")
-                .setDataPathSecurityConfig(securityConfig)
-                .setRangingEnabled(true).build();
-        int clientId = doConnect();
-        IWifiAwareDiscoverySessionCallback mockCallback = mock(
-                IWifiAwareDiscoverySessionCallback.class);
-
-        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mockCallback, mExtras);
-    }
-
     /*
      * Utilities
      */
@@ -825,13 +705,12 @@
         // caught by the Builder. Want to test whether service side will catch invalidly
         // constructed configs.
         PublishConfig publishConfig = new PublishConfig(serviceName.getBytes(), ssi, matchFilter,
-                PublishConfig.PUBLISH_TYPE_UNSOLICITED, 0, true, false, false,
-                WifiScanner.WIFI_BAND_24_GHZ, null);
+                PublishConfig.PUBLISH_TYPE_UNSOLICITED, 0, true, false);
         int clientId = doConnect();
         IWifiAwareDiscoverySessionCallback mockCallback = mock(
                 IWifiAwareDiscoverySessionCallback.class);
 
-        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mockCallback, mExtras);
+        mDut.publish(mPackageName, mFeatureId, clientId, publishConfig, mockCallback);
 
         verify(mAwareStateManagerMock).publish(clientId, publishConfig, mockCallback);
     }
@@ -842,13 +721,12 @@
         // caught by the Builder. Want to test whether service side will catch invalidly
         // constructed configs.
         SubscribeConfig subscribeConfig = new SubscribeConfig(serviceName.getBytes(), ssi,
-                matchFilter, SubscribeConfig.SUBSCRIBE_TYPE_PASSIVE, 0, true, false, 0, false, 0,
-                false, WifiScanner.WIFI_BAND_24_GHZ);
+                matchFilter, SubscribeConfig.SUBSCRIBE_TYPE_PASSIVE, 0, true, false, 0, false, 0);
         int clientId = doConnect();
         IWifiAwareDiscoverySessionCallback mockCallback = mock(
                 IWifiAwareDiscoverySessionCallback.class);
 
-        mDut.subscribe(mPackageName, mFeatureId, clientId, subscribeConfig, mockCallback, mExtras);
+        mDut.subscribe(mPackageName, mFeatureId, clientId, subscribeConfig, mockCallback);
 
         verify(mAwareStateManagerMock).subscribe(clientId, subscribeConfig, mockCallback);
     }
@@ -857,13 +735,12 @@
         String callingPackage = "com.google.somePackage";
         String callingFeatureId = "com.google.someFeature";
 
-        mDut.connect(mBinderMock, callingPackage, callingFeatureId, mCallbackMock, null, false,
-                mExtras);
+        mDut.connect(mBinderMock, callingPackage, callingFeatureId, mCallbackMock, null, false);
 
         ArgumentCaptor<Integer> clientId = ArgumentCaptor.forClass(Integer.class);
         verify(mAwareStateManagerMock).connect(clientId.capture(), anyInt(), anyInt(),
                 eq(callingPackage), eq(callingFeatureId), eq(mCallbackMock),
-                eq(new ConfigRequest.Builder().build()), eq(false), any());
+                eq(new ConfigRequest.Builder().build()), eq(false));
 
         return clientId.getValue();
     }
@@ -882,7 +759,7 @@
         cap.maxNdpSessions = 1;
         cap.maxAppInfoLen = 255;
         cap.maxQueuedTransmitMessages = 6;
-        cap.supportedCipherSuites = Characteristics.WIFI_AWARE_CIPHER_SUITE_NCS_SK_256;
+        cap.supportedCipherSuites = NanCipherSuiteType.SHARED_KEY_256_MASK;
         cap.isInstantCommunicationModeSupported = false;
         return cap.toPublicCharacteristics();
     }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
index 3c8227e..7241071 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
@@ -17,7 +17,6 @@
 package com.android.server.wifi.aware;
 
 import static android.hardware.wifi.V1_0.NanRangingIndication.EGRESS_MET_MASK;
-import static android.net.wifi.WifiAvailableChannel.OP_MODE_WIFI_AWARE;
 
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.hamcrest.core.IsNull.notNullValue;
@@ -25,21 +24,16 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
-import static org.junit.Assume.assumeTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyByte;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.ArgumentMatchers.anyShort;
-import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
@@ -51,7 +45,6 @@
 import android.app.AppOpsManager;
 import android.app.test.MockAnswerUtil;
 import android.app.test.TestAlarmManager;
-import android.content.AttributionSource;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
@@ -61,24 +54,17 @@
 import android.hardware.wifi.V1_0.NanStatusType;
 import android.location.LocationManager;
 import android.net.ConnectivityManager;
-import android.net.wifi.WifiAvailableChannel;
 import android.net.wifi.WifiManager;
-import android.net.wifi.WifiScanner;
-import android.net.wifi.aware.AwareResources;
 import android.net.wifi.aware.ConfigRequest;
 import android.net.wifi.aware.IWifiAwareDiscoverySessionCallback;
 import android.net.wifi.aware.IWifiAwareEventCallback;
 import android.net.wifi.aware.IWifiAwareMacAddressProvider;
-import android.net.wifi.aware.MacAddrMapping;
 import android.net.wifi.aware.PublishConfig;
 import android.net.wifi.aware.SubscribeConfig;
 import android.net.wifi.aware.WifiAwareManager;
 import android.net.wifi.util.HexEncoding;
-import android.os.Bundle;
 import android.os.Handler;
-import android.os.HandlerThread;
 import android.os.IBinder;
-import android.os.Looper;
 import android.os.Message;
 import android.os.PowerManager;
 import android.os.Process;
@@ -91,22 +77,11 @@
 
 import androidx.test.filters.SmallTest;
 
-import com.android.internal.util.State;
-import com.android.internal.util.StateMachine;
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.Clock;
-import com.android.server.wifi.HalDeviceManager;
-import com.android.server.wifi.InterfaceConflictManager;
-import com.android.server.wifi.MockResources;
 import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.WifiInjector;
-import com.android.server.wifi.WifiNative;
-import com.android.server.wifi.WifiThreadRunner;
 import com.android.server.wifi.util.NetdWrapper;
-import com.android.server.wifi.util.WaitingState;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.server.wifi.util.WifiPermissionsWrapper;
-import com.android.wifi.resources.R;
 
 import org.junit.After;
 import org.junit.Before;
@@ -122,6 +97,7 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.lang.reflect.Field;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedList;
@@ -147,25 +123,18 @@
     @Mock private WifiAwareMetrics mAwareMetricsMock;
     @Mock private WifiPermissionsUtil mWifiPermissionsUtil;
     @Mock private WifiPermissionsWrapper mPermissionsWrapperMock;
-    @Mock private InterfaceConflictManager mInterfaceConflictManager;
     TestAlarmManager mAlarmManager;
     @Mock private PowerManager mMockPowerManager;
     @Mock private WifiManager mMockWifiManager;
-    @Mock private WifiNative mWifiNative;
     private BroadcastReceiver mPowerBcastReceiver;
     private BroadcastReceiver mLocationModeReceiver;
     private BroadcastReceiver mWifiStateChangedReceiver;
     @Mock private WifiAwareDataPathStateManager mMockAwareDataPathStatemanager;
-    @Mock private WifiInjector mWifiInjector;
 
     @Rule
     public ErrorCollector collector = new ErrorCollector();
 
     private static final byte[] ALL_ZERO_MAC = new byte[] {0, 0, 0, 0, 0, 0};
-    private MockResources mResources;
-    private Bundle mExtras = new Bundle();
-    private WifiManager.ActiveCountryCodeChangedCallback mActiveCountryCodeChangedCallback;
-    private HandlerThread mWifiHandlerThread;
 
     /**
      * Pre-test configuration. Initialize and install mocks.
@@ -198,38 +167,16 @@
         when(mMockPowerManager.isDeviceIdleMode()).thenReturn(false);
         when(mMockPowerManager.isInteractive()).thenReturn(true);
         when(mWifiPermissionsUtil.isLocationModeEnabled()).thenReturn(true);
-        mResources = new MockResources();
-        mResources.setInteger(R.integer.config_wifiAwareInstantCommunicationModeDurationMillis,
-                30000);
-        when(mMockContext.getResources()).thenReturn(mResources);
-
-        when(mInterfaceConflictManager.manageInterfaceConflictForStateMachine(any(), any(), any(),
-                any(), any(), eq(HalDeviceManager.HDM_CREATE_IFACE_NAN), any())).thenReturn(
-                InterfaceConflictManager.ICM_EXECUTE_COMMAND);
 
         ArgumentCaptor<BroadcastReceiver> bcastRxCaptor = ArgumentCaptor.forClass(
                 BroadcastReceiver.class);
-        mWifiHandlerThread = new HandlerThread("WifiHandlerThread");
-        mWifiHandlerThread.start();
-        Looper wifiLooper = mWifiHandlerThread.getLooper();
-        Handler wifiHandler = new Handler(wifiLooper);
-        WifiThreadRunner wifiThreadRunner = new WifiThreadRunner(wifiHandler);
-        when(mWifiInjector.getWifiNative()).thenReturn(mWifiNative);
-        when(mWifiInjector.getWifiThreadRunner()).thenReturn(wifiThreadRunner);
-        mDut = new WifiAwareStateManager(mWifiInjector);
+        mDut = new WifiAwareStateManager();
         mDut.setNative(mMockNativeManager, mMockNative);
         mDut.start(mMockContext, mMockLooper.getLooper(), mAwareMetricsMock,
                 mWifiPermissionsUtil, mPermissionsWrapperMock, new Clock(),
-                mock(NetdWrapper.class), mInterfaceConflictManager);
+                mock(NetdWrapper.class));
         mDut.startLate();
         mMockLooper.dispatchAll();
-        ArgumentCaptor<WifiManager.ActiveCountryCodeChangedCallback> callbackArgumentCaptor =
-                ArgumentCaptor.forClass(WifiManager.ActiveCountryCodeChangedCallback.class);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mMockWifiManager).registerActiveCountryCodeChangedCallback(any(),
-                    callbackArgumentCaptor.capture());
-            mActiveCountryCodeChangedCallback = callbackArgumentCaptor.getValue();
-        }
         verify(mMockContext, times(3)).registerReceiver(bcastRxCaptor.capture(),
                 any(IntentFilter.class));
         mPowerBcastReceiver = bcastRxCaptor.getAllValues().get(0);
@@ -252,7 +199,6 @@
     @After
     public void tearDown() throws Exception {
         mMockNative.validateUniqueTransactionIds();
-        mWifiHandlerThread.quit();
     }
 
     /**
@@ -285,7 +231,7 @@
      * Test the PeerHandle -> MAC address API:
      * - Start up discovery of 2 sessions
      * - Get multiple matches (PeerHandles)
-     * - Request translation as UID of session #1 for PeerHandles of the same UID + of the other
+     * - Request translation as UID of sesssion #1 for PeerHandles of the same UID + of the other
      *   discovery session (to which we shouldn't have access) + invalid PeerHandle.
      * -> validate results
      */
@@ -335,19 +281,17 @@
 
         // (1) connect 2 clients
         mDut.connect(clientId1, uid1, pid1, callingPackage, callingFeature, mockCallback1,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNativeManager).tryToGetAware(new WorkSource(uid1, callingPackage));
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback1).onConnectSuccess(clientId1);
 
         mDut.connect(clientId2, uid2, pid2, callingPackage, callingFeature, mockCallback2,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback2).onConnectSuccess(clientId2);
         // merged requestorWs
@@ -373,36 +317,33 @@
         inOrder.verify(mockSessionCallback2).onSessionStarted(sessionId.capture());
 
         // (3) 2 matches on session 1 (second one with distance), 1 match on session 2
-        mDut.onMatchNotification(subscribeId1, requestorIdBase, peerMac1, null, null, 0, 0,
-                null, 0);
+        mDut.onMatchNotification(subscribeId1, requestorIdBase, peerMac1, null, null, 0, 0);
         mDut.onMatchNotification(subscribeId1, requestorIdBase + 1, peerMac2, null, null,
-                NanRangingIndication.INGRESS_MET_MASK, distance, null, 0);
+                NanRangingIndication.INGRESS_MET_MASK, distance);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback1).onMatch(peerIdCaptor.capture(), isNull(),
-                isNull(), anyInt(), any());
+                isNull());
         inOrder.verify(mockSessionCallback1).onMatchWithDistance(peerIdCaptor.capture(), isNull(),
-                isNull(), eq(distance), anyInt(), any());
+                isNull(), eq(distance));
         int peerId1 = peerIdCaptor.getAllValues().get(0);
         int peerId2 = peerIdCaptor.getAllValues().get(1);
 
-        mDut.onMatchNotification(subscribeId2, requestorIdBase + 2, peerMac3, null, null, 0, 0,
-                null, 0);
+        mDut.onMatchNotification(subscribeId2, requestorIdBase + 2, peerMac3, null, null, 0, 0);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback2).onMatch(peerIdCaptor.capture(), isNull(), isNull(),
-                anyInt(), any());
+        inOrder.verify(mockSessionCallback2).onMatch(peerIdCaptor.capture(), isNull(), isNull());
         int peerId3 = peerIdCaptor.getAllValues().get(0);
 
         // request MAC addresses
-        int[] request = new int[4];
-        request[0] = peerId1;
-        request[1] = peerId2;
-        request[2] = peerId3; // for uid2: so should not be in results
-        request[3] = peerId1 * 20 + peerId2 + peerId3; // garbage values != to any
-        Mutable<MacAddrMapping[]> response = new Mutable<>();
+        List<Integer> request = new ArrayList<>();
+        request.add(peerId1);
+        request.add(peerId2);
+        request.add(peerId3); // for uid2: so should not be in results
+        request.add(peerId1 * 20 + peerId2 + peerId3); // garbage values != to any
+        Mutable<Map> response = new Mutable<>();
         mDut.requestMacAddresses(uid1, request, new IWifiAwareMacAddressProvider() {
             @Override
-            public void macAddress(MacAddrMapping[] peerIdToMacList) throws RemoteException {
-                response.value = peerIdToMacList;
+            public void macAddress(Map peerIdToMacMap) throws RemoteException {
+                response.value = peerIdToMacMap;
             }
 
             @Override
@@ -413,21 +354,9 @@
         mMockLooper.dispatchAll();
 
         assertNotEquals("Non-null result", null, response.value);
-        assertEquals("Number of results", 2, response.value.length);
-
-        MacAddrMapping responseMapping1, responseMapping2;
-        responseMapping1 = responseMapping2 = null;
-        for (MacAddrMapping mapping : response.value) {
-            if (mapping.peerId == peerId1) {
-                responseMapping1 = mapping;
-            } else if (mapping.peerId == peerId2) {
-                responseMapping2 = mapping;
-            }
-        }
-        assertNotNull(responseMapping1);
-        assertNotNull(responseMapping2);
-        assertEquals("Results[peerId1]", peerMac1, responseMapping1.macAddress);
-        assertEquals("Results[peerId2]", peerMac2, responseMapping2.macAddress);
+        assertEquals("Number of results", 2, response.value.size());
+        assertEquals("Results[peerId1]", peerMac1, response.value.get(peerId1));
+        assertEquals("Results[peerId2]", peerMac2, response.value.get(peerId2));
     }
 
     /**
@@ -455,13 +384,12 @@
 
         // (2) connect (enable Aware)
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mMockAwareDataPathStatemanager).createAllInterfaces();
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
@@ -472,7 +400,6 @@
         inOrder.verify(mMockNative).disable(transactionId.capture());
         mDut.onDisableResponse(transactionId.getValue(), NanStatusType.SUCCESS);
         mMockLooper.dispatchAll();
-        assertFalse(mDut.isDeviceAttached());
 
         verifyNoMoreInteractions(mMockNative, mMockAwareDataPathStatemanager);
     }
@@ -511,7 +438,7 @@
         // (3) try connecting and validate that get failure callback (though app should be aware of
         // non-availability through state change broadcast and/or query API)
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onConnectFail(anyInt());
 
@@ -548,13 +475,12 @@
 
         // (2) connect (successfully)
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false),
                 sparseArrayCaptor.capture());
@@ -563,7 +489,6 @@
         // (3) disable usage & verify callbacks
         mDut.disableUsage(false);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttachTerminate();
         collector.checkThat("usage disabled", mDut.isUsageEnabled(), equalTo(false));
         validateCorrectAwareStatusChangeBroadcast(inOrder);
         inOrder.verify(mMockNative).disable(transactionId.capture());
@@ -574,15 +499,13 @@
         mDut.onDisableResponse(transactionId.getValue(), NanStatusType.SUCCESS);
         mMockLooper.dispatchAll();
         inOrderM.verify(mAwareMetricsMock).recordDisableAware();
-        assertFalse(mDut.isDeviceAttached());
 
         // (4) try connecting again and validate that get a failure
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onConnectFail(anyInt());
         inOrderM.verify(mAwareMetricsMock).recordAttachStatus(NanStatusType.INTERNAL_FAILURE);
-        assertFalse(mDut.isDeviceAttached());
 
         // (5) disable usage again and validate that not much happens
         mDut.disableUsage(false);
@@ -598,13 +521,12 @@
 
         // (7) connect (should be successful)
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false),
                 sparseArrayCaptor.capture());
@@ -630,8 +552,7 @@
         InOrder inOrder = inOrder(mMockContext, mMockNative, mockCallback);
 
         when(mMockNative.enableAndConfigure(anyShort(), any(), anyBoolean(),
-                anyBoolean(), eq(true), eq(false), eq(false), eq(false), anyInt()))
-                .thenReturn(false);
+                anyBoolean(), eq(true), eq(false), eq(false), eq(false))).thenReturn(false);
 
         // (1) check initial state
         mDut.enableUsage();
@@ -640,10 +561,10 @@
 
         // (2) connect with HAL failure
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         inOrder.verify(mockCallback).onConnectFail(NanStatusType.INTERNAL_FAILURE);
 
         validateInternalClientInfoCleanedUp(clientId);
@@ -684,22 +605,20 @@
 
         // (1) connect 1st and 2nd clients
         mDut.connect(clientId1, uid, pid, callingPackage, callingFeature, mockCallback1,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionIdCapture.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         short transactionId = transactionIdCapture.getValue();
         mDut.onConfigSuccessResponse(transactionId);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback1).onConnectSuccess(clientId1);
 
         mDut.connect(clientId2, uid, pid, callingPackage, callingFeature, mockCallback2,
-                configRequest, true, mExtras);
+                configRequest, true);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionIdCapture.capture(),
-                eq(configRequest), eq(true), eq(false), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(true), eq(false), eq(true), eq(false), eq(false), eq(false));
         transactionId = transactionIdCapture.getValue();
         mDut.onConfigSuccessResponse(transactionId);
         mMockLooper.dispatchAll();
@@ -732,11 +651,9 @@
 
         inOrder.verify(mockCallback2).onIdentityChanged(someMac);
 
-        // (6) Aware down - session should be terminated.
+        // (6) Aware down (no feedback)
         mDut.onAwareDownNotification(reason);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback1).onAttachTerminate();
-        inOrder.verify(mockCallback2).onAttachTerminate();
 
         validateInternalClientInfoCleanedUp(clientId1);
         validateInternalClientInfoCleanedUp(clientId2);
@@ -774,13 +691,12 @@
 
         // (1) connect (successfully)
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
 
@@ -839,14 +755,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
 
@@ -902,7 +816,7 @@
                 IWifiAwareDiscoverySessionCallback.class);
         ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
         ArgumentCaptor<Integer> sessionId = ArgumentCaptor.forClass(Integer.class);
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mMockNative, mMockContext);
+        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mMockNative);
         InOrder inOrderM = inOrder(mAwareMetricsMock);
 
         mDut.enableUsage();
@@ -912,14 +826,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
 
@@ -935,7 +847,6 @@
         inOrder.verify(mockSessionCallback).onSessionStarted(sessionId.capture());
         inOrderM.verify(mAwareMetricsMock).recordDiscoverySession(eq(uid), any());
         inOrderM.verify(mAwareMetricsMock).recordDiscoveryStatus(uid, NanStatusType.SUCCESS, true);
-        validateCorrectAwareResourcesChangeBroadcast(inOrder);
         assertEquals(1, mDut.getAvailableAwareResources().getAvailablePublishSessionsCount());
         assertEquals(2, mDut.getAvailableAwareResources().getAvailableSubscribeSessionsCount());
         assertEquals(0, mDut.getAvailableAwareResources().getAvailableDataPathsCount());
@@ -966,177 +877,6 @@
     }
 
     /**
-     * Validates publish with instant communication with correct channel freq
-     */
-    @Test
-    public void testPublishSuccessInstantCommunicationMode() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        final int clientId = 2005;
-        final int uid = 1000;
-        final int pid = 2000;
-        final String callingPackage = "com.google.somePackage";
-        final String callingFeature = "com.google.someFeature";
-        final int reasonTerminate = NanStatusType.SUCCESS;
-        final byte publishId = 15;
-
-        ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        PublishConfig publishConfig = new PublishConfig.Builder()
-                .setInstantCommunicationModeEnabled(true, WifiScanner.WIFI_BAND_5_GHZ).build();
-
-        IWifiAwareEventCallback mockCallback = mock(IWifiAwareEventCallback.class);
-        IWifiAwareDiscoverySessionCallback mockSessionCallback = mock(
-                IWifiAwareDiscoverySessionCallback.class);
-        ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
-        ArgumentCaptor<Integer> sessionId = ArgumentCaptor.forClass(Integer.class);
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mMockNative, mMockContext);
-        InOrder inOrderM = inOrder(mAwareMetricsMock);
-
-        mDut.enableUsage();
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNative).getCapabilities(transactionId.capture());
-        inOrderM.verify(mAwareMetricsMock).recordEnableUsage();
-
-        // (0) connect
-        mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
-        mDut.onConfigSuccessResponse(transactionId.getValue());
-        mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
-        inOrder.verify(mockCallback).onConnectSuccess(clientId);
-        inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
-
-        // (1) initial publish
-        mDut.publish(clientId, publishConfig, mockSessionCallback);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNative).publish(transactionId.capture(), eq((byte) 0),
-                eq(publishConfig));
-
-        // (2) publish success
-        mDut.onSessionConfigSuccessResponse(transactionId.getValue(), true, publishId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onSessionStarted(sessionId.capture());
-        inOrderM.verify(mAwareMetricsMock).recordDiscoverySession(eq(uid), any());
-        inOrderM.verify(mAwareMetricsMock).recordDiscoveryStatus(uid, NanStatusType.SUCCESS, true);
-        validateCorrectAwareResourcesChangeBroadcast(inOrder);
-        assertEquals(1, mDut.getAvailableAwareResources().getAvailablePublishSessionsCount());
-        assertEquals(2, mDut.getAvailableAwareResources().getAvailableSubscribeSessionsCount());
-        assertEquals(0, mDut.getAvailableAwareResources().getAvailableDataPathsCount());
-
-        // (3) Verify reconfig to enable instant mode. And 5G is invalid
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                any(), eq(false), eq(false), eq(true), eq(false), eq(false), eq(true),
-                eq(2437));
-        mDut.onConfigSuccessResponse(transactionId.getValue());
-        mMockLooper.dispatchAll();
-
-        // (4) country code change, 5G is valid
-        when(mWifiNative.getUsableChannels(WifiScanner.WIFI_BAND_5_GHZ, OP_MODE_WIFI_AWARE,
-                WifiAvailableChannel.FILTER_NAN_INSTANT_MODE))
-                .thenReturn(List.of(new WifiAvailableChannel(5220,
-                                WifiAvailableChannel.OP_MODE_WIFI_AWARE),
-                        new WifiAvailableChannel(5745, WifiAvailableChannel.OP_MODE_WIFI_AWARE)));
-        mActiveCountryCodeChangedCallback.onActiveCountryCodeChanged("US");
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                any(), eq(false), eq(false), eq(true), eq(false), eq(false), eq(true),
-                eq(5745));
-        mDut.onConfigSuccessResponse(transactionId.getValue());
-        mMockLooper.dispatchAll();
-
-        verifyNoMoreInteractions(mockSessionCallback, mMockNative, mAwareMetricsMock);
-    }
-
-    /**
-     * Validates subscribe with instant communication with correct channel freq
-     */
-    @Test
-    public void testSubscribeSuccessInstantCommunicationMode() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        final int clientId = 2005;
-        final int uid = 1000;
-        final int pid = 2000;
-        final String callingPackage = "com.google.somePackage";
-        final String callingFeature = "com.google.someFeature";
-        final int reasonTerminate = NanStatusType.SUCCESS;
-        final byte subscribeId = 15;
-
-        ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        SubscribeConfig subscribeConfig = new SubscribeConfig.Builder()
-                .setInstantCommunicationModeEnabled(true, WifiScanner.WIFI_BAND_5_GHZ).build();
-
-        IWifiAwareEventCallback mockCallback = mock(IWifiAwareEventCallback.class);
-        IWifiAwareDiscoverySessionCallback mockSessionCallback = mock(
-                IWifiAwareDiscoverySessionCallback.class);
-        ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
-        ArgumentCaptor<Integer> sessionId = ArgumentCaptor.forClass(Integer.class);
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mMockNative, mMockContext);
-        InOrder inOrderM = inOrder(mAwareMetricsMock);
-
-        mDut.enableUsage();
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNative).getCapabilities(transactionId.capture());
-        inOrderM.verify(mAwareMetricsMock).recordEnableUsage();
-
-        // (0) connect
-        mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
-        mDut.onConfigSuccessResponse(transactionId.getValue());
-        mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
-        inOrder.verify(mockCallback).onConnectSuccess(clientId);
-        inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
-
-        // (1) initial subscribe
-        mDut.subscribe(clientId, subscribeConfig, mockSessionCallback);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNative).subscribe(transactionId.capture(), eq((byte) 0),
-                eq(subscribeConfig));
-
-        // (2) subscribe success
-        mDut.onSessionConfigSuccessResponse(transactionId.getValue(), false, subscribeId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onSessionStarted(sessionId.capture());
-        inOrderM.verify(mAwareMetricsMock).recordDiscoverySession(eq(uid), any());
-        inOrderM.verify(mAwareMetricsMock).recordDiscoveryStatus(uid, NanStatusType.SUCCESS, false);
-        validateCorrectAwareResourcesChangeBroadcast(inOrder);
-        assertEquals(2, mDut.getAvailableAwareResources().getAvailablePublishSessionsCount());
-        assertEquals(1, mDut.getAvailableAwareResources().getAvailableSubscribeSessionsCount());
-        assertEquals(0, mDut.getAvailableAwareResources().getAvailableDataPathsCount());
-
-        // (3) Verify reconfig to enable instant mode. And 5G is invalid
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                any(), eq(false), eq(false), eq(true), eq(false), eq(false), eq(true),
-                eq(2437));
-        mDut.onConfigSuccessResponse(transactionId.getValue());
-        mMockLooper.dispatchAll();
-
-        // (4) country code change, 5G is valid
-        when(mWifiNative.getUsableChannels(WifiScanner.WIFI_BAND_5_GHZ, OP_MODE_WIFI_AWARE,
-                WifiAvailableChannel.FILTER_NAN_INSTANT_MODE))
-                .thenReturn(List.of(new WifiAvailableChannel(5220,
-                        WifiAvailableChannel.OP_MODE_WIFI_AWARE)));
-        mActiveCountryCodeChangedCallback.onActiveCountryCodeChanged("US");
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                any(), eq(false), eq(false), eq(true), eq(false), eq(false), eq(true),
-                eq(5220));
-        mDut.onConfigSuccessResponse(transactionId.getValue());
-        mMockLooper.dispatchAll();
-
-        verifyNoMoreInteractions(mockSessionCallback, mMockNative, mAwareMetricsMock);
-    }
-
-    /**
      * Validate the publish flow: (1) initial publish + (2) success + (3) update + (4) update
      * fails (callback from firmware) + (5) update + (6). Expected: session is still alive after
      * update failure so second update succeeds (no callbacks) + (7) update + immediate failure from
@@ -1171,13 +911,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
 
@@ -1197,7 +936,7 @@
         mMockLooper.dispatchAll();
         // Verify reconfigure aware to enable ranging.
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(false), eq(true), eq(false), eq(true), eq(false), anyInt());
+                eq(false), eq(false), eq(true), eq(false), eq(true), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
 
@@ -1251,7 +990,7 @@
         // Verify reconfigure aware to disable ranging.
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(false), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(false), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
 
@@ -1294,13 +1033,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
 
@@ -1321,14 +1059,12 @@
         inOrder.verify(mockSessionCallback).onSessionStarted(anyInt());
         inOrder.verify(mockSessionCallback).onSessionTerminated(anyInt());
         inOrder.verify(mMockNative).stopPublish(transactionId.capture(), eq(publishId));
-        inOrder.verify(mockCallback).onAttachTerminate();
         inOrder.verify(mMockNative).disable(anyShort());
         inOrderM.verify(mAwareMetricsMock).recordDiscoverySession(eq(uid), any());
         inOrderM.verify(mAwareMetricsMock).recordDiscoveryStatus(uid, NanStatusType.SUCCESS, true);
         inOrderM.verify(mAwareMetricsMock).recordAttachSessionDuration(anyLong());
         inOrderM.verify(mAwareMetricsMock).recordDiscoverySessionDuration(anyLong(), eq(true));
 
-        assertFalse(mDut.isDeviceAttached());
         validateInternalClientInfoCleanedUp(clientId);
 
         verifyNoMoreInteractions(mockCallback, mockSessionCallback, mMockNative, mAwareMetricsMock);
@@ -1364,13 +1100,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
 
@@ -1427,7 +1162,7 @@
                 IWifiAwareDiscoverySessionCallback.class);
         ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
         ArgumentCaptor<Integer> sessionId = ArgumentCaptor.forClass(Integer.class);
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mMockNative, mMockContext);
+        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mMockNative);
         InOrder inOrderM = inOrder(mAwareMetricsMock);
 
         mDut.enableUsage();
@@ -1437,13 +1172,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
 
@@ -1459,7 +1193,6 @@
         inOrder.verify(mockSessionCallback).onSessionStarted(sessionId.capture());
         inOrderM.verify(mAwareMetricsMock).recordDiscoverySession(eq(uid), any());
         inOrderM.verify(mAwareMetricsMock).recordDiscoveryStatus(uid, NanStatusType.SUCCESS, false);
-        validateCorrectAwareResourcesChangeBroadcast(inOrder);
         assertEquals(2, mDut.getAvailableAwareResources().getAvailablePublishSessionsCount());
         assertEquals(1, mDut.getAvailableAwareResources().getAvailableSubscribeSessionsCount());
         assertEquals(0, mDut.getAvailableAwareResources().getAvailableDataPathsCount());
@@ -1524,13 +1257,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
 
@@ -1550,7 +1282,7 @@
         // Verify reconfigure aware to enable ranging.
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(false), eq(true), eq(false), eq(true), eq(false), anyInt());
+                eq(false), eq(false), eq(true), eq(false), eq(true), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
 
@@ -1621,13 +1353,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (1) initial subscribe
@@ -1647,7 +1378,6 @@
         inOrder.verify(mockSessionCallback).onSessionStarted(anyInt());
         inOrder.verify(mockSessionCallback).onSessionTerminated(anyInt());
         inOrder.verify(mMockNative).stopSubscribe((short) 0, subscribeId);
-        inOrder.verify(mockCallback).onAttachTerminate();
         inOrder.verify(mMockNative).disable(anyShort());
 
         validateInternalClientInfoCleanedUp(clientId);
@@ -1705,14 +1435,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
 
@@ -1730,26 +1458,25 @@
         // Verify reconfigure aware to enable ranging.
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(false), eq(true), eq(false), eq(true), eq(false), anyInt());
+                eq(false), eq(false), eq(true), eq(false), eq(true), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
 
 
         // (2) 2 matches : with and w/o range
         mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(),
-                peerMatchFilter.getBytes(), 0, 0, null, 0);
+                peerMatchFilter.getBytes(), 0, 0);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), eq(peerSsi.getBytes()),
-                eq(peerMatchFilter.getBytes()), anyInt(), any());
+                eq(peerMatchFilter.getBytes()));
         inOrderM.verify(mAwareMetricsMock).recordMatchIndicationForRangeEnabledSubscribe(false);
         int peerId1 = peerIdCaptor.getValue();
 
         mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(),
-                peerMatchFilter.getBytes(), EGRESS_MET_MASK, rangedDistance, null, 0);
+                peerMatchFilter.getBytes(), EGRESS_MET_MASK, rangedDistance);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onMatchWithDistance(peerIdCaptor.capture(),
-                eq(peerSsi.getBytes()), eq(peerMatchFilter.getBytes()), eq(rangedDistance),
-                anyInt(), any());
+                eq(peerSsi.getBytes()), eq(peerMatchFilter.getBytes()), eq(rangedDistance));
         inOrderM.verify(mAwareMetricsMock).recordMatchIndicationForRangeEnabledSubscribe(true);
         int peerId2 = peerIdCaptor.getValue();
 
@@ -1840,10 +1567,10 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
@@ -1941,13 +1668,12 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) publish
@@ -2033,13 +1759,12 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) subscribe & match
@@ -2049,11 +1774,11 @@
                 eq(subscribeConfig));
         mDut.onSessionConfigSuccessResponse(transactionId.getValue(), false, subscribeId);
         mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(),
-                peerMatchFilter.getBytes(), 0, 0, null, 0);
+                peerMatchFilter.getBytes(), 0, 0);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onSessionStarted(sessionId.capture());
         inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), eq(peerSsi.getBytes()),
-                eq(peerMatchFilter.getBytes()), anyInt(), any());
+                eq(peerMatchFilter.getBytes()));
 
         // (3) send message to invalid peer ID
         mDut.sendMessage(uid, clientId, sessionId.getValue(), peerIdCaptor.getValue() + 5,
@@ -2102,13 +1827,12 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) subscribe & match
@@ -2118,11 +1842,11 @@
                 eq(subscribeConfig));
         mDut.onSessionConfigSuccessResponse(transactionId.getValue(), false, subscribeId);
         mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(),
-                peerMatchFilter.getBytes(), 0, 0, null, 0);
+                peerMatchFilter.getBytes(), 0, 0);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onSessionStarted(sessionId.capture());
         inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), eq(peerSsi.getBytes()),
-                eq(peerMatchFilter.getBytes()), anyInt(), any());
+                eq(peerMatchFilter.getBytes()));
 
         // (3) send 2 messages and enqueue successfully
         mDut.sendMessage(uid, clientId, sessionId.getValue(), peerIdCaptor.getValue(),
@@ -2228,13 +1952,12 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) subscribe & match
@@ -2244,11 +1967,11 @@
                 eq(subscribeConfig));
         mDut.onSessionConfigSuccessResponse(transactionId.getValue(), false, subscribeId);
         mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(),
-                peerMatchFilter.getBytes(), 0, 0, null, 0);
+                peerMatchFilter.getBytes(), 0, 0);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onSessionStarted(sessionId.capture());
         inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), eq(peerSsi.getBytes()),
-                eq(peerMatchFilter.getBytes()), anyInt(), any());
+                eq(peerMatchFilter.getBytes()));
 
         // (3) send message and enqueue successfully
         mDut.sendMessage(uid, clientId, sessionId.getValue(), peerIdCaptor.getValue(),
@@ -2315,13 +2038,12 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) subscribe & match
@@ -2331,11 +2053,11 @@
                 eq(subscribeConfig));
         mDut.onSessionConfigSuccessResponse(transactionId.getValue(), false, subscribeId);
         mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(),
-                peerMatchFilter.getBytes(), 0, 0, null, 0);
+                peerMatchFilter.getBytes(), 0, 0);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onSessionStarted(sessionId.capture());
         inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), eq(peerSsi.getBytes()),
-                eq(peerMatchFilter.getBytes()), anyInt(), any());
+                eq(peerMatchFilter.getBytes()));
 
         // (3) send message and enqueue successfully
         mDut.sendMessage(uid, clientId, sessionId.getValue(), peerIdCaptor.getValue(),
@@ -2403,14 +2125,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (1) subscribe
@@ -2423,11 +2143,9 @@
         inOrder.verify(mockSessionCallback).onSessionStarted(sessionId.capture());
 
         // (2) match
-        mDut.onMatchNotification(subscribeId, requestorId, peerMac, null, null, 0, 0,
-                null, 0);
+        mDut.onMatchNotification(subscribeId, requestorId, peerMac, null, null, 0, 0);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), isNull(), isNull(),
-                anyInt(), any());
+        inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), isNull(), isNull());
 
         // (3) transmit messages
         SendMessageQueueModelAnswer answerObj = new SendMessageQueueModelAnswer(queueDepth,
@@ -2519,19 +2237,17 @@
 
         // (0) connect
         mDut.connect(clientId1, uid1, pid1, callingPackage1, callingFeature, mockCallback,
-                configRequest1, false, mExtras);
+                configRequest1, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNativeManager).tryToGetAware(new WorkSource(uid1, callingPackage1));
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest1), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest1), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId1);
 
         mDut.connect(clientId2, uid2, pid2, callingPackage2, callingFeature, mockCallback,
-                configRequest2, false, mExtras);
+                configRequest2, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onConnectSuccess(clientId2);
         // merged requestorWs
@@ -2557,17 +2273,13 @@
         inOrder.verify(mockSessionCallback).onSessionStarted(sessionId2.capture());
 
         // (2) match
-        mDut.onMatchNotification(subscribeId1, requestorId1, peerMac1, null, null, 0, 0,
-                null, 0);
+        mDut.onMatchNotification(subscribeId1, requestorId1, peerMac1, null, null, 0, 0);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor1.capture(), isNull(), isNull(),
-                anyInt(), any());
+        inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor1.capture(), isNull(), isNull());
 
-        mDut.onMatchNotification(subscribeId2, requestorId2, peerMac2, null, null, 0, 0,
-                null, 0);
+        mDut.onMatchNotification(subscribeId2, requestorId2, peerMac2, null, null, 0, 0);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor2.capture(), isNull(), isNull(),
-                anyInt(), any());
+        inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor2.capture(), isNull(), isNull());
 
         // (3) Enqueue messages
         SendMessageQueueModelAnswer answerObj = new SendMessageQueueModelAnswer(queueDepth,
@@ -2662,14 +2374,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (1) subscribe
@@ -2682,11 +2392,9 @@
         inOrder.verify(mockSessionCallback).onSessionStarted(sessionId.capture());
 
         // (2) match
-        mDut.onMatchNotification(subscribeId, requestorId, peerMac, null, null, 0, 0,
-                null, 0);
+        mDut.onMatchNotification(subscribeId, requestorId, peerMac, null, null, 0, 0);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), isNull(), isNull(),
-                anyInt(), any());
+        inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), isNull(), isNull());
 
         // (3) transmit messages: configure a mix of failures/success
         Set<Integer> failQueueCommandImmediately = new HashSet<>();
@@ -2797,14 +2505,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (1) subscribe
@@ -2818,10 +2524,10 @@
 
         // (2) match
         mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(),
-                peerMatchFilter.getBytes(), 0, 0, null, 0);
+                peerMatchFilter.getBytes(), 0, 0);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), eq(peerSsi.getBytes()),
-                eq(peerMatchFilter.getBytes()), anyInt(), any());
+                eq(peerMatchFilter.getBytes()));
 
         // (3) message null Tx successful queuing
         mDut.sendMessage(uid, clientId, sessionId.getValue(), peerIdCaptor.getValue(),
@@ -3030,31 +2736,30 @@
 
         // (1) config1 (valid)
         mDut.connect(clientId1, uid, pid, callingPackage, callingFeature, mockCallback1,
-                configRequest1, false, mExtras);
+                configRequest1, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                 crCapture.capture(), eq(false), eq(true), eq(true), eq(false),
-                eq(false), eq(false), anyInt());
+                eq(false), eq(false));
         collector.checkThat("merge: stage 1", crCapture.getValue(), equalTo(configRequest1));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback1).onConnectSuccess(clientId1);
 
         // (2) config2 (incompatible with config1)
         mDut.connect(clientId2, uid, pid, callingPackage, callingFeature, mockCallback2,
-                configRequest2, false, mExtras);
+                configRequest2, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback2).onConnectFail(NanStatusType.INTERNAL_FAILURE);
         validateInternalClientInfoCleanedUp(clientId2);
 
         // (3) config3 (compatible with config1)
         mDut.connect(clientId3, uid, pid, callingPackage, callingFeature, mockCallback3,
-                configRequest3, true, mExtras);
+                configRequest3, true);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                 crCapture.capture(), eq(true), eq(false), eq(true), eq(false),
-                eq(false), eq(false), anyInt());
+                eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback3).onConnectSuccess(clientId3);
@@ -3074,26 +2779,22 @@
         // (4) disconnect config3: downgrade to config1
         mDut.disconnect(clientId3);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback3).onAttachTerminate();
         validateInternalClientInfoCleanedUp(clientId3);
         inOrder.verify(mMockNativeManager).replaceRequestorWs(new WorkSource(uid, callingPackage));
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                 crCapture.capture(), eq(false), eq(false), eq(true), eq(false),
-                eq(false), eq(false), anyInt());
+                eq(false), eq(false));
 
         collector.checkThat("configRequest1", configRequest1, equalTo(crCapture.getValue()));
 
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
 
         // (5) disconnect config1: disable
         mDut.disconnect(clientId1);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback1).onAttachTerminate();
         validateInternalClientInfoCleanedUp(clientId1);
         inOrder.verify(mMockNative).disable(anyShort());
-        assertFalse(mDut.isDeviceAttached());
 
         verifyNoMoreInteractions(mMockNative, mockCallback1, mockCallback2, mockCallback3);
     }
@@ -3127,32 +2828,31 @@
 
         // (1) attach w/o identity
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                 any(ConfigRequest.class), eq(false), eq(true), eq(true), eq(false),
                 eq(false),
-                eq(false), anyInt());
+                eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) attach w/o identity
         ++clientId;
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (3) attach w/ identity
         ++clientId;
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, true, mExtras);
+                configRequest, true);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                 any(ConfigRequest.class), eq(true), eq(false), eq(true), eq(false), eq(false),
-                eq(false), anyInt());
+                eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
@@ -3160,14 +2860,14 @@
         // (4) attach w/o identity
         ++clientId;
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (5) attach w/ identity
         ++clientId;
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, true, mExtras);
+                configRequest, true);
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
@@ -3209,13 +2909,12 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) publish (no response yet)
@@ -3235,10 +2934,9 @@
         inOrder.verify(mockSessionCallback).onSessionStarted(anyInt());
         inOrder.verify(mockSessionCallback).onSessionTerminated(anyInt());
         inOrder.verify(mMockNative).stopPublish((short) 0, publishId);
-        inOrder.verify(mockCallback).onAttachTerminate();
         inOrder.verify(mMockNative).disable(anyShort());
+
         validateInternalClientInfoCleanedUp(clientId);
-        assertFalse(mDut.isDeviceAttached());
 
         // (5) trying to publish on the same client: NOP
         mDut.publish(clientId, publishConfig, mockSessionCallback);
@@ -3286,13 +2984,12 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) publish - no response
@@ -3330,10 +3027,10 @@
 
         // (1) connect (no response)
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
 
         verifyNoMoreInteractions(mMockNative, mockCallback, mockSessionCallback);
     }
@@ -3363,10 +3060,10 @@
 
         // (1) connect and succeed
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         short transactionIdConfig = transactionId.getValue();
         mDut.onConfigSuccessResponse(transactionIdConfig);
         mMockLooper.dispatchAll();
@@ -3379,7 +3076,7 @@
         mDut.onMessageSendQueuedSuccessResponse(transactionIdConfig);
         mDut.onMessageSendQueuedFailResponse(transactionIdConfig, -1);
         mDut.onSessionConfigFailResponse(transactionIdConfig, false, -1);
-        mDut.onMatchNotification(-1, -1, new byte[0], new byte[0], new byte[0], 0, 0, null, 0);
+        mDut.onMatchNotification(-1, -1, new byte[0], new byte[0], new byte[0], 0, 0);
         mDut.onSessionTerminatedNotification(-1, -1, true);
         mDut.onSessionTerminatedNotification(-1, -1, false);
         mDut.onMessageReceivedNotification(-1, -1, new byte[0], new byte[0]);
@@ -3418,13 +3115,12 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) publish
@@ -3473,14 +3169,12 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) subscribe
@@ -3527,14 +3221,13 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                 eq(configRequest), eq(false), eq(true), eq(true), eq(false),
-                eq(false), eq(false), anyInt());
+                eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         int prevId = 0;
@@ -3582,14 +3275,13 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                 eq(configRequest), eq(false), eq(true), eq(true), eq(false),
-                eq(false), eq(false), anyInt());
+                eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) power state change: SCREEN OFF
@@ -3597,7 +3289,7 @@
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                 eq(configRequest), eq(false), eq(false), eq(false), eq(false),
-                eq(false), eq(false), anyInt());
+                eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
 
@@ -3606,7 +3298,7 @@
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                 eq(configRequest), eq(false), eq(false), eq(false), eq(true),
-                eq(false), eq(false), anyInt());
+                eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
 
@@ -3615,7 +3307,7 @@
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
                 eq(configRequest), eq(false), eq(false), eq(true), eq(true),
-                eq(false), eq(false), anyInt());
+                eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
 
@@ -3651,25 +3343,21 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNativeManager).tryToGetAware(new WorkSource(uid, callingPackage));
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (3) power state change: DOZE
         simulatePowerStateChangeDoze(true);
         mMockLooper.dispatchAll();
         collector.checkThat("usage disabled", mDut.isUsageEnabled(), equalTo(false));
-        inOrder.verify(mockCallback).onAttachTerminate();
         validateCorrectAwareStatusChangeBroadcast(inOrder);
         inOrder.verify(mMockNative).disable(transactionId.capture());
-        assertFalse(mDut.isDeviceAttached());
         mDut.onDisableResponse(transactionId.getValue(), NanStatusType.SUCCESS);
 
         // (4) power state change: SCREEN ON (but DOZE still on - fakish but expect no changes)
@@ -3697,12 +3385,10 @@
     }
 
     /**
-     * Validate aware enable/disable during LOCATION MODE transitions on pre-T, Aware should be
-     * disabled.
+     * Validate aware enable/disable during LOCATION MODE transitions.
      */
     @Test
-    public void testEnableDisableOnLocationModeChangesPreT() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
+    public void testEnableDisableOnLocationModeChanges() throws Exception {
         final int clientId = 188;
         final int uid = 1000;
         final int pid = 2000;
@@ -3724,25 +3410,21 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNativeManager).tryToGetAware(new WorkSource(uid, callingPackage));
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (3) location mode change: disable
         simulateLocationModeChange(false);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttachTerminate();
         validateCorrectAwareStatusChangeBroadcast(inOrder);
         inOrder.verify(mMockNative).disable(transactionId.capture());
         mDut.onDisableResponse(transactionId.getValue(), NanStatusType.SUCCESS);
-        assertFalse(mDut.isDeviceAttached());
         collector.checkThat("usage disabled", mDut.isUsageEnabled(), equalTo(false));
 
         // disable other gating feature -> no change
@@ -3765,72 +3447,6 @@
     }
 
     /**
-     * Validate aware enable/disable during LOCATION MODE transitions on T+, Aware will not be
-     * disabled, and app with location disavowal will keep session alive.
-     */
-    @Test
-    public void testEnableDisableOnLocationModeChanges() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        final int client1 = 188;
-        final int client2 = 199;
-        final int uid = 1000;
-        final int pid = 2000;
-        final String callingPackage = "com.google.somePackage";
-        final String callingFeature = "com.google.someFeature";
-        final Bundle bundle = new Bundle();
-        final AttributionSource attributionSource = mock(AttributionSource.class);
-        bundle.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, attributionSource);
-
-        ConfigRequest configRequest = new ConfigRequest.Builder().build();
-
-        ArgumentCaptor<Short> transactionId = ArgumentCaptor.forClass(Short.class);
-        IWifiAwareEventCallback mockCallback = mock(IWifiAwareEventCallback.class);
-        IWifiAwareEventCallback mockCallback2 = mock(IWifiAwareEventCallback.class);
-        InOrder inOrder = inOrder(mMockContext, mMockNativeManager, mMockNative, mockCallback,
-                mockCallback2);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNativeManager).start(any(Handler.class));
-        inOrder.verify(mMockNativeManager).tryToGetAware(new WorkSource(Process.WIFI_UID));
-        inOrder.verify(mMockNativeManager).releaseAware();
-
-        mDut.enableUsage();
-        mMockLooper.dispatchAll();
-
-        // (1) connect first client without location disavowal
-        mDut.connect(client1, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, bundle);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mMockNativeManager).tryToGetAware(new WorkSource(uid, callingPackage));
-        inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
-        mDut.onConfigSuccessResponse(transactionId.getValue());
-        mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
-        inOrder.verify(mockCallback).onConnectSuccess(client1);
-
-        // (2) connect second client with location disavowal
-        mDut.connect(client2, uid, pid, callingPackage, callingFeature, mockCallback2,
-                configRequest, false, mExtras);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback2).onConnectSuccess(client2);
-        inOrder.verify(mMockNativeManager).replaceRequestorWs(any());
-
-        // (3) location mode change: disable
-        doThrow(new SecurityException()).when(mWifiPermissionsUtil)
-                .enforceNearbyDevicesPermission(eq(attributionSource), eq(true), anyString());
-        simulateLocationModeChange(false);
-        mMockLooper.dispatchAll();
-        // client 1 should be terminated
-        inOrder.verify(mockCallback).onAttachTerminate();
-        inOrder.verify(mMockNativeManager).replaceRequestorWs(any());
-        // client 2 is still attached and usage is enabeld.
-        assertTrue(mDut.isDeviceAttached());
-        collector.checkThat("usage disabled", mDut.isUsageEnabled(), equalTo(true));
-        verifyNoMoreInteractions(mMockNativeManager, mMockNative, mockCallback, mockCallback2);
-    }
-
-    /**
      * Validate aware enable/disable during Wi-Fi State transitions.
      */
     @Test
@@ -3857,25 +3473,21 @@
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNativeManager).tryToGetAware(new WorkSource(uid, callingPackage));
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (3) wifi state change: disable
         simulateWifiStateChange(false);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttachTerminate();
         validateCorrectAwareStatusChangeBroadcast(inOrder);
         inOrder.verify(mMockNative).disable(transactionId.capture());
         mDut.onDisableResponse(transactionId.getValue(), NanStatusType.SUCCESS);
-        assertFalse(mDut.isDeviceAttached());
         collector.checkThat("usage disabled", mDut.isUsageEnabled(), equalTo(false));
 
 
@@ -3922,34 +3534,28 @@
 
         // (1) connect client
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         // (2) Aware down notification from native
         mDut.onAwareDownNotification(NanStatusType.UNSUPPORTED_CONCURRENCY_NAN_DISABLED);
         mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttachTerminate();
         collector.checkThat("usage enabled", mDut.isUsageEnabled(), equalTo(true));
-        assertFalse(mDut.isDeviceAttached());
         validateCorrectAwareStatusChangeBroadcast(inOrder);
 
         // (3) try reconnect client
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
 
         verifyNoMoreInteractions(mMockNative, mockCallback);
@@ -4005,14 +3611,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false), any());
 
@@ -4030,26 +3634,25 @@
         // Verify reconfigure aware to enable ranging.
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(false), eq(true), eq(false), eq(true), eq(false), anyInt());
+                eq(false), eq(false), eq(true), eq(false), eq(true), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
 
 
         // (2) 2 matches : with and w/o range
         mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(),
-                peerMatchFilter.getBytes(), 0, 0, null, 0);
+                peerMatchFilter.getBytes(), 0, 0);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onMatch(peerIdCaptor.capture(), eq(peerSsi.getBytes()),
-                eq(peerMatchFilter.getBytes()), anyInt(), any());
+                eq(peerMatchFilter.getBytes()));
         inOrderM.verify(mAwareMetricsMock).recordMatchIndicationForRangeEnabledSubscribe(false);
         int peerId1 = peerIdCaptor.getValue();
 
         mDut.onMatchNotification(subscribeId, requestorId, peerMac, peerSsi.getBytes(),
-                peerMatchFilter.getBytes(), EGRESS_MET_MASK, rangedDistance, null, 0);
+                peerMatchFilter.getBytes(), EGRESS_MET_MASK, rangedDistance);
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onMatchWithDistance(peerIdCaptor.capture(),
-                eq(peerSsi.getBytes()), eq(peerMatchFilter.getBytes()), eq(rangedDistance),
-                anyInt(), any());
+                eq(peerSsi.getBytes()), eq(peerMatchFilter.getBytes()), eq(rangedDistance));
         inOrderM.verify(mAwareMetricsMock).recordMatchIndicationForRangeEnabledSubscribe(true);
         int peerId2 = peerIdCaptor.getValue();
 
@@ -4095,16 +3698,15 @@
         mDut.enableInstantCommunicationMode(true);
         mMockLooper.dispatchAll();
         verify(mMockNative, never()).enableAndConfigure(anyShort(), any(), anyBoolean(),
-                anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean(), anyInt());
-        assertTrue(mDut.isInstantCommModeGlobalEnable());
+                anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean(), anyBoolean());
+        assertTrue(mDut.isInstantCommunicationModeEnabled());
 
         // (1) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(true),
-                anyInt());
+                eq(configRequest), eq(false), eq(true), eq(true), eq(false), eq(false), eq(true));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
@@ -4114,9 +3716,8 @@
         mDut.enableInstantCommunicationMode(false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(),
-                eq(configRequest), eq(false), eq(false), eq(true), eq(false), eq(false), eq(false),
-                anyInt());
-        assertFalse(mDut.isInstantCommModeGlobalEnable());
+                eq(configRequest), eq(false), eq(false), eq(true), eq(false), eq(false), eq(false));
+        assertFalse(mDut.isInstantCommunicationModeEnabled());
     }
 
     /**
@@ -4149,36 +3750,33 @@
 
         // (2) Placing a connect -> disconnect -> connect sequence
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mDut.disconnect(clientId);
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
 
         // (3) Verify the command executed in the correct order
         // (3.1) verify the connect execution
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false),
                 any());
         // (3.2) verify the disconnect execution
-        inOrder.verify(mockCallback).onAttachTerminate();
         inOrder.verify(mMockAwareDataPathStatemanager).deleteAllInterfaces();
         inOrder.verify(mMockNative).disable(transactionId.capture());
-        assertFalse(mDut.isDeviceAttached());
         mDut.onDisableResponse(transactionId.getValue(), NanStatusType.SUCCESS);
         mMockLooper.dispatchAll();
         inOrderM.verify(mAwareMetricsMock).recordAttachSessionDuration(anyLong());
         inOrderM.verify(mAwareMetricsMock).recordDisableAware();
         // (3.3) verify the connect execution again
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false),
                 sparseArrayCaptor.capture());
@@ -4217,13 +3815,12 @@
 
         // (2) Connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false),
                 sparseArrayCaptor.capture());
@@ -4233,13 +3830,12 @@
         mDut.disableUsage(false);
         mDut.enableUsage();
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
 
 
         // (4) Verify the command executed in the correct order
         // (4.1) verify the disable usage execution
         mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttachTerminate();
         validateCorrectAwareStatusChangeBroadcast(inOrder);
         inOrder.verify(mMockNative).disable(transactionId.capture());
         inOrderM.verify(mAwareMetricsMock).recordAttachSessionDuration(anyLong());
@@ -4254,10 +3850,9 @@
         collector.checkThat("usage enabled", mDut.isUsageEnabled(), equalTo(true));
         // (4.3)verify the connect execution again
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(false),
                 sparseArrayCaptor.capture());
@@ -4294,13 +3889,12 @@
 
         // (0) connect
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, true, mExtras);
+                configRequest, true);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(true), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(true), eq(true), eq(true), eq(false), eq(false), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
-        assertTrue(mDut.isDeviceAttached());
         inOrder.verify(mockCallback).onConnectSuccess(clientId);
         inOrderM.verify(mAwareMetricsMock).recordAttachSession(eq(uid), eq(true), any());
 
@@ -4320,7 +3914,7 @@
         mMockLooper.dispatchAll();
         // Verify reconfigure aware to enable ranging.
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(true), eq(false), eq(true), eq(false), eq(true), eq(false), anyInt());
+                eq(true), eq(false), eq(true), eq(false), eq(true), eq(false));
         mDut.onConfigSuccessResponse(transactionId.getValue());
         mMockLooper.dispatchAll();
 
@@ -4328,100 +3922,22 @@
         mMockLooper.dispatchAll();
         inOrder.verify(mockSessionCallback).onSessionTerminated(NanStatusType.SUCCESS);
         inOrder.verify(mMockNative).stopPublish(anyShort(), eq(publishId));
-        inOrder.verify(mockCallback).onAttachTerminate();
         inOrder.verify(mMockNative).disable(transactionId.capture());
         mDut.onDisableResponse(transactionId.getValue(), NanStatusType.SUCCESS);
         mMockLooper.dispatchAll();
         inOrderM.verify(mAwareMetricsMock).recordAttachSessionDuration(anyLong());
         inOrderM.verify(mAwareMetricsMock).recordDiscoverySessionDuration(anyLong(), eq(true));
         inOrderM.verify(mAwareMetricsMock).recordDisableAware();
-        assertFalse(mDut.isDeviceAttached());
 
         mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
+                configRequest, false);
         mMockLooper.dispatchAll();
         inOrder.verify(mMockNative).enableAndConfigure(transactionId.capture(), eq(configRequest),
-                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
+                eq(false), eq(true), eq(true), eq(false), eq(false), eq(false));
 
         verifyNoMoreInteractions(mockCallback, mockSessionCallback, mMockNative, mAwareMetricsMock);
     }
 
-    /**
-     * Validate the connection operation when user approval is required and the user accepts or
-     * rejects the request.
-     */
-    private void runTestConnectUserApproval(boolean userAcceptsRequest) throws Exception {
-        final int clientId = 1005;
-        final int uid = 1000;
-        final int pid = 2000;
-        final String callingPackage = "com.google.somePackage";
-        final String callingFeature = "com.google.someFeature";
-
-        ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        IWifiAwareEventCallback mockCallback = mock(IWifiAwareEventCallback.class);
-        ArgumentCaptor<State> mTargetStateCaptor = ArgumentCaptor.forClass(State.class);
-        ArgumentCaptor<WaitingState> mWaitingStateCaptor = ArgumentCaptor.forClass(
-                WaitingState.class);
-        InOrder inOrder = inOrder(mInterfaceConflictManager);
-
-        mDut.enableUsage();
-        mMockLooper.dispatchAll();
-
-        // simulate user approval needed
-        when(mInterfaceConflictManager.manageInterfaceConflictForStateMachine(any(), any(), any(),
-                any(), any(), eq(HalDeviceManager.HDM_CREATE_IFACE_NAN), any())).thenAnswer(
-                new MockAnswerUtil.AnswerWithArguments() {
-                        public int answer(String tag, Message msg, StateMachine stateMachine,
-                                WaitingState waitingState, State targetState, int createIfaceType,
-                                WorkSource requestorWs) {
-                            stateMachine.deferMessage(msg);
-                            stateMachine.transitionTo(waitingState);
-                            return InterfaceConflictManager.ICM_SKIP_COMMAND_WAIT_FOR_USER;
-                        }
-                    });
-        mDut.connect(clientId, uid, pid, callingPackage, callingFeature, mockCallback,
-                configRequest, false, mExtras);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mInterfaceConflictManager).manageInterfaceConflictForStateMachine(any(),
-                any(), any(), mWaitingStateCaptor.capture(), mTargetStateCaptor.capture(),
-                eq(HalDeviceManager.HDM_CREATE_IFACE_NAN), any());
-
-        // simulate user approval triggered and granted/rejected (userAcceptsRequest)
-        when(mInterfaceConflictManager.manageInterfaceConflictForStateMachine(any(), any(), any(),
-                any(), any(), eq(HalDeviceManager.HDM_CREATE_IFACE_NAN), any())).thenReturn(
-                userAcceptsRequest ? InterfaceConflictManager.ICM_EXECUTE_COMMAND
-                        : InterfaceConflictManager.ICM_ABORT_COMMAND);
-        mWaitingStateCaptor.getValue().sendTransitionStateCommand(mTargetStateCaptor.getValue());
-        mMockLooper.dispatchAll();
-        inOrder.verify(mInterfaceConflictManager).manageInterfaceConflictForStateMachine(any(),
-                any(), any(), any(), any(), eq(HalDeviceManager.HDM_CREATE_IFACE_NAN), any());
-
-        if (userAcceptsRequest) {
-            verify(mMockNative).enableAndConfigure(anyShort(), eq(configRequest), eq(false),
-                    eq(true), eq(true), eq(false), eq(false), eq(false), anyInt());
-        } else {
-            verify(mockCallback).onConnectFail(NanStatusType.NO_RESOURCES_AVAILABLE);
-        }
-    }
-
-    /**
-     * Validate the connection operation when user approval is required and the user accepts the
-     * request.
-     */
-    @Test
-    public void testConnectUserApprovalAccept() throws Exception {
-        runTestConnectUserApproval(true);
-    }
-
-    /**
-     * Validate the connection operation when user approval is required and the user rejects the
-     * request.
-     */
-    @Test
-    public void testConnectUserApprovalReject() throws Exception {
-        runTestConnectUserApproval(false);
-    }
-
     /*
      * Tests of internal state of WifiAwareStateManager: very limited (not usually
      * a good idea). However, these test that the internal state is cleaned-up
@@ -4493,23 +4009,6 @@
                 equalTo(WifiAwareManager.ACTION_WIFI_AWARE_STATE_CHANGED));
     }
 
-    /**
-     * Validates that the broadcast sent on Aware status change is correct.
-     */
-    private AwareResources validateCorrectAwareResourcesChangeBroadcast(InOrder inOrder) {
-        if (!SdkLevel.isAtLeastT()) {
-            return null;
-        }
-        ArgumentCaptor<Intent> captor = ArgumentCaptor.forClass(Intent.class);
-
-        inOrder.verify(mMockContext, atLeastOnce()).sendBroadcastAsUser(captor.capture(),
-                eq(UserHandle.ALL), anyString());
-        Intent intent = captor.getValue();
-        collector.checkThat("intent action", intent.getAction(),
-                equalTo(WifiAwareManager.ACTION_WIFI_AWARE_RESOURCE_CHANGED));
-        return intent.getParcelableExtra(WifiAwareManager.EXTRA_AWARE_RESOURCES);
-    }
-
     /*
      * Utilities
      */
diff --git a/service/tests/wifitests/src/com/android/server/wifi/coex/CoexManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/coex/CoexManagerTest.java
index 1cf0754..837d254 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/coex/CoexManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/coex/CoexManagerTest.java
@@ -927,7 +927,6 @@
         // Unsafe channels should not be cleared since we got a physical channel config during delay
         assertThat(coexManager.getCoexUnsafeChannels()).isNotEmpty();
     }
-
     /**
      * Verifies that any pending channel clearances triggered by empty channel lists in
      * onPhysicalChannelConfigChanged will be cancelled if a non-empty list is received.
@@ -1006,40 +1005,4 @@
                 Arrays.asList(new CoexUnsafeChannel(WIFI_BAND_24_GHZ, 6)), 0);
         verify(mMockWifiNative, times(2)).setCoexUnsafeChannels(any(), anyInt());
     }
-
-    /**
-     * Verifies that CoexUnsafeChannels due to GPS are correctly added when the current cell
-     * channels impact GPS with the 2.4GHz band.
-     */
-    @Test
-    public void testOnPhysicalChannelConfigChanged_unsafeChannelsDueToGps_updatesUnsafeChannels() {
-        when(mMockResources.getBoolean(R.bool.config_wifiCoexForGpsL1)).thenReturn(true);
-        when(mMockResources.getInteger(R.integer.config_wifiCoexGpsL1ThresholdKhz))
-                .thenReturn(5_000);
-        final TelephonyManager telephonyManager = setUpSubIdMocks(0);
-        CoexManager coexManager = createCoexManager();
-        verify(mMockSubscriptionManager).addOnSubscriptionsChangedListener(
-                any(), mCoexSubscriptionsListenerCaptor.capture());
-        mCoexSubscriptionsListenerCaptor.getValue().onSubscriptionsChanged();
-        final ArgumentCaptor<CoexManager.CoexTelephonyCallback> telephonyCallbackCaptor =
-                ArgumentCaptor.forClass(CoexManager.CoexTelephonyCallback.class);
-        verify(telephonyManager).registerTelephonyCallback(any(Executor.class),
-                telephonyCallbackCaptor.capture());
-        // Populate channel list with a channel that impacts GPS with the 2.4GHz band.
-        telephonyCallbackCaptor.getValue().onPhysicalChannelConfigChanged(Arrays.asList(
-                createMockPhysicalChannelConfig(NETWORK_TYPE_LTE, 40, 0, 0, 861_580, 10_000)
-        ));
-        List<CoexUnsafeChannel> unsafeChannels = coexManager.getCoexUnsafeChannels();
-        assertThat(unsafeChannels).isNotEmpty();
-        assertThat(unsafeChannels).containsExactly(
-                new CoexUnsafeChannel(WIFI_BAND_24_GHZ, 2),
-                new CoexUnsafeChannel(WIFI_BAND_24_GHZ, 3),
-                new CoexUnsafeChannel(WIFI_BAND_24_GHZ, 4),
-                new CoexUnsafeChannel(WIFI_BAND_24_GHZ, 5),
-                new CoexUnsafeChannel(WIFI_BAND_24_GHZ, 6),
-                new CoexUnsafeChannel(WIFI_BAND_24_GHZ, 7),
-                new CoexUnsafeChannel(WIFI_BAND_24_GHZ, 8),
-                new CoexUnsafeChannel(WIFI_BAND_24_GHZ, 9),
-                new CoexUnsafeChannel(WIFI_BAND_24_GHZ, 10));
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/ANQPMatcherTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/ANQPMatcherTest.java
index 4c3909a..b7bb8af 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/ANQPMatcherTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/ANQPMatcherTest.java
@@ -16,7 +16,6 @@
 
 package com.android.server.wifi.hotspot2;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
@@ -98,8 +97,7 @@
      */
     @Test
     public void matchRoamingConsortiumWithNullElement() throws Exception {
-        assertEquals(0, ANQPMatcher.matchRoamingConsortium(
-                null, new long[0], false));
+        assertFalse(ANQPMatcher.matchRoamingConsortium(null, new long[0], false));
     }
 
     /**
@@ -113,7 +111,7 @@
         long oi = 0x1234L;
         RoamingConsortiumElement element =
                 new RoamingConsortiumElement(Arrays.asList(new Long[] {oi}));
-        assertEquals(oi, ANQPMatcher.matchRoamingConsortium(element, new long[] {oi}, false));
+        assertTrue(ANQPMatcher.matchRoamingConsortium(element, new long[] {oi}, false));
     }
 
     /**
@@ -375,8 +373,7 @@
         Long[] anqpOis = new Long[] {0x1234L, 0x5678L, 0xdeadL, 0xf0cdL};
         RoamingConsortiumElement element =
                 new RoamingConsortiumElement(Arrays.asList(anqpOis));
-        assertEquals(providerOis[0], ANQPMatcher.matchRoamingConsortium(element, providerOis,
-                false));
+        assertTrue(ANQPMatcher.matchRoamingConsortium(element, providerOis, false));
     }
 
     /**
@@ -391,7 +388,7 @@
         Long[] anqpOis = new Long[] {0xabc2L, 0x1232L};
         RoamingConsortiumElement element =
                 new RoamingConsortiumElement(Arrays.asList(anqpOis));
-        assertEquals(0, ANQPMatcher.matchRoamingConsortium(element, providerOis, false));
+        assertFalse(ANQPMatcher.matchRoamingConsortium(element, providerOis, false));
     }
 
     /**
@@ -406,8 +403,7 @@
         Long[] anqpOis = new Long[] {0x1234L, 0x5678L, 0xabcdL, 0xdeadL, 0xf0cdL};
         RoamingConsortiumElement element =
                 new RoamingConsortiumElement(Arrays.asList(anqpOis));
-        assertEquals(providerOis[0],
-                ANQPMatcher.matchRoamingConsortium(element, providerOis, true));
+        assertTrue(ANQPMatcher.matchRoamingConsortium(element, providerOis, true));
     }
 
     /**
@@ -422,6 +418,6 @@
         Long[] anqpOis = new Long[] {0x1234L, 0x5678L, 0xdeadL, 0xf0cdL};
         RoamingConsortiumElement element =
                 new RoamingConsortiumElement(Arrays.asList(anqpOis));
-        assertEquals(0, ANQPMatcher.matchRoamingConsortium(element, providerOis, true));
+        assertFalse(ANQPMatcher.matchRoamingConsortium(element, providerOis, true));
     }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/NetworkDetailTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/NetworkDetailTest.java
deleted file mode 100644
index 09a2ae1..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/NetworkDetailTest.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi.hotspot2;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import android.net.wifi.MloLink;
-import android.net.wifi.ScanResult.InformationElement;
-import android.text.TextUtils;
-
-import com.android.server.wifi.WifiBaseTest;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import java.util.Collections;
-
-/**
- * Unit tests for {@link NetworkDetail}.
- */
-public class NetworkDetailTest extends WifiBaseTest {
-    private static final String TEST_AP_MLD_MAC_ADDRESS = "02:34:56:78:9a:bc";
-    private static final String TEST_BSSID = "02:03:04:05:06:07";
-
-    @Before
-    public void setUp() throws Exception {
-    }
-
-    /**
-     * Verify that When creating a NetworkDetail from a ScanResult without MultiLink IE,
-     * the MLO Information will not be propagated into NetworkDetail.
-     */
-    @Test
-    public void verifyFromScanResultNoMultiLinkIe() throws Exception {
-        InformationElement[] ies = new InformationElement[] {};
-        NetworkDetail networkDetail = new NetworkDetail(TEST_BSSID, ies,
-                Collections.emptyList(), 5745);
-
-        assertTrue(networkDetail.toKeyString() + " not expected!",
-                TextUtils.equals("'null':020304050607", networkDetail.toKeyString()));
-        assertNull(networkDetail.getMldMacAddress());
-        assertEquals(MloLink.INVALID_MLO_LINK_ID, networkDetail.getMloLinkId());
-        assertTrue(networkDetail.getAffiliatedMloLinks().isEmpty());
-    }
-
-    /**
-     * Verify that When creating a NetworkDetail from a ScanResult with MultiLink IE with no links,
-     * and an RNR with MLO links, the MLO Information will be properly propagated into
-     * the NetworkDetail.
-     */
-    @Test
-    public void verifyFromScanResultRnrMultiIeNoLinksIe() throws Exception {
-        InformationElement[] ies = new InformationElement[2];
-
-        // RNR IE
-        ies[0] = new InformationElement();
-        ies[0].id = InformationElement.EID_RNR;
-        ies[0].bytes = new byte[] {
-                (byte) 0x00,  (byte) 0x04, (byte) 81,   (byte) 11,   // First TBTT Info
-                (byte) 0x00,  (byte) 0x00, (byte) 0x01, (byte) 0x00, //  First Set
-                (byte) 0x10,  (byte) 0x04, (byte) 120,  (byte) 149,  // Second TBTT Info
-                (byte) 0x00,  (byte) 0x00, (byte) 0x02, (byte) 0x00, //  First Set
-                (byte) 0x00,  (byte) 0x22, (byte) 0x01, (byte) 0x00  //  Second Set
-        };
-
-        // Multi-Link IE
-        ies[1] = new InformationElement();
-        ies[1].id = InformationElement.EID_EXTENSION_PRESENT;
-        ies[1].idExt = InformationElement.EID_EXT_MULTI_LINK;
-        ies[1].bytes = new byte[] {
-                (byte) 0x10,  (byte) 0x00,                              // Control
-                (byte) 0x08,  (byte) 0x02, (byte) 0x34, (byte) 0x56,    // Common Info
-                (byte) 0x78,  (byte) 0x9A, (byte) 0xBC, (byte) 0x01
-        };
-
-        NetworkDetail networkDetail = new NetworkDetail(TEST_BSSID, ies,
-                Collections.emptyList(), 5745);
-
-        assertNotNull(networkDetail.getMldMacAddress());
-        assertEquals(TEST_AP_MLD_MAC_ADDRESS, networkDetail.getMldMacAddress().toString());
-        assertEquals(1, networkDetail.getMloLinkId());
-        assertEquals(3, networkDetail.getAffiliatedMloLinks().size());
-    }
-
-    /**
-     * Verify that When creating a NetworkDetail from a ScanResult with MultiLink IE with links,
-     * and an RNR with MLO links, the MLO Information will be propagated properly into
-     * the NetworkDetail with links info taken from RNR.
-     */
-    @Test
-    public void verifyFromScanResultRnrMultiIeWithLinks() throws Exception {
-        InformationElement[] ies = new InformationElement[2];
-
-        // RNR IE
-        ies[0] = new InformationElement();
-        ies[0].id = InformationElement.EID_RNR;
-        ies[0].bytes = new byte[] {
-                (byte) 0x00,  (byte) 0x04, (byte) 81,   (byte) 11,   // First TBTT Info
-                (byte) 0x00,  (byte) 0x00, (byte) 0x01, (byte) 0x00, //  First Set
-                (byte) 0x10,  (byte) 0x04, (byte) 120,  (byte) 149,  // Second TBTT Info
-                (byte) 0x00,  (byte) 0x00, (byte) 0x02, (byte) 0x00, //  First Set
-                (byte) 0x00,  (byte) 0x22, (byte) 0x01, (byte) 0x00  //  Second Set
-        };
-
-        // Multi-Link IE
-        ies[1] = new InformationElement();
-        ies[1].id = InformationElement.EID_EXTENSION_PRESENT;
-        ies[1].idExt = InformationElement.EID_EXT_MULTI_LINK;
-        ies[1].bytes = new byte[] {
-                (byte) 0x10,  (byte) 0x00,                              // Control
-                (byte) 0x08,  (byte) 0x02, (byte) 0x34, (byte) 0x56,    // Common Info
-                (byte) 0x78,  (byte) 0x9A, (byte) 0xBC, (byte) 0x01,
-                (byte) 0x00,  (byte) 0x08, (byte) 0x02, (byte) 0x00,    // First Link Info
-                (byte) 0x00,  (byte) 0x00, (byte) 0x00, (byte) 0x00,    //
-                (byte) 0x00,  (byte) 0x08, (byte) 0x03, (byte) 0x00,    // Second Link Info
-                (byte) 0x00,  (byte) 0x00, (byte) 0x00, (byte) 0x00     //
-        };
-
-        NetworkDetail networkDetail = new NetworkDetail(TEST_BSSID, ies,
-                Collections.emptyList(), 5745);
-
-        assertNotNull(networkDetail.getMldMacAddress());
-        assertEquals(TEST_AP_MLD_MAC_ADDRESS, networkDetail.getMldMacAddress().toString());
-        assertEquals(1, networkDetail.getMloLinkId());
-        assertEquals(3, networkDetail.getAffiliatedMloLinks().size());
-    }
-
-    /**
-     * Verify that When creating a NetworkDetail from a ScanResult with MultiLink IE with no links,
-     * and an RNR with no MLO links, the MLO Information will be properly propagated into
-     * the NetworkDetail, and no links is included as affiliated MLO Links.
-     */
-    @Test
-    public void verifyFromScanResultRnrNoLinksMultiIeNoLinksIe() throws Exception {
-        InformationElement[] ies = new InformationElement[2];
-
-        // RNR IE
-        ies[0] = new InformationElement();
-        ies[0].id = InformationElement.EID_RNR;
-        ies[0].bytes = new byte[] {
-                (byte) 0x00,  (byte) 0x04, (byte) 81,   (byte) 11,   // First TBTT Info
-                (byte) 0x00,  (byte) 0x21, (byte) 0x01, (byte) 0x00, //  First Set
-                (byte) 0x10,  (byte) 0x04, (byte) 120,  (byte) 149,  // Second TBTT Info
-                (byte) 0x00,  (byte) 0x22, (byte) 0x02, (byte) 0x00, //  First Set
-                (byte) 0x00,  (byte) 0x23, (byte) 0x01, (byte) 0x00  //  Second Set
-        };
-
-        // Multi-Link IE
-        ies[1] = new InformationElement();
-        ies[1].id = InformationElement.EID_EXTENSION_PRESENT;
-        ies[1].idExt = InformationElement.EID_EXT_MULTI_LINK;
-        ies[1].bytes = new byte[] {
-                (byte) 0x10,  (byte) 0x00,                              // Control
-                (byte) 0x08,  (byte) 0x02, (byte) 0x34, (byte) 0x56,    // Common Info
-                (byte) 0x78,  (byte) 0x9A, (byte) 0xBC, (byte) 0x01
-        };
-
-        NetworkDetail networkDetail = new NetworkDetail(TEST_BSSID, ies,
-                Collections.emptyList(), 5745);
-
-        assertNotNull(networkDetail.getMldMacAddress());
-        assertEquals(TEST_AP_MLD_MAC_ADDRESS, networkDetail.getMldMacAddress().toString());
-        assertEquals(1, networkDetail.getMloLinkId());
-        assertTrue(networkDetail.getAffiliatedMloLinks().isEmpty());
-    }
-
-    @Test
-    public void  verifySameTextFormat() throws Exception {
-        long[] testBssids = {0x11ab0d0f7890L, 0x1, 0x3300, 0x0, 0xffffffffffffL};
-        String[] testBssidMacStrs = {"11:ab:0d:0f:78:90", "00:00:00:00:00:01", "00:00:00:00:33:00",
-                "00:00:00:00:00:00", "ff:ff:ff:ff:ff:ff"};
-        for (int i = 0; i < testBssids.length; i++) {
-            String bssidStr1 = String.format("%012x", testBssids[i]);
-            String bssidStr2 = Utils.macToSimpleString(testBssids[i]);
-            assertTrue(bssidStr1 + " not equals " + bssidStr2,
-                    TextUtils.equals(bssidStr1, bssidStr2));
-            bssidStr1 = testBssidMacStrs[i];
-            bssidStr2 = Utils.macToString(testBssids[i]);
-            assertTrue(bssidStr1 + " not equals " + bssidStr2,
-                    TextUtils.equals(bssidStr1, bssidStr2));
-        }
-    }
-}
-
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/OsuNetworkConnectionTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/OsuNetworkConnectionTest.java
index 627cb8d..b878802 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/OsuNetworkConnectionTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/OsuNetworkConnectionTest.java
@@ -70,7 +70,7 @@
     private static final String TEST_NAI = null;
     private static final String TEST_NAI_OSEN = "access.test.com";
     private static final String TEST_PROVIDER_NAME = "testService";
-    private static final WifiSsid TEST_SSID = WifiSsid.fromUtf8Text("Test SSID");
+    private static final WifiSsid TEST_SSID = WifiSsid.createFromAsciiEncoded("Test SSID");
 
     private OsuNetworkConnection mNetworkConnection;
     private TestLooper mLooper;
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java
index e2f8b95..463ec21 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java
@@ -59,7 +59,6 @@
 import android.net.wifi.EAPConstants;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiContext;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.WifiManager;
 import android.net.wifi.WifiSsid;
@@ -90,12 +89,12 @@
 import com.android.server.wifi.WifiConfigManager;
 import com.android.server.wifi.WifiConfigStore;
 import com.android.server.wifi.WifiConfigurationTestUtil;
+import com.android.server.wifi.WifiContext;
 import com.android.server.wifi.WifiInjector;
 import com.android.server.wifi.WifiKeyStore;
 import com.android.server.wifi.WifiMetrics;
 import com.android.server.wifi.WifiNative;
 import com.android.server.wifi.WifiNetworkSuggestionsManager;
-import com.android.server.wifi.WifiSettingsStore;
 import com.android.server.wifi.hotspot2.anqp.ANQPElement;
 import com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType;
 import com.android.server.wifi.hotspot2.anqp.DomainNameElement;
@@ -201,7 +200,6 @@
     @Mock ANQPRequestManager mAnqpRequestManager;
     @Mock WifiConfigManager mWifiConfigManager;
     @Mock WifiConfigStore mWifiConfigStore;
-    @Mock WifiSettingsStore mWifiSettingsStore;
     PasspointConfigSharedStoreData.DataSource mSharedDataSource;
     PasspointConfigUserStoreData.DataSource mUserDataSource;
     @Mock WifiMetrics mWifiMetrics;
@@ -223,7 +221,6 @@
     Handler mHandler;
     TestLooper mLooper;
     PasspointManager mManager;
-    boolean mConfigSettingsPasspointEnabled = true;
     ArgumentCaptor<AppOpsManager.OnOpChangedListener> mAppOpChangedListenerCaptor =
             ArgumentCaptor.forClass(AppOpsManager.OnOpChangedListener.class);
     WifiCarrierInfoManager mWifiCarrierInfoManager;
@@ -261,15 +258,6 @@
                 .thenReturn(mWifiNetworkSuggestionsManager);
         when(mWifiPermissionsUtil.doesUidBelongToCurrentUserOrDeviceOwner(anyInt()))
                 .thenReturn(true);
-        // Update mConfigSettingsPasspointEnabled when WifiSettingsStore#handleWifiPasspointEnabled
-        // is called.
-        doAnswer(invocation -> {
-            mConfigSettingsPasspointEnabled = (boolean) invocation.getArguments()[0];
-            // Return success
-            return true;
-        }).when(mWifiSettingsStore).handleWifiPasspointEnabled(anyBoolean());
-        when(mWifiSettingsStore.isWifiPasspointEnabled())
-                .thenReturn(mConfigSettingsPasspointEnabled);
         mLooper = new TestLooper();
         mHandler = new Handler(mLooper.getLooper());
         mWifiCarrierInfoManager = new WifiCarrierInfoManager(mTelephonyManager,
@@ -279,11 +267,9 @@
                 mSubscriptionsCaptor.capture());
         mManager = new PasspointManager(mContext, mWifiInjector, mHandler, mWifiNative,
                 mWifiKeyStore, mClock, mObjectFactory, mWifiConfigManager,
-                mWifiConfigStore, mWifiSettingsStore, mWifiMetrics, mWifiCarrierInfoManager,
-                mMacAddressUtil, mWifiPermissionsUtil);
+                mWifiConfigStore, mWifiMetrics, mWifiCarrierInfoManager, mMacAddressUtil,
+                mWifiPermissionsUtil);
         mManager.setPasspointNetworkNominateHelper(mPasspointNetworkNominateHelper);
-        // Verify Passpoint is enabled on creation.
-        assertTrue(mManager.isWifiPasspointEnabled());
         mManager.setUseInjectedPKIX(true);
         mManager.injectPKIXParameters(TEST_PKIX_PARAMETERS);
 
@@ -304,7 +290,6 @@
         // SIM is absent
         when(mSubscriptionManager.getActiveSubscriptionInfoList())
                 .thenReturn(Collections.emptyList());
-        mLooper.dispatchAll();
         verify(mWifiConfigManager).addOnNetworkUpdateListener(mNetworkListenerCaptor.capture());
     }
 
@@ -437,7 +422,7 @@
         assertTrue(mManager.addOrUpdateProvider(
                 config, TEST_CREATOR_UID, TEST_PACKAGE, isSuggestion, true));
         verify(mPasspointNetworkNominateHelper, atLeastOnce())
-                .updateBestMatchScanDetailForProviders();
+                .refreshPasspointNetworkCandidates(isSuggestion);
         return provider;
     }
 
@@ -844,8 +829,8 @@
                 .thenReturn(true);
         PasspointManager ut = new PasspointManager(mContext, mWifiInjector, mHandler, mWifiNative,
                 mWifiKeyStore, mClock, spyFactory, mWifiConfigManager,
-                mWifiConfigStore, mWifiSettingsStore, mWifiMetrics, mWifiCarrierInfoManager,
-                mMacAddressUtil, mWifiPermissionsUtil);
+                mWifiConfigStore, mWifiMetrics, mWifiCarrierInfoManager, mMacAddressUtil,
+                mWifiPermissionsUtil);
 
         assertTrue(ut.addOrUpdateProvider(config, TEST_CREATOR_UID, TEST_PACKAGE,
                 true, true));
@@ -892,7 +877,7 @@
         when(mWifiConfigManager.getConfiguredNetwork(origWifiConfig.getProfileKey()))
                 .thenReturn(origWifiConfig);
         when(mWifiConfigManager.addOrUpdateNetwork(
-                origWifiConfig, TEST_CREATOR_UID, TEST_PACKAGE, false))
+                origWifiConfig, TEST_CREATOR_UID, TEST_PACKAGE))
                 .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(origProvider.getAnonymousIdentity()).thenReturn(TEST_ANONYMOUS_IDENTITY);
         when(origProvider.getConnectChoice()).thenReturn(USER_CONNECT_CHOICE);
@@ -902,8 +887,7 @@
         verify(mWifiConfigManager, never()).removePasspointConfiguredNetwork(
                 origWifiConfig.getProfileKey());
         verify(mWifiConfigManager).addOrUpdateNetwork(
-                argThat((c) -> c.FQDN.equals(TEST_FQDN)), eq(TEST_CREATOR_UID), eq(TEST_PACKAGE),
-                eq(false));
+                argThat((c) -> c.FQDN.equals(TEST_FQDN)), eq(TEST_CREATOR_UID), eq(TEST_PACKAGE));
         verify(mWifiConfigManager).allowAutojoin(TEST_NETWORK_ID, origWifiConfig.allowAutojoin);
         verify(mWifiConfigManager).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderInstallation();
@@ -1109,6 +1093,47 @@
     }
 
     /**
+     * When multiple providers matched for a single scanResult, when there is any home provider
+     * available, return all matched home provider. Otherwise return all roaming provider.
+     */
+    @Test
+    public void matchScanResultWithMultipleProviderAsHomeAndRoaming() {
+        // Only add roaming providers.
+        PasspointProvider roamingProvider1 =
+                addTestProvider(TEST_FQDN, TEST_FRIENDLY_NAME, TEST_PACKAGE, false, null);
+        PasspointProvider roamingProvider2 =
+                addTestProvider(TEST_FQDN2, TEST_FRIENDLY_NAME2, TEST_PACKAGE1, false, null);
+        ANQPData entry = new ANQPData(mClock, null);
+        when(mAnqpCache.getEntry(TEST_ANQP_KEY)).thenReturn(entry);
+        when(roamingProvider1.match(anyMap(), any(RoamingConsortium.class), any(ScanResult.class)))
+                .thenReturn(PasspointMatch.RoamingProvider);
+        when(roamingProvider2.match(anyMap(), any(RoamingConsortium.class), any(ScanResult.class)))
+                .thenReturn(PasspointMatch.RoamingProvider);
+        List<Pair<PasspointProvider, PasspointMatch>> results =
+                mManager.matchProvider(createTestScanResult());
+        // Return all matched roaming providers.
+        assertEquals(2, results.size());
+        for (Pair<PasspointProvider, PasspointMatch> result : results) {
+            assertEquals(PasspointMatch.RoamingProvider, result.second);
+        }
+        // Add home providers.
+        PasspointProvider homeProvider1 =
+                addTestProvider(TEST_FQDN + "home", TEST_FRIENDLY_NAME, TEST_PACKAGE, false, null);
+        PasspointProvider homeProvider2 = addTestProvider(TEST_FQDN2 + "home", TEST_FRIENDLY_NAME2,
+                TEST_PACKAGE1, false, null);
+        when(homeProvider1.match(anyMap(), any(RoamingConsortium.class), any(ScanResult.class)))
+                .thenReturn(PasspointMatch.HomeProvider);
+        when(homeProvider2.match(anyMap(), any(RoamingConsortium.class), any(ScanResult.class)))
+                .thenReturn(PasspointMatch.HomeProvider);
+        results = mManager.matchProvider(createTestScanResult());
+        // When home providers are available, should return all home providers.
+        assertEquals(2, results.size());
+        for (Pair<PasspointProvider, PasspointMatch> result : results) {
+            assertEquals(PasspointMatch.HomeProvider, result.second);
+        }
+    }
+
+    /**
      * Verify that a {code null} will be returned when there is no matching provider.
      *
      * @throws Exception
@@ -1305,10 +1330,10 @@
      * randomized MAC address.
      */
     @Test
-    public void getWifiConfigsForPasspointProfilesWithoutNonPersistentMacRandomization() {
+    public void getWifiConfigsForPasspointProfilesWithoutEnhancedMacRandomization() {
         MacAddress randomizedMacAddress = MacAddress.fromString("01:23:45:67:89:ab");
         when(mMacAddressUtil.calculatePersistentMac(any(), any())).thenReturn(randomizedMacAddress);
-        when(mWifiConfigManager.shouldUseNonPersistentRandomization(any())).thenReturn(false);
+        when(mWifiConfigManager.shouldUseEnhancedRandomization(any())).thenReturn(false);
         PasspointProvider provider = addTestProvider(TEST_FQDN, TEST_FRIENDLY_NAME,
                 TEST_PACKAGE, false, null);
         WifiConfiguration configuration = provider.getWifiConfig();
@@ -1323,15 +1348,14 @@
 
     /**
      * Verify that a {@link WifiConfiguration} will be returned with DEFAULT_MAC_ADDRESS for the
-     * randomized MAC address if non-persistent mac randomization is enabled. This value will
-     * display in the wifi picker's network details page as "Not available" if the network is
-     * disconnected.
+     * randomized MAC address if enhanced mac randomization is enabled. This value will display in
+     * the wifi picker's network details page as "Not available" if the network is disconnected.
      */
     @Test
-    public void getWifiConfigsForPasspointProfilesWithNonPersistentMacRandomization() {
+    public void getWifiConfigsForPasspointProfilesWithEnhancedMacRandomization() {
         MacAddress randomizedMacAddress = MacAddress.fromString("01:23:45:67:89:ab");
         when(mMacAddressUtil.calculatePersistentMac(any(), any())).thenReturn(randomizedMacAddress);
-        when(mWifiConfigManager.shouldUseNonPersistentRandomization(any())).thenReturn(true);
+        when(mWifiConfigManager.shouldUseEnhancedRandomization(any())).thenReturn(true);
         PasspointProvider provider = addTestProvider(TEST_FQDN, TEST_FRIENDLY_NAME,
                 TEST_PACKAGE, false, null);
         WifiConfiguration configuration = provider.getWifiConfig();
@@ -1499,13 +1523,13 @@
                 }
             }
             anqpElementMapOfAp1.put(ANQPElementType.HSOSUProviders,
-                    new HSOsuProvidersElement(WifiSsid.fromUtf8Text("Test SSID"),
+                    new HSOsuProvidersElement(WifiSsid.createFromAsciiEncoded("Test SSID"),
                             providerInfoListOfAp1));
             ANQPData anqpData = new ANQPData(mClock, anqpElementMapOfAp1);
             when(mAnqpCache.getEntry(TEST_ANQP_KEY)).thenReturn(anqpData);
 
             anqpElementMapOfAp2.put(ANQPElementType.HSOSUProviders,
-                    new HSOsuProvidersElement(WifiSsid.fromUtf8Text("Test SSID2"),
+                    new HSOsuProvidersElement(WifiSsid.createFromAsciiEncoded("Test SSID2"),
                             providerInfoListOfAp2));
             ANQPData anqpData2 = new ANQPData(mClock, anqpElementMapOfAp2);
             when(mAnqpCache.getEntry(TEST_ANQP_KEY2)).thenReturn(anqpData2);
@@ -2086,7 +2110,7 @@
         // Remove the provider from same app.
         assertTrue(mManager.removeProvider(TEST_CREATOR_UID, false, null, TEST_FQDN));
         verify(provider).uninstallCertsAndKeys();
-        verify(mWifiConfigManager, never()).removePasspointConfiguredNetwork(
+        verify(mWifiConfigManager).removePasspointConfiguredNetwork(
                 provider.getWifiConfig().getProfileKey());
         verify(mWifiConfigManager).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderUninstallation();
@@ -2140,15 +2164,14 @@
         when(mWifiConfigManager.getConfiguredNetwork(origWifiConfig.getProfileKey()))
                 .thenReturn(origWifiConfig);
         when(mWifiConfigManager.addOrUpdateNetwork(
-                origWifiConfig, TEST_CREATOR_UID, TEST_PACKAGE, false))
+                origWifiConfig, TEST_CREATOR_UID, TEST_PACKAGE))
                 .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         assertTrue(mManager.addOrUpdateProvider(origConfig, TEST_CREATOR_UID, TEST_PACKAGE,
                 true, true));
         verify(mWifiConfigManager, never()).removePasspointConfiguredNetwork(
                 origWifiConfig.getProfileKey());
         verify(mWifiConfigManager).addOrUpdateNetwork(
-                argThat((c) -> c.FQDN.equals(TEST_FQDN)), eq(TEST_CREATOR_UID), eq(TEST_PACKAGE),
-                eq(false));
+                argThat((c) -> c.FQDN.equals(TEST_FQDN)), eq(TEST_CREATOR_UID), eq(TEST_PACKAGE));
         verify(mWifiConfigManager).allowAutojoin(TEST_NETWORK_ID, origWifiConfig.allowAutojoin);
         verify(mWifiConfigManager).saveToStore(true);
         verify(mWifiMetrics).incrementNumPasspointProviderInstallation();
@@ -3016,58 +3039,5 @@
         verify(mAnqpCache).flush();
         verify(provider).clearProviderBlock();
     }
-
-    /**
-     * Verify that when Passpoint manager is enabled/disabled the WifiSettingsStore is updated
-     * with correct value.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void testPasspointEnableSettingsStore() throws Exception {
-        // Disable the Wifi Passpoint, check return value and verify status.
-        mManager.setWifiPasspointEnabled(false);
-        assertFalse(mManager.isWifiPasspointEnabled());
-        // Verify WifiSettingStore has been called to set Wifi Passpoint status.
-        verify(mWifiSettingsStore).handleWifiPasspointEnabled(false);
-        assertFalse(mConfigSettingsPasspointEnabled);
-
-        // Enable the Wifi Passpoint, check return value and verify status.
-        mManager.setWifiPasspointEnabled(true);
-        assertTrue(mManager.isWifiPasspointEnabled());
-        // Verify WifiSettingStore has been called to set Wifi Passpoint status.
-        verify(mWifiSettingsStore).handleWifiPasspointEnabled(true);
-        assertTrue(mConfigSettingsPasspointEnabled);
-    }
-
-    /**
-     * Verify that Passpoint manager is enabled and disabled.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void testPasspointEnableDisable() throws Exception {
-        PasspointProvider provider =
-                addTestProvider(TEST_FQDN, TEST_FRIENDLY_NAME, TEST_PACKAGE, false, null);
-        ANQPData entry = new ANQPData(mClock, null);
-
-        when(mAnqpCache.getEntry(TEST_ANQP_KEY)).thenReturn(entry);
-        when(provider.match(anyMap(), any(RoamingConsortium.class), any(ScanResult.class)))
-                .thenReturn(PasspointMatch.HomeProvider);
-
-        // Disable the Wifi Passpoint and expect the matchProvider to return empty list.
-        mManager.setWifiPasspointEnabled(false);
-        assertFalse(mManager.isWifiPasspointEnabled());
-        assertTrue(mManager.matchProvider(createTestScanResult()).isEmpty());
-
-        // Enable the Wifi Passpoint and expect the matchProvider to return matched result.
-        mManager.setWifiPasspointEnabled(true);
-        assertTrue(mManager.isWifiPasspointEnabled());
-        List<Pair<PasspointProvider, PasspointMatch>> results =
-                mManager.matchProvider(createTestScanResult());
-        Pair<PasspointProvider, PasspointMatch> result = results.get(0);
-        assertEquals(PasspointMatch.HomeProvider, result.second);
-        assertEquals(TEST_FQDN, result.first.getConfig().getHomeSp().getFqdn());
-    }
 }
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkNominateHelperTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkNominateHelperTest.java
index 505d76e..0ca9691 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkNominateHelperTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointNetworkNominateHelperTest.java
@@ -16,8 +16,6 @@
 
 package com.android.server.wifi.hotspot2;
 
-import static android.net.wifi.WifiConfiguration.RANDOMIZATION_NONE;
-
 import static com.android.server.wifi.WifiConfigurationTestUtil.SECURITY_EAP;
 
 import static org.junit.Assert.assertEquals;
@@ -35,13 +33,11 @@
 import static org.mockito.Mockito.when;
 import static org.mockito.MockitoAnnotations.initMocks;
 
-import android.content.res.Resources;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiEnterpriseConfig;
 import android.net.wifi.hotspot2.PasspointConfiguration;
 import android.net.wifi.hotspot2.pps.HomeSp;
-import android.net.wifi.util.ScanResultUtil;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.util.LocalLog;
@@ -51,13 +47,12 @@
 
 import com.android.server.wifi.NetworkUpdateResult;
 import com.android.server.wifi.ScanDetail;
-import com.android.server.wifi.WifiCarrierInfoManager;
 import com.android.server.wifi.WifiConfigManager;
 import com.android.server.wifi.WifiConfigurationTestUtil;
 import com.android.server.wifi.hotspot2.anqp.ANQPElement;
 import com.android.server.wifi.hotspot2.anqp.Constants.ANQPElementType;
 import com.android.server.wifi.hotspot2.anqp.HSWanMetricsElement;
-import com.android.wifi.resources.R;
+import com.android.server.wifi.util.ScanResultUtil;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -97,8 +92,6 @@
     @Mock WifiConfigManager mWifiConfigManager;
     @Mock SubscriptionManager mSubscriptionManager;
     @Mock LocalLog mLocalLog;
-    @Mock WifiCarrierInfoManager mWifiCarrierInfoManager;
-    @Mock Resources mResources;
     PasspointNetworkNominateHelper mNominateHelper;
 
     /**
@@ -167,14 +160,9 @@
         initMocks(this);
         sTestProvider1 = generateProvider(TEST_CONFIG1);
         sTestProvider2 = generateProvider(TEST_CONFIG2);
-        when(mResources.getStringArray(
-                R.array.config_wifiPasspointUseApWanLinkStatusAnqpElementFqdnAllowlist))
-                .thenReturn(new String[0]);
 
-        mNominateHelper = new PasspointNetworkNominateHelper(mPasspointManager, mWifiConfigManager,
-                mLocalLog, mWifiCarrierInfoManager, mResources);
-        // Always assume Passpoint is enabled as we don't disable it in the test.
-        when(mPasspointManager.isWifiPasspointEnabled()).thenReturn(true);
+        mNominateHelper = new PasspointNetworkNominateHelper(
+                mPasspointManager, mWifiConfigManager, mLocalLog);
     }
 
     /**
@@ -222,8 +210,6 @@
     public void evaluateScansWithNetworkMatchingHomeProvider() throws Exception {
         List<ScanDetail> scanDetails = Arrays.asList(generateScanDetail(TEST_SSID1, TEST_BSSID1),
                 generateScanDetail(TEST_SSID2, TEST_BSSID2));
-        when(mWifiCarrierInfoManager.shouldDisableMacRandomization(anyString(), anyInt(), anyInt()))
-                .thenReturn(true);
 
         // Setup matching providers for ScanDetail with TEST_SSID1.
         List<Pair<PasspointProvider, PasspointMatch>> homeProvider = new ArrayList<>();
@@ -234,7 +220,7 @@
         when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider)
                 .thenReturn(null);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
         List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
                 .getPasspointNetworkCandidates(scanDetails, false);
@@ -243,14 +229,12 @@
         // Verify the content of the WifiConfiguration that was added to WifiConfigManager.
         ArgumentCaptor<WifiConfiguration> addedConfig =
                 ArgumentCaptor.forClass(WifiConfiguration.class);
-        verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt(), any(),
-                eq(false));
-        assertEquals(ScanResultUtil.createQuotedSsid(TEST_SSID1), addedConfig.getValue().SSID);
+        verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt(), any());
+        assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID1), addedConfig.getValue().SSID);
         assertEquals(TEST_FQDN1, addedConfig.getValue().FQDN);
         assertNotNull(addedConfig.getValue().enterpriseConfig);
         assertEquals("", addedConfig.getValue().enterpriseConfig.getAnonymousIdentity());
         assertTrue(addedConfig.getValue().isHomeProviderNetwork);
-        assertEquals(RANDOMIZATION_NONE, addedConfig.getValue().macRandomizationSetting);
         verify(mWifiConfigManager).enableNetwork(
                 eq(TEST_NETWORK_ID), eq(false), eq(TEST_UID), any());
         verify(mWifiConfigManager).setNetworkCandidateScanResult(
@@ -283,7 +267,7 @@
         when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider)
                 .thenReturn(null);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
         List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
                 .getPasspointNetworkCandidates(scanDetails, false);
@@ -292,9 +276,8 @@
         // Verify the content of the WifiConfiguration that was added to WifiConfigManager.
         ArgumentCaptor<WifiConfiguration> addedConfig =
                 ArgumentCaptor.forClass(WifiConfiguration.class);
-        verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt(), any(),
-                eq(false));
-        assertEquals(ScanResultUtil.createQuotedSsid(TEST_SSID1), addedConfig.getValue().SSID);
+        verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt(), any());
+        assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID1), addedConfig.getValue().SSID);
         assertEquals(TEST_FQDN1, addedConfig.getValue().FQDN);
         assertNotNull(addedConfig.getValue().enterpriseConfig);
         assertEquals("", addedConfig.getValue().enterpriseConfig.getAnonymousIdentity());
@@ -324,8 +307,7 @@
         // for the second (TEST_SSID2);
         when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(roamingProvider)
                 .thenReturn(null);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(), any(),
-                eq(false)))
+        when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(), any()))
                 .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
         List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
@@ -335,9 +317,8 @@
         // Verify the content of the WifiConfiguration that was added to WifiConfigManager.
         ArgumentCaptor<WifiConfiguration> addedConfig =
                 ArgumentCaptor.forClass(WifiConfiguration.class);
-        verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt(), any(),
-                eq(false));
-        assertEquals(ScanResultUtil.createQuotedSsid(TEST_SSID1), addedConfig.getValue().SSID);
+        verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt(), any());
+        assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID1), addedConfig.getValue().SSID);
         assertEquals(TEST_FQDN1, addedConfig.getValue().FQDN);
         assertNotNull(addedConfig.getValue().enterpriseConfig);
         assertEquals("", addedConfig.getValue().enterpriseConfig.getAnonymousIdentity());
@@ -372,7 +353,7 @@
         when(mPasspointManager.matchProvider(any(ScanResult.class)))
                 .thenReturn(homeProvider).thenReturn(roamingProvider);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID))
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID))
                 .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID + 1));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID + 1))
@@ -382,7 +363,7 @@
         assertEquals(2, candidates.size());
 
         verify(mWifiConfigManager, times(2))
-                .addOrUpdateNetwork(any(), anyInt(), any(), eq(false));
+                .addOrUpdateNetwork(any(), anyInt(), any());
     }
 
     /**
@@ -408,7 +389,7 @@
         when(mSubscriptionManager.getActiveSubscriptionInfoList())
                 .thenReturn(Arrays.asList(mock(SubscriptionInfo.class)));
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(config);
 
         List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
@@ -433,13 +414,13 @@
         // Setup currently connected network.
         WifiConfiguration currentNetwork = new WifiConfiguration();
         currentNetwork.networkId = TEST_NETWORK_ID;
-        currentNetwork.SSID = ScanResultUtil.createQuotedSsid(TEST_SSID1);
+        currentNetwork.SSID = ScanResultUtil.createQuotedSSID(TEST_SSID1);
         String currentBssid = TEST_BSSID1;
 
         // Match the current connected network to a home provider.
         when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(currentNetwork);
 
         List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
@@ -493,7 +474,7 @@
         List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
                 .getPasspointNetworkCandidates(scanDetails, false);
         verify(mWifiConfigManager, never()).addOrUpdateNetwork(any(WifiConfiguration.class),
-                anyInt(), any(), eq(false));
+                anyInt(), any());
         assertTrue(candidates.isEmpty());
     }
 
@@ -512,7 +493,7 @@
         // Return homeProvider for the first ScanDetail (TEST_SSID1).
         when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
         when(mWifiConfigManager.isNetworkTemporarilyDisabledByUser(TEST_FQDN1))
                 .thenReturn(true);
@@ -522,108 +503,32 @@
     }
 
     /**
-     * Verify that when the WAN metrics status is 'LINK_STATUS_DOWN', it will not return as
-     * candidate when use wan link status.
+     * Verify that when the WAN metrics status is 'LINK_STATUS_DOWN', it should be ignored.
+     * @throws Exception
      */
     @Test
-    public void evaluateScansWithNetworkMatchingHomeProviderUseAnqpLinkDown() throws Exception {
-        when(mResources.getBoolean(R.bool.config_wifiPasspointUseApWanLinkStatusAnqpElement))
-                .thenReturn(true);
-        List<ScanDetail> scanDetails = Arrays.asList(generateScanDetail(TEST_SSID1, TEST_BSSID1),
-                generateScanDetail(TEST_SSID2, TEST_BSSID2));
+    public void evaluateScansWithNetworkMatchingHomeProviderWithAnqpLinkDown() throws Exception {
+        List<ScanDetail> scanDetails = Arrays.asList(generateScanDetail(TEST_SSID1, TEST_BSSID1));
         // Setup matching providers for ScanDetail with TEST_SSID1.
         List<Pair<PasspointProvider, PasspointMatch>> homeProvider = new ArrayList<>();
         homeProvider.add(Pair.create(sTestProvider1, PasspointMatch.HomeProvider));
 
         when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID + 1));
-        when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(TEST_CONFIG1);
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+        when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
         // Setup WAN metrics status is 'LINK_STATUS_DOWN'
         HSWanMetricsElement wm = mock(HSWanMetricsElement.class);
         Map<ANQPElementType, ANQPElement> anqpElements = new HashMap<>();
         anqpElements.put(ANQPElementType.HSWANMetrics, wm);
-        when(mPasspointManager.getANQPElements(scanDetails.get(0).getScanResult()))
+        when(mPasspointManager.getANQPElements(any(ScanResult.class)))
                 .thenReturn(anqpElements);
         when(wm.getStatus()).thenReturn(HSWanMetricsElement.LINK_STATUS_DOWN);
         when(wm.isElementInitialized()).thenReturn(true);
 
         List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
                 .getPasspointNetworkCandidates(scanDetails, false);
-        assertEquals(1, candidates.size());
-    }
-
-    /**
-     * Verify that when the WAN metrics status is 'LINK_STATUS_DOWN', it will return as
-     * candidate when not use wan link status.
-     */
-
-    @Test
-    public void evaluateScansWithNetworkMatchingHomeProviderNotUseAnqpLinkDown() throws Exception {
-        when(mResources.getBoolean(R.bool.config_wifiPasspointUseApWanLinkStatusAnqpElement))
-                .thenReturn(false);
-        List<ScanDetail> scanDetails = Arrays.asList(generateScanDetail(TEST_SSID1, TEST_BSSID1),
-                generateScanDetail(TEST_SSID2, TEST_BSSID2));
-        // Setup matching providers for ScanDetail with TEST_SSID1.
-        List<Pair<PasspointProvider, PasspointMatch>> homeProvider = new ArrayList<>();
-        homeProvider.add(Pair.create(sTestProvider1, PasspointMatch.HomeProvider));
-
-        when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID + 1));
-        when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(TEST_CONFIG1);
-        // Setup WAN metrics status is 'LINK_STATUS_DOWN'
-        HSWanMetricsElement wm = mock(HSWanMetricsElement.class);
-        Map<ANQPElementType, ANQPElement> anqpElements = new HashMap<>();
-        anqpElements.put(ANQPElementType.HSWANMetrics, wm);
-        when(mPasspointManager.getANQPElements(scanDetails.get(0).getScanResult()))
-                .thenReturn(anqpElements);
-        when(wm.getStatus()).thenReturn(HSWanMetricsElement.LINK_STATUS_DOWN);
-        when(wm.isElementInitialized()).thenReturn(true);
-
-        List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
-                .getPasspointNetworkCandidates(scanDetails, false);
-        assertEquals(2, candidates.size());
-    }
-
-    /**
-     * Verify that when the WAN metrics status is 'LINK_STATUS_DOWN', it will not return as
-     * candidate when not use wan link status but FQDN in the allow list
-     */
-
-    @Test
-    public void evaluateScansWithNetworkMatchingHomeProviderNotUseAnqpLinkDownInFqdnList()
-            throws Exception {
-        when(mResources.getBoolean(R.bool.config_wifiPasspointUseApWanLinkStatusAnqpElement))
-                .thenReturn(false);
-        when(mResources.getStringArray(
-                R.array.config_wifiPasspointUseApWanLinkStatusAnqpElementFqdnAllowlist))
-                .thenReturn(new String[]{TEST_FQDN1});
-        List<ScanDetail> scanDetails = Arrays.asList(generateScanDetail(TEST_SSID1, TEST_BSSID1),
-                generateScanDetail(TEST_SSID2, TEST_BSSID2));
-        // Setup matching providers for ScanDetail with TEST_SSID1.
-        List<Pair<PasspointProvider, PasspointMatch>> homeProvider = new ArrayList<>();
-        homeProvider.add(Pair.create(sTestProvider1, PasspointMatch.HomeProvider));
-
-        when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID + 1));
-        when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(TEST_CONFIG1);
-        // Setup WAN metrics status is 'LINK_STATUS_DOWN'
-        HSWanMetricsElement wm = mock(HSWanMetricsElement.class);
-        Map<ANQPElementType, ANQPElement> anqpElements = new HashMap<>();
-        anqpElements.put(ANQPElementType.HSWANMetrics, wm);
-        when(mPasspointManager.getANQPElements(scanDetails.get(0).getScanResult()))
-                .thenReturn(anqpElements);
-        when(wm.getStatus()).thenReturn(HSWanMetricsElement.LINK_STATUS_DOWN);
-        when(wm.isElementInitialized()).thenReturn(true);
-
-        List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
-                .getPasspointNetworkCandidates(scanDetails, false);
-        assertEquals(1, candidates.size());
+        assertTrue(candidates.isEmpty());
     }
 
     /**
@@ -646,7 +551,7 @@
         when(mPasspointManager.matchProvider(any(ScanResult.class)))
                 .thenReturn(roamingProvider).thenReturn(homeProvider);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
 
         List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
@@ -654,7 +559,7 @@
         // verify Only home provider matched candidate will by chosen
         assertEquals(1, candidates.size());
         assertTrue(candidates.get(0).second.isHomeProviderNetwork);
-        assertEquals(ScanResultUtil.createQuotedSsid(TEST_SSID2), candidates.get(0).second.SSID);
+        assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID2), candidates.get(0).second.SSID);
     }
 
     /**
@@ -678,7 +583,7 @@
         when(mPasspointManager.matchProvider(any(ScanResult.class)))
                 .thenReturn(homeProvider).thenReturn(roamingProvider);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID))
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID))
                 .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID2));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID2)).thenReturn(TEST_CONFIG2);
@@ -689,9 +594,9 @@
         // the second (TEST_SSID2).
         assertEquals(2, candidates.size());
         assertTrue(candidates.stream().anyMatch(c -> c.second.isHomeProviderNetwork
-                && c.second.SSID.equals(ScanResultUtil.createQuotedSsid(TEST_SSID1))));
+                && c.second.SSID.equals(ScanResultUtil.createQuotedSSID(TEST_SSID1))));
         assertTrue(candidates.stream().anyMatch(c -> !c.second.isHomeProviderNetwork
-                && c.second.SSID.equals(ScanResultUtil.createQuotedSsid(TEST_SSID2))));
+                && c.second.SSID.equals(ScanResultUtil.createQuotedSSID(TEST_SSID2))));
     }
 
     /**
@@ -715,9 +620,9 @@
         when(mPasspointManager.matchProvider(any(ScanResult.class)))
                 .thenReturn(homeProviders);
         when(mWifiConfigManager.addOrUpdateNetwork(eq(TEST_CONFIG1), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.addOrUpdateNetwork(eq(suggestionConfig), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID2));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID2));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID2))
                 .thenReturn(suggestionConfig);
@@ -777,7 +682,7 @@
         when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider)
                 .thenReturn(null);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
         List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
                 .getPasspointNetworkCandidates(scanDetails, false);
@@ -799,7 +704,7 @@
 
         when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
 
         // Setup an uninitialized WAN Metrics element (or initialized with 0's)
@@ -832,17 +737,16 @@
         // Add a homeProvider for the scan detail passed in earlier
         when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider);
         when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
+                any())).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
         when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
 
         // Refreshing the network candidates with the old scans should now result in a match
-        mNominateHelper.updateBestMatchScanDetailForProviders();
+        mNominateHelper.refreshPasspointNetworkCandidates(false);
         // Verify the content of the WifiConfiguration that was added to WifiConfigManager.
         ArgumentCaptor<WifiConfiguration> addedConfig =
                 ArgumentCaptor.forClass(WifiConfiguration.class);
-        verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt(), any(),
-                eq(false));
-        assertEquals(ScanResultUtil.createQuotedSsid(TEST_SSID1), addedConfig.getValue().SSID);
+        verify(mWifiConfigManager).addOrUpdateNetwork(addedConfig.capture(), anyInt(), any());
+        assertEquals(ScanResultUtil.createQuotedSSID(TEST_SSID1), addedConfig.getValue().SSID);
         assertEquals(TEST_FQDN1, addedConfig.getValue().FQDN);
         assertNotNull(addedConfig.getValue().enterpriseConfig);
         assertEquals("", addedConfig.getValue().enterpriseConfig.getAnonymousIdentity());
@@ -854,96 +758,4 @@
         verify(mWifiConfigManager).updateScanDetailForNetwork(
                 eq(TEST_NETWORK_ID), any(ScanDetail.class));
     }
-
-    /**
-     * Verify that when the WAN metrics status is 'LINK_STATUS_DOWN', it should be added to the
-     * WifiConfigManager and NOT set No Internet.
-     */
-    @Test
-    public void updateScansWithNetworkMatchingHomeProviderWithAnqpLinkDown() {
-        List<ScanDetail> scanDetails = Arrays.asList(generateScanDetail(TEST_SSID1, TEST_BSSID1));
-        // Setup matching providers for ScanDetail with TEST_SSID1.
-        List<Pair<PasspointProvider, PasspointMatch>> homeProvider = new ArrayList<>();
-        homeProvider.add(Pair.create(sTestProvider1, PasspointMatch.HomeProvider));
-
-        when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(homeProvider);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID));
-        when(mWifiConfigManager.getConfiguredNetwork(anyInt())).thenReturn(TEST_CONFIG1);
-        // Setup WAN metrics status is 'LINK_STATUS_DOWN'
-        HSWanMetricsElement wm = mock(HSWanMetricsElement.class);
-        Map<ANQPElementType, ANQPElement> anqpElements = new HashMap<>();
-        anqpElements.put(ANQPElementType.HSWANMetrics, wm);
-        when(mPasspointManager.getANQPElements(any(ScanResult.class)))
-                .thenReturn(anqpElements);
-        when(wm.getStatus()).thenReturn(HSWanMetricsElement.LINK_STATUS_DOWN);
-        when(wm.isElementInitialized()).thenReturn(true);
-
-        mNominateHelper.updatePasspointConfig(scanDetails);
-        verify(mWifiConfigManager, never())
-                .incrementNetworkNoInternetAccessReports(eq(TEST_NETWORK_ID));
-        verify(mWifiConfigManager, never()).updateNetworkSelectionStatus(eq(TEST_NETWORK_ID),
-                eq(WifiConfiguration.NetworkSelectionStatus.DISABLED_NO_INTERNET_PERMANENT));
-    }
-
-    /**
-     * Verify that both home and roaming providers for same scan detail will be added to
-     * WifiConfigManager.
-     */
-    @Test
-    public void updateScansWithBothHomeProviderAndRoamingProvider() {
-        List<ScanDetail> scanDetails = Arrays.asList(generateScanDetail(TEST_SSID1, TEST_BSSID1));
-        // Setup matching providers for ScanDetail with TEST_SSID1.
-        List<Pair<PasspointProvider, PasspointMatch>> matchedProvider = new ArrayList<>();
-        matchedProvider.add(Pair.create(sTestProvider1, PasspointMatch.HomeProvider));
-        matchedProvider.add(Pair.create(sTestProvider2, PasspointMatch.RoamingProvider));
-
-        when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(matchedProvider);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID2));
-        when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
-        when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID2)).thenReturn(TEST_CONFIG2);
-        mNominateHelper.updatePasspointConfig(scanDetails);
-        verify(mWifiConfigManager, times(2))
-                .addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(), any(), eq(false));
-        verify(mWifiConfigManager)
-                .enableNetwork(eq(TEST_NETWORK_ID), eq(false), anyInt(), any());
-        verify(mWifiConfigManager)
-                .enableNetwork(eq(TEST_NETWORK_ID2), eq(false), anyInt(), any());
-        verify(mWifiConfigManager)
-                .setNetworkCandidateScanResult(eq(TEST_NETWORK_ID), any(), anyInt(), any());
-        verify(mWifiConfigManager)
-                .setNetworkCandidateScanResult(eq(TEST_NETWORK_ID2), any(), anyInt(), any());
-        verify(mWifiConfigManager)
-                .updateScanDetailForNetwork(eq(TEST_NETWORK_ID), eq(scanDetails.get(0)));
-        verify(mWifiConfigManager)
-                .updateScanDetailForNetwork(eq(TEST_NETWORK_ID2), eq(scanDetails.get(0)));
-    }
-
-    /**
-     * Verify when ScanDetails matches both home and roaming providers, only home provider will be
-     * return as candidate.
-     */
-    @Test
-    public void evaluateScansWithBothHomeProviderAndRoamingProvider() {
-        List<ScanDetail> scanDetails = Arrays.asList(generateScanDetail(TEST_SSID1, TEST_BSSID1));
-        // Setup matching providers for ScanDetail with TEST_SSID1.
-        List<Pair<PasspointProvider, PasspointMatch>> matchedProvider = new ArrayList<>();
-        matchedProvider.add(Pair.create(sTestProvider1, PasspointMatch.HomeProvider));
-        matchedProvider.add(Pair.create(sTestProvider2, PasspointMatch.RoamingProvider));
-
-        when(mPasspointManager.matchProvider(any(ScanResult.class))).thenReturn(matchedProvider);
-        when(mWifiConfigManager.addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false))).thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID))
-                .thenReturn(new NetworkUpdateResult(TEST_NETWORK_ID2));
-        when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID)).thenReturn(TEST_CONFIG1);
-        when(mWifiConfigManager.getConfiguredNetwork(TEST_NETWORK_ID2)).thenReturn(TEST_CONFIG2);
-        List<Pair<ScanDetail, WifiConfiguration>> candidates = mNominateHelper
-                .getPasspointNetworkCandidates(scanDetails, false);
-        assertEquals(1, candidates.size());
-        verify(mWifiConfigManager).addOrUpdateNetwork(any(WifiConfiguration.class), anyInt(),
-                any(), eq(false));
-        assertTrue(candidates.get(0).second.isHomeProviderNetwork);
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProviderTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProviderTest.java
index db50d94..1722029 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProviderTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProviderTest.java
@@ -29,7 +29,6 @@
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiEnterpriseConfig;
-import android.net.wifi.WifiSsid;
 import android.net.wifi.hotspot2.PasspointConfiguration;
 import android.net.wifi.hotspot2.pps.Credential;
 import android.net.wifi.hotspot2.pps.HomeSp;
@@ -105,7 +104,6 @@
     private static final long[] TEST_IE_RC_OIS = new long[]{0x1234L, 0x2133L};
     private static final long[] TEST_IE_NO_MATCHED_RC_OIS = new long[]{0x2255L, 0x2133L};
     private static final Long[] TEST_ANQP_RC_OIS = new Long[]{0x1234L, 0x2133L};
-    private static final Long[] TEST_ANQP_RC_OIS_2 = new Long[]{0x4321L, 0x3321L};
     private static final String TEST_REALM = "realm.com";
     private static final String[] TEST_TRUSTED_NAME =
             new String[]{"trusted.fqdn.com", "another.fqdn.com"};
@@ -120,15 +118,10 @@
     private static final int VALID_SUBSCRIPTION_ID = 2;
 
     private static final String TEST_SSID = "TestSSID";
-    private static final String TEST_SSID_QUOTED = "\"TestSSID\"";
-    private static final String TEST_SSID_2 = "TestSSID2";
-    private static final String TEST_SSID_2_QUOTED = "\"TestSSID2\"";
     private static final String TEST_BSSID_STRING = "11:22:33:44:55:66";
     private static final String TEST_BSSID_STRING_2 = "11:22:33:44:55:67";
     private static final long TEST_HESSID = 0x5678L;
     private static final int TEST_ANQP_DOMAIN_ID = 0;
-    private static final long TEST_HESSID_2 = 0xaa0aL;
-    private static final int TEST_ANQP_DOMAIN_ID_2 = 1;
     private static final long TEST_ELAPSED_TIME_SINCE_BOOT = 100000L;
     private static final String TEST_ANONYMOUS_IDENTITY = "AnonymousIdentity";
     private static final String USER_CONNECT_CHOICE = "SomeNetworkProfileId";
@@ -352,7 +345,7 @@
         assertFalse(wifiConfig.shared);
         assertEquals(credential.getRealm(), wifiEnterpriseConfig.getRealm());
         if (passpointConfig.isMacRandomizationEnabled()) {
-            if (passpointConfig.isNonPersistentMacRandomizationEnabled()) {
+            if (passpointConfig.isEnhancedMacRandomizationEnabled()) {
                 assertEquals(WifiConfiguration.RANDOMIZATION_NON_PERSISTENT,
                         wifiConfig.macRandomizationSetting);
             } else {
@@ -804,12 +797,6 @@
 
         assertEquals(PasspointMatch.RoamingProvider,
                 mProvider.match(anqpElementMap, mRoamingConsortium, createTestScanResult()));
-
-        // Confirm the selected RCOI matches the expected value
-        assertEquals(TEST_IE_RC_OIS[0],
-                mProvider.getAndRemoveMatchedRcoi(TEST_SSID_QUOTED));
-        // Confirm the value is cleared after it was fetched
-        assertEquals(0, mProvider.getAndRemoveMatchedRcoi(TEST_SSID_QUOTED));
     }
 
     /**
@@ -942,12 +929,6 @@
 
         assertEquals(PasspointMatch.RoamingProvider,
                 mProvider.match(anqpElementMap, mRoamingConsortium, createTestScanResult()));
-
-        // Confirm the selected RCOI matches the expected value
-        assertEquals(TEST_IE_RC_OIS[0],
-                mProvider.getAndRemoveMatchedRcoi(TEST_SSID_QUOTED));
-        // Confirm the value is cleared after it was fetched
-        assertEquals(0, mProvider.getAndRemoveMatchedRcoi(TEST_SSID_QUOTED));
     }
 
     /**
@@ -1362,14 +1343,14 @@
     }
 
     /**
-     * Verify the WifiConfiguration is generated properly with settings to use non-persistent MAC
+     * Verify the WifiConfiguration is generated properly with settings to use enhanced MAC
      * randomization.
      */
     @Test
-    public void testMacRandomizationSettingNonPersistent() throws Exception {
+    public void testMacRandomizationSettingEnhanced() throws Exception {
         PasspointConfiguration config = generateTestPasspointConfiguration(
                 CredentialType.SIM, false);
-        config.setNonPersistentMacRandomizationEnabled(true);
+        config.setEnhancedMacRandomizationEnabled(true);
         mProvider = createProvider(config);
 
         assertEquals(WifiConfiguration.RANDOMIZATION_NON_PERSISTENT,
@@ -1688,7 +1669,6 @@
 
         assertEquals(PasspointMatch.None,
                 mProvider.match(anqpElementMap, mRoamingConsortium, createTestScanResult()));
-        assertEquals(0, mProvider.getAndRemoveMatchedRcoi(TEST_SSID_QUOTED));
     }
 
     /**
@@ -1703,26 +1683,10 @@
         scanResult.hessid = TEST_HESSID;
         scanResult.anqpDomainId = TEST_ANQP_DOMAIN_ID;
         scanResult.flags = ScanResult.FLAG_PASSPOINT_NETWORK;
-        scanResult.setWifiSsid(WifiSsid.fromString(TEST_SSID_QUOTED));
         return scanResult;
     }
 
     /**
-     * Helper function for creating another ScanResult for testing.
-     *
-     * @return {@link ScanResult}
-     */
-    private ScanResult createSecondaryTestScanResult() {
-        ScanResult scanResult = new ScanResult();
-        scanResult.SSID = TEST_SSID_2;
-        scanResult.BSSID = TEST_BSSID_STRING_2;
-        scanResult.hessid = TEST_HESSID_2;
-        scanResult.anqpDomainId = TEST_ANQP_DOMAIN_ID_2;
-        scanResult.flags = ScanResult.FLAG_PASSPOINT_NETWORK;
-        scanResult.setWifiSsid(WifiSsid.fromString(TEST_SSID_2_QUOTED));
-        return scanResult;
-    }
-    /**
      * Verify that a home provider is not matched followed by a Deauthentication-imminent WNM
      * notification from the AP that covers a specific BSS.
      *
@@ -1992,40 +1956,4 @@
         assertEquals(TEST_DECORATED_IDENTITY_PREFIX,
                 mProvider.getWifiConfig().enterpriseConfig.getDecoratedIdentityPrefix());
     }
-
-    @Test
-    public void testRcoiMatchMapAgeOut() throws Exception {
-        // Setup test provider.
-        PasspointConfiguration config = generateTestPasspointConfiguration(
-                CredentialType.SIM, false);
-        mProvider = createProvider(config);
-        when(mWifiCarrierInfoManager.getMatchingImsiCarrierId(
-                eq(config.getCredential().getSimCredential().getImsi())))
-                .thenReturn(new Pair<>(TEST_IMSI, VALID_CARRIER_ID));
-
-        // Setup Roaming Consortium ANQP element.
-        Map<ANQPElementType, ANQPElement> anqpElementMap = new HashMap<>();
-        anqpElementMap.put(ANQPElementType.ANQPRoamingConsortium,
-                createRoamingConsortiumElement(TEST_ANQP_RC_OIS));
-
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(TEST_ELAPSED_TIME_SINCE_BOOT);
-
-        // Roaming provider with RCOI match adds a selected RCOI to the match map
-        assertEquals(PasspointMatch.RoamingProvider,
-                mProvider.match(anqpElementMap, mRoamingConsortium, createTestScanResult()));
-
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(TEST_ELAPSED_TIME_SINCE_BOOT
-                + 700_000L);
-
-        anqpElementMap.put(ANQPElementType.ANQPRoamingConsortium,
-                createRoamingConsortiumElement(TEST_ANQP_RC_OIS_2));
-
-        // Now a new scan with another SSID and no match after a while
-        assertEquals(PasspointMatch.None, mProvider.match(anqpElementMap, mRoamingConsortium,
-                createSecondaryTestScanResult()));
-
-        // Confirm the selected roaming match map entry for the first SSID is cleared after it was
-        // aged out
-        assertEquals(0, mProvider.getAndRemoveMatchedRcoi(TEST_SSID_QUOTED));
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProvisionerTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProvisionerTest.java
index af6ddcc..c4ba619 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProvisionerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProvisionerTest.java
@@ -138,9 +138,9 @@
     private static final byte[] TEST_OSU_SSID_BYTES = "OSU_SSID".getBytes(StandardCharsets.UTF_8);
     private static final byte[] TEST_OSU_SSID3_BYTES = "OSU_SSID3".getBytes(StandardCharsets.UTF_8);
     private static final WifiSsid TEST_OSU_SSID =
-            WifiSsid.fromBytes(TEST_OSU_SSID_BYTES);
+            WifiSsid.createFromByteArray(TEST_OSU_SSID_BYTES);
     private static final WifiSsid TEST_OSU_SSID3 =
-            WifiSsid.fromBytes(TEST_OSU_SSID3_BYTES);
+            WifiSsid.createFromByteArray(TEST_OSU_SSID3_BYTES);
     private static final List<OsuProviderInfo> TEST_PROVIDER_LIST =
             Arrays.asList(OsuProviderInfoTestUtil.TEST_OSU_PROVIDER_INFO);
     private static final HSOsuProvidersElement TEST_OSU_PROVIDERS_ELEMENT =
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProvisioningTestUtil.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProvisioningTestUtil.java
index 2d22cd5..10fcd7b 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProvisioningTestUtil.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProvisioningTestUtil.java
@@ -45,7 +45,7 @@
      * These are constants used to generate predefined OsuProvider.
      */
     public static final WifiSsid TEST_SSID =
-            WifiSsid.fromBytes("TEST SSID".getBytes(StandardCharsets.UTF_8));
+            WifiSsid.createFromByteArray("TEST SSID".getBytes(StandardCharsets.UTF_8));
     public static final String TEST_FRIENDLY_NAME = "Friendly Name";
     public static final String TEST_SERVICE_DESCRIPTION = "Dummy Service";
     public static final Uri TEST_SERVER_URI = Uri.parse("https://test.com");
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointXmlUtilsTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointXmlUtilsTest.java
index af8138a..3ca9d57 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointXmlUtilsTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointXmlUtilsTest.java
@@ -23,7 +23,6 @@
 import android.net.wifi.hotspot2.pps.HomeSp;
 import android.net.wifi.hotspot2.pps.Policy;
 import android.net.wifi.hotspot2.pps.UpdateParameter;
-import android.os.ParcelUuid;
 import android.util.Xml;
 
 import androidx.test.filters.SmallTest;
@@ -34,6 +33,7 @@
 
 import org.junit.Test;
 import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlSerializer;
 
 import java.io.ByteArrayInputStream;
@@ -56,8 +56,6 @@
     private static final int TEST_CARRIER_ID = 129;
     private static final int TEST_SUBSCRIPTION_ID = 1;
     private static final String TEST_DECORATED_IDENTITY_PREFIX = "androidwifi.dev!";
-    private static final ParcelUuid GROUP_UUID = ParcelUuid
-            .fromString("0000110B-0000-1000-8000-00805F9B34FB");
 
     /**
      * Helper function for generating a {@link PasspointConfiguration} for testing the XML
@@ -185,15 +183,11 @@
         config.setOemPrivate(true);
         config.setCarrierId(TEST_CARRIER_ID);
         config.setSubscriptionId(TEST_SUBSCRIPTION_ID);
-        config.setSubscriptionGroup(GROUP_UUID);
 
         // Extensions
         if (SdkLevel.isAtLeastS()) {
             config.setDecoratedIdentityPrefix(TEST_DECORATED_IDENTITY_PREFIX);
         }
-
-        String[] aaaServerTrustedNames = new String[] {"www.google.com", "www.android.com"};
-        config.setAaaServerTrustedNames(aaaServerTrustedNames);
         return config;
     }
 
@@ -248,32 +242,19 @@
     }
 
     /**
-     * Verify that a XmlPullParserException will be not thrown when deserialize a XML block
+     * Verify that a XmlPullParserException will be thrown when deserialize a XML block
      * for a PasspointConfiguraiton containing an unknown tag.
      *
      * @throws Exception
      */
-    @Test
+    @Test(expected = XmlPullParserException.class)
     public void deserializePasspointConfigurationWithUnknownTag() throws Exception {
-        String xmlStr = "<boolean name=\"AutoJoinEnabled\" value=\"true\" />\n"
-                + "<UnknownTag></UnknownTag>\n"
-                + "<HomeSP>\n"
-                + "<string name=\"FQDN\">www.xyz.com</string>\n"
-                + "<string name=\"unknown\">xxx</string>\n"
-                + "<string name=\"FriendlyName\">XYZ</string>\n"
-                + "</HomeSP>\n";
-        PasspointConfiguration expectedConfig = new PasspointConfiguration();
-        expectedConfig.setAutojoinEnabled(true);
-        HomeSp homeSp = new HomeSp();
-        homeSp.setFqdn("www.xyz.com");
-        homeSp.setFriendlyName("XYZ");
-        expectedConfig.setHomeSp(homeSp);
-
+        String xmlStr = "<UnknownTag>\n"
+                + "</UnknownTag>\n";
         final XmlPullParser in = Xml.newPullParser();
         final ByteArrayInputStream inputStream =
                 new ByteArrayInputStream(xmlStr.getBytes(StandardCharsets.UTF_8));
         in.setInput(inputStream, StandardCharsets.UTF_8.name());
-        assertEquals(expectedConfig,
-                PasspointXmlUtils.deserializePasspointConfiguration(in, in.getDepth()));
+        PasspointXmlUtils.deserializePasspointConfiguration(in, in.getDepth());
     }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ANQPParserTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ANQPParserTest.java
index 044330d..2aabcaa 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ANQPParserTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/ANQPParserTest.java
@@ -497,7 +497,7 @@
         byte[] data = getHSOsuProvidersPayload(osuSsidBytes);
 
         HSOsuProvidersElement expected = new HSOsuProvidersElement(
-                WifiSsid.fromBytes(osuSsidBytes),
+                WifiSsid.createFromByteArray(osuSsidBytes),
                 Arrays.asList(OsuProviderInfoTestUtil.TEST_OSU_PROVIDER_INFO));
 
         ByteBuffer buffer = ByteBuffer.wrap(data);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/HSOsuProvidersElementTest.java b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/HSOsuProvidersElementTest.java
index dc8a26f..dfb5abe 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/HSOsuProvidersElementTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/HSOsuProvidersElementTest.java
@@ -42,7 +42,7 @@
 public class HSOsuProvidersElementTest extends WifiBaseTest {
     private static final byte[] TEST_OSU_SSID_BYTES = "Test SSID".getBytes(StandardCharsets.UTF_8);
     private static final WifiSsid TEST_OSU_SSID =
-            WifiSsid.fromBytes(TEST_OSU_SSID_BYTES);
+            WifiSsid.createFromByteArray(TEST_OSU_SSID_BYTES);
     private static final List<OsuProviderInfo> TEST_PROVIDER_LIST =
             Arrays.asList(OsuProviderInfoTestUtil.TEST_OSU_PROVIDER_INFO);
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackAidlImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackAidlImplTest.java
deleted file mode 100644
index 7a95a41..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackAidlImplTest.java
+++ /dev/null
@@ -1,819 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi.p2p;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import android.app.test.MockAnswerUtil.AnswerWithArguments;
-import android.hardware.wifi.supplicant.P2pProvDiscStatusCode;
-import android.hardware.wifi.supplicant.P2pStatusCode;
-import android.hardware.wifi.supplicant.WpsConfigMethods;
-import android.hardware.wifi.supplicant.WpsDevPasswordId;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WpsInfo;
-import android.net.wifi.p2p.WifiP2pConfig;
-import android.net.wifi.p2p.WifiP2pDevice;
-import android.net.wifi.p2p.WifiP2pGroup;
-import android.net.wifi.p2p.WifiP2pProvDiscEvent;
-import android.net.wifi.p2p.nsd.WifiP2pServiceResponse;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.p2p.WifiP2pServiceImpl.P2pStatus;
-import com.android.server.wifi.util.NativeUtil;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.Arrays;;
-import java.util.HashSet;
-import java.util.List;
-
-/**
- * Unit tests for SupplicantP2pIfaceCallbackAidlImpl
- */
-@SmallTest
-public class SupplicantP2pIfaceCallbackAidlImplTest extends WifiBaseTest {
-    private String mIface = "test_p2p0";
-    private String mGroupIface = "test_p2p-p2p0-3";
-    private WifiP2pMonitor mMonitor;
-    private SupplicantP2pIfaceCallbackAidlImpl mDut;
-
-    private byte[] mDeviceAddressInvalid1 = { 0x00 };
-    private byte[] mDeviceAddressInvalid2 = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
-    private byte[] mDeviceAddress1Bytes = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 };
-    private String mDeviceAddress1String = "00:11:22:33:44:55";
-    private byte[] mDeviceAddress2Bytes = { 0x01, 0x12, 0x23, 0x34, 0x45, 0x56 };
-    private String mDeviceAddress2String = "01:12:23:34:45:56";
-    private byte[] mDeviceInfoBytes = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };
-    private static final byte[] DEVICE_ADDRESS = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };
-    private static final String DEVICE_ADDRESS_STR = "00:01:02:03:04:05";
-    private static final int TEST_NETWORK_ID = 9;
-    private static final int TEST_GROUP_FREQUENCY = 5400;
-    private byte[] mTestPrimaryDeviceTypeBytes = { 0x00, 0x01, 0x02, -1, 0x04, 0x05, 0x06, 0x07 };
-    private String mTestPrimaryDeviceTypeString = "1-02FF0405-1543";
-    private String mTestDeviceName = "test device name";
-    private short mTestConfigMethods = 0x1234;
-    private byte mTestCapabilities = 123;
-    private int mTestGroupCapabilities = 456;
-
-    private class SupplicantP2pIfaceCallbackImplSpy extends SupplicantP2pIfaceCallbackAidlImpl {
-        SupplicantP2pIfaceCallbackImplSpy(String iface, WifiP2pMonitor monitor) {
-            super(iface, monitor);
-        }
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mMonitor = mock(WifiP2pMonitor.class);
-        mDut = new SupplicantP2pIfaceCallbackImplSpy(mIface, mMonitor);
-    }
-
-    /**
-     * Sunny day scenario for onDeviceFound call.
-     */
-    @Test
-    public void testOnDeviceFound_success() throws Exception {
-        byte[] fakePrimaryDeviceTypeBytes = { 0x00, 0x01, 0x02, -1, 0x04, 0x05, 0x06, 0x07 };
-        String fakePrimaryDeviceTypeString = "1-02FF0405-1543";
-        String fakeDeviceName = "test device name";
-        short fakeConfigMethods = 0x1234;
-        byte fakeCapabilities = 123;
-        int fakeGroupCapabilities = 456;
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String iface, WifiP2pDevice device) {
-                // NOTE: mDeviceAddress1Bytes seems to be ignored by
-                // legacy implementation of WifiP2pDevice.
-                assertEquals(iface, mIface);
-                assertEquals(device.deviceName, fakeDeviceName);
-                assertEquals(device.primaryDeviceType, fakePrimaryDeviceTypeString);
-                assertEquals(device.deviceCapability, fakeCapabilities);
-                assertEquals(device.groupCapability, fakeGroupCapabilities);
-                assertEquals(device.wpsConfigMethodsSupported, fakeConfigMethods);
-                assertEquals(device.deviceAddress, mDeviceAddress2String);
-                assertEquals(device.status, WifiP2pDevice.AVAILABLE);
-            }
-        }).when(mMonitor).broadcastP2pDeviceFound(
-                anyString(), any(WifiP2pDevice.class));
-
-        mDut.onDeviceFound(
-                mDeviceAddress1Bytes, mDeviceAddress2Bytes,
-                fakePrimaryDeviceTypeBytes,
-                fakeDeviceName, fakeConfigMethods,
-                fakeCapabilities, fakeGroupCapabilities,
-                mDeviceInfoBytes);
-
-        mDut.onDeviceFound(
-                mDeviceAddress1Bytes, mDeviceAddress2Bytes,
-                fakePrimaryDeviceTypeBytes,
-                fakeDeviceName, fakeConfigMethods,
-                fakeCapabilities, fakeGroupCapabilities,
-                null);
-
-        // Make sure we issued a broadcast each time.
-        verify(mMonitor, times(2)).broadcastP2pDeviceFound(
-                anyString(), any(WifiP2pDevice.class));
-    }
-
-    /**
-     * Sunny day scenario for onDeviceFound call with sign bit set in bytes.
-     */
-    @Test
-    public void testOnDeviceFoundWithSignBitInDeviceInfoBytesSuccess() throws Exception {
-        byte[] fakePrimaryDeviceTypeBytes = { 0x00, 0x01, 0x02, -1, 0x04, 0x05, 0x06, 0x07 };
-        String fakePrimaryDeviceTypeString = "1-02FF0405-1543";
-        String fakeDeviceName = "test device name";
-        short fakeConfigMethods = 0x1234;
-        byte fakeCapabilities = 123;
-        int fakeGroupCapabilities = 456;
-        byte[] fakeDevInfoBytes = { (byte) 0x80, 0x01, (byte) 0xC0, 0x03, (byte) 0xFF, 0x05 };
-
-        mDut.onDeviceFound(
-                mDeviceAddress1Bytes, mDeviceAddress2Bytes,
-                fakePrimaryDeviceTypeBytes,
-                fakeDeviceName, fakeConfigMethods,
-                fakeCapabilities, fakeGroupCapabilities,
-                fakeDevInfoBytes);
-
-        ArgumentCaptor<WifiP2pDevice> deviceCaptor = ArgumentCaptor.forClass(WifiP2pDevice.class);
-        verify(mMonitor).broadcastP2pDeviceFound(eq(mIface), deviceCaptor.capture());
-
-        WifiP2pDevice device = deviceCaptor.getValue();
-        assertEquals(fakeDeviceName, device.deviceName);
-        assertEquals(fakePrimaryDeviceTypeString, device.primaryDeviceType);
-        assertEquals(fakeCapabilities, device.deviceCapability);
-        assertEquals(fakeGroupCapabilities, device.groupCapability);
-        assertEquals(fakeConfigMethods, device.wpsConfigMethodsSupported);
-        assertEquals(mDeviceAddress2String, device.deviceAddress);
-        assertEquals(WifiP2pDevice.AVAILABLE, device.status);
-
-        assertNotNull(device.wfdInfo);
-        // WifiP2pWfdInfo.mDeviceInfo won't be returned as the raw value, skip it.
-        assertEquals(((fakeDevInfoBytes[2] & 0xFF) << 8) + fakeDevInfoBytes[3],
-                device.wfdInfo.getControlPort());
-        assertEquals(((fakeDevInfoBytes[4] & 0xFF) << 8) + fakeDevInfoBytes[5],
-                device.wfdInfo.getMaxThroughput());
-
-        // Make sure we issued a broadcast each time.
-        verify(mMonitor).broadcastP2pDeviceFound(
-                anyString(), any(WifiP2pDevice.class));
-    }
-
-    /**
-     * Failing scenarios for onDeviceFound call.
-     */
-    @Test
-    public void testOnDeviceFound_invalidArguments() throws Exception {
-        byte[] fakePrimaryDeviceTypeBytes = { 0x0, 0x01, 0x02, -1, 0x04, 0x05, 0x06, 0x07 };
-        String fakeDeviceName = "test device name";
-        short fakeConfigMethods = 0x1234;
-        byte fakeCapabilities = 123;
-        int fakeGroupCapabilities = 456;
-
-        mDut.onDeviceFound(
-                mDeviceAddress2Bytes, null,
-                fakePrimaryDeviceTypeBytes,
-                fakeDeviceName, fakeConfigMethods,
-                fakeCapabilities, fakeGroupCapabilities,
-                mDeviceInfoBytes);
-        verify(mMonitor, never()).broadcastP2pDeviceFound(
-                anyString(), any(WifiP2pDevice.class));
-
-        mDut.onDeviceFound(
-                mDeviceAddress1Bytes, mDeviceAddress2Bytes,
-                null,
-                fakeDeviceName, fakeConfigMethods,
-                fakeCapabilities, fakeGroupCapabilities,
-                mDeviceInfoBytes);
-        verify(mMonitor, never()).broadcastP2pDeviceFound(
-                anyString(), any(WifiP2pDevice.class));
-
-        mDut.onDeviceFound(
-                mDeviceAddress1Bytes, mDeviceAddress2Bytes,
-                fakePrimaryDeviceTypeBytes,
-                null, fakeConfigMethods,
-                fakeCapabilities, fakeGroupCapabilities,
-                mDeviceInfoBytes);
-        verify(mMonitor, never()).broadcastP2pDeviceFound(
-                anyString(), any(WifiP2pDevice.class));
-
-        mDut.onDeviceFound(
-                mDeviceAddress1Bytes, mDeviceAddressInvalid1,
-                fakePrimaryDeviceTypeBytes,
-                null, fakeConfigMethods,
-                fakeCapabilities, fakeGroupCapabilities,
-                mDeviceInfoBytes);
-        verify(mMonitor, never()).broadcastP2pDeviceFound(
-                anyString(), any(WifiP2pDevice.class));
-
-        mDut.onDeviceFound(
-                mDeviceAddress1Bytes, mDeviceAddressInvalid2,
-                fakePrimaryDeviceTypeBytes,
-                null, fakeConfigMethods,
-                fakeCapabilities, fakeGroupCapabilities,
-                mDeviceInfoBytes);
-        verify(mMonitor, never()).broadcastP2pDeviceFound(
-                anyString(), any(WifiP2pDevice.class));
-    }
-
-    /**
-     * Sunny day scenario for onDeviceLost call.
-     */
-    @Test
-    public void testOnDeviceLost_success() throws Exception {
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String iface, WifiP2pDevice device) {
-                assertEquals(iface, mIface);
-                assertEquals(device.deviceAddress, mDeviceAddress1String);
-                assertEquals(device.status, WifiP2pDevice.UNAVAILABLE);
-            }
-        }).when(mMonitor).broadcastP2pDeviceLost(
-                anyString(), any(WifiP2pDevice.class));
-
-        mDut.onDeviceLost(mDeviceAddress1Bytes);
-
-        // Make sure we issued a broadcast each time.
-        verify(mMonitor, times(1)).broadcastP2pDeviceLost(
-                anyString(), any(WifiP2pDevice.class));
-    }
-
-    /**
-     * Failing scenarios for onDeviceLost call.
-     */
-    @Test
-    public void testOnDeviceLost_invalidArguments() throws Exception {
-        mDut.onDeviceLost(null);
-        verify(mMonitor, never()).broadcastP2pDeviceLost(
-                anyString(), any(WifiP2pDevice.class));
-
-        mDut.onDeviceLost(mDeviceAddressInvalid1);
-        verify(mMonitor, never()).broadcastP2pDeviceLost(
-                anyString(), any(WifiP2pDevice.class));
-
-        mDut.onDeviceLost(mDeviceAddressInvalid2);
-        verify(mMonitor, never()).broadcastP2pDeviceLost(
-                anyString(), any(WifiP2pDevice.class));
-    }
-
-    /**
-     * Sunny day scenario for onGoNegotiationRequest call.
-     */
-    @Test
-    public void testOnGoNegotiationRequest_success() throws Exception {
-        HashSet<Integer> setups = new HashSet<Integer>();
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String iface, WifiP2pConfig config) {
-                assertEquals(iface, mIface);
-                assertNotNull(config.wps);
-                setups.add(config.wps.setup);
-                assertEquals(config.deviceAddress, mDeviceAddress1String);
-            }
-        }).when(mMonitor).broadcastP2pGoNegotiationRequest(
-                anyString(), any(WifiP2pConfig.class));
-
-        mDut.onGoNegotiationRequest(mDeviceAddress1Bytes, WpsDevPasswordId.USER_SPECIFIED);
-        assertTrue(setups.contains(WpsInfo.DISPLAY));
-
-        mDut.onGoNegotiationRequest(mDeviceAddress1Bytes, WpsDevPasswordId.PUSHBUTTON);
-        assertTrue(setups.contains(WpsInfo.PBC));
-
-        mDut.onGoNegotiationRequest(mDeviceAddress1Bytes, WpsDevPasswordId.REGISTRAR_SPECIFIED);
-        assertTrue(setups.contains(WpsInfo.KEYPAD));
-
-        // Invalid should default to PBC
-        setups.clear();
-        mDut.onGoNegotiationRequest(mDeviceAddress1Bytes, 0xffff);
-        assertTrue(setups.contains(WpsInfo.PBC));
-    }
-
-    /**
-     * Failing scenarios for onGoNegotiationRequest call.
-     */
-    @Test
-    public void testOnGoNegotiationRequest_invalidArguments() throws Exception {
-        mDut.onGoNegotiationRequest(null, 0);
-        verify(mMonitor, never()).broadcastP2pDeviceLost(
-                anyString(), any(WifiP2pDevice.class));
-
-        mDut.onGoNegotiationRequest(mDeviceAddressInvalid1, 0);
-        verify(mMonitor, never()).broadcastP2pDeviceLost(
-                anyString(), any(WifiP2pDevice.class));
-
-        mDut.onGoNegotiationRequest(mDeviceAddressInvalid2, 0);
-        verify(mMonitor, never()).broadcastP2pDeviceLost(
-                anyString(), any(WifiP2pDevice.class));
-    }
-
-    /**
-     * Sunny day scenario for onGroupStarted call.
-     */
-    @Test
-    public void testOnGroupStarted_success() throws Exception {
-        String fakeName = "group name";
-        String fakePassphrase = "secret";
-        byte[] fakeSsidBytesList = new byte[] {0x30, 0x31, 0x32, 0x33};
-        String fakeSsidString = "0123";
-        HashSet<String> passwords = new HashSet<String>();
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String iface, WifiP2pGroup group) {
-                assertEquals(iface, mIface);
-                assertNotNull(group.getOwner());
-                assertEquals(group.getOwner().deviceAddress, mDeviceAddress1String);
-                assertEquals(group.getNetworkId(), WifiP2pGroup.NETWORK_ID_PERSISTENT);
-                passwords.add(group.getPassphrase());
-                assertEquals(group.getInterface(), fakeName);
-                assertEquals(group.getNetworkName(), fakeSsidString);
-            }
-        }).when(mMonitor).broadcastP2pGroupStarted(
-                anyString(), any(WifiP2pGroup.class));
-
-        mDut.onGroupStarted(
-                fakeName, true, fakeSsidBytesList, 1, null, fakePassphrase,
-                mDeviceAddress1Bytes, true);
-        assertTrue(passwords.contains(fakePassphrase));
-
-        mDut.onGroupStarted(
-                fakeName, true, fakeSsidBytesList, 1, null, null,
-                mDeviceAddress1Bytes, true);
-        assertTrue(passwords.contains(null));
-
-        verify(mMonitor, times(2)).broadcastP2pGroupStarted(
-                anyString(), any(WifiP2pGroup.class));
-    }
-
-    /**
-     * Failing scenarios for onGroupStarted call.
-     */
-    @Test
-    public void testOnGroupStarted_invalidArguments() throws Exception {
-        String fakeName = "group name";
-        String fakePassphrase = "secret";
-        byte[] fakeSsidBytesList = new byte[] {0x30, 0x31, 0x32, 0x33};
-
-        mDut.onGroupStarted(
-                null, true, fakeSsidBytesList, 1, null, fakePassphrase,
-                mDeviceAddress1Bytes, true);
-        verify(mMonitor, never()).broadcastP2pGroupStarted(
-                anyString(), any(WifiP2pGroup.class));
-
-        mDut.onGroupStarted(
-                fakeName, true, null, 1, null, fakePassphrase,
-                mDeviceAddress1Bytes, true);
-        verify(mMonitor, never()).broadcastP2pGroupStarted(
-                anyString(), any(WifiP2pGroup.class));
-
-        mDut.onGroupStarted(
-                fakeName, true, fakeSsidBytesList, 1, null, fakePassphrase,
-                null, true);
-        verify(mMonitor, never()).broadcastP2pGroupStarted(
-                anyString(), any(WifiP2pGroup.class));
-    }
-
-    /**
-     * Test provision discovery callback.
-     */
-    @Test
-    public void testOnProvisionDiscoveryCompleted() throws Exception {
-        byte[] p2pDeviceAddr = DEVICE_ADDRESS;
-        boolean isRequest = false;
-        byte status = P2pProvDiscStatusCode.SUCCESS;
-        short configMethods = WpsConfigMethods.DISPLAY;
-        String generatedPin = "12345678";
-
-        ArgumentCaptor<WifiP2pProvDiscEvent> discEventCaptor =
-                ArgumentCaptor.forClass(WifiP2pProvDiscEvent.class);
-        mDut.onProvisionDiscoveryCompleted(
-                p2pDeviceAddr, isRequest, status, configMethods, generatedPin);
-        verify(mMonitor).broadcastP2pProvisionDiscoveryEnterPin(
-                anyString(), discEventCaptor.capture());
-        assertEquals(WifiP2pProvDiscEvent.ENTER_PIN, discEventCaptor.getValue().event);
-
-        configMethods = WpsConfigMethods.KEYPAD;
-        mDut.onProvisionDiscoveryCompleted(
-                p2pDeviceAddr, isRequest, status, configMethods, generatedPin);
-        verify(mMonitor).broadcastP2pProvisionDiscoveryShowPin(
-                anyString(), discEventCaptor.capture());
-        assertEquals(WifiP2pProvDiscEvent.SHOW_PIN, discEventCaptor.getValue().event);
-        assertEquals(generatedPin, discEventCaptor.getValue().pin);
-
-        isRequest = true;
-        configMethods = WpsConfigMethods.KEYPAD;
-        mDut.onProvisionDiscoveryCompleted(
-                p2pDeviceAddr, isRequest, status, configMethods, generatedPin);
-        verify(mMonitor, times(2)).broadcastP2pProvisionDiscoveryEnterPin(
-                anyString(), discEventCaptor.capture());
-        assertEquals(WifiP2pProvDiscEvent.ENTER_PIN, discEventCaptor.getValue().event);
-
-        configMethods = WpsConfigMethods.DISPLAY;
-        mDut.onProvisionDiscoveryCompleted(
-                p2pDeviceAddr, isRequest, status, configMethods, generatedPin);
-        verify(mMonitor, times(2)).broadcastP2pProvisionDiscoveryShowPin(
-                anyString(), discEventCaptor.capture());
-        assertEquals(WifiP2pProvDiscEvent.SHOW_PIN, discEventCaptor.getValue().event);
-        assertEquals(generatedPin, discEventCaptor.getValue().pin);
-
-        isRequest = false;
-        configMethods = WpsConfigMethods.PUSHBUTTON;
-        mDut.onProvisionDiscoveryCompleted(
-                p2pDeviceAddr, isRequest, status, configMethods, generatedPin);
-        verify(mMonitor).broadcastP2pProvisionDiscoveryPbcResponse(
-                anyString(), discEventCaptor.capture());
-        assertEquals(WifiP2pProvDiscEvent.PBC_RSP, discEventCaptor.getValue().event);
-
-        isRequest = true;
-        mDut.onProvisionDiscoveryCompleted(
-                p2pDeviceAddr, isRequest, status, configMethods, generatedPin);
-        verify(mMonitor).broadcastP2pProvisionDiscoveryPbcRequest(
-                anyString(), discEventCaptor.capture());
-        assertEquals(WifiP2pProvDiscEvent.PBC_REQ, discEventCaptor.getValue().event);
-    }
-
-    private void verifyProvisionDiscoveryFailureEvent(
-            int halStatus, int expectedStatus) throws Exception {
-        byte[] p2pDeviceAddr = DEVICE_ADDRESS;
-        boolean isRequest = false;
-        byte status = (byte) halStatus;
-        short configMethods = WpsConfigMethods.DISPLAY;
-        String generatedPin = "12345678";
-
-        ArgumentCaptor<WifiP2pProvDiscEvent> discEventCaptor =
-                ArgumentCaptor.forClass(WifiP2pProvDiscEvent.class);
-        mDut.onProvisionDiscoveryCompleted(
-                p2pDeviceAddr, isRequest, status, configMethods, generatedPin);
-        verify(mMonitor).broadcastP2pProvisionDiscoveryFailure(eq(mIface),
-                eq(expectedStatus), discEventCaptor.capture());
-        WifiP2pProvDiscEvent event = discEventCaptor.getValue();
-        assertEquals(DEVICE_ADDRESS_STR, event.device.deviceAddress);
-    }
-
-    /**
-     * Test provision discovery callback for timeout.
-     */
-    @Test
-    public void testOnProvisionDiscoveryTimeout() throws Exception {
-        verifyProvisionDiscoveryFailureEvent(
-                P2pProvDiscStatusCode.TIMEOUT,
-                WifiP2pMonitor.PROV_DISC_STATUS_TIMEOUT);
-    }
-
-    /**
-     * Test provision discovery callback for rejection.
-     */
-    @Test
-    public void testOnProvisionDiscoveryRejection() throws Exception {
-        verifyProvisionDiscoveryFailureEvent(
-                P2pProvDiscStatusCode.REJECTED,
-                WifiP2pMonitor.PROV_DISC_STATUS_REJECTED);
-    }
-
-    /**
-     * Test provision discovery callback for joining timeout.
-     */
-    @Test
-    public void testOnProvisionDiscoveryJoinTimeout() throws Exception {
-        verifyProvisionDiscoveryFailureEvent(
-                P2pProvDiscStatusCode.TIMEOUT_JOIN,
-                WifiP2pMonitor.PROV_DISC_STATUS_TIMEOUT_JOIN);
-    }
-
-    /**
-     * Test provision discovery callback for information unavailable
-     */
-    @Test
-    public void testOnProvisionDiscoveryInfoUnavailable() throws Exception {
-        verifyProvisionDiscoveryFailureEvent(
-                P2pProvDiscStatusCode.INFO_UNAVAILABLE,
-                WifiP2pMonitor.PROV_DISC_STATUS_INFO_UNAVAILABLE);
-    }
-
-    /**
-     * Test staAuth with device address, should trigger ApStaConnected broadcast
-     */
-    @Test
-    public void testStaAuth_success() {
-        // Trigger onStaAuthorized callback, ensure wifimonitor broadcast is sent with WifiP2pDevice
-        // using the p2pDeviceAddress
-        ArgumentCaptor<WifiP2pDevice> p2pDeviceCaptor =
-                ArgumentCaptor.forClass(WifiP2pDevice.class);
-        mDut.onStaAuthorized(mDeviceAddress1Bytes, mDeviceAddress2Bytes);
-        verify(mMonitor).broadcastP2pApStaConnected(any(String.class), p2pDeviceCaptor.capture());
-        assertEquals(mDeviceAddress2String, p2pDeviceCaptor.getValue().deviceAddress);
-    }
-
-    /**
-     * Test staAuth without device address, should trigger ApStaConnected broadcast using srcAddress
-     */
-    @Test
-    public void testStaAuth_noDeviceAddress_success() {
-        // Trigger onStaAuthorized callback, using a zero'd p2pDeviceAddress, ensure wifimonitor
-        // broadcast is sent with WifiP2pDevice using the srcAddress
-        ArgumentCaptor<WifiP2pDevice> p2pDeviceCaptor =
-                ArgumentCaptor.forClass(WifiP2pDevice.class);
-        mDut.onStaAuthorized(mDeviceAddress1Bytes, NativeUtil.ANY_MAC_BYTES);
-        verify(mMonitor).broadcastP2pApStaConnected(any(String.class), p2pDeviceCaptor.capture());
-        assertEquals(mDeviceAddress1String, p2pDeviceCaptor.getValue().deviceAddress);
-    }
-
-    // TLVS hex data encoded as a hex string.
-    // Taken directly from an observed supplicant service response event
-    private static final String SERV_DISC_RESP_TLVS = "1d00010100076578616d706c650b5f6166706f766572"
-            + "746370c00c001001001e000101000b5f6166706f766572746370c00c000c01074578616d706c65c0273c"
-            + "00010100096d797072696e746572045f697070c00c00100109747874766572733d311a70646c3d617070"
-            + "6c69636174696f6e2f706f73747363726970741900010100045f697070c00c000c01094d795072696e74"
-            + "6572c0275f000201000a757569643a36383539646564652d383537342d353961622d393333322d313233"
-            + "3435363738393031313a3a75726e3a736368656d61732d75706e702d6f72673a736572766963653a436f"
-            + "6e6e656374696f6e4d616e616765723a3159000201000a757569643a36383539646564652d383537342d"
-            + "353961622d393333322d3132333435363738393031313a3a75726e3a736368656d61732d75706e702d6f"
-            + "72673a736572766963653a41565472616e73706f72743a315a000201000a757569643a36383539646564"
-            + "652d383537342d353961622d393333322d3132333435363738393031313a3a75726e3a736368656d6173"
-            + "2d75706e702d6f72673a6465766963653a4d6564696152656e64657265723a313e000201000a75756964"
-            + "3a36383539646564652d383537342d353961622d393333322d3132333435363738393031313a3a75706e"
-            + "703a726f6f746465766963652d000201000a757569643a36383539646564652d383537342d353961622d"
-            + "393333322d313233343536373839303131";
-
-    /**
-     * Pretty basic onServiceDiscoveryResponse callback test.
-     * Mocks the callback event, passing some observed real data to it, and ensures that it returns
-     * a non-null WifiP2pServiceResponse list.
-     */
-    @Test
-    public void testOnServiceDiscoveryResponseCompleted_success() throws Exception {
-        byte[] tlvs = hexStr2Bin(SERV_DISC_RESP_TLVS);
-        ArgumentCaptor<List<WifiP2pServiceResponse>> respListCaptor =
-                ArgumentCaptor.forClass(List.class);
-        mDut.onServiceDiscoveryResponse(
-                mDeviceAddress1Bytes,
-                (char) 10 /* unused updateIndicator value */,
-                tlvs);
-        verify(mMonitor).broadcastP2pServiceDiscoveryResponse(anyString(),
-                respListCaptor.capture());
-        assertNotNull(respListCaptor.getValue());
-        assertNotNull(respListCaptor.getValue());
-    }
-
-    /**
-     * Test onFindStopped event should trigger P2pFindStopped broadcast.
-     */
-    @Test
-    public void testOnFindStopped() {
-        mDut.onFindStopped();
-        verify(mMonitor).broadcastP2pFindStopped(eq(mIface));
-    }
-
-    /**
-     * Test onGoNegotiationCompleted sunny case.
-     */
-    @Test
-    public void testOnGoNegotiationCompletedSuccess() {
-        mDut.onGoNegotiationCompleted(P2pStatusCode.SUCCESS);
-        verify(mMonitor).broadcastP2pGoNegotiationSuccess(eq(mIface));
-    }
-
-    /**
-     * Test onGoNegotiationCompleted failure cases.
-     */
-    @Test
-    public void testOnGoNegotiationCompletedFailureUnavailable() {
-        mDut.onGoNegotiationCompleted(P2pStatusCode.FAIL_INFO_CURRENTLY_UNAVAILABLE);
-        verify(mMonitor).broadcastP2pGoNegotiationFailure(
-                eq(mIface), eq(P2pStatus.INFORMATION_IS_CURRENTLY_UNAVAILABLE));
-    }
-
-    /**
-     * Test onGroupFormationSuccess should trigger P2pGroupFormationSuccess broadcast.
-     */
-    @Test
-    public void testOnGroupFormationSuccess() {
-        mDut.onGroupFormationSuccess();
-        verify(mMonitor).broadcastP2pGroupFormationSuccess(eq(mIface));
-    }
-
-    /**
-     * Test onGroupFormationFailure should trigger P2pGroupFormationFailure broadcast.
-     */
-    @Test
-    public void testOnGroupFormationFailure() {
-        mDut.onGroupFormationFailure("failure-reason");
-        verify(mMonitor).broadcastP2pGroupFormationFailure(eq(mIface), eq("failure-reason"));
-    }
-
-    /**
-     * Test onGroupRemoved should trigger P2pGroupRemoved broadcast for Group Owner.
-     */
-    @Test
-    public void testOnGroupRemovedForGroupOwner() {
-        mDut.onGroupRemoved(mGroupIface, true);
-        ArgumentCaptor<WifiP2pGroup> groupCaptor = ArgumentCaptor.forClass(WifiP2pGroup.class);
-        verify(mMonitor).broadcastP2pGroupRemoved(eq(mIface), groupCaptor.capture());
-        assertEquals(mGroupIface, groupCaptor.getValue().getInterface());
-        assertEquals(true, groupCaptor.getValue().isGroupOwner());
-    }
-
-    /**
-     * Test onGroupRemoved should trigger P2pGroupRemoved broadcast for Group Client.
-     */
-    @Test
-    public void testOnGroupRemovedForGroupClient() {
-        mDut.onGroupRemoved(mGroupIface, false);
-
-        ArgumentCaptor<WifiP2pGroup> groupCaptor = ArgumentCaptor.forClass(WifiP2pGroup.class);
-        verify(mMonitor).broadcastP2pGroupRemoved(eq(mIface), groupCaptor.capture());
-        assertEquals(mGroupIface, groupCaptor.getValue().getInterface());
-        assertEquals(false, groupCaptor.getValue().isGroupOwner());
-    }
-
-    /**
-     * Test onInvitationReceived should trigger P2pInvitationReceived broadcast.
-     */
-    @Test
-    public void testOnInvitationReceived() {
-        mDut.onInvitationReceived(
-                mDeviceAddress1Bytes,
-                mDeviceAddress2Bytes,
-                DEVICE_ADDRESS,
-                TEST_NETWORK_ID,
-                TEST_GROUP_FREQUENCY);
-
-        ArgumentCaptor<WifiP2pGroup> groupCaptor = ArgumentCaptor.forClass(WifiP2pGroup.class);
-        verify(mMonitor).broadcastP2pInvitationReceived(eq(mIface), groupCaptor.capture());
-
-        WifiP2pGroup group = groupCaptor.getValue();
-        assertEquals(TEST_NETWORK_ID, group.getNetworkId());
-        assertEquals(mDeviceAddress2String, group.getOwner().deviceAddress);
-    }
-
-    /**
-     * Test onInvitationResult should trigger P2pInvitationResult broadcast.
-     */
-    @Test
-    public void testOnInvitationResult() {
-        mDut.onInvitationResult(mDeviceAddress1Bytes, P2pStatusCode.SUCCESS);
-        verify(mMonitor).broadcastP2pInvitationResult(eq(mIface), eq(P2pStatus.SUCCESS));
-    }
-
-    /**
-     * Test onStaDeauthorized should trigger P2pApStaDisconnected broadcast.
-     */
-    @Test
-    public void testOnStaDeauthorized() {
-        mDut.onStaDeauthorized(mDeviceAddress1Bytes, mDeviceAddress2Bytes);
-
-        ArgumentCaptor<WifiP2pDevice> p2pDeviceCaptor =
-                ArgumentCaptor.forClass(WifiP2pDevice.class);
-        verify(mMonitor).broadcastP2pApStaDisconnected(eq(mIface), p2pDeviceCaptor.capture());
-        assertEquals(mDeviceAddress2String, p2pDeviceCaptor.getValue().deviceAddress);
-    }
-
-    /**
-     * Test the sunny case of onDeviceFoundWithVendorElements.
-     */
-    @Test
-    public void testOnDeviceFoundWithVendorElements() throws Exception {
-        byte[] testVsieBytes = {
-                (byte) ScanResult.InformationElement.EID_VSA, 4, 0x1, 0x2, 0x3, 0x0,
-                (byte) ScanResult.InformationElement.EID_VSA, 4, 0x1, 0x2, 0x3, 0x1};
-        ArrayList<ScanResult.InformationElement> expectedVsieList = new ArrayList<>();
-        expectedVsieList.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_VSA, 0, new byte[]{0x1, 0x2, 0x3, 0x0}));
-        expectedVsieList.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_VSA, 0, new byte[]{0x1, 0x2, 0x3, 0x1}));
-        mDut.onDeviceFoundWithVendorElements(
-                mDeviceAddress1Bytes, mDeviceAddress2Bytes,
-                mTestPrimaryDeviceTypeBytes,
-                mTestDeviceName, mTestConfigMethods,
-                mTestCapabilities, mTestGroupCapabilities,
-                mDeviceInfoBytes, null, testVsieBytes);
-        ArgumentCaptor<WifiP2pDevice> p2pDeviceCaptor =
-                ArgumentCaptor.forClass(WifiP2pDevice.class);
-        verify(mMonitor).broadcastP2pDeviceFound(eq(mIface), p2pDeviceCaptor.capture());
-
-        assertInformationElementListEquals(
-                expectedVsieList, p2pDeviceCaptor.getValue().getVendorElements());
-    }
-
-    /**
-     * Test onDeviceFoundWithVendorElements with non-vendor specific information elements.
-     */
-    @Test
-    public void testOnDeviceFoundWithVendorElementsWithNonVsie() throws Exception {
-        byte[] testVsieBytes = {
-                ScanResult.InformationElement.EID_SSID, 4, 0x1, 0x2, 0x3, 0x0,
-                (byte) ScanResult.InformationElement.EID_VSA, 4, 0x1, 0x2, 0x3, 0x1};
-        // The first non-vendor specific ie is omitted.
-        ArrayList<ScanResult.InformationElement> expectedVsieList = new ArrayList<>();
-        expectedVsieList.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_VSA, 0, new byte[]{0x1, 0x2, 0x3, 0x1}));
-
-        mDut.onDeviceFoundWithVendorElements(
-                mDeviceAddress1Bytes, mDeviceAddress2Bytes,
-                mTestPrimaryDeviceTypeBytes,
-                mTestDeviceName, mTestConfigMethods,
-                mTestCapabilities, mTestGroupCapabilities,
-                mDeviceInfoBytes, null, testVsieBytes);
-        ArgumentCaptor<WifiP2pDevice> p2pDeviceCaptor =
-                ArgumentCaptor.forClass(WifiP2pDevice.class);
-        verify(mMonitor).broadcastP2pDeviceFound(eq(mIface), p2pDeviceCaptor.capture());
-
-        assertInformationElementListEquals(
-                expectedVsieList, p2pDeviceCaptor.getValue().getVendorElements());
-    }
-
-    /**
-     * Test onDeviceFoundWithVendorElements with malformed specific information elements.
-     */
-    @Test
-    public void testOnDeviceFoundWithVendorElementsWithMalformedVsie() throws Exception {
-        byte[] testVsieBytes = {
-                (byte) (byte) ScanResult.InformationElement.EID_VSA, 4, 0x1, 0x2, 0x3, 0x0,
-                (byte) (byte) ScanResult.InformationElement.EID_VSA, 4, 0x1, 0x2, 0x3, 0x1,
-                (byte) (byte) ScanResult.InformationElement.EID_VSA, 4, 0x1, 0x2, 0x3};
-        // The last one is omitted.
-        ArrayList<ScanResult.InformationElement> expectedVsieList = new ArrayList<>();
-        expectedVsieList.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_VSA, 0, new byte[]{0x1, 0x2, 0x3, 0x0}));
-        expectedVsieList.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_VSA, 0, new byte[]{0x1, 0x2, 0x3, 0x1}));
-
-        mDut.onDeviceFoundWithVendorElements(
-                mDeviceAddress1Bytes, mDeviceAddress2Bytes,
-                mTestPrimaryDeviceTypeBytes,
-                mTestDeviceName, mTestConfigMethods,
-                mTestCapabilities, mTestGroupCapabilities,
-                mDeviceInfoBytes, null, testVsieBytes);
-        ArgumentCaptor<WifiP2pDevice> p2pDeviceCaptor =
-                ArgumentCaptor.forClass(WifiP2pDevice.class);
-        verify(mMonitor).broadcastP2pDeviceFound(eq(mIface), p2pDeviceCaptor.capture());
-
-        assertInformationElementListEquals(
-                expectedVsieList, p2pDeviceCaptor.getValue().getVendorElements());
-    }
-
-    /**
-     * Helper function for comparing InformationElement lists.
-     *
-     * InformationElement equals() is implemented in S. List equals() cannot
-     * work in preS.
-     */
-    private void assertInformationElementListEquals(List<ScanResult.InformationElement> a,
-            List<ScanResult.InformationElement> b) {
-        assertNotNull(a);
-        assertNotNull(b);
-        assertEquals(a.size(), b.size());
-
-        for (int i = 0; i < a.size(); i++) {
-            assertEquals(a.get(i).id, b.get(i).id);
-            assertEquals(a.get(i).idExt, b.get(i).idExt);
-            assertTrue(Arrays.equals(a.get(i).bytes, b.get(i).bytes));
-        }
-    }
-
-    /**
-     * Converts hex string to byte array.
-     *
-     * @param hex hex string. if invalid, return null.
-     * @return binary data.
-     */
-    private static byte[] hexStr2Bin(String hex) {
-        int sz = hex.length() / 2;
-        byte[] b = new byte[hex.length() / 2];
-        for (int i = 0; i < sz; i++) {
-            try {
-                b[i] = (byte) Integer.parseInt(hex.substring(i * 2, i * 2 + 2), 16);
-            } catch (Exception e) {
-                return null;
-            }
-        }
-        return b;
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackHidlImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackImplTest.java
similarity index 90%
rename from service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackHidlImplTest.java
rename to service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackImplTest.java
index 2d65645..1a43d3a 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackHidlImplTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceCallbackImplTest.java
@@ -55,17 +55,17 @@
 import java.util.List;
 
 /**
- * Unit tests for SupplicantP2pIfaceCallbackHidlImpl
+ * Unit tests for SupplicantP2pIfaceCallback
  */
 @SmallTest
-public class SupplicantP2pIfaceCallbackHidlImplTest extends WifiBaseTest {
+public class SupplicantP2pIfaceCallbackImplTest extends WifiBaseTest {
     private static final String TAG = "SupplicantP2pIfaceCallbackTest";
 
     private String mIface = "test_p2p0";
     private String mGroupIface = "test_p2p-p2p0-3";
     private WifiP2pMonitor mMonitor;
-    private SupplicantP2pIfaceCallbackHidlImpl mDut;
-    @Mock private SupplicantP2pIfaceHalHidlImpl mP2pIfaceHal;
+    private SupplicantP2pIfaceCallbackImpl mDut;
+    @Mock private SupplicantP2pIfaceHal mP2pIfaceHal;
 
     private byte[] mDeviceAddressInvalid1 = { 0x00 };
     private byte[] mDeviceAddressInvalid2 = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 };
@@ -75,13 +75,12 @@
     private String mDeviceAddress2String = "01:12:23:34:45:56";
     private byte[] mDeviceInfoBytes = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };
     private static final byte[] DEVICE_ADDRESS = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };
-    private static final String DEVICE_ADDRESS_STR = "00:01:02:03:04:05";
     private static final int TEST_NETWORK_ID = 9;
     private static final int TEST_GROUP_FREQUENCY = 5400;
 
-    private class SupplicantP2pIfaceCallbackImplSpy extends SupplicantP2pIfaceCallbackHidlImpl {
+    private class SupplicantP2pIfaceCallbackImplSpy extends SupplicantP2pIfaceCallbackImpl {
         SupplicantP2pIfaceCallbackImplSpy(
-                SupplicantP2pIfaceHalHidlImpl ifaceHal, String iface, WifiP2pMonitor monitor) {
+                SupplicantP2pIfaceHal ifaceHal, String iface, WifiP2pMonitor monitor) {
             super(ifaceHal, iface, monitor);
         }
     }
@@ -474,64 +473,6 @@
         assertEquals(WifiP2pProvDiscEvent.PBC_REQ, discEventCaptor.getValue().event);
     }
 
-    private void verifyProvisionDiscoveryFailureEvent(
-            int halStatus, int expectedStatus) throws Exception {
-        byte[] p2pDeviceAddr = DEVICE_ADDRESS;
-        boolean isRequest = false;
-        byte status = (byte) halStatus;
-        short configMethods = WpsConfigMethods.DISPLAY;
-        String generatedPin = "12345678";
-
-        ArgumentCaptor<WifiP2pProvDiscEvent> discEventCaptor =
-                ArgumentCaptor.forClass(WifiP2pProvDiscEvent.class);
-        mDut.onProvisionDiscoveryCompleted(
-                p2pDeviceAddr, isRequest, status, configMethods, generatedPin);
-        verify(mMonitor).broadcastP2pProvisionDiscoveryFailure(eq(mIface),
-                eq(expectedStatus), discEventCaptor.capture());
-        WifiP2pProvDiscEvent event = discEventCaptor.getValue();
-        assertEquals(DEVICE_ADDRESS_STR, event.device.deviceAddress);
-    }
-
-    /**
-     * Test provision discovery callback for timeout.
-     */
-    @Test
-    public void testOnProvisionDiscoveryTimeout() throws Exception {
-        verifyProvisionDiscoveryFailureEvent(
-                ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.TIMEOUT,
-                WifiP2pMonitor.PROV_DISC_STATUS_TIMEOUT);
-    }
-
-    /**
-     * Test provision discovery callback for rejection.
-     */
-    @Test
-    public void testOnProvisionDiscoveryRejection() throws Exception {
-        verifyProvisionDiscoveryFailureEvent(
-                ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.REJECTED,
-                WifiP2pMonitor.PROV_DISC_STATUS_REJECTED);
-    }
-
-    /**
-     * Test provision discovery callback for joining timeout.
-     */
-    @Test
-    public void testOnProvisionDiscoveryJoinTimeout() throws Exception {
-        verifyProvisionDiscoveryFailureEvent(
-                ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.TIMEOUT_JOIN,
-                WifiP2pMonitor.PROV_DISC_STATUS_TIMEOUT_JOIN);
-    }
-
-    /**
-     * Test provision discovery callback for information unavailable
-     */
-    @Test
-    public void testOnProvisionDiscoveryInfoUnavailable() throws Exception {
-        verifyProvisionDiscoveryFailureEvent(
-                ISupplicantP2pIfaceCallback.P2pProvDiscStatusCode.INFO_UNAVAILABLE,
-                WifiP2pMonitor.PROV_DISC_STATUS_INFO_UNAVAILABLE);
-    }
-
     /**
      * Test staAuth with device address, should trigger ApStaConnected broadcast
      */
diff --git a/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceHalAidlImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceHalAidlImplTest.java
deleted file mode 100644
index e49c856..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceHalAidlImplTest.java
+++ /dev/null
@@ -1,2637 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi.p2p;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.AdditionalMatchers.aryEq;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyByte;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-
-import android.app.test.MockAnswerUtil.AnswerWithArguments;
-import android.hardware.wifi.supplicant.FreqRange;
-import android.hardware.wifi.supplicant.ISupplicant;
-import android.hardware.wifi.supplicant.ISupplicantP2pIface;
-import android.hardware.wifi.supplicant.ISupplicantP2pIfaceCallback;
-import android.hardware.wifi.supplicant.ISupplicantP2pNetwork;
-import android.hardware.wifi.supplicant.IfaceInfo;
-import android.hardware.wifi.supplicant.MacAddress;
-import android.hardware.wifi.supplicant.MiracastMode;
-import android.hardware.wifi.supplicant.P2pFrameTypeMask;
-import android.hardware.wifi.supplicant.SupplicantStatusCode;
-import android.hardware.wifi.supplicant.WpsProvisionMethod;
-import android.net.wifi.CoexUnsafeChannel;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WpsInfo;
-import android.net.wifi.p2p.WifiP2pConfig;
-import android.net.wifi.p2p.WifiP2pDevice;
-import android.net.wifi.p2p.WifiP2pGroup;
-import android.net.wifi.p2p.WifiP2pGroupList;
-import android.net.wifi.p2p.WifiP2pManager;
-import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.ServiceSpecificException;
-import android.text.TextUtils;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.util.NativeUtil;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Unit tests for SupplicantP2pIfaceHalAidlImpl
- */
-@SmallTest
-public class SupplicantP2pIfaceHalAidlImplTest extends WifiBaseTest {
-    private SupplicantP2pIfaceHalAidlImpl mDut;
-    private IBinder.DeathRecipient mDeathRecipient;
-    private @Mock ISupplicant mISupplicantMock;
-    private @Mock ISupplicantP2pIface mISupplicantP2pIfaceMock;
-    private @Mock ISupplicantP2pNetwork mISupplicantP2pNetworkMock;
-    private @Mock WifiP2pMonitor mWifiMonitor;
-    private @Mock IBinder mServiceBinderMock;
-
-    final String mIfaceName = "virtual_interface_name";
-    final String mSsid = "\"SSID\"";
-    final byte[] mSsidBytes = {'S', 'S', 'I', 'D'};
-    final String mPeerMacAddress = "00:11:22:33:44:55";
-    final byte[] mPeerMacAddressBytes = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 };
-    final String mGroupOwnerMacAddress = "01:12:23:34:45:56";
-    final byte[] mGroupOwnerMacAddressBytes = { 0x01, 0x12, 0x23, 0x34, 0x45, 0x56 };
-    final String mInvalidMacAddress1 = "00:11:22:33:44";
-    final String mInvalidMacAddress2 = ":::::";
-    final String mInvalidMacAddress3 = "invalid";
-    final byte[] mInvalidMacAddressBytes1 = null;
-    final byte[] mInvalidMacAddressBytes2 = { };
-    final byte[] mInvalidMacAddressBytes3 = { 0x00, 0x01, 0x02, 0x03, 0x04 };
-    final byte[] mInvalidMacAddressBytes4 = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
-    HashSet<String> mInvalidMacAddresses = new HashSet<String>(Arrays.asList(
-            mInvalidMacAddress1, mInvalidMacAddress2,
-            mInvalidMacAddress3));
-
-    final String mInvalidService1 = null;
-    final String mInvalidService2 = "service";
-    final String mValidServiceRequestString = "30313233";
-    final byte[] mValidServiceRequestBytes = { 0x30, 0x31, 0x32, 0x33 };
-    final String mInvalidServiceRequestString = "not a hex string";
-    final String mInvalidUpnpService1 = "upnp";
-    final String mInvalidUpnpService2 = "upnp 1";
-    final String mInvalidUpnpService3 = "upnp invalid_number name";
-    final String mInvalidBonjourService1 = "bonjour";
-    final String mInvalidBonjourService2 = "bonjour 123456";
-    final String mInvalidBonjourService3 = "bonjour invalid_hex 123456";
-    final String mInvalidBonjourService4 = "bonjour 123456 invalid_hex";
-    final String mValidUpnpService = "upnp 10 serviceName";
-    final int mValidUpnpServiceVersion = 16;
-    final String mValidUpnpServiceName = "serviceName";
-    final String mValidBonjourService = "bonjour 30313233 34353637";
-    final byte[] mValidBonjourServiceRequest = {'0', '1', '2', '3'};
-    final byte[] mValidBonjourServiceResponse = {'4', '5', '6', '7'};
-
-    // variables for groupAdd with config
-    final String mNetworkName = "DIRECT-xy-Hello";
-    final String mPassphrase = "12345678";
-    final int mGroupOwnerBand = WifiP2pConfig.GROUP_OWNER_BAND_5GHZ;
-    final boolean mIsPersistent = false;
-
-    private class SupplicantP2pIfaceHalSpy extends SupplicantP2pIfaceHalAidlImpl {
-        SupplicantP2pIfaceHalSpy() {
-            super(mWifiMonitor);
-        }
-
-        @Override
-        protected ISupplicant getSupplicantMockable() {
-            return mISupplicantMock;
-        }
-
-        @Override
-        protected IBinder getServiceBinderMockable() {
-            return mServiceBinderMock;
-        }
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mDut = new SupplicantP2pIfaceHalSpy();
-    }
-
-    /**
-     * Sunny day scenario for SupplicantP2pIfaceHal initialization.
-     * Asserts successful initialization.
-     */
-    @Test
-    public void testInitialize_success() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-    }
-
-    /**
-     * Tests the initialization flow when a RemoteException is thrown by addP2pInterface.
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_remoteExceptionFailure() throws Exception {
-        executeAndValidateInitializationSequence(true, false);
-    }
-
-    /**
-     * Tests the initialization flow when a null interface is returned by addP2pInterface.
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_nullInterfaceFailure() throws Exception {
-        executeAndValidateInitializationSequence(false, true);
-    }
-
-    /**
-     * Ensures that we reject the addition of a second iface.
-     */
-    @Test
-    public void testDuplicateSetupIface_Fails() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-
-        // Trying setting up the p2p interface again & ensure it fails.
-        assertFalse(mDut.setupIface(mIfaceName));
-        verifyNoMoreInteractions(mISupplicantMock);
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal teardown.
-     * Asserts successful teardown.
-     */
-    @Test
-    public void testTeardown_success() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-
-        doNothing().when(mISupplicantMock).removeInterface(any(IfaceInfo.class));
-        assertTrue(mDut.teardownIface(mIfaceName));
-        verify(mISupplicantMock).removeInterface(any(IfaceInfo.class));
-    }
-
-    /**
-     * Ensures that we reject removal of a non-existent iface.
-     */
-    @Test
-    public void testInvalidTeardownInterface_Fails() throws Exception {
-        assertFalse(mDut.teardownIface(mIfaceName));
-        verifyNoMoreInteractions(mISupplicantMock);
-    }
-
-    /**
-     * Verify misordered supplicant death case.
-     */
-    @Test
-    public void testMisorderedSupplicantDeathHandling() throws Exception {
-        doAnswer(new AnswerWithArguments() {
-            public void answer(IBinder.DeathRecipient cb, int flags) throws RemoteException {
-                mDeathRecipient = cb;
-            }
-        }).when(mServiceBinderMock).linkToDeath(any(IBinder.DeathRecipient.class), anyInt());
-
-        executeAndValidateInitializationSequence(false, false);
-        mDeathRecipient.binderDied();
-        assertFalse(mDut.teardownIface(mIfaceName));
-    }
-
-    /**
-     * Sunny day scenario for getName()
-     */
-    @Test
-    public void testGetName_success() throws Exception {
-        doReturn(mIfaceName).when(mISupplicantP2pIfaceMock).getName();
-
-        // Default value when service is not initialized.
-        assertNull(mDut.getName());
-        executeAndValidateInitializationSequence(false, false);
-        assertEquals(mIfaceName, mDut.getName());
-    }
-
-    /**
-     * Verify that getName returns null, if HAL call did not succeed
-     */
-    @Test
-    public void testGetName_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).getName();
-        assertNull(mDut.getName());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that getName disconnects and returns null, if HAL throws a remote exception.
-     */
-    @Test
-    public void testGetName_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock).getName();
-        assertNull(mDut.getName());
-        // Check that service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for find(int)
-     */
-    @Test
-    public void testFind_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).find(anyInt());
-        // Default value when service is not yet initialized.
-        assertFalse(mDut.find(1));
-
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.find(1));
-        verify(mISupplicantP2pIfaceMock).find(eq(1));
-        assertFalse(mDut.find(-1));
-        verify(mISupplicantP2pIfaceMock, never()).find(eq(-1));
-    }
-
-    /**
-     * Verify that find(int) returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testFind_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-            .when(mISupplicantP2pIfaceMock).find(anyInt());
-        assertFalse(mDut.find(1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for find with scan type, {@link WifiP2pManager#WIFI_P2P_SCAN_FULL}.
-     */
-    @Test
-    public void testFindFullScan_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).find(anyInt());
-        // Default value when service is not yet initialized.
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_FULL,
-                              WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, 1));
-
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_FULL,
-                             WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, 1));
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_FULL,
-                              WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, -1));
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_FULL, 2412, -1));
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_FULL, -1, 1));
-    }
-
-    /**
-     * Verify that find with scan type, {@link WifiP2pManager#WIFI_P2P_SCAN_FULL}, returns false,
-     * if HAL call did not succeed.
-     */
-    @Test
-    public void testFindFullScan_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-            .when(mISupplicantP2pIfaceMock).find(anyInt());
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_FULL,
-                              WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, 1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for findOnSocialChannels()
-     */
-    @Test
-    public void testFindSocialOnly_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).findOnSocialChannels(anyInt());
-        // Default value when service is not yet initialized.
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SOCIAL,
-                              WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, 1));
-
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SOCIAL,
-                             WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, 1));
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SOCIAL,
-                              WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, -1));
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SOCIAL, 2412, -1));
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SOCIAL, -1, 1));
-    }
-
-    /**
-     * Verify that findOnSocialChannels() returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testFindSocialOnly_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-            .when(mISupplicantP2pIfaceMock).findOnSocialChannels(anyInt());
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SOCIAL,
-                              WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, 1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for findOnSpecificFrequency()
-     */
-    @Test
-    public void testFindSpecificFrequency_success() throws Exception {
-        int freq = 2412;
-        doNothing().when(mISupplicantP2pIfaceMock).findOnSpecificFrequency(anyInt(), anyInt());
-        // Default value when service is not yet initialized.
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ, freq, 1));
-
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ, freq, 1));
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ, freq, -1));
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ, -1, 1));
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ,
-                              WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, 1));
-    }
-
-    /**
-     * Verify that find returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testFindSpecificFrequency_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-            .when(mISupplicantP2pIfaceMock).findOnSpecificFrequency(anyInt(), anyInt());
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ, 2412, 1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for stopFind()
-     */
-    @Test
-    public void testStopFind_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).stopFind();
-        // Default value when service is not yet initialized.
-        assertFalse(mDut.stopFind());
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.stopFind());
-    }
-
-    /**
-     * Verify that stopFind returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testStopFind_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-            .when(mISupplicantP2pIfaceMock).stopFind();
-        assertFalse(mDut.stopFind());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that stopFind disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testStopFind_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).stopFind();
-        assertFalse(mDut.stopFind());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for flush()
-     */
-    @Test
-    public void testFlush_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).flush();
-        // Default value when service is not yet initialized.
-        assertFalse(mDut.flush());
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.flush());
-    }
-
-    /**
-     * Verify that flush returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testFlush_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).flush();
-        assertFalse(mDut.flush());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that flush disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testFlush_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).flush();
-        assertFalse(mDut.flush());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for serviceFlush()
-     */
-    @Test
-    public void testServiceFlush_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).flushServices();
-        // Default value when service is not initialized.
-        assertFalse(mDut.serviceFlush());
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.serviceFlush());
-    }
-
-    /**
-     * Verify that serviceFlush returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testServiceFlush_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).flushServices();
-        assertFalse(mDut.serviceFlush());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that serviceFlush disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testServiceFlush_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).flushServices();
-        assertFalse(mDut.serviceFlush());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for setPowerSave()
-     */
-    @Test
-    public void testSetPowerSave_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).setPowerSave(eq(mIfaceName), anyBoolean());
-        // Default value when service is not initialized.
-        assertFalse(mDut.setPowerSave(mIfaceName, true));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.setPowerSave(mIfaceName, true));
-    }
-
-    /**
-     * Verify that setPowerSave returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testSetPowerSave_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).setPowerSave(eq(mIfaceName), anyBoolean());
-        assertFalse(mDut.setPowerSave(mIfaceName, true));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setPowerSave disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testSetPowerSave_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock).setPowerSave(eq(mIfaceName), anyBoolean());
-        assertFalse(mDut.setPowerSave(mIfaceName, true));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for setGroupIdle()
-     */
-    @Test
-    public void testSetGroupIdle_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).setGroupIdle(eq(mIfaceName), anyInt());
-        // Default value when service is not initialized.
-        assertFalse(mDut.setGroupIdle(mIfaceName, 1));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.setGroupIdle(mIfaceName, 1));
-        assertFalse(mDut.setGroupIdle(mIfaceName, -1));
-    }
-
-    /**
-     * Verify that setGroupIdle returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testSetGroupIdle_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).setGroupIdle(eq(mIfaceName), anyInt());
-        assertFalse(mDut.setGroupIdle(mIfaceName, 1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setGroupIdle disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testSetGroupIdle_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock).setGroupIdle(eq(mIfaceName), anyInt());
-        assertFalse(mDut.setGroupIdle(mIfaceName, 1));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for setSsidPostfix()
-     */
-    @Test
-    public void testSetSsidPostfix_success() throws Exception {
-        String ssid = "SSID POSTFIX";
-        doNothing().when(mISupplicantP2pIfaceMock).setSsidPostfix(
-                eq(NativeUtil.byteArrayFromArrayList(
-                        NativeUtil.decodeSsid("\"" + ssid + "\""))));
-        // Default value when service is not initialized.
-        assertFalse(mDut.setSsidPostfix(ssid));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.setSsidPostfix(ssid));
-        assertFalse(mDut.setSsidPostfix(null));
-    }
-
-    /**
-     * Verify that setSsidPostfix returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testSetSsidPostfix_failure() throws Exception {
-        String ssid = "SSID POSTFIX";
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).setSsidPostfix(
-                        eq(NativeUtil.byteArrayFromArrayList(
-                                NativeUtil.decodeSsid("\"" + ssid + "\""))));
-        assertFalse(mDut.setSsidPostfix(ssid));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setSsidPostfix disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testSetSsidPostfix_exception() throws Exception {
-        String ssid = "SSID POSTFIX";
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock).setSsidPostfix(
-                        eq(NativeUtil.byteArrayFromArrayList(
-                                NativeUtil.decodeSsid("\"" + ssid + "\""))));
-        assertFalse(mDut.setSsidPostfix(ssid));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for connect()
-     */
-    @Test
-    public void testConnect_success() throws Exception {
-        final String configPin = "12345";
-        final HashSet<Integer> methods = new HashSet<>();
-
-        doAnswer(new AnswerWithArguments() {
-            public String answer(byte[] peer, int method, String pin, boolean joinExisting,
-                    boolean persistent, int goIntent) throws RemoteException {
-                methods.add(method);
-
-                if (method == WpsProvisionMethod.DISPLAY && TextUtils.isEmpty(pin)) {
-                    // Return the configPin for DISPLAY method if the pin was not provided.
-                    return configPin;
-                } else {
-                    if (method != WpsProvisionMethod.PBC) {
-                        // PIN is only required for PIN methods.
-                        assertEquals(pin, configPin);
-                    }
-                    // For all the other cases, there is no generated pin.
-                    return "";
-                }
-            }
-        }).when(mISupplicantP2pIfaceMock).connect(eq(mPeerMacAddressBytes), anyInt(),
-                anyString(), anyBoolean(), anyBoolean(), anyInt());
-
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.DISPLAY, "");
-
-        // Default value when service is not initialized.
-        assertNull(mDut.connect(config, false));
-
-        executeAndValidateInitializationSequence(false, false);
-
-        assertEquals(configPin, mDut.connect(config, false));
-        assertTrue(methods.contains(WpsProvisionMethod.DISPLAY));
-        methods.clear();
-
-        config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.DISPLAY, configPin);
-        assertTrue(mDut.connect(config, false).isEmpty());
-        assertTrue(methods.contains(WpsProvisionMethod.DISPLAY));
-        methods.clear();
-
-        config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
-        assertTrue(mDut.connect(config, false).isEmpty());
-        assertTrue(methods.contains(WpsProvisionMethod.PBC));
-        methods.clear();
-
-        config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.KEYPAD, configPin);
-        assertTrue(mDut.connect(config, false).isEmpty());
-        assertTrue(methods.contains(WpsProvisionMethod.KEYPAD));
-    }
-
-    /**
-     * Test connect with invalid arguments.
-     */
-    @Test
-    public void testConnect_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doAnswer(new AnswerWithArguments() {
-            public String answer(byte[] peer, int method, String pin, boolean joinExisting,
-                    boolean persistent, int goIntent) throws RemoteException {
-                return pin;
-            }
-        }).when(mISupplicantP2pIfaceMock).connect(any(byte[].class), anyInt(), anyString(),
-                anyBoolean(), anyBoolean(), anyInt());
-
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.DISPLAY, "");
-
-        // Unsupported.
-        config.wps.setup = -1;
-        assertNull(mDut.connect(config, false));
-
-        // Invalid peer address.
-        config.wps.setup = WpsInfo.DISPLAY;
-        for (String address : mInvalidMacAddresses) {
-            config.deviceAddress = address;
-            assertNull(mDut.connect(config, false));
-        }
-
-        // Null pin is not valid.
-        config.wps.setup = WpsInfo.DISPLAY;
-        config.wps.pin = null;
-        assertNull(mDut.connect(config, false));
-
-        // Pin should be empty for PBC.
-        config.wps.setup = WpsInfo.PBC;
-        config.wps.pin = "03455323";
-        assertNull(mDut.connect(config, false));
-    }
-
-    /**
-     * Verify that connect returns null, if HAL call did not succeed.
-     */
-    @Test
-    public void testConnect_failure() throws Exception {
-        final String configPin = "12345";
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress,
-                WpsInfo.DISPLAY, configPin);
-
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).connect(eq(mPeerMacAddressBytes), anyInt(),
-                        anyString(), anyBoolean(), anyBoolean(), anyInt());
-
-        assertNull(mDut.connect(config, false));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that connect disconnects and returns null, if HAL throws a remote exception.
-     */
-    @Test
-    public void testConnect_exception() throws Exception {
-        final String configPin = "12345";
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress,
-                WpsInfo.DISPLAY, configPin);
-
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock).connect(eq(mPeerMacAddressBytes), anyInt(),
-                        anyString(), anyBoolean(), anyBoolean(), anyInt());
-
-        assertNull(mDut.connect(config, false));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for cancelConnect()
-     */
-    @Test
-    public void testCancelConnect_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).cancelConnect();
-        // Default value when service is not initialized.
-        assertFalse(mDut.cancelConnect());
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.cancelConnect());
-    }
-
-    /**
-     * Verify that cancelConnect returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testCancelConnect_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).cancelConnect();
-        assertFalse(mDut.cancelConnect());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that cancelConnect disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testCancelConnect_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock).cancelConnect();
-        assertFalse(mDut.cancelConnect());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for provisionDiscovery()
-     */
-    @Test
-    public void testProvisionDiscovery_success() throws Exception {
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
-
-        doNothing().when(mISupplicantP2pIfaceMock)
-                .provisionDiscovery(eq(mPeerMacAddressBytes), anyInt());
-        // Default value when service is not initialized.
-        assertFalse(mDut.provisionDiscovery(config));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.provisionDiscovery(config));
-    }
-
-    /**
-     * Test provisionDiscovery with invalid arguments.
-     */
-    @Test
-    public void testProvisionDiscovery_invalidArguments() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock)
-                .provisionDiscovery(eq(mPeerMacAddressBytes), anyInt());
-        executeAndValidateInitializationSequence(false, false);
-
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
-
-        // Unsupported method.
-        config.wps.setup = -1;
-        assertFalse(mDut.provisionDiscovery(config));
-
-        config.wps.setup = WpsInfo.PBC;
-        for (String address : mInvalidMacAddresses) {
-            config.deviceAddress = address;
-            assertFalse(mDut.provisionDiscovery(config));
-        }
-    }
-
-    /**
-     * Verify that provisionDiscovery returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testProvisionDiscovery_failure() throws Exception {
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
-
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock)
-                .provisionDiscovery(eq(mPeerMacAddressBytes), anyInt());
-        assertFalse(mDut.provisionDiscovery(config));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that provisionDiscovery disconnects and returns false,
-     * if HAL throws a remote exception.
-     */
-    @Test
-    public void testProvisionDiscovery_exception() throws Exception {
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
-
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock)
-                .provisionDiscovery(eq(mPeerMacAddressBytes), anyInt());
-        assertFalse(mDut.provisionDiscovery(config));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for invite()
-     */
-    @Test
-    public void testInvite_success() throws Exception {
-        WifiP2pGroup group = createPlaceholderP2pGroup();
-
-        doNothing().when(mISupplicantP2pIfaceMock)
-                .invite(eq(mIfaceName), eq(mGroupOwnerMacAddressBytes), eq(mPeerMacAddressBytes));
-        // Default value when service is not initialized.
-        assertFalse(mDut.invite(group, mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.invite(group, mPeerMacAddress));
-    }
-
-    /**
-     * Invite with invalid arguments.
-     */
-    @Test
-    public void testInvite_invalidArguments() throws Exception {
-        WifiP2pGroup group = createPlaceholderP2pGroup();
-
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock)
-                .invite(anyString(), any(byte[].class), any(byte[].class));
-
-        for (String address : mInvalidMacAddresses) {
-            assertFalse(mDut.invite(group, address));
-        }
-
-        for (String address : mInvalidMacAddresses) {
-            group.getOwner().deviceAddress = address;
-            assertFalse(mDut.invite(group, mPeerMacAddress));
-        }
-
-        group.setOwner(null);
-        assertFalse(mDut.invite(group, mPeerMacAddress));
-        assertFalse(mDut.invite(null, mPeerMacAddress));
-    }
-
-    /**
-     * Verify that invite returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testInvite_failure() throws Exception {
-        WifiP2pGroup group = createPlaceholderP2pGroup();
-
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock)
-                .invite(anyString(), any(byte[].class), any(byte[].class));
-        assertFalse(mDut.invite(group, mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that invite disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testInvite_exception() throws Exception {
-        WifiP2pGroup group = createPlaceholderP2pGroup();
-
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .invite(anyString(), any(byte[].class), any(byte[].class));
-        assertFalse(mDut.invite(group, mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for reject()
-     */
-    @Test
-    public void testReject_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).reject(eq(mPeerMacAddressBytes));
-        // Default value when service is not initialized.
-        assertFalse(mDut.reject(mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.reject(mPeerMacAddress));
-    }
-
-    /**
-     * Reject with invalid arguments.
-     */
-    @Test
-    public void testReject_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).reject(eq(mPeerMacAddressBytes));
-        for (String address : mInvalidMacAddresses) {
-            assertFalse(mDut.reject(address));
-        }
-    }
-
-    /**
-     * Verify that reject returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testReject_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).reject(any(byte[].class));
-        assertFalse(mDut.reject(mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that reject disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testReject_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).reject(any(byte[].class));
-        assertFalse(mDut.reject(mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for getDeviceAddress()
-     */
-    @Test
-    public void testGetDeviceAddress_success() throws Exception {
-        doReturn(mPeerMacAddressBytes).when(mISupplicantP2pIfaceMock).getDeviceAddress();
-
-        // Default value when service is not initialized.
-        assertNull(mDut.getDeviceAddress());
-        executeAndValidateInitializationSequence(false, false);
-        assertEquals(mPeerMacAddress, mDut.getDeviceAddress());
-    }
-
-    /**
-     * Test getDeviceAddress() when invalid mac address is being reported.
-     */
-    @Test
-    public void testGetDeviceAddress_invalidResult() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        HashSet<byte[]> addresses = new HashSet<byte[]>(Arrays.asList(
-                mInvalidMacAddressBytes1, mInvalidMacAddressBytes2,
-                mInvalidMacAddressBytes3, mInvalidMacAddressBytes4));
-
-        doAnswer(new AnswerWithArguments() {
-            public byte[] answer() {
-                byte[] address = addresses.iterator().next();
-                addresses.remove(address);
-                return address;
-            }
-        }).when(mISupplicantP2pIfaceMock).getDeviceAddress();
-
-        // Default value when service is not initialized.
-        while (!addresses.isEmpty()) {
-            assertNull(mDut.getDeviceAddress());
-        }
-    }
-
-    /**
-     * Verify that getDeviceAddress returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testGetDeviceAddress_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).getDeviceAddress();
-
-        assertNull(mDut.getDeviceAddress());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that getDeviceAddress disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testGetDeviceAddress_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).getDeviceAddress();
-
-        assertNull(mDut.getDeviceAddress());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for getSsid()
-     */
-    @Test
-    public void testGetSsid_success() throws Exception {
-        doReturn(mSsidBytes).when(mISupplicantP2pIfaceMock).getSsid(eq(mPeerMacAddressBytes));
-
-        // Default value when service is not initialized.
-        assertNull(mDut.getSsid(mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false);
-        assertEquals(NativeUtil.removeEnclosingQuotes(mSsid), mDut.getSsid(mPeerMacAddress));
-    }
-
-    /**
-     * Test getSsid() with invalid arguments.
-     */
-    @Test
-    public void testGetSsid_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doReturn(mSsidBytes).when(mISupplicantP2pIfaceMock).getSsid(any(byte[].class));
-        for (String address : mInvalidMacAddresses) {
-            assertNull(mDut.getSsid(address));
-        }
-    }
-
-
-    /**
-     * Test getSsid() when the HAL returns a null response.
-     */
-    @Test
-    public void testGetSsid_nullResult() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doReturn(null).when(mISupplicantP2pIfaceMock).getSsid(any(byte[].class));
-        assertNull(mDut.getSsid(mPeerMacAddress));
-    }
-
-    /**
-     * Verify that getSsid returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testGetSsid_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).getSsid(any(byte[].class));
-        assertNull(mDut.getSsid(mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that getSsid disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testGetSsid_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock).getSsid(any(byte[].class));
-        assertNull(mDut.getSsid(mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for reinvoke()
-     */
-    @Test
-    public void testReinvoke_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).reinvoke(anyInt(), eq(mPeerMacAddressBytes));
-        // Default value when service is not initialized.
-        assertFalse(mDut.reinvoke(0, mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.reinvoke(0, mPeerMacAddress));
-    }
-
-    /**
-     * Call reinvoke with invalid arguments.
-     */
-    @Test
-    public void testReinvoke_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).reinvoke(anyInt(), eq(mPeerMacAddressBytes));
-        for (String address : mInvalidMacAddresses) {
-            assertFalse(mDut.reinvoke(0, address));
-        }
-    }
-
-    /**
-     * Verify that reinvoke returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testReinvoke_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).reinvoke(anyInt(), any(byte[].class));
-        assertFalse(mDut.reinvoke(0, mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that reinvoke disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testReinvoke_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .reinvoke(anyInt(), any(byte[].class));
-        assertFalse(mDut.reinvoke(0, mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for groupAdd()
-     */
-    @Test
-    public void testGroupAdd_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).addGroup(eq(true), eq(3));
-        // Default value when service is not initialized.
-        assertFalse(mDut.groupAdd(3, true));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.groupAdd(3, true));
-    }
-
-    /**
-     * Verify that groupAdd returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testGroupAdd_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).addGroup(anyBoolean(), anyInt());
-        assertFalse(mDut.groupAdd(0, true));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that groupAdd disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testGroupAdd_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .addGroup(anyBoolean(), anyInt());
-        assertFalse(mDut.groupAdd(0, true));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for groupAdd() with config
-     */
-    @Test
-    public void testGroupAddWithConfigSuccess() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).addGroupWithConfig(
-                eq(NativeUtil.byteArrayFromArrayList(
-                        NativeUtil.decodeSsid("\"" + mNetworkName + "\""))),
-                eq(mPassphrase),
-                eq(mIsPersistent),
-                eq(mGroupOwnerBand),
-                eq(mPeerMacAddressBytes),
-                anyBoolean());
-        // Default value when service is not initialized.
-        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
-                mGroupOwnerBand, mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMock, never()).addGroupWithConfig(
-                any(byte[].class), anyString(),
-                anyBoolean(), anyInt(),
-                any(byte[].class), anyBoolean());
-
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
-                mGroupOwnerBand, mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMock).addGroupWithConfig(
-                eq(NativeUtil.byteArrayFromArrayList(
-                        NativeUtil.decodeSsid("\"" + mNetworkName + "\""))),
-                eq(mPassphrase),
-                eq(mIsPersistent),
-                eq(mGroupOwnerBand),
-                eq(mPeerMacAddressBytes),
-                eq(true));
-    }
-
-    /**
-     * Verify that groupAdd with config returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testGroupAddWithConfigFailure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).addGroupWithConfig(
-                        eq(NativeUtil.byteArrayFromArrayList(
-                                NativeUtil.decodeSsid("\"" + mNetworkName + "\""))),
-                        eq(mPassphrase),
-                        eq(mIsPersistent),
-                        eq(mGroupOwnerBand),
-                        eq(mPeerMacAddressBytes),
-                        anyBoolean());
-        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
-                mGroupOwnerBand, mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMock).addGroupWithConfig(
-                eq(NativeUtil.byteArrayFromArrayList(
-                        NativeUtil.decodeSsid("\"" + mNetworkName + "\""))),
-                eq(mPassphrase),
-                eq(mIsPersistent),
-                eq(mGroupOwnerBand),
-                eq(mPeerMacAddressBytes),
-                eq(true));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that groupAdd with config disconnects and returns false,
-     * if HAL throws a remote exception.
-     */
-    @Test
-    public void testGroupAddWithConfigException() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock).addGroupWithConfig(
-                        eq(NativeUtil.byteArrayFromArrayList(
-                                NativeUtil.decodeSsid("\"" + mNetworkName + "\""))),
-                        eq(mPassphrase),
-                        eq(mIsPersistent),
-                        eq(mGroupOwnerBand),
-                        eq(mPeerMacAddressBytes),
-                        anyBoolean());
-        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
-                mGroupOwnerBand, mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMock).addGroupWithConfig(
-                eq(NativeUtil.byteArrayFromArrayList(
-                        NativeUtil.decodeSsid("\"" + mNetworkName + "\""))),
-                eq(mPassphrase),
-                eq(mIsPersistent),
-                eq(mGroupOwnerBand),
-                eq(mPeerMacAddressBytes),
-                eq(true));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for groupRemove()
-     */
-    @Test
-    public void testGroupRemove_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).removeGroup(eq(mIfaceName));
-        // Default value when service is not initialized.
-        assertFalse(mDut.groupRemove(mIfaceName));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.groupRemove(mIfaceName));
-    }
-
-    /**
-     * Verify that groupRemove returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testGroupRemove_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).removeGroup(anyString());
-        assertFalse(mDut.groupRemove(mIfaceName));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that groupRemove disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testGroupRemove_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).removeGroup(anyString());
-        assertFalse(mDut.groupRemove(mIfaceName));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for getGroupCapability()
-     */
-    @Test
-    public void testGetGroupCapability_success() throws Exception {
-        final int caps = 123;
-        doReturn(caps).when(mISupplicantP2pIfaceMock).getGroupCapability(eq(mPeerMacAddressBytes));
-        // Default value when service is not initialized.
-        assertEquals(-1, mDut.getGroupCapability(mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false);
-        assertEquals(caps, mDut.getGroupCapability(mPeerMacAddress));
-    }
-
-    /**
-     * GetGroupCapability with invalid arguments.
-     */
-    @Test
-    public void testGetGroupCapability_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doReturn(0).when(mISupplicantP2pIfaceMock)
-                .getGroupCapability(eq(mPeerMacAddressBytes));
-        for (String address : mInvalidMacAddresses) {
-            assertEquals(-1, mDut.getGroupCapability(address));
-        }
-    }
-
-    /**
-     * Verify that getGroupCapability returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testGetGroupCapability_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock)
-                .getGroupCapability(eq(mPeerMacAddressBytes));
-        assertEquals(-1, mDut.getGroupCapability(mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that getGroupCapability disconnects and returns false,
-     * if HAL throws a remote exception.
-     */
-    @Test
-    public void testGetGroupCapability_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock)
-                .getGroupCapability(eq(mPeerMacAddressBytes));
-        assertEquals(-1, mDut.getGroupCapability(mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for configureExtListen()
-     */
-    @Test
-    public void testConfigureExtListen_success() throws Exception {
-        // Only accept (123, 456) and (0, 0) as parameters for this test
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .configureExtListen(anyInt(), anyInt());
-        doNothing().when(mISupplicantP2pIfaceMock).configureExtListen(eq(123), eq(456));
-        doNothing().when(mISupplicantP2pIfaceMock).configureExtListen(eq(0), eq(0));
-
-        // Default value when service is not initialized.
-        assertFalse(mDut.configureExtListen(true, 123, 456));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.configureExtListen(true, 123, 456));
-        // Turning listening off should reset intervals to 0s.
-        assertTrue(mDut.configureExtListen(false, 999, 999));
-        // Disable listening.
-        assertTrue(mDut.configureExtListen(false, -1, -1));
-    }
-
-    /**
-     * Test configureExtListen with invalid parameters.
-     */
-    @Test
-    public void testConfigureExtListen_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).configureExtListen(anyInt(), anyInt());
-        assertFalse(mDut.configureExtListen(true, -1, 1));
-        assertFalse(mDut.configureExtListen(true, 1, -1));
-    }
-
-    /**
-     * Verify that configureExtListen returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testConfigureExtListen_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).configureExtListen(anyInt(), anyInt());
-        assertFalse(mDut.configureExtListen(true, 1, 1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that configureExtListen disconnects and returns false,
-     * if HAL throws a remote exception.
-     */
-    @Test
-    public void testConfigureExtListen_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .configureExtListen(anyInt(), anyInt());
-        assertFalse(mDut.configureExtListen(true, 1, 1));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for setListenChannel()
-     */
-    @Test
-    public void testSetListenChannel_success() throws Exception {
-        int lc = 6;
-        doNothing().when(mISupplicantP2pIfaceMock).setListenChannel(eq(lc), anyInt());
-        // Default value when service is not initialized.
-        assertFalse(mDut.setListenChannel(lc));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.setListenChannel(lc));
-    }
-
-    /**
-     * Test setListenChannel with invalid parameters.
-     */
-    @Test
-    public void testSetListenChannel_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).setListenChannel(anyInt(), anyInt());
-        assertFalse(mDut.setListenChannel(4));
-    }
-
-    /**
-     * Verify that setListenChannel returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testSetListenChannel_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).setListenChannel(anyInt(), anyInt());
-        assertFalse(mDut.setListenChannel(1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setListenChannel disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testSetListenChannel_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .setListenChannel(anyInt(), anyInt());
-        assertFalse(mDut.setListenChannel(1));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for setOperatingChannel()
-     */
-    @Test
-    public void testSetOperatingChannel_success() throws Exception {
-        int oc = 163;
-        FreqRange range1 = new FreqRange();
-        range1.min = 1000;
-        range1.max = 5810;
-        FreqRange range2 = new FreqRange();
-        range2.min = 5820;
-        range2.max = 6000;
-        FreqRange[] ranges = {range1, range2};
-        List<CoexUnsafeChannel> unsafeChannels = new ArrayList<>();
-
-        doNothing().when(mISupplicantP2pIfaceMock).setDisallowedFrequencies(eq(ranges));
-        // Default value when service is not initialized.
-        assertFalse(mDut.setOperatingChannel(oc, unsafeChannels));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.setOperatingChannel(oc, unsafeChannels));
-    }
-
-    /**
-     * Test setOperatingChannel with invalid parameters.
-     */
-    @Test
-    public void testSetOperatingChannel_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).setDisallowedFrequencies(any(FreqRange[].class));
-        assertFalse(mDut.setOperatingChannel(1, null));
-    }
-
-    /**
-     * Verify that setOperatingChannel returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testSetOperatingChannel_failure() throws Exception {
-        List<CoexUnsafeChannel> unsafeChannels = new ArrayList<>();
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).setDisallowedFrequencies(any(FreqRange[].class));
-        assertFalse(mDut.setOperatingChannel(1, unsafeChannels));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setOperatingChannel disconnects and returns false,
-     * if HAL throws a remote exception.
-     */
-    @Test
-    public void testSetOperatingChannel_exception() throws Exception {
-        List<CoexUnsafeChannel> unsafeChannels = new ArrayList<>();
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .setDisallowedFrequencies(any(FreqRange[].class));
-        assertFalse(mDut.setOperatingChannel(65, unsafeChannels));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for serviceAdd()
-     */
-    @Test
-    public void testServiceAdd_success() throws Exception {
-        WifiP2pServiceInfo info = createPlaceholderP2pServiceInfo(
-                mValidUpnpService, mValidBonjourService);
-        final HashSet<String> services = new HashSet<String>();
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int version, String name) {
-                services.add("upnp");
-                assertEquals(mValidUpnpServiceVersion, version);
-                assertEquals(mValidUpnpServiceName, name);
-            }
-        }).when(mISupplicantP2pIfaceMock).addUpnpService(anyInt(), anyString());
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] request, byte[] response) {
-                services.add("bonjour");
-                assertArrayEquals(mValidBonjourServiceRequest, request);
-                assertArrayEquals(mValidBonjourServiceResponse, response);
-            }
-        }).when(mISupplicantP2pIfaceMock).addBonjourService(any(byte[].class), any(byte[].class));
-
-        // Default value when service is not initialized.
-        assertFalse(mDut.serviceAdd(info));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.serviceAdd(info));
-        // Confirm that both services have been added.
-        assertTrue(services.contains("upnp"));
-        assertTrue(services.contains("bonjour"));
-
-        // Empty services should not cause any trouble.
-        assertTrue(mDut.serviceAdd(createPlaceholderP2pServiceInfo()));
-    }
-
-    /**
-     * Test serviceAdd with invalid parameters.
-     */
-    @Test
-    public void testServiceAdd_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).addUpnpService(anyInt(), anyString());
-        doNothing().when(mISupplicantP2pIfaceMock)
-                .addBonjourService(any(byte[].class), any(byte[].class));
-
-        assertFalse(mDut.serviceAdd(null));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidService1)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidService2)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidUpnpService1)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidUpnpService2)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidUpnpService3)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService1)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService2)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService3)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService4)));
-    }
-
-    /**
-     * Verify that serviceAdd returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testServiceAdd_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).addUpnpService(anyInt(), anyString());
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock)
-                        .addBonjourService(any(byte[].class), any(byte[].class));
-
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidUpnpService)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidBonjourService)));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that serviceAdd disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testServiceAddUpnp_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .addUpnpService(anyInt(), anyString());
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidUpnpService)));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that serviceAdd disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testServiceAddBonjour_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).addBonjourService(
-                any(byte[].class), any(byte[].class));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidBonjourService)));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for serviceRemove()
-     */
-    @Test
-    public void testServiceRemove_success() throws Exception {
-        WifiP2pServiceInfo info = createPlaceholderP2pServiceInfo(
-                mValidUpnpService, mValidBonjourService);
-        final HashSet<String> services = new HashSet<String>();
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(int version, String name) {
-                services.add("upnp");
-                assertEquals(mValidUpnpServiceVersion, version);
-                assertEquals(mValidUpnpServiceName, name);
-            }
-        }).when(mISupplicantP2pIfaceMock).removeUpnpService(anyInt(), anyString());
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] request) {
-                services.add("bonjour");
-                assertArrayEquals(mValidBonjourServiceRequest, request);
-            }
-        }).when(mISupplicantP2pIfaceMock).removeBonjourService(any(byte[].class));
-
-        // Default value when service is not initialized.
-        assertFalse(mDut.serviceRemove(info));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.serviceRemove(info));
-        // Confirm that both services have been removed.
-        assertTrue(services.contains("upnp"));
-        assertTrue(services.contains("bonjour"));
-
-        // Empty services should cause no trouble.
-        assertTrue(mDut.serviceRemove(createPlaceholderP2pServiceInfo()));
-    }
-
-    /**
-     * Test serviceRemove with invalid parameters.
-     */
-    @Test
-    public void testServiceRemove_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).removeUpnpService(anyInt(), anyString());
-        doNothing().when(mISupplicantP2pIfaceMock).removeBonjourService(any(byte[].class));
-
-        assertFalse(mDut.serviceRemove(null));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidService1)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidService2)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidUpnpService1)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidUpnpService2)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidUpnpService3)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService1)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService2)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService3)));
-        // Response parameter is ignored by serviceRemove call, hence the following would pass.
-        // The production code would need to parse otherwise redundant parameter to fail on this
-        // one.
-        // assertFalse(
-        //         mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService4)));
-    }
-
-    /**
-     * Verify that serviceRemove returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testServiceRemove_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-            .when(mISupplicantP2pIfaceMock).removeUpnpService(anyInt(), anyString());
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).removeBonjourService(any(byte[].class));
-
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidUpnpService)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidBonjourService)));
-
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that serviceRemove disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testServiceRemoveUpnp_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .removeUpnpService(anyInt(), anyString());
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidUpnpService)));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that serviceRemove disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testServiceRemoveBonjour_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .removeBonjourService(any(byte[].class));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidBonjourService)));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for requestServiceDiscovery()
-     */
-    @Test
-    public void testRequestServiceDiscovery_success() throws Exception {
-        final long caps = 1234;
-        doReturn(caps).when(mISupplicantP2pIfaceMock)
-                .requestServiceDiscovery(eq(mPeerMacAddressBytes), eq(mValidBonjourServiceRequest));
-
-        // Default value when service is not initialized.
-        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mValidServiceRequestString));
-
-        executeAndValidateInitializationSequence(false, false);
-        assertEquals(Long.toString(caps), mDut.requestServiceDiscovery(
-                mPeerMacAddress, mValidServiceRequestString));
-    }
-
-    /**
-     * RequestServiceDiscovery with invalid arguments.
-     */
-    @Test
-    public void testRequestServiceDiscovery_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doReturn(0L).when(mISupplicantP2pIfaceMock)
-                .requestServiceDiscovery(any(byte[].class), any(byte[].class));
-
-        for (String address : mInvalidMacAddresses) {
-            assertNull(mDut.requestServiceDiscovery(
-                    address, mValidServiceRequestString));
-        }
-        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, null));
-        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mInvalidServiceRequestString));
-    }
-
-    /**
-     * Verify that requestServiceDiscovery returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testRequestServiceDiscovery_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock)
-                .requestServiceDiscovery(any(byte[].class), any(byte[].class));
-        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mValidServiceRequestString));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that requestServiceDiscovery disconnects and returns false,
-     * if HAL throws a remote exception.
-     */
-    @Test
-    public void testRequestServiceDiscovery_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .requestServiceDiscovery(any(byte[].class), any(byte[].class));
-        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mValidServiceRequestString));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    // Test constants used in cancelServiceDiscovery tests
-    static final long SERVICE_IDENTIFIER_LONG = 521918410304L;
-    static final String SERVICE_IDENTIFIER_STR = Long.toString(SERVICE_IDENTIFIER_LONG);
-
-    /**
-     * Sunny day scenario for cancelServiceDiscovery()
-     */
-    @Test
-    public void testCancelServiceDiscovery_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).cancelServiceDiscovery(SERVICE_IDENTIFIER_LONG);
-        // Default value when service is not initialized.
-        assertFalse(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
-    }
-
-    /**
-     * Test cancelServiceDiscovery with invalid parameters.
-     */
-    @Test
-    public void testCancelServiceDiscovery_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).cancelServiceDiscovery(SERVICE_IDENTIFIER_LONG);
-        assertFalse(mDut.cancelServiceDiscovery(null));
-        assertFalse(mDut.cancelServiceDiscovery("not a number"));
-    }
-
-    /**
-     * Verify that cancelServiceDiscovery returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testCancelServiceDiscovery_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-            .when(mISupplicantP2pIfaceMock).cancelServiceDiscovery(anyLong());
-        assertFalse(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that cancelServiceDiscovery disconnects and returns false,
-     * if HAL throws a remote exception.
-     */
-    @Test
-    public void testCancelServiceDiscovery_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .cancelServiceDiscovery(anyLong());
-        assertFalse(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for setMiracastMode()
-     */
-    @Test
-    public void testSetMiracastMode_success() throws Exception {
-        HashSet<Byte> modes = new HashSet<Byte>();
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte mode) {
-                modes.add(mode);
-            }
-        }).when(mISupplicantP2pIfaceMock).setMiracastMode(anyByte());
-
-        // Default value when service is not initialized.
-        assertFalse(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
-        assertTrue(modes.contains(MiracastMode.SOURCE));
-
-        assertTrue(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SINK));
-        assertTrue(modes.contains(MiracastMode.SINK));
-
-        // Any invalid number yields disabled miracast mode.
-        assertTrue(mDut.setMiracastMode(-1));
-        assertTrue(modes.contains(MiracastMode.DISABLED));
-    }
-
-    /**
-     * Verify that setMiracastMode returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testSetMiracastMode_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).setMiracastMode(anyByte());
-        assertFalse(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setMiracastMode disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testSetMiracastMode_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).setMiracastMode(anyByte());
-        assertFalse(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for startWpsPbc()
-     */
-    @Test
-    public void testStartWpsPbc_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock)
-                .startWpsPbc(eq(mIfaceName), eq(mPeerMacAddressBytes));
-        // Default value when service is not initialized.
-        assertFalse(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
-    }
-
-    /**
-     * StartWpsPbc with invalid arguments.
-     */
-    @Test
-    public void testStartWpsPbc_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).startWpsPbc(anyString(), any(byte[].class));
-        for (String address : mInvalidMacAddresses) {
-            assertFalse(mDut.startWpsPbc(mIfaceName, address));
-        }
-        assertFalse(mDut.startWpsPbc(null, mPeerMacAddress));
-    }
-
-    /**
-     * Verify that startWpsPbc returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testStartWpsPbc_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).startWpsPbc(anyString(), any(byte[].class));
-        assertFalse(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that startWpsPbc disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testStartWpsPbc_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .startWpsPbc(anyString(), any(byte[].class));
-        assertFalse(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for startWpsPinKeypad()
-     */
-    @Test
-    public void testStartWpsPinKeypad_success() throws Exception {
-        String pin = "1234";
-        doNothing().when(mISupplicantP2pIfaceMock).startWpsPinKeypad(eq(mIfaceName), eq(pin));
-        // Default value when service is not initialized.
-        assertFalse(mDut.startWpsPinKeypad(mIfaceName, pin));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.startWpsPinKeypad(mIfaceName, pin));
-    }
-
-    /**
-     * StartWpsPinKeypad with invalid arguments.
-     */
-    @Test
-    public void testStartWpsPinKeypad_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).startWpsPinKeypad(anyString(), anyString());
-
-        assertFalse(mDut.startWpsPinKeypad(null, "1234"));
-        assertFalse(mDut.startWpsPinKeypad(mIfaceName, null));
-        // StartWpsPinPinKeypad does not validate that PIN indeed holds an integer encoded in a
-        // string. This code would be redundant, as the HAL requires string to be passed.
-    }
-
-    /**
-     * Verify that startWpsPinKeypad returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testStartWpsPinKeypad_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).startWpsPinKeypad(anyString(), anyString());
-        assertFalse(mDut.startWpsPinKeypad(mIfaceName, "1234"));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that startWpsPinKeypad disconnects and returns false,
-     * if HAL throws a remote exception.
-     */
-    @Test
-    public void testStartWpsPinKeypad_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .startWpsPinKeypad(anyString(), anyString());
-        assertFalse(mDut.startWpsPinKeypad(mIfaceName, "1234"));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for startWpsPinDisplay()
-     */
-    @Test
-    public void testStartWpsPinDisplay_success() throws Exception {
-        String pin = "1234";
-        doReturn(pin).when(mISupplicantP2pIfaceMock)
-                .startWpsPinDisplay(eq(mIfaceName), eq(mPeerMacAddressBytes));
-
-        // Default value when service is not initialized.
-        assertNull(mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false);
-        assertEquals("1234", mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
-    }
-
-    /**
-     * StartWpsPinDisplay with invalid arguments.
-     */
-    @Test
-    public void testStartWpsPinDisplay_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doReturn("1234").when(mISupplicantP2pIfaceMock)
-                .startWpsPinDisplay(anyString(), any(byte[].class));
-        for (String address : mInvalidMacAddresses) {
-            assertNull(mDut.startWpsPinDisplay(mIfaceName, address));
-        }
-        assertNull(mDut.startWpsPinDisplay(null, mPeerMacAddress));
-    }
-
-    /**
-     * Verify that startWpsPinDisplay returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testStartWpsPinDisplay_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).startWpsPinDisplay(anyString(), any(byte[].class));
-        assertNull(mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that startWpsPinDisplay disconnects and returns false,
-     * if HAL throws a remote exception.
-     */
-    @Test
-    public void testStartWpsPinDisplay_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException())
-                .when(mISupplicantP2pIfaceMock).startWpsPinDisplay(anyString(), any(byte[].class));
-        assertNull(mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for cancelWps()
-     */
-    @Test
-    public void testCancelWps_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).cancelWps(eq(mIfaceName));
-        // Default value when service is not initialized.
-        assertFalse(mDut.cancelWps(mIfaceName));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.cancelWps(mIfaceName));
-    }
-
-    /**
-     * CancelWps with invalid arguments.
-     */
-    @Test
-    public void testCancelWps_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).cancelWps(anyString());
-        assertFalse(mDut.cancelWps(null));
-    }
-
-    /**
-     * Verify that cancelWps returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testCancelWps_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-            .when(mISupplicantP2pIfaceMock).cancelWps(anyString());
-        assertFalse(mDut.cancelWps(mIfaceName));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that cancelWps disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testCancelWps_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).cancelWps(anyString());
-        assertFalse(mDut.cancelWps(mIfaceName));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for enableWfd()
-     */
-    @Test
-    public void testEnableWfd_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).enableWfd(eq(true));
-        // Default value when service is not initialized.
-        assertFalse(mDut.enableWfd(true));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.enableWfd(true));
-    }
-
-    /**
-     * Verify that enableWfd returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testEnableWfd_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).enableWfd(anyBoolean());
-        assertFalse(mDut.enableWfd(true));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that enableWfd disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testEnableWfd_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).enableWfd(anyBoolean());
-        assertFalse(mDut.enableWfd(false));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for setWfdDeviceInfo()
-     */
-    @Test
-    public void testSetWfdDeviceInfo_success() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).setWfdDeviceInfo(eq(mValidServiceRequestBytes));
-        // Default value when service is not initialized.
-        assertFalse(mDut.setWfdDeviceInfo(mValidServiceRequestString));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.setWfdDeviceInfo(mValidServiceRequestString));
-    }
-
-    /**
-     * SetWfdDeviceInfo with invalid arguments.
-     */
-    @Test
-    public void testSetWfdDeviceInfo_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).setWfdDeviceInfo(any(byte[].class));
-        assertFalse(mDut.setWfdDeviceInfo(null));
-        assertFalse(mDut.setWfdDeviceInfo(mInvalidServiceRequestString));
-    }
-
-    /**
-     * Verify that setWfdDeviceInfo returns false, if HAL call did not succeed.
-     */
-    @Test
-    public void testSetWfdDeviceInfo_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new ServiceSpecificException(SupplicantStatusCode.FAILURE_UNKNOWN))
-                .when(mISupplicantP2pIfaceMock).setWfdDeviceInfo(any(byte[].class));
-        assertFalse(mDut.setWfdDeviceInfo(mValidServiceRequestString));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setWfdDeviceInfo disconnects and returns false, if HAL throws a remote exception.
-     */
-    @Test
-    public void testSetWfdDeviceInfo_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .setWfdDeviceInfo(any(byte[].class));
-        assertFalse(mDut.setWfdDeviceInfo(mValidServiceRequestString));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify the loading of group info. All groups returned by listNetworks are added as a
-     * persistent group, as long as they are NOT current.
-     */
-    @Test
-    public void testLoadGroups() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-
-        // Class to hold the P2p group info returned from the AIDL interface.
-        class P2pGroupInfo {
-            public String ssid;
-            public byte[] bssid;
-            public boolean isGroupOwner;
-            public boolean isCurrent;
-            P2pGroupInfo(String ssid, byte[] bssid, boolean isGroupOwner, boolean isCurrent) {
-                this.ssid = ssid;
-                this.bssid = bssid;
-                this.isGroupOwner = isGroupOwner;
-                this.isCurrent = isCurrent;
-            }
-        }
-
-        Map<Integer, P2pGroupInfo> groups = new HashMap<>();
-        groups.put(0, new P2pGroupInfo(
-                "test_34",
-                NativeUtil.macAddressToByteArray("56:34:ab:12:12:34"),
-                false, false));
-        groups.put(1, new P2pGroupInfo(
-                "test_1234",
-                NativeUtil.macAddressToByteArray("16:ed:ab:12:45:34"),
-                true, false));
-        groups.put(2, new P2pGroupInfo(
-                "test_4545",
-                NativeUtil.macAddressToByteArray("32:89:23:56:45:34"),
-                true, false));
-        groups.put(3, new P2pGroupInfo(
-                "iShouldntBeHere",
-                NativeUtil.macAddressToByteArray("aa:bb:cc:56:45:34"),
-                true, true));
-
-        doAnswer(new AnswerWithArguments() {
-            public int[] answer() {
-                Set<Integer> keys = groups.keySet();
-                int[] networks = new int[keys.size()];
-                int index = 0;
-                for (Integer e : keys) {
-                    networks[index++] = e;
-                }
-                return networks;
-            }
-        }).when(mISupplicantP2pIfaceMock).listNetworks();
-
-        doAnswer(new AnswerWithArguments() {
-            public ISupplicantP2pNetwork answer(final int networkId) {
-                try {
-                    doAnswer(new AnswerWithArguments() {
-                        public byte[] answer() {
-                            return NativeUtil.stringToByteArray(groups.get(networkId).ssid);
-                        }
-                    }).when(mISupplicantP2pNetworkMock).getSsid();
-                    doAnswer(new AnswerWithArguments() {
-                        public byte[] answer() {
-                            return groups.get(networkId).bssid;
-                        }
-                    }).when(mISupplicantP2pNetworkMock).getBssid();
-                    doAnswer(new AnswerWithArguments() {
-                        public boolean answer() {
-                            return groups.get(networkId).isCurrent;
-                        }
-                    }).when(mISupplicantP2pNetworkMock).isCurrent();
-                    doAnswer(new AnswerWithArguments() {
-                        public boolean answer() {
-                            return groups.get(networkId).isGroupOwner;
-                        }
-                    }).when(mISupplicantP2pNetworkMock).isGroupOwner();
-                } catch (RemoteException e) { }
-                return mISupplicantP2pNetworkMock;
-            }
-        }).when(mISupplicantP2pIfaceMock).getNetwork(anyInt());
-
-        WifiP2pGroupList p2pGroups = new WifiP2pGroupList();
-        assertTrue(mDut.loadGroups(p2pGroups));
-
-        assertEquals(3, p2pGroups.getGroupList().size());
-        for (WifiP2pGroup group : p2pGroups.getGroupList()) {
-            int networkId = group.getNetworkId();
-            assertEquals(groups.get(networkId).ssid, group.getNetworkName());
-            assertEquals(
-                    NativeUtil.macAddressFromByteArray(groups.get(networkId).bssid),
-                    group.getOwner().deviceAddress);
-            assertEquals(groups.get(networkId).isGroupOwner, group.isGroupOwner());
-        }
-    }
-
-    /**
-     * Sunny day scenario for setClientList()
-     */
-    @Test
-    public void testSetClientList() throws Exception {
-        int testNetworkId = 5;
-        final String client1 = mGroupOwnerMacAddress;
-        final String client2 = mPeerMacAddress;
-
-        executeAndValidateInitializationSequence(false, false);
-        doAnswer(new AnswerWithArguments() {
-            public ISupplicantP2pNetwork answer(int networkId) {
-                if (networkId == testNetworkId) {
-                    return mISupplicantP2pNetworkMock;
-                } else {
-                    return null;
-                }
-            }
-        }).when(mISupplicantP2pIfaceMock).getNetwork(anyInt());
-        doNothing().when(mISupplicantP2pNetworkMock).setClientList(any(MacAddress[].class));
-
-        String clientList = client1 + " " + client2;
-        assertTrue(mDut.setClientList(testNetworkId, clientList));
-        verify(mISupplicantP2pIfaceMock).getNetwork(anyInt());
-        ArgumentCaptor<MacAddress[]> capturedClients = ArgumentCaptor.forClass(MacAddress[].class);
-        verify(mISupplicantP2pNetworkMock).setClientList(capturedClients.capture());
-
-        // Convert these to long to help with comparisons.
-        MacAddress[] clients = capturedClients.getValue();
-        ArrayList<Long> expectedClients = new ArrayList<Long>() {{
-                add(NativeUtil.macAddressToLong(mGroupOwnerMacAddressBytes));
-                add(NativeUtil.macAddressToLong(mPeerMacAddressBytes));
-            }};
-        ArrayList<Long> receivedClients = new ArrayList<Long>();
-        for (MacAddress client : clients) {
-            receivedClients.add(NativeUtil.macAddressToLong(client.data));
-        }
-        assertEquals(expectedClients, receivedClients);
-    }
-
-    /**
-     * Failure scenario for setClientList() when getNetwork returns null.
-     */
-    @Test
-    public void testSetClientListFailureDueToGetNetwork() throws Exception {
-        int testNetworkId = 5;
-        final String client1 = mGroupOwnerMacAddress;
-        final String client2 = mPeerMacAddress;
-
-        executeAndValidateInitializationSequence(false, false);
-        doReturn(null).when(mISupplicantP2pIfaceMock).getNetwork(anyInt());
-        doNothing().when(mISupplicantP2pNetworkMock).setClientList(any(MacAddress[].class));
-
-        String clientList = client1 + " " + client2;
-        assertFalse(mDut.setClientList(testNetworkId, clientList));
-        verify(mISupplicantP2pIfaceMock).getNetwork(anyInt());
-        verify(mISupplicantP2pNetworkMock, never()).setClientList(any(MacAddress[].class));
-    }
-
-    /**
-     * Sunny day scenario for getClientList()
-     */
-    @Test
-    public void testGetClientList() throws Exception {
-        int testNetworkId = 5;
-        MacAddress client1 = new MacAddress();
-        MacAddress client2 = new MacAddress();
-        client1.data = NativeUtil.macAddressToByteArray(mGroupOwnerMacAddress);
-        client2.data = NativeUtil.macAddressToByteArray(mPeerMacAddress);
-        MacAddress[] clientList = {client1, client2};
-
-        executeAndValidateInitializationSequence(false, false);
-        doAnswer(new AnswerWithArguments() {
-            public ISupplicantP2pNetwork answer(final int networkId) {
-                if (networkId == testNetworkId) {
-                    return mISupplicantP2pNetworkMock;
-                } else {
-                    return null;
-                }
-            }
-        }).when(mISupplicantP2pIfaceMock).getNetwork(anyInt());
-        doReturn(clientList).when(mISupplicantP2pNetworkMock).getClientList();
-
-        String expectedClients = NativeUtil.macAddressFromByteArray(client1.data)
-                + " " + NativeUtil.macAddressFromByteArray(client2.data);
-        assertEquals(expectedClients, mDut.getClientList(testNetworkId));
-        verify(mISupplicantP2pIfaceMock).getNetwork(anyInt());
-        verify(mISupplicantP2pNetworkMock).getClientList();
-    }
-
-    /**
-     * Failure scenario for getClientList() when getNetwork returns null.
-     */
-    @Test
-    public void testGetClientListFailureDueToGetNetwork() throws Exception {
-        int testNetworkId = 5;
-        MacAddress client1 = new MacAddress();
-        MacAddress client2 = new MacAddress();
-        client1.data = NativeUtil.macAddressToByteArray(mGroupOwnerMacAddress);
-        client2.data = NativeUtil.macAddressToByteArray(mPeerMacAddress);
-        MacAddress[] clientList = {client1, client2};
-
-        executeAndValidateInitializationSequence(false, false);
-        doReturn(null).when(mISupplicantP2pIfaceMock).getNetwork(anyInt());
-        doReturn(clientList).when(mISupplicantP2pNetworkMock).getClientList();
-
-        assertNull(mDut.getClientList(testNetworkId));
-        verify(mISupplicantP2pIfaceMock).getNetwork(anyInt());
-        verify(mISupplicantP2pNetworkMock, never()).getClientList();
-    }
-
-    /**
-     * Sunny day scenario for saveConfig()
-     */
-    @Test
-    public void testSaveConfig() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).saveConfig();
-
-        // Should fail before initialization.
-        assertFalse(mDut.saveConfig());
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.saveConfig());
-        verify(mISupplicantP2pIfaceMock).saveConfig();
-    }
-
-    /**
-     * Sunny day scenario for setMacRandomization()
-     */
-    @Test
-    public void testEnableMacRandomization() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).setMacRandomization(anyBoolean());
-
-        // Should fail before initialization.
-        assertFalse(mDut.setMacRandomization(true));
-        executeAndValidateInitializationSequence(false, false);
-        assertTrue(mDut.setMacRandomization(true));
-        verify(mISupplicantP2pIfaceMock).setMacRandomization(eq(true));
-    }
-
-    /**
-     * Sunny day scenario for removeClient()
-     */
-    @Test
-    public void testRemoveClientSuccess() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doNothing().when(mISupplicantP2pIfaceMock).removeClient(
-                eq(mPeerMacAddressBytes), anyBoolean());
-
-        assertTrue(mDut.removeClient(mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMock).removeClient(eq(mPeerMacAddressBytes), eq(true));
-    }
-
-    /**
-     * Failure scenario for removeClient() due to invalid peer mac address
-     */
-    @Test
-    public void testRemoveClientFailureForInvalidPeerAddress() throws Exception {
-        assertFalse(mDut.removeClient(mInvalidMacAddress1, true));
-        verify(mISupplicantP2pIfaceMock, never())
-                .removeClient(any(byte[].class), eq(true));
-    }
-
-    /**
-     * Failure scenario for removeClient() when ISupplicant throws exception.
-     */
-    @Test
-    public void testRemoveClientFailureInSupplicantIface() throws Exception {
-        executeAndValidateInitializationSequence(false, false);
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock).removeClient(
-                eq(mPeerMacAddressBytes), anyBoolean());
-
-        assertFalse(mDut.removeClient(mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMock).removeClient(eq(mPeerMacAddressBytes), eq(true));
-    }
-
-    /**
-     * Sunny day scenario for setVendorElements()
-     */
-    @Test
-    public void testSetVendorElementsSuccess() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).setVendorElements(anyInt(), any());
-        executeAndValidateInitializationSequence(false, false);
-        Set<ScanResult.InformationElement> ies =  new HashSet<>();
-        ies.add(new ScanResult.InformationElement(221, 0, new byte[]{(byte) 0xb}));
-        byte[] iesBytes = new byte[] {(byte) 221, (byte) 1, (byte) 0xb};
-
-        assertTrue(mDut.setVendorElements(ies));
-        verify(mISupplicantP2pIfaceMock).setVendorElements(
-                eq(P2pFrameTypeMask.P2P_FRAME_PROBE_RESP_P2P),
-                aryEq(iesBytes));
-    }
-
-    /**
-     * Sunny day scenario for setVendorElements() when VSIEs list is empty.
-     */
-    @Test
-    public void testSetVendorElementsSuccessWithEmptyVsieList() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).setVendorElements(anyInt(), any());
-        executeAndValidateInitializationSequence(false, false);
-        Set<ScanResult.InformationElement> ies =  new HashSet<>();
-        byte[] iesBytes = new byte[0];
-
-        assertTrue(mDut.setVendorElements(ies));
-        verify(mISupplicantP2pIfaceMock).setVendorElements(
-                eq(P2pFrameTypeMask.P2P_FRAME_PROBE_RESP_P2P),
-                aryEq(iesBytes));
-    }
-
-    /**
-     * Failure scenario for setVendorElements() when VSIE list is null.
-     */
-    @Test
-    public void testSetVendorElementsFailureWithNullVsieList() throws Exception {
-        doNothing().when(mISupplicantP2pIfaceMock).setVendorElements(anyInt(), any());
-        executeAndValidateInitializationSequence(false, false);
-        assertFalse(mDut.setVendorElements(null));
-        verify(mISupplicantP2pIfaceMock, never()).setVendorElements(anyInt(), any());
-    }
-
-    /**
-     * Failure scenario for setVendorElements() when RemoteException is thrown.
-     */
-    @Test
-    public void testSetVendorElementsFailureWithRemoteException() throws Exception {
-        doThrow(new RemoteException()).when(mISupplicantP2pIfaceMock)
-                .setVendorElements(anyInt(), any(byte[].class));
-
-        executeAndValidateInitializationSequence(false, false);
-        Set<ScanResult.InformationElement> ies =  new HashSet<>();
-
-        assertFalse(mDut.setVendorElements(ies));
-        verify(mISupplicantP2pIfaceMock).setVendorElements(
-                eq(P2pFrameTypeMask.P2P_FRAME_PROBE_RESP_P2P),
-                aryEq(new byte[0]));
-    }
-
-    /**
-     * Calls initialize and addP2pInterface to mock the startup sequence.
-     * The two arguments will each trigger a different failure in addP2pInterface
-     * when set to true.
-     */
-    private void executeAndValidateInitializationSequence(boolean causeRemoteException,
-            boolean getNullInterface) throws Exception {
-        boolean shouldSucceed = !causeRemoteException && !getNullInterface;
-        // Setup addP2pInterface mock answers
-        if (causeRemoteException) {
-            doThrow(new RemoteException())
-                    .when(mISupplicantMock).addP2pInterface(anyString());
-        } else if (getNullInterface) {
-            doReturn(null)
-                    .when(mISupplicantMock).addP2pInterface(anyString());
-        } else {
-            doReturn(mISupplicantP2pIfaceMock)
-                    .when(mISupplicantMock).addP2pInterface(anyString());
-        }
-
-        assertTrue(mDut.initialize());
-        verify(mServiceBinderMock).linkToDeath(any(IBinder.DeathRecipient.class), anyInt());
-        assertTrue(mDut.isInitializationComplete());
-
-        // Now setup the iface.
-        assertEquals(shouldSucceed, mDut.setupIface(mIfaceName));
-        verify(mISupplicantMock).addP2pInterface(anyString());
-        if (!causeRemoteException && !getNullInterface) {
-            verify(mISupplicantP2pIfaceMock).registerCallback(
-                    any(ISupplicantP2pIfaceCallback.class));
-        }
-    }
-
-    /**
-     * Create new placeholder WifiP2pConfig instance.
-     */
-    private WifiP2pConfig createPlaceholderP2pConfig(String peerAddress,
-            int wpsProvMethod, String pin) {
-        WifiP2pConfig config = new WifiP2pConfig();
-        config.wps = new WpsInfo();
-        config.deviceAddress = peerAddress;
-        config.wps.setup = wpsProvMethod;
-        config.wps.pin = pin;
-        config.groupOwnerIntent = WifiP2pServiceImpl.DEFAULT_GROUP_OWNER_INTENT;
-        return config;
-    }
-
-    /**
-     * Create new placeholder WifiP2pGroup instance.
-     */
-    private WifiP2pGroup createPlaceholderP2pGroup() {
-        WifiP2pGroup group = new WifiP2pGroup();
-        group.setInterface(mIfaceName);
-        WifiP2pDevice owner = new WifiP2pDevice();
-        owner.deviceAddress = mGroupOwnerMacAddress;
-        group.setOwner(owner);
-        return group;
-    }
-
-    /**
-     * Create new placeholder WifiP2pServiceInfo instance.
-     */
-    private WifiP2pServiceInfo createPlaceholderP2pServiceInfo(String... services) {
-        class TestP2pServiceInfo extends WifiP2pServiceInfo {
-            TestP2pServiceInfo(String[] services) {
-                super(Arrays.asList(services));
-            }
-        }
-        return new TestP2pServiceInfo(services);
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceHalHidlImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceHalHidlImplTest.java
deleted file mode 100644
index 16ddd06..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceHalHidlImplTest.java
+++ /dev/null
@@ -1,2988 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi.p2p;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyByte;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.anyLong;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.when;
-
-import android.app.test.MockAnswerUtil.AnswerWithArguments;
-import android.hardware.wifi.supplicant.V1_0.ISupplicant;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantIface;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantNetwork;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pIface;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pIfaceCallback;
-import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pNetwork;
-import android.hardware.wifi.supplicant.V1_0.IfaceType;
-import android.hardware.wifi.supplicant.V1_0.SupplicantStatus;
-import android.hardware.wifi.supplicant.V1_0.SupplicantStatusCode;
-import android.hidl.manager.V1_0.IServiceManager;
-import android.hidl.manager.V1_0.IServiceNotification;
-import android.net.wifi.CoexUnsafeChannel;
-import android.net.wifi.WpsInfo;
-import android.net.wifi.p2p.WifiP2pConfig;
-import android.net.wifi.p2p.WifiP2pDevice;
-import android.net.wifi.p2p.WifiP2pGroup;
-import android.net.wifi.p2p.WifiP2pGroupList;
-import android.net.wifi.p2p.WifiP2pManager;
-import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
-import android.os.IHwBinder;
-import android.os.RemoteException;
-import android.text.TextUtils;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.util.NativeUtil;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InOrder;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Unit tests for SupplicantP2pIfaceHalHidlImpl
- */
-@SmallTest
-public class SupplicantP2pIfaceHalHidlImplTest extends WifiBaseTest {
-    private SupplicantP2pIfaceHalHidlImpl mDut;
-    private @Mock IServiceManager mServiceManagerMock;
-    private @Mock ISupplicant mISupplicantMock;
-    private android.hardware.wifi.supplicant.V1_1.ISupplicant mISupplicantMockV11;
-    private @Mock ISupplicantIface mISupplicantIfaceMock;
-    private @Mock ISupplicantP2pIface mISupplicantP2pIfaceMock;
-    private @Mock android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface
-            mISupplicantP2pIfaceMockV12;
-    private boolean mISupplicantV12Enabled;
-    private @Mock ISupplicantP2pNetwork mISupplicantP2pNetworkMock;
-    private @Mock WifiP2pMonitor mWifiMonitor;
-
-    SupplicantStatus mStatusSuccess;
-    SupplicantStatus mStatusFailure;
-    RemoteException mRemoteException;
-    ISupplicant.IfaceInfo mStaIface;
-    ISupplicant.IfaceInfo mP2pIface;
-    ArrayList<ISupplicant.IfaceInfo> mIfaceInfoList;
-    private IHwBinder.DeathRecipient mDeathRecipient = null;
-
-    final String mIfaceName = "virtual_interface_name";
-    final String mSsid = "\"SSID\"";
-    final ArrayList<Byte> mSsidBytes = new ArrayList<Byte>() {{
-            add((byte) 'S'); add((byte) 'S'); add((byte) 'I'); add((byte) 'D');
-        }};
-    final String mPeerMacAddress = "00:11:22:33:44:55";
-    final byte[] mPeerMacAddressBytes = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 };
-    final String mGroupOwnerMacAddress = "01:12:23:34:45:56";
-    final byte[] mGroupOwnerMacAddressBytes = { 0x01, 0x12, 0x23, 0x34, 0x45, 0x56 };
-    final String mInvalidMacAddress1 = "00:11:22:33:44";
-    final String mInvalidMacAddress2 = ":::::";
-    final String mInvalidMacAddress3 = "invalid";
-    final byte[] mInvalidMacAddressBytes1 = null;
-    final byte[] mInvalidMacAddressBytes2 = {};
-    final byte[] mInvalidMacAddressBytes3 = { 0x00, 0x01, 0x02, 0x03, 0x04 };
-    final byte[] mInvalidMacAddressBytes4 = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
-    HashSet<String> mInvalidMacAddresses = new HashSet<String>(Arrays.asList(
-            mInvalidMacAddress1, mInvalidMacAddress2,
-            mInvalidMacAddress3));
-    HashSet<byte[]> mInvalidMacAddressesBytes = new HashSet<byte[]>(Arrays.asList(
-            mInvalidMacAddressBytes1, mInvalidMacAddressBytes2,
-            mInvalidMacAddressBytes3, mInvalidMacAddressBytes4));
-
-    final String mInvalidService1 = null;
-    final String mInvalidService2 = "service";
-    final String mValidServiceRequestString = "30313233";
-    final byte[] mValidServiceRequestBytes = { 0x30, 0x31, 0x32, 0x33 };
-    final String mInvalidServiceRequestString = "not a hex string";
-    final String mInvalidUpnpService1 = "upnp";
-    final String mInvalidUpnpService2 = "upnp 1";
-    final String mInvalidUpnpService3 = "upnp invalid_number name";
-    final String mInvalidBonjourService1 = "bonjour";
-    final String mInvalidBonjourService2 = "bonjour 123456";
-    final String mInvalidBonjourService3 = "bonjour invalid_hex 123456";
-    final String mInvalidBonjourService4 = "bonjour 123456 invalid_hex";
-    final String mValidUpnpService = "upnp 10 serviceName";
-    final int mValidUpnpServiceVersion = 16;
-    final String mValidUpnpServiceName = "serviceName";
-    final String mValidBonjourService = "bonjour 30313233 34353637";
-    final ArrayList<Byte> mValidBonjourServiceRequest = new ArrayList<Byte>() {{
-            add((byte) '0'); add((byte) '1'); add((byte) '2'); add((byte) '3');
-        }};
-    final ArrayList<Byte> mValidBonjourServiceResponse = new ArrayList<Byte>() {{
-            add((byte) '4'); add((byte) '5'); add((byte) '6'); add((byte) '7');
-        }};
-
-    // variables for groupAdd with config
-    final String mNetworkName = "DIRECT-xy-Hello";
-    final String mPassphrase = "12345678";
-    final int mGroupOwnerBand = WifiP2pConfig.GROUP_OWNER_BAND_5GHZ;
-    final boolean mIsPersistent = false;
-
-    private ArgumentCaptor<IHwBinder.DeathRecipient> mDeathRecipientCaptor =
-            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
-    private ArgumentCaptor<IServiceNotification.Stub> mServiceNotificationCaptor =
-            ArgumentCaptor.forClass(IServiceNotification.Stub.class);
-    private InOrder mInOrder;
-
-    private class SupplicantP2pIfaceHalSpy extends SupplicantP2pIfaceHalHidlImpl {
-        SupplicantP2pIfaceHalSpy() {
-            super(mWifiMonitor);
-        }
-
-        @Override
-        protected IServiceManager getServiceManagerMockable() throws RemoteException {
-            return mServiceManagerMock;
-        }
-
-        @Override
-        protected ISupplicant getSupplicantMockable() throws RemoteException {
-            return mISupplicantMock;
-        }
-
-        @Override
-        protected android.hardware.wifi.supplicant.V1_1.ISupplicant getSupplicantMockableV1_1() {
-            return mISupplicantMockV11;
-        }
-
-        @Override
-        protected ISupplicantP2pIface getP2pIfaceMockable(ISupplicantIface iface) {
-            return mISupplicantP2pIfaceMock;
-        }
-
-        @Override
-        protected android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface
-                getP2pIfaceMockableV1_2() {
-            return mISupplicantV12Enabled ? mISupplicantP2pIfaceMockV12 : null;
-        }
-
-        @Override
-        protected ISupplicantP2pNetwork getP2pNetworkMockable(ISupplicantNetwork network) {
-            return mISupplicantP2pNetworkMock;
-        }
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mStatusSuccess = createSupplicantStatus(SupplicantStatusCode.SUCCESS);
-        mStatusFailure = createSupplicantStatus(SupplicantStatusCode.FAILURE_UNKNOWN);
-        mRemoteException = new RemoteException("Test Remote Exception");
-        mStaIface = createIfaceInfo(IfaceType.STA, "wlan0");
-        mP2pIface = createIfaceInfo(IfaceType.P2P, mIfaceName);
-
-        mIfaceInfoList = new ArrayList<ISupplicant.IfaceInfo>();
-        mIfaceInfoList.add(mStaIface);
-        mIfaceInfoList.add(mP2pIface);
-
-        mISupplicantV12Enabled = false;
-
-        when(mServiceManagerMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
-                anyLong())).thenReturn(true);
-        when(mServiceManagerMock.registerForNotifications(anyString(), anyString(),
-                any(IServiceNotification.Stub.class))).thenReturn(true);
-        when(mISupplicantMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
-                anyLong())).thenReturn(true);
-        when(mISupplicantP2pIfaceMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
-                anyLong())).thenReturn(true);
-        when(mISupplicantP2pIfaceMock.registerCallback(any(ISupplicantP2pIfaceCallback.class)))
-                .thenReturn(mStatusSuccess);
-        mDut = new SupplicantP2pIfaceHalSpy();
-    }
-
-    /**
-     * Sunny day scenario for SupplicantP2pIfaceHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_success() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-    }
-
-    /**
-     * Tests the initialization flow, with a RemoteException occurring when 'getInterface' is called
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_remoteExceptionFailure() throws Exception {
-        executeAndValidateInitializationSequence(true, false, false);
-    }
-
-    /**
-     * Tests the initialization flow, with listInterfaces returning 0 interfaces.
-     * Ensures failure
-     */
-    @Test
-    public void testInitialize_zeroInterfacesFailure() throws Exception {
-        executeAndValidateInitializationSequence(false, true, false);
-    }
-
-    /**
-     * Tests the initialization flow, with a null interface being returned by getInterface.
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_nullInterfaceFailure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, true);
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal initialization
-     * Asserts successful initialization
-     */
-    @Test
-    public void testInitialize_successV1_1() throws Exception {
-        mISupplicantMockV11 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
-        executeAndValidateInitializationSequenceV1_1(false, false);
-    }
-
-    /**
-     * Tests the initialization flow, with a RemoteException occurring when 'getInterface' is called
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_remoteExceptionFailureV1_1() throws Exception {
-        mISupplicantMockV11 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
-        executeAndValidateInitializationSequenceV1_1(true, false);
-    }
-
-    /**
-     * Tests the initialization flow, with a null interface being returned by getInterface.
-     * Ensures initialization fails.
-     */
-    @Test
-    public void testInitialize_nullInterfaceFailureV1_1() throws Exception {
-        mISupplicantMockV11 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
-        executeAndValidateInitializationSequenceV1_1(false, true);
-    }
-
-    /**
-     * Ensures that reject addition of an existing iface.
-     */
-    @Test
-    public void testDuplicateSetupIfaceV1_1_Fails() throws Exception {
-        mISupplicantMockV11 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
-        executeAndValidateInitializationSequenceV1_1(false, false);
-
-        // Trying setting up the p2p0 interface again & ensure it fails.
-        assertFalse(mDut.setupIface(mIfaceName));
-        verifyNoMoreInteractions(mISupplicantMockV11);
-    }
-
-    /**
-     * Sunny day scenario for SupplicantStaIfaceHal teardown.
-     * Asserts successful teardown.
-     * Note: Only applicable for 1.1 supplicant HAL.
-     */
-    @Test
-    public void testTeardown_successV1_1() throws Exception {
-        mISupplicantMockV11 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
-        executeAndValidateInitializationSequenceV1_1(false, false);
-
-        when(mISupplicantMockV11.removeInterface(any(ISupplicant.IfaceInfo.class)))
-                .thenReturn(mStatusSuccess);
-        assertTrue(mDut.teardownIface(mIfaceName));
-        verify(mISupplicantMockV11).removeInterface(any());
-    }
-
-    /**
-     * Ensures that we reject removal of an invalid iface.
-     */
-    @Test
-    public void testInvalidTeardownInterfaceV1_1_Fails() throws Exception {
-        assertFalse(mDut.teardownIface(mIfaceName));
-        verifyNoMoreInteractions(mISupplicantMock);
-    }
-
-    /**
-     * Verify misorder supplicant death case.
-     */
-    @Test
-    public void testMisorderSupplicantDeathHandlingV1_1() throws Exception {
-        mISupplicantMockV11 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
-        doAnswer(new AnswerWithArguments() {
-            public boolean answer(IHwBinder.DeathRecipient cb, long cookie) throws RemoteException {
-                mDeathRecipient = cb;
-                return true;
-            }
-        }).when(mISupplicantMock).linkToDeath(any(IHwBinder.DeathRecipient.class),
-                anyLong());
-
-        executeAndValidateInitializationSequenceV1_1(false, false);
-        mDeathRecipient.serviceDied(0L);
-        assertFalse(mDut.teardownIface(mIfaceName));
-    }
-
-    /**
-     * Sunny day scenario for getName()
-     */
-    @Test
-    public void testGetName_success() throws Exception {
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantIface.getNameCallback cb) throws RemoteException {
-                cb.onValues(mStatusSuccess, mIfaceName);
-            }
-        })
-        .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class));
-
-        // Default value when service is not initialized.
-        assertNull(mDut.getName());
-        executeAndValidateInitializationSequence(false, false, false);
-        assertEquals(mIfaceName, mDut.getName());
-    }
-
-    /**
-     * Verify that getName returns null, if status is not SUCCESS.
-     */
-    @Test
-    public void testGetName_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantIface.getNameCallback cb) throws RemoteException {
-                cb.onValues(mStatusFailure, "none");
-            }
-        })
-        .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class));
-        assertNull(mDut.getName());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that getName disconnects and returns null, if HAL throws exception.
-     */
-    @Test
-    public void testGetName_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantIface.getNameCallback cb) throws RemoteException {
-                throw new RemoteException("Test");
-            }
-        })
-        .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class));
-        assertNull(mDut.getName());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for find(int)
-     */
-    @Test
-    public void testFind_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.find(anyInt())).thenReturn(mStatusSuccess);
-        // Default value when service is not yet initialized.
-        assertFalse(mDut.find(1));
-
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.find(1));
-        assertFalse(mDut.find(-1));
-    }
-
-    /**
-     * Verify that find returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testFind_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.find(anyInt())).thenReturn(mStatusFailure);
-        assertFalse(mDut.find(1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that find disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testFind_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.find(anyInt())).thenThrow(mRemoteException);
-        assertFalse(mDut.find(1));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that find with {@link WifiP2pManager#WifiP2pScanType} returns false
-     */
-    @Test
-    public void testFindWithType() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        assertFalse(mDut.find(WifiP2pManager.WIFI_P2P_SCAN_FULL,
-                              WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, 0));
-        verify(mISupplicantP2pIfaceMock, never()).find(anyInt());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for stopFind()
-     */
-    @Test
-    public void testStopFind_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.stopFind()).thenReturn(mStatusSuccess);
-        // Default value when service is not yet initialized.
-        assertFalse(mDut.stopFind());
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.stopFind());
-    }
-
-    /**
-     * Verify that stopFind returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testStopFind_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.stopFind()).thenReturn(mStatusFailure);
-        assertFalse(mDut.stopFind());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that stopFind disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testStopFind_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.stopFind()).thenThrow(mRemoteException);
-        assertFalse(mDut.stopFind());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for flush()
-     */
-    @Test
-    public void testFlush_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.flush()).thenReturn(mStatusSuccess);
-        // Default value when service is not yet initialized.
-        assertFalse(mDut.flush());
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.flush());
-    }
-
-    /**
-     * Verify that flush returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testFlush_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.flush()).thenReturn(mStatusFailure);
-        assertFalse(mDut.flush());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that flush disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testFlush_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.flush()).thenThrow(mRemoteException);
-        assertFalse(mDut.flush());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for serviceFlush()
-     */
-    @Test
-    public void testServiceFlush_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.flushServices()).thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.serviceFlush());
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.serviceFlush());
-    }
-
-    /**
-     * Verify that serviceFlush returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testServiceFlush_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.flushServices()).thenReturn(mStatusFailure);
-        assertFalse(mDut.serviceFlush());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that serviceFlush disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testServiceFlush_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.flushServices()).thenThrow(mRemoteException);
-        assertFalse(mDut.serviceFlush());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for setPowerSave()
-     */
-    @Test
-    public void testSetPowerSave_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.setPowerSave(eq(mIfaceName), anyBoolean()))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.setPowerSave(mIfaceName, true));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.setPowerSave(mIfaceName, true));
-    }
-
-    /**
-     * Verify that setPowerSave returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testSetPowerSave_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setPowerSave(eq(mIfaceName), anyBoolean()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.setPowerSave(mIfaceName, true));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setPowerSave disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testSetPowerSave_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setPowerSave(eq(mIfaceName), anyBoolean()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.setPowerSave(mIfaceName, true));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for setGroupIdle()
-     */
-    @Test
-    public void testSetGroupIdle_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.setGroupIdle(eq(mIfaceName), anyInt()))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.setGroupIdle(mIfaceName, 1));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.setGroupIdle(mIfaceName, 1));
-        assertFalse(mDut.setGroupIdle(mIfaceName, -1));
-    }
-
-    /**
-     * Verify that setGroupIdle returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testSetGroupIdle_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setGroupIdle(eq(mIfaceName), anyInt()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.setGroupIdle(mIfaceName, 1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setGroupIdle disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testSetGroupIdle_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setGroupIdle(eq(mIfaceName), anyInt()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.setGroupIdle(mIfaceName, 1));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for setSsidPostfix()
-     */
-    @Test
-    public void testSetSsidPostfix_success() throws Exception {
-        String ssid = "SSID POSTFIX";
-        when(mISupplicantP2pIfaceMock.setSsidPostfix(eq(NativeUtil.decodeSsid("\"" + ssid + "\""))))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.setSsidPostfix(ssid));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.setSsidPostfix(ssid));
-        assertFalse(mDut.setSsidPostfix(null));
-    }
-
-    /**
-     * Verify that setSsidPostfix returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testSetSsidPostfix_failure() throws Exception {
-        String ssid = "SSID POSTFIX";
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setSsidPostfix(eq(NativeUtil.decodeSsid("\"" + ssid + "\""))))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.setSsidPostfix(ssid));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setSsidPostfix disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testSetSsidPostfix_exception() throws Exception {
-        String ssid = "SSID POSTFIX";
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setSsidPostfix(eq(NativeUtil.decodeSsid("\"" + ssid + "\""))))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.setSsidPostfix(ssid));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for connect()
-     */
-    @Test
-    public void testConnect_success() throws Exception {
-        final String configPin = "12345";
-        final HashSet<Integer> methods = new HashSet<>();
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] peer, int method, String pin, boolean joinExisting,
-                    boolean persistent, int goIntent,
-                    ISupplicantP2pIface.connectCallback cb) throws RemoteException {
-                methods.add(method);
-
-                if (method == ISupplicantP2pIface.WpsProvisionMethod.DISPLAY
-                        && TextUtils.isEmpty(pin)) {
-                    // Return the configPin for DISPLAY method if the pin was not provided.
-                    cb.onValues(mStatusSuccess, configPin);
-                } else {
-                    if (method != ISupplicantP2pIface.WpsProvisionMethod.PBC) {
-                        // PIN is only required for PIN methods.
-                        assertEquals(pin, configPin);
-                    }
-                    // For all the other cases, there is no generated pin.
-                    cb.onValues(mStatusSuccess, "");
-                }
-            }
-        }).when(mISupplicantP2pIfaceMock).connect(
-                eq(mPeerMacAddressBytes), anyInt(), anyString(), anyBoolean(), anyBoolean(),
-                anyInt(), any(ISupplicantP2pIface.connectCallback.class));
-
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.DISPLAY, "");
-
-        // Default value when service is not initialized.
-        assertNull(mDut.connect(config, false));
-
-        executeAndValidateInitializationSequence(false, false, false);
-
-        assertEquals(configPin, mDut.connect(config, false));
-        assertTrue(methods.contains(ISupplicantP2pIface.WpsProvisionMethod.DISPLAY));
-        methods.clear();
-
-        config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.DISPLAY, configPin);
-        assertTrue(mDut.connect(config, false).isEmpty());
-        assertTrue(methods.contains(ISupplicantP2pIface.WpsProvisionMethod.DISPLAY));
-        methods.clear();
-
-        config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
-        assertTrue(mDut.connect(config, false).isEmpty());
-        assertTrue(methods.contains(ISupplicantP2pIface.WpsProvisionMethod.PBC));
-        methods.clear();
-
-        config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.KEYPAD, configPin);
-        assertTrue(mDut.connect(config, false).isEmpty());
-        assertTrue(methods.contains(ISupplicantP2pIface.WpsProvisionMethod.KEYPAD));
-    }
-
-    /**
-     * Test connect with invalid arguments.
-     */
-    @Test
-    public void testConnect_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] peer, int method, String pin, boolean joinExisting,
-                    boolean persistent, int goIntent,
-                    ISupplicantP2pIface.connectCallback cb) throws RemoteException {
-                cb.onValues(mStatusSuccess, pin);
-            }
-        }).when(mISupplicantP2pIfaceMock).connect(
-                any(byte[].class), anyInt(), anyString(), anyBoolean(), anyBoolean(),
-                anyInt(), any(ISupplicantP2pIface.connectCallback.class));
-
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.DISPLAY, "");
-
-        // unsupported.
-        config.wps.setup = -1;
-        assertNull(mDut.connect(config, false));
-
-        // Invalid peer address.
-        config.wps.setup = WpsInfo.DISPLAY;
-        for (String address : mInvalidMacAddresses) {
-            config.deviceAddress = address;
-            assertNull(mDut.connect(config, false));
-        }
-
-        // null pin not valid.
-        config.wps.setup = WpsInfo.DISPLAY;
-        config.wps.pin = null;
-        assertNull(mDut.connect(config, false));
-
-        // Pin should be empty for PBC.
-        config.wps.setup = WpsInfo.PBC;
-        config.wps.pin = "03455323";
-        assertNull(mDut.connect(config, false));
-    }
-
-    /**
-     * Verify that connect returns null, if status is not SUCCESS.
-     */
-    @Test
-    public void testConnect_failure() throws Exception {
-        final String configPin = "12345";
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress,
-                WpsInfo.DISPLAY, configPin);
-
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] peer, int method, String pin, boolean joinExisting,
-                    boolean persistent, int goIntent,
-                    ISupplicantP2pIface.connectCallback cb) throws RemoteException {
-                cb.onValues(mStatusFailure, null);
-            }
-        }).when(mISupplicantP2pIfaceMock).connect(
-                eq(mPeerMacAddressBytes), anyInt(), anyString(), anyBoolean(), anyBoolean(),
-                anyInt(), any(ISupplicantP2pIface.connectCallback.class));
-
-        assertNull(mDut.connect(config, false));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that connect disconnects and returns null, if HAL throws exception.
-     */
-    @Test
-    public void testConnect_exception() throws Exception {
-        final String configPin = "12345";
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress,
-                WpsInfo.DISPLAY, configPin);
-
-        doThrow(mRemoteException).when(mISupplicantP2pIfaceMock).connect(
-                eq(mPeerMacAddressBytes), anyInt(), anyString(), anyBoolean(), anyBoolean(),
-                anyInt(), any(ISupplicantP2pIface.connectCallback.class));
-
-        assertNull(mDut.connect(config, false));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for cancelConnect()
-     */
-    @Test
-    public void testCancelConnect_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.cancelConnect())
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.cancelConnect());
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.cancelConnect());
-    }
-
-    /**
-     * Verify that cancelConnect returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testCancelConnect_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.cancelConnect())
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.cancelConnect());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that cancelConnect disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testCancelConnect_exception() throws Exception {
-        String ssid = "\"SSID POSTFIX\"";
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.cancelConnect())
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.cancelConnect());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for provisionDiscovery()
-     */
-    @Test
-    public void testProvisionDiscovery_success() throws Exception {
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
-
-        when(mISupplicantP2pIfaceMock.provisionDiscovery(
-                eq(mPeerMacAddressBytes), anyInt()))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.provisionDiscovery(config));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.provisionDiscovery(config));
-    }
-
-    /**
-     * Test provisionDiscovery with invalid arguments.
-     */
-    @Test
-    public void testProvisionDiscovery_invalidArguments() throws Exception {
-        when(mISupplicantP2pIfaceMock.provisionDiscovery(
-                eq(mPeerMacAddressBytes), anyInt()))
-                .thenReturn(mStatusSuccess);
-        executeAndValidateInitializationSequence(false, false, false);
-
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
-
-        // Unsupported method.
-        config.wps.setup = -1;
-        assertFalse(mDut.provisionDiscovery(config));
-
-        config.wps.setup = WpsInfo.PBC;
-        for (String address : mInvalidMacAddresses) {
-            config.deviceAddress = address;
-            assertFalse(mDut.provisionDiscovery(config));
-        }
-    }
-
-    /**
-     * Verify that provisionDiscovery returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testProvisionDiscovery_failure() throws Exception {
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
-
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.provisionDiscovery(
-                eq(mPeerMacAddressBytes), anyInt()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.provisionDiscovery(config));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that provisionDiscovery disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testProvisionDiscovery_exception() throws Exception {
-        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
-
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.provisionDiscovery(
-                eq(mPeerMacAddressBytes), anyInt()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.provisionDiscovery(config));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for invite()
-     */
-    @Test
-    public void testInvite_success() throws Exception {
-        WifiP2pGroup group = createPlaceholderP2pGroup();
-
-        when(mISupplicantP2pIfaceMock.invite(
-                eq(mIfaceName), eq(mGroupOwnerMacAddressBytes), eq(mPeerMacAddressBytes)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.invite(group, mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.invite(group, mPeerMacAddress));
-    }
-
-    /**
-     * Invite with invalid arguments.
-     */
-    @Test
-    public void testInvite_invalidArguments() throws Exception {
-        WifiP2pGroup group = createPlaceholderP2pGroup();
-
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.invite(
-                anyString(), any(byte[].class), any(byte[].class)))
-                .thenReturn(mStatusSuccess);
-
-        for (String address : mInvalidMacAddresses) {
-            assertFalse(mDut.invite(group, address));
-        }
-
-        for (String address : mInvalidMacAddresses) {
-            group.getOwner().deviceAddress = address;
-            assertFalse(mDut.invite(group, mPeerMacAddress));
-        }
-
-        group.setOwner(null);
-        assertFalse(mDut.invite(group, mPeerMacAddress));
-        assertFalse(mDut.invite(null, mPeerMacAddress));
-    }
-
-    /**
-     * Verify that invite returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testInvite_failure() throws Exception {
-        WifiP2pGroup group = createPlaceholderP2pGroup();
-
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.invite(
-                anyString(), any(byte[].class), any(byte[].class)))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.invite(group, mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that invite disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testInvite_exception() throws Exception {
-        WifiP2pGroup group = createPlaceholderP2pGroup();
-
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.invite(
-                anyString(), any(byte[].class), any(byte[].class)))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.invite(group, mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for reject()
-     */
-    @Test
-    public void testReject_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.reject(eq(mPeerMacAddressBytes)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.reject(mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.reject(mPeerMacAddress));
-    }
-
-    /**
-     * Reject with invalid arguments.
-     */
-    @Test
-    public void testReject_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.reject(any(byte[].class)))
-                .thenReturn(mStatusSuccess);
-
-        for (String address : mInvalidMacAddresses) {
-            assertFalse(mDut.reject(address));
-        }
-    }
-
-    /**
-     * Verify that reject returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testReject_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.reject(any(byte[].class)))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.reject(mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that reject disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testReject_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.reject(any(byte[].class)))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.reject(mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for getDeviceAddress()
-     */
-    @Test
-    public void testGetDeviceAddress_success() throws Exception {
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantP2pIface.getDeviceAddressCallback cb) {
-                cb.onValues(mStatusSuccess, mPeerMacAddressBytes);
-            }
-        }).when(mISupplicantP2pIfaceMock).getDeviceAddress(
-                any(ISupplicantP2pIface.getDeviceAddressCallback.class));
-
-        // Default value when service is not initialized.
-        assertNull(mDut.getDeviceAddress());
-        executeAndValidateInitializationSequence(false, false, false);
-        assertEquals(mPeerMacAddress, mDut.getDeviceAddress());
-    }
-
-    /**
-     * Test getDeviceAddress() when invalid mac address is being reported.
-     */
-    @Test
-    public void testGetDeviceAddress_invalidResult() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        HashSet<byte[]> addresses = new HashSet<byte[]>(Arrays.asList(
-                mInvalidMacAddressBytes1, mInvalidMacAddressBytes2,
-                mInvalidMacAddressBytes3, mInvalidMacAddressBytes4));
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantP2pIface.getDeviceAddressCallback cb) {
-                byte[] address = addresses.iterator().next();
-                cb.onValues(mStatusSuccess, address);
-                addresses.remove(address);
-            }
-        }).when(mISupplicantP2pIfaceMock).getDeviceAddress(
-                any(ISupplicantP2pIface.getDeviceAddressCallback.class));
-
-        // Default value when service is not initialized.
-        while (!addresses.isEmpty()) {
-            assertNull(mDut.getDeviceAddress());
-        }
-    }
-
-    /**
-     * Verify that getDeviceAddress returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testGetDeviceAddress_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantP2pIface.getDeviceAddressCallback cb) {
-                cb.onValues(mStatusFailure, null);
-            }
-        }).when(mISupplicantP2pIfaceMock).getDeviceAddress(
-                any(ISupplicantP2pIface.getDeviceAddressCallback.class));
-
-        assertNull(mDut.getDeviceAddress());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that getDeviceAddress disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testGetDeviceAddress_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doThrow(mRemoteException).when(mISupplicantP2pIfaceMock).getDeviceAddress(
-                any(ISupplicantP2pIface.getDeviceAddressCallback.class));
-
-        assertNull(mDut.getDeviceAddress());
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for getSsid()
-     */
-    @Test
-    public void testGetSsid_success() throws Exception {
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] address, ISupplicantP2pIface.getSsidCallback cb) {
-                cb.onValues(mStatusSuccess, mSsidBytes);
-            }
-        }).when(mISupplicantP2pIfaceMock).getSsid(
-                eq(mPeerMacAddressBytes),
-                any(ISupplicantP2pIface.getSsidCallback.class));
-
-        // Default value when service is not initialized.
-        assertNull(mDut.getSsid(mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertEquals(NativeUtil.removeEnclosingQuotes(mSsid), mDut.getSsid(mPeerMacAddress));
-    }
-
-    /**
-     * Test getSsid() with invalid argument and response.
-     */
-    @Test
-    public void testGetSsid_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] address, ISupplicantP2pIface.getSsidCallback cb) {
-                cb.onValues(mStatusSuccess, mSsidBytes);
-            }
-        }).when(mISupplicantP2pIfaceMock).getSsid(
-                any(byte[].class), any(ISupplicantP2pIface.getSsidCallback.class));
-
-        for (String address : mInvalidMacAddresses) {
-            assertNull(mDut.getSsid(address));
-        }
-
-        // Simulate null response from HAL.
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] address, ISupplicantP2pIface.getSsidCallback cb) {
-                cb.onValues(mStatusSuccess, null);
-            }
-        }).when(mISupplicantP2pIfaceMock).getSsid(
-                any(byte[].class), any(ISupplicantP2pIface.getSsidCallback.class));
-
-        assertNull(mDut.getSsid(mPeerMacAddress));
-    }
-
-    /**
-     * Verify that getSsid returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testGetSsid_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] address, ISupplicantP2pIface.getSsidCallback cb) {
-                cb.onValues(mStatusFailure, null);
-            }
-        }).when(mISupplicantP2pIfaceMock).getSsid(
-                any(byte[].class), any(ISupplicantP2pIface.getSsidCallback.class));
-
-        assertNull(mDut.getSsid(mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that getSsid disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testGetSsid_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doThrow(mRemoteException).when(mISupplicantP2pIfaceMock).getSsid(
-                any(byte[].class), any(ISupplicantP2pIface.getSsidCallback.class));
-
-        assertNull(mDut.getSsid(mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for reinvoke()
-     */
-    @Test
-    public void testReinvoke_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.reinvoke(anyInt(), eq(mPeerMacAddressBytes)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.reinvoke(0, mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.reinvoke(0, mPeerMacAddress));
-    }
-
-    /**
-     * Reinvoke with invalid arguments.
-     */
-    @Test
-    public void testReinvoke_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.reinvoke(anyInt(), any(byte[].class)))
-                .thenReturn(mStatusSuccess);
-
-        for (String address : mInvalidMacAddresses) {
-            assertFalse(mDut.reinvoke(0, address));
-        }
-    }
-
-    /**
-     * Verify that reinvoke returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testReinvoke_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.reinvoke(anyInt(), any(byte[].class)))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.reinvoke(0, mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that reinvoke disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testReinvoke_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.reinvoke(anyInt(), any(byte[].class)))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.reinvoke(0, mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for groupAdd()
-     */
-    @Test
-    public void testGroupAdd_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.addGroup(eq(true), eq(3)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.groupAdd(3, true));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.groupAdd(3, true));
-    }
-
-    /**
-     * Verify that groupAdd returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testGroupAdd_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.addGroup(anyBoolean(), anyInt()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.groupAdd(0, true));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that groupAdd disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testGroupAdd_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.addGroup(anyBoolean(), anyInt()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.groupAdd(0, true));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for groupAdd() with config
-     */
-    @Test
-    public void testGroupAddWithConfigSuccess() throws Exception {
-        when(mISupplicantP2pIfaceMockV12.addGroup_1_2(
-                eq(NativeUtil.decodeSsid("\"" + mNetworkName + "\"")),
-                eq(mPassphrase),
-                eq(mIsPersistent),
-                eq(mGroupOwnerBand),
-                eq(mPeerMacAddressBytes),
-                anyBoolean()))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
-                mGroupOwnerBand, mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMockV12, never()).addGroup_1_2(
-                any(ArrayList.class), anyString(),
-                anyBoolean(), anyInt(),
-                any(byte[].class), anyBoolean());
-
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
-                mGroupOwnerBand, mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMockV12).addGroup_1_2(
-                eq(NativeUtil.decodeSsid("\"" + mNetworkName + "\"")),
-                eq(mPassphrase),
-                eq(mIsPersistent),
-                eq(mGroupOwnerBand),
-                eq(mPeerMacAddressBytes),
-                eq(true));
-    }
-
-    /**
-     * Verify that groupAdd with config returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testGroupAddWithConfigFailure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMockV12.addGroup_1_2(
-                any(ArrayList.class), anyString(),
-                anyBoolean(), anyInt(),
-                any(byte[].class), anyBoolean()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
-                mGroupOwnerBand, mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMockV12).addGroup_1_2(
-                eq(NativeUtil.decodeSsid("\"" + mNetworkName + "\"")),
-                eq(mPassphrase),
-                eq(mIsPersistent),
-                eq(mGroupOwnerBand),
-                eq(mPeerMacAddressBytes),
-                eq(true));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that groupAdd with config returns false, if HIDL revision older than v1.2.
-     */
-    @Test
-    public void testGroupAddWithConfigFailureV1_0() throws Exception {
-        when(mISupplicantP2pIfaceMockV12.addGroup_1_2(
-                any(ArrayList.class), anyString(),
-                anyBoolean(), anyInt(),
-                any(byte[].class), anyBoolean()))
-                .thenReturn(mStatusSuccess);
-        executeAndValidateInitializationSequence(false, false, false);
-        // disable 1.2 interface to simulator since older revision cannot be casted to v1.2
-        mISupplicantV12Enabled = false;
-
-        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
-                mGroupOwnerBand, mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMockV12, never()).addGroup_1_2(
-                any(ArrayList.class), anyString(),
-                anyBoolean(), anyInt(),
-                any(byte[].class), anyBoolean());
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Verify that groupAdd with config disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testGroupAddWithConfigException() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMockV12.addGroup_1_2(
-                any(ArrayList.class), anyString(),
-                anyBoolean(), anyInt(),
-                any(byte[].class), anyBoolean()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
-                mGroupOwnerBand, mPeerMacAddress, true));
-        verify(mISupplicantP2pIfaceMockV12).addGroup_1_2(
-                eq(NativeUtil.decodeSsid("\"" + mNetworkName + "\"")),
-                eq(mPassphrase),
-                eq(mIsPersistent),
-                eq(mGroupOwnerBand),
-                eq(mPeerMacAddressBytes),
-                eq(true));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for groupRemove()
-     */
-    @Test
-    public void testGroupRemove_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.removeGroup(eq(mIfaceName)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.groupRemove(mIfaceName));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.groupRemove(mIfaceName));
-    }
-
-    /**
-     * Verify that groupRemove returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testGroupRemove_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.removeGroup(anyString()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.groupRemove(mIfaceName));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that groupRemove disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testGroupRemove_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.removeGroup(anyString()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.groupRemove(mIfaceName));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for getGroupCapability()
-     */
-    @Test
-    public void testGetGroupCapability_success() throws Exception {
-        final int caps = 123;
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] address, ISupplicantP2pIface.getGroupCapabilityCallback cb) {
-                cb.onValues(mStatusSuccess, caps);
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .getGroupCapability(
-                        eq(mPeerMacAddressBytes),
-                        any(ISupplicantP2pIface.getGroupCapabilityCallback.class));
-
-        // Default value when service is not initialized.
-        assertEquals(-1, mDut.getGroupCapability(mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertEquals(caps, mDut.getGroupCapability(mPeerMacAddress));
-    }
-
-    /**
-     * GetGroupCapability with invalid arguments.
-     */
-    @Test
-    public void testGetGroupCapability_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] address, ISupplicantP2pIface.getGroupCapabilityCallback cb) {
-                cb.onValues(mStatusSuccess, 0);
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .getGroupCapability(
-                        eq(mPeerMacAddressBytes),
-                        any(ISupplicantP2pIface.getGroupCapabilityCallback.class));
-
-        for (String address : mInvalidMacAddresses) {
-            assertEquals(-1, mDut.getGroupCapability(address));
-        }
-    }
-
-    /**
-     * Verify that getGroupCapability returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testGetGroupCapability_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] address, ISupplicantP2pIface.getGroupCapabilityCallback cb) {
-                cb.onValues(mStatusFailure, 0);
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .getGroupCapability(
-                        eq(mPeerMacAddressBytes),
-                        any(ISupplicantP2pIface.getGroupCapabilityCallback.class));
-
-        assertEquals(-1, mDut.getGroupCapability(mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that getGroupCapability disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testGetGroupCapability_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doThrow(mRemoteException)
-                .when(mISupplicantP2pIfaceMock)
-                .getGroupCapability(
-                        eq(mPeerMacAddressBytes),
-                        any(ISupplicantP2pIface.getGroupCapabilityCallback.class));
-        assertEquals(-1, mDut.getGroupCapability(mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for configureExtListen()
-     */
-    @Test
-    public void testConfigureExtListen_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.configureExtListen(eq(123), eq(456)))
-                .thenReturn(mStatusSuccess);
-        when(mISupplicantP2pIfaceMock.configureExtListen(eq(0), eq(0)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.configureExtListen(true, 123, 456));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.configureExtListen(true, 123, 456));
-        // Turning listening off should reset intervals to 0s.
-        assertTrue(mDut.configureExtListen(false, 999, 999));
-        // Disable listening.
-        assertTrue(mDut.configureExtListen(false, -1, -1));
-    }
-
-    /**
-     * Test configureExtListen with invalid parameters.
-     */
-    @Test
-    public void testConfigureExtListen_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.configureExtListen(anyInt(), anyInt()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.configureExtListen(true, -1, 1));
-        assertFalse(mDut.configureExtListen(true, 1, -1));
-    }
-
-    /**
-     * Verify that configureExtListen returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testConfigureExtListen_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.configureExtListen(anyInt(), anyInt()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.configureExtListen(true, 1, 1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that configureExtListen disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testConfigureExtListen_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.configureExtListen(anyInt(), anyInt()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.configureExtListen(true, 1, 1));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for setListenChannel()
-     */
-    @Test
-    public void testSetListenChannel_success() throws Exception {
-        int lc = 6;
-
-        when(mISupplicantP2pIfaceMock.setListenChannel(eq(lc), anyInt()))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.setListenChannel(lc));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.setListenChannel(lc));
-    }
-
-    /**
-     * Test setListenChannel with invalid parameters.
-     */
-    @Test
-    public void testSetListenChannel_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setListenChannel(anyInt(), anyInt()))
-                .thenReturn(mStatusSuccess);
-        assertFalse(mDut.setListenChannel(4));
-    }
-
-    /**
-     * Verify that setListenChannel returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testSetListenChannel_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setListenChannel(anyInt(), anyInt()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.setListenChannel(1));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setListenChannel disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testSetListenChannel_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setListenChannel(anyInt(), anyInt()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.setListenChannel(1));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for setOperatingChannel()
-     */
-    @Test
-    public void testSetOperatingChannel_success() throws Exception {
-        int oc = 163;
-        ISupplicantP2pIface.FreqRange range1 = new ISupplicantP2pIface.FreqRange();
-        range1.min = 1000;
-        range1.max = 5810;
-        ISupplicantP2pIface.FreqRange range2 = new ISupplicantP2pIface.FreqRange();
-        range2.min = 5820;
-        range2.max = 6000;
-        ArrayList<ISupplicantP2pIface.FreqRange> ranges = new ArrayList<>();
-        ranges.add(range1);
-        ranges.add(range2);
-        List<CoexUnsafeChannel> unsafeChannels = new ArrayList<>();
-
-        when(mISupplicantP2pIfaceMock.setDisallowedFrequencies(eq(ranges)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.setOperatingChannel(oc, unsafeChannels));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.setOperatingChannel(oc, unsafeChannels));
-    }
-
-    /**
-     * Test setOperatingChannel with invalid parameters.
-     */
-    @Test
-    public void testSetOperatingChannel_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setDisallowedFrequencies(any(ArrayList.class)))
-                .thenReturn(mStatusSuccess);
-        assertFalse(mDut.setOperatingChannel(1, null));
-    }
-
-    /**
-     * Verify that setOperatingChannel returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testSetOperatingChannel_failure() throws Exception {
-        List<CoexUnsafeChannel> unsafeChannels = new ArrayList<>();
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setDisallowedFrequencies(any(ArrayList.class)))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.setOperatingChannel(1, unsafeChannels));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setOperatingChannel disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testSetOperatingChannel_exception() throws Exception {
-        List<CoexUnsafeChannel> unsafeChannels = new ArrayList<>();
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setDisallowedFrequencies(any(ArrayList.class)))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.setOperatingChannel(65, unsafeChannels));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Sunny day scenario for serviceAdd()
-     */
-    @Test
-    public void testServiceAdd_success() throws Exception {
-        WifiP2pServiceInfo info = createPlaceholderP2pServiceInfo(
-                mValidUpnpService, mValidBonjourService);
-        final HashSet<String> services = new HashSet<String>();
-
-        doAnswer(new AnswerWithArguments() {
-            public SupplicantStatus answer(int version, String name) {
-                services.add("upnp");
-                assertEquals(mValidUpnpServiceVersion, version);
-                assertEquals(mValidUpnpServiceName, name);
-                return mStatusSuccess;
-            }
-        })
-        .when(mISupplicantP2pIfaceMock).addUpnpService(anyInt(), anyString());
-
-        doAnswer(new AnswerWithArguments() {
-            public SupplicantStatus answer(ArrayList<Byte> request, ArrayList<Byte> response) {
-                services.add("bonjour");
-                assertEquals(mValidBonjourServiceRequest, request);
-                assertEquals(mValidBonjourServiceResponse, response);
-                return mStatusSuccess;
-            }
-        }).when(mISupplicantP2pIfaceMock).addBonjourService(
-                any(ArrayList.class), any(ArrayList.class));
-
-        // Default value when service is not initialized.
-        assertFalse(mDut.serviceAdd(info));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.serviceAdd(info));
-        // Confirm that both services have been added.
-        assertTrue(services.contains("upnp"));
-        assertTrue(services.contains("bonjour"));
-
-        // Empty services should cause no trouble.
-        assertTrue(mDut.serviceAdd(createPlaceholderP2pServiceInfo()));
-    }
-
-    /**
-     * Test serviceAdd with invalid parameters.
-     */
-    @Test
-    public void testServiceAdd_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        when(mISupplicantP2pIfaceMock.addUpnpService(anyInt(), anyString()))
-                .thenReturn(mStatusSuccess);
-        when(mISupplicantP2pIfaceMock.addBonjourService(
-                any(ArrayList.class), any(ArrayList.class)))
-                .thenReturn(mStatusSuccess);
-
-        assertFalse(mDut.serviceAdd(null));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidService1)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidService2)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidUpnpService1)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidUpnpService2)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidUpnpService3)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService1)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService2)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService3)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService4)));
-    }
-
-    /**
-     * Verify that serviceAdd returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testServiceAdd_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        when(mISupplicantP2pIfaceMock.addUpnpService(anyInt(), anyString()))
-                .thenReturn(mStatusFailure);
-        when(mISupplicantP2pIfaceMock.addBonjourService(
-                any(ArrayList.class), any(ArrayList.class)))
-                .thenReturn(mStatusFailure);
-
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidUpnpService)));
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidBonjourService)));
-
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that serviceAdd disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testServiceAdd_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        when(mISupplicantP2pIfaceMock.addUpnpService(anyInt(), anyString()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidUpnpService)));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.addBonjourService(
-                any(ArrayList.class), any(ArrayList.class)))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidBonjourService)));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for serviceRemove()
-     */
-    @Test
-    public void testServiceRemove_success() throws Exception {
-        WifiP2pServiceInfo info = createPlaceholderP2pServiceInfo(
-                mValidUpnpService, mValidBonjourService);
-        final HashSet<String> services = new HashSet<String>();
-
-        doAnswer(new AnswerWithArguments() {
-            public SupplicantStatus answer(int version, String name) {
-                services.add("upnp");
-                assertEquals(mValidUpnpServiceVersion, version);
-                assertEquals(mValidUpnpServiceName, name);
-                return mStatusSuccess;
-            }
-        })
-        .when(mISupplicantP2pIfaceMock).removeUpnpService(anyInt(), anyString());
-
-        doAnswer(new AnswerWithArguments() {
-            public SupplicantStatus answer(ArrayList<Byte> request) {
-                services.add("bonjour");
-                assertEquals(mValidBonjourServiceRequest, request);
-                return mStatusSuccess;
-            }
-        })
-        .when(mISupplicantP2pIfaceMock).removeBonjourService(any(ArrayList.class));
-
-        // Default value when service is not initialized.
-        assertFalse(mDut.serviceRemove(info));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.serviceRemove(info));
-        // Confirm that both services have been removed.
-        assertTrue(services.contains("upnp"));
-        assertTrue(services.contains("bonjour"));
-
-        // Empty services should cause no trouble.
-        assertTrue(mDut.serviceRemove(createPlaceholderP2pServiceInfo()));
-    }
-
-    /**
-     * Test serviceRemove with invalid parameters.
-     */
-    @Test
-    public void testServiceRemove_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        when(mISupplicantP2pIfaceMock.removeUpnpService(anyInt(), anyString()))
-                .thenReturn(mStatusSuccess);
-        when(mISupplicantP2pIfaceMock.removeBonjourService(any(ArrayList.class)))
-                .thenReturn(mStatusSuccess);
-
-        assertFalse(mDut.serviceRemove(null));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidService1)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidService2)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidUpnpService1)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidUpnpService2)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidUpnpService3)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService1)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService2)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService3)));
-        // Response parameter is ignored by serviceRemove call, hence the following would pass.
-        // The production code would need to parse otherwise redundant parameter to fail on this
-        // one.
-        // assertFalse(
-        //         mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService4)));
-    }
-
-    /**
-     * Verify that serviceRemove returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testServiceRemove_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        when(mISupplicantP2pIfaceMock.removeUpnpService(anyInt(), anyString()))
-                .thenReturn(mStatusFailure);
-        when(mISupplicantP2pIfaceMock.removeBonjourService(any(ArrayList.class)))
-                .thenReturn(mStatusFailure);
-
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidUpnpService)));
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidBonjourService)));
-
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that serviceRemove disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testServiceRemove_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        when(mISupplicantP2pIfaceMock.removeUpnpService(anyInt(), anyString()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidUpnpService)));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.removeBonjourService(any(ArrayList.class)))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidBonjourService)));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for requestServiceDiscovery()
-     */
-    @Test
-    public void testRequestServiceDiscovery_success() throws Exception {
-        final int caps = 123;
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] address, ArrayList<Byte> query,
-                    ISupplicantP2pIface.requestServiceDiscoveryCallback cb) {
-                cb.onValues(mStatusSuccess, 1234);
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .requestServiceDiscovery(
-                        eq(mPeerMacAddressBytes),
-                        eq(mValidBonjourServiceRequest),
-                        any(ISupplicantP2pIface.requestServiceDiscoveryCallback.class));
-
-        // Default value when service is not initialized.
-        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mValidServiceRequestString));
-
-        executeAndValidateInitializationSequence(false, false, false);
-        assertEquals("1234", mDut.requestServiceDiscovery(
-                mPeerMacAddress, mValidServiceRequestString));
-    }
-
-    /**
-     * RequestServiceDiscovery with invalid arguments.
-     */
-    @Test
-    public void testRequestServiceDiscovery_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(byte[] address, ArrayList<Byte> query,
-                    ISupplicantP2pIface.requestServiceDiscoveryCallback cb) {
-                cb.onValues(mStatusSuccess, 0);
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .requestServiceDiscovery(
-                        any(byte[].class), any(ArrayList.class),
-                        any(ISupplicantP2pIface.requestServiceDiscoveryCallback.class));
-
-        for (String address : mInvalidMacAddresses) {
-            assertNull(mDut.requestServiceDiscovery(
-                    address, mValidServiceRequestString));
-        }
-        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, null));
-        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mInvalidServiceRequestString));
-    }
-
-    /**
-     * Verify that requestServiceDiscovery returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testRequestServiceDiscovery_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(
-                    byte[] address, ArrayList<Byte> query,
-                    ISupplicantP2pIface.requestServiceDiscoveryCallback cb) {
-                cb.onValues(mStatusFailure, 0);
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .requestServiceDiscovery(
-                        any(byte[].class), any(ArrayList.class),
-                        any(ISupplicantP2pIface.requestServiceDiscoveryCallback.class));
-
-        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mValidServiceRequestString));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that requestServiceDiscovery disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testRequestServiceDiscovery_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doThrow(mRemoteException)
-                .when(mISupplicantP2pIfaceMock)
-                .requestServiceDiscovery(
-                        any(byte[].class), any(ArrayList.class),
-                        any(ISupplicantP2pIface.requestServiceDiscoveryCallback.class));
-        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mValidServiceRequestString));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    // Test constant used in cancelServiceDiscovery tests
-    static final String SERVICE_IDENTIFIER_STR = "521918410304";
-    static final long SERVICE_IDENTIFIER_LONG = 521918410304L;
-
-    /**
-     * Sunny day scenario for cancelServiceDiscovery()
-     */
-    @Test
-    public void testCancelServiceDiscovery_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.cancelServiceDiscovery(SERVICE_IDENTIFIER_LONG))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
-    }
-
-    /**
-     * Test cancelServiceDiscovery with invalid parameters.
-     */
-    @Test
-    public void testCancelServiceDiscovery_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.cancelServiceDiscovery(anyLong()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.cancelServiceDiscovery(null));
-        assertFalse(mDut.cancelServiceDiscovery("not a number"));
-    }
-
-    /**
-     * Verify that cancelServiceDiscovery returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testCancelServiceDiscovery_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.cancelServiceDiscovery(anyLong()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that cancelServiceDiscovery disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testCancelServiceDiscovery_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.cancelServiceDiscovery(anyLong()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for setMiracastMode()
-     */
-    @Test
-    public void testSetMiracastMode_success() throws Exception {
-        HashSet<Byte> modes = new HashSet<Byte>();
-
-        when(mISupplicantP2pIfaceMock.setMiracastMode(anyByte()))
-                .thenAnswer(new AnswerWithArguments() {
-                    public SupplicantStatus answer(byte mode) {
-                        modes.add(mode);
-                        return mStatusSuccess;
-                    }
-                });
-        // Default value when service is not initialized.
-        assertFalse(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
-        assertTrue(modes.contains(ISupplicantP2pIface.MiracastMode.SOURCE));
-
-        assertTrue(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SINK));
-        assertTrue(modes.contains(ISupplicantP2pIface.MiracastMode.SINK));
-
-        // Any invalid number yields disabled miracast mode.
-        assertTrue(mDut.setMiracastMode(-1));
-        assertTrue(modes.contains(ISupplicantP2pIface.MiracastMode.DISABLED));
-    }
-
-    /**
-     * Verify that setMiracastMode returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testSetMiracastMode_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setMiracastMode(anyByte()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setMiracastMode disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testSetMiracastMode_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setMiracastMode(anyByte()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for startWpsPbc()
-     */
-    @Test
-    public void testStartWpsPbc_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.startWpsPbc(eq(mIfaceName), eq(mPeerMacAddressBytes)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
-    }
-
-    /**
-     * StartWpsPbc with invalid arguments.
-     */
-    @Test
-    public void testStartWpsPbc_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.startWpsPbc(anyString(), any(byte[].class)))
-                .thenReturn(mStatusSuccess);
-
-        for (String address : mInvalidMacAddresses) {
-            assertFalse(mDut.startWpsPbc(mIfaceName, address));
-        }
-
-        assertFalse(mDut.startWpsPbc(null, mPeerMacAddress));
-    }
-
-    /**
-     * Verify that startWpsPbc returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testStartWpsPbc_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.startWpsPbc(anyString(), any(byte[].class)))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that startWpsPbc disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testStartWpsPbc_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.startWpsPbc(anyString(), any(byte[].class)))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for startWpsPinKeypad()
-     */
-    @Test
-    public void testStartWpsPinKeypad_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.startWpsPinKeypad(eq(mIfaceName), eq("1234")))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.startWpsPinKeypad(mIfaceName, "1234"));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.startWpsPinKeypad(mIfaceName, "1234"));
-    }
-
-    /**
-     * StartWpsPinKeypad with invalid arguments.
-     */
-    @Test
-    public void testStartWpsPinKeypad_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.startWpsPinKeypad(anyString(), anyString()))
-                .thenReturn(mStatusSuccess);
-
-        assertFalse(mDut.startWpsPinKeypad(null, "1234"));
-        assertFalse(mDut.startWpsPinKeypad(mIfaceName, null));
-        // StartWpsPinPinKeypad does not validate, that PIN indeed holds an integer encoded in a
-        // string. This code would be redundant, as HAL requires string to be passed.
-    }
-
-    /**
-     * Verify that startWpsPinKeypad returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testStartWpsPinKeypad_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.startWpsPinKeypad(anyString(), anyString()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.startWpsPinKeypad(mIfaceName, "1234"));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that startWpsPinKeypad disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testStartWpsPinKeypad_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.startWpsPinKeypad(anyString(), anyString()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.startWpsPinKeypad(mIfaceName, "1234"));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for startWpsPinDisplay()
-     */
-    @Test
-    public void testStartWpsPinDisplay_success() throws Exception {
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String ifName, byte[] bssid,
-                    ISupplicantP2pIface.startWpsPinDisplayCallback cb) {
-                cb.onValues(mStatusSuccess, "1234");
-            }
-        }).when(mISupplicantP2pIfaceMock).startWpsPinDisplay(
-                eq(mIfaceName), eq(mPeerMacAddressBytes),
-                any(ISupplicantP2pIface.startWpsPinDisplayCallback.class));
-
-        // Default value when service is not initialized.
-        assertNull(mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertEquals("1234", mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
-    }
-
-    /**
-     * StartWpsPinDisplay with invalid arguments.
-     */
-    @Test
-    public void testStartWpsPinDisplay_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String ifName, byte[] bssid,
-                    ISupplicantP2pIface.startWpsPinDisplayCallback cb) {
-                cb.onValues(mStatusSuccess, "1234");
-            }
-        }).when(mISupplicantP2pIfaceMock).startWpsPinDisplay(
-                anyString(), any(byte[].class),
-                any(ISupplicantP2pIface.startWpsPinDisplayCallback.class));
-
-        for (String address : mInvalidMacAddresses) {
-            assertNull(mDut.startWpsPinDisplay(mIfaceName, address));
-        }
-
-        assertNull(mDut.startWpsPinDisplay(null, mPeerMacAddress));
-    }
-
-    /**
-     * Verify that startWpsPinDisplay returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testStartWpsPinDisplay_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(String ifName, byte[] bssid,
-                    ISupplicantP2pIface.startWpsPinDisplayCallback cb) {
-                cb.onValues(mStatusFailure, "1234");
-            }
-        }).when(mISupplicantP2pIfaceMock).startWpsPinDisplay(
-                anyString(), any(byte[].class),
-                any(ISupplicantP2pIface.startWpsPinDisplayCallback.class));
-
-        assertNull(mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that startWpsPinDisplay disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testStartWpsPinDisplay_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        doThrow(mRemoteException)
-                .when(mISupplicantP2pIfaceMock).startWpsPinDisplay(
-                        anyString(), any(byte[].class),
-                        any(ISupplicantP2pIface.startWpsPinDisplayCallback.class));
-        assertNull(mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for cancelWps()
-     */
-    @Test
-    public void testCancelWps_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.cancelWps(eq(mIfaceName)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.cancelWps(mIfaceName));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.cancelWps(mIfaceName));
-    }
-
-    /**
-     * CancelWps with invalid arguments.
-     */
-    @Test
-    public void testCancelWps_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.cancelWps(anyString()))
-                .thenReturn(mStatusSuccess);
-
-        assertFalse(mDut.cancelWps(null));
-    }
-
-    /**
-     * Verify that cancelWps returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testCancelWps_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.cancelWps(anyString()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.cancelWps(mIfaceName));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that cancelWps disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testCancelWps_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.cancelWps(anyString()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.cancelWps(mIfaceName));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for enableWfd()
-     */
-    @Test
-    public void testEnableWfd_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.enableWfd(eq(true)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.enableWfd(true));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.enableWfd(true));
-    }
-
-    /**
-     * Verify that enableWfd returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testEnableWfd_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.enableWfd(anyBoolean()))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.enableWfd(true));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that enableWfd disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testEnableWfd_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.enableWfd(anyBoolean()))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.enableWfd(false));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-
-    /**
-     * Sunny day scenario for setWfdDeviceInfo()
-     */
-    @Test
-    public void testSetWfdDeviceInfo_success() throws Exception {
-        when(mISupplicantP2pIfaceMock.setWfdDeviceInfo(eq(mValidServiceRequestBytes)))
-                .thenReturn(mStatusSuccess);
-        // Default value when service is not initialized.
-        assertFalse(mDut.setWfdDeviceInfo(mValidServiceRequestString));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.setWfdDeviceInfo(mValidServiceRequestString));
-    }
-
-    /**
-     * SetWfdDeviceInfo with invalid arguments.
-     */
-    @Test
-    public void testSetWfdDeviceInfo_invalidArguments() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setWfdDeviceInfo(any(byte[].class)))
-                .thenReturn(mStatusSuccess);
-
-        assertFalse(mDut.setWfdDeviceInfo(null));
-        assertFalse(mDut.setWfdDeviceInfo(mInvalidServiceRequestString));
-    }
-
-    /**
-     * Verify that setWfdDeviceInfo returns false, if status is not SUCCESS.
-     */
-    @Test
-    public void testSetWfdDeviceInfo_failure() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setWfdDeviceInfo(any(byte[].class)))
-                .thenReturn(mStatusFailure);
-        assertFalse(mDut.setWfdDeviceInfo(mValidServiceRequestString));
-        // Check that service is still alive.
-        assertTrue(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify that setWfdDeviceInfo disconnects and returns false, if HAL throws exception.
-     */
-    @Test
-    public void testSetWfdDeviceInfo_exception() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-        when(mISupplicantP2pIfaceMock.setWfdDeviceInfo(any(byte[].class)))
-                .thenThrow(mRemoteException);
-        assertFalse(mDut.setWfdDeviceInfo(mValidServiceRequestString));
-        // Check service is dead.
-        assertFalse(mDut.isInitializationComplete());
-    }
-
-    /**
-     * Verify the loading of group info.
-     * Specifically, all groups returned by listNetworks are added as a persistent group, so long as
-     * they are NOT current.
-     */
-    @Test
-    public void testLoadGroups() throws Exception {
-        executeAndValidateInitializationSequence(false, false, false);
-
-        // Class to hold the P2p group info returned from the HIDL interface.
-        class P2pGroupInfo {
-            public String ssid;
-            public byte[] bssid;
-            public boolean isGo;
-            public boolean isCurrent;
-            P2pGroupInfo(String ssid, byte[] bssid, boolean isGo, boolean isCurrent) {
-                this.ssid = ssid;
-                this.bssid = bssid;
-                this.isGo = isGo;
-                this.isCurrent = isCurrent;
-            }
-        }
-
-        Map<Integer, P2pGroupInfo> groups = new HashMap<>();
-        groups.put(0, new P2pGroupInfo(
-                "test_34",
-                NativeUtil.macAddressToByteArray("56:34:ab:12:12:34"),
-                false, false));
-        groups.put(1, new P2pGroupInfo(
-                "test_1234",
-                NativeUtil.macAddressToByteArray("16:ed:ab:12:45:34"),
-                true, false));
-        groups.put(2, new P2pGroupInfo(
-                "test_4545",
-                NativeUtil.macAddressToByteArray("32:89:23:56:45:34"),
-                true, false));
-        groups.put(3, new P2pGroupInfo(
-                "iShouldntBeHere",
-                NativeUtil.macAddressToByteArray("aa:bb:cc:56:45:34"),
-                true, true));
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantP2pIface.listNetworksCallback cb) {
-                cb.onValues(mStatusSuccess, new ArrayList<Integer>(groups.keySet()));
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .listNetworks(any(ISupplicantP2pIface.listNetworksCallback.class));
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(final int networkId, ISupplicantP2pIface.getNetworkCallback cb) {
-                try {
-                    doAnswer(new AnswerWithArguments() {
-                        public void answer(ISupplicantP2pNetwork.getSsidCallback cb) {
-                            cb.onValues(mStatusSuccess,
-                                    NativeUtil.stringToByteArrayList(groups.get(networkId).ssid));
-                            return;
-                        }
-                    }).when(mISupplicantP2pNetworkMock)
-                            .getSsid(any(ISupplicantP2pNetwork.getSsidCallback.class));
-                    doAnswer(new AnswerWithArguments() {
-                        public void answer(ISupplicantP2pNetwork.getBssidCallback cb) {
-                            cb.onValues(mStatusSuccess, groups.get(networkId).bssid);
-                            return;
-                        }
-                    }).when(mISupplicantP2pNetworkMock)
-                            .getBssid(any(ISupplicantP2pNetwork.getBssidCallback.class));
-                    doAnswer(new AnswerWithArguments() {
-                        public void answer(ISupplicantP2pNetwork.isCurrentCallback cb) {
-                            cb.onValues(mStatusSuccess, groups.get(networkId).isCurrent);
-                            return;
-                        }
-                    }).when(mISupplicantP2pNetworkMock)
-                            .isCurrent(any(ISupplicantP2pNetwork.isCurrentCallback.class));
-                    doAnswer(new AnswerWithArguments() {
-                        public void answer(ISupplicantP2pNetwork.isGoCallback cb) {
-                            cb.onValues(mStatusSuccess, groups.get(networkId).isGo);
-                            return;
-                        }
-                    }).when(mISupplicantP2pNetworkMock)
-                            .isGo(any(ISupplicantP2pNetwork.isGoCallback.class));
-                } catch (RemoteException e) {
-                }
-                cb.onValues(mStatusSuccess, mISupplicantP2pNetworkMock);
-                return;
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
-
-        WifiP2pGroupList p2pGroups = new WifiP2pGroupList();
-        assertTrue(mDut.loadGroups(p2pGroups));
-
-        assertEquals(3, p2pGroups.getGroupList().size());
-        for (WifiP2pGroup group : p2pGroups.getGroupList()) {
-            int networkId = group.getNetworkId();
-            assertEquals(groups.get(networkId).ssid, group.getNetworkName());
-            assertEquals(
-                    NativeUtil.macAddressFromByteArray(groups.get(networkId).bssid),
-                    group.getOwner().deviceAddress);
-            assertEquals(groups.get(networkId).isGo, group.isGroupOwner());
-        }
-    }
-
-    /**
-     * Sunny day scenario for setClientList()
-     */
-    @Test
-    public void testSetClientList() throws Exception {
-        int testNetworkId = 5;
-        final String client1 = mGroupOwnerMacAddress;
-        final String client2 = mPeerMacAddress;
-
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(final int networkId, ISupplicantP2pIface.getNetworkCallback cb) {
-                if (networkId == testNetworkId) {
-                    cb.onValues(mStatusSuccess, mISupplicantP2pNetworkMock);
-                } else {
-                    cb.onValues(mStatusFailure, null);
-                }
-                return;
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
-        when(mISupplicantP2pNetworkMock.setClientList(any(ArrayList.class)))
-                .thenReturn(mStatusSuccess);
-
-        String clientList = client1 + " " + client2;
-        assertTrue(mDut.setClientList(testNetworkId, clientList));
-        verify(mISupplicantP2pIfaceMock)
-                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
-        ArgumentCaptor<ArrayList> capturedClients = ArgumentCaptor.forClass(ArrayList.class);
-        verify(mISupplicantP2pNetworkMock).setClientList(capturedClients.capture());
-
-        // Convert these to long to help with comparisons.
-        ArrayList<byte[]> clients = capturedClients.getValue();
-        ArrayList<Long> expectedClients = new ArrayList<Long>() {{
-                add(NativeUtil.macAddressToLong(mGroupOwnerMacAddressBytes));
-                add(NativeUtil.macAddressToLong(mPeerMacAddressBytes));
-            }};
-        ArrayList<Long> receivedClients = new ArrayList<Long>();
-        for (byte[] client : clients) {
-            receivedClients.add(NativeUtil.macAddressToLong(client));
-        }
-        assertEquals(expectedClients, receivedClients);
-    }
-
-    /**
-     * Failure scenario for setClientList() when getNetwork returns null.
-     */
-    @Test
-    public void testSetClientListFailureDueToGetNetwork() throws Exception {
-        int testNetworkId = 5;
-        final String client1 = mGroupOwnerMacAddress;
-        final String client2 = mPeerMacAddress;
-
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(final int networkId, ISupplicantP2pIface.getNetworkCallback cb) {
-                cb.onValues(mStatusFailure, null);
-                return;
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
-        when(mISupplicantP2pNetworkMock.setClientList(any(ArrayList.class)))
-                .thenReturn(mStatusSuccess);
-
-        String clientList = client1 + " " + client2;
-        assertFalse(mDut.setClientList(testNetworkId, clientList));
-        verify(mISupplicantP2pIfaceMock)
-                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
-        verify(mISupplicantP2pNetworkMock, never()).setClientList(any(ArrayList.class));
-    }
-
-    /**
-     * Sunny day scenario for getClientList()
-     */
-    @Test
-    public void testGetClientList() throws Exception {
-        int testNetworkId = 5;
-        final String client1 = mGroupOwnerMacAddress;
-        final String client2 = mPeerMacAddress;
-
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(final int networkId, ISupplicantP2pIface.getNetworkCallback cb) {
-                if (networkId == testNetworkId) {
-                    cb.onValues(mStatusSuccess, mISupplicantP2pNetworkMock);
-                } else {
-                    cb.onValues(mStatusFailure, null);
-                }
-                return;
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantP2pNetwork.getClientListCallback cb) {
-                ArrayList<byte[]> clients = new ArrayList<byte[]>() {{
-                        add(mGroupOwnerMacAddressBytes);
-                        add(mPeerMacAddressBytes);
-                    }};
-                cb.onValues(mStatusSuccess, clients);
-                return;
-            }
-        }).when(mISupplicantP2pNetworkMock)
-                .getClientList(any(ISupplicantP2pNetwork.getClientListCallback.class));
-
-        String clientList = client1 + " " + client2;
-        assertEquals(clientList, mDut.getClientList(testNetworkId));
-        verify(mISupplicantP2pIfaceMock)
-                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
-        verify(mISupplicantP2pNetworkMock)
-                .getClientList(any(ISupplicantP2pNetwork.getClientListCallback.class));
-    }
-
-    /**
-     * Failure scenario for getClientList() when getNetwork returns null.
-     */
-    @Test
-    public void testGetClientListFailureDueToGetNetwork() throws Exception {
-        int testNetworkId = 5;
-        final String client1 = mGroupOwnerMacAddress;
-        final String client2 = mPeerMacAddress;
-
-        executeAndValidateInitializationSequence(false, false, false);
-        doAnswer(new AnswerWithArguments() {
-            public void answer(final int networkId, ISupplicantP2pIface.getNetworkCallback cb) {
-                cb.onValues(mStatusFailure, null);
-                return;
-            }
-        }).when(mISupplicantP2pIfaceMock)
-                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicantP2pNetwork.getClientListCallback cb) {
-                ArrayList<byte[]> clients = new ArrayList<byte[]>() {{
-                        add(mGroupOwnerMacAddressBytes);
-                        add(mPeerMacAddressBytes);
-                    }};
-                cb.onValues(mStatusSuccess, clients);
-                return;
-            }
-        }).when(mISupplicantP2pNetworkMock)
-                .getClientList(any(ISupplicantP2pNetwork.getClientListCallback.class));
-
-        assertEquals(null, mDut.getClientList(testNetworkId));
-        verify(mISupplicantP2pIfaceMock)
-                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
-        verify(mISupplicantP2pNetworkMock, never())
-                .getClientList(any(ISupplicantP2pNetwork.getClientListCallback.class));
-    }
-
-    /**
-     * Sunny day scenario for saveConfig()
-     */
-    @Test
-    public void testSaveConfig() throws Exception {
-        when(mISupplicantP2pIfaceMock.saveConfig()).thenReturn(mStatusSuccess);
-
-        // Should fail before initialization.
-        assertFalse(mDut.saveConfig());
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.saveConfig());
-        verify(mISupplicantP2pIfaceMock).saveConfig();
-    }
-
-    /**
-     * Sunny day scenario for setMacRandomization()
-     */
-    @Test
-    public void testEnableMacRandomization() throws Exception {
-        when(mISupplicantP2pIfaceMockV12.setMacRandomization(anyBoolean()))
-                .thenReturn(mStatusSuccess);
-
-        // Should fail before initialization.
-        assertFalse(mDut.setMacRandomization(true));
-        executeAndValidateInitializationSequence(false, false, false);
-        assertTrue(mDut.setMacRandomization(true));
-        verify(mISupplicantP2pIfaceMockV12).setMacRandomization(eq(true));
-    }
-
-    /**
-     * Normal scenario for removeClient()
-     */
-    @Test
-    public void testRemoveClient() throws Exception {
-        assertFalse(mDut.removeClient(mPeerMacAddress, true));
-        assertFalse(mDut.removeClient(mPeerMacAddress, false));
-    }
-
-    /**
-     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
-     * expected result. Verifies if ISupplicantP2pIface manager is initialized or reset.
-     * Each of the arguments will cause a different failure mode when set true.
-     */
-    private void executeAndValidateInitializationSequence(boolean causeRemoteException,
-            boolean getZeroInterfaces, boolean getNullInterface) throws Exception {
-        boolean shouldSucceed = !causeRemoteException && !getZeroInterfaces && !getNullInterface;
-        // Setup callback mock answers
-        ArrayList<ISupplicant.IfaceInfo> interfaces;
-        if (getZeroInterfaces) {
-            interfaces = new ArrayList<ISupplicant.IfaceInfo>();
-        } else {
-            interfaces = mIfaceInfoList;
-        }
-
-        doAnswer(new AnswerWithArguments() {
-            public void answer(ISupplicant.listInterfacesCallback cb) throws RemoteException {
-                cb.onValues(mStatusSuccess, interfaces);
-            }
-        })
-        .when(mISupplicantMock).listInterfaces(any(ISupplicant.listInterfacesCallback.class));
-
-        if (causeRemoteException) {
-            doThrow(new RemoteException("Some error!!!"))
-                    .when(mISupplicantMock).getInterface(any(ISupplicant.IfaceInfo.class),
-                    any(ISupplicant.getInterfaceCallback.class));
-        } else {
-            doAnswer(new GetGetInterfaceAnswer(getNullInterface))
-                    .when(mISupplicantMock).getInterface(any(ISupplicant.IfaceInfo.class),
-                    any(ISupplicant.getInterfaceCallback.class));
-        }
-
-        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantP2pIfaceMock);
-        // Initialize SupplicantP2pIfaceHal, should call serviceManager.registerForNotifications
-        assertTrue(mDut.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(
-                any(IHwBinder.DeathRecipient.class), anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        // act: cause the onRegistration(...) callback to execute
-        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
-        mInOrder.verify(mISupplicantMock).linkToDeath(
-                any(IHwBinder.DeathRecipient.class), anyLong());
-        assertEquals(true, mDut.isInitializationComplete());
-
-        // Now setup the iface.
-        assertTrue(mDut.setupIface(mIfaceName) == shouldSucceed);
-
-        // verify: listInterfaces is called
-        mInOrder.verify(mISupplicantMock).listInterfaces(
-                any(ISupplicant.listInterfacesCallback.class));
-        if (!causeRemoteException && !getNullInterface && !getZeroInterfaces) {
-            mInOrder.verify(mISupplicantMock)
-                    .getInterface(any(ISupplicant.IfaceInfo.class),
-                    any(ISupplicant.getInterfaceCallback.class));
-            mInOrder.verify(mISupplicantP2pIfaceMock).linkToDeath(
-                    any(IHwBinder.DeathRecipient.class), anyLong());
-            mInOrder.verify(mISupplicantP2pIfaceMock).registerCallback(
-                    any(ISupplicantP2pIfaceCallback.class));
-        }
-
-        // if no errors, V1_2 interface is on as well
-        mISupplicantV12Enabled = true;
-    }
-
-    /**
-     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
-     * expected result. Verifies if ISupplicantP2pIface manager is initialized or reset.
-     * Each of the arguments will cause a different failure mode when set true.
-     */
-    private void executeAndValidateInitializationSequenceV1_1(boolean causeRemoteException,
-                                                               boolean getNullInterface)
-            throws Exception {
-        boolean shouldSucceed = !causeRemoteException && !getNullInterface;
-        // Setup callback mock answers
-        if (causeRemoteException) {
-            doThrow(new RemoteException("Some error!!!"))
-                    .when(mISupplicantMockV11).addInterface(any(ISupplicant.IfaceInfo.class),
-                    any(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                            .addInterfaceCallback.class));
-        } else {
-            doAnswer(new GetAddInterfaceAnswer(getNullInterface))
-                    .when(mISupplicantMockV11).addInterface(any(ISupplicant.IfaceInfo.class),
-                    any(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                            .addInterfaceCallback.class));
-        }
-
-        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantMockV11,
-                mISupplicantP2pIfaceMock);
-        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
-        assertTrue(mDut.initialize());
-        // verify: service manager initialization sequence
-        mInOrder.verify(mServiceManagerMock).linkToDeath(
-                any(IHwBinder.DeathRecipient.class), anyLong());
-        mInOrder.verify(mServiceManagerMock).registerForNotifications(
-                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
-        // act: cause the onRegistration(...) callback to execute
-        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
-        mInOrder.verify(mISupplicantMock).linkToDeath(
-                any(IHwBinder.DeathRecipient.class), anyLong());
-        assertEquals(true, mDut.isInitializationComplete());
-
-        // Now setup the iface.
-        assertTrue(mDut.setupIface(mIfaceName) == shouldSucceed);
-
-        // verify: addInterface is called
-        mInOrder.verify(mISupplicantMockV11)
-                .addInterface(any(ISupplicant.IfaceInfo.class),
-                        any(android.hardware.wifi.supplicant.V1_1.ISupplicant
-                                .addInterfaceCallback.class));
-        if (!causeRemoteException && !getNullInterface) {
-            mInOrder.verify(mISupplicantP2pIfaceMock).linkToDeath(
-                    any(IHwBinder.DeathRecipient.class), anyLong());
-            mInOrder.verify(mISupplicantP2pIfaceMock).registerCallback(
-                    any(ISupplicantP2pIfaceCallback.class));
-        }
-
-        // Ensure we don't try to use the listInterfaces method from 1.0 version.
-        verify(mISupplicantMock, never()).listInterfaces(
-                any(ISupplicant.listInterfacesCallback.class));
-        verify(mISupplicantMock, never()).getInterface(any(ISupplicant.IfaceInfo.class),
-                any(ISupplicant.getInterfaceCallback.class));
-    }
-
-    private SupplicantStatus createSupplicantStatus(int code) {
-        SupplicantStatus status = new SupplicantStatus();
-        status.code = code;
-        return status;
-    }
-
-    /**
-     * Create an IfaceInfo with given type and name
-     */
-    private ISupplicant.IfaceInfo createIfaceInfo(int type, String name) {
-        ISupplicant.IfaceInfo info = new ISupplicant.IfaceInfo();
-        info.type = type;
-        info.name = name;
-        return info;
-    }
-
-    /**
-     * Create new placeholder WifiP2pConfig instance.
-     */
-    private WifiP2pConfig createPlaceholderP2pConfig(String peerAddress,
-                                                     int wpsProvMethod, String pin) {
-        WifiP2pConfig config = new WifiP2pConfig();
-        config.wps = new WpsInfo();
-        config.deviceAddress = peerAddress;
-
-        config.wps.setup = wpsProvMethod;
-        config.wps.pin = pin;
-
-        config.groupOwnerIntent = WifiP2pServiceImpl.DEFAULT_GROUP_OWNER_INTENT;
-
-        return config;
-    }
-
-    /**
-     * Create new placeholder WifiP2pGroup instance.
-     */
-    private WifiP2pGroup createPlaceholderP2pGroup() {
-        WifiP2pGroup group = new WifiP2pGroup();
-        group.setInterface(mIfaceName);
-
-        WifiP2pDevice owner = new WifiP2pDevice();
-        owner.deviceAddress = mGroupOwnerMacAddress;
-        group.setOwner(owner);
-
-        return group;
-    }
-
-    /**
-     * Create new placeholder WifiP2pServiceInfo instance.
-     */
-    private WifiP2pServiceInfo createPlaceholderP2pServiceInfo(String... services) {
-        class TestP2pServiceInfo extends WifiP2pServiceInfo {
-            TestP2pServiceInfo(String[] services) {
-                super(Arrays.asList(services));
-            }
-        }
-        return new TestP2pServiceInfo(services);
-    }
-
-    private class GetGetInterfaceAnswer extends AnswerWithArguments {
-        boolean mGetNullInterface;
-
-        GetGetInterfaceAnswer(boolean getNullInterface) {
-            mGetNullInterface = getNullInterface;
-        }
-
-        public void answer(ISupplicant.IfaceInfo iface, ISupplicant.getInterfaceCallback cb) {
-            if (mGetNullInterface) {
-                cb.onValues(mStatusSuccess, null);
-            } else {
-                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
-            }
-        }
-    }
-
-    private class GetAddInterfaceAnswer extends AnswerWithArguments {
-        boolean mGetNullInterface;
-
-        GetAddInterfaceAnswer(boolean getNullInterface) {
-            mGetNullInterface = getNullInterface;
-        }
-
-        public void answer(ISupplicant.IfaceInfo iface,
-                           android.hardware.wifi.supplicant.V1_1.ISupplicant
-                                   .addInterfaceCallback cb) {
-            if (mGetNullInterface) {
-                cb.onValues(mStatusSuccess, null);
-            } else {
-                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
-            }
-        }
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceHalTest.java b/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceHalTest.java
index 91d2662..2b7ef17 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceHalTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/p2p/SupplicantP2pIfaceHalTest.java
@@ -13,781 +13,2969 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package com.android.server.wifi.p2p;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
 import static org.mockito.Mockito.when;
 
+import android.app.test.MockAnswerUtil.AnswerWithArguments;
+import android.hardware.wifi.supplicant.V1_0.ISupplicant;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantIface;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantNetwork;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pIface;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pIfaceCallback;
+import android.hardware.wifi.supplicant.V1_0.ISupplicantP2pNetwork;
+import android.hardware.wifi.supplicant.V1_0.IfaceType;
+import android.hardware.wifi.supplicant.V1_0.SupplicantStatus;
+import android.hardware.wifi.supplicant.V1_0.SupplicantStatusCode;
+import android.hidl.manager.V1_0.IServiceManager;
+import android.hidl.manager.V1_0.IServiceNotification;
 import android.net.wifi.CoexUnsafeChannel;
+import android.net.wifi.WpsInfo;
 import android.net.wifi.p2p.WifiP2pConfig;
+import android.net.wifi.p2p.WifiP2pDevice;
 import android.net.wifi.p2p.WifiP2pGroup;
 import android.net.wifi.p2p.WifiP2pGroupList;
 import android.net.wifi.p2p.WifiP2pManager;
 import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
+import android.os.IHwBinder;
+import android.os.RemoteException;
+import android.text.TextUtils;
 
-import com.android.server.wifi.WifiGlobals;
+import androidx.test.filters.SmallTest;
 
+import com.android.server.wifi.WifiBaseTest;
+import com.android.server.wifi.util.NativeUtil;
+
+import org.junit.Assert.*;
 import org.junit.Before;
 import org.junit.Test;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InOrder;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 
 /**
- * Unit tests for SupplicantP2pIfaceHal, which functions as a wrapper for either
- * SupplicantP2pIfaceHalHidlImpl or SupplicantP2pIfaceHalAidlImpl, depending on
- * which service (HIDL or AIDL) is available. Test the initialization logic and
- * verify that calls to all public methods are forwarded to the actual implementation.
+ * Unit tests for SupplicantP2pIfaceHal
  */
-public class SupplicantP2pIfaceHalTest {
-    private SupplicantP2pIfaceHalSpy mDut;
-    private @Mock SupplicantP2pIfaceHalHidlImpl mP2pIfaceHalHidlMock;
-    private @Mock SupplicantP2pIfaceHalAidlImpl mP2pIfaceHalAidlMock;
-    private @Mock WifiP2pMonitor mMonitor;
-    private @Mock WifiGlobals mWifiGlobals;
+@SmallTest
+public class SupplicantP2pIfaceHalTest extends WifiBaseTest {
+    private static final String TAG = "SupplicantP2pIfaceHalTest";
+    private SupplicantP2pIfaceHal mDut;
+    private @Mock IServiceManager mServiceManagerMock;
+    private @Mock ISupplicant mISupplicantMock;
+    private android.hardware.wifi.supplicant.V1_1.ISupplicant mISupplicantMockV1_1;
+    private @Mock ISupplicantIface mISupplicantIfaceMock;
+    private @Mock ISupplicantP2pIface mISupplicantP2pIfaceMock;
+    private @Mock android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface
+            mISupplicantP2pIfaceMockV12;
+    private boolean mISupplicantV12Enabled;
+    private @Mock ISupplicantP2pNetwork mISupplicantP2pNetworkMock;
+    private @Mock WifiP2pMonitor mWifiMonitor;
 
-    private static final String IFACE_NAME = "wlan0";
-    private static final String BSSID = "fa:45:23:23:12:12";
-    private static final String PARAMS = "blahblah";
-    private static final String RESPONSE = "blahblahblah";
-    private static final String PIN = "5678";
-    private static final boolean ENABLE = true;
-    private static final int NETWORK_ID = 2;
-    private static final int CHANNEL = 3;
+    SupplicantStatus mStatusSuccess;
+    SupplicantStatus mStatusFailure;
+    RemoteException mRemoteException;
+    ISupplicant.IfaceInfo mStaIface;
+    ISupplicant.IfaceInfo mP2pIface;
+    ArrayList<ISupplicant.IfaceInfo> mIfaceInfoList;
+    private IHwBinder.DeathRecipient mDeathRecipient = null;
+
+    final String mIfaceName = "virtual_interface_name";
+    final String mSsid = "\"SSID\"";
+    final ArrayList<Byte> mSsidBytes = new ArrayList<Byte>() {{
+        add((byte)'S'); add((byte)'S'); add((byte)'I'); add((byte)'D');
+    }};
+    final String mPeerMacAddress = "00:11:22:33:44:55";
+    final byte mPeerMacAddressBytes[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 };
+    final String mGroupOwnerMacAddress = "01:12:23:34:45:56";
+    final byte mGroupOwnerMacAddressBytes[] = { 0x01, 0x12, 0x23, 0x34, 0x45, 0x56 };
+    final String mInvalidMacAddress1 = "00:11:22:33:44";
+    final String mInvalidMacAddress2 = ":::::";
+    final String mInvalidMacAddress3 = "invalid";
+    final byte mInvalidMacAddressBytes1[] = null;
+    final byte mInvalidMacAddressBytes2[] = {};
+    final byte mInvalidMacAddressBytes3[] = { 0x00, 0x01, 0x02, 0x03, 0x04 };
+    final byte mInvalidMacAddressBytes4[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
+    HashSet<String> mInvalidMacAddresses = new HashSet<String>(Arrays.asList(
+            mInvalidMacAddress1, mInvalidMacAddress2,
+            mInvalidMacAddress3));
+    HashSet<byte[]> mInvalidMacAddressesBytes = new HashSet<byte[]>(Arrays.asList(
+            mInvalidMacAddressBytes1, mInvalidMacAddressBytes2,
+            mInvalidMacAddressBytes3, mInvalidMacAddressBytes4));
+
+    final String mInvalidService1 = null;
+    final String mInvalidService2 = "service";
+    final String mValidServiceRequestString = "30313233";
+    final byte[] mValidServiceRequestBytes = { 0x30, 0x31, 0x32, 0x33 };
+    final String mInvalidServiceRequestString = "not a hex string";
+    final String mInvalidUpnpService1 = "upnp";
+    final String mInvalidUpnpService2 = "upnp 1";
+    final String mInvalidUpnpService3 = "upnp invalid_number name";
+    final String mInvalidBonjourService1 = "bonjour";
+    final String mInvalidBonjourService2 = "bonjour 123456";
+    final String mInvalidBonjourService3 = "bonjour invalid_hex 123456";
+    final String mInvalidBonjourService4 = "bonjour 123456 invalid_hex";
+    final String mValidUpnpService = "upnp 10 serviceName";
+    final int mValidUpnpServiceVersion = 16;
+    final String mValidUpnpServiceName = "serviceName";
+    final String mValidBonjourService = "bonjour 30313233 34353637";
+    final ArrayList<Byte> mValidBonjourServiceRequest = new ArrayList<Byte>() {{
+        add((byte)'0'); add((byte)'1'); add((byte)'2'); add((byte)'3');
+    }};
+    final ArrayList<Byte> mValidBonjourServiceResponse = new ArrayList<Byte>() {{
+        add((byte)'4'); add((byte)'5'); add((byte)'6'); add((byte)'7');
+    }};
+
+    // variables for groupAdd with config
+    final String mNetworkName = "DIRECT-xy-Hello";
+    final String mPassphrase = "12345678";
+    final int mGroupOwnerBand = WifiP2pConfig.GROUP_OWNER_BAND_5GHZ;
+    final boolean mIsPersistent = false;
+
+    private ArgumentCaptor<IHwBinder.DeathRecipient> mDeathRecipientCaptor =
+            ArgumentCaptor.forClass(IHwBinder.DeathRecipient.class);
+    private ArgumentCaptor<IServiceNotification.Stub> mServiceNotificationCaptor =
+            ArgumentCaptor.forClass(IServiceNotification.Stub.class);
+    private InOrder mInOrder;
 
     private class SupplicantP2pIfaceHalSpy extends SupplicantP2pIfaceHal {
         SupplicantP2pIfaceHalSpy() {
-            super(mMonitor, mWifiGlobals);
+            super(mWifiMonitor);
         }
 
         @Override
-        protected ISupplicantP2pIfaceHal createP2pIfaceHalMockable()  {
-            return mP2pIfaceHalAidlMock;
-        }
-    }
-
-    /**
-     * Implementation of SupplicantP2pIfaceHalSpy that uses the HIDL mock internally
-     * rather than the default AIDL mock.
-     */
-    private class SupplicantP2pIfaceHidlHalSpy extends SupplicantP2pIfaceHalSpy {
-        SupplicantP2pIfaceHidlHalSpy() {
-            super();
+        protected IServiceManager getServiceManagerMockable() throws RemoteException {
+            return mServiceManagerMock;
         }
 
         @Override
-        protected ISupplicantP2pIfaceHal createP2pIfaceHalMockable()  {
-            return mP2pIfaceHalHidlMock;
-        }
-    }
-
-    /**
-     * Implementation of SupplicantP2pIfaceHalSpy that creates a null HAL internally.
-     */
-    private class SupplicantP2pIfaceNullHalSpy extends SupplicantP2pIfaceHalSpy {
-        SupplicantP2pIfaceNullHalSpy() {
-            super();
+        protected ISupplicant getSupplicantMockable() throws RemoteException {
+            return mISupplicantMock;
         }
 
         @Override
-        protected ISupplicantP2pIfaceHal createP2pIfaceHalMockable()  {
-            return null;
+        protected android.hardware.wifi.supplicant.V1_1.ISupplicant getSupplicantMockableV1_1() {
+            return mISupplicantMockV1_1;
+        }
+
+        @Override
+        protected ISupplicantP2pIface getP2pIfaceMockable(ISupplicantIface iface) {
+            return mISupplicantP2pIfaceMock;
+        }
+
+        @Override
+        protected android.hardware.wifi.supplicant.V1_2.ISupplicantP2pIface
+                getP2pIfaceMockableV1_2() {
+            return mISupplicantV12Enabled ? mISupplicantP2pIfaceMockV12 : null;
+        }
+
+        @Override
+        protected ISupplicantP2pNetwork getP2pNetworkMockable(ISupplicantNetwork network) {
+            return mISupplicantP2pNetworkMock;
         }
     }
 
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
+        mStatusSuccess = createSupplicantStatus(SupplicantStatusCode.SUCCESS);
+        mStatusFailure = createSupplicantStatus(SupplicantStatusCode.FAILURE_UNKNOWN);
+        mRemoteException = new RemoteException("Test Remote Exception");
+        mStaIface = createIfaceInfo(IfaceType.STA, "wlan0");
+        mP2pIface = createIfaceInfo(IfaceType.P2P, mIfaceName);
+
+        mIfaceInfoList = new ArrayList<ISupplicant.IfaceInfo>();
+        mIfaceInfoList.add(mStaIface);
+        mIfaceInfoList.add(mP2pIface);
+
+        mISupplicantV12Enabled = false;
+
+        when(mServiceManagerMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
+                anyLong())).thenReturn(true);
+        when(mServiceManagerMock.registerForNotifications(anyString(), anyString(),
+                any(IServiceNotification.Stub.class))).thenReturn(true);
+        when(mISupplicantMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
+                anyLong())).thenReturn(true);
+        when(mISupplicantP2pIfaceMock.linkToDeath(any(IHwBinder.DeathRecipient.class),
+                anyLong())).thenReturn(true);
+        when(mISupplicantP2pIfaceMock.registerCallback(any(ISupplicantP2pIfaceCallback.class)))
+                .thenReturn(mStatusSuccess);
         mDut = new SupplicantP2pIfaceHalSpy();
     }
 
     /**
-     * Initialize SupplicantP2pIfaceHal with the AIDL implementation.
-     */
-    private void initializeWithAidlImpl(boolean shouldSucceed) {
-        when(mP2pIfaceHalAidlMock.initialize()).thenReturn(shouldSucceed);
-        assertEquals(shouldSucceed, mDut.initialize());
-        verify(mP2pIfaceHalAidlMock).initialize();
-        verify(mP2pIfaceHalHidlMock, never()).initialize();
-    }
-
-    /**
-     * Initialize SupplicantP2pIfaceHal with the HIDL implementation.
-     */
-    private void initializeWithHidlImpl(boolean shouldSucceed) {
-        mDut = new SupplicantP2pIfaceHidlHalSpy();
-        when(mP2pIfaceHalHidlMock.initialize()).thenReturn(shouldSucceed);
-        assertEquals(shouldSucceed, mDut.initialize());
-        verify(mP2pIfaceHalAidlMock, never()).initialize();
-        verify(mP2pIfaceHalHidlMock).initialize();
-    }
-
-    /**
-     * Tests successful initialization with the AIDL implementation.
+     * Sunny day scenario for SupplicantP2pIfaceHal initialization
+     * Asserts successful initialization
      */
     @Test
-    public void testInitSuccessAidl() {
-        initializeWithAidlImpl(true);
+    public void testInitialize_success() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
     }
 
     /**
-     * Tests successful initialization with the HIDL implementation.
+     * Tests the initialization flow, with a RemoteException occurring when 'getInterface' is called
+     * Ensures initialization fails.
      */
     @Test
-    public void testInitSuccessHidl() {
-        initializeWithHidlImpl(true);
+    public void testInitialize_remoteExceptionFailure() throws Exception {
+        executeAndValidateInitializationSequence(true, false, false);
     }
 
     /**
-     * Tests failed initialization with the AIDL implementation.
+     * Tests the initialization flow, with listInterfaces returning 0 interfaces.
+     * Ensures failure
      */
     @Test
-    public void testInitFailureAidl() {
-        initializeWithAidlImpl(false);
+    public void testInitialize_zeroInterfacesFailure() throws Exception {
+        executeAndValidateInitializationSequence(false, true, false);
     }
 
     /**
-     * Tests failed initialization with the HIDL implementation.
+     * Tests the initialization flow, with a null interface being returned by getInterface.
+     * Ensures initialization fails.
      */
     @Test
-    public void testInitFailureHidl() {
-        initializeWithHidlImpl(false);
+    public void testInitialize_nullInterfaceFailure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, true);
     }
 
     /**
-     * Check that initialize() returns false if we receive a null implementation.
+     * Sunny day scenario for SupplicantStaIfaceHal initialization
+     * Asserts successful initialization
      */
     @Test
-    public void testInitFailure_null() {
-        mDut = new SupplicantP2pIfaceNullHalSpy();
-        assertFalse(mDut.initialize());
-        verify(mP2pIfaceHalAidlMock, never()).initialize();
-        verify(mP2pIfaceHalHidlMock, never()).initialize();
-    }
-
-    // Now check that we can call all public methods. All of the arguments should get
-    // forwarded to the corresponding method in the implementation and we should return
-    // the implementation's result.
-
-    /**
-     * Test that we can call setupIface
-     */
-    @Test
-    public void testSetupIface() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setupIface(anyString())).thenReturn(true);
-        assertTrue(mDut.setupIface(IFACE_NAME));
-        verify(mP2pIfaceHalAidlMock).setupIface(eq(IFACE_NAME));
+    public void testInitialize_successV1_1() throws Exception {
+        mISupplicantMockV1_1 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
+        executeAndValidateInitializationSequenceV1_1(false, false);
     }
 
     /**
-     * Test that we can call teardownIface
+     * Tests the initialization flow, with a RemoteException occurring when 'getInterface' is called
+     * Ensures initialization fails.
      */
     @Test
-    public void testTeardownIface() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.teardownIface(anyString())).thenReturn(true);
-        assertTrue(mDut.teardownIface(IFACE_NAME));
-        verify(mP2pIfaceHalAidlMock).teardownIface(eq(IFACE_NAME));
+    public void testInitialize_remoteExceptionFailureV1_1() throws Exception {
+        mISupplicantMockV1_1 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
+        executeAndValidateInitializationSequenceV1_1(true, false);
     }
 
     /**
-     * Test that we can call isInitializationStarted
+     * Tests the initialization flow, with a null interface being returned by getInterface.
+     * Ensures initialization fails.
      */
     @Test
-    public void testIsInitializationStarted() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.isInitializationStarted()).thenReturn(true);
-        assertTrue(mDut.isInitializationStarted());
-        verify(mP2pIfaceHalAidlMock).isInitializationStarted();
+    public void testInitialize_nullInterfaceFailureV1_1() throws Exception {
+        mISupplicantMockV1_1 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
+        executeAndValidateInitializationSequenceV1_1(false, true);
     }
 
     /**
-     * Test that we can call isInitializationComplete
+     * Ensures that reject addition of an existing iface.
      */
     @Test
-    public void testIsInitializationComplete() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.isInitializationComplete()).thenReturn(true);
+    public void testDuplicateSetupIfaceV1_1_Fails() throws Exception {
+        mISupplicantMockV1_1 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
+        executeAndValidateInitializationSequenceV1_1(false, false);
+
+        // Trying setting up the p2p0 interface again & ensure it fails.
+        assertFalse(mDut.setupIface(mIfaceName));
+        verifyNoMoreInteractions(mISupplicantMockV1_1);
+    }
+
+    /**
+     * Sunny day scenario for SupplicantStaIfaceHal teardown.
+     * Asserts successful teardown.
+     * Note: Only applicable for 1.1 supplicant HAL.
+     */
+    @Test
+    public void testTeardown_successV1_1() throws Exception {
+        mISupplicantMockV1_1 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
+        executeAndValidateInitializationSequenceV1_1(false, false);
+
+        when(mISupplicantMockV1_1.removeInterface(any(ISupplicant.IfaceInfo.class)))
+                .thenReturn(mStatusSuccess);
+        assertTrue(mDut.teardownIface(mIfaceName));
+        verify(mISupplicantMockV1_1).removeInterface(any());
+    }
+
+    /**
+     * Ensures that we reject removal of an invalid iface.
+     */
+    @Test
+    public void testInvalidTeardownInterfaceV1_1_Fails() throws Exception {
+        assertFalse(mDut.teardownIface(mIfaceName));
+        verifyNoMoreInteractions(mISupplicantMock);
+    }
+
+    /**
+     * Verify misorder supplicant death case.
+     */
+    @Test
+    public void testMisorderSupplicantDeathHandlingV1_1() throws Exception {
+        mISupplicantMockV1_1 = mock(android.hardware.wifi.supplicant.V1_1.ISupplicant.class);
+        doAnswer(new AnswerWithArguments() {
+            public boolean answer(IHwBinder.DeathRecipient cb, long cookie) throws RemoteException {
+                mDeathRecipient = cb;
+                return true;
+            }
+        }).when(mISupplicantMock).linkToDeath(any(IHwBinder.DeathRecipient.class),
+                anyLong());
+
+        executeAndValidateInitializationSequenceV1_1(false, false);
+        mDeathRecipient.serviceDied(0L);
+        assertFalse(mDut.teardownIface(mIfaceName));
+    }
+
+    /**
+     * Sunny day scenario for getName()
+     */
+    @Test
+    public void testGetName_success() throws Exception {
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicantIface.getNameCallback cb) throws RemoteException {
+                cb.onValues(mStatusSuccess, mIfaceName);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class));
+
+        // Default value when service is not initialized.
+        assertNull(mDut.getName());
+        executeAndValidateInitializationSequence(false, false, false);
+        assertEquals(mIfaceName, mDut.getName());
+    }
+
+    /**
+     * Verify that getName returns null, if status is not SUCCESS.
+     */
+    @Test
+    public void testGetName_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicantIface.getNameCallback cb) throws RemoteException {
+                cb.onValues(mStatusFailure, "none");
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class));
+        assertNull(mDut.getName());
+        // Check that service is still alive.
         assertTrue(mDut.isInitializationComplete());
-        verify(mP2pIfaceHalAidlMock).isInitializationComplete();
     }
 
     /**
-     * Test that we can call find with timeout
+     * Verify that getName disconnects and returns null, if HAL throws exception.
      */
     @Test
-    public void testFind() {
-        initializeWithAidlImpl(true);
-        int timeout = 5;
-        when(mP2pIfaceHalAidlMock.find(anyInt())).thenReturn(true);
-        assertTrue(mDut.find(timeout));
-        verify(mP2pIfaceHalAidlMock).find(eq(timeout));
+    public void testGetName_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicantIface.getNameCallback cb) throws RemoteException {
+                throw new RemoteException("Test");
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class));
+        assertNull(mDut.getName());
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for find()
+     */
+    @Test
+    public void testFind_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.find(anyInt())).thenReturn(mStatusSuccess);
+        // Default value when service is not yet initialized.
+        assertFalse(mDut.find(1));
+
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.find(1));
+        assertFalse(mDut.find(-1));
     }
 
     /**
-     * Test that we can call find with {@link WifiP2pManager#WifiP2pScanType}
+     * Verify that find returns false, if status is not SUCCESS.
      */
     @Test
-    public void testFindWithType() {
-        initializeWithAidlImpl(true);
-        int scanType = WifiP2pManager.WIFI_P2P_SCAN_FULL;
-        int freq = WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED;
-        int timeout = 5;
-        when(mP2pIfaceHalAidlMock.find(anyInt(), anyInt(), anyInt())).thenReturn(true);
-        assertTrue(mDut.find(scanType, freq, timeout));
-        verify(mP2pIfaceHalAidlMock).find(eq(scanType), eq(freq), eq(timeout));
+    public void testFind_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.find(anyInt())).thenReturn(mStatusFailure);
+        assertFalse(mDut.find(1));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call stopFind
+     * Verify that find disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testStopFind() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.stopFind()).thenReturn(true);
+    public void testFind_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.find(anyInt())).thenThrow(mRemoteException);
+        assertFalse(mDut.find(0));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for stopFind()
+     */
+    @Test
+    public void testStopFind_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.stopFind()).thenReturn(mStatusSuccess);
+        // Default value when service is not yet initialized.
+        assertFalse(mDut.stopFind());
+        executeAndValidateInitializationSequence(false, false, false);
         assertTrue(mDut.stopFind());
-        verify(mP2pIfaceHalAidlMock).stopFind();
     }
 
     /**
-     * Test that we can call stopFind
+     * Verify that stopFind returns false, if status is not SUCCESS.
      */
     @Test
-    public void testFlush() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.flush()).thenReturn(true);
+    public void testStopFind_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.stopFind()).thenReturn(mStatusFailure);
+        assertFalse(mDut.stopFind());
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that stopFind disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testStopFind_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.stopFind()).thenThrow(mRemoteException);
+        assertFalse(mDut.stopFind());
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for flush()
+     */
+    @Test
+    public void testFlush_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.flush()).thenReturn(mStatusSuccess);
+        // Default value when service is not yet initialized.
+        assertFalse(mDut.flush());
+        executeAndValidateInitializationSequence(false, false, false);
         assertTrue(mDut.flush());
-        verify(mP2pIfaceHalAidlMock).flush();
     }
 
     /**
-     * Test that we can call serviceFlush
+     * Verify that flush returns false, if status is not SUCCESS.
      */
     @Test
-    public void testServiceFlush() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.serviceFlush()).thenReturn(true);
+    public void testFlush_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.flush()).thenReturn(mStatusFailure);
+        assertFalse(mDut.flush());
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that flush disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testFlush_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.flush()).thenThrow(mRemoteException);
+        assertFalse(mDut.flush());
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for serviceFlush()
+     */
+    @Test
+    public void testServiceFlush_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.flushServices()).thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.serviceFlush());
+        executeAndValidateInitializationSequence(false, false, false);
         assertTrue(mDut.serviceFlush());
-        verify(mP2pIfaceHalAidlMock).serviceFlush();
     }
 
     /**
-     * Test that we can call setPowerSave
+     * Verify that serviceFlush returns false, if status is not SUCCESS.
      */
     @Test
-    public void testSetPowerSave() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setPowerSave(anyString(), anyBoolean())).thenReturn(true);
-        assertTrue(mDut.setPowerSave(IFACE_NAME, ENABLE));
-        verify(mP2pIfaceHalAidlMock).setPowerSave(eq(IFACE_NAME), eq(ENABLE));
+    public void testServiceFlush_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.flushServices()).thenReturn(mStatusFailure);
+        assertFalse(mDut.serviceFlush());
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call setGroupIdle
+     * Verify that serviceFlush disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testSetGroupIdle() {
-        initializeWithAidlImpl(true);
-        int timeout = 5;
-        when(mP2pIfaceHalAidlMock.setGroupIdle(anyString(), anyInt())).thenReturn(true);
-        assertTrue(mDut.setGroupIdle(IFACE_NAME, timeout));
-        verify(mP2pIfaceHalAidlMock).setGroupIdle(eq(IFACE_NAME), eq(timeout));
+    public void testServiceFlush_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.flushServices()).thenThrow(mRemoteException);
+        assertFalse(mDut.serviceFlush());
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for setPowerSave()
+     */
+    @Test
+    public void testSetPowerSave_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.setPowerSave(eq(mIfaceName), anyBoolean()))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.setPowerSave(mIfaceName, true));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.setPowerSave(mIfaceName, true));
     }
 
     /**
-     * Test that we can call setSsidPostfix
+     * Verify that setPowerSave returns false, if status is not SUCCESS.
      */
     @Test
-    public void testSetSsidPostfix() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setSsidPostfix(anyString())).thenReturn(true);
-        assertTrue(mDut.setSsidPostfix(PARAMS));
-        verify(mP2pIfaceHalAidlMock).setSsidPostfix(eq(PARAMS));
+    public void testSetPowerSave_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setPowerSave(eq(mIfaceName), anyBoolean()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.setPowerSave(mIfaceName, true));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call connect
+     * Verify that setPowerSave disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testConnect() {
-        initializeWithAidlImpl(true);
-        WifiP2pConfig config = mock(WifiP2pConfig.class);
-        when(mP2pIfaceHalAidlMock.connect(any(WifiP2pConfig.class), anyBoolean())).thenReturn(PIN);
-        assertEquals(PIN, mDut.connect(config, ENABLE));
-        verify(mP2pIfaceHalAidlMock).connect(eq(config), eq(ENABLE));
+    public void testSetPowerSave_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setPowerSave(eq(mIfaceName), anyBoolean()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.setPowerSave(mIfaceName, true));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for setGroupIdle()
+     */
+    @Test
+    public void testSetGroupIdle_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.setGroupIdle(eq(mIfaceName), anyInt()))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.setGroupIdle(mIfaceName, 1));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.setGroupIdle(mIfaceName, 1));
+        assertFalse(mDut.setGroupIdle(mIfaceName, -1));
     }
 
     /**
-     * Test that we can call cancelConnect
+     * Verify that setGroupIdle returns false, if status is not SUCCESS.
      */
     @Test
-    public void testCancelConnect() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.cancelConnect()).thenReturn(true);
+    public void testSetGroupIdle_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setGroupIdle(eq(mIfaceName), anyInt()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.setGroupIdle(mIfaceName, 1));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that setGroupIdle disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testSetGroupIdle_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setGroupIdle(eq(mIfaceName), anyInt()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.setGroupIdle(mIfaceName, 1));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for setSsidPostfix()
+     */
+    @Test
+    public void testSetSsidPostfix_success() throws Exception {
+        String ssid = "SSID POSTFIX";
+        when(mISupplicantP2pIfaceMock.setSsidPostfix(eq(NativeUtil.decodeSsid("\"" + ssid + "\""))))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.setSsidPostfix(ssid));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.setSsidPostfix(ssid));
+        assertFalse(mDut.setSsidPostfix(null));
+    }
+
+    /**
+     * Verify that setSsidPostfix returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testSetSsidPostfix_failure() throws Exception {
+        String ssid = "SSID POSTFIX";
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setSsidPostfix(eq(NativeUtil.decodeSsid("\"" + ssid + "\""))))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.setSsidPostfix(ssid));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that setSsidPostfix disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testSetSsidPostfix_exception() throws Exception {
+        String ssid = "SSID POSTFIX";
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setSsidPostfix(eq(NativeUtil.decodeSsid("\"" + ssid + "\""))))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.setSsidPostfix(ssid));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for connect()
+     */
+    @Test
+    public void testConnect_success() throws Exception {
+        final String configPin = "12345";
+        final HashSet<Integer> methods = new HashSet<>();
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] peer, int method, String pin, boolean joinExisting,
+                    boolean persistent, int goIntent,
+                    ISupplicantP2pIface.connectCallback cb) throws RemoteException {
+                methods.add(method);
+
+                if (method == ISupplicantP2pIface.WpsProvisionMethod.DISPLAY
+                        && TextUtils.isEmpty(pin)) {
+                    // Return the configPin for DISPLAY method if the pin was not provided.
+                    cb.onValues(mStatusSuccess, configPin);
+                } else {
+                    if (method != ISupplicantP2pIface.WpsProvisionMethod.PBC) {
+                        // PIN is only required for PIN methods.
+                        assertEquals(pin, configPin);
+                    }
+                    // For all the other cases, there is no generated pin.
+                    cb.onValues(mStatusSuccess, "");
+                }
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).connect(
+                eq(mPeerMacAddressBytes), anyInt(), anyString(), anyBoolean(), anyBoolean(),
+                anyInt(), any(ISupplicantP2pIface.connectCallback.class));
+
+        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.DISPLAY, "");
+
+        // Default value when service is not initialized.
+        assertNull(mDut.connect(config, false));
+
+        executeAndValidateInitializationSequence(false, false, false);
+
+        assertEquals(configPin, mDut.connect(config, false));
+        assertTrue(methods.contains(ISupplicantP2pIface.WpsProvisionMethod.DISPLAY));
+        methods.clear();
+
+        config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.DISPLAY, configPin);
+        assertTrue(mDut.connect(config, false).isEmpty());
+        assertTrue(methods.contains(ISupplicantP2pIface.WpsProvisionMethod.DISPLAY));
+        methods.clear();
+
+        config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
+        assertTrue(mDut.connect(config, false).isEmpty());
+        assertTrue(methods.contains(ISupplicantP2pIface.WpsProvisionMethod.PBC));
+        methods.clear();
+
+        config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.KEYPAD, configPin);
+        assertTrue(mDut.connect(config, false).isEmpty());
+        assertTrue(methods.contains(ISupplicantP2pIface.WpsProvisionMethod.KEYPAD));
+    }
+
+    /**
+     * Test connect with invalid arguments.
+     */
+    @Test
+    public void testConnect_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] peer, int method, String pin, boolean joinExisting,
+                    boolean persistent, int goIntent,
+                    ISupplicantP2pIface.connectCallback cb) throws RemoteException {
+                cb.onValues(mStatusSuccess, pin);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).connect(
+                any(byte[].class), anyInt(), anyString(), anyBoolean(), anyBoolean(),
+                anyInt(), any(ISupplicantP2pIface.connectCallback.class));
+
+        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.DISPLAY, "");
+
+        // unsupported.
+        config.wps.setup = -1;
+        assertNull(mDut.connect(config, false));
+
+        // Invalid peer address.
+        config.wps.setup = WpsInfo.DISPLAY;
+        for (String address : mInvalidMacAddresses) {
+            config.deviceAddress = address;
+            assertNull(mDut.connect(config, false));
+        }
+
+        // null pin not valid.
+        config.wps.setup = WpsInfo.DISPLAY;
+        config.wps.pin = null;
+        assertNull(mDut.connect(config, false));
+
+        // Pin should be empty for PBC.
+        config.wps.setup = WpsInfo.PBC;
+        config.wps.pin = "03455323";
+        assertNull(mDut.connect(config, false));
+    }
+
+    /**
+     * Verify that connect returns null, if status is not SUCCESS.
+     */
+    @Test
+    public void testConnect_failure() throws Exception {
+        final String configPin = "12345";
+        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress,
+                WpsInfo.DISPLAY, configPin);
+
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] peer, int method, String pin, boolean joinExisting,
+                    boolean persistent, int goIntent,
+                    ISupplicantP2pIface.connectCallback cb) throws RemoteException {
+                cb.onValues(mStatusFailure, null);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).connect(
+                eq(mPeerMacAddressBytes), anyInt(), anyString(), anyBoolean(), anyBoolean(),
+                anyInt(), any(ISupplicantP2pIface.connectCallback.class));
+
+        assertNull(mDut.connect(config, false));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that connect disconnects and returns null, if HAL throws exception.
+     */
+    @Test
+    public void testConnect_exception() throws Exception {
+        final String configPin = "12345";
+        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress,
+                WpsInfo.DISPLAY, configPin);
+
+        doThrow(mRemoteException)
+        .when(mISupplicantP2pIfaceMock).connect(
+                eq(mPeerMacAddressBytes), anyInt(), anyString(), anyBoolean(), anyBoolean(),
+                anyInt(), any(ISupplicantP2pIface.connectCallback.class));
+
+        assertNull(mDut.connect(config, false));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for cancelConnect()
+     */
+    @Test
+    public void testCancelConnect_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.cancelConnect())
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.cancelConnect());
+        executeAndValidateInitializationSequence(false, false, false);
         assertTrue(mDut.cancelConnect());
-        verify(mP2pIfaceHalAidlMock).cancelConnect();
     }
 
     /**
-     * Test that we can call provisionDiscovery
+     * Verify that cancelConnect returns false, if status is not SUCCESS.
      */
     @Test
-    public void testProvisionDiscovery() {
-        initializeWithAidlImpl(true);
-        WifiP2pConfig config = mock(WifiP2pConfig.class);
-        when(mP2pIfaceHalAidlMock.provisionDiscovery(any(WifiP2pConfig.class))).thenReturn(true);
+    public void testCancelConnect_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.cancelConnect())
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.cancelConnect());
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that cancelConnect disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testCancelConnect_exception() throws Exception {
+        String ssid = "\"SSID POSTFIX\"";
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.cancelConnect())
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.cancelConnect());
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for provisionDiscovery()
+     */
+    @Test
+    public void testProvisionDiscovery_success() throws Exception {
+        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
+
+        when(mISupplicantP2pIfaceMock.provisionDiscovery(
+                eq(mPeerMacAddressBytes), anyInt()))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.provisionDiscovery(config));
+        executeAndValidateInitializationSequence(false, false, false);
         assertTrue(mDut.provisionDiscovery(config));
-        verify(mP2pIfaceHalAidlMock).provisionDiscovery(eq(config));
     }
 
     /**
-     * Test that we can call invite
+     * Test provisionDiscovery with invalid arguments.
      */
     @Test
-    public void testInvite() {
-        initializeWithAidlImpl(true);
-        WifiP2pGroup group = mock(WifiP2pGroup.class);
-        when(mP2pIfaceHalAidlMock.invite(any(WifiP2pGroup.class), anyString())).thenReturn(true);
-        assertTrue(mDut.invite(group, BSSID));
-        verify(mP2pIfaceHalAidlMock).invite(eq(group), eq(BSSID));
+    public void testProvisionDiscovery_invalidArguments() throws Exception {
+        when(mISupplicantP2pIfaceMock.provisionDiscovery(
+                eq(mPeerMacAddressBytes), anyInt()))
+                .thenReturn(mStatusSuccess);
+        executeAndValidateInitializationSequence(false, false, false);
+
+        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
+
+        // Unsupported method.
+        config.wps.setup = -1;
+        assertFalse(mDut.provisionDiscovery(config));
+
+        config.wps.setup = WpsInfo.PBC;
+        for (String address : mInvalidMacAddresses) {
+            config.deviceAddress = address;
+            assertFalse(mDut.provisionDiscovery(config));
+        }
     }
 
     /**
-     * Test that we can call reject
+     * Verify that provisionDiscovery returns false, if status is not SUCCESS.
      */
     @Test
-    public void testReject() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.reject(anyString())).thenReturn(true);
-        assertTrue(mDut.reject(BSSID));
-        verify(mP2pIfaceHalAidlMock).reject(eq(BSSID));
+    public void testProvisionDiscovery_failure() throws Exception {
+        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
+
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.provisionDiscovery(
+                eq(mPeerMacAddressBytes), anyInt()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.provisionDiscovery(config));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call getDeviceAddress
+     * Verify that provisionDiscovery disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testGetDeviceAddress() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.getDeviceAddress()).thenReturn(BSSID);
-        assertEquals(BSSID, mDut.getDeviceAddress());
-        verify(mP2pIfaceHalAidlMock).getDeviceAddress();
+    public void testProvisionDiscovery_exception() throws Exception {
+        WifiP2pConfig config = createPlaceholderP2pConfig(mPeerMacAddress, WpsInfo.PBC, "");
+
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.provisionDiscovery(
+                eq(mPeerMacAddressBytes), anyInt()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.provisionDiscovery(config));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for invite()
+     */
+    @Test
+    public void testInvite_success() throws Exception {
+        WifiP2pGroup group = createPlaceholderP2pGroup();
+
+        when(mISupplicantP2pIfaceMock.invite(
+                eq(mIfaceName), eq(mGroupOwnerMacAddressBytes), eq(mPeerMacAddressBytes)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.invite(group, mPeerMacAddress));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.invite(group, mPeerMacAddress));
     }
 
     /**
-     * Test that we can call getSsid
+     * Invite with invalid arguments.
      */
     @Test
-    public void testGetSsid() {
-        initializeWithAidlImpl(true);
-        String ssid = "someSsid";
-        when(mP2pIfaceHalAidlMock.getSsid(anyString())).thenReturn(ssid);
-        assertEquals(ssid, mDut.getSsid(BSSID));
-        verify(mP2pIfaceHalAidlMock).getSsid(eq(BSSID));
+    public void testInvite_invalidArguments() throws Exception {
+        WifiP2pGroup group = createPlaceholderP2pGroup();
+
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.invite(
+                anyString(), any(byte[].class), any(byte[].class)))
+                .thenReturn(mStatusSuccess);
+
+        for (String address : mInvalidMacAddresses) {
+            assertFalse(mDut.invite(group, address));
+        }
+
+        for (String address : mInvalidMacAddresses) {
+            group.getOwner().deviceAddress = address;
+            assertFalse(mDut.invite(group, mPeerMacAddress));
+        }
+
+        group.setOwner(null);
+        assertFalse(mDut.invite(group, mPeerMacAddress));
+        assertFalse(mDut.invite(null, mPeerMacAddress));
     }
 
     /**
-     * Test that we can call reinvoke
+     * Verify that invite returns false, if status is not SUCCESS.
      */
     @Test
-    public void testReinvoke() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.reinvoke(anyInt(), anyString())).thenReturn(true);
-        assertTrue(mDut.reinvoke(NETWORK_ID, BSSID));
-        verify(mP2pIfaceHalAidlMock).reinvoke(eq(NETWORK_ID), eq(BSSID));
+    public void testInvite_failure() throws Exception {
+        WifiP2pGroup group = createPlaceholderP2pGroup();
+
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.invite(
+                anyString(), any(byte[].class), any(byte[].class)))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.invite(group, mPeerMacAddress));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call groupAdd
+     * Verify that invite disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testGroupAdd() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.groupAdd(anyInt(), anyBoolean())).thenReturn(true);
-        assertTrue(mDut.groupAdd(NETWORK_ID, ENABLE));
-        verify(mP2pIfaceHalAidlMock).groupAdd(eq(NETWORK_ID), eq(ENABLE));
+    public void testInvite_exception() throws Exception {
+        WifiP2pGroup group = createPlaceholderP2pGroup();
+
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.invite(
+                anyString(), any(byte[].class), any(byte[].class)))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.invite(group, mPeerMacAddress));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for reject()
+     */
+    @Test
+    public void testReject_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.reject(eq(mPeerMacAddressBytes)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.reject(mPeerMacAddress));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.reject(mPeerMacAddress));
     }
 
     /**
-     * Test that we can call the groupAdd wrapper function
+     * Reject with invalid arguments.
      */
     @Test
-    public void testGroupAddWrapper() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.groupAdd(anyInt(), anyBoolean())).thenReturn(true);
-        assertTrue(mDut.groupAdd(ENABLE));
-        verify(mP2pIfaceHalAidlMock).groupAdd(eq(-1) /* set by wrapper */, eq(ENABLE));
+    public void testReject_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.reject(any(byte[].class)))
+                .thenReturn(mStatusSuccess);
+
+        for (String address : mInvalidMacAddresses) {
+            assertFalse(mDut.reject(address));
+        }
     }
 
     /**
-     * Test that we can call groupAddWithConfig
+     * Verify that reject returns false, if status is not SUCCESS.
      */
     @Test
-    public void testGroupAddWithConfig() {
-        initializeWithAidlImpl(true);
-        String networkName = "someName";
-        String passphrase = "somePassword";
-        boolean persistent = true;
-        boolean join = true;
-        int freq = 10;
-        when(mP2pIfaceHalAidlMock.groupAdd(anyString(), anyString(),
-                anyBoolean(), anyInt(), anyString(), anyBoolean())).thenReturn(true);
-        assertTrue(mDut.groupAdd(networkName, passphrase, persistent, freq, BSSID, join));
-        verify(mP2pIfaceHalAidlMock).groupAdd(eq(networkName), eq(passphrase), eq(persistent),
-                eq(freq), eq(BSSID), eq(join));
+    public void testReject_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.reject(any(byte[].class)))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.reject(mPeerMacAddress));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call groupRemove
+     * Verify that reject disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testGroupRemove() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.groupRemove(anyString())).thenReturn(true);
-        assertTrue(mDut.groupRemove(IFACE_NAME));
-        verify(mP2pIfaceHalAidlMock).groupRemove(eq(IFACE_NAME));
+    public void testReject_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.reject(any(byte[].class)))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.reject(mPeerMacAddress));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for getDeviceAddress()
+     */
+    @Test
+    public void testGetDeviceAddress_success() throws Exception {
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicantP2pIface.getDeviceAddressCallback cb) {
+                cb.onValues(mStatusSuccess, mPeerMacAddressBytes);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).getDeviceAddress(
+                any(ISupplicantP2pIface.getDeviceAddressCallback.class));
+
+        // Default value when service is not initialized.
+        assertNull(mDut.getDeviceAddress());
+        executeAndValidateInitializationSequence(false, false, false);
+        assertEquals(mPeerMacAddress, mDut.getDeviceAddress());
     }
 
     /**
-     * Test that we can call getGroupCapability
+     * Test getDeviceAddress() when invalid mac address is being reported.
      */
     @Test
-    public void testGetGroupCapability() {
-        initializeWithAidlImpl(true);
-        int capabilities = 0;
-        when(mP2pIfaceHalAidlMock.getGroupCapability(anyString())).thenReturn(capabilities);
-        assertEquals(capabilities, mDut.getGroupCapability(BSSID));
-        verify(mP2pIfaceHalAidlMock).getGroupCapability(eq(BSSID));
+    public void testGetDeviceAddress_invalidResult() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        HashSet<byte[]> addresses = new HashSet<byte[]>(Arrays.asList(
+                mInvalidMacAddressBytes1, mInvalidMacAddressBytes2,
+                mInvalidMacAddressBytes3, mInvalidMacAddressBytes4));
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicantP2pIface.getDeviceAddressCallback cb) {
+                byte[] address = addresses.iterator().next();
+                cb.onValues(mStatusSuccess, address);
+                addresses.remove(address);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).getDeviceAddress(
+                any(ISupplicantP2pIface.getDeviceAddressCallback.class));
+
+        // Default value when service is not initialized.
+        while (!addresses.isEmpty()) {
+            assertNull(mDut.getDeviceAddress());
+        }
     }
 
     /**
-     * Test that we can call configureExtListen
+     * Verify that getDeviceAddress returns false, if status is not SUCCESS.
      */
     @Test
-    public void testConfigureExtListen() {
-        initializeWithAidlImpl(true);
-        int period = 2;
-        int interval = 3;
-        when(mP2pIfaceHalAidlMock.configureExtListen(anyBoolean(), anyInt(), anyInt()))
-                .thenReturn(true);
-        assertTrue(mDut.configureExtListen(ENABLE, period, interval));
-        verify(mP2pIfaceHalAidlMock).configureExtListen(eq(ENABLE), eq(period), eq(interval));
+    public void testGetDeviceAddress_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicantP2pIface.getDeviceAddressCallback cb) {
+                cb.onValues(mStatusFailure, null);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).getDeviceAddress(
+                any(ISupplicantP2pIface.getDeviceAddressCallback.class));
+
+        assertNull(mDut.getDeviceAddress());
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call setListenChannel
+     * Verify that getDeviceAddress disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testSetListenChannel() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setListenChannel(anyInt())).thenReturn(true);
-        assertTrue(mDut.setListenChannel(CHANNEL));
-        verify(mP2pIfaceHalAidlMock).setListenChannel(eq(CHANNEL));
+    public void testGetDeviceAddress_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doThrow(mRemoteException).when(mISupplicantP2pIfaceMock).getDeviceAddress(
+                any(ISupplicantP2pIface.getDeviceAddressCallback.class));
+
+        assertNull(mDut.getDeviceAddress());
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for getSsid()
+     */
+    @Test
+    public void testGetSsid_success() throws Exception {
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] address, ISupplicantP2pIface.getSsidCallback cb) {
+                cb.onValues(mStatusSuccess, mSsidBytes);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).getSsid(
+                eq(mPeerMacAddressBytes),
+                any(ISupplicantP2pIface.getSsidCallback.class));
+
+        // Default value when service is not initialized.
+        assertNull(mDut.getSsid(mPeerMacAddress));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertEquals(NativeUtil.removeEnclosingQuotes(mSsid), mDut.getSsid(mPeerMacAddress));
     }
 
     /**
-     * Test that we can call setOperatingChannel
+     * Test getSsid() with invalid argument and response.
      */
     @Test
-    public void testSetOperatingChannel() {
-        initializeWithAidlImpl(true);
+    public void testGetSsid_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] address, ISupplicantP2pIface.getSsidCallback cb) {
+                cb.onValues(mStatusSuccess, mSsidBytes);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).getSsid(
+                any(byte[].class), any(ISupplicantP2pIface.getSsidCallback.class));
+
+        for (String address : mInvalidMacAddresses) {
+            assertNull(mDut.getSsid(address));
+        }
+
+        // Simulate null response from HAL.
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] address, ISupplicantP2pIface.getSsidCallback cb) {
+                cb.onValues(mStatusSuccess, null);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).getSsid(
+                any(byte[].class), any(ISupplicantP2pIface.getSsidCallback.class));
+
+        assertNull(mDut.getSsid(mPeerMacAddress));
+    }
+
+    /**
+     * Verify that getSsid returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testGetSsid_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] address, ISupplicantP2pIface.getSsidCallback cb) {
+                cb.onValues(mStatusFailure, null);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).getSsid(
+                any(byte[].class), any(ISupplicantP2pIface.getSsidCallback.class));
+
+        assertNull(mDut.getSsid(mPeerMacAddress));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that getSsid disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testGetSsid_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doThrow(mRemoteException)
+        .when(mISupplicantP2pIfaceMock).getSsid(
+                any(byte[].class), any(ISupplicantP2pIface.getSsidCallback.class));
+
+        assertNull(mDut.getSsid(mPeerMacAddress));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for reinvoke()
+     */
+    @Test
+    public void testReinvoke_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.reinvoke(anyInt(), eq(mPeerMacAddressBytes)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.reinvoke(0, mPeerMacAddress));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.reinvoke(0, mPeerMacAddress));
+    }
+
+    /**
+     * Reinvoke with invalid arguments.
+     */
+    @Test
+    public void testReinvoke_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.reinvoke(anyInt(), any(byte[].class)))
+                .thenReturn(mStatusSuccess);
+
+        for (String address : mInvalidMacAddresses) {
+            assertFalse(mDut.reinvoke(0, address));
+        }
+    }
+
+    /**
+     * Verify that reinvoke returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testReinvoke_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.reinvoke(anyInt(), any(byte[].class)))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.reinvoke(0, mPeerMacAddress));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that reinvoke disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testReinvoke_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.reinvoke(anyInt(), any(byte[].class)))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.reinvoke(0, mPeerMacAddress));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for groupAdd()
+     */
+    @Test
+    public void testGroupAdd_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.addGroup(eq(true), eq(3)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.groupAdd(3, true));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.groupAdd(3, true));
+    }
+
+    /**
+     * Verify that groupAdd returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testGroupAdd_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.addGroup(anyBoolean(), anyInt()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.groupAdd(0, true));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that groupAdd disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testGroupAdd_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.addGroup(anyBoolean(), anyInt()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.groupAdd(0, true));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for groupAdd() with config
+     */
+    @Test
+    public void testGroupAddWithConfigSuccess() throws Exception {
+        when(mISupplicantP2pIfaceMockV12.addGroup_1_2(
+                eq(NativeUtil.decodeSsid("\"" + mNetworkName + "\"")),
+                eq(mPassphrase),
+                eq(mIsPersistent),
+                eq(mGroupOwnerBand),
+                eq(mPeerMacAddressBytes),
+                anyBoolean()))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
+                mGroupOwnerBand, mPeerMacAddress, true));
+        verify(mISupplicantP2pIfaceMockV12, never()).addGroup_1_2(
+                any(ArrayList.class), anyString(),
+                anyBoolean(), anyInt(),
+                any(byte[].class), anyBoolean());
+
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
+                mGroupOwnerBand, mPeerMacAddress, true));
+        verify(mISupplicantP2pIfaceMockV12).addGroup_1_2(
+                eq(NativeUtil.decodeSsid("\"" + mNetworkName + "\"")),
+                eq(mPassphrase),
+                eq(mIsPersistent),
+                eq(mGroupOwnerBand),
+                eq(mPeerMacAddressBytes),
+                eq(true));
+    }
+
+    /**
+     * Verify that groupAdd with config returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testGroupAddWithConfigFailure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMockV12.addGroup_1_2(
+                any(ArrayList.class), anyString(),
+                anyBoolean(), anyInt(),
+                any(byte[].class), anyBoolean()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
+                mGroupOwnerBand, mPeerMacAddress, true));
+        verify(mISupplicantP2pIfaceMockV12).addGroup_1_2(
+                eq(NativeUtil.decodeSsid("\"" + mNetworkName + "\"")),
+                eq(mPassphrase),
+                eq(mIsPersistent),
+                eq(mGroupOwnerBand),
+                eq(mPeerMacAddressBytes),
+                eq(true));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that groupAdd with config returns false, if HIDL revision older than v1.2.
+     */
+    @Test
+    public void testGroupAddWithConfigFailureV1_0() throws Exception {
+        when(mISupplicantP2pIfaceMockV12.addGroup_1_2(
+                any(ArrayList.class), anyString(),
+                anyBoolean(), anyInt(),
+                any(byte[].class), anyBoolean()))
+                .thenReturn(mStatusSuccess);
+        executeAndValidateInitializationSequence(false, false, false);
+        // disable 1.2 interface to simulator since older revision cannot be casted to v1.2
+        mISupplicantV12Enabled = false;
+
+        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
+                mGroupOwnerBand, mPeerMacAddress, true));
+        verify(mISupplicantP2pIfaceMockV12, never()).addGroup_1_2(
+                any(ArrayList.class), anyString(),
+                anyBoolean(), anyInt(),
+                any(byte[].class), anyBoolean());
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Verify that groupAdd with config disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testGroupAddWithConfigException() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMockV12.addGroup_1_2(
+                any(ArrayList.class), anyString(),
+                anyBoolean(), anyInt(),
+                any(byte[].class), anyBoolean()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.groupAdd(mNetworkName, mPassphrase, mIsPersistent,
+                mGroupOwnerBand, mPeerMacAddress, true));
+        verify(mISupplicantP2pIfaceMockV12).addGroup_1_2(
+                eq(NativeUtil.decodeSsid("\"" + mNetworkName + "\"")),
+                eq(mPassphrase),
+                eq(mIsPersistent),
+                eq(mGroupOwnerBand),
+                eq(mPeerMacAddressBytes),
+                eq(true));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Sunny day scenario for groupRemove()
+     */
+    @Test
+    public void testGroupRemove_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.removeGroup(eq(mIfaceName)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.groupRemove(mIfaceName));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.groupRemove(mIfaceName));
+    }
+
+    /**
+     * Verify that groupRemove returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testGroupRemove_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.removeGroup(anyString()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.groupRemove(mIfaceName));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that groupRemove disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testGroupRemove_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.removeGroup(anyString()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.groupRemove(mIfaceName));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for getGroupCapability()
+     */
+    @Test
+    public void testGetGroupCapability_success() throws Exception {
+        final int caps = 123;
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] address, ISupplicantP2pIface.getGroupCapabilityCallback cb) {
+                cb.onValues(mStatusSuccess, caps);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock)
+                .getGroupCapability(
+                        eq(mPeerMacAddressBytes),
+                        any(ISupplicantP2pIface.getGroupCapabilityCallback.class));
+
+        // Default value when service is not initialized.
+        assertEquals(-1, mDut.getGroupCapability(mPeerMacAddress));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertEquals(caps, mDut.getGroupCapability(mPeerMacAddress));
+    }
+
+    /**
+     * GetGroupCapability with invalid arguments.
+     */
+    @Test
+    public void testGetGroupCapability_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] address, ISupplicantP2pIface.getGroupCapabilityCallback cb) {
+                cb.onValues(mStatusSuccess, 0);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock)
+                .getGroupCapability(
+                        eq(mPeerMacAddressBytes),
+                        any(ISupplicantP2pIface.getGroupCapabilityCallback.class));
+
+        for (String address : mInvalidMacAddresses) {
+            assertEquals(-1, mDut.getGroupCapability(address));
+        }
+    }
+
+    /**
+     * Verify that getGroupCapability returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testGetGroupCapability_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] address, ISupplicantP2pIface.getGroupCapabilityCallback cb) {
+                cb.onValues(mStatusFailure, 0);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock)
+                .getGroupCapability(
+                        eq(mPeerMacAddressBytes),
+                        any(ISupplicantP2pIface.getGroupCapabilityCallback.class));
+
+        assertEquals(-1, mDut.getGroupCapability(mPeerMacAddress));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that getGroupCapability disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testGetGroupCapability_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doThrow(mRemoteException)
+                .when(mISupplicantP2pIfaceMock)
+                .getGroupCapability(
+                        eq(mPeerMacAddressBytes),
+                        any(ISupplicantP2pIface.getGroupCapabilityCallback.class));
+        assertEquals(-1, mDut.getGroupCapability(mPeerMacAddress));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for configureExtListen()
+     */
+    @Test
+    public void testConfigureExtListen_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.configureExtListen(eq(123), eq(456)))
+                .thenReturn(mStatusSuccess);
+        when(mISupplicantP2pIfaceMock.configureExtListen(eq(0), eq(0)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.configureExtListen(true, 123, 456));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.configureExtListen(true, 123, 456));
+        // Turning listening off should reset intervals to 0s.
+        assertTrue(mDut.configureExtListen(false, 999, 999));
+        // Disable listening.
+        assertTrue(mDut.configureExtListen(false, -1, -1));
+    }
+
+    /**
+     * Test configureExtListen with invalid parameters.
+     */
+    @Test
+    public void testConfigureExtListen_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.configureExtListen(anyInt(), anyInt()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.configureExtListen(true, -1, 1));
+        assertFalse(mDut.configureExtListen(true, 1, -1));
+    }
+
+    /**
+     * Verify that configureExtListen returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testConfigureExtListen_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.configureExtListen(anyInt(), anyInt()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.configureExtListen(true, 1, 1));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that configureExtListen disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testConfigureExtListen_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.configureExtListen(anyInt(), anyInt()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.configureExtListen(true, 1, 1));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for setListenChannel()
+     */
+    @Test
+    public void testSetListenChannel_success() throws Exception {
+        int lc = 6;
+
+        when(mISupplicantP2pIfaceMock.setListenChannel(eq(lc), anyInt()))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.setListenChannel(lc));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.setListenChannel(lc));
+    }
+
+    /**
+     * Test setListenChannel with invalid parameters.
+     */
+    @Test
+    public void testSetListenChannel_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setListenChannel(anyInt(), anyInt()))
+                .thenReturn(mStatusSuccess);
+        assertFalse(mDut.setListenChannel(4));
+    }
+
+    /**
+     * Verify that setListenChannel returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testSetListenChannel_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setListenChannel(anyInt(), anyInt()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.setListenChannel(1));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that setListenChannel disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testSetListenChannel_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setListenChannel(anyInt(), anyInt()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.setListenChannel(1));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Sunny day scenario for setOperatingChannel()
+     */
+    @Test
+    public void testSetOperatingChannel_success() throws Exception {
+        int oc = 163;
+        ISupplicantP2pIface.FreqRange range1 = new ISupplicantP2pIface.FreqRange();
+        range1.min = 1000;
+        range1.max = 5810;
+        ISupplicantP2pIface.FreqRange range2 = new ISupplicantP2pIface.FreqRange();
+        range2.min = 5820;
+        range2.max = 6000;
+        ArrayList<ISupplicantP2pIface.FreqRange> ranges = new ArrayList<>();
+        ranges.add(range1);
+        ranges.add(range2);
         List<CoexUnsafeChannel> unsafeChannels = new ArrayList<>();
-        when(mP2pIfaceHalAidlMock.setOperatingChannel(anyInt(), any(List.class))).thenReturn(true);
-        assertTrue(mDut.setOperatingChannel(CHANNEL, unsafeChannels));
-        verify(mP2pIfaceHalAidlMock).setOperatingChannel(eq(CHANNEL), eq(unsafeChannels));
+
+        when(mISupplicantP2pIfaceMock.setDisallowedFrequencies(eq(ranges)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.setOperatingChannel(oc, unsafeChannels));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.setOperatingChannel(oc, unsafeChannels));
     }
 
     /**
-     * Test that we can call serviceAdd
+     * Test setOperatingChannel with invalid parameters.
      */
     @Test
-    public void testServiceAdd() {
-        initializeWithAidlImpl(true);
-        WifiP2pServiceInfo serviceInfo = mock(WifiP2pServiceInfo.class);
-        when(mP2pIfaceHalAidlMock.serviceAdd(any(WifiP2pServiceInfo.class))).thenReturn(true);
-        assertTrue(mDut.serviceAdd(serviceInfo));
-        verify(mP2pIfaceHalAidlMock).serviceAdd(eq(serviceInfo));
+    public void testSetOperatingChannel_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setDisallowedFrequencies(any(ArrayList.class)))
+                .thenReturn(mStatusSuccess);
+        assertFalse(mDut.setOperatingChannel(1, null));
     }
 
     /**
-     * Test that we can call serviceRemove
+     * Verify that setOperatingChannel returns false, if status is not SUCCESS.
      */
     @Test
-    public void testServiceRemove() {
-        initializeWithAidlImpl(true);
-        WifiP2pServiceInfo serviceInfo = mock(WifiP2pServiceInfo.class);
-        when(mP2pIfaceHalAidlMock.serviceRemove(any(WifiP2pServiceInfo.class))).thenReturn(true);
-        assertTrue(mDut.serviceRemove(serviceInfo));
-        verify(mP2pIfaceHalAidlMock).serviceRemove(eq(serviceInfo));
+    public void testSetOperatingChannel_failure() throws Exception {
+        List<CoexUnsafeChannel> unsafeChannels = new ArrayList<>();
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setDisallowedFrequencies(any(ArrayList.class)))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.setOperatingChannel(1, unsafeChannels));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call requestServiceDiscovery
+     * Verify that setOperatingChannel disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testRequestServiceDiscovery() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.requestServiceDiscovery(anyString(), anyString()))
-                .thenReturn(RESPONSE);
-        assertEquals(RESPONSE, mDut.requestServiceDiscovery(BSSID, PARAMS));
-        verify(mP2pIfaceHalAidlMock).requestServiceDiscovery(eq(BSSID), eq(PARAMS));
+    public void testSetOperatingChannel_exception() throws Exception {
+        List<CoexUnsafeChannel> unsafeChannels = new ArrayList<>();
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setDisallowedFrequencies(any(ArrayList.class)))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.setOperatingChannel(65, unsafeChannels));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call cancelServiceDiscovery
+     * Sunny day scenario for serviceAdd()
      */
     @Test
-    public void testCancelServiceDiscovery() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.cancelServiceDiscovery(anyString())).thenReturn(true);
-        assertTrue(mDut.cancelServiceDiscovery(PARAMS));
-        verify(mP2pIfaceHalAidlMock).cancelServiceDiscovery(eq(PARAMS));
+    public void testServiceAdd_success() throws Exception {
+        WifiP2pServiceInfo info = createPlaceholderP2pServiceInfo(
+                mValidUpnpService, mValidBonjourService);
+        final HashSet<String> services = new HashSet<String>();
+
+        doAnswer(new AnswerWithArguments() {
+            public SupplicantStatus answer(int version, String name) {
+                services.add("upnp");
+                assertEquals(mValidUpnpServiceVersion, version);
+                assertEquals(mValidUpnpServiceName, name);
+                return mStatusSuccess;
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).addUpnpService(anyInt(), anyString());
+
+        doAnswer(new AnswerWithArguments() {
+            public SupplicantStatus answer(ArrayList<Byte> request, ArrayList<Byte> response) {
+                services.add("bonjour");
+                assertEquals(mValidBonjourServiceRequest, request);
+                assertEquals(mValidBonjourServiceResponse, response);
+                return mStatusSuccess;
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).addBonjourService(
+                any(ArrayList.class), any(ArrayList.class));
+
+        // Default value when service is not initialized.
+        assertFalse(mDut.serviceAdd(info));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.serviceAdd(info));
+        // Confirm that both services have been added.
+        assertTrue(services.contains("upnp"));
+        assertTrue(services.contains("bonjour"));
+
+        // Empty services should cause no trouble.
+        assertTrue(mDut.serviceAdd(createPlaceholderP2pServiceInfo()));
     }
 
     /**
-     * Test that we can call setMiracastMode
+     * Test serviceAdd with invalid parameters.
      */
     @Test
-    public void testSetMiracastMode() {
-        initializeWithAidlImpl(true);
-        int mode = 5;
-        when(mP2pIfaceHalAidlMock.setMiracastMode(anyInt())).thenReturn(true);
-        assertTrue(mDut.setMiracastMode(mode));
-        verify(mP2pIfaceHalAidlMock).setMiracastMode(eq(mode));
+    public void testServiceAdd_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        when(mISupplicantP2pIfaceMock.addUpnpService(anyInt(), anyString()))
+                .thenReturn(mStatusSuccess);
+        when(mISupplicantP2pIfaceMock.addBonjourService(
+                any(ArrayList.class), any(ArrayList.class)))
+                .thenReturn(mStatusSuccess);
+
+        assertFalse(mDut.serviceAdd(null));
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidService1)));
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidService2)));
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidUpnpService1)));
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidUpnpService2)));
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidUpnpService3)));
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService1)));
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService2)));
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService3)));
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mInvalidBonjourService4)));
     }
 
     /**
-     * Test that we can call startWpsPbc
+     * Verify that serviceAdd returns false, if status is not SUCCESS.
      */
     @Test
-    public void testStartWpsPbc() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.startWpsPbc(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.startWpsPbc(IFACE_NAME, BSSID));
-        verify(mP2pIfaceHalAidlMock).startWpsPbc(eq(IFACE_NAME), eq(BSSID));
+    public void testServiceAdd_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        when(mISupplicantP2pIfaceMock.addUpnpService(anyInt(), anyString()))
+                .thenReturn(mStatusFailure);
+        when(mISupplicantP2pIfaceMock.addBonjourService(
+                any(ArrayList.class), any(ArrayList.class)))
+                .thenReturn(mStatusFailure);
+
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidUpnpService)));
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidBonjourService)));
+
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call startWpsPinKeypad
+     * Verify that serviceAdd disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testStartWpsPinKeypad() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.startWpsPinKeypad(anyString(), anyString())).thenReturn(true);
-        assertTrue(mDut.startWpsPinKeypad(IFACE_NAME, PIN));
-        verify(mP2pIfaceHalAidlMock).startWpsPinKeypad(eq(IFACE_NAME), eq(PIN));
+    public void testServiceAdd_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        when(mISupplicantP2pIfaceMock.addUpnpService(anyInt(), anyString()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidUpnpService)));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.addBonjourService(
+                any(ArrayList.class), any(ArrayList.class)))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.serviceAdd(createPlaceholderP2pServiceInfo(mValidBonjourService)));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for serviceRemove()
+     */
+    @Test
+    public void testServiceRemove_success() throws Exception {
+        WifiP2pServiceInfo info = createPlaceholderP2pServiceInfo(
+                mValidUpnpService, mValidBonjourService);
+        final HashSet<String> services = new HashSet<String>();
+
+        doAnswer(new AnswerWithArguments() {
+            public SupplicantStatus answer(int version, String name) {
+                services.add("upnp");
+                assertEquals(mValidUpnpServiceVersion, version);
+                assertEquals(mValidUpnpServiceName, name);
+                return mStatusSuccess;
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).removeUpnpService(anyInt(), anyString());
+
+        doAnswer(new AnswerWithArguments() {
+            public SupplicantStatus answer(ArrayList<Byte> request) {
+                services.add("bonjour");
+                assertEquals(mValidBonjourServiceRequest, request);
+                return mStatusSuccess;
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).removeBonjourService(any(ArrayList.class));
+
+        // Default value when service is not initialized.
+        assertFalse(mDut.serviceRemove(info));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.serviceRemove(info));
+        // Confirm that both services have been removed.
+        assertTrue(services.contains("upnp"));
+        assertTrue(services.contains("bonjour"));
+
+        // Empty services should cause no trouble.
+        assertTrue(mDut.serviceRemove(createPlaceholderP2pServiceInfo()));
     }
 
     /**
-     * Test that we can call startWpsPinDisplay
+     * Test serviceRemove with invalid parameters.
      */
     @Test
-    public void testStartWpsPinDisplay() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.startWpsPinDisplay(anyString(), anyString())).thenReturn(PIN);
-        assertEquals(PIN, mDut.startWpsPinDisplay(IFACE_NAME, BSSID));
-        verify(mP2pIfaceHalAidlMock).startWpsPinDisplay(eq(IFACE_NAME), eq(BSSID));
+    public void testServiceRemove_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        when(mISupplicantP2pIfaceMock.removeUpnpService(anyInt(), anyString()))
+                .thenReturn(mStatusSuccess);
+        when(mISupplicantP2pIfaceMock.removeBonjourService(any(ArrayList.class)))
+                .thenReturn(mStatusSuccess);
+
+        assertFalse(mDut.serviceRemove(null));
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidService1)));
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidService2)));
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidUpnpService1)));
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidUpnpService2)));
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidUpnpService3)));
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService1)));
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService2)));
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService3)));
+        // Response parameter is ignored by serviceRemove call, hence the following would pass.
+        // The production code would need to parse otherwise redundant parameter to fail on this
+        // one.
+        // assertFalse(
+        //         mDut.serviceRemove(createPlaceholderP2pServiceInfo(mInvalidBonjourService4)));
     }
 
     /**
-     * Test that we can call cancelWps
+     * Verify that serviceRemove returns false, if status is not SUCCESS.
      */
     @Test
-    public void testCancelWps() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.cancelWps(anyString())).thenReturn(true);
-        assertTrue(mDut.cancelWps(IFACE_NAME));
-        verify(mP2pIfaceHalAidlMock).cancelWps(eq(IFACE_NAME));
+    public void testServiceRemove_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        when(mISupplicantP2pIfaceMock.removeUpnpService(anyInt(), anyString()))
+                .thenReturn(mStatusFailure);
+        when(mISupplicantP2pIfaceMock.removeBonjourService(any(ArrayList.class)))
+                .thenReturn(mStatusFailure);
+
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidUpnpService)));
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidBonjourService)));
+
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call enableWfd
+     * Verify that serviceRemove disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testEnableWfd() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.enableWfd(anyBoolean())).thenReturn(true);
-        assertTrue(mDut.enableWfd(ENABLE));
-        verify(mP2pIfaceHalAidlMock).enableWfd(eq(ENABLE));
+    public void testServiceRemove_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        when(mISupplicantP2pIfaceMock.removeUpnpService(anyInt(), anyString()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidUpnpService)));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.removeBonjourService(any(ArrayList.class)))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.serviceRemove(createPlaceholderP2pServiceInfo(mValidBonjourService)));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for requestServiceDiscovery()
+     */
+    @Test
+    public void testRequestServiceDiscovery_success() throws Exception {
+        final int caps = 123;
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] address, ArrayList<Byte> query,
+                    ISupplicantP2pIface.requestServiceDiscoveryCallback cb) {
+                cb.onValues(mStatusSuccess, 1234);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock)
+                .requestServiceDiscovery(
+                        eq(mPeerMacAddressBytes),
+                        eq(mValidBonjourServiceRequest),
+                        any(ISupplicantP2pIface.requestServiceDiscoveryCallback.class));
+
+        // Default value when service is not initialized.
+        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mValidServiceRequestString));
+
+        executeAndValidateInitializationSequence(false, false, false);
+        assertEquals("1234", mDut.requestServiceDiscovery(
+                mPeerMacAddress, mValidServiceRequestString));
     }
 
     /**
-     * Test that we can call setWfdDeviceInfo
+     * RequestServiceDiscovery with invalid arguments.
      */
     @Test
-    public void testSetWfdDeviceInfo() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setWfdDeviceInfo(anyString())).thenReturn(true);
-        assertTrue(mDut.setWfdDeviceInfo(PARAMS));
-        verify(mP2pIfaceHalAidlMock).setWfdDeviceInfo(eq(PARAMS));
+    public void testRequestServiceDiscovery_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(byte[] address, ArrayList<Byte> query,
+                    ISupplicantP2pIface.requestServiceDiscoveryCallback cb) {
+                cb.onValues(mStatusSuccess, 0);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock)
+                .requestServiceDiscovery(
+                        any(byte[].class), any(ArrayList.class),
+                        any(ISupplicantP2pIface.requestServiceDiscoveryCallback.class));
+
+        for (String address : mInvalidMacAddresses) {
+            assertNull(mDut.requestServiceDiscovery(
+                    address, mValidServiceRequestString));
+        }
+        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, null));
+        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mInvalidServiceRequestString));
     }
 
     /**
-     * Test that we can call removeNetwork
+     * Verify that requestServiceDiscovery returns false, if status is not SUCCESS.
      */
     @Test
-    public void testRemoveNetwork() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.removeNetwork(anyInt())).thenReturn(true);
-        assertTrue(mDut.removeNetwork(NETWORK_ID));
-        verify(mP2pIfaceHalAidlMock).removeNetwork(eq(NETWORK_ID));
+    public void testRequestServiceDiscovery_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(
+                    byte[] address, ArrayList<Byte> query,
+                    ISupplicantP2pIface.requestServiceDiscoveryCallback cb) {
+                cb.onValues(mStatusFailure, 0);
+            }
+        })
+        .when(mISupplicantP2pIfaceMock)
+                .requestServiceDiscovery(
+                        any(byte[].class), any(ArrayList.class),
+                        any(ISupplicantP2pIface.requestServiceDiscoveryCallback.class));
+
+        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mValidServiceRequestString));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call removeNetwork
+     * Verify that requestServiceDiscovery disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testLoadGroups() {
-        initializeWithAidlImpl(true);
-        WifiP2pGroupList groups = mock(WifiP2pGroupList.class);
-        when(mP2pIfaceHalAidlMock.loadGroups(any(WifiP2pGroupList.class))).thenReturn(true);
-        assertTrue(mDut.loadGroups(groups));
-        verify(mP2pIfaceHalAidlMock).loadGroups(eq(groups));
+    public void testRequestServiceDiscovery_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doThrow(mRemoteException)
+                .when(mISupplicantP2pIfaceMock)
+                .requestServiceDiscovery(
+                        any(byte[].class), any(ArrayList.class),
+                        any(ISupplicantP2pIface.requestServiceDiscoveryCallback.class));
+        assertNull(mDut.requestServiceDiscovery(mPeerMacAddress, mValidServiceRequestString));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+    // Test constant used in cancelServiceDiscovery tests
+    static final String SERVICE_IDENTIFIER_STR = "521918410304";
+    static final long SERVICE_IDENTIFIER_LONG = 521918410304L;
+
+    /**
+     * Sunny day scenario for cancelServiceDiscovery()
+     */
+    @Test
+    public void testCancelServiceDiscovery_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.cancelServiceDiscovery(SERVICE_IDENTIFIER_LONG))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
     }
 
     /**
-     * Test that we can call setWpsDeviceName
+     * Test cancelServiceDiscovery with invalid parameters.
      */
     @Test
-    public void testSetWpsDeviceName() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setWpsDeviceName(anyString())).thenReturn(true);
-        assertTrue(mDut.setWpsDeviceName(PARAMS));
-        verify(mP2pIfaceHalAidlMock).setWpsDeviceName(eq(PARAMS));
+    public void testCancelServiceDiscovery_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.cancelServiceDiscovery(anyLong()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.cancelServiceDiscovery(null));
+        assertFalse(mDut.cancelServiceDiscovery("not a number"));
     }
 
     /**
-     * Test that we can call setWpsDeviceType
+     * Verify that cancelServiceDiscovery returns false, if status is not SUCCESS.
      */
     @Test
-    public void testSetWpsDeviceType() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setWpsDeviceType(anyString())).thenReturn(true);
-        assertTrue(mDut.setWpsDeviceType(PARAMS));
-        verify(mP2pIfaceHalAidlMock).setWpsDeviceType(eq(PARAMS));
+    public void testCancelServiceDiscovery_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.cancelServiceDiscovery(anyLong()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call setWpsConfigMethods
+     * Verify that cancelServiceDiscovery disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testSetWpsConfigMethods() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setWpsConfigMethods(anyString())).thenReturn(true);
-        assertTrue(mDut.setWpsConfigMethods(PARAMS));
-        verify(mP2pIfaceHalAidlMock).setWpsConfigMethods(eq(PARAMS));
+    public void testCancelServiceDiscovery_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.cancelServiceDiscovery(anyLong()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.cancelServiceDiscovery(SERVICE_IDENTIFIER_STR));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for setMiracastMode()
+     */
+    @Test
+    public void testSetMiracastMode_success() throws Exception {
+        HashSet<Byte> modes = new HashSet<Byte>();
+
+        when(mISupplicantP2pIfaceMock.setMiracastMode(anyByte()))
+                .thenAnswer(new AnswerWithArguments() {
+                    public SupplicantStatus answer(byte mode) {
+                        modes.add(mode);
+                        return mStatusSuccess;
+                    }
+                });
+        // Default value when service is not initialized.
+        assertFalse(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
+        assertTrue(modes.contains(ISupplicantP2pIface.MiracastMode.SOURCE));
+
+        assertTrue(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SINK));
+        assertTrue(modes.contains(ISupplicantP2pIface.MiracastMode.SINK));
+
+        // Any invalid number yields disabled miracast mode.
+        assertTrue(mDut.setMiracastMode(-1));
+        assertTrue(modes.contains(ISupplicantP2pIface.MiracastMode.DISABLED));
     }
 
     /**
-     * Test that we can call getNfcHandoverRequest
+     * Verify that setMiracastMode returns false, if status is not SUCCESS.
      */
     @Test
-    public void testGetNfcHandoverRequest() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.getNfcHandoverRequest()).thenReturn(RESPONSE);
-        assertEquals(RESPONSE, mDut.getNfcHandoverRequest());
-        verify(mP2pIfaceHalAidlMock).getNfcHandoverRequest();
+    public void testSetMiracastMode_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setMiracastMode(anyByte()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call getNfcHandoverSelect
+     * Verify that setMiracastMode disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testGetNfcHandoverSelect() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.getNfcHandoverSelect()).thenReturn(RESPONSE);
-        assertEquals(RESPONSE, mDut.getNfcHandoverSelect());
-        verify(mP2pIfaceHalAidlMock).getNfcHandoverSelect();
+    public void testSetMiracastMode_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setMiracastMode(anyByte()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for startWpsPbc()
+     */
+    @Test
+    public void testStartWpsPbc_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.startWpsPbc(eq(mIfaceName), eq(mPeerMacAddressBytes)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
     }
 
     /**
-     * Test that we can call responderReportNfcHandover
+     * StartWpsPbc with invalid arguments.
      */
     @Test
-    public void testResponderReportNfcHandover() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.responderReportNfcHandover(anyString())).thenReturn(true);
-        assertTrue(mDut.responderReportNfcHandover(PARAMS));
-        verify(mP2pIfaceHalAidlMock).responderReportNfcHandover(eq(PARAMS));
+    public void testStartWpsPbc_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.startWpsPbc(anyString(), any(byte[].class)))
+                .thenReturn(mStatusSuccess);
+
+        for (String address : mInvalidMacAddresses) {
+            assertFalse(mDut.startWpsPbc(mIfaceName, address));
+        }
+
+        assertFalse(mDut.startWpsPbc(null, mPeerMacAddress));
     }
 
     /**
-     * Test that we can call setClientList
+     * Verify that startWpsPbc returns false, if status is not SUCCESS.
      */
     @Test
-    public void testSetClientList() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setClientList(anyInt(), anyString())).thenReturn(true);
-        assertTrue(mDut.setClientList(NETWORK_ID, PARAMS));
-        verify(mP2pIfaceHalAidlMock).setClientList(eq(NETWORK_ID), eq(PARAMS));
+    public void testStartWpsPbc_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.startWpsPbc(anyString(), any(byte[].class)))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
     }
 
     /**
-     * Test that we can call getClientList
+     * Verify that startWpsPbc disconnects and returns false, if HAL throws exception.
      */
     @Test
-    public void testGetClientList() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.getClientList(anyInt())).thenReturn(RESPONSE);
-        assertEquals(RESPONSE, mDut.getClientList(NETWORK_ID));
-        verify(mP2pIfaceHalAidlMock).getClientList(eq(NETWORK_ID));
+    public void testStartWpsPbc_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.startWpsPbc(anyString(), any(byte[].class)))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.startWpsPbc(mIfaceName, mPeerMacAddress));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for startWpsPinKeypad()
+     */
+    @Test
+    public void testStartWpsPinKeypad_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.startWpsPinKeypad(eq(mIfaceName), eq("1234")))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.startWpsPinKeypad(mIfaceName, "1234"));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.startWpsPinKeypad(mIfaceName, "1234"));
     }
 
     /**
-     * Test that we can call saveConfig
+     * StartWpsPinKeypad with invalid arguments.
      */
     @Test
-    public void testSaveConfig() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.saveConfig()).thenReturn(true);
+    public void testStartWpsPinKeypad_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.startWpsPinKeypad(anyString(), anyString()))
+                .thenReturn(mStatusSuccess);
+
+        assertFalse(mDut.startWpsPinKeypad(null, "1234"));
+        assertFalse(mDut.startWpsPinKeypad(mIfaceName, null));
+        // StartWpsPinPinKeypad does not validate, that PIN indeed holds an integer encoded in a
+        // string. This code would be redundant, as HAL requires string to be passed.
+    }
+
+    /**
+     * Verify that startWpsPinKeypad returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testStartWpsPinKeypad_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.startWpsPinKeypad(anyString(), anyString()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.startWpsPinKeypad(mIfaceName, "1234"));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that startWpsPinKeypad disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testStartWpsPinKeypad_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.startWpsPinKeypad(anyString(), anyString()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.startWpsPinKeypad(mIfaceName, "1234"));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for startWpsPinDisplay()
+     */
+    @Test
+    public void testStartWpsPinDisplay_success() throws Exception {
+        doAnswer(new AnswerWithArguments() {
+            public void answer(String ifName, byte[] bssid,
+                    ISupplicantP2pIface.startWpsPinDisplayCallback cb) {
+                cb.onValues(mStatusSuccess, "1234");
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).startWpsPinDisplay(
+                eq(mIfaceName), eq(mPeerMacAddressBytes),
+                any(ISupplicantP2pIface.startWpsPinDisplayCallback.class));
+
+        // Default value when service is not initialized.
+        assertNull(mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertEquals("1234", mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
+    }
+
+    /**
+     * StartWpsPinDisplay with invalid arguments.
+     */
+    @Test
+    public void testStartWpsPinDisplay_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(String ifName, byte[] bssid,
+                    ISupplicantP2pIface.startWpsPinDisplayCallback cb) {
+                cb.onValues(mStatusSuccess, "1234");
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).startWpsPinDisplay(
+                anyString(), any(byte[].class),
+                any(ISupplicantP2pIface.startWpsPinDisplayCallback.class));
+
+        for (String address : mInvalidMacAddresses) {
+            assertNull(mDut.startWpsPinDisplay(mIfaceName, address));
+        }
+
+        assertNull(mDut.startWpsPinDisplay(null, mPeerMacAddress));
+    }
+
+    /**
+     * Verify that startWpsPinDisplay returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testStartWpsPinDisplay_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(String ifName, byte[] bssid,
+                    ISupplicantP2pIface.startWpsPinDisplayCallback cb) {
+                cb.onValues(mStatusFailure, "1234");
+            }
+        })
+        .when(mISupplicantP2pIfaceMock).startWpsPinDisplay(
+                anyString(), any(byte[].class),
+                any(ISupplicantP2pIface.startWpsPinDisplayCallback.class));
+
+        assertNull(mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that startWpsPinDisplay disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testStartWpsPinDisplay_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        doThrow(mRemoteException)
+                .when(mISupplicantP2pIfaceMock).startWpsPinDisplay(
+                        anyString(), any(byte[].class),
+                        any(ISupplicantP2pIface.startWpsPinDisplayCallback.class));
+        assertNull(mDut.startWpsPinDisplay(mIfaceName, mPeerMacAddress));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for cancelWps()
+     */
+    @Test
+    public void testCancelWps_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.cancelWps(eq(mIfaceName)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.cancelWps(mIfaceName));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.cancelWps(mIfaceName));
+    }
+
+    /**
+     * CancelWps with invalid arguments.
+     */
+    @Test
+    public void testCancelWps_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.cancelWps(anyString()))
+                .thenReturn(mStatusSuccess);
+
+        assertFalse(mDut.cancelWps(null));
+    }
+
+    /**
+     * Verify that cancelWps returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testCancelWps_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.cancelWps(anyString()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.cancelWps(mIfaceName));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that cancelWps disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testCancelWps_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.cancelWps(anyString()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.cancelWps(mIfaceName));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for enableWfd()
+     */
+    @Test
+    public void testEnableWfd_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.enableWfd(eq(true)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.enableWfd(true));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.enableWfd(true));
+    }
+
+    /**
+     * Verify that enableWfd returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testEnableWfd_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.enableWfd(anyBoolean()))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.enableWfd(true));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that enableWfd disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testEnableWfd_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.enableWfd(anyBoolean()))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.enableWfd(false));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+
+    /**
+     * Sunny day scenario for setWfdDeviceInfo()
+     */
+    @Test
+    public void testSetWfdDeviceInfo_success() throws Exception {
+        when(mISupplicantP2pIfaceMock.setWfdDeviceInfo(eq(mValidServiceRequestBytes)))
+                .thenReturn(mStatusSuccess);
+        // Default value when service is not initialized.
+        assertFalse(mDut.setWfdDeviceInfo(mValidServiceRequestString));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.setWfdDeviceInfo(mValidServiceRequestString));
+    }
+
+    /**
+     * SetWfdDeviceInfo with invalid arguments.
+     */
+    @Test
+    public void testSetWfdDeviceInfo_invalidArguments() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setWfdDeviceInfo(any(byte[].class)))
+                .thenReturn(mStatusSuccess);
+
+        assertFalse(mDut.setWfdDeviceInfo(null));
+        assertFalse(mDut.setWfdDeviceInfo(mInvalidServiceRequestString));
+    }
+
+    /**
+     * Verify that setWfdDeviceInfo returns false, if status is not SUCCESS.
+     */
+    @Test
+    public void testSetWfdDeviceInfo_failure() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setWfdDeviceInfo(any(byte[].class)))
+                .thenReturn(mStatusFailure);
+        assertFalse(mDut.setWfdDeviceInfo(mValidServiceRequestString));
+        // Check that service is still alive.
+        assertTrue(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify that setWfdDeviceInfo disconnects and returns false, if HAL throws exception.
+     */
+    @Test
+    public void testSetWfdDeviceInfo_exception() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+        when(mISupplicantP2pIfaceMock.setWfdDeviceInfo(any(byte[].class)))
+                .thenThrow(mRemoteException);
+        assertFalse(mDut.setWfdDeviceInfo(mValidServiceRequestString));
+        // Check service is dead.
+        assertFalse(mDut.isInitializationComplete());
+    }
+
+    /**
+     * Verify the loading of group info.
+     * Specifically, all groups returned by listNetworks are added as a persistent group, so long as
+     * they are NOT current.
+     */
+    @Test
+    public void testLoadGroups() throws Exception {
+        executeAndValidateInitializationSequence(false, false, false);
+
+        // Class to hold the P2p group info returned from the HIDL interface.
+        class P2pGroupInfo {
+            public String ssid;
+            public byte[] bssid;
+            public boolean isGo;
+            public boolean isCurrent;
+            P2pGroupInfo(String ssid, byte[] bssid, boolean isGo, boolean isCurrent) {
+                this.ssid = ssid;
+                this.bssid = bssid;
+                this.isGo = isGo;
+                this.isCurrent = isCurrent;
+            }
+        }
+
+        Map<Integer, P2pGroupInfo> groups = new HashMap<>();
+        groups.put(0, new P2pGroupInfo(
+                "test_34",
+                NativeUtil.macAddressToByteArray("56:34:ab:12:12:34"),
+                false, false));
+        groups.put(1, new P2pGroupInfo(
+                "test_1234",
+                NativeUtil.macAddressToByteArray("16:ed:ab:12:45:34"),
+                true, false));
+        groups.put(2, new P2pGroupInfo(
+                "test_4545",
+                NativeUtil.macAddressToByteArray("32:89:23:56:45:34"),
+                true, false));
+        groups.put(3, new P2pGroupInfo(
+                "iShouldntBeHere",
+                NativeUtil.macAddressToByteArray("aa:bb:cc:56:45:34"),
+                true, true));
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicantP2pIface.listNetworksCallback cb) {
+                cb.onValues(mStatusSuccess, new ArrayList<Integer>(groups.keySet()));
+            }
+        }).when(mISupplicantP2pIfaceMock)
+                .listNetworks(any(ISupplicantP2pIface.listNetworksCallback.class));
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(final int networkId, ISupplicantP2pIface.getNetworkCallback cb) {
+                try {
+                    doAnswer(new AnswerWithArguments() {
+                        public void answer(ISupplicantP2pNetwork.getSsidCallback cb) {
+                            cb.onValues(mStatusSuccess,
+                                    NativeUtil.stringToByteArrayList(groups.get(networkId).ssid));
+                            return;
+                        }
+                    }).when(mISupplicantP2pNetworkMock)
+                            .getSsid(any(ISupplicantP2pNetwork.getSsidCallback.class));
+                    doAnswer(new AnswerWithArguments() {
+                        public void answer(ISupplicantP2pNetwork.getBssidCallback cb) {
+                            cb.onValues(mStatusSuccess, groups.get(networkId).bssid);
+                            return;
+                        }
+                    }).when(mISupplicantP2pNetworkMock)
+                            .getBssid(any(ISupplicantP2pNetwork.getBssidCallback.class));
+                    doAnswer(new AnswerWithArguments() {
+                        public void answer(ISupplicantP2pNetwork.isCurrentCallback cb) {
+                            cb.onValues(mStatusSuccess, groups.get(networkId).isCurrent);
+                            return;
+                        }
+                    }).when(mISupplicantP2pNetworkMock)
+                            .isCurrent(any(ISupplicantP2pNetwork.isCurrentCallback.class));
+                    doAnswer(new AnswerWithArguments() {
+                        public void answer(ISupplicantP2pNetwork.isGoCallback cb) {
+                            cb.onValues(mStatusSuccess, groups.get(networkId).isGo);
+                            return;
+                        }
+                    }).when(mISupplicantP2pNetworkMock)
+                            .isGo(any(ISupplicantP2pNetwork.isGoCallback.class));
+                } catch (RemoteException e) {
+                }
+                cb.onValues(mStatusSuccess, mISupplicantP2pNetworkMock);
+                return;
+            }
+        }).when(mISupplicantP2pIfaceMock)
+                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
+
+        WifiP2pGroupList p2pGroups = new WifiP2pGroupList();
+        assertTrue(mDut.loadGroups(p2pGroups));
+
+        assertEquals(3, p2pGroups.getGroupList().size());
+        for (WifiP2pGroup group : p2pGroups.getGroupList()) {
+            int networkId = group.getNetworkId();
+            assertEquals(groups.get(networkId).ssid, group.getNetworkName());
+            assertEquals(
+                    NativeUtil.macAddressFromByteArray(groups.get(networkId).bssid),
+                    group.getOwner().deviceAddress);
+            assertEquals(groups.get(networkId).isGo, group.isGroupOwner());
+        }
+    }
+
+    /**
+     * Sunny day scenario for setClientList()
+     */
+    @Test
+    public void testSetClientList() throws Exception {
+        int testNetworkId = 5;
+        final String client1 = mGroupOwnerMacAddress;
+        final String client2 = mPeerMacAddress;
+
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(final int networkId, ISupplicantP2pIface.getNetworkCallback cb) {
+                if (networkId == testNetworkId) {
+                    cb.onValues(mStatusSuccess, mISupplicantP2pNetworkMock);
+                } else {
+                    cb.onValues(mStatusFailure, null);
+                }
+                return;
+            }
+        }).when(mISupplicantP2pIfaceMock)
+                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
+        when(mISupplicantP2pNetworkMock.setClientList(any(ArrayList.class)))
+                .thenReturn(mStatusSuccess);
+
+        String clientList = client1 + " " + client2;
+        assertTrue(mDut.setClientList(testNetworkId, clientList));
+        verify(mISupplicantP2pIfaceMock)
+                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
+        ArgumentCaptor<ArrayList> capturedClients = ArgumentCaptor.forClass(ArrayList.class);
+        verify(mISupplicantP2pNetworkMock).setClientList(capturedClients.capture());
+
+        // Convert these to long to help with comparisons.
+        ArrayList<byte[]> clients = capturedClients.getValue();
+        ArrayList<Long> expectedClients = new ArrayList<Long>() {{
+                add(NativeUtil.macAddressToLong(mGroupOwnerMacAddressBytes));
+                add(NativeUtil.macAddressToLong(mPeerMacAddressBytes));
+            }};
+        ArrayList<Long> receivedClients = new ArrayList<Long>();
+        for (byte[] client : clients) {
+            receivedClients.add(NativeUtil.macAddressToLong(client));
+        }
+        assertEquals(expectedClients, receivedClients);
+    }
+
+    /**
+     * Failure scenario for setClientList() when getNetwork returns null.
+     */
+    @Test
+    public void testSetClientListFailureDueToGetNetwork() throws Exception {
+        int testNetworkId = 5;
+        final String client1 = mGroupOwnerMacAddress;
+        final String client2 = mPeerMacAddress;
+
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(final int networkId, ISupplicantP2pIface.getNetworkCallback cb) {
+                cb.onValues(mStatusFailure, null);
+                return;
+            }
+        }).when(mISupplicantP2pIfaceMock)
+                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
+        when(mISupplicantP2pNetworkMock.setClientList(any(ArrayList.class)))
+                .thenReturn(mStatusSuccess);
+
+        String clientList = client1 + " " + client2;
+        assertFalse(mDut.setClientList(testNetworkId, clientList));
+        verify(mISupplicantP2pIfaceMock)
+                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
+        verify(mISupplicantP2pNetworkMock, never()).setClientList(any(ArrayList.class));
+    }
+
+    /**
+     * Sunny day scenario for getClientList()
+     */
+    @Test
+    public void testGetClientList() throws Exception {
+        int testNetworkId = 5;
+        final String client1 = mGroupOwnerMacAddress;
+        final String client2 = mPeerMacAddress;
+
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(final int networkId, ISupplicantP2pIface.getNetworkCallback cb) {
+                if (networkId == testNetworkId) {
+                    cb.onValues(mStatusSuccess, mISupplicantP2pNetworkMock);
+                } else {
+                    cb.onValues(mStatusFailure, null);
+                }
+                return;
+            }
+        }).when(mISupplicantP2pIfaceMock)
+                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicantP2pNetwork.getClientListCallback cb) {
+                ArrayList<byte[]> clients = new ArrayList<byte[]>() {{
+                        add(mGroupOwnerMacAddressBytes);
+                        add(mPeerMacAddressBytes);
+                    }};
+                cb.onValues(mStatusSuccess, clients);
+                return;
+            }
+        }).when(mISupplicantP2pNetworkMock)
+                .getClientList(any(ISupplicantP2pNetwork.getClientListCallback.class));
+
+        String clientList = client1 + " " + client2;
+        assertEquals(clientList, mDut.getClientList(testNetworkId));
+        verify(mISupplicantP2pIfaceMock)
+                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
+        verify(mISupplicantP2pNetworkMock)
+                .getClientList(any(ISupplicantP2pNetwork.getClientListCallback.class));
+    }
+
+    /**
+     * Failure scenario for getClientList() when getNetwork returns null.
+     */
+    @Test
+    public void testGetClientListFailureDueToGetNetwork() throws Exception {
+        int testNetworkId = 5;
+        final String client1 = mGroupOwnerMacAddress;
+        final String client2 = mPeerMacAddress;
+
+        executeAndValidateInitializationSequence(false, false, false);
+        doAnswer(new AnswerWithArguments() {
+            public void answer(final int networkId, ISupplicantP2pIface.getNetworkCallback cb) {
+                cb.onValues(mStatusFailure, null);
+                return;
+            }
+        }).when(mISupplicantP2pIfaceMock)
+                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicantP2pNetwork.getClientListCallback cb) {
+                ArrayList<byte[]> clients = new ArrayList<byte[]>() {{
+                        add(mGroupOwnerMacAddressBytes);
+                        add(mPeerMacAddressBytes);
+                    }};
+                cb.onValues(mStatusSuccess, clients);
+                return;
+            }
+        }).when(mISupplicantP2pNetworkMock)
+                .getClientList(any(ISupplicantP2pNetwork.getClientListCallback.class));
+
+        assertEquals(null, mDut.getClientList(testNetworkId));
+        verify(mISupplicantP2pIfaceMock)
+                .getNetwork(anyInt(), any(ISupplicantP2pIface.getNetworkCallback.class));
+        verify(mISupplicantP2pNetworkMock, never())
+                .getClientList(any(ISupplicantP2pNetwork.getClientListCallback.class));
+    }
+
+    /**
+     * Sunny day scenario for saveConfig()
+     */
+    @Test
+    public void testSaveConfig() throws Exception {
+        when(mISupplicantP2pIfaceMock.saveConfig()).thenReturn(mStatusSuccess);
+
+        // Should fail before initialization.
+        assertFalse(mDut.saveConfig());
+        executeAndValidateInitializationSequence(false, false, false);
         assertTrue(mDut.saveConfig());
-        verify(mP2pIfaceHalAidlMock).saveConfig();
+        verify(mISupplicantP2pIfaceMock).saveConfig();
     }
 
     /**
-     * Test that we can call setMacRandomization
+     * Sunny day scenario for setMacRandomization()
      */
     @Test
-    public void testSetMacRandomization() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setMacRandomization(anyBoolean())).thenReturn(true);
-        assertTrue(mDut.setMacRandomization(ENABLE));
-        verify(mP2pIfaceHalAidlMock).setMacRandomization(eq(ENABLE));
+    public void testEnableMacRandomization() throws Exception {
+        when(mISupplicantP2pIfaceMockV12.setMacRandomization(anyBoolean()))
+                .thenReturn(mStatusSuccess);
+
+        // Should fail before initialization.
+        assertFalse(mDut.setMacRandomization(true));
+        executeAndValidateInitializationSequence(false, false, false);
+        assertTrue(mDut.setMacRandomization(true));
+        verify(mISupplicantP2pIfaceMockV12).setMacRandomization(eq(true));
     }
 
     /**
-     * Test that we can call setWfdR2DeviceInfo
+     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
+     * expected result. Verifies if ISupplicantP2pIface manager is initialized or reset.
+     * Each of the arguments will cause a different failure mode when set true.
      */
-    @Test
-    public void testSetWfdR2DeviceInfo() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.setWfdR2DeviceInfo(anyString())).thenReturn(true);
-        assertTrue(mDut.setWfdR2DeviceInfo(PARAMS));
-        verify(mP2pIfaceHalAidlMock).setWfdR2DeviceInfo(eq(PARAMS));
+    private void executeAndValidateInitializationSequence(boolean causeRemoteException,
+            boolean getZeroInterfaces, boolean getNullInterface) throws Exception {
+        boolean shouldSucceed = !causeRemoteException && !getZeroInterfaces && !getNullInterface;
+        // Setup callback mock answers
+        ArrayList<ISupplicant.IfaceInfo> interfaces;
+        if (getZeroInterfaces) {
+            interfaces = new ArrayList<ISupplicant.IfaceInfo>();
+        } else {
+            interfaces = mIfaceInfoList;
+        }
+
+        doAnswer(new AnswerWithArguments() {
+            public void answer(ISupplicant.listInterfacesCallback cb) throws RemoteException {
+                cb.onValues(mStatusSuccess, interfaces);
+            }
+        })
+        .when(mISupplicantMock).listInterfaces(any(ISupplicant.listInterfacesCallback.class));
+
+        if (causeRemoteException) {
+            doThrow(new RemoteException("Some error!!!"))
+                    .when(mISupplicantMock).getInterface(any(ISupplicant.IfaceInfo.class),
+                    any(ISupplicant.getInterfaceCallback.class));
+        } else {
+            doAnswer(new GetGetInterfaceAnswer(getNullInterface))
+                    .when(mISupplicantMock).getInterface(any(ISupplicant.IfaceInfo.class),
+                    any(ISupplicant.getInterfaceCallback.class));
+        }
+
+        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantP2pIfaceMock);
+        // Initialize SupplicantP2pIfaceHal, should call serviceManager.registerForNotifications
+        assertTrue(mDut.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(
+                any(IHwBinder.DeathRecipient.class), anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        // act: cause the onRegistration(...) callback to execute
+        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
+        mInOrder.verify(mISupplicantMock).linkToDeath(
+                any(IHwBinder.DeathRecipient.class), anyLong());
+        assertEquals(true, mDut.isInitializationComplete());
+
+        // Now setup the iface.
+        assertTrue(mDut.setupIface(mIfaceName) == shouldSucceed);
+
+        // verify: listInterfaces is called
+        mInOrder.verify(mISupplicantMock).listInterfaces(
+                any(ISupplicant.listInterfacesCallback.class));
+        if (!causeRemoteException && !getNullInterface && !getZeroInterfaces) {
+            mInOrder.verify(mISupplicantMock)
+                    .getInterface(any(ISupplicant.IfaceInfo.class),
+                    any(ISupplicant.getInterfaceCallback.class));
+            mInOrder.verify(mISupplicantP2pIfaceMock).linkToDeath(
+                    any(IHwBinder.DeathRecipient.class), anyLong());
+            mInOrder.verify(mISupplicantP2pIfaceMock).registerCallback(
+                    any(ISupplicantP2pIfaceCallback.class));
+        }
+
+        // if no errors, V1_2 interface is on as well
+        mISupplicantV12Enabled = true;
     }
 
     /**
-     * Test that we can call removeClient
+     * Calls.initialize(), mocking various call back answers and verifying flow, asserting for the
+     * expected result. Verifies if ISupplicantP2pIface manager is initialized or reset.
+     * Each of the arguments will cause a different failure mode when set true.
      */
-    @Test
-    public void testRemoveClient() {
-        initializeWithAidlImpl(true);
-        when(mP2pIfaceHalAidlMock.removeClient(eq(BSSID), anyBoolean())).thenReturn(true);
-        assertTrue(mDut.removeClient(BSSID, true));
-        verify(mP2pIfaceHalAidlMock).removeClient(eq(BSSID), eq(true));
+    private void executeAndValidateInitializationSequenceV1_1(boolean causeRemoteException,
+                                                               boolean getNullInterface)
+            throws Exception {
+        boolean shouldSucceed = !causeRemoteException && !getNullInterface;
+        // Setup callback mock answers
+        if (causeRemoteException) {
+            doThrow(new RemoteException("Some error!!!"))
+                    .when(mISupplicantMockV1_1).addInterface(any(ISupplicant.IfaceInfo.class),
+                    any(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                            .addInterfaceCallback.class));
+        } else {
+            doAnswer(new GetAddInterfaceAnswer(getNullInterface))
+                    .when(mISupplicantMockV1_1).addInterface(any(ISupplicant.IfaceInfo.class),
+                    any(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                            .addInterfaceCallback.class));
+        }
+
+        mInOrder = inOrder(mServiceManagerMock, mISupplicantMock, mISupplicantMockV1_1,
+                mISupplicantP2pIfaceMock);
+        // Initialize SupplicantStaIfaceHal, should call serviceManager.registerForNotifications
+        assertTrue(mDut.initialize());
+        // verify: service manager initialization sequence
+        mInOrder.verify(mServiceManagerMock).linkToDeath(
+                any(IHwBinder.DeathRecipient.class), anyLong());
+        mInOrder.verify(mServiceManagerMock).registerForNotifications(
+                eq(ISupplicant.kInterfaceName), eq(""), mServiceNotificationCaptor.capture());
+        // act: cause the onRegistration(...) callback to execute
+        mServiceNotificationCaptor.getValue().onRegistration(ISupplicant.kInterfaceName, "", true);
+        mInOrder.verify(mISupplicantMock).linkToDeath(
+                any(IHwBinder.DeathRecipient.class), anyLong());
+        assertEquals(true, mDut.isInitializationComplete());
+
+        // Now setup the iface.
+        assertTrue(mDut.setupIface(mIfaceName) == shouldSucceed);
+
+        // verify: addInterface is called
+        mInOrder.verify(mISupplicantMockV1_1)
+                .addInterface(any(ISupplicant.IfaceInfo.class),
+                        any(android.hardware.wifi.supplicant.V1_1.ISupplicant
+                                .addInterfaceCallback.class));
+        if (!causeRemoteException && !getNullInterface) {
+            mInOrder.verify(mISupplicantP2pIfaceMock).linkToDeath(
+                    any(IHwBinder.DeathRecipient.class), anyLong());
+            mInOrder.verify(mISupplicantP2pIfaceMock).registerCallback(
+                    any(ISupplicantP2pIfaceCallback.class));
+        }
+
+        // Ensure we don't try to use the listInterfaces method from 1.0 version.
+        verify(mISupplicantMock, never()).listInterfaces(
+                any(ISupplicant.listInterfacesCallback.class));
+        verify(mISupplicantMock, never()).getInterface(any(ISupplicant.IfaceInfo.class),
+                any(ISupplicant.getInterfaceCallback.class));
+    }
+
+    private SupplicantStatus createSupplicantStatus(int code) {
+        SupplicantStatus status = new SupplicantStatus();
+        status.code = code;
+        return status;
+    }
+
+    /**
+     * Create an IfaceInfo with given type and name
+     */
+    private ISupplicant.IfaceInfo createIfaceInfo(int type, String name) {
+        ISupplicant.IfaceInfo info = new ISupplicant.IfaceInfo();
+        info.type = type;
+        info.name = name;
+        return info;
+    }
+
+    /**
+     * Create new placeholder WifiP2pConfig instance.
+     */
+    private WifiP2pConfig createPlaceholderP2pConfig(String peerAddress,
+                                                     int wpsProvMethod, String pin) {
+        WifiP2pConfig config = new WifiP2pConfig();
+        config.wps = new WpsInfo();
+        config.deviceAddress = peerAddress;
+
+        config.wps.setup = wpsProvMethod;
+        config.wps.pin = pin;
+
+        config.groupOwnerIntent = WifiP2pServiceImpl.DEFAULT_GROUP_OWNER_INTENT;
+
+        return config;
+    }
+
+    /**
+     * Create new placeholder WifiP2pGroup instance.
+     */
+    private WifiP2pGroup createPlaceholderP2pGroup() {
+        WifiP2pGroup group = new WifiP2pGroup();
+        group.setInterface(mIfaceName);
+
+        WifiP2pDevice owner = new WifiP2pDevice();
+        owner.deviceAddress = mGroupOwnerMacAddress;
+        group.setOwner(owner);
+
+        return group;
+    }
+
+    /**
+     * Create new placeholder WifiP2pServiceInfo instance.
+     */
+    private WifiP2pServiceInfo createPlaceholderP2pServiceInfo(String... services) {
+        class TestP2pServiceInfo extends WifiP2pServiceInfo {
+            TestP2pServiceInfo(String[] services) {
+                super(Arrays.asList(services));
+            }
+        }
+        return new TestP2pServiceInfo(services);
+    }
+
+    private class GetGetInterfaceAnswer extends AnswerWithArguments {
+        boolean mGetNullInterface;
+
+        GetGetInterfaceAnswer(boolean getNullInterface) {
+            mGetNullInterface = getNullInterface;
+        }
+
+        public void answer(ISupplicant.IfaceInfo iface, ISupplicant.getInterfaceCallback cb) {
+            if (mGetNullInterface) {
+                cb.onValues(mStatusSuccess, null);
+            } else {
+                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
+            }
+        }
+    }
+
+    private class GetAddInterfaceAnswer extends AnswerWithArguments {
+        boolean mGetNullInterface;
+
+        GetAddInterfaceAnswer(boolean getNullInterface) {
+            mGetNullInterface = getNullInterface;
+        }
+
+        public void answer(ISupplicant.IfaceInfo iface,
+                           android.hardware.wifi.supplicant.V1_1.ISupplicant
+                                   .addInterfaceCallback cb) {
+            if (mGetNullInterface) {
+                cb.onValues(mStatusSuccess, null);
+            } else {
+                cb.onValues(mStatusSuccess, mISupplicantIfaceMock);
+            }
+        }
     }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMetricsTest.java b/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMetricsTest.java
index 72e4a02..bbfbd37 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMetricsTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMetricsTest.java
@@ -16,7 +16,6 @@
 package com.android.server.wifi.p2p;
 
 import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.when;
 
 import android.net.wifi.p2p.WifiP2pConfig;
 import android.net.wifi.p2p.WifiP2pGroup;
@@ -24,22 +23,16 @@
 
 import androidx.test.filters.SmallTest;
 
-import com.android.dx.mockito.inline.extended.ExtendedMockito;
 import com.android.server.wifi.Clock;
 import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.proto.WifiStatsLog;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.GroupEvent;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.P2pConnectionEvent;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.WifiP2pStats;
 
-
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.mockito.MockitoSession;
-import org.mockito.quality.Strictness;
 
 /**
  * Unit tests for {@link com.android.server.wifi.WifiP2pMetrics}.
@@ -48,22 +41,11 @@
 public class WifiP2pMetricsTest extends WifiBaseTest {
     @Mock Clock mClock;
     WifiP2pMetrics mWifiP2pMetrics;
-    private MockitoSession mSession;
 
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(0L);
         mWifiP2pMetrics = new WifiP2pMetrics(mClock);
-        mSession = ExtendedMockito.mockitoSession()
-                .strictness(Strictness.LENIENT)
-                .mockStatic(WifiStatsLog.class)
-                .startMocking();
-    }
-
-    @After
-    public void tearDown() {
-        mSession.finishMocking();
     }
 
     /**
@@ -77,23 +59,13 @@
         WifiP2pStats stats;
 
         // Start and end Connection event.
-        mWifiP2pMetrics.startConnectionEvent(P2pConnectionEvent.CONNECTION_FRESH, null,
-                GroupEvent.GROUP_OWNER);
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(1000L);
+        mWifiP2pMetrics.startConnectionEvent(P2pConnectionEvent.CONNECTION_FRESH, null);
         mWifiP2pMetrics.endConnectionEvent(P2pConnectionEvent.CLF_NONE);
         stats = mWifiP2pMetrics.consolidateProto();
         assertEquals(1, stats.connectionEvent.length);
-        ExtendedMockito.verify(() -> WifiStatsLog.write(
-                WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED,
-                WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__TYPE__FRESH,
-                1000, 1000 / 200,
-                WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__FAILURE_CODE__NONE,
-                WifiStatsLog.WIFI_P2P_CONNECTION_REPORTED__GROUP_ROLE__GROUP_OWNER
-                ));
 
         // Start and end Connection event.
-        mWifiP2pMetrics.startConnectionEvent(P2pConnectionEvent.CONNECTION_FRESH, config,
-                GroupEvent.GROUP_OWNER);
+        mWifiP2pMetrics.startConnectionEvent(P2pConnectionEvent.CONNECTION_FRESH, config);
         mWifiP2pMetrics.endConnectionEvent(P2pConnectionEvent.CLF_NONE);
         stats = mWifiP2pMetrics.consolidateProto();
         assertEquals(2, stats.connectionEvent.length);
@@ -106,15 +78,13 @@
 
         // Start two ConnectionEvents in a row.
         // The current active un-ended connection event is excluded.
-        mWifiP2pMetrics.startConnectionEvent(P2pConnectionEvent.CONNECTION_REINVOKE, config,
-                GroupEvent.GROUP_OWNER);
+        mWifiP2pMetrics.startConnectionEvent(P2pConnectionEvent.CONNECTION_REINVOKE, config);
         stats = mWifiP2pMetrics.consolidateProto();
         assertEquals(3, stats.connectionEvent.length);
 
         // The last un-ended connection is ended.
         // The current active un-ended connection event is excluded.
-        mWifiP2pMetrics.startConnectionEvent(P2pConnectionEvent.CONNECTION_REINVOKE, config,
-                GroupEvent.GROUP_OWNER);
+        mWifiP2pMetrics.startConnectionEvent(P2pConnectionEvent.CONNECTION_REINVOKE, config);
         stats = mWifiP2pMetrics.consolidateProto();
         assertEquals(4, stats.connectionEvent.length);
     }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMonitorTest.java b/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMonitorTest.java
index be6da71..1f87722 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMonitorTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pMonitorTest.java
@@ -20,8 +20,6 @@
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 
-import android.net.wifi.p2p.WifiP2pDevice;
-import android.net.wifi.p2p.WifiP2pProvDiscEvent;
 import android.os.Handler;
 import android.os.Message;
 import android.os.test.TestLooper;
@@ -41,7 +39,6 @@
 public class WifiP2pMonitorTest extends WifiBaseTest {
     private static final String P2P_IFACE_NAME = "p2p0";
     private static final String SECOND_P2P_IFACE_NAME = "p2p1";
-    private static final int TEST_GROUP_FREQUENCY = 5180;
     private WifiP2pMonitor mWifiP2pMonitor;
     private TestLooper mLooper;
     private Handler mHandlerSpy;
@@ -116,56 +113,4 @@
         verify(mHandlerSpy).handleMessage(messageCaptor.capture());
         assertEquals(WifiP2pMonitor.SUP_DISCONNECTION_EVENT, messageCaptor.getValue().what);
     }
-    /**
-     * Broadcast frequency changed event test
-     */
-    @Test
-    public void testBroadcastP2pFrequencyChanged() {
-        mWifiP2pMonitor.registerHandler(
-                P2P_IFACE_NAME, WifiP2pMonitor.P2P_FREQUENCY_CHANGED_EVENT, mHandlerSpy);
-        mWifiP2pMonitor.broadcastP2pFrequencyChanged(P2P_IFACE_NAME, TEST_GROUP_FREQUENCY);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandlerSpy).handleMessage(messageCaptor.capture());
-        assertEquals(WifiP2pMonitor.P2P_FREQUENCY_CHANGED_EVENT, messageCaptor.getValue().what);
-        assertEquals(TEST_GROUP_FREQUENCY, messageCaptor.getValue().arg1);
-    }
-
-    /**
-     * Broadcast message when provision discovery fails.
-     */
-    @Test
-    public void testBroadcastP2pProvisionDiscoveryFailure() throws Exception {
-        mWifiP2pMonitor.registerHandler(
-                P2P_IFACE_NAME, WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT, mHandlerSpy);
-        mWifiP2pMonitor.broadcastP2pProvisionDiscoveryFailure(P2P_IFACE_NAME,
-                WifiP2pMonitor.PROV_DISC_STATUS_UNKNOWN, new WifiP2pProvDiscEvent());
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandlerSpy).handleMessage(messageCaptor.capture());
-        assertEquals(WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT, messageCaptor.getValue().what);
-    }
-
-    /**
-     * Broadcast message when provision discovery is rejected.
-     */
-    @Test
-    public void testBroadcastP2pProvisionDiscoveryRejection() throws Exception {
-        mWifiP2pMonitor.registerHandler(
-                P2P_IFACE_NAME, WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT, mHandlerSpy);
-        WifiP2pProvDiscEvent event = new WifiP2pProvDiscEvent();
-        event.device = new WifiP2pDevice();
-        event.device.deviceAddress = "11:22:33:44:55:66";
-        mWifiP2pMonitor.broadcastP2pProvisionDiscoveryFailure(P2P_IFACE_NAME,
-                WifiP2pMonitor.PROV_DISC_STATUS_REJECTED, event);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandlerSpy).handleMessage(messageCaptor.capture());
-        assertEquals(WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT, messageCaptor.getValue().what);
-        assertEquals(event.device.deviceAddress,
-                ((WifiP2pProvDiscEvent) messageCaptor.getValue().obj).device.deviceAddress);
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pNativeTest.java b/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pNativeTest.java
index 3462aaf..2999caa 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pNativeTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pNativeTest.java
@@ -27,11 +27,8 @@
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.withSettings;
 
 import android.app.test.MockAnswerUtil.AnswerWithArguments;
-import android.hardware.wifi.V1_0.IWifiIface;
-import android.hardware.wifi.V1_0.IWifiP2pIface;
 import android.net.wifi.WifiManager;
 import android.net.wifi.nl80211.WifiNl80211Manager;
 import android.net.wifi.p2p.WifiP2pConfig;
@@ -42,25 +39,20 @@
 import android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceInfo;
 import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
 import android.os.Handler;
-import android.os.WorkSource;
 
 import androidx.test.filters.SmallTest;
 
-import com.android.dx.mockito.inline.extended.ExtendedMockito;
 import com.android.server.wifi.HalDeviceManager;
 import com.android.server.wifi.PropertyService;
 import com.android.server.wifi.WifiBaseTest;
 import com.android.server.wifi.WifiNative;
 import com.android.server.wifi.WifiVendorHal;
 
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
-import org.mockito.MockitoSession;
-import org.mockito.quality.Strictness;
 
 import java.util.Collections;
 import java.util.HashSet;
@@ -90,20 +82,15 @@
     private static final String TEST_NFC_REQUEST_MSG = "request";
     private static final String TEST_NFC_SELECT_MSG = "select";
     private static final String TEST_CLIENT_LIST = "aa:bb:cc:dd:ee:ff 11:22:33:44:55:66";
-    private static final String TEST_R2_DEVICE_INFO_HEX = "00020064";
 
     @Mock private WifiNl80211Manager mWifiCondManager;
     @Mock private WifiNative mWifiNative;
     @Mock private WifiVendorHal mWifiVendorHalMock;
     @Mock private SupplicantP2pIfaceHal mSupplicantP2pIfaceHalMock;
     @Mock private HalDeviceManager mHalDeviceManagerMock;
-    @Mock private HalDeviceManager.InterfaceDestroyedListener mDestroyedListenerMock;
     @Mock private PropertyService mPropertyServiceMock;
-    @Mock private Handler mHandlerMock;
-    @Mock private WorkSource mWorkSourceMock;
-    @Mock private IWifiP2pIface mIWifiP2pIfaceMock;
+    @Mock private Handler mHandler;
 
-    private MockitoSession mSession;
     private WifiP2pNative mWifiP2pNative;
     private WifiP2pGroupList mWifiP2pGroupList = new WifiP2pGroupList();
     private Set<String> mWifiClientInterfaceNames = new HashSet<String>();
@@ -123,13 +110,6 @@
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
 
-        mSession = ExtendedMockito.mockitoSession()
-                .mockStatic(HalDeviceManager.class, withSettings().lenient())
-                .strictness(Strictness.LENIENT)
-                .startMocking();
-
-        when(HalDeviceManager.getName(any())).thenReturn(TEST_IFACE);
-
         mWifiClientInterfaceNames.add("wlan0");
         mWifiClientInterfaceNames.add("wlan1");
 
@@ -166,11 +146,6 @@
 
     }
 
-    @After
-    public void tearDown() {
-        mSession.finishMocking();
-    }
-
     /**
      * Verifies that isHalInterfaceSupported returns correct values.
      */
@@ -183,242 +158,6 @@
     }
 
     /**
-     * Verifies that setupInterface returns correct values when successfully creating P2P Iface.
-     */
-    @Test
-    public void testSetupInterfaceSuccessInCreatingP2pIface() {
-        when(mHalDeviceManagerMock.createP2pIface(
-                any(HalDeviceManager.InterfaceDestroyedListener.class),
-                eq(mHandlerMock), eq(mWorkSourceMock))).thenReturn(mIWifiP2pIfaceMock);
-        when(HalDeviceManager.getName(any(IWifiIface.class))).thenReturn(TEST_IFACE);
-        when(mSupplicantP2pIfaceHalMock.initialize()).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.isInitializationComplete()).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.setupIface(eq(TEST_IFACE))).thenReturn(true);
-
-        assertEquals(
-                mWifiP2pNative.setupInterface(
-                        mDestroyedListenerMock, mHandlerMock, mWorkSourceMock),
-                TEST_IFACE);
-    }
-
-    /**
-     * Verifies that setupInterface returns correct values when vendor Hal doesn't support.
-     */
-    @Test
-    public void testSetupInterfaceSuccessWhenVendorHalDoesNotSupport() {
-        when(mHalDeviceManagerMock.isSupported()).thenReturn(false);
-        when(mPropertyServiceMock.getString(anyString(), anyString())).thenReturn(TEST_IFACE);
-        when(mSupplicantP2pIfaceHalMock.initialize()).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.isInitializationComplete()).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.setupIface(eq(TEST_IFACE))).thenReturn(true);
-
-        assertEquals(
-                mWifiP2pNative.setupInterface(
-                        mDestroyedListenerMock, mHandlerMock, mWorkSourceMock),
-                TEST_IFACE);
-    }
-
-    /**
-     * Verifies that setupInterface returns correct values when failing in creating P2P Iface.
-     */
-    @Test
-    public void testSetupInterfaceFailureInCreatingP2pIface() {
-        when(mHalDeviceManagerMock.createP2pIface(
-                any(HalDeviceManager.InterfaceDestroyedListener.class),
-                eq(mHandlerMock), eq(mWorkSourceMock))).thenReturn(null);
-
-        assertEquals(
-                mWifiP2pNative.setupInterface(
-                        mDestroyedListenerMock, mHandlerMock, mWorkSourceMock),
-                null);
-    }
-
-    /**
-     * Verifies that setupInterface returns correct values when failing in getting P2P Iface name.
-     */
-    @Test
-    public void testSetupInterfaceFailureInGettingP2pIfaceName() {
-        when(mHalDeviceManagerMock.createP2pIface(
-                any(HalDeviceManager.InterfaceDestroyedListener.class),
-                eq(mHandlerMock), eq(mWorkSourceMock))).thenReturn(mIWifiP2pIfaceMock);
-        when(HalDeviceManager.getName(any(IWifiIface.class))).thenReturn(null);
-
-        assertEquals(
-                mWifiP2pNative.setupInterface(
-                        mDestroyedListenerMock, mHandlerMock, mWorkSourceMock),
-                null);
-    }
-
-    /**
-     * Verifies that setupInterface returns correct values when supplicant connection
-     * initialization fails.
-     */
-    @Test
-    public void testSetupInterfaceFailureInSupplicantConnectionInitialization() {
-        when(mHalDeviceManagerMock.createP2pIface(
-                any(HalDeviceManager.InterfaceDestroyedListener.class),
-                eq(mHandlerMock), eq(mWorkSourceMock))).thenReturn(mIWifiP2pIfaceMock);
-        when(HalDeviceManager.getName(any(IWifiIface.class))).thenReturn(TEST_IFACE);
-        when(mSupplicantP2pIfaceHalMock.isInitializationStarted()).thenReturn(false);
-        when(mSupplicantP2pIfaceHalMock.initialize()).thenReturn(false);
-
-        assertEquals(
-                mWifiP2pNative.setupInterface(
-                        mDestroyedListenerMock, mHandlerMock, mWorkSourceMock),
-                null);
-    }
-
-    /**
-     * Verifies that setupInterface returns correct values when supplicant connection
-     * initialization never completes.
-     */
-    @Test
-    public void testSetupInterfaceFailureInSupplicantConnectionInitNotCompleted() {
-        when(mHalDeviceManagerMock.createP2pIface(
-                any(HalDeviceManager.InterfaceDestroyedListener.class),
-                eq(mHandlerMock), eq(mWorkSourceMock))).thenReturn(mIWifiP2pIfaceMock);
-        when(HalDeviceManager.getName(any(IWifiIface.class))).thenReturn(TEST_IFACE);
-        when(mSupplicantP2pIfaceHalMock.setupIface(eq(TEST_IFACE))).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.initialize()).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.isInitializationComplete()).thenReturn(false);
-
-        assertEquals(
-                mWifiP2pNative.setupInterface(
-                        mDestroyedListenerMock, mHandlerMock, mWorkSourceMock),
-                null);
-    }
-
-    /**
-     * Verifies that setupInterface returns correct values when failing in setting up P2P Iface
-     * for supplicant.
-     */
-    @Test
-    public void testSetupInterfaceFailureInSettingUpP2pIfaceInSupplicant() {
-        when(mHalDeviceManagerMock.createP2pIface(
-                any(HalDeviceManager.InterfaceDestroyedListener.class),
-                eq(mHandlerMock), eq(mWorkSourceMock))).thenReturn(mIWifiP2pIfaceMock);
-        when(HalDeviceManager.getName(any(IWifiIface.class))).thenReturn(TEST_IFACE);
-        when(mSupplicantP2pIfaceHalMock.initialize()).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.isInitializationComplete()).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.setupIface(eq(TEST_IFACE))).thenReturn(false);
-
-        assertEquals(
-                mWifiP2pNative.setupInterface(
-                        mDestroyedListenerMock, mHandlerMock, mWorkSourceMock),
-                null);
-    }
-
-    /**
-     * Verifies that setupInterface returns correct values when mIWifiP2pIface already exists,
-     * and HalDeviceManager does support.
-     */
-    @Test
-    public void testSetupInterfaceSuccessWhenHalDeviceMgrDoesSupport() throws Exception {
-        prepareDbsMock(true);
-
-        when(HalDeviceManager.getName(any(IWifiIface.class))).thenReturn(TEST_IFACE);
-
-        assertEquals(
-                mWifiP2pNative.setupInterface(
-                        mDestroyedListenerMock, mHandlerMock, mWorkSourceMock),
-                TEST_IFACE);
-    }
-
-    /**
-     * Verifies that setupInterface returns correct values when mIWifiP2pIface already exists,
-     * and HalDeviceManager doesn't support.
-     */
-    @Test
-    public void testSetupInterfaceSuccessWhenNoHalDeviceMgrSupport() throws Exception {
-        prepareDbsMock(true);
-
-        when(mHalDeviceManagerMock.isSupported()).thenReturn(false);
-        when(mPropertyServiceMock.getString(anyString(), anyString())).thenReturn(TEST_IFACE);
-
-        assertEquals(
-                mWifiP2pNative.setupInterface(
-                        mDestroyedListenerMock, mHandlerMock, mWorkSourceMock),
-                TEST_IFACE);
-    }
-
-    /**
-     * Verifies that teardownInterface works properly when HalDeviceManager does support,
-     * and P2P Iface already exists.
-     */
-    @Test
-    public void testTeardownInterfaceSuccessWhenP2pIfaceExists() throws Exception {
-        prepareDbsMock(true);
-
-        mWifiP2pNative.teardownInterface();
-    }
-
-    /**
-     * Verifies that teardownInterface works properly when HalDeviceManager doesn't support,
-     * and there's no P2P Iface.
-     */
-    @Test
-    public void testTeardownInterfaceSuccessWhenNoP2pIface() {
-        mWifiP2pNative.teardownInterface();
-    }
-
-    /**
-     * Verifies that teardownInterface works properly when HalDeviceManager doesn't support.
-     */
-    @Test
-    public void testTeardownInterfaceSuccessWhenNoHalDeviceMgrSupport() throws Exception {
-        prepareDbsMock(true);
-        when(mHalDeviceManagerMock.isSupported()).thenReturn(false);
-        when(mPropertyServiceMock.getString(anyString(), anyString())).thenReturn(TEST_IFACE);
-
-        mWifiP2pNative.teardownInterface();
-    }
-
-    /**
-     * Verifies that replaceRequestorWs returns correct values when
-     * HalDeviceManager doesn't support.
-     */
-    @Test
-    public void testReplaceRequestorWsSuccessWhenNoHalDeviceMgrSupport() {
-        when(mHalDeviceManagerMock.isSupported()).thenReturn(false);
-        assertTrue(mWifiP2pNative.replaceRequestorWs(mWorkSourceMock));
-    }
-
-    /**
-     * Verifies that replaceRequestorWs returns correct values when HalDeviceManager doesn't
-     * support, and there's no P2P Iface.
-     */
-    @Test
-    public void testReplaceRequestorWsSuccessWhenHalDeviceMgrDoesSupportAndNoP2pIface() {
-        assertFalse(mWifiP2pNative.replaceRequestorWs(mWorkSourceMock));
-    }
-
-    /**
-     * Verifies that replaceRequestorWs returns correct values when HalDeviceManager supports,
-     * mIWifiP2pIface is set up successfully, and HalDeviceManager succeeds in replacing.
-     */
-    @Test
-    public void testReplaceRequestorWsSuccessWhenHalDeviceMgrSucceedInReplace() throws Exception {
-        prepareDbsMock(true);
-
-        when(mHalDeviceManagerMock.replaceRequestorWs(any(IWifiIface.class),
-                any(WorkSource.class))).thenReturn(true);
-        assertTrue(mWifiP2pNative.replaceRequestorWs(mWorkSourceMock));
-    }
-
-    /**
-     * Verifies that replaceRequestorWs returns correct values when HalDeviceManager supports,
-     * mIWifiP2pIface is set up successfully, and HalDeviceManager fails in replacing.
-     */
-    @Test
-    public void testReplaceRequestorWsSuccessWhenHalDeviceMgrFailInReplace() throws Exception {
-        prepareDbsMock(true);
-
-        when(mHalDeviceManagerMock.replaceRequestorWs(any(IWifiIface.class),
-                any(WorkSource.class))).thenReturn(false);
-        assertFalse(mWifiP2pNative.replaceRequestorWs(mWorkSourceMock));
-    }
-
-    /**
      * Verifies that the device name can be set.
      */
     @Test
@@ -573,34 +312,6 @@
     }
 
     /**
-     * Verifies initiating a P2P service discovery on social channels.
-     */
-    @Test
-    public void testP2pFindOnSocialChannels() {
-        when(mSupplicantP2pIfaceHalMock.find(anyInt(), anyInt(), anyInt())).thenReturn(true);
-        assertTrue(mWifiP2pNative.p2pFind(
-                WifiP2pManager.WIFI_P2P_SCAN_SOCIAL,
-                WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED, TEST_P2P_FIND_TIMEOUT));
-        verify(mSupplicantP2pIfaceHalMock).find(
-                eq(WifiP2pManager.WIFI_P2P_SCAN_SOCIAL),
-                eq(WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED),
-                eq(TEST_P2P_FIND_TIMEOUT));
-    }
-
-    /**
-     * Verifies initiating a P2P service discovery on specific frequency.
-     */
-    @Test
-    public void testP2pFindOnSpecificFrequency() {
-        int freq = 2412;
-        when(mSupplicantP2pIfaceHalMock.find(anyInt(), anyInt(), anyInt())).thenReturn(true);
-        assertTrue(mWifiP2pNative.p2pFind(
-                WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ, freq, TEST_P2P_FIND_TIMEOUT));
-        verify(mSupplicantP2pIfaceHalMock).find(
-                eq(WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ),
-                eq(freq), eq(TEST_P2P_FIND_TIMEOUT));
-    }
-    /**
      * Verifies stopping a P2P service discovery.
      */
     @Test
@@ -987,82 +698,4 @@
                 mWifiP2pNative.getSupportedFeatureSet(TEST_IFACE));
         verify(mWifiVendorHalMock).getSupportedFeatureSet(eq(TEST_IFACE));
     }
-
-    /**
-     * Verifies setting Wifi Display R2 device info when SupplicantP2pIfaceHal succeeds in setting.
-     */
-    @Test
-    public void testSetWfdR2DeviceInfoSuccess() {
-        when(mSupplicantP2pIfaceHalMock.setWfdR2DeviceInfo(anyString()))
-                .thenReturn(true);
-        assertTrue(mWifiP2pNative.setWfdR2DeviceInfo(TEST_R2_DEVICE_INFO_HEX));
-    }
-
-    /**
-     * Verifies setting Wifi Display R2 device info when SupplicantP2pIfaceHal fails in setting.
-     */
-    @Test
-    public void testSetWfdR2DeviceInfoFailure() {
-        when(mSupplicantP2pIfaceHalMock.setWfdR2DeviceInfo(anyString()))
-                .thenReturn(false);
-        assertFalse(mWifiP2pNative.setWfdR2DeviceInfo(TEST_R2_DEVICE_INFO_HEX));
-    }
-
-    /**
-     * Verifies removing client with specified mac address.
-     */
-    @Test
-    public void testRemoveClient() {
-        when(mSupplicantP2pIfaceHalMock.removeClient(anyString(), anyBoolean())).thenReturn(true);
-        assertTrue(mWifiP2pNative.removeClient(TEST_BSSID));
-        verify(mSupplicantP2pIfaceHalMock).removeClient(eq(TEST_BSSID), anyBoolean());
-    }
-
-    void prepareDbsMock(boolean isHalDeviceManagerSupported) throws Exception {
-        when(mHalDeviceManagerMock.isSupported()).thenReturn(isHalDeviceManagerSupported);
-        when(mHalDeviceManagerMock.createP2pIface(
-                any(HalDeviceManager.InterfaceDestroyedListener.class),
-                eq(mHandlerMock), eq(mWorkSourceMock))).thenReturn(mIWifiP2pIfaceMock);
-        when(mSupplicantP2pIfaceHalMock.isInitializationStarted()).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.initialize()).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.isInitializationComplete()).thenReturn(true);
-        when(mSupplicantP2pIfaceHalMock.setupIface(any())).thenReturn(true);
-        mWifiP2pNative.setupInterface(mDestroyedListenerMock, mHandlerMock, mWorkSourceMock);
-    }
-
-    /**
-     * Verify DBS support inquiry.
-     */
-    @Test
-    public void testDbsSupport() throws Exception {
-        prepareDbsMock(true);
-
-        when(mHalDeviceManagerMock.is24g5gDbsSupported(any())).thenReturn(true);
-        assertTrue(mWifiP2pNative.is24g5gDbsSupported());
-        when(mHalDeviceManagerMock.is24g5gDbsSupported(any())).thenReturn(false);
-        assertFalse(mWifiP2pNative.is24g5gDbsSupported());
-
-        when(mHalDeviceManagerMock.is5g6gDbsSupported(any())).thenReturn(true);
-        assertTrue(mWifiP2pNative.is5g6gDbsSupported());
-        when(mHalDeviceManagerMock.is5g6gDbsSupported(any())).thenReturn(false);
-        assertFalse(mWifiP2pNative.is5g6gDbsSupported());
-    }
-
-    /**
-     * Verify DBS support inquiry when HalDeviceManager is not supported.
-     */
-    @Test
-    public void testDbsSupportWhenHalDeviceManagerNotSupported() throws Exception {
-        prepareDbsMock(false);
-
-        when(mHalDeviceManagerMock.is24g5gDbsSupported(any())).thenReturn(true);
-        assertFalse(mWifiP2pNative.is24g5gDbsSupported());
-        when(mHalDeviceManagerMock.is24g5gDbsSupported(any())).thenReturn(false);
-        assertFalse(mWifiP2pNative.is24g5gDbsSupported());
-
-        when(mHalDeviceManagerMock.is5g6gDbsSupported(any())).thenReturn(true);
-        assertFalse(mWifiP2pNative.is5g6gDbsSupported());
-        when(mHalDeviceManagerMock.is5g6gDbsSupported(any())).thenReturn(false);
-        assertFalse(mWifiP2pNative.is5g6gDbsSupported());
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java
index b2e844b..d947fe4 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pServiceImplTest.java
@@ -18,7 +18,6 @@
 
 import static android.net.NetworkInfo.DetailedState.FAILED;
 import static android.net.NetworkInfo.DetailedState.IDLE;
-import static android.net.wifi.WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE;
 
 import static com.android.dx.mockito.inline.extended.ExtendedMockito.mockitoSession;
 import static com.android.server.wifi.WifiSettingsConfigStore.WIFI_P2P_DEVICE_NAME;
@@ -29,9 +28,7 @@
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThrows;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
 import static org.junit.Assume.assumeTrue;
 import static org.mockito.ArgumentMatchers.argThat;
 import static org.mockito.Matchers.any;
@@ -45,9 +42,7 @@
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.lenient;
-import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.reset;
 import static org.mockito.Mockito.spy;
@@ -57,27 +52,19 @@
 
 import android.annotation.Nullable;
 import android.app.AlarmManager;
-import android.app.AlertDialog;
-import android.app.BroadcastOptions;
-import android.app.test.MockAnswerUtil;
 import android.app.test.MockAnswerUtil.AnswerWithArguments;
-import android.content.AttributionSource;
 import android.content.BroadcastReceiver;
 import android.content.Context;
-import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.pm.PackageManager;
-import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.location.LocationManager;
 import android.net.ConnectivityManager;
 import android.net.InetAddresses;
-import android.net.MacAddress;
 import android.net.NetworkInfo;
 import android.net.TetheringManager;
 import android.net.wifi.CoexUnsafeChannel;
-import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
@@ -95,47 +82,30 @@
 import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
 import android.net.wifi.p2p.nsd.WifiP2pServiceRequest;
 import android.os.Binder;
-import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.Message;
 import android.os.Messenger;
-import android.os.Process;
 import android.os.UserHandle;
 import android.os.UserManager;
 import android.os.WorkSource;
 import android.os.test.TestLooper;
 import android.provider.Settings;
-import android.view.Display;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.Window;
-import android.widget.TextView;
 
 import androidx.test.filters.SmallTest;
 
-import com.android.internal.util.AsyncChannel;
-import com.android.internal.util.State;
-import com.android.internal.util.StateMachine;
 import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.Clock;
 import com.android.server.wifi.FakeWifiLog;
 import com.android.server.wifi.FrameworkFacade;
-import com.android.server.wifi.HalDeviceManager;
-import com.android.server.wifi.InterfaceConflictManager;
 import com.android.server.wifi.WifiBaseTest;
-import com.android.server.wifi.WifiDialogManager;
 import com.android.server.wifi.WifiGlobals;
 import com.android.server.wifi.WifiInjector;
 import com.android.server.wifi.WifiSettingsConfigStore;
 import com.android.server.wifi.coex.CoexManager;
-import com.android.server.wifi.proto.nano.WifiMetricsProto;
 import com.android.server.wifi.proto.nano.WifiMetricsProto.P2pConnectionEvent;
 import com.android.server.wifi.util.NetdWrapper;
 import com.android.server.wifi.util.StringUtil;
-import com.android.server.wifi.util.WaitingState;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 import com.android.server.wifi.util.WifiPermissionsWrapper;
 import com.android.wifi.resources.R;
@@ -145,7 +115,6 @@
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 import org.mockito.ArgumentMatcher;
-import org.mockito.InOrder;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.mockito.MockitoSession;
@@ -156,7 +125,6 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.List;
 
 /**
@@ -173,35 +141,21 @@
     private static final String ANONYMIZED_DEVICE_ADDRESS = "02:00:00:00:00:00";
     private static final String TEST_PACKAGE_NAME = "com.p2p.test";
     private static final String TEST_ANDROID_ID = "314Deadbeef";
-    private static final String[] TEST_REQUIRED_PERMISSIONS_T =
-            new String[] {
-                    android.Manifest.permission.NEARBY_WIFI_DEVICES,
-                    android.Manifest.permission.ACCESS_WIFI_STATE
-            };
-    private static final String[] TEST_EXCLUDED_PERMISSIONS_T =
-            new String[] {
-                    android.Manifest.permission.ACCESS_FINE_LOCATION
-            };
-    private static final int TEST_GROUP_FREQUENCY = 5180;
-    private static final int P2P_INVITATION_RECEIVED_TIMEOUT_MS = 5180;
 
     private ArgumentCaptor<BroadcastReceiver> mBcastRxCaptor = ArgumentCaptor.forClass(
             BroadcastReceiver.class);
-    private ArgumentCaptor<WorkSource> mWsCaptor = ArgumentCaptor.forClass(WorkSource.class);
     private Binder mClient1;
     private Binder mClient2;
 
     private BroadcastReceiver mLocationModeReceiver;
     private BroadcastReceiver mWifiStateChangedReceiver;
     private BroadcastReceiver mTetherStateReceiver;
-    private BroadcastReceiver mUserRestrictionReceiver;
     private Handler mClientHandler;
     private Messenger mP2pStateMachineMessenger;
     private Messenger mClientMessenger;
     private WifiP2pServiceImpl mWifiP2pServiceImpl;
     private TestLooper mClientHanderLooper;
     private TestLooper mLooper;
-    private MacAddress mTestWifiP2pPeerAddress;
     private WifiP2pConfig mTestWifiP2pPeerConfig;
     private WifiP2pConfig mTestWifiP2pFastConnectionConfig;
     private WifiP2pGroup mTestWifiP2pNewPersistentGoGroup;
@@ -211,19 +165,15 @@
     private WifiP2pDevice mTestThisDevice;
     private ArgumentCaptor<Message> mMessageCaptor = ArgumentCaptor.forClass(Message.class);
     private MockitoSession mStaticMockSession = null;
-    private Bundle mAttribution = new Bundle();
 
-    @Mock Bundle mBundle;
     @Mock Context mContext;
     @Mock FrameworkFacade mFrameworkFacade;
     @Mock HandlerThread mHandlerThread;
     @Mock NetdWrapper mNetdWrapper;
     @Mock PackageManager mPackageManager;
     @Mock Resources mResources;
-    @Mock Configuration mConfiguration;
     @Mock NetworkInterface mP2pNetworkInterface;
     @Mock WifiInjector mWifiInjector;
-    @Mock BroadcastOptions mBroadcastOptions;
     @Mock WifiManager mMockWifiManager;
     @Mock WifiPermissionsUtil mWifiPermissionsUtil;
     @Mock WifiSettingsConfigStore mWifiSettingsConfigStore;
@@ -240,15 +190,6 @@
     @Spy MockWifiP2pMonitor mWifiMonitor;
     @Mock WifiGlobals mWifiGlobals;
     @Mock AlarmManager mAlarmManager;
-    @Mock WifiDialogManager mWifiDialogManager;
-    @Mock WifiDialogManager.DialogHandle mDialogHandle;
-    @Mock InterfaceConflictManager mInterfaceConflictManager;
-    @Mock Clock mClock;
-    @Mock LayoutInflater mLayoutInflater;
-    @Mock View mView;
-    @Mock AlertDialog.Builder mAlertDialogBuilder;
-    @Mock AlertDialog mAlertDialog;
-    @Mock AsyncChannel mAsyncChannel;
     CoexManager.CoexListener mCoexListener;
 
     private void generatorTestData() {
@@ -258,8 +199,6 @@
         mTestWifiP2pDevice.deviceName = "TestDeviceName";
         mTestWifiP2pDevice.deviceAddress = "aa:bb:cc:dd:ee:ff";
 
-        mTestWifiP2pPeerAddress = MacAddress.fromString(mTestWifiP2pDevice.deviceAddress);
-
         // for general connect command
         mTestWifiP2pPeerConfig = new WifiP2pConfig();
         mTestWifiP2pPeerConfig.deviceAddress = mTestWifiP2pDevice.deviceAddress;
@@ -383,10 +322,8 @@
      */
     private void sendAddLocalServiceMsg(Messenger replyMessenger) throws Exception {
         Message msg = Message.obtain();
-        Bundle extras = new Bundle();
-        extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_SERVICE_INFO, mTestWifiP2pServiceInfo);
         msg.what = WifiP2pManager.ADD_LOCAL_SERVICE;
-        msg.obj = extras;
+        msg.obj = mTestWifiP2pServiceInfo;
         msg.replyTo = replyMessenger;
         mP2pStateMachineMessenger.send(Message.obtain(msg));
         mLooper.dispatchAll();
@@ -417,27 +354,8 @@
      * @param replyMessenger for checking replied message.
      */
     private void sendDiscoverPeersMsg(Messenger replyMessenger) throws Exception {
-        sendDiscoverPeersMsg(
-                replyMessenger, WifiP2pManager.WIFI_P2P_SCAN_FULL,
-                WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED);
-    }
-
-    /**
-     * Mock send WifiP2pManager.DISCOVER_PEERS
-     *
-     * @param replyMessenger for checking replied message.
-     * @param type indicates what channels to scan.
-     * @param frequencyMhz is the frequency to be scanned.
-     */
-    private void sendDiscoverPeersMsg(
-            Messenger replyMessenger, @WifiP2pManager.WifiP2pScanType int type,
-            int frequencyMhz) throws Exception {
         Message msg = Message.obtain();
-        Bundle extras = new Bundle();
-        extras.putInt(WifiP2pManager.EXTRA_PARAM_KEY_PEER_DISCOVERY_FREQ, frequencyMhz);
         msg.what = WifiP2pManager.DISCOVER_PEERS;
-        msg.arg1 = type;
-        msg.obj = extras;
         msg.replyTo = replyMessenger;
         mP2pStateMachineMessenger.send(Message.obtain(msg));
         mLooper.dispatchAll();
@@ -464,9 +382,7 @@
      */
     private void sendDiscoverServiceMsg(Messenger replyMessenger) throws Exception {
         Message msg = Message.obtain();
-        Bundle extras = new Bundle();
         msg.what = WifiP2pManager.DISCOVER_SERVICES;
-        msg.obj = extras;
         msg.replyTo = replyMessenger;
         mP2pStateMachineMessenger.send(Message.obtain(msg));
         mLooper.dispatchAll();
@@ -479,22 +395,12 @@
      */
     private void sendRequestPeersMsg(Messenger replyMessenger) throws Exception {
         Message msg = Message.obtain();
-        Bundle extras = new Bundle();
         msg.what = WifiP2pManager.REQUEST_PEERS;
-        msg.obj = extras;
         msg.replyTo = replyMessenger;
         mP2pStateMachineMessenger.send(Message.obtain(msg));
         mLooper.dispatchAll();
     }
 
-    private void sendNegotiationRequestEvent(WifiP2pConfig config) throws Exception {
-        Message msg = Message.obtain();
-        msg.what = WifiP2pMonitor.P2P_GO_NEGOTIATION_REQUEST_EVENT;
-        msg.obj = config;
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
     /**
      * Mock send WifiP2pManager.REQUEST_GROUP_INFO
      *
@@ -502,9 +408,7 @@
      */
     private void sendRequestGroupInfoMsg(Messenger replyMessenger) throws Exception {
         Message msg = Message.obtain();
-        Bundle extras = new Bundle();
         msg.what = WifiP2pManager.REQUEST_GROUP_INFO;
-        msg.obj = extras;
         msg.replyTo = replyMessenger;
         mP2pStateMachineMessenger.send(Message.obtain(msg));
         mLooper.dispatchAll();
@@ -700,26 +604,7 @@
     private void sendConnectMsg(Messenger replyMessenger,
             WifiP2pConfig config) throws Exception {
         Message msg = Message.obtain();
-        Bundle extras = new Bundle();
-        extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_CONFIG, config);
         msg.what = WifiP2pManager.CONNECT;
-        msg.obj = extras;
-        msg.replyTo = replyMessenger;
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
-
-    /**
-     * Send Set Ongoing Peer Config API msg.
-     *
-     * @param replyMessenger for checking replied message.
-     * @param config options as described in {@link WifiP2pConfig} class.
-     */
-    private void sendSetOngoingPeerMsg(Messenger replyMessenger,
-            WifiP2pConfig config) throws Exception {
-        Message msg = Message.obtain();
-        msg.what = WifiP2pManager.SET_ONGOING_PEER_CONFIG;
         msg.obj = config;
         msg.replyTo = replyMessenger;
         mP2pStateMachineMessenger.send(Message.obtain(msg));
@@ -736,148 +621,9 @@
             int netId,
             WifiP2pConfig config) throws Exception {
         Message msg = Message.obtain();
-        Bundle extras = new Bundle();
-        extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_CONFIG, config);
         msg.what = WifiP2pManager.CREATE_GROUP;
         msg.arg1 = netId;
-        msg.obj = extras;
-        msg.replyTo = replyMessenger;
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
-    /**
-     * Send SetVendorElements API msg.
-     *
-     * @param replyMessenger For checking replied message.
-     * @param ies The list of information elements.
-     */
-    private void sendSetVendorElementsMsg(Messenger replyMessenger,
-            ArrayList<ScanResult.InformationElement> ies) throws Exception {
-        Message msg = Message.obtain();
-        Bundle extras = new Bundle();
-        extras.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE,
-                mContext.getAttributionSource());
-        extras.putParcelableArrayList(WifiP2pManager.EXTRA_PARAM_KEY_INFORMATION_ELEMENT_LIST,
-                ies);
-        msg.what = WifiP2pManager.SET_VENDOR_ELEMENTS;
-        msg.obj = extras;
-        msg.replyTo = replyMessenger;
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
-    /**
-     * Send AddExternalApprover API msg.
-     *
-     * @param replyMessenger For checking replied message.
-     * @param devAddr the peer address.
-     * @param binder the application binder.
-     */
-    private void sendAddExternalApproverMsg(Messenger replyMessenger,
-            MacAddress devAddr, Binder binder) throws Exception {
-        Message msg = Message.obtain();
-        Bundle extras = new Bundle();
-        if (null != devAddr) {
-            extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_PEER_ADDRESS, devAddr);
-        }
-        if (null != binder) {
-            extras.putBinder(WifiP2pManager.CALLING_BINDER, binder);
-        }
-        msg.what = WifiP2pManager.ADD_EXTERNAL_APPROVER;
-        msg.obj = extras;
-        msg.replyTo = replyMessenger;
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
-    /**
-     * Send RemoveExternalApprover API msg.
-     *
-     * @param replyMessenger For checking replied message.
-     * @param devAddr the peer address.
-     */
-    private void sendRemoveExternalApproverMsg(Messenger replyMessenger,
-            MacAddress devAddr, Binder binder) throws Exception {
-        Message msg = Message.obtain();
-        Bundle extras = new Bundle();
-        if (null != devAddr) {
-            extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_PEER_ADDRESS, devAddr);
-        }
-        if (null != binder) {
-            extras.putBinder(WifiP2pManager.CALLING_BINDER, binder);
-        }
-        msg.what = WifiP2pManager.REMOVE_EXTERNAL_APPROVER;
-        msg.obj = extras;
-        msg.replyTo = replyMessenger;
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
-    /**
-     * Send SetConnectionRequestResult API msg.
-     *
-     * @param replyMessenger For checking replied message.
-     * @param devAddr the peer address.
-     * @param result the decision for the incoming request.
-     */
-    private void sendSetConnectionRequestResultMsg(Messenger replyMessenger,
-            MacAddress devAddr, int result, Binder binder) throws Exception {
-        Message msg = Message.obtain();
-        Bundle extras = new Bundle();
-        if (null != devAddr) {
-            extras.putParcelable(WifiP2pManager.EXTRA_PARAM_KEY_PEER_ADDRESS, devAddr);
-        }
-        if (null != binder) {
-            extras.putBinder(WifiP2pManager.CALLING_BINDER, binder);
-        }
-        msg.what = WifiP2pManager.SET_CONNECTION_REQUEST_RESULT;
-        msg.obj = extras;
-        msg.arg1 = result;
-        msg.replyTo = replyMessenger;
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
-    /**
-     * Send P2P_GO_NEGOTIATION_FAILURE_EVENT
-     *
-     * @param replyMessenger For checking replied message.
-     * @param status the P2pStatus.
-     */
-    private void sendGoNegotiationFailureEvent(Messenger replyMessenger,
-            WifiP2pServiceImpl.P2pStatus status) throws Exception {
-        Message msg = Message.obtain();
-        msg.what = WifiP2pMonitor.P2P_GO_NEGOTIATION_FAILURE_EVENT;
-        msg.obj = status;
-        msg.replyTo = replyMessenger;
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
-    /**
-     * Send AsyncChannel.CMD_CHANNEL_HALF_CONNECTED
-     *
-     * @param replyMessenger For checking replied message.
-     * @param channel AsyncChannel of the connection
-     */
-    private void sendChannelHalfConnectedEvent(Messenger replyMessenger, AsyncChannel channel)
-            throws Exception {
-        Message msg = Message.obtain();
-        msg.what = AsyncChannel.CMD_CHANNEL_HALF_CONNECTED;
-        msg.arg1 = AsyncChannel.STATUS_SUCCESSFUL;
-        msg.obj = channel;
-        msg.replyTo = replyMessenger;
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
-    private void sendOngoingPeerConfig(Messenger replyMessenger, AsyncChannel channel)
-            throws Exception {
-        Message msg = Message.obtain();
-        msg.what = WifiP2pManager.SET_ONGOING_PEER_CONFIG;
-        msg.arg1 = AsyncChannel.STATUS_SUCCESSFUL;
-        msg.obj = channel;
+        msg.obj = config;
         msg.replyTo = replyMessenger;
         mP2pStateMachineMessenger.send(Message.obtain(msg));
         mLooper.dispatchAll();
@@ -893,9 +639,7 @@
     private void sendSimpleMsg(Messenger replyMessenger,
             int what) throws Exception {
         Message msg = Message.obtain();
-        Bundle extras = new Bundle();
         msg.what = what;
-        msg.obj = extras;
         if (replyMessenger != null) {
             msg.replyTo = replyMessenger;
         }
@@ -922,52 +666,6 @@
         mLooper.dispatchAll();
     }
 
-    private void setTargetSdkGreaterThanT() {
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.isTargetSdkLessThan(any(),
-                    eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(false);
-        }
-    }
-
-    /**
-     * Send simple API msg.
-     *
-     * Mock the API msg with int arg.
-     *
-     * @param replyMessenger for checking replied message.
-     */
-    private void sendSimpleMsg(Messenger replyMessenger,
-            int what, int arg1) throws Exception {
-        Message msg = Message.obtain();
-        msg.what = what;
-        msg.arg1 = arg1;
-        if (replyMessenger != null) {
-            msg.replyTo = replyMessenger;
-        }
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
-    /**
-     * Send simple API msg.
-     *
-     * Mock the API msg with int arg.
-     *
-     * @param replyMessenger for checking replied message.
-     */
-    private void sendSimpleMsg(Messenger replyMessenger,
-            int what, int arg1, Object obj) throws Exception {
-        Message msg = Message.obtain();
-        msg.what = what;
-        msg.arg1 = arg1;
-        msg.obj = obj;
-        if (replyMessenger != null) {
-            msg.replyTo = replyMessenger;
-        }
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
     /**
      * force P2p State enter InactiveState to start others unit test
      *
@@ -984,15 +682,6 @@
         verify(mContext, never()).sendBroadcastWithMultiplePermissions(
                 argThat(new WifiP2pServiceImplTest
                         .P2pConnectionChangedIntentMatcherForNetworkState(FAILED)), any());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mContext).sendBroadcast(
-                    argThat(new WifiP2pServiceImplTest
-                            .P2pConnectionChangedIntentMatcherForNetworkState(IDLE)), any(), any());
-            verify(mBroadcastOptions, atLeastOnce())
-                    .setRequireAllOfPermissions(TEST_REQUIRED_PERMISSIONS_T);
-            verify(mBroadcastOptions, atLeastOnce())
-                    .setRequireNoneOfPermissions(TEST_EXCLUDED_PERMISSIONS_T);
-        }
     }
 
     /**
@@ -1008,7 +697,7 @@
     private void checkIsP2pInitWhenClientConnected(boolean expectInit,
             Binder clientBinder, WorkSource expectedRequestorWs)
             throws Exception {
-        mWifiP2pServiceImpl.getMessenger(clientBinder, TEST_PACKAGE_NAME, null);
+        mWifiP2pServiceImpl.getMessenger(clientBinder, TEST_PACKAGE_NAME);
         if (expectInit) {
             // send a command to force P2P enabled.
             sendSimpleMsg(mClientMessenger, WifiP2pManager.DISCOVER_PEERS);
@@ -1053,7 +742,21 @@
         }
     }
 
-    private void verifyDeviceChangedBroadcastIntent(Intent intent) {
+    /**
+     * Check the broadcast of WIFI_P2P_THIS_DEVICE_CHANGED_ACTION is sent as expected.
+     */
+    private void checkSendThisDeviceChangedBroadcast() {
+        ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
+        String[] permission_gold = new String[] {android.Manifest.permission.ACCESS_FINE_LOCATION,
+                                                 android.Manifest.permission.ACCESS_WIFI_STATE};
+        ArgumentCaptor<String []> permissionCaptor = ArgumentCaptor.forClass(String[].class);
+        verify(mContext, atLeastOnce()).sendBroadcastWithMultiplePermissions(
+                intentCaptor.capture(), permissionCaptor.capture());
+        String [] permission = permissionCaptor.getValue();
+        Arrays.sort(permission);
+        Arrays.sort(permission_gold);
+        assertEquals(permission_gold, permission);
+        Intent intent = intentCaptor.getValue();
         WifiP2pDevice device = intent.getParcelableExtra(WifiP2pManager.EXTRA_WIFI_P2P_DEVICE);
         assertEquals(WifiP2pManager.WIFI_P2P_THIS_DEVICE_CHANGED_ACTION, intent.getAction());
         assertEquals(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT, intent.getFlags());
@@ -1080,35 +783,6 @@
     }
 
     /**
-     * Check the broadcast of WIFI_P2P_THIS_DEVICE_CHANGED_ACTION is sent as expected.
-     */
-    private void checkSendThisDeviceChangedBroadcast() {
-        ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
-        String[] permission_gold = new String[] {
-                android.Manifest.permission.ACCESS_FINE_LOCATION,
-                android.Manifest.permission.ACCESS_WIFI_STATE};
-        ArgumentCaptor<String []> permissionCaptor = ArgumentCaptor.forClass(String[].class);
-        verify(mContext, atLeastOnce()).sendBroadcastWithMultiplePermissions(
-                intentCaptor.capture(), permissionCaptor.capture());
-        String [] permission = permissionCaptor.getValue();
-        Arrays.sort(permission);
-        Arrays.sort(permission_gold);
-        assertEquals(permission_gold, permission);
-        verifyDeviceChangedBroadcastIntent(intentCaptor.getValue());
-        if (SdkLevel.isAtLeastT()) {
-            // verify the same broadcast is also sent to apps with NEARBY_WIFI_DEVICES permission
-            // but without ACCESS_FINE_LOCATION.
-            verify(mContext, atLeastOnce()).sendBroadcast(
-                    intentCaptor.capture(), any(), any());
-            verify(mBroadcastOptions, atLeastOnce())
-                    .setRequireAllOfPermissions(TEST_REQUIRED_PERMISSIONS_T);
-            verify(mBroadcastOptions, atLeastOnce())
-                    .setRequireNoneOfPermissions(TEST_EXCLUDED_PERMISSIONS_T);
-            verifyDeviceChangedBroadcastIntent(intentCaptor.getValue());
-        }
-    }
-
-    /**
      * Check the broadcast of ACTION_WIFI_P2P_PERSISTENT_GROUPS_CHANGED is sent as expected.
      */
     private void checkSendP2pPersistentGroupsChangedBroadcast() {
@@ -1153,15 +827,9 @@
 
         when(mContext.getSystemService(Context.ALARM_SERVICE))
                 .thenReturn(mAlarmManager);
-        when(mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE))
-                .thenReturn(mLayoutInflater);
         when(mContext.getPackageManager()).thenReturn(mPackageManager);
         when(mContext.getResources()).thenReturn(mResources);
         when(mContext.getSystemService(WifiManager.class)).thenReturn(mWifiManager);
-        if (SdkLevel.isAtLeastS()) {
-            when(mContext.getAttributionSource()).thenReturn(
-                    new AttributionSource(1000, TEST_PACKAGE_NAME, null));
-        }
         when(mWifiManager.getConnectionInfo()).thenReturn(mWifiInfo);
         when(mWifiSettingsConfigStore.get(eq(WIFI_P2P_DEVICE_NAME))).thenReturn(thisDeviceName);
         when(mWifiSettingsConfigStore.get(eq(WIFI_P2P_PENDING_FACTORY_RESET))).thenReturn(false);
@@ -1175,9 +843,6 @@
         }
         when(mResources.getString(R.string.config_wifi_p2p_device_type))
                 .thenReturn("10-0050F204-5");
-        when(mResources.getInteger(R.integer.config_p2pInvitationReceivedDialogTimeoutMs))
-                .thenReturn(P2P_INVITATION_RECEIVED_TIMEOUT_MS);
-        when(mResources.getConfiguration()).thenReturn(mConfiguration);
         when(mWifiInjector.getFrameworkFacade()).thenReturn(mFrameworkFacade);
         when(mWifiInjector.getUserManager()).thenReturn(mUserManager);
         when(mWifiInjector.getWifiP2pMetrics()).thenReturn(mWifiP2pMetrics);
@@ -1188,14 +853,6 @@
         when(mWifiInjector.getSettingsConfigStore()).thenReturn(mWifiSettingsConfigStore);
         when(mWifiInjector.getCoexManager()).thenReturn(mCoexManager);
         when(mWifiInjector.getWifiGlobals()).thenReturn(mWifiGlobals);
-        when(mWifiInjector.makeBroadcastOptions()).thenReturn(mBroadcastOptions);
-        when(mWifiInjector.getWifiDialogManager()).thenReturn(mWifiDialogManager);
-        when(mWifiDialogManager.createP2pInvitationReceivedDialog(any(), anyBoolean(), any(),
-                anyInt(), any(), any())).thenReturn(mDialogHandle);
-        when(mWifiDialogManager.createP2pInvitationSentDialog(any(), any(), anyInt()))
-                .thenReturn(mDialogHandle);
-        when(mWifiInjector.getClock()).thenReturn(mClock);
-        when(mWifiInjector.getInterfaceConflictManager()).thenReturn(mInterfaceConflictManager);
         // enable all permissions, disable specific permissions in tests
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
         when(mWifiPermissionsUtil.checkNetworkStackPermission(anyInt())).thenReturn(true);
@@ -1203,32 +860,8 @@
         when(mWifiPermissionsUtil.checkConfigOverridePermission(anyInt())).thenReturn(true);
         when(mWifiPermissionsUtil.checkCanAccessWifiDirect(anyString(), anyString(), anyInt(),
                 anyBoolean())).thenReturn(true);
-        when(mInterfaceConflictManager.manageInterfaceConflictForStateMachine(any(), any(), any(),
-                any(), any(), eq(HalDeviceManager.HDM_CREATE_IFACE_P2P), any())).thenReturn(
-                InterfaceConflictManager.ICM_EXECUTE_COMMAND);
-        // Mock target SDK to less than T by default to keep existing tests working.
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                    .thenReturn(true);
-            when(mWifiPermissionsUtil.isTargetSdkLessThan(any(),
-                    eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(true);
-        }
         when(mWifiNative.setupInterface(any(), any(), any())).thenReturn(IFACE_NAME_P2P);
         when(mWifiNative.p2pGetDeviceAddress()).thenReturn(thisDeviceMac);
-        when(mUserManager.getUserRestrictions()).thenReturn(mBundle);
-        when(mFrameworkFacade.makeAlertDialogBuilder(any())).thenReturn(mAlertDialogBuilder);
-        when(mAlertDialogBuilder.setTitle(any())).thenReturn(mAlertDialogBuilder);
-        when(mAlertDialogBuilder.setView(any())).thenReturn(mAlertDialogBuilder);
-        when(mAlertDialogBuilder.setMessage(any())).thenReturn(mAlertDialogBuilder);
-        when(mAlertDialogBuilder.setPositiveButton(any(), any())).thenReturn(mAlertDialogBuilder);
-        when(mAlertDialogBuilder.setNegativeButton(any(), any())).thenReturn(mAlertDialogBuilder);
-        when(mAlertDialogBuilder.setOnCancelListener(any())).thenReturn(mAlertDialogBuilder);
-        when(mAlertDialogBuilder.setPositiveButton(any(), any())).thenReturn(mAlertDialogBuilder);
-        when(mAlertDialogBuilder.create()).thenReturn(mAlertDialog);
-        when(mAlertDialog.getWindow()).thenReturn(mock(Window.class));
-        if (SdkLevel.isAtLeastT()) {
-            when(mBundle.getBoolean(UserManager.DISALLOW_WIFI_DIRECT)).thenReturn(false);
-        }
         doAnswer(new AnswerWithArguments() {
             public boolean answer(WifiP2pGroupList groups) {
                 groups.clear();
@@ -1244,7 +877,6 @@
                 return true;
             }
         }).when(mWifiNative).removeP2pNetwork(anyInt());
-        when(mWifiNative.setVendorElements(any())).thenReturn(true);
         when(mWifiSettingsConfigStore.get(eq(WIFI_VERBOSE_LOGGING_ENABLED))).thenReturn(true);
 
         doAnswer(new AnswerWithArguments() {
@@ -1261,15 +893,8 @@
             // * WifiManager.WIFI_STATE_CHANGED_ACTION
             // * LocationManager.MODE_CHANGED_ACTION
             // * TetheringManager.ACTION_TETHER_STATE_CHANGED
-            // * UserManager.ACTION_USER_RESTRICTIONS_CHANGED
-            if (SdkLevel.isAtLeastT()) {
-                verify(mContext, times(4)).registerReceiver(mBcastRxCaptor.capture(),
-                        any(IntentFilter.class));
-                mUserRestrictionReceiver = mBcastRxCaptor.getAllValues().get(3);
-            } else {
-                verify(mContext, times(3)).registerReceiver(mBcastRxCaptor.capture(),
-                        any(IntentFilter.class));
-            }
+            verify(mContext, times(3)).registerReceiver(mBcastRxCaptor.capture(),
+                    any(IntentFilter.class));
             mWifiStateChangedReceiver = mBcastRxCaptor.getAllValues().get(0);
             mLocationModeReceiver = mBcastRxCaptor.getAllValues().get(1);
             mTetherStateReceiver = mBcastRxCaptor.getAllValues().get(2);
@@ -1277,6 +902,8 @@
 
         mWifiP2pServiceImpl.mNetdWrapper = mNetdWrapper;
         mP2pStateMachineMessenger = mWifiP2pServiceImpl.getP2pStateMachineMessenger();
+        mWifiP2pServiceImpl.setWifiHandlerLogForTest(mLog);
+        mWifiP2pServiceImpl.setWifiLogForReplyChannel(mLog);
     }
 
     @Before
@@ -1288,12 +915,6 @@
                 .startMocking();
         lenient().when(NetworkInterface.getByName(eq(IFACE_NAME_P2P)))
                 .thenReturn(mP2pNetworkInterface);
-        when(mLayoutInflater.cloneInContext(any())).thenReturn(mLayoutInflater);
-        when(mLayoutInflater.inflate(anyInt(), any())).thenReturn(mView);
-        when(mLayoutInflater.inflate(anyInt(), any(), anyBoolean())).thenReturn(mView);
-        when(mView.findViewById(eq(R.id.name))).thenReturn(mock(TextView.class));
-        when(mView.findViewById(eq(R.id.value))).thenReturn(mock(TextView.class));
-        when(mView.findViewById(eq(R.id.info))).thenReturn(mock(ViewGroup.class));
         ArrayList<InetAddress> p2pInetAddresses = new ArrayList<>();
         p2pInetAddresses.add(InetAddresses.parseNumericAddress(P2P_GO_IP));
         when(mP2pNetworkInterface.getInetAddresses())
@@ -1302,6 +923,7 @@
         setUpWifiP2pServiceImpl(true);
         mClient1 = new Binder();
         mClient2 = new Binder();
+
         when(mContext.createContextAsUser(any(), anyInt())).thenReturn(mContext);
     }
 
@@ -1311,20 +933,13 @@
     }
 
     /**
-     * Send P2P statemachine internal message.
-     */
-    private void sendP2pStateMachineMessage(int what) throws Exception {
-        Message msg = Message.obtain();
-        msg.what = what;
-        mP2pStateMachineMessenger.send(Message.obtain(msg));
-        mLooper.dispatchAll();
-    }
-
-    /**
      * Mock enter Disabled state.
      */
     private void mockEnterDisabledState() throws Exception {
-        sendP2pStateMachineMessage(WifiP2pMonitor.SUP_DISCONNECTION_EVENT);
+        Message msg = Message.obtain();
+        msg.what = WifiP2pMonitor.SUP_DISCONNECTION_EVENT;
+        mP2pStateMachineMessenger.send(Message.obtain(msg));
+        mLooper.dispatchAll();
     }
 
     /**
@@ -1344,37 +959,6 @@
     }
 
     /**
-     * Mock enter Group created state.
-     */
-    private void mockEnterGroupCreatedState() throws Exception {
-        forceP2pEnabled(mClient1);
-        WifiP2pGroup group = new WifiP2pGroup();
-        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
-        group.setNetworkName("DIRECT-xy-NEW");
-        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
-        group.setIsGroupOwner(true);
-        group.setInterface(IFACE_NAME_P2P);
-        sendGroupStartedMsg(group);
-        simulateTetherReady();
-    }
-
-    /**
-     * Mock enter the user authorizing negotiation request state.
-     */
-    private void mockEnterUserAuthorizingNegotiationRequestState(int wpsType) throws Exception {
-        mockPeersList();
-
-        // Enter UserAuthorizingNegotiationRequestState
-        WifiP2pConfig config = new WifiP2pConfig();
-        config.deviceAddress = mTestWifiP2pDevice.deviceAddress;
-        config.wps = new WpsInfo();
-        config.wps.setup = wpsType;
-
-        sendNegotiationRequestEvent(config);
-    }
-
-
-    /**
      * Mock WifiP2pServiceImpl.mPeers.
      */
     private void mockPeersList() throws Exception {
@@ -1435,30 +1019,6 @@
     }
 
     /**
-     * Verify that p2p will teardown /won't init when DISALLOW_WIFI_DIRECT user restriction is set
-     */
-    @Test
-    public void checkIsP2pInitForUserRestrictionChanges() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        forceP2pEnabled(mClient1);
-
-        // p2p interface disabled when user restriction is set
-        when(mBundle.getBoolean(UserManager.DISALLOW_WIFI_DIRECT)).thenReturn(true);
-        Intent intent = new Intent(UserManager.ACTION_USER_RESTRICTIONS_CHANGED);
-        mUserRestrictionReceiver.onReceive(mContext, intent);
-        mLooper.dispatchAll();
-        verify(mWifiNative).teardownInterface();
-        verify(mWifiMonitor).stopMonitoring(anyString());
-        // Force to back disable state for next test
-        mockEnterDisabledState();
-
-        // p2p interface won't initialize when user restriction is set
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.DISCOVER_PEERS);
-        verify(mWifiNative, times(1)).setupInterface(any(), any(), any());
-        verify(mNetdWrapper, times(1)).setInterfaceUp(anyString());
-    }
-
-    /**
      * Verify p2p init / teardown when two clients connect / disconnect
      */
     @Test
@@ -1509,29 +1069,16 @@
      */
     @Test
     public void testAddLocalServiceFailureWhenCallerPermissionDenied() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString());
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                    .thenReturn(false);
-        } else {
-            when(mWifiPermissionsUtil.checkCanAccessWifiDirect(any(), any(), anyInt(),
-                    anyBoolean())).thenReturn(false);
-        }
+        when(mWifiPermissionsUtil.checkCanAccessWifiDirect(
+                anyString(), anyString(), anyInt(), anyBoolean())).thenReturn(false);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendAddLocalServiceMsg(mClientMessenger);
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.ADD_LOCAL_SERVICE_FAILED));
         verify(mWifiNative, never()).p2pServiceAdd(any());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
     }
 
     private void verifyAddLocalService() throws Exception {
@@ -1539,15 +1086,8 @@
         when(mWifiNative.p2pServiceAdd(any())).thenReturn(true);
         sendAddLocalServiceMsg(mClientMessenger);
         verify(mWifiNative).p2pServiceAdd(any());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.ADD_LOCAL_SERVICE_SUCCEEDED));
     }
 
@@ -1556,7 +1096,6 @@
      */
     @Test
     public void testAddLocalServiceSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         verifyAddLocalService();
@@ -1567,22 +1106,14 @@
      */
     @Test
     public void testAddLocalServiceFailureWhenNativeCallFailure() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString());
         when(mWifiNative.p2pServiceAdd(any())).thenReturn(false);
         sendAddLocalServiceMsg(mClientMessenger);
         verify(mWifiNative).p2pServiceAdd(any());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.ADD_LOCAL_SERVICE_FAILED));
     }
 
@@ -1620,29 +1151,16 @@
      */
     @Test
     public void testConnectWithConfigValidAsGroupFailureWhenPermissionDenied() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString());
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                    .thenReturn(false);
-        } else {
-            when(mWifiPermissionsUtil.checkCanAccessWifiDirect(any(), any(), anyInt(),
-                    anyBoolean())).thenReturn(false);
-        }
+        when(mWifiPermissionsUtil.checkCanAccessWifiDirect(anyString(), anyString(), anyInt(),
+                anyBoolean())).thenReturn(false);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendConnectMsgWithConfigValidAsGroup(mClientMessenger);
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.CONNECT_FAILED));
         verify(mWifiNative, never()).p2pGroupAdd(any(), anyBoolean());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
     }
 
     /**
@@ -1650,21 +1168,13 @@
      */
     @Test
     public void testConnectWithConfigValidAsGroupSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         when(mWifiNative.p2pGroupAdd(any(), eq(true))).thenReturn(true);
         sendConnectMsgWithConfigValidAsGroup(mClientMessenger);
         verify(mWifiNative).p2pGroupAdd(any(), eq(true));
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.CONNECT_SUCCEEDED));
     }
 
@@ -1673,21 +1183,13 @@
      */
     @Test
     public void testConnectWithConfigValidAsGroupFailureWhenNativeCallFailure() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         when(mWifiNative.p2pGroupAdd(any(), eq(true))).thenReturn(false);
         sendConnectMsgWithConfigValidAsGroup(mClientMessenger);
         verify(mWifiNative).p2pGroupAdd(any(), eq(true));
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.CONNECT_FAILED));
     }
 
@@ -1729,30 +1231,17 @@
     @Test
     public void testCreateGroupWithConfigValidAsGroupFailureWhenPermissionDenied()
             throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString());
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                    .thenReturn(false);
-        } else {
-            when(mWifiPermissionsUtil.checkCanAccessWifiDirect(any(), any(), anyInt(),
-                    anyBoolean())).thenReturn(false);
-        }
+        when(mWifiPermissionsUtil.checkCanAccessWifiDirect(anyString(), anyString(), anyInt(),
+                anyBoolean())).thenReturn(false);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendCreateGroupMsgWithConfigValidAsGroup(mClientMessenger);
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.CREATE_GROUP_FAILED));
         verify(mWifiNative, never()).p2pGroupAdd(anyBoolean());
         verify(mWifiNative, never()).p2pGroupAdd(any(), anyBoolean());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
     }
 
     /**
@@ -1760,22 +1249,14 @@
      */
     @Test
     public void testCreateGroupWithConfigValidAsGroupSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         when(mWifiNative.p2pGroupAdd(any(), eq(false))).thenReturn(true);
         sendCreateGroupMsgWithConfigValidAsGroup(mClientMessenger);
         verify(mWifiNative).p2pGroupAdd(any(), eq(false));
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.CREATE_GROUP_SUCCEEDED));
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
     }
 
     /**
@@ -1784,21 +1265,13 @@
     @Test
     public void testCreateGroupWithConfigValidAsGroupFailureWhenNativeCallFailure()
             throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         when(mWifiNative.p2pGroupAdd(any(), eq(false))).thenReturn(false);
         sendCreateGroupMsgWithConfigValidAsGroup(mClientMessenger);
         verify(mWifiNative).p2pGroupAdd(any(), eq(false));
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.CREATE_GROUP_FAILED));
     }
 
@@ -1835,28 +1308,15 @@
      */
     @Test
     public void testDiscoverPeersFailureWhenPermissionDenied() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString());
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                    .thenReturn(false);
-        } else {
-            when(mWifiPermissionsUtil.checkCanAccessWifiDirect(any(), any(), anyInt(),
-                    anyBoolean())).thenReturn(false);
-        }
+        when(mWifiPermissionsUtil.checkCanAccessWifiDirect(anyString(), anyString(), anyInt(),
+                anyBoolean())).thenReturn(false);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendDiscoverPeersMsg(mClientMessenger);
         verify(mWifiNative, never()).p2pFind(anyInt());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_PEERS_FAILED));
     }
 
@@ -1875,91 +1335,23 @@
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendDiscoverPeersMsg(mClientMessenger);
         verify(mWifiNative, never()).p2pFind(anyInt());
-        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                eq("testFeature"), anyInt(), eq(true));
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_PEERS_FAILED));
     }
 
     /**
-     * Verify the caller with proper permission sends WifiP2pManager.DISCOVER_PEERS
-     * with scan type, WIFI_P2P_SCAN_FULL.
+     * Verify the caller with proper permission sends WifiP2pManager.DISCOVER_PEERS.
      */
     @Test
-    public void testDiscoverPeersFullSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
+    public void testDiscoverPeersSuccess() throws Exception {
         forceP2pEnabled(mClient1);
         when(mWifiNative.p2pFind(anyInt())).thenReturn(true);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendDiscoverPeersMsg(mClientMessenger);
         verify(mWifiNative).p2pFind(anyInt());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
-        assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_PEERS_SUCCEEDED));
-    }
-
-    /**
-     * Verify the caller with proper permission sends WifiP2pManager.DISCOVER_PEERS
-     * with scan type, WIFI_P2P_SCAN_SOCIAL.
-     */
-    @Test
-    public void testDiscoverPeersSocialSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
-        when(mWifiNative.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_FLEXIBLE_DISCOVERY);
-        forceP2pEnabled(mClient1);
-        when(mWifiNative.p2pFind(anyInt(), anyInt(), anyInt())).thenReturn(true);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        sendDiscoverPeersMsg(
-                mClientMessenger, WifiP2pManager.WIFI_P2P_SCAN_SOCIAL,
-                WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED);
-        verify(mWifiNative).p2pFind(
-                eq(WifiP2pManager.WIFI_P2P_SCAN_SOCIAL),
-                eq(WifiP2pManager.WIFI_P2P_SCAN_FREQ_UNSPECIFIED), anyInt());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
-        assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_PEERS_SUCCEEDED));
-    }
-
-    /**
-     * Verify the caller with proper permission sends WifiP2pManager.DISCOVER_PEERS
-     * with scan type, WIFI_P2P_SCAN_SINGLE_FREQ.
-     */
-    @Test
-    public void testDiscoverPeersSpecificFrequencySuccess() throws Exception {
-        setTargetSdkGreaterThanT();
-        when(mWifiNative.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_FLEXIBLE_DISCOVERY);
-        forceP2pEnabled(mClient1);
-        when(mWifiNative.p2pFind(anyInt(), anyInt(), anyInt())).thenReturn(true);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        int freq = 2412;
-        sendDiscoverPeersMsg(
-                mClientMessenger, WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ, freq);
-        verify(mWifiNative).p2pFind(
-                eq(WifiP2pManager.WIFI_P2P_SCAN_SINGLE_FREQ), eq(freq), anyInt());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_PEERS_SUCCEEDED));
     }
 
@@ -1968,21 +1360,13 @@
      */
     @Test
     public void testDiscoverPeersFailureWhenNativeCallFailure() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         when(mWifiNative.p2pFind(anyInt())).thenReturn(false);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendDiscoverPeersMsg(mClientMessenger);
         verify(mWifiNative).p2pFind(anyInt());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_PEERS_FAILED));
     }
 
@@ -2026,32 +1410,19 @@
      */
     @Test
     public void testDiscoverServicesFailureWhenPermissionDenied() throws Exception {
-        setTargetSdkGreaterThanT();
         when(mWifiNative.p2pServDiscReq(anyString(), anyString()))
                 .thenReturn("mServiceDiscReqId");
         forceP2pEnabled(mClient1);
         doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString());
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                    .thenReturn(false);
-        } else {
-            when(mWifiPermissionsUtil.checkCanAccessWifiDirect(any(), any(), anyInt(),
-                    anyBoolean())).thenReturn(false);
-        }
+        when(mWifiPermissionsUtil.checkCanAccessWifiDirect(anyString(), anyString(), anyInt(),
+                anyBoolean())).thenReturn(false);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendAddServiceRequestMsg(mClientMessenger);
         sendDiscoverServiceMsg(mClientMessenger);
         verify(mWifiNative, never()).p2pServDiscReq(anyString(), anyString());
-        verify(mWifiNative, never()).p2pFind(anyInt(), anyInt(), anyInt());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiNative, never()).p2pFind(anyInt());
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_SERVICES_FAILED));
     }
 
@@ -2073,9 +1444,9 @@
         sendAddServiceRequestMsg(mClientMessenger);
         sendDiscoverServiceMsg(mClientMessenger);
         verify(mWifiNative, never()).p2pServDiscReq(anyString(), anyString());
-        verify(mWifiNative, never()).p2pFind(anyInt(), anyInt(), anyInt());
-        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                eq("testFeature"), anyInt(), eq(true));
+        verify(mWifiNative, never()).p2pFind(anyInt());
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_SERVICES_FAILED));
     }
 
@@ -2084,7 +1455,6 @@
      */
     @Test
     public void testDiscoverServicesSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
         when(mWifiNative.p2pServDiscReq(anyString(), anyString()))
                 .thenReturn("mServiceDiscReqId");
         when(mWifiNative.p2pFind(anyInt())).thenReturn(true);
@@ -2093,16 +1463,9 @@
         sendAddServiceRequestMsg(mClientMessenger);
         sendDiscoverServiceMsg(mClientMessenger);
         verify(mWifiNative).p2pServDiscReq(anyString(), anyString());
-        verify(mWifiNative, atLeastOnce()).p2pFind(anyInt());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiNative).p2pFind(anyInt());
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_SERVICES_SUCCEEDED));
     }
 
@@ -2111,23 +1474,15 @@
      */
     @Test
     public void testDiscoverServicesFailureWhenAddServiceRequestFailure() throws Exception {
-        setTargetSdkGreaterThanT();
         when(mWifiNative.p2pServDiscReq(anyString(), anyString())).thenReturn(null);
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendAddServiceRequestMsg(mClientMessenger);
         sendDiscoverServiceMsg(mClientMessenger);
         verify(mWifiNative).p2pServDiscReq(anyString(), anyString());
-        verify(mWifiNative, never()).p2pFind(anyInt(), anyInt(), anyInt());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiNative, never()).p2pFind(anyInt());
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_SERVICES_FAILED));
     }
 
@@ -2136,7 +1491,6 @@
      */
     @Test
     public void testDiscoverServicesFailureWhenNativeCallFailure() throws Exception {
-        setTargetSdkGreaterThanT();
         when(mWifiNative.p2pServDiscReq(anyString(), anyString()))
                 .thenReturn("mServiceDiscReqId");
         when(mWifiNative.p2pFind(anyInt())).thenReturn(false);
@@ -2146,15 +1500,8 @@
         sendDiscoverServiceMsg(mClientMessenger);
         verify(mWifiNative).p2pServDiscReq(anyString(), anyString());
         verify(mWifiNative).p2pFind(anyInt());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.DISCOVER_SERVICES_FAILED));
     }
 
@@ -2198,29 +1545,16 @@
      */
     @Test
     public void testRequestPeersFailureWhenPermissionDenied() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         mockPeersList();
         doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString());
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                    .thenReturn(false);
-        } else {
-            when(mWifiPermissionsUtil.checkCanAccessWifiDirect(any(), any(), anyInt(),
-                    anyBoolean())).thenReturn(false);
-        }
+        when(mWifiPermissionsUtil.checkCanAccessWifiDirect(anyString(), anyString(), anyInt(),
+                anyBoolean())).thenReturn(false);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendRequestPeersMsg(mClientMessenger);
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         WifiP2pDeviceList peers = (WifiP2pDeviceList) mMessageCaptor.getValue().obj;
         assertEquals(WifiP2pManager.RESPONSE_PEERS, mMessageCaptor.getValue().what);
         assertNull(peers.get(mTestWifiP2pDevice.deviceAddress));
@@ -2243,8 +1577,8 @@
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendRequestPeersMsg(mClientMessenger);
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                eq("testFeature"), anyInt(), eq(true));
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         WifiP2pDeviceList peers = (WifiP2pDeviceList) mMessageCaptor.getValue().obj;
         assertEquals(WifiP2pManager.RESPONSE_PEERS, mMessageCaptor.getValue().what);
         assertNull(peers.get(mTestWifiP2pDevice.deviceAddress));
@@ -2257,21 +1591,13 @@
      */
     @Test
     public void testRequestPeersSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         mockPeersList();
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendRequestPeersMsg(mClientMessenger);
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
         WifiP2pDeviceList peers = (WifiP2pDeviceList) mMessageCaptor.getValue().obj;
         assertEquals(WifiP2pManager.RESPONSE_PEERS, mMessageCaptor.getValue().what);
         assertNotEquals(null, peers.get(mTestWifiP2pDevice.deviceAddress));
@@ -2316,30 +1642,17 @@
      */
     @Test
     public void testRequestGroupInfoFailureWhenPermissionDenied() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendGroupStartedMsg(mTestWifiP2pGroup);
         simulateTetherReady();
         doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString());
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                    .thenReturn(false);
-        } else {
-            when(mWifiPermissionsUtil.checkCanAccessWifiDirect(any(), any(), anyInt(),
-                    anyBoolean())).thenReturn(false);
-        }
+        when(mWifiPermissionsUtil.checkCanAccessWifiDirect(anyString(), anyString(), anyInt(),
+                anyBoolean())).thenReturn(false);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendRequestGroupInfoMsg(mClientMessenger);
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
         assertEquals(WifiP2pManager.RESPONSE_GROUP_INFO, mMessageCaptor.getValue().what);
         assertNull(mMessageCaptor.getValue().obj);
     }
@@ -2350,7 +1663,6 @@
      */
     @Test
     public void testRequestGroupInfoSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
         mTestWifiP2pGroup.setOwner(mTestThisDevice);
         forceP2pEnabled(mClient1);
         sendGroupStartedMsg(mTestWifiP2pGroup);
@@ -2359,15 +1671,8 @@
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendRequestGroupInfoMsg(mClientMessenger);
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
         assertEquals(WifiP2pManager.RESPONSE_GROUP_INFO, mMessageCaptor.getValue().what);
         WifiP2pGroup wifiP2pGroup = (WifiP2pGroup) mMessageCaptor.getValue().obj;
         assertEquals(mTestWifiP2pGroup.getNetworkName(), wifiP2pGroup.getNetworkName());
@@ -2381,7 +1686,6 @@
      */
     @Test
     public void testRequestGroupInfoIncludesMacForNetworkSettingsApp() throws Exception {
-        setTargetSdkGreaterThanT();
         mTestWifiP2pGroup.setOwner(mTestThisDevice);
         forceP2pEnabled(mClient1);
         sendGroupStartedMsg(mTestWifiP2pGroup);
@@ -2390,15 +1694,8 @@
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendRequestGroupInfoMsg(mClientMessenger);
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
         assertEquals(WifiP2pManager.RESPONSE_GROUP_INFO, mMessageCaptor.getValue().what);
         WifiP2pGroup wifiP2pGroup = (WifiP2pGroup) mMessageCaptor.getValue().obj;
         assertEquals(thisDeviceMac, wifiP2pGroup.getOwner().deviceAddress);
@@ -2410,14 +1707,12 @@
      */
     @Test
     public void testStartListenFailureWhenPermissionDenied() throws Exception {
-        when(mWifiPermissionsUtil.checkCanAccessWifiDirect(anyString(), anyString(), anyInt(),
-                anyBoolean())).thenReturn(false);
+        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
         forceP2pEnabled(mClient1);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.START_LISTEN);
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.START_LISTEN_FAILED));
         // p2pFlush should be invoked once in forceP2pEnabled.
         verify(mWifiNative).p2pFlush();
-        verify(mWifiNative, never()).p2pStopFind();
         verify(mWifiNative, never()).p2pExtListen(anyBoolean(), anyInt(), anyInt());
     }
 
@@ -2426,25 +1721,14 @@
      */
     @Test
     public void testStartListenFailureWhenNativeCallFailure() throws Exception {
-        setTargetSdkGreaterThanT();
+        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
         when(mWifiNative.p2pExtListen(eq(true), anyInt(), anyInt())).thenReturn(false);
         forceP2pEnabled(mClient1);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.START_LISTEN);
-        // p2pFlush should be invoked once in forceP2pEnabled.
-        verify(mWifiNative).p2pFlush();
-        verify(mWifiNative).p2pStopFind();
+        // p2pFlush would be invoked in forceP2pEnabled and startListen both.
+        verify(mWifiNative, times(2)).p2pFlush();
         verify(mWifiNative).p2pExtListen(eq(true), anyInt(), anyInt());
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.START_LISTEN_FAILED));
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
     }
 
     /**
@@ -2452,25 +1736,27 @@
      */
     @Test
     public void testStartListenSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
         when(mWifiNative.p2pExtListen(eq(true), anyInt(), anyInt())).thenReturn(true);
+        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
         forceP2pEnabled(mClient1);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.START_LISTEN);
-        // p2pFlush should be invoked once in forceP2pEnabled.
-        verify(mWifiNative).p2pFlush();
-        verify(mWifiNative).p2pStopFind();
+        // p2pFlush would be invoked in forceP2pEnabled and startListen both.
+        verify(mWifiNative, times(2)).p2pFlush();
         verify(mWifiNative).p2pExtListen(eq(true), anyInt(), anyInt());
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.START_LISTEN_SUCCEEDED));
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+    }
+
+    /**
+     * Verify WifiP2pManager.STOP_LISTEN_FAILED is returned when a caller
+     * without proper permission attempts to sends WifiP2pManager.STOP_LISTEN.
+     */
+    @Test
+    public void testStopListenFailureWhenPermissionDenied() throws Exception {
+        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
+        forceP2pEnabled(mClient1);
+        sendSimpleMsg(mClientMessenger, WifiP2pManager.STOP_LISTEN);
+        assertTrue(mClientHandler.hasMessages(WifiP2pManager.STOP_LISTEN_FAILED));
+        verify(mWifiNative, never()).p2pExtListen(anyBoolean(), anyInt(), anyInt());
     }
 
     /**
@@ -2478,10 +1764,10 @@
      */
     @Test
     public void testStopListenFailureWhenNativeCallFailure() throws Exception {
+        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
         when(mWifiNative.p2pExtListen(eq(false), anyInt(), anyInt())).thenReturn(false);
         forceP2pEnabled(mClient1);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.STOP_LISTEN);
-        verify(mWifiNative).p2pStopFind();
         verify(mWifiNative).p2pExtListen(eq(false), anyInt(), anyInt());
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.STOP_LISTEN_FAILED));
     }
@@ -2491,10 +1777,10 @@
      */
     @Test
     public void testStopListenSuccess() throws Exception {
+        when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(true);
         when(mWifiNative.p2pExtListen(eq(false), anyInt(), anyInt())).thenReturn(true);
         forceP2pEnabled(mClient1);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.STOP_LISTEN);
-        verify(mWifiNative).p2pStopFind();
         verify(mWifiNative).p2pExtListen(eq(false), anyInt(), anyInt());
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.STOP_LISTEN_SUCCEEDED));
     }
@@ -2587,21 +1873,13 @@
      */
     @Test
     public void testPeerScanMetricWhenSendDiscoverPeers() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         when(mWifiNative.p2pFind(anyInt())).thenReturn(true);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendDiscoverPeersMsg(mClientMessenger);
         verify(mWifiP2pMetrics).incrementPeerScans();
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
     }
 
     /**
@@ -2610,7 +1888,6 @@
      */
     @Test
     public void testServiceScanMetricWhenSendDiscoverServices() throws Exception {
-        setTargetSdkGreaterThanT();
         when(mWifiNative.p2pServDiscReq(anyString(), anyString()))
                 .thenReturn("mServiceDiscReqId");
         when(mWifiNative.p2pFind(anyInt())).thenReturn(true);
@@ -2619,15 +1896,8 @@
         sendAddServiceRequestMsg(mClientMessenger);
         sendDiscoverServiceMsg(mClientMessenger);
         verify(mWifiP2pMetrics).incrementServiceScans();
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(true));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
     }
 
     /**
@@ -2728,28 +1998,19 @@
      */
     @Test
     public void testStartFreshConnectionEventWhenSendConnect() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         mockPeersList();
         sendConnectMsg(mClientMessenger, mTestWifiP2pPeerConfig);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
 
         ArgumentCaptor<WifiP2pConfig> configCaptor =
                 ArgumentCaptor.forClass(WifiP2pConfig.class);
         verify(mWifiP2pMetrics).startConnectionEvent(
                 eq(P2pConnectionEvent.CONNECTION_FRESH),
-                configCaptor.capture(),
-                eq(WifiMetricsProto.GroupEvent.GROUP_UNKNOWN));
+                configCaptor.capture());
         assertEquals(mTestWifiP2pPeerConfig.toString(), configCaptor.getValue().toString());
     }
 
@@ -2758,7 +2019,6 @@
      */
     @Test
     public void testStartReinvokeConnectionEventWhenSendConnect() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         when(mWifiNative.p2pGroupAdd(anyInt()))
                 .thenReturn(true);
@@ -2769,22 +2029,14 @@
 
         mockPeersList();
         sendConnectMsg(mClientMessenger, mTestWifiP2pPeerConfig);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
 
         ArgumentCaptor<WifiP2pConfig> configCaptor =
                 ArgumentCaptor.forClass(WifiP2pConfig.class);
         verify(mWifiP2pMetrics).startConnectionEvent(
                 eq(P2pConnectionEvent.CONNECTION_REINVOKE),
-                configCaptor.capture(),
-                eq(WifiMetricsProto.GroupEvent.GROUP_UNKNOWN));
+                configCaptor.capture());
         assertEquals(mTestWifiP2pPeerConfig.toString(), configCaptor.getValue().toString());
     }
 
@@ -2798,25 +2050,16 @@
     @Test
     public void testStartReinvokeConnectionEventWhenCreateGroup()
             throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         sendCreateGroupMsg(mClientMessenger, WifiP2pGroup.NETWORK_ID_PERSISTENT, null);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
 
         verify(mWifiP2pMetrics).startConnectionEvent(
                 eq(P2pConnectionEvent.CONNECTION_REINVOKE),
-                eq(null),
-                eq(WifiMetricsProto.GroupEvent.GROUP_OWNER));
+                eq(null));
     }
 
     /**
@@ -2825,7 +2068,6 @@
      */
     @Test
     public void testStartLocalConnectionWhenCreateGroup() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
@@ -2842,20 +2084,12 @@
         sendSimpleMsg(mClientMessenger, WifiP2pManager.FACTORY_RESET);
 
         sendCreateGroupMsg(mClientMessenger, WifiP2pGroup.NETWORK_ID_PERSISTENT, null);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
 
         verify(mWifiP2pMetrics).startConnectionEvent(
                 eq(P2pConnectionEvent.CONNECTION_LOCAL),
-                eq(null),
-                eq(WifiMetricsProto.GroupEvent.GROUP_OWNER));
+                eq(null));
     }
 
     /**
@@ -2864,25 +2098,16 @@
      */
     @Test
     public void testStartLocalConnectionEventWhenCreateTemporaryGroup() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         sendCreateGroupMsg(mClientMessenger, WifiP2pGroup.NETWORK_ID_TEMPORARY, null);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
 
         verify(mWifiP2pMetrics).startConnectionEvent(
                 eq(P2pConnectionEvent.CONNECTION_LOCAL),
-                eq(null),
-                eq(WifiMetricsProto.GroupEvent.GROUP_OWNER));
+                eq(null));
     }
 
     /**
@@ -2892,28 +2117,19 @@
     @Test
     public void testStartFastConnectionEventWhenSendConnectWithConfig()
             throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         when(mWifiNative.p2pGroupAdd(any(), eq(true))).thenReturn(true);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         sendConnectMsg(mClientMessenger, mTestWifiP2pFastConnectionConfig);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
 
         ArgumentCaptor<WifiP2pConfig> configCaptor =
                 ArgumentCaptor.forClass(WifiP2pConfig.class);
         verify(mWifiP2pMetrics).startConnectionEvent(
                 eq(P2pConnectionEvent.CONNECTION_FAST),
-                configCaptor.capture(),
-                eq(WifiMetricsProto.GroupEvent.GROUP_CLIENT));
+                configCaptor.capture());
         assertEquals(mTestWifiP2pFastConnectionConfig.toString(),
                 configCaptor.getValue().toString());
     }
@@ -2925,27 +2141,18 @@
     @Test
     public void testStartFastConnectionEventWhenCreateGroupWithConfig()
             throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         sendCreateGroupMsg(mClientMessenger, 0, mTestWifiP2pFastConnectionConfig);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
 
         ArgumentCaptor<WifiP2pConfig> configCaptor =
                 ArgumentCaptor.forClass(WifiP2pConfig.class);
         verify(mWifiP2pMetrics).startConnectionEvent(
                 eq(P2pConnectionEvent.CONNECTION_FAST),
-                configCaptor.capture(),
-                eq(WifiMetricsProto.GroupEvent.GROUP_OWNER));
+                configCaptor.capture());
         assertEquals(mTestWifiP2pFastConnectionConfig.toString(),
                 configCaptor.getValue().toString());
     }
@@ -2975,21 +2182,13 @@
      */
     @Test
     public void testEndConnectionEventWhenTimeout() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         mockEnterGroupNegotiationState();
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
 
         mLooper.moveTimeForward(120 * 1000 * 2);
         mLooper.dispatchAll();
@@ -2999,172 +2198,17 @@
     }
 
     /**
-     * Verify accepting the frequency conflict dialog will send a disconnect wifi request.
-     */
-    @Test
-    public void testAcceptFrequencyConflictDialogSendsDisconnectWifiRequest() throws Exception {
-        forceP2pEnabled(mClient1);
-        when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        AsyncChannel wifiChannel = mAsyncChannel;
-        sendChannelHalfConnectedEvent(mClientMessenger, wifiChannel);
-        WifiDialogManager.DialogHandle dialogHandle = mock(WifiDialogManager.DialogHandle.class);
-        when(mWifiDialogManager.createSimpleDialog(
-                any(), any(), any(), any(), any(), any(), any())).thenReturn(dialogHandle);
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> callbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-
-        mockEnterGroupNegotiationState();
-        mockPeersList();
-        sendSetOngoingPeerConfigMsg(mClientMessenger, mTestWifiP2pPeerConfig);
-        mLooper.dispatchAll();
-        sendGoNegotiationFailureEvent(mClientMessenger,
-                WifiP2pServiceImpl.P2pStatus.NO_COMMON_CHANNEL);
-
-        if (!SdkLevel.isAtLeastT()) {
-            verify(mAlertDialog).show();
-            ArgumentCaptor<DialogInterface.OnClickListener> clickListener = ArgumentCaptor.forClass(
-                    DialogInterface.OnClickListener.class);
-            verify(mAlertDialogBuilder).setPositiveButton(any(), clickListener.capture());
-            clickListener.getValue().onClick(mAlertDialog, DialogInterface.BUTTON_POSITIVE);
-        } else {
-            verify(mWifiDialogManager).createSimpleDialog(
-                    any(), any(), any(), any(), any(), callbackCaptor.capture(), any());
-            verify(dialogHandle).launchDialog();
-            callbackCaptor.getValue().onPositiveButtonClicked();
-        }
-        mLooper.dispatchAll();
-        verify(wifiChannel).sendMessage(WifiP2pServiceImpl.DISCONNECT_WIFI_REQUEST, 1);
-    }
-
-    /**
-     * Verify DISCONNECT_WIFI_REQUEST is cleared when cancelConnect() is called.
-     */
-    @Test
-    public void testClearDisconnectWifiRequestOnCallCancelConnect() throws Exception {
-        // accept the frequency conflict dialog to start next try.
-        testAcceptFrequencyConflictDialogSendsDisconnectWifiRequest();
-
-        reset(mAsyncChannel);
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.CANCEL_CONNECT);
-        verify(mAsyncChannel).sendMessage(WifiP2pServiceImpl.DISCONNECT_WIFI_REQUEST, 0);
-    }
-
-    /**
-     * Verify DISCONNECT_WIFI_REQUEST is cleared when group formation fails.
-     */
-    @Test
-    public void testClearDisconnectWifiRequestWhenGroupFormationFails() throws Exception {
-        // accept the frequency conflict dialog to start next try.
-        testAcceptFrequencyConflictDialogSendsDisconnectWifiRequest();
-
-        reset(mAsyncChannel);
-        // Send a reject to trigger handleGroupCreationFailure().
-        sendSimpleMsg(mClientMessenger, WifiP2pServiceImpl.DROP_WIFI_USER_REJECT);
-        verify(mAsyncChannel).sendMessage(WifiP2pServiceImpl.DISCONNECT_WIFI_REQUEST, 0);
-    }
-
-    /**
-     * Verify declining the frequency conflict dialog will end the P2P connection event.
-     */
-    @Test
-    public void testDeclineFrequencyConflictDialogEndsP2pConnectionEvent() throws Exception {
-        forceP2pEnabled(mClient1);
-        when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        AsyncChannel wifiChannel = mock(AsyncChannel.class);
-        sendChannelHalfConnectedEvent(mClientMessenger, wifiChannel);
-        WifiDialogManager.DialogHandle dialogHandle = mock(WifiDialogManager.DialogHandle.class);
-        when(mWifiDialogManager.createSimpleDialog(
-                any(), any(), any(), any(), any(), any(), any())).thenReturn(dialogHandle);
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> callbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-
-        mockEnterGroupNegotiationState();
-        mockPeersList();
-        sendSetOngoingPeerConfigMsg(mClientMessenger, mTestWifiP2pPeerConfig);
-        mLooper.dispatchAll();
-        sendGoNegotiationFailureEvent(mClientMessenger,
-                WifiP2pServiceImpl.P2pStatus.NO_COMMON_CHANNEL);
-
-        if (!SdkLevel.isAtLeastT()) {
-            verify(mAlertDialog).show();
-            ArgumentCaptor<DialogInterface.OnClickListener> clickListener = ArgumentCaptor.forClass(
-                    DialogInterface.OnClickListener.class);
-            verify(mAlertDialogBuilder).setNegativeButton(any(), clickListener.capture());
-            clickListener.getValue().onClick(mAlertDialog, DialogInterface.BUTTON_NEGATIVE);
-        } else {
-            verify(mWifiDialogManager).createSimpleDialog(
-                    any(), any(), any(), any(), any(), callbackCaptor.capture(), any());
-            verify(dialogHandle).launchDialog();
-            callbackCaptor.getValue().onNegativeButtonClicked();
-
-        }
-        mLooper.dispatchAll();
-        verify(mWifiP2pMetrics).endConnectionEvent(P2pConnectionEvent.CLF_USER_REJECT);
-    }
-
-    /**
-     * Verify the frequency conflict dialog is dismissed when the frequency conflict state exits.
-     */
-    @Test
-    public void testFrequencyConflictDialogDismissedOnStateExit() throws Exception {
-        forceP2pEnabled(mClient1);
-        when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        AsyncChannel wifiChannel = mock(AsyncChannel.class);
-        sendChannelHalfConnectedEvent(mClientMessenger, wifiChannel);
-        WifiDialogManager.DialogHandle dialogHandle = mock(WifiDialogManager.DialogHandle.class);
-        when(mWifiDialogManager.createSimpleDialog(
-                any(), any(), any(), any(), any(), any(), any())).thenReturn(dialogHandle);
-        ArgumentCaptor<WifiDialogManager.SimpleDialogCallback> callbackCaptor =
-                ArgumentCaptor.forClass(WifiDialogManager.SimpleDialogCallback.class);
-
-        mockEnterGroupNegotiationState();
-        mockPeersList();
-        sendSetOngoingPeerConfigMsg(mClientMessenger, mTestWifiP2pPeerConfig);
-        mLooper.dispatchAll();
-        sendGoNegotiationFailureEvent(mClientMessenger,
-                WifiP2pServiceImpl.P2pStatus.NO_COMMON_CHANNEL);
-        WifiP2pGroup group = new WifiP2pGroup();
-        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
-        group.setNetworkName("DIRECT-xy-NEW");
-        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
-        group.setIsGroupOwner(true);
-        group.setInterface(IFACE_NAME_P2P);
-        sendGroupStartedMsg(group);
-
-        if (!SdkLevel.isAtLeastT()) {
-            verify(mAlertDialog).show();
-            verify(mAlertDialog).dismiss();
-        } else {
-            verify(mWifiDialogManager).createSimpleDialog(
-                    any(), any(), any(), any(), any(), callbackCaptor.capture(), any());
-            verify(dialogHandle).launchDialog();
-            verify(dialogHandle).dismissDialog();
-        }
-    }
-
-    /**
      * Verify the connection event ends due to the cancellation.
      */
     @Test
     public void testEndConnectionEventWhenCancel() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         mockEnterGroupNegotiationState();
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
 
         sendSimpleMsg(mClientMessenger, WifiP2pManager.CANCEL_CONNECT);
 
@@ -3177,26 +2221,15 @@
      */
     @Test
     public void testEndConnectionEventWhenProvDiscFailure() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         mockEnterProvisionDiscoveryState();
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
-        WifiP2pProvDiscEvent pdEvent = new WifiP2pProvDiscEvent();
-        pdEvent.device.deviceAddress = mTestWifiP2pPeerConfig.deviceAddress;
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
 
-        sendSimpleMsg(null, WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT,
-                WifiP2pMonitor.PROV_DISC_STATUS_UNKNOWN, pdEvent);
+        sendSimpleMsg(null, WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT);
 
         verify(mWifiP2pMetrics).endConnectionEvent(
                 eq(P2pConnectionEvent.CLF_PROV_DISC_FAIL));
@@ -3207,65 +2240,21 @@
      */
     @Test
     public void testEndConnectionEventWhenGroupRemoval() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         mockEnterGroupNegotiationState();
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
 
         sendSimpleMsg(null, WifiP2pMonitor.P2P_GROUP_REMOVED_EVENT);
         verify(mContext).sendBroadcastWithMultiplePermissions(
                 argThat(new WifiP2pServiceImplTest
                         .P2pConnectionChangedIntentMatcherForNetworkState(FAILED)), any());
-        if (SdkLevel.isAtLeastT()) {
-            verify(mContext).sendBroadcast(
-                    argThat(new WifiP2pServiceImplTest
-                            .P2pConnectionChangedIntentMatcherForNetworkState(FAILED)), any(),
-                    any());
-            verify(mBroadcastOptions, atLeastOnce())
-                    .setRequireAllOfPermissions(TEST_REQUIRED_PERMISSIONS_T);
-            verify(mBroadcastOptions, atLeastOnce())
-                    .setRequireNoneOfPermissions(TEST_EXCLUDED_PERMISSIONS_T);
-        }
 
-        verify(mWifiP2pMetrics).endConnectionEvent(eq(P2pConnectionEvent.CLF_UNKNOWN));
-    }
-
-    @Test
-    public void testStartP2pLocationOn() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        simulateLocationModeChange(true);
-        simulateWifiStateChange(true);
-        checkIsP2pInitWhenClientConnected(true, mClient1,
-                new WorkSource(mClient1.getCallingUid(), TEST_PACKAGE_NAME));
-
-        verify(mBroadcastOptions, atLeastOnce())
-                .setRequireAllOfPermissions(TEST_REQUIRED_PERMISSIONS_T);
-        verify(mBroadcastOptions, atLeastOnce())
-                .setRequireNoneOfPermissions(TEST_EXCLUDED_PERMISSIONS_T);
-    }
-
-    @Test
-    public void testStartP2pLocationOff() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        simulateLocationModeChange(false);
-        simulateWifiStateChange(true);
-        checkIsP2pInitWhenClientConnected(true, mClient1,
-                new WorkSource(mClient1.getCallingUid(), TEST_PACKAGE_NAME));
-
-        verify(mBroadcastOptions, atLeastOnce())
-                .setRequireAllOfPermissions(TEST_REQUIRED_PERMISSIONS_T);
-        verify(mBroadcastOptions, never()).setRequireNoneOfPermissions(TEST_EXCLUDED_PERMISSIONS_T);
+        verify(mWifiP2pMetrics).endConnectionEvent(
+                eq(P2pConnectionEvent.CLF_UNKNOWN));
     }
 
     /**
@@ -3273,21 +2262,13 @@
      */
     @Test
     public void testEndConnectionEventWhenInvitationFailure() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         mockEnterGroupNegotiationState();
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
 
         sendInvitationResultMsg(WifiP2pServiceImpl.P2pStatus.UNKNOWN);
 
@@ -3301,27 +2282,14 @@
      */
     @Test
     public void testRequestDeviceInfoFailureWhenPermissionDenied() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         doNothing().when(mWifiPermissionsUtil).checkPackage(anyInt(), anyString());
-        if (SdkLevel.isAtLeastT()) {
-            when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                    .thenReturn(false);
-        } else {
-            when(mWifiPermissionsUtil.checkCanAccessWifiDirect(any(), any(), anyInt(),
-                    anyBoolean())).thenReturn(false);
-        }
+        when(mWifiPermissionsUtil.checkCanAccessWifiDirect(anyString(), anyString(), anyInt(),
+                anyBoolean())).thenReturn(false);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.REQUEST_DEVICE_INFO);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
         assertEquals(WifiP2pManager.RESPONSE_DEVICE_INFO, mMessageCaptor.getValue().what);
         assertNull(mMessageCaptor.getValue().obj);
@@ -3333,19 +2301,11 @@
      */
     @Test
     public void testRequestDeviceInfoSuccessWhenP2pEnabled() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.REQUEST_DEVICE_INFO);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
         assertEquals(WifiP2pManager.RESPONSE_DEVICE_INFO, mMessageCaptor.getValue().what);
         WifiP2pDevice wifiP2pDevice = (WifiP2pDevice) mMessageCaptor.getValue().obj;
@@ -3359,18 +2319,10 @@
      */
     @Test
     public void testRequestDeviceInfoReturnEmptyWifiP2pDeviceWhenP2pDisabled() throws Exception {
-        setTargetSdkGreaterThanT();
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.REQUEST_DEVICE_INFO);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
         assertEquals(WifiP2pManager.RESPONSE_DEVICE_INFO, mMessageCaptor.getValue().what);
         WifiP2pDevice wifiP2pDevice = (WifiP2pDevice) mMessageCaptor.getValue().obj;
@@ -3384,20 +2336,12 @@
      */
     @Test
     public void testRequestDeviceInfoReturnsActualMacForNetworkSettingsApp() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         when(mWifiPermissionsUtil.checkLocalMacAddressPermission(anyInt())).thenReturn(true);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.REQUEST_DEVICE_INFO);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(false));
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
         assertEquals(WifiP2pManager.RESPONSE_DEVICE_INFO, mMessageCaptor.getValue().what);
         WifiP2pDevice wifiP2pDevice = (WifiP2pDevice) mMessageCaptor.getValue().obj;
@@ -3405,7 +2349,7 @@
         assertEquals(thisDeviceName, wifiP2pDevice.deviceName);
     }
 
-    private String verifyCustomizeDefaultDeviceName(String expectedName, boolean isRandomPostfix)
+    private void verifyCustomizeDefaultDeviceName(String expectedName, boolean isRandomPostfix)
             throws Exception {
         forceP2pEnabled(mClient1);
         when(mWifiPermissionsUtil.checkLocalMacAddressPermission(anyInt())).thenReturn(true);
@@ -3422,7 +2366,6 @@
         } else {
             assertEquals(expectedName, wifiP2pDevice.deviceName);
         }
-        return wifiP2pDevice.deviceName;
     }
 
     private void setupDefaultDeviceNameCustomization(
@@ -3434,20 +2377,11 @@
         when(mWifiGlobals.getWifiP2pDeviceNamePostfixNumDigits()).thenReturn(postfixDigit);
     }
 
-    /** Verify that the default device name is customized by overlay on S or older. */
-    @Test
-    public void testCustomizeDefaultDeviceNameOnSorOlder() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        setupDefaultDeviceNameCustomization("Niceboat-", -1);
-        verifyCustomizeDefaultDeviceName("Niceboat-" + TEST_ANDROID_ID.substring(0, 4), false);
-    }
-
     /** Verify that the default device name is customized by overlay. */
     @Test
     public void testCustomizeDefaultDeviceName() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
         setupDefaultDeviceNameCustomization("Niceboat-", -1);
-        verifyCustomizeDefaultDeviceName("Niceboat-", true);
+        verifyCustomizeDefaultDeviceName("Niceboat-" + TEST_ANDROID_ID.substring(0, 4), false);
     }
 
     /** Verify that the prefix fallback to Android_ if the prefix is too long. */
@@ -3468,36 +2402,17 @@
 
     /** Verify that the postfix fallbacks to 4-digit ANDROID_ID if the length is smaller than 4. */
     @Test
-    public void testCustomizeDefaultDeviceNamePostfixTooShortOnSorOlder() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        setupDefaultDeviceNameCustomization("Prefix",
-                WifiP2pServiceImpl.DEVICE_NAME_POSTFIX_LENGTH_MIN - 1);
-        verifyCustomizeDefaultDeviceName("Prefix" + TEST_ANDROID_ID.substring(0, 4), true);
-    }
-
-    /** Verify that the postfix fallbacks to 4-digit ANDROID_ID if the length is smaller than 4. */
-    @Test
     public void testCustomizeDefaultDeviceNamePostfixTooShort() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
         setupDefaultDeviceNameCustomization("Prefix",
                 WifiP2pServiceImpl.DEVICE_NAME_POSTFIX_LENGTH_MIN - 1);
-        verifyCustomizeDefaultDeviceName("Prefix", true);
-    }
-
-    /** Verify that the postfix fallbacks to 4-digit ANDROID_ID if the length is 0.*/
-    @Test
-    public void testCustomizeDefaultDeviceNamePostfixIsZeroLengthOnSorOlder() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
-        setupDefaultDeviceNameCustomization("Prefix", 0);
         verifyCustomizeDefaultDeviceName("Prefix" + TEST_ANDROID_ID.substring(0, 4), true);
     }
 
     /** Verify that the postfix fallbacks to 4-digit ANDROID_ID if the length is 0.*/
     @Test
     public void testCustomizeDefaultDeviceNamePostfixIsZeroLength() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
         setupDefaultDeviceNameCustomization("Prefix", 0);
-        verifyCustomizeDefaultDeviceName("Prefix", true);
+        verifyCustomizeDefaultDeviceName("Prefix" + TEST_ANDROID_ID.substring(0, 4), true);
     }
 
     /** Verify that the digit length exceeds the remaining bytes. */
@@ -3513,54 +2428,12 @@
     /** Verify that the default device name is customized by overlay
      * when saved one is an empty string. */
     @Test
-    public void testCustomizeDefaultDeviceNameWithEmptySavedNameOnSorOlder() throws Exception {
-        assumeFalse(SdkLevel.isAtLeastT());
+    public void testCustomizeDefaultDeviceNameWithEmptySavedName() throws Exception {
         setupDefaultDeviceNameCustomization("Niceboat-", -1);
         when(mWifiSettingsConfigStore.get(eq(WIFI_P2P_DEVICE_NAME))).thenReturn("");
         verifyCustomizeDefaultDeviceName("Niceboat-" + TEST_ANDROID_ID.substring(0, 4), false);
     }
 
-    /** Verify that the default device name is customized by overlay
-     * when saved one is an empty string. */
-    @Test
-    public void testCustomizeDefaultDeviceNameWithEmptySavedName() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        setupDefaultDeviceNameCustomization("Niceboat-", -1);
-        when(mWifiSettingsConfigStore.get(eq(WIFI_P2P_DEVICE_NAME))).thenReturn("");
-        verifyCustomizeDefaultDeviceName("Niceboat-", true);
-    }
-
-    /** Verify that the default device name is preserved in a period. */
-    @Test
-    public void testCustomizeDefaultDeviceNameIsPreserved() throws Exception {
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(0L);
-
-        setupDefaultDeviceNameCustomization("Niceboat-", 4);
-        String defaultDeviceName = verifyCustomizeDefaultDeviceName("Niceboat-", true);
-
-        // re-init P2P, and the default name should be the same.
-        mockEnterDisabledState();
-        sendP2pStateMachineMessage(WifiP2pServiceImpl.ENABLE_P2P);
-        ArgumentCaptor<Message> msgCaptor = ArgumentCaptor.forClass(Message.class);
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.REQUEST_DEVICE_INFO);
-        verify(mClientHandler, times(2)).sendMessage(msgCaptor.capture());
-        assertEquals(WifiP2pManager.RESPONSE_DEVICE_INFO, msgCaptor.getValue().what);
-        WifiP2pDevice wifiP2pDevice = (WifiP2pDevice) msgCaptor.getAllValues().get(1).obj;
-        assertEquals(defaultDeviceName, wifiP2pDevice.deviceName);
-
-        // After the default name expires, the default name should be changed.
-        when(mClock.getElapsedSinceBootMillis()).thenReturn(
-                WifiP2pServiceImpl.DEFAULT_DEVICE_NAME_LIFE_TIME_MILLIS);
-        mockEnterDisabledState();
-        sendP2pStateMachineMessage(WifiP2pServiceImpl.ENABLE_P2P);
-        msgCaptor = ArgumentCaptor.forClass(Message.class);
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.REQUEST_DEVICE_INFO);
-        verify(mClientHandler, times(3)).sendMessage(msgCaptor.capture());
-        assertEquals(WifiP2pManager.RESPONSE_DEVICE_INFO, msgCaptor.getValue().what);
-        wifiP2pDevice = (WifiP2pDevice) msgCaptor.getAllValues().get(2).obj;
-        assertNotEquals(defaultDeviceName, wifiP2pDevice.deviceName);
-    }
-
     /**
      * Verify the caller sends WifiP2pManager.STOP_DISCOVERY.
      */
@@ -3674,7 +2547,16 @@
      */
     @Test
     public void testRemoveGroupSuccess() throws Exception {
-        mockEnterGroupCreatedState();
+        // Move to group created state
+        forceP2pEnabled(mClient1);
+        WifiP2pGroup group = new WifiP2pGroup();
+        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
+        group.setNetworkName("DIRECT-xy-NEW");
+        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
+        group.setIsGroupOwner(true);
+        group.setInterface(IFACE_NAME_P2P);
+        sendGroupStartedMsg(group);
+        simulateTetherReady();
 
         when(mWifiNative.p2pGroupRemove(eq(IFACE_NAME_P2P))).thenReturn(true);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.REMOVE_GROUP);
@@ -3689,7 +2571,16 @@
      */
     @Test
     public void testRemoveGroupFailureWhenNativeCallFailure() throws Exception {
-        mockEnterGroupCreatedState();
+        // Move to group created state
+        forceP2pEnabled(mClient1);
+        WifiP2pGroup group = new WifiP2pGroup();
+        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
+        group.setNetworkName("DIRECT-xy-NEW");
+        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
+        group.setIsGroupOwner(true);
+        group.setInterface(IFACE_NAME_P2P);
+        sendGroupStartedMsg(group);
+        simulateTetherReady();
 
         when(mWifiNative.p2pGroupRemove(eq(IFACE_NAME_P2P))).thenReturn(false);
         sendSimpleMsg(mClientMessenger, WifiP2pManager.REMOVE_GROUP);
@@ -3863,7 +2754,16 @@
      */
     @Test
     public void testStartWpsWithPbcSuccess() throws Exception {
-        mockEnterGroupCreatedState();
+        // Move to group created state
+        forceP2pEnabled(mClient1);
+        WifiP2pGroup group = new WifiP2pGroup();
+        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
+        group.setNetworkName("DIRECT-xy-NEW");
+        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
+        group.setIsGroupOwner(true);
+        group.setInterface(IFACE_NAME_P2P);
+        sendGroupStartedMsg(group);
+        simulateTetherReady();
 
         when(mWifiNative.startWpsPbc(anyString(), any())).thenReturn(true);
         WpsInfo wps = new WpsInfo();
@@ -3888,7 +2788,16 @@
      */
     @Test
     public void testStartWpsWithPinKeypadSuccess() throws Exception {
-        mockEnterGroupCreatedState();
+        // Move to group created state
+        forceP2pEnabled(mClient1);
+        WifiP2pGroup group = new WifiP2pGroup();
+        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
+        group.setNetworkName("DIRECT-xy-NEW");
+        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
+        group.setIsGroupOwner(true);
+        group.setInterface(IFACE_NAME_P2P);
+        sendGroupStartedMsg(group);
+        simulateTetherReady();
 
         when(mWifiNative.startWpsPinKeypad(anyString(), anyString())).thenReturn(true);
         WpsInfo wps = new WpsInfo();
@@ -3906,7 +2815,16 @@
      */
     @Test
     public void testStartWpsFailureWhenObjectIsNull() throws Exception {
-        mockEnterGroupCreatedState();
+        // Move to group created state
+        forceP2pEnabled(mClient1);
+        WifiP2pGroup group = new WifiP2pGroup();
+        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
+        group.setNetworkName("DIRECT-xy-NEW");
+        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
+        group.setIsGroupOwner(true);
+        group.setInterface(IFACE_NAME_P2P);
+        sendGroupStartedMsg(group);
+        simulateTetherReady();
 
         WpsInfo wps = null;
         sendStartWpsMsg(mClientMessenger, wps);
@@ -3921,7 +2839,16 @@
      */
     @Test
     public void testStartWpsWithPbcFailureWhenNativeCallFailure() throws Exception {
-        mockEnterGroupCreatedState();
+        // Move to group created state
+        forceP2pEnabled(mClient1);
+        WifiP2pGroup group = new WifiP2pGroup();
+        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
+        group.setNetworkName("DIRECT-xy-NEW");
+        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
+        group.setIsGroupOwner(true);
+        group.setInterface(IFACE_NAME_P2P);
+        sendGroupStartedMsg(group);
+        simulateTetherReady();
         when(mWifiNative.startWpsPbc(anyString(), any())).thenReturn(false);
         WpsInfo wps = new WpsInfo();
         wps.setup = WpsInfo.PBC;
@@ -3938,7 +2865,16 @@
      */
     @Test
     public void testStartWpsWithPinDisplayFailureWhenNativeCallFailure() throws Exception {
-        mockEnterGroupCreatedState();
+        // Move to group created state
+        forceP2pEnabled(mClient1);
+        WifiP2pGroup group = new WifiP2pGroup();
+        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
+        group.setNetworkName("DIRECT-xy-NEW");
+        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
+        group.setIsGroupOwner(true);
+        group.setInterface(IFACE_NAME_P2P);
+        sendGroupStartedMsg(group);
+        simulateTetherReady();
 
         when(mWifiNative.startWpsPinDisplay(anyString(), any())).thenReturn("abcd");
         WpsInfo wps = new WpsInfo();
@@ -3956,7 +2892,16 @@
      */
     @Test
     public void testStartWpsWithPinKeypadFailureWhenNativeCallFailure() throws Exception {
-        mockEnterGroupCreatedState();
+        // Move to group created state
+        forceP2pEnabled(mClient1);
+        WifiP2pGroup group = new WifiP2pGroup();
+        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
+        group.setNetworkName("DIRECT-xy-NEW");
+        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
+        group.setIsGroupOwner(true);
+        group.setInterface(IFACE_NAME_P2P);
+        sendGroupStartedMsg(group);
+        simulateTetherReady();
 
         when(mWifiNative.startWpsPinKeypad(anyString(), anyString())).thenReturn(false);
         WpsInfo wps = new WpsInfo();
@@ -4513,6 +3458,7 @@
         // Move to enabled state
         when(mWifiSettingsConfigStore.get(eq(WIFI_P2P_PENDING_FACTORY_RESET))).thenReturn(true);
         forceP2pEnabled(mClient1);
+        verify(mWifiInjector, times(2)).getUserManager();
         verify(mPackageManager, times(2)).getNameForUid(anyInt());
         verify(mWifiPermissionsUtil, times(2)).checkNetworkSettingsPermission(anyInt());
         verify(mUserManager, times(2)).hasUserRestrictionForUser(
@@ -4711,7 +3657,6 @@
         // Ensure our own MAC address is not anonymized in the result
         when(mWifiPermissionsUtil.checkLocalMacAddressPermission(anyInt())).thenReturn(true);
         forceP2pEnabled(mClient1);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         sendSimpleMsg(mClientMessenger, WifiP2pManager.REQUEST_PERSISTENT_GROUP_INFO);
 
@@ -4730,8 +3675,8 @@
     @Test
     public void testRequestPersistentGroupInfoNoPermissionFailure() throws Exception {
         // Ensure our own MAC address is not anonymized in the result
+        when(mWifiPermissionsUtil.checkLocalMacAddressPermission(anyInt())).thenReturn(true);
         forceP2pEnabled(mClient1);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         // no permissions held
         when(mWifiPermissionsUtil.checkNetworkSettingsPermission(anyInt())).thenReturn(false);
@@ -4751,36 +3696,6 @@
     }
 
     /**
-     * Verify that respond with RESPONSE_PERSISTENT_GROUP_INFO
-     * when caller sends REQUEST_PERSISTENT_GROUP_INFO without LOCATION_FINE permission.
-     */
-    @Test
-    public void testRequestPersistentGroupInfoNoLocationFinePermission() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        // Ensure our own MAC address is not anonymized in the result
-        when(mWifiPermissionsUtil.checkLocalMacAddressPermission(anyInt())).thenReturn(true);
-        when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                .thenReturn(false);
-        when(mWifiPermissionsUtil.isTargetSdkLessThan(any(),
-                eq(Build.VERSION_CODES.TIRAMISU), anyInt())).thenReturn(false);
-        when(mWifiPermissionsUtil.checkCallersLocationPermission(
-                anyString(), anyString(), anyInt(), anyBoolean(), any())).thenReturn(false);
-        forceP2pEnabled(mClient1);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.REQUEST_PERSISTENT_GROUP_INFO);
-
-        verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        Message message = mMessageCaptor.getValue();
-        WifiP2pGroupList groups = (WifiP2pGroupList) message.obj;
-        assertEquals(WifiP2pManager.RESPONSE_PERSISTENT_GROUP_INFO, message.what);
-        // WifiP2pGroupList does not implement equals operator,
-        // use toString to compare two lists.
-        // Expect empty WifiP2pGroupList()
-        assertEquals(new WifiP2pGroupList().toString(), groups.toString());
-    }
-
-    /**
      * Verify that respond with RESPONSE_CONNECTION_INFO
      * when caller sends REQUEST_CONNECTION_INFO.
      */
@@ -4844,8 +3759,8 @@
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendDiscoverPeersMsg(mClientMessenger);
         verify(mWifiNative).p2pFind(anyInt());
-        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                eq("testPkg1"), eq("testFeature"), anyInt(), eq(true));
+        verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"),
+                anyInt(), eq(true));
 
         sendSimpleMsg(mClientMessenger, WifiP2pManager.REQUEST_DISCOVERY_STATE);
 
@@ -4898,7 +3813,6 @@
      */
     @Test
     public void testRemoveLocalServiceSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         verifyAddLocalService();
@@ -4927,7 +3841,6 @@
      */
     @Test
     public void testRemoveLocalServiceSuccessWithNullServiceInfo() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         verifyAddLocalService();
@@ -4975,7 +3888,6 @@
      */
     @Test
     public void testClearLocalServiceSuccess() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         verifyAddLocalService();
@@ -5083,7 +3995,7 @@
     public void testAddServiceRequestFailureWithNullRequest() throws Exception {
         forceP2pEnabled(mClient1);
 
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.ADD_SERVICE_REQUEST, null);
+        sendSimpleMsg(mClientMessenger, WifiP2pManager.ADD_SERVICE_REQUEST);
 
         assertTrue(mClientHandler.hasMessages(WifiP2pManager.ADD_SERVICE_REQUEST_FAILED));
     }
@@ -5161,7 +4073,6 @@
      */
     @Test
     public void testRemoveServiceRequestSuccessWithNullServiceInfo() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         verifyAddLocalService();
@@ -5258,19 +4169,14 @@
     }
 
     /**
-     * Verify when prior to Android T, stopping discovery is executed when location mode is
-     * turned off.
+     * Verify stopping discovery is executed when location mode is turned off.
      */
     @Test
     public void testStopDiscoveryWhenLocationModeIsDisabled() throws Exception {
         forceP2pEnabled(mClient1);
         simulateLocationModeChange(false);
         mLooper.dispatchAll();
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiNative, never()).p2pStopFind();
-        } else {
-            verify(mWifiNative).p2pStopFind();
-        }
+        verify(mWifiNative).p2pStopFind();
     }
 
     /**
@@ -5290,30 +4196,20 @@
      */
     @Test
     public void testSendConnectMsgWithTooShortNetworkName() throws Exception {
-        setTargetSdkGreaterThanT();
         mTestWifiP2pFastConnectionConfig.networkName = "DIRECT-x";
-        forceP2pEnabled(mClient1);
-        when(mWifiNative.p2pGroupAdd(any(), eq(true))).thenReturn(true);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
         sendConnectMsg(mClientMessenger, mTestWifiP2pFastConnectionConfig);
         verify(mClientHandler).sendMessage(mMessageCaptor.capture());
         Message message = mMessageCaptor.getValue();
         assertEquals(WifiP2pManager.CONNECT_FAILED, message.what);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        }
     }
 
-    private void verifyGroupOwnerIntentSelection(int netId, int freq, int expectedGoIntent)
-            throws Exception {
-        when(mWifiInfo.getNetworkId()).thenReturn(netId);
-        when(mWifiInfo.getFrequency()).thenReturn(freq);
+    /**
+     * Verify the group owner intent value is selected correctly when no STA connection.
+     */
+    @Test
+    public void testGroupOwnerIntentSelectionWithoutStaConnection() throws Exception {
+        when(mWifiInfo.getNetworkId()).thenReturn(WifiConfiguration.INVALID_NETWORK_ID);
+        when(mWifiInfo.getFrequency()).thenReturn(2412);
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
@@ -5329,100 +4225,17 @@
                 ArgumentCaptor.forClass(WifiP2pConfig.class);
         verify(mWifiNative).p2pConnect(configCaptor.capture(), anyBoolean());
         WifiP2pConfig config = configCaptor.getValue();
-        assertEquals(expectedGoIntent, config.groupOwnerIntent);
+        assertEquals(WifiP2pServiceImpl.DEFAULT_GROUP_OWNER_INTENT + 1,
+                config.groupOwnerIntent);
     }
 
     /**
-     * Verify the group owner intent value is selected correctly when no STA connection.
+     * Verify the group owner intent value is selected correctly when 2.4GHz STA connection.
      */
     @Test
-    public void testGroupOwnerIntentSelectionWithoutStaConnection() throws Exception {
-        verifyGroupOwnerIntentSelection(WifiConfiguration.INVALID_NETWORK_ID, 2412,
-                WifiP2pServiceImpl.DEFAULT_GROUP_OWNER_INTENT);
-    }
-
-    /**
-     * Verify the group owner intent value is selected correctly when 2.4GHz STA connection
-     * without 2.4GHz/5GHz DBS support.
-     */
-    @Test
-    public void testGroupOwnerIntentSelectionWith24GStaConnectionWithout24g5gDbs()
-            throws Exception {
-        verifyGroupOwnerIntentSelection(1, 2412, 5);
-    }
-
-    /**
-     * Verify the group owner intent value is selected correctly when 2.4GHz STA connection
-     * with 2.4GHz/5GHz DBS support.
-     */
-    @Test
-    public void testGroupOwnerIntentSelectionWith24GStaConnectionWith24g5gDbs() throws Exception {
-        when(mWifiNative.is24g5gDbsSupported()).thenReturn(true);
-        verifyGroupOwnerIntentSelection(1, 2412, 7);
-    }
-
-    /**
-     * Verify the group owner intent value is selected correctly when 5GHz STA connection
-     * without 2.4GHz/5GHz DBS and 5GHz/6GHz DBS support.
-     */
-    @Test
-    public void testGroupOwnerIntentSelectionWith5GHzStaConnectionWithout24g5gDbs5g6gDbs()
-            throws Exception {
-        verifyGroupOwnerIntentSelection(1, 5200, 10);
-    }
-
-    /**
-     * Verify the group owner intent value is selected correctly when 5GHz STA connection
-     * with 2.4GHz/5GHz DBS and without 5GHz/6GHz DBS support.
-     */
-    @Test
-    public void testGroupOwnerIntentSelectionWith5GHzStaConnectionWith24g5gDbsWithout5g6gDbs()
-            throws Exception {
-        when(mWifiNative.is24g5gDbsSupported()).thenReturn(true);
-        verifyGroupOwnerIntentSelection(1, 5200, 8);
-    }
-
-    /**
-     * Verify the group owner intent value is selected correctly when 5GHz STA connection
-     * with 2.4GHz/5GHz DBS and 5GHz/6GHz DBS support.
-     */
-    @Test
-    public void testGroupOwnerIntentSelectionWith5GHzStaConnectionWith24g5gDbs5g6gDbs()
-            throws Exception {
-        when(mWifiNative.is24g5gDbsSupported()).thenReturn(true);
-        when(mWifiNative.is5g6gDbsSupported()).thenReturn(true);
-        verifyGroupOwnerIntentSelection(1, 5200, 9);
-    }
-
-    /**
-     * Verify the group owner intent value is selected correctly when 6GHz STA connection
-     * without 5GHz/6GHz DBS support.
-     */
-    @Test
-    public void testGroupOwnerIntentSelectionWith6GHzStaConnectionWithout5g6gDbs()
-            throws Exception {
-        verifyGroupOwnerIntentSelection(1, 6000, 11);
-    }
-
-    /**
-     * Verify the group owner intent value is selected correctly when 6GHz STA connection
-     * with 5GHz/6GHz DBS support.
-     */
-    @Test
-    public void testGroupOwnerIntentSelectionWith6GHzStaConnectionWith5g6gDbs() throws Exception {
-        when(mWifiNative.is5g6gDbsSupported()).thenReturn(true);
-        verifyGroupOwnerIntentSelection(1, 6000, 12);
-    }
-
-    /**
-     * Verify that a P2P_PROV_DISC_SHOW_PIN_EVENT for config method DISPLAY triggers an invitation
-     * sent dialog with the correct PIN.
-     */
-    @Test
-    public void testProvisionDiscoveryShowPinEventLaunchesInvitationSentDialog() throws Exception {
-        when(mWifiInfo.getNetworkId()).thenReturn(WifiConfiguration.INVALID_NETWORK_ID);
+    public void testGroupOwnerIntentSelectionWith24GStaConnection() throws Exception {
+        when(mWifiInfo.getNetworkId()).thenReturn(1);
         when(mWifiInfo.getFrequency()).thenReturn(2412);
-        mTestWifiP2pPeerConfig.wps.setup = WpsInfo.DISPLAY;
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
@@ -5430,50 +4243,68 @@
 
         WifiP2pProvDiscEvent pdEvent = new WifiP2pProvDiscEvent();
         pdEvent.device = mTestWifiP2pDevice;
-        pdEvent.pin = "pin";
         sendSimpleMsg(null,
-                WifiP2pMonitor.P2P_PROV_DISC_SHOW_PIN_EVENT,
+                WifiP2pMonitor.P2P_PROV_DISC_PBC_RSP_EVENT,
                 pdEvent);
 
-        verify(mWifiNative).p2pConnect(any(), anyBoolean());
-        if (!SdkLevel.isAtLeastT()) {
-            verify(mAlertDialog).show();
-        } else {
-            verify(mWifiDialogManager).createP2pInvitationSentDialog(
-                    pdEvent.device.deviceName, pdEvent.pin, Display.DEFAULT_DISPLAY);
-            verify(mDialogHandle).launchDialog();
-        }
+        ArgumentCaptor<WifiP2pConfig> configCaptor =
+                ArgumentCaptor.forClass(WifiP2pConfig.class);
+        verify(mWifiNative).p2pConnect(configCaptor.capture(), anyBoolean());
+        WifiP2pConfig config = configCaptor.getValue();
+        assertEquals(WifiP2pConfig.GROUP_OWNER_INTENT_MIN,
+                config.groupOwnerIntent);
     }
 
     /**
-     * Verify that a P2P_PROV_DISC_SHOW_PIN_EVENT for config method DISPLAY triggers an invitation
-     * sent dialog with the correct PIN.
+     * Verify the group owner intent value is selected correctly when 5GHz STA connection.
      */
     @Test
-    public void testProvisionDiscoveryShowPinEventInactiveStateLaunchesInvitationReceivedDialog()
-            throws Exception {
-        when(mWifiInfo.getNetworkId()).thenReturn(WifiConfiguration.INVALID_NETWORK_ID);
-        when(mWifiInfo.getFrequency()).thenReturn(2412);
-        mTestWifiP2pPeerConfig.wps.setup = WpsInfo.DISPLAY;
+    public void testGroupOwnerIntentSelectionWith5GHzStaConnection() throws Exception {
+        when(mWifiInfo.getNetworkId()).thenReturn(1);
+        when(mWifiInfo.getFrequency()).thenReturn(5200);
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
-        sendDeviceFoundEventMsg(mTestWifiP2pDevice);
+        mockEnterProvisionDiscoveryState();
+
         WifiP2pProvDiscEvent pdEvent = new WifiP2pProvDiscEvent();
         pdEvent.device = mTestWifiP2pDevice;
-        pdEvent.pin = "pin";
         sendSimpleMsg(null,
-                WifiP2pMonitor.P2P_PROV_DISC_SHOW_PIN_EVENT,
+                WifiP2pMonitor.P2P_PROV_DISC_PBC_RSP_EVENT,
                 pdEvent);
 
-        if (!SdkLevel.isAtLeastT()) {
-            verify(mAlertDialog).show();
-        } else {
-            verify(mWifiDialogManager).createP2pInvitationReceivedDialog(
-                    eq(pdEvent.device.deviceName), eq(false), eq(pdEvent.pin),
-                    anyInt(), any(), any());
-            verify(mDialogHandle).launchDialog();
-        }
+        ArgumentCaptor<WifiP2pConfig> configCaptor =
+                ArgumentCaptor.forClass(WifiP2pConfig.class);
+        verify(mWifiNative).p2pConnect(configCaptor.capture(), anyBoolean());
+        WifiP2pConfig config = configCaptor.getValue();
+        assertEquals(WifiP2pConfig.GROUP_OWNER_INTENT_MAX - 1,
+                config.groupOwnerIntent);
+    }
+
+    /**
+     * Verify the group owner intent value is selected correctly when 6GHz STA connection.
+     */
+    @Test
+    public void testGroupOwnerIntentSelectionWith6GHzStaConnection() throws Exception {
+        when(mWifiInfo.getNetworkId()).thenReturn(1);
+        when(mWifiInfo.getFrequency()).thenReturn(6000);
+        forceP2pEnabled(mClient1);
+        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
+
+        mockEnterProvisionDiscoveryState();
+
+        WifiP2pProvDiscEvent pdEvent = new WifiP2pProvDiscEvent();
+        pdEvent.device = mTestWifiP2pDevice;
+        sendSimpleMsg(null,
+                WifiP2pMonitor.P2P_PROV_DISC_PBC_RSP_EVENT,
+                pdEvent);
+
+        ArgumentCaptor<WifiP2pConfig> configCaptor =
+                ArgumentCaptor.forClass(WifiP2pConfig.class);
+        verify(mWifiNative).p2pConnect(configCaptor.capture(), anyBoolean());
+        WifiP2pConfig config = configCaptor.getValue();
+        assertEquals(WifiP2pServiceImpl.DEFAULT_GROUP_OWNER_INTENT,
+                config.groupOwnerIntent);
     }
 
     private List<CoexUnsafeChannel> setupCoexMock(int restrictionBits) {
@@ -5645,28 +4476,19 @@
      */
     @Test
     public void testIdleTimeoutCancelledAfterLeavingInactiveState() throws Exception {
-        setTargetSdkGreaterThanT();
         forceP2pEnabled(mClient1);
         sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
 
         mockPeersList();
         sendConnectMsg(mClientMessenger, mTestWifiP2pPeerConfig);
-        if (SdkLevel.isAtLeastT()) {
-            verify(mWifiPermissionsUtil, atLeastOnce()).checkNearbyDevicesPermission(
-                    any(), eq(true), any());
-            verify(mWifiPermissionsUtil, never()).checkCanAccessWifiDirect(
-                    any(), any(), anyInt(), anyBoolean());
-        } else {
-            verify(mWifiPermissionsUtil).checkCanAccessWifiDirect(eq("testPkg1"),
-                    eq("testFeature"), anyInt(), eq(false));
-        }
+        verify(mWifiPermissionsUtil)
+                .checkCanAccessWifiDirect(eq("testPkg1"), eq("testFeature"), anyInt(), eq(false));
 
         ArgumentCaptor<WifiP2pConfig> configCaptor =
                 ArgumentCaptor.forClass(WifiP2pConfig.class);
         verify(mWifiP2pMetrics).startConnectionEvent(
                 eq(P2pConnectionEvent.CONNECTION_FRESH),
-                configCaptor.capture(),
-                eq(WifiMetricsProto.GroupEvent.GROUP_UNKNOWN));
+                configCaptor.capture());
         assertEquals(mTestWifiP2pPeerConfig.toString(), configCaptor.getValue().toString());
         // Verify timer is cannelled
         // Includes re-schedule 4 times:
@@ -5795,760 +4617,4 @@
         verify(mWifiNative).setWfdEnable(eq(true));
         verify(mWifiNative).setWfdDeviceInfo(eq(mTestThisDevice.wfdInfo.getDeviceInfoHex()));
     }
-
-    /**
-     * Verify the frequency changed event handling.
-     */
-    @Test
-    public void testP2pFrequencyChangedEventHandling() throws Exception {
-        // Move to group created state
-        forceP2pEnabled(mClient1);
-        WifiP2pGroup group = new WifiP2pGroup();
-        group.setNetworkId(WifiP2pGroup.NETWORK_ID_PERSISTENT);
-        group.setNetworkName("DIRECT-xy-NEW");
-        group.setOwner(new WifiP2pDevice("thisDeviceMac"));
-        group.setIsGroupOwner(true);
-        group.setInterface(IFACE_NAME_P2P);
-        sendGroupStartedMsg(group);
-        simulateTetherReady();
-
-        // Send Frequency changed event.
-        sendSimpleMsg(null,
-                WifiP2pMonitor.P2P_FREQUENCY_CHANGED_EVENT,
-                TEST_GROUP_FREQUENCY);
-
-        // send WifiP2pManager.REQUEST_GROUP_INFO and check the updated frequency.
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        sendRequestGroupInfoMsg(mClientMessenger);
-        verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        assertEquals(WifiP2pManager.RESPONSE_GROUP_INFO, mMessageCaptor.getValue().what);
-        WifiP2pGroup wifiP2pGroup = (WifiP2pGroup) mMessageCaptor.getValue().obj;
-        assertEquals(TEST_GROUP_FREQUENCY, wifiP2pGroup.getFrequency());
-    }
-
-    /*
-     * Verify the caller sends WifiP2pManager.REMOVE_CLIENT.
-     */
-    @Test
-    public void testRemoveClientSuccess() throws Exception {
-        when(mWifiNative.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_GROUP_CLIENT_REMOVAL);
-        mockEnterGroupCreatedState();
-
-        when(mWifiNative.removeClient(anyString())).thenReturn(true);
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.REMOVE_CLIENT, mTestWifiP2pPeerAddress);
-        verify(mWifiNative).removeClient(anyString());
-        verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        Message message = mMessageCaptor.getValue();
-        assertEquals(WifiP2pManager.REMOVE_CLIENT_SUCCEEDED, message.what);
-    }
-
-    /**
-     *  Verify WifiP2pManager.REMOVE_CLIENT_FAILED is returned when native call failure.
-     */
-    @Test
-    public void testRemoveClientFailureWhenNativeCallFailure() throws Exception {
-        when(mWifiNative.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_GROUP_CLIENT_REMOVAL);
-        mockEnterGroupCreatedState();
-
-        when(mWifiNative.removeClient(anyString())).thenReturn(false);
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.REMOVE_CLIENT, mTestWifiP2pPeerAddress);
-        verify(mWifiNative).removeClient(anyString());
-        verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        Message message = mMessageCaptor.getValue();
-        assertEquals(WifiP2pManager.REMOVE_CLIENT_FAILED, message.what);
-        assertEquals(WifiP2pManager.ERROR, message.arg1);
-    }
-
-    /**
-     *  Verify WifiP2pManager.REMOVE_CLIENT_SUCCEEDED is returned when p2p is creating group.
-     */
-    @Test
-    public void testRemoveClientSuccessWhenP2pCreatingGroup() throws Exception {
-        when(mWifiNative.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_GROUP_CLIENT_REMOVAL);
-        // Move to group creating state
-        testConnectWithConfigValidAsGroupSuccess();
-
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.REMOVE_CLIENT, mTestWifiP2pPeerAddress);
-        verify(mClientHandler, atLeastOnce()).sendMessage(mMessageCaptor.capture());
-        Message message = mMessageCaptor.getValue();
-        assertEquals(WifiP2pManager.REMOVE_CLIENT_SUCCEEDED, message.what);
-    }
-
-    /**
-     *  Verify WifiP2pManager.REMOVE_CLIENT_SUCCEEDED is returned when p2p is inactive.
-     */
-    @Test
-    public void testRemoveClientSuccessWhenP2pInactive() throws Exception {
-        when(mWifiNative.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_GROUP_CLIENT_REMOVAL);
-        // Move to inactive state
-        forceP2pEnabled(mClient1);
-
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.REMOVE_CLIENT, mTestWifiP2pPeerAddress);
-        verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        Message message = mMessageCaptor.getValue();
-        assertEquals(WifiP2pManager.REMOVE_CLIENT_SUCCEEDED, message.what);
-    }
-
-    /**
-     *  Verify WifiP2pManager.REMOVE_CLIENT_SUCCEEDED is returned when p2p is disabled.
-     */
-    @Test
-    public void testRemoveClientSuccessWhenP2pDisabled() throws Exception {
-        when(mWifiNative.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_GROUP_CLIENT_REMOVAL);
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.REMOVE_CLIENT, mTestWifiP2pPeerAddress);
-        verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        Message message = mMessageCaptor.getValue();
-        assertEquals(WifiP2pManager.REMOVE_CLIENT_SUCCEEDED, message.what);
-    }
-
-    /**
-     *  Verify WifiP2pManager.REMOVE_CLIENT_FAILED is returned when p2p is unsupported.
-     */
-    @Test
-    public void testRemoveClientFailureWhenP2pUnsupported() throws Exception {
-        setUpWifiP2pServiceImpl(false);
-        when(mWifiNative.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_GROUP_CLIENT_REMOVAL);
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.REMOVE_CLIENT, mTestWifiP2pPeerAddress);
-        verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        Message message = mMessageCaptor.getValue();
-        assertEquals(WifiP2pManager.REMOVE_CLIENT_FAILED, message.what);
-        assertEquals(WifiP2pManager.P2P_UNSUPPORTED, message.arg1);
-    }
-
-    /**
-     * Verify attribution is passed in correctly by WifiP2pManager#getMessenger.
-     */
-    @Test
-    public void testGetMessenger_InvalidAttributions() {
-        assumeTrue(SdkLevel.isAtLeastS());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.isTrusted(any(Context.class))).thenReturn(true);
-        mAttribution.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, attributionSource);
-        mWifiP2pServiceImpl = spy(mWifiP2pServiceImpl);
-        lenient().when(mWifiP2pServiceImpl.getMockableCallingUid()).thenReturn(Process.SYSTEM_UID);
-        assertThrows(SecurityException.class, () -> {
-            mWifiP2pServiceImpl.getMessenger(new Binder(), TEST_PACKAGE_NAME, null);
-        });
-
-        assertThrows(SecurityException.class, () -> {
-            mWifiP2pServiceImpl.getMessenger(new Binder(), TEST_PACKAGE_NAME, new Bundle());
-        });
-
-        assertThrows(SecurityException.class, () -> {
-            Bundle nullEntry = new Bundle();
-            nullEntry.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, null);
-            mWifiP2pServiceImpl.getMessenger(new Binder(), TEST_PACKAGE_NAME, nullEntry);
-        });
-
-        assertThrows(SecurityException.class, () -> {
-            Bundle incorrectEntry = new Bundle();
-            incorrectEntry.putInt(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, 10);
-            mWifiP2pServiceImpl.getMessenger(new Binder(), TEST_PACKAGE_NAME, incorrectEntry);
-        });
-
-        when(attributionSource.checkCallingUid()).thenReturn(false);
-        assertThrows(SecurityException.class, () -> {
-            mWifiP2pServiceImpl.getMessenger(new Binder(), TEST_PACKAGE_NAME, mAttribution);
-        });
-        when(attributionSource.checkCallingUid()).thenReturn(true); // restore
-
-        // single first attributions should not fail - even if (theoretically, doesn't happen in
-        // practice) are not trusted. I.e. this call checks that this method isn't called.
-        AttributionSource freshAs = mock(AttributionSource.class);
-        Bundle freshAttribution = new Bundle();
-        freshAttribution.putParcelable(EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, freshAs);
-        when(freshAs.checkCallingUid()).thenReturn(true);
-        when(freshAs.isTrusted(any(Context.class))).thenReturn(false);
-        mWifiP2pServiceImpl.getMessenger(new Binder(), TEST_PACKAGE_NAME, freshAttribution);
-        verify(freshAs, never()).isTrusted(any());
-
-        AttributionSource originalCaller = mock(AttributionSource.class);
-        when(originalCaller.getUid()).thenReturn(12345);
-        when(originalCaller.getPackageName()).thenReturn(TEST_PACKAGE_NAME + ".other");
-        when(originalCaller.isTrusted(any(Context.class))).thenReturn(false);
-        when(attributionSource.getNext()).thenReturn(originalCaller);
-        assertThrows(SecurityException.class, () -> {
-            mWifiP2pServiceImpl.getMessenger(new Binder(), TEST_PACKAGE_NAME, mAttribution);
-        });
-    }
-
-    /**
-     * Verify p2p connection dialog triggering without any Display ID information
-     */
-    @Test
-    public void testInvitationReceivedDialogTrigger() throws Exception {
-        forceP2pEnabled(mClient1);
-        mockPeersList();
-        WifiP2pConfig config = new WifiP2pConfig();
-        config.deviceAddress = mTestWifiP2pDevice.deviceAddress;
-        config.wps = new WpsInfo();
-        config.wps.setup = WpsInfo.PBC;
-
-        // "simple" client connect (no display ID)
-        sendNegotiationRequestEvent(config);
-        if (!SdkLevel.isAtLeastT()) {
-            verify(mAlertDialog).show();
-        } else {
-            verify(mWifiDialogManager).createP2pInvitationReceivedDialog(anyString(), anyBoolean(),
-                    any(), eq(Display.DEFAULT_DISPLAY), any(), any());
-            verify(mDialogHandle).launchDialog(P2P_INVITATION_RECEIVED_TIMEOUT_MS);
-        }
-    }
-
-    /**
-     * Verify p2p connection dialog triggering with a privileged caller specifying a display ID.
-     */
-    @Test
-    public void testInvitationReceivedDialogTriggerWithDisplayId() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        final int someNonDefaultDisplayId = 123;
-
-        forceP2pEnabled(mClient1);
-        mockPeersList();
-        WifiP2pConfig config = new WifiP2pConfig();
-        config.deviceAddress = mTestWifiP2pDevice.deviceAddress;
-        config.wps = new WpsInfo();
-        config.wps.setup = WpsInfo.PBC;
-
-        // add a privileged client with a display ID
-        Bundle bundle = new Bundle();
-        bundle.putInt(WifiP2pManager.EXTRA_PARAM_KEY_DISPLAY_ID, someNonDefaultDisplayId);
-        when(mWifiPermissionsUtil.isSystem(eq(TEST_PACKAGE_NAME), anyInt())).thenReturn(true);
-        mWifiP2pServiceImpl.getMessenger(mClient2, TEST_PACKAGE_NAME, bundle);
-
-        sendNegotiationRequestEvent(config);
-        verify(mWifiDialogManager).createP2pInvitationReceivedDialog(anyString(),
-                anyBoolean(), any(), eq(someNonDefaultDisplayId), any(), any());
-        verify(mDialogHandle).launchDialog(P2P_INVITATION_RECEIVED_TIMEOUT_MS);
-    }
-
-    /**
-     * Verify p2p connection dialog triggering with a privileged client adding a Display ID but then
-     * closing (i.e. removing itself).
-     */
-    @Test
-    public void testInvitationReceivedDialogTriggerWithDisplayIdDeleted() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        forceP2pEnabled(mClient1);
-        mockPeersList();
-        WifiP2pConfig config = new WifiP2pConfig();
-        config.deviceAddress = mTestWifiP2pDevice.deviceAddress;
-        config.wps = new WpsInfo();
-        config.wps.setup = WpsInfo.PBC;
-
-        // add a privileged client with a display ID
-        Bundle bundle = new Bundle();
-        bundle.putInt(WifiP2pManager.EXTRA_PARAM_KEY_DISPLAY_ID, 123);
-        when(mWifiPermissionsUtil.isSystem(eq(TEST_PACKAGE_NAME), anyInt())).thenReturn(true);
-        mWifiP2pServiceImpl.getMessenger(mClient2, TEST_PACKAGE_NAME, bundle);
-        mWifiP2pServiceImpl.close(mClient2);
-
-        // "simple" client connect (no display ID)
-        sendNegotiationRequestEvent(config);
-        verify(mWifiDialogManager).createP2pInvitationReceivedDialog(anyString(), anyBoolean(),
-                any(), eq(Display.DEFAULT_DISPLAY), any(), any());
-        verify(mDialogHandle).launchDialog(P2P_INVITATION_RECEIVED_TIMEOUT_MS);
-    }
-
-    private void verifySetVendorElement(boolean isP2pActivated, boolean shouldSucceed,
-            boolean hasPermission, boolean shouldSetToNative) throws Exception {
-
-        when(mWifiNative.getSupportedFeatures()).thenReturn(
-                WifiP2pManager.FEATURE_SET_VENDOR_ELEMENTS);
-        when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                .thenReturn(hasPermission);
-        when(mWifiPermissionsUtil.checkConfigOverridePermission(anyInt()))
-                .thenReturn(hasPermission);
-
-        simulateWifiStateChange(true);
-        simulateLocationModeChange(true);
-        checkIsP2pInitWhenClientConnected(isP2pActivated, mClient1,
-                new WorkSource(mClient1.getCallingUid(), TEST_PACKAGE_NAME));
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-
-        ArrayList<ScanResult.InformationElement> ies = new ArrayList<>();
-        ies.add(new ScanResult.InformationElement(
-                ScanResult.InformationElement.EID_VSA, 0,
-                        new byte[]{(byte) 0xa, (byte) 0xb}));
-        HashSet<ScanResult.InformationElement> expectedIes = new HashSet<>();
-        expectedIes.add(ies.get(0));
-
-        sendSetVendorElementsMsg(mClientMessenger, ies);
-
-        verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        Message message = mMessageCaptor.getValue();
-        if (shouldSucceed) {
-            assertEquals(WifiP2pManager.SET_VENDOR_ELEMENTS_SUCCEEDED, message.what);
-        } else {
-            assertEquals(WifiP2pManager.SET_VENDOR_ELEMENTS_FAILED, message.what);
-        }
-
-        // Launch a peer discovery to set cached VSIEs to the native service.
-        sendDiscoverPeersMsg(mClientMessenger);
-        if (shouldSetToNative) {
-            if (shouldSucceed) {
-                verify(mWifiNative).setVendorElements(eq(expectedIes));
-            } else {
-                // If failed to set vendor elements, there is no entry in the list.
-                verify(mWifiNative).setVendorElements(eq(
-                        new HashSet<ScanResult.InformationElement>()));
-            }
-        } else {
-            verify(mWifiNative, never()).setVendorElements(any());
-        }
-    }
-    /**
-     * Verify sunny scenario for setVendorElements when P2P is not in EnabledState.
-     */
-    @Test
-    public void testSetVendorElementsSuccessForIdleShutdown() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isP2pActivated = false, shouldSucceed = true;
-        boolean hasPermission = true, shouldSetToNative = true;
-        verifySetVendorElement(isP2pActivated, shouldSucceed,
-                hasPermission, shouldSetToNative);
-    }
-
-    /**
-     * Verify sunny scenario for setVendorElements when P2P is in EnabledState.
-     */
-    @Test
-    public void testSetVendorElementsSuccessForActiveP2p() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isP2pActivated = true, shouldSucceed = true;
-        boolean hasPermission = true, shouldSetToNative = true;
-        verifySetVendorElement(isP2pActivated, shouldSucceed,
-                hasPermission, shouldSetToNative);
-    }
-
-    /**
-     * Verify failure scenario for setVendorElements when no NEARBY permission.
-     */
-    @Test
-    public void testSetVendorElementsFailureWithoutNearbyPermission() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        boolean isP2pActivated = false, shouldSucceed = false;
-        boolean hasPermission = false, shouldSetToNative = true;
-        verifySetVendorElement(isP2pActivated, shouldSucceed,
-                hasPermission, shouldSetToNative);
-    }
-
-    private void verifyAddExternalApprover(boolean hasPermission,
-            boolean shouldSucceed) throws Exception {
-        verifyAddExternalApprover(new Binder(), hasPermission, shouldSucceed);
-    }
-
-    private void verifyAddExternalApprover(Binder binder, boolean hasPermission,
-            boolean shouldSucceed) throws Exception {
-        verifyAddExternalApprover(binder, hasPermission,
-                shouldSucceed,
-                MacAddress.fromString(mTestWifiP2pDevice.deviceAddress));
-    }
-
-    private void verifyAddExternalApprover(Binder binder, boolean hasPermission,
-            boolean shouldSucceed, MacAddress devAddr) throws Exception {
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(hasPermission);
-        when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                .thenReturn(hasPermission);
-
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        sendAddExternalApproverMsg(mClientMessenger, devAddr, binder);
-        verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        Message message = mMessageCaptor.getValue();
-        if (shouldSucceed) {
-            assertEquals(WifiP2pManager.EXTERNAL_APPROVER_ATTACH, message.what);
-        } else {
-            assertEquals(WifiP2pManager.EXTERNAL_APPROVER_DETACH, message.what);
-        }
-    }
-
-    /**
-     * Verify sunny scenario for addExternalApprover.
-     */
-    @Test
-    public void testAddExternalApproverSuccess() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        boolean hasPermission = true, shouldSucceed = true;
-        verifyAddExternalApprover(hasPermission, shouldSucceed);
-    }
-
-    /**
-     * Verify failure scenario for addExternalApprover when
-     * the caller has no proper permission.
-     */
-    @Test
-    public void testAddExternalApproverFailureWithoutPermission() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        boolean hasPermission = false, shouldSucceed = false;
-        verifyAddExternalApprover(hasPermission, shouldSucceed);
-    }
-
-    private void verifyRemoveExternalApprover(boolean hasPermission,
-            boolean shouldSucceed) throws Exception {
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(hasPermission);
-        when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                .thenReturn(hasPermission);
-        MacAddress devAddr = MacAddress.fromString(
-                mTestWifiP2pDevice.deviceAddress);
-        Binder binder = new Binder();
-
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        sendRemoveExternalApproverMsg(mClientMessenger, devAddr, binder);
-        verify(mClientHandler).sendMessage(mMessageCaptor.capture());
-        Message message = mMessageCaptor.getValue();
-        if (shouldSucceed) {
-            assertEquals(WifiP2pManager.REMOVE_EXTERNAL_APPROVER_SUCCEEDED, message.what);
-        } else {
-            assertEquals(WifiP2pManager.REMOVE_EXTERNAL_APPROVER_FAILED, message.what);
-        }
-    }
-
-
-    /**
-     * Verify sunny scenario for removeExternalApprover.
-     */
-    @Test
-    public void testRemoveExternalApproverSuccess() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        boolean hasPermission = true, shouldSucceed = true;
-        verifyRemoveExternalApprover(hasPermission, shouldSucceed);
-    }
-
-    /**
-     * Verify failure scenario for removeExternalApprover when
-     * the caller has no proper permission.
-     */
-    @Test
-    public void testRemoveExternalApproverFailureWithoutPermission() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        boolean hasPermission = false, shouldSucceed = false;
-        verifyRemoveExternalApprover(hasPermission, shouldSucceed);
-    }
-
-    private void verifySetConnectionRequestResult(MacAddress addr,
-            boolean hasApprover,
-            boolean hasPermission, boolean shouldSucceed,
-            int wpsType, int result) throws Exception {
-        Binder binder = new Binder();
-
-        forceP2pEnabled(mClient1);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        mockPeersList();
-
-        if (hasApprover) {
-            verifyAddExternalApprover(binder, true, true, addr);
-        }
-
-        mockEnterUserAuthorizingNegotiationRequestState(wpsType);
-
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(hasPermission);
-        when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                .thenReturn(hasPermission);
-        sendSetConnectionRequestResultMsg(mClientMessenger,
-                MacAddress.fromString(mTestWifiP2pDevice.deviceAddress),
-                result, binder);
-        if (shouldSucceed) {
-            // There are 4 replies:
-            // * EXTERNAL_APPROVER_ATTACH
-            // * EXTERNAL_APPROVER_CONNECTION_REQUESTED
-            // * EXTERNAL_APPROVER_DETACH
-            // * SET_CONNECTION_REQUEST_RESULT_SUCCEEDED
-            ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
-            verify(mClientHandler, times(4)).sendMessage(messageCaptor.capture());
-            List<Message> messages = messageCaptor.getAllValues();
-            assertEquals(WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_SUCCEEDED,
-                    messages.get(3).what);
-        } else {
-            int expectedMessageCount = hasApprover ? 3 : 1;
-            // There are 2 additional replies if having a approver.
-            // * (With an approver) EXTERNAL_APPROVER_ATTACH
-            // * (With an approver) EXTERNAL_APPROVER_CONNECTION_REQUESTED
-            // * SET_CONNECTION_REQUEST_RESULT_FAILED
-            ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
-            verify(mClientHandler, times(expectedMessageCount)).sendMessage(
-                    messageCaptor.capture());
-            List<Message> messages = messageCaptor.getAllValues();
-            assertEquals(WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_FAILED,
-                    messages.get(expectedMessageCount - 1).what);
-        }
-    }
-
-    /**
-     * Verify sunny scenario for setConnectionRequestResult.
-     */
-    @Test
-    public void testSetConnectionRequestResultSuccess() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        boolean hasApprover = true, hasPermission = true, shouldSucceed = true;
-        verifySetConnectionRequestResult(MacAddress.fromString(mTestWifiP2pDevice.deviceAddress),
-                hasApprover, hasPermission, shouldSucceed,
-                WpsInfo.PBC, WifiP2pManager.CONNECTION_REQUEST_ACCEPT);
-    }
-
-    /**
-     * Verify sunny scenario for setConnectionRequestResult with the wildcard address.
-     */
-    @Test
-    public void testSetConnectionRequestResultWithWildcardAddressSuccess() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        boolean hasApprover = true, hasPermission = true, shouldSucceed = true;
-        verifySetConnectionRequestResult(MacAddress.BROADCAST_ADDRESS,
-                hasApprover, hasPermission, shouldSucceed,
-                WpsInfo.PBC, WifiP2pManager.CONNECTION_REQUEST_ACCEPT);
-    }
-
-    private void verifyMultiApproverMatch(List<MacAddress> addresses, MacAddress expectedMatch)
-            throws Exception {
-        when(mWifiPermissionsUtil.checkManageWifiNetworkSelectionPermission(anyInt()))
-                .thenReturn(true);
-        when(mWifiPermissionsUtil.checkNearbyDevicesPermission(any(), anyBoolean(), any()))
-                .thenReturn(true);
-        Binder binder = new Binder();
-
-        forceP2pEnabled(mClient1);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        mockPeersList();
-
-        for (MacAddress addr: addresses) {
-            verifyAddExternalApprover(binder, true /* hasPermission */,
-                    true /* shouldSucceed */, addr);
-            reset(mClientHandler);
-        }
-
-        // Received a request from mTestWifiP2pDevice
-        mockEnterUserAuthorizingNegotiationRequestState(WpsInfo.PBC);
-
-        sendSetConnectionRequestResultMsg(mClientMessenger,
-                MacAddress.fromString(mTestWifiP2pDevice.deviceAddress),
-                WifiP2pManager.CONNECTION_REQUEST_ACCEPT, binder);
-        // There are 3 replies:
-        // * EXTERNAL_APPROVER_CONNECTION_REQUESTED
-        // * EXTERNAL_APPROVER_DETACH
-        // * SET_CONNECTION_REQUEST_RESULT_SUCCEEDED
-        ArgumentCaptor<Message> messageCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mClientHandler, times(3)).sendMessage(messageCaptor.capture());
-        List<Message> messages = messageCaptor.getAllValues();
-
-        assertEquals(WifiP2pManager.EXTERNAL_APPROVER_CONNECTION_REQUESTED,
-                messages.get(0).what);
-        Bundle requestBundle = (Bundle) messages.get(0).obj;
-        WifiP2pDevice requestDevice = requestBundle.getParcelable(
-                WifiP2pManager.EXTRA_PARAM_KEY_DEVICE);
-        assertEquals(mTestWifiP2pDevice.deviceAddress, requestDevice.deviceAddress);
-
-        assertEquals(WifiP2pManager.EXTERNAL_APPROVER_DETACH,
-                messages.get(1).what);
-        assertEquals(expectedMatch, (MacAddress) messages.get(1).obj);
-
-        assertEquals(WifiP2pManager.SET_CONNECTION_REQUEST_RESULT_SUCCEEDED,
-                messages.get(2).what);
-    }
-
-    /**
-     * Verify that a registered address could be matched correctly
-     * with additional wildcard address.
-     */
-    @Test
-    public void testDirectMatchWithWildcardAddress() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        List<MacAddress> addresses = new ArrayList<>();
-        addresses.add(MacAddress.fromString(mTestWifiP2pDevice.deviceAddress));
-        addresses.add(MacAddress.BROADCAST_ADDRESS);
-        verifyMultiApproverMatch(addresses,
-                MacAddress.fromString(mTestWifiP2pDevice.deviceAddress));
-    }
-
-    /**
-     * Verify that a unkonwn address could be matched against the wildcard address correctly
-     * with an address and the wildcard address.
-     */
-    @Test
-    public void testWildcardAddressMatch() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        List<MacAddress> addresses = new ArrayList<>();
-        addresses.add(MacAddress.fromString("00:02:00:00:00:00"));
-        addresses.add(MacAddress.BROADCAST_ADDRESS);
-        verifyMultiApproverMatch(addresses, MacAddress.BROADCAST_ADDRESS);
-    }
-
-    /**
-     * Verify the failure scenario for setConnectionRequestResult without permissions.
-     */
-    @Test
-    public void testSetConnectionRequestResultFailureWithoutPermission() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        boolean hasApprover = true, hasPermission = false, shouldSucceed = false;
-        verifySetConnectionRequestResult(MacAddress.fromString(mTestWifiP2pDevice.deviceAddress),
-                hasApprover, hasPermission, shouldSucceed,
-                WpsInfo.PBC, WifiP2pManager.CONNECTION_REQUEST_ACCEPT);
-    }
-
-    /**
-     * Verify the failure scenario for setConnectionRequestResult without a registered approver.
-     */
-    @Test
-    public void testSetConnectionRequestResultFailureWithoutApprover() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        boolean hasApprover = false, hasPermission = true, shouldSucceed = false;
-        verifySetConnectionRequestResult(MacAddress.fromString(mTestWifiP2pDevice.deviceAddress),
-                hasApprover, hasPermission, shouldSucceed,
-                WpsInfo.PBC, WifiP2pManager.CONNECTION_REQUEST_ACCEPT);
-    }
-
-    /**
-     * Verify that deferring pin to the framework works normally.
-     */
-    @Test
-    public void testSetConnectionRequestResultDeferPinToFramework() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        boolean hasApprover = true, hasPermission = true, shouldSucceed = true;
-        verifySetConnectionRequestResult(MacAddress.fromString(mTestWifiP2pDevice.deviceAddress),
-                hasApprover, hasPermission, shouldSucceed,
-                WpsInfo.KEYPAD, WifiP2pManager.CONNECTION_REQUEST_DEFER_SHOW_PIN_TO_SERVICE);
-    }
-
-    /**
-     * Validate p2p initialization when user approval is required.
-     */
-    public void runTestP2pWithUserApproval(boolean userAcceptsRequest) throws Exception {
-        ArgumentCaptor<State> mTargetStateCaptor = ArgumentCaptor.forClass(State.class);
-        ArgumentCaptor<WaitingState> mWaitingStateCaptor = ArgumentCaptor.forClass(
-                WaitingState.class);
-        InOrder inOrder = inOrder(mInterfaceConflictManager);
-
-        simulateWifiStateChange(true);
-        mWifiP2pServiceImpl.getMessenger(mClient1, TEST_PACKAGE_NAME, null);
-
-        // simulate user approval needed
-        when(mInterfaceConflictManager.manageInterfaceConflictForStateMachine(any(), any(), any(),
-                any(), any(), eq(HalDeviceManager.HDM_CREATE_IFACE_P2P), any())).thenAnswer(
-                new MockAnswerUtil.AnswerWithArguments() {
-                        public int answer(String tag, Message msg, StateMachine stateMachine,
-                                WaitingState waitingState, State targetState, int createIfaceType,
-                                WorkSource requestorWs) {
-                            stateMachine.deferMessage(msg);
-                            stateMachine.transitionTo(waitingState);
-                            return InterfaceConflictManager.ICM_SKIP_COMMAND_WAIT_FOR_USER;
-                        }
-                    });
-
-        sendSimpleMsg(mClientMessenger, WifiP2pManager.DISCOVER_PEERS);
-        mLooper.dispatchAll();
-        inOrder.verify(mInterfaceConflictManager).manageInterfaceConflictForStateMachine(any(),
-                any(), any(), mWaitingStateCaptor.capture(), mTargetStateCaptor.capture(),
-                eq(HalDeviceManager.HDM_CREATE_IFACE_P2P), any());
-
-        // simulate user approval triggered and granted
-        when(mInterfaceConflictManager.manageInterfaceConflictForStateMachine(any(), any(), any(),
-                any(), any(), eq(HalDeviceManager.HDM_CREATE_IFACE_P2P), any())).thenReturn(
-                userAcceptsRequest ? InterfaceConflictManager.ICM_EXECUTE_COMMAND
-                        : InterfaceConflictManager.ICM_ABORT_COMMAND);
-        mWaitingStateCaptor.getValue().sendTransitionStateCommand(mTargetStateCaptor.getValue());
-        mLooper.dispatchAll();
-
-        verify(mWifiNative, userAcceptsRequest ? times(1) : never()).setupInterface(any(), any(),
-                eq(new WorkSource(mClient1.getCallingUid(), TEST_PACKAGE_NAME)));
-    }
-
-    /**
-     * Validate p2p initialization when user approval is required and granted.
-     */
-    @Test
-    public void testP2pWithUserApprovalAccept() throws Exception {
-        runTestP2pWithUserApproval(true);
-    }
-
-    /**
-     * Validate p2p initialization when user approval is required and granted.
-     */
-    @Test
-    public void testP2pWithUserApprovalReject() throws Exception {
-        runTestP2pWithUserApproval(false);
-    }
-
-    /*
-     * Verify the connection event ends due to the provision discovery failure.
-     */
-    @Test
-    public void testProvDiscRejectEventForProvDisc() throws Exception {
-        forceP2pEnabled(mClient1);
-        when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-
-        mockEnterProvisionDiscoveryState();
-
-        WifiP2pProvDiscEvent pdEvent = new WifiP2pProvDiscEvent();
-        pdEvent.device = mTestWifiP2pDevice;
-        sendSimpleMsg(null,
-                WifiP2pMonitor.P2P_PROV_DISC_FAILURE_EVENT,
-                WifiP2pMonitor.PROV_DISC_STATUS_REJECTED,
-                pdEvent);
-        verify(mWifiNative).p2pCancelConnect();
-
-    }
-
-    /**
-     * Verify the p2p reject is sent on canceling a request.
-     */
-    @Test
-    public void testSendP2pRejectWhenCancelRequest() throws Exception {
-        forceP2pEnabled(mClient1);
-        when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-
-        mockEnterProvisionDiscoveryState();
-
-        WifiP2pProvDiscEvent pdEvent = new WifiP2pProvDiscEvent();
-        pdEvent.device = mTestWifiP2pDevice;
-        sendSimpleMsg(null, WifiP2pManager.CANCEL_CONNECT);
-        verify(mWifiNative).p2pReject(eq(mTestWifiP2pDevice.deviceAddress));
-    }
-
-    /**
-     *
-     */
-    @Test
-    public void testSendP2pRejectOnRejectRequest() throws Exception {
-        when(mWifiNative.p2pGroupAdd(anyBoolean())).thenReturn(true);
-        sendChannelInfoUpdateMsg("testPkg1", "testFeature", mClient1, mClientMessenger);
-        forceP2pEnabled(mClient1);
-
-        mockEnterUserAuthorizingNegotiationRequestState(WpsInfo.PBC);
-
-        sendSimpleMsg(null, WifiP2pServiceImpl.PEER_CONNECTION_USER_REJECT);
-        verify(mWifiNative).p2pReject(eq(mTestWifiP2pDevice.deviceAddress));
-    }
-
-    /**
-     * Verify the tethering request is sent with TETHER_PRIVILEGED permission.
-     */
-    @Test
-    public void testTetheringRequestWithTetherPrivilegedPermission() throws Exception {
-        mockEnterGroupCreatedState();
-
-        String[] permission_gold = new String[] {
-                android.Manifest.permission.TETHER_PRIVILEGED};
-        ArgumentCaptor<String []> permissionCaptor = ArgumentCaptor.forClass(String[].class);
-        // 2 connection changed event:
-        // * Enter Enabled state
-        // * Tethering request.
-        verify(mContext, times(2)).sendBroadcastWithMultiplePermissions(
-                argThat(new WifiP2pServiceImplTest
-                       .P2pConnectionChangedIntentMatcherForNetworkState(IDLE)),
-                permissionCaptor.capture());
-        String[] permission = permissionCaptor.getAllValues().get(1);
-        Arrays.sort(permission);
-        Arrays.sort(permission_gold);
-        assertEquals(permission_gold, permission);
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pShellCommandTest.java b/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pShellCommandTest.java
deleted file mode 100644
index 339d0d9..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/p2p/WifiP2pShellCommandTest.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * Copyright (C) 2022 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.server.wifi.p2p;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assume.assumeTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.validateMockitoUsage;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.content.Context;
-import android.net.MacAddress;
-import android.net.wifi.p2p.WifiP2pConfig;
-import android.net.wifi.p2p.WifiP2pGroup;
-import android.net.wifi.p2p.WifiP2pManager;
-import android.os.Binder;
-import android.os.Message;
-import android.os.Messenger;
-import android.os.Process;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.internal.util.Protocol;
-import com.android.modules.utils.build.SdkLevel;
-import com.android.server.wifi.BinderUtil;
-import com.android.server.wifi.WifiBaseTest;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.io.FileDescriptor;
-
-/**
- * Unit tests for {@link com.android.server.wifi.p2p.WifiP2pShellCommand}.
- */
-@SmallTest
-public class WifiP2pShellCommandTest extends WifiBaseTest {
-    private static final String TEST_PACKAGE = "com.android.test";
-
-    @Mock Context mContext;
-    @Mock WifiP2pManager mWifiP2pManager;
-    @Mock WifiP2pManager.Channel mWifiP2pChannel;
-
-    WifiP2pShellCommand mShellCommand;
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-
-        when(mContext.getSystemService(WifiP2pManager.class)).thenReturn(mWifiP2pManager);
-        when(mWifiP2pManager.initialize(any(), any(), any())).thenReturn(mWifiP2pChannel);
-        mShellCommand = new WifiP2pShellCommand(mContext);
-
-        // by default emulate shell uid.
-        BinderUtil.setUid(Process.SHELL_UID);
-    }
-
-    @After
-    public void tearDown() throws Exception {
-        validateMockitoUsage();
-        // P2p channel is persist in the service, close it.
-        runP2pCommandAsRoot(new String[] {"deinit"});
-    }
-
-    private void runP2pCommandAsRoot(String... cmds) {
-        BinderUtil.setUid(Process.ROOT_UID);
-        mShellCommand.exec(
-                new Binder(), new FileDescriptor(), new FileDescriptor(), new FileDescriptor(),
-                cmds);
-    }
-
-    @Test
-    public void testP2pInitAndDeinit() {
-        runP2pCommandAsRoot(new String[] {"init"});
-        verify(mWifiP2pManager).initialize(eq(mContext), any(), any());
-        runP2pCommandAsRoot(new String[] {"deinit"});
-        verify(mWifiP2pChannel).close();
-    }
-
-    @Test
-    public void testP2pDeinitWithNoInit() {
-        runP2pCommandAsRoot("deinit");
-        verify(mWifiP2pChannel, never()).close();
-    }
-
-    @Test
-    public void testP2pPeerDiscovery() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("start-peer-discovery");
-        verify(mWifiP2pManager).discoverPeers(eq(mWifiP2pChannel), any());
-        runP2pCommandAsRoot("stop-peer-discovery");
-        verify(mWifiP2pManager).stopPeerDiscovery(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pPeerDiscoveryOnSocialChannels() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("start-peer-discovery-on-social-channels");
-        verify(mWifiP2pManager).discoverPeersOnSocialChannels(eq(mWifiP2pChannel), any());
-        runP2pCommandAsRoot("stop-peer-discovery");
-        verify(mWifiP2pManager).stopPeerDiscovery(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pPeerDiscoveryOnSpecificFrequencyWithPositiveFrequency() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        final int frequencyMhz = 2412;
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot(
-                "start-peer-discovery-on-specific-frequency", Integer.toString(frequencyMhz));
-        verify(mWifiP2pManager).discoverPeersOnSpecificFrequency(
-                eq(mWifiP2pChannel), eq(frequencyMhz), any());
-        runP2pCommandAsRoot("stop-peer-discovery");
-        verify(mWifiP2pManager).stopPeerDiscovery(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pPeerDiscoveryOnSpecificFrequencyWithNonePositiveFrequency() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        final int frequencyMhz = 0;
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot(
-                "start-peer-discovery-on-specific-frequency", Integer.toString(frequencyMhz));
-        verify(mWifiP2pManager, never()).discoverPeersOnSpecificFrequency(
-                eq(mWifiP2pChannel), eq(frequencyMhz), any());
-    }
-
-    @Test
-    public void testP2pPeerDiscoveryOnSpecificFrequencyWithUnformattedFrequency() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        final String frequencyMhz = "abcd";
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot(
-                "start-peer-discovery-on-specific-frequency", frequencyMhz);
-        verify(mWifiP2pManager, never()).discoverPeersOnSpecificFrequency(
-                eq(mWifiP2pChannel), anyInt(), any());
-    }
-
-    @Test
-    public void testP2pServiceDiscovery() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("start-service-discovery");
-        verify(mWifiP2pManager).discoverServices(eq(mWifiP2pChannel), any());
-        runP2pCommandAsRoot("stop-service-discovery");
-        verify(mWifiP2pManager).stopPeerDiscovery(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pListPeers() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("list-peers");
-        verify(mWifiP2pManager).requestPeers(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pRemoveClientWithValidMacAddress() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        final String peerAddress = "aa:bb:cc:11:22:33";
-        final MacAddress peerMacAddress = MacAddress.fromString(peerAddress);
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("remove-client", peerAddress);
-        verify(mWifiP2pManager).removeClient(eq(mWifiP2pChannel), eq(peerMacAddress), any());
-    }
-
-    @Test
-    public void testP2pRemoveClientWithInalidMacAddress() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        final String peerAddress = "aa33";
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("remove-client", peerAddress);
-        verify(mWifiP2pManager, never()).removeClient(eq(mWifiP2pChannel), any(), any());
-    }
-
-    @Test
-    public void testP2pCancelConnect() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("cancel-connect");
-        verify(mWifiP2pManager).cancelConnect(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pCreateAndRemoveGroup() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("create-group");
-        verify(mWifiP2pManager).createGroup(eq(mWifiP2pChannel), any());
-        runP2pCommandAsRoot("remove-group");
-        verify(mWifiP2pManager).removeGroup(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pSetDeviceName() {
-        final String deviceName = "testName";
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("set-device-name", deviceName);
-        verify(mWifiP2pManager).setDeviceName(eq(mWifiP2pChannel), eq(deviceName), any());
-    }
-
-    @Test
-    public void testP2pGetConnectionInfo() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("get-connection-info");
-        verify(mWifiP2pManager).requestConnectionInfo(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pGetGroupInfo() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("get-group-info");
-        verify(mWifiP2pManager).requestGroupInfo(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pGetP2pState() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("get-state");
-        verify(mWifiP2pManager).requestP2pState(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pGetDiscoveryState() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("get-discovery-state");
-        verify(mWifiP2pManager).requestDiscoveryState(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pGetNetworkInfo() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("get-network-info");
-        verify(mWifiP2pManager).requestNetworkInfo(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pGetDeviceInfo() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("get-device-info");
-        verify(mWifiP2pManager).requestDeviceInfo(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pListSavedGroup() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("list-saved-groups");
-        verify(mWifiP2pManager).requestPersistentGroupInfo(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pDeleteSavedGroup() {
-        final int netId = 99;
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("delete-saved-group", Integer.toString(netId));
-        verify(mWifiP2pManager).deletePersistentGroup(eq(mWifiP2pChannel), eq(netId), any());
-    }
-
-    @Test
-    public void testP2pSetChannels() {
-        final int listeningChannel = 6, operatingChannel = 149;
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("set-channels", Integer.toString(listeningChannel),
-                Integer.toString(operatingChannel));
-        verify(mWifiP2pManager).setWifiP2pChannels(eq(mWifiP2pChannel),
-                eq(listeningChannel), eq(operatingChannel), any());
-    }
-
-    @Test
-    public void testP2pListening() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("start-listening");
-        verify(mWifiP2pManager).startListening(eq(mWifiP2pChannel), any());
-        runP2pCommandAsRoot("stop-listening");
-        verify(mWifiP2pManager).stopListening(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pSetMiracastMode() {
-        final int mode = WifiP2pManager.MIRACAST_SOURCE;
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("set-miracast-mode", Integer.toString(mode));
-        verify(mWifiP2pManager).setMiracastMode(eq(mode));
-    }
-
-    @Test
-    public void testP2pFactoryReset() {
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("factory-reset");
-        verify(mWifiP2pManager).factoryReset(eq(mWifiP2pChannel), any());
-    }
-
-    @Test
-    public void testP2pConnect() {
-        String deviceAddress = "aa:bb:cc:11:22:33";
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("connect", deviceAddress);
-        ArgumentCaptor<WifiP2pConfig> captor = ArgumentCaptor.forClass(WifiP2pConfig.class);
-        verify(mWifiP2pManager).connect(eq(mWifiP2pChannel), captor.capture(), any());
-        WifiP2pConfig config = captor.getValue();
-        assertEquals(deviceAddress, config.deviceAddress);
-    }
-
-    @Test
-    public void testP2pAcceptConnection() throws Exception {
-        Messenger messenger = mock(Messenger.class);
-        when(mWifiP2pManager.getP2pStateMachineMessenger()).thenReturn(messenger);
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("accept-connection");
-        verify(mWifiP2pManager).getP2pStateMachineMessenger();
-
-        ArgumentCaptor<Message> captor = ArgumentCaptor.forClass(Message.class);
-        verify(messenger).send(captor.capture());
-        Message m = captor.getValue();
-        assertEquals(Protocol.BASE_WIFI_P2P_SERVICE + 2, m.what);
-    }
-
-    @Test
-    public void testP2pRejectConnection() throws Exception {
-        Messenger messenger = mock(Messenger.class);
-        when(mWifiP2pManager.getP2pStateMachineMessenger()).thenReturn(messenger);
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("reject-connection");
-        verify(mWifiP2pManager).getP2pStateMachineMessenger();
-
-        ArgumentCaptor<Message> captor = ArgumentCaptor.forClass(Message.class);
-        verify(messenger).send(captor.capture());
-        Message m = captor.getValue();
-        assertEquals(Protocol.BASE_WIFI_P2P_SERVICE + 3, m.what);
-    }
-
-    @Test
-    public void testP2pCreateGroupWithConfig() {
-        final String networkName = "DIRECT-xy-Hello";
-        final String passphrase = "password";
-        final int operatingBand = WifiP2pConfig.GROUP_OWNER_BAND_5GHZ;
-        final boolean isPersistentMode = true;
-        final int netId = isPersistentMode
-                ? WifiP2pGroup.NETWORK_ID_PERSISTENT
-                : WifiP2pGroup.NETWORK_ID_TEMPORARY;
-
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("create-group-with-config",
-                networkName, passphrase, Integer.toString(operatingBand),
-                isPersistentMode ? "true" : "false");
-        ArgumentCaptor<WifiP2pConfig> captor = ArgumentCaptor.forClass(WifiP2pConfig.class);
-        verify(mWifiP2pManager).createGroup(eq(mWifiP2pChannel), captor.capture(), any());
-        WifiP2pConfig c = captor.getValue();
-        assertEquals(networkName, c.getNetworkName());
-        assertEquals(passphrase, c.getPassphrase());
-        assertEquals(operatingBand, c.getGroupOwnerBand());
-        assertEquals(netId, c.getNetworkId());
-    }
-
-    @Test
-    public void testP2pConnectWithConfig() {
-        final String networkName = "DIRECT-xy-Hello";
-        final String passphrase = "password";
-        final int operatingBand = WifiP2pConfig.GROUP_OWNER_BAND_5GHZ;
-        final boolean isPersistentMode = true;
-        final int netId = isPersistentMode
-                ? WifiP2pGroup.NETWORK_ID_PERSISTENT
-                : WifiP2pGroup.NETWORK_ID_TEMPORARY;
-
-        runP2pCommandAsRoot("init");
-        runP2pCommandAsRoot("connect-with-config",
-                networkName, passphrase, Integer.toString(operatingBand),
-                isPersistentMode ? "true" : "false");
-        ArgumentCaptor<WifiP2pConfig> captor = ArgumentCaptor.forClass(WifiP2pConfig.class);
-        verify(mWifiP2pManager).connect(eq(mWifiP2pChannel), captor.capture(), any());
-        WifiP2pConfig c = captor.getValue();
-        assertEquals(networkName, c.getNetworkName());
-        assertEquals(passphrase, c.getPassphrase());
-        assertEquals(operatingBand, c.getGroupOwnerBand());
-        assertEquals(netId, c.getNetworkId());
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/rtt/RttNativeTest.java b/service/tests/wifitests/src/com/android/server/wifi/rtt/RttNativeTest.java
index 1df713a..edf82c2 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/rtt/RttNativeTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/rtt/RttNativeTest.java
@@ -123,7 +123,7 @@
         // will override capabilities (just call cb again) for specific tests
         mGetCapCbCatpr.getValue().onValues(mStatusSuccess, getFullRttCapabilities());
         // This is for the castFrom() call
-        verify(mockRttController, times(2)).asBinder();
+        verify(mockRttController).asBinder();
         assertTrue(mDut.isReady());
     }
 
@@ -316,7 +316,7 @@
         verify(mockRttServiceImpl, times(2)).enableIfPossible();
         verify(mockRttController, times(2)).getCapabilities(mGetCapCbCatpr.capture());
         // This is for the castFrom() calls
-        verify(mockRttController, times(4)).asBinder();
+        verify(mockRttController, times(2)).asBinder();
         assertTrue(mDut.isReady());
 
         verifyNoMoreInteractions(mockRttServiceImpl, mockRttController);
diff --git a/service/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java
index 517f92c..09522a6 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/rtt/RttServiceImplTest.java
@@ -25,7 +25,6 @@
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyInt;
@@ -35,7 +34,6 @@
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.inOrder;
 import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
@@ -52,9 +50,7 @@
 import android.content.pm.PackageManager;
 import android.location.LocationManager;
 import android.net.MacAddress;
-import android.net.wifi.WifiManager;
 import android.net.wifi.aware.IWifiAwareMacAddressProvider;
-import android.net.wifi.aware.MacAddrMapping;
 import android.net.wifi.aware.PeerHandle;
 import android.net.wifi.aware.WifiAwareManager;
 import android.net.wifi.rtt.IRttCallback;
@@ -63,7 +59,6 @@
 import android.net.wifi.rtt.RangingResultCallback;
 import android.net.wifi.rtt.ResponderConfig;
 import android.net.wifi.rtt.WifiRttManager;
-import android.os.Bundle;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.IPowerManager;
@@ -77,7 +72,6 @@
 
 import androidx.test.filters.SmallTest;
 
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.Clock;
 import com.android.server.wifi.MockResources;
 import com.android.server.wifi.WifiBaseTest;
@@ -95,8 +89,10 @@
 import org.mockito.MockitoAnnotations;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 
@@ -133,7 +129,6 @@
     private BinderUnlinkToDeathAnswer mBinderUnlinkToDeathCounter = new BinderUnlinkToDeathAnswer();
 
     private InOrder mInOrder;
-    private Bundle mExtras;
 
     @Mock
     public Context mockContext;
@@ -193,7 +188,6 @@
         mDut = new RttServiceImplSpy(mockContext);
         mDut.fakeUid = mDefaultUid;
         mMockLooper = new TestLooper();
-        mExtras = new Bundle();
 
         when(mockContext.checkCallingOrSelfPermission(
                 android.Manifest.permission.LOCATION_HARDWARE)).thenReturn(
@@ -278,7 +272,7 @@
         // (1) request 10 ranging operations
         for (int i = 0; i < numIter; ++i) {
             mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, requests[i],
-                    mockCallback, mExtras);
+                    mockCallback);
         }
         mMockLooper.dispatchAll();
 
@@ -320,10 +314,6 @@
      */
     @Test
     public void testRangingFlowUsingAwarePeerHandles() throws Exception {
-        if (SdkLevel.isAtLeastT()) {
-            when(mockPermissionUtil.checkNearbyDevicesPermission(any(), eq(true), any()))
-                    .thenReturn(true);
-        }
         RangingRequest request = RttTestUtils.getDummyRangingRequest((byte) 0xA);
         PeerHandle peerHandle1 = new PeerHandle(1022);
         PeerHandle peerHandle2 = new PeerHandle(1023);
@@ -331,27 +321,22 @@
         request.mRttPeers.add(ResponderConfig.fromWifiAwarePeerHandleWithDefaults(peerHandle1));
         request.mRttPeers.add(ResponderConfig.fromWifiAwarePeerHandleWithDefaults(peerHandle2));
         request.mRttPeers.add(ResponderConfig.fromWifiAwarePeerHandleWithDefaults(peerHandle3));
-        MacAddrMapping peerMapping1 = new MacAddrMapping();
-        MacAddrMapping peerMapping2 = new MacAddrMapping();
-        MacAddrMapping peerMapping3 = new MacAddrMapping();
-        peerMapping1.peerId = peerHandle1.peerId;
-        peerMapping2.peerId = peerHandle2.peerId;
-        peerMapping3.peerId = peerHandle3.peerId;
-        peerMapping1.macAddress = MacAddress.fromString("AA:BB:CC:DD:EE:FF").toByteArray();
-        peerMapping2.macAddress = MacAddress.fromString("BB:BB:BB:EE:EE:EE").toByteArray();
-        peerMapping3.macAddress = null; // bad answer from Aware (expired?)
-        MacAddrMapping[] peerHandleToMacList = {peerMapping1, peerMapping2, peerMapping3};
+        Map<Integer, MacAddress> peerHandleToMacMap = new HashMap<>();
+        MacAddress macAwarePeer1 = MacAddress.fromString("AA:BB:CC:DD:EE:FF");
+        MacAddress macAwarePeer2 = MacAddress.fromString("BB:BB:BB:EE:EE:EE");
+        peerHandleToMacMap.put(peerHandle1.peerId, macAwarePeer1);
+        peerHandleToMacMap.put(peerHandle2.peerId, macAwarePeer2);
+        peerHandleToMacMap.put(peerHandle3.peerId, null); // bad answer from Aware (expired?)
 
         AwareTranslatePeerHandlesToMac answer = new AwareTranslatePeerHandlesToMac(mDefaultUid,
-                peerHandleToMacList);
+                peerHandleToMacMap);
         doAnswer(answer).when(mockAwareManager).requestMacAddresses(anyInt(), any(), any());
 
         // issue request
         ClockAnswer clock = new ClockAnswer();
         doAnswer(clock).when(mockClock).getWallClockMillis();
         clock.time = 100;
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request, mockCallback);
         mMockLooper.dispatchAll();
 
         // verify that requested with MAC address translated from the PeerHandle issued to Native
@@ -362,9 +347,9 @@
         assertNotEquals("Request to native is not null", null, finalRequest);
         assertEquals("Size of request", request.mRttPeers.size() - 1,
                 finalRequest.mRttPeers.size());
-        assertEquals("Aware peer 1 MAC", MacAddress.fromBytes(peerMapping1.macAddress),
+        assertEquals("Aware peer 1 MAC", macAwarePeer1,
                 finalRequest.mRttPeers.get(finalRequest.mRttPeers.size() - 2).macAddress);
-        assertEquals("Aware peer 2 MAC", MacAddress.fromBytes(peerMapping2.macAddress),
+        assertEquals("Aware peer 2 MAC", macAwarePeer2,
                 finalRequest.mRttPeers.get(finalRequest.mRttPeers.size() - 1).macAddress);
 
         // issue results - but remove the one for peer #2
@@ -396,52 +381,6 @@
         verify(mockNative, atLeastOnce()).isReady();
         verifyNoMoreInteractions(mockNative, mockMetrics, mockCallback,
                 mAlarmManager.getAlarmManager());
-        if (SdkLevel.isAtLeastT()) {
-            // Nearby permission should never be checked here since the request contains APs others
-            // than Aware APs.
-            verify(mockPermissionUtil, never()).checkNearbyDevicesPermission(any(), anyBoolean(),
-                    any());
-        }
-    }
-
-    /**
-     * Verifity that for ranging request to only aware APs, nearby devices permission can be used
-     * to bypass location check.
-     * @throws Exception
-     */
-    @Test
-    public void testRangingOnlyAwareAps() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        mExtras.putParcelable(WifiManager.EXTRA_PARAM_KEY_ATTRIBUTION_SOURCE, null);
-        when(mockPermissionUtil.checkNearbyDevicesPermission(any(), eq(true), any()))
-                .thenReturn(true);
-        RangingRequest request = new RangingRequest.Builder()
-                .addWifiAwarePeer(MacAddress.fromString("08:09:08:07:06:01"))
-                .addWifiAwarePeer(MacAddress.fromString("08:09:08:07:06:02")).build();
-
-        // issue request
-        ClockAnswer clock = new ClockAnswer();
-        doAnswer(clock).when(mockClock).getWallClockMillis();
-        clock.time = 100;
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request,
-                mockCallback, mExtras);
-        mMockLooper.dispatchAll();
-
-        // verify that requested with MAC address translated from the PeerHandle issued to Native
-        verify(mockNative).rangeRequest(mIntCaptor.capture(), mRequestCaptor.capture(), eq(true));
-        verifyWakeupSet(true, 0);
-
-        // issue results
-        Pair<List<RangingResult>, List<RangingResult>> results =
-                RttTestUtils.getDummyRangingResults(mRequestCaptor.getValue());
-        clock.time += MEASUREMENT_DURATION;
-        mDut.onRangingResults(mIntCaptor.getValue(), results.first);
-        mMockLooper.dispatchAll();
-
-        // Verify permission checks. Post T Aware ranging can be done with nearby permission.
-        verify(mockPermissionUtil, times(2)).checkNearbyDevicesPermission(
-                any(), eq(true), any());
-        verify(mockPermissionUtil, never()).enforceFineLocationPermission(any(), any(), anyInt());
     }
 
     /**
@@ -461,15 +400,14 @@
         // (1) request 10 ranging operations: fail the first one
         when(mockNative.rangeRequest(anyInt(), any(RangingRequest.class), anyBoolean())).thenReturn(
                 false);
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, requests[0],
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, requests[0], mockCallback);
         mMockLooper.dispatchAll();
 
         when(mockNative.rangeRequest(anyInt(), any(RangingRequest.class), anyBoolean())).thenReturn(
                 true);
         for (int i = 1; i < numIter; ++i) {
             mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, requests[i],
-                    mockCallback, mExtras);
+                    mockCallback);
         }
         mMockLooper.dispatchAll();
 
@@ -522,8 +460,7 @@
                 RttTestUtils.getDummyRangingResults(request);
 
         // (1) request ranging operation
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request, mockCallback);
         mMockLooper.dispatchAll();
 
         // (2) verify that request issued to native
@@ -569,7 +506,7 @@
         for (int i = 0; i < numIter; ++i) {
             mDut.fakeUid = mDefaultUid + i % 2;
             mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, requests[i],
-                    mockCallback, mExtras);
+                    mockCallback);
         }
         mMockLooper.dispatchAll();
 
@@ -645,8 +582,7 @@
                 RttTestUtils.getDummyRangingResults(request);
 
         // (1) request ranging operation
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, ws, request, mockCallback,
-                mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, ws, request, mockCallback);
         mMockLooper.dispatchAll();
 
         verify(mockIbinder).linkToDeath(mDeathRecipientCaptor.capture(), anyInt());
@@ -697,7 +633,7 @@
 
         // (1) request ranging operation
         mDut.startRanging(mockIbinder, mPackageName, mFeatureId, worksourceRequest, request,
-                mockCallback, mExtras);
+                mockCallback);
         mMockLooper.dispatchAll();
 
         // verify metrics
@@ -744,7 +680,7 @@
 
         // (1) request ranging operation
         mDut.startRanging(mockIbinder, mPackageName, mFeatureId, worksourceRequest, request,
-                mockCallback, mExtras);
+                mockCallback);
         mMockLooper.dispatchAll();
 
         // verify metrics
@@ -784,8 +720,7 @@
                 RttTestUtils.getDummyRangingResults(request);
 
         // (1) request ranging operation
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request, mockCallback);
         mMockLooper.dispatchAll();
 
         // (2) verify that request issued to native
@@ -836,8 +771,7 @@
                         null, null, null, 0, false));
 
         // (1) request ranging operation
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request, mockCallback);
         mMockLooper.dispatchAll();
 
         // (2) verify that request issued to native
@@ -880,8 +814,7 @@
         }
 
         // (1) request ranging operation
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request, mockCallback);
         mMockLooper.dispatchAll();
 
         // (2) verify that request issued to native
@@ -921,10 +854,8 @@
                 RttTestUtils.getDummyRangingResults(request2);
 
         // (1) request 2 ranging operation
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request1,
-                mockCallback, mExtras);
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request2,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request1, mockCallback);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request2, mockCallback);
         mMockLooper.dispatchAll();
 
         // verify that request 1 issued to native
@@ -995,8 +926,7 @@
 
         // (1) issue a request at time t1: should be dispatched since first one!
         clock.time = 100;
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request1,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request1, mockCallback);
         mMockLooper.dispatchAll();
 
         verify(mockNative).rangeRequest(mIntCaptor.capture(), eq(request1), eq(true));
@@ -1011,16 +941,14 @@
 
         // (2) issue a request at time t2 = t1 + 0.5 gap: should be rejected (throttled)
         clock.time = 100 + BACKGROUND_PROCESS_EXEC_GAP_MS / 2;
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request2,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request2, mockCallback);
         mMockLooper.dispatchAll();
 
         cbInorder.verify(mockCallback).onRangingFailure(RangingResultCallback.STATUS_CODE_FAIL);
 
         // (3) issue a request at time t3 = t1 + 1.1 gap: should be dispatched since enough time
         clock.time = 100 + BACKGROUND_PROCESS_EXEC_GAP_MS * 11 / 10;
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request3,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request3, mockCallback);
         mMockLooper.dispatchAll();
 
         verify(mockNative).rangeRequest(mIntCaptor.capture(), eq(request3), eq(true));
@@ -1038,8 +966,7 @@
                 ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND);
 
         clock.time = clock.time + 5;
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request4,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request4, mockCallback);
         mMockLooper.dispatchAll();
 
         verify(mockNative).rangeRequest(mIntCaptor.capture(), eq(request4), eq(true));
@@ -1057,8 +984,7 @@
                 ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE);
 
         clock.time = clock.time + 5;
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request5,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request5, mockCallback);
         mMockLooper.dispatchAll();
 
         cbInorder.verify(mockCallback).onRangingFailure(RangingResultCallback.STATUS_CODE_FAIL);
@@ -1131,8 +1057,7 @@
 
         // (1) issue a request at time t1 for {10}: should be dispatched since first one!
         clock.time = 100;
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, wsReq1, request1,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, wsReq1, request1, mockCallback);
         mMockLooper.dispatchAll();
 
         verify(mockNative).rangeRequest(mIntCaptor.capture(), eq(request1), eq(true));
@@ -1148,8 +1073,7 @@
         // (2) issue a request at time t2 = t1 + 0.5 gap for {10,20}: should be dispatched since
         //     uid=20 should not be throttled
         clock.time = 100 + BACKGROUND_PROCESS_EXEC_GAP_MS / 2;
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, wsReq2, request2,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, wsReq2, request2, mockCallback);
         mMockLooper.dispatchAll();
 
         verify(mockNative).rangeRequest(mIntCaptor.capture(), eq(request2), eq(true));
@@ -1164,8 +1088,7 @@
 
         // (3) issue a request at t3 = t1 + 1.1 * gap for {10}: should be rejected (throttled)
         clock.time = 100 + BACKGROUND_PROCESS_EXEC_GAP_MS * 11 / 10;
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, wsReq1, request3,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, wsReq1, request3, mockCallback);
         mMockLooper.dispatchAll();
 
         cbInorder.verify(mockCallback).onRangingFailure(RangingResultCallback.STATUS_CODE_FAIL);
@@ -1219,8 +1142,7 @@
         WorkSource ws = new WorkSource(10);
 
         // 1. issue a request
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, ws, request,
-                mockCallback, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, ws, request, mockCallback);
         mMockLooper.dispatchAll();
 
         verify(mockNative).rangeRequest(mIntCaptor.capture(), eq(request), eq(true));
@@ -1231,7 +1153,7 @@
             WorkSource wsExtra = new WorkSource(ws);
             wsExtra.add(11 + i);
             mDut.startRanging(mockIbinder, mPackageName, mFeatureId, wsExtra, request,
-                    mockCallback, mExtras);
+                    mockCallback);
         }
         mMockLooper.dispatchAll();
 
@@ -1288,7 +1210,7 @@
 
         // 1. issue a request
         mDut.startRanging(mockIbinder, mPackageName, mFeatureId, useUids ? null : ws, request,
-                mockCallback, mExtras);
+                mockCallback);
         mMockLooper.dispatchAll();
 
         nativeInorder.verify(mockNative).rangeRequest(mIntCaptor.capture(), eq(request), eq(true));
@@ -1297,7 +1219,7 @@
         // 2. issue FLOOD LEVEL requests + 10: should get 11 failures (10 extra + 1 original)
         for (int i = 0; i < RttServiceImpl.MAX_QUEUED_PER_UID + 10; ++i) {
             mDut.startRanging(mockIbinder, mPackageName, mFeatureId, useUids ? null : ws, request,
-                    mockCallback, mExtras);
+                    mockCallback);
         }
         mMockLooper.dispatchAll();
 
@@ -1316,7 +1238,7 @@
 
         // 4. issue a request: don't expect a failure
         mDut.startRanging(mockIbinder, mPackageName, mFeatureId, useUids ? null : ws, request,
-                mockCallback, mExtras);
+                mockCallback);
         mMockLooper.dispatchAll();
 
         // 5. clear queue
@@ -1388,10 +1310,8 @@
         IRttCallback mockCallback3 = mock(IRttCallback.class);
 
         // (1) request 2 ranging operations: request 1 should be sent to HAL
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request1,
-                mockCallback, mExtras);
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request2,
-                mockCallback2, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request1, mockCallback);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request2, mockCallback2);
         mMockLooper.dispatchAll();
 
         verify(mockNative).rangeRequest(mIntCaptor.capture(), eq(request1), eq(true));
@@ -1419,8 +1339,7 @@
         verifyWakeupCancelled();
 
         // (3) issue another request: it should fail
-        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request3,
-                mockCallback3, mExtras);
+        mDut.startRanging(mockIbinder, mPackageName, mFeatureId, null, request3, mockCallback3);
         mMockLooper.dispatchAll();
 
         verify(mockCallback3).onRangingFailure(
@@ -1506,33 +1425,29 @@
 
     private class AwareTranslatePeerHandlesToMac extends MockAnswerUtil.AnswerWithArguments {
         private int mExpectedUid;
-        private MacAddrMapping[] mPeerIdToMacList;
+        private Map<Integer, MacAddress> mPeerIdToMacMap;
 
-        AwareTranslatePeerHandlesToMac(int expectedUid, MacAddrMapping[] peerIdToMacList) {
+        AwareTranslatePeerHandlesToMac(int expectedUid, Map<Integer, MacAddress> peerIdToMacMap) {
             mExpectedUid = expectedUid;
-            mPeerIdToMacList = peerIdToMacList;
+            mPeerIdToMacMap = peerIdToMacMap;
         }
 
-        public void answer(int uid, int[] peerIds, IWifiAwareMacAddressProvider callback) {
+        public void answer(int uid, List<Integer> peerIds, IWifiAwareMacAddressProvider callback) {
             assertEquals("Invalid UID", mExpectedUid, uid);
 
-            List<MacAddrMapping> result = new ArrayList();
-            for (int peerId: peerIds) {
+            Map<Integer, byte[]> result = new HashMap<>();
+            for (Integer peerId: peerIds) {
                 byte[] macBytes = null;
-                for (MacAddrMapping mapping : mPeerIdToMacList) {
-                    if (mapping.peerId == peerId) {
-                        macBytes = mapping.macAddress;
-                        break;
-                    }
+                MacAddress macAddr = mPeerIdToMacMap.get(peerId);
+                if (macAddr != null) {
+                    macBytes = macAddr.toByteArray();
                 }
-                MacAddrMapping mapping = new MacAddrMapping();
-                mapping.peerId = peerId;
-                mapping.macAddress = macBytes;
-                result.add(mapping);
+
+                result.put(peerId, macBytes);
             }
 
             try {
-                callback.macAddress(result.toArray(new MacAddrMapping[0]));
+                callback.macAddress(result);
             } catch (RemoteException e) {
                 e.printStackTrace();
             }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java b/service/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java
index e167858..6a8239c 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/scanner/BaseWifiScannerImplTest.java
@@ -215,7 +215,7 @@
                 .build();
 
         List<String> hiddenNetworkSSIDSet = new ArrayList<>();
-        for (int i = 0; i < WificondScannerTest.MAX_NUM_SCAN_SSIDS; i++) {
+        for (int i = 0; i < WificondScannerImpl.MAX_HIDDEN_NETWORK_IDS_PER_SCAN; i++) {
             hiddenNetworkSSIDSet.add(hiddenNetworkSSIDs[i]);
         }
         doSuccessfulSingleScanTest(settings, createFreqSet(5650),
@@ -424,20 +424,20 @@
 
         long approxScanStartNanos = mClock.getElapsedSinceBootNanos();
         ArrayList<ScanDetail> rawResults = new ArrayList<>(Arrays.asList(
-                new ScanDetail(WifiSsid.fromUtf8Text("TEST AP 1"),
+                new ScanDetail(WifiSsid.createFromAsciiEncoded("TEST AP 1"),
                         "00:00:00:00:00:00", "", -70, 2450,
                         approxScanStartNanos / 1_000 + 2000 * 1000, 0),
-                new ScanDetail(WifiSsid.fromUtf8Text("TEST AP 2"),
+                new ScanDetail(WifiSsid.createFromAsciiEncoded("TEST AP 2"),
                         "AA:BB:CC:DD:EE:FF", "", -66, 2400,
                         approxScanStartNanos / 1_000 + 2500 * 1000, 0),
                 // old result will be filtered
-                new ScanDetail(WifiSsid.fromUtf8Text("TEST AP 3"),
+                new ScanDetail(WifiSsid.createFromAsciiEncoded("TEST AP 3"),
                         "00:00:00:00:00:00", "", -80, 2450,
                         approxScanStartNanos / 1_0000 - 2000 * 1000, 0),
-                new ScanDetail(WifiSsid.fromUtf8Text("TEST AP 4"),
+                new ScanDetail(WifiSsid.createFromAsciiEncoded("TEST AP 4"),
                         "00:00:00:00:00:00", "", -80, 2450,
                         approxScanStartNanos / 1_000 + 200 , 0),
-                new ScanDetail(WifiSsid.fromUtf8Text("TEST AP 5"),
+                new ScanDetail(WifiSsid.createFromAsciiEncoded("TEST AP 5"),
                         "AA:BB:CC:11:22:33", "", -65, 2450,
                         approxScanStartNanos / 1_000 + 4000 * 1000, 0)));
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/scanner/ChannelHelperTest.java b/service/tests/wifitests/src/com/android/server/wifi/scanner/ChannelHelperTest.java
index 18c00ba..ce9a761 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/scanner/ChannelHelperTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/scanner/ChannelHelperTest.java
@@ -90,29 +90,33 @@
                     10000, 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);
             assertEquals("[2400,5100]", ChannelHelper.toString(scanSettings));
         }
+    }
 
-        /**
-         * Unit tests for
-         * {@link com.android.server.wifi.scanner.ChannelHelper#bandToString}.
-         */
-        @Test
-        public void bandToString_ShouldReturnApproapriateString() {
-            assertEquals("unspecified", ChannelHelper.bandToString(
-                    WifiScanner.WIFI_BAND_UNSPECIFIED));
-            assertEquals("24Ghz", ChannelHelper.bandToString(WifiScanner.WIFI_BAND_24_GHZ));
-            assertEquals("5Ghz (no DFS)", ChannelHelper.bandToString(WifiScanner.WIFI_BAND_5_GHZ));
-            assertEquals("5Ghz (DFS only)", ChannelHelper.bandToString(
-                    WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY));
-            assertEquals("5Ghz (DFS incl)", ChannelHelper.bandToString(
-                    WifiScanner.WIFI_BAND_5_GHZ_WITH_DFS));
-            assertEquals("24Ghz & 5Ghz (no DFS)", ChannelHelper.bandToString(
-                    WifiScanner.WIFI_BAND_BOTH));
-            assertEquals("24Ghz & 5Ghz (DFS incl)", ChannelHelper.bandToString(
-                    WifiScanner.WIFI_BAND_BOTH_WITH_DFS));
-            assertEquals("24Ghz & 5Ghz (DFS incl) & 6Ghz", ChannelHelper.bandToString(
-                    WifiScanner.WIFI_BAND_24_5_WITH_DFS_6_GHZ));
-            assertEquals("Invalid band", ChannelHelper.bandToString(-235342));
-        }
+    /**
+     * Unit tests for
+     * {@link com.android.server.wifi.scanner.ChannelHelper#bandToString}.
+     */
+    @Test
+    public void bandToString_ShouldReturnApproapriateString() {
+        assertEquals("unspecified", ChannelHelper.bandToString(
+                WifiScanner.WIFI_BAND_UNSPECIFIED));
+        assertEquals("24Ghz", ChannelHelper.bandToString(WifiScanner.WIFI_BAND_24_GHZ));
+        assertEquals("5Ghz (no DFS)", ChannelHelper.bandToString(WifiScanner.WIFI_BAND_5_GHZ));
+        assertEquals("5Ghz (DFS only)", ChannelHelper.bandToString(
+                WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY));
+        assertEquals("5Ghz (DFS incl)", ChannelHelper.bandToString(
+                WifiScanner.WIFI_BAND_5_GHZ_WITH_DFS));
+        assertEquals("24Ghz & 5Ghz (no DFS)", ChannelHelper.bandToString(
+                WifiScanner.WIFI_BAND_BOTH));
+        assertEquals("24Ghz & 5Ghz (DFS incl)", ChannelHelper.bandToString(
+                WifiScanner.WIFI_BAND_BOTH_WITH_DFS));
+        assertEquals("24Ghz & 5Ghz (DFS incl) & 6Ghz", ChannelHelper.bandToString(
+                WifiScanner.WIFI_BAND_24_5_WITH_DFS_6_GHZ));
+        assertEquals("2.4 GHz & 5 GHz (no DFS) & 6GHz & 60GHz", ChannelHelper.bandToString(
+                WifiScanner.WIFI_BAND_24_5_6_60_GHZ));
+        assertEquals("2.4 GHz & 5Ghz (DFS incl) & 6GHz & 60GHz", ChannelHelper.bandToString(
+                WifiScanner.WIFI_BAND_24_5_WITH_DFS_6_60_GHZ));
+        assertEquals("invalid band", ChannelHelper.bandToString(-235342));
     }
 
     /**
diff --git a/service/tests/wifitests/src/com/android/server/wifi/scanner/HalWifiScannerTest.java b/service/tests/wifitests/src/com/android/server/wifi/scanner/HalWifiScannerTest.java
index b610ceb..af1b736 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/scanner/HalWifiScannerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/scanner/HalWifiScannerTest.java
@@ -18,9 +18,6 @@
 
 import static com.android.server.wifi.ScanTestUtil.setupMockChannels;
 
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.Mockito.when;
-
 import androidx.test.filters.SmallTest;
 
 import org.junit.Before;
@@ -39,8 +36,6 @@
                 new int[]{5600, 5650},
                 new int[]{5945, 5985},
                 new int[]{58320, 60480});
-        when(mWifiNative.getMaxSsidsPerScan(anyString())).thenReturn(
-                WificondScannerTest.MAX_NUM_SCAN_SSIDS + 1);
         mScanner = new HalWifiScannerImpl(mContext, BaseWifiScannerImplTest.IFACE_NAME,
                 mWifiNative, mWifiMonitor, mLooper.getLooper(), mClock);
     }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java b/service/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java
index 19272d9..b7cba32 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/scanner/WifiScanningServiceTest.java
@@ -34,7 +34,6 @@
 import static com.android.server.wifi.scanner.WifiScanningServiceImpl.WifiSingleScanStateMachine.EMERGENCY_SCAN_END_INDICATION_ALARM_TAG;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
@@ -97,6 +96,7 @@
 import com.android.server.wifi.WifiNative;
 import com.android.server.wifi.proto.nano.WifiMetricsProto;
 import com.android.server.wifi.util.LastCallerInfoManager;
+import com.android.server.wifi.util.WifiAsyncChannel;
 import com.android.server.wifi.util.WifiPermissionsUtil;
 
 import org.junit.After;
@@ -151,8 +151,8 @@
     @Mock WifiMetrics.ScanMetrics mScanMetrics;
     @Mock WifiManager mWifiManager;
     @Mock LastCallerInfoManager mLastCallerInfoManager;
-    PresetKnownBandsChannelHelper mChannelHelper0;
-    PresetKnownBandsChannelHelper mChannelHelper1;
+    ChannelHelper mChannelHelper0;
+    ChannelHelper mChannelHelper1;
     TestLooper mLooper;
     WifiScanningServiceImpl mWifiScanningServiceImpl;
 
@@ -194,6 +194,9 @@
         when(mWifiInjector.getWifiMetrics()).thenReturn(mWifiMetrics);
         when(mWifiMetrics.getScanMetrics()).thenReturn(mScanMetrics);
         when(mWifiInjector.makeLog(anyString())).thenReturn(mLog);
+        WifiAsyncChannel mWifiAsyncChannel = new WifiAsyncChannel("ScanningServiceTest");
+        mWifiAsyncChannel.setWifiLog(mLog);
+        when(mFrameworkFacade.makeWifiAsyncChannel(anyString())).thenReturn(mWifiAsyncChannel);
         when(mWifiInjector.getFrameworkFacade()).thenReturn(mFrameworkFacade);
         when(mWifiInjector.getClock()).thenReturn(mClock);
         when(mWifiNative.getClientInterfaceNames())
@@ -450,6 +453,7 @@
     private void startServiceAndLoadDriver() {
         mWifiScanningServiceImpl.startService();
         mLooper.dispatchAll();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         setupAndLoadDriver(TEST_MAX_SCAN_BUCKETS_IN_CAPABILITIES);
     }
 
@@ -514,6 +518,7 @@
     public void startServiceAndTriggerSingleScanWithoutDriverLoaded() throws Exception {
         mWifiScanningServiceImpl.startService();
         mLooper.dispatchAll();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         verifyNoMoreInteractions(mWifiScannerImplFactory);
 
         Handler handler = mock(Handler.class);
@@ -529,6 +534,7 @@
     public void disconnectClientBeforeWifiEnabled() throws Exception {
         mWifiScanningServiceImpl.startService();
         mLooper.dispatchAll();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         BidirectionalAsyncChannel controlChannel = connectChannel(mock(Handler.class));
         mLooper.dispatchAll();
 
@@ -539,6 +545,7 @@
     @Test
     public void loadDriver() throws Exception {
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         verify(mWifiScannerImplFactory, times(1))
                 .create(any(), any(), any(), eq(TEST_IFACE_NAME_0));
 
@@ -574,6 +581,7 @@
     public void disconnectClientAfterStartingWifi() throws Exception {
         mWifiScanningServiceImpl.startService();
         mLooper.dispatchAll();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         BidirectionalAsyncChannel controlChannel = connectChannel(mock(Handler.class));
         mLooper.dispatchAll();
 
@@ -586,6 +594,7 @@
     @Test
     public void connectAndDisconnectClientAfterStartingWifi() throws Exception {
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         BidirectionalAsyncChannel controlChannel = connectChannel(mock(Handler.class));
         mLooper.dispatchAll();
@@ -596,6 +605,7 @@
     @Test
     public void sendInvalidCommand() throws Exception {
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -610,6 +620,7 @@
     public void rejectBackgroundScanRequestWhenHalReturnsInvalidCapabilities() throws Exception {
         mWifiScanningServiceImpl.startService();
         mLooper.dispatchAll();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         setupAndLoadDriver(0);
 
@@ -627,6 +638,7 @@
         when(mWifiScannerImplFactory.create(any(), any(), any(), any())).thenReturn(null);
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -648,6 +660,7 @@
         int requestId = 12;
         WorkSource workSource = new WorkSource(2292);
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -869,32 +882,6 @@
     }
 
     /**
-     * Verify that when 6Ghz scanning is not supported, RNR will not get enabled even if RNR
-     * setting is WIFI_RNR_ENABLED.
-     */
-    @Test
-    public void testRnrIsDisabledWhen6GhzChannelsNotAvailable() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        mChannelHelper0 = new PresetKnownBandsChannelHelper(
-                new int[]{2412, 2450},
-                new int[]{5160, 5175},
-                new int[]{5600, 5650, 5660},
-                new int[0], // 6Ghz scanning unavailable
-                new int[]{58320, 60480});
-        when(mWifiScannerImpl0.getChannelHelper()).thenReturn(mChannelHelper0);
-        WifiScanner.ScanSettings requestSettings = createRequest(WifiScanner.WIFI_BAND_BOTH, 0,
-                0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);
-        requestSettings.setRnrSetting(WifiScanner.WIFI_RNR_ENABLED);
-        WifiNative.ScanSettings nativeSettings = computeSingleScanNativeSettings(requestSettings);
-        // RNR should not be enabled in the native settings
-        nativeSettings.enable6GhzRnr = false;
-        assertEquals(WifiScanner.WIFI_RNR_ENABLED,
-                requestSettings.getRnrSetting());
-        doSuccessfulSingleScan(requestSettings, nativeSettings,
-                ScanResults.create(0, WifiScanner.WIFI_BAND_BOTH, new int[0]));
-    }
-
-    /**
      * Verify that when WIFI_BAND_ALL is scanned, RNR is disabled when
      * getRnrSetting() returns WIFI_RNR_NOT_NEEDED.
      */
@@ -946,6 +933,7 @@
                 .thenReturn(PERMISSION_DENIED);
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -998,6 +986,7 @@
                 .thenReturn(PERMISSION_DENIED);
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -1042,6 +1031,7 @@
         WorkSource workSource = new WorkSource(Binder.getCallingUid()); // don't explicitly set
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -1098,6 +1088,7 @@
         int requestId = 33;
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -1135,6 +1126,7 @@
         WorkSource workSource = new WorkSource(Binder.getCallingUid()); // don't explicitly set
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -1178,6 +1170,7 @@
         WorkSource workSource = new WorkSource(Binder.getCallingUid()); // don't explicitly set
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -1210,6 +1203,7 @@
         WorkSource workSource = new WorkSource(Binder.getCallingUid()); // don't explicitly set
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -1239,6 +1233,7 @@
         int requestId = 2293;
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
                         any(WifiNative.ScanEventHandler.class))).thenReturn(true);
@@ -1273,6 +1268,7 @@
         int requestId = 2293;
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
                 any(WifiNative.ScanEventHandler.class))).thenReturn(true);
@@ -1318,6 +1314,7 @@
         int listenerRequestId = 2295;
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
                         any(WifiNative.ScanEventHandler.class))).thenReturn(true);
@@ -1374,6 +1371,7 @@
 
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
                         any(WifiNative.ScanEventHandler.class))).thenReturn(true);
@@ -1441,6 +1439,7 @@
 
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
                         any(WifiNative.ScanEventHandler.class))).thenReturn(true);
@@ -1511,6 +1510,7 @@
         ScanResults results2 = ScanResults.create(0, WifiScanner.WIFI_BAND_UNSPECIFIED, 2412);
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
                         any(WifiNative.ScanEventHandler.class))).thenReturn(true);
@@ -1604,6 +1604,7 @@
 
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
                         any(WifiNative.ScanEventHandler.class))).thenReturn(true);
@@ -1707,6 +1708,7 @@
 
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
                         any(WifiNative.ScanEventHandler.class))).thenReturn(true);
@@ -1782,6 +1784,7 @@
         ScanResults results3 = results2412;
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
                         any(WifiNative.ScanEventHandler.class))).thenReturn(true);
@@ -1920,6 +1923,7 @@
     @Test
     public void retrieveSingleScanResultsBeforeAnySingleScans() throws Exception {
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0);
@@ -2146,6 +2150,7 @@
         int listenerRequestId = 13;
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -2193,6 +2198,7 @@
         int listenerRequestId = 13;
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -2259,6 +2265,7 @@
 
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
                         any(WifiNative.ScanEventHandler.class))).thenReturn(true);
@@ -2329,6 +2336,7 @@
         when(mWifiNative.getClientInterfaceNames()).thenReturn(new ArraySet<>());
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -2344,6 +2352,7 @@
         when(mWifiScannerImplFactory.create(any(), any(), any(), any())).thenReturn(null);
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -2356,6 +2365,7 @@
     private void doSuccessfulBackgroundScan(WifiScanner.ScanSettings requestSettings,
             WifiNative.ScanSettings nativeSettings) {
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -2553,6 +2563,7 @@
     @Test
     public void testSuccessfulHwPnoScanWithNoBackgroundScan() throws Exception {
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0);
@@ -2575,6 +2586,7 @@
         when(mWifiScannerImplFactory.create(any(), any(), any(), any())).thenReturn(null);
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -2598,6 +2610,7 @@
     @Test
     public void processSingleScanRequestAfterDisconnect() throws Exception {
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         BidirectionalAsyncChannel controlChannel = connectChannel(mock(Handler.class));
         mLooper.dispatchAll();
 
@@ -2636,6 +2649,7 @@
         int requestId = 9;
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         mLooper.dispatchAll();
@@ -2702,7 +2716,7 @@
         verifySuccessfulResponse(order, handler, 192);
         assertDumpContainsRequestLog("addBackgroundScanRequest", 192);
         verify(mLastCallerInfoManager, atLeastOnce()).put(
-                eq(WifiManager.API_SCANNING_ENABLED), anyInt(), anyInt(), anyInt(), any(),
+                eq(LastCallerInfoManager.SCANNING_ENABLED), anyInt(), anyInt(), anyInt(), any(),
                 eq(true));
     }
 
@@ -2756,7 +2770,7 @@
         assertDumpContainsCallbackLog("singleScanResults", requestId,
                 "results=" + results.getScanData().getResults().length);
         verify(mLastCallerInfoManager, atLeastOnce()).put(
-                eq(WifiManager.API_SCANNING_ENABLED), anyInt(), anyInt(), anyInt(), any(),
+                eq(LastCallerInfoManager.SCANNING_ENABLED), anyInt(), anyInt(), anyInt(), any(),
                 eq(true));
     }
 
@@ -2794,14 +2808,12 @@
     /**
      * Verifies that only clients with NETWORK_STACK permission can issues restricted messages
      * (from API's).
-     *
-     * Also verifies that starting in Android T CMD_REGISTER_SCAN_LISTENER is callable without
-     * NEWORK_STACK permission.
      */
     @Test
     public void rejectRestrictedMessagesFromNonPrivilegedApps() throws Exception {
         mWifiScanningServiceImpl.startService();
         mLooper.dispatchAll();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
 
@@ -2836,17 +2848,8 @@
                 "Not authorized", messageCaptor.getAllValues().get(2));
         assertFailedResponse(0, WifiScanner.REASON_NOT_AUTHORIZED,
                 "Not authorized", messageCaptor.getAllValues().get(3));
-        if (SdkLevel.isAtLeastT()) {
-            assertSuccessfulResponse(0, messageCaptor.getAllValues().get(4));
-            verify(mWifiPermissionsUtil).enforceCanAccessScanResultsForWifiScanner(
-                    any(), any(), eq(Binder.getCallingUid()),
-                    eq(false), eq(false));
-        } else {
-            assertFailedResponse(0, WifiScanner.REASON_NOT_AUTHORIZED,
-                    "Not authorized", messageCaptor.getAllValues().get(4));
-            verify(mWifiPermissionsUtil, never()).enforceCanAccessScanResultsForWifiScanner(
-                    any(), any(), anyInt(), anyBoolean(), anyBoolean());
-        }
+        assertFailedResponse(0, WifiScanner.REASON_NOT_AUTHORIZED,
+                "Not authorized", messageCaptor.getAllValues().get(4));
 
         // Ensure we didn't create scanner instance.
         verify(mWifiScannerImplFactory, never()).create(any(), any(), any(), any());
@@ -3090,6 +3093,7 @@
     public void setupAndTeardownSecondImpl() throws Exception {
         // start up service with a single impl.
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         verify(mWifiScannerImplFactory, times(1))
                 .create(any(), any(), any(), eq(TEST_IFACE_NAME_0));
 
@@ -3118,7 +3122,7 @@
         controlChannel.sendMessage(Message.obtain(null, WifiScanner.CMD_DISABLE));
         mLooper.dispatchAll();
 
-        verify(mLastCallerInfoManager).put(eq(WifiManager.API_SCANNING_ENABLED), anyInt(),
+        verify(mLastCallerInfoManager).put(eq(LastCallerInfoManager.SCANNING_ENABLED), anyInt(),
                 anyInt(), anyInt(), any(), eq(false));
         verify(mWifiScannerImpl0).cleanup();
     }
@@ -3131,6 +3135,7 @@
     public void setupAndTeardownSecondImplWhichSatisfiesExistingImpl() throws Exception {
         // start up service with a single impl.
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         verify(mWifiScannerImplFactory, times(1))
                 .create(any(), any(), any(), eq(TEST_IFACE_NAME_0));
 
@@ -3177,6 +3182,7 @@
     public void setupSecondImplAndTeardownFirstImplWhichSatisfiesExistingImpl() throws Exception {
         // start up service with a single impl.
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         verify(mWifiScannerImplFactory, times(1))
                 .create(any(), any(), any(), eq(TEST_IFACE_NAME_0));
 
@@ -3270,6 +3276,7 @@
         int requestId = 33;
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
 
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
@@ -3315,6 +3322,8 @@
         WorkSource workSource = new WorkSource(2292);
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
+
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0, mWifiScannerImpl1);
@@ -3369,6 +3378,8 @@
         WorkSource workSource = new WorkSource(Binder.getCallingUid()); // don't explicitly set
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
+
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0, mWifiScannerImpl1);
@@ -3423,6 +3434,8 @@
         WorkSource workSource = new WorkSource(Binder.getCallingUid()); // don't explicitly set
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
+
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0, mWifiScannerImpl1);
@@ -3473,6 +3486,7 @@
                 .thenReturn(new ArraySet<>(Arrays.asList(TEST_IFACE_NAME_0, TEST_IFACE_NAME_1)));
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0, mWifiScannerImpl1);
@@ -3499,6 +3513,7 @@
                 .thenReturn(new ArraySet<>(Arrays.asList(TEST_IFACE_NAME_0, TEST_IFACE_NAME_1)));
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0, mWifiScannerImpl1);
@@ -3534,6 +3549,7 @@
                 .thenReturn(new ArraySet<>(Arrays.asList(TEST_IFACE_NAME_0, TEST_IFACE_NAME_1)));
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0, mWifiScannerImpl1);
@@ -3579,6 +3595,7 @@
                 .thenReturn(new ArraySet<>(Arrays.asList(TEST_IFACE_NAME_0, TEST_IFACE_NAME_1)));
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0, mWifiScannerImpl1);
@@ -3629,6 +3646,7 @@
                 .thenReturn(new ArraySet<>(Arrays.asList(TEST_IFACE_NAME_0, TEST_IFACE_NAME_1)));
 
         startServiceAndLoadDriver();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0, mWifiScannerImpl1);
@@ -3668,71 +3686,6 @@
     }
 
     /**
-     * Verify that isScanning throws a security exception if the calliing app has no
-     * permission.
-     */
-    @Test(expected = SecurityException.class)
-    public void testIsScanningThrowsException() throws Exception {
-        startServiceAndLoadDriver();
-
-        // Client doesn't have LOCATION_HARDWARE permission.
-        when(mWifiPermissionsUtil.checkCallersHardwareLocationPermission(anyInt()))
-                .thenReturn(false);
-        mWifiScanningServiceImpl.isScanning();
-    }
-
-    /**
-     * Test isScanning returns the proper value.
-     */
-    @Test
-    public void testIsScanning() throws Exception {
-        when(mWifiPermissionsUtil.checkCallersHardwareLocationPermission(anyInt()))
-                .thenReturn(true);
-        WifiScanner.ScanSettings requestSettings = createRequest(WifiScanner.WIFI_BAND_BOTH, 0,
-                0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);
-        int requestId = 9;
-
-        startServiceAndLoadDriver();
-
-        // Verify that now isScanning = false
-        assertFalse("isScanning should be false before scan starts",
-                mWifiScanningServiceImpl.isScanning());
-
-        Handler handler = mock(Handler.class);
-        BidirectionalAsyncChannel controlChannel = connectChannel(handler);
-        mLooper.dispatchAll();
-
-        when(mWifiScannerImpl0.startSingleScan(any(WifiNative.ScanSettings.class),
-                any(WifiNative.ScanEventHandler.class))).thenReturn(true);
-        ScanResults results = ScanResults.create(0, WifiScanner.WIFI_BAND_BOTH, 2412);
-        when(mWifiScannerImpl0.getLatestSingleScanResults())
-                .thenReturn(results.getRawScanData());
-
-        InOrder order = inOrder(mWifiScannerImpl0, handler);
-
-        sendSingleScanRequest(controlChannel, requestId, requestSettings, null);
-        mLooper.dispatchAll();
-
-        // Verify that now isScanning = true
-        assertTrue("isScanning should be true during scanning",
-                mWifiScanningServiceImpl.isScanning());
-
-        WifiNative.ScanEventHandler eventHandler1 = verifyStartSingleScan(order,
-                computeSingleScanNativeSettings(requestSettings));
-        verifySuccessfulResponse(order, handler, requestId);
-
-        eventHandler1.onScanStatus(WifiNative.WIFI_SCAN_RESULTS_AVAILABLE);
-        mLooper.dispatchAll();
-        verifyScanResultsReceived(order, handler, requestId, results.getScanData());
-        verifySingleScanCompletedReceived(order, handler, requestId);
-        verifyNoMoreInteractions(handler);
-
-        // Verify that now isScanning = false
-        assertFalse("isScanning should be false since scanning is complete",
-                mWifiScanningServiceImpl.isScanning());
-    }
-
-    /**
      * Tests that {@link WifiScanningServiceImpl#getAvailableChannels(int, String)} throws a
      * {@link SecurityException} if the caller doesn't hold the required permissions.
      */
@@ -3841,6 +3794,8 @@
     public void startServiceAndTriggerEmergencySingleScanWithoutDriverLoaded() throws Exception {
         mWifiScanningServiceImpl.startService();
         mLooper.dispatchAll();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
+
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0);
@@ -3877,6 +3832,8 @@
             throws Exception {
         mWifiScanningServiceImpl.startService();
         mLooper.dispatchAll();
+        mWifiScanningServiceImpl.setWifiHandlerLogForTest(mLog);
+
         Handler handler = mock(Handler.class);
         BidirectionalAsyncChannel controlChannel = connectChannel(handler);
         InOrder order = inOrder(handler, mWifiScannerImpl0);
@@ -3921,25 +3878,4 @@
         mLooper.dispatchAll();
         verify(mWifiManager, times(1)).setEmergencyScanRequestInProgress(false);
     }
-
-    @Test
-    public void testStopPnoScanNullSetting() throws Exception {
-        startServiceAndLoadDriver();
-        Handler handler = mock(Handler.class);
-        BidirectionalAsyncChannel controlChannel = connectChannel(handler);
-        InOrder order = inOrder(handler, mWifiScannerImpl0);
-        int requestId = 12;
-
-        ScanResults scanResults = createScanResultsForPno();
-        Pair<WifiScanner.ScanSettings, WifiNative.ScanSettings> scanSettings =
-                createScanSettingsForHwPno();
-        Pair<WifiScanner.PnoSettings, WifiNative.PnoSettings> pnoSettings =
-                createPnoSettings(scanResults);
-
-        sendPnoScanRequest(controlChannel, requestId, scanSettings.first, pnoSettings.first);
-        expectHwPnoScan(order, handler, requestId, pnoSettings.second, scanResults);
-
-        controlChannel.sendMessage(Message.obtain(null, WifiScanner.CMD_STOP_PNO_SCAN, 0, 0));
-        mLooper.dispatchAll();
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java b/service/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java
index 52a22ce..498b7be 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/scanner/WificondScannerTest.java
@@ -17,11 +17,9 @@
 package com.android.server.wifi.scanner;
 
 import static com.android.server.wifi.ScanTestUtil.NativeScanSettingsBuilder;
-import static com.android.server.wifi.ScanTestUtil.createFreqSet;
 import static com.android.server.wifi.ScanTestUtil.setupMockChannels;
 
 import static org.junit.Assert.*;
-import static org.junit.Assume.assumeTrue;
 import static org.mockito.Mockito.*;
 
 import android.app.AlarmManager;
@@ -30,7 +28,6 @@
 
 import androidx.test.filters.SmallTest;
 
-import com.android.modules.utils.build.SdkLevel;
 import com.android.server.wifi.ScanDetail;
 import com.android.server.wifi.ScanResults;
 import com.android.server.wifi.WifiMonitor;
@@ -41,6 +38,7 @@
 import org.junit.Test;
 import org.mockito.InOrder;
 
+
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.io.StringWriter;
@@ -58,7 +56,6 @@
     private static final String NATIVE_SCAN_TITLE = "Latest native scan results:";
     private static final String NATIVE_PNO_SCAN_TITLE = "Latest native pno scan results:";
     private static final String NATIVE_SCAN_IE_TITLE = "Latest native scan results IEs:";
-    public static final int MAX_NUM_SCAN_SSIDS = 16;
 
     WifiMonitor mWifiMonitorSpy;
     @Before
@@ -69,7 +66,6 @@
                 new int[]{5600, 5650},
                 new int[]{5945, 5985},
                 new int[]{58320, 60480});
-        when(mWifiNative.getMaxSsidsPerScan(anyString())).thenReturn(MAX_NUM_SCAN_SSIDS + 1);
         mWifiMonitorSpy = spy(mWifiMonitor);
         mScanner = new WificondScannerImpl(mContext, BaseWifiScannerImplTest.IFACE_NAME,
                 mWifiNative, mWifiMonitorSpy, new WificondChannelHelper(mWifiNative),
@@ -354,88 +350,6 @@
                 eq(WifiMonitor.SCAN_RESULTS_EVENT), any());
     }
 
-    /**
-     * Tests that for a large number of hidden networks, repeated scans cover the entire range of
-     * hidden networks in round-robin order.
-     */
-    @Test
-    public void testManyHiddenNetworksAcrossMultipleScans() {
-        assumeTrue(SdkLevel.isAtLeastT());
-        String[] hiddenNetworkSSIDs = {
-                "test_ssid_0", "test_ssid_1", "test_ssid_2", "test_ssid_3", "test_ssid_4",
-                "test_ssid_5", "test_ssid_6", "test_ssid_7", "test_ssid_8", "test_ssid_9",
-                "test_ssid_10", "test_ssid_11", "test_ssid_12", "test_ssid_13", "test_ssid_14",
-                "test_ssid_15", "test_ssid_16", "test_ssid_17", "test_ssid_18", "test_ssid_19"
-        };
-        WifiNative.ScanSettings settings = new NativeScanSettingsBuilder()
-                .withBasePeriod(10000)
-                .withMaxApPerScan(10)
-                .withHiddenNetworkSSIDs(hiddenNetworkSSIDs)
-                .addBucketWithChannels(20000, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, 5650)
-                .build();
-
-        // First scan should cover the first MAX_NUM_SCAN_SSIDS hidden networks.
-        ArrayList<String> hiddenNetworkSSIDSet = new ArrayList<>();
-        for (int i = 0; i < MAX_NUM_SCAN_SSIDS; i++) {
-            hiddenNetworkSSIDSet.add(hiddenNetworkSSIDs[i]);
-        }
-        doSuccessfulSingleScanTest(settings, createFreqSet(5650),
-                hiddenNetworkSSIDSet,
-                ScanResults.create(0, WifiScanner.WIFI_BAND_UNSPECIFIED,
-                        5650, 5650, 5650, 5650, 5650, 5650, 5650), false, false);
-
-        // The next scan should start from where we left off and wrap around to the
-        // beginning of hiddenNetworkSSIDs.
-        hiddenNetworkSSIDSet.clear();
-        for (int i = MAX_NUM_SCAN_SSIDS; i < hiddenNetworkSSIDs.length; i++) {
-            hiddenNetworkSSIDSet.add(hiddenNetworkSSIDs[i]);
-        }
-        int scanSetSize = hiddenNetworkSSIDSet.size();
-        for (int i = 0; scanSetSize < MAX_NUM_SCAN_SSIDS; i++, scanSetSize++) {
-            hiddenNetworkSSIDSet.add(hiddenNetworkSSIDs[i]);
-        }
-        doSuccessfulSingleScanTest(settings, createFreqSet(5650),
-                hiddenNetworkSSIDSet,
-                ScanResults.create(0, WifiScanner.WIFI_BAND_UNSPECIFIED,
-                        5650, 5650, 5650, 5650, 5650, 5650, 5650), false, false);
-    }
-
-    /**
-     * Tests that if the call to getMaxSsidsPerScan() fails, repeated scans contain the default
-     * number of SSIDs per scan and do not cycle through the SSIDs in round-robin order.
-     */
-    @Test
-    public void testFailureInGetMaxSsidsPerScan() {
-        when(mWifiNative.getMaxSsidsPerScan(anyString())).thenReturn(-1);
-        String[] hiddenNetworkSSIDs = {
-                "test_ssid_0", "test_ssid_1", "test_ssid_2", "test_ssid_3", "test_ssid_4",
-                "test_ssid_5", "test_ssid_6", "test_ssid_7", "test_ssid_8", "test_ssid_9",
-                "test_ssid_10", "test_ssid_11", "test_ssid_12", "test_ssid_13", "test_ssid_14",
-                "test_ssid_15", "test_ssid_16", "test_ssid_17", "test_ssid_18", "test_ssid_19"
-        };
-        WifiNative.ScanSettings settings = new NativeScanSettingsBuilder()
-                .withBasePeriod(10000)
-                .withMaxApPerScan(10)
-                .withHiddenNetworkSSIDs(hiddenNetworkSSIDs)
-                .addBucketWithChannels(20000, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, 5650)
-                .build();
-
-        // If two successive scans occur, both should cover the first MAX_NUM_SCAN_SSIDS
-        // hidden networks.
-        ArrayList<String> hiddenNetworkSSIDSet = new ArrayList<>();
-        for (int i = 0; i < MAX_NUM_SCAN_SSIDS; i++) {
-            hiddenNetworkSSIDSet.add(hiddenNetworkSSIDs[i]);
-        }
-        doSuccessfulSingleScanTest(settings, createFreqSet(5650),
-                hiddenNetworkSSIDSet,
-                ScanResults.create(0, WifiScanner.WIFI_BAND_UNSPECIFIED,
-                        5650, 5650, 5650, 5650, 5650, 5650, 5650), false, false);
-        doSuccessfulSingleScanTest(settings, createFreqSet(5650),
-                hiddenNetworkSSIDSet,
-                ScanResults.create(0, WifiScanner.WIFI_BAND_UNSPECIFIED,
-                        5650, 5650, 5650, 5650, 5650, 5650, 5650), false, false);
-    }
-
     private void assertLogContainsRequestPattern(Pattern logLineRegex, String log) {
         assertTrue("dump did not contain log = " + logLineRegex.toString() + "\n" + log + "\n",
                 logLineRegex.matcher(log).find());
diff --git a/service/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java
index 3f9cb51..51c6ca6 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java
@@ -16,17 +16,13 @@
 
 package com.android.server.wifi.util;
 
-import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assume.assumeTrue;
 import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
@@ -141,38 +137,21 @@
     private static final int[] EMPTY_CHANNEL_LIST = {};
     private static final int[] ALLOWED_2G_FREQS = {2462}; //ch# 11
     private static final int[] ALLOWED_5G_FREQS = {5745, 5765}; //ch# 149, 153
-    private static final int[] ALLOWED_2G5G_FREQS = {2462, 5745, 5765};
-    private static final int[] ALLOWED_2G_CHANS = {11}; //ch# 11
-    private static final int[] ALLOWED_5G_CHANS = {149, 153}; //ch# 149, 153
-    private static final int[] ALLOWED_2G5G_CHANS = {11, 149, 153};
     private static final int[] ALLOWED_6G_FREQS = {5945, 5965};
     private static final int[] ALLOWED_60G_FREQS = {58320, 60480}; // ch# 1, 2
-    private static final int[] ALLOWED_60G_CHANS = {1, 2}; // ch# 1, 2
     private static final int[] TEST_5G_DFS_FREQS = {5280, 5520}; // ch#56, 104
 
     @Mock Context mContext;
     @Mock Resources mResources;
     @Mock WifiNative mWifiNative;
     @Mock CoexManager mCoexManager;
-    private SoftApCapability mCapability;
+
     /**
      * Setup test.
      */
     @Before
     public void setUp() throws Exception {
         MockitoAnnotations.initMocks(this);
-        final long testFeatures = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT
-                | SoftApCapability.SOFTAP_FEATURE_BAND_6G_SUPPORTED
-                | SoftApCapability.SOFTAP_FEATURE_BAND_60G_SUPPORTED;
-        mCapability = new SoftApCapability(testFeatures);
-        mCapability.setSupportedChannelList(SoftApConfiguration.BAND_2GHZ, ALLOWED_2G_CHANS);
-        mCapability.setSupportedChannelList(SoftApConfiguration.BAND_5GHZ, ALLOWED_5G_CHANS);
-        mCapability.setSupportedChannelList(SoftApConfiguration.BAND_60GHZ, ALLOWED_60G_CHANS);
-        when(mResources.getBoolean(R.bool.config_wifi24ghzSupport)).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifi5ghzSupport)).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifiSoftap24ghzSupported)).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifiSoftap5ghzSupported)).thenReturn(true);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt())).thenReturn(null);
     }
 
     /**
@@ -302,8 +281,6 @@
         assertEquals(Arrays.asList(1, 11), ApConfigUtil.convertStringToChannelList("1,6-3,11"));
         assertEquals(Arrays.asList(1),
                 ApConfigUtil.convertStringToChannelList("1, abc , def - rsv"));
-        assertNotNull(ApConfigUtil.convertStringToChannelList(""));
-        assertTrue(ApConfigUtil.convertStringToChannelList("").isEmpty());
     }
 
     /**
@@ -318,9 +295,8 @@
         int[] allowed2gChannels = {};
         when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_24_GHZ))
                 .thenReturn(allowed2gChannels);
-        mCapability.setSupportedChannelList(SoftApConfiguration.BAND_2GHZ, allowed2gChannels);
-        int freq = ApConfigUtil.chooseApChannel(SoftApConfiguration.BAND_2GHZ,
-                mCoexManager, mResources, new SoftApCapability(0));
+        int freq = ApConfigUtil.chooseApChannel(SoftApConfiguration.BAND_2GHZ, mWifiNative,
+                mCoexManager, mResources);
         assertEquals(ApConfigUtil.DEFAULT_AP_CHANNEL,
                 ScanResult.convertFrequencyMhzToChannelIfSupported(freq));
     }
@@ -330,14 +306,13 @@
      */
     @Test
     public void chooseApChannel2GBandWithAllowedChannels() throws Exception {
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt())).thenReturn(null);
         when(mResources.getString(R.string.config_wifiSoftap2gChannelList))
                 .thenReturn("1, 6, 11");
         when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_24_GHZ))
                 .thenReturn(ALLOWED_2G_FREQS); // ch#11
-        int freq = ApConfigUtil.chooseApChannel(SoftApConfiguration.BAND_2GHZ,
-                mCoexManager, mResources, mCapability);
+
+        int freq = ApConfigUtil.chooseApChannel(SoftApConfiguration.BAND_2GHZ, mWifiNative,
+                mCoexManager, mResources);
         assertEquals(2462, freq);
     }
 
@@ -348,10 +323,11 @@
     public void chooseApChannel5GBandWithAllowedChannels() throws Exception {
         when(mResources.getString(R.string.config_wifiSoftap5gChannelList))
                 .thenReturn("149, 36-100");
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt())).thenReturn(null);
-        int freq = ApConfigUtil.chooseApChannel(SoftApConfiguration.BAND_5GHZ,
-                mCoexManager, mResources, mCapability);
+        when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ))
+                .thenReturn(ALLOWED_5G_FREQS); //ch# 149, 153
+
+        int freq = ApConfigUtil.chooseApChannel(
+                SoftApConfiguration.BAND_5GHZ, mWifiNative, mCoexManager, mResources);
         assertTrue(ArrayUtils.contains(ALLOWED_5G_FREQS, freq));
     }
 
@@ -360,13 +336,14 @@
      */
     @Test
     public void chooseApChannel60GBandWithAllowedChannels() throws Exception {
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt())).thenReturn(null);
         when(mResources.getString(R.string.config_wifiSoftap60gChannelList))
                 .thenReturn("1-2");
-        int freq = ApConfigUtil.chooseApChannel(SoftApConfiguration.BAND_60GHZ,
-                mCoexManager, mResources, mCapability);
-        assertTrue("freq " + freq, ArrayUtils.contains(ALLOWED_60G_FREQS, freq));
+        when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_60_GHZ))
+                .thenReturn(ALLOWED_60G_FREQS); //ch# 1, 2
+
+        int freq = ApConfigUtil.chooseApChannel(
+                SoftApConfiguration.BAND_60GHZ, mWifiNative, mCoexManager, mResources);
+        assertTrue(ArrayUtils.contains(ALLOWED_60G_FREQS, freq));
     }
 
     /**
@@ -377,9 +354,8 @@
     public void chooseApChannel5GBandWithNoAllowedChannels() throws Exception {
         when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ))
                 .thenReturn(EMPTY_CHANNEL_LIST);
-        mCapability.setSupportedChannelList(SoftApConfiguration.BAND_5GHZ, new int[0]);
-        assertEquals(-1, ApConfigUtil.chooseApChannel(SoftApConfiguration.BAND_5GHZ,
-                mCoexManager, mResources, mCapability));
+        assertEquals(-1, ApConfigUtil.chooseApChannel(SoftApConfiguration.BAND_5GHZ, mWifiNative,
+                mCoexManager, mResources));
     }
 
     /**
@@ -387,8 +363,8 @@
      */
     @Test
     public void chooseApChannelWillHighBandPrefer() throws Exception {
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt())).thenReturn(null);
+        when(mResources.getString(R.string.config_wifiSoftap2gChannelList))
+                .thenReturn("1, 6, 11");
         when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_24_GHZ))
                 .thenReturn(ALLOWED_2G_FREQS); // ch#11
         when(mResources.getString(R.string.config_wifiSoftap5gChannelList))
@@ -398,8 +374,8 @@
 
         int freq = ApConfigUtil.chooseApChannel(
                 SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ,
-                mCoexManager, mResources, mCapability);
-        assertTrue("freq " + freq, ArrayUtils.contains(ALLOWED_5G_FREQS, freq));
+                mWifiNative, mCoexManager, mResources);
+        assertTrue(ArrayUtils.contains(ALLOWED_5G_FREQS, freq));
     }
 
     /**
@@ -408,8 +384,6 @@
     @Test
     public void chooseApChannelWithUnsafeChannelsPreferSafe() throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt())).thenReturn(null);
         when(mResources.getString(R.string.config_wifiSoftap2gChannelList))
             .thenReturn("1, 6, 11");
         when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_24_GHZ))
@@ -427,7 +401,7 @@
 
         int freq = ApConfigUtil.chooseApChannel(
                 SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ,
-                mCoexManager, mResources, mCapability);
+                mWifiNative, mCoexManager, mResources);
 
         assertTrue(ArrayUtils.contains(ALLOWED_2G_FREQS, freq));
 
@@ -436,7 +410,7 @@
 
         freq = ApConfigUtil.chooseApChannel(
                 SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ,
-                mCoexManager, mResources, mCapability);
+                mWifiNative, mCoexManager, mResources);
 
         assertTrue(ArrayUtils.contains(ALLOWED_2G_FREQS, freq));
     }
@@ -447,8 +421,6 @@
     @Test
     public void chooseApChannelWithAllSoftUnsafePreferHighBand() throws Exception {
         assumeTrue(SdkLevel.isAtLeastS());
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt())).thenReturn(null);
         when(mResources.getString(R.string.config_wifiSoftap2gChannelList))
                 .thenReturn("1, 6, 11");
         when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_24_GHZ))
@@ -468,7 +440,7 @@
 
         int freq = ApConfigUtil.chooseApChannel(
                 SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ,
-                mCoexManager, mResources, mCapability);
+                mWifiNative, mCoexManager, mResources);
 
         assertTrue(ArrayUtils.contains(ALLOWED_5G_FREQS, freq));
     }
@@ -498,111 +470,13 @@
 
         int freq = ApConfigUtil.chooseApChannel(
                 SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ,
-                mCoexManager, mResources, mCapability);
+                mWifiNative, mCoexManager, mResources);
 
         assertEquals(freq, ApConfigUtil.convertChannelToFrequency(
                 ApConfigUtil.DEFAULT_AP_CHANNEL, ApConfigUtil.DEFAULT_AP_BAND));
     }
 
     /**
-     * Verify remove of 6GHz band from multiple band mask, when security type is restricted
-     */
-    @Test
-    public void updateBandMask6gSecurityRestriction() throws Exception {
-        SoftApConfiguration config;
-
-        config = new SoftApConfiguration.Builder()
-                .setBand(SoftApConfiguration.BAND_5GHZ | SoftApConfiguration.BAND_6GHZ)
-                .setPassphrase(null, SoftApConfiguration.SECURITY_TYPE_OPEN)
-                .build();
-        assertEquals(SoftApConfiguration.BAND_5GHZ,
-                ApConfigUtil.remove6gBandForUnsupportedSecurity(config).getBand());
-
-        config = new SoftApConfiguration.Builder()
-                .setBand(SoftApConfiguration.BAND_5GHZ | SoftApConfiguration.BAND_6GHZ)
-                .setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
-                .build();
-        assertEquals(SoftApConfiguration.BAND_5GHZ,
-                ApConfigUtil.remove6gBandForUnsupportedSecurity(config).getBand());
-
-        config = new SoftApConfiguration.Builder()
-                .setBand(SoftApConfiguration.BAND_5GHZ | SoftApConfiguration.BAND_6GHZ)
-                .setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE)
-                .build();
-        assertEquals(SoftApConfiguration.BAND_5GHZ | SoftApConfiguration.BAND_6GHZ,
-                ApConfigUtil.remove6gBandForUnsupportedSecurity(config).getBand());
-
-        config = new SoftApConfiguration.Builder()
-                .setBand(SoftApConfiguration.BAND_5GHZ | SoftApConfiguration.BAND_6GHZ)
-                .setPassphrase("somepassword",
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION)
-                .build();
-        assertEquals(SoftApConfiguration.BAND_5GHZ,
-                ApConfigUtil.remove6gBandForUnsupportedSecurity(config).getBand());
-
-        if (SdkLevel.isAtLeastT()) {
-            config = new SoftApConfiguration.Builder()
-                    .setBand(SoftApConfiguration.BAND_5GHZ | SoftApConfiguration.BAND_6GHZ)
-                    .setPassphrase(null, SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION)
-                    .build();
-            assertEquals(SoftApConfiguration.BAND_5GHZ,
-                    ApConfigUtil.remove6gBandForUnsupportedSecurity(config).getBand());
-        }
-    }
-
-    /**
-     * Verify remove of 6GHz band from multiple band mask in bridged mode,
-     * when security type is restricted.
-     */
-    @Test
-    public void updateBandMask6gSecurityRestrictionBridged() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastS());
-        SoftApConfiguration config;
-        int[] bands = {SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_6GHZ,
-                SoftApConfiguration.BAND_5GHZ | SoftApConfiguration.BAND_6GHZ};
-
-        int[] bands_no6g = {SoftApConfiguration.BAND_2GHZ, SoftApConfiguration.BAND_5GHZ};
-
-        config = new SoftApConfiguration.Builder()
-                .setBands(bands)
-                .setPassphrase(null, SoftApConfiguration.SECURITY_TYPE_OPEN)
-                .build();
-        assertArrayEquals(bands_no6g,
-                ApConfigUtil.remove6gBandForUnsupportedSecurity(config).getBands());
-
-        config = new SoftApConfiguration.Builder()
-                .setBands(bands)
-                .setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
-                .build();
-        assertArrayEquals(bands_no6g,
-                ApConfigUtil.remove6gBandForUnsupportedSecurity(config).getBands());
-
-        config = new SoftApConfiguration.Builder()
-                .setBands(bands)
-                .setPassphrase("somepassword", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE)
-                .build();
-        assertArrayEquals(bands,
-                ApConfigUtil.remove6gBandForUnsupportedSecurity(config).getBands());
-
-        config = new SoftApConfiguration.Builder()
-                .setBands(bands)
-                .setPassphrase("somepassword",
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION)
-                .build();
-        assertArrayEquals(bands_no6g,
-                ApConfigUtil.remove6gBandForUnsupportedSecurity(config).getBands());
-
-        if (SdkLevel.isAtLeastT()) {
-            config = new SoftApConfiguration.Builder()
-                    .setBands(bands)
-                    .setPassphrase(null, SoftApConfiguration.SECURITY_TYPE_WPA3_OWE_TRANSITION)
-                    .build();
-            assertArrayEquals(bands_no6g,
-                    ApConfigUtil.remove6gBandForUnsupportedSecurity(config).getBands());
-        }
-    }
-
-    /**
      * Verify default band and channel is used when HAL support is
      * not available.
      */
@@ -614,7 +488,7 @@
         when(mWifiNative.isHalStarted()).thenReturn(false);
         assertEquals(ApConfigUtil.SUCCESS,
                 ApConfigUtil.updateApChannelConfig(mWifiNative, mCoexManager, mResources,
-                        TEST_COUNTRY_CODE, configBuilder, configBuilder.build(), mCapability));
+                        TEST_COUNTRY_CODE, configBuilder, configBuilder.build(), false));
         /* Verify default band and channel is used. */
         assertEquals(ApConfigUtil.DEFAULT_AP_BAND, configBuilder.build().getBand());
         assertEquals(ApConfigUtil.DEFAULT_AP_CHANNEL, configBuilder.build().getChannel());
@@ -631,7 +505,7 @@
         when(mWifiNative.isHalStarted()).thenReturn(true);
         assertEquals(ApConfigUtil.ERROR_GENERIC,
                 ApConfigUtil.updateApChannelConfig(mWifiNative, mCoexManager, mResources, null,
-                        configBuilder, configBuilder.build(), mCapability));
+                        configBuilder, configBuilder.build(), false));
     }
 
     /**
@@ -644,7 +518,7 @@
         when(mWifiNative.isHalStarted()).thenReturn(true);
         assertEquals(ApConfigUtil.SUCCESS,
                 ApConfigUtil.updateApChannelConfig(mWifiNative, mCoexManager, mResources,
-                        TEST_COUNTRY_CODE, configBuilder, configBuilder.build(), mCapability));
+                        TEST_COUNTRY_CODE, configBuilder, configBuilder.build(), false));
         assertEquals(SoftApConfiguration.BAND_5GHZ, configBuilder.build().getBand());
         assertEquals(36, configBuilder.build().getChannel());
     }
@@ -660,10 +534,9 @@
         when(mWifiNative.isHalStarted()).thenReturn(true);
         when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ))
                 .thenReturn(EMPTY_CHANNEL_LIST);
-        mCapability.setSupportedChannelList(SoftApConfiguration.BAND_5GHZ, new int[0]);
         assertEquals(ApConfigUtil.ERROR_NO_CHANNEL,
                 ApConfigUtil.updateApChannelConfig(mWifiNative, mCoexManager, mResources,
-                        TEST_COUNTRY_CODE, configBuilder, configBuilder.build(), mCapability));
+                        TEST_COUNTRY_CODE, configBuilder, configBuilder.build(), false));
     }
 
     /**
@@ -674,27 +547,19 @@
     public void updateApChannelConfigWithAcsDisabledOemConfigured() throws Exception {
         Builder configBuilder = new SoftApConfiguration.Builder();
         configBuilder.setBand(SoftApConfiguration.BAND_5GHZ | SoftApConfiguration.BAND_2GHZ);
-        when(mContext.getResources()).thenReturn(mResources);
         when(mResources.getString(R.string.config_wifiSoftap2gChannelList))
                 .thenReturn("6");
         when(mResources.getString(R.string.config_wifiSoftap5gChannelList))
                 .thenReturn("149, 36-100");
-        when(mResources.getBoolean(R.bool.config_wifi24ghzSupport)).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifi5ghzSupport)).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifiSoftap24ghzSupported)).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifiSoftap5ghzSupported)).thenReturn(true);
         when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt())).thenReturn(null);
         when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_24_GHZ))
                 .thenReturn(ALLOWED_2G_FREQS); // ch# 11
         when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ))
                 .thenReturn(ALLOWED_5G_FREQS); // ch# 149, 153
-        mCapability = ApConfigUtil.updateSoftApCapabilityWithAvailableChannelList(mCapability,
-                mContext, mWifiNative);
+        when(mWifiNative.isHalStarted()).thenReturn(true);
         assertEquals(ApConfigUtil.SUCCESS,
                 ApConfigUtil.updateApChannelConfig(mWifiNative, mCoexManager, mResources,
-                        TEST_COUNTRY_CODE, configBuilder, configBuilder.build(),
-                        mCapability));
+                        TEST_COUNTRY_CODE, configBuilder, configBuilder.build(), false));
         assertEquals(SoftApConfiguration.BAND_5GHZ, configBuilder.build().getBand());
         assertEquals(149, configBuilder.build().getChannel());
     }
@@ -705,20 +570,13 @@
      */
     @Test
     public void updateApChannelConfigWithAcsEnabled() throws Exception {
-        final long testFeatures = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT
-                | SoftApCapability.SOFTAP_FEATURE_BAND_6G_SUPPORTED
-                | SoftApCapability.SOFTAP_FEATURE_BAND_60G_SUPPORTED
-                | SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD;
-        mCapability = new SoftApCapability(testFeatures);
         Builder configBuilder = new SoftApConfiguration.Builder();
         configBuilder.setBand(SoftApConfiguration.BAND_5GHZ | SoftApConfiguration.BAND_2GHZ);
         when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt()))
-                .thenReturn(new ArrayList<>());
+        when(mWifiNative.getChannelsForBand(anyInt())).thenReturn(new int[0]);
         assertEquals(ApConfigUtil.SUCCESS,
                 ApConfigUtil.updateApChannelConfig(mWifiNative, mCoexManager, mResources,
-                        TEST_COUNTRY_CODE, configBuilder, configBuilder.build(),
-                        mCapability));
+                        TEST_COUNTRY_CODE, configBuilder, configBuilder.build(), true));
         assertEquals(SoftApConfiguration.BAND_5GHZ | SoftApConfiguration.BAND_2GHZ,
                 configBuilder.build().getBand());
         assertEquals(0, configBuilder.build().getChannel());
@@ -728,8 +586,7 @@
     public void testSoftApCapabilityInitWithResourceValue() throws Exception {
         long testFeatures = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT
                 | SoftApCapability.SOFTAP_FEATURE_BAND_6G_SUPPORTED
-                | SoftApCapability.SOFTAP_FEATURE_BAND_60G_SUPPORTED
-                | SoftApCapability.SOFTAP_FEATURE_IEEE80211_AX;
+                | SoftApCapability.SOFTAP_FEATURE_BAND_60G_SUPPORTED;
         SoftApCapability capability = new SoftApCapability(testFeatures);
         int test_max_client = 10;
         capability.setMaxSupportedClients(test_max_client);
@@ -741,16 +598,10 @@
                 .thenReturn(false);
         when(mResources.getBoolean(R.bool.config_wifiSofapClientForceDisconnectSupported))
                 .thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifi24ghzSupport)).thenReturn(false);
-        when(mResources.getBoolean(R.bool.config_wifi5ghzSupport)).thenReturn(false);
-        when(mResources.getBoolean(R.bool.config_wifiSoftap24ghzSupported)).thenReturn(false);
-        when(mResources.getBoolean(R.bool.config_wifiSoftap5ghzSupported)).thenReturn(false);
         when(mResources.getBoolean(R.bool.config_wifi6ghzSupport)).thenReturn(true);
         when(mResources.getBoolean(R.bool.config_wifi60ghzSupport)).thenReturn(true);
         when(mResources.getBoolean(R.bool.config_wifiSoftap6ghzSupported)).thenReturn(true);
         when(mResources.getBoolean(R.bool.config_wifiSoftap60ghzSupported)).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifiSoftapIeee80211axSupported)).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifiSoftapIeee80211beSupported)).thenReturn(false);
         assertEquals(ApConfigUtil.updateCapabilityFromResource(mContext),
                 capability);
     }
@@ -760,6 +611,7 @@
         WifiConfiguration wifiConfig = new WifiConfiguration();
         wifiConfig.SSID = "AndroidAP";
         wifiConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA2_PSK);
+        wifiConfig.preSharedKey = "1233443";
         assertNull(ApConfigUtil.fromWifiConfiguration(wifiConfig));
     }
 
@@ -805,15 +657,9 @@
         assertTrue(ApConfigUtil.checkConfigurationChangeNeedToRestart(currentConfig,
                 newConfig_ssidChanged));
         // Test BSSID changed
-        SoftApConfiguration.Builder newConfig_bssidChangedBuilder = new SoftApConfiguration
+        SoftApConfiguration newConfig_bssidChanged = new SoftApConfiguration
                 .Builder(newConfig_noChange)
-                .setBssid(testBssid);
-
-        if (SdkLevel.isAtLeastS()) {
-            newConfig_bssidChangedBuilder.setMacRandomizationSetting(
-                    SoftApConfiguration.RANDOMIZATION_NONE);
-        }
-        SoftApConfiguration newConfig_bssidChanged = newConfig_bssidChangedBuilder.build();
+                .setBssid(testBssid).build();
         assertTrue(ApConfigUtil.checkConfigurationChangeNeedToRestart(currentConfig,
                 newConfig_bssidChanged));
         // Test Passphrase Changed
@@ -971,7 +817,15 @@
         assertTrue(ApConfigUtil.checkSupportAllConfiguration(testConfigBuilder.build(),
                 mockSoftApCapability));
         if (SdkLevel.isAtLeastS()) {
-            // Test 60G not support
+            // Test 6G or 60G not support
+            testConfigBuilder.setChannels(
+                    new SparseIntArray(){{
+                        put(SoftApConfiguration.BAND_5GHZ, 149);
+                        put(SoftApConfiguration.BAND_6GHZ, 2);
+                    }});
+            assertFalse(ApConfigUtil.checkSupportAllConfiguration(testConfigBuilder.build(),
+                    mockSoftApCapability));
+
             testConfigBuilder.setChannels(
                     new SparseIntArray(){{
                         put(SoftApConfiguration.BAND_5GHZ, 149);
@@ -995,8 +849,6 @@
     @Test
     public void testGetAvailableChannelFreqsForBandWithDfsChannelWhenDeviceSupported()
             throws Exception {
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt())).thenReturn(null);
         when(mResources.getBoolean(R.bool.config_wifiSoftapAcsIncludeDfs))
                 .thenReturn(true);
         when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY))
@@ -1010,60 +862,4 @@
             assertTrue(Arrays.stream(TEST_5G_DFS_FREQS).anyMatch(n -> n == freq));
         }
     }
-
-    @Test
-    public void testCollectAllowedAcsChannels() throws Exception {
-        List<Integer>  resultList;
-
-        // Test with empty oem and caller configs
-        resultList = ApConfigUtil.collectAllowedAcsChannels(SoftApConfiguration.BAND_2GHZ, "",
-                new int[] {});
-        assertArrayEquals(new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14},
-                resultList.stream().mapToInt(x->x).toArray());
-
-        // Test with both oem and caller configs
-        resultList = ApConfigUtil.collectAllowedAcsChannels(SoftApConfiguration.BAND_2GHZ,
-                "1-6,8-9", new int[] {1, 5, 9, 10});
-        assertArrayEquals(new int[]{1, 5, 9},
-                resultList.stream().mapToInt(x->x).toArray());
-    }
-
-    @Test
-    public void testGetAvailableChannelFreqsForBandWithHalNotSupported()
-            throws Exception {
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.isHalSupported()).thenReturn(false);
-        when(mResources.getBoolean(R.bool.config_wifiSoftapAcsIncludeDfs))
-                .thenReturn(false);
-        when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ))
-                .thenReturn(ALLOWED_5G_FREQS);
-        List<Integer> result = ApConfigUtil.getAvailableChannelFreqsForBand(
-                SoftApConfiguration.BAND_5GHZ, mWifiNative, mResources, true);
-        // make sure we try to get available channels from wificond.
-        verify(mWifiNative).getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ);
-        verify(mWifiNative, never()).getUsableChannels(anyInt(), anyInt(), anyInt());
-        for (int freq : result) {
-            assertTrue(Arrays.stream(ALLOWED_5G_FREQS).anyMatch(n -> n == freq));
-        }
-    }
-
-    @Test
-    public void testGetAvailableChannelFreqsForBandWithHalgetUsableChannelsNotSupported()
-            throws Exception {
-        when(mWifiNative.isHalStarted()).thenReturn(true);
-        when(mWifiNative.isHalSupported()).thenReturn(true);
-        when(mResources.getBoolean(R.bool.config_wifiSoftapAcsIncludeDfs))
-                .thenReturn(false);
-        when(mWifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ))
-                .thenReturn(ALLOWED_5G_FREQS);
-        when(mWifiNative.getUsableChannels(anyInt(), anyInt(), anyInt())).thenReturn(null);
-        List<Integer> result = ApConfigUtil.getAvailableChannelFreqsForBand(
-                SoftApConfiguration.BAND_5GHZ, mWifiNative, mResources, true);
-        // make sure we try to get available channels from HAL and fallback to wificond.
-        verify(mWifiNative).getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ);
-        verify(mWifiNative).getUsableChannels(eq(WifiScanner.WIFI_BAND_5_GHZ), anyInt(), anyInt());
-        for (int freq : result) {
-            assertTrue(Arrays.stream(ALLOWED_5G_FREQS).anyMatch(n -> n == freq));
-        }
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/util/CertificateSubjectInfoTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/CertificateSubjectInfoTest.java
deleted file mode 100644
index ad0d0c7..0000000
--- a/service/tests/wifitests/src/com/android/server/wifi/util/CertificateSubjectInfoTest.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2021 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.server.wifi.util;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.server.wifi.WifiBaseTest;
-
-import org.junit.Test;
-
-/**
- * Unit tests for {@link com.android.server.wifi.util.CertificateSubjectInfo}.
- */
-@SmallTest
-public class CertificateSubjectInfoTest extends WifiBaseTest {
-
-    private static final String TEST_SUBJECT_INFO =
-            "CN=androidwifi.dev,1.2.840.113549.1.9.1=#1614696e666f40616e64726f6964776966692e646576,"
-            + "O=AndroidWiFi,L=TW,ST=Taiwan,C=TW";
-    private static final String TEST_COMMON_NAME = "androidwifi.dev";
-    private static final String TEST_COUNTRY = "TW";
-    private static final String TEST_STATE = "Taiwan";
-    private static final String TEST_LOCATION = "TW";
-    private static final String TEST_ORGANIZATION = "AndroidWiFi";
-    private static final String TEST_EMAIL = "info@androidwifi.dev";
-
-    /** Verifies that normal subject string could be parsed correctly. */
-    @Test
-    public void verifyNormalSubjectInfoString() {
-        CertificateSubjectInfo info = CertificateSubjectInfo.parse(TEST_SUBJECT_INFO);
-        assertEquals(info.commonName, TEST_COMMON_NAME);
-        assertEquals(info.organization, TEST_ORGANIZATION);
-        assertEquals(info.location, TEST_LOCATION);
-        assertEquals(info.state, TEST_STATE);
-        assertEquals(info.country, TEST_COUNTRY);
-        assertEquals(info.email, TEST_EMAIL);
-    }
-
-    /** Verifies that null is returned for a subject string without a common name. */
-    @Test
-    public void verifySubjectInfoStringWithoutCommonName() {
-        final String subjectInfo =
-                "C=TW,ST=Taiwan,L=TW,O=AndroidWiFi";
-        assertNull(CertificateSubjectInfo.parse(subjectInfo));
-    }
-
-    /** Verifies that escaped string can be restored correctly. */
-    @Test
-    public void testEscpaedSubjectString() {
-        final String subjectInfo =
-                "C=TW,ST=Taiwan,L=TW,O=AndroidWiFi,CN=commonName/emailAddress\\=test@wifi.com";
-        CertificateSubjectInfo info = CertificateSubjectInfo.parse(subjectInfo);
-        assertEquals("commonName/emailAddress=test@wifi.com", info.commonName);
-    }
-
-    /** Verifies that escaped string can be restored correctly. */
-    @Test
-    public void testEscpaedSubjectStringWithDoubleTrailingSlash() {
-        final String subjectInfo =
-                "C=TW,ST=Taiwan,L=TW,O=AndroidWiFi,CN=commonName/emailAddress=test@wifi.com\\\\";
-        CertificateSubjectInfo info = CertificateSubjectInfo.parse(subjectInfo);
-        assertEquals("commonName/emailAddress=test@wifi.com\\", info.commonName);
-    }
-
-    /** Verifies that invalid escaped string returns null. */
-    @Test
-    public void testInvalidEscpaedSubjectString() {
-        // trailing '\'
-        assertNull(CertificateSubjectInfo.parse(
-                "C=TW,ST=Taiwan,L=TW,O=AndroidWiFi,CN=commonName/emailAddress\\=test@wifi.com\\"));
-        // illegal escaped character 'z'
-        assertNull(CertificateSubjectInfo.parse(
-                "C=TW,ST=Taiwan,L=TW,O=AndroidWiFi,CN=Name/email\\=\\ztest@wifi.com"));
-    }
-}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java
index d8f1078..43169f1 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java
@@ -38,7 +38,6 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.util.Arrays;
-import java.util.List;
 
 /**
  * Unit tests for {@link com.android.server.wifi.util.InformationElementUtil}.
@@ -1208,24 +1207,6 @@
     }
 
     /**
-     * Verify that the expected Vendor Specific information element is parsed and retrieved from
-     * the list of IEs.
-     */
-    @Test
-    public void testVendorSpecificIEWithOneVsaAndOneNonVsa() throws Exception {
-        InformationElement ie1 = new InformationElement();
-        InformationElement ie2 = new InformationElement();
-        ie1.id = InformationElement.EID_VSA;
-        ie2.id = InformationElement.EID_COUNTRY;
-        ie1.bytes = new byte[] { (byte) 0x00, (byte) 0x01, (byte) 0x02, (byte) 0x03};
-        ie2.bytes = new byte[] { (byte) 0x04, (byte) 0x05, (byte) 0x06, (byte) 0x07};
-        List<InformationElementUtil.Vsa> vsas =
-                InformationElementUtil.getVendorSpecificIE(new InformationElement[] {ie1, ie2});
-        assertEquals(1, vsas.size());
-        assertArrayEquals(new byte[] {(byte) 0x00, (byte) 0x01, (byte) 0x02}, vsas.get(0).oui);
-    }
-
-    /**
      * Verify that the expected Interworking information element is parsed and retrieved from the
      * list of IEs. Uses an IE w/o the optional Venue Info.
      *
@@ -1822,171 +1803,37 @@
     }
 
     /**
-     * Tests for parsing RNR IE
-     * RNR format as described in IEEE 802.11 specs, Section 9.4.2.170
-     *
-     *              | ElementID | Length | Neighbor AP Information Fields |
-     * Octets:            1          1             variable
-     *
-     * Where Neighbor AP Information Fields is one or more Neighbor AP Information Field as,
-     *
-     *               | Header | Operating Class | Channel | TBTT Information Set |
-     * Octets:            2            1            1           variable
-     *
-     * The Header subfield is described as follows,
-     *
-     *            | Type  | Filtered AP | Reserved | Count | Length |
-     * Bits:         2          1           1          4       8
-     *
-     *
-     * Information Set is one or more TBTT Information fields, which is described as,
-     *
-     *         | Offset | BSSID  | Short-SSID | BSS Params | 20MHz PSD | MLD Params|
-     * Octets:     1      0 or 6    0 or 4        0 or 1      0 or 1      0 or 3
-     *
-     * The MLD Params are described as,
-     *       | MLD ID | Link ID | BSS Change Count | Reserved |
-     * Bits:     8        4              8              4
-     */
-
-    /**
-     * Verify that the expected RNR information element to be parsed correctly
-     */
-    @Test
-    public void parseRnrIe() throws Exception {
-        InformationElement ie = new InformationElement();
-        ie.id = InformationElement.EID_RNR;
-        ie.bytes = new byte[] {
-                (byte) 0x00,  (byte) 0x04, (byte) 81,   (byte) 11,   // First TBTT Info
-                (byte) 0x00,  (byte) 0x00, (byte) 0x01, (byte) 0x00, //  First Set
-                (byte) 0x10,  (byte) 0x04, (byte) 120,  (byte) 149,  // Second TBTT Info
-                (byte) 0x00,  (byte) 0x00, (byte) 0x02, (byte) 0x00, //  First Set
-                (byte) 0x00,  (byte) 0x22, (byte) 0x01, (byte) 0x00  //  Second Set
-        };
-        InformationElementUtil.Rnr rnr = new InformationElementUtil.Rnr();
-        rnr.from(ie);
-        assertTrue(rnr.isPresent());
-        assertEquals(2, rnr.getAffiliatedMloLinks().size());
-    }
-
-    /**
-     * Tests for parsing Multi-Link IE
-     *
-     * Multi-Link IE format as described in IEEE 802.11 specs, Section 9.4.2.312
-     *
-     *              | ElementID | Length | ExtendedID | Control | Common Info | Link Info |
-     * Octets:            1          1         1          2        Variable     variable
-     *
-     *
-     * Where Control field is described as,
-     *
-     *         | Type | Reserved | Presence Bitmap |
-     * Bits:      3        1            12
-     *
-     * Where the Presence Bitmap subfield is described as,
-     *
-     *        | LinkId | BSS change count | MedSync | EML cap | MLD cap | Reserved |
-     * Bits:      1            1               1         1         1         7
-     *
-     * Common Info filed as described in IEEE 802.11 specs, Section 9.4.2.312,
-     *
-     *        | Len | MLD Address | Link Id | BSS Change count | MedSync | EML Cap | MLD Cap |
-     * Octets:   1        6          0 or 1        0 or 1         0 or 2    0 or 2    0 or 2
-     *
-     * Link Info filed as described in IEEE 802.11 specs, Section 9.4.2.312,
-     *
-     *        | ID | Len | STA Control | STA Info | STA Profile |
-     * Octets:  1     1        2         variable    variable
-     *
-     * where STA Control subfield is described as,
-     *
-     *      | LinkId | Complete | MAC | Beacon Interval | DTIM | NSTR Link | NSTR Bitmap | R |
-     * Bits:    4          1       1          1             1        1            1        6
-     */
-
-    /**
-     * Verify that the expected Multi-Link information element with no link info to be parsed
-     * correctly.
-     */
-    @Test
-    public void parseMultiLinkIeNoLinkInfo() throws Exception {
-        InformationElement ie = new InformationElement();
-        ie.id = InformationElement.EID_EXTENSION_PRESENT;
-        ie.idExt = InformationElement.EID_EXT_MULTI_LINK;
-
-        ie.bytes = new byte[] {
-                (byte) 0x10,  (byte) 0x00,                              // Control
-                (byte) 0x08,  (byte) 0x02, (byte) 0x34, (byte) 0x56,    // Common Info
-                (byte) 0x78,  (byte) 0x9A, (byte) 0xBC, (byte) 0x01
-        };
-        InformationElementUtil.MultiLink multiLink = new InformationElementUtil.MultiLink();
-        multiLink.from(ie);
-        assertTrue(multiLink.isPresent());
-        assertEquals(1, multiLink.getLinkId());
-        assertTrue(multiLink.getAffiliatedLinks().isEmpty());
-    }
-
-    /**
-     * Verify that the expected Multi-Link information element with link info to be parsed
-     * correctly.
-     */
-    @Test
-    public void parseMultiLinkIeWithLinkInfo() throws Exception {
-        InformationElement ie = new InformationElement();
-        ie.id = InformationElement.EID_EXTENSION_PRESENT;
-        ie.idExt = InformationElement.EID_EXT_MULTI_LINK;
-
-        ie.bytes = new byte[] {
-                (byte) 0x10,  (byte) 0x00,                              // Control
-                (byte) 0x08,  (byte) 0x02, (byte) 0x34, (byte) 0x56,    // Common Info
-                (byte) 0x78,  (byte) 0x9A, (byte) 0xBC, (byte) 0x01,
-                (byte) 0x00,  (byte) 0x08, (byte) 0x02, (byte) 0x00,    // First Link Info
-                (byte) 0x00,  (byte) 0x00, (byte) 0x00, (byte) 0x00,    //
-                (byte) 0x00,  (byte) 0x08, (byte) 0x03, (byte) 0x00,    // Second Link Info
-                (byte) 0x00,  (byte) 0x00, (byte) 0x00, (byte) 0x00     //
-        };
-        InformationElementUtil.MultiLink multiLink = new InformationElementUtil.MultiLink();
-        multiLink.from(ie);
-        assertTrue(multiLink.isPresent());
-        assertEquals(1, multiLink.getLinkId());
-        assertEquals(2, multiLink.getAffiliatedLinks().size());
-    }
-
-    /**
      * verify determineMode for various combinations.
      */
     @Test
     public void determineMode() throws Exception {
         assertEquals(InformationElementUtil.WifiMode.MODE_11B,
                 InformationElementUtil.WifiMode.determineMode(
-                        2412, 11000000, false, false, false, false, false));
+                        2412, 11000000, false, false, false, false));
         assertEquals(InformationElementUtil.WifiMode.MODE_11G,
                 InformationElementUtil.WifiMode.determineMode(
-                        2412, 54000000, false, false, false, false, false));
+                        2412, 54000000, false, false, false, false));
         assertEquals(InformationElementUtil.WifiMode.MODE_11A,
                 InformationElementUtil.WifiMode.determineMode(
-                        5180, 54000000, false, false, false, false, false));
+                        5180, 54000000, false, false, false, false));
         assertEquals(InformationElementUtil.WifiMode.MODE_11G,
                 InformationElementUtil.WifiMode.determineMode(
-                        2412, 54000000, false, false, false, false, true));
+                        2412, 54000000, false, false, false, true));
         assertEquals(InformationElementUtil.WifiMode.MODE_11N,
                 InformationElementUtil.WifiMode.determineMode(
-                        2412, 72000000, false, false, false, true, false));
+                        2412, 72000000, false, false, true, false));
         assertEquals(InformationElementUtil.WifiMode.MODE_11N,
                 InformationElementUtil.WifiMode.determineMode(
-                        2412, 72000000, false, false, true, true, false));
+                        2412, 72000000, false, true, true, false));
         assertEquals(InformationElementUtil.WifiMode.MODE_11AC,
                 InformationElementUtil.WifiMode.determineMode(
-                        5180, 866000000, false, false, true, true, false));
+                        5180, 866000000, false, true, true, false));
         assertEquals(InformationElementUtil.WifiMode.MODE_11AX,
                 InformationElementUtil.WifiMode.determineMode(
-                        5180, 866000000, false, true, true, true, false));
+                       5180, 866000000, true, true, true, false));
         assertEquals(InformationElementUtil.WifiMode.MODE_11AX,
                 InformationElementUtil.WifiMode.determineMode(
-                        2412, 72000000, false, true, true, true, false));
-        assertEquals(InformationElementUtil.WifiMode.MODE_11BE,
-                InformationElementUtil.WifiMode.determineMode(
-                        5180, 866000000, true, true, true, true, false));
+                      2412, 72000000, true, true, true, false));
     }
 
     /**
diff --git a/service/tests/wifitests/src/com/android/server/wifi/util/LastCallerInfoManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/LastCallerInfoManagerTest.java
index 634846f..7dd4318 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/util/LastCallerInfoManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/util/LastCallerInfoManagerTest.java
@@ -18,8 +18,6 @@
 
 import static org.junit.Assert.*;
 
-import android.net.wifi.WifiManager;
-
 import androidx.test.filters.SmallTest;
 
 import com.android.server.wifi.WifiBaseTest;
@@ -42,7 +40,7 @@
      */
     @Test
     public void testPutAndDump() throws Exception {
-        mLastCallerInfoManager.put(WifiManager.API_SOFT_AP, 10, 11, 12, "Package", true);
+        mLastCallerInfoManager.put(LastCallerInfoManager.SOFT_AP, 10, 11, 12, "Package", true);
 
         StringWriter sw = new StringWriter();
         mLastCallerInfoManager.dump(new PrintWriter(sw));
@@ -53,17 +51,4 @@
                 + ": " + serviceDump + "\n", logLineRegex.matcher(serviceDump).find());
     }
 
-    @Test
-    public void testGet() {
-        // expect null before anything is set
-        assertNull(mLastCallerInfoManager.get(WifiManager.API_SCANNING_ENABLED));
-
-        // Test getting some LastCallerInfo
-        mLastCallerInfoManager.put(WifiManager.API_SCANNING_ENABLED, 10, 11, 12, "Package", true);
-        LastCallerInfoManager.LastCallerInfo lastCallerInfo =
-                mLastCallerInfoManager.get(WifiManager.API_SCANNING_ENABLED);
-        assertEquals("Package", lastCallerInfo.getPackageName());
-        assertTrue(lastCallerInfo.getToggleState());
-    }
-
 }
diff --git a/framework/tests/src/android/net/wifi/util/ScanResultUtilTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/ScanResultUtilTest.java
similarity index 65%
rename from framework/tests/src/android/net/wifi/util/ScanResultUtilTest.java
rename to service/tests/wifitests/src/com/android/server/wifi/util/ScanResultUtilTest.java
index eb136b2..a7585c8 100644
--- a/framework/tests/src/android/net/wifi/util/ScanResultUtilTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/util/ScanResultUtilTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021 The Android Open Source Project
+ * Copyright (C) 2016 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.
@@ -14,14 +14,10 @@
  * limitations under the License.
  */
 
-package android.net.wifi.util;
+package com.android.server.wifi.util;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
 
-import android.net.MacAddress;
 import android.net.wifi.ScanResult;
 import android.net.wifi.ScanResult.InformationElement;
 import android.net.wifi.WifiConfiguration;
@@ -29,17 +25,70 @@
 
 import androidx.test.filters.SmallTest;
 
+import com.android.server.wifi.ScanDetail;
+import com.android.server.wifi.WifiBaseTest;
+import com.android.server.wifi.hotspot2.NetworkDetail;
+
 import org.junit.Test;
 
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 /**
- * Unit tests for {@link ScanResultUtil}.
+ * Unit tests for {@link com.android.server.wifi.util.ScanResultUtil}.
  */
 @SmallTest
-public class ScanResultUtilTest {
+public class ScanResultUtilTest extends WifiBaseTest {
+
+    @Test
+    public void convertScanResult() {
+        final String ssid = "SOME SsId";
+
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
+                "ab:cd:01:ef:45:89", 1245, 0, "", -78, 2450, 1025, 22, 33, 20, 0, 0, true);
+
+        input.informationElements = new InformationElement[] {
+            createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8))
+        };
+
+        ScanDetail output = ScanResultUtil.toScanDetail(input);
+
+        validateScanDetail(input, output);
+    }
+
+    @Test
+    public void convertScanResultWithAnqpLines() {
+        final String ssid = "SOME SsId";
+
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
+                "ab:cd:01:ef:45:89", 1245, 0, "some caps", -78, 2450, 1025, 22, 33, 20, 0, 0, true);
+
+        input.informationElements = new InformationElement[] {
+            createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8))
+        };
+        input.anqpLines = Arrays.asList("LINE 1", "line 2", "Line 3");
+
+        ScanDetail output = ScanResultUtil.toScanDetail(input);
+
+        validateScanDetail(input, output);
+    }
+
+    @Test
+    public void convertScanResultWithoutWifiSsid() {
+        final String ssid = "Another SSid";
+        ScanResult input = new ScanResult(ssid, "ab:cd:01:ef:45:89", 1245, 0, "other caps",
+                -78, 2450, 1025, 22, 33, 20, 0, 0, true);
+        input.informationElements = new InformationElement[] {
+            createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8))
+        };
+
+        ScanDetail output = ScanResultUtil.toScanDetail(input);
+
+        validateScanDetail(input, output);
+    }
+
     @Test
     public void testNetworkCreationFromScanResult() {
         final String ssid = "Another SSid";
@@ -52,47 +101,47 @@
 
         scanResult.capabilities = "";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_OPEN,
                 config.getDefaultSecurityParams().getSecurityType());
 
         scanResult.capabilities = "WEP";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_WEP,
                 config.getDefaultSecurityParams().getSecurityType());
 
         scanResult.capabilities = "PSK";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_PSK,
                 config.getDefaultSecurityParams().getSecurityType());
 
         // WPA2 Enterprise network with none MFP capability.
         scanResult.capabilities = "[EAP/SHA1]";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_EAP,
                 config.getDefaultSecurityParams().getSecurityType());
 
         // WPA2 Enterprise network with MFPC.
         scanResult.capabilities = "[EAP/SHA1][MFPC]";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_EAP,
                 config.getDefaultSecurityParams().getSecurityType());
 
         // WPA2 Enterprise network with MFPR.
         scanResult.capabilities = "[EAP/SHA1][MFPR]";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_EAP,
                 config.getDefaultSecurityParams().getSecurityType());
 
         // WPA3 Enterprise transition network
         scanResult.capabilities = "[RSN-EAP/SHA1+EAP/SHA256][MFPC]";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_EAP,
                 config.getDefaultSecurityParams().getSecurityType());
         assertTrue(config.isSecurityType(WifiConfiguration.SECURITY_TYPE_EAP));
@@ -101,7 +150,7 @@
         // WPA3 Enterprise only network
         scanResult.capabilities = "[RSN-EAP/SHA256][MFPC][MFPR]";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE,
                 config.getDefaultSecurityParams().getSecurityType());
 
@@ -109,26 +158,26 @@
         // Fallback to WPA2 Enterprise
         scanResult.capabilities = "[RSN-EAP/SHA1+EAP/SHA256][MFPC][MFPR]";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_EAP,
                 config.getDefaultSecurityParams().getSecurityType());
 
         // WPA3 Enterprise only network
         scanResult.capabilities = "[RSN-SUITE_B_192][MFPR]";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE_192_BIT,
                 config.getDefaultSecurityParams().getSecurityType());
 
         scanResult.capabilities = "WAPI-PSK";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_WAPI_PSK,
                 config.getDefaultSecurityParams().getSecurityType());
 
         scanResult.capabilities = "WAPI-CERT";
         config = ScanResultUtil.createNetworkFromScanResult(scanResult);
-        assertEquals(config.SSID, ScanResultUtil.createQuotedSsid(ssid));
+        assertEquals(config.SSID, ScanResultUtil.createQuotedSSID(ssid));
         assertEquals(WifiConfiguration.SECURITY_TYPE_WAPI_CERT,
                 config.getDefaultSecurityParams().getSecurityType());
     }
@@ -141,7 +190,7 @@
         final String ssid = "WPA3-Transition";
         String caps = "[WPA2-FT/PSK-CCMP][RSN-FT/PSK+PSK-SHA256+SAE+FT/SAE-CCMP][ESS][WPS]";
 
-        ScanResult input = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
 
@@ -160,7 +209,7 @@
         final String ssid = "WPA3-Transition";
         String caps = "[WPA2-FT/PSK+PSK+SAE+FT/SAE-CCMP][ESS][WPS]";
 
-        ScanResult input = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
 
@@ -179,7 +228,7 @@
         final String ssid = "WPA2-Network";
         String caps = "[WPA2-FT/PSK+PSK][ESS][WPS]";
 
-        ScanResult input = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
 
@@ -198,7 +247,7 @@
         final String ssid = "WPA3-Network";
         String caps = "[WPA2-FT/SAE+SAE][ESS][WPS]";
 
-        ScanResult input = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
 
@@ -217,7 +266,7 @@
         final String ssid = "FT-EAP-AP";
         String caps = " [WPA2-FT/EAP-CCMP][RSN-FT/EAP-CCMP][ESS]";
 
-        ScanResult input = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
 
@@ -237,7 +286,7 @@
         String caps = "[WPA2-EAP-FILS-SHA256-CCMP]"
                 + "[RSN-EAP-FILS-SHA256-CCMP][ESS]";
 
-        ScanResult input = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
 
@@ -258,7 +307,7 @@
         String caps = "[WPA2-EAP-FILS-SHA384-CCMP]"
                 + "[RSN-EAP-FILS-SHA384-CCMP][ESS]";
 
-        ScanResult input = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
 
@@ -278,7 +327,7 @@
         final String ssid = "EAP-NETWORK";
         String caps = "[EAP/SHA1][ESS]";
 
-        ScanResult input = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
 
@@ -292,16 +341,37 @@
     }
 
     private void verifyPasspointNetwork(
-            String caps, boolean isPasspoint,
+            String caps, boolean isInterworking, NetworkDetail.HSRelease hsRel,
             boolean isR1R2Network, boolean isR3Network) {
         final String ssid = "PASSPOINT-NETWORK";
+        List<InformationElement> ies = new ArrayList<>();
+        ies.add(createIE(InformationElement.EID_SSID, ssid.getBytes(StandardCharsets.UTF_8)));
+        if (isInterworking) {
+            ies.add(createIE(InformationElement.EID_INTERWORKING, new byte[] {(byte) 0x10}));
+        }
+        if (null != hsRel) {
+            byte releaseByte = (byte) 0xff;
+            switch (hsRel) {
+                case R1:
+                    releaseByte = (byte) 0x0;
+                    break;
+                case R2:
+                    releaseByte = (byte) 0x10;
+                    break;
+                case R3:
+                    releaseByte = (byte) 0x20;
+                    break;
+            }
+            ies.add(
+                    createIE(InformationElement.EID_VSA, new byte[] {
+                            (byte) 0x50, (byte) 0x6f, (byte) 0x9a, (byte) 0x10, releaseByte}));
+        }
 
-        ScanResult input = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
-        if (isPasspoint) {
-            input.setFlag(ScanResult.FLAG_PASSPOINT_NETWORK);
-        }
+        input.informationElements = new InformationElement[ies.size()];
+        input.informationElements = ies.toArray(input.informationElements);
 
         assertTrue(ScanResultUtil.isScanResultForEapNetwork(input));
         assertEquals(isR1R2Network, ScanResultUtil.isScanResultForPasspointR1R2Network(input));
@@ -314,7 +384,7 @@
     @Test
     public void testPasspointR1NetworkCheck() {
         String caps = "[EAP/SHA1][ESS]";
-        verifyPasspointNetwork(caps, true, true, false);
+        verifyPasspointNetwork(caps, true, NetworkDetail.HSRelease.R1, true, false);
     }
 
     /**
@@ -323,7 +393,7 @@
     @Test
     public void testPasspointR2NetworkCheck() {
         String caps = "[EAP/SHA1][ESS]";
-        verifyPasspointNetwork(caps, true, true, false);
+        verifyPasspointNetwork(caps, true, NetworkDetail.HSRelease.R2, true, false);
     }
 
     /**
@@ -333,16 +403,25 @@
     public void testPasspointR3NetworkCheck() {
         String caps = "[EAP/SHA1][ESS][MFPR]";
         // R3 network is also a valid R1/R2 network.
-        verifyPasspointNetwork(caps, true, true, true);
+        verifyPasspointNetwork(caps, true, NetworkDetail.HSRelease.R3, true, true);
     }
 
     /**
-     * Test that an EAP network without the passpoint flag set is not a passpoint network
+     * Test that an EAP network with HS release, but no interwork set.
      */
     @Test
-    public void testEapNetworkWithoutPasspointFlagNotAPasspointNetwork() {
+    public void testEapNetworkWithoutInterworkNotAPasspointNetwork() {
         String caps = "[EAP/SHA1][ESS]";
-        verifyPasspointNetwork(caps, false, false, false);
+        verifyPasspointNetwork(caps, false, NetworkDetail.HSRelease.R3, false, false);
+    }
+
+    /**
+     * Test that an EAP network with interwork set, but no HS release.
+     */
+    @Test
+    public void testEapNetworkWithoutHsReleaseNotAPasspointNetwork() {
+        String caps = "[EAP/SHA1][ESS]";
+        verifyPasspointNetwork(caps, true, null, false, false);
     }
 
     /**
@@ -353,7 +432,7 @@
         final String ssid = "UnknownAkm-Network";
         String caps = "[RSN-?-TKIP+CCMP][ESS][WPS]";
 
-        ScanResult input = new ScanResult(WifiSsid.fromUtf8Text(ssid), ssid,
+        ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid,
                 "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0,
                 0, true);
 
@@ -402,41 +481,38 @@
         assertNull(config);
     }
 
-    /**
-     * Verify the logic for redacting octets from a BSSID.
-     */
-    @Test
-    public void verifyRedactBssid() throws Exception {
-        // Valid case - 0 redacted octets
-        String bssidStr = "AB:CD:01:EF:45:89";
-        MacAddress bssid = MacAddress.fromString(bssidStr);
-        String redactedBssid = ScanResultUtil.redactBssid(bssid, 0);
-        assertEquals(bssidStr, redactedBssid);
-
-        // Valid case - 4 redacted octets
-        String expectedRedactedBssid = "xx:xx:xx:xx:" + bssidStr.substring(12);
-        redactedBssid = ScanResultUtil.redactBssid(bssid, 4);
-        assertEquals(expectedRedactedBssid, redactedBssid);
-
-        // Valid case - 6 redacted octets
-        expectedRedactedBssid = "xx:xx:xx:xx:xx:xx";
-        redactedBssid = ScanResultUtil.redactBssid(bssid, 6);
-        assertEquals(expectedRedactedBssid, redactedBssid);
-
-        // Invalid number of redacted octets - should default to 4 redacted octets
-        expectedRedactedBssid = "xx:xx:xx:xx:" + bssidStr.substring(12);
-        redactedBssid = ScanResultUtil.redactBssid(bssid, 7);
-        assertEquals(expectedRedactedBssid, redactedBssid);
-
-        // Null bssid - should return an empty string
-        redactedBssid = ScanResultUtil.redactBssid(null, 4);
-        assertEquals("", redactedBssid);
-    }
-
     private static InformationElement createIE(int id, byte[] bytes) {
         InformationElement ie = new InformationElement();
         ie.id = id;
         ie.bytes = bytes;
         return ie;
     }
+
+    private static void validateScanDetail(ScanResult input, ScanDetail output) {
+        assertNotNull("NetworkDetail was null", output.getNetworkDetail());
+        assertNotNull("ScanResult was null", output.getScanResult());
+        assertEquals("NetworkDetail SSID", input.SSID,
+                output.getNetworkDetail().getSSID());
+        assertEquals("ScanResult SSID", input.SSID,
+                output.getScanResult().SSID);
+        assertEquals("ScanResult wifiSsid", input.wifiSsid,
+                output.getScanResult().wifiSsid);
+        assertEquals("getSSID", input.SSID, output.getSSID());
+        assertEquals("NetworkDetail BSSID", input.BSSID,
+                output.getNetworkDetail().getBSSIDString());
+        assertEquals("getBSSIDString", input.BSSID, output.getBSSIDString());
+        assertEquals("ScanResult frequency", input.frequency,
+                output.getScanResult().frequency);
+        assertEquals("ScanResult level", input.level,
+                output.getScanResult().level);
+        assertEquals("ScanResult capabilities", input.capabilities,
+                output.getScanResult().capabilities);
+        assertEquals("ScanResult timestamp", input.timestamp,
+                output.getScanResult().timestamp);
+        assertArrayEquals("ScanResult information elements", input.informationElements,
+                output.getScanResult().informationElements);
+        assertEquals("ScanResult anqp lines", input.anqpLines,
+                output.getScanResult().anqpLines);
+    }
+
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/util/StringUtilTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/StringUtilTest.java
index 37aeb2d..db61686 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/util/StringUtilTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/util/StringUtilTest.java
@@ -16,7 +16,6 @@
 
 package com.android.server.wifi.util;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
@@ -26,9 +25,6 @@
 
 import org.junit.Test;
 
-import java.util.Calendar;
-import java.util.TimeZone;
-
 /**
  * Unit tests for {@link com.android.server.wifi.util.StringUtil}.
  */
@@ -122,30 +118,4 @@
         assertFalse(StringUtil.isAsciiPrintable(new byte[]{-128}));
         assertFalse(StringUtil.isAsciiPrintable(new byte[]{-1}));
     }
-
-    @Test
-    public void verifyCalendarToStringFormat() throws Exception {
-        Calendar c = Calendar.getInstance();
-        c.setTimeZone(TimeZone.getTimeZone("UTC"));
-        c.setTimeInMillis(1654647373799L);
-        assertEquals("6-8 0:16:13.799", StringUtil.calendarToString(c));
-    }
-
-    @Test
-    public void verifyDoubleToStringFormat() throws Exception {
-        assertEquals("3", StringUtil.doubleToString(3.1415926, 0));
-        assertEquals("3.1", StringUtil.doubleToString(3.1415926, 1));
-        assertEquals("3.14", StringUtil.doubleToString(3.1415926, 2));
-        assertEquals("-3", StringUtil.doubleToString(-3.1415926, 0));
-        assertEquals("-3.1", StringUtil.doubleToString(-3.1415926, 1));
-        assertEquals("-3.14", StringUtil.doubleToString(-3.1415926, 2));
-        assertEquals("-65.03", StringUtil.doubleToString(-65.03218, 2));
-        assertEquals("-65.00", StringUtil.doubleToString(-65.00018, 2));
-        assertEquals("199.001", StringUtil.doubleToString(199.00181, 3));
-        assertEquals("-199.00", StringUtil.doubleToString(-199.00181, 2));
-        assertEquals("0", StringUtil.doubleToString(0.0, 0));
-        assertEquals("0.0", StringUtil.doubleToString(0.0, 1));
-        assertEquals("-99.0099", StringUtil.doubleToString(-99.0099, 4));
-        assertEquals("Err", StringUtil.doubleToString(-99.0099, 5));
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/util/WifiHandlerTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/WifiHandlerTest.java
new file mode 100644
index 0000000..edbe39d
--- /dev/null
+++ b/service/tests/wifitests/src/com/android/server/wifi/util/WifiHandlerTest.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2016 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.server.wifi.util;
+
+import static org.mockito.Matchers.contains;
+import static org.mockito.Mockito.verify;
+
+import android.os.Looper;
+import android.os.Message;
+import android.os.test.TestLooper;
+
+import androidx.test.filters.SmallTest;
+
+import com.android.server.wifi.FakeWifiLog;
+import com.android.server.wifi.WifiBaseTest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.mockito.MockitoAnnotations;
+import org.mockito.Spy;
+
+/** Unit tests for {@link WifiHandler}. */
+@RunWith(JUnit4.class)
+@SmallTest
+public class WifiHandlerTest extends WifiBaseTest {
+    private static final String TAG = "WifiHandlerTest";
+    private WifiHandler mCodeUnderTest;
+    @Spy FakeWifiLog mWifiLog;
+    TestLooper mLooper;
+
+    private class WifiHandlerTestClass extends WifiHandler {
+        WifiHandlerTestClass(String tag, Looper looper) {
+            super(tag, looper);
+            super.setWifiLog(mWifiLog);
+        }
+    }
+
+    @Before public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mLooper = new TestLooper();
+        mCodeUnderTest = new WifiHandlerTestClass(TAG, mLooper.getLooper());
+    }
+
+    @Test public void testHandleMessage() {
+        Message msg = Message.obtain();
+        msg.what = 0;
+        msg.sendingUid = 0;
+        mCodeUnderTest.handleMessage(msg);
+        verify(mWifiLog).trace(contains("message"));
+    }
+}
diff --git a/service/tests/wifitests/src/com/android/server/wifi/util/WifiPermissionsUtilTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/WifiPermissionsUtilTest.java
index 33bedd4..6c6b7de 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/util/WifiPermissionsUtilTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/util/WifiPermissionsUtilTest.java
@@ -16,16 +16,9 @@
 
 package com.android.server.wifi.util;
 
-import static android.Manifest.permission.ACCESS_FINE_LOCATION;
-import static android.Manifest.permission.NEARBY_WIFI_DEVICES;
-import static android.Manifest.permission.RENOUNCE_PERMISSIONS;
-import static android.content.pm.PackageManager.GET_PERMISSIONS;
-import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES;
-
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.nullable;
@@ -33,7 +26,6 @@
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
@@ -42,25 +34,17 @@
 import android.Manifest;
 import android.app.AppOpsManager;
 import android.app.admin.DevicePolicyManager;
-import android.app.admin.WifiSsidPolicy;
-import android.content.AttributionSource;
 import android.content.ComponentName;
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
-import android.content.res.Resources;
 import android.location.LocationManager;
 import android.net.NetworkStack;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiSsid;
 import android.os.Build;
 import android.os.UserHandle;
 import android.os.UserManager;
-import android.permission.PermissionManager;
 import android.provider.Settings;
-import android.util.ArraySet;
 
 import androidx.test.filters.SmallTest;
 
@@ -70,7 +54,6 @@
 import com.android.server.wifi.FrameworkFacade;
 import com.android.server.wifi.WifiBaseTest;
 import com.android.server.wifi.WifiInjector;
-import com.android.wifi.resources.R;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -82,10 +65,7 @@
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
 
-import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashMap;
-import java.util.Set;
 
 /** Unit tests for {@link WifiPermissionsUtil}. */
 @RunWith(JUnit4.class)
@@ -99,31 +79,25 @@
     @Mock private FrameworkFacade mMockFrameworkFacade;
     @Mock private PackageManager mMockPkgMgr;
     @Mock private ApplicationInfo mMockApplInfo;
-    @Mock private PackageInfo mPackagePermissionInfo;
     @Mock private AppOpsManager mMockAppOps;
     @Mock private UserManager mMockUserManager;
     @Mock private ContentResolver mMockContentResolver;
     @Mock private WifiInjector mWifiInjector;
     @Mock private LocationManager mLocationManager;
     @Mock private DevicePolicyManager mDevicePolicyManager;
-    @Mock private PermissionManager mPermissionManager;
     @Mock private PackageManager mPackageManager;
     @Spy private FakeWifiLog mWifiLog;
-    @Mock private Context mUserContext;
 
     private static final String TEST_WIFI_STACK_APK_NAME = "com.android.wifi";
     private static final String TEST_PACKAGE_NAME = "com.google.somePackage";
     private static final String TEST_FEATURE_ID = "com.google.someFeature";
-    private static final String TEST_SSID = "\"GoogleGuest\"";
     private static final String INVALID_PACKAGE  = "BAD_PACKAGE";
     private static final int MANAGED_PROFILE_UID = 1100000;
     private static final int OTHER_USER_UID = 1200000;
-    private static final int TEST_NETWORK_ID = 54;
     private static final boolean CHECK_LOCATION_SETTINGS = false;
     private static final boolean IGNORE_LOCATION_SETTINGS = true;
     private static final boolean DONT_HIDE_FROM_APP_OPS = false;
     private static final boolean HIDE_FROM_APP_OPS = true;
-    private static final int TEST_CALLING_UID = 1000;
 
     private final String mMacAddressPermission = "android.permission.PEERS_MAC_ADDRESS";
     private final String mInteractAcrossUsersFullPermission =
@@ -134,8 +108,6 @@
             Manifest.permission.ACCESS_FINE_LOCATION;
     private final String mManifestStringHardware =
             Manifest.permission.LOCATION_HARDWARE;
-    private final String mScanWithoutLocation =
-            Manifest.permission.RADIO_SCAN_WITHOUT_LOCATION;
 
     // Test variables
     private int mWifiScanAllowApps;
@@ -1031,52 +1003,6 @@
     }
 
     /**
-     * Verifies the helper method exposed for checking if the calling uid is a ProfileOwner
-     * of an organization owned device.
-     */
-    @Test
-    public void testIsProfileOwnerOfOrganizationOwnedDevice() throws Exception {
-        setupMocks();
-        WifiPermissionsUtil wifiPermissionsUtil = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-
-        when(mMockContext.createPackageContextAsUser(
-                TEST_WIFI_STACK_APK_NAME, 0, UserHandle.getUserHandleForUid(MANAGED_PROFILE_UID)))
-                .thenReturn(mMockContext);
-        when(mMockContext.getSystemService(DevicePolicyManager.class))
-                .thenReturn(mDevicePolicyManager);
-
-        when(mDevicePolicyManager.isOrganizationOwnedDeviceWithManagedProfile())
-                .thenReturn(true);
-        String[] packageNames = {TEST_PACKAGE_NAME};
-        when(mMockContext.getPackageManager().getPackagesForUid(MANAGED_PROFILE_UID))
-                .thenReturn(packageNames);
-
-        when(mDevicePolicyManager.isProfileOwnerApp(TEST_PACKAGE_NAME)).thenReturn(true);
-        assertTrue(wifiPermissionsUtil.isProfileOwnerOfOrganizationOwnedDevice(
-                MANAGED_PROFILE_UID));
-
-        when(mDevicePolicyManager.isProfileOwnerApp(TEST_PACKAGE_NAME)).thenReturn(false);
-        assertFalse(wifiPermissionsUtil.isProfileOwnerOfOrganizationOwnedDevice(
-                MANAGED_PROFILE_UID));
-        when(mDevicePolicyManager.isProfileOwnerApp(TEST_PACKAGE_NAME)).thenReturn(true);
-
-        // Package does not exist for uid.
-        when(mMockContext.getPackageManager().getPackagesForUid(MANAGED_PROFILE_UID))
-                .thenReturn(null);
-        assertFalse(wifiPermissionsUtil.isProfileOwnerOfOrganizationOwnedDevice(
-                MANAGED_PROFILE_UID));
-        when(mMockContext.getPackageManager().getPackagesForUid(MANAGED_PROFILE_UID))
-                .thenReturn(packageNames);
-
-        // DevicePolicyManager does not exist.
-        when(mMockContext.getSystemService(DevicePolicyManager.class))
-                .thenReturn(null);
-        assertFalse(wifiPermissionsUtil.isProfileOwnerOfOrganizationOwnedDevice(
-                MANAGED_PROFILE_UID));
-    }
-
-    /**
      * Test case setting: caller does not have Location permission.
      * Expect a SecurityException
      */
@@ -1126,7 +1052,7 @@
      * Validate no Exceptions are thrown - has all permissions & don't note in app-ops.
      */
     @Test
-    public void testCanAccessScanResultsForWifiScanner_HideFromAppOps()
+    public void testCannotAccessScanResultsForWifiScanner_HideFromAppOps()
             throws Exception {
         mThrowSecurityException = false;
         mIsLocationEnabled = true;
@@ -1299,13 +1225,13 @@
      * Validate no Exceptions are thrown - has all permissions & ignores location settings.
      */
     @Test
-    public void testCanAccessScanResultsForWifiScanner_IgnoreLocationSettings()
+    public void testCannotAccessScanResultsForWifiScanner_IgnoreLocationSettings()
             throws Exception {
         mThrowSecurityException = false;
         mIsLocationEnabled = false;
         mFineLocationPermission = PackageManager.PERMISSION_GRANTED;
         mHardwareLocationPermission = PackageManager.PERMISSION_GRANTED;
-        mAllowFineLocationApps = AppOpsManager.MODE_IGNORED;
+        mAllowFineLocationApps = AppOpsManager.MODE_ALLOWED;
         mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
         mUid = MANAGED_PROFILE_UID;
         setupTestCase();
@@ -1313,8 +1239,6 @@
                 mMockContext, mMockUserManager, mWifiInjector);
         codeUnderTest.enforceCanAccessScanResultsForWifiScanner(TEST_PACKAGE_NAME, TEST_FEATURE_ID,
                 mUid, IGNORE_LOCATION_SETTINGS, DONT_HIDE_FROM_APP_OPS);
-        verify(mMockAppOps).noteOp(AppOpsManager.OPSTR_FINE_LOCATION, mUid, TEST_PACKAGE_NAME,
-                TEST_FEATURE_ID, null);
     }
 
     /**
@@ -1371,189 +1295,13 @@
                 any(Context.class), eq(Settings.Secure.LOCATION_MODE), anyInt());
     }
 
-    @Test(expected = SecurityException.class)
-    public void testEnforceNearbyDevicesPermission_InvalidAttributionSourceFail() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(false);
-
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-        codeUnderTest.enforceNearbyDevicesPermission(attributionSource, false, "");
-    }
-
-    @Test(expected = SecurityException.class)
-    public void testEnforceNearbyDevicesPermission_NearbyDevicesNotGrantedFail() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(mPermissionManager.checkPermissionForDataDelivery(eq(NEARBY_WIFI_DEVICES),
-                eq(attributionSource), any())).thenReturn(PermissionManager.PERMISSION_SOFT_DENIED);
-
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-        codeUnderTest.enforceNearbyDevicesPermission(attributionSource, false, "");
-    }
-
-    /**
-     * Verify that when checkForLocation = true, a security Exception will get thrown if the calling
-     * app has no location permission and doesn't disavow location.
-     * @throws Exception
-     */
-    @Test(expected = SecurityException.class)
-    public void testEnforceNearbyDevicesPermission_LocationCheckFail() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.getRenouncedPermissions()).thenReturn(Collections.EMPTY_SET);
-        mPackagePermissionInfo.requestedPermissions = new String[0];
-        mPackagePermissionInfo.requestedPermissionsFlags = new int[0];
-        when(mPermissionManager.checkPermissionForDataDelivery(eq(NEARBY_WIFI_DEVICES),
-                eq(attributionSource), any())).thenReturn(PermissionManager.PERMISSION_GRANTED);
-        when(mPermissionManager.checkPermissionForDataDelivery(
-                eq(Manifest.permission.ACCESS_FINE_LOCATION), eq(attributionSource), any()))
-                .thenReturn(PermissionManager.PERMISSION_SOFT_DENIED);
-
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-
-        codeUnderTest.enforceNearbyDevicesPermission(attributionSource, true, "");
-    }
-
-    @Test
-    public void testEnforceNearbyDevicesPermission_RenounceLocationBypassLocationCheck()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        // disable location mode
-        mIsLocationEnabled = false;
-
-        int uid1 = 1000;
-        int uid2 = 1001;
-        // Only allow uid2 to renounce permissions
-        mPermissionsList.put(RENOUNCE_PERMISSIONS, uid2);
-
-        // mock uid1 renouncing location and expect the call to fail due to location mode being
-        // disabled since uid1 does not have permissions to renounce permissions.
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.getUid()).thenReturn(uid1);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.getRenouncedPermissions()).thenReturn(Set.of(ACCESS_FINE_LOCATION));
-
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-
-        assertFalse(codeUnderTest.checkNearbyDevicesPermission(attributionSource, true, ""));
-
-        // now attach AttributionSource2 with uid2 to the list of AttributionSource and then
-        // verify the location check is now bypassed.
-        AttributionSource attributionSource2 = mock(AttributionSource.class);
-        when(attributionSource2.getUid()).thenReturn(uid2);
-        when(attributionSource2.getRenouncedPermissions()).thenReturn(Set.of(ACCESS_FINE_LOCATION));
-        when(attributionSource.getNext()).thenReturn(attributionSource2);
-        codeUnderTest.enforceNearbyDevicesPermission(attributionSource, true, "");
-    }
-
-    /**
-     * Verify that when checkForLocation = true, the calling app can disavow location to bypass
-     * the location check.
-     * @throws Exception
-     */
-    @Test
-    public void testEnforceNearbyDevicesPermission_LocationCheckDisavowPass() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.getRenouncedPermissions()).thenReturn(Collections.EMPTY_SET);
-        // mock caller disavowing location
-        mPackagePermissionInfo.requestedPermissions = new String[] {NEARBY_WIFI_DEVICES};
-        mPackagePermissionInfo.requestedPermissionsFlags =
-                new int[] {PackageInfo.REQUESTED_PERMISSION_NEVER_FOR_LOCATION};
-        when(mPermissionManager.checkPermissionForDataDelivery(eq(NEARBY_WIFI_DEVICES),
-                eq(attributionSource), any())).thenReturn(PermissionManager.PERMISSION_GRANTED);
-        when(mPermissionManager.checkPermissionForDataDelivery(
-                eq(Manifest.permission.ACCESS_FINE_LOCATION), eq(attributionSource), any()))
-                .thenReturn(PermissionManager.PERMISSION_SOFT_DENIED);
-
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-        codeUnderTest.enforceNearbyDevicesPermission(attributionSource, true, "");
-
-        // It's important to verify that ACCESS_FINE_LOCATION never gets checked so the caller
-        // does not get blamed for location access when they already disavowed location.
-        verify(mPermissionManager, never()).checkPermissionForDataDelivery(
-                eq(Manifest.permission.ACCESS_FINE_LOCATION), any(), any());
-    }
-
-    /**
-     * Verify that when checkForLocation = true, and the calling app does not disavow location,
-     * location permission will get checked.
-     * @throws Exception
-     */
-    @Test
-    public void testEnforceNearbyDevicesPermission_LocationCheckWithoutDisavowPass()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        // Set location mode off and grant app location permission
-        when(mLocationManager.isLocationEnabledForUser(any())).thenReturn(false);
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.getRenouncedPermissions()).thenReturn(Collections.EMPTY_SET);
-        mPackagePermissionInfo.requestedPermissions = new String[0];
-        when(mPermissionManager.checkPermissionForDataDelivery(eq(NEARBY_WIFI_DEVICES),
-                eq(attributionSource), any())).thenReturn(PermissionManager.PERMISSION_GRANTED);
-        when(mPermissionManager.checkPermissionForDataDelivery(
-                eq(Manifest.permission.ACCESS_FINE_LOCATION), eq(attributionSource), any()))
-                .thenReturn(PermissionManager.PERMISSION_GRANTED);
-
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-        // Test should fail because location mode is off
-        assertFalse(codeUnderTest.checkNearbyDevicesPermission(attributionSource, true, ""));
-
-        // Now enable location mode and the call should pass
-        when(mLocationManager.isLocationEnabledForUser(any())).thenReturn(true);
-        assertTrue(codeUnderTest.checkNearbyDevicesPermission(attributionSource, true, ""));
-
-        // verify that location check is performed since the caller did not disavow location.
-        verify(mPermissionManager).checkPermissionForDataDelivery(
-                eq(Manifest.permission.ACCESS_FINE_LOCATION), any(), any());
-    }
-
-    /**
-     * Verify that the nearby device permission check can be bypassed by very privileged apps.
-     */
-    @Test
-    public void testEnforceNearbyDevicesPermission_BypassCheckWithPrivilegedPermission()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-        AttributionSource attributionSource = mock(AttributionSource.class);
-        when(attributionSource.checkCallingUid()).thenReturn(true);
-        when(attributionSource.getUid()).thenReturn(mUid);
-        // caller no nearby permission
-        when(mPermissionManager.checkPermissionForDataDelivery(eq(NEARBY_WIFI_DEVICES),
-                eq(attributionSource), any())).thenReturn(PermissionManager.PERMISSION_SOFT_DENIED);
-
-        // but caller has another permission that allows bypassing nearby permission check.
-        mPermissionsList.put(mScanWithoutLocation, mUid);
-
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-        codeUnderTest.enforceNearbyDevicesPermission(attributionSource, true, "");
-    }
-
     private Answer<Integer> createPermissionAnswer() {
         return new Answer<Integer>() {
             @Override
             public Integer answer(InvocationOnMock invocation) {
                 int myUid = (int) invocation.getArguments()[1];
                 String myPermission = (String) invocation.getArguments()[0];
+                mPermissionsList.get(myPermission);
                 if (mPermissionsList.containsKey(myPermission)) {
                     int uid = mPermissionsList.get(myPermission);
                     if (myUid == uid) {
@@ -1576,9 +1324,6 @@
         }
         when(mMockPkgMgr.getApplicationInfoAsUser(eq(TEST_PACKAGE_NAME), eq(0), any()))
                 .thenReturn(mMockApplInfo);
-        when(mMockPkgMgr.getPackageInfo((String) any(),
-                eq(GET_PERMISSIONS | MATCH_UNINSTALLED_PACKAGES))).thenReturn(
-                        mPackagePermissionInfo);
         when(mMockContext.getPackageManager()).thenReturn(mMockPkgMgr);
         when(mMockAppOps.noteOp(AppOpsManager.OPSTR_WIFI_SCAN, mUid, TEST_PACKAGE_NAME,
                 TEST_FEATURE_ID, null)).thenReturn(mWifiScanAllowApps);
@@ -1604,7 +1349,6 @@
         when(mWifiInjector.getFrameworkFacade()).thenReturn(mMockFrameworkFacade);
         when(mMockContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager);
         when(mMockContext.getPackageName()).thenReturn(TEST_WIFI_STACK_APK_NAME);
-        when(mMockContext.getSystemService(PermissionManager.class)).thenReturn(mPermissionManager);
     }
 
     private void initTestVars() {
@@ -1626,6 +1370,8 @@
         BinderUtil.setUid(mUid);
         doAnswer(mReturnPermission).when(mMockPermissionsWrapper).getUidPermission(
                         anyString(), anyInt());
+        doAnswer(mReturnPermission).when(mMockPermissionsWrapper).getUidPermission(
+                        anyString(), anyInt());
         when(mMockUserManager.isSameProfileGroup(
                 UserHandle.getUserHandleForUid(MANAGED_PROFILE_UID),
                 UserHandle.SYSTEM))
@@ -1639,171 +1385,4 @@
                 .thenReturn(mHardwareLocationPermission);
         when(mLocationManager.isLocationEnabledForUser(any())).thenReturn(mIsLocationEnabled);
     }
-
-    /**
-     * Test case setting: caller does not have Coarse Location permission.
-     * Expect a SecurityException
-     */
-    @Test(expected = SecurityException.class)
-    public void testEnforceCoarseLocationPermissionExpectSecurityException() throws Exception {
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-        codeUnderTest.enforceCoarseLocationPermission(TEST_PACKAGE_NAME, TEST_FEATURE_ID, mUid);
-    }
-
-    /**
-     * Test case setting: caller does have Coarse Location permission.
-     * A SecurityException should not be thrown.
-     */
-    @Test
-    public void testEnforceCoarseLocationPermission() throws Exception {
-        mThrowSecurityException = false;
-        mIsLocationEnabled = true;
-        mCoarseLocationPermission = PackageManager.PERMISSION_GRANTED;
-        mAllowCoarseLocationApps = AppOpsManager.MODE_ALLOWED;
-        mUid = MANAGED_PROFILE_UID;
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-        codeUnderTest.enforceCoarseLocationPermission(TEST_PACKAGE_NAME, TEST_FEATURE_ID, mUid);
-        // verify that checking Coarse for apps!
-        verify(mMockAppOps).noteOp(eq(AppOpsManager.OPSTR_COARSE_LOCATION), anyInt(), anyString(),
-                any(), any());
-    }
-
-    @Test
-    public void testIsOemPrivilegedAdmin_notAllowListed() throws Exception {
-        setupTestCase();
-        setupOemAdmins(false, false);
-
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-
-        assertFalse(codeUnderTest.isOemPrivilegedAdmin(TEST_CALLING_UID));
-    }
-
-    @Test
-    public void testIsOemPrivilegedAdmin_allowListedNotSigned() throws Exception {
-        setupTestCase();
-        setupOemAdmins(true, false);
-
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-
-        assertFalse(codeUnderTest.isOemPrivilegedAdmin(TEST_CALLING_UID));
-    }
-
-    @Test
-    public void testIsOemPrivilegedAdmin_allowListedAndSigned() throws Exception {
-        setupTestCase();
-        setupOemAdmins(true, true);
-
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-
-        assertTrue(codeUnderTest.isOemPrivilegedAdmin(TEST_CALLING_UID));
-    }
-
-    private void setupOemAdmins(boolean allowlisted, boolean platformSigned) {
-        Resources mockResources = mock(Resources.class);
-        when(mockResources.getStringArray(R.array.config_oemPrivilegedWifiAdminPackages))
-                .thenReturn(allowlisted ? new String[]{TEST_PACKAGE_NAME} : new String[0]);
-        when(mMockContext.getResources()).thenReturn(mockResources);
-        when(mMockPkgMgr.getPackagesForUid(TEST_CALLING_UID))
-                .thenReturn(new String[]{TEST_PACKAGE_NAME});
-
-        when(mMockPkgMgr.checkSignatures(anyInt(), anyInt()))
-                .thenReturn(platformSigned
-                        ? PackageManager.SIGNATURE_MATCH
-                        : PackageManager.SIGNATURE_NO_MATCH);
-    }
-
-    @Test
-    public void testIsGuestUser() throws Exception {
-        when(mMockContext.createContextAsUser(any(), anyInt())).thenReturn(mUserContext);
-        when(mUserContext.getSystemService(UserManager.class)).thenReturn(mMockUserManager);
-        when(mMockUserManager.isGuestUser()).thenReturn(true);
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-        assertTrue(codeUnderTest.isGuestUser());
-    }
-
-    /**
-     * Test that isAdminRestrictedNetwork returns true due to SSID allowlist restriction
-     */
-    @Test
-    public void testIsAdminRestrictedNetworkSsidAllowlist() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = TEST_NETWORK_ID;
-        config.SSID = TEST_SSID;
-
-        WifiSsidPolicy policy = new WifiSsidPolicy(
-                WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_ALLOWLIST,
-                new ArraySet<>(Arrays.asList(WifiSsid.fromUtf8Text("test1"),
-                        WifiSsid.fromUtf8Text("test2"))));
-        when(mDevicePolicyManager.getWifiSsidPolicy()).thenReturn(policy);
-        when(mMockContext.getSystemService(DevicePolicyManager.class))
-                .thenReturn(mDevicePolicyManager);
-
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-
-        assertTrue(codeUnderTest.isAdminRestrictedNetwork(config));
-    }
-
-    /**
-     * Test that isAdminRestrictedNetwork returns true due to SSID denylist restriction
-     */
-    @Test
-    public void testIsAdminRestrictedNetworkSsidDenylist() throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = TEST_NETWORK_ID;
-        config.SSID = TEST_SSID;
-
-        WifiSsidPolicy policy = new WifiSsidPolicy(
-                WifiSsidPolicy.WIFI_SSID_POLICY_TYPE_DENYLIST,
-                new ArraySet<>(Arrays.asList(WifiSsid.fromUtf8Text("GoogleGuest"),
-                        WifiSsid.fromUtf8Text("test2"))));
-        when(mDevicePolicyManager.getWifiSsidPolicy()).thenReturn(policy);
-        when(mMockContext.getSystemService(DevicePolicyManager.class))
-                .thenReturn(mDevicePolicyManager);
-
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-
-        assertTrue(codeUnderTest.isAdminRestrictedNetwork(config));
-    }
-
-    /**
-     * Test that isAdminRestrictedNetwork returns true due to minimum security level restriction
-     */
-    @Test
-    public void testIsAdminRestrictedNetworkSecurityLevelRestriction()
-            throws Exception {
-        assumeTrue(SdkLevel.isAtLeastT());
-
-        WifiConfiguration config = new WifiConfiguration();
-        config.networkId = TEST_NETWORK_ID;
-        config.SSID = TEST_SSID;
-        config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
-
-        when(mMockContext.getSystemService(DevicePolicyManager.class))
-                .thenReturn(mDevicePolicyManager);
-        when(mDevicePolicyManager.getMinimumRequiredWifiSecurityLevel()).thenReturn(
-                DevicePolicyManager.WIFI_SECURITY_ENTERPRISE_EAP);
-
-        setupTestCase();
-        WifiPermissionsUtil codeUnderTest = new WifiPermissionsUtil(mMockPermissionsWrapper,
-                mMockContext, mMockUserManager, mWifiInjector);
-
-        assertTrue(codeUnderTest.isAdminRestrictedNetwork(config));
-    }
 }
diff --git a/service/tests/wifitests/src/com/android/server/wifi/util/WorkSourceHelperTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/WorkSourceHelperTest.java
index d7d46be..1eb8cd2 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/util/WorkSourceHelperTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/util/WorkSourceHelperTest.java
@@ -28,14 +28,12 @@
 import android.app.ActivityManager;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageManager;
-import android.content.res.Resources;
 import android.os.Process;
 import android.os.WorkSource;
 
 import androidx.test.filters.SmallTest;
 
 import com.android.server.wifi.WifiBaseTest;
-import com.android.wifi.resources.R;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -56,7 +54,6 @@
     @Mock private WifiPermissionsUtil mWifiPermissionsUtil;
     @Mock private ActivityManager mActivityManager;
     @Mock private PackageManager mPackageManager;
-    @Mock private Resources mResources;
 
     private WorkSource mWorkSource;
     private WorkSourceHelper mWorkSourceHelper;
@@ -70,7 +67,7 @@
         mWorkSource.add(new WorkSource(TEST_UID_2, TEST_PACKAGE_2));
 
         mWorkSourceHelper = new WorkSourceHelper(
-                mWorkSource, mWifiPermissionsUtil, mActivityManager, mPackageManager, mResources);
+                mWorkSource, mWifiPermissionsUtil, mActivityManager, mPackageManager);
     }
 
     @Test
@@ -99,19 +96,12 @@
                 .thenReturn(IMPORTANCE_BACKGROUND);
         when(mActivityManager.getPackageImportance(TEST_PACKAGE_2))
                 .thenReturn(IMPORTANCE_BACKGROUND);
-        assertFalse(mWorkSourceHelper.hasAnyForegroundAppRequest(true));
-
-        // override background status
-        when(mResources.getStringArray(
-                R.array.config_wifiInterfacePriorityTreatAsForegroundList)).thenReturn(
-                new String[]{TEST_PACKAGE_2});
-        assertTrue(mWorkSourceHelper.hasAnyForegroundAppRequest(true));
-        assertFalse(mWorkSourceHelper.hasAnyForegroundAppRequest(false));
+        assertFalse(mWorkSourceHelper.hasAnyForegroundAppRequest());
 
         // 1 request from fg app, 1 from bg app.
         when(mActivityManager.getPackageImportance(TEST_PACKAGE_1))
                 .thenReturn(IMPORTANCE_FOREGROUND);
-        assertTrue(mWorkSourceHelper.hasAnyForegroundAppRequest(true));
+        assertTrue(mWorkSourceHelper.hasAnyForegroundAppRequest());
     }
 
     @Test
diff --git a/service/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java b/service/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java
index c62d080..50bd95e 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java
@@ -20,7 +20,6 @@
 import static org.mockito.Mockito.*;
 
 import android.net.IpConfiguration;
-import android.net.MacAddress;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
 import android.net.wifi.WifiEnterpriseConfig;
@@ -51,7 +50,6 @@
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
-import java.util.List;
 
 /**
  * Unit tests for {@link com.android.server.wifi.util.XmlUtil}.
@@ -96,9 +94,7 @@
     @Test
     public void testOpenWifiConfigurationSerializeDeserialize()
             throws IOException, XmlPullParserException {
-        WifiConfiguration config = WifiConfigurationTestUtil.createOpenNetwork();
-        config.setBssidAllowlist(List.of(MacAddress.fromString("6c:f3:7f:ae:8c:f3")));
-        serializeDeserializeWifiConfiguration(config);
+        serializeDeserializeWifiConfiguration(WifiConfigurationTestUtil.createOpenNetwork());
     }
 
     /**
@@ -169,18 +165,6 @@
     }
 
     /**
-     * Verify that a EAP WifiConfiguration with TOFU is serialized & deserialized correctly
-     * only for ConfigStore.
-     */
-    @Test
-    public void testTofuEapWifiConfigurationSerializeDeserialize()
-            throws IOException, XmlPullParserException {
-        WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
-        config.enterpriseConfig.enableTrustOnFirstUse(true);
-        serializeDeserializeWifiConfigurationForConfigStore(config);
-    }
-
-    /**
      * Verify that a static IpConfiguration with PAC proxy is serialized & deserialized correctly.
      */
     @Test
@@ -253,8 +237,6 @@
         configuration.oemPaid = true;
         configuration.oemPrivate = true;
         configuration.carrierMerged = true;
-        configuration.restricted = true;
-        configuration.setRepeaterEnabled(true);
         configuration.lastUpdateUid = configuration.lastConnectUid = configuration.creatorUid;
         configuration.creatorName = configuration.lastUpdateName = TEST_PACKAGE_NAME;
         configuration.setRandomizedMacAddress(MacAddressUtils.createRandomUnicastAddress());
@@ -537,7 +519,7 @@
 
     /**
      * Verify that when deserializing a XML RANDOMIZATION_PERSISTENT is automatically upgraded to
-     * RANDOIMZATION_NON_PERSISTENT.
+     * RANDOIMZATION_ENHANCED.
      * @throws IOException
      * @throws XmlPullParserException
      */